diff --git a/assets/ccip-c80064a1.js b/assets/ccip-85cbe570.js similarity index 97% rename from assets/ccip-c80064a1.js rename to assets/ccip-85cbe570.js index f1faaec3..e7a35171 100644 --- a/assets/ccip-c80064a1.js +++ b/assets/ccip-85cbe570.js @@ -1 +1 @@ -import{an as f,ao as w,ap as y,aq as p,ar as h,as as g,at as k,au as O,av as L,aw as m,ax as E}from"./index-dddcbded.js";class x extends f{constructor({callbackSelector:e,cause:t,data:n,extraData:c,sender:d,urls:a}){var i;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(i=t.metaMessages)!=null&&i.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(u=>` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends f{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends f{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(s,e){if(!p(s))throw new h({address:s});if(!p(e))throw new h({address:e});return s.toLowerCase()===e.toLowerCase()}const C="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function P(s,{blockNumber:e,blockTag:t,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[a,i,u,r,o]=d;try{if(!$(c,a))throw new R({sender:a,to:c});const l=await v({data:u,sender:a,urls:i}),{data:b}=await k(s,{blockNumber:e,blockTag:t,data:O([r,L([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return b}catch(l){throw new x({callbackSelector:r,cause:l,data:n,extraData:o,sender:a,urls:i})}}async function v({data:s,sender:e,urls:t}){var c;let n=new Error("An unknown error occurred.");for(let d=0;d` ${w(u)}`)],` Sender: ${d}`,` Data: ${n}`,` Callback selector: ${e}`,` Extra data: ${c}`].flat()}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupError"})}}class M extends f{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${w(t)}`,`Response: ${y(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupResponseMalformedError"})}}class R extends f{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"OffchainLookupSenderMismatchError"})}}function $(s,e){if(!p(s))throw new h({address:s});if(!p(e))throw new h({address:e});return s.toLowerCase()===e.toLowerCase()}const C="0x556f1830",S={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function P(s,{blockNumber:e,blockTag:t,data:n,to:c}){const{args:d}=g({data:n,abi:[S]}),[a,i,u,r,o]=d;try{if(!$(c,a))throw new R({sender:a,to:c});const l=await v({data:u,sender:a,urls:i}),{data:b}=await k(s,{blockNumber:e,blockTag:t,data:O([r,L([{type:"bytes"},{type:"bytes"}],[l,o])]),to:c});return b}catch(l){throw new x({callbackSelector:r,cause:l,data:n,extraData:o,sender:a,urls:i})}}async function v({data:s,sender:e,urls:t}){var c;let n=new Error("An unknown error occurred.");for(let d=0;di&&(Ft.has(i)?Ft.get(i):Pt(i)===Object.prototype||Pt(i)===Array.prototype),ce=i=>ue(i)&&i[se]||null,Nt=(i,c=!0)=>{Ft.set(i,c)},At=i=>typeof i=="object"&&i!==null,J=new WeakMap,pt=new WeakSet,ae=(i=Object.is,c=(y,I)=>new Proxy(y,I),l=y=>At(y)&&!pt.has(y)&&(Array.isArray(y)||!(Symbol.iterator in y))&&!(y instanceof WeakMap)&&!(y instanceof WeakSet)&&!(y instanceof Error)&&!(y instanceof Number)&&!(y instanceof Date)&&!(y instanceof String)&&!(y instanceof RegExp)&&!(y instanceof ArrayBuffer),h=y=>{switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:throw y}},p=new WeakMap,d=(y,I,B=h)=>{const L=p.get(y);if((L==null?void 0:L[0])===I)return L[1];const U=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y));return Nt(U,!0),p.set(y,[I,U]),Reflect.ownKeys(y).forEach(P=>{if(Object.getOwnPropertyDescriptor(U,P))return;const T=Reflect.get(y,P),G={value:T,enumerable:!0,configurable:!0};if(pt.has(T))Nt(T,!1);else if(T instanceof Promise)delete G.value,G.get=()=>B(T);else if(J.has(T)){const[O,ct]=J.get(T);G.value=d(O,ct(),B)}Object.defineProperty(U,P,G)}),U},f=new WeakMap,s=[1,1],E=y=>{if(!At(y))throw new Error("object required");const I=f.get(y);if(I)return I;let B=s[0];const L=new Set,U=(x,m=++s[0])=>{B!==m&&(B=m,L.forEach(w=>w(x,m)))};let P=s[1];const T=(x=++s[1])=>(P!==x&&!L.size&&(P=x,O.forEach(([m])=>{const w=m[1](x);w>B&&(B=w)})),B),G=x=>(m,w)=>{const D=[...m];D[1]=[x,...D[1]],U(D,w)},O=new Map,ct=(x,m)=>{if(L.size){const w=m[3](G(x));O.set(x,[m,w])}else O.set(x,[m])},at=x=>{var m;const w=O.get(x);w&&(O.delete(x),(m=w[1])==null||m.call(w))},gt=x=>(L.add(x),L.size===1&&O.forEach(([w,D],H)=>{const Y=w[3](G(H));O.set(H,[w,Y])}),()=>{L.delete(x),L.size===0&&O.forEach(([w,D],H)=>{D&&(D(),O.set(H,[w]))})}),k=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y)),Q=c(k,{deleteProperty(x,m){const w=Reflect.get(x,m);at(m);const D=Reflect.deleteProperty(x,m);return D&&U(["delete",[m],w]),D},set(x,m,w,D){const H=Reflect.has(x,m),Y=Reflect.get(x,m,D);if(H&&(i(Y,w)||f.has(w)&&i(Y,f.get(w))))return!0;at(m),At(w)&&(w=ce(w)||w);let Z=w;if(w instanceof Promise)w.then($=>{w.status="fulfilled",w.value=$,U(["resolve",[m],$])}).catch($=>{w.status="rejected",w.reason=$,U(["reject",[m],$])});else{!J.has(w)&&l(w)&&(Z=E(w));const $=!pt.has(Z)&&J.get(Z);$&&ct(m,$)}return Reflect.set(x,m,Z,D),U(["set",[m],w,Y]),!0}});f.set(y,Q);const Et=[k,T,d,gt];return J.set(Q,Et),Reflect.ownKeys(y).forEach(x=>{const m=Object.getOwnPropertyDescriptor(y,x);"value"in m&&(Q[x]=y[x],delete m.value,delete m.writable),Object.defineProperty(k,x,m)}),Q})=>[E,J,pt,i,c,l,h,p,d,f,s],[le]=ae();function X(i={}){return le(i)}function rt(i,c,l){const h=J.get(i);let p;const d=[],f=h[3];let s=!1;const y=f(I=>{if(d.push(I),l){c(d.splice(0));return}p||(p=Promise.resolve().then(()=>{p=void 0,s&&c(d.splice(0))}))});return s=!0,()=>{s=!1,y()}}function fe(i,c){const l=J.get(i),[h,p,d]=l;return d(h,p(),c)}var zt={},wt={};wt.byteLength=de;wt.toByteArray=we;wt.fromByteArray=Ee;var z=[],N=[],he=typeof Uint8Array<"u"?Uint8Array:Array,Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ot=0,pe=Ut.length;ot0)throw new Error("Invalid string. Length must be a multiple of 4");var l=i.indexOf("=");l===-1&&(l=c);var h=l===c?0:4-l%4;return[l,h]}function de(i){var c=Gt(i),l=c[0],h=c[1];return(l+h)*3/4-h}function ye(i,c,l){return(c+l)*3/4-l}function we(i){var c,l=Gt(i),h=l[0],p=l[1],d=new he(ye(i,h,p)),f=0,s=p>0?h-4:h,E;for(E=0;E>16&255,d[f++]=c>>8&255,d[f++]=c&255;return p===2&&(c=N[i.charCodeAt(E)]<<2|N[i.charCodeAt(E+1)]>>4,d[f++]=c&255),p===1&&(c=N[i.charCodeAt(E)]<<10|N[i.charCodeAt(E+1)]<<4|N[i.charCodeAt(E+2)]>>2,d[f++]=c>>8&255,d[f++]=c&255),d}function ge(i){return z[i>>18&63]+z[i>>12&63]+z[i>>6&63]+z[i&63]}function me(i,c,l){for(var h,p=[],d=c;ds?s:f+d));return h===1?(c=i[l-1],p.push(z[c>>2]+z[c<<4&63]+"==")):h===2&&(c=(i[l-2]<<8)+i[l-1],p.push(z[c>>10]+z[c>>4&63]+z[c<<2&63]+"=")),p.join("")}var Lt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Lt.read=function(i,c,l,h,p){var d,f,s=p*8-h-1,E=(1<>1,I=-7,B=l?p-1:0,L=l?-1:1,U=i[c+B];for(B+=L,d=U&(1<<-I)-1,U>>=-I,I+=s;I>0;d=d*256+i[c+B],B+=L,I-=8);for(f=d&(1<<-I)-1,d>>=-I,I+=h;I>0;f=f*256+i[c+B],B+=L,I-=8);if(d===0)d=1-y;else{if(d===E)return f?NaN:(U?-1:1)*(1/0);f=f+Math.pow(2,h),d=d-y}return(U?-1:1)*f*Math.pow(2,d-h)};Lt.write=function(i,c,l,h,p,d){var f,s,E,y=d*8-p-1,I=(1<>1,L=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=h?0:d-1,P=h?1:-1,T=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(s=isNaN(c)?1:0,f=I):(f=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-f))<1&&(f--,E*=2),f+B>=1?c+=L/E:c+=L*Math.pow(2,1-B),c*E>=2&&(f++,E/=2),f+B>=I?(s=0,f=I):f+B>=1?(s=(c*E-1)*Math.pow(2,p),f=f+B):(s=c*Math.pow(2,B-1)*Math.pow(2,p),f=0));p>=8;i[l+U]=s&255,U+=P,s/=256,p-=8);for(f=f<0;i[l+U]=f&255,U+=P,f/=256,y-=8);i[l+U-P]|=T*128};/*! +import{am as oe}from"./index-f07e9ad7.js";const se=Symbol(),Pt=Object.getPrototypeOf,Ft=new WeakMap,ue=i=>i&&(Ft.has(i)?Ft.get(i):Pt(i)===Object.prototype||Pt(i)===Array.prototype),ce=i=>ue(i)&&i[se]||null,Nt=(i,c=!0)=>{Ft.set(i,c)},At=i=>typeof i=="object"&&i!==null,J=new WeakMap,pt=new WeakSet,ae=(i=Object.is,c=(y,I)=>new Proxy(y,I),l=y=>At(y)&&!pt.has(y)&&(Array.isArray(y)||!(Symbol.iterator in y))&&!(y instanceof WeakMap)&&!(y instanceof WeakSet)&&!(y instanceof Error)&&!(y instanceof Number)&&!(y instanceof Date)&&!(y instanceof String)&&!(y instanceof RegExp)&&!(y instanceof ArrayBuffer),h=y=>{switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:throw y}},p=new WeakMap,d=(y,I,B=h)=>{const L=p.get(y);if((L==null?void 0:L[0])===I)return L[1];const U=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y));return Nt(U,!0),p.set(y,[I,U]),Reflect.ownKeys(y).forEach(P=>{if(Object.getOwnPropertyDescriptor(U,P))return;const T=Reflect.get(y,P),G={value:T,enumerable:!0,configurable:!0};if(pt.has(T))Nt(T,!1);else if(T instanceof Promise)delete G.value,G.get=()=>B(T);else if(J.has(T)){const[O,ct]=J.get(T);G.value=d(O,ct(),B)}Object.defineProperty(U,P,G)}),U},f=new WeakMap,s=[1,1],E=y=>{if(!At(y))throw new Error("object required");const I=f.get(y);if(I)return I;let B=s[0];const L=new Set,U=(x,m=++s[0])=>{B!==m&&(B=m,L.forEach(w=>w(x,m)))};let P=s[1];const T=(x=++s[1])=>(P!==x&&!L.size&&(P=x,O.forEach(([m])=>{const w=m[1](x);w>B&&(B=w)})),B),G=x=>(m,w)=>{const D=[...m];D[1]=[x,...D[1]],U(D,w)},O=new Map,ct=(x,m)=>{if(L.size){const w=m[3](G(x));O.set(x,[m,w])}else O.set(x,[m])},at=x=>{var m;const w=O.get(x);w&&(O.delete(x),(m=w[1])==null||m.call(w))},gt=x=>(L.add(x),L.size===1&&O.forEach(([w,D],H)=>{const Y=w[3](G(H));O.set(H,[w,Y])}),()=>{L.delete(x),L.size===0&&O.forEach(([w,D],H)=>{D&&(D(),O.set(H,[w]))})}),k=Array.isArray(y)?[]:Object.create(Object.getPrototypeOf(y)),Q=c(k,{deleteProperty(x,m){const w=Reflect.get(x,m);at(m);const D=Reflect.deleteProperty(x,m);return D&&U(["delete",[m],w]),D},set(x,m,w,D){const H=Reflect.has(x,m),Y=Reflect.get(x,m,D);if(H&&(i(Y,w)||f.has(w)&&i(Y,f.get(w))))return!0;at(m),At(w)&&(w=ce(w)||w);let Z=w;if(w instanceof Promise)w.then($=>{w.status="fulfilled",w.value=$,U(["resolve",[m],$])}).catch($=>{w.status="rejected",w.reason=$,U(["reject",[m],$])});else{!J.has(w)&&l(w)&&(Z=E(w));const $=!pt.has(Z)&&J.get(Z);$&&ct(m,$)}return Reflect.set(x,m,Z,D),U(["set",[m],w,Y]),!0}});f.set(y,Q);const Et=[k,T,d,gt];return J.set(Q,Et),Reflect.ownKeys(y).forEach(x=>{const m=Object.getOwnPropertyDescriptor(y,x);"value"in m&&(Q[x]=y[x],delete m.value,delete m.writable),Object.defineProperty(k,x,m)}),Q})=>[E,J,pt,i,c,l,h,p,d,f,s],[le]=ae();function X(i={}){return le(i)}function rt(i,c,l){const h=J.get(i);let p;const d=[],f=h[3];let s=!1;const y=f(I=>{if(d.push(I),l){c(d.splice(0));return}p||(p=Promise.resolve().then(()=>{p=void 0,s&&c(d.splice(0))}))});return s=!0,()=>{s=!1,y()}}function fe(i,c){const l=J.get(i),[h,p,d]=l;return d(h,p(),c)}var zt={},wt={};wt.byteLength=de;wt.toByteArray=we;wt.fromByteArray=Ee;var z=[],N=[],he=typeof Uint8Array<"u"?Uint8Array:Array,Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var ot=0,pe=Ut.length;ot0)throw new Error("Invalid string. Length must be a multiple of 4");var l=i.indexOf("=");l===-1&&(l=c);var h=l===c?0:4-l%4;return[l,h]}function de(i){var c=Gt(i),l=c[0],h=c[1];return(l+h)*3/4-h}function ye(i,c,l){return(c+l)*3/4-l}function we(i){var c,l=Gt(i),h=l[0],p=l[1],d=new he(ye(i,h,p)),f=0,s=p>0?h-4:h,E;for(E=0;E>16&255,d[f++]=c>>8&255,d[f++]=c&255;return p===2&&(c=N[i.charCodeAt(E)]<<2|N[i.charCodeAt(E+1)]>>4,d[f++]=c&255),p===1&&(c=N[i.charCodeAt(E)]<<10|N[i.charCodeAt(E+1)]<<4|N[i.charCodeAt(E+2)]>>2,d[f++]=c>>8&255,d[f++]=c&255),d}function ge(i){return z[i>>18&63]+z[i>>12&63]+z[i>>6&63]+z[i&63]}function me(i,c,l){for(var h,p=[],d=c;ds?s:f+d));return h===1?(c=i[l-1],p.push(z[c>>2]+z[c<<4&63]+"==")):h===2&&(c=(i[l-2]<<8)+i[l-1],p.push(z[c>>10]+z[c>>4&63]+z[c<<2&63]+"=")),p.join("")}var Lt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Lt.read=function(i,c,l,h,p){var d,f,s=p*8-h-1,E=(1<>1,I=-7,B=l?p-1:0,L=l?-1:1,U=i[c+B];for(B+=L,d=U&(1<<-I)-1,U>>=-I,I+=s;I>0;d=d*256+i[c+B],B+=L,I-=8);for(f=d&(1<<-I)-1,d>>=-I,I+=h;I>0;f=f*256+i[c+B],B+=L,I-=8);if(d===0)d=1-y;else{if(d===E)return f?NaN:(U?-1:1)*(1/0);f=f+Math.pow(2,h),d=d-y}return(U?-1:1)*f*Math.pow(2,d-h)};Lt.write=function(i,c,l,h,p,d){var f,s,E,y=d*8-p-1,I=(1<>1,L=p===23?Math.pow(2,-24)-Math.pow(2,-77):0,U=h?0:d-1,P=h?1:-1,T=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(s=isNaN(c)?1:0,f=I):(f=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-f))<1&&(f--,E*=2),f+B>=1?c+=L/E:c+=L*Math.pow(2,1-B),c*E>=2&&(f++,E/=2),f+B>=I?(s=0,f=I):f+B>=1?(s=(c*E-1)*Math.pow(2,p),f=f+B):(s=c*Math.pow(2,B-1)*Math.pow(2,p),f=0));p>=8;i[l+U]=s&255,U+=P,s/=256,p-=8);for(f=f<0;i[l+U]=f&255,U+=P,f/=256,y-=8);i[l+U-P]|=T*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(i){const c=wt,l=Lt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=s,i.SlowBuffer=ct,i.INSPECT_MAX_BYTES=50;const p=2147483647;i.kMaxLength=p,s.TYPED_ARRAY_SUPPORT=d(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function d(){try{const r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function f(r){if(r>p)throw new RangeError('The value "'+r+'" is invalid for option "size"');const t=new Uint8Array(r);return Object.setPrototypeOf(t,s.prototype),t}function s(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(r)}return E(r,t,e)}s.poolSize=8192;function E(r,t,e){if(typeof r=="string")return L(r,t);if(ArrayBuffer.isView(r))return P(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(v(r,ArrayBuffer)||r&&v(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(v(r,SharedArrayBuffer)||r&&v(r.buffer,SharedArrayBuffer)))return T(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return s.from(n,t,e);const o=G(r);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return s.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}s.from=function(r,t,e){return E(r,t,e)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function y(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function I(r,t,e){return y(r),r<=0?f(r):t!==void 0?typeof e=="string"?f(r).fill(t,e):f(r).fill(t):f(r)}s.alloc=function(r,t,e){return I(r,t,e)};function B(r){return y(r),f(r<0?0:O(r)|0)}s.allocUnsafe=function(r){return B(r)},s.allocUnsafeSlow=function(r){return B(r)};function L(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const e=at(r,t)|0;let n=f(e);const o=n.write(r,t);return o!==e&&(n=n.slice(0,o)),n}function U(r){const t=r.length<0?0:O(r.length)|0,e=f(t);for(let n=0;n=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return r|0}function ct(r){return+r!=r&&(r=0),s.alloc(+r)}s.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==s.prototype},s.compare=function(t,e){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),v(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,o=e.length;for(let u=0,a=Math.min(n,o);uo.length?(s.isBuffer(a)||(a=s.from(a)),a.copy(o,u)):Uint8Array.prototype.set.call(o,a,u);else if(s.isBuffer(a))a.copy(o,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=a.length}return o};function at(r,t){if(s.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||v(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const e=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return It(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Wt(r).length;default:if(o)return n?-1:It(r).length;t=(""+t).toLowerCase(),o=!0}}s.byteLength=at;function gt(r,t,e){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Jt(this,t,e);case"utf8":case"utf-8":return Y(this,t,e);case"ascii":return Yt(this,t,e);case"latin1":case"binary":return qt(this,t,e);case"base64":return H(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}s.prototype._isBuffer=!0;function k(r,t,e){const n=r[t];r[t]=r[e],r[e]=n}s.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},h&&(s.prototype[h]=s.prototype.inspect),s.prototype.compare=function(t,e,n,o,u){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),u===void 0&&(u=this.length),e<0||n>t.length||o<0||u>this.length)throw new RangeError("out of range index");if(o>=u&&e>=n)return 0;if(o>=u)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,u>>>=0,this===t)return 0;let a=u-o,g=n-e;const F=Math.min(a,g),b=this.slice(o,u),C=t.slice(e,n);for(let A=0;A2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,Bt(e)&&(e=o?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(o)return-1;e=r.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,n)),s.isBuffer(t))return t.length===0?-1:Q(r,t,e,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Q(r,[t],e,n,o);throw new TypeError("val must be string, number or Buffer")}function Q(r,t,e,n,o){let u=1,a=r.length,g=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;u=2,a/=2,g/=2,e/=2}function F(C,A){return u===1?C[A]:C.readUInt16BE(A*u)}let b;if(o){let C=-1;for(b=e;ba&&(e=a-g),b=e;b>=0;b--){let C=!0;for(let A=0;Ao&&(n=o)):n=o;const u=t.length;n>u/2&&(n=u/2);let a;for(a=0;a>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-e;if((n===void 0||n>u)&&(n=u),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let a=!1;for(;;)switch(o){case"hex":return Et(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":case"latin1":case"binary":return m(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(r,t,e){return t===0&&e===r.length?c.fromByteArray(r):c.fromByteArray(r.slice(t,e))}function Y(r,t,e){e=Math.min(r.length,e);const n=[];let o=t;for(;o239?4:u>223?3:u>191?2:1;if(o+g<=e){let F,b,C,A;switch(g){case 1:u<128&&(a=u);break;case 2:F=r[o+1],(F&192)===128&&(A=(u&31)<<6|F&63,A>127&&(a=A));break;case 3:F=r[o+1],b=r[o+2],(F&192)===128&&(b&192)===128&&(A=(u&15)<<12|(F&63)<<6|b&63,A>2047&&(A<55296||A>57343)&&(a=A));break;case 4:F=r[o+1],b=r[o+2],C=r[o+3],(F&192)===128&&(b&192)===128&&(C&192)===128&&(A=(u&15)<<18|(F&63)<<12|(b&63)<<6|C&63,A>65535&&A<1114112&&(a=A))}}a===null?(a=65533,g=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=g}return $(n)}const Z=4096;function $(r){const t=r.length;if(t<=Z)return String.fromCharCode.apply(String,r);let e="",n=0;for(;nn)&&(e=n);let o="";for(let u=t;un&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),ee)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t+--e],u=1;for(;e>0&&(u*=256);)o+=this[t+--e]*u;return o},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,u=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(o)+(BigInt(u)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],u=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(o)<>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a=u&&(o-=Math.pow(2,8*e)),o},s.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=e,u=1,a=this[t+--o];for(;o>0&&(u*=256);)a+=this[t+--o]*u;return u*=128,a>=u&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(o)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(o)<>>0,e||R(t,4,this.length),l.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t=t>>>0,e||R(t,4,this.length),l.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!1,52,8)};function W(r,t,e,n,o,u){if(!s.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||tr.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=1,a=0;for(this[e]=t&255;++a>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=n-1,a=1;for(this[e+u]=t&255;--u>=0&&(a*=256);)this[e+u]=t/a&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,255,0),this[e]=t&255,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Rt(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,e}function St(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e+7]=u,u=u>>8,r[e+6]=u,u=u>>8,r[e+5]=u,u=u>>8,r[e+4]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=a,a=a>>8,r[e+2]=a,a=a>>8,r[e+1]=a,a=a>>8,r[e]=a,e+8}s.prototype.writeBigUInt64LE=q(function(t,e=0){return Rt(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=q(function(t,e=0){return St(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=0,a=1,g=0;for(this[e]=t&255;++u>0)-g&255;return e+n},s.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=n-1,a=1,g=0;for(this[e+u]=t&255;--u>=0&&(a*=256);)t<0&&g===0&&this[e+u+1]!==0&&(g=1),this[e+u]=(t/a>>0)-g&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},s.prototype.writeBigInt64LE=q(function(t,e=0){return Rt(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=q(function(t,e=0){return St(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Mt(r,t,e,n,o,u){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Tt(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,4),l.write(r,t,e,n,23,4),e+4}s.prototype.writeFloatLE=function(t,e,n){return Tt(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return Tt(this,t,e,!1,n)};function Ot(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,8),l.write(r,t,e,n,52,8),e+8}s.prototype.writeDoubleLE=function(t,e,n){return Ot(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return Ot(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,o){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let u;if(typeof t=="number")for(u=e;u2**32?o=Dt(String(e)):typeof e=="bigint"&&(o=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(o=Dt(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Dt(r){let t="",e=r.length;const n=r[0]==="-"?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function Qt(r,t,e){it(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&<(t,r.length-(e+1))}function _t(r,t,e,n,o,u){if(r>e||r3?t===0||t===BigInt(0)?g=`>= 0${a} and < 2${a} ** ${(u+1)*8}${a}`:g=`>= -(2${a} ** ${(u+1)*8-1}${a}) and < 2 ** ${(u+1)*8-1}${a}`:g=`>= ${t}${a} and <= ${e}${a}`,new nt.ERR_OUT_OF_RANGE("value",g,r)}Qt(n,o,u)}function it(r,t){if(typeof r!="number")throw new nt.ERR_INVALID_ARG_TYPE(t,"number",r)}function lt(r,t,e){throw Math.floor(r)!==r?(it(r,e),new nt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}const Zt=/[^+/0-9A-Za-z-_]/g;function te(r){if(r=r.split("=")[0],r=r.trim().replace(Zt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function It(r,t){t=t||1/0;let e;const n=r.length;let o=null;const u=[];for(let a=0;a55295&&e<57344){if(!o){if(e>56319){(t-=3)>-1&&u.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&u.push(239,191,189);continue}o=e;continue}if(e<56320){(t-=3)>-1&&u.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(t-=3)>-1&&u.push(239,191,189);if(o=null,e<128){if((t-=1)<0)break;u.push(e)}else if(e<2048){if((t-=2)<0)break;u.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;u.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;u.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return u}function ee(r){const t=[];for(let e=0;e>8,o=e%256,u.push(o),u.push(n);return u}function Wt(r){return c.toByteArray(te(r))}function ht(r,t,e,n){let o;for(o=0;o=t.length||o>=r.length);++o)t[o+e]=r[o];return o}function v(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function Bt(r){return r!==r}const ne=function(){const r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){const n=e*16;for(let o=0;o<16;++o)t[n+o]=r[e]+r[o]}return t}();function q(r){return typeof BigInt>"u"?ie:r}function ie(){throw new Error("BigInt not supported")}})(zt);const S=X({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Ht={state:S,subscribe(i){return rt(S,()=>i(S))},push(i,c){i!==S.view&&(S.view=i,c&&(S.data=c),S.history.push(i))},reset(i){S.view=i,S.history=[i]},replace(i){S.history.length>1&&(S.history[S.history.length-1]=i,S.view=i)},goBack(){if(S.history.length>1){S.history.pop();const[i]=S.history.slice(-1);S.view=i}},setData(i){S.data=i}},_={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return _.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const i=navigator.userAgent.toLowerCase();return _.isMobile()&&(i.includes("iphone")||i.includes("ipad"))},isHttpUrl(i){return i.startsWith("http://")||i.startsWith("https://")},isArray(i){return Array.isArray(i)&&i.length>0},formatNativeUrl(i,c,l){if(_.isHttpUrl(i))return this.formatUniversalUrl(i,c,l);let h=i;h.includes("://")||(h=i.replaceAll("/","").replaceAll(":",""),h=`${h}://`),h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},formatUniversalUrl(i,c,l){if(!_.isHttpUrl(i))return this.formatNativeUrl(i,c,l);let h=i;h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},async wait(i){return new Promise(c=>{setTimeout(c,i)})},openHref(i,c){window.open(i,c,"noreferrer noopener")},setWalletConnectDeepLink(i,c){try{localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:i,name:c}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(i){try{const[c]=i.split("?");localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:c,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(_.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(_.WCM_VERSION,"2.5.9")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var i;const c=(i=Ht.state.data)==null?void 0:i.Wallet;if(!c)throw new Error('Missing "Wallet" view data');return c}},xe=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),M=X({enabled:xe,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:M,subscribe(i){return rt(M.events,()=>i(fe(M.events[M.events.length-1])))},initialize(){M.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(M.userSessionId=crypto.randomUUID())},setConnectedWalletId(i){M.connectedWalletId=i},click(i){if(M.enabled){const c={type:"CLICK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},track(i){if(M.enabled){const c={type:"TRACK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},view(i){if(M.enabled){const c={type:"VIEW",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}}},V=X({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),j={state:V,subscribe(i){return rt(V,()=>i(V))},setChains(i){V.chains=i},setWalletConnectUri(i){V.walletConnectUri=i},setIsCustomDesktop(i){V.isCustomDesktop=i},setIsCustomMobile(i){V.isCustomMobile=i},setIsDataLoaded(i){V.isDataLoaded=i},setIsUiLoaded(i){V.isUiLoaded=i},setIsAuth(i){V.isAuth=i}},dt=X({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),ut={state:dt,subscribe(i){return rt(dt,()=>i(dt))},setConfig(i){var c,l;Ie.initialize(),j.setChains(i.chains),j.setIsAuth(!!i.enableAuthMode),j.setIsCustomMobile(!!((c=i.mobileWallets)!=null&&c.length)),j.setIsCustomDesktop(!!((l=i.desktopWallets)!=null&&l.length)),_.setModalVersionInStorage(),Object.assign(dt,i)}},Ct="https://explorer-api.walletconnect.com";async function yt(i,c){const l=new URL(i,Ct);return l.searchParams.append("projectId",ut.state.projectId),Object.entries(c).forEach(([h,p])=>{p&&l.searchParams.append(h,String(p))}),(await fetch(l)).json()}const tt={async getDesktopListings(i){return yt("/w3m/v1/getDesktopListings",i)},async getMobileListings(i){return yt("/w3m/v1/getMobileListings",i)},async getInjectedListings(i){return yt("/w3m/v1/getInjectedListings",i)},async getAllListings(i){return yt("/w3m/v1/getAllListings",i)},getWalletImageUrl(i){return`${Ct}/w3m/v1/getWalletImage/${i}?projectId=${ut.state.projectId}`},getAssetImageUrl(i){return`${Ct}/w3m/v1/getAssetImage/${i}?projectId=${ut.state.projectId}`}};var Be=Object.defineProperty,kt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,jt=(i,c,l)=>c in i?Be(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,be=(i,c)=>{for(var l in c||(c={}))Ae.call(c,l)&&jt(i,l,c[l]);if(kt)for(var l of kt(c))Ue.call(c,l)&&jt(i,l,c[l]);return i};const $t=_.isMobile(),K=X({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),De={state:K,async getRecomendedWallets(){const{explorerRecommendedWalletIds:i,explorerExcludedWalletIds:c}=ut.state;if(i==="NONE"||c==="ALL"&&!i)return K.recomendedWallets;if(_.isArray(i)){const l={recommendedIds:i.join(",")},{listings:h}=await tt.getAllListings(l),p=Object.values(h);p.sort((d,f)=>{const s=i.indexOf(d.id),E=i.indexOf(f.id);return s-E}),K.recomendedWallets=p}else{const{chains:l,isAuth:h}=j.state,p=l==null?void 0:l.join(","),d=_.isArray(c),f={page:1,sdks:h?"auth_v1":void 0,entries:_.RECOMMENDED_WALLET_AMOUNT,chains:p,version:2,excludedIds:d?c.join(","):void 0},{listings:s}=$t?await tt.getMobileListings(f):await tt.getDesktopListings(f);K.recomendedWallets=Object.values(s)}return K.recomendedWallets},async getWallets(i){const c=be({},i),{explorerRecommendedWalletIds:l,explorerExcludedWalletIds:h}=ut.state,{recomendedWallets:p}=K;if(h==="ALL")return K.wallets;p.length?c.excludedIds=p.map(B=>B.id).join(","):_.isArray(l)&&(c.excludedIds=l.join(",")),_.isArray(h)&&(c.excludedIds=[c.excludedIds,h].filter(Boolean).join(",")),j.state.isAuth&&(c.sdks="auth_v1");const{page:d,search:f}=i,{listings:s,total:E}=$t?await tt.getMobileListings(c):await tt.getDesktopListings(c),y=Object.values(s),I=f?"search":"wallets";return K[I]={listings:[...K[I].listings,...y],total:E,page:d??1},{listings:y,total:E}},getWalletImageUrl(i){return tt.getWalletImageUrl(i)},getAssetImageUrl(i){return tt.getAssetImageUrl(i)},resetSearch(){K.search={listings:[],total:0,page:1}}},st=X({open:!1}),bt={state:st,subscribe(i){return rt(st,()=>i(st))},async open(i){return new Promise(c=>{const{isUiLoaded:l,isDataLoaded:h}=j.state;if(j.setWalletConnectUri(i==null?void 0:i.uri),j.setChains(i==null?void 0:i.chains),Ht.reset("ConnectWallet"),l&&h)st.open=!0,c();else{const p=setInterval(()=>{const d=j.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(p),st.open=!0,c())},200)}})},close(){st.open=!1}};var Fe=Object.defineProperty,vt=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Vt=(i,c,l)=>c in i?Fe(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,Re=(i,c)=>{for(var l in c||(c={}))Ce.call(c,l)&&Vt(i,l,c[l]);if(vt)for(var l of vt(c))Le.call(c,l)&&Vt(i,l,c[l]);return i};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const ft=X({themeMode:Se()?"dark":"light"}),Kt={state:ft,subscribe(i){return rt(ft,()=>i(ft))},setThemeConfig(i){const{themeMode:c,themeVariables:l}=i;c&&(ft.themeMode=c),l&&(ft.themeVariables=Re({},l))}},et=X({open:!1,message:"",variant:"success"}),_e={state:et,subscribe(i){return rt(et,()=>i(et))},openToast(i,c){et.open=!0,et.message=i,et.variant=c},closeToast(){et.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=zt.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window));class Me{constructor(c){this.openModal=bt.open,this.closeModal=bt.close,this.subscribeModal=bt.subscribe,this.setTheme=Kt.setThemeConfig,Kt.setThemeConfig(c),ut.setConfig(c),this.initUi()}async initUi(){if(typeof window<"u"){await oe(()=>import("./index-e48819aa.js"),["./index-e48819aa.js","./index-dddcbded.js","./index-6c7fade5.css"],import.meta.url);const c=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",c),j.setIsUiLoaded(!0)}}}const We=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Me},Symbol.toStringTag,{value:"Module"}));export{Ie as $,ut as C,De as G,Ht as N,bt as Q,Kt as X,_e as Y,We as a,j as c,_ as i}; + */(function(i){const c=wt,l=Lt,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=s,i.SlowBuffer=ct,i.INSPECT_MAX_BYTES=50;const p=2147483647;i.kMaxLength=p,s.TYPED_ARRAY_SUPPORT=d(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function d(){try{const r=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(r,t),r.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function f(r){if(r>p)throw new RangeError('The value "'+r+'" is invalid for option "size"');const t=new Uint8Array(r);return Object.setPrototypeOf(t,s.prototype),t}function s(r,t,e){if(typeof r=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(r)}return E(r,t,e)}s.poolSize=8192;function E(r,t,e){if(typeof r=="string")return L(r,t);if(ArrayBuffer.isView(r))return P(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(v(r,ArrayBuffer)||r&&v(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(v(r,SharedArrayBuffer)||r&&v(r.buffer,SharedArrayBuffer)))return T(r,t,e);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return s.from(n,t,e);const o=G(r);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return s.from(r[Symbol.toPrimitive]("string"),t,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}s.from=function(r,t,e){return E(r,t,e)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function y(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function I(r,t,e){return y(r),r<=0?f(r):t!==void 0?typeof e=="string"?f(r).fill(t,e):f(r).fill(t):f(r)}s.alloc=function(r,t,e){return I(r,t,e)};function B(r){return y(r),f(r<0?0:O(r)|0)}s.allocUnsafe=function(r){return B(r)},s.allocUnsafeSlow=function(r){return B(r)};function L(r,t){if((typeof t!="string"||t==="")&&(t="utf8"),!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const e=at(r,t)|0;let n=f(e);const o=n.write(r,t);return o!==e&&(n=n.slice(0,o)),n}function U(r){const t=r.length<0?0:O(r.length)|0,e=f(t);for(let n=0;n=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return r|0}function ct(r){return+r!=r&&(r=0),s.alloc(+r)}s.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==s.prototype},s.compare=function(t,e){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),v(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,o=e.length;for(let u=0,a=Math.min(n,o);uo.length?(s.isBuffer(a)||(a=s.from(a)),a.copy(o,u)):Uint8Array.prototype.set.call(o,a,u);else if(s.isBuffer(a))a.copy(o,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=a.length}return o};function at(r,t){if(s.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||v(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const e=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&e===0)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return It(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return Wt(r).length;default:if(o)return n?-1:It(r).length;t=(""+t).toLowerCase(),o=!0}}s.byteLength=at;function gt(r,t,e){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return Jt(this,t,e);case"utf8":case"utf-8":return Y(this,t,e);case"ascii":return Yt(this,t,e);case"latin1":case"binary":return qt(this,t,e);case"base64":return H(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}s.prototype._isBuffer=!0;function k(r,t,e){const n=r[t];r[t]=r[e],r[e]=n}s.prototype.swap16=function(){const t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ee&&(t+=" ... "),""},h&&(s.prototype[h]=s.prototype.inspect),s.prototype.compare=function(t,e,n,o,u){if(v(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),u===void 0&&(u=this.length),e<0||n>t.length||o<0||u>this.length)throw new RangeError("out of range index");if(o>=u&&e>=n)return 0;if(o>=u)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,o>>>=0,u>>>=0,this===t)return 0;let a=u-o,g=n-e;const F=Math.min(a,g),b=this.slice(o,u),C=t.slice(e,n);for(let A=0;A2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,Bt(e)&&(e=o?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(o)return-1;e=r.length-1}else if(e<0)if(o)e=0;else return-1;if(typeof t=="string"&&(t=s.from(t,n)),s.isBuffer(t))return t.length===0?-1:Q(r,t,e,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Q(r,[t],e,n,o);throw new TypeError("val must be string, number or Buffer")}function Q(r,t,e,n,o){let u=1,a=r.length,g=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;u=2,a/=2,g/=2,e/=2}function F(C,A){return u===1?C[A]:C.readUInt16BE(A*u)}let b;if(o){let C=-1;for(b=e;ba&&(e=a-g),b=e;b>=0;b--){let C=!0;for(let A=0;Ao&&(n=o)):n=o;const u=t.length;n>u/2&&(n=u/2);let a;for(a=0;a>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-e;if((n===void 0||n>u)&&(n=u),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let a=!1;for(;;)switch(o){case"hex":return Et(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":case"latin1":case"binary":return m(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(r,t,e){return t===0&&e===r.length?c.fromByteArray(r):c.fromByteArray(r.slice(t,e))}function Y(r,t,e){e=Math.min(r.length,e);const n=[];let o=t;for(;o239?4:u>223?3:u>191?2:1;if(o+g<=e){let F,b,C,A;switch(g){case 1:u<128&&(a=u);break;case 2:F=r[o+1],(F&192)===128&&(A=(u&31)<<6|F&63,A>127&&(a=A));break;case 3:F=r[o+1],b=r[o+2],(F&192)===128&&(b&192)===128&&(A=(u&15)<<12|(F&63)<<6|b&63,A>2047&&(A<55296||A>57343)&&(a=A));break;case 4:F=r[o+1],b=r[o+2],C=r[o+3],(F&192)===128&&(b&192)===128&&(C&192)===128&&(A=(u&15)<<18|(F&63)<<12|(b&63)<<6|C&63,A>65535&&A<1114112&&(a=A))}}a===null?(a=65533,g=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),o+=g}return $(n)}const Z=4096;function $(r){const t=r.length;if(t<=Z)return String.fromCharCode.apply(String,r);let e="",n=0;for(;nn)&&(e=n);let o="";for(let u=t;un&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),ee)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t+--e],u=1;for(;e>0&&(u*=256);)o+=this[t+--e]*u;return o},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t=t>>>0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,u=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(o)+(BigInt(u)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=e*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],u=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(o)<>>0,e=e>>>0,n||R(t,e,this.length);let o=this[t],u=1,a=0;for(;++a=u&&(o-=Math.pow(2,8*e)),o},s.prototype.readIntBE=function(t,e,n){t=t>>>0,e=e>>>0,n||R(t,e,this.length);let o=e,u=1,a=this[t+--o];for(;o>0&&(u*=256);)a+=this[t+--o]*u;return u*=128,a>=u&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t=t>>>0,e||R(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n},s.prototype.readInt16BE=function(t,e){t=t>>>0,e||R(t,2,this.length);const n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n},s.prototype.readInt32LE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t=t>>>0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=q(function(t){t=t>>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(o)<>>0,it(t,"offset");const e=this[t],n=this[t+7];(e===void 0||n===void 0)&<(t,this.length-8);const o=(e<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(o)<>>0,e||R(t,4,this.length),l.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t=t>>>0,e||R(t,4,this.length),l.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t=t>>>0,e||R(t,8,this.length),l.read(this,t,!1,52,8)};function W(r,t,e,n,o,u){if(!s.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||tr.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=1,a=0;for(this[e]=t&255;++a>>0,n=n>>>0,!o){const g=Math.pow(2,8*n)-1;W(this,t,e,n,g,0)}let u=n-1,a=1;for(this[e+u]=t&255;--u>=0&&(a*=256);)this[e+u]=t/a&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,255,0),this[e]=t&255,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4};function Rt(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u,u=u>>8,r[e++]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,a=a>>8,r[e++]=a,e}function St(r,t,e,n,o){_t(t,n,o,r,e,7);let u=Number(t&BigInt(4294967295));r[e+7]=u,u=u>>8,r[e+6]=u,u=u>>8,r[e+5]=u,u=u>>8,r[e+4]=u;let a=Number(t>>BigInt(32)&BigInt(4294967295));return r[e+3]=a,a=a>>8,r[e+2]=a,a=a>>8,r[e+1]=a,a=a>>8,r[e]=a,e+8}s.prototype.writeBigUInt64LE=q(function(t,e=0){return Rt(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=q(function(t,e=0){return St(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=0,a=1,g=0;for(this[e]=t&255;++u>0)-g&255;return e+n},s.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e=e>>>0,!o){const F=Math.pow(2,8*n-1);W(this,t,e,n,F-1,-F)}let u=n-1,a=1,g=0;for(this[e+u]=t&255;--u>=0&&(a*=256);)t<0&&g===0&&this[e+u+1]!==0&&(g=1),this[e+u]=(t/a>>0)-g&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=t&255,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t&255,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=t&255,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e>>>0,n||W(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255,e+4},s.prototype.writeBigInt64LE=q(function(t,e=0){return Rt(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=q(function(t,e=0){return St(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Mt(r,t,e,n,o,u){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Tt(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,4),l.write(r,t,e,n,23,4),e+4}s.prototype.writeFloatLE=function(t,e,n){return Tt(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return Tt(this,t,e,!1,n)};function Ot(r,t,e,n,o){return t=+t,e=e>>>0,o||Mt(r,t,e,8),l.write(r,t,e,n,52,8),e+8}s.prototype.writeDoubleLE=function(t,e,n){return Ot(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return Ot(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,o){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),e>=t.length&&(e=t.length),e||(e=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-e>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let u;if(typeof t=="number")for(u=e;u2**32?o=Dt(String(e)):typeof e=="bigint"&&(o=String(e),(e>BigInt(2)**BigInt(32)||e<-(BigInt(2)**BigInt(32)))&&(o=Dt(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function Dt(r){let t="",e=r.length;const n=r[0]==="-"?1:0;for(;e>=n+4;e-=3)t=`_${r.slice(e-3,e)}${t}`;return`${r.slice(0,e)}${t}`}function Qt(r,t,e){it(t,"offset"),(r[t]===void 0||r[t+e]===void 0)&<(t,r.length-(e+1))}function _t(r,t,e,n,o,u){if(r>e||r3?t===0||t===BigInt(0)?g=`>= 0${a} and < 2${a} ** ${(u+1)*8}${a}`:g=`>= -(2${a} ** ${(u+1)*8-1}${a}) and < 2 ** ${(u+1)*8-1}${a}`:g=`>= ${t}${a} and <= ${e}${a}`,new nt.ERR_OUT_OF_RANGE("value",g,r)}Qt(n,o,u)}function it(r,t){if(typeof r!="number")throw new nt.ERR_INVALID_ARG_TYPE(t,"number",r)}function lt(r,t,e){throw Math.floor(r)!==r?(it(r,e),new nt.ERR_OUT_OF_RANGE(e||"offset","an integer",r)):t<0?new nt.ERR_BUFFER_OUT_OF_BOUNDS:new nt.ERR_OUT_OF_RANGE(e||"offset",`>= ${e?1:0} and <= ${t}`,r)}const Zt=/[^+/0-9A-Za-z-_]/g;function te(r){if(r=r.split("=")[0],r=r.trim().replace(Zt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function It(r,t){t=t||1/0;let e;const n=r.length;let o=null;const u=[];for(let a=0;a55295&&e<57344){if(!o){if(e>56319){(t-=3)>-1&&u.push(239,191,189);continue}else if(a+1===n){(t-=3)>-1&&u.push(239,191,189);continue}o=e;continue}if(e<56320){(t-=3)>-1&&u.push(239,191,189),o=e;continue}e=(o-55296<<10|e-56320)+65536}else o&&(t-=3)>-1&&u.push(239,191,189);if(o=null,e<128){if((t-=1)<0)break;u.push(e)}else if(e<2048){if((t-=2)<0)break;u.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;u.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;u.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return u}function ee(r){const t=[];for(let e=0;e>8,o=e%256,u.push(o),u.push(n);return u}function Wt(r){return c.toByteArray(te(r))}function ht(r,t,e,n){let o;for(o=0;o=t.length||o>=r.length);++o)t[o+e]=r[o];return o}function v(r,t){return r instanceof t||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===t.name}function Bt(r){return r!==r}const ne=function(){const r="0123456789abcdef",t=new Array(256);for(let e=0;e<16;++e){const n=e*16;for(let o=0;o<16;++o)t[n+o]=r[e]+r[o]}return t}();function q(r){return typeof BigInt>"u"?ie:r}function ie(){throw new Error("BigInt not supported")}})(zt);const S=X({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),Ht={state:S,subscribe(i){return rt(S,()=>i(S))},push(i,c){i!==S.view&&(S.view=i,c&&(S.data=c),S.history.push(i))},reset(i){S.view=i,S.history=[i]},replace(i){S.history.length>1&&(S.history[S.history.length-1]=i,S.view=i)},goBack(){if(S.history.length>1){S.history.pop();const[i]=S.history.slice(-1);S.view=i}},setData(i){S.data=i}},_={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return _.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const i=navigator.userAgent.toLowerCase();return _.isMobile()&&(i.includes("iphone")||i.includes("ipad"))},isHttpUrl(i){return i.startsWith("http://")||i.startsWith("https://")},isArray(i){return Array.isArray(i)&&i.length>0},formatNativeUrl(i,c,l){if(_.isHttpUrl(i))return this.formatUniversalUrl(i,c,l);let h=i;h.includes("://")||(h=i.replaceAll("/","").replaceAll(":",""),h=`${h}://`),h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},formatUniversalUrl(i,c,l){if(!_.isHttpUrl(i))return this.formatNativeUrl(i,c,l);let h=i;h.endsWith("/")||(h=`${h}/`),this.setWalletConnectDeepLink(h,l);const p=encodeURIComponent(c);return`${h}wc?uri=${p}`},async wait(i){return new Promise(c=>{setTimeout(c,i)})},openHref(i,c){window.open(i,c,"noreferrer noopener")},setWalletConnectDeepLink(i,c){try{localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:i,name:c}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(i){try{const[c]=i.split("?");localStorage.setItem(_.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:c,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(_.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(_.WCM_VERSION,"2.5.9")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var i;const c=(i=Ht.state.data)==null?void 0:i.Wallet;if(!c)throw new Error('Missing "Wallet" view data');return c}},xe=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),M=X({enabled:xe,userSessionId:"",events:[],connectedWalletId:void 0}),Ie={state:M,subscribe(i){return rt(M.events,()=>i(fe(M.events[M.events.length-1])))},initialize(){M.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(M.userSessionId=crypto.randomUUID())},setConnectedWalletId(i){M.connectedWalletId=i},click(i){if(M.enabled){const c={type:"CLICK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},track(i){if(M.enabled){const c={type:"TRACK",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}},view(i){if(M.enabled){const c={type:"VIEW",name:i.name,userSessionId:M.userSessionId,timestamp:Date.now(),data:i};M.events.push(c)}}},V=X({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),j={state:V,subscribe(i){return rt(V,()=>i(V))},setChains(i){V.chains=i},setWalletConnectUri(i){V.walletConnectUri=i},setIsCustomDesktop(i){V.isCustomDesktop=i},setIsCustomMobile(i){V.isCustomMobile=i},setIsDataLoaded(i){V.isDataLoaded=i},setIsUiLoaded(i){V.isUiLoaded=i},setIsAuth(i){V.isAuth=i}},dt=X({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),ut={state:dt,subscribe(i){return rt(dt,()=>i(dt))},setConfig(i){var c,l;Ie.initialize(),j.setChains(i.chains),j.setIsAuth(!!i.enableAuthMode),j.setIsCustomMobile(!!((c=i.mobileWallets)!=null&&c.length)),j.setIsCustomDesktop(!!((l=i.desktopWallets)!=null&&l.length)),_.setModalVersionInStorage(),Object.assign(dt,i)}},Ct="https://explorer-api.walletconnect.com";async function yt(i,c){const l=new URL(i,Ct);return l.searchParams.append("projectId",ut.state.projectId),Object.entries(c).forEach(([h,p])=>{p&&l.searchParams.append(h,String(p))}),(await fetch(l)).json()}const tt={async getDesktopListings(i){return yt("/w3m/v1/getDesktopListings",i)},async getMobileListings(i){return yt("/w3m/v1/getMobileListings",i)},async getInjectedListings(i){return yt("/w3m/v1/getInjectedListings",i)},async getAllListings(i){return yt("/w3m/v1/getAllListings",i)},getWalletImageUrl(i){return`${Ct}/w3m/v1/getWalletImage/${i}?projectId=${ut.state.projectId}`},getAssetImageUrl(i){return`${Ct}/w3m/v1/getAssetImage/${i}?projectId=${ut.state.projectId}`}};var Be=Object.defineProperty,kt=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,jt=(i,c,l)=>c in i?Be(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,be=(i,c)=>{for(var l in c||(c={}))Ae.call(c,l)&&jt(i,l,c[l]);if(kt)for(var l of kt(c))Ue.call(c,l)&&jt(i,l,c[l]);return i};const $t=_.isMobile(),K=X({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),De={state:K,async getRecomendedWallets(){const{explorerRecommendedWalletIds:i,explorerExcludedWalletIds:c}=ut.state;if(i==="NONE"||c==="ALL"&&!i)return K.recomendedWallets;if(_.isArray(i)){const l={recommendedIds:i.join(",")},{listings:h}=await tt.getAllListings(l),p=Object.values(h);p.sort((d,f)=>{const s=i.indexOf(d.id),E=i.indexOf(f.id);return s-E}),K.recomendedWallets=p}else{const{chains:l,isAuth:h}=j.state,p=l==null?void 0:l.join(","),d=_.isArray(c),f={page:1,sdks:h?"auth_v1":void 0,entries:_.RECOMMENDED_WALLET_AMOUNT,chains:p,version:2,excludedIds:d?c.join(","):void 0},{listings:s}=$t?await tt.getMobileListings(f):await tt.getDesktopListings(f);K.recomendedWallets=Object.values(s)}return K.recomendedWallets},async getWallets(i){const c=be({},i),{explorerRecommendedWalletIds:l,explorerExcludedWalletIds:h}=ut.state,{recomendedWallets:p}=K;if(h==="ALL")return K.wallets;p.length?c.excludedIds=p.map(B=>B.id).join(","):_.isArray(l)&&(c.excludedIds=l.join(",")),_.isArray(h)&&(c.excludedIds=[c.excludedIds,h].filter(Boolean).join(",")),j.state.isAuth&&(c.sdks="auth_v1");const{page:d,search:f}=i,{listings:s,total:E}=$t?await tt.getMobileListings(c):await tt.getDesktopListings(c),y=Object.values(s),I=f?"search":"wallets";return K[I]={listings:[...K[I].listings,...y],total:E,page:d??1},{listings:y,total:E}},getWalletImageUrl(i){return tt.getWalletImageUrl(i)},getAssetImageUrl(i){return tt.getAssetImageUrl(i)},resetSearch(){K.search={listings:[],total:0,page:1}}},st=X({open:!1}),bt={state:st,subscribe(i){return rt(st,()=>i(st))},async open(i){return new Promise(c=>{const{isUiLoaded:l,isDataLoaded:h}=j.state;if(j.setWalletConnectUri(i==null?void 0:i.uri),j.setChains(i==null?void 0:i.chains),Ht.reset("ConnectWallet"),l&&h)st.open=!0,c();else{const p=setInterval(()=>{const d=j.state;d.isUiLoaded&&d.isDataLoaded&&(clearInterval(p),st.open=!0,c())},200)}})},close(){st.open=!1}};var Fe=Object.defineProperty,vt=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable,Vt=(i,c,l)=>c in i?Fe(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l,Re=(i,c)=>{for(var l in c||(c={}))Ce.call(c,l)&&Vt(i,l,c[l]);if(vt)for(var l of vt(c))Le.call(c,l)&&Vt(i,l,c[l]);return i};function Se(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const ft=X({themeMode:Se()?"dark":"light"}),Kt={state:ft,subscribe(i){return rt(ft,()=>i(ft))},setThemeConfig(i){const{themeMode:c,themeVariables:l}=i;c&&(ft.themeMode=c),l&&(ft.themeVariables=Re({},l))}},et=X({open:!1,message:"",variant:"success"}),_e={state:et,subscribe(i){return rt(et,()=>i(et))},openToast(i,c){et.open=!0,et.message=i,et.variant=c},closeToast(){et.open=!1}};typeof window<"u"&&(window.Buffer||(window.Buffer=zt.Buffer),window.global||(window.global=window),window.process||(window.process={env:{}}),window.global||(window.global=window));class Me{constructor(c){this.openModal=bt.open,this.closeModal=bt.close,this.subscribeModal=bt.subscribe,this.setTheme=Kt.setThemeConfig,Kt.setThemeConfig(c),ut.setConfig(c),this.initUi()}async initUi(){if(typeof window<"u"){await oe(()=>import("./index-e2a2eb94.js"),["./index-e2a2eb94.js","./index-f07e9ad7.js","./index-f4824932.css"],import.meta.url);const c=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",c),j.setIsUiLoaded(!0)}}}const We=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Me},Symbol.toStringTag,{value:"Module"}));export{Ie as $,ut as C,De as G,Ht as N,bt as Q,Kt as X,_e as Y,We as a,j as c,_ as i}; diff --git a/assets/index-e48819aa.js b/assets/index-e2a2eb94.js similarity index 99% rename from assets/index-e48819aa.js rename to assets/index-e2a2eb94.js index 11523c1a..d8e600f5 100644 --- a/assets/index-e48819aa.js +++ b/assets/index-e2a2eb94.js @@ -1,4 +1,4 @@ -import{X as _t,Q as ce,N,G as U,i as E,Y as ot,$ as Do,c as q,C as gt}from"./index-4f807a19.js";import"./index-dddcbded.js";function Uo(e,t){e.indexOf(t)===-1&&e.push(t)}const oo=(e,t,r)=>Math.min(Math.max(r,e),t),H={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},he=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!he(e[0]),jo=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function Wo(e,t){return Et(e)?e[jo(0,e.length,t)]:e}const no=(e,t,r)=>-r*e+r*t+e,io=()=>{},it=e=>e,pr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function so(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=pr(0,t,n);e.push(no(r,1,o))}}function Ho(e){const t=[0];return so(t,e-1),t}function zo(e,t=Ho(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&so(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&!!e.createAnimation,Ot=e=>typeof e=="function",Fo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},lo=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Zo=1e-7,Vo=12;function Ko(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=lo(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Zo&&++aKo(i,0,1,e,r);return i=>i===0||i===1?i:lo(o(i),t,n)}const qo=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return oo(0,1,o/e)},Ar={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},Yo=/\((.*?)\)/;function _r(e){if(Ot(e))return e;if(ao(e))return Ht(...e);if(Ar[e])return Ar[e];if(e.startsWith("steps")){const t=Yo.exec(e);if(t){const r=t[1].split(",");return qo(parseFloat(r[0]),r[1].trim())}}return it}class co{constructor(t,r=[0,1],{easing:n,duration:o=H.duration,delay:i=H.delay,endDelay:s=H.endDelay,repeat:a=H.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((b,h)=>{this.resolve=b,this.reject=h}),n=n||H.easing,sr(n)){const b=n.createAnimation(r);n=b.easing,r=b.keyframes||r,o=b.duration||o}this.repeat=a,this.easing=Et(n)?it:_r(n),this.updateDuration(o);const d=zo(r,l,Et(n)?n.map(_r):it);this.tick=b=>{var h;i=i;let u=0;this.pauseTime!==void 0?u=this.pauseTime:u=(b-this.startTime)*this.rate,this.t=u,u/=1e3,u=Math.max(u-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(u=this.totalDuration);const p=u/this.duration;let g=Math.floor(p),$=p%1;!$&&p>=1&&($=1),$===1&&g--;const f=g%2;(c==="reverse"||c==="alternate"&&f||c==="alternate-reverse"&&!f)&&($=1-$);const y=u>=this.totalDuration?1:Math.min($,1),v=d(this.easing(y));t(v),this.pauseTime===void 0&&(this.playState==="finished"||u>=this.totalDuration+s)?(this.playState="finished",(h=this.resolve)===null||h===void 0||h.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Go{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ce=new WeakMap;function ho(e){return Ce.has(e)||Ce.set(e,{transforms:[],values:new Map}),Ce.get(e)}function Qo(e,t){return e.has(t)||e.set(t,new Go),e.get(t)}const Jo=["","X","Y","Z"],Xo=["translate","scale","rotate","skew"],ue={x:"translateX",y:"translateY",z:"translateZ"},Or={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},tn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Or,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:Or},Zt=new Map,wr=e=>`--motion-${e}`,me=["x","y","z"];Xo.forEach(e=>{Jo.forEach(t=>{me.push(e+t),Zt.set(wr(e+t),tn[e])})});const en=(e,t)=>me.indexOf(e)-me.indexOf(t),rn=new Set(me),uo=e=>rn.has(e),on=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=ho(e);Uo(r,t),e.style.transform=nn(r)},nn=e=>e.sort(en).reduce(sn,"").trim(),sn=(e,t)=>`${e} ${t}(var(${wr(t)}))`,ar=e=>e.startsWith("--"),kr=new Set;function an(e){if(!kr.has(e)){kr.add(e);try{const{syntax:t,initialValue:r}=Zt.has(e)?Zt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const Ee=(e,t)=>document.createElement("div").animate(e,t),Ir={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ee({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ee({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Ee({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},Ct={};for(const e in Ir)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Ir[e]()),Ae[e]);const ln=.015,cn=(e,t)=>{let r="";const n=Math.round(t/ln);for(let o=0;oOt(e)?Ct.linearEasing()?`linear(${cn(e,t)})`:H.easing:ao(e)?dn(e):e,dn=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function hn(e,t){for(let r=0;rArray.isArray(e)?e:[e];function lr(e){return ue[e]&&(e=ue[e]),uo(e)?wr(e):e}const Xt={get:(e,t)=>{t=lr(t);let r=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Zt.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=lr(t),ar(t)?e.style.setProperty(t,r):e.style[t]=r}};function mo(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function mn(e,t){var r;let n=(t==null?void 0:t.toDefaultUnit)||it;const o=e[e.length-1];if(Fo(o)){const i=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";i&&(n=s=>s+i)}return n}function gn(){return window.__MOTION_DEV_TOOLS_RECORD}function fn(e,t,r,n={},o){const i=gn(),s=n.record!==!1&&i;let a,{duration:l=H.duration,delay:c=H.delay,endDelay:d=H.endDelay,repeat:b=H.repeat,easing:h=H.easing,persist:u=!1,direction:p,offset:g,allowWebkitAcceleration:$=!1}=n;const f=ho(e),y=uo(t);let v=Ct.waapi();y&&on(e,t);const w=lr(t),k=Qo(f.values,w),I=Zt.get(w);return mo(k.animation,!(sr(h)&&k.generator)&&n.record!==!1),()=>{const R=()=>{var P,F;return(F=(P=Xt.get(e,w))!==null&&P!==void 0?P:I==null?void 0:I.initialValue)!==null&&F!==void 0?F:0};let T=hn(un(r),R);const z=mn(T,I);if(sr(h)){const P=h.createAnimation(T,t!=="opacity",R,w,k);h=P.easing,T=P.keyframes||T,l=P.duration||l}if(ar(w)&&(Ct.cssRegisterProperty()?an(w):v=!1),y&&!Ct.linearEasing()&&(Ot(h)||Et(h)&&h.some(Ot))&&(v=!1),v){I&&(T=T.map(Z=>he(Z)?I.toDefaultUnit(Z):Z)),T.length===1&&(!Ct.partialKeyframes()||s)&&T.unshift(R());const P={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(h)?void 0:Tr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[w]:T,offset:g,easing:Et(h)?h.map(Z=>Tr(Z,l)):void 0},P),a.finished||(a.finished=new Promise((Z,V)=>{a.onfinish=Z,a.oncancel=V}));const F=T[T.length-1];a.finished.then(()=>{u||(Xt.set(e,w,F),a.cancel())}).catch(io),$||(a.playbackRate=1.000001)}else if(o&&y)T=T.map(P=>typeof P=="string"?parseFloat(P):P),T.length===1&&T.unshift(parseFloat(R())),a=new o(P=>{Xt.set(e,w,z?z(P):P)},T,Object.assign(Object.assign({},n),{duration:l,easing:h}));else{const P=T[T.length-1];Xt.set(e,w,I&&he(P)?I.toDefaultUnit(P):P)}return s&&i(e,t,T,{duration:l,delay:c,easing:h,repeat:b,offset:g},"motion-one"),k.setAnimation(a),a}}const pn=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function wn(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const vn=e=>e(),go=(e,t,r=H.duration)=>new Proxy({animations:e.map(vn).filter(Boolean),duration:r,options:t},yn),bn=e=>e.animations[0],yn={get:(e,t)=>{const r=bn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(xn)).catch(io)),e.finished;case"stop":return()=>{e.animations.forEach(n=>mo(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=zt.ms(r);case"playbackRate":for(let n=0;ne.finished;function $n(e,t,r){return Ot(e)?e(t,r):e}function Cn(e){return function(r,n,o={}){r=wn(r);const i=r.length,s=[];for(let a=0;aMath.min(Math.max(r,e),t),H={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},he=e=>typeof e=="number",Et=e=>Array.isArray(e)&&!he(e[0]),jo=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e};function Wo(e,t){return Et(e)?e[jo(0,e.length,t)]:e}const no=(e,t,r)=>-r*e+r*t+e,io=()=>{},it=e=>e,pr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function so(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=pr(0,t,n);e.push(no(r,1,o))}}function Ho(e){const t=[0];return so(t,e-1),t}function zo(e,t=Ho(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&so(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&!!e.createAnimation,Ot=e=>typeof e=="function",Fo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},lo=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Zo=1e-7,Vo=12;function Ko(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=lo(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Zo&&++aKo(i,0,1,e,r);return i=>i===0||i===1?i:lo(o(i),t,n)}const qo=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return oo(0,1,o/e)},Ar={ease:Ht(.25,.1,.25,1),"ease-in":Ht(.42,0,1,1),"ease-in-out":Ht(.42,0,.58,1),"ease-out":Ht(0,0,.58,1)},Yo=/\((.*?)\)/;function _r(e){if(Ot(e))return e;if(ao(e))return Ht(...e);if(Ar[e])return Ar[e];if(e.startsWith("steps")){const t=Yo.exec(e);if(t){const r=t[1].split(",");return qo(parseFloat(r[0]),r[1].trim())}}return it}class co{constructor(t,r=[0,1],{easing:n,duration:o=H.duration,delay:i=H.delay,endDelay:s=H.endDelay,repeat:a=H.repeat,offset:l,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=it,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((b,h)=>{this.resolve=b,this.reject=h}),n=n||H.easing,sr(n)){const b=n.createAnimation(r);n=b.easing,r=b.keyframes||r,o=b.duration||o}this.repeat=a,this.easing=Et(n)?it:_r(n),this.updateDuration(o);const d=zo(r,l,Et(n)?n.map(_r):it);this.tick=b=>{var h;i=i;let u=0;this.pauseTime!==void 0?u=this.pauseTime:u=(b-this.startTime)*this.rate,this.t=u,u/=1e3,u=Math.max(u-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(u=this.totalDuration);const p=u/this.duration;let g=Math.floor(p),$=p%1;!$&&p>=1&&($=1),$===1&&g--;const f=g%2;(c==="reverse"||c==="alternate"&&f||c==="alternate-reverse"&&!f)&&($=1-$);const y=u>=this.totalDuration?1:Math.min($,1),v=d(this.easing(y));t(v),this.pauseTime===void 0&&(this.playState==="finished"||u>=this.totalDuration+s)?(this.playState="finished",(h=this.resolve)===null||h===void 0||h.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class Go{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ce=new WeakMap;function ho(e){return Ce.has(e)||Ce.set(e,{transforms:[],values:new Map}),Ce.get(e)}function Qo(e,t){return e.has(t)||e.set(t,new Go),e.get(t)}const Jo=["","X","Y","Z"],Xo=["translate","scale","rotate","skew"],ue={x:"translateX",y:"translateY",z:"translateZ"},Or={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},tn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Or,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:Or},Zt=new Map,wr=e=>`--motion-${e}`,me=["x","y","z"];Xo.forEach(e=>{Jo.forEach(t=>{me.push(e+t),Zt.set(wr(e+t),tn[e])})});const en=(e,t)=>me.indexOf(e)-me.indexOf(t),rn=new Set(me),uo=e=>rn.has(e),on=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=ho(e);Uo(r,t),e.style.transform=nn(r)},nn=e=>e.sort(en).reduce(sn,"").trim(),sn=(e,t)=>`${e} ${t}(var(${wr(t)}))`,ar=e=>e.startsWith("--"),kr=new Set;function an(e){if(!kr.has(e)){kr.add(e);try{const{syntax:t,initialValue:r}=Zt.has(e)?Zt.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}const Ee=(e,t)=>document.createElement("div").animate(e,t),Ir={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ee({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ee({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Ee({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},Ct={};for(const e in Ir)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Ir[e]()),Ae[e]);const ln=.015,cn=(e,t)=>{let r="";const n=Math.round(t/ln);for(let o=0;oOt(e)?Ct.linearEasing()?`linear(${cn(e,t)})`:H.easing:ao(e)?dn(e):e,dn=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;function hn(e,t){for(let r=0;rArray.isArray(e)?e:[e];function lr(e){return ue[e]&&(e=ue[e]),uo(e)?wr(e):e}const Xt={get:(e,t)=>{t=lr(t);let r=ar(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){const n=Zt.get(t);n&&(r=n.initialValue)}return r},set:(e,t,r)=>{t=lr(t),ar(t)?e.style.setProperty(t,r):e.style[t]=r}};function mo(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function mn(e,t){var r;let n=(t==null?void 0:t.toDefaultUnit)||it;const o=e[e.length-1];if(Fo(o)){const i=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";i&&(n=s=>s+i)}return n}function gn(){return window.__MOTION_DEV_TOOLS_RECORD}function fn(e,t,r,n={},o){const i=gn(),s=n.record!==!1&&i;let a,{duration:l=H.duration,delay:c=H.delay,endDelay:d=H.endDelay,repeat:b=H.repeat,easing:h=H.easing,persist:u=!1,direction:p,offset:g,allowWebkitAcceleration:$=!1}=n;const f=ho(e),y=uo(t);let v=Ct.waapi();y&&on(e,t);const w=lr(t),k=Qo(f.values,w),I=Zt.get(w);return mo(k.animation,!(sr(h)&&k.generator)&&n.record!==!1),()=>{const R=()=>{var P,F;return(F=(P=Xt.get(e,w))!==null&&P!==void 0?P:I==null?void 0:I.initialValue)!==null&&F!==void 0?F:0};let T=hn(un(r),R);const z=mn(T,I);if(sr(h)){const P=h.createAnimation(T,t!=="opacity",R,w,k);h=P.easing,T=P.keyframes||T,l=P.duration||l}if(ar(w)&&(Ct.cssRegisterProperty()?an(w):v=!1),y&&!Ct.linearEasing()&&(Ot(h)||Et(h)&&h.some(Ot))&&(v=!1),v){I&&(T=T.map(Z=>he(Z)?I.toDefaultUnit(Z):Z)),T.length===1&&(!Ct.partialKeyframes()||s)&&T.unshift(R());const P={delay:zt.ms(c),duration:zt.ms(l),endDelay:zt.ms(d),easing:Et(h)?void 0:Tr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[w]:T,offset:g,easing:Et(h)?h.map(Z=>Tr(Z,l)):void 0},P),a.finished||(a.finished=new Promise((Z,V)=>{a.onfinish=Z,a.oncancel=V}));const F=T[T.length-1];a.finished.then(()=>{u||(Xt.set(e,w,F),a.cancel())}).catch(io),$||(a.playbackRate=1.000001)}else if(o&&y)T=T.map(P=>typeof P=="string"?parseFloat(P):P),T.length===1&&T.unshift(parseFloat(R())),a=new o(P=>{Xt.set(e,w,z?z(P):P)},T,Object.assign(Object.assign({},n),{duration:l,easing:h}));else{const P=T[T.length-1];Xt.set(e,w,I&&he(P)?I.toDefaultUnit(P):P)}return s&&i(e,t,T,{duration:l,delay:c,easing:h,repeat:b,offset:g},"motion-one"),k.setAnimation(a),a}}const pn=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function wn(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}const vn=e=>e(),go=(e,t,r=H.duration)=>new Proxy({animations:e.map(vn).filter(Boolean),duration:r,options:t},yn),bn=e=>e.animations[0],yn={get:(e,t)=>{const r=bn(e);switch(t){case"duration":return e.duration;case"currentTime":return zt.s((r==null?void 0:r[t])||0);case"playbackRate":case"playState":return r==null?void 0:r[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(xn)).catch(io)),e.finished;case"stop":return()=>{e.animations.forEach(n=>mo(n))};case"forEachNative":return n=>{e.animations.forEach(o=>n(o,e))};default:return typeof(r==null?void 0:r[t])>"u"?void 0:()=>e.animations.forEach(n=>n[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=zt.ms(r);case"playbackRate":for(let n=0;ne.finished;function $n(e,t,r){return Ot(e)?e(t,r):e}function Cn(e){return function(r,n,o={}){r=wn(r);const i=r.length,s=[];for(let a=0;an[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var ul=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function YI(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var JI={exports:{}},tg={},XI={exports:{}},Qe={};/** +function tH(t,e){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var ul=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function As(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ZI(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var e7={exports:{}},tg={},t7={exports:{}},Qe={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function JW(t,e){for(var r=0;r>>1,A=k[M];if(0>>1;Mi(R,L))Ui(W,R)?(k[M]=W,k[U]=L,M=U):(k[M]=R,k[V]=L,M=V);else if(Ui(W,L))k[M]=W,k[U]=L,M=U;else break e}}return $}function i(k,$){var L=k.sortIndex-$.sortIndex;return L!==0?L:k.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(k){for(var $=r(l);$!==null;){if($.callback===null)n(l);else if($.startTime<=k)n(l),$.sortIndex=$.expirationTime,e(c,$);else break;$=r(l)}}function S(k){if(v=!1,g(k),!p)if(r(c)!==null)p=!0,O(P);else{var $=r(l);$!==null&&N(S,$.startTime-k)}}function P(k,$){p=!1,v&&(v=!1,y(I),I=-1),h=!0;var L=d;try{for(g($),f=r(c);f!==null&&(!(f.expirationTime>$)||k&&!H());){var M=f.callback;if(typeof M=="function"){f.callback=null,d=f.priorityLevel;var A=M(f.expirationTime<=$);$=t.unstable_now(),typeof A=="function"?f.callback=A:f===r(c)&&n(c),g($)}else n(c);f=r(c)}if(f!==null)var D=!0;else{var V=r(l);V!==null&&N(S,V.startTime-$),D=!1}return D}finally{f=null,d=L,h=!1}}var T=!1,w=null,I=-1,F=5,j=-1;function H(){return!(t.unstable_now()-jk||125M?(k.sortIndex=L,e(l,k),r(c)===null&&k===r(l)&&(v?(y(I),I=-1):v=!0,N(S,L-M))):(k.sortIndex=A,e(c,k),p||h||(p=!0,O(P))),k},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(k){var $=d;return function(){var L=d;d=$;try{return k.apply(this,arguments)}finally{d=L}}}})(u7);l7.exports=u7;var wH=l7.exports;/** + */(function(t){function e(k,$){var L=k.length;k.push($);e:for(;0>>1,A=k[M];if(0>>1;Mi(R,L))Ui(W,R)?(k[M]=W,k[U]=L,M=U):(k[M]=R,k[V]=L,M=V);else if(Ui(W,L))k[M]=W,k[U]=L,M=U;else break e}}return $}function i(k,$){var L=k.sortIndex-$.sortIndex;return L!==0?L:k.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(k){for(var $=r(l);$!==null;){if($.callback===null)n(l);else if($.startTime<=k)n(l),$.sortIndex=$.expirationTime,e(c,$);else break;$=r(l)}}function S(k){if(v=!1,g(k),!p)if(r(c)!==null)p=!0,O(P);else{var $=r(l);$!==null&&N(S,$.startTime-k)}}function P(k,$){p=!1,v&&(v=!1,y(I),I=-1),h=!0;var L=d;try{for(g($),f=r(c);f!==null&&(!(f.expirationTime>$)||k&&!H());){var M=f.callback;if(typeof M=="function"){f.callback=null,d=f.priorityLevel;var A=M(f.expirationTime<=$);$=t.unstable_now(),typeof A=="function"?f.callback=A:f===r(c)&&n(c),g($)}else n(c);f=r(c)}if(f!==null)var D=!0;else{var V=r(l);V!==null&&N(S,V.startTime-$),D=!1}return D}finally{f=null,d=L,h=!1}}var T=!1,w=null,I=-1,B=5,j=-1;function H(){return!(t.unstable_now()-jk||125M?(k.sortIndex=L,e(l,k),r(c)===null&&k===r(l)&&(v?(y(I),I=-1):v=!0,N(S,L-M))):(k.sortIndex=A,e(c,k),p||h||(p=!0,O(P))),k},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(k){var $=d;return function(){var L=d;d=$;try{return k.apply(this,arguments)}finally{d=L}}}})(h7);d7.exports=h7;var SH=d7.exports;/** * @license React * react-dom.production.min.js * @@ -30,24 +30,24 @@ function JW(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),SE=Object.prototype.hasOwnProperty,EH=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Lk={},Bk={};function xH(t){return SE.call(Bk,t)?!0:SE.call(Lk,t)?!1:EH.test(t)?Bk[t]=!0:(Lk[t]=!0,!1)}function CH(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function SH(t,e,r,n){if(e===null||typeof e>"u"||CH(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function jn(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var rn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){rn[t]=new jn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];rn[e]=new jn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){rn[t]=new jn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){rn[t]=new jn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){rn[t]=new jn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){rn[t]=new jn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){rn[t]=new jn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){rn[t]=new jn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){rn[t]=new jn(t,5,!1,t.toLowerCase(),null,!1,!1)});var t6=/[\-:]([a-z])/g;function r6(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(t6,r6);rn[e]=new jn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(t6,r6);rn[e]=new jn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(t6,r6);rn[e]=new jn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){rn[t]=new jn(t,1,!1,t.toLowerCase(),null,!1,!1)});rn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){rn[t]=new jn(t,1,!1,t.toLowerCase(),null,!0,!0)});function n6(t,e,r,n){var i=rn.hasOwnProperty(e)?rn[e]:null;(i!==null?i.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),SE=Object.prototype.hasOwnProperty,kH=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Lk={},Fk={};function AH(t){return SE.call(Fk,t)?!0:SE.call(Lk,t)?!1:kH.test(t)?Fk[t]=!0:(Lk[t]=!0,!1)}function _H(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function PH(t,e,r,n){if(e===null||typeof e>"u"||_H(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function jn(t,e,r,n,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var rn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){rn[t]=new jn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];rn[e]=new jn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){rn[t]=new jn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){rn[t]=new jn(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){rn[t]=new jn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){rn[t]=new jn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){rn[t]=new jn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){rn[t]=new jn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){rn[t]=new jn(t,5,!1,t.toLowerCase(),null,!1,!1)});var e6=/[\-:]([a-z])/g;function t6(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(e6,t6);rn[e]=new jn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(e6,t6);rn[e]=new jn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(e6,t6);rn[e]=new jn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){rn[t]=new jn(t,1,!1,t.toLowerCase(),null,!1,!1)});rn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){rn[t]=new jn(t,1,!1,t.toLowerCase(),null,!0,!0)});function r6(t,e,r,n){var i=rn.hasOwnProperty(e)?rn[e]:null;(i!==null?i.type!==0:n||!(2a||i[o]!==s[a]){var c=` -`+i[o].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{Ew=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ah(t):""}function kH(t){switch(t.tag){case 5:return ah(t.type);case 16:return ah("Lazy");case 13:return ah("Suspense");case 19:return ah("SuspenseList");case 0:case 2:case 15:return t=xw(t.type,!1),t;case 11:return t=xw(t.type.render,!1),t;case 1:return t=xw(t.type,!0),t;default:return""}}function PE(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Mu:return"Fragment";case $u:return"Portal";case kE:return"Profiler";case i6:return"StrictMode";case AE:return"Suspense";case _E:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case p7:return(t.displayName||"Context")+".Consumer";case h7:return(t._context.displayName||"Context")+".Provider";case s6:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case o6:return e=t.displayName||null,e!==null?e:PE(t.type)||"Memo";case Pa:e=t._payload,t=t._init;try{return PE(t(e))}catch{}}return null}function AH(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return PE(e);case 8:return e===i6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function oc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function m7(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _H(t){var e=m7(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function dp(t){t._valueTracker||(t._valueTracker=_H(t))}function y7(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=m7(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function nm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function TE(t,e){var r=e.checked;return lr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function jk(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=oc(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function g7(t,e){e=e.checked,e!=null&&n6(t,"checked",e,!1)}function IE(t,e){g7(t,e);var r=oc(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?OE(t,e.type,r):e.hasOwnProperty("defaultValue")&&OE(t,e.type,oc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Uk(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function OE(t,e,r){(e!=="number"||nm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var ch=Array.isArray;function tf(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=hp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function r0(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var gh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},PH=["Webkit","ms","Moz","O"];Object.keys(gh).forEach(function(t){PH.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gh[e]=gh[t]})});function x7(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||gh.hasOwnProperty(t)&&gh[t]?(""+e).trim():e+"px"}function C7(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=x7(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var TH=lr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ME(t,e){if(e){if(TH[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(oe(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(oe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(oe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(oe(62))}}function NE(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var DE=null;function a6(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var LE=null,rf=null,nf=null;function Hk(t){if(t=w1(t)){if(typeof LE!="function")throw Error(oe(280));var e=t.stateNode;e&&(e=og(e),LE(t.stateNode,t.type,e))}}function S7(t){rf?nf?nf.push(t):nf=[t]:rf=t}function k7(){if(rf){var t=rf,e=nf;if(nf=rf=null,Hk(t),e)for(t=0;t>>=0,t===0?32:31-(jH(t)/UH|0)|0}var pp=64,vp=4194304;function lh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function am(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=lh(a):(s&=o,s!==0&&(n=lh(s)))}else o=r&~i,o!==0?n=lh(o):s!==0&&(n=lh(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function g1(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ys(e),t[e]=r}function qH(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=wh),Zk=String.fromCharCode(32),eA=!1;function q7(t,e){switch(t){case"keyup":return bq.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function V7(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Nu=!1;function Eq(t,e){switch(t){case"compositionend":return V7(e);case"keypress":return e.which!==32?null:(eA=!0,Zk);case"textInput":return t=e.data,t===Zk&&eA?null:t;default:return null}}function xq(t,e){if(Nu)return t==="compositionend"||!v6&&q7(t,e)?(t=W7(),vv=d6=Ba=null,Nu=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=iA(r)}}function Y7(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Y7(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function J7(){for(var t=window,e=nm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=nm(t.document)}return e}function m6(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Oq(t){var e=J7(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Y7(r.ownerDocument.documentElement,r)){if(n!==null&&m6(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=sA(r,s);var o=sA(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Du=null,WE=null,xh=null,HE=!1;function oA(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;HE||Du==null||Du!==nm(n)||(n=Du,"selectionStart"in n&&m6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),xh&&c0(xh,n)||(xh=n,n=um(WE,"onSelect"),0Fu||(t.current=YE[Fu],YE[Fu]=null,Fu--)}function mt(t,e){Fu++,YE[Fu]=t.current,t.current=e}var ac={},xn=_c(ac),Jn=_c(!1),Pl=ac;function Cf(t,e){var r=t.type.contextTypes;if(!r)return ac;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Xn(t){return t=t.childContextTypes,t!=null}function dm(){Ut(Jn),Ut(xn)}function hA(t,e,r){if(xn.current!==ac)throw Error(oe(168));mt(xn,e),mt(Jn,r)}function oO(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(oe(108,AH(t)||"Unknown",i));return lr({},r,n)}function hm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ac,Pl=xn.current,mt(xn,t),mt(Jn,Jn.current),!0}function pA(t,e,r){var n=t.stateNode;if(!n)throw Error(oe(169));r?(t=oO(t,e,Pl),n.__reactInternalMemoizedMergedChildContext=t,Ut(Jn),Ut(xn),mt(xn,t)):Ut(Jn),mt(Jn,r)}var Ao=null,ag=!1,Dw=!1;function aO(t){Ao===null?Ao=[t]:Ao.push(t)}function Wq(t){ag=!0,aO(t)}function Pc(){if(!Dw&&Ao!==null){Dw=!0;var t=0,e=ct;try{var r=Ao;for(ct=1;t>=o,i-=o,Oo=1<<32-ys(e)+i|r<I?(F=w,w=null):F=w.sibling;var j=d(y,w,g[I],S);if(j===null){w===null&&(w=F);break}t&&w&&j.alternate===null&&e(y,w),m=s(j,m,I),T===null?P=j:T.sibling=j,T=j,w=F}if(I===g.length)return r(y,w),Xt&&Zc(y,I),P;if(w===null){for(;II?(F=w,w=null):F=w.sibling;var H=d(y,w,j.value,S);if(H===null){w===null&&(w=F);break}t&&w&&H.alternate===null&&e(y,w),m=s(H,m,I),T===null?P=H:T.sibling=H,T=H,w=F}if(j.done)return r(y,w),Xt&&Zc(y,I),P;if(w===null){for(;!j.done;I++,j=g.next())j=f(y,j.value,S),j!==null&&(m=s(j,m,I),T===null?P=j:T.sibling=j,T=j);return Xt&&Zc(y,I),P}for(w=n(y,w);!j.done;I++,j=g.next())j=h(w,y,I,j.value,S),j!==null&&(t&&j.alternate!==null&&w.delete(j.key===null?I:j.key),m=s(j,m,I),T===null?P=j:T.sibling=j,T=j);return t&&w.forEach(function(G){return e(y,G)}),Xt&&Zc(y,I),P}function b(y,m,g,S){if(typeof g=="object"&&g!==null&&g.type===Mu&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case fp:e:{for(var P=g.key,T=m;T!==null;){if(T.key===P){if(P=g.type,P===Mu){if(T.tag===7){r(y,T.sibling),m=i(T,g.props.children),m.return=y,y=m;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Pa&&EA(P)===T.type){r(y,T.sibling),m=i(T,g.props),m.ref=Fd(y,T,g),m.return=y,y=m;break e}r(y,T);break}else e(y,T);T=T.sibling}g.type===Mu?(m=bl(g.props.children,y.mode,S,g.key),m.return=y,y=m):(S=Cv(g.type,g.key,g.props,null,y.mode,S),S.ref=Fd(y,m,g),S.return=y,y=S)}return o(y);case $u:e:{for(T=g.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){r(y,m.sibling),m=i(m,g.children||[]),m.return=y,y=m;break e}else{r(y,m);break}else e(y,m);m=m.sibling}m=Hw(g,y.mode,S),m.return=y,y=m}return o(y);case Pa:return T=g._init,b(y,m,T(g._payload),S)}if(ch(g))return p(y,m,g,S);if(Md(g))return v(y,m,g,S);xp(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(r(y,m.sibling),m=i(m,g),m.return=y,y=m):(r(y,m),m=Ww(g,y.mode,S),m.return=y,y=m),o(y)):r(y,m)}return b}var kf=vO(!0),mO=vO(!1),E1={},eo=_c(E1),d0=_c(E1),h0=_c(E1);function hl(t){if(t===E1)throw Error(oe(174));return t}function k6(t,e){switch(mt(h0,e),mt(d0,t),mt(eo,E1),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:$E(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=$E(e,t)}Ut(eo),mt(eo,e)}function Af(){Ut(eo),Ut(d0),Ut(h0)}function yO(t){hl(h0.current);var e=hl(eo.current),r=$E(e,t.type);e!==r&&(mt(d0,t),mt(eo,r))}function A6(t){d0.current===t&&(Ut(eo),Ut(d0))}var ir=_c(0);function bm(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Lw=[];function _6(){for(var t=0;tr?r:4,t(!0);var n=Bw.transition;Bw.transition={};try{t(!1),e()}finally{ct=r,Bw.transition=n}}function $O(){return ji().memoizedState}function Gq(t,e,r){var n=Xa(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},MO(t))NO(e,r);else if(r=fO(t,e,r,n),r!==null){var i=Mn();gs(r,t,n,i),DO(r,e,n)}}function Kq(t,e,r){var n=Xa(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(MO(t))NO(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,xs(a,o)){var c=e.interleaved;c===null?(i.next=i,C6(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}r=fO(t,e,i,n),r!==null&&(i=Mn(),gs(r,t,n,i),DO(r,e,n))}}function MO(t){var e=t.alternate;return t===ar||e!==null&&e===ar}function NO(t,e){Ch=wm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function DO(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,l6(t,r)}}var Em={readContext:Fi,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},Qq={readContext:Fi,useCallback:function(t,e){return Fs().memoizedState=[t,e===void 0?null:e],t},useContext:Fi,useEffect:CA,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,bv(4194308,4,PO.bind(null,e,t),r)},useLayoutEffect:function(t,e){return bv(4194308,4,t,e)},useInsertionEffect:function(t,e){return bv(4,2,t,e)},useMemo:function(t,e){var r=Fs();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Fs();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Gq.bind(null,ar,t),[n.memoizedState,t]},useRef:function(t){var e=Fs();return t={current:t},e.memoizedState=t},useState:xA,useDebugValue:R6,useDeferredValue:function(t){return Fs().memoizedState=t},useTransition:function(){var t=xA(!1),e=t[0];return t=Vq.bind(null,t[1]),Fs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ar,i=Fs();if(Xt){if(r===void 0)throw Error(oe(407));r=r()}else{if(r=e(),Gr===null)throw Error(oe(349));Il&30||wO(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,CA(xO.bind(null,n,s,t),[t]),n.flags|=2048,m0(9,EO.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Fs(),e=Gr.identifierPrefix;if(Xt){var r=Ro,n=Oo;r=(n&~(1<<32-ys(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=p0++,0")&&(c=c.replace("",t.displayName)),c}while(1<=o&&0<=a);break}}}finally{Ew=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ah(t):""}function TH(t){switch(t.tag){case 5:return ah(t.type);case 16:return ah("Lazy");case 13:return ah("Suspense");case 19:return ah("SuspenseList");case 0:case 2:case 15:return t=xw(t.type,!1),t;case 11:return t=xw(t.type.render,!1),t;case 1:return t=xw(t.type,!0),t;default:return""}}function PE(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Mu:return"Fragment";case $u:return"Portal";case kE:return"Profiler";case n6:return"StrictMode";case AE:return"Suspense";case _E:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case y7:return(t.displayName||"Context")+".Consumer";case m7:return(t._context.displayName||"Context")+".Provider";case i6:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case s6:return e=t.displayName||null,e!==null?e:PE(t.type)||"Memo";case Pa:e=t._payload,t=t._init;try{return PE(t(e))}catch{}}return null}function IH(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return PE(e);case 8:return e===n6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function oc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function b7(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function OH(t){var e=b7(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function dp(t){t._valueTracker||(t._valueTracker=OH(t))}function w7(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=b7(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function nm(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function TE(t,e){var r=e.checked;return ur({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function jk(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=oc(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function E7(t,e){e=e.checked,e!=null&&r6(t,"checked",e,!1)}function IE(t,e){E7(t,e);var r=oc(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?OE(t,e.type,r):e.hasOwnProperty("defaultValue")&&OE(t,e.type,oc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Uk(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function OE(t,e,r){(e!=="number"||nm(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var ch=Array.isArray;function tf(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=hp.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function r0(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var gh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},RH=["Webkit","ms","Moz","O"];Object.keys(gh).forEach(function(t){RH.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),gh[e]=gh[t]})});function k7(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||gh.hasOwnProperty(t)&&gh[t]?(""+e).trim():e+"px"}function A7(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=k7(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var $H=ur({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ME(t,e){if(e){if($H[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(oe(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(oe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(oe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(oe(62))}}function NE(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var DE=null;function o6(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var LE=null,rf=null,nf=null;function Hk(t){if(t=w1(t)){if(typeof LE!="function")throw Error(oe(280));var e=t.stateNode;e&&(e=og(e),LE(t.stateNode,t.type,e))}}function _7(t){rf?nf?nf.push(t):nf=[t]:rf=t}function P7(){if(rf){var t=rf,e=nf;if(nf=rf=null,Hk(t),e)for(t=0;t>>=0,t===0?32:31-(HH(t)/qH|0)|0}var pp=64,vp=4194304;function lh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function am(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,s=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~i;a!==0?n=lh(a):(s&=o,s!==0&&(n=lh(s)))}else o=r&~i,o!==0?n=lh(o):s!==0&&(n=lh(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0r;r++)e.push(t);return e}function g1(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ms(e),t[e]=r}function QH(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0=wh),Zk=String.fromCharCode(32),e4=!1;function K7(t,e){switch(t){case"keyup":return Cq.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q7(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Nu=!1;function kq(t,e){switch(t){case"compositionend":return Q7(e);case"keypress":return e.which!==32?null:(e4=!0,Zk);case"textInput":return t=e.data,t===Zk&&e4?null:t;default:return null}}function Aq(t,e){if(Nu)return t==="compositionend"||!p6&&K7(t,e)?(t=V7(),vv=f6=Fa=null,Nu=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=i4(r)}}function Z7(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Z7(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function eO(){for(var t=window,e=nm();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=nm(t.document)}return e}function v6(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Nq(t){var e=eO(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&Z7(r.ownerDocument.documentElement,r)){if(n!==null&&v6(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,s=Math.min(n.start,i);n=n.end===void 0?s:Math.min(n.end,i),!t.extend&&s>n&&(i=n,n=s,s=i),i=s4(r,s);var o=s4(r,n);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Du=null,WE=null,xh=null,HE=!1;function o4(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;HE||Du==null||Du!==nm(n)||(n=Du,"selectionStart"in n&&v6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),xh&&c0(xh,n)||(xh=n,n=um(WE,"onSelect"),0Bu||(t.current=YE[Bu],YE[Bu]=null,Bu--)}function yt(t,e){Bu++,YE[Bu]=t.current,t.current=e}var ac={},xn=_c(ac),Jn=_c(!1),Pl=ac;function Cf(t,e){var r=t.type.contextTypes;if(!r)return ac;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=e[s];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Xn(t){return t=t.childContextTypes,t!=null}function dm(){zt(Jn),zt(xn)}function h4(t,e,r){if(xn.current!==ac)throw Error(oe(168));yt(xn,e),yt(Jn,r)}function lO(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(oe(108,IH(t)||"Unknown",i));return ur({},r,n)}function hm(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ac,Pl=xn.current,yt(xn,t),yt(Jn,Jn.current),!0}function p4(t,e,r){var n=t.stateNode;if(!n)throw Error(oe(169));r?(t=lO(t,e,Pl),n.__reactInternalMemoizedMergedChildContext=t,zt(Jn),zt(xn),yt(xn,t)):zt(Jn),yt(Jn,r)}var Ao=null,ag=!1,Dw=!1;function uO(t){Ao===null?Ao=[t]:Ao.push(t)}function Gq(t){ag=!0,uO(t)}function Pc(){if(!Dw&&Ao!==null){Dw=!0;var t=0,e=ct;try{var r=Ao;for(ct=1;t>=o,i-=o,Oo=1<<32-ms(e)+i|r<I?(B=w,w=null):B=w.sibling;var j=d(y,w,g[I],S);if(j===null){w===null&&(w=B);break}t&&w&&j.alternate===null&&e(y,w),m=s(j,m,I),T===null?P=j:T.sibling=j,T=j,w=B}if(I===g.length)return r(y,w),Zt&&Zc(y,I),P;if(w===null){for(;II?(B=w,w=null):B=w.sibling;var H=d(y,w,j.value,S);if(H===null){w===null&&(w=B);break}t&&w&&H.alternate===null&&e(y,w),m=s(H,m,I),T===null?P=H:T.sibling=H,T=H,w=B}if(j.done)return r(y,w),Zt&&Zc(y,I),P;if(w===null){for(;!j.done;I++,j=g.next())j=f(y,j.value,S),j!==null&&(m=s(j,m,I),T===null?P=j:T.sibling=j,T=j);return Zt&&Zc(y,I),P}for(w=n(y,w);!j.done;I++,j=g.next())j=h(w,y,I,j.value,S),j!==null&&(t&&j.alternate!==null&&w.delete(j.key===null?I:j.key),m=s(j,m,I),T===null?P=j:T.sibling=j,T=j);return t&&w.forEach(function(G){return e(y,G)}),Zt&&Zc(y,I),P}function b(y,m,g,S){if(typeof g=="object"&&g!==null&&g.type===Mu&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case fp:e:{for(var P=g.key,T=m;T!==null;){if(T.key===P){if(P=g.type,P===Mu){if(T.tag===7){r(y,T.sibling),m=i(T,g.props.children),m.return=y,y=m;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Pa&&E4(P)===T.type){r(y,T.sibling),m=i(T,g.props),m.ref=Bd(y,T,g),m.return=y,y=m;break e}r(y,T);break}else e(y,T);T=T.sibling}g.type===Mu?(m=bl(g.props.children,y.mode,S,g.key),m.return=y,y=m):(S=Cv(g.type,g.key,g.props,null,y.mode,S),S.ref=Bd(y,m,g),S.return=y,y=S)}return o(y);case $u:e:{for(T=g.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===g.containerInfo&&m.stateNode.implementation===g.implementation){r(y,m.sibling),m=i(m,g.children||[]),m.return=y,y=m;break e}else{r(y,m);break}else e(y,m);m=m.sibling}m=Hw(g,y.mode,S),m.return=y,y=m}return o(y);case Pa:return T=g._init,b(y,m,T(g._payload),S)}if(ch(g))return p(y,m,g,S);if(Md(g))return v(y,m,g,S);xp(y,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,m!==null&&m.tag===6?(r(y,m.sibling),m=i(m,g),m.return=y,y=m):(r(y,m),m=Ww(g,y.mode,S),m.return=y,y=m),o(y)):r(y,m)}return b}var kf=gO(!0),bO=gO(!1),E1={},eo=_c(E1),d0=_c(E1),h0=_c(E1);function hl(t){if(t===E1)throw Error(oe(174));return t}function S6(t,e){switch(yt(h0,e),yt(d0,t),yt(eo,E1),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:$E(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=$E(e,t)}zt(eo),yt(eo,e)}function Af(){zt(eo),zt(d0),zt(h0)}function wO(t){hl(h0.current);var e=hl(eo.current),r=$E(e,t.type);e!==r&&(yt(d0,t),yt(eo,r))}function k6(t){d0.current===t&&(zt(eo),zt(d0))}var sr=_c(0);function bm(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Lw=[];function A6(){for(var t=0;tr?r:4,t(!0);var n=Fw.transition;Fw.transition={};try{t(!1),e()}finally{ct=r,Fw.transition=n}}function DO(){return ji().memoizedState}function Jq(t,e,r){var n=Xa(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},LO(t))FO(e,r);else if(r=pO(t,e,r,n),r!==null){var i=Mn();ys(r,t,n,i),BO(r,e,n)}}function Xq(t,e,r){var n=Xa(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(LO(t))FO(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,r);if(i.hasEagerState=!0,i.eagerState=a,Es(a,o)){var c=e.interleaved;c===null?(i.next=i,x6(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}r=pO(t,e,i,n),r!==null&&(i=Mn(),ys(r,t,n,i),BO(r,e,n))}}function LO(t){var e=t.alternate;return t===cr||e!==null&&e===cr}function FO(t,e){Ch=wm=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function BO(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,c6(t,r)}}var Em={readContext:Bi,useCallback:ln,useContext:ln,useEffect:ln,useImperativeHandle:ln,useInsertionEffect:ln,useLayoutEffect:ln,useMemo:ln,useReducer:ln,useRef:ln,useState:ln,useDebugValue:ln,useDeferredValue:ln,useTransition:ln,useMutableSource:ln,useSyncExternalStore:ln,useId:ln,unstable_isNewReconciler:!1},Zq={readContext:Bi,useCallback:function(t,e){return Bs().memoizedState=[t,e===void 0?null:e],t},useContext:Bi,useEffect:C4,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,bv(4194308,4,OO.bind(null,e,t),r)},useLayoutEffect:function(t,e){return bv(4194308,4,t,e)},useInsertionEffect:function(t,e){return bv(4,2,t,e)},useMemo:function(t,e){var r=Bs();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Bs();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=Jq.bind(null,cr,t),[n.memoizedState,t]},useRef:function(t){var e=Bs();return t={current:t},e.memoizedState=t},useState:x4,useDebugValue:O6,useDeferredValue:function(t){return Bs().memoizedState=t},useTransition:function(){var t=x4(!1),e=t[0];return t=Yq.bind(null,t[1]),Bs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=cr,i=Bs();if(Zt){if(r===void 0)throw Error(oe(407));r=r()}else{if(r=e(),Gr===null)throw Error(oe(349));Il&30||CO(n,e,r)}i.memoizedState=r;var s={value:r,getSnapshot:e};return i.queue=s,C4(kO.bind(null,n,s,t),[t]),n.flags|=2048,m0(9,SO.bind(null,n,s,r,e),void 0,null),r},useId:function(){var t=Bs(),e=Gr.identifierPrefix;if(Zt){var r=Ro,n=Oo;r=(n&~(1<<32-ms(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=p0++,0<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Vs]=e,t[f0]=n,qO(t,e,!1,!1),e.stateNode=t;e:{switch(o=NE(r,n),r){case"dialog":Bt("cancel",t),Bt("close",t),i=n;break;case"iframe":case"object":case"embed":Bt("load",t),i=n;break;case"video":case"audio":for(i=0;iPf&&(e.flags|=128,n=!0,jd(s,!1),e.lanes=4194304)}else{if(!n)if(t=bm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),jd(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Xt)return un(e),null}else 2*wr()-s.renderingStartTime>Pf&&r!==1073741824&&(e.flags|=128,n=!0,jd(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=wr(),e.sibling=null,r=ir.current,mt(ir,n?r&1|2:r&1),e):(un(e),null);case 22:case 23:return B6(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ai&1073741824&&(un(e),e.subtreeFlags&6&&(e.flags|=8192)):un(e),null;case 24:return null;case 25:return null}throw Error(oe(156,e.tag))}function nV(t,e){switch(g6(e),e.tag){case 1:return Xn(e.type)&&dm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Af(),Ut(Jn),Ut(xn),_6(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return A6(e),null;case 13:if(Ut(ir),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(oe(340));Sf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ut(ir),null;case 4:return Af(),null;case 10:return x6(e.type._context),null;case 22:case 23:return B6(),null;case 24:return null;default:return null}}var Sp=!1,pn=!1,iV=typeof WeakSet=="function"?WeakSet:Set,fe=null;function Wu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){hr(t,e,n)}else r.current=null}function cx(t,e,r){try{r()}catch(n){hr(t,e,n)}}var RA=!1;function sV(t,e){if(qE=cm,t=J7(),m6(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===i&&(a=o),d===s&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(VE={focusedElem:t,selectionRange:r},cm=!1,fe=e;fe!==null;)if(e=fe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,fe=t;else for(;fe!==null;){e=fe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,b=p.memoizedState,y=e.stateNode,m=y.getSnapshotBeforeUpdate(e.elementType===e.type?v:cs(e.type,v),b);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=e.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(S){hr(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,fe=t;break}fe=e.return}return p=RA,RA=!1,p}function Sh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&cx(e,r,s)}i=i.next}while(i!==n)}}function ug(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function lx(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function KO(t){var e=t.alternate;e!==null&&(t.alternate=null,KO(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Vs],delete e[f0],delete e[QE],delete e[Uq],delete e[zq])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function QO(t){return t.tag===5||t.tag===3||t.tag===4}function $A(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||QO(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ux(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=fm));else if(n!==4&&(t=t.child,t!==null))for(ux(t,e,r),t=t.sibling;t!==null;)ux(t,e,r),t=t.sibling}function fx(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(fx(t,e,r),t=t.sibling;t!==null;)fx(t,e,r),t=t.sibling}var Yr=null,us=!1;function wa(t,e,r){for(r=r.child;r!==null;)YO(t,e,r),r=r.sibling}function YO(t,e,r){if(Zs&&typeof Zs.onCommitFiberUnmount=="function")try{Zs.onCommitFiberUnmount(rg,r)}catch{}switch(r.tag){case 5:pn||Wu(r,e);case 6:var n=Yr,i=us;Yr=null,wa(t,e,r),Yr=n,us=i,Yr!==null&&(us?(t=Yr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Yr.removeChild(r.stateNode));break;case 18:Yr!==null&&(us?(t=Yr,r=r.stateNode,t.nodeType===8?Nw(t.parentNode,r):t.nodeType===1&&Nw(t,r),o0(t)):Nw(Yr,r.stateNode));break;case 4:n=Yr,i=us,Yr=r.stateNode.containerInfo,us=!0,wa(t,e,r),Yr=n,us=i;break;case 0:case 11:case 14:case 15:if(!pn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&cx(r,e,o),i=i.next}while(i!==n)}wa(t,e,r);break;case 1:if(!pn&&(Wu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){hr(r,e,a)}wa(t,e,r);break;case 21:wa(t,e,r);break;case 22:r.mode&1?(pn=(n=pn)||r.memoizedState!==null,wa(t,e,r),pn=n):wa(t,e,r);break;default:wa(t,e,r)}}function MA(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new iV),e.forEach(function(n){var i=pV.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Zi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=wr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*aV(n/1960))-n,10t?16:t,Fa===null)var n=!1;else{if(t=Fa,Fa=null,Sm=0,rt&6)throw Error(oe(331));var i=rt;for(rt|=4,fe=t.current;fe!==null;){var s=fe,o=s.child;if(fe.flags&16){var a=s.deletions;if(a!==null){for(var c=0;cwr()-D6?gl(t,0):N6|=r),Zn(t,e)}function iR(t,e){e===0&&(t.mode&1?(e=vp,vp<<=1,!(vp&130023424)&&(vp=4194304)):e=1);var r=Mn();t=jo(t,e),t!==null&&(g1(t,e,r),Zn(t,r))}function hV(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),iR(t,r)}function pV(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(oe(314))}n!==null&&n.delete(e),iR(t,r)}var sR;sR=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Jn.current)Kn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Kn=!1,tV(t,e,r);Kn=!!(t.flags&131072)}else Kn=!1,Xt&&e.flags&1048576&&cO(e,vm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;wv(t,e),t=e.pendingProps;var i=Cf(e,xn.current);of(e,r),i=T6(null,e,n,t,i,r);var s=I6();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Xn(n)?(s=!0,hm(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,S6(e),i.updater=cg,e.stateNode=i,i._reactInternals=e,tx(e,n,t,r),e=ix(null,e,n,!0,s,r)):(e.tag=0,Xt&&s&&y6(e),In(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(wv(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=mV(n),t=cs(n,t),i){case 0:e=nx(null,e,n,t,r);break e;case 1:e=TA(null,e,n,t,r);break e;case 11:e=_A(null,e,n,t,r);break e;case 14:e=PA(null,e,n,cs(n.type,t),r);break e}throw Error(oe(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:cs(n,i),nx(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:cs(n,i),TA(t,e,n,i,r);case 3:e:{if(zO(e),t===null)throw Error(oe(387));n=e.pendingProps,s=e.memoizedState,i=s.element,dO(t,e),gm(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=_f(Error(oe(423)),e),e=IA(t,e,n,r,i);break e}else if(n!==i){i=_f(Error(oe(424)),e),e=IA(t,e,n,r,i);break e}else for(hi=Qa(e.stateNode.containerInfo.firstChild),pi=e,Xt=!0,fs=null,r=mO(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Sf(),n===i){e=Uo(t,e,r);break e}In(t,e,n,r)}e=e.child}return e;case 5:return yO(e),t===null&&XE(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,GE(n,i)?o=null:s!==null&&GE(n,s)&&(e.flags|=32),UO(t,e),In(t,e,o,r),e.child;case 6:return t===null&&XE(e),null;case 13:return WO(t,e,r);case 4:return k6(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=kf(e,null,n,r):In(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:cs(n,i),_A(t,e,n,i,r);case 7:return In(t,e,e.pendingProps,r),e.child;case 8:return In(t,e,e.pendingProps.children,r),e.child;case 12:return In(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,mt(mm,n._currentValue),n._currentValue=o,s!==null)if(xs(s.value,o)){if(s.children===i.children&&!Jn.current){e=Uo(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(s.tag===1){c=No(-1,r&-r),c.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),ZE(s.return,r,e),a.lanes|=r;break}c=c.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(oe(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ZE(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}In(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,of(e,r),i=Fi(i),n=n(i),e.flags|=1,In(t,e,n,r),e.child;case 14:return n=e.type,i=cs(n,e.pendingProps),i=cs(n.type,i),PA(t,e,n,i,r);case 15:return FO(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:cs(n,i),wv(t,e),e.tag=1,Xn(n)?(t=!0,hm(e)):t=!1,of(e,r),pO(e,n,i),tx(e,n,i,r),ix(null,e,n,!0,t,r);case 19:return HO(t,e,r);case 22:return jO(t,e,r)}throw Error(oe(156,e.tag))};function oR(t,e){return R7(t,e)}function vV(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(t,e,r,n){return new vV(t,e,r,n)}function j6(t){return t=t.prototype,!(!t||!t.isReactComponent)}function mV(t){if(typeof t=="function")return j6(t)?1:0;if(t!=null){if(t=t.$$typeof,t===s6)return 11;if(t===o6)return 14}return 2}function Za(t,e){var r=t.alternate;return r===null?(r=Ni(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Cv(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")j6(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Mu:return bl(r.children,i,s,e);case i6:o=8,i|=8;break;case kE:return t=Ni(12,r,e,i|2),t.elementType=kE,t.lanes=s,t;case AE:return t=Ni(13,r,e,i),t.elementType=AE,t.lanes=s,t;case _E:return t=Ni(19,r,e,i),t.elementType=_E,t.lanes=s,t;case v7:return dg(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case h7:o=10;break e;case p7:o=9;break e;case s6:o=11;break e;case o6:o=14;break e;case Pa:o=16,n=null;break e}throw Error(oe(130,t==null?t:typeof t,""))}return e=Ni(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function bl(t,e,r,n){return t=Ni(7,t,n,e),t.lanes=r,t}function dg(t,e,r,n){return t=Ni(22,t,n,e),t.elementType=v7,t.lanes=r,t.stateNode={isHidden:!1},t}function Ww(t,e,r){return t=Ni(6,t,null,e),t.lanes=r,t}function Hw(t,e,r){return e=Ni(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function yV(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sw(0),this.expirationTimes=Sw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sw(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function U6(t,e,r,n,i,s,o,a,c){return t=new yV(t,e,r,a,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ni(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},S6(s),t}function gV(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uR)}catch(t){console.error(t)}}uR(),c7.exports=Ei;var _s=c7.exports;const CV=Gi(_s);var zA=_s;CE.createRoot=zA.createRoot,CE.hydrateRoot=zA.hydrateRoot;var q6={exports:{}};const SV={},kV=Object.freeze(Object.defineProperty({__proto__:null,default:SV},Symbol.toStringTag,{value:"Module"})),fR=YI(kV);q6.exports;(function(t){(function(e,r){function n(B,E){if(!B)throw new Error(E||"Assertion failed")}function i(B,E){B.super_=E;var _=function(){};_.prototype=E.prototype,B.prototype=new _,B.prototype.constructor=B}function s(B,E,_){if(s.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((E==="le"||E==="be")&&(_=E,E=10),this._init(B||0,E||10,_||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=fR.Buffer}catch{}s.isBN=function(E){return E instanceof s?!0:E!==null&&typeof E=="object"&&E.constructor.wordSize===s.wordSize&&Array.isArray(E.words)},s.max=function(E,_){return E.cmp(_)>0?E:_},s.min=function(E,_){return E.cmp(_)<0?E:_},s.prototype._init=function(E,_,O){if(typeof E=="number")return this._initNumber(E,_,O);if(typeof E=="object")return this._initArray(E,_,O);_==="hex"&&(_=16),n(_===(_|0)&&_>=2&&_<=36),E=E.toString().replace(/\s+/g,"");var N=0;E[0]==="-"&&(N++,this.negative=1),N=0;N-=3)$=E[N]|E[N-1]<<8|E[N-2]<<16,this.words[k]|=$<>>26-L&67108863,L+=24,L>=26&&(L-=26,k++);else if(O==="le")for(N=0,k=0;N>>26-L&67108863,L+=24,L>=26&&(L-=26,k++);return this._strip()};function a(B,E){var _=B.charCodeAt(E);if(_>=48&&_<=57)return _-48;if(_>=65&&_<=70)return _-55;if(_>=97&&_<=102)return _-87;n(!1,"Invalid character in "+B)}function c(B,E,_){var O=a(B,_);return _-1>=E&&(O|=a(B,_-1)<<4),O}s.prototype._parseHex=function(E,_,O){this.length=Math.ceil((E.length-_)/6),this.words=new Array(this.length);for(var N=0;N=_;N-=2)L=c(E,_,N)<=18?(k-=18,$+=1,this.words[$]|=L>>>26):k+=8;else{var M=E.length-_;for(N=M%2===0?_+1:_;N=18?(k-=18,$+=1,this.words[$]|=L>>>26):k+=8}this._strip()};function l(B,E,_,O){for(var N=0,k=0,$=Math.min(B.length,_),L=E;L<$;L++){var M=B.charCodeAt(L)-48;N*=O,M>=49?k=M-49+10:M>=17?k=M-17+10:k=M,n(M>=0&&k1&&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")]=f}catch{s.prototype.inspect=f}else s.prototype.inspect=f;function f(){return(this.red?""}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"],h=[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],p=[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(E,_){E=E||10,_=_|0||1;var O;if(E===16||E==="hex"){O="";for(var N=0,k=0,$=0;$>>24-N&16777215,N+=2,N>=26&&(N-=26,$--),k!==0||$!==this.length-1?O=d[6-M.length]+M+O:O=M+O}for(k!==0&&(O=k.toString(16)+O);O.length%_!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(E===(E|0)&&E>=2&&E<=36){var A=h[E],D=p[E];O="";var V=this.clone();for(V.negative=0;!V.isZero();){var R=V.modrn(D).toString(E);V=V.idivn(D),V.isZero()?O=R+O:O=d[A-R.length]+R+O}for(this.isZero()&&(O="0"+O);O.length%_!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=this.words[1]*67108864:this.length===3&&this.words[2]===1?E+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(E,_){return this.toArrayLike(o,E,_)}),s.prototype.toArray=function(E,_){return this.toArrayLike(Array,E,_)};var v=function(E,_){return E.allocUnsafe?E.allocUnsafe(_):new E(_)};s.prototype.toArrayLike=function(E,_,O){this._strip();var N=this.byteLength(),k=O||Math.max(1,N);n(N<=k,"byte array longer than desired length"),n(k>0,"Requested array length <= 0");var $=v(E,k),L=_==="le"?"LE":"BE";return this["_toArrayLike"+L]($,N),$},s.prototype._toArrayLikeLE=function(E,_){for(var O=0,N=0,k=0,$=0;k>8&255),O>16&255),$===6?(O>24&255),N=0,$=0):(N=L>>>24,$+=2)}if(O=0&&(E[O--]=L>>8&255),O>=0&&(E[O--]=L>>16&255),$===6?(O>=0&&(E[O--]=L>>24&255),N=0,$=0):(N=L>>>24,$+=2)}if(O>=0)for(E[O--]=N;O>=0;)E[O--]=0},Math.clz32?s.prototype._countBits=function(E){return 32-Math.clz32(E)}:s.prototype._countBits=function(E){var _=E,O=0;return _>=4096&&(O+=13,_>>>=13),_>=64&&(O+=7,_>>>=7),_>=8&&(O+=4,_>>>=4),_>=2&&(O+=2,_>>>=2),O+_},s.prototype._zeroBits=function(E){if(E===0)return 26;var _=E,O=0;return _&8191||(O+=13,_>>>=13),_&127||(O+=7,_>>>=7),_&15||(O+=4,_>>>=4),_&3||(O+=2,_>>>=2),_&1||O++,O},s.prototype.bitLength=function(){var E=this.words[this.length-1],_=this._countBits(E);return(this.length-1)*26+_};function b(B){for(var E=new Array(B.bitLength()),_=0;_>>N&1}return E}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,_=0;_E.length?this.clone().ior(E):E.clone().ior(this)},s.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},s.prototype.iuand=function(E){var _;this.length>E.length?_=E:_=this;for(var O=0;O<_.length;O++)this.words[O]=this.words[O]&E.words[O];return this.length=_.length,this._strip()},s.prototype.iand=function(E){return n((this.negative|E.negative)===0),this.iuand(E)},s.prototype.and=function(E){return this.length>E.length?this.clone().iand(E):E.clone().iand(this)},s.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},s.prototype.iuxor=function(E){var _,O;this.length>E.length?(_=this,O=E):(_=E,O=this);for(var N=0;NE.length?this.clone().ixor(E):E.clone().ixor(this)},s.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},s.prototype.inotn=function(E){n(typeof E=="number"&&E>=0);var _=Math.ceil(E/26)|0,O=E%26;this._expand(_),O>0&&_--;for(var N=0;N<_;N++)this.words[N]=~this.words[N]&67108863;return O>0&&(this.words[N]=~this.words[N]&67108863>>26-O),this._strip()},s.prototype.notn=function(E){return this.clone().inotn(E)},s.prototype.setn=function(E,_){n(typeof E=="number"&&E>=0);var O=E/26|0,N=E%26;return this._expand(O+1),_?this.words[O]=this.words[O]|1<E.length?(O=this,N=E):(O=E,N=this);for(var k=0,$=0;$>>26;for(;k!==0&&$>>26;if(this.length=O.length,k!==0)this.words[this.length]=k,this.length++;else if(O!==this)for(;$E.length?this.clone().iadd(E):E.clone().iadd(this)},s.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var _=this.iadd(E);return E.negative=1,_._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var O=this.cmp(E);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,k;O>0?(N=this,k=E):(N=E,k=this);for(var $=0,L=0;L>26,this.words[L]=_&67108863;for(;$!==0&&L>26,this.words[L]=_&67108863;if($===0&&L>>26,V=M&67108863,R=Math.min(A,E.length-1),U=Math.max(0,A-B.length+1);U<=R;U++){var W=A-U|0;N=B.words[W]|0,k=E.words[U]|0,$=N*k+V,D+=$/67108864|0,V=$&67108863}_.words[A]=V|0,M=D|0}return M!==0?_.words[A]=M|0:_.length--,_._strip()}var m=function(E,_,O){var N=E.words,k=_.words,$=O.words,L=0,M,A,D,V=N[0]|0,R=V&8191,U=V>>>13,W=N[1]|0,q=W&8191,Y=W>>>13,X=N[2]|0,Q=X&8191,Z=X>>>13,ae=N[3]|0,se=ae&8191,ue=ae>>>13,ot=N[4]|0,Pe=ot&8191,Ae=ot>>>13,at=N[5]|0,Ce=at&8191,be=at>>>13,qt=N[6]|0,Te=qt&8191,Ie=qt>>>13,Vt=N[7]|0,Oe=Vt&8191,Re=Vt>>>13,Gt=N[8]|0,$e=Gt&8191,Me=Gt>>>13,Kt=N[9]|0,Ne=Kt&8191,De=Kt>>>13,Qt=k[0]|0,Le=Qt&8191,bt=Qt>>>13,jc=k[1]|0,wt=jc&8191,Et=jc>>>13,Uc=k[2]|0,xt=Uc&8191,Ct=Uc>>>13,zc=k[3]|0,St=zc&8191,kt=zc>>>13,Wc=k[4]|0,At=Wc&8191,_t=Wc>>>13,Hc=k[5]|0,Pt=Hc&8191,Tt=Hc>>>13,qc=k[6]|0,It=qc&8191,Ot=qc>>>13,Vc=k[7]|0,Rt=Vc&8191,$t=Vc>>>13,Gc=k[8]|0,Mt=Gc&8191,Nt=Gc>>>13,Kc=k[9]|0,Dt=Kc&8191,Lt=Kc>>>13;O.negative=E.negative^_.negative,O.length=19,M=Math.imul(R,Le),A=Math.imul(R,bt),A=A+Math.imul(U,Le)|0,D=Math.imul(U,bt);var va=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(va>>>26)|0,va&=67108863,M=Math.imul(q,Le),A=Math.imul(q,bt),A=A+Math.imul(Y,Le)|0,D=Math.imul(Y,bt),M=M+Math.imul(R,wt)|0,A=A+Math.imul(R,Et)|0,A=A+Math.imul(U,wt)|0,D=D+Math.imul(U,Et)|0;var ma=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ma>>>26)|0,ma&=67108863,M=Math.imul(Q,Le),A=Math.imul(Q,bt),A=A+Math.imul(Z,Le)|0,D=Math.imul(Z,bt),M=M+Math.imul(q,wt)|0,A=A+Math.imul(q,Et)|0,A=A+Math.imul(Y,wt)|0,D=D+Math.imul(Y,Et)|0,M=M+Math.imul(R,xt)|0,A=A+Math.imul(R,Ct)|0,A=A+Math.imul(U,xt)|0,D=D+Math.imul(U,Ct)|0;var ya=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ya>>>26)|0,ya&=67108863,M=Math.imul(se,Le),A=Math.imul(se,bt),A=A+Math.imul(ue,Le)|0,D=Math.imul(ue,bt),M=M+Math.imul(Q,wt)|0,A=A+Math.imul(Q,Et)|0,A=A+Math.imul(Z,wt)|0,D=D+Math.imul(Z,Et)|0,M=M+Math.imul(q,xt)|0,A=A+Math.imul(q,Ct)|0,A=A+Math.imul(Y,xt)|0,D=D+Math.imul(Y,Ct)|0,M=M+Math.imul(R,St)|0,A=A+Math.imul(R,kt)|0,A=A+Math.imul(U,St)|0,D=D+Math.imul(U,kt)|0;var ga=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ga>>>26)|0,ga&=67108863,M=Math.imul(Pe,Le),A=Math.imul(Pe,bt),A=A+Math.imul(Ae,Le)|0,D=Math.imul(Ae,bt),M=M+Math.imul(se,wt)|0,A=A+Math.imul(se,Et)|0,A=A+Math.imul(ue,wt)|0,D=D+Math.imul(ue,Et)|0,M=M+Math.imul(Q,xt)|0,A=A+Math.imul(Q,Ct)|0,A=A+Math.imul(Z,xt)|0,D=D+Math.imul(Z,Ct)|0,M=M+Math.imul(q,St)|0,A=A+Math.imul(q,kt)|0,A=A+Math.imul(Y,St)|0,D=D+Math.imul(Y,kt)|0,M=M+Math.imul(R,At)|0,A=A+Math.imul(R,_t)|0,A=A+Math.imul(U,At)|0,D=D+Math.imul(U,_t)|0;var ba=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ba>>>26)|0,ba&=67108863,M=Math.imul(Ce,Le),A=Math.imul(Ce,bt),A=A+Math.imul(be,Le)|0,D=Math.imul(be,bt),M=M+Math.imul(Pe,wt)|0,A=A+Math.imul(Pe,Et)|0,A=A+Math.imul(Ae,wt)|0,D=D+Math.imul(Ae,Et)|0,M=M+Math.imul(se,xt)|0,A=A+Math.imul(se,Ct)|0,A=A+Math.imul(ue,xt)|0,D=D+Math.imul(ue,Ct)|0,M=M+Math.imul(Q,St)|0,A=A+Math.imul(Q,kt)|0,A=A+Math.imul(Z,St)|0,D=D+Math.imul(Z,kt)|0,M=M+Math.imul(q,At)|0,A=A+Math.imul(q,_t)|0,A=A+Math.imul(Y,At)|0,D=D+Math.imul(Y,_t)|0,M=M+Math.imul(R,Pt)|0,A=A+Math.imul(R,Tt)|0,A=A+Math.imul(U,Pt)|0,D=D+Math.imul(U,Tt)|0;var sw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(sw>>>26)|0,sw&=67108863,M=Math.imul(Te,Le),A=Math.imul(Te,bt),A=A+Math.imul(Ie,Le)|0,D=Math.imul(Ie,bt),M=M+Math.imul(Ce,wt)|0,A=A+Math.imul(Ce,Et)|0,A=A+Math.imul(be,wt)|0,D=D+Math.imul(be,Et)|0,M=M+Math.imul(Pe,xt)|0,A=A+Math.imul(Pe,Ct)|0,A=A+Math.imul(Ae,xt)|0,D=D+Math.imul(Ae,Ct)|0,M=M+Math.imul(se,St)|0,A=A+Math.imul(se,kt)|0,A=A+Math.imul(ue,St)|0,D=D+Math.imul(ue,kt)|0,M=M+Math.imul(Q,At)|0,A=A+Math.imul(Q,_t)|0,A=A+Math.imul(Z,At)|0,D=D+Math.imul(Z,_t)|0,M=M+Math.imul(q,Pt)|0,A=A+Math.imul(q,Tt)|0,A=A+Math.imul(Y,Pt)|0,D=D+Math.imul(Y,Tt)|0,M=M+Math.imul(R,It)|0,A=A+Math.imul(R,Ot)|0,A=A+Math.imul(U,It)|0,D=D+Math.imul(U,Ot)|0;var ow=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ow>>>26)|0,ow&=67108863,M=Math.imul(Oe,Le),A=Math.imul(Oe,bt),A=A+Math.imul(Re,Le)|0,D=Math.imul(Re,bt),M=M+Math.imul(Te,wt)|0,A=A+Math.imul(Te,Et)|0,A=A+Math.imul(Ie,wt)|0,D=D+Math.imul(Ie,Et)|0,M=M+Math.imul(Ce,xt)|0,A=A+Math.imul(Ce,Ct)|0,A=A+Math.imul(be,xt)|0,D=D+Math.imul(be,Ct)|0,M=M+Math.imul(Pe,St)|0,A=A+Math.imul(Pe,kt)|0,A=A+Math.imul(Ae,St)|0,D=D+Math.imul(Ae,kt)|0,M=M+Math.imul(se,At)|0,A=A+Math.imul(se,_t)|0,A=A+Math.imul(ue,At)|0,D=D+Math.imul(ue,_t)|0,M=M+Math.imul(Q,Pt)|0,A=A+Math.imul(Q,Tt)|0,A=A+Math.imul(Z,Pt)|0,D=D+Math.imul(Z,Tt)|0,M=M+Math.imul(q,It)|0,A=A+Math.imul(q,Ot)|0,A=A+Math.imul(Y,It)|0,D=D+Math.imul(Y,Ot)|0,M=M+Math.imul(R,Rt)|0,A=A+Math.imul(R,$t)|0,A=A+Math.imul(U,Rt)|0,D=D+Math.imul(U,$t)|0;var aw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(aw>>>26)|0,aw&=67108863,M=Math.imul($e,Le),A=Math.imul($e,bt),A=A+Math.imul(Me,Le)|0,D=Math.imul(Me,bt),M=M+Math.imul(Oe,wt)|0,A=A+Math.imul(Oe,Et)|0,A=A+Math.imul(Re,wt)|0,D=D+Math.imul(Re,Et)|0,M=M+Math.imul(Te,xt)|0,A=A+Math.imul(Te,Ct)|0,A=A+Math.imul(Ie,xt)|0,D=D+Math.imul(Ie,Ct)|0,M=M+Math.imul(Ce,St)|0,A=A+Math.imul(Ce,kt)|0,A=A+Math.imul(be,St)|0,D=D+Math.imul(be,kt)|0,M=M+Math.imul(Pe,At)|0,A=A+Math.imul(Pe,_t)|0,A=A+Math.imul(Ae,At)|0,D=D+Math.imul(Ae,_t)|0,M=M+Math.imul(se,Pt)|0,A=A+Math.imul(se,Tt)|0,A=A+Math.imul(ue,Pt)|0,D=D+Math.imul(ue,Tt)|0,M=M+Math.imul(Q,It)|0,A=A+Math.imul(Q,Ot)|0,A=A+Math.imul(Z,It)|0,D=D+Math.imul(Z,Ot)|0,M=M+Math.imul(q,Rt)|0,A=A+Math.imul(q,$t)|0,A=A+Math.imul(Y,Rt)|0,D=D+Math.imul(Y,$t)|0,M=M+Math.imul(R,Mt)|0,A=A+Math.imul(R,Nt)|0,A=A+Math.imul(U,Mt)|0,D=D+Math.imul(U,Nt)|0;var cw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(cw>>>26)|0,cw&=67108863,M=Math.imul(Ne,Le),A=Math.imul(Ne,bt),A=A+Math.imul(De,Le)|0,D=Math.imul(De,bt),M=M+Math.imul($e,wt)|0,A=A+Math.imul($e,Et)|0,A=A+Math.imul(Me,wt)|0,D=D+Math.imul(Me,Et)|0,M=M+Math.imul(Oe,xt)|0,A=A+Math.imul(Oe,Ct)|0,A=A+Math.imul(Re,xt)|0,D=D+Math.imul(Re,Ct)|0,M=M+Math.imul(Te,St)|0,A=A+Math.imul(Te,kt)|0,A=A+Math.imul(Ie,St)|0,D=D+Math.imul(Ie,kt)|0,M=M+Math.imul(Ce,At)|0,A=A+Math.imul(Ce,_t)|0,A=A+Math.imul(be,At)|0,D=D+Math.imul(be,_t)|0,M=M+Math.imul(Pe,Pt)|0,A=A+Math.imul(Pe,Tt)|0,A=A+Math.imul(Ae,Pt)|0,D=D+Math.imul(Ae,Tt)|0,M=M+Math.imul(se,It)|0,A=A+Math.imul(se,Ot)|0,A=A+Math.imul(ue,It)|0,D=D+Math.imul(ue,Ot)|0,M=M+Math.imul(Q,Rt)|0,A=A+Math.imul(Q,$t)|0,A=A+Math.imul(Z,Rt)|0,D=D+Math.imul(Z,$t)|0,M=M+Math.imul(q,Mt)|0,A=A+Math.imul(q,Nt)|0,A=A+Math.imul(Y,Mt)|0,D=D+Math.imul(Y,Nt)|0,M=M+Math.imul(R,Dt)|0,A=A+Math.imul(R,Lt)|0,A=A+Math.imul(U,Dt)|0,D=D+Math.imul(U,Lt)|0;var lw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(lw>>>26)|0,lw&=67108863,M=Math.imul(Ne,wt),A=Math.imul(Ne,Et),A=A+Math.imul(De,wt)|0,D=Math.imul(De,Et),M=M+Math.imul($e,xt)|0,A=A+Math.imul($e,Ct)|0,A=A+Math.imul(Me,xt)|0,D=D+Math.imul(Me,Ct)|0,M=M+Math.imul(Oe,St)|0,A=A+Math.imul(Oe,kt)|0,A=A+Math.imul(Re,St)|0,D=D+Math.imul(Re,kt)|0,M=M+Math.imul(Te,At)|0,A=A+Math.imul(Te,_t)|0,A=A+Math.imul(Ie,At)|0,D=D+Math.imul(Ie,_t)|0,M=M+Math.imul(Ce,Pt)|0,A=A+Math.imul(Ce,Tt)|0,A=A+Math.imul(be,Pt)|0,D=D+Math.imul(be,Tt)|0,M=M+Math.imul(Pe,It)|0,A=A+Math.imul(Pe,Ot)|0,A=A+Math.imul(Ae,It)|0,D=D+Math.imul(Ae,Ot)|0,M=M+Math.imul(se,Rt)|0,A=A+Math.imul(se,$t)|0,A=A+Math.imul(ue,Rt)|0,D=D+Math.imul(ue,$t)|0,M=M+Math.imul(Q,Mt)|0,A=A+Math.imul(Q,Nt)|0,A=A+Math.imul(Z,Mt)|0,D=D+Math.imul(Z,Nt)|0,M=M+Math.imul(q,Dt)|0,A=A+Math.imul(q,Lt)|0,A=A+Math.imul(Y,Dt)|0,D=D+Math.imul(Y,Lt)|0;var uw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(uw>>>26)|0,uw&=67108863,M=Math.imul(Ne,xt),A=Math.imul(Ne,Ct),A=A+Math.imul(De,xt)|0,D=Math.imul(De,Ct),M=M+Math.imul($e,St)|0,A=A+Math.imul($e,kt)|0,A=A+Math.imul(Me,St)|0,D=D+Math.imul(Me,kt)|0,M=M+Math.imul(Oe,At)|0,A=A+Math.imul(Oe,_t)|0,A=A+Math.imul(Re,At)|0,D=D+Math.imul(Re,_t)|0,M=M+Math.imul(Te,Pt)|0,A=A+Math.imul(Te,Tt)|0,A=A+Math.imul(Ie,Pt)|0,D=D+Math.imul(Ie,Tt)|0,M=M+Math.imul(Ce,It)|0,A=A+Math.imul(Ce,Ot)|0,A=A+Math.imul(be,It)|0,D=D+Math.imul(be,Ot)|0,M=M+Math.imul(Pe,Rt)|0,A=A+Math.imul(Pe,$t)|0,A=A+Math.imul(Ae,Rt)|0,D=D+Math.imul(Ae,$t)|0,M=M+Math.imul(se,Mt)|0,A=A+Math.imul(se,Nt)|0,A=A+Math.imul(ue,Mt)|0,D=D+Math.imul(ue,Nt)|0,M=M+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,Lt)|0,A=A+Math.imul(Z,Dt)|0,D=D+Math.imul(Z,Lt)|0;var fw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(fw>>>26)|0,fw&=67108863,M=Math.imul(Ne,St),A=Math.imul(Ne,kt),A=A+Math.imul(De,St)|0,D=Math.imul(De,kt),M=M+Math.imul($e,At)|0,A=A+Math.imul($e,_t)|0,A=A+Math.imul(Me,At)|0,D=D+Math.imul(Me,_t)|0,M=M+Math.imul(Oe,Pt)|0,A=A+Math.imul(Oe,Tt)|0,A=A+Math.imul(Re,Pt)|0,D=D+Math.imul(Re,Tt)|0,M=M+Math.imul(Te,It)|0,A=A+Math.imul(Te,Ot)|0,A=A+Math.imul(Ie,It)|0,D=D+Math.imul(Ie,Ot)|0,M=M+Math.imul(Ce,Rt)|0,A=A+Math.imul(Ce,$t)|0,A=A+Math.imul(be,Rt)|0,D=D+Math.imul(be,$t)|0,M=M+Math.imul(Pe,Mt)|0,A=A+Math.imul(Pe,Nt)|0,A=A+Math.imul(Ae,Mt)|0,D=D+Math.imul(Ae,Nt)|0,M=M+Math.imul(se,Dt)|0,A=A+Math.imul(se,Lt)|0,A=A+Math.imul(ue,Dt)|0,D=D+Math.imul(ue,Lt)|0;var dw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(dw>>>26)|0,dw&=67108863,M=Math.imul(Ne,At),A=Math.imul(Ne,_t),A=A+Math.imul(De,At)|0,D=Math.imul(De,_t),M=M+Math.imul($e,Pt)|0,A=A+Math.imul($e,Tt)|0,A=A+Math.imul(Me,Pt)|0,D=D+Math.imul(Me,Tt)|0,M=M+Math.imul(Oe,It)|0,A=A+Math.imul(Oe,Ot)|0,A=A+Math.imul(Re,It)|0,D=D+Math.imul(Re,Ot)|0,M=M+Math.imul(Te,Rt)|0,A=A+Math.imul(Te,$t)|0,A=A+Math.imul(Ie,Rt)|0,D=D+Math.imul(Ie,$t)|0,M=M+Math.imul(Ce,Mt)|0,A=A+Math.imul(Ce,Nt)|0,A=A+Math.imul(be,Mt)|0,D=D+Math.imul(be,Nt)|0,M=M+Math.imul(Pe,Dt)|0,A=A+Math.imul(Pe,Lt)|0,A=A+Math.imul(Ae,Dt)|0,D=D+Math.imul(Ae,Lt)|0;var hw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(hw>>>26)|0,hw&=67108863,M=Math.imul(Ne,Pt),A=Math.imul(Ne,Tt),A=A+Math.imul(De,Pt)|0,D=Math.imul(De,Tt),M=M+Math.imul($e,It)|0,A=A+Math.imul($e,Ot)|0,A=A+Math.imul(Me,It)|0,D=D+Math.imul(Me,Ot)|0,M=M+Math.imul(Oe,Rt)|0,A=A+Math.imul(Oe,$t)|0,A=A+Math.imul(Re,Rt)|0,D=D+Math.imul(Re,$t)|0,M=M+Math.imul(Te,Mt)|0,A=A+Math.imul(Te,Nt)|0,A=A+Math.imul(Ie,Mt)|0,D=D+Math.imul(Ie,Nt)|0,M=M+Math.imul(Ce,Dt)|0,A=A+Math.imul(Ce,Lt)|0,A=A+Math.imul(be,Dt)|0,D=D+Math.imul(be,Lt)|0;var pw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(pw>>>26)|0,pw&=67108863,M=Math.imul(Ne,It),A=Math.imul(Ne,Ot),A=A+Math.imul(De,It)|0,D=Math.imul(De,Ot),M=M+Math.imul($e,Rt)|0,A=A+Math.imul($e,$t)|0,A=A+Math.imul(Me,Rt)|0,D=D+Math.imul(Me,$t)|0,M=M+Math.imul(Oe,Mt)|0,A=A+Math.imul(Oe,Nt)|0,A=A+Math.imul(Re,Mt)|0,D=D+Math.imul(Re,Nt)|0,M=M+Math.imul(Te,Dt)|0,A=A+Math.imul(Te,Lt)|0,A=A+Math.imul(Ie,Dt)|0,D=D+Math.imul(Ie,Lt)|0;var vw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(vw>>>26)|0,vw&=67108863,M=Math.imul(Ne,Rt),A=Math.imul(Ne,$t),A=A+Math.imul(De,Rt)|0,D=Math.imul(De,$t),M=M+Math.imul($e,Mt)|0,A=A+Math.imul($e,Nt)|0,A=A+Math.imul(Me,Mt)|0,D=D+Math.imul(Me,Nt)|0,M=M+Math.imul(Oe,Dt)|0,A=A+Math.imul(Oe,Lt)|0,A=A+Math.imul(Re,Dt)|0,D=D+Math.imul(Re,Lt)|0;var mw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(mw>>>26)|0,mw&=67108863,M=Math.imul(Ne,Mt),A=Math.imul(Ne,Nt),A=A+Math.imul(De,Mt)|0,D=Math.imul(De,Nt),M=M+Math.imul($e,Dt)|0,A=A+Math.imul($e,Lt)|0,A=A+Math.imul(Me,Dt)|0,D=D+Math.imul(Me,Lt)|0;var yw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(yw>>>26)|0,yw&=67108863,M=Math.imul(Ne,Dt),A=Math.imul(Ne,Lt),A=A+Math.imul(De,Dt)|0,D=Math.imul(De,Lt);var gw=(L+M|0)+((A&8191)<<13)|0;return L=(D+(A>>>13)|0)+(gw>>>26)|0,gw&=67108863,$[0]=va,$[1]=ma,$[2]=ya,$[3]=ga,$[4]=ba,$[5]=sw,$[6]=ow,$[7]=aw,$[8]=cw,$[9]=lw,$[10]=uw,$[11]=fw,$[12]=dw,$[13]=hw,$[14]=pw,$[15]=vw,$[16]=mw,$[17]=yw,$[18]=gw,L!==0&&($[19]=L,O.length++),O};Math.imul||(m=y);function g(B,E,_){_.negative=E.negative^B.negative,_.length=B.length+E.length;for(var O=0,N=0,k=0;k<_.length-1;k++){var $=N;N=0;for(var L=O&67108863,M=Math.min(k,E.length-1),A=Math.max(0,k-B.length+1);A<=M;A++){var D=k-A,V=B.words[D]|0,R=E.words[A]|0,U=V*R,W=U&67108863;$=$+(U/67108864|0)|0,W=W+L|0,L=W&67108863,$=$+(W>>>26)|0,N+=$>>>26,$&=67108863}_.words[k]=L,O=$,$=N}return O!==0?_.words[k]=O:_.length--,_._strip()}function S(B,E,_){return g(B,E,_)}s.prototype.mulTo=function(E,_){var O,N=this.length+E.length;return this.length===10&&E.length===10?O=m(this,E,_):N<63?O=y(this,E,_):N<1024?O=g(this,E,_):O=S(this,E,_),O},s.prototype.mul=function(E){var _=new s(null);return _.words=new Array(this.length+E.length),this.mulTo(E,_)},s.prototype.mulf=function(E){var _=new s(null);return _.words=new Array(this.length+E.length),S(this,E,_)},s.prototype.imul=function(E){return this.clone().mulTo(E,this)},s.prototype.imuln=function(E){var _=E<0;_&&(E=-E),n(typeof E=="number"),n(E<67108864);for(var O=0,N=0;N>=26,O+=k/67108864|0,O+=$>>>26,this.words[N]=$&67108863}return O!==0&&(this.words[N]=O,this.length++),_?this.ineg():this},s.prototype.muln=function(E){return this.clone().imuln(E)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(E){var _=b(E);if(_.length===0)return new s(1);for(var O=this,N=0;N<_.length&&_[N]===0;N++,O=O.sqr());if(++N<_.length)for(var k=O.sqr();N<_.length;N++,k=k.sqr())_[N]!==0&&(O=O.mul(k));return O},s.prototype.iushln=function(E){n(typeof E=="number"&&E>=0);var _=E%26,O=(E-_)/26,N=67108863>>>26-_<<26-_,k;if(_!==0){var $=0;for(k=0;k>>26-_}$&&(this.words[k]=$,this.length++)}if(O!==0){for(k=this.length-1;k>=0;k--)this.words[k+O]=this.words[k];for(k=0;k=0);var N;_?N=(_-_%26)/26:N=0;var k=E%26,$=Math.min((E-k)/26,this.length),L=67108863^67108863>>>k<$)for(this.length-=$,A=0;A=0&&(D!==0||A>=N);A--){var V=this.words[A]|0;this.words[A]=D<<26-k|V>>>k,D=V&L}return M&&D!==0&&(M.words[M.length++]=D),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(E,_,O){return n(this.negative===0),this.iushrn(E,_,O)},s.prototype.shln=function(E){return this.clone().ishln(E)},s.prototype.ushln=function(E){return this.clone().iushln(E)},s.prototype.shrn=function(E){return this.clone().ishrn(E)},s.prototype.ushrn=function(E){return this.clone().iushrn(E)},s.prototype.testn=function(E){n(typeof E=="number"&&E>=0);var _=E%26,O=(E-_)/26,N=1<<_;if(this.length<=O)return!1;var k=this.words[O];return!!(k&N)},s.prototype.imaskn=function(E){n(typeof E=="number"&&E>=0);var _=E%26,O=(E-_)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(_!==0&&O++,this.length=Math.min(O,this.length),_!==0){var N=67108863^67108863>>>_<<_;this.words[this.length-1]&=N}return this._strip()},s.prototype.maskn=function(E){return this.clone().imaskn(E)},s.prototype.iaddn=function(E){return n(typeof E=="number"),n(E<67108864),E<0?this.isubn(-E):this.negative!==0?this.length===1&&(this.words[0]|0)<=E?(this.words[0]=E-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(E),this.negative=1,this):this._iaddn(E)},s.prototype._iaddn=function(E){this.words[0]+=E;for(var _=0;_=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},s.prototype.isubn=function(E){if(n(typeof E=="number"),n(E<67108864),E<0)return this.iaddn(-E);if(this.negative!==0)return this.negative=0,this.iaddn(E),this.negative=1,this;if(this.words[0]-=E,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var _=0;_>26)-(M/67108864|0),this.words[k+O]=$&67108863}for(;k>26,this.words[k+O]=$&67108863;if(L===0)return this._strip();for(n(L===-1),L=0,k=0;k>26,this.words[k]=$&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(E,_){var O=this.length-E.length,N=this.clone(),k=E,$=k.words[k.length-1]|0,L=this._countBits($);O=26-L,O!==0&&(k=k.ushln(O),N.iushln(O),$=k.words[k.length-1]|0);var M=N.length-k.length,A;if(_!=="mod"){A=new s(null),A.length=M+1,A.words=new Array(A.length);for(var D=0;D=0;R--){var U=(N.words[k.length+R]|0)*67108864+(N.words[k.length+R-1]|0);for(U=Math.min(U/$|0,67108863),N._ishlnsubmul(k,U,R);N.negative!==0;)U--,N.negative=0,N._ishlnsubmul(k,1,R),N.isZero()||(N.negative^=1);A&&(A.words[R]=U)}return A&&A._strip(),N._strip(),_!=="div"&&O!==0&&N.iushrn(O),{div:A||null,mod:N}},s.prototype.divmod=function(E,_,O){if(n(!E.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,k,$;return this.negative!==0&&E.negative===0?($=this.neg().divmod(E,_),_!=="mod"&&(N=$.div.neg()),_!=="div"&&(k=$.mod.neg(),O&&k.negative!==0&&k.iadd(E)),{div:N,mod:k}):this.negative===0&&E.negative!==0?($=this.divmod(E.neg(),_),_!=="mod"&&(N=$.div.neg()),{div:N,mod:$.mod}):this.negative&E.negative?($=this.neg().divmod(E.neg(),_),_!=="div"&&(k=$.mod.neg(),O&&k.negative!==0&&k.isub(E)),{div:$.div,mod:k}):E.length>this.length||this.cmp(E)<0?{div:new s(0),mod:this}:E.length===1?_==="div"?{div:this.divn(E.words[0]),mod:null}:_==="mod"?{div:null,mod:new s(this.modrn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new s(this.modrn(E.words[0]))}:this._wordDiv(E,_)},s.prototype.div=function(E){return this.divmod(E,"div",!1).div},s.prototype.mod=function(E){return this.divmod(E,"mod",!1).mod},s.prototype.umod=function(E){return this.divmod(E,"mod",!0).mod},s.prototype.divRound=function(E){var _=this.divmod(E);if(_.mod.isZero())return _.div;var O=_.div.negative!==0?_.mod.isub(E):_.mod,N=E.ushrn(1),k=E.andln(1),$=O.cmp(N);return $<0||k===1&&$===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},s.prototype.modrn=function(E){var _=E<0;_&&(E=-E),n(E<=67108863);for(var O=(1<<26)%E,N=0,k=this.length-1;k>=0;k--)N=(O*N+(this.words[k]|0))%E;return _?-N:N},s.prototype.modn=function(E){return this.modrn(E)},s.prototype.idivn=function(E){var _=E<0;_&&(E=-E),n(E<=67108863);for(var O=0,N=this.length-1;N>=0;N--){var k=(this.words[N]|0)+O*67108864;this.words[N]=k/E|0,O=k%E}return this._strip(),_?this.ineg():this},s.prototype.divn=function(E){return this.clone().idivn(E)},s.prototype.egcd=function(E){n(E.negative===0),n(!E.isZero());var _=this,O=E.clone();_.negative!==0?_=_.umod(E):_=_.clone();for(var N=new s(1),k=new s(0),$=new s(0),L=new s(1),M=0;_.isEven()&&O.isEven();)_.iushrn(1),O.iushrn(1),++M;for(var A=O.clone(),D=_.clone();!_.isZero();){for(var V=0,R=1;!(_.words[0]&R)&&V<26;++V,R<<=1);if(V>0)for(_.iushrn(V);V-- >0;)(N.isOdd()||k.isOdd())&&(N.iadd(A),k.isub(D)),N.iushrn(1),k.iushrn(1);for(var U=0,W=1;!(O.words[0]&W)&&U<26;++U,W<<=1);if(U>0)for(O.iushrn(U);U-- >0;)($.isOdd()||L.isOdd())&&($.iadd(A),L.isub(D)),$.iushrn(1),L.iushrn(1);_.cmp(O)>=0?(_.isub(O),N.isub($),k.isub(L)):(O.isub(_),$.isub(N),L.isub(k))}return{a:$,b:L,gcd:O.iushln(M)}},s.prototype._invmp=function(E){n(E.negative===0),n(!E.isZero());var _=this,O=E.clone();_.negative!==0?_=_.umod(E):_=_.clone();for(var N=new s(1),k=new s(0),$=O.clone();_.cmpn(1)>0&&O.cmpn(1)>0;){for(var L=0,M=1;!(_.words[0]&M)&&L<26;++L,M<<=1);if(L>0)for(_.iushrn(L);L-- >0;)N.isOdd()&&N.iadd($),N.iushrn(1);for(var A=0,D=1;!(O.words[0]&D)&&A<26;++A,D<<=1);if(A>0)for(O.iushrn(A);A-- >0;)k.isOdd()&&k.iadd($),k.iushrn(1);_.cmp(O)>=0?(_.isub(O),N.isub(k)):(O.isub(_),k.isub(N))}var V;return _.cmpn(1)===0?V=N:V=k,V.cmpn(0)<0&&V.iadd(E),V},s.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var _=this.clone(),O=E.clone();_.negative=0,O.negative=0;for(var N=0;_.isEven()&&O.isEven();N++)_.iushrn(1),O.iushrn(1);do{for(;_.isEven();)_.iushrn(1);for(;O.isEven();)O.iushrn(1);var k=_.cmp(O);if(k<0){var $=_;_=O,O=$}else if(k===0||O.cmpn(1)===0)break;_.isub(O)}while(!0);return O.iushln(N)},s.prototype.invm=function(E){return this.egcd(E).a.umod(E)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(E){return this.words[0]&E},s.prototype.bincn=function(E){n(typeof E=="number");var _=E%26,O=(E-_)/26,N=1<<_;if(this.length<=O)return this._expand(O+1),this.words[O]|=N,this;for(var k=N,$=O;k!==0&&$>>26,L&=67108863,this.words[$]=L}return k!==0&&(this.words[$]=k,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(E){var _=E<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;this._strip();var O;if(this.length>1)O=1;else{_&&(E=-E),n(E<=67108863,"Number is too big");var N=this.words[0]|0;O=N===E?0:NE.length)return 1;if(this.length=0;O--){var N=this.words[O]|0,k=E.words[O]|0;if(N!==k){Nk&&(_=1);break}}return _},s.prototype.gtn=function(E){return this.cmpn(E)===1},s.prototype.gt=function(E){return this.cmp(E)===1},s.prototype.gten=function(E){return this.cmpn(E)>=0},s.prototype.gte=function(E){return this.cmp(E)>=0},s.prototype.ltn=function(E){return this.cmpn(E)===-1},s.prototype.lt=function(E){return this.cmp(E)===-1},s.prototype.lten=function(E){return this.cmpn(E)<=0},s.prototype.lte=function(E){return this.cmp(E)<=0},s.prototype.eqn=function(E){return this.cmpn(E)===0},s.prototype.eq=function(E){return this.cmp(E)===0},s.red=function(E){return new H(E)},s.prototype.toRed=function(E){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(E){return this.red=E,this},s.prototype.forceRed=function(E){return n(!this.red,"Already a number in reduction context"),this._forceRed(E)},s.prototype.redAdd=function(E){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},s.prototype.redIAdd=function(E){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},s.prototype.redSub=function(E){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},s.prototype.redISub=function(E){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},s.prototype.redShl=function(E){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},s.prototype.redMul=function(E){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},s.prototype.redIMul=function(E){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(E){return n(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var P={k256:null,p224:null,p192:null,p25519:null};function T(B,E){this.name=B,this.p=new s(E,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}T.prototype._tmp=function(){var E=new s(null);return E.words=new Array(Math.ceil(this.n/13)),E},T.prototype.ireduce=function(E){var _=E,O;do this.split(_,this.tmp),_=this.imulK(_),_=_.iadd(this.tmp),O=_.bitLength();while(O>this.n);var N=O0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},T.prototype.split=function(E,_){E.iushrn(this.n,0,_)},T.prototype.imulK=function(E){return E.imul(this.k)};function w(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,T),w.prototype.split=function(E,_){for(var O=4194303,N=Math.min(E.length,9),k=0;k>>22,$=L}$>>>=22,E.words[k-10]=$,$===0&&E.length>10?E.length-=10:E.length-=9},w.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var _=0,O=0;O>>=26,E.words[O]=k,_=N}return _!==0&&(E.words[E.length++]=_),E},s._prime=function(E){if(P[E])return P[E];var _;if(E==="k256")_=new w;else if(E==="p224")_=new I;else if(E==="p192")_=new F;else if(E==="p25519")_=new j;else throw new Error("Unknown prime "+E);return P[E]=_,_};function H(B){if(typeof B=="string"){var E=s._prime(B);this.m=E.p,this.prime=E}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}H.prototype._verify1=function(E){n(E.negative===0,"red works only with positives"),n(E.red,"red works only with red numbers")},H.prototype._verify2=function(E,_){n((E.negative|_.negative)===0,"red works only with positives"),n(E.red&&E.red===_.red,"red works only with red numbers")},H.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):(u(E,E.umod(this.m)._forceRed(this)),E)},H.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},H.prototype.add=function(E,_){this._verify2(E,_);var O=E.add(_);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},H.prototype.iadd=function(E,_){this._verify2(E,_);var O=E.iadd(_);return O.cmp(this.m)>=0&&O.isub(this.m),O},H.prototype.sub=function(E,_){this._verify2(E,_);var O=E.sub(_);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},H.prototype.isub=function(E,_){this._verify2(E,_);var O=E.isub(_);return O.cmpn(0)<0&&O.iadd(this.m),O},H.prototype.shl=function(E,_){return this._verify1(E),this.imod(E.ushln(_))},H.prototype.imul=function(E,_){return this._verify2(E,_),this.imod(E.imul(_))},H.prototype.mul=function(E,_){return this._verify2(E,_),this.imod(E.mul(_))},H.prototype.isqr=function(E){return this.imul(E,E.clone())},H.prototype.sqr=function(E){return this.mul(E,E)},H.prototype.sqrt=function(E){if(E.isZero())return E.clone();var _=this.m.andln(3);if(n(_%2===1),_===3){var O=this.m.add(new s(1)).iushrn(2);return this.pow(E,O)}for(var N=this.m.subn(1),k=0;!N.isZero()&&N.andln(1)===0;)k++,N.iushrn(1);n(!N.isZero());var $=new s(1).toRed(this),L=$.redNeg(),M=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);this.pow(A,M).cmp(L)!==0;)A.redIAdd(L);for(var D=this.pow(A,N),V=this.pow(E,N.addn(1).iushrn(1)),R=this.pow(E,N),U=k;R.cmp($)!==0;){for(var W=R,q=0;W.cmp($)!==0;q++)W=W.redSqr();n(q=0;k--){for(var D=_.words[k],V=A-1;V>=0;V--){var R=D>>V&1;if($!==N[0]&&($=this.sqr($)),R===0&&L===0){M=0;continue}L<<=1,L|=R,M++,!(M!==O&&(k!==0||V!==0))&&($=this.mul($,N[L]),M=0,L=0)}A=26}return $},H.prototype.convertTo=function(E){var _=E.umod(this.m);return _===E?_.clone():_},H.prototype.convertFrom=function(E){var _=E.clone();return _.red=null,_},s.mont=function(E){return new G(E)};function G(B){H.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(G,H),G.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},G.prototype.convertFrom=function(E){var _=this.imod(E.mul(this.rinv));return _.red=null,_},G.prototype.imul=function(E,_){if(E.isZero()||_.isZero())return E.words[0]=0,E.length=1,E;var O=E.imul(_),N=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=O.isub(N).iushrn(this.shift),$=k;return k.cmp(this.m)>=0?$=k.isub(this.m):k.cmpn(0)<0&&($=k.iadd(this.m)),$._forceRed(this)},G.prototype.mul=function(E,_){if(E.isZero()||_.isZero())return new s(0)._forceRed(this);var O=E.mul(_),N=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=O.isub(N).iushrn(this.shift),$=k;return k.cmp(this.m)>=0?$=k.isub(this.m):k.cmpn(0)<0&&($=k.iadd(this.m)),$._forceRed(this)},G.prototype.invm=function(E){var _=this.imod(E._invmp(this.m).mul(this.r2));return _._forceRed(this)}})(t,ul)})(q6);var AV=q6.exports;const _e=Gi(AV),_V="logger/5.7.0";let WA=!1,HA=!1;const Sv={debug:1,default:2,info:2,warning:3,error:4,off:5};let qA=Sv.default,qw=null;function PV(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const VA=PV();var mx;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(mx||(mx={}));var ls;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(ls||(ls={}));const GA="0123456789abcdef";let ee=class Tr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Sv[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(qA>Sv[n])&&console.log.apply(console,r)}debug(...e){this._log(Tr.levels.DEBUG,e)}info(...e){this._log(Tr.levels.INFO,e)}warn(...e){this._log(Tr.levels.WARNING,e)}makeError(e,r,n){if(HA)return this.makeError("censored error",r,{});r||(r=Tr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let u="";for(let f=0;f>4],u+=GA[l[f]&15];i.push(c+"=Uint8Array(0x"+u+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case ls.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case ls.CALL_EXCEPTION:case ls.INSUFFICIENT_FUNDS:case ls.MISSING_NEW:case ls.NONCE_EXPIRED:case ls.REPLACEMENT_UNDERPRICED:case ls.TRANSACTION_REPLACED:case ls.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Tr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){VA&&this.throwError("platform missing String.prototype.normalize",Tr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:VA})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Tr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Tr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Tr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Tr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Tr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Tr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return qw||(qw=new Tr(_V)),qw}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Tr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),WA){if(!e)return;this.globalLogger().throwError("error censorship permanent",Tr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}HA=!!e,WA=!!r}static setLogLevel(e){const r=Sv[e.toLowerCase()];if(r==null){Tr.globalLogger().warn("invalid log level - "+e);return}qA=r}static from(e){return new Tr(e)}};ee.errors=ls;ee.levels=mx;const TV="bytes/5.7.0",dr=new ee(TV);function dR(t){return!!t.toHexString}function cf(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return cf(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function zo(t){return Fe(t)&&!(t.length%2)||oa(t)}function KA(t){return typeof t=="number"&&t==t&&t%1===0}function oa(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!KA(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ne(t,e){if(e||(e={}),typeof t=="number"){dr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),cf(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),dR(t)&&(t=t.toHexString()),Fe(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":dr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ine(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),cf(n)}function to(t){let e=ne(t);if(e.length===0)return e;let r=0;for(;re&&dr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),cf(r)}function Fe(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Vw="0123456789abcdef";function te(t,e){if(e||(e={}),typeof t=="number"){dr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Vw[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),dR(t))return t.toHexString();if(Fe(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":dr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(oa(t)){let r="0x";for(let n=0;n>4]+Vw[i&15]}return r}return dr.throwArgumentError("invalid hexlify value","value",t)}function uo(t){if(typeof t!="string")t=te(t);else if(!Fe(t)||t.length%2)return null;return(t.length-2)/2}function br(t,e,r){return typeof t!="string"?t=te(t):(!Fe(t)||t.length%2)&&dr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function On(t){let e="0x";return t.forEach(r=>{e+=te(r).substring(2)}),e}function bs(t){const e=hR(te(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function hR(t){typeof t!="string"&&(t=te(t)),Fe(t)||dr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&dr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Jl(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(zo(t)){let r=ne(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64))):r.length===65?(e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64)),e.v=r[64]):dr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:dr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=te(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=_h(ne(e._vs),32);e._vs=te(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&dr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=te(i);e.s==null?e.s=o:e.s!==o&&dr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?dr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&dr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Fe(e.r)?dr.throwArgumentError("signature missing or invalid r","signature",t):e.r=ft(e.r,32),e.s==null||!Fe(e.s)?dr.throwArgumentError("signature missing or invalid s","signature",t):e.s=ft(e.s,32);const r=ne(e.s);r[0]>=128&&dr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=te(r);e._vs&&(Fe(e._vs)||dr.throwArgumentError("signature invalid _vs","signature",t),e._vs=ft(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&dr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function IV(t){return t=Jl(t),te(zt([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const pR="bignumber/5.7.0";var g0=_e.BN;const xo=new ee(pR),Gw={},QA=9007199254740991;function OV(t){return t!=null&&(J.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Fe(t)||typeof t=="bigint"||oa(t))}let YA=!1;class J{constructor(e,r){e!==Gw&&xo.throwError("cannot call constructor directly; use BigNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return zn(Ge(this).fromTwos(e))}toTwos(e){return zn(Ge(this).toTwos(e))}abs(){return this._hex[0]==="-"?J.from(this._hex.substring(1)):this}add(e){return zn(Ge(this).add(Ge(e)))}sub(e){return zn(Ge(this).sub(Ge(e)))}div(e){return J.from(e).isZero()&&_i("division-by-zero","div"),zn(Ge(this).div(Ge(e)))}mul(e){return zn(Ge(this).mul(Ge(e)))}mod(e){const r=Ge(e);return r.isNeg()&&_i("division-by-zero","mod"),zn(Ge(this).umod(r))}pow(e){const r=Ge(e);return r.isNeg()&&_i("negative-power","pow"),zn(Ge(this).pow(r))}and(e){const r=Ge(e);return(this.isNegative()||r.isNeg())&&_i("unbound-bitwise-result","and"),zn(Ge(this).and(r))}or(e){const r=Ge(e);return(this.isNegative()||r.isNeg())&&_i("unbound-bitwise-result","or"),zn(Ge(this).or(r))}xor(e){const r=Ge(e);return(this.isNegative()||r.isNeg())&&_i("unbound-bitwise-result","xor"),zn(Ge(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&_i("negative-width","mask"),zn(Ge(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&_i("negative-width","shl"),zn(Ge(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&_i("negative-width","shr"),zn(Ge(this).shrn(e))}eq(e){return Ge(this).eq(Ge(e))}lt(e){return Ge(this).lt(Ge(e))}lte(e){return Ge(this).lte(Ge(e))}gt(e){return Ge(this).gt(Ge(e))}gte(e){return Ge(this).gte(Ge(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Ge(this).isZero()}toNumber(){try{return Ge(this).toNumber()}catch{_i("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return xo.throwError("this platform does not support BigInt",ee.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?YA||(YA=!0,xo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?xo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ee.errors.UNEXPECTED_ARGUMENT,{}):xo.throwError("BigNumber.toString does not accept parameters",ee.errors.UNEXPECTED_ARGUMENT,{})),Ge(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof J)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new J(Gw,b0(e)):e.match(/^-?[0-9]+$/)?new J(Gw,b0(new g0(e))):xo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&_i("underflow","BigNumber.from",e),(e>=QA||e<=-QA)&&_i("overflow","BigNumber.from",e),J.from(String(e));const r=e;if(typeof r=="bigint")return J.from(r.toString());if(oa(r))return J.from(te(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return J.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Fe(n)||n[0]==="-"&&Fe(n.substring(1))))return J.from(n)}return xo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function b0(t){if(typeof t!="string")return b0(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&xo.throwArgumentError("invalid hex","value",t),t=b0(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function zn(t){return J.from(b0(t))}function Ge(t){const e=J.from(t).toHexString();return e[0]==="-"?new g0("-"+e.substring(3),16):new g0(e.substring(2),16)}function _i(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),xo.throwError(t,ee.errors.NUMERIC_FAULT,n)}function RV(t){return new g0(t,36).toString(16)}function $V(t){return new g0(t,16).toString(36)}const Rn=new ee(pR),Ph={},vR=J.from(0),mR=J.from(-1);function yR(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Rn.throwError(t,ee.errors.NUMERIC_FAULT,i)}let Th="0";for(;Th.length<256;)Th+=Th;function V6(t){if(typeof t!="number")try{t=J.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Th.substring(0,t):Rn.throwArgumentError("invalid decimal size","decimals",t)}function kv(t,e){e==null&&(e=0);const r=V6(e);t=J.from(t);const n=t.lt(vR);n&&(t=t.mul(mR));let i=t.mod(r).toString();for(;i.length2&&Rn.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&yR("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&Rn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Rn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Rn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new lf(Ph,r,n,i)}}class Qr{constructor(e,r,n,i){e!==Ph&&Rn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Rn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Qr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(JA.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Qr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(JA.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Rn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Qr.from("1"+Th.substring(0,e),this.format),i=MV.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Rn.throwArgumentError("invalid byte width","width",e);const r=J.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ft(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Qr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!OV(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Qr.fromString(kv(e,r),lf.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=lf.from(r),i=Ls(e,n.decimals);!n.signed&&i.lt(vR)&&yR("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=ft(s,n.width/8));const o=kv(i,n.decimals);return new Qr(Ph,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=lf.from(r);if(ne(e).length>n.width/8)throw new Error("overflow");let i=J.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=kv(i,n.decimals);return new Qr(Ph,s,o,n)}static from(e,r){if(typeof e=="string")return Qr.fromString(e,r);if(oa(e))return Qr.fromBytes(e,r);try{return Qr.fromValue(e,0,r)}catch(n){if(n.code!==ee.errors.INVALID_ARGUMENT)throw n}return Rn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const JA=Qr.from(1),MV=Qr.from("0.5"),NV="properties/5.7.0";var DV=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const _m=new ee(NV);function ie(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function ps(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function ht(t){return DV(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function G6(t,e){(!t||typeof t!="object")&&_m.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||_m.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Wt(t){const e={};for(const r in t)e[r]=t[r];return e}const LV={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function gR(t){if(t==null||LV[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rvi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ie(e,r,vi(n))}return e}return _m.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function vi(t){return BV(t)}class x1{constructor(e){for(const r in e)this[r]=vi(e[r])}}const C1="abi/5.7.0",Xe=new ee(C1),$l={};let XA={calldata:!0,memory:!0,storage:!0},FV={calldata:!0,memory:!0};function _p(t,e){if(t==="bytes"||t==="string"){if(XA[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&FV[e])return!0;return(XA[e]||e==="payable")&&Xe.throwArgumentError("invalid modifier","name",e),!1}function jV(t,e){let r=t;function n(a){Xe.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let c={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(c.indexed=!1),c}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==et.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===et.full?", ":",")+")"):r+=this.type,e!==et.sighash&&(this.indexed===!0&&(r+=" indexed"),e===et.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Nr.fromString(e,r):Nr.fromObject(e)}static fromObject(e){return Nr.isParamType(e)?e:new Nr($l,{name:e.name||null,type:Au(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Nr.fromObject):null})}static fromString(e,r){function n(i){return Nr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(jV(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function w0(t,e){return WV(t).map(r=>Nr.fromString(r,e))}class Ys{constructor(e,r){e!==$l&&Xe.throwError("use a static from method",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Av(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Ys.isFragment(e)?e:typeof e=="string"?Ys.fromString(e):Ys.fromObject(e)}static fromObject(e){if(Ys.isFragment(e))return e;switch(e.type){case"function":return hs.fromObject(e);case"event":return Gs.fromObject(e);case"constructor":return ds.fromObject(e);case"error":return To.fromObject(e);case"fallback":case"receive":return null}return Xe.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Gs.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?hs.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?ds.fromString(e.trim()):e.split(" ")[0]==="error"?To.fromString(e.substring(5).trim()):Xe.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Gs extends Ys{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==et.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ",e!==et.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Gs.fromString(e):Gs.fromObject(e)}static fromObject(e){if(Gs.isEventFragment(e))return e;e.type!=="event"&&Xe.throwArgumentError("invalid event object","value",e);const r={name:E0(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Nr.fromObject):[],type:"event"};return new Gs($l,r)}static fromString(e){let r=e.match(x0);r||Xe.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Xe.warn("unknown modifier: "+i)}}),Gs.fromObject({name:r[1].trim(),anonymous:n,inputs:w0(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function bR(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Xe.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Xe.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=J.from(r[1]),r[0]):t}function wR(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function ER(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Xe.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Xe.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Xe.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Xe.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Xe.throwArgumentError("unable to determine stateMutability","value",t),e}class ds extends Ys{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===et.sighash&&Xe.throwError("cannot format a constructor for sighash",ee.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?ds.fromString(e):ds.fromObject(e)}static fromObject(e){if(ds.isConstructorFragment(e))return e;e.type!=="constructor"&&Xe.throwArgumentError("invalid constructor object","value",e);let r=ER(e);r.constant&&Xe.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Nr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?J.from(e.gas):null};return new ds($l,n)}static fromString(e){let r={type:"constructor"};e=bR(e,r);let n=e.match(x0);return(!n||n[1].trim()!=="constructor")&&Xe.throwArgumentError("invalid constructor string","value",e),r.inputs=w0(n[2].trim(),!1),wR(n[3].trim(),r),ds.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class hs extends ds{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==et.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ",e!==et.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?hs.fromString(e):hs.fromObject(e)}static fromObject(e){if(hs.isFunctionFragment(e))return e;e.type!=="function"&&Xe.throwArgumentError("invalid function object","value",e);let r=ER(e);const n={type:e.type,name:E0(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Nr.fromObject):[],outputs:e.outputs?e.outputs.map(Nr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?J.from(e.gas):null};return new hs($l,n)}static fromString(e){let r={type:"function"};e=bR(e,r);let n=e.split(" returns ");n.length>2&&Xe.throwArgumentError("invalid function string","value",e);let i=n[0].match(x0);if(i||Xe.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&E0(r.name),r.inputs=w0(i[2],!1),wR(i[3].trim(),r),n.length>1){let s=n[1].match(x0);(s[1].trim()!=""||s[3].trim()!="")&&Xe.throwArgumentError("unexpected tokens","value",e),r.outputs=w0(s[2],!1)}else r.outputs=[];return hs.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function ZA(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Xe.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class To extends Ys{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==et.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?To.fromString(e):To.fromObject(e)}static fromObject(e){if(To.isErrorFragment(e))return e;e.type!=="error"&&Xe.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:E0(e.name),inputs:e.inputs?e.inputs.map(Nr.fromObject):[]};return ZA(new To($l,r))}static fromString(e){let r={type:"error"},n=e.match(x0);return n||Xe.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&E0(r.name),r.inputs=w0(n[2],!1),ZA(To.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Au(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const zV=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function E0(t){return(!t||!t.match(zV))&&Xe.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const x0=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function WV(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&K6.throwError("value out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=zt([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class Pm{constructor(e,r,n,i){ie(this,"_data",ne(e)),ie(this,"wordSize",r||32),ie(this,"_coerceFunc",n),ie(this,"allowLoose",i),this._offset=0}get data(){return te(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):Pm.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:K6.throwError("data out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Pm(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return J.from(this.readBytes(this.wordSize))}}var CR={exports:{}};/** +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function Uw(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function rx(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var rV=typeof WeakMap=="function"?WeakMap:Map;function jO(t,e,r){r=No(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Cm||(Cm=!0,dx=n),rx(t,e)},r}function UO(t,e,r){r=No(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){rx(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){rx(t,e),typeof n!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function S4(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new rV;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=mV.bind(null,t,e,r),e.then(t,t))}function k4(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function A4(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=No(-1,1),e.tag=2,Ya(r,e,1))),r.lanes|=1),t)}var nV=sa.ReactCurrentOwner,Kn=!1;function In(t,e,r,n){e.child=t===null?bO(e,null,r,n):kf(e,t.child,r,n)}function _4(t,e,r,n,i){r=r.render;var s=e.ref;return of(e,i),n=P6(t,e,r,n,s,i),r=T6(),t!==null&&!Kn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Uo(t,e,i)):(Zt&&r&&m6(e),e.flags|=1,In(t,e,n,i),e.child)}function P4(t,e,r,n,i){if(t===null){var s=r.type;return typeof s=="function"&&!B6(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=s,zO(t,e,s,n,i)):(t=Cv(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:c0,r(o,n)&&t.ref===e.ref)return Uo(t,e,i)}return e.flags|=1,t=Za(s,n),t.ref=e.ref,t.return=e,e.child=t}function zO(t,e,r,n,i){if(t!==null){var s=t.memoizedProps;if(c0(s,n)&&t.ref===e.ref)if(Kn=!1,e.pendingProps=n=s,(t.lanes&i)!==0)t.flags&131072&&(Kn=!0);else return e.lanes=t.lanes,Uo(t,e,i)}return nx(t,e,r,n,i)}function WO(t,e,r){var n=e.pendingProps,i=n.children,s=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(Hu,ai),ai|=r;else{if(!(r&1073741824))return t=s!==null?s.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,yt(Hu,ai),ai|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,yt(Hu,ai),ai|=n}else s!==null?(n=s.baseLanes|r,e.memoizedState=null):n=r,yt(Hu,ai),ai|=n;return In(t,e,i,r),e.child}function HO(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function nx(t,e,r,n,i){var s=Xn(r)?Pl:xn.current;return s=Cf(e,s),of(e,i),r=P6(t,e,r,n,s,i),n=T6(),t!==null&&!Kn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Uo(t,e,i)):(Zt&&n&&m6(e),e.flags|=1,In(t,e,r,i),e.child)}function T4(t,e,r,n,i){if(Xn(r)){var s=!0;hm(e)}else s=!1;if(of(e,i),e.stateNode===null)wv(t,e),yO(e,r,n),tx(e,r,n,i),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,l=r.contextType;typeof l=="object"&&l!==null?l=Bi(l):(l=Xn(r)?Pl:xn.current,l=Cf(e,l));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||c!==l)&&w4(e,o,n,l),Ta=!1;var d=e.memoizedState;o.state=d,gm(e,n,o,i),c=e.memoizedState,a!==n||d!==c||Jn.current||Ta?(typeof u=="function"&&(ex(e,r,u,n),c=e.memoizedState),(a=Ta||b4(e,r,a,n,d,c,l))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=c),o.props=n,o.state=c,o.context=l,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,vO(t,e),a=e.memoizedProps,l=e.type===e.elementType?a:as(e.type,a),o.props=l,f=e.pendingProps,d=o.context,c=r.contextType,typeof c=="object"&&c!==null?c=Bi(c):(c=Xn(r)?Pl:xn.current,c=Cf(e,c));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==c)&&w4(e,o,n,c),Ta=!1,d=e.memoizedState,o.state=d,gm(e,n,o,i);var p=e.memoizedState;a!==f||d!==p||Jn.current||Ta?(typeof h=="function"&&(ex(e,r,h,n),p=e.memoizedState),(l=Ta||b4(e,r,l,n,d,p,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,p,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,p,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),o.props=n,o.state=p,o.context=c,n=l):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),n=!1)}return ix(t,e,r,n,s,i)}function ix(t,e,r,n,i,s){HO(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return i&&p4(e,r,!1),Uo(t,e,s);n=e.stateNode,nV.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=kf(e,t.child,null,s),e.child=kf(e,null,a,s)):In(t,e,a,s),e.memoizedState=n.state,i&&p4(e,r,!0),e.child}function qO(t){var e=t.stateNode;e.pendingContext?h4(t,e.pendingContext,e.pendingContext!==e.context):e.context&&h4(t,e.context,!1),S6(t,e.containerInfo)}function I4(t,e,r,n,i){return Sf(),g6(i),e.flags|=256,In(t,e,r,n),e.child}var sx={dehydrated:null,treeContext:null,retryLane:0};function ox(t){return{baseLanes:t,cachePool:null,transitions:null}}function VO(t,e,r){var n=e.pendingProps,i=sr.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),yt(sr,i&1),t===null)return XE(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=dg(o,n,0,null),t=bl(t,n,r,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=ox(r),e.memoizedState=sx,t):R6(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return iV(t,e,o,n,a,i,r);if(s){s=n.fallback,o=e.mode,i=t.child,a=i.sibling;var c={mode:"hidden",children:n.children};return!(o&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=Za(i,c),n.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Za(a,s):(s=bl(s,o,r,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=t.child.memoizedState,o=o===null?ox(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~r,e.memoizedState=sx,n}return s=t.child,t=s.sibling,n=Za(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function R6(t,e){return e=dg({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Cp(t,e,r,n){return n!==null&&g6(n),kf(e,t.child,null,r),t=R6(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function iV(t,e,r,n,i,s,o){if(r)return e.flags&256?(e.flags&=-257,n=Uw(Error(oe(422))),Cp(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=n.fallback,i=e.mode,n=dg({mode:"visible",children:n.children},i,0,null),s=bl(s,i,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&kf(e,t.child,null,o),e.child.memoizedState=ox(o),e.memoizedState=sx,s);if(!(e.mode&1))return Cp(t,e,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(oe(419)),n=Uw(s,n,void 0),Cp(t,e,o,n)}if(a=(o&t.childLanes)!==0,Kn||a){if(n=Gr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,jo(t,i),ys(n,t,i,-1))}return F6(),n=Uw(Error(oe(421))),Cp(t,e,o,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=yV.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,hi=Qa(i.nextSibling),pi=e,Zt=!0,us=null,t!==null&&(Ri[$i++]=Oo,Ri[$i++]=Ro,Ri[$i++]=Tl,Oo=t.id,Ro=t.overflow,Tl=e),e=R6(e,n.children),e.flags|=4096,e)}function O4(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),ZE(t.return,e,r)}function zw(t,e,r,n,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=i)}function GO(t,e,r){var n=e.pendingProps,i=n.revealOrder,s=n.tail;if(In(t,e,n.children,r),n=sr.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&O4(t,r,e);else if(t.tag===19)O4(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(yt(sr,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&bm(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),zw(e,!1,i,r,s);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&bm(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}zw(e,!0,r,null,s);break;case"together":zw(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function wv(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Uo(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Ol|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(oe(153));if(e.child!==null){for(t=e.child,r=Za(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Za(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function sV(t,e,r){switch(e.tag){case 3:qO(e),Sf();break;case 5:wO(e);break;case 1:Xn(e.type)&&hm(e);break;case 4:S6(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;yt(mm,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(yt(sr,sr.current&1),e.flags|=128,null):r&e.child.childLanes?VO(t,e,r):(yt(sr,sr.current&1),t=Uo(t,e,r),t!==null?t.sibling:null);yt(sr,sr.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return GO(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),yt(sr,sr.current),n)break;return null;case 22:case 23:return e.lanes=0,WO(t,e,r)}return Uo(t,e,r)}var KO,ax,QO,YO;KO=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ax=function(){};QO=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,hl(eo.current);var s=null;switch(r){case"input":i=TE(t,i),n=TE(t,n),s=[];break;case"select":i=ur({},i,{value:void 0}),n=ur({},n,{value:void 0}),s=[];break;case"textarea":i=RE(t,i),n=RE(t,n),s=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=fm)}ME(r,n);var o;r=null;for(l in i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var a=i[l];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(t0.hasOwnProperty(l)?s||(s=[]):(s=s||[]).push(l,null));for(l in n){var c=n[l];if(a=i!=null?i[l]:void 0,n.hasOwnProperty(l)&&c!==a&&(c!=null||a!=null))if(l==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(r||(r={}),r[o]=c[o])}else r||(s||(s=[]),s.push(l,r)),r=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(t0.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&Bt("scroll",t),s||a===c||(s=[])):(s=s||[]).push(l,c))}r&&(s=s||[]).push("style",r);var l=s;(e.updateQueue=l)&&(e.flags|=4)}};YO=function(t,e,r,n){r!==n&&(e.flags|=4)};function jd(t,e){if(!Zt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function un(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function oV(t,e,r){var n=e.pendingProps;switch(y6(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return un(e),null;case 1:return Xn(e.type)&&dm(),un(e),null;case 3:return n=e.stateNode,Af(),zt(Jn),zt(xn),A6(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ep(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,us!==null&&(vx(us),us=null))),ax(t,e),un(e),null;case 5:k6(e);var i=hl(h0.current);if(r=e.type,t!==null&&e.stateNode!=null)QO(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(oe(166));return un(e),null}if(t=hl(eo.current),Ep(e)){n=e.stateNode,r=e.type;var s=e.memoizedProps;switch(n[Vs]=e,n[f0]=s,t=(e.mode&1)!==0,r){case"dialog":Bt("cancel",n),Bt("close",n);break;case"iframe":case"object":case"embed":Bt("load",n);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[Vs]=e,t[f0]=n,KO(t,e,!1,!1),e.stateNode=t;e:{switch(o=NE(r,n),r){case"dialog":Bt("cancel",t),Bt("close",t),i=n;break;case"iframe":case"object":case"embed":Bt("load",t),i=n;break;case"video":case"audio":for(i=0;iPf&&(e.flags|=128,n=!0,jd(s,!1),e.lanes=4194304)}else{if(!n)if(t=bm(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),jd(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Zt)return un(e),null}else 2*wr()-s.renderingStartTime>Pf&&r!==1073741824&&(e.flags|=128,n=!0,jd(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(r=s.last,r!==null?r.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=wr(),e.sibling=null,r=sr.current,yt(sr,n?r&1|2:r&1),e):(un(e),null);case 22:case 23:return L6(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ai&1073741824&&(un(e),e.subtreeFlags&6&&(e.flags|=8192)):un(e),null;case 24:return null;case 25:return null}throw Error(oe(156,e.tag))}function aV(t,e){switch(y6(e),e.tag){case 1:return Xn(e.type)&&dm(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Af(),zt(Jn),zt(xn),A6(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return k6(e),null;case 13:if(zt(sr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(oe(340));Sf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return zt(sr),null;case 4:return Af(),null;case 10:return E6(e.type._context),null;case 22:case 23:return L6(),null;case 24:return null;default:return null}}var Sp=!1,pn=!1,cV=typeof WeakSet=="function"?WeakSet:Set,fe=null;function Wu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){hr(t,e,n)}else r.current=null}function cx(t,e,r){try{r()}catch(n){hr(t,e,n)}}var R4=!1;function lV(t,e){if(qE=cm,t=eO(),v6(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,c=-1,l=0,u=0,f=t,d=null;t:for(;;){for(var h;f!==r||i!==0&&f.nodeType!==3||(a=o+i),f!==s||n!==0&&f.nodeType!==3||(c=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===r&&++l===i&&(a=o),d===s&&++u===n&&(c=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(VE={focusedElem:t,selectionRange:r},cm=!1,fe=e;fe!==null;)if(e=fe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,fe=t;else for(;fe!==null;){e=fe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,b=p.memoizedState,y=e.stateNode,m=y.getSnapshotBeforeUpdate(e.elementType===e.type?v:as(e.type,v),b);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var g=e.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(S){hr(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,fe=t;break}fe=e.return}return p=R4,R4=!1,p}function Sh(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&cx(e,r,s)}i=i.next}while(i!==n)}}function ug(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function lx(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function JO(t){var e=t.alternate;e!==null&&(t.alternate=null,JO(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Vs],delete e[f0],delete e[QE],delete e[qq],delete e[Vq])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function XO(t){return t.tag===5||t.tag===3||t.tag===4}function $4(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||XO(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ux(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=fm));else if(n!==4&&(t=t.child,t!==null))for(ux(t,e,r),t=t.sibling;t!==null;)ux(t,e,r),t=t.sibling}function fx(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(fx(t,e,r),t=t.sibling;t!==null;)fx(t,e,r),t=t.sibling}var Yr=null,ls=!1;function wa(t,e,r){for(r=r.child;r!==null;)ZO(t,e,r),r=r.sibling}function ZO(t,e,r){if(Zs&&typeof Zs.onCommitFiberUnmount=="function")try{Zs.onCommitFiberUnmount(rg,r)}catch{}switch(r.tag){case 5:pn||Wu(r,e);case 6:var n=Yr,i=ls;Yr=null,wa(t,e,r),Yr=n,ls=i,Yr!==null&&(ls?(t=Yr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Yr.removeChild(r.stateNode));break;case 18:Yr!==null&&(ls?(t=Yr,r=r.stateNode,t.nodeType===8?Nw(t.parentNode,r):t.nodeType===1&&Nw(t,r),o0(t)):Nw(Yr,r.stateNode));break;case 4:n=Yr,i=ls,Yr=r.stateNode.containerInfo,ls=!0,wa(t,e,r),Yr=n,ls=i;break;case 0:case 11:case 14:case 15:if(!pn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&cx(r,e,o),i=i.next}while(i!==n)}wa(t,e,r);break;case 1:if(!pn&&(Wu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){hr(r,e,a)}wa(t,e,r);break;case 21:wa(t,e,r);break;case 22:r.mode&1?(pn=(n=pn)||r.memoizedState!==null,wa(t,e,r),pn=n):wa(t,e,r);break;default:wa(t,e,r)}}function M4(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new cV),e.forEach(function(n){var i=gV.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Xi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ni&&(i=o),n&=~s}if(n=i,n=wr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*fV(n/1960))-n,10t?16:t,Ba===null)var n=!1;else{if(t=Ba,Ba=null,Sm=0,rt&6)throw Error(oe(331));var i=rt;for(rt|=4,fe=t.current;fe!==null;){var s=fe,o=s.child;if(fe.flags&16){var a=s.deletions;if(a!==null){for(var c=0;cwr()-N6?gl(t,0):M6|=r),Zn(t,e)}function aR(t,e){e===0&&(t.mode&1?(e=vp,vp<<=1,!(vp&130023424)&&(vp=4194304)):e=1);var r=Mn();t=jo(t,e),t!==null&&(g1(t,e,r),Zn(t,r))}function yV(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),aR(t,r)}function gV(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(oe(314))}n!==null&&n.delete(e),aR(t,r)}var cR;cR=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Jn.current)Kn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Kn=!1,sV(t,e,r);Kn=!!(t.flags&131072)}else Kn=!1,Zt&&e.flags&1048576&&fO(e,vm,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;wv(t,e),t=e.pendingProps;var i=Cf(e,xn.current);of(e,r),i=P6(null,e,n,t,i,r);var s=T6();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Xn(n)?(s=!0,hm(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,C6(e),i.updater=cg,e.stateNode=i,i._reactInternals=e,tx(e,n,t,r),e=ix(null,e,n,!0,s,r)):(e.tag=0,Zt&&s&&m6(e),In(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(wv(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=wV(n),t=as(n,t),i){case 0:e=nx(null,e,n,t,r);break e;case 1:e=T4(null,e,n,t,r);break e;case 11:e=_4(null,e,n,t,r);break e;case 14:e=P4(null,e,n,as(n.type,t),r);break e}throw Error(oe(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:as(n,i),nx(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:as(n,i),T4(t,e,n,i,r);case 3:e:{if(qO(e),t===null)throw Error(oe(387));n=e.pendingProps,s=e.memoizedState,i=s.element,vO(t,e),gm(e,n,null,r);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=_f(Error(oe(423)),e),e=I4(t,e,n,r,i);break e}else if(n!==i){i=_f(Error(oe(424)),e),e=I4(t,e,n,r,i);break e}else for(hi=Qa(e.stateNode.containerInfo.firstChild),pi=e,Zt=!0,us=null,r=bO(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Sf(),n===i){e=Uo(t,e,r);break e}In(t,e,n,r)}e=e.child}return e;case 5:return wO(e),t===null&&XE(e),n=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,GE(n,i)?o=null:s!==null&&GE(n,s)&&(e.flags|=32),HO(t,e),In(t,e,o,r),e.child;case 6:return t===null&&XE(e),null;case 13:return VO(t,e,r);case 4:return S6(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=kf(e,null,n,r):In(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:as(n,i),_4(t,e,n,i,r);case 7:return In(t,e,e.pendingProps,r),e.child;case 8:return In(t,e,e.pendingProps.children,r),e.child;case 12:return In(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,yt(mm,n._currentValue),n._currentValue=o,s!==null)if(Es(s.value,o)){if(s.children===i.children&&!Jn.current){e=Uo(t,e,r);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===n){if(s.tag===1){c=No(-1,r&-r),c.tag=2;var l=s.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),ZE(s.return,r,e),a.lanes|=r;break}c=c.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(oe(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),ZE(o,r,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}In(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,of(e,r),i=Bi(i),n=n(i),e.flags|=1,In(t,e,n,r),e.child;case 14:return n=e.type,i=as(n,e.pendingProps),i=as(n.type,i),P4(t,e,n,i,r);case 15:return zO(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:as(n,i),wv(t,e),e.tag=1,Xn(n)?(t=!0,hm(e)):t=!1,of(e,r),yO(e,n,i),tx(e,n,i,r),ix(null,e,n,!0,t,r);case 19:return GO(t,e,r);case 22:return WO(t,e,r)}throw Error(oe(156,e.tag))};function lR(t,e){return N7(t,e)}function bV(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(t,e,r,n){return new bV(t,e,r,n)}function B6(t){return t=t.prototype,!(!t||!t.isReactComponent)}function wV(t){if(typeof t=="function")return B6(t)?1:0;if(t!=null){if(t=t.$$typeof,t===i6)return 11;if(t===s6)return 14}return 2}function Za(t,e){var r=t.alternate;return r===null?(r=Ni(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Cv(t,e,r,n,i,s){var o=2;if(n=t,typeof t=="function")B6(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Mu:return bl(r.children,i,s,e);case n6:o=8,i|=8;break;case kE:return t=Ni(12,r,e,i|2),t.elementType=kE,t.lanes=s,t;case AE:return t=Ni(13,r,e,i),t.elementType=AE,t.lanes=s,t;case _E:return t=Ni(19,r,e,i),t.elementType=_E,t.lanes=s,t;case g7:return dg(r,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case m7:o=10;break e;case y7:o=9;break e;case i6:o=11;break e;case s6:o=14;break e;case Pa:o=16,n=null;break e}throw Error(oe(130,t==null?t:typeof t,""))}return e=Ni(o,r,e,i),e.elementType=t,e.type=n,e.lanes=s,e}function bl(t,e,r,n){return t=Ni(7,t,n,e),t.lanes=r,t}function dg(t,e,r,n){return t=Ni(22,t,n,e),t.elementType=g7,t.lanes=r,t.stateNode={isHidden:!1},t}function Ww(t,e,r){return t=Ni(6,t,null,e),t.lanes=r,t}function Hw(t,e,r){return e=Ni(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function EV(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sw(0),this.expirationTimes=Sw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sw(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function j6(t,e,r,n,i,s,o,a,c){return t=new EV(t,e,r,a,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ni(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},C6(s),t}function xV(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hR)}catch(t){console.error(t)}}hR(),f7.exports=Ei;var _s=f7.exports;const _V=As(_s);var z4=_s;CE.createRoot=z4.createRoot,CE.hydrateRoot=z4.hydrateRoot;var H6={exports:{}};const PV={},TV=Object.freeze(Object.defineProperty({__proto__:null,default:PV},Symbol.toStringTag,{value:"Module"})),pR=ZI(TV);H6.exports;(function(t){(function(e,r){function n(F,E){if(!F)throw new Error(E||"Assertion failed")}function i(F,E){F.super_=E;var _=function(){};_.prototype=E.prototype,F.prototype=new _,F.prototype.constructor=F}function s(F,E,_){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((E==="le"||E==="be")&&(_=E,E=10),this._init(F||0,E||10,_||"be"))}typeof e=="object"?e.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=pR.Buffer}catch{}s.isBN=function(E){return E instanceof s?!0:E!==null&&typeof E=="object"&&E.constructor.wordSize===s.wordSize&&Array.isArray(E.words)},s.max=function(E,_){return E.cmp(_)>0?E:_},s.min=function(E,_){return E.cmp(_)<0?E:_},s.prototype._init=function(E,_,O){if(typeof E=="number")return this._initNumber(E,_,O);if(typeof E=="object")return this._initArray(E,_,O);_==="hex"&&(_=16),n(_===(_|0)&&_>=2&&_<=36),E=E.toString().replace(/\s+/g,"");var N=0;E[0]==="-"&&(N++,this.negative=1),N=0;N-=3)$=E[N]|E[N-1]<<8|E[N-2]<<16,this.words[k]|=$<>>26-L&67108863,L+=24,L>=26&&(L-=26,k++);else if(O==="le")for(N=0,k=0;N>>26-L&67108863,L+=24,L>=26&&(L-=26,k++);return this._strip()};function a(F,E){var _=F.charCodeAt(E);if(_>=48&&_<=57)return _-48;if(_>=65&&_<=70)return _-55;if(_>=97&&_<=102)return _-87;n(!1,"Invalid character in "+F)}function c(F,E,_){var O=a(F,_);return _-1>=E&&(O|=a(F,_-1)<<4),O}s.prototype._parseHex=function(E,_,O){this.length=Math.ceil((E.length-_)/6),this.words=new Array(this.length);for(var N=0;N=_;N-=2)L=c(E,_,N)<=18?(k-=18,$+=1,this.words[$]|=L>>>26):k+=8;else{var M=E.length-_;for(N=M%2===0?_+1:_;N=18?(k-=18,$+=1,this.words[$]|=L>>>26):k+=8}this._strip()};function l(F,E,_,O){for(var N=0,k=0,$=Math.min(F.length,_),L=E;L<$;L++){var M=F.charCodeAt(L)-48;N*=O,M>=49?k=M-49+10:M>=17?k=M-17+10:k=M,n(M>=0&&k1&&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")]=f}catch{s.prototype.inspect=f}else s.prototype.inspect=f;function f(){return(this.red?""}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"],h=[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],p=[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(E,_){E=E||10,_=_|0||1;var O;if(E===16||E==="hex"){O="";for(var N=0,k=0,$=0;$>>24-N&16777215,N+=2,N>=26&&(N-=26,$--),k!==0||$!==this.length-1?O=d[6-M.length]+M+O:O=M+O}for(k!==0&&(O=k.toString(16)+O);O.length%_!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(E===(E|0)&&E>=2&&E<=36){var A=h[E],D=p[E];O="";var V=this.clone();for(V.negative=0;!V.isZero();){var R=V.modrn(D).toString(E);V=V.idivn(D),V.isZero()?O=R+O:O=d[A-R.length]+R+O}for(this.isZero()&&(O="0"+O);O.length%_!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var E=this.words[0];return this.length===2?E+=this.words[1]*67108864:this.length===3&&this.words[2]===1?E+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-E:E},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(E,_){return this.toArrayLike(o,E,_)}),s.prototype.toArray=function(E,_){return this.toArrayLike(Array,E,_)};var v=function(E,_){return E.allocUnsafe?E.allocUnsafe(_):new E(_)};s.prototype.toArrayLike=function(E,_,O){this._strip();var N=this.byteLength(),k=O||Math.max(1,N);n(N<=k,"byte array longer than desired length"),n(k>0,"Requested array length <= 0");var $=v(E,k),L=_==="le"?"LE":"BE";return this["_toArrayLike"+L]($,N),$},s.prototype._toArrayLikeLE=function(E,_){for(var O=0,N=0,k=0,$=0;k>8&255),O>16&255),$===6?(O>24&255),N=0,$=0):(N=L>>>24,$+=2)}if(O=0&&(E[O--]=L>>8&255),O>=0&&(E[O--]=L>>16&255),$===6?(O>=0&&(E[O--]=L>>24&255),N=0,$=0):(N=L>>>24,$+=2)}if(O>=0)for(E[O--]=N;O>=0;)E[O--]=0},Math.clz32?s.prototype._countBits=function(E){return 32-Math.clz32(E)}:s.prototype._countBits=function(E){var _=E,O=0;return _>=4096&&(O+=13,_>>>=13),_>=64&&(O+=7,_>>>=7),_>=8&&(O+=4,_>>>=4),_>=2&&(O+=2,_>>>=2),O+_},s.prototype._zeroBits=function(E){if(E===0)return 26;var _=E,O=0;return _&8191||(O+=13,_>>>=13),_&127||(O+=7,_>>>=7),_&15||(O+=4,_>>>=4),_&3||(O+=2,_>>>=2),_&1||O++,O},s.prototype.bitLength=function(){var E=this.words[this.length-1],_=this._countBits(E);return(this.length-1)*26+_};function b(F){for(var E=new Array(F.bitLength()),_=0;_>>N&1}return E}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var E=0,_=0;_E.length?this.clone().ior(E):E.clone().ior(this)},s.prototype.uor=function(E){return this.length>E.length?this.clone().iuor(E):E.clone().iuor(this)},s.prototype.iuand=function(E){var _;this.length>E.length?_=E:_=this;for(var O=0;O<_.length;O++)this.words[O]=this.words[O]&E.words[O];return this.length=_.length,this._strip()},s.prototype.iand=function(E){return n((this.negative|E.negative)===0),this.iuand(E)},s.prototype.and=function(E){return this.length>E.length?this.clone().iand(E):E.clone().iand(this)},s.prototype.uand=function(E){return this.length>E.length?this.clone().iuand(E):E.clone().iuand(this)},s.prototype.iuxor=function(E){var _,O;this.length>E.length?(_=this,O=E):(_=E,O=this);for(var N=0;NE.length?this.clone().ixor(E):E.clone().ixor(this)},s.prototype.uxor=function(E){return this.length>E.length?this.clone().iuxor(E):E.clone().iuxor(this)},s.prototype.inotn=function(E){n(typeof E=="number"&&E>=0);var _=Math.ceil(E/26)|0,O=E%26;this._expand(_),O>0&&_--;for(var N=0;N<_;N++)this.words[N]=~this.words[N]&67108863;return O>0&&(this.words[N]=~this.words[N]&67108863>>26-O),this._strip()},s.prototype.notn=function(E){return this.clone().inotn(E)},s.prototype.setn=function(E,_){n(typeof E=="number"&&E>=0);var O=E/26|0,N=E%26;return this._expand(O+1),_?this.words[O]=this.words[O]|1<E.length?(O=this,N=E):(O=E,N=this);for(var k=0,$=0;$>>26;for(;k!==0&&$>>26;if(this.length=O.length,k!==0)this.words[this.length]=k,this.length++;else if(O!==this)for(;$E.length?this.clone().iadd(E):E.clone().iadd(this)},s.prototype.isub=function(E){if(E.negative!==0){E.negative=0;var _=this.iadd(E);return E.negative=1,_._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(E),this.negative=1,this._normSign();var O=this.cmp(E);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var N,k;O>0?(N=this,k=E):(N=E,k=this);for(var $=0,L=0;L>26,this.words[L]=_&67108863;for(;$!==0&&L>26,this.words[L]=_&67108863;if($===0&&L>>26,V=M&67108863,R=Math.min(A,E.length-1),U=Math.max(0,A-F.length+1);U<=R;U++){var W=A-U|0;N=F.words[W]|0,k=E.words[U]|0,$=N*k+V,D+=$/67108864|0,V=$&67108863}_.words[A]=V|0,M=D|0}return M!==0?_.words[A]=M|0:_.length--,_._strip()}var m=function(E,_,O){var N=E.words,k=_.words,$=O.words,L=0,M,A,D,V=N[0]|0,R=V&8191,U=V>>>13,W=N[1]|0,q=W&8191,Y=W>>>13,X=N[2]|0,Q=X&8191,Z=X>>>13,ae=N[3]|0,se=ae&8191,ue=ae>>>13,ot=N[4]|0,Pe=ot&8191,Ae=ot>>>13,at=N[5]|0,xe=at&8191,be=at>>>13,Vt=N[6]|0,Te=Vt&8191,Ie=Vt>>>13,Gt=N[7]|0,Oe=Gt&8191,Re=Gt>>>13,Kt=N[8]|0,$e=Kt&8191,Me=Kt>>>13,Qt=N[9]|0,Ne=Qt&8191,De=Qt>>>13,Yt=k[0]|0,Le=Yt&8191,wt=Yt>>>13,jc=k[1]|0,Et=jc&8191,xt=jc>>>13,Uc=k[2]|0,Ct=Uc&8191,St=Uc>>>13,zc=k[3]|0,kt=zc&8191,At=zc>>>13,Wc=k[4]|0,_t=Wc&8191,Pt=Wc>>>13,Hc=k[5]|0,Tt=Hc&8191,It=Hc>>>13,qc=k[6]|0,Ot=qc&8191,Rt=qc>>>13,Vc=k[7]|0,$t=Vc&8191,Mt=Vc>>>13,Gc=k[8]|0,Nt=Gc&8191,Dt=Gc>>>13,Kc=k[9]|0,Lt=Kc&8191,Ft=Kc>>>13;O.negative=E.negative^_.negative,O.length=19,M=Math.imul(R,Le),A=Math.imul(R,wt),A=A+Math.imul(U,Le)|0,D=Math.imul(U,wt);var va=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(va>>>26)|0,va&=67108863,M=Math.imul(q,Le),A=Math.imul(q,wt),A=A+Math.imul(Y,Le)|0,D=Math.imul(Y,wt),M=M+Math.imul(R,Et)|0,A=A+Math.imul(R,xt)|0,A=A+Math.imul(U,Et)|0,D=D+Math.imul(U,xt)|0;var ma=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ma>>>26)|0,ma&=67108863,M=Math.imul(Q,Le),A=Math.imul(Q,wt),A=A+Math.imul(Z,Le)|0,D=Math.imul(Z,wt),M=M+Math.imul(q,Et)|0,A=A+Math.imul(q,xt)|0,A=A+Math.imul(Y,Et)|0,D=D+Math.imul(Y,xt)|0,M=M+Math.imul(R,Ct)|0,A=A+Math.imul(R,St)|0,A=A+Math.imul(U,Ct)|0,D=D+Math.imul(U,St)|0;var ya=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ya>>>26)|0,ya&=67108863,M=Math.imul(se,Le),A=Math.imul(se,wt),A=A+Math.imul(ue,Le)|0,D=Math.imul(ue,wt),M=M+Math.imul(Q,Et)|0,A=A+Math.imul(Q,xt)|0,A=A+Math.imul(Z,Et)|0,D=D+Math.imul(Z,xt)|0,M=M+Math.imul(q,Ct)|0,A=A+Math.imul(q,St)|0,A=A+Math.imul(Y,Ct)|0,D=D+Math.imul(Y,St)|0,M=M+Math.imul(R,kt)|0,A=A+Math.imul(R,At)|0,A=A+Math.imul(U,kt)|0,D=D+Math.imul(U,At)|0;var ga=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ga>>>26)|0,ga&=67108863,M=Math.imul(Pe,Le),A=Math.imul(Pe,wt),A=A+Math.imul(Ae,Le)|0,D=Math.imul(Ae,wt),M=M+Math.imul(se,Et)|0,A=A+Math.imul(se,xt)|0,A=A+Math.imul(ue,Et)|0,D=D+Math.imul(ue,xt)|0,M=M+Math.imul(Q,Ct)|0,A=A+Math.imul(Q,St)|0,A=A+Math.imul(Z,Ct)|0,D=D+Math.imul(Z,St)|0,M=M+Math.imul(q,kt)|0,A=A+Math.imul(q,At)|0,A=A+Math.imul(Y,kt)|0,D=D+Math.imul(Y,At)|0,M=M+Math.imul(R,_t)|0,A=A+Math.imul(R,Pt)|0,A=A+Math.imul(U,_t)|0,D=D+Math.imul(U,Pt)|0;var ba=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ba>>>26)|0,ba&=67108863,M=Math.imul(xe,Le),A=Math.imul(xe,wt),A=A+Math.imul(be,Le)|0,D=Math.imul(be,wt),M=M+Math.imul(Pe,Et)|0,A=A+Math.imul(Pe,xt)|0,A=A+Math.imul(Ae,Et)|0,D=D+Math.imul(Ae,xt)|0,M=M+Math.imul(se,Ct)|0,A=A+Math.imul(se,St)|0,A=A+Math.imul(ue,Ct)|0,D=D+Math.imul(ue,St)|0,M=M+Math.imul(Q,kt)|0,A=A+Math.imul(Q,At)|0,A=A+Math.imul(Z,kt)|0,D=D+Math.imul(Z,At)|0,M=M+Math.imul(q,_t)|0,A=A+Math.imul(q,Pt)|0,A=A+Math.imul(Y,_t)|0,D=D+Math.imul(Y,Pt)|0,M=M+Math.imul(R,Tt)|0,A=A+Math.imul(R,It)|0,A=A+Math.imul(U,Tt)|0,D=D+Math.imul(U,It)|0;var sw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(sw>>>26)|0,sw&=67108863,M=Math.imul(Te,Le),A=Math.imul(Te,wt),A=A+Math.imul(Ie,Le)|0,D=Math.imul(Ie,wt),M=M+Math.imul(xe,Et)|0,A=A+Math.imul(xe,xt)|0,A=A+Math.imul(be,Et)|0,D=D+Math.imul(be,xt)|0,M=M+Math.imul(Pe,Ct)|0,A=A+Math.imul(Pe,St)|0,A=A+Math.imul(Ae,Ct)|0,D=D+Math.imul(Ae,St)|0,M=M+Math.imul(se,kt)|0,A=A+Math.imul(se,At)|0,A=A+Math.imul(ue,kt)|0,D=D+Math.imul(ue,At)|0,M=M+Math.imul(Q,_t)|0,A=A+Math.imul(Q,Pt)|0,A=A+Math.imul(Z,_t)|0,D=D+Math.imul(Z,Pt)|0,M=M+Math.imul(q,Tt)|0,A=A+Math.imul(q,It)|0,A=A+Math.imul(Y,Tt)|0,D=D+Math.imul(Y,It)|0,M=M+Math.imul(R,Ot)|0,A=A+Math.imul(R,Rt)|0,A=A+Math.imul(U,Ot)|0,D=D+Math.imul(U,Rt)|0;var ow=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(ow>>>26)|0,ow&=67108863,M=Math.imul(Oe,Le),A=Math.imul(Oe,wt),A=A+Math.imul(Re,Le)|0,D=Math.imul(Re,wt),M=M+Math.imul(Te,Et)|0,A=A+Math.imul(Te,xt)|0,A=A+Math.imul(Ie,Et)|0,D=D+Math.imul(Ie,xt)|0,M=M+Math.imul(xe,Ct)|0,A=A+Math.imul(xe,St)|0,A=A+Math.imul(be,Ct)|0,D=D+Math.imul(be,St)|0,M=M+Math.imul(Pe,kt)|0,A=A+Math.imul(Pe,At)|0,A=A+Math.imul(Ae,kt)|0,D=D+Math.imul(Ae,At)|0,M=M+Math.imul(se,_t)|0,A=A+Math.imul(se,Pt)|0,A=A+Math.imul(ue,_t)|0,D=D+Math.imul(ue,Pt)|0,M=M+Math.imul(Q,Tt)|0,A=A+Math.imul(Q,It)|0,A=A+Math.imul(Z,Tt)|0,D=D+Math.imul(Z,It)|0,M=M+Math.imul(q,Ot)|0,A=A+Math.imul(q,Rt)|0,A=A+Math.imul(Y,Ot)|0,D=D+Math.imul(Y,Rt)|0,M=M+Math.imul(R,$t)|0,A=A+Math.imul(R,Mt)|0,A=A+Math.imul(U,$t)|0,D=D+Math.imul(U,Mt)|0;var aw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(aw>>>26)|0,aw&=67108863,M=Math.imul($e,Le),A=Math.imul($e,wt),A=A+Math.imul(Me,Le)|0,D=Math.imul(Me,wt),M=M+Math.imul(Oe,Et)|0,A=A+Math.imul(Oe,xt)|0,A=A+Math.imul(Re,Et)|0,D=D+Math.imul(Re,xt)|0,M=M+Math.imul(Te,Ct)|0,A=A+Math.imul(Te,St)|0,A=A+Math.imul(Ie,Ct)|0,D=D+Math.imul(Ie,St)|0,M=M+Math.imul(xe,kt)|0,A=A+Math.imul(xe,At)|0,A=A+Math.imul(be,kt)|0,D=D+Math.imul(be,At)|0,M=M+Math.imul(Pe,_t)|0,A=A+Math.imul(Pe,Pt)|0,A=A+Math.imul(Ae,_t)|0,D=D+Math.imul(Ae,Pt)|0,M=M+Math.imul(se,Tt)|0,A=A+Math.imul(se,It)|0,A=A+Math.imul(ue,Tt)|0,D=D+Math.imul(ue,It)|0,M=M+Math.imul(Q,Ot)|0,A=A+Math.imul(Q,Rt)|0,A=A+Math.imul(Z,Ot)|0,D=D+Math.imul(Z,Rt)|0,M=M+Math.imul(q,$t)|0,A=A+Math.imul(q,Mt)|0,A=A+Math.imul(Y,$t)|0,D=D+Math.imul(Y,Mt)|0,M=M+Math.imul(R,Nt)|0,A=A+Math.imul(R,Dt)|0,A=A+Math.imul(U,Nt)|0,D=D+Math.imul(U,Dt)|0;var cw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(cw>>>26)|0,cw&=67108863,M=Math.imul(Ne,Le),A=Math.imul(Ne,wt),A=A+Math.imul(De,Le)|0,D=Math.imul(De,wt),M=M+Math.imul($e,Et)|0,A=A+Math.imul($e,xt)|0,A=A+Math.imul(Me,Et)|0,D=D+Math.imul(Me,xt)|0,M=M+Math.imul(Oe,Ct)|0,A=A+Math.imul(Oe,St)|0,A=A+Math.imul(Re,Ct)|0,D=D+Math.imul(Re,St)|0,M=M+Math.imul(Te,kt)|0,A=A+Math.imul(Te,At)|0,A=A+Math.imul(Ie,kt)|0,D=D+Math.imul(Ie,At)|0,M=M+Math.imul(xe,_t)|0,A=A+Math.imul(xe,Pt)|0,A=A+Math.imul(be,_t)|0,D=D+Math.imul(be,Pt)|0,M=M+Math.imul(Pe,Tt)|0,A=A+Math.imul(Pe,It)|0,A=A+Math.imul(Ae,Tt)|0,D=D+Math.imul(Ae,It)|0,M=M+Math.imul(se,Ot)|0,A=A+Math.imul(se,Rt)|0,A=A+Math.imul(ue,Ot)|0,D=D+Math.imul(ue,Rt)|0,M=M+Math.imul(Q,$t)|0,A=A+Math.imul(Q,Mt)|0,A=A+Math.imul(Z,$t)|0,D=D+Math.imul(Z,Mt)|0,M=M+Math.imul(q,Nt)|0,A=A+Math.imul(q,Dt)|0,A=A+Math.imul(Y,Nt)|0,D=D+Math.imul(Y,Dt)|0,M=M+Math.imul(R,Lt)|0,A=A+Math.imul(R,Ft)|0,A=A+Math.imul(U,Lt)|0,D=D+Math.imul(U,Ft)|0;var lw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(lw>>>26)|0,lw&=67108863,M=Math.imul(Ne,Et),A=Math.imul(Ne,xt),A=A+Math.imul(De,Et)|0,D=Math.imul(De,xt),M=M+Math.imul($e,Ct)|0,A=A+Math.imul($e,St)|0,A=A+Math.imul(Me,Ct)|0,D=D+Math.imul(Me,St)|0,M=M+Math.imul(Oe,kt)|0,A=A+Math.imul(Oe,At)|0,A=A+Math.imul(Re,kt)|0,D=D+Math.imul(Re,At)|0,M=M+Math.imul(Te,_t)|0,A=A+Math.imul(Te,Pt)|0,A=A+Math.imul(Ie,_t)|0,D=D+Math.imul(Ie,Pt)|0,M=M+Math.imul(xe,Tt)|0,A=A+Math.imul(xe,It)|0,A=A+Math.imul(be,Tt)|0,D=D+Math.imul(be,It)|0,M=M+Math.imul(Pe,Ot)|0,A=A+Math.imul(Pe,Rt)|0,A=A+Math.imul(Ae,Ot)|0,D=D+Math.imul(Ae,Rt)|0,M=M+Math.imul(se,$t)|0,A=A+Math.imul(se,Mt)|0,A=A+Math.imul(ue,$t)|0,D=D+Math.imul(ue,Mt)|0,M=M+Math.imul(Q,Nt)|0,A=A+Math.imul(Q,Dt)|0,A=A+Math.imul(Z,Nt)|0,D=D+Math.imul(Z,Dt)|0,M=M+Math.imul(q,Lt)|0,A=A+Math.imul(q,Ft)|0,A=A+Math.imul(Y,Lt)|0,D=D+Math.imul(Y,Ft)|0;var uw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(uw>>>26)|0,uw&=67108863,M=Math.imul(Ne,Ct),A=Math.imul(Ne,St),A=A+Math.imul(De,Ct)|0,D=Math.imul(De,St),M=M+Math.imul($e,kt)|0,A=A+Math.imul($e,At)|0,A=A+Math.imul(Me,kt)|0,D=D+Math.imul(Me,At)|0,M=M+Math.imul(Oe,_t)|0,A=A+Math.imul(Oe,Pt)|0,A=A+Math.imul(Re,_t)|0,D=D+Math.imul(Re,Pt)|0,M=M+Math.imul(Te,Tt)|0,A=A+Math.imul(Te,It)|0,A=A+Math.imul(Ie,Tt)|0,D=D+Math.imul(Ie,It)|0,M=M+Math.imul(xe,Ot)|0,A=A+Math.imul(xe,Rt)|0,A=A+Math.imul(be,Ot)|0,D=D+Math.imul(be,Rt)|0,M=M+Math.imul(Pe,$t)|0,A=A+Math.imul(Pe,Mt)|0,A=A+Math.imul(Ae,$t)|0,D=D+Math.imul(Ae,Mt)|0,M=M+Math.imul(se,Nt)|0,A=A+Math.imul(se,Dt)|0,A=A+Math.imul(ue,Nt)|0,D=D+Math.imul(ue,Dt)|0,M=M+Math.imul(Q,Lt)|0,A=A+Math.imul(Q,Ft)|0,A=A+Math.imul(Z,Lt)|0,D=D+Math.imul(Z,Ft)|0;var fw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(fw>>>26)|0,fw&=67108863,M=Math.imul(Ne,kt),A=Math.imul(Ne,At),A=A+Math.imul(De,kt)|0,D=Math.imul(De,At),M=M+Math.imul($e,_t)|0,A=A+Math.imul($e,Pt)|0,A=A+Math.imul(Me,_t)|0,D=D+Math.imul(Me,Pt)|0,M=M+Math.imul(Oe,Tt)|0,A=A+Math.imul(Oe,It)|0,A=A+Math.imul(Re,Tt)|0,D=D+Math.imul(Re,It)|0,M=M+Math.imul(Te,Ot)|0,A=A+Math.imul(Te,Rt)|0,A=A+Math.imul(Ie,Ot)|0,D=D+Math.imul(Ie,Rt)|0,M=M+Math.imul(xe,$t)|0,A=A+Math.imul(xe,Mt)|0,A=A+Math.imul(be,$t)|0,D=D+Math.imul(be,Mt)|0,M=M+Math.imul(Pe,Nt)|0,A=A+Math.imul(Pe,Dt)|0,A=A+Math.imul(Ae,Nt)|0,D=D+Math.imul(Ae,Dt)|0,M=M+Math.imul(se,Lt)|0,A=A+Math.imul(se,Ft)|0,A=A+Math.imul(ue,Lt)|0,D=D+Math.imul(ue,Ft)|0;var dw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(dw>>>26)|0,dw&=67108863,M=Math.imul(Ne,_t),A=Math.imul(Ne,Pt),A=A+Math.imul(De,_t)|0,D=Math.imul(De,Pt),M=M+Math.imul($e,Tt)|0,A=A+Math.imul($e,It)|0,A=A+Math.imul(Me,Tt)|0,D=D+Math.imul(Me,It)|0,M=M+Math.imul(Oe,Ot)|0,A=A+Math.imul(Oe,Rt)|0,A=A+Math.imul(Re,Ot)|0,D=D+Math.imul(Re,Rt)|0,M=M+Math.imul(Te,$t)|0,A=A+Math.imul(Te,Mt)|0,A=A+Math.imul(Ie,$t)|0,D=D+Math.imul(Ie,Mt)|0,M=M+Math.imul(xe,Nt)|0,A=A+Math.imul(xe,Dt)|0,A=A+Math.imul(be,Nt)|0,D=D+Math.imul(be,Dt)|0,M=M+Math.imul(Pe,Lt)|0,A=A+Math.imul(Pe,Ft)|0,A=A+Math.imul(Ae,Lt)|0,D=D+Math.imul(Ae,Ft)|0;var hw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(hw>>>26)|0,hw&=67108863,M=Math.imul(Ne,Tt),A=Math.imul(Ne,It),A=A+Math.imul(De,Tt)|0,D=Math.imul(De,It),M=M+Math.imul($e,Ot)|0,A=A+Math.imul($e,Rt)|0,A=A+Math.imul(Me,Ot)|0,D=D+Math.imul(Me,Rt)|0,M=M+Math.imul(Oe,$t)|0,A=A+Math.imul(Oe,Mt)|0,A=A+Math.imul(Re,$t)|0,D=D+Math.imul(Re,Mt)|0,M=M+Math.imul(Te,Nt)|0,A=A+Math.imul(Te,Dt)|0,A=A+Math.imul(Ie,Nt)|0,D=D+Math.imul(Ie,Dt)|0,M=M+Math.imul(xe,Lt)|0,A=A+Math.imul(xe,Ft)|0,A=A+Math.imul(be,Lt)|0,D=D+Math.imul(be,Ft)|0;var pw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(pw>>>26)|0,pw&=67108863,M=Math.imul(Ne,Ot),A=Math.imul(Ne,Rt),A=A+Math.imul(De,Ot)|0,D=Math.imul(De,Rt),M=M+Math.imul($e,$t)|0,A=A+Math.imul($e,Mt)|0,A=A+Math.imul(Me,$t)|0,D=D+Math.imul(Me,Mt)|0,M=M+Math.imul(Oe,Nt)|0,A=A+Math.imul(Oe,Dt)|0,A=A+Math.imul(Re,Nt)|0,D=D+Math.imul(Re,Dt)|0,M=M+Math.imul(Te,Lt)|0,A=A+Math.imul(Te,Ft)|0,A=A+Math.imul(Ie,Lt)|0,D=D+Math.imul(Ie,Ft)|0;var vw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(vw>>>26)|0,vw&=67108863,M=Math.imul(Ne,$t),A=Math.imul(Ne,Mt),A=A+Math.imul(De,$t)|0,D=Math.imul(De,Mt),M=M+Math.imul($e,Nt)|0,A=A+Math.imul($e,Dt)|0,A=A+Math.imul(Me,Nt)|0,D=D+Math.imul(Me,Dt)|0,M=M+Math.imul(Oe,Lt)|0,A=A+Math.imul(Oe,Ft)|0,A=A+Math.imul(Re,Lt)|0,D=D+Math.imul(Re,Ft)|0;var mw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(mw>>>26)|0,mw&=67108863,M=Math.imul(Ne,Nt),A=Math.imul(Ne,Dt),A=A+Math.imul(De,Nt)|0,D=Math.imul(De,Dt),M=M+Math.imul($e,Lt)|0,A=A+Math.imul($e,Ft)|0,A=A+Math.imul(Me,Lt)|0,D=D+Math.imul(Me,Ft)|0;var yw=(L+M|0)+((A&8191)<<13)|0;L=(D+(A>>>13)|0)+(yw>>>26)|0,yw&=67108863,M=Math.imul(Ne,Lt),A=Math.imul(Ne,Ft),A=A+Math.imul(De,Lt)|0,D=Math.imul(De,Ft);var gw=(L+M|0)+((A&8191)<<13)|0;return L=(D+(A>>>13)|0)+(gw>>>26)|0,gw&=67108863,$[0]=va,$[1]=ma,$[2]=ya,$[3]=ga,$[4]=ba,$[5]=sw,$[6]=ow,$[7]=aw,$[8]=cw,$[9]=lw,$[10]=uw,$[11]=fw,$[12]=dw,$[13]=hw,$[14]=pw,$[15]=vw,$[16]=mw,$[17]=yw,$[18]=gw,L!==0&&($[19]=L,O.length++),O};Math.imul||(m=y);function g(F,E,_){_.negative=E.negative^F.negative,_.length=F.length+E.length;for(var O=0,N=0,k=0;k<_.length-1;k++){var $=N;N=0;for(var L=O&67108863,M=Math.min(k,E.length-1),A=Math.max(0,k-F.length+1);A<=M;A++){var D=k-A,V=F.words[D]|0,R=E.words[A]|0,U=V*R,W=U&67108863;$=$+(U/67108864|0)|0,W=W+L|0,L=W&67108863,$=$+(W>>>26)|0,N+=$>>>26,$&=67108863}_.words[k]=L,O=$,$=N}return O!==0?_.words[k]=O:_.length--,_._strip()}function S(F,E,_){return g(F,E,_)}s.prototype.mulTo=function(E,_){var O,N=this.length+E.length;return this.length===10&&E.length===10?O=m(this,E,_):N<63?O=y(this,E,_):N<1024?O=g(this,E,_):O=S(this,E,_),O},s.prototype.mul=function(E){var _=new s(null);return _.words=new Array(this.length+E.length),this.mulTo(E,_)},s.prototype.mulf=function(E){var _=new s(null);return _.words=new Array(this.length+E.length),S(this,E,_)},s.prototype.imul=function(E){return this.clone().mulTo(E,this)},s.prototype.imuln=function(E){var _=E<0;_&&(E=-E),n(typeof E=="number"),n(E<67108864);for(var O=0,N=0;N>=26,O+=k/67108864|0,O+=$>>>26,this.words[N]=$&67108863}return O!==0&&(this.words[N]=O,this.length++),_?this.ineg():this},s.prototype.muln=function(E){return this.clone().imuln(E)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(E){var _=b(E);if(_.length===0)return new s(1);for(var O=this,N=0;N<_.length&&_[N]===0;N++,O=O.sqr());if(++N<_.length)for(var k=O.sqr();N<_.length;N++,k=k.sqr())_[N]!==0&&(O=O.mul(k));return O},s.prototype.iushln=function(E){n(typeof E=="number"&&E>=0);var _=E%26,O=(E-_)/26,N=67108863>>>26-_<<26-_,k;if(_!==0){var $=0;for(k=0;k>>26-_}$&&(this.words[k]=$,this.length++)}if(O!==0){for(k=this.length-1;k>=0;k--)this.words[k+O]=this.words[k];for(k=0;k=0);var N;_?N=(_-_%26)/26:N=0;var k=E%26,$=Math.min((E-k)/26,this.length),L=67108863^67108863>>>k<$)for(this.length-=$,A=0;A=0&&(D!==0||A>=N);A--){var V=this.words[A]|0;this.words[A]=D<<26-k|V>>>k,D=V&L}return M&&D!==0&&(M.words[M.length++]=D),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(E,_,O){return n(this.negative===0),this.iushrn(E,_,O)},s.prototype.shln=function(E){return this.clone().ishln(E)},s.prototype.ushln=function(E){return this.clone().iushln(E)},s.prototype.shrn=function(E){return this.clone().ishrn(E)},s.prototype.ushrn=function(E){return this.clone().iushrn(E)},s.prototype.testn=function(E){n(typeof E=="number"&&E>=0);var _=E%26,O=(E-_)/26,N=1<<_;if(this.length<=O)return!1;var k=this.words[O];return!!(k&N)},s.prototype.imaskn=function(E){n(typeof E=="number"&&E>=0);var _=E%26,O=(E-_)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(_!==0&&O++,this.length=Math.min(O,this.length),_!==0){var N=67108863^67108863>>>_<<_;this.words[this.length-1]&=N}return this._strip()},s.prototype.maskn=function(E){return this.clone().imaskn(E)},s.prototype.iaddn=function(E){return n(typeof E=="number"),n(E<67108864),E<0?this.isubn(-E):this.negative!==0?this.length===1&&(this.words[0]|0)<=E?(this.words[0]=E-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(E),this.negative=1,this):this._iaddn(E)},s.prototype._iaddn=function(E){this.words[0]+=E;for(var _=0;_=67108864;_++)this.words[_]-=67108864,_===this.length-1?this.words[_+1]=1:this.words[_+1]++;return this.length=Math.max(this.length,_+1),this},s.prototype.isubn=function(E){if(n(typeof E=="number"),n(E<67108864),E<0)return this.iaddn(-E);if(this.negative!==0)return this.negative=0,this.iaddn(E),this.negative=1,this;if(this.words[0]-=E,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var _=0;_>26)-(M/67108864|0),this.words[k+O]=$&67108863}for(;k>26,this.words[k+O]=$&67108863;if(L===0)return this._strip();for(n(L===-1),L=0,k=0;k>26,this.words[k]=$&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(E,_){var O=this.length-E.length,N=this.clone(),k=E,$=k.words[k.length-1]|0,L=this._countBits($);O=26-L,O!==0&&(k=k.ushln(O),N.iushln(O),$=k.words[k.length-1]|0);var M=N.length-k.length,A;if(_!=="mod"){A=new s(null),A.length=M+1,A.words=new Array(A.length);for(var D=0;D=0;R--){var U=(N.words[k.length+R]|0)*67108864+(N.words[k.length+R-1]|0);for(U=Math.min(U/$|0,67108863),N._ishlnsubmul(k,U,R);N.negative!==0;)U--,N.negative=0,N._ishlnsubmul(k,1,R),N.isZero()||(N.negative^=1);A&&(A.words[R]=U)}return A&&A._strip(),N._strip(),_!=="div"&&O!==0&&N.iushrn(O),{div:A||null,mod:N}},s.prototype.divmod=function(E,_,O){if(n(!E.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var N,k,$;return this.negative!==0&&E.negative===0?($=this.neg().divmod(E,_),_!=="mod"&&(N=$.div.neg()),_!=="div"&&(k=$.mod.neg(),O&&k.negative!==0&&k.iadd(E)),{div:N,mod:k}):this.negative===0&&E.negative!==0?($=this.divmod(E.neg(),_),_!=="mod"&&(N=$.div.neg()),{div:N,mod:$.mod}):this.negative&E.negative?($=this.neg().divmod(E.neg(),_),_!=="div"&&(k=$.mod.neg(),O&&k.negative!==0&&k.isub(E)),{div:$.div,mod:k}):E.length>this.length||this.cmp(E)<0?{div:new s(0),mod:this}:E.length===1?_==="div"?{div:this.divn(E.words[0]),mod:null}:_==="mod"?{div:null,mod:new s(this.modrn(E.words[0]))}:{div:this.divn(E.words[0]),mod:new s(this.modrn(E.words[0]))}:this._wordDiv(E,_)},s.prototype.div=function(E){return this.divmod(E,"div",!1).div},s.prototype.mod=function(E){return this.divmod(E,"mod",!1).mod},s.prototype.umod=function(E){return this.divmod(E,"mod",!0).mod},s.prototype.divRound=function(E){var _=this.divmod(E);if(_.mod.isZero())return _.div;var O=_.div.negative!==0?_.mod.isub(E):_.mod,N=E.ushrn(1),k=E.andln(1),$=O.cmp(N);return $<0||k===1&&$===0?_.div:_.div.negative!==0?_.div.isubn(1):_.div.iaddn(1)},s.prototype.modrn=function(E){var _=E<0;_&&(E=-E),n(E<=67108863);for(var O=(1<<26)%E,N=0,k=this.length-1;k>=0;k--)N=(O*N+(this.words[k]|0))%E;return _?-N:N},s.prototype.modn=function(E){return this.modrn(E)},s.prototype.idivn=function(E){var _=E<0;_&&(E=-E),n(E<=67108863);for(var O=0,N=this.length-1;N>=0;N--){var k=(this.words[N]|0)+O*67108864;this.words[N]=k/E|0,O=k%E}return this._strip(),_?this.ineg():this},s.prototype.divn=function(E){return this.clone().idivn(E)},s.prototype.egcd=function(E){n(E.negative===0),n(!E.isZero());var _=this,O=E.clone();_.negative!==0?_=_.umod(E):_=_.clone();for(var N=new s(1),k=new s(0),$=new s(0),L=new s(1),M=0;_.isEven()&&O.isEven();)_.iushrn(1),O.iushrn(1),++M;for(var A=O.clone(),D=_.clone();!_.isZero();){for(var V=0,R=1;!(_.words[0]&R)&&V<26;++V,R<<=1);if(V>0)for(_.iushrn(V);V-- >0;)(N.isOdd()||k.isOdd())&&(N.iadd(A),k.isub(D)),N.iushrn(1),k.iushrn(1);for(var U=0,W=1;!(O.words[0]&W)&&U<26;++U,W<<=1);if(U>0)for(O.iushrn(U);U-- >0;)($.isOdd()||L.isOdd())&&($.iadd(A),L.isub(D)),$.iushrn(1),L.iushrn(1);_.cmp(O)>=0?(_.isub(O),N.isub($),k.isub(L)):(O.isub(_),$.isub(N),L.isub(k))}return{a:$,b:L,gcd:O.iushln(M)}},s.prototype._invmp=function(E){n(E.negative===0),n(!E.isZero());var _=this,O=E.clone();_.negative!==0?_=_.umod(E):_=_.clone();for(var N=new s(1),k=new s(0),$=O.clone();_.cmpn(1)>0&&O.cmpn(1)>0;){for(var L=0,M=1;!(_.words[0]&M)&&L<26;++L,M<<=1);if(L>0)for(_.iushrn(L);L-- >0;)N.isOdd()&&N.iadd($),N.iushrn(1);for(var A=0,D=1;!(O.words[0]&D)&&A<26;++A,D<<=1);if(A>0)for(O.iushrn(A);A-- >0;)k.isOdd()&&k.iadd($),k.iushrn(1);_.cmp(O)>=0?(_.isub(O),N.isub(k)):(O.isub(_),k.isub(N))}var V;return _.cmpn(1)===0?V=N:V=k,V.cmpn(0)<0&&V.iadd(E),V},s.prototype.gcd=function(E){if(this.isZero())return E.abs();if(E.isZero())return this.abs();var _=this.clone(),O=E.clone();_.negative=0,O.negative=0;for(var N=0;_.isEven()&&O.isEven();N++)_.iushrn(1),O.iushrn(1);do{for(;_.isEven();)_.iushrn(1);for(;O.isEven();)O.iushrn(1);var k=_.cmp(O);if(k<0){var $=_;_=O,O=$}else if(k===0||O.cmpn(1)===0)break;_.isub(O)}while(!0);return O.iushln(N)},s.prototype.invm=function(E){return this.egcd(E).a.umod(E)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(E){return this.words[0]&E},s.prototype.bincn=function(E){n(typeof E=="number");var _=E%26,O=(E-_)/26,N=1<<_;if(this.length<=O)return this._expand(O+1),this.words[O]|=N,this;for(var k=N,$=O;k!==0&&$>>26,L&=67108863,this.words[$]=L}return k!==0&&(this.words[$]=k,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(E){var _=E<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;this._strip();var O;if(this.length>1)O=1;else{_&&(E=-E),n(E<=67108863,"Number is too big");var N=this.words[0]|0;O=N===E?0:NE.length)return 1;if(this.length=0;O--){var N=this.words[O]|0,k=E.words[O]|0;if(N!==k){Nk&&(_=1);break}}return _},s.prototype.gtn=function(E){return this.cmpn(E)===1},s.prototype.gt=function(E){return this.cmp(E)===1},s.prototype.gten=function(E){return this.cmpn(E)>=0},s.prototype.gte=function(E){return this.cmp(E)>=0},s.prototype.ltn=function(E){return this.cmpn(E)===-1},s.prototype.lt=function(E){return this.cmp(E)===-1},s.prototype.lten=function(E){return this.cmpn(E)<=0},s.prototype.lte=function(E){return this.cmp(E)<=0},s.prototype.eqn=function(E){return this.cmpn(E)===0},s.prototype.eq=function(E){return this.cmp(E)===0},s.red=function(E){return new H(E)},s.prototype.toRed=function(E){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),E.convertTo(this)._forceRed(E)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(E){return this.red=E,this},s.prototype.forceRed=function(E){return n(!this.red,"Already a number in reduction context"),this._forceRed(E)},s.prototype.redAdd=function(E){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,E)},s.prototype.redIAdd=function(E){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,E)},s.prototype.redSub=function(E){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,E)},s.prototype.redISub=function(E){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,E)},s.prototype.redShl=function(E){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,E)},s.prototype.redMul=function(E){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.mul(this,E)},s.prototype.redIMul=function(E){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,E),this.red.imul(this,E)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(E){return n(this.red&&!E.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,E)};var P={k256:null,p224:null,p192:null,p25519:null};function T(F,E){this.name=F,this.p=new s(E,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}T.prototype._tmp=function(){var E=new s(null);return E.words=new Array(Math.ceil(this.n/13)),E},T.prototype.ireduce=function(E){var _=E,O;do this.split(_,this.tmp),_=this.imulK(_),_=_.iadd(this.tmp),O=_.bitLength();while(O>this.n);var N=O0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},T.prototype.split=function(E,_){E.iushrn(this.n,0,_)},T.prototype.imulK=function(E){return E.imul(this.k)};function w(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(w,T),w.prototype.split=function(E,_){for(var O=4194303,N=Math.min(E.length,9),k=0;k>>22,$=L}$>>>=22,E.words[k-10]=$,$===0&&E.length>10?E.length-=10:E.length-=9},w.prototype.imulK=function(E){E.words[E.length]=0,E.words[E.length+1]=0,E.length+=2;for(var _=0,O=0;O>>=26,E.words[O]=k,_=N}return _!==0&&(E.words[E.length++]=_),E},s._prime=function(E){if(P[E])return P[E];var _;if(E==="k256")_=new w;else if(E==="p224")_=new I;else if(E==="p192")_=new B;else if(E==="p25519")_=new j;else throw new Error("Unknown prime "+E);return P[E]=_,_};function H(F){if(typeof F=="string"){var E=s._prime(F);this.m=E.p,this.prime=E}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}H.prototype._verify1=function(E){n(E.negative===0,"red works only with positives"),n(E.red,"red works only with red numbers")},H.prototype._verify2=function(E,_){n((E.negative|_.negative)===0,"red works only with positives"),n(E.red&&E.red===_.red,"red works only with red numbers")},H.prototype.imod=function(E){return this.prime?this.prime.ireduce(E)._forceRed(this):(u(E,E.umod(this.m)._forceRed(this)),E)},H.prototype.neg=function(E){return E.isZero()?E.clone():this.m.sub(E)._forceRed(this)},H.prototype.add=function(E,_){this._verify2(E,_);var O=E.add(_);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},H.prototype.iadd=function(E,_){this._verify2(E,_);var O=E.iadd(_);return O.cmp(this.m)>=0&&O.isub(this.m),O},H.prototype.sub=function(E,_){this._verify2(E,_);var O=E.sub(_);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},H.prototype.isub=function(E,_){this._verify2(E,_);var O=E.isub(_);return O.cmpn(0)<0&&O.iadd(this.m),O},H.prototype.shl=function(E,_){return this._verify1(E),this.imod(E.ushln(_))},H.prototype.imul=function(E,_){return this._verify2(E,_),this.imod(E.imul(_))},H.prototype.mul=function(E,_){return this._verify2(E,_),this.imod(E.mul(_))},H.prototype.isqr=function(E){return this.imul(E,E.clone())},H.prototype.sqr=function(E){return this.mul(E,E)},H.prototype.sqrt=function(E){if(E.isZero())return E.clone();var _=this.m.andln(3);if(n(_%2===1),_===3){var O=this.m.add(new s(1)).iushrn(2);return this.pow(E,O)}for(var N=this.m.subn(1),k=0;!N.isZero()&&N.andln(1)===0;)k++,N.iushrn(1);n(!N.isZero());var $=new s(1).toRed(this),L=$.redNeg(),M=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);this.pow(A,M).cmp(L)!==0;)A.redIAdd(L);for(var D=this.pow(A,N),V=this.pow(E,N.addn(1).iushrn(1)),R=this.pow(E,N),U=k;R.cmp($)!==0;){for(var W=R,q=0;W.cmp($)!==0;q++)W=W.redSqr();n(q=0;k--){for(var D=_.words[k],V=A-1;V>=0;V--){var R=D>>V&1;if($!==N[0]&&($=this.sqr($)),R===0&&L===0){M=0;continue}L<<=1,L|=R,M++,!(M!==O&&(k!==0||V!==0))&&($=this.mul($,N[L]),M=0,L=0)}A=26}return $},H.prototype.convertTo=function(E){var _=E.umod(this.m);return _===E?_.clone():_},H.prototype.convertFrom=function(E){var _=E.clone();return _.red=null,_},s.mont=function(E){return new G(E)};function G(F){H.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(G,H),G.prototype.convertTo=function(E){return this.imod(E.ushln(this.shift))},G.prototype.convertFrom=function(E){var _=this.imod(E.mul(this.rinv));return _.red=null,_},G.prototype.imul=function(E,_){if(E.isZero()||_.isZero())return E.words[0]=0,E.length=1,E;var O=E.imul(_),N=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=O.isub(N).iushrn(this.shift),$=k;return k.cmp(this.m)>=0?$=k.isub(this.m):k.cmpn(0)<0&&($=k.iadd(this.m)),$._forceRed(this)},G.prototype.mul=function(E,_){if(E.isZero()||_.isZero())return new s(0)._forceRed(this);var O=E.mul(_),N=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=O.isub(N).iushrn(this.shift),$=k;return k.cmp(this.m)>=0?$=k.isub(this.m):k.cmpn(0)<0&&($=k.iadd(this.m)),$._forceRed(this)},G.prototype.invm=function(E){var _=this.imod(E._invmp(this.m).mul(this.r2));return _._forceRed(this)}})(t,ul)})(H6);var IV=H6.exports;const _e=As(IV),OV="logger/5.7.0";let W4=!1,H4=!1;const Sv={debug:1,default:2,info:2,warning:3,error:4,off:5};let q4=Sv.default,qw=null;function RV(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const V4=RV();var mx;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(mx||(mx={}));var cs;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(cs||(cs={}));const G4="0123456789abcdef";let ee=class Tr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Sv[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(q4>Sv[n])&&console.log.apply(console,r)}debug(...e){this._log(Tr.levels.DEBUG,e)}info(...e){this._log(Tr.levels.INFO,e)}warn(...e){this._log(Tr.levels.WARNING,e)}makeError(e,r,n){if(H4)return this.makeError("censored error",r,{});r||(r=Tr.errors.UNKNOWN_ERROR),n||(n={});const i=[];Object.keys(n).forEach(c=>{const l=n[c];try{if(l instanceof Uint8Array){let u="";for(let f=0;f>4],u+=G4[l[f]&15];i.push(c+"=Uint8Array(0x"+u+")")}else i.push(c+"="+JSON.stringify(l))}catch{i.push(c+"="+JSON.stringify(n[c].toString()))}}),i.push(`code=${r}`),i.push(`version=${this.version}`);const s=e;let o="";switch(r){case cs.NUMERIC_FAULT:{o="NUMERIC_FAULT";const c=e;switch(c){case"overflow":case"underflow":case"division-by-zero":o+="-"+c;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case cs.CALL_EXCEPTION:case cs.INSUFFICIENT_FUNDS:case cs.MISSING_NEW:case cs.NONCE_EXPIRED:case cs.REPLACEMENT_UNDERPRICED:case cs.TRANSACTION_REPLACED:case cs.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),i.length&&(e+=" ("+i.join(", ")+")");const a=new Error(e);return a.reason=s,a.code=r,Object.keys(n).forEach(function(c){a[c]=n[c]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,Tr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,i){e||this.throwError(r,n,i)}assertArgument(e,r,n,i){e||this.throwArgumentError(r,n,i)}checkNormalize(e){V4&&this.throwError("platform missing String.prototype.normalize",Tr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:V4})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,Tr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,Tr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,r,n){n?n=": "+n:n="",er&&this.throwError("too many arguments"+n,Tr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",Tr.errors.MISSING_NEW,{name:r.name})}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",Tr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",Tr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return qw||(qw=new Tr(OV)),qw}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",Tr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),W4){if(!e)return;this.globalLogger().throwError("error censorship permanent",Tr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}H4=!!e,W4=!!r}static setLogLevel(e){const r=Sv[e.toLowerCase()];if(r==null){Tr.globalLogger().warn("invalid log level - "+e);return}q4=r}static from(e){return new Tr(e)}};ee.errors=cs;ee.levels=mx;const $V="bytes/5.7.0",dr=new ee($V);function vR(t){return!!t.toHexString}function cf(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return cf(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function zo(t){return Be(t)&&!(t.length%2)||oa(t)}function K4(t){return typeof t=="number"&&t==t&&t%1===0}function oa(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!K4(t.length)||t.length<0)return!1;for(let e=0;e=256)return!1}return!0}function ne(t,e){if(e||(e={}),typeof t=="number"){dr.checkSafeUint53(t,"invalid arrayify value");const r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),cf(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),vR(t)&&(t=t.toHexString()),Be(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":dr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let i=0;ine(i)),r=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(r);return e.reduce((i,s)=>(n.set(s,i),i+s.length),0),cf(n)}function to(t){let e=ne(t);if(e.length===0)return e;let r=0;for(;re&&dr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),cf(r)}function Be(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const Vw="0123456789abcdef";function te(t,e){if(e||(e={}),typeof t=="number"){dr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=Vw[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),vR(t))return t.toHexString();if(Be(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":dr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(oa(t)){let r="0x";for(let n=0;n>4]+Vw[i&15]}return r}return dr.throwArgumentError("invalid hexlify value","value",t)}function uo(t){if(typeof t!="string")t=te(t);else if(!Be(t)||t.length%2)return null;return(t.length-2)/2}function br(t,e,r){return typeof t!="string"?t=te(t):(!Be(t)||t.length%2)&&dr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function On(t){let e="0x";return t.forEach(r=>{e+=te(r).substring(2)}),e}function gs(t){const e=mR(te(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function mR(t){typeof t!="string"&&(t=te(t)),Be(t)||dr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&dr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Jl(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(zo(t)){let r=ne(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64))):r.length===65?(e.r=te(r.slice(0,32)),e.s=te(r.slice(32,64)),e.v=r[64]):dr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:dr.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=te(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){const i=_h(ne(e._vs),32);e._vs=te(i);const s=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=s:e.recoveryParam!==s&&dr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),i[0]&=127;const o=te(i);e.s==null?e.s=o:e.s!==o&&dr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?dr.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{const i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&dr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!Be(e.r)?dr.throwArgumentError("signature missing or invalid r","signature",t):e.r=ft(e.r,32),e.s==null||!Be(e.s)?dr.throwArgumentError("signature missing or invalid s","signature",t):e.s=ft(e.s,32);const r=ne(e.s);r[0]>=128&&dr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=te(r);e._vs&&(Be(e._vs)||dr.throwArgumentError("signature invalid _vs","signature",t),e._vs=ft(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&dr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function MV(t){return t=Jl(t),te(Wt([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const yR="bignumber/5.7.0";var g0=_e.BN;const xo=new ee(yR),Gw={},Q4=9007199254740991;function NV(t){return t!=null&&(J.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Be(t)||typeof t=="bigint"||oa(t))}let Y4=!1;class J{constructor(e,r){e!==Gw&&xo.throwError("cannot call constructor directly; use BigNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return zn(Ge(this).fromTwos(e))}toTwos(e){return zn(Ge(this).toTwos(e))}abs(){return this._hex[0]==="-"?J.from(this._hex.substring(1)):this}add(e){return zn(Ge(this).add(Ge(e)))}sub(e){return zn(Ge(this).sub(Ge(e)))}div(e){return J.from(e).isZero()&&_i("division-by-zero","div"),zn(Ge(this).div(Ge(e)))}mul(e){return zn(Ge(this).mul(Ge(e)))}mod(e){const r=Ge(e);return r.isNeg()&&_i("division-by-zero","mod"),zn(Ge(this).umod(r))}pow(e){const r=Ge(e);return r.isNeg()&&_i("negative-power","pow"),zn(Ge(this).pow(r))}and(e){const r=Ge(e);return(this.isNegative()||r.isNeg())&&_i("unbound-bitwise-result","and"),zn(Ge(this).and(r))}or(e){const r=Ge(e);return(this.isNegative()||r.isNeg())&&_i("unbound-bitwise-result","or"),zn(Ge(this).or(r))}xor(e){const r=Ge(e);return(this.isNegative()||r.isNeg())&&_i("unbound-bitwise-result","xor"),zn(Ge(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&_i("negative-width","mask"),zn(Ge(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&_i("negative-width","shl"),zn(Ge(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&_i("negative-width","shr"),zn(Ge(this).shrn(e))}eq(e){return Ge(this).eq(Ge(e))}lt(e){return Ge(this).lt(Ge(e))}lte(e){return Ge(this).lte(Ge(e))}gt(e){return Ge(this).gt(Ge(e))}gte(e){return Ge(this).gte(Ge(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Ge(this).isZero()}toNumber(){try{return Ge(this).toNumber()}catch{_i("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return xo.throwError("this platform does not support BigInt",ee.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Y4||(Y4=!0,xo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?xo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ee.errors.UNEXPECTED_ARGUMENT,{}):xo.throwError("BigNumber.toString does not accept parameters",ee.errors.UNEXPECTED_ARGUMENT,{})),Ge(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof J)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new J(Gw,b0(e)):e.match(/^-?[0-9]+$/)?new J(Gw,b0(new g0(e))):xo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&_i("underflow","BigNumber.from",e),(e>=Q4||e<=-Q4)&&_i("overflow","BigNumber.from",e),J.from(String(e));const r=e;if(typeof r=="bigint")return J.from(r.toString());if(oa(r))return J.from(te(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return J.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(Be(n)||n[0]==="-"&&Be(n.substring(1))))return J.from(n)}return xo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function b0(t){if(typeof t!="string")return b0(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&xo.throwArgumentError("invalid hex","value",t),t=b0(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function zn(t){return J.from(b0(t))}function Ge(t){const e=J.from(t).toHexString();return e[0]==="-"?new g0("-"+e.substring(3),16):new g0(e.substring(2),16)}function _i(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),xo.throwError(t,ee.errors.NUMERIC_FAULT,n)}function DV(t){return new g0(t,36).toString(16)}function LV(t){return new g0(t,16).toString(36)}const Rn=new ee(yR),Ph={},gR=J.from(0),bR=J.from(-1);function wR(t,e,r,n){const i={fault:e,operation:r};return n!==void 0&&(i.value=n),Rn.throwError(t,ee.errors.NUMERIC_FAULT,i)}let Th="0";for(;Th.length<256;)Th+=Th;function q6(t){if(typeof t!="number")try{t=J.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Th.substring(0,t):Rn.throwArgumentError("invalid decimal size","decimals",t)}function kv(t,e){e==null&&(e=0);const r=q6(e);t=J.from(t);const n=t.lt(gR);n&&(t=t.mul(bR));let i=t.mod(r).toString();for(;i.length2&&Rn.throwArgumentError("too many decimal points","value",t);let s=i[0],o=i[1];for(s||(s="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&wR("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?c:(typeof e[o]!==a&&Rn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=s("signed","boolean",r),n=s("width","number",n),i=s("decimals","number",i)}return n%8&&Rn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Rn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new lf(Ph,r,n,i)}}class Qr{constructor(e,r,n,i){e!==Ph&&Rn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Rn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=Ls(this._value,this.format.decimals),n=Ls(e._value,e.format.decimals);return Qr.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Qr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(J4.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=Qr.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(J4.toFormat(r.format))),r}round(e){e==null&&(e=0);const r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Rn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=Qr.from("1"+Th.substring(0,e),this.format),i=FV.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)}isZero(){return this._value==="0.0"||this._value==="0"}isNegative(){return this._value[0]==="-"}toString(){return this._value}toHexString(e){if(e==null)return this._hex;e%8&&Rn.throwArgumentError("invalid byte width","width",e);const r=J.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ft(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return Qr.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!NV(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),Qr.fromString(kv(e,r),lf.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=lf.from(r),i=Ls(e,n.decimals);!n.signed&&i.lt(gR)&&wR("unsigned value cannot be negative","overflow","value",e);let s=null;n.signed?s=i.toTwos(n.width).toHexString():(s=i.toHexString(),s=ft(s,n.width/8));const o=kv(i,n.decimals);return new Qr(Ph,s,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=lf.from(r);if(ne(e).length>n.width/8)throw new Error("overflow");let i=J.from(e);n.signed&&(i=i.fromTwos(n.width));const s=i.toTwos((n.signed?0:1)+n.width).toHexString(),o=kv(i,n.decimals);return new Qr(Ph,s,o,n)}static from(e,r){if(typeof e=="string")return Qr.fromString(e,r);if(oa(e))return Qr.fromBytes(e,r);try{return Qr.fromValue(e,0,r)}catch(n){if(n.code!==ee.errors.INVALID_ARGUMENT)throw n}return Rn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const J4=Qr.from(1),FV=Qr.from("0.5"),BV="properties/5.7.0";var jV=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const _m=new ee(BV);function ie(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function hs(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function pt(t){return jV(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const i=t[n];return Promise.resolve(i).then(s=>({key:n,value:s}))});return(yield Promise.all(e)).reduce((n,i)=>(n[i.key]=i.value,n),{})})}function V6(t,e){(!t||typeof t!="object")&&_m.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||_m.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Ht(t){const e={};for(const r in t)e[r]=t[r];return e}const UV={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function ER(t){if(t==null||UV[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let r=0;rvi(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&ie(e,r,vi(n))}return e}return _m.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function vi(t){return zV(t)}class x1{constructor(e){for(const r in e)this[r]=vi(e[r])}}const C1="abi/5.7.0",Xe=new ee(C1),$l={};let X4={calldata:!0,memory:!0,storage:!0},WV={calldata:!0,memory:!0};function _p(t,e){if(t==="bytes"||t==="string"){if(X4[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&WV[e])return!0;return(X4[e]||e==="payable")&&Xe.throwArgumentError("invalid modifier","name",e),!1}function HV(t,e){let r=t;function n(a){Xe.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function i(a){let c={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(c.indexed=!1),c}let s={type:"",name:"",state:{allowType:!0}},o=s;for(let a=0;aJSON.parse(i.format(e)))),JSON.stringify(n)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==et.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===et.full?", ":",")+")"):r+=this.type,e!==et.sighash&&(this.indexed===!0&&(r+=" indexed"),e===et.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?Nr.fromString(e,r):Nr.fromObject(e)}static fromObject(e){return Nr.isParamType(e)?e:new Nr($l,{name:e.name||null,type:Au(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(Nr.fromObject):null})}static fromString(e,r){function n(i){return Nr.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return n(HV(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function w0(t,e){return GV(t).map(r=>Nr.fromString(r,e))}class Ys{constructor(e,r){e!==$l&&Xe.throwError("use a static from method",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Av(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return Ys.isFragment(e)?e:typeof e=="string"?Ys.fromString(e):Ys.fromObject(e)}static fromObject(e){if(Ys.isFragment(e))return e;switch(e.type){case"function":return ds.fromObject(e);case"event":return Gs.fromObject(e);case"constructor":return fs.fromObject(e);case"error":return To.fromObject(e);case"fallback":case"receive":return null}return Xe.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?Gs.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?ds.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?fs.fromString(e.trim()):e.split(" ")[0]==="error"?To.fromString(e.substring(5).trim()):Xe.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class Gs extends Ys{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==et.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ",e!==et.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?Gs.fromString(e):Gs.fromObject(e)}static fromObject(e){if(Gs.isEventFragment(e))return e;e.type!=="event"&&Xe.throwArgumentError("invalid event object","value",e);const r={name:E0(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(Nr.fromObject):[],type:"event"};return new Gs($l,r)}static fromString(e){let r=e.match(x0);r||Xe.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(i=>{switch(i.trim()){case"anonymous":n=!0;break;case"":break;default:Xe.warn("unknown modifier: "+i)}}),Gs.fromObject({name:r[1].trim(),anonymous:n,inputs:w0(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function xR(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Xe.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Xe.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=J.from(r[1]),r[0]):t}function CR(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r)}})}function SR(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Xe.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Xe.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Xe.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Xe.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Xe.throwArgumentError("unable to determine stateMutability","value",t),e}class fs extends Ys{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});e===et.sighash&&Xe.throwError("cannot format a constructor for sighash",ee.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?fs.fromString(e):fs.fromObject(e)}static fromObject(e){if(fs.isConstructorFragment(e))return e;e.type!=="constructor"&&Xe.throwArgumentError("invalid constructor object","value",e);let r=SR(e);r.constant&&Xe.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(Nr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?J.from(e.gas):null};return new fs($l,n)}static fromString(e){let r={type:"constructor"};e=xR(e,r);let n=e.match(x0);return(!n||n[1].trim()!=="constructor")&&Xe.throwArgumentError("invalid constructor string","value",e),r.inputs=w0(n[2].trim(),!1),CR(n[3].trim(),r),fs.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class ds extends fs{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==et.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ",e!==et.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(n=>n.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?ds.fromString(e):ds.fromObject(e)}static fromObject(e){if(ds.isFunctionFragment(e))return e;e.type!=="function"&&Xe.throwArgumentError("invalid function object","value",e);let r=SR(e);const n={type:e.type,name:E0(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(Nr.fromObject):[],outputs:e.outputs?e.outputs.map(Nr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?J.from(e.gas):null};return new ds($l,n)}static fromString(e){let r={type:"function"};e=xR(e,r);let n=e.split(" returns ");n.length>2&&Xe.throwArgumentError("invalid function string","value",e);let i=n[0].match(x0);if(i||Xe.throwArgumentError("invalid function signature","value",e),r.name=i[1].trim(),r.name&&E0(r.name),r.inputs=w0(i[2],!1),CR(i[3].trim(),r),n.length>1){let s=n[1].match(x0);(s[1].trim()!=""||s[3].trim()!="")&&Xe.throwArgumentError("unexpected tokens","value",e),r.outputs=w0(s[2],!1)}else r.outputs=[];return ds.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function Z4(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Xe.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class To extends Ys{format(e){if(e||(e=et.sighash),et[e]||Xe.throwArgumentError("invalid format type","format",e),e===et.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==et.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===et.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?To.fromString(e):To.fromObject(e)}static fromObject(e){if(To.isErrorFragment(e))return e;e.type!=="error"&&Xe.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:E0(e.name),inputs:e.inputs?e.inputs.map(Nr.fromObject):[]};return Z4(new To($l,r))}static fromString(e){let r={type:"error"},n=e.match(x0);return n||Xe.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&E0(r.name),r.inputs=w0(n[2],!1),Z4(To.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function Au(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const VV=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function E0(t){return(!t||!t.match(VV))&&Xe.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const x0=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function GV(t){t=t.trim();let e=[],r="",n=0;for(let i=0;ithis.wordSize&&G6.throwError("value out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Wt([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r)}}}class Pm{constructor(e,r,n,i){ie(this,"_data",ne(e)),ie(this,"wordSize",r||32),ie(this,"_coerceFunc",n),ie(this,"allowLoose",i),this._offset=0}get data(){return te(this._data)}get consumed(){return this._offset}static coerce(e,r){let n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):Pm.coerce(e,r)}_peekBytes(e,r,n){let i=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+i>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?i=r:G6.throwError("data out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+i})),this._data.slice(this._offset,this._offset+i)}subReader(e){return new Pm(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let n=this._peekBytes(0,e,!!r);return this._offset+=n.length,n.slice(0,e)}readValue(){return J.from(this.readBytes(this.wordSize))}}var AR={exports:{}};/** * [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(t){(function(){var e="input is invalid type",r="finalize already called",n=typeof window=="object",i=n?window:{};i.JS_SHA3_NO_WINDOW&&(n=!1);var s=!n&&typeof self=="object",o=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?i=ul:s&&(i=self);var a=!i.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,c=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),u=[31,7936,2031616,520093696],f=[4,1024,262144,67108864],d=[1,256,65536,16777216],h=[6,1536,393216,100663296],p=[0,8,16,24],v=[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],b=[224,256,384,512],y=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(R){return Object.prototype.toString.call(R)==="[object Array]"}),c&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(R){return typeof R=="object"&&R.buffer&&R.buffer.constructor===ArrayBuffer});for(var S=function(R,U,W){return function(q){return new A(R,U,R).update(q)[W]()}},P=function(R,U,W){return function(q,Y){return new A(R,U,Y).update(q)[W]()}},T=function(R,U,W){return function(q,Y,X,Q){return E["cshake"+R].update(q,Y,X,Q)[W]()}},w=function(R,U,W){return function(q,Y,X,Q){return E["kmac"+R].update(q,Y,X,Q)[W]()}},I=function(R,U,W,q){for(var Y=0;Y>5,this.byteCount=this.blockCount<<2,this.outputBlocks=W>>5,this.extraBytes=(W&31)>>3;for(var q=0;q<50;++q)this.s[q]=0}A.prototype.update=function(R){if(this.finalized)throw new Error(r);var U,W=typeof R;if(W!=="string"){if(W==="object"){if(R===null)throw new Error(e);if(c&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!c||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);U=!0}for(var q=this.blocks,Y=this.byteCount,X=R.length,Q=this.blockCount,Z=0,ae=this.s,se,ue;Z>2]|=R[Z]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(q[se>>2]|=(224|ue>>12)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<>2]|=(240|ue>>18)<>2]|=(128|ue>>12&63)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<=Y){for(this.start=se-Y,this.block=q[Q],se=0;se>8,W=R&255;W>0;)Y.unshift(W),R=R>>8,W=R&255,++q;return U?Y.push(q):Y.unshift(q),this.update(Y),Y.length},A.prototype.encodeString=function(R){var U,W=typeof R;if(W!=="string"){if(W==="object"){if(R===null)throw new Error(e);if(c&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!c||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);U=!0}var q=0,Y=R.length;if(U)q=Y;else for(var X=0;X=57344?q+=3:(Q=65536+((Q&1023)<<10|R.charCodeAt(++X)&1023),q+=4)}return q+=this.encode(q*8),this.update(R),q},A.prototype.bytepad=function(R,U){for(var W=this.encode(U),q=0;q>2]|=this.padding[U&3],this.lastByteIndex===this.byteCount)for(R[0]=R[W],U=1;U>4&15]+l[Z&15]+l[Z>>12&15]+l[Z>>8&15]+l[Z>>20&15]+l[Z>>16&15]+l[Z>>28&15]+l[Z>>24&15];X%R===0&&(V(U),Y=0)}return q&&(Z=U[Y],Q+=l[Z>>4&15]+l[Z&15],q>1&&(Q+=l[Z>>12&15]+l[Z>>8&15]),q>2&&(Q+=l[Z>>20&15]+l[Z>>16&15])),Q},A.prototype.arrayBuffer=function(){this.finalize();var R=this.blockCount,U=this.s,W=this.outputBlocks,q=this.extraBytes,Y=0,X=0,Q=this.outputBits>>3,Z;q?Z=new ArrayBuffer(W+1<<2):Z=new ArrayBuffer(Q);for(var ae=new Uint32Array(Z);X>8&255,Q[Z+2]=ae>>16&255,Q[Z+3]=ae>>24&255;X%R===0&&V(U)}return q&&(Z=X<<2,ae=U[Y],Q[Z]=ae&255,q>1&&(Q[Z+1]=ae>>8&255),q>2&&(Q[Z+2]=ae>>16&255)),Q};function D(R,U,W){A.call(this,R,U,W)}D.prototype=new A,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var V=function(R){var U,W,q,Y,X,Q,Z,ae,se,ue,ot,Pe,Ae,at,Ce,be,qt,Te,Ie,Vt,Oe,Re,Gt,$e,Me,Kt,Ne,De,Qt,Le,bt,jc,wt,Et,Uc,xt,Ct,zc,St,kt,Wc,At,_t,Hc,Pt,Tt,qc,It,Ot,Vc,Rt,$t,Gc,Mt,Nt,Kc,Dt,Lt,va,ma,ya,ga,ba;for(q=0;q<48;q+=2)Y=R[0]^R[10]^R[20]^R[30]^R[40],X=R[1]^R[11]^R[21]^R[31]^R[41],Q=R[2]^R[12]^R[22]^R[32]^R[42],Z=R[3]^R[13]^R[23]^R[33]^R[43],ae=R[4]^R[14]^R[24]^R[34]^R[44],se=R[5]^R[15]^R[25]^R[35]^R[45],ue=R[6]^R[16]^R[26]^R[36]^R[46],ot=R[7]^R[17]^R[27]^R[37]^R[47],Pe=R[8]^R[18]^R[28]^R[38]^R[48],Ae=R[9]^R[19]^R[29]^R[39]^R[49],U=Pe^(Q<<1|Z>>>31),W=Ae^(Z<<1|Q>>>31),R[0]^=U,R[1]^=W,R[10]^=U,R[11]^=W,R[20]^=U,R[21]^=W,R[30]^=U,R[31]^=W,R[40]^=U,R[41]^=W,U=Y^(ae<<1|se>>>31),W=X^(se<<1|ae>>>31),R[2]^=U,R[3]^=W,R[12]^=U,R[13]^=W,R[22]^=U,R[23]^=W,R[32]^=U,R[33]^=W,R[42]^=U,R[43]^=W,U=Q^(ue<<1|ot>>>31),W=Z^(ot<<1|ue>>>31),R[4]^=U,R[5]^=W,R[14]^=U,R[15]^=W,R[24]^=U,R[25]^=W,R[34]^=U,R[35]^=W,R[44]^=U,R[45]^=W,U=ae^(Pe<<1|Ae>>>31),W=se^(Ae<<1|Pe>>>31),R[6]^=U,R[7]^=W,R[16]^=U,R[17]^=W,R[26]^=U,R[27]^=W,R[36]^=U,R[37]^=W,R[46]^=U,R[47]^=W,U=ue^(Y<<1|X>>>31),W=ot^(X<<1|Y>>>31),R[8]^=U,R[9]^=W,R[18]^=U,R[19]^=W,R[28]^=U,R[29]^=W,R[38]^=U,R[39]^=W,R[48]^=U,R[49]^=W,at=R[0],Ce=R[1],Tt=R[11]<<4|R[10]>>>28,qc=R[10]<<4|R[11]>>>28,De=R[20]<<3|R[21]>>>29,Qt=R[21]<<3|R[20]>>>29,ma=R[31]<<9|R[30]>>>23,ya=R[30]<<9|R[31]>>>23,At=R[40]<<18|R[41]>>>14,_t=R[41]<<18|R[40]>>>14,Et=R[2]<<1|R[3]>>>31,Uc=R[3]<<1|R[2]>>>31,be=R[13]<<12|R[12]>>>20,qt=R[12]<<12|R[13]>>>20,It=R[22]<<10|R[23]>>>22,Ot=R[23]<<10|R[22]>>>22,Le=R[33]<<13|R[32]>>>19,bt=R[32]<<13|R[33]>>>19,ga=R[42]<<2|R[43]>>>30,ba=R[43]<<2|R[42]>>>30,Mt=R[5]<<30|R[4]>>>2,Nt=R[4]<<30|R[5]>>>2,xt=R[14]<<6|R[15]>>>26,Ct=R[15]<<6|R[14]>>>26,Te=R[25]<<11|R[24]>>>21,Ie=R[24]<<11|R[25]>>>21,Vc=R[34]<<15|R[35]>>>17,Rt=R[35]<<15|R[34]>>>17,jc=R[45]<<29|R[44]>>>3,wt=R[44]<<29|R[45]>>>3,$e=R[6]<<28|R[7]>>>4,Me=R[7]<<28|R[6]>>>4,Kc=R[17]<<23|R[16]>>>9,Dt=R[16]<<23|R[17]>>>9,zc=R[26]<<25|R[27]>>>7,St=R[27]<<25|R[26]>>>7,Vt=R[36]<<21|R[37]>>>11,Oe=R[37]<<21|R[36]>>>11,$t=R[47]<<24|R[46]>>>8,Gc=R[46]<<24|R[47]>>>8,Hc=R[8]<<27|R[9]>>>5,Pt=R[9]<<27|R[8]>>>5,Kt=R[18]<<20|R[19]>>>12,Ne=R[19]<<20|R[18]>>>12,Lt=R[29]<<7|R[28]>>>25,va=R[28]<<7|R[29]>>>25,kt=R[38]<<8|R[39]>>>24,Wc=R[39]<<8|R[38]>>>24,Re=R[48]<<14|R[49]>>>18,Gt=R[49]<<14|R[48]>>>18,R[0]=at^~be&Te,R[1]=Ce^~qt&Ie,R[10]=$e^~Kt&De,R[11]=Me^~Ne&Qt,R[20]=Et^~xt&zc,R[21]=Uc^~Ct&St,R[30]=Hc^~Tt&It,R[31]=Pt^~qc&Ot,R[40]=Mt^~Kc&Lt,R[41]=Nt^~Dt&va,R[2]=be^~Te&Vt,R[3]=qt^~Ie&Oe,R[12]=Kt^~De&Le,R[13]=Ne^~Qt&bt,R[22]=xt^~zc&kt,R[23]=Ct^~St&Wc,R[32]=Tt^~It&Vc,R[33]=qc^~Ot&Rt,R[42]=Kc^~Lt&ma,R[43]=Dt^~va&ya,R[4]=Te^~Vt&Re,R[5]=Ie^~Oe&Gt,R[14]=De^~Le&jc,R[15]=Qt^~bt&wt,R[24]=zc^~kt&At,R[25]=St^~Wc&_t,R[34]=It^~Vc&$t,R[35]=Ot^~Rt&Gc,R[44]=Lt^~ma&ga,R[45]=va^~ya&ba,R[6]=Vt^~Re&at,R[7]=Oe^~Gt&Ce,R[16]=Le^~jc&$e,R[17]=bt^~wt&Me,R[26]=kt^~At&Et,R[27]=Wc^~_t&Uc,R[36]=Vc^~$t&Hc,R[37]=Rt^~Gc&Pt,R[46]=ma^~ga&Mt,R[47]=ya^~ba&Nt,R[8]=Re^~at&be,R[9]=Gt^~Ce&qt,R[18]=jc^~$e&Kt,R[19]=wt^~Me&Ne,R[28]=At^~Et&xt,R[29]=_t^~Uc&Ct,R[38]=$t^~Hc&Tt,R[39]=Gc^~Pt&qc,R[48]=ga^~Mt&Kc,R[49]=ba^~Nt&Dt,R[0]^=v[q],R[1]^=v[q+1]};if(a)t.exports=E;else for(O=0;O<_.length;++O)i[_[O]]=E[_[O]]})()})(CR);var HV=CR.exports;const qV=Gi(HV);function Be(t){return"0x"+qV.keccak_256(ne(t))}const VV="rlp/5.7.0",Us=new ee(VV);function e4(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function t4(t,e,r){let n=0;for(let i=0;ie+1+n&&Us.throwError("child data too short",ee.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function kR(t,e){if(t.length===0&&Us.throwError("data too short",ee.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Us.throwError("data short segment too short",ee.errors.BUFFER_OVERRUN,{});const n=t4(t,e+1,r);return e+1+r+n>t.length&&Us.throwError("data long segment too short",ee.errors.BUFFER_OVERRUN,{}),r4(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Us.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{}),r4(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Us.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const n=t4(t,e+1,r);e+1+r+n>t.length&&Us.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const i=te(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&Us.throwError("data too short",ee.errors.BUFFER_OVERRUN,{});const n=te(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:te(t[e])}}function yg(t){const e=ne(t),r=kR(e,0);return r.consumed!==e.length&&Us.throwArgumentError("invalid rlp data","data",t),r.result}const GV=Object.freeze(Object.defineProperty({__proto__:null,decode:yg,encode:Ml},Symbol.toStringTag,{value:"Module"})),KV="address/5.7.0",ja=new ee(KV);function n4(t){Fe(t,20)||ja.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=ne(Be(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const QV=9007199254740991;function YV(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const Q6={};for(let t=0;t<10;t++)Q6[String(t)]=String(t);for(let t=0;t<26;t++)Q6[String.fromCharCode(65+t)]=String(10+t);const i4=Math.floor(YV(QV));function AR(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>Q6[n]).join("");for(;e.length>=i4;){let n=e.substring(0,i4);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function qe(t){let e=null;if(typeof t!="string"&&ja.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=n4(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&ja.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==AR(t)&&ja.throwArgumentError("bad icap checksum","address",t),e=RV(t.substring(4));e.length<40;)e="0"+e;e=n4("0x"+e)}else ja.throwArgumentError("invalid address","address",t);return e}function _R(t){try{return qe(t),!0}catch{}return!1}function JV(t){let e=$V(qe(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+AR("XE00"+e)+e}function Y6(t){let e=null;try{e=qe(t.from)}catch{ja.throwArgumentError("missing from address","transaction",t)}const r=to(ne(J.from(t.nonce).toHexString()));return qe(br(Be(Ml([e,r])),12))}function XV(t,e,r){return uo(e)!==32&&ja.throwArgumentError("salt must be 32 bytes","salt",e),uo(r)!==32&&ja.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),qe(br(Be(zt(["0xff",qe(t),e,r])),12))}class ZV extends aa{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=qe(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return qe(ft(e.readValue().toHexString(),20))}}class eG extends aa{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const qu=new ee(C1);function PR(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return u||qu.throwError("cannot encode object for signature with missing names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]&&qu.throwError("cannot encode object for signature with duplicate names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]=!0,r[u]})}else qu.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&qu.throwArgumentError("types/value length mismatch","tuple",r);let i=new yx(t.wordSize),s=new yx(t.wordSize),o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=s.length;c.encode(s,u);let d=i.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function TR(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),c=n.subReader(a.toNumber());try{o=s.decode(c)}catch(l){if(l.code===ee.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===ee.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const c=r[o];c instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw c}}):r[a]=c});for(let s=0;s{throw o}})}return Object.freeze(r)}class tG extends aa{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&qu.throwError("insufficient data length",ee.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Vn.OVERRUN?r.length-e-1:0}function fG(t,e,r,n,i){return t===Vn.OVERLONG?(n.push(i),0):(n.push(65533),MR(t,e,r))}const NR=Object.freeze({error:uG,ignore:MR,replace:fG});function J6(t,e){e==null&&(e=NR.error),t=ne(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Vn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Vn.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Vn.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let c=0;c1114111){n+=e(Vn.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Vn.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Vn.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function gt(t,e=Wo.current){e!=Wo.current&&($R.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return ne(r)}function Kw(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function dG(t,e){return'"'+J6(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Kw(r):(r-=65536,Kw((r>>10&1023)+55296)+Kw((r&1023)+56320))}).join("")+'"'}function gx(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function ca(t,e){return gx(J6(t,e))}function Im(t,e=Wo.current){return J6(gt(t,e))}function hG(t){const e=gt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return te(zt([e,Tm]).slice(0,32))}function pG(t){const e=ne(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return ca(e.slice(0,r))}function vG(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function DR(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function Z6(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const mG=DR("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),yG="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),gG=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],bG=X6("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),wG=X6("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),EG=X6("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",vG),xG=DR("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function CG(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function SG(t){return!!Z6(t,mG)}function kG(t){let e=Z6(t,gG);if(e)return[t+e.s];let r=bG[t];if(r)return r;let n=wG[t];if(n)return[t+n[0]];let i=EG[t];return i||null}function AG(t){return!!Z6(t,xG)}function _G(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=Im(t);e=CG(e.map(n=>{if(yG.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=kG(n);return i||[n]})),e=Im(gx(e),Wo.NFKC),e.forEach(n=>{if(AG(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(SG(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=gx(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class PG extends IR{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,gt(r))}decode(e){return ca(super.decode(e))}}class Pp extends aa{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return PR(e,this.coders,r)}decode(e){return e.coerce(this.name,TR(e,this.coders))}}const Tp=new ee(C1),TG=new RegExp(/^bytes([0-9]*)$/),IG=new RegExp(/^(u?int)([0-9]*)$/);class e3{constructor(e){ie(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ZV(e.name);case"bool":return new rG(e.name);case"string":return new PG(e.name);case"bytes":return new nG(e.name);case"array":return new tG(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Pp((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new sG(e.name)}let r=e.type.match(IG);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Tp.throwArgumentError("invalid "+r[1]+" bit length","param",e),new cG(n/8,r[1]==="int",e.name)}if(r=e.type.match(TG),r){let n=parseInt(r[1]);return(n===0||n>32)&&Tp.throwArgumentError("invalid bytes length","param",e),new iG(n,e.name)}return Tp.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Pm(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new yx(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(Nr.from(i)));return new Pp(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Tp.throwError("types/values length mismatch",ee.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Nr.from(o))),i=new Pp(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(Nr.from(o)));return new Pp(i,"_").decode(this._getReader(ne(r),n))}}const Bn=new e3;function Ua(t){return Be(gt(t))}const LR="hash/5.7.0";function t3(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function RG(t){const e={};for(let r=0;r>--c&1}const f=31,d=Math.pow(2,f),h=d>>>1,p=h>>1,v=d-1;let b=0;for(let P=0;P1;){let j=T+w>>>1;P>>1|u(),I=I<<1^h,F=(F^h)<<1|h|1;m=I,g=1+F-I}let S=n-4;return y.map(P=>{switch(P-S){case 3:return S+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return S+256+(t[a++]<<8|t[a++]);case 1:return S+t[a++];default:return P-1}})}function MG(t){let e=0;return()=>t[e++]}function NG(t){return MG($G(t))}function DG(t){return t&1?~t>>1:t>>1}function LG(t,e){let r=Array(t);for(let n=0;ne[o]):r}function FG(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(UG(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(zG(r,t))}return RG(BR(e))}function jG(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function FR(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function UG(t,e){let r=1+e(),n=e(),i=jG(e),s=FR(i.length,1+t,e);return BR(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})}))}function zG(t,e){let r=1+e();return FR(r,1+t,e).map(i=>[i[0],i.slice(1)])}function WG(t){let e=Om(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let l=Om(t,e);if(l.length==0)break;n.push({set:new Set(l),node:r()})}n.sort((l,u)=>u.set.size-l.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:c}}}function HG(){return NG(t3("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 gg=HG(),qG=new Set(Om(gg)),VG=new Set(Om(gg)),GG=FG(gg),KG=WG(gg),o4=45,a4=95;function jR(t){return Im(t)}function QG(t){return t.filter(e=>e!=65039)}function UR(t){for(let e of t.split(".")){let r=jR(e);try{for(let n=r.lastIndexOf(a4)-1;n>=0;n--)if(r[n]!==a4)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===o4&&r[3]===o4)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function YG(t){return UR(JG(t,QG))}function JG(t,e){let r=jR(t).reverse(),n=[];for(;r.length;){let i=ZG(r);if(i){n.push(...e(i));continue}let s=r.pop();if(qG.has(s)){n.push(s);continue}if(VG.has(s))continue;let o=GG[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return UR(XG(String.fromCodePoint(...n)))}function XG(t){return t.normalize("NFC")}function ZG(t,e){var r;let n=KG,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let c=t[--a];if(n=(r=n.branches.find(l=>l.set.has(c)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=c;else if(n.check&&c===s)break;o.push(c),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const eK=new ee(LR),zR=new Uint8Array(32);zR.fill(0);function c4(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function n3(t){const e=gt(YG(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(c4(e.slice(n))),r}function tK(t){try{return n3(t).length!==0}catch{}return!1}function Ih(t){typeof t!="string"&&eK.throwArgumentError("invalid ENS name; not a string","name",t);let e=zR;const r=n3(t);for(;r.length;)e=Be(zt([e,Be(r.pop())]));return te(e)}function WR(t){return te(zt(n3(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const rK=`Ethereum Signed Message: -`;function i3(t){return typeof t=="string"&&(t=gt(t)),Be(zt([gt(rK),gt(String(t.length)),t]))}var nK=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const rr=new ee(LR),HR=new Uint8Array(32);HR.fill(0);const iK=J.from(-1),qR=J.from(0),VR=J.from(1),sK=J.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function oK(t){const e=ne(t),r=e.length%32;return r?On([e,HR.slice(r)]):te(e)}const aK=ft(VR.toHexString(),32),cK=ft(qR.toHexString(),32),l4={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Qw=["name","version","chainId","verifyingContract","salt"];function u4(t){return function(e){return typeof e!="string"&&rr.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const lK={name:u4("name"),version:u4("version"),chainId:function(t){try{return J.from(t).toString()}catch{}return rr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return qe(t).toLowerCase()}catch{}return rr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=ne(t);if(e.length!==32)throw new Error("bad length");return te(e)}catch{}return rr.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Yw(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&rr.throwArgumentError("invalid numeric width","type",t);const i=sK.mask(r?n-1:n),s=r?i.add(VR).mul(iK):qR;return function(o){const a=J.from(o);return(a.lt(s)||a.gt(i))&&rr.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),ft(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&rr.throwArgumentError("invalid bytes width","type",t),function(n){return ne(n).length!==r&&rr.throwArgumentError(`invalid length for ${t}`,"value",n),oK(n)}}}switch(t){case"address":return function(e){return ft(qe(e),32)};case"bool":return function(e){return e?aK:cK};case"bytes":return function(e){return Be(e)};case"string":return function(e){return Ua(e)}}return null}function f4(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Wr{constructor(e){ie(this,"types",Object.freeze(vi(e))),ie(this,"_encoderCache",{}),ie(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const c={};e[a].forEach(l=>{c[l.name]&&rr.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(a)}`,"types",e),c[l.name]=!0;const u=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];u===a&&rr.throwArgumentError(`circular type reference to ${JSON.stringify(u)}`,"types",e),!Yw(u)&&(n[u]||rr.throwArgumentError(`unknown type ${JSON.stringify(u)}`,"types",e),n[u].push(a),r[a][u]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?rr.throwArgumentError("missing primary type","types",e):s.length>1&&rr.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ie(this,"primaryType",s[0]);function o(a,c){c[a]&&rr.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),c[a]=!0,Object.keys(r[a]).forEach(l=>{n[l]&&(o(l,c),Object.keys(c).forEach(u=>{i[u][l]=!0}))}),delete c[a]}o(this.primaryType,{});for(const a in i){const c=Object.keys(i[a]);c.sort(),this._types[a]=f4(a,e[a])+c.map(l=>f4(l,e[l])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Yw(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&rr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let c=a.map(s);return this._types[i]&&(c=c.map(Be)),Be(On(c))}}const n=this.types[e];if(n){const i=Ua(this._types[e]);return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return this._types[c]?Be(l):l});return o.unshift(i),On(o)}}return rr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||rr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Be(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Yw(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&rr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(c=>this._visit(o,c,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{}):rr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Wr(e)}static getPrimaryType(e){return Wr.from(e).primaryType}static hashStruct(e,r,n){return Wr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=l4[n];i||rr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Qw.indexOf(n.name)-Qw.indexOf(i.name)),Wr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return On(["0x1901",Wr.hashDomain(e),Wr.from(r).hash(n)])}static hash(e,r,n){return Be(Wr.encode(e,r,n))}static resolveNames(e,r,n,i){return nK(this,void 0,void 0,function*(){e=Wt(e);const s={};e.verifyingContract&&!Fe(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Wr.from(r);o.visit(n,(a,c)=>(a==="address"&&!Fe(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}})}static getPayload(e,r,n){Wr.hashDomain(e);const i={},s=[];Qw.forEach(c=>{const l=e[c];l!=null&&(i[c]=lK[c](l),s.push({name:c,type:l4[c]}))});const o=Wr.from(r),a=Wt(r);return a.EIP712Domain?rr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return te(ne(l));if(c.match(/^u?int/))return J.from(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&rr.throwArgumentError("invalid string","value",l),l}return rr.throwArgumentError("unsupported type","type",c)})}}}const er=new ee(C1);class GR extends x1{}class KR extends x1{}class uK extends x1{}class Rm extends x1{static isIndexed(e){return!!(e&&e._isIndexed)}}const fK={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function d4(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class Br{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ie(this,"fragments",r.map(n=>Ys.from(n)).filter(n=>n!=null)),ie(this,"_abiCoder",ps(new.target,"getAbiCoder")()),ie(this,"functions",{}),ie(this,"errors",{}),ie(this,"events",{}),ie(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){er.warn("duplicate definition - constructor");return}ie(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){er.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||ie(this,"deploy",ds.from({payable:!1,type:"constructor"})),ie(this,"_isInterface",!0)}format(e){e||(e=et.full),e===et.sighash&&er.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===et.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Bn}static getAddress(e){return qe(e)}static getSighash(e){return br(Ua(e.format()),0,4)}static getEventTopic(e){return Ua(e.format())}getFunction(e){if(Fe(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];er.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?er.throwArgumentError("no matching function","name",n):i.length>1&&er.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[hs.fromString(e).format()];return r||er.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Fe(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];er.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?er.throwArgumentError("no matching event","name",n):i.length>1&&er.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[Gs.fromString(e).format()];return r||er.throwArgumentError("no matching event","signature",e),r}getError(e){if(Fe(e)){const n=ps(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}er.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?er.throwArgumentError("no matching error","name",n):i.length>1&&er.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[hs.fromString(e).format()];return r||er.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return ps(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),ps(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&er.throwArgumentError(`data signature does not match error ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),te(zt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&er.throwArgumentError(`data signature does not match function ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(zt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ne(r),i=null,s="",o=null,a=null,c=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=te(n.slice(0,4)),u=fK[l];if(u)o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,c=u.signature,u.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const f=this.getError(l);o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,c=f.format()}catch{}break}}return er.throwError("call revert exception"+s,ee.errors.CALL_EXCEPTION,{method:e.format(),data:te(r),errorArgs:o,errorName:a,errorSignature:c,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&er.throwError("too many arguments for "+e.format(),ee.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Ua(o):s.type==="bytes"?Be(te(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=J.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),ft(te(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&er.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?er.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&er.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Ua(c));else if(o.type==="bytes")n.push(Be(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!Fe(n[0],32)||n[0].toLowerCase()!==d)&&er.throwError("fragment/topic mismatch",ee.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Nr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,zt(n)):null,c=this._abiCoder.decode(s,r,!0),l=[],u=0,f=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)l[h]=new Rm({_isIndexed:!0,hash:null});else if(o[h])l[h]=new Rm({_isIndexed:!0,hash:a[f++]});else try{l[h]=a[f++]}catch(p){l[h]=p}else try{l[h]=c[u++]}catch(p){l[h]=p}if(d.name&&l[d.name]==null){const p=l[h];p instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw d4(`property ${JSON.stringify(d.name)}`,p)}}):l[d.name]=p}});for(let d=0;d{throw d4(`index ${d}`,h)}})}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new KR({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:J.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new GR({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=te(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new uK({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const dK="abstract-provider/5.7.0";var hK=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const pK=new ee(dK);class vK extends x1{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Tc{constructor(){pK.checkAbstract(new.target,Tc),ie(this,"_isProvider",!0)}getFeeData(){return hK(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield ht({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=J.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const mK="abstract-signer/5.7.0";var es=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Pi=new ee(mK),yK=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],gK=[ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED];let Nl=class QR{constructor(){Pi.checkAbstract(new.target,QR),ie(this,"_isSigner",!0)}getBalance(e){return es(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return es(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return es(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield ht(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return es(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield ht(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return es(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return es(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return es(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return es(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return es(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)yK.indexOf(n)===-1&&Pi.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Wt(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Pi.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return es(this,void 0,void 0,function*(){const r=yield ht(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>es(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Pi.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Pi.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Pi.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Pi.throwError("network does not support EIP-1559",ee.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Pi.throwError("failed to get consistent fee data",ee.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(gK.indexOf(i.code)>=0)throw i;return Pi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Pi.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield ht(r)})}_checkProvider(e){this.provider||Pi.throwError("missing provider",ee.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class s3 extends Nl{constructor(e,r){super(),ie(this,"address",e),ie(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Pi.throwError(e,ee.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new s3(this.address,e)}}var YR={},Ye={},S1=JR;function JR(t,e){if(!t)throw new Error(e||"Assertion failed")}JR.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var bx={exports:{}};typeof Object.create=="function"?bx.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:bx.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var bK=bx.exports,wK=S1,EK=bK;Ye.inherits=EK;function xK(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function CK(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=s&63|128):xK(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ye.htonl=XR;function kK(t,e){for(var r="",n=0;n>>0}return s}Ye.join32=AK;function _K(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Ye.split32=_K;function PK(t,e){return t>>>e|t<<32-e}Ye.rotr32=PK;function TK(t,e){return t<>>32-e}Ye.rotl32=TK;function IK(t,e){return t+e>>>0}Ye.sum32=IK;function OK(t,e,r){return t+e+r>>>0}Ye.sum32_3=OK;function RK(t,e,r,n){return t+e+r+n>>>0}Ye.sum32_4=RK;function $K(t,e,r,n,i){return t+e+r+n+i>>>0}Ye.sum32_5=$K;function MK(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Ye.sum64=MK;function NK(t,e,r,n){var i=e+n>>>0,s=(i>>0}Ye.sum64_hi=NK;function DK(t,e,r,n){var i=e+n;return i>>>0}Ye.sum64_lo=DK;function LK(t,e,r,n,i,s,o,a){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Ye.sum64_4_hi=LK;function BK(t,e,r,n,i,s,o,a){var c=e+n+s+a;return c>>>0}Ye.sum64_4_lo=BK;function FK(t,e,r,n,i,s,o,a,c,l){var u=0,f=e;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0,u+=f>>0}Ye.sum64_5_hi=FK;function jK(t,e,r,n,i,s,o,a,c,l){var u=e+n+s+a+l;return u>>>0}Ye.sum64_5_lo=jK;function UK(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ye.rotr64_hi=UK;function zK(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ye.rotr64_lo=zK;function WK(t,e,r){return t>>>r}Ye.shr64_hi=WK;function HK(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ye.shr64_lo=HK;var td={},h4=Ye,qK=S1;function bg(){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}td.BlockHash=bg;bg.prototype.update=function(e,r){if(e=h4.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=h4.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}bo.g0_256=YK;function JK(t){return ro(t,17)^ro(t,19)^t>>>10}bo.g1_256=JK;var Tf=Ye,XK=td,ZK=bo,Jw=Tf.rotl32,zd=Tf.sum32,eQ=Tf.sum32_5,tQ=ZK.ft_1,i$=XK.BlockHash,rQ=[1518500249,1859775393,2400959708,3395469782];function fo(){if(!(this instanceof fo))return new fo;i$.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Tf.inherits(fo,i$);var nQ=fo;fo.blockSize=512;fo.outSize=160;fo.hmacStrength=80;fo.padLength=64;fo.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),HQ(e.length<=this.blockSize);for(var r=e.length;r>8,d=u&255;f?c.push(f,d):c.push(d)}return c}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",c=0;c(d>>1)-1?v=(d>>1)-b:v=b,h.isubn(v)):v=0,f[p]=v,h.iushrn(1)}return f}r.getNAF=n;function i(c,l){var u=[[],[]];c=c.clone(),l=l.clone();for(var f=0,d=0,h;c.cmpn(-f)>0||l.cmpn(-d)>0;){var p=c.andln(3)+f&3,v=l.andln(3)+d&3;p===3&&(p=-1),v===3&&(v=-1);var b;p&1?(h=c.andln(7)+f&7,(h===3||h===5)&&v===2?b=-p:b=p):b=0,u[0].push(b);var y;v&1?(h=l.andln(7)+d&7,(h===3||h===5)&&p===2?y=-v:y=v):y=0,u[1].push(y),2*f===b+1&&(f=1-f),2*d===y+1&&(d=1-d),c.iushrn(1),l.iushrn(1)}return u}r.getJSF=i;function s(c,l,u){var f="_"+l;c.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=u.call(this)}}r.cachedProperty=s;function o(c){return typeof c=="string"?r.toArray(c,"hex"):c}r.parseBytes=o;function a(c){return new _e(c,"hex","le")}r.intFromLE=a}),$m=Ci.getNAF,GQ=Ci.getJSF,Mm=Ci.assert;function Ic(t,e){this.type=t,this.p=new _e(e.p,16),this.red=e.prime?_e.red(e.prime):_e.mont(this.p),this.zero=new _e(0).toRed(this.red),this.one=new _e(1).toRed(this.red),this.two=new _e(2).toRed(this.red),this.n=e.n&&new _e(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Xl=Ic;Ic.prototype.point=function(){throw new Error("Not implemented")};Ic.prototype.validate=function(){throw new Error("Not implemented")};Ic.prototype._fixedNafMul=function(e,r){Mm(e.precomputed);var n=e._getDoubles(),i=$m(r,1,this._bitLength),s=(1<=a;l--)c=(c<<1)+i[l];o.push(c)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;c--){for(var l=0;c>=0&&o[c]===0;c--)l++;if(c>=0&&l++,a=a.dblp(l),c<0)break;var u=o[c];Mm(u!==0),e.type==="affine"?u>0?a=a.mixedAdd(s[u-1>>1]):a=a.mixedAdd(s[-u-1>>1].neg()):u>0?a=a.add(s[u-1>>1]):a=a.add(s[-u-1>>1].neg())}return e.type==="affine"?a.toP():a};Ic.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,c=this._wnafT3,l=0,u,f,d;for(u=0;u=1;u-=2){var p=u-1,v=u;if(o[p]!==1||o[v]!==1){c[p]=$m(n[p],o[p],this._bitLength),c[v]=$m(n[v],o[v],this._bitLength),l=Math.max(c[p].length,l),l=Math.max(c[v].length,l);continue}var b=[r[p],null,null,r[v]];r[p].y.cmp(r[v].y)===0?(b[1]=r[p].add(r[v]),b[2]=r[p].toJ().mixedAdd(r[v].neg())):r[p].y.cmp(r[v].y.redNeg())===0?(b[1]=r[p].toJ().mixedAdd(r[v]),b[2]=r[p].add(r[v].neg())):(b[1]=r[p].toJ().mixedAdd(r[v]),b[2]=r[p].toJ().mixedAdd(r[v].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=GQ(n[p],n[v]);for(l=Math.max(m[0].length,l),c[p]=new Array(l),c[v]=new Array(l),f=0;f=0;u--){for(var w=0;u>=0;){var I=!0;for(f=0;f=0&&w++,P=P.dblp(w),u<0)break;for(f=0;f0?d=a[f][F-1>>1]:F<0&&(d=a[f][-F-1>>1].neg()),d.type==="affine"?P=P.mixedAdd(d):P=P.add(d))}}for(u=0;u=Math.ceil((e.bitLength()+1)/r.step):!1};Ki.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(h=l,p=u),f.negative&&(f=f.neg(),d=d.neg()),h.negative&&(h=h.neg(),p=p.neg()),[{a:f,b:d},{a:h,b:p}]};Qi.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),c=o.mul(i.a),l=s.mul(n.b),u=o.mul(i.b),f=e.sub(a).sub(c),d=l.add(u).neg();return{k1:f,k2:d}};Qi.prototype.pointFromX=function(e,r){e=new _e(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Qi.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Qi.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};Kr.prototype.isInfinity=function(){return this.inf};Kr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Kr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};Kr.prototype.getX=function(){return this.x.fromRed()};Kr.prototype.getY=function(){return this.y.fromRed()};Kr.prototype.mul=function(e){return e=new _e(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Kr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};Kr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};Kr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Kr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};Kr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function sn(t,e,r,n){Xl.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _e(0)):(this.x=new _e(e,16),this.y=new _e(r,16),this.z=new _e(n,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}a3(sn,Xl.BasePoint);Qi.prototype.jpoint=function(e,r,n){return new sn(this,e,r,n)};sn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};sn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};sn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),c=i.redSub(s),l=o.redSub(a);if(c.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=c.redSqr(),f=u.redMul(c),d=i.redMul(u),h=l.redSqr().redIAdd(f).redISub(d).redISub(d),p=l.redMul(d.redISub(h)).redISub(o.redMul(f)),v=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(h,p,v)};sn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),f=n.redMul(l),d=c.redSqr().redIAdd(u).redISub(f).redISub(f),h=c.redMul(f.redISub(d)).redISub(s.redMul(u)),p=this.z.redMul(a);return this.curve.jpoint(d,h,p)};sn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};sn.prototype.inspect=function(){return this.isInfinity()?"":""};sn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var _v=id(function(t,e){var r=e;r.base=Xl,r.short=QQ,r.mont=null,r.edwards=null}),Pv=id(function(t,e){var r=e,n=Ci.assert;function i(a){a.type==="short"?this.curve=new _v.short(a):a.type==="edwards"?this.curve=new _v.edwards(a):this.curve=new _v.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,c){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("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:qn.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("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:qn.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("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:qn.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("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:qn.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"]}),s("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:qn.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"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:qn.sha256,gRed:!1,g:["9"]}),s("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:qn.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("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:qn.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function cc(t){if(!(this instanceof cc))return new cc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=vs.toArray(t.entropy,t.entropyEnc||"hex"),r=vs.toArray(t.nonce,t.nonceEnc||"hex"),n=vs.toArray(t.pers,t.persEnc||"hex");o3(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var m$=cc;cc.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};cc.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=vs.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var YQ=Ci.assert;function wg(t,e){if(t instanceof wg)return t;this._importDER(t,e)||(YQ(t.r&&t.s,"Signature without r or s"),this.r=new _e(t.r,16),this.s=new _e(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Eg=wg;function JQ(){this.place=0}function e2(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function y4(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}wg.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=y4(r),n=y4(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];t2(i,r.length),i=i.concat(r),i.push(2),t2(i,n.length);var s=i.concat(n),o=[48];return t2(o,s.length),o=o.concat(s),Ci.encode(o,e)};var XQ=function(){throw new Error("unsupported")},y$=Ci.assert;function Ui(t){if(!(this instanceof Ui))return new Ui(t);typeof t=="string"&&(y$(Object.prototype.hasOwnProperty.call(Pv,t),"Unknown curve "+t),t=Pv[t]),t instanceof Pv.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var ZQ=Ui;Ui.prototype.keyPair=function(e){return new c3(this,e)};Ui.prototype.keyFromPrivate=function(e,r){return c3.fromPrivate(this,e,r)};Ui.prototype.keyFromPublic=function(e,r){return c3.fromPublic(this,e,r)};Ui.prototype.genKeyPair=function(e){e||(e={});for(var r=new m$({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||XQ(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new _e(2));;){var s=new _e(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Ui.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Ui.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new _e(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),c=new m$({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),l=this.n.sub(new _e(1)),u=0;;u++){var f=i.k?i.k(u):new _e(c.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(l)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var v=f.invm(this.n).mul(p.mul(r.getPrivate()).iadd(e));if(v=v.umod(this.n),v.cmpn(0)!==0){var b=(d.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return i.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new Eg({r:p,s:v,recoveryParam:b})}}}}}};Ui.prototype.verify=function(e,r,n,i){e=this._truncateToN(new _e(e,16)),n=this.keyFromPublic(n,i),r=new Eg(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),c=a.mul(e).umod(this.n),l=a.mul(s).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.eqXToP(s)):(u=this.g.mulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.getX().umod(this.n).cmp(s)===0)};Ui.prototype.recoverPubKey=function(t,e,r,n){y$((3&r)===r,"The recovery param is more than two bits"),e=new Eg(e,n);var i=this.n,s=new _e(t),o=e.r,a=e.s,c=r&1,l=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var u=e.r.invm(i),f=i.sub(s).mul(u).umod(i),d=a.mul(u).umod(i);return this.g.mulAdd(f,o,d)};Ui.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Eg(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var eY=id(function(t,e){var r=e;r.version="6.5.4",r.utils=Ci,r.rand=function(){throw new Error("unsupported")},r.curve=_v,r.curves=Pv,r.ec=ZQ,r.eddsa=null}),tY=eY.ec;const rY="signing-key/5.7.0",Cx=new ee(rY);let r2=null;function zs(){return r2||(r2=new tY("secp256k1")),r2}class Nm{constructor(e){ie(this,"curve","secp256k1"),ie(this,"privateKey",te(e)),uo(this.privateKey)!==32&&Cx.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=zs().keyFromPrivate(ne(this.privateKey));ie(this,"publicKey","0x"+r.getPublic(!1,"hex")),ie(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ie(this,"_isSigningKey",!0)}_addPoint(e){const r=zs().keyFromPublic(ne(this.publicKey)),n=zs().keyFromPublic(ne(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=zs().keyFromPrivate(ne(this.privateKey)),n=ne(e);n.length!==32&&Cx.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Jl({recoveryParam:i.recoveryParam,r:ft("0x"+i.r.toString(16),32),s:ft("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=zs().keyFromPrivate(ne(this.privateKey)),n=zs().keyFromPublic(ne(l3(e)));return ft("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function g$(t,e){const r=Jl(e),n={r:ne(r.r),s:ne(r.s)};return"0x"+zs().recoverPubKey(ne(t),n,r.recoveryParam).encode("hex",!1)}function l3(t,e){const r=ne(t);if(r.length===32){const n=new Nm(r);return e?"0x"+zs().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?te(r):"0x"+zs().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+zs().keyFromPublic(r).getPublic(!0,"hex"):te(r)}return Cx.throwArgumentError("invalid public or private key","key","[REDACTED]")}const nY="transactions/5.7.0",mn=new ee(nY);var Sx;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Sx||(Sx={}));function u3(t){return t==="0x"?null:qe(t)}function vn(t){return t==="0x"?Zt:J.from(t)}const iY=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],sY={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function f3(t){const e=l3(t);return qe(br(Be(br(e,1)),12))}function Ll(t,e){return f3(g$(ne(t),e))}function ci(t,e){const r=to(J.from(t).toHexString());return r.length>32&&mn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function n2(t,e){return{address:qe(t),storageKeys:(e||[]).map((r,n)=>(uo(r)!==32&&mn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Zl(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&mn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),n2(r[0],r[1])):n2(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return n2(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function b$(t){return Zl(t).map(e=>[e.address,e.storageKeys])}function w$(t,e){if(t.gasPrice!=null){const n=J.from(t.gasPrice),i=J.from(t.maxFeePerGas||0);n.eq(i)||mn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[ci(t.chainId||0,"chainId"),ci(t.nonce||0,"nonce"),ci(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ci(t.maxFeePerGas||0,"maxFeePerGas"),ci(t.gasLimit||0,"gasLimit"),t.to!=null?qe(t.to):"0x",ci(t.value||0,"value"),t.data||"0x",b$(t.accessList||[])];if(e){const n=Jl(e);r.push(ci(n.recoveryParam,"recoveryParam")),r.push(to(n.r)),r.push(to(n.s))}return On(["0x02",Ml(r)])}function E$(t,e){const r=[ci(t.chainId||0,"chainId"),ci(t.nonce||0,"nonce"),ci(t.gasPrice||0,"gasPrice"),ci(t.gasLimit||0,"gasLimit"),t.to!=null?qe(t.to):"0x",ci(t.value||0,"value"),t.data||"0x",b$(t.accessList||[])];if(e){const n=Jl(e);r.push(ci(n.recoveryParam,"recoveryParam")),r.push(to(n.r)),r.push(to(n.s))}return On(["0x01",Ml(r)])}function oY(t,e){G6(t,sY);const r=[];iY.forEach(function(o){let a=t[o.name]||[];const c={};o.numeric&&(c.hexPad="left"),a=ne(te(a,c)),o.length&&a.length!==o.length&&a.length>0&&mn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=to(a),a.length>o.maxLength&&mn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(te(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&mn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!zo(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(te(n)),r.push("0x"),r.push("0x")),!e)return Ml(r);const i=Jl(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&mn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&mn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(te(s)),r.push(to(ne(i.r))),r.push(to(ne(i.s))),Ml(r)}function aY(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&mn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),oY(t,e);switch(t.type){case 1:return E$(t,e);case 2:return w$(t,e)}return mn.throwError(`unsupported transaction type: ${t.type}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function x$(t,e,r){try{const n=vn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{mn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ft(e[1],32),t.s=ft(e[2],32);try{const n=Be(r(t));t.from=Ll(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function cY(t){const e=yg(t.slice(1));e.length!==9&&e.length!==12&&mn.throwArgumentError("invalid component count for transaction type: 2","payload",te(t));const r=vn(e[2]),n=vn(e[3]),i={type:2,chainId:vn(e[0]).toNumber(),nonce:vn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:vn(e[4]),to:u3(e[5]),value:vn(e[6]),data:e[7],accessList:Zl(e[8])};return e.length===9||(i.hash=Be(t),x$(i,e.slice(9),w$)),i}function lY(t){const e=yg(t.slice(1));e.length!==8&&e.length!==11&&mn.throwArgumentError("invalid component count for transaction type: 1","payload",te(t));const r={type:1,chainId:vn(e[0]).toNumber(),nonce:vn(e[1]).toNumber(),gasPrice:vn(e[2]),gasLimit:vn(e[3]),to:u3(e[4]),value:vn(e[5]),data:e[6],accessList:Zl(e[7])};return e.length===8||(r.hash=Be(t),x$(r,e.slice(8),E$)),r}function uY(t){const e=yg(t);e.length!==9&&e.length!==6&&mn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:vn(e[0]).toNumber(),gasPrice:vn(e[1]),gasLimit:vn(e[2]),to:u3(e[3]),value:vn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=J.from(e[6]).toNumber()}catch{return r}if(r.r=ft(e[7],32),r.s=ft(e[8],32),J.from(r.r).isZero()&&J.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(te(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=Be(Ml(i));try{r.from=Ll(s,{r:te(r.r),s:te(r.s),recoveryParam:n})}catch{}r.hash=Be(t)}return r.type=null,r}function C$(t){const e=ne(t);if(e[0]>127)return uY(e);switch(e[0]){case 1:return lY(e);case 2:return cY(e)}return mn.throwError(`unsupported transaction type: ${e[0]}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const fY="contracts/5.7.0";var Bl=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const gr=new ee(fY);function Dm(t,e){return Bl(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&gr.throwArgumentError("invalid address or ENS name","name",r);try{return qe(r)}catch{}t||gr.throwError("a provider or signer is needed to resolve ENS names",ee.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&gr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Tv(t,e,r){return Bl(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Tv(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield Dm(t,e):r.type==="tuple"?yield Tv(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Tv(t,n,r.arrayChildren))):Promise.reject(gr.makeError("invalid value for array",ee.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function xg(t,e,r){return Bl(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Wt(r.pop())),gr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=ht({override:Dm(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>Bl(this,void 0,void 0,function*(){return qe(l.signer)!==l.override&&gr.throwError("Contract with a Signer cannot override from",ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=Dm(t.provider,n.from));const i=yield ht({args:Tv(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:ht(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=J.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=J.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=J.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=J.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=J.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Zl(a.accessList)),o.gasLimit==null&&e.gas!=null){let l=21e3;const u=ne(s);for(let f=0;fn[l]!=null);return c.length&&gr.throwError(`cannot override ${c.map(l=>JSON.stringify(l)).join(",")}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:c}),o})}function dY(t,e){return function(...r){return xg(t,e,r)}}function hY(t,e){const r=t.signer||t.provider;return function(...n){return Bl(this,void 0,void 0,function*(){r||gr.throwError("estimate require a provider or signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield xg(t,e,n);return yield r.estimateGas(i)})}}function pY(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=vi(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(c,l)=>t.interface.decodeEventLog(a.eventFragment,c,l),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function S$(t,e,r){const n=t.signer||t.provider;return function(...i){return Bl(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const c=Wt(i.pop());c.blockTag!=null&&(s=yield c.blockTag),delete c.blockTag,i.push(c)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield xg(t,e,i),a=yield n.call(o,s);try{let c=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(c=c[0]),c}catch(c){throw c.code===ee.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=i,c.transaction=o),c}})}}function vY(t,e){return function(...r){return Bl(this,void 0,void 0,function*(){t.signer||gr.throwError("sending a transaction requires a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield xg(t,e,r),i=yield t.signer.sendTransaction(n);return pY(t,i),i})}}function g4(t,e,r){return e.constant?S$(t,e,r):vY(t,e)}function k$(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class C0{constructor(e,r){ie(this,"tag",e),ie(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class mY extends C0{constructor(){super("error",null)}}class b4 extends C0{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&gr.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(k$(s),s),ie(this,"address",e),ie(this,"interface",r),ie(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=xR(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class w4 extends C0{constructor(e,r){super("*",{address:e}),ie(this,"address",e),ie(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class yY{constructor(e,r,n){ie(this,"interface",ps(new.target,"getInterface")(r)),n==null?(ie(this,"provider",null),ie(this,"signer",null)):Nl.isSigner(n)?(ie(this,"provider",n.provider||null),ie(this,"signer",n)):Tc.isProvider(n)?(ie(this,"provider",n),ie(this,"signer",null)):gr.throwArgumentError("invalid signer or provider","signerOrProvider",n),ie(this,"callStatic",{}),ie(this,"estimateGas",{}),ie(this,"functions",{}),ie(this,"populateTransaction",{}),ie(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const c=this.interface.events[a];ie(this.filters,a,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(c,l)})),o[c.name]||(o[c.name]=[]),o[c.name].push(a)}),Object.keys(o).forEach(a=>{const c=o[a];c.length===1?ie(this.filters,a,this.filters[c[0]]):gr.warn(`Duplicate definition of ${a} (${c.join(", ")})`)})}if(ie(this,"_runningEvents",{}),ie(this,"_wrappedEmits",{}),e==null&&gr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ie(this,"address",e),this.provider)ie(this,"resolvedAddress",Dm(this.provider,e));else try{ie(this,"resolvedAddress",Promise.resolve(qe(e)))}catch{gr.throwError("provider is required to use ENS name as contract address",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){gr.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const c=a.name;i[`%${c}`]||(i[`%${c}`]=[]),i[`%${c}`].push(o)}this[o]==null&&ie(this,o,g4(this,a,!0)),this.functions[o]==null&&ie(this.functions,o,g4(this,a,!1)),this.callStatic[o]==null&&ie(this.callStatic,o,S$(this,a,!0)),this.populateTransaction[o]==null&&ie(this.populateTransaction,o,dY(this,a)),this.estimateGas[o]==null&&ie(this.estimateGas,o,hY(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const c=a[0];try{this[o]==null&&ie(this,o,this[c])}catch{}this.functions[o]==null&&ie(this.functions,o,this.functions[c]),this.callStatic[o]==null&&ie(this.callStatic,o,this.callStatic[c]),this.populateTransaction[o]==null&&ie(this.populateTransaction,o,this.populateTransaction[c]),this.estimateGas[o]==null&&ie(this.estimateGas,o,this.estimateGas[c])})}static getContractAddress(e){return Y6(e)}static getInterface(e){return Br.isInterface(e)?e:new Br(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&gr.throwError("contract not deployed",ee.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||gr.throwError("sending a transactions require a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Wt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&gr.throwError("cannot override "+n,ee.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new s3(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ie(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Rm.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new mY);if(e==="event")return this._normalizeRunningEvent(new C0("event",null));if(e==="*")return this._normalizeRunningEvent(new w4(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new b4(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new b4(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new C0(k$(r),r))}return this._normalizeRunningEvent(new w4(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=vi(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||gr.throwError("events require a provider or a signer with a provider",ee.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=Wt(i.filter);return typeof r=="string"&&Fe(r,32)?(n!=null&&gr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class sd extends yY{}class A${constructor(e){ie(this,"alphabet",e),ie(this,"base",e.length),ie(this,"_alphabetMap",{}),ie(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,c[e.length+1]=f>>16&255,c[e.length+2]=f>>8&255,c[e.length+3]=f&255;let d=ne(S0(i,t,c));s||(s=d.length,u=new Uint8Array(s),o=Math.ceil(n/s),l=n-(o-1)*s),u.set(d);for(let v=1;v>5,this.byteCount=this.blockCount<<2,this.outputBlocks=W>>5,this.extraBytes=(W&31)>>3;for(var q=0;q<50;++q)this.s[q]=0}A.prototype.update=function(R){if(this.finalized)throw new Error(r);var U,W=typeof R;if(W!=="string"){if(W==="object"){if(R===null)throw new Error(e);if(c&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!c||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);U=!0}for(var q=this.blocks,Y=this.byteCount,X=R.length,Q=this.blockCount,Z=0,ae=this.s,se,ue;Z>2]|=R[Z]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(q[se>>2]|=(224|ue>>12)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<>2]|=(240|ue>>18)<>2]|=(128|ue>>12&63)<>2]|=(128|ue>>6&63)<>2]|=(128|ue&63)<=Y){for(this.start=se-Y,this.block=q[Q],se=0;se>8,W=R&255;W>0;)Y.unshift(W),R=R>>8,W=R&255,++q;return U?Y.push(q):Y.unshift(q),this.update(Y),Y.length},A.prototype.encodeString=function(R){var U,W=typeof R;if(W!=="string"){if(W==="object"){if(R===null)throw new Error(e);if(c&&R.constructor===ArrayBuffer)R=new Uint8Array(R);else if(!Array.isArray(R)&&(!c||!ArrayBuffer.isView(R)))throw new Error(e)}else throw new Error(e);U=!0}var q=0,Y=R.length;if(U)q=Y;else for(var X=0;X=57344?q+=3:(Q=65536+((Q&1023)<<10|R.charCodeAt(++X)&1023),q+=4)}return q+=this.encode(q*8),this.update(R),q},A.prototype.bytepad=function(R,U){for(var W=this.encode(U),q=0;q>2]|=this.padding[U&3],this.lastByteIndex===this.byteCount)for(R[0]=R[W],U=1;U>4&15]+l[Z&15]+l[Z>>12&15]+l[Z>>8&15]+l[Z>>20&15]+l[Z>>16&15]+l[Z>>28&15]+l[Z>>24&15];X%R===0&&(V(U),Y=0)}return q&&(Z=U[Y],Q+=l[Z>>4&15]+l[Z&15],q>1&&(Q+=l[Z>>12&15]+l[Z>>8&15]),q>2&&(Q+=l[Z>>20&15]+l[Z>>16&15])),Q},A.prototype.arrayBuffer=function(){this.finalize();var R=this.blockCount,U=this.s,W=this.outputBlocks,q=this.extraBytes,Y=0,X=0,Q=this.outputBits>>3,Z;q?Z=new ArrayBuffer(W+1<<2):Z=new ArrayBuffer(Q);for(var ae=new Uint32Array(Z);X>8&255,Q[Z+2]=ae>>16&255,Q[Z+3]=ae>>24&255;X%R===0&&V(U)}return q&&(Z=X<<2,ae=U[Y],Q[Z]=ae&255,q>1&&(Q[Z+1]=ae>>8&255),q>2&&(Q[Z+2]=ae>>16&255)),Q};function D(R,U,W){A.call(this,R,U,W)}D.prototype=new A,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var V=function(R){var U,W,q,Y,X,Q,Z,ae,se,ue,ot,Pe,Ae,at,xe,be,Vt,Te,Ie,Gt,Oe,Re,Kt,$e,Me,Qt,Ne,De,Yt,Le,wt,jc,Et,xt,Uc,Ct,St,zc,kt,At,Wc,_t,Pt,Hc,Tt,It,qc,Ot,Rt,Vc,$t,Mt,Gc,Nt,Dt,Kc,Lt,Ft,va,ma,ya,ga,ba;for(q=0;q<48;q+=2)Y=R[0]^R[10]^R[20]^R[30]^R[40],X=R[1]^R[11]^R[21]^R[31]^R[41],Q=R[2]^R[12]^R[22]^R[32]^R[42],Z=R[3]^R[13]^R[23]^R[33]^R[43],ae=R[4]^R[14]^R[24]^R[34]^R[44],se=R[5]^R[15]^R[25]^R[35]^R[45],ue=R[6]^R[16]^R[26]^R[36]^R[46],ot=R[7]^R[17]^R[27]^R[37]^R[47],Pe=R[8]^R[18]^R[28]^R[38]^R[48],Ae=R[9]^R[19]^R[29]^R[39]^R[49],U=Pe^(Q<<1|Z>>>31),W=Ae^(Z<<1|Q>>>31),R[0]^=U,R[1]^=W,R[10]^=U,R[11]^=W,R[20]^=U,R[21]^=W,R[30]^=U,R[31]^=W,R[40]^=U,R[41]^=W,U=Y^(ae<<1|se>>>31),W=X^(se<<1|ae>>>31),R[2]^=U,R[3]^=W,R[12]^=U,R[13]^=W,R[22]^=U,R[23]^=W,R[32]^=U,R[33]^=W,R[42]^=U,R[43]^=W,U=Q^(ue<<1|ot>>>31),W=Z^(ot<<1|ue>>>31),R[4]^=U,R[5]^=W,R[14]^=U,R[15]^=W,R[24]^=U,R[25]^=W,R[34]^=U,R[35]^=W,R[44]^=U,R[45]^=W,U=ae^(Pe<<1|Ae>>>31),W=se^(Ae<<1|Pe>>>31),R[6]^=U,R[7]^=W,R[16]^=U,R[17]^=W,R[26]^=U,R[27]^=W,R[36]^=U,R[37]^=W,R[46]^=U,R[47]^=W,U=ue^(Y<<1|X>>>31),W=ot^(X<<1|Y>>>31),R[8]^=U,R[9]^=W,R[18]^=U,R[19]^=W,R[28]^=U,R[29]^=W,R[38]^=U,R[39]^=W,R[48]^=U,R[49]^=W,at=R[0],xe=R[1],It=R[11]<<4|R[10]>>>28,qc=R[10]<<4|R[11]>>>28,De=R[20]<<3|R[21]>>>29,Yt=R[21]<<3|R[20]>>>29,ma=R[31]<<9|R[30]>>>23,ya=R[30]<<9|R[31]>>>23,_t=R[40]<<18|R[41]>>>14,Pt=R[41]<<18|R[40]>>>14,xt=R[2]<<1|R[3]>>>31,Uc=R[3]<<1|R[2]>>>31,be=R[13]<<12|R[12]>>>20,Vt=R[12]<<12|R[13]>>>20,Ot=R[22]<<10|R[23]>>>22,Rt=R[23]<<10|R[22]>>>22,Le=R[33]<<13|R[32]>>>19,wt=R[32]<<13|R[33]>>>19,ga=R[42]<<2|R[43]>>>30,ba=R[43]<<2|R[42]>>>30,Nt=R[5]<<30|R[4]>>>2,Dt=R[4]<<30|R[5]>>>2,Ct=R[14]<<6|R[15]>>>26,St=R[15]<<6|R[14]>>>26,Te=R[25]<<11|R[24]>>>21,Ie=R[24]<<11|R[25]>>>21,Vc=R[34]<<15|R[35]>>>17,$t=R[35]<<15|R[34]>>>17,jc=R[45]<<29|R[44]>>>3,Et=R[44]<<29|R[45]>>>3,$e=R[6]<<28|R[7]>>>4,Me=R[7]<<28|R[6]>>>4,Kc=R[17]<<23|R[16]>>>9,Lt=R[16]<<23|R[17]>>>9,zc=R[26]<<25|R[27]>>>7,kt=R[27]<<25|R[26]>>>7,Gt=R[36]<<21|R[37]>>>11,Oe=R[37]<<21|R[36]>>>11,Mt=R[47]<<24|R[46]>>>8,Gc=R[46]<<24|R[47]>>>8,Hc=R[8]<<27|R[9]>>>5,Tt=R[9]<<27|R[8]>>>5,Qt=R[18]<<20|R[19]>>>12,Ne=R[19]<<20|R[18]>>>12,Ft=R[29]<<7|R[28]>>>25,va=R[28]<<7|R[29]>>>25,At=R[38]<<8|R[39]>>>24,Wc=R[39]<<8|R[38]>>>24,Re=R[48]<<14|R[49]>>>18,Kt=R[49]<<14|R[48]>>>18,R[0]=at^~be&Te,R[1]=xe^~Vt&Ie,R[10]=$e^~Qt&De,R[11]=Me^~Ne&Yt,R[20]=xt^~Ct&zc,R[21]=Uc^~St&kt,R[30]=Hc^~It&Ot,R[31]=Tt^~qc&Rt,R[40]=Nt^~Kc&Ft,R[41]=Dt^~Lt&va,R[2]=be^~Te&Gt,R[3]=Vt^~Ie&Oe,R[12]=Qt^~De&Le,R[13]=Ne^~Yt&wt,R[22]=Ct^~zc&At,R[23]=St^~kt&Wc,R[32]=It^~Ot&Vc,R[33]=qc^~Rt&$t,R[42]=Kc^~Ft&ma,R[43]=Lt^~va&ya,R[4]=Te^~Gt&Re,R[5]=Ie^~Oe&Kt,R[14]=De^~Le&jc,R[15]=Yt^~wt&Et,R[24]=zc^~At&_t,R[25]=kt^~Wc&Pt,R[34]=Ot^~Vc&Mt,R[35]=Rt^~$t&Gc,R[44]=Ft^~ma&ga,R[45]=va^~ya&ba,R[6]=Gt^~Re&at,R[7]=Oe^~Kt&xe,R[16]=Le^~jc&$e,R[17]=wt^~Et&Me,R[26]=At^~_t&xt,R[27]=Wc^~Pt&Uc,R[36]=Vc^~Mt&Hc,R[37]=$t^~Gc&Tt,R[46]=ma^~ga&Nt,R[47]=ya^~ba&Dt,R[8]=Re^~at&be,R[9]=Kt^~xe&Vt,R[18]=jc^~$e&Qt,R[19]=Et^~Me&Ne,R[28]=_t^~xt&Ct,R[29]=Pt^~Uc&St,R[38]=Mt^~Hc&It,R[39]=Gc^~Tt&qc,R[48]=ga^~Nt&Kc,R[49]=ba^~Dt&Lt,R[0]^=v[q],R[1]^=v[q+1]};if(a)t.exports=E;else for(O=0;O<_.length;++O)i[_[O]]=E[_[O]]})()})(AR);var KV=AR.exports;const QV=As(KV);function Fe(t){return"0x"+QV.keccak_256(ne(t))}const YV="rlp/5.7.0",Us=new ee(YV);function eA(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function tA(t,e,r){let n=0;for(let i=0;ie+1+n&&Us.throwError("child data too short",ee.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function PR(t,e){if(t.length===0&&Us.throwError("data too short",ee.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&Us.throwError("data short segment too short",ee.errors.BUFFER_OVERRUN,{});const n=tA(t,e+1,r);return e+1+r+n>t.length&&Us.throwError("data long segment too short",ee.errors.BUFFER_OVERRUN,{}),rA(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&Us.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{}),rA(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&Us.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const n=tA(t,e+1,r);e+1+r+n>t.length&&Us.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const i=te(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:i}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&Us.throwError("data too short",ee.errors.BUFFER_OVERRUN,{});const n=te(t.slice(e+1,e+1+r));return{consumed:1+r,result:n}}return{consumed:1,result:te(t[e])}}function yg(t){const e=ne(t),r=PR(e,0);return r.consumed!==e.length&&Us.throwArgumentError("invalid rlp data","data",t),r.result}const JV=Object.freeze(Object.defineProperty({__proto__:null,decode:yg,encode:Ml},Symbol.toStringTag,{value:"Module"})),XV="address/5.7.0",ja=new ee(XV);function nA(t){Be(t,20)||ja.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let i=0;i<40;i++)r[i]=e[i].charCodeAt(0);const n=ne(Fe(r));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}const ZV=9007199254740991;function eG(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const K6={};for(let t=0;t<10;t++)K6[String(t)]=String(t);for(let t=0;t<26;t++)K6[String.fromCharCode(65+t)]=String(10+t);const iA=Math.floor(eG(ZV));function TR(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>K6[n]).join("");for(;e.length>=iA;){let n=e.substring(0,iA);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function qe(t){let e=null;if(typeof t!="string"&&ja.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=nA(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&ja.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==TR(t)&&ja.throwArgumentError("bad icap checksum","address",t),e=DV(t.substring(4));e.length<40;)e="0"+e;e=nA("0x"+e)}else ja.throwArgumentError("invalid address","address",t);return e}function IR(t){try{return qe(t),!0}catch{}return!1}function tG(t){let e=LV(qe(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+TR("XE00"+e)+e}function Q6(t){let e=null;try{e=qe(t.from)}catch{ja.throwArgumentError("missing from address","transaction",t)}const r=to(ne(J.from(t.nonce).toHexString()));return qe(br(Fe(Ml([e,r])),12))}function rG(t,e,r){return uo(e)!==32&&ja.throwArgumentError("salt must be 32 bytes","salt",e),uo(r)!==32&&ja.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),qe(br(Fe(Wt(["0xff",qe(t),e,r])),12))}class nG extends aa{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=qe(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return qe(ft(e.readValue().toHexString(),20))}}class iG extends aa{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}const qu=new ee(C1);function OR(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return u||qu.throwError("cannot encode object for signature with missing names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]&&qu.throwError("cannot encode object for signature with duplicate names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),c[u]=!0,r[u]})}else qu.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&qu.throwArgumentError("types/value length mismatch","tuple",r);let i=new yx(t.wordSize),s=new yx(t.wordSize),o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let f=s.length;c.encode(s,u);let d=i.writeUpdatableValue();o.push(h=>{d(h+f)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=t.appendWriter(i);return a+=t.appendWriter(s),a}function RR(t,e){let r=[],n=t.subReader(0);e.forEach(s=>{let o=null;if(s.dynamic){let a=t.readValue(),c=n.subReader(a.toNumber());try{o=s.decode(c)}catch(l){if(l.code===ee.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(t)}catch(a){if(a.code===ee.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}o!=null&&r.push(o)});const i=e.reduce((s,o)=>{const a=o.localName;return a&&(s[a]||(s[a]=0),s[a]++),s},{});e.forEach((s,o)=>{let a=s.localName;if(!a||i[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const c=r[o];c instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw c}}):r[a]=c});for(let s=0;s{throw o}})}return Object.freeze(r)}class sG extends aa{constructor(e,r,n){const i=e.type+"["+(r>=0?r:"")+"]",s=r===-1||e.dynamic;super("array",i,n,s),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&qu.throwError("insufficient data length",ee.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let i=0;i>6===2;o++)s++;return s}return t===Vn.OVERRUN?r.length-e-1:0}function vG(t,e,r,n,i){return t===Vn.OVERLONG?(n.push(i),0):(n.push(65533),LR(t,e,r))}const FR=Object.freeze({error:pG,ignore:LR,replace:vG});function Y6(t,e){e==null&&(e=FR.error),t=ne(t);const r=[];let n=0;for(;n>7)){r.push(i);continue}let s=null,o=null;if((i&224)===192)s=1,o=127;else if((i&240)===224)s=2,o=2047;else if((i&248)===240)s=3,o=65535;else{(i&192)===128?n+=e(Vn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Vn.BAD_PREFIX,n-1,t,r);continue}if(n-1+s>=t.length){n+=e(Vn.OVERRUN,n-1,t,r);continue}let a=i&(1<<8-s-1)-1;for(let c=0;c1114111){n+=e(Vn.OUT_OF_RANGE,n-1-s,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Vn.UTF16_SURROGATE,n-1-s,t,r,a);continue}if(a<=o){n+=e(Vn.OVERLONG,n-1-s,t,r,a);continue}r.push(a)}}return r}function bt(t,e=Wo.current){e!=Wo.current&&(DR.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;const s=t.charCodeAt(n);if(n>=t.length||(s&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((i&1023)<<10)+(s&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return ne(r)}function Kw(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function mG(t,e){return'"'+Y6(t,e).map(r=>{if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Kw(r):(r-=65536,Kw((r>>10&1023)+55296)+Kw((r&1023)+56320))}).join("")+'"'}function gx(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function ca(t,e){return gx(Y6(t,e))}function Im(t,e=Wo.current){return Y6(bt(t,e))}function yG(t){const e=bt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return te(Wt([e,Tm]).slice(0,32))}function gG(t){const e=ne(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return ca(e.slice(0,r))}function bG(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let s=i.split(":");r+=parseInt(s[0],16),n[r]=e(s[1])}),n}function BR(t){let e=0;return t.split(",").map(r=>{let n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");let i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function X6(t,e){let r=0;for(let n=0;n=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}const wG=BR("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),EG="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),xG=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],CG=J6("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),SG=J6("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),kG=J6("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",bG),AG=BR("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function _G(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function PG(t){return!!X6(t,wG)}function TG(t){let e=X6(t,xG);if(e)return[t+e.s];let r=CG[t];if(r)return r;let n=SG[t];if(n)return[t+n[0]];let i=kG[t];return i||null}function IG(t){return!!X6(t,AG)}function OG(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=Im(t);e=_G(e.map(n=>{if(EG.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let i=TG(n);return i||[n]})),e=Im(gx(e),Wo.NFKC),e.forEach(n=>{if(IG(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(PG(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=gx(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class RG extends $R{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,bt(r))}decode(e){return ca(super.decode(e))}}class Pp extends aa{constructor(e,r){let n=!1;const i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});const s="tuple("+i.join(",")+")";super("tuple",s,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,i)=>{const s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||r[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,r){return OR(e,this.coders,r)}decode(e){return e.coerce(this.name,RR(e,this.coders))}}const Tp=new ee(C1),$G=new RegExp(/^bytes([0-9]*)$/),MG=new RegExp(/^(u?int)([0-9]*)$/);class Z6{constructor(e){ie(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new nG(e.name);case"bool":return new oG(e.name);case"string":return new RG(e.name);case"bytes":return new aG(e.name);case"array":return new sG(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new Pp((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new lG(e.name)}let r=e.type.match(MG);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Tp.throwArgumentError("invalid "+r[1]+" bit length","param",e),new dG(n/8,r[1]==="int",e.name)}if(r=e.type.match($G),r){let n=parseInt(r[1]);return(n===0||n>32)&&Tp.throwArgumentError("invalid bytes length","param",e),new cG(n,e.name)}return Tp.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Pm(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new yx(this._getWordSize())}getDefaultValue(e){const r=e.map(i=>this._getCoder(Nr.from(i)));return new Pp(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Tp.throwError("types/values length mismatch",ee.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});const n=e.map(o=>this._getCoder(Nr.from(o))),i=new Pp(n,"_"),s=this._getWriter();return i.encode(s,r),s.data}decode(e,r,n){const i=e.map(o=>this._getCoder(Nr.from(o)));return new Pp(i,"_").decode(this._getReader(ne(r),n))}}const Fn=new Z6;function Ua(t){return Fe(bt(t))}const jR="hash/5.7.0";function e3(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?i(a,o-1):r.push(a)})};return i(t,e),r}function DG(t){const e={};for(let r=0;r>--c&1}const f=31,d=Math.pow(2,f),h=d>>>1,p=h>>1,v=d-1;let b=0;for(let P=0;P1;){let j=T+w>>>1;P>>1|u(),I=I<<1^h,B=(B^h)<<1|h|1;m=I,g=1+B-I}let S=n-4;return y.map(P=>{switch(P-S){case 3:return S+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return S+256+(t[a++]<<8|t[a++]);case 1:return S+t[a++];default:return P-1}})}function FG(t){let e=0;return()=>t[e++]}function BG(t){return FG(LG(t))}function jG(t){return t&1?~t>>1:t>>1}function UG(t,e){let r=Array(t);for(let n=0;ne[o]):r}function WG(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(qG(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(VG(r,t))}return DG(UR(e))}function HG(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function zR(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let i=0;in[o].push(s));return n}function qG(t,e){let r=1+e(),n=e(),i=HG(e),s=zR(i.length,1+t,e);return UR(s.map((o,a)=>{const c=o[0],l=o.slice(1);return Array(i[a]).fill(void 0).map((u,f)=>{let d=f*n;return[c+f*r,l.map(h=>h+d)]})}))}function VG(t,e){let r=1+e();return zR(r,1+t,e).map(i=>[i[0],i.slice(1)])}function GG(t){let e=Om(t).sort((n,i)=>n-i);return r();function r(){let n=[];for(;;){let l=Om(t,e);if(l.length==0)break;n.push({set:new Set(l),node:r()})}n.sort((l,u)=>u.set.size-l.set.size);let i=t(),s=i%3;i=i/3|0;let o=!!(i&1);i>>=1;let a=i==1,c=i==2;return{branches:n,valid:s,fe0f:o,save:a,check:c}}}function KG(){return BG(e3("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 gg=KG(),QG=new Set(Om(gg)),YG=new Set(Om(gg)),JG=WG(gg),XG=GG(gg),oA=45,aA=95;function WR(t){return Im(t)}function ZG(t){return t.filter(e=>e!=65039)}function HR(t){for(let e of t.split(".")){let r=WR(e);try{for(let n=r.lastIndexOf(aA)-1;n>=0;n--)if(r[n]!==aA)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===oA&&r[3]===oA)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function eK(t){return HR(tK(t,ZG))}function tK(t,e){let r=WR(t).reverse(),n=[];for(;r.length;){let i=nK(r);if(i){n.push(...e(i));continue}let s=r.pop();if(QG.has(s)){n.push(s);continue}if(YG.has(s))continue;let o=JG[s];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${s.toString(16).toUpperCase()}`)}return HR(rK(String.fromCodePoint(...n)))}function rK(t){return t.normalize("NFC")}function nK(t,e){var r;let n=XG,i,s,o=[],a=t.length;for(e&&(e.length=0);a;){let c=t[--a];if(n=(r=n.branches.find(l=>l.set.has(c)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)s=c;else if(n.check&&c===s)break;o.push(c),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(i=o.slice(),n.valid==2&&i.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return i}const iK=new ee(jR),qR=new Uint8Array(32);qR.fill(0);function cA(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function r3(t){const e=bt(eK(t)),r=[];if(t.length===0)return r;let n=0;for(let i=0;i=e.length)throw new Error("invalid ENS name; empty component");return r.push(cA(e.slice(n))),r}function sK(t){try{return r3(t).length!==0}catch{}return!1}function Ih(t){typeof t!="string"&&iK.throwArgumentError("invalid ENS name; not a string","name",t);let e=qR;const r=r3(t);for(;r.length;)e=Fe(Wt([e,Fe(r.pop())]));return te(e)}function VR(t){return te(Wt(r3(t).map(e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}const oK=`Ethereum Signed Message: +`;function n3(t){return typeof t=="string"&&(t=bt(t)),Fe(Wt([bt(oK),bt(String(t.length)),t]))}var aK=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const nr=new ee(jR),GR=new Uint8Array(32);GR.fill(0);const cK=J.from(-1),KR=J.from(0),QR=J.from(1),lK=J.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function uK(t){const e=ne(t),r=e.length%32;return r?On([e,GR.slice(r)]):te(e)}const fK=ft(QR.toHexString(),32),dK=ft(KR.toHexString(),32),lA={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Qw=["name","version","chainId","verifyingContract","salt"];function uA(t){return function(e){return typeof e!="string"&&nr.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const hK={name:uA("name"),version:uA("version"),chainId:function(t){try{return J.from(t).toString()}catch{}return nr.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return qe(t).toLowerCase()}catch{}return nr.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const e=ne(t);if(e.length!==32)throw new Error("bad length");return te(e)}catch{}return nr.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function Yw(t){{const e=t.match(/^(u?)int(\d*)$/);if(e){const r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&nr.throwArgumentError("invalid numeric width","type",t);const i=lK.mask(r?n-1:n),s=r?i.add(QR).mul(cK):KR;return function(o){const a=J.from(o);return(a.lt(s)||a.gt(i))&&nr.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),ft(a.toTwos(256).toHexString(),32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return(r===0||r>32||e[1]!==String(r))&&nr.throwArgumentError("invalid bytes width","type",t),function(n){return ne(n).length!==r&&nr.throwArgumentError(`invalid length for ${t}`,"value",n),uK(n)}}}switch(t){case"address":return function(e){return ft(qe(e),32)};case"bool":return function(e){return e?fK:dK};case"bytes":return function(e){return Fe(e)};case"string":return function(e){return Ua(e)}}return null}function fA(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Wr{constructor(e){ie(this,"types",Object.freeze(vi(e))),ie(this,"_encoderCache",{}),ie(this,"_types",{});const r={},n={},i={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],i[a]={}});for(const a in e){const c={};e[a].forEach(l=>{c[l.name]&&nr.throwArgumentError(`duplicate variable name ${JSON.stringify(l.name)} in ${JSON.stringify(a)}`,"types",e),c[l.name]=!0;const u=l.type.match(/^([^\x5b]*)(\x5b|$)/)[1];u===a&&nr.throwArgumentError(`circular type reference to ${JSON.stringify(u)}`,"types",e),!Yw(u)&&(n[u]||nr.throwArgumentError(`unknown type ${JSON.stringify(u)}`,"types",e),n[u].push(a),r[a][u]=!0)})}const s=Object.keys(n).filter(a=>n[a].length===0);s.length===0?nr.throwArgumentError("missing primary type","types",e):s.length>1&&nr.throwArgumentError(`ambiguous primary types or unused types: ${s.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),ie(this,"primaryType",s[0]);function o(a,c){c[a]&&nr.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),c[a]=!0,Object.keys(r[a]).forEach(l=>{n[l]&&(o(l,c),Object.keys(c).forEach(u=>{i[u][l]=!0}))}),delete c[a]}o(this.primaryType,{});for(const a in i){const c=Object.keys(i[a]);c.sort(),this._types[a]=fA(a,e[a])+c.map(l=>fA(l,e[l])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const i=Yw(e);if(i)return i}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const i=r[1],s=this.getEncoder(i),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&nr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let c=a.map(s);return this._types[i]&&(c=c.map(Fe)),Fe(On(c))}}const n=this.types[e];if(n){const i=Ua(this._types[e]);return s=>{const o=n.map(({name:a,type:c})=>{const l=this.getEncoder(c)(s[a]);return this._types[c]?Fe(l):l});return o.unshift(i),On(o)}}return nr.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||nr.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Fe(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(Yw(e))return n(e,r);const i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){const o=i[1],a=parseInt(i[3]);return a>=0&&r.length!==a&&nr.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(c=>this._visit(o,c,n))}const s=this.types[e];return s?s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{}):nr.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Wr(e)}static getPrimaryType(e){return Wr.from(e).primaryType}static hashStruct(e,r,n){return Wr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const i=lA[n];i||nr.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:i})}return r.sort((n,i)=>Qw.indexOf(n.name)-Qw.indexOf(i.name)),Wr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return On(["0x1901",Wr.hashDomain(e),Wr.from(r).hash(n)])}static hash(e,r,n){return Fe(Wr.encode(e,r,n))}static resolveNames(e,r,n,i){return aK(this,void 0,void 0,function*(){e=Ht(e);const s={};e.verifyingContract&&!Be(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");const o=Wr.from(r);o.visit(n,(a,c)=>(a==="address"&&!Be(c,20)&&(s[c]="0x"),c));for(const a in s)s[a]=yield i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}})}static getPayload(e,r,n){Wr.hashDomain(e);const i={},s=[];Qw.forEach(c=>{const l=e[c];l!=null&&(i[c]=hK[c](l),s.push({name:c,type:lA[c]}))});const o=Wr.from(r),a=Ht(r);return a.EIP712Domain?nr.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return te(ne(l));if(c.match(/^u?int/))return J.from(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return typeof l!="string"&&nr.throwArgumentError("invalid string","value",l),l}return nr.throwArgumentError("unsupported type","type",c)})}}}const tr=new ee(C1);class YR extends x1{}class JR extends x1{}class pK extends x1{}class Rm extends x1{static isIndexed(e){return!!(e&&e._isIndexed)}}const vK={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function dA(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class Fr{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,ie(this,"fragments",r.map(n=>Ys.from(n)).filter(n=>n!=null)),ie(this,"_abiCoder",hs(new.target,"getAbiCoder")()),ie(this,"functions",{}),ie(this,"errors",{}),ie(this,"events",{}),ie(this,"structs",{}),this.fragments.forEach(n=>{let i=null;switch(n.type){case"constructor":if(this.deploy){tr.warn("duplicate definition - constructor");return}ie(this,"deploy",n);return;case"function":i=this.functions;break;case"event":i=this.events;break;case"error":i=this.errors;break;default:return}let s=n.format();if(i[s]){tr.warn("duplicate definition - "+s);return}i[s]=n}),this.deploy||ie(this,"deploy",fs.from({payable:!1,type:"constructor"})),ie(this,"_isInterface",!0)}format(e){e||(e=et.full),e===et.sighash&&tr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===et.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Fn}static getAddress(e){return qe(e)}static getSighash(e){return br(Ua(e.format()),0,4)}static getEventTopic(e){return Ua(e.format())}getFunction(e){if(Be(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];tr.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.functions).filter(s=>s.split("(")[0]===n);return i.length===0?tr.throwArgumentError("no matching function","name",n):i.length>1&&tr.throwArgumentError("multiple matching functions","name",n),this.functions[i[0]]}const r=this.functions[ds.fromString(e).format()];return r||tr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(Be(e)){const n=e.toLowerCase();for(const i in this.events)if(n===this.getEventTopic(i))return this.events[i];tr.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.events).filter(s=>s.split("(")[0]===n);return i.length===0?tr.throwArgumentError("no matching event","name",n):i.length>1&&tr.throwArgumentError("multiple matching events","name",n),this.events[i[0]]}const r=this.events[Gs.fromString(e).format()];return r||tr.throwArgumentError("no matching event","signature",e),r}getError(e){if(Be(e)){const n=hs(this.constructor,"getSighash");for(const i in this.errors){const s=this.errors[i];if(e===n(s))return this.errors[i]}tr.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),i=Object.keys(this.errors).filter(s=>s.split("(")[0]===n);return i.length===0?tr.throwArgumentError("no matching error","name",n):i.length>1&&tr.throwArgumentError("multiple matching errors","name",n),this.errors[i[0]]}const r=this.errors[ds.fromString(e).format()];return r||tr.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e)}catch(r){try{e=this.getError(e)}catch{throw r}}return hs(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),hs(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&tr.throwArgumentError(`data signature does not match error ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),te(Wt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));const n=ne(r);return te(n.slice(0,4))!==this.getSighash(e)&&tr.throwArgumentError(`data signature does not match function ${e.name}.`,"data",te(n)),this._decodeParams(e.inputs,n.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(Wt([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ne(r),i=null,s="",o=null,a=null,c=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const l=te(n.slice(0,4)),u=vK[l];if(u)o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,c=u.signature,u.reason&&(i=o[0]),a==="Error"?s=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(s=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const f=this.getError(l);o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,c=f.format()}catch{}break}}return tr.throwError("call revert exception"+s,ee.errors.CALL_EXCEPTION,{method:e.format(),data:te(r),errorArgs:o,errorName:a,errorSignature:c,reason:i})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),te(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&tr.throwError("too many arguments for "+e.format(),ee.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let n=[];e.anonymous||n.push(this.getEventTopic(e));const i=(s,o)=>s.type==="string"?Ua(o):s.type==="bytes"?Fe(te(o)):(s.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),s.type.match(/^u?int/)&&(o=J.from(o).toHexString()),s.type==="address"&&this._abiCoder.encode(["address"],[o]),ft(te(o),32));for(r.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){s!=null&&tr.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?tr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],i=[],s=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&tr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Ua(c));else if(o.type==="bytes")n.push(Fe(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:this._abiCoder.encode(i,s),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!Be(n[0],32)||n[0].toLowerCase()!==d)&&tr.throwError("fragment/topic mismatch",ee.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(i.push(Nr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(i.push(d),o.push(!1)):(s.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(i,Wt(n)):null,c=this._abiCoder.decode(s,r,!0),l=[],u=0,f=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)l[h]=new Rm({_isIndexed:!0,hash:null});else if(o[h])l[h]=new Rm({_isIndexed:!0,hash:a[f++]});else try{l[h]=a[f++]}catch(p){l[h]=p}else try{l[h]=c[u++]}catch(p){l[h]=p}if(d.name&&l[d.name]==null){const p=l[h];p instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw dA(`property ${JSON.stringify(d.name)}`,p)}}):l[d.name]=p}});for(let d=0;d{throw dA(`index ${d}`,h)}})}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new JR({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:J.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new YR({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){const r=te(e);let n=this.getError(r.substring(0,10).toLowerCase());return n?new pK({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(e){return!!(e&&e._isInterface)}}const mK="abstract-provider/5.7.0";var yK=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const gK=new ee(mK);class bK extends x1{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class Tc{constructor(){gK.checkAbstract(new.target,Tc),ie(this,"_isProvider",!0)}getFeeData(){return yK(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield pt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,i=null,s=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,s=J.from("1500000000"),i=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:n,maxFeePerGas:i,maxPriorityFeePerGas:s,gasPrice:r}})}addListener(e,r){return this.on(e,r)}removeListener(e,r){return this.off(e,r)}static isProvider(e){return!!(e&&e._isProvider)}}const wK="abstract-signer/5.7.0";var Zi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Pi=new ee(wK),EK=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],xK=[ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED];let Nl=class XR{constructor(){Pi.checkAbstract(new.target,XR),ie(this,"_isSigner",!0)}getBalance(e){return Zi(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Zi(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Zi(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield pt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return Zi(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield pt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return Zi(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const r=yield this.populateTransaction(e),n=yield this.signTransaction(r);return yield this.provider.sendTransaction(n)})}getChainId(){return Zi(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Zi(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Zi(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Zi(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)EK.indexOf(n)===-1&&Pi.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Ht(e);return r.from==null?r.from=this.getAddress():r.from=Promise.all([Promise.resolve(r.from),this.getAddress()]).then(n=>(n[0].toLowerCase()!==n[1].toLowerCase()&&Pi.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return Zi(this,void 0,void 0,function*(){const r=yield pt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(i=>Zi(this,void 0,void 0,function*(){if(i==null)return null;const s=yield this.resolveName(i);return s==null&&Pi.throwArgumentError("provided ENS name resolves to null","tx.to",i),s})),r.to.catch(i=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Pi.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Pi.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1)r.gasPrice==null&&(r.gasPrice=this.getGasPrice());else{const i=yield this.getFeeData();if(r.type==null)if(i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const s=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=s,r.maxPriorityFeePerGas=s}else r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas);else i.gasPrice!=null?(n&&Pi.throwError("network does not support EIP-1559",ee.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):Pi.throwError("failed to get consistent fee data",ee.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(i=>{if(xK.indexOf(i.code)>=0)throw i;return Pi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:i,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(i=>(i[1]!==0&&i[0]!==i[1]&&Pi.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield pt(r)})}_checkProvider(e){this.provider||Pi.throwError("missing provider",ee.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class i3 extends Nl{constructor(e,r){super(),ie(this,"address",e),ie(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Pi.throwError(e,ee.errors.UNSUPPORTED_OPERATION,{operation:r})})}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,r,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new i3(this.address,e)}}var ZR={},Ye={},S1=e$;function e$(t,e){if(!t)throw new Error(e||"Assertion failed")}e$.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var bx={exports:{}};typeof Object.create=="function"?bx.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:bx.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var CK=bx.exports,SK=S1,kK=CK;Ye.inherits=kK;function AK(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function _K(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=s&63|128):AK(t,i)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(i=0;i>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ye.htonl=t$;function TK(t,e){for(var r="",n=0;n>>0}return s}Ye.join32=IK;function OK(t,e){for(var r=new Array(t.length*4),n=0,i=0;n>>24,r[i+1]=s>>>16&255,r[i+2]=s>>>8&255,r[i+3]=s&255):(r[i+3]=s>>>24,r[i+2]=s>>>16&255,r[i+1]=s>>>8&255,r[i]=s&255)}return r}Ye.split32=OK;function RK(t,e){return t>>>e|t<<32-e}Ye.rotr32=RK;function $K(t,e){return t<>>32-e}Ye.rotl32=$K;function MK(t,e){return t+e>>>0}Ye.sum32=MK;function NK(t,e,r){return t+e+r>>>0}Ye.sum32_3=NK;function DK(t,e,r,n){return t+e+r+n>>>0}Ye.sum32_4=DK;function LK(t,e,r,n,i){return t+e+r+n+i>>>0}Ye.sum32_5=LK;function FK(t,e,r,n){var i=t[e],s=t[e+1],o=n+s>>>0,a=(o>>0,t[e+1]=o}Ye.sum64=FK;function BK(t,e,r,n){var i=e+n>>>0,s=(i>>0}Ye.sum64_hi=BK;function jK(t,e,r,n){var i=e+n;return i>>>0}Ye.sum64_lo=jK;function UK(t,e,r,n,i,s,o,a){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Ye.sum64_4_hi=UK;function zK(t,e,r,n,i,s,o,a){var c=e+n+s+a;return c>>>0}Ye.sum64_4_lo=zK;function WK(t,e,r,n,i,s,o,a,c,l){var u=0,f=e;f=f+n>>>0,u+=f>>0,u+=f>>0,u+=f>>0,u+=f>>0}Ye.sum64_5_hi=WK;function HK(t,e,r,n,i,s,o,a,c,l){var u=e+n+s+a+l;return u>>>0}Ye.sum64_5_lo=HK;function qK(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Ye.rotr64_hi=qK;function VK(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ye.rotr64_lo=VK;function GK(t,e,r){return t>>>r}Ye.shr64_hi=GK;function KK(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Ye.shr64_lo=KK;var td={},hA=Ye,QK=S1;function bg(){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}td.BlockHash=bg;bg.prototype.update=function(e,r){if(e=hA.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=hA.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[s++]=e>>>16&255,i[s++]=e>>>8&255,i[s++]=e&255}else for(i[s++]=e&255,i[s++]=e>>>8&255,i[s++]=e>>>16&255,i[s++]=e>>>24&255,i[s++]=0,i[s++]=0,i[s++]=0,i[s++]=0,o=8;o>>3}bo.g0_256=eQ;function tQ(t){return ro(t,17)^ro(t,19)^t>>>10}bo.g1_256=tQ;var Tf=Ye,rQ=td,nQ=bo,Jw=Tf.rotl32,zd=Tf.sum32,iQ=Tf.sum32_5,sQ=nQ.ft_1,a$=rQ.BlockHash,oQ=[1518500249,1859775393,2400959708,3395469782];function fo(){if(!(this instanceof fo))return new fo;a$.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Tf.inherits(fo,a$);var aQ=fo;fo.blockSize=512;fo.outSize=160;fo.hmacStrength=80;fo.padLength=64;fo.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;ithis.blockSize&&(e=new this.Hash().update(e).digest()),KQ(e.length<=this.blockSize);for(var r=e.length;r>8,d=u&255;f?c.push(f,d):c.push(d)}return c}r.toArray=n;function i(o){return o.length===1?"0"+o:o}r.zero2=i;function s(o){for(var a="",c=0;c(d>>1)-1?v=(d>>1)-b:v=b,h.isubn(v)):v=0,f[p]=v,h.iushrn(1)}return f}r.getNAF=n;function i(c,l){var u=[[],[]];c=c.clone(),l=l.clone();for(var f=0,d=0,h;c.cmpn(-f)>0||l.cmpn(-d)>0;){var p=c.andln(3)+f&3,v=l.andln(3)+d&3;p===3&&(p=-1),v===3&&(v=-1);var b;p&1?(h=c.andln(7)+f&7,(h===3||h===5)&&v===2?b=-p:b=p):b=0,u[0].push(b);var y;v&1?(h=l.andln(7)+d&7,(h===3||h===5)&&p===2?y=-v:y=v):y=0,u[1].push(y),2*f===b+1&&(f=1-f),2*d===y+1&&(d=1-d),c.iushrn(1),l.iushrn(1)}return u}r.getJSF=i;function s(c,l,u){var f="_"+l;c.prototype[l]=function(){return this[f]!==void 0?this[f]:this[f]=u.call(this)}}r.cachedProperty=s;function o(c){return typeof c=="string"?r.toArray(c,"hex"):c}r.parseBytes=o;function a(c){return new _e(c,"hex","le")}r.intFromLE=a}),$m=Ci.getNAF,JQ=Ci.getJSF,Mm=Ci.assert;function Ic(t,e){this.type=t,this.p=new _e(e.p,16),this.red=e.prime?_e.red(e.prime):_e.mont(this.p),this.zero=new _e(0).toRed(this.red),this.one=new _e(1).toRed(this.red),this.two=new _e(2).toRed(this.red),this.n=e.n&&new _e(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.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 r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Xl=Ic;Ic.prototype.point=function(){throw new Error("Not implemented")};Ic.prototype.validate=function(){throw new Error("Not implemented")};Ic.prototype._fixedNafMul=function(e,r){Mm(e.precomputed);var n=e._getDoubles(),i=$m(r,1,this._bitLength),s=(1<=a;l--)c=(c<<1)+i[l];o.push(c)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=s;d>0;d--){for(a=0;a=0;c--){for(var l=0;c>=0&&o[c]===0;c--)l++;if(c>=0&&l++,a=a.dblp(l),c<0)break;var u=o[c];Mm(u!==0),e.type==="affine"?u>0?a=a.mixedAdd(s[u-1>>1]):a=a.mixedAdd(s[-u-1>>1].neg()):u>0?a=a.add(s[u-1>>1]):a=a.add(s[-u-1>>1].neg())}return e.type==="affine"?a.toP():a};Ic.prototype._wnafMulAdd=function(e,r,n,i,s){var o=this._wnafT1,a=this._wnafT2,c=this._wnafT3,l=0,u,f,d;for(u=0;u=1;u-=2){var p=u-1,v=u;if(o[p]!==1||o[v]!==1){c[p]=$m(n[p],o[p],this._bitLength),c[v]=$m(n[v],o[v],this._bitLength),l=Math.max(c[p].length,l),l=Math.max(c[v].length,l);continue}var b=[r[p],null,null,r[v]];r[p].y.cmp(r[v].y)===0?(b[1]=r[p].add(r[v]),b[2]=r[p].toJ().mixedAdd(r[v].neg())):r[p].y.cmp(r[v].y.redNeg())===0?(b[1]=r[p].toJ().mixedAdd(r[v]),b[2]=r[p].add(r[v].neg())):(b[1]=r[p].toJ().mixedAdd(r[v]),b[2]=r[p].toJ().mixedAdd(r[v].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],m=JQ(n[p],n[v]);for(l=Math.max(m[0].length,l),c[p]=new Array(l),c[v]=new Array(l),f=0;f=0;u--){for(var w=0;u>=0;){var I=!0;for(f=0;f=0&&w++,P=P.dblp(w),u<0)break;for(f=0;f0?d=a[f][B-1>>1]:B<0&&(d=a[f][-B-1>>1].neg()),d.type==="affine"?P=P.mixedAdd(d):P=P.add(d))}}for(u=0;u=Math.ceil((e.bitLength()+1)/r.step):!1};Gi.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,s=0;s=0&&(h=l,p=u),f.negative&&(f=f.neg(),d=d.neg()),h.negative&&(h=h.neg(),p=p.neg()),[{a:f,b:d},{a:h,b:p}]};Ki.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],s=i.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=s.mul(n.a),c=o.mul(i.a),l=s.mul(n.b),u=o.mul(i.b),f=e.sub(a).sub(c),d=l.add(u).neg();return{k1:f,k2:d}};Ki.prototype.pointFromX=function(e,r){e=new _e(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var s=i.fromRed().isOdd();return(r&&!s||!r&&s)&&(i=i.redNeg()),this.point(e,i)};Ki.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),s=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(s).cmpn(0)===0};Ki.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,s=this._endoWnafT2,o=0;o":""};Kr.prototype.isInfinity=function(){return this.inf};Kr.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};Kr.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),s=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),o=s.redSqr().redISub(this.x.redAdd(this.x)),a=s.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};Kr.prototype.getX=function(){return this.x.fromRed()};Kr.prototype.getY=function(){return this.y.fromRed()};Kr.prototype.mul=function(e){return e=new _e(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};Kr.prototype.mulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s):this.curve._wnafMulAdd(1,i,s,2)};Kr.prototype.jmulAdd=function(e,r,n){var i=[this,r],s=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,s,!0):this.curve._wnafMulAdd(1,i,s,2,!0)};Kr.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};Kr.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(s){return s.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};Kr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function sn(t,e,r,n){Xl.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _e(0)):(this.x=new _e(e,16),this.y=new _e(r,16),this.z=new _e(n,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}o3(sn,Xl.BasePoint);Ki.prototype.jpoint=function(e,r,n){return new sn(this,e,r,n)};sn.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};sn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};sn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),s=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),c=i.redSub(s),l=o.redSub(a);if(c.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var u=c.redSqr(),f=u.redMul(c),d=i.redMul(u),h=l.redSqr().redIAdd(f).redISub(d).redISub(d),p=l.redMul(d.redISub(h)).redISub(o.redMul(f)),v=this.z.redMul(e.z).redMul(c);return this.curve.jpoint(h,p,v)};sn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),s=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(i),c=s.redSub(o);if(a.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),u=l.redMul(a),f=n.redMul(l),d=c.redSqr().redIAdd(u).redISub(f).redISub(f),h=c.redMul(f.redISub(d)).redISub(s.redMul(u)),p=this.z.redMul(a);return this.curve.jpoint(d,h,p)};sn.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r=0)return!1;if(n.redIAdd(s),this.x.cmp(n)===0)return!0}};sn.prototype.inspect=function(){return this.isInfinity()?"":""};sn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var _v=id(function(t,e){var r=e;r.base=Xl,r.short=ZQ,r.mont=null,r.edwards=null}),Pv=id(function(t,e){var r=e,n=Ci.assert;function i(a){a.type==="short"?this.curve=new _v.short(a):a.type==="edwards"?this.curve=new _v.edwards(a):this.curve=new _v.mont(a),this.g=this.curve.g,this.n=this.curve.n,this.hash=a.hash,n(this.g.validate(),"Invalid curve"),n(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}r.PresetCurve=i;function s(a,c){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var l=new i(c);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:l}),l}})}s("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:qn.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("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:qn.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("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:qn.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("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:qn.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"]}),s("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:qn.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"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:qn.sha256,gRed:!1,g:["9"]}),s("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:qn.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}s("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:qn.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function cc(t){if(!(this instanceof cc))return new cc(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=ps.toArray(t.entropy,t.entropyEnc||"hex"),r=ps.toArray(t.nonce,t.nonceEnc||"hex"),n=ps.toArray(t.pers,t.persEnc||"hex");s3(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var b$=cc;cc.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};cc.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=ps.toArray(n,i||"hex"),this._update(n));for(var s=[];s.length"};var eY=Ci.assert;function wg(t,e){if(t instanceof wg)return t;this._importDER(t,e)||(eY(t.r&&t.s,"Signature without r or s"),this.r=new _e(t.r,16),this.s=new _e(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Eg=wg;function tY(){this.place=0}function e2(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4)return!1;for(var i=0,s=0,o=e.place;s>>=0;return i<=127?!1:(e.place=o,i)}function yA(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}wg.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=yA(r),n=yA(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];t2(i,r.length),i=i.concat(r),i.push(2),t2(i,n.length);var s=i.concat(n),o=[48];return t2(o,s.length),o=o.concat(s),Ci.encode(o,e)};var rY=function(){throw new Error("unsupported")},w$=Ci.assert;function Ui(t){if(!(this instanceof Ui))return new Ui(t);typeof t=="string"&&(w$(Object.prototype.hasOwnProperty.call(Pv,t),"Unknown curve "+t),t=Pv[t]),t instanceof Pv.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}var nY=Ui;Ui.prototype.keyPair=function(e){return new a3(this,e)};Ui.prototype.keyFromPrivate=function(e,r){return a3.fromPrivate(this,e,r)};Ui.prototype.keyFromPublic=function(e,r){return a3.fromPublic(this,e,r)};Ui.prototype.genKeyPair=function(e){e||(e={});for(var r=new b$({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||rY(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new _e(2));;){var s=new _e(r.generate(n));if(!(s.cmp(i)>0))return s.iaddn(1),this.keyFromPrivate(s)}};Ui.prototype._truncateToN=function(e,r){var n=e.byteLength()*8-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};Ui.prototype.sign=function(e,r,n,i){typeof n=="object"&&(i=n,n=null),i||(i={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new _e(e,16));for(var s=this.n.byteLength(),o=r.getPrivate().toArray("be",s),a=e.toArray("be",s),c=new b$({hash:this.hash,entropy:o,nonce:a,pers:i.pers,persEnc:i.persEnc||"utf8"}),l=this.n.sub(new _e(1)),u=0;;u++){var f=i.k?i.k(u):new _e(c.generate(this.n.byteLength()));if(f=this._truncateToN(f,!0),!(f.cmpn(1)<=0||f.cmp(l)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(p.cmpn(0)!==0){var v=f.invm(this.n).mul(p.mul(r.getPrivate()).iadd(e));if(v=v.umod(this.n),v.cmpn(0)!==0){var b=(d.getY().isOdd()?1:0)|(h.cmp(p)!==0?2:0);return i.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new Eg({r:p,s:v,recoveryParam:b})}}}}}};Ui.prototype.verify=function(e,r,n,i){e=this._truncateToN(new _e(e,16)),n=this.keyFromPublic(n,i),r=new Eg(r,"hex");var s=r.r,o=r.s;if(s.cmpn(1)<0||s.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),c=a.mul(e).umod(this.n),l=a.mul(s).umod(this.n),u;return this.curve._maxwellTrick?(u=this.g.jmulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.eqXToP(s)):(u=this.g.mulAdd(c,n.getPublic(),l),u.isInfinity()?!1:u.getX().umod(this.n).cmp(s)===0)};Ui.prototype.recoverPubKey=function(t,e,r,n){w$((3&r)===r,"The recovery param is more than two bits"),e=new Eg(e,n);var i=this.n,s=new _e(t),o=e.r,a=e.s,c=r&1,l=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");l?o=this.curve.pointFromX(o.add(this.curve.n),c):o=this.curve.pointFromX(o,c);var u=e.r.invm(i),f=i.sub(s).mul(u).umod(i),d=a.mul(u).umod(i);return this.g.mulAdd(f,o,d)};Ui.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Eg(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var s;try{s=this.recoverPubKey(t,e,i)}catch{continue}if(s.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var iY=id(function(t,e){var r=e;r.version="6.5.4",r.utils=Ci,r.rand=function(){throw new Error("unsupported")},r.curve=_v,r.curves=Pv,r.ec=nY,r.eddsa=null}),sY=iY.ec;const oY="signing-key/5.7.0",Cx=new ee(oY);let r2=null;function zs(){return r2||(r2=new sY("secp256k1")),r2}class Nm{constructor(e){ie(this,"curve","secp256k1"),ie(this,"privateKey",te(e)),uo(this.privateKey)!==32&&Cx.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=zs().keyFromPrivate(ne(this.privateKey));ie(this,"publicKey","0x"+r.getPublic(!1,"hex")),ie(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),ie(this,"_isSigningKey",!0)}_addPoint(e){const r=zs().keyFromPublic(ne(this.publicKey)),n=zs().keyFromPublic(ne(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=zs().keyFromPrivate(ne(this.privateKey)),n=ne(e);n.length!==32&&Cx.throwArgumentError("bad digest length","digest",e);const i=r.sign(n,{canonical:!0});return Jl({recoveryParam:i.recoveryParam,r:ft("0x"+i.r.toString(16),32),s:ft("0x"+i.s.toString(16),32)})}computeSharedSecret(e){const r=zs().keyFromPrivate(ne(this.privateKey)),n=zs().keyFromPublic(ne(c3(e)));return ft("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function E$(t,e){const r=Jl(e),n={r:ne(r.r),s:ne(r.s)};return"0x"+zs().recoverPubKey(ne(t),n,r.recoveryParam).encode("hex",!1)}function c3(t,e){const r=ne(t);if(r.length===32){const n=new Nm(r);return e?"0x"+zs().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?te(r):"0x"+zs().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+zs().keyFromPublic(r).getPublic(!0,"hex"):te(r)}return Cx.throwArgumentError("invalid public or private key","key","[REDACTED]")}const aY="transactions/5.7.0",mn=new ee(aY);var Sx;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(Sx||(Sx={}));function l3(t){return t==="0x"?null:qe(t)}function vn(t){return t==="0x"?er:J.from(t)}const cY=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],lY={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function u3(t){const e=c3(t);return qe(br(Fe(br(e,1)),12))}function Ll(t,e){return u3(E$(ne(t),e))}function ci(t,e){const r=to(J.from(t).toHexString());return r.length>32&&mn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function n2(t,e){return{address:qe(t),storageKeys:(e||[]).map((r,n)=>(uo(r)!==32&&mn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Zl(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&mn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),n2(r[0],r[1])):n2(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((i,s)=>(i[s]=!0,i),{});return n2(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function x$(t){return Zl(t).map(e=>[e.address,e.storageKeys])}function C$(t,e){if(t.gasPrice!=null){const n=J.from(t.gasPrice),i=J.from(t.maxFeePerGas||0);n.eq(i)||mn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:i})}const r=[ci(t.chainId||0,"chainId"),ci(t.nonce||0,"nonce"),ci(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),ci(t.maxFeePerGas||0,"maxFeePerGas"),ci(t.gasLimit||0,"gasLimit"),t.to!=null?qe(t.to):"0x",ci(t.value||0,"value"),t.data||"0x",x$(t.accessList||[])];if(e){const n=Jl(e);r.push(ci(n.recoveryParam,"recoveryParam")),r.push(to(n.r)),r.push(to(n.s))}return On(["0x02",Ml(r)])}function S$(t,e){const r=[ci(t.chainId||0,"chainId"),ci(t.nonce||0,"nonce"),ci(t.gasPrice||0,"gasPrice"),ci(t.gasLimit||0,"gasLimit"),t.to!=null?qe(t.to):"0x",ci(t.value||0,"value"),t.data||"0x",x$(t.accessList||[])];if(e){const n=Jl(e);r.push(ci(n.recoveryParam,"recoveryParam")),r.push(to(n.r)),r.push(to(n.s))}return On(["0x01",Ml(r)])}function uY(t,e){V6(t,lY);const r=[];cY.forEach(function(o){let a=t[o.name]||[];const c={};o.numeric&&(c.hexPad="left"),a=ne(te(a,c)),o.length&&a.length!==o.length&&a.length>0&&mn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=to(a),a.length>o.maxLength&&mn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a)),r.push(te(a))});let n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&mn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!zo(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push(te(n)),r.push("0x"),r.push("0x")),!e)return Ml(r);const i=Jl(e);let s=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),s+=n*2+8,i.v>28&&i.v!==s&&mn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==s&&mn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(te(s)),r.push(to(ne(i.r))),r.push(to(ne(i.s))),Ml(r)}function fY(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&mn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),uY(t,e);switch(t.type){case 1:return S$(t,e);case 2:return C$(t,e)}return mn.throwError(`unsupported transaction type: ${t.type}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function k$(t,e,r){try{const n=vn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{mn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ft(e[1],32),t.s=ft(e[2],32);try{const n=Fe(r(t));t.from=Ll(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function dY(t){const e=yg(t.slice(1));e.length!==9&&e.length!==12&&mn.throwArgumentError("invalid component count for transaction type: 2","payload",te(t));const r=vn(e[2]),n=vn(e[3]),i={type:2,chainId:vn(e[0]).toNumber(),nonce:vn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:vn(e[4]),to:l3(e[5]),value:vn(e[6]),data:e[7],accessList:Zl(e[8])};return e.length===9||(i.hash=Fe(t),k$(i,e.slice(9),C$)),i}function hY(t){const e=yg(t.slice(1));e.length!==8&&e.length!==11&&mn.throwArgumentError("invalid component count for transaction type: 1","payload",te(t));const r={type:1,chainId:vn(e[0]).toNumber(),nonce:vn(e[1]).toNumber(),gasPrice:vn(e[2]),gasLimit:vn(e[3]),to:l3(e[4]),value:vn(e[5]),data:e[6],accessList:Zl(e[7])};return e.length===8||(r.hash=Fe(t),k$(r,e.slice(8),S$)),r}function pY(t){const e=yg(t);e.length!==9&&e.length!==6&&mn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:vn(e[0]).toNumber(),gasPrice:vn(e[1]),gasLimit:vn(e[2]),to:l3(e[3]),value:vn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=J.from(e[6]).toNumber()}catch{return r}if(r.r=ft(e[7],32),r.s=ft(e[8],32),J.from(r.r).isZero()&&J.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=e.slice(0,6);r.chainId!==0&&(i.push(te(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);const s=Fe(Ml(i));try{r.from=Ll(s,{r:te(r.r),s:te(r.s),recoveryParam:n})}catch{}r.hash=Fe(t)}return r.type=null,r}function A$(t){const e=ne(t);if(e[0]>127)return pY(e);switch(e[0]){case 1:return hY(e);case 2:return dY(e)}return mn.throwError(`unsupported transaction type: ${e[0]}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const vY="contracts/5.7.0";var Fl=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const gr=new ee(vY);function Dm(t,e){return Fl(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&gr.throwArgumentError("invalid address or ENS name","name",r);try{return qe(r)}catch{}t||gr.throwError("a provider or signer is needed to resolve ENS names",ee.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(r);return n==null&&gr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Tv(t,e,r){return Fl(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,i)=>Tv(t,Array.isArray(e)?e[i]:e[n.name],n))):r.type==="address"?yield Dm(t,e):r.type==="tuple"?yield Tv(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Tv(t,n,r.arrayChildren))):Promise.reject(gr.makeError("invalid value for array",ee.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function xg(t,e,r){return Fl(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Ht(r.pop())),gr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=pt({override:Dm(t.signer,n.from),signer:t.signer.getAddress()}).then(l=>Fl(this,void 0,void 0,function*(){return qe(l.signer)!==l.override&&gr.throwError("Contract with a Signer cannot override from",ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),l.override})):n.from=t.signer.getAddress():n.from&&(n.from=Dm(t.provider,n.from));const i=yield pt({args:Tv(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:pt(n)||{}}),s=t.interface.encodeFunctionData(e,i.args),o={data:s,to:i.address},a=i.overrides;if(a.nonce!=null&&(o.nonce=J.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=J.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=J.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=J.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=J.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Zl(a.accessList)),o.gasLimit==null&&e.gas!=null){let l=21e3;const u=ne(s);for(let f=0;fn[l]!=null);return c.length&&gr.throwError(`cannot override ${c.map(l=>JSON.stringify(l)).join(",")}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:c}),o})}function mY(t,e){return function(...r){return xg(t,e,r)}}function yY(t,e){const r=t.signer||t.provider;return function(...n){return Fl(this,void 0,void 0,function*(){r||gr.throwError("estimate require a provider or signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield xg(t,e,n);return yield r.estimateGas(i)})}}function gY(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(i=>(i.events=i.logs.map(s=>{let o=vi(s),a=null;try{a=t.interface.parseLog(s)}catch{}return a&&(o.args=a.args,o.decode=(c,l)=>t.interface.decodeEventLog(a.eventFragment,c,l),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(i.blockHash),o.getTransaction=()=>t.provider.getTransaction(i.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(i),o}),i))}function _$(t,e,r){const n=t.signer||t.provider;return function(...i){return Fl(this,void 0,void 0,function*(){let s;if(i.length===e.inputs.length+1&&typeof i[i.length-1]=="object"){const c=Ht(i.pop());c.blockTag!=null&&(s=yield c.blockTag),delete c.blockTag,i.push(c)}t.deployTransaction!=null&&(yield t._deployed(s));const o=yield xg(t,e,i),a=yield n.call(o,s);try{let c=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(c=c[0]),c}catch(c){throw c.code===ee.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=i,c.transaction=o),c}})}}function bY(t,e){return function(...r){return Fl(this,void 0,void 0,function*(){t.signer||gr.throwError("sending a transaction requires a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield xg(t,e,r),i=yield t.signer.sendTransaction(n);return gY(t,i),i})}}function gA(t,e,r){return e.constant?_$(t,e,r):bY(t,e)}function P$(t){return t.address&&(t.topics==null||t.topics.length===0)?"*":(t.address||"*")+"@"+(t.topics?t.topics.map(e=>Array.isArray(e)?e.join("|"):e).join(":"):"")}class C0{constructor(e,r){ie(this,"tag",e),ie(this,"filter",r),this._listeners=[]}addListener(e,r){this._listeners.push({listener:e,once:r})}removeListener(e){let r=!1;this._listeners=this._listeners.filter(n=>r||n.listener!==e?!0:(r=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(e=>e.listener)}listenerCount(){return this._listeners.length}run(e){const r=this.listenerCount();return this._listeners=this._listeners.filter(n=>{const i=e.slice();return setTimeout(()=>{n.listener.apply(this,i)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class wY extends C0{constructor(){super("error",null)}}class bA extends C0{constructor(e,r,n,i){const s={address:e};let o=r.getEventTopic(n);i?(o!==i[0]&&gr.throwArgumentError("topic mismatch","topics",i),s.topics=i.slice()):s.topics=[o],super(P$(s),s),ie(this,"address",e),ie(this,"interface",r),ie(this,"fragment",n)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(r,n)=>this.interface.decodeEventLog(this.fragment,r,n);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(r){e.args=null,e.decodeError=r}}getEmit(e){const r=kR(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class wA extends C0{constructor(e,r){super("*",{address:e}),ie(this,"address",e),ie(this,"interface",r)}prepareEvent(e){super.prepareEvent(e);try{const r=this.interface.parseLog(e);e.event=r.name,e.eventSignature=r.signature,e.decode=(n,i)=>this.interface.decodeEventLog(r.eventFragment,n,i),e.args=r.args}catch{}}}class EY{constructor(e,r,n){ie(this,"interface",hs(new.target,"getInterface")(r)),n==null?(ie(this,"provider",null),ie(this,"signer",null)):Nl.isSigner(n)?(ie(this,"provider",n.provider||null),ie(this,"signer",n)):Tc.isProvider(n)?(ie(this,"provider",n),ie(this,"signer",null)):gr.throwArgumentError("invalid signer or provider","signerOrProvider",n),ie(this,"callStatic",{}),ie(this,"estimateGas",{}),ie(this,"functions",{}),ie(this,"populateTransaction",{}),ie(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const c=this.interface.events[a];ie(this.filters,a,(...l)=>({address:this.address,topics:this.interface.encodeFilterTopics(c,l)})),o[c.name]||(o[c.name]=[]),o[c.name].push(a)}),Object.keys(o).forEach(a=>{const c=o[a];c.length===1?ie(this.filters,a,this.filters[c[0]]):gr.warn(`Duplicate definition of ${a} (${c.join(", ")})`)})}if(ie(this,"_runningEvents",{}),ie(this,"_wrappedEmits",{}),e==null&&gr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),ie(this,"address",e),this.provider)ie(this,"resolvedAddress",Dm(this.provider,e));else try{ie(this,"resolvedAddress",Promise.resolve(qe(e)))}catch{gr.throwError("provider is required to use ENS name as contract address",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const i={},s={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(s[o]){gr.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}s[o]=!0;{const c=a.name;i[`%${c}`]||(i[`%${c}`]=[]),i[`%${c}`].push(o)}this[o]==null&&ie(this,o,gA(this,a,!0)),this.functions[o]==null&&ie(this.functions,o,gA(this,a,!1)),this.callStatic[o]==null&&ie(this.callStatic,o,_$(this,a,!0)),this.populateTransaction[o]==null&&ie(this.populateTransaction,o,mY(this,a)),this.estimateGas[o]==null&&ie(this.estimateGas,o,yY(this,a))}),Object.keys(i).forEach(o=>{const a=i[o];if(a.length>1)return;o=o.substring(1);const c=a[0];try{this[o]==null&&ie(this,o,this[c])}catch{}this.functions[o]==null&&ie(this.functions,o,this.functions[c]),this.callStatic[o]==null&&ie(this.callStatic,o,this.callStatic[c]),this.populateTransaction[o]==null&&ie(this.populateTransaction,o,this.populateTransaction[c]),this.estimateGas[o]==null&&ie(this.estimateGas,o,this.estimateGas[c])})}static getContractAddress(e){return Q6(e)}static getInterface(e){return Fr.isInterface(e)?e:new Fr(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,e).then(r=>(r==="0x"&&gr.throwError("contract not deployed",ee.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||gr.throwError("sending a transactions require a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Ht(e||{});return["from","to"].forEach(function(n){r[n]!=null&&gr.throwError("cannot override "+n,ee.errors.UNSUPPORTED_OPERATION,{operation:n})}),r.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(r))}connect(e){typeof e=="string"&&(e=new i3(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&ie(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Rm.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if(typeof e=="string"){if(e==="error")return this._normalizeRunningEvent(new wY);if(e==="event")return this._normalizeRunningEvent(new C0("event",null));if(e==="*")return this._normalizeRunningEvent(new wA(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new bA(this.address,this.interface,r))}if(e.topics&&e.topics.length>0){try{const n=e.topics[0];if(typeof n!="string")throw new Error("invalid topic");const i=this.interface.getEvent(n);return this._normalizeRunningEvent(new bA(this.address,this.interface,i,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new C0(P$(r),r))}return this._normalizeRunningEvent(new wA(this.address,this.interface))}_checkRunningEvents(e){if(e.listenerCount()===0){delete this._runningEvents[e.tag];const r=this._wrappedEmits[e.tag];r&&e.filter&&(this.provider.off(e.filter,r),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,r,n){const i=vi(r);return i.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},i.getBlock=()=>this.provider.getBlock(r.blockHash),i.getTransaction=()=>this.provider.getTransaction(r.transactionHash),i.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(i),i}_addEventListener(e,r,n){if(this.provider||gr.throwError("events require a provider or a signer with a provider",ee.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(r,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const i=s=>{let o=this._wrapEvent(e,s,r);if(o.decodeError==null)try{const a=e.getEmit(o);this.emit(e.filter,...a)}catch(a){o.decodeError=a.error}e.filter!=null&&this.emit("event",o),o.decodeError!=null&&this.emit("error",o.decodeError,o)};this._wrappedEmits[e.tag]=i,e.filter!=null&&this.provider.on(e.filter,i)}}queryFilter(e,r,n){const i=this._getRunningEvent(e),s=Ht(i.filter);return typeof r=="string"&&Be(r,32)?(n!=null&&gr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),s.blockHash=r):(s.fromBlock=r??0,s.toBlock=n??"latest"),this.provider.getLogs(s).then(o=>o.map(a=>this._wrapEvent(i,a,null)))}on(e,r){return this._addEventListener(this._getRunningEvent(e),r,!1),this}once(e,r){return this._addEventListener(this._getRunningEvent(e),r,!0),this}emit(e,...r){if(!this.provider)return!1;const n=this._getRunningEvent(e),i=n.run(r)>0;return this._checkRunningEvents(n),i}listenerCount(e){return this.provider?e==null?Object.keys(this._runningEvents).reduce((r,n)=>r+this._runningEvents[n].listenerCount(),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(e==null){const r=[];for(let n in this._runningEvents)this._runningEvents[n].listeners().forEach(i=>{r.push(i)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const i=this._runningEvents[n];i.removeAllListeners(),this._checkRunningEvents(i)}return this}const r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(e,r){if(!this.provider)return this;const n=this._getRunningEvent(e);return n.removeListener(r),this._checkRunningEvents(n),this}removeListener(e,r){return this.off(e,r)}}class sd extends EY{}class T${constructor(e){ie(this,"alphabet",e),ie(this,"base",e.length),ie(this,"_alphabetMap",{}),ie(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let i="";for(let s=0;r[s]===0&&s=0;--s)i+=this.alphabet[n[s]];return i}decode(e){if(typeof e!="string")throw new TypeError("Expected String");let r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(let n=0;n>=8;for(;s>0;)r.push(s&255),s>>=8}for(let n=0;e[n]===this._leader&&n>24&255,c[e.length+1]=f>>16&255,c[e.length+2]=f>>8&255,c[e.length+3]=f&255;let d=ne(S0(i,t,c));s||(s=d.length,u=new Uint8Array(s),o=Math.ceil(n/s),l=n-(o-1)*s),u.set(d);for(let v=1;v=256)throw new Error("Depth too large!");return C4(zt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",te(this.depth),this.parentFingerprint,ft(te(this.index),4),this.chainCode,this.privateKey!=null?zt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Co(hu,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~_u));const n=new Uint8Array(37);if(e&_u){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ne(this.privateKey),1),r&&(r+="'")}else n.set(ne(this.publicKey));for(let f=24;f>=0;f-=8)n[33+(f>>3)]=e>>24-f&255;const i=ne(S0($f.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,c=null;this.privateKey?a=Op(J.from(s).add(this.privateKey).mod(_Y)):c=new Nm(te(s))._addPoint(this.publicKey);let l=r;const u=this.mnemonic;return u&&(l=Object.freeze({phrase:u.phrase,path:r,locale:u.locale||"en"})),new Co(hu,a,c,this.fingerprint,Op(o),e,this.depth+1,l)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=_u)throw new Error("invalid path index - "+s);n=n._derive(_u+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=_u)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=ne(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=ne(S0($f.sha512,PY,n));return new Co(hu,Op(i.slice(0,32)),null,"0x00000000",Op(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=d3(n),e=O$(h3(e,n),n),Co._fromSeed(I$(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Co._fromSeed(e,null)}static fromExtendedKey(e){const r=Rf.decode(e);(r.length!==82||C4(r.slice(0,78))!==e)&&k0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=te(r.slice(5,9)),s=parseInt(te(r.slice(9,13)).substring(2),16),o=te(r.slice(13,45)),a=r.slice(45,78);switch(te(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Co(hu,null,te(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Co(hu,te(a.slice(1)),null,i,o,s,n,null)}return k0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function I$(t,e){e||(e="");const r=gt("mnemonic"+e,Wo.NFKD);return EY(gt(t,Wo.NFKD),r,2048,64,"sha512")}function h3(t,e){e=d3(e),k0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ne(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let l=0;l>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=T$(o);if((ne(Vo(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return te(n.slice(0,s/8))}function O$(t,e){if(e=d3(e),t=ne(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&TY(8-n)),n+=3);const i=t.length/4,s=ne(Vo(t))[0]&T$(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function OY(t,e){try{return h3(t,e),!0}catch{}return!1}function RY(t){return(typeof t!="number"||t<0||t>=_u||t%1)&&k0.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const $Y="random/5.7.0",kx=new ee($Y);function MY(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const S4=MY();let Iv=S4.crypto||S4.msCrypto;(!Iv||!Iv.getRandomValues)&&(kx.warn("WARNING: Missing strong random number source"),Iv={getRandomValues:function(t){return kx.throwError("no secure random source avaialble",ee.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function A1(t){(t<=0||t>1024||t%1||t!=t)&&kx.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Iv.getRandomValues(e),ne(e)}function R$(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function NY(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function DY(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function LY(t){if(NY(t))try{return qe(JSON.parse(t).ethaddr)}catch{return null}if(DY(t))try{return qe(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function $$(t,e){return Ll(i3(t),e)}function BY(t,e,r,n){return Ll(Wr.hash(t,e,r),n)}const FY="networks/5.7.1",k4=new ee(FY);function jY(t){return t&&typeof t.renetwork=="function"}function _o(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return _o(r)},e}function Lm(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return Lm(t,n)},r}const A4={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:_o("homestead")},_4={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:_o("ropsten")},P4={chainId:63,name:"classicMordor",_defaultProvider:Lm("https://www.ethercluster.com/mordor","classicMordor")},Rp={unspecified:{chainId:0,name:"unspecified"},homestead:A4,mainnet:A4,morden:{chainId:2,name:"morden"},ropsten:_4,testnet:_4,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:_o("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:_o("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:_o("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:_o("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Lm("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:P4,classicTestnet:P4,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Lm("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:_o("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:_o("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 UY(t){if(t==null)return null;if(typeof t=="number"){for(const n in Rp){const i=Rp[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Rp[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Rp[t.name];if(!e)return typeof t.chainId!="number"&&k4.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&k4.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(jY(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const zY="web/5.7.1";var WY=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function HY(t,e){return WY(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:ne(new Uint8Array(i))}})}var qY=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const ss=new ee(zY);function T4(t){return new Promise(e=>{setTimeout(e,t)})}function xa(t,e){if(t==null)return null;if(typeof t=="string")return t;if(zo(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return ca(t)}catch{}return te(t)}return t}function VY(t){return gt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function M$(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;ss.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;ss.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let c=null;const l={method:"GET"};let u=!1,f=2*60*1e3;if(typeof t=="string")c=t;else if(typeof t=="object"){if((t==null||t.url==null)&&ss.throwArgumentError("missing URL","connection.url",t),c=t.url,typeof t.timeout=="number"&&t.timeout>0&&(f=t.timeout),t.headers)for(const y in t.headers)a[y.toLowerCase()]={key:y,value:String(t.headers[y])},["if-none-match","if-modified-since"].indexOf(y.toLowerCase())>=0&&(u=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){c.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&ss.throwError("basic authentication requires a secure https url",ee.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:t.user,password:"[REDACTED]"});const y=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+r3(gt(y))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=Wt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=c?c.match(d):null;if(h)try{const y={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?t3(h[3]):VY(h[3])};let m=y.body;return r&&(m=r(y.body,y)),Promise.resolve(m)}catch(y){ss.throwError("processing response error",ee.errors.SERVER_ERROR,{body:xa(h[1],h[2]),error:y,requestBody:null,requestMethod:"GET",url:c})}e&&(l.method="POST",l.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const p={};Object.keys(a).forEach(y=>{const m=a[y];p[m.key]=m.value}),l.headers=p;const v=function(){let y=null;return{promise:new Promise(function(S,P){f&&(y=setTimeout(()=>{y!=null&&(y=null,P(ss.makeError("timeout",ee.errors.TIMEOUT,{requestBody:xa(l.body,p["content-type"]),requestMethod:l.method,timeout:f,url:c})))},f))}),cancel:function(){y!=null&&(clearTimeout(y),y=null)}}}(),b=function(){return qY(this,void 0,void 0,function*(){for(let y=0;y=300)&&(v.cancel(),ss.throwError("bad response",ee.errors.SERVER_ERROR,{status:m.statusCode,headers:m.headers,body:xa(g,m.headers?m.headers["content-type"]:null),requestBody:xa(l.body,p["content-type"]),requestMethod:l.method,url:c})),r)try{const S=yield r(g,m);return v.cancel(),S}catch(S){if(S.throttleRetry&&y{let a=null;if(s!=null)try{a=JSON.parse(ca(s))}catch(c){ss.throwError("invalid JSON",ee.errors.SERVER_ERROR,{body:s,error:c})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=gt(e);const s=typeof t=="string"?{url:t}:Wt(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Wt(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return M$(t,i,n)}function za(t,e){return e||(e={}),e=Wt(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let c=0;function l(){return t().then(function(u){if(u!==void 0)o()&&r(u);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!s){if(c++,c>a){o()&&n(new Error("retry limit reached"));return}let f=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));fe.ceiling&&(f=e.ceiling),setTimeout(l,f)}return null},function(u){o()&&n(u)})}l()})}var Bm="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ax={};for(var $p=0;$p>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function N$(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=uf(e)^n>>5}for(e=uf(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=N$(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=uf(n)^o,i+=Bm.charAt(o)}for(s=0;s<6;++s)n=uf(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=Bm.charAt(a)}return i}function D$(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=N$(s);if(typeof a=="string")return a;for(var c=[],l=0;l=o.length)&&c.push(f)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:c}}function KY(){var t=D$.apply(null,arguments);if(typeof t=="object")return t}function QY(t){var e=D$.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Cg(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(f,!0);return e.transaction={hash:o,type:l,accessList:de.allowNull(this.accessList.bind(this),null),blockHash:de.allowNull(o,null),blockNumber:de.allowNull(c,null),transactionIndex:de.allowNull(c,null),confirmations:de.allowNull(c,null),from:r,gasPrice:de.allowNull(n),maxPriorityFeePerGas:de.allowNull(n),maxFeePerGas:de.allowNull(n),gasLimit:n,to:de.allowNull(r,null),value:n,nonce:c,data:s,r:de.allowNull(this.uint256),s:de.allowNull(this.uint256),v:de.allowNull(c),creates:de.allowNull(r,null),raw:de.allowNull(s)},e.transactionRequest={from:de.allowNull(r),nonce:de.allowNull(c),gasLimit:de.allowNull(n),gasPrice:de.allowNull(n),maxPriorityFeePerGas:de.allowNull(n),maxFeePerGas:de.allowNull(n),to:de.allowNull(r),value:de.allowNull(n),data:de.allowNull(u),type:de.allowNull(c),accessList:de.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:o,address:r,topics:de.arrayOf(o),data:s,logIndex:c,blockHash:o},e.receipt={to:de.allowNull(this.address,null),from:de.allowNull(this.address,null),contractAddress:de.allowNull(r,null),transactionIndex:c,root:de.allowNull(a),gasUsed:n,logsBloom:de.allowNull(s),blockHash:o,transactionHash:o,logs:de.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:de.allowNull(c,null),cumulativeGasUsed:n,effectiveGasPrice:de.allowNull(n),status:de.allowNull(c),type:l},e.block={hash:de.allowNull(o),parentHash:o,number:c,timestamp:c,nonce:de.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:de.allowNull(r),extraData:s,transactions:de.allowNull(de.arrayOf(o)),baseFeePerGas:de.allowNull(n)},e.blockWithTransactions=Wt(e.block),e.blockWithTransactions.transactions=de.allowNull(de.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:de.allowNull(i,void 0),toBlock:de.allowNull(i,void 0),blockHash:de.allowNull(o,void 0),address:de.allowNull(r,void 0),topics:de.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:de.allowNull(c),blockHash:de.allowNull(o),transactionIndex:c,removed:de.allowNull(this.boolean.bind(this)),address:r,data:de.allowFalsish(s,"0x"),topics:de.arrayOf(o),transactionHash:o,logIndex:c},e}accessList(e){return Zl(e||[])}number(e){return e==="0x"?0:J.from(e).toNumber()}type(e){return e==="0x"||e==null?0:J.from(e).toNumber()}bigNumber(e){return J.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Fe(e))?e.toLowerCase():Hd.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return qe(e)}callAddress(e){if(!Fe(e,32))return null;const r=qe(br(e,12));return r===cr?null:r}contractAddress(e){return Y6(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Fe(e))return bs(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return uo(n)!==32?Hd.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=J.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Fe(e))throw new Error("invalid uint256");return ft(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=de.check(r,e);return i._difficulty=n==null?null:J.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return de.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&J.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=de.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Fe(n)&&(n=J.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Fe(n)&&(n=J.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return C$(e)}receiptLog(e){return de.check(this.formats.receiptLog,e)}receipt(e){const r=de.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=J.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Hd.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Hd.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Hd.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return de.check(this.formats.filter,e)}filterLog(e){return de.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}function tJ(t){return t&&typeof t.isCommunityResource=="function"}function O4(t){return tJ(t)&&t.isCommunityResource()}var ke=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const He=new ee(od),rJ=10;function R4(t){return t==null?"null":(uo(t)!==32&&He.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function $4(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[R4(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return R4(e)}).join("&")}function nJ(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function pu(t){if(typeof t=="string"){if(t=t.toLowerCase(),uo(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+$4(t);if(vK.isForkEvent(t))throw He.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+$4(t.topics||[])}throw new Error("invalid event - "+t)}function qd(){return new Date().getTime()}function M4(t){return new Promise(e=>{setTimeout(e,t)})}const iJ=["block","network","pending","poll"];let sJ=class{constructor(e,r,n){ie(this,"tag",e),ie(this,"listener",r),ie(this,"once",n),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 e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=nJ(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||iJ.indexOf(this.tag)>=0}};const oJ={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 s2(t){return ft(J.from(t).toHexString(),32)}function N4(t){return Rf.encode(zt([t,br(Vo(Vo(t)),0,4)]))}const L$=new RegExp("^(ipfs)://(.*)$","i"),D4=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),L$,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ov(t,e){try{return ca(A0(t,e))}catch{}return null}function A0(t,e){if(t==="0x")return null;const r=J.from(br(t,e,e+32)).toNumber(),n=J.from(br(t,r,r+32)).toNumber();return br(t,r+32,r+32+n)}function o2(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):He.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function L4(t){const e=ne(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function aJ(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function B$(t){const e=[];let r=0;for(let n=0;nJ.from(e).eq(1)).catch(e=>{if(e.code===ee.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return ke(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:On([e,Ih(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=On(["0x9061b923",B$([WR(this.name),n.data])]));try{let s=yield this.provider.call(n);return ne(s).length%32===4&&He.throwError("resolver threw error",ee.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=A0(s,0)),s}catch(s){if(s.code===ee.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return ke(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?A0(n,0):null})}_getAddress(e,r){const n=oJ[String(e)];if(n==null&&He.throwError(`unsupported coin type: ${e}`,ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=ne(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return N4(zt([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return N4(zt([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=I4.toWords(i.slice(2));return a.unshift(o),I4.encode(n.prefix,a)}}return null}getAddress(e){return ke(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Tm?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===ee.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",s2(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&He.throwError("invalid or unsupported coin data",ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return ke(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[c])}return He.throwError("invalid or unsupported content hash data",ee.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return ke(this,void 0,void 0,function*(){let r=gt(e);r=zt([s2(64),s2(r.length),r]),r.length%32!==0&&(r=zt([r,ft("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",te(r));return n==null||n==="0x"?null:ca(n)})}}let a2=null,cJ=1;class Sg extends Tc{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ie(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=ps(new.target,"getNetwork")(e);r?(ie(this,"_network",r),this.emit("network",r,null)):He.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return ke(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||He.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ie(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return za(()=>this._ready().then(e=>e,e=>{if(!(e.code===ee.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return a2==null&&(a2=new de),a2}static getNetwork(e){return UY(e??"homestead")}ccipReadFetch(e,r,n){return ke(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),f=yield _1({url:l,errorPassThrough:!0},u,(h,p)=>(h.status=p.statusCode,h));if(f.data)return f.data;const d=f.message||"unknown error";if(f.status>=400&&f.status<500)return He.throwError(`response not found during CCIP fetch: ${d}`,ee.errors.SERVER_ERROR,{url:c,errorMessage:d});o.push(d)}return He.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ee.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return ke(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(qd()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=qd(),n=ht({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=qd();return i=J.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return ke(this,void 0,void 0,function*(){const e=cJ++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)He.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",He.makeError("network block skew detected",ee.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(c=>{i._inflight=!1,c.length!==0&&c.forEach(l=>{l.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(s,l)})}).catch(c=>{this.emit("error",c),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return ke(this,void 0,void 0,function*(){return He.throwError("provider does not support network detection",ee.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return ke(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,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",r,e),yield M4(0),this._network;const n=He.makeError("underlying network changed",ee.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!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))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=qd();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return ke(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return ke(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const c=[];let l=!1;const u=function(){return l?!0:(l=!0,c.forEach(d=>{d()}),!1)},f=d=>{d.confirmations{this.removeListener(e,f)}),i){let d=i.startBlock,h=null;const p=v=>ke(this,void 0,void 0,function*(){l||(yield M4(1e3),this.getTransactionCount(i.from).then(b=>ke(this,void 0,void 0,function*(){if(!l){if(b<=i.nonce)d=v;else{{const y=yield this.getTransaction(e);if(y&&y.blockNumber!=null)return}for(h==null&&(h=d-3,h{l||this.once("block",p)}))});if(l)return;this.once("block",p),c.push(()=>{this.removeListener("block",p)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{u()||a(He.makeError("timeout exceeded",ee.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),c.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return ke(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return J.from(e)}catch(r){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ht({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return J.from(i)}catch(s){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ht({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return J.from(i).toNumber()}catch(s){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield ht({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return te(i)}catch(s){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield ht({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>bs(o))}),s=yield this.perform("getStorageAt",i);try{return te(s)}catch(o){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&uo(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&He.throwError("Transaction hash mismatch from Provider.sendTransaction.",ee.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>ke(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const c=yield this._waitForTransaction(e.hash,s,o,a);return c==null&&s===0?null:(this._emitted["t:"+e.hash]=c.blockNumber,c.status===0&&He.throwError("transaction failed",ee.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:c}),c)}),i}sendTransaction(e){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>te(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return ke(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?J.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?te(s):null))}),this.formatter.transactionRequest(yield ht(n))})}_getFilter(e){return ke(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield ht(r))})}_call(e,r,n){return ke(this,void 0,void 0,function*(){n>=rJ&&He.throwError("CCIP read exceeded maximum redirections",ee.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&uo(s)%32===4)try{const o=br(s,4),a=br(o,0,32);J.from(a).eq(i)||He.throwError("CCIP Read sender did not match",ee.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const c=[],l=J.from(br(o,32,64)).toNumber(),u=J.from(br(o,l,l+32)).toNumber(),f=br(o,l+32);for(let y=0;yke(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let c=0;cthis._wrapTransaction(c)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return ke(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return za(()=>ke(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return ke(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return za(()=>ke(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return ke(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield ht({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),de.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return ke(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return ke(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&He.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return ke(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new _x(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return ke(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||He.throwError("network does not support ENS",ee.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ih(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return ke(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Fe(e))throw n}typeof e!="string"&&He.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return ke(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Ov(yield this.call({to:n,data:"0x691f3431"+Ih(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return ke(this,void 0,void 0,function*(){let r=null;if(Fe(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new _x(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a}try{const a=Ov(yield this.call({to:o,data:"0x691f3431"+Ih(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return He.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new sJ(pu(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=pu(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=pu(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=pu(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=pu(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=pu(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var So=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Sr=new ee(od),lJ=["call","estimateGas"];function Rh(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Fe(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Rh(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Rh(JSON.parse(t),e)}catch{}return null}function F$(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Rh(e,!0);if(s)return s.data;Sr.throwError("missing revert data in call exception; Transaction reverted without a reason string",ee.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Rh(e.body,!1);s==null&&(s=Rh(e,!1)),s&&Sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===ee.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Sr.throwError("insufficient funds for intrinsic transaction cost",ee.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Sr.throwError("nonce has already been used",ee.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Sr.throwError("replacement fee too low",ee.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Sr.throwError("legacy pre-eip-155 transactions not supported",ee.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),lJ.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function B4(t){return new Promise(function(e){setTimeout(e,t)})}function uJ(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Vd(t){return t&&t.toLowerCase()}const Px={};class j$ extends Nl{constructor(e,r,n){if(super(),e!==Px)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ie(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ie(this,"_address",this.provider.formatter.address(n)),ie(this,"_index",null)):typeof n=="number"?(ie(this,"_index",n),ie(this,"_address",null)):Sr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Sr.throwError("cannot alter JSON-RPC Signer connection",ee.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new fJ(Px,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Sr.throwError("unknown account #"+this._index,ee.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Wt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Wt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>So(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Sr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),ht({tx:ht(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Sr.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Sr.throwError("user rejected transaction",ee.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),F$("sendTransaction",o,s)))})}signTransaction(e){return Sr.throwError("signing transactions is unsupported",ee.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return So(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield za(()=>So(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return So(this,void 0,void 0,function*(){const r=typeof e=="string"?gt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[te(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Sr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return So(this,void 0,void 0,function*(){const r=typeof e=="string"?gt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),te(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Sr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return So(this,void 0,void 0,function*(){const i=yield Wr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(Wr.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Sr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return So(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class fJ extends j${sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const dJ={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let Go=class extends Sg{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=ps(this.constructor,"defaultUrl")()),typeof e=="string"?ie(this,"connection",Object.freeze({url:e})):ie(this,"connection",Object.freeze(Wt(e))),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 So(this,void 0,void 0,function*(){yield B4(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=ps(this.constructor,"getNetwork");try{return r(J.from(e).toNumber())}catch(n){return Sr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Sr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new j$(Px,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:vi(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=_1(this.connection,JSON.stringify(n),uJ).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Vd(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Vd(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Vd(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Vd(r.address),ft(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[ps(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[ps(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=Vd(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return So(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&J.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Wt(r),r.transaction=Wt(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Sr.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return F$(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(c){return e.emit("pending",c),null})})}),o.then(function(){return B4(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Wt(dJ);if(r)for(const s in r)r[s]&&(n[s]=!0);G6(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=bs(J.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=te(e[s]))}),e.accessList&&(i.accessList=Zl(e.accessList)),i}};var hJ=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const pJ=new ee(od);class Fm extends Go{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return hJ(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||pJ.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(ie(this,"_network",r),this.emit("network",r,null))),r})}}var jm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const il=new ee(od);function Mp(){return new Date().getTime()}function F4(t){let e=null;for(let r=0;re?null:(n+i)/2}function Vu(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(J.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>Vu(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=Vu(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let vJ=1;function U4(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const i=o=>(n=n.then(o),n);function s(){return n}return{cancel:e,getPromise:s,wait:i}}const mJ=[ee.errors.CALL_EXCEPTION,ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED,ee.errors.UNPREDICTABLE_GAS_LIMIT],yJ=["address","args","errorArgs","errorSignature","method","transaction"];function Np(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function gJ(t,e){return function(r){const n={};r.forEach(s=>{const o=t(s.result);n[o]||(n[o]={count:0,result:s.result}),n[o].count++});const i=Object.keys(n);for(let s=0;s=e)return o.result}}}function bJ(t,e,r){let n=Vu;switch(e){case"getBlockNumber":return function(i){const s=i.map(a=>a.result);let o=j4(i.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),s.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(i){const s=i.map(o=>o.result);return s.sort(),s[Math.floor(s.length/2)]};case"getEtherPrice":return function(i){return j4(i.map(s=>s.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=Wt(i),i.confirmations=-1,Vu(i))};break;case"getBlock":r.includeTransactions?n=function(i){return i==null?null:(i=Wt(i),i.transactions=i.transactions.map(s=>(s=Wt(s),s.confirmations=-1,s)),Vu(i))}:n=function(i){return i==null?null:Vu(i)};break;default:throw new Error("unknown method: "+e)}return gJ(n,t.quorum)}function Gd(t,e){return jm(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:za(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function wJ(t,e,r,n){return jm(this,void 0,void 0,function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&Fe(n.blockTag)&&(i=yield Gd(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&Fe(n.blockTag)&&(i=yield Gd(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&Fe(n.blockTag)&&(i=yield Gd(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&Fe(n.blockTag)&&(i=yield Gd(t,e)),r==="call"&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let s=n.filter;return(s.fromBlock&&Fe(s.fromBlock)||s.toBlock&&Fe(s.toBlock))&&(i=yield Gd(t,e)),i.getLogs(s)}}return il.throwError("unknown method error",ee.errors.UNKNOWN_ERROR,{method:r,params:n})})}class EJ extends Sg{constructor(e,r){e.length===0&&il.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(Tc.isProvider(o)){const u=O4(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:u,priority:1})}const c=Wt(o);c.priority==null&&(c.priority=1),c.stallTimeout==null&&(c.stallTimeout=O4(o)?2e3:750),c.weight==null&&(c.weight=1);const l=c.weight;return(l%1||l>512||l<1)&&il.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,l),Object.freeze(c)}),i=n.reduce((o,a)=>o+a.weight,0);r==null?r=i/2:r>i&&il.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let s=F4(n.map(o=>o.provider.network));s==null&&(s=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(s),ie(this,"providerConfigs",Object.freeze(n)),ie(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return jm(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return F4(e)})}perform(e,r){return jm(this,void 0,void 0,function*(){if(e==="sendTransaction"){const c=yield Promise.all(this.providerConfigs.map(l=>l.provider.sendTransaction(r.signedTransaction).then(u=>u.hash,u=>u)));for(let l=0;lc.priority-l.priority);const s=this._highestBlockNumber;let o=0,a=!0;for(;;){const c=Mp();let l=i.filter(h=>h.runner&&c-h.starth+p.weight,0);for(;l{h.staller=null}),h.runner=wJ(h,s,e,r).then(v=>{h.done=!0,h.result=v,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:Np(h,Mp()),request:{method:e,params:vi(r)},provider:this})},v=>{h.done=!0,h.error=v,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:Np(h,Mp()),request:{method:e,params:vi(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:Np(h,null),request:{method:e,params:vi(r)},provider:this}),l+=h.weight}const u=[];i.forEach(h=>{h.done||!h.runner||(u.push(h.runner),h.staller&&u.push(h.staller.getPromise()))}),u.length&&(yield Promise.race(u));const f=i.filter(h=>h.done&&h.error==null);if(f.length>=this.quorum){const h=n(f);if(h!==void 0)return i.forEach(p=>{p.staller&&p.staller.cancel(),p.cancelled=!0}),h;a||(yield U4(100).getPromise()),a=!1}const d=i.reduce((h,p)=>{if(!p.done||p.error==null)return h;const v=p.error.code;return mJ.indexOf(v)>=0&&(h[v]||(h[v]={error:p.error,weight:0}),h[v].weight+=p.weight),h},{});if(Object.keys(d).forEach(h=>{const p=d[h];if(p.weight{y.staller&&y.staller.cancel(),y.cancelled=!0});const v=p.error,b={};yJ.forEach(y=>{v[y]!=null&&(b[y]=v[y])}),il.throwError(v.reason||v.message,h,b)}),i.filter(h=>!h.done).length===0)break}return i.forEach(c=>{c.staller&&c.staller.cancel(),c.cancelled=!0}),il.throwError("failed to meet quorum",ee.errors.SERVER_ERROR,{method:e,params:r,results:i.map(c=>Np(c)),provider:this})})}}const z4=new ee(od);let xJ=1;function W4(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:xJ++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:vi(s),provider:this}),e(s,(c,l)=>{if(c)return this.emit("debug",{action:"response",fetcher:r,error:c,request:s,provider:this}),a(c);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:l,provider:this}),l.error){const u=new Error(l.error.message);return u.code=l.error.code,u.data=l.error.data,a(u)}o(l.result)})})}}function CJ(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:vi(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class U$ extends Go{constructor(e,r){e==null&&z4.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=CJ(e)):e.sendAsync?i=W4(e,e.sendAsync.bind(e)):e.send?i=W4(e,e.send.bind(e)):z4.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),ie(this,"jsonRpcFetchFunc",i),ie(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const SJ="solidity/5.7.0",kJ=new RegExp("^bytes([0-9]+)$"),AJ=new RegExp("^(u?int)([0-9]*)$"),_J=new RegExp("^(.*)\\[([0-9]*)\\]$"),PJ="0000000000000000000000000000000000000000000000000000000000000000",Pu=new ee(SJ);function z$(t,e,r){switch(t){case"address":return r?_h(e,32):ne(e);case"string":return gt(e);case"bytes":return ne(e);case"bool":return e=e?"0x01":"0x00",r?_h(e,32):ne(e)}let n=t.match(AJ);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Pu.throwArgumentError("invalid number type","type",t),r&&(i=256),e=J.from(e).toTwos(i),_h(e,i/8)}if(n=t.match(kJ),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Pu.throwArgumentError("invalid bytes type","type",t),ne(e).byteLength!==i&&Pu.throwArgumentError(`invalid value for ${t}`,"value",e),r?ne((e+PJ).substring(0,66)):e}if(n=t.match(_J),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Pu.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(z$(i,a,!0))}),zt(o)}return Pu.throwArgumentError("invalid type","type",t)}function We(t,e){t.length!=e.length&&Pu.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(z$(n,e[i]))}),te(zt(r))}function ec(t,e){return Be(We(t,e))}function TJ(t,e){return Vo(We(t,e))}const IJ="units/5.7.0",W$=new ee(IJ),H$=["wei","kwei","mwei","gwei","szabo","finney","ether"];function OJ(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&W$.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function xr(t,e){if(typeof e=="string"){const r=H$.indexOf(e);r!==-1&&(e=3*r)}return kv(t,e??18)}function Mf(t,e){if(typeof t!="string"&&W$.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=H$.indexOf(e);r!==-1&&(e=3*r)}return Ls(t,e??18)}function RJ(t){return xr(t,18)}function $J(t){return Mf(t,18)}const MJ=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:e3,ConstructorFragment:ds,ErrorFragment:To,EventFragment:Gs,FormatTypes:et,Fragment:Ys,FunctionFragment:hs,HDNode:Co,Indexed:Rm,Interface:Br,LogDescription:GR,Logger:ee,ParamType:Nr,RLP:GV,SigningKey:Nm,get SupportedAlgorithm(){return $f},TransactionDescription:KR,get TransactionTypes(){return Sx},get UnicodeNormalizationForm(){return Wo},Utf8ErrorFuncs:NR,get Utf8ErrorReason(){return Vn},_TypedDataEncoder:Wr,_fetchData:M$,_toEscapedUtf8String:dG,accessListify:Zl,arrayify:ne,base58:Rf,base64:OG,checkProperties:G6,checkResultErrors:xR,commify:OJ,computeAddress:f3,computeHmac:S0,computePublicKey:l3,concat:zt,deepCopy:vi,defaultAbiCoder:Bn,defaultPath:IY,defineReadOnly:ie,dnsEncode:WR,entropyToMnemonic:O$,fetchJson:_1,formatBytes32String:hG,formatEther:RJ,formatUnits:xr,getAccountPath:RY,getAddress:qe,getContractAddress:Y6,getCreate2Address:XV,getIcapAddress:JV,getJsonWalletAddress:LY,getStatic:ps,hashMessage:i3,hexConcat:On,hexDataLength:uo,hexDataSlice:br,hexStripZeros:hR,hexValue:bs,hexZeroPad:ft,hexlify:te,id:Ua,isAddress:_R,isBytes:oa,isBytesLike:zo,isHexString:Fe,isValidMnemonic:OY,isValidName:tK,joinSignature:IV,keccak256:Be,mnemonicToEntropy:h3,mnemonicToSeed:I$,namehash:Ih,nameprep:_G,parseBytes32String:pG,parseEther:$J,parseTransaction:C$,parseUnits:Mf,poll:za,randomBytes:A1,recoverAddress:Ll,recoverPublicKey:g$,resolveProperties:ht,ripemd160:_$,serializeTransaction:aY,sha256:Vo,sha512:wY,shallowCopy:Wt,shuffled:R$,solidityKeccak256:ec,solidityPack:We,soliditySha256:TJ,splitSignature:Jl,stripZeros:to,toUtf8Bytes:gt,toUtf8CodePoints:Im,toUtf8String:ca,verifyMessage:$$,verifyTypedData:BY,zeroPad:_h},Symbol.toStringTag,{value:"Module"})),q$="%[a-f0-9]{2}",H4=new RegExp("("+q$+")|([^%]+?)","gi"),q4=new RegExp("("+q$+")+","gi");function Tx(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],Tx(r),Tx(n))}function NJ(t){try{return decodeURIComponent(t)}catch{let e=t.match(H4)||[];for(let r=1;rt==null,jJ=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Ix=Symbol("encodeFragmentIdentifier");function UJ(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Cr(e,t),"[",i,"]"].join("")]:[...r,[Cr(e,t),"[",Cr(i,t),"]=",Cr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Cr(e,t),"[]"].join("")]:[...r,[Cr(e,t),"[]=",Cr(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Cr(e,t),":list="].join("")]:[...r,[Cr(e,t),":list=",Cr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||t.skipNull&&i===null||t.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Cr(r,t),e,Cr(i,t)].join("")]:[[n,Cr(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Cr(e,t)]:[...r,[Cr(e,t),"=",Cr(n,t)].join("")]}}function zJ(t){let e;switch(t.arrayFormat){case"index":return(r,n,i)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][e[1]]=n};case"bracket":return(r,n,i)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"colon-list-separator":return(r,n,i)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"comma":case"separator":return(r,n,i)=>{const s=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!s&&Po(n,t).includes(t.arrayFormatSeparator);n=o?Po(n,t):n;const a=s||o?n.split(t.arrayFormatSeparator).map(c=>Po(c,t)):n===null?n:Po(n,t);i[r]=a};case"bracket-separator":return(r,n,i)=>{const s=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!s){i[r]=n&&Po(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>Po(a,t));if(i[r]===void 0){i[r]=o;return}i[r]=[...i[r],...o]};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[...[i[r]].flat(),n]}}}function G$(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Cr(t,e){return e.encode?e.strict?jJ(t):encodeURIComponent(t):t}function Po(t,e){return e.decode?LJ(t):t}function K$(t){return Array.isArray(t)?t.sort():typeof t=="object"?K$(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function Q$(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function WJ(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function V4(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function p3(t){t=Q$(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function v3(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},G$(e.arrayFormatSeparator);const r=zJ(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const i of t.split("&")){if(i==="")continue;const s=e.decode?i.replace(/\+/g," "):i;let[o,a]=V$(s,"=");o===void 0&&(o=s),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Po(a,e),r(Po(o,e),a,n)}for(const[i,s]of Object.entries(n))if(typeof s=="object"&&s!==null)for(const[o,a]of Object.entries(s))s[o]=V4(a,e);else n[i]=V4(s,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,s)=>{const o=n[s];return o&&typeof o=="object"&&!Array.isArray(o)?i[s]=K$(o):i[s]=o,i},Object.create(null))}function Y$(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},G$(e.arrayFormatSeparator);const r=o=>e.skipNull&&FJ(t[o])||e.skipEmptyString&&t[o]==="",n=UJ(e),i={};for(const[o,a]of Object.entries(t))r(o)||(i[o]=a);const s=Object.keys(i);return e.sort!==!1&&s.sort(e.sort),s.map(o=>{const a=t[o];return a===void 0?"":a===null?Cr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Cr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Cr(o,e)+"="+Cr(a,e)}).filter(o=>o.length>0).join("&")}function J$(t,e){var i;e={decode:!0,...e};let[r,n]=V$(t,"#");return r===void 0&&(r=t),{url:((i=r==null?void 0:r.split("?"))==null?void 0:i[0])??"",query:v3(p3(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Po(n,e)}:{}}}function X$(t,e){e={encode:!0,strict:!0,[Ix]:!0,...e};const r=Q$(t.url).split("?")[0]||"",n=p3(t.url),i={...v3(n,{sort:!1}),...t.query};let s=Y$(i,e);s&&(s=`?${s}`);let o=WJ(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[Ix]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${s}${o}`}function Z$(t,e,r){r={parseFragmentIdentifier:!0,[Ix]:!1,...r};const{url:n,query:i,fragmentIdentifier:s}=J$(t,r);return X$({url:n,query:BJ(i,e),fragmentIdentifier:s},r)}function HJ(t,e,r){const n=Array.isArray(e)?i=>!e.includes(i):(i,s)=>!e(i,s);return Z$(t,n,r)}const eM=Object.freeze(Object.defineProperty({__proto__:null,exclude:HJ,extract:p3,parse:v3,parseUrl:J$,pick:Z$,stringify:Y$,stringifyUrl:X$},Symbol.toStringTag,{value:"Module"})),m3=C.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),kg=C.createContext({});function qJ(){return C.useContext(kg).visualElement}const P1=C.createContext(null),Ag=typeof document<"u",Um=Ag?C.useLayoutEffect:C.useEffect,tM=C.createContext({strict:!1});function VJ(t,e,r,n){const i=qJ(),s=C.useContext(tM),o=C.useContext(P1),a=C.useContext(m3).reducedMotion,c=C.useRef();n=n||s.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return Um(()=>{l&&l.render()}),(window.HandoffAppearAnimations?Um:C.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function Gu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function GJ(t,e,r){return C.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Gu(r)&&(r.current=n))},[e])}function _0(t){return typeof t=="string"||Array.isArray(t)}function _g(t){return typeof t=="object"&&typeof t.start=="function"}const KJ=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Pg(t){return _g(t.animate)||KJ.some(e=>_0(t[e]))}function rM(t){return!!(Pg(t)||t.variants)}function QJ(t,e){if(Pg(t)){const{initial:r,animate:n}=t;return{initial:r===!1||_0(r)?r:void 0,animate:_0(n)?n:void 0}}return t.inherit!==!1?e:{}}function YJ(t){const{initial:e,animate:r}=QJ(t,C.useContext(kg));return C.useMemo(()=>({initial:e,animate:r}),[G4(e),G4(r)])}function G4(t){return Array.isArray(t)?t.join(" "):t}const wo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),P0={measureLayout:wo(["layout","layoutId","drag"]),animation:wo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:wo(["exit"]),drag:wo(["drag","dragControls"]),focus:wo(["whileFocus"]),hover:wo(["whileHover","onHoverStart","onHoverEnd"]),tap:wo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:wo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:wo(["whileInView","onViewportEnter","onViewportLeave"])};function JJ(t){for(const e in t)e==="projectionNodeConstructor"?P0.projectionNodeConstructor=t[e]:P0[e].Component=t[e]}function Tg(t){const e=C.useRef(null);return e.current===null&&(e.current=t()),e.current}const $h={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let XJ=1;function ZJ(){return Tg(()=>{if($h.hasEverUpdated)return XJ++})}const y3=C.createContext({});class eX extends x.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const nM=C.createContext({}),tX=Symbol.for("motionComponentSymbol");function rX({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&JJ(t);function o(c,l){const u={...C.useContext(m3),...c,layoutId:nX(c)},{isStatic:f}=u;let d=null;const h=YJ(c),p=f?void 0:ZJ(),v=i(c,f);if(!f&&Ag){h.visualElement=VJ(s,v,u,e);const b=C.useContext(tM).strict,y=C.useContext(nM);h.visualElement&&(d=h.visualElement.loadFeatures(u,b,t,p,r||P0.projectionNodeConstructor,y))}return C.createElement(eX,{visualElement:h.visualElement,props:u},d,C.createElement(kg.Provider,{value:h},n(s,c,p,GJ(v,h.visualElement,l),v,f,h.visualElement)))}const a=C.forwardRef(o);return a[tX]=s,a}function nX({layoutId:t}){const e=C.useContext(y3).id;return e&&t!==void 0?e+"-"+t:t}function iX(t){function e(n,i={}){return rX(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const sX=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function g3(t){return typeof t!="string"||t.includes("-")?!1:!!(sX.indexOf(t)>-1||/[A-Z]/.test(t))}const zm={};function oX(t){Object.assign(zm,t)}const Wm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ad=new Set(Wm);function iM(t,{layout:e,layoutId:r}){return ad.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!zm[t]||t==="opacity")}const ni=t=>!!(t!=null&&t.getVelocity),aX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cX=(t,e)=>Wm.indexOf(t)-Wm.indexOf(e);function lX({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(cX);for(const a of e)o+=`${aX[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function sM(t){return t.startsWith("--")}const uX=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Nf=(t,e,r)=>Math.min(Math.max(r,t),e),eu={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Mh={...eu,transform:t=>Nf(0,1,t)},Dp={...eu,default:1},Nh=t=>Math.round(t*1e5)/1e5,T0=/(-)?([\d]*\.?[\d])+/g,Ox=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,fX=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function T1(t){return typeof t=="string"}const I1=t=>({test:e=>T1(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ca=I1("deg"),so=I1("%"),we=I1("px"),dX=I1("vh"),hX=I1("vw"),K4={...so,parse:t=>so.parse(t)/100,transform:t=>so.transform(t*100)},Q4={...eu,transform:Math.round},oM={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,size:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,rotate:Ca,rotateX:Ca,rotateY:Ca,rotateZ:Ca,scale:Dp,scaleX:Dp,scaleY:Dp,scaleZ:Dp,skew:Ca,skewX:Ca,skewY:Ca,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Mh,originX:K4,originY:K4,originZ:we,zIndex:Q4,fillOpacity:Mh,strokeOpacity:Mh,numOctaves:Q4};function b3(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:c}=t;a.length=0;let l=!1,u=!1,f=!0;for(const d in e){const h=e[d];if(sM(d)){s[d]=h;continue}const p=oM[d],v=uX(h,p);if(ad.has(d)){if(l=!0,o[d]=v,a.push(d),!f)continue;h!==(p.default||0)&&(f=!1)}else d.startsWith("origin")?(u=!0,c[d]=v):i[d]=v}if(e.transform||(l||n?i.transform=lX(t,r,f,n):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:p=0}=c;i.transformOrigin=`${d} ${h} ${p}`}}const w3=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function aM(t,e,r){for(const n in e)!ni(e[n])&&!iM(n,r)&&(t[n]=e[n])}function pX({transformTemplate:t},e,r){return C.useMemo(()=>{const n=w3();return b3(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function vX(t,e,r){const n=t.style||{},i={};return aM(i,n,t),Object.assign(i,pX(t,e,r)),t.transformValues?t.transformValues(i):i}function mX(t,e,r){const n={},i=vX(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=i,n}const yX=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function Hm(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||yX.has(t)}let cM=t=>!Hm(t);function gX(t){t&&(cM=e=>e.startsWith("on")?!Hm(e):t(e))}try{gX(require("@emotion/is-prop-valid").default)}catch{}function bX(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(cM(i)||r===!0&&Hm(i)||!e&&!Hm(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function Y4(t,e,r){return typeof t=="string"?t:we.transform(e+r*t)}function wX(t,e,r){const n=Y4(e,t.x,t.width),i=Y4(r,t.y,t.height);return`${n} ${i}`}const EX={offset:"stroke-dashoffset",array:"stroke-dasharray"},xX={offset:"strokeDashoffset",array:"strokeDasharray"};function CX(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?EX:xX;t[s.offset]=we.transform(-n);const o=we.transform(e),a=we.transform(r);t[s.array]=`${o} ${a}`}function E3(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(b3(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(n!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=wX(p,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),s!==void 0&&CX(d,s,o,a,!1)}const lM=()=>({...w3(),attrs:{}}),x3=t=>typeof t=="string"&&t.toLowerCase()==="svg";function SX(t,e,r,n){const i=C.useMemo(()=>{const s=lM();return E3(s,e,{enableHardwareAcceleration:!1},x3(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};aM(s,t.style,t),i.style={...s,...i.style}}return i}function kX(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const l=(g3(r)?SX:mX)(n,o,a,r),f={...bX(n,typeof r=="string",t),...l,ref:s},{children:d}=n,h=C.useMemo(()=>ni(d)?d.get():d,[d]);return i&&(f["data-projection-id"]=i),C.createElement(r,{...f,children:h})}}const C3=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function uM(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const fM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dM(t,e,r,n){uM(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(fM.has(i)?i:C3(i),e.attrs[i])}function S3(t,e){const{style:r}=t,n={};for(const i in r)(ni(r[i])||e.style&&ni(e.style[i])||iM(i,t))&&(n[i]=r[i]);return n}function hM(t,e){const r=S3(t,e);for(const n in t)if(ni(t[n])||ni(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function k3(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const qm=t=>Array.isArray(t),AX=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),_X=t=>qm(t)?t[t.length-1]||0:t;function Rv(t){const e=ni(t)?t.get():t;return AX(e)?e.toValue():e}function PX({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:TX(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const pM=t=>(e,r)=>{const n=C.useContext(kg),i=C.useContext(P1),s=()=>PX(t,e,n,i);return r?s():Tg(s)};function TX(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=Rv(s[d]);let{initial:o,animate:a}=t;const c=Pg(t),l=rM(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!_g(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=k3(t,h);if(!p)return;const{transitionEnd:v,transition:b,...y}=p;for(const m in y){let g=y[m];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(i[m]=g)}for(const m in v)i[m]=v[m]}),i}const IX={useVisualState:pM({scrapeMotionValuesFromProps:hM,createRenderState:lM,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}E3(r,n,{enableHardwareAcceleration:!1},x3(e.tagName),t.transformTemplate),dM(e,r)}})},OX={useVisualState:pM({scrapeMotionValuesFromProps:S3,createRenderState:w3})};function RX(t,{forwardMotionProps:e=!1},r,n,i){return{...g3(t)?IX:OX,preloadedFeatures:r,useRender:kX(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var pt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(pt||(pt={}));function Ig(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function Rx(t,e,r,n){C.useEffect(()=>{const i=t.current;if(r&&i)return Ig(i,e,r,n)},[t,e,r,n])}function $X({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=C.useCallback(()=>{r&&r.setActive(pt.Focus,!0)},[r]),i=C.useCallback(()=>{r&&r.setActive(pt.Focus,!1)},[r]);Rx(e,"focus",t?n:void 0),Rx(e,"blur",t?i:void 0)}const vM=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function A3(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const mM=t=>e=>vM(e)&&t(e,A3(e));function ff(t,e,r,n){return Ig(t,e,mM(r),n)}function Vm(t,e,r,n){return Rx(t,e,r&&mM(r),n)}function yM(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const J4=yM("dragHorizontal"),X4=yM("dragVertical");function gM(t){let e=!1;if(t==="y")e=X4();else if(t==="x")e=J4();else{const r=J4(),n=X4();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function bM(){const t=gM(!0);return t?(t(),!1):!0}function Z4(t,e,r,n){return(i,s)=>{i.type==="touch"||bM()||(r&&t.animationState&&t.animationState.setActive(pt.Hover,e),n&&n(i,s))}}function MX({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Vm(n,"pointerenter",C.useMemo(()=>t||r?Z4(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),Vm(n,"pointerleave",C.useMemo(()=>e||r?Z4(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const wM=(t,e)=>e?t===e?!0:wM(t,e.parentElement):!1;function _3(t){return C.useEffect(()=>()=>t(),[])}const NX=(t,e)=>r=>e(t(r)),Og=(...t)=>t.reduce(NX);function DX({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=C.useRef(!1),c=C.useRef(null),l={passive:!(e||t||r||s.onPointerDown)};function u(){c.current&&c.current(),c.current=null}function f(){return u(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(pt.Tap,!1),!bM()}function d(v,b){var y,m,g,S;f()&&(wM(i.current,v.target)?(S=(g=i.getProps()).onTap)===null||S===void 0||S.call(g,v,b):(m=(y=i.getProps()).onTapCancel)===null||m===void 0||m.call(y,v,b))}function h(v,b){var y,m;f()&&((m=(y=i.getProps()).onTapCancel)===null||m===void 0||m.call(y,v,b))}const p=C.useCallback((v,b)=>{var y;if(u(),a.current)return;a.current=!0,c.current=Og(ff(window,"pointerup",d,l),ff(window,"pointercancel",h,l));const m=i.getProps();m.whileTap&&i.animationState&&i.animationState.setActive(pt.Tap,!0),(y=m.onTapStart)===null||y===void 0||y.call(m,v,b)},[!!e,i]);Vm(i,"pointerdown",o?p:void 0,l),_3(u)}const $x=new WeakMap,c2=new WeakMap,LX=t=>{const e=$x.get(t.target);e&&e(t)},BX=t=>{t.forEach(LX)};function FX({root:t,...e}){const r=t||document;c2.has(r)||c2.set(r,{});const n=c2.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(BX,{root:t,...e})),n[i]}function jX(t,e,r){const n=FX(e);return $x.set(t,r),n.observe(t),()=>{$x.delete(t),n.unobserve(t)}}function UX({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=C.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?HX:WX)(o,s.current,t,i)}const zX={some:0,all:1};function WX(t,e,r,{root:n,margin:i,amount:s="some",once:o}){C.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:zX[s]},c=l=>{const{isIntersecting:u}=l;if(e.isInView===u||(e.isInView=u,o&&!u&&e.hasEnteredView))return;u&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(pt.InView,u);const f=r.getProps(),d=u?f.onViewportEnter:f.onViewportLeave;d&&d(l)};return jX(r.current,a,c)},[t,n,i,s])}function HX(t,e,r,{fallback:n=!0}){C.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(pt.InView,!0)})},[t])}const Wa=t=>e=>(t(e),null),qX={inView:Wa(UX),tap:Wa(DX),focus:Wa($X),hover:Wa(MX)};function EM(){const t=C.useContext(P1);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=C.useId();return C.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function xM(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),GX=t=>/^0[^.\s]+$/.test(t),Do={delta:0,timestamp:0},CM=1/60*1e3,KX=typeof performance<"u"?()=>performance.now():()=>Date.now(),SM=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(KX()),CM);function QX(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&i,d=f?e:r;return l&&o.add(c),d.indexOf(c)===-1&&(d.push(c),f&&i&&(n=e.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),o.delete(c)},process:c=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=QX(()=>I0=!0),t),{}),En=O1.reduce((t,e)=>{const r=Rg[e];return t[e]=(n,i=!1,s=!1)=>(I0||XX(),r.schedule(n,i,s)),t},{}),lc=O1.reduce((t,e)=>(t[e]=Rg[e].cancel,t),{}),l2=O1.reduce((t,e)=>(t[e]=()=>Rg[e].process(Do),t),{}),JX=t=>Rg[t].process(Do),kM=t=>{I0=!1,Do.delta=Mx?CM:Math.max(Math.min(t-Do.timestamp,YX),1),Do.timestamp=t,Nx=!0,O1.forEach(JX),Nx=!1,I0&&(Mx=!1,SM(kM))},XX=()=>{I0=!0,Mx=!0,Nx||SM(kM)};function P3(t,e){t.indexOf(e)===-1&&t.push(e)}function T3(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class I3{constructor(){this.subscriptions=[]}add(e){return P3(this.subscriptions,e),()=>T3(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class eZ{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=Do;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,En.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>En.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=ZX(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new I3);const n=this.events[e].add(r);return e==="change"?()=>{n(),En.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?O3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Df(t,e){return new eZ(t,e)}const R3=(t,e)=>r=>!!(T1(r)&&fX.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),AM=(t,e,r)=>n=>{if(!T1(n))return n;const[i,s,o,a]=n.match(T0);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},tZ=t=>Nf(0,255,t),u2={...eu,transform:t=>Math.round(tZ(t))},pl={test:R3("rgb","red"),parse:AM("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+u2.transform(t)+", "+u2.transform(e)+", "+u2.transform(r)+", "+Nh(Mh.transform(n))+")"};function rZ(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Dx={test:R3("#"),parse:rZ,transform:pl.transform},Ku={test:R3("hsl","hue"),parse:AM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+so.transform(Nh(e))+", "+so.transform(Nh(r))+", "+Nh(Mh.transform(n))+")"},Tn={test:t=>pl.test(t)||Dx.test(t)||Ku.test(t),parse:t=>pl.test(t)?pl.parse(t):Ku.test(t)?Ku.parse(t):Dx.parse(t),transform:t=>T1(t)?t:t.hasOwnProperty("red")?pl.transform(t):Ku.transform(t)},_M="${c}",PM="${n}";function nZ(t){var e,r;return isNaN(t)&&T1(t)&&(((e=t.match(T0))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Ox))===null||r===void 0?void 0:r.length)||0)>0}function Gm(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Ox);i&&(r=i.length,t=t.replace(Ox,_M),e.push(...i.map(Tn.parse)));const s=t.match(T0);return s&&(n=s.length,t=t.replace(T0,PM),e.push(...s.map(eu.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function TM(t){return Gm(t).values}function IM(t){const{values:e,numColors:r,tokenised:n}=Gm(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function sZ(t){const e=TM(t);return IM(t)(e.map(iZ))}const uc={test:nZ,parse:TM,createTransformer:IM,getAnimatableNone:sZ},oZ=new Set(["brightness","contrast","saturate","opacity"]);function aZ(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(T0)||[];if(!n)return t;const i=r.replace(n,"");let s=oZ.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const cZ=/([a-z-]*)\(.*?\)/g,Lx={...uc,getAnimatableNone:t=>{const e=t.match(cZ);return e?e.map(aZ).join(" "):t}},lZ={...oM,color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,filter:Lx,WebkitFilter:Lx},$3=t=>lZ[t];function M3(t,e){var r;let n=$3(t);return n!==Lx&&(n=uc),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const OM=t=>e=>e.test(t),uZ={test:t=>t==="auto",parse:t=>t},RM=[eu,we,so,Ca,hX,dX,uZ],Kd=t=>RM.find(OM(t)),fZ=[...RM,Tn,uc],dZ=t=>fZ.find(OM(t));function hZ(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function pZ(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function $g(t,e,r){const n=t.getProps();return k3(n,e,r!==void 0?r:n.custom,hZ(t),pZ(t))}function vZ(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Df(r))}function mZ(t,e){const r=$g(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=_X(s[o]);vZ(t,o,a)}}function yZ(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,CZ={current:!1},N3=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,D3=t=>e=>1-t(1-e),L3=t=>t*t,SZ=D3(L3),B3=N3(L3),vr=(t,e,r)=>-r*t+r*e+t;function f2(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function kZ({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;i=f2(c,a,t+1/3),s=f2(c,a,t),o=f2(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const d2=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},AZ=[Dx,pl,Ku],_Z=t=>AZ.find(e=>e.test(t));function e_(t){const e=_Z(t);let r=e.parse(t);return e===Ku&&(r=kZ(r)),r}const $M=(t,e)=>{const r=e_(t),n=e_(e),i={...r};return s=>(i.red=d2(r.red,n.red,s),i.green=d2(r.green,n.green,s),i.blue=d2(r.blue,n.blue,s),i.alpha=vr(r.alpha,n.alpha,s),pl.transform(i))};function MM(t,e){return typeof t=="number"?r=>vr(t,e,r):Tn.test(t)?$M(t,e):DM(t,e)}const NM=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>MM(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=MM(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},DM=(t,e)=>{const r=uc.createTransformer(e),n=Gm(t),i=Gm(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Og(NM(n.values,i.values),r):o=>`${o>0?e:t}`},Ym=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},t_=(t,e)=>r=>vr(t,e,r);function TZ(t){return typeof t=="number"?t_:typeof t=="string"?Tn.test(t)?$M:DM:Array.isArray(t)?NM:typeof t=="object"?PZ:t_}function IZ(t,e,r){const n=[],i=r||TZ(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=IZ(e,n,i),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Nf(t[0],t[s-1],l)):c}const F3=t=>t,BM=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,OZ=1e-7,RZ=12;function $Z(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=BM(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>OZ&&++a$Z(s,0,1,t,r);return s=>s===0||s===1?s:BM(i(s),e,n)}const jM=t=>1-Math.sin(Math.acos(t)),j3=D3(jM),MZ=N3(j3),UM=FM(.33,1.53,.69,.99),U3=D3(UM),NZ=N3(U3),DZ=t=>(t*=2)<1?.5*U3(t):.5*(2-Math.pow(2,-10*(t-1))),LZ={linear:F3,easeIn:L3,easeInOut:B3,easeOut:SZ,circIn:jM,circInOut:MZ,circOut:j3,backIn:U3,backInOut:NZ,backOut:UM,anticipate:DZ},r_=t=>{if(Array.isArray(t)){Qm(t.length===4);const[e,r,n,i]=t;return FM(e,r,n,i)}else if(typeof t=="string")return LZ[t];return t},BZ=t=>Array.isArray(t)&&typeof t[0]!="number";function FZ(t,e){return t.map(()=>e||B3).splice(0,t.length-1)}function jZ(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function UZ(t,e){return t.map(r=>r*e)}function Bx({keyframes:t,ease:e=B3,times:r,duration:n=300}){t=[...t];const i=BZ(e)?e.map(r_):r_(e),s={done:!1,value:t[0]},o=UZ(r&&r.length===t.length?r:jZ(t),n);function a(){return LM(o,t,{ease:Array.isArray(i)?i:FZ(t,i)})}let c=a();return{next:l=>(s.value=c(l),s.done=l>=n,s),flipTarget:()=>{t.reverse(),c=a()}}}const h2=.001,zZ=.01,n_=10,WZ=.05,HZ=1;function qZ({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;xZ(t<=n_*1e3);let o=1-e;o=Nf(WZ,HZ,o),t=Nf(zZ,n_,t/1e3),o<1?(i=l=>{const u=l*o,f=u*t,d=u-r,h=Fx(l,o),p=Math.exp(-f);return h2-d/h*p},s=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),v=Fx(Math.pow(l,2),o);return(-i(l)+h2>0?-1:1)*((d-h)*p)/v}):(i=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-h2+u*f},s=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=GZ(i,s,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const VZ=12;function GZ(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function YZ(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!i_(t,QZ)&&i_(t,KZ)){const r=qZ(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const JZ=5;function zM({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:d}=YZ(n);let h=XZ,p=u?-(u/1e3):0;const v=c/(2*Math.sqrt(a*l));function b(){const y=s-i,m=Math.sqrt(a/l)/1e3,g=Math.abs(y)<5;if(r||(r=g?.01:2),e||(e=g?.005:.5),v<1){const S=Fx(m,v);h=P=>{const T=Math.exp(-v*m*P);return s-T*((p+v*m*y)/S*Math.sin(S*P)+y*Math.cos(S*P))}}else if(v===1)h=S=>s-Math.exp(-m*S)*(y+(p+m*y)*S);else{const S=m*Math.sqrt(v*v-1);h=P=>{const T=Math.exp(-v*m*P),w=Math.min(S*P,300);return s-T*((p+v*m*y)*Math.sinh(w)+S*y*Math.cosh(w))/S}}}return b(),{next:y=>{const m=h(y);if(d)o.done=y>=f;else{let g=p;if(y!==0)if(v<1){const T=Math.max(0,y-JZ);g=O3(m-h(T),y-T)}else g=0;const S=Math.abs(g)<=r,P=Math.abs(s-m)<=e;o.done=S&&P}return o.value=o.done?s:m,o},flipTarget:()=>{p=-p,[i,s]=[s,i],b()}}}zM.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const XZ=t=>0;function ZZ({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let c=r*e;const l=o+c,u=s===void 0?l:s(l);return u!==l&&(c=u-o),{next:f=>{const d=-c*Math.exp(-f/n);return a.done=!(d>i||d<-i),a.value=a.done?u:u+d,a},flipTarget:()=>{}}}const eee={decay:ZZ,keyframes:Bx,tween:Bx,spring:zM};function WM(t,e,r=0){return t-e-r}function tee(t,e=0,r=0,n=!0){return n?WM(e+-t,e,r):e-(t-e)+r}function ree(t,e,r,n){return n?t>=e+r:t<=-r}const nee=t=>{const e=({delta:r})=>t(r);return{start:()=>En.update(e,!0),stop:()=>lc.update(e)}};function Jm({duration:t,driver:e=nee,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:d,type:h="keyframes",...p}){var v,b;const y=r;let m,g=0,S=t,P=!1,T=!0,w;const I=eee[o.length>2?"keyframes":h]||Bx,F=o[0],j=o[o.length-1];let H={done:!1,value:F};!((b=(v=I).needsInterpolation)===null||b===void 0)&&b.call(v,F,j)&&(w=LM([0,100],[F,j],{clamp:!1}),o=[0,100]);const G=I({...p,duration:t,keyframes:o});function B(){g++,i==="reverse"?(T=g%2===0,r=tee(r,S,s,T)):(r=WM(r,S,s),i==="mirror"&&G.flipTarget()),P=!1,f&&f()}function E(){m&&m.stop(),u&&u()}function _(N){T||(N=-N),r+=N,P||(H=G.next(Math.max(0,r)),w&&(H.value=w(H.value)),P=T?H.done:r<=0),d&&d(H.value),P&&(g===0&&(S=S!==void 0?S:r),g{l&&l(),m&&m.stop()},set currentTime(N){r=y,_(N)},sample:N=>{r=y;const k=t&&typeof t=="number"?Math.max(t*.5,50):50;let $=0;for(_(0);$<=N;){const L=N-$;_(Math.min(L,k)),$+=k}return H}}}function iee(t){return!t||Array.isArray(t)||typeof t=="string"&&HM[t]}const fh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,HM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fh([0,.65,.55,1]),circOut:fh([.55,0,1,.45]),backIn:fh([.31,.01,.66,-.59]),backOut:fh([.33,1.53,.69,.99])};function see(t){if(t)return Array.isArray(t)?fh(t):HM[t]}function oee(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:r,offset:c},{delay:n,duration:i,easing:see(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const s_={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},p2={},qM={};for(const t in s_)qM[t]=()=>(p2[t]===void 0&&(p2[t]=s_[t]()),p2[t]);function aee(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const cee=new Set(["opacity"]),Lp=10;function lee(t,e,{onUpdate:r,onComplete:n,...i}){if(!(qM.waapi()&&cee.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=i;if(i.type==="spring"||!iee(i.ease)){if(i.repeat===1/0)return;const f=Jm({...i,elapsed:0});let d={done:!1,value:o[0]};const h=[];let p=0;for(;!d.done&&p<2e4;)d=f.sample(p),h.push(d.value),p+=Lp;o=h,a=p-Lp,l="linear"}const u=oee(t.owner.current,e,o,{...i,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(aee(o,i)),En.update(()=>u.cancel()),n&&n()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const d=Jm({...i,autoplay:!1});t.setWithVelocity(d.sample(f-Lp).value,d.sample(f).value,Lp)}En.update(()=>u.cancel())}}}function VM(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(lc.read(n),t(s-e))};return En.read(n,!0),()=>lc.read(n)}function uee({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:VM(i,-e)}:i()}function fee({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:d,onStop:h}){const p=t[0];let v;function b(S){return r!==void 0&&Sn}function y(S){return r===void 0?n:n===void 0||Math.abs(r-S){var T;f==null||f(P),(T=S.onUpdate)===null||T===void 0||T.call(S,P)},onComplete:d,onStop:h})}function g(S){m({type:"spring",stiffness:o,damping:a,restDelta:c,...S})}if(b(p))g({velocity:e,keyframes:[p,y(p)]});else{let S=i*e+p;typeof l<"u"&&(S=l(S));const P=y(S),T=P===r?-1:1;let w,I;const F=j=>{w=I,I=j,e=O3(j-w,Do.delta),(T===1&&j>P||T===-1&&jv==null?void 0:v.stop()}}const Qc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Bp=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),v2=()=>({type:"keyframes",ease:"linear",duration:.3}),dee={type:"keyframes",duration:.8},o_={x:Qc,y:Qc,z:Qc,rotate:Qc,rotateX:Qc,rotateY:Qc,rotateZ:Qc,scaleX:Bp,scaleY:Bp,scale:Bp,opacity:v2,backgroundColor:v2,color:v2,default:Bp},hee=(t,{keyframes:e})=>e.length>2?dee:(o_[t]||o_.default)(e[1]),jx=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&uc.test(e)&&!e.startsWith("url("));function pee({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function a_(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function c_(t){return typeof t=="number"?0:M3("",t)}function GM(t,e){return t[e]||t.default||t}function vee(t,e,r,n){const i=jx(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=M3(e,r):a_(s)&&typeof r=="string"?s=c_(r):!Array.isArray(r)&&a_(r)&&typeof s=="string"&&(r=c_(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const z3=(t,e,r,n={})=>i=>{const s=GM(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-$v(o);const c=vee(e,t,r,s),l=c[0],u=c[c.length-1],f=jx(t,l),d=jx(t,u);let h={keyframes:c,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:b=>{e.set(b),s.onUpdate&&s.onUpdate(b)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!f||!d||CZ.current||s.type===!1)return uee(h);if(s.type==="inertia")return fee(h);pee(s)||(h={...h,...hee(t,h)}),h.duration&&(h.duration=$v(h.duration)),h.repeatDelay&&(h.repeatDelay=$v(h.repeatDelay));const p=e.owner,v=p&&p.current;if(p&&v instanceof HTMLElement&&!(p!=null&&p.getProps().onUpdate)){const b=lee(e,t,h);if(b)return b}return Jm(h)};function mee(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>Ux(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=Ux(t,e,r);else{const i=typeof e=="function"?$g(t,e,r.custom):e;n=KM(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function Ux(t,e,r={}){var n;const i=$g(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>KM(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=s;return yee(t,e,u+l,f,d,r)}:()=>Promise.resolve(),{when:c}=s;if(c){const[l,u]=c==="beforeChildren"?[o,a]:[a,o];return l().then(u)}else return Promise.all([o(),a(r.delay)])}function KM(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...c}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");n&&(o=n);const u=[],f=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const d in c){const h=t.getValue(d),p=c[d];if(!h||p===void 0||f&&bee(f,d))continue;const v={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const y=t.getProps()[EZ];y&&(v.elapsed=window.HandoffAppearAnimations(y,d,h,En))}let b=h.start(z3(d,h,p,t.shouldReduceMotion&&ad.has(d)?{type:!1}:v));Km(l)&&(l.add(d),b=b.then(()=>l.remove(d))),u.push(b)}return Promise.all(u).then(()=>{a&&mZ(t,a)})}function yee(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,c=i===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(gee).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(Ux(l,e,{...s,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function gee(t,e){return t.sortNodePosition(e)}function bee({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const W3=[pt.Animate,pt.InView,pt.Focus,pt.Hover,pt.Tap,pt.Drag,pt.Exit],wee=[...W3].reverse(),Eee=W3.length;function xee(t){return e=>Promise.all(e.map(({animation:r,options:n})=>mee(t,r,n)))}function Cee(t){let e=xee(t);const r=kee();let n=!0;const i=(c,l)=>{const u=$g(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function s(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},v=1/0;for(let y=0;yv&&P;const j=Array.isArray(S)?S:[S];let H=j.reduce(i,{});T===!1&&(H={});const{prevResolvedValues:G={}}=g,B={...G,...H},E=_=>{F=!0,h.delete(_),g.needsAnimating[_]=!0};for(const _ in B){const O=H[_],N=G[_];p.hasOwnProperty(_)||(O!==N?qm(O)&&qm(N)?!xM(O,N)||I?E(_):g.protectedKeys[_]=!0:O!==void 0?E(_):h.add(_):O!==void 0&&h.has(_)?E(_):g.protectedKeys[_]=!0)}g.prevProp=S,g.prevResolvedValues=H,g.isActive&&(p={...p,...H}),n&&t.blockInitialAnimation&&(F=!1),F&&!w&&d.push(...j.map(_=>({animation:_,options:{type:m,...c}})))}if(h.size){const y={};h.forEach(m=>{const g=t.getBaseTarget(m);g!==void 0&&(y[m]=g)}),d.push({animation:y})}let b=!!d.length;return n&&u.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),n=!1,b?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function See(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!xM(e,t):!1}function Yc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function kee(){return{[pt.Animate]:Yc(!0),[pt.InView]:Yc(),[pt.Hover]:Yc(),[pt.Tap]:Yc(),[pt.Drag]:Yc(),[pt.Focus]:Yc(),[pt.Exit]:Yc()}}const Aee={animation:Wa(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=Cee(t)),_g(e)&&C.useEffect(()=>e.subscribe(t),[e])}),exit:Wa(t=>{const{custom:e,visualElement:r}=t,[n,i]=EM(),s=C.useContext(P1);C.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(pt.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},l_=(t,e)=>Math.abs(t-e);function _ee(t,e){const r=l_(t.x,e.x),n=l_(t.y,e.y);return Math.sqrt(r**2+n**2)}class QM{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=y2(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=_ee(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=l,{timestamp:h}=Do;this.history.push({...d,timestamp:h});const{onStart:p,onMove:v}=this.handlers;u||(p&&p(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=m2(u,this.transformPagePoint),En.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=y2(l.type==="pointercancel"?this.lastMoveEventInfo:m2(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,h),d&&d(l,h)},!vM(e))return;this.handlers=r,this.transformPagePoint=n;const i=A3(e),s=m2(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Do;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=r;c&&c(e,y2(s,this.history)),this.removeListeners=Og(ff(window,"pointermove",this.handlePointerMove),ff(window,"pointerup",this.handlePointerUp),ff(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),lc.update(this.updatePoint)}}function m2(t,e){return e?{point:e(t.point)}:t}function u_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function y2({point:t},e){return{point:t,delta:u_(t,YM(e)),offset:u_(t,Pee(e)),velocity:Tee(e,.1)}}function Pee(t){return t[0]}function YM(t){return t[t.length-1]}function Tee(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=YM(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>$v(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function wi(t){return t.max-t.min}function zx(t,e=0,r=.01){return Math.abs(t-e)<=r}function f_(t,e,r,n=.5){t.origin=n,t.originPoint=vr(e.min,e.max,t.origin),t.scale=wi(r)/wi(e),(zx(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=vr(r.min,r.max,t.origin)-t.originPoint,(zx(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Dh(t,e,r,n){f_(t.x,e.x,r.x,n==null?void 0:n.originX),f_(t.y,e.y,r.y,n==null?void 0:n.originY)}function d_(t,e,r){t.min=r.min+e.min,t.max=t.min+wi(e)}function Iee(t,e,r){d_(t.x,e.x,r.x),d_(t.y,e.y,r.y)}function h_(t,e,r){t.min=e.min-r.min,t.max=t.min+wi(e)}function Lh(t,e,r){h_(t.x,e.x,r.x),h_(t.y,e.y,r.y)}function Oee(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?vr(r,t,n.max):Math.min(t,r)),t}function p_(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function Ree(t,{top:e,left:r,bottom:n,right:i}){return{x:p_(t.x,r,i),y:p_(t.y,e,n)}}function v_(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Ym(e.min,e.max-n,t.min):n>i&&(r=Ym(t.min,t.max-i,e.min)),Nf(0,1,r)}function Nee(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const Wx=.35;function Dee(t=Wx){return t===!1?t=0:t===!0&&(t=Wx),{x:m_(t,"left","right"),y:m_(t,"top","bottom")}}function m_(t,e,r){return{min:y_(t,e),max:y_(t,r)}}function y_(t,e){return typeof t=="number"?t:t[e]||0}const g_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bh=()=>({x:g_(),y:g_()}),b_=()=>({min:0,max:0}),Ir=()=>({x:b_(),y:b_()});function js(t){return[t("x"),t("y")]}function JM({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function Lee({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Bee(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function g2(t){return t===void 0||t===1}function Hx({scale:t,scaleX:e,scaleY:r}){return!g2(t)||!g2(e)||!g2(r)}function tl(t){return Hx(t)||XM(t)||t.z||t.rotate||t.rotateX||t.rotateY}function XM(t){return w_(t.x)||w_(t.y)}function w_(t){return t&&t!=="0%"}function Xm(t,e,r){const n=t-r,i=e*n;return r+i}function E_(t,e,r,n,i){return i!==void 0&&(t=Xm(t,i,n)),Xm(t,r,n)+e}function qx(t,e=0,r=1,n,i){t.min=E_(t.min,e,r,n,i),t.max=E_(t.max,e,r,n,i)}function ZM(t,{x:e,y:r}){qx(t.x,e.translate,e.scale,e.originPoint),qx(t.y,r.translate,r.scale,r.originPoint)}function Fee(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,c;for(let l=0;l1.0000000000001||t<.999999999999?t:1}function Ia(t,e){t.min=t.min+e,t.max=t.max+e}function C_(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=vr(t.min,t.max,s);qx(t,e[r],e[n],o,e.scale)}const jee=["x","scaleX","originX"],Uee=["y","scaleY","originY"];function Qu(t,e){C_(t.x,e,jee),C_(t.y,e,Uee)}function eN(t,e){return JM(Bee(t.getBoundingClientRect(),e))}function zee(t,e,r){const n=eN(t,r),{scroll:i}=e;return i&&(Ia(n.x,i.offset.x),Ia(n.y,i.offset.y)),n}const Wee=new WeakMap;class Hee{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ir(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(A3(a,"page").point)},i=(a,c)=>{var l;const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=gM(u),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),js(h=>{var p,v;let b=this.getAxisMotionValue(h).get()||0;if(so.test(b)){const y=(v=(p=this.visualElement.projection)===null||p===void 0?void 0:p.layout)===null||v===void 0?void 0:v.layoutBox[h];y&&(b=wi(y)*(parseFloat(b)/100))}this.originPoint[h]=b}),d==null||d(a,c),(l=this.visualElement.animationState)===null||l===void 0||l.setActive(pt.Drag,!0))},s=(a,c)=>{const{dragPropagation:l,dragDirectionLock:u,onDirectionLock:f,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:h}=c;if(u&&this.currentDirection===null){this.currentDirection=qee(h),this.currentDirection!==null&&(f==null||f(this.currentDirection));return}this.updateAxis("x",c.point,h),this.updateAxis("y",c.point,h),this.visualElement.render(),d==null||d(a,c)},o=(a,c)=>this.stop(a,c);this.panSession=new QM(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(pt.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Fp(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Oee(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&Gu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=Ree(n.layoutBox,e):this.constraints=!1,this.elastic=Dee(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&js(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=Nee(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Gu(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=zee(n,i.root,this.visualElement.getTransformPagePoint());let o=$ee(i.layout.layoutBox,s);if(r){const a=r(Lee(o));this.hasMutatedConstraints=!!a,a&&(o=JM(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=js(u=>{if(!Fp(u,r,this.currentDirection))return;let f=(c==null?void 0:c[u])||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(z3(e,n,0,r))}stopAnimation(){js(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){js(r=>{const{drag:n}=this.getProps();if(!Fp(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-vr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Gu(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};js(a=>{const c=this.getAxisMotionValue(a);if(c){const l=c.get();s[a]=Mee({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),js(a=>{if(!Fp(a,r,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(vr(l,u,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Wee.set(this.visualElement,this);const r=this.visualElement.current,n=ff(r,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Gu(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=Ig(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(js(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Wx,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Fp(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function qee(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function Vee(t){const{dragControls:e,visualElement:r}=t,n=Tg(()=>new Hee(r));C.useEffect(()=>e&&e.subscribe(n),[n,e]),C.useEffect(()=>n.addListeners(),[n])}function Gee({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=C.useRef(null),{transformPagePoint:a}=C.useContext(m3),c={onSessionStart:n,onStart:e,onMove:t,onEnd:(u,f)=>{o.current=null,r&&r(u,f)}};C.useEffect(()=>{o.current!==null&&o.current.updateHandlers(c)});function l(u){o.current=new QM(u,c,{transformPagePoint:a})}Vm(i,"pointerdown",s&&l),_3(()=>o.current&&o.current.end())}const Kee={pan:Wa(Gee),drag:Wa(Vee)};function Vx(t){return typeof t=="string"&&t.startsWith("var(--")}const tN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Qee(t){const e=tN.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Gx(t,e,r=1){const[n,i]=Qee(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():Vx(i)?Gx(i,e,r+1):i}function Yee(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!Vx(s))return;const o=Gx(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!Vx(s))continue;const o=Gx(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const Jee=new Set(["width","height","top","left","right","bottom","x","y"]),rN=t=>Jee.has(t),Xee=t=>Object.keys(t).some(rN),S_=t=>t===eu||t===we;var k_;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(k_||(k_={}));const A_=(t,e)=>parseFloat(t.split(", ")[e]),__=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return A_(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?A_(s[1],t):0}},Zee=new Set(["x","y","z"]),ete=Wm.filter(t=>!Zee.has(t));function tte(t){const e=[];return ete.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const P_={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:__(4,13),y:__(5,14)},rte=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=P_[l](n,s)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=P_[l](c,s)}),t},nte=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(rN);let s=[],o=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=Kd(u);const d=e[c];let h;if(qm(d)){const p=d.length,v=d[0]===null?1:0;u=d[v],f=Kd(u);for(let b=v;b=0?window.pageYOffset:null,l=rte(e,t,a);return s.length&&s.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),Ag&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function ite(t,e,r,n){return Xee(e)?nte(t,e,r,n):{target:e,transitionEnd:n}}const ste=(t,e,r,n)=>{const i=Yee(t,e,n);return e=i.target,n=i.transitionEnd,ite(t,e,r,n)},Kx={current:null},nN={current:!1};function ote(){if(nN.current=!0,!!Ag)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Kx.current=t.matches;t.addListener(e),e()}else Kx.current=!1}function ate(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(ni(s))t.addValue(i,s),Km(n)&&n.add(i);else if(ni(o))t.addValue(i,Df(s,{owner:t})),Km(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,Df(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const iN=Object.keys(P0),cte=iN.length,T_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lte{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>En.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=Pg(r),this.isVariantNode=rM(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...l}=this.scrapeMotionValuesFromProps(r,{});for(const u in l){const f=l[u];o[u]!==void 0&&ni(f)&&(f.set(o[u],!1),Km(c)&&c.add(u))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),nN.current||ote(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kx.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),lc.update(this.notifyUpdate),lc.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=ad.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&En.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const c=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:p})}return c}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ir()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Df(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=k3(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!ni(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new I3),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const sN=["initial",...W3],ute=sN.length;class oN extends lte{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=bZ(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){yZ(this,n,o);const a=ste(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function fte(t){return window.getComputedStyle(t)}class dte extends oN{readValueFromInstance(e,r){if(ad.has(r)){const n=$3(r);return n&&n.default||0}else{const n=fte(e),i=(sM(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return eN(e,r)}build(e,r,n,i){b3(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return S3(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ni(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){uM(e,r,n,i)}}class hte extends oN{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return ad.has(r)?((n=$3(r))===null||n===void 0?void 0:n.default)||0:(r=fM.has(r)?r:C3(r),e.getAttribute(r))}measureInstanceViewportBox(){return Ir()}scrapeMotionValuesFromProps(e,r){return hM(e,r)}build(e,r,n,i){E3(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){dM(e,r,n,i)}mount(e){this.isSVGTag=x3(e.tagName),super.mount(e)}}const pte=(t,e)=>g3(t)?new hte(e,{enableHardwareAcceleration:!1}):new dte(e,{enableHardwareAcceleration:!0});function I_(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(we.test(t))t=parseFloat(t);else return t;const r=I_(t,e.target.x),n=I_(t,e.target.y);return`${r}% ${n}%`}},O_="_$css",vte={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(tN,h=>(s.push(h),O_)));const o=uc.parse(t);if(o.length>5)return n;const a=uc.createTransformer(t),c=typeof o[0]!="number"?1:0,l=r.x.scale*e.x,u=r.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=vr(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let d=a(o);if(i){let h=0;d=d.replace(O_,()=>{const p=s[h];return h++,p})}return d}};class mte extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;oX(gte),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$h.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||En.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function yte(t){const[e,r]=EM(),n=C.useContext(y3);return x.createElement(mte,{...t,layoutGroup:n,switchLayoutGroup:C.useContext(nM),isPresent:e,safeToRemove:r})}const gte={borderRadius:{...Qd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qd,borderTopRightRadius:Qd,borderBottomLeftRadius:Qd,borderBottomRightRadius:Qd,boxShadow:vte},bte={measureLayout:yte};function wte(t,e,r={}){const n=ni(t)?t:Df(t);return n.start(z3("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const aN=["TopLeft","TopRight","BottomLeft","BottomRight"],Ete=aN.length,R_=t=>typeof t=="string"?parseFloat(t):t,$_=t=>typeof t=="number"||we.test(t);function xte(t,e,r,n,i,s){i?(t.opacity=vr(0,r.opacity!==void 0?r.opacity:1,Cte(n)),t.opacityExit=vr(e.opacity!==void 0?e.opacity:1,0,Ste(n))):s&&(t.opacity=vr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Ym(t,e,n))}function N_(t,e){t.min=e.min,t.max=e.max}function rs(t,e){N_(t.x,e.x),N_(t.y,e.y)}function D_(t,e,r,n,i){return t-=e,t=Xm(t,1/r,n),i!==void 0&&(t=Xm(t,1/i,n)),t}function kte(t,e=0,r=1,n=.5,i,s=t,o=t){if(so.test(e)&&(e=parseFloat(e),e=vr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=vr(s.min,s.max,n);t===s&&(a-=e),t.min=D_(t.min,e,r,a,i),t.max=D_(t.max,e,r,a,i)}function L_(t,e,[r,n,i],s,o){kte(t,e[r],e[n],e[i],e.scale,s,o)}const Ate=["x","scaleX","originX"],_te=["y","scaleY","originY"];function B_(t,e,r,n){L_(t.x,e,Ate,r==null?void 0:r.x,n==null?void 0:n.x),L_(t.y,e,_te,r==null?void 0:r.y,n==null?void 0:n.y)}function F_(t){return t.translate===0&&t.scale===1}function lN(t){return F_(t.x)&&F_(t.y)}function uN(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function j_(t){return wi(t.x)/wi(t.y)}class Pte{constructor(){this.members=[]}add(e){P3(this.members,e),e.scheduleRender()}remove(e){if(T3(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function U_(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const Tte=(t,e)=>t.depth-e.depth;class Ite{constructor(){this.children=[],this.isDirty=!1}add(e){P3(this.children,e),this.isDirty=!0}remove(e){T3(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Tte),this.isDirty=!1,this.children.forEach(e)}}const z_=["","X","Y","Z"],W_=1e3;let Ote=0;function fN({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=Ote++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Mte),this.nodes.forEach(Lte),this.nodes.forEach(Bte)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=VM(h,250),$h.hasAnimatedSinceResize&&($h.hasAnimatedSinceResize=!1,this.nodes.forEach(q_))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:v})=>{var b,y,m,g,S;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=(y=(b=this.options.transition)!==null&&b!==void 0?b:f.getDefaultTransition())!==null&&y!==void 0?y:Wte,{onLayoutAnimationStart:T,onLayoutAnimationComplete:w}=f.getProps(),I=!this.targetLayout||!uN(this.targetLayout,v)||p,F=!h&&p;if(this.options.layoutRoot||!((m=this.resumeFrom)===null||m===void 0)&&m.instance||F||h&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,F);const j={...GM(P,"layout"),onPlay:T,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else!h&&this.animationProgress===0&&q_(this),this.isLead()&&((S=(g=this.options).onExitComplete)===null||S===void 0||S.call(g));this.targetLayout=v})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,lc.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(Fte),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,c,l;if(this.root.isUpdateBlocked()){(c=(a=this.options).onExitComplete)===null||c===void 0||c.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{var g;const S=m/1e3;V_(h.x,o.x,S),V_(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((g=this.relativeParent)===null||g===void 0)&&g.layout)&&(Lh(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ute(this.relativeTarget,this.relativeTargetOrigin,p,S)),v&&(this.animationValues=d,xte(d,f,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(lc.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=En.update(()=>{$h.hasAnimatedSinceResize=!0,this.currentAnimation=wte(0,W_,{...o,onUpdate:l=>{var u;this.mixTargetDelta(l),(u=o.onUpdate)===null||u===void 0||u.call(o,l)},onComplete:()=>{var l;(l=o.onComplete)===null||l===void 0||l.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,W_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&dN(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ir();const f=wi(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=wi(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}rs(a,c),Qu(a,u),Dh(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){var c,l,u;this.sharedNodes.has(o)||this.sharedNodes.set(o,new Pte),this.sharedNodes.get(o).add(a),a.promote({transition:(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(u=(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.shouldPreserveFollowOpacity)===null||u===void 0?void 0:u.call(l,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(H_),this.root.sharedNodes.clear()}}}function Rte(t){t.updateLayout()}function $te(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,c=i.source!==t.layout.source;a==="size"?js(h=>{const p=c?i.measuredBox[h]:i.layoutBox[h],v=wi(p);p.min=s[h].min,p.max=p.min+v}):dN(a,i.layoutBox,s)&&js(h=>{const p=c?i.measuredBox[h]:i.layoutBox[h],v=wi(s[h]);p.max=p.min+v});const l=Bh();Dh(l,s,i.layoutBox);const u=Bh();c?Dh(u,t.applyTransform(o,!0),i.measuredBox):Dh(u,s,i.layoutBox);const f=!lN(l);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:v}=h;if(p&&v){const b=Ir();Lh(b,i.layoutBox,p.layoutBox);const y=Ir();Lh(y,s,v.layoutBox),uN(b,y)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function Mte(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function Nte(t){t.clearSnapshot()}function H_(t){t.clearMeasurements()}function Dte(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function q_(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Lte(t){t.resolveTargetDelta()}function Bte(t){t.calcProjection()}function Fte(t){t.resetRotation()}function jte(t){t.removeLeadSnapshot()}function V_(t,e,r){t.translate=vr(e.translate,0,r),t.scale=vr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function G_(t,e,r,n){t.min=vr(e.min,r.min,n),t.max=vr(e.max,r.max,n)}function Ute(t,e,r,n){G_(t.x,e.x,r.x,n),G_(t.y,e.y,r.y,n)}function zte(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Wte={duration:.45,ease:[.4,0,.1,1]};function Hte(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(t.path[s].instance){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function K_(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function qte(t){K_(t.x),K_(t.y)}function dN(t,e,r){return t==="position"||t==="preserve-aspect"&&!zx(j_(e),j_(r),.2)}const Vte=fN({attachResizeListener:(t,e)=>Ig(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),b2={current:void 0},Gte=fN({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!b2.current){const t=new Vte(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),b2.current=t}return b2.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Kte={...Aee,...qX,...Kee,...bte},O0=iX((t,e)=>RX(t,e,Kte,pte,Gte));function hN(){const t=C.useRef(!1);return Um(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Qte(){const t=hN(),[e,r]=C.useState(0),n=C.useCallback(()=>{t.current&&r(e+1)},[e]);return[C.useCallback(()=>En.postRender(n),[n]),e]}class Yte extends C.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Jte({children:t,isPresent:e}){const r=C.useId(),n=C.useRef(null),i=C.useRef({width:0,height:0,top:0,left:0});return C.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:c}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` +`)}static register(e,r){r||(r=e.locale)}}const PY="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let Oh=null;function EA(t){if(Oh==null&&(Oh=PY.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),k1.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Oh=null,new Error("BIP39 Wordlist for en (English) FAILED")}class TY extends k1{constructor(){super("en")}getWord(e){return EA(this),Oh[e]}getWordIndex(e){return EA(this),Oh.indexOf(e)}}const O$=new TY;k1.register(O$);const xA={en:O$},IY="hdnode/5.7.0",k0=new ee(IY),OY=J.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),RY=bt("Bitcoin seed"),_u=2147483648;function R$(t){return(1<=256)throw new Error("Depth too large!");return CA(Wt([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",te(this.depth),this.parentFingerprint,ft(te(this.index),4),this.chainCode,this.privateKey!=null?Wt(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Co(hu,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let r=this.path;r&&(r+="/"+(e&~_u));const n=new Uint8Array(37);if(e&_u){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set(ne(this.privateKey),1),r&&(r+="'")}else n.set(ne(this.publicKey));for(let f=24;f>=0;f-=8)n[33+(f>>3)]=e>>24-f&255;const i=ne(S0($f.sha512,this.chainCode,n)),s=i.slice(0,32),o=i.slice(32);let a=null,c=null;this.privateKey?a=Op(J.from(s).add(this.privateKey).mod(OY)):c=new Nm(te(s))._addPoint(this.publicKey);let l=r;const u=this.mnemonic;return u&&(l=Object.freeze({phrase:u.phrase,path:r,locale:u.locale||"en"})),new Co(hu,a,c,this.fingerprint,Op(o),e,this.depth+1,l)}derivePath(e){const r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();let n=this;for(let i=0;i=_u)throw new Error("invalid path index - "+s);n=n._derive(_u+o)}else if(s.match(/^[0-9]+$/)){const o=parseInt(s);if(o>=_u)throw new Error("invalid path index - "+s);n=n._derive(o)}else throw new Error("invalid path component - "+s)}return n}static _fromSeed(e,r){const n=ne(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const i=ne(S0($f.sha512,RY,n));return new Co(hu,Op(i.slice(0,32)),null,"0x00000000",Op(i.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=f3(n),e=M$(d3(e,n),n),Co._fromSeed($$(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Co._fromSeed(e,null)}static fromExtendedKey(e){const r=Rf.decode(e);(r.length!==82||CA(r.slice(0,78))!==e)&&k0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],i=te(r.slice(5,9)),s=parseInt(te(r.slice(9,13)).substring(2),16),o=te(r.slice(13,45)),a=r.slice(45,78);switch(te(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Co(hu,null,te(a),i,o,s,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Co(hu,te(a.slice(1)),null,i,o,s,n,null)}return k0.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function $$(t,e){e||(e="");const r=bt("mnemonic"+e,Wo.NFKD);return kY(bt(t,Wo.NFKD),r,2048,64,"sha512")}function d3(t,e){e=f3(e),k0.checkNormalize();const r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");const n=ne(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let l=0;l>3]|=1<<7-i%8),i++}const s=32*r.length/3,o=r.length/3,a=R$(o);if((ne(Vo(n.slice(0,s/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return te(n.slice(0,s/8))}function M$(t,e){if(e=f3(e),t=ne(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let o=0;o8?(r[r.length-1]<<=8,r[r.length-1]|=t[o],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[o]>>8-n,r.push(t[o]&$Y(8-n)),n+=3);const i=t.length/4,s=ne(Vo(t))[0]&R$(i);return r[r.length-1]<<=i,r[r.length-1]|=s>>8-i,e.join(r.map(o=>e.getWord(o)))}function NY(t,e){try{return d3(t,e),!0}catch{}return!1}function DY(t){return(typeof t!="number"||t<0||t>=_u||t%1)&&k0.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const LY="random/5.7.0",kx=new ee(LY);function FY(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const SA=FY();let Iv=SA.crypto||SA.msCrypto;(!Iv||!Iv.getRandomValues)&&(kx.warn("WARNING: Missing strong random number source"),Iv={getRandomValues:function(t){return kx.throwError("no secure random source avaialble",ee.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function A1(t){(t<=0||t>1024||t%1||t!=t)&&kx.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Iv.getRandomValues(e),ne(e)}function N$(t){t=t.slice();for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function BY(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function jY(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}function UY(t){if(BY(t))try{return qe(JSON.parse(t).ethaddr)}catch{return null}if(jY(t))try{return qe(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function D$(t,e){return Ll(n3(t),e)}function zY(t,e,r,n){return Ll(Wr.hash(t,e,r),n)}const WY="networks/5.7.1",kA=new ee(WY);function HY(t){return t&&typeof t.renetwork=="function"}function _o(t){const e=function(r,n){n==null&&(n={});const i=[];if(r.InfuraProvider&&n.infura!=="-")try{i.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{i.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{i.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const s=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{i.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const s=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&s.indexOf(o.network.name)===-1&&i.push(o)}catch{}if(i.length===0)return null;if(r.FallbackProvider){let s=1;return n.quorum!=null?s=n.quorum:t==="homestead"&&(s=2),new r.FallbackProvider(i,s)}return i[0]};return e.renetwork=function(r){return _o(r)},e}function Lm(t,e){const r=function(n,i){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return Lm(t,n)},r}const AA={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:_o("homestead")},_A={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:_o("ropsten")},PA={chainId:63,name:"classicMordor",_defaultProvider:Lm("https://www.ethercluster.com/mordor","classicMordor")},Rp={unspecified:{chainId:0,name:"unspecified"},homestead:AA,mainnet:AA,morden:{chainId:2,name:"morden"},ropsten:_A,testnet:_A,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:_o("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:_o("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:_o("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:_o("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Lm("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:PA,classicTestnet:PA,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Lm("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:_o("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:_o("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 qY(t){if(t==null)return null;if(typeof t=="number"){for(const n in Rp){const i=Rp[n];if(i.chainId===t)return{name:i.name,chainId:i.chainId,ensAddress:i.ensAddress||null,_defaultProvider:i._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Rp[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Rp[t.name];if(!e)return typeof t.chainId!="number"&&kA.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&kA.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(HY(e._defaultProvider)?r=e._defaultProvider.renetwork(t):r=e._defaultProvider),{name:t.name,chainId:e.chainId,ensAddress:t.ensAddress||e.ensAddress||null,_defaultProvider:r}}const VY="web/5.7.1";var GY=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function KY(t,e){return GY(this,void 0,void 0,function*(){e==null&&(e={});const r={method:e.method||"GET",headers:e.headers||{},body:e.body||void 0};if(e.skipFetchSetup!==!0&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),e.fetchOptions!=null){const o=e.fetchOptions;o.mode&&(r.mode=o.mode),o.cache&&(r.cache=o.cache),o.credentials&&(r.credentials=o.credentials),o.redirect&&(r.redirect=o.redirect),o.referrer&&(r.referrer=o.referrer)}const n=yield fetch(t,r),i=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((o,a)=>{s[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{s[o.toLowerCase()]=n.headers.get(o)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:ne(new Uint8Array(i))}})}var QY=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const is=new ee(VY);function TA(t){return new Promise(e=>{setTimeout(e,t)})}function xa(t,e){if(t==null)return null;if(typeof t=="string")return t;if(zo(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return ca(t)}catch{}return te(t)}return t}function YY(t){return bt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function L$(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;is.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const i=typeof t=="object"?t.throttleCallback:null,s=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;is.assertArgument(s>0&&s%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",s);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let c=null;const l={method:"GET"};let u=!1,f=2*60*1e3;if(typeof t=="string")c=t;else if(typeof t=="object"){if((t==null||t.url==null)&&is.throwArgumentError("missing URL","connection.url",t),c=t.url,typeof t.timeout=="number"&&t.timeout>0&&(f=t.timeout),t.headers)for(const y in t.headers)a[y.toLowerCase()]={key:y,value:String(t.headers[y])},["if-none-match","if-modified-since"].indexOf(y.toLowerCase())>=0&&(u=!0);if(l.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){c.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&is.throwError("basic authentication requires a secure https url",ee.errors.INVALID_ARGUMENT,{argument:"url",url:c,user:t.user,password:"[REDACTED]"});const y=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+t3(bt(y))}}t.skipFetchSetup!=null&&(l.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(l.fetchOptions=Ht(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=c?c.match(d):null;if(h)try{const y={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?e3(h[3]):YY(h[3])};let m=y.body;return r&&(m=r(y.body,y)),Promise.resolve(m)}catch(y){is.throwError("processing response error",ee.errors.SERVER_ERROR,{body:xa(h[1],h[2]),error:y,requestBody:null,requestMethod:"GET",url:c})}e&&(l.method="POST",l.body=e,a["content-type"]==null&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),a["content-length"]==null&&(a["content-length"]={key:"Content-Length",value:String(e.length)}));const p={};Object.keys(a).forEach(y=>{const m=a[y];p[m.key]=m.value}),l.headers=p;const v=function(){let y=null;return{promise:new Promise(function(S,P){f&&(y=setTimeout(()=>{y!=null&&(y=null,P(is.makeError("timeout",ee.errors.TIMEOUT,{requestBody:xa(l.body,p["content-type"]),requestMethod:l.method,timeout:f,url:c})))},f))}),cancel:function(){y!=null&&(clearTimeout(y),y=null)}}}(),b=function(){return QY(this,void 0,void 0,function*(){for(let y=0;y=300)&&(v.cancel(),is.throwError("bad response",ee.errors.SERVER_ERROR,{status:m.statusCode,headers:m.headers,body:xa(g,m.headers?m.headers["content-type"]:null),requestBody:xa(l.body,p["content-type"]),requestMethod:l.method,url:c})),r)try{const S=yield r(g,m);return v.cancel(),S}catch(S){if(S.throttleRetry&&y{let a=null;if(s!=null)try{a=JSON.parse(ca(s))}catch(c){is.throwError("invalid JSON",ee.errors.SERVER_ERROR,{body:s,error:c})}return r&&(a=r(a,o)),a},i=null;if(e!=null){i=bt(e);const s=typeof t=="string"?{url:t}:Ht(t);s.headers?Object.keys(s.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(s.headers=Ht(s.headers),s.headers["content-type"]="application/json"):s.headers={"content-type":"application/json"},t=s}return L$(t,i,n)}function za(t,e){return e||(e={}),e=Ht(e),e.floor==null&&(e.floor=0),e.ceiling==null&&(e.ceiling=1e4),e.interval==null&&(e.interval=250),new Promise(function(r,n){let i=null,s=!1;const o=()=>s?!1:(s=!0,i&&clearTimeout(i),!0);e.timeout&&(i=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let c=0;function l(){return t().then(function(u){if(u!==void 0)o()&&r(u);else if(e.oncePoll)e.oncePoll.once("poll",l);else if(e.onceBlock)e.onceBlock.once("block",l);else if(!s){if(c++,c>a){o()&&n(new Error("retry limit reached"));return}let f=e.interval*parseInt(String(Math.random()*Math.pow(2,c)));fe.ceiling&&(f=e.ceiling),setTimeout(l,f)}return null},function(u){o()&&n(u)})}l()})}var Fm="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ax={};for(var $p=0;$p>25;return(t&33554431)<<5^-(e>>0&1)&996825010^-(e>>1&1)&642813549^-(e>>2&1)&513874426^-(e>>3&1)&1027748829^-(e>>4&1)&705979059}function F$(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=uf(e)^n>>5}for(e=uf(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=F$(t);if(typeof n=="string")throw new Error(n);for(var i=t+"1",s=0;s>5)throw new Error("Non 5-bit word");n=uf(n)^o,i+=Fm.charAt(o)}for(s=0;s<6;++s)n=uf(n);for(n^=1,s=0;s<6;++s){var a=n>>(5-s)*5&31;i+=Fm.charAt(a)}return i}function B$(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var r=t.toLowerCase(),n=t.toUpperCase();if(t!==r&&t!==n)return"Mixed-case string "+t;t=r;var i=t.lastIndexOf("1");if(i===-1)return"No separator character for "+t;if(i===0)return"Missing prefix for "+t;var s=t.slice(0,i),o=t.slice(i+1);if(o.length<6)return"Data too short";var a=F$(s);if(typeof a=="string")return a;for(var c=[],l=0;l=o.length)&&c.push(f)}return a!==1?"Invalid checksum for "+t:{prefix:s,words:c}}function XY(){var t=B$.apply(null,arguments);if(typeof t=="object")return t}function ZY(t){var e=B$.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Cg(t,e,r,n){for(var i=0,s=0,o=(1<=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<=e)return"Excess padding";if(i<this.data(f,!0);return e.transaction={hash:o,type:l,accessList:de.allowNull(this.accessList.bind(this),null),blockHash:de.allowNull(o,null),blockNumber:de.allowNull(c,null),transactionIndex:de.allowNull(c,null),confirmations:de.allowNull(c,null),from:r,gasPrice:de.allowNull(n),maxPriorityFeePerGas:de.allowNull(n),maxFeePerGas:de.allowNull(n),gasLimit:n,to:de.allowNull(r,null),value:n,nonce:c,data:s,r:de.allowNull(this.uint256),s:de.allowNull(this.uint256),v:de.allowNull(c),creates:de.allowNull(r,null),raw:de.allowNull(s)},e.transactionRequest={from:de.allowNull(r),nonce:de.allowNull(c),gasLimit:de.allowNull(n),gasPrice:de.allowNull(n),maxPriorityFeePerGas:de.allowNull(n),maxFeePerGas:de.allowNull(n),to:de.allowNull(r),value:de.allowNull(n),data:de.allowNull(u),type:de.allowNull(c),accessList:de.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:o,address:r,topics:de.arrayOf(o),data:s,logIndex:c,blockHash:o},e.receipt={to:de.allowNull(this.address,null),from:de.allowNull(this.address,null),contractAddress:de.allowNull(r,null),transactionIndex:c,root:de.allowNull(a),gasUsed:n,logsBloom:de.allowNull(s),blockHash:o,transactionHash:o,logs:de.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:de.allowNull(c,null),cumulativeGasUsed:n,effectiveGasPrice:de.allowNull(n),status:de.allowNull(c),type:l},e.block={hash:de.allowNull(o),parentHash:o,number:c,timestamp:c,nonce:de.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:de.allowNull(r),extraData:s,transactions:de.allowNull(de.arrayOf(o)),baseFeePerGas:de.allowNull(n)},e.blockWithTransactions=Ht(e.block),e.blockWithTransactions.transactions=de.allowNull(de.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:de.allowNull(i,void 0),toBlock:de.allowNull(i,void 0),blockHash:de.allowNull(o,void 0),address:de.allowNull(r,void 0),topics:de.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:de.allowNull(c),blockHash:de.allowNull(o),transactionIndex:c,removed:de.allowNull(this.boolean.bind(this)),address:r,data:de.allowFalsish(s,"0x"),topics:de.arrayOf(o),transactionHash:o,logIndex:c},e}accessList(e){return Zl(e||[])}number(e){return e==="0x"?0:J.from(e).toNumber()}type(e){return e==="0x"||e==null?0:J.from(e).toNumber()}bigNumber(e){return J.from(e)}boolean(e){if(typeof e=="boolean")return e;if(typeof e=="string"){if(e=e.toLowerCase(),e==="true")return!0;if(e==="false")return!1}throw new Error("invalid boolean - "+e)}hex(e,r){return typeof e=="string"&&(!r&&e.substring(0,2)!=="0x"&&(e="0x"+e),Be(e))?e.toLowerCase():Hd.throwArgumentError("invalid hash","value",e)}data(e,r){const n=this.hex(e,r);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}address(e){return qe(e)}callAddress(e){if(!Be(e,32))return null;const r=qe(br(e,12));return r===lr?null:r}contractAddress(e){return Q6(e)}blockTag(e){if(e==null)return"latest";if(e==="earliest")return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if(typeof e=="number"||Be(e))return gs(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return uo(n)!==32?Hd.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=J.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!Be(e))throw new Error("invalid uint256");return ft(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,i=de.check(r,e);return i._difficulty=n==null?null:J.from(n),i}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return de.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&J.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),e.input!=null&&e.data==null&&(e.data=e.input),e.to==null&&e.creates==null&&(e.creates=this.contractAddress(e)),(e.type===1||e.type===2)&&e.accessList==null&&(e.accessList=[]);const r=de.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;Be(n)&&(n=J.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),Be(n)&&(n=J.from(n).toNumber()),typeof n!="number"&&r.v!=null&&(n=(r.v-35)/2,n<0&&(n=0),n=parseInt(n)),typeof n!="number"&&(n=0),r.chainId=n}return r.blockHash&&r.blockHash.replace(/0/g,"")==="x"&&(r.blockHash=null),r}transaction(e){return A$(e)}receiptLog(e){return de.check(this.formats.receiptLog,e)}receipt(e){const r=de.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=J.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&Hd.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):Hd.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&Hd.throwArgumentError("invalid root hash","value.root",r.root);return r.status!=null&&(r.byzantium=!0),r}topics(e){return Array.isArray(e)?e.map(r=>this.topics(r)):e!=null?this.hash(e,!0):null}filter(e){return de.check(this.formats.filter,e)}filterLog(e){return de.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const i in e)try{const s=e[i](r[i]);s!==void 0&&(n[i]=s)}catch(s){throw s.checkKey=i,s.checkValue=r[i],s}return n}static allowNull(e,r){return function(n){return n==null?r:e(n)}}static allowFalsish(e,r){return function(n){return n?e(n):r}}static arrayOf(e){return function(r){if(!Array.isArray(r))throw new Error("not an array");const n=[];return r.forEach(function(i){n.push(e(i))}),n}}}function sJ(t){return t&&typeof t.isCommunityResource=="function"}function OA(t){return sJ(t)&&t.isCommunityResource()}var Se=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const He=new ee(od),oJ=10;function RA(t){return t==null?"null":(uo(t)!==32&&He.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function $A(t){for(t=t.slice();t.length>0&&t[t.length-1]==null;)t.pop();return t.map(e=>{if(Array.isArray(e)){const r={};e.forEach(i=>{r[RA(i)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return RA(e)}).join("&")}function aJ(t){return t===""?[]:t.split(/&/g).map(e=>{if(e==="")return[];const r=e.split("|").map(n=>n==="null"?null:n);return r.length===1?r[0]:r})}function pu(t){if(typeof t=="string"){if(t=t.toLowerCase(),uo(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+$A(t);if(bK.isForkEvent(t))throw He.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+$A(t.topics||[])}throw new Error("invalid event - "+t)}function qd(){return new Date().getTime()}function MA(t){return new Promise(e=>{setTimeout(e,t)})}const cJ=["block","network","pending","poll"];let lJ=class{constructor(e,r,n){ie(this,"tag",e),ie(this,"listener",r),ie(this,"once",n),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 e=this.tag.split(":");return e[0]!=="tx"?null:e[1]}get filter(){const e=this.tag.split(":");if(e[0]!=="filter")return null;const r=e[1],n=aJ(e[2]),i={};return n.length>0&&(i.topics=n),r&&r!=="*"&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||cJ.indexOf(this.tag)>=0}};const uJ={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 s2(t){return ft(J.from(t).toHexString(),32)}function NA(t){return Rf.encode(Wt([t,br(Vo(Vo(t)),0,4)]))}const j$=new RegExp("^(ipfs)://(.*)$","i"),DA=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),j$,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ov(t,e){try{return ca(A0(t,e))}catch{}return null}function A0(t,e){if(t==="0x")return null;const r=J.from(br(t,e,e+32)).toNumber(),n=J.from(br(t,r,r+32)).toNumber();return br(t,r+32,r+32+n)}function o2(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):He.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function LA(t){const e=ne(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function fJ(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function U$(t){const e=[];let r=0;for(let n=0;nJ.from(e).eq(1)).catch(e=>{if(e.code===ee.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,r){return Se(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:On([e,Ih(this.name),r||"0x"])};let i=!1;(yield this.supportsWildcard())&&(i=!0,n.data=On(["0x9061b923",U$([VR(this.name),n.data])]));try{let s=yield this.provider.call(n);return ne(s).length%32===4&&He.throwError("resolver threw error",ee.errors.CALL_EXCEPTION,{transaction:n,data:s}),i&&(s=A0(s,0)),s}catch(s){if(s.code===ee.errors.CALL_EXCEPTION)return null;throw s}})}_fetchBytes(e,r){return Se(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?A0(n,0):null})}_getAddress(e,r){const n=uJ[String(e)];if(n==null&&He.throwError(`unsupported coin type: ${e}`,ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const i=ne(r);if(n.p2pkh!=null){const s=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return NA(Wt([[n.p2pkh],"0x"+s[2]]))}}if(n.p2sh!=null){const s=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(s){const o=parseInt(s[1],16);if(s[2].length===o*2&&o>=1&&o<=75)return NA(Wt([[n.p2sh],"0x"+s[2]]))}}if(n.prefix!=null){const s=i[1];let o=i[0];if(o===0?s!==20&&s!==32&&(o=-1):o=-1,o>=0&&i.length===2+s&&s>=1&&s<=75){const a=IA.toWords(i.slice(2));return a.unshift(o),IA.encode(n.prefix,a)}}return null}getAddress(e){return Se(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Tm?null:this.provider.formatter.callAddress(i)}catch(i){if(i.code===ee.errors.CALL_EXCEPTION)return null;throw i}const r=yield this._fetchBytes("0xf1cb7e06",s2(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&He.throwError("invalid or unsupported coin data",ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Se(this,void 0,void 0,function*(){const e=[{type:"name",content:this.name}];try{const r=yield this.getText("avatar");if(r==null)return null;for(let n=0;no[c])}return He.throwError("invalid or unsupported content hash data",ee.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Se(this,void 0,void 0,function*(){let r=bt(e);r=Wt([s2(64),s2(r.length),r]),r.length%32!==0&&(r=Wt([r,ft("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",te(r));return n==null||n==="0x"?null:ca(n)})}}let a2=null,dJ=1;class Sg extends Tc{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),ie(this,"anyNetwork",e==="any"),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(r=>{}),this._ready().catch(r=>{});else{const r=hs(new.target,"getNetwork")(e);r?(ie(this,"_network",r),this.emit("network",r,null)):He.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Se(this,void 0,void 0,function*(){if(this._network==null){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch{}e==null&&(e=yield this.detectNetwork()),e||He.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:ie(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return za(()=>this._ready().then(e=>e,e=>{if(!(e.code===ee.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return a2==null&&(a2=new de),a2}static getNetwork(e){return qY(e??"homestead")}ccipReadFetch(e,r,n){return Se(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const i=e.to.toLowerCase(),s=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:s,sender:i}),f=yield _1({url:l,errorPassThrough:!0},u,(h,p)=>(h.status=p.statusCode,h));if(f.data)return f.data;const d=f.message||"unknown error";if(f.status>=400&&f.status<500)return He.throwError(`response not found during CCIP fetch: ${d}`,ee.errors.SERVER_ERROR,{url:c,errorMessage:d});o.push(d)}return He.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ee.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Se(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const i=this._internalBlockNumber;try{const s=yield i;if(qd()-s.respTime<=e)return s.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}const r=qd(),n=pt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(i=>null,i=>i)}).then(({blockNumber:i,networkError:s})=>{if(s)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),s;const o=qd();return i=J.from(i).toNumber(),i{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Se(this,void 0,void 0,function*(){const e=dJ++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(i){this.emit("error",i);return}if(this._setFastBlockNumber(n),this.emit("poll",e,n),n===this._lastBlockNumber){this.emit("didPoll",e);return}if(this._emitted.block===-2&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)He.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",He.makeError("network block skew detected",ee.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let i=this._emitted.block+1;i<=n;i++)this.emit("block",i);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(i=>{if(i==="block")return;const s=this._emitted[i];s!=="pending"&&n-s>12&&delete this._emitted[i]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(i=>{switch(i.type){case"tx":{const s=i.hash;let o=this.getTransactionReceipt(s).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+s]=a.blockNumber,this.emit(s,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!i._inflight){i._inflight=!0,i._lastBlockNumber===-2&&(i._lastBlockNumber=n-1);const s=i.filter;s.fromBlock=i._lastBlockNumber+1,s.toBlock=n;const o=s.toBlock-this._maxFilterBlockRange;o>s.fromBlock&&(s.fromBlock=o),s.fromBlock<0&&(s.fromBlock=0);const a=this.getLogs(s).then(c=>{i._inflight=!1,c.length!==0&&c.forEach(l=>{l.blockNumber>i._lastBlockNumber&&(i._lastBlockNumber=l.blockNumber),this._emitted["b:"+l.blockHash]=l.blockNumber,this._emitted["t:"+l.transactionHash]=l.blockNumber,this.emit(s,l)})}).catch(c=>{this.emit("error",c),i._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(i=>{this.emit("error",i)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Se(this,void 0,void 0,function*(){return He.throwError("provider does not support network detection",ee.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Se(this,void 0,void 0,function*(){const e=yield this._ready(),r=yield this.detectNetwork();if(e.chainId!==r.chainId){if(this.anyNetwork)return this._network=r,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",r,e),yield MA(0),this._network;const n=He.makeError("underlying network changed",ee.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:r});throw this.emit("error",n),n}return e})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(e=>{this._setFastBlockNumber(e)},e=>{}),this._fastBlockNumber!=null?this._fastBlockNumber:-1}get polling(){return this._poller!=null}set polling(e){e&&!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))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if(typeof e!="number"||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){const e=qd();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then(r=>((this._fastBlockNumber==null||r>this._fastBlockNumber)&&(this._fastBlockNumber=r),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(e){this._fastBlockNumber!=null&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,r,n){return Se(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,i){return Se(this,void 0,void 0,function*(){const s=yield this.getTransactionReceipt(e);return(s?s.confirmations:0)>=r?s:new Promise((o,a)=>{const c=[];let l=!1;const u=function(){return l?!0:(l=!0,c.forEach(d=>{d()}),!1)},f=d=>{d.confirmations{this.removeListener(e,f)}),i){let d=i.startBlock,h=null;const p=v=>Se(this,void 0,void 0,function*(){l||(yield MA(1e3),this.getTransactionCount(i.from).then(b=>Se(this,void 0,void 0,function*(){if(!l){if(b<=i.nonce)d=v;else{{const y=yield this.getTransaction(e);if(y&&y.blockNumber!=null)return}for(h==null&&(h=d-3,h{l||this.once("block",p)}))});if(l)return;this.once("block",p),c.push(()=>{this.removeListener("block",p)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{u()||a(He.makeError("timeout exceeded",ee.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),c.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Se(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return J.from(e)}catch(r){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield pt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getBalance",n);try{return J.from(i)}catch(s){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getBalance",params:n,result:i,error:s})}})}getTransactionCount(e,r){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield pt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getTransactionCount",n);try{return J.from(i).toNumber()}catch(s){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:i,error:s})}})}getCode(e,r){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield pt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),i=yield this.perform("getCode",n);try{return te(i)}catch(s){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getCode",params:n,result:i,error:s})}})}getStorageAt(e,r,n){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const i=yield pt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>gs(o))}),s=yield this.perform("getStorageAt",i);try{return te(s)}catch(o){return He.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:s,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&uo(r)!==32)throw new Error("invalid response - sendTransaction");const i=e;return r!=null&&e.hash!==r&&He.throwError("Transaction hash mismatch from Provider.sendTransaction.",ee.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),i.wait=(s,o)=>Se(this,void 0,void 0,function*(){s==null&&(s=1),o==null&&(o=0);let a;s!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const c=yield this._waitForTransaction(e.hash,s,o,a);return c==null&&s===0?null:(this._emitted["t:"+e.hash]=c.blockNumber,c.status===0&&He.throwError("transaction failed",ee.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:c}),c)}),i}sendTransaction(e){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(s=>te(s)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const i=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const s=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,s,i)}catch(s){throw s.transaction=n,s.transactionHash=n.hash,s}})}_getTransactionRequest(e){return Se(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?this._getAddress(s):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?J.from(s):null))}),["type"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(i=>{r[i]!=null&&(n[i]=Promise.resolve(r[i]).then(s=>s?te(s):null))}),this.formatter.transactionRequest(yield pt(n))})}_getFilter(e){return Se(this,void 0,void 0,function*(){e=yield e;const r={};return e.address!=null&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach(n=>{e[n]!=null&&(r[n]=e[n])}),["fromBlock","toBlock"].forEach(n=>{e[n]!=null&&(r[n]=this._getBlockTag(e[n]))}),this.formatter.filter(yield pt(r))})}_call(e,r,n){return Se(this,void 0,void 0,function*(){n>=oJ&&He.throwError("CCIP read exceeded maximum redirections",ee.errors.SERVER_ERROR,{redirects:n,transaction:e});const i=e.to,s=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&i!=null&&s.substring(0,10)==="0x556f1830"&&uo(s)%32===4)try{const o=br(s,4),a=br(o,0,32);J.from(a).eq(i)||He.throwError("CCIP Read sender did not match",ee.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:s});const c=[],l=J.from(br(o,32,64)).toNumber(),u=J.from(br(o,l,l+32)).toNumber(),f=br(o,l+32);for(let y=0;ySe(this,void 0,void 0,function*(){const s=yield this.perform("getBlock",i);if(s==null)return i.blockHash!=null&&this._emitted["b:"+i.blockHash]==null||i.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let c=0;cthis._wrapTransaction(c)),a}return this.formatter.block(s)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Se(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return za(()=>Se(this,void 0,void 0,function*(){const n=yield this.perform("getTransaction",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;const i=this.formatter.transactionResponse(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return this._wrapTransaction(i)}),{oncePoll:this})})}getTransactionReceipt(e){return Se(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return za(()=>Se(this,void 0,void 0,function*(){const n=yield this.perform("getTransactionReceipt",r);if(n==null)return this._emitted["t:"+e]==null?null:void 0;if(n.blockHash==null)return;const i=this.formatter.receipt(n);if(i.blockNumber==null)i.confirmations=0;else if(i.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-i.blockNumber+1;o<=0&&(o=1),i.confirmations=o}return i}),{oncePoll:this})})}getLogs(e){return Se(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield pt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(i=>{i.removed==null&&(i.removed=!1)}),de.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Se(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Se(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&He.throwArgumentError("invalid BlockTag","blockTag",e);let r=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return r+=e,r<0&&(r=0),this.formatter.blockTag(r)}return this.formatter.blockTag(e)})}getResolver(e){return Se(this,void 0,void 0,function*(){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const n=yield this._getResolver(r,"getResolver");if(n!=null){const i=new _x(this,n,e);return r!==e&&!(yield i.supportsWildcard())?null:i}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Se(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||He.throwError("network does not support ENS",ee.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const i=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+Ih(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return Se(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(Be(e))throw n}typeof e!="string"&&He.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Se(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);const r=e.substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"lookupAddress");if(n==null)return null;const i=Ov(yield this.call({to:n,data:"0x691f3431"+Ih(r).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return Se(this,void 0,void 0,function*(){let r=null;if(Be(e)){const s=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(s,"getAvatar");if(!o)return null;r=new _x(this,o,s);try{const a=yield r.getAvatar();if(a)return a.url}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a}try{const a=Ov(yield this.call({to:o,data:"0x691f3431"+Ih(s).substring(2)}),0);r=yield this.getResolver(a)}catch(a){if(a.code!==ee.errors.CALL_EXCEPTION)throw a;return null}}else if(r=yield this.getResolver(e),!r)return null;const n=yield r.getAvatar();return n==null?null:n.url})}perform(e,r){return He.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_stopEvent(e){this.polling=this._events.filter(r=>r.pollable()).length>0}_addEventListener(e,r,n){const i=new lJ(pu(e),r,n);return this._events.push(i),this._startEvent(i),this}on(e,r){return this._addEventListener(e,r,!1)}once(e,r){return this._addEventListener(e,r,!0)}emit(e,...r){let n=!1,i=[],s=pu(e);return this._events=this._events.filter(o=>o.tag!==s?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(i.push(o),!1):!0)),i.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=pu(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=pu(e);return this._events.filter(n=>n.tag===r).map(n=>n.listener)}off(e,r){if(r==null)return this.removeAllListeners(e);const n=[];let i=!1,s=pu(e);return this._events=this._events.filter(o=>o.tag!==s||o.listener!=r||i?!0:(i=!0,n.push(o),!1)),n.forEach(o=>{this._stopEvent(o)}),this}removeAllListeners(e){let r=[];if(e==null)r=this._events,this._events=[];else{const n=pu(e);this._events=this._events.filter(i=>i.tag!==n?!0:(r.push(i),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var So=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const Sr=new ee(od),hJ=["call","estimateGas"];function Rh(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=Be(t.data)?t.data:null;if(!e||r)return{message:t.message,data:r}}if(typeof t=="object"){for(const r in t){const n=Rh(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Rh(JSON.parse(t),e)}catch{}return null}function z$(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const s=Rh(e,!0);if(s)return s.data;Sr.throwError("missing revert data in call exception; Transaction reverted without a reason string",ee.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:e})}if(t==="estimateGas"){let s=Rh(e.body,!1);s==null&&(s=Rh(e,!1)),s&&Sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{reason:s.message,method:t,transaction:n,error:e})}let i=e.message;throw e.code===ee.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?i=e.error.message:typeof e.body=="string"?i=e.body:typeof e.responseText=="string"&&(i=e.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Sr.throwError("insufficient funds for intrinsic transaction cost",ee.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),i.match(/nonce (is )?too low/i)&&Sr.throwError("nonce has already been used",ee.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Sr.throwError("replacement fee too low",ee.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),i.match(/only replay-protected/i)&&Sr.throwError("legacy pre-eip-155 transactions not supported",ee.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),hJ.indexOf(t)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:t,transaction:n}),e}function FA(t){return new Promise(function(e){setTimeout(e,t)})}function pJ(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}function Vd(t){return t&&t.toLowerCase()}const Px={};class W$ extends Nl{constructor(e,r,n){if(super(),e!==Px)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");ie(this,"provider",r),n==null&&(n=0),typeof n=="string"?(ie(this,"_address",this.provider.formatter.address(n)),ie(this,"_index",null)):typeof n=="number"?(ie(this,"_index",n),ie(this,"_address",null)):Sr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Sr.throwError("cannot alter JSON-RPC Signer connection",ee.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new vJ(Px,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(e=>(e.length<=this._index&&Sr.throwError("unknown account #"+this._index,ee.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Ht(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Ht(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>So(this,void 0,void 0,function*(){if(n==null)return null;const i=yield this.provider.resolveName(n);return i==null&&Sr.throwArgumentError("provided ENS name resolves to null","tx.to",n),i}))),pt({tx:pt(e),sender:r}).then(({tx:n,sender:i})=>{n.from!=null?n.from.toLowerCase()!==i&&Sr.throwArgumentError("from address mismatch","transaction",e):n.from=i;const s=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[s]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Sr.throwError("user rejected transaction",ee.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),z$("sendTransaction",o,s)))})}signTransaction(e){return Sr.throwError("signing transactions is unsupported",ee.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return So(this,void 0,void 0,function*(){const r=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),n=yield this.sendUncheckedTransaction(e);try{return yield za(()=>So(this,void 0,void 0,function*(){const i=yield this.provider.getTransaction(n);if(i!==null)return this.provider._wrapTransaction(i,n,r)}),{oncePoll:this.provider})}catch(i){throw i.transactionHash=n,i}})}signMessage(e){return So(this,void 0,void 0,function*(){const r=typeof e=="string"?bt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[te(r),n.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Sr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),i}})}_legacySignMessage(e){return So(this,void 0,void 0,function*(){const r=typeof e=="string"?bt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),te(r)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&Sr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),i}})}_signTypedData(e,r,n){return So(this,void 0,void 0,function*(){const i=yield Wr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),s=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[s.toLowerCase(),JSON.stringify(Wr.getPayload(i.domain,r,i.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Sr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_signTypedData",from:s,messageData:{domain:i.domain,types:r,value:i.value}}),o}})}unlock(e){return So(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class vJ extends W${sendTransaction(e){return this.sendUncheckedTransaction(e).then(r=>({hash:r,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:n=>this.provider.waitForTransaction(r,n)}))}}const mJ={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let Go=class extends Sg{constructor(e,r){let n=r;n==null&&(n=new Promise((i,s)=>{setTimeout(()=>{this.detectNetwork().then(o=>{i(o)},o=>{s(o)})},0)})),super(n),e||(e=hs(this.constructor,"defaultUrl")()),typeof e=="string"?ie(this,"connection",Object.freeze({url:e})):ie(this,"connection",Object.freeze(Ht(e))),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 So(this,void 0,void 0,function*(){yield FA(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch{try{e=yield this.send("net_version",[])}catch{}}if(e!=null){const r=hs(this.constructor,"getNetwork");try{return r(J.from(e).toNumber())}catch(n){return Sr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Sr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new W$(Px,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(e=>e.map(r=>this.formatter.address(r)))}send(e,r){const n={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:vi(n),provider:this});const i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];const s=_1(this.connection,JSON.stringify(n),pJ).then(o=>(this.emit("debug",{action:"response",request:n,response:o,provider:this}),o),o=>{throw this.emit("debug",{action:"response",error:o,request:n,provider:this}),o});return i&&(this._cache[e]=s,setTimeout(()=>{this._cache[e]=null},0)),s}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Vd(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Vd(r.address),r.blockTag]];case"getCode":return["eth_getCode",[Vd(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Vd(r.address),ft(r.position,32),r.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[r.signedTransaction]];case"getBlock":return r.blockTag?["eth_getBlockByNumber",[r.blockTag,!!r.includeTransactions]]:r.blockHash?["eth_getBlockByHash",[r.blockHash,!!r.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[r.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[r.transactionHash]];case"call":return["eth_call",[hs(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[hs(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=Vd(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return So(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const i=r.transaction;if(i&&i.type!=null&&J.from(i.type).isZero()&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const s=yield this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(r=Ht(r),r.transaction=Ht(i),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Sr.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(i){return z$(e,i,r)}})}_startEvent(e){e.tag==="pending"&&this._startPending(),super._startEvent(e)}_startPending(){if(this._pendingFilter!=null)return;const e=this,r=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=r,r.then(function(n){function i(){e.send("eth_getFilterChanges",[n]).then(function(s){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return s.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(c){return e.emit("pending",c),null})})}),o.then(function(){return FA(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){i()},0),null}).catch(s=>{})}return i(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Ht(mJ);if(r)for(const s in r)r[s]&&(n[s]=!0);V6(e,n);const i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(s){if(e[s]==null)return;const o=gs(J.from(e[s]));s==="gasLimit"&&(s="gas"),i[s]=o}),["from","to","data"].forEach(function(s){e[s]!=null&&(i[s]=te(e[s]))}),e.accessList&&(i.accessList=Zl(e.accessList)),i}};var yJ=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const gJ=new ee(od);class Bm extends Go{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return yJ(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||gJ.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(ie(this,"_network",r),this.emit("network",r,null))),r})}}var jm=globalThis&&globalThis.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};const il=new ee(od);function Mp(){return new Date().getTime()}function BA(t){let e=null;for(let r=0;re?null:(n+i)/2}function Vu(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(J.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>Vu(e)));if(typeof t=="object"){const e=Object.keys(t);return e.sort(),"{"+e.map(r=>{let n=t[r];return typeof n=="function"?n="[function]":n=Vu(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let bJ=1;function UA(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const i=o=>(n=n.then(o),n);function s(){return n}return{cancel:e,getPromise:s,wait:i}}const wJ=[ee.errors.CALL_EXCEPTION,ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED,ee.errors.UNPREDICTABLE_GAS_LIMIT],EJ=["address","args","errorArgs","errorSignature","method","transaction"];function Np(t,e){const r={weight:t.weight};return Object.defineProperty(r,"provider",{get:()=>t.provider}),t.start&&(r.start=t.start),e&&(r.duration=e-t.start),t.done&&(t.error?r.error=t.error:r.result=t.result||null),r}function xJ(t,e){return function(r){const n={};r.forEach(s=>{const o=t(s.result);n[o]||(n[o]={count:0,result:s.result}),n[o].count++});const i=Object.keys(n);for(let s=0;s=e)return o.result}}}function CJ(t,e,r){let n=Vu;switch(e){case"getBlockNumber":return function(i){const s=i.map(a=>a.result);let o=jA(i.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),s.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(i){const s=i.map(o=>o.result);return s.sort(),s[Math.floor(s.length/2)]};case"getEtherPrice":return function(i){return jA(i.map(s=>s.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(i){return i==null?null:(i=Ht(i),i.confirmations=-1,Vu(i))};break;case"getBlock":r.includeTransactions?n=function(i){return i==null?null:(i=Ht(i),i.transactions=i.transactions.map(s=>(s=Ht(s),s.confirmations=-1,s)),Vu(i))}:n=function(i){return i==null?null:Vu(i)};break;default:throw new Error("unknown method: "+e)}return xJ(n,t.quorum)}function Gd(t,e){return jm(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:za(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function SJ(t,e,r,n){return jm(this,void 0,void 0,function*(){let i=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&Be(n.blockTag)&&(i=yield Gd(t,e)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&Be(n.blockTag)&&(i=yield Gd(t,e)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&Be(n.blockTag)&&(i=yield Gd(t,e)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&Be(n.blockTag)&&(i=yield Gd(t,e)),r==="call"&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let s=n.filter;return(s.fromBlock&&Be(s.fromBlock)||s.toBlock&&Be(s.toBlock))&&(i=yield Gd(t,e)),i.getLogs(s)}}return il.throwError("unknown method error",ee.errors.UNKNOWN_ERROR,{method:r,params:n})})}class kJ extends Sg{constructor(e,r){e.length===0&&il.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(Tc.isProvider(o)){const u=OA(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:u,priority:1})}const c=Ht(o);c.priority==null&&(c.priority=1),c.stallTimeout==null&&(c.stallTimeout=OA(o)?2e3:750),c.weight==null&&(c.weight=1);const l=c.weight;return(l%1||l>512||l<1)&&il.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,l),Object.freeze(c)}),i=n.reduce((o,a)=>o+a.weight,0);r==null?r=i/2:r>i&&il.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let s=BA(n.map(o=>o.provider.network));s==null&&(s=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(s),ie(this,"providerConfigs",Object.freeze(n)),ie(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return jm(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return BA(e)})}perform(e,r){return jm(this,void 0,void 0,function*(){if(e==="sendTransaction"){const c=yield Promise.all(this.providerConfigs.map(l=>l.provider.sendTransaction(r.signedTransaction).then(u=>u.hash,u=>u)));for(let l=0;lc.priority-l.priority);const s=this._highestBlockNumber;let o=0,a=!0;for(;;){const c=Mp();let l=i.filter(h=>h.runner&&c-h.starth+p.weight,0);for(;l{h.staller=null}),h.runner=SJ(h,s,e,r).then(v=>{h.done=!0,h.result=v,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:Np(h,Mp()),request:{method:e,params:vi(r)},provider:this})},v=>{h.done=!0,h.error=v,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:Np(h,Mp()),request:{method:e,params:vi(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:p,backend:Np(h,null),request:{method:e,params:vi(r)},provider:this}),l+=h.weight}const u=[];i.forEach(h=>{h.done||!h.runner||(u.push(h.runner),h.staller&&u.push(h.staller.getPromise()))}),u.length&&(yield Promise.race(u));const f=i.filter(h=>h.done&&h.error==null);if(f.length>=this.quorum){const h=n(f);if(h!==void 0)return i.forEach(p=>{p.staller&&p.staller.cancel(),p.cancelled=!0}),h;a||(yield UA(100).getPromise()),a=!1}const d=i.reduce((h,p)=>{if(!p.done||p.error==null)return h;const v=p.error.code;return wJ.indexOf(v)>=0&&(h[v]||(h[v]={error:p.error,weight:0}),h[v].weight+=p.weight),h},{});if(Object.keys(d).forEach(h=>{const p=d[h];if(p.weight{y.staller&&y.staller.cancel(),y.cancelled=!0});const v=p.error,b={};EJ.forEach(y=>{v[y]!=null&&(b[y]=v[y])}),il.throwError(v.reason||v.message,h,b)}),i.filter(h=>!h.done).length===0)break}return i.forEach(c=>{c.staller&&c.staller.cancel(),c.cancelled=!0}),il.throwError("failed to meet quorum",ee.errors.SERVER_ERROR,{method:e,params:r,results:i.map(c=>Np(c)),provider:this})})}}const zA=new ee(od);let AJ=1;function WA(t,e){const r="Web3LegacyFetcher";return function(n,i){const s={method:n,params:i,id:AJ++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:vi(s),provider:this}),e(s,(c,l)=>{if(c)return this.emit("debug",{action:"response",fetcher:r,error:c,request:s,provider:this}),a(c);if(this.emit("debug",{action:"response",fetcher:r,request:s,response:l,provider:this}),l.error){const u=new Error(l.error.message);return u.code=l.error.code,u.data=l.error.data,a(u)}o(l.result)})})}}function _J(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:vi(n),provider:this}),t.request(n).then(i=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:i,provider:this}),i),i=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:i,provider:this}),i})}}class H$ extends Go{constructor(e,r){e==null&&zA.throwArgumentError("missing provider","provider",e);let n=null,i=null,s=null;typeof e=="function"?(n="unknown:",i=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),s=e,e.request?(n===""&&(n="eip-1193:"),i=_J(e)):e.sendAsync?i=WA(e,e.sendAsync.bind(e)):e.send?i=WA(e,e.send.bind(e)):zA.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),ie(this,"jsonRpcFetchFunc",i),ie(this,"provider",s)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const PJ="solidity/5.7.0",TJ=new RegExp("^bytes([0-9]+)$"),IJ=new RegExp("^(u?int)([0-9]*)$"),OJ=new RegExp("^(.*)\\[([0-9]*)\\]$"),RJ="0000000000000000000000000000000000000000000000000000000000000000",Pu=new ee(PJ);function q$(t,e,r){switch(t){case"address":return r?_h(e,32):ne(e);case"string":return bt(e);case"bytes":return ne(e);case"bool":return e=e?"0x01":"0x00",r?_h(e,32):ne(e)}let n=t.match(IJ);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!==0||i===0||i>256)&&Pu.throwArgumentError("invalid number type","type",t),r&&(i=256),e=J.from(e).toTwos(i),_h(e,i/8)}if(n=t.match(TJ),n){const i=parseInt(n[1]);return(String(i)!==n[1]||i===0||i>32)&&Pu.throwArgumentError("invalid bytes type","type",t),ne(e).byteLength!==i&&Pu.throwArgumentError(`invalid value for ${t}`,"value",e),r?ne((e+RJ).substring(0,66)):e}if(n=t.match(OJ),n&&Array.isArray(e)){const i=n[1];parseInt(n[2]||String(e.length))!=e.length&&Pu.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(q$(i,a,!0))}),Wt(o)}return Pu.throwArgumentError("invalid type","type",t)}function We(t,e){t.length!=e.length&&Pu.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,i){r.push(q$(n,e[i]))}),te(Wt(r))}function ec(t,e){return Fe(We(t,e))}function $J(t,e){return Vo(We(t,e))}const MJ="units/5.7.0",V$=new ee(MJ),G$=["wei","kwei","mwei","gwei","szabo","finney","ether"];function NJ(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&V$.throwArgumentError("invalid value","value",t);let r=e[0],n="";for(r.substring(0,1)==="-"&&(n="-",r=r.substring(1));r.substring(0,1)==="0";)r=r.substring(1);r===""&&(r="0");let i="";for(e.length===2&&(i="."+(e[1]||"0"));i.length>2&&i[i.length-1]==="0";)i=i.substring(0,i.length-1);const s=[];for(;r.length;)if(r.length<=3){s.unshift(r);break}else{const o=r.length-3;s.unshift(r.substring(o)),r=r.substring(0,o)}return n+s.join(",")+i}function xr(t,e){if(typeof e=="string"){const r=G$.indexOf(e);r!==-1&&(e=3*r)}return kv(t,e??18)}function Mf(t,e){if(typeof t!="string"&&V$.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=G$.indexOf(e);r!==-1&&(e=3*r)}return Ls(t,e??18)}function DJ(t){return xr(t,18)}function LJ(t){return Mf(t,18)}const FJ=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Z6,ConstructorFragment:fs,ErrorFragment:To,EventFragment:Gs,FormatTypes:et,Fragment:Ys,FunctionFragment:ds,HDNode:Co,Indexed:Rm,Interface:Fr,LogDescription:YR,Logger:ee,ParamType:Nr,RLP:JV,SigningKey:Nm,get SupportedAlgorithm(){return $f},TransactionDescription:JR,get TransactionTypes(){return Sx},get UnicodeNormalizationForm(){return Wo},Utf8ErrorFuncs:FR,get Utf8ErrorReason(){return Vn},_TypedDataEncoder:Wr,_fetchData:L$,_toEscapedUtf8String:mG,accessListify:Zl,arrayify:ne,base58:Rf,base64:NG,checkProperties:V6,checkResultErrors:kR,commify:NJ,computeAddress:u3,computeHmac:S0,computePublicKey:c3,concat:Wt,deepCopy:vi,defaultAbiCoder:Fn,defaultPath:MY,defineReadOnly:ie,dnsEncode:VR,entropyToMnemonic:M$,fetchJson:_1,formatBytes32String:yG,formatEther:DJ,formatUnits:xr,getAccountPath:DY,getAddress:qe,getContractAddress:Q6,getCreate2Address:rG,getIcapAddress:tG,getJsonWalletAddress:UY,getStatic:hs,hashMessage:n3,hexConcat:On,hexDataLength:uo,hexDataSlice:br,hexStripZeros:mR,hexValue:gs,hexZeroPad:ft,hexlify:te,id:Ua,isAddress:IR,isBytes:oa,isBytesLike:zo,isHexString:Be,isValidMnemonic:NY,isValidName:sK,joinSignature:MV,keccak256:Fe,mnemonicToEntropy:d3,mnemonicToSeed:$$,namehash:Ih,nameprep:OG,parseBytes32String:gG,parseEther:LJ,parseTransaction:A$,parseUnits:Mf,poll:za,randomBytes:A1,recoverAddress:Ll,recoverPublicKey:E$,resolveProperties:pt,ripemd160:I$,serializeTransaction:fY,sha256:Vo,sha512:SY,shallowCopy:Ht,shuffled:N$,solidityKeccak256:ec,solidityPack:We,soliditySha256:$J,splitSignature:Jl,stripZeros:to,toUtf8Bytes:bt,toUtf8CodePoints:Im,toUtf8String:ca,verifyMessage:D$,verifyTypedData:zY,zeroPad:_h},Symbol.toStringTag,{value:"Module"})),K$="%[a-f0-9]{2}",HA=new RegExp("("+K$+")|([^%]+?)","gi"),qA=new RegExp("("+K$+")+","gi");function Tx(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;const r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],Tx(r),Tx(n))}function BJ(t){try{return decodeURIComponent(t)}catch{let e=t.match(HA)||[];for(let r=1;rt==null,HJ=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Ix=Symbol("encodeFragmentIdentifier");function qJ(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Cr(e,t),"[",i,"]"].join("")]:[...r,[Cr(e,t),"[",Cr(i,t),"]=",Cr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Cr(e,t),"[]"].join("")]:[...r,[Cr(e,t),"[]=",Cr(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Cr(e,t),":list="].join("")]:[...r,[Cr(e,t),":list=",Cr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||t.skipNull&&i===null||t.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Cr(r,t),e,Cr(i,t)].join("")]:[[n,Cr(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Cr(e,t)]:[...r,[Cr(e,t),"=",Cr(n,t)].join("")]}}function VJ(t){let e;switch(t.arrayFormat){case"index":return(r,n,i)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][e[1]]=n};case"bracket":return(r,n,i)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"colon-list-separator":return(r,n,i)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[...i[r],n]};case"comma":case"separator":return(r,n,i)=>{const s=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!s&&Po(n,t).includes(t.arrayFormatSeparator);n=o?Po(n,t):n;const a=s||o?n.split(t.arrayFormatSeparator).map(c=>Po(c,t)):n===null?n:Po(n,t);i[r]=a};case"bracket-separator":return(r,n,i)=>{const s=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!s){i[r]=n&&Po(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>Po(a,t));if(i[r]===void 0){i[r]=o;return}i[r]=[...i[r],...o]};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[...[i[r]].flat(),n]}}}function Y$(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Cr(t,e){return e.encode?e.strict?HJ(t):encodeURIComponent(t):t}function Po(t,e){return e.decode?UJ(t):t}function J$(t){return Array.isArray(t)?t.sort():typeof t=="object"?J$(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function X$(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function GJ(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function VA(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?t=Number(t):e.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")&&(t=t.toLowerCase()==="true"),t}function h3(t){t=X$(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function p3(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},Y$(e.arrayFormatSeparator);const r=VJ(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const i of t.split("&")){if(i==="")continue;const s=e.decode?i.replace(/\+/g," "):i;let[o,a]=Q$(s,"=");o===void 0&&(o=s),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Po(a,e),r(Po(o,e),a,n)}for(const[i,s]of Object.entries(n))if(typeof s=="object"&&s!==null)for(const[o,a]of Object.entries(s))s[o]=VA(a,e);else n[i]=VA(s,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,s)=>{const o=n[s];return o&&typeof o=="object"&&!Array.isArray(o)?i[s]=J$(o):i[s]=o,i},Object.create(null))}function Z$(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},Y$(e.arrayFormatSeparator);const r=o=>e.skipNull&&WJ(t[o])||e.skipEmptyString&&t[o]==="",n=qJ(e),i={};for(const[o,a]of Object.entries(t))r(o)||(i[o]=a);const s=Object.keys(i);return e.sort!==!1&&s.sort(e.sort),s.map(o=>{const a=t[o];return a===void 0?"":a===null?Cr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Cr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Cr(o,e)+"="+Cr(a,e)}).filter(o=>o.length>0).join("&")}function eM(t,e){var i;e={decode:!0,...e};let[r,n]=Q$(t,"#");return r===void 0&&(r=t),{url:((i=r==null?void 0:r.split("?"))==null?void 0:i[0])??"",query:p3(h3(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Po(n,e)}:{}}}function tM(t,e){e={encode:!0,strict:!0,[Ix]:!0,...e};const r=X$(t.url).split("?")[0]||"",n=h3(t.url),i={...p3(n,{sort:!1}),...t.query};let s=Z$(i,e);s&&(s=`?${s}`);let o=GJ(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[Ix]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${s}${o}`}function rM(t,e,r){r={parseFragmentIdentifier:!0,[Ix]:!1,...r};const{url:n,query:i,fragmentIdentifier:s}=eM(t,r);return tM({url:n,query:zJ(i,e),fragmentIdentifier:s},r)}function KJ(t,e,r){const n=Array.isArray(e)?i=>!e.includes(i):(i,s)=>!e(i,s);return rM(t,n,r)}const nM=Object.freeze(Object.defineProperty({__proto__:null,exclude:KJ,extract:h3,parse:p3,parseUrl:eM,pick:rM,stringify:Z$,stringifyUrl:tM},Symbol.toStringTag,{value:"Module"})),v3=C.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),kg=C.createContext({});function QJ(){return C.useContext(kg).visualElement}const P1=C.createContext(null),Ag=typeof document<"u",Um=Ag?C.useLayoutEffect:C.useEffect,iM=C.createContext({strict:!1});function YJ(t,e,r,n){const i=QJ(),s=C.useContext(iM),o=C.useContext(P1),a=C.useContext(v3).reducedMotion,c=C.useRef();n=n||s.renderer,!c.current&&n&&(c.current=n(t,{visualState:e,parent:i,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;return Um(()=>{l&&l.render()}),(window.HandoffAppearAnimations?Um:C.useEffect)(()=>{l&&l.animationState&&l.animationState.animateChanges()}),l}function Gu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function JJ(t,e,r){return C.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Gu(r)&&(r.current=n))},[e])}function _0(t){return typeof t=="string"||Array.isArray(t)}function _g(t){return typeof t=="object"&&typeof t.start=="function"}const XJ=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Pg(t){return _g(t.animate)||XJ.some(e=>_0(t[e]))}function sM(t){return!!(Pg(t)||t.variants)}function ZJ(t,e){if(Pg(t)){const{initial:r,animate:n}=t;return{initial:r===!1||_0(r)?r:void 0,animate:_0(n)?n:void 0}}return t.inherit!==!1?e:{}}function eX(t){const{initial:e,animate:r}=ZJ(t,C.useContext(kg));return C.useMemo(()=>({initial:e,animate:r}),[GA(e),GA(r)])}function GA(t){return Array.isArray(t)?t.join(" "):t}const wo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),P0={measureLayout:wo(["layout","layoutId","drag"]),animation:wo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:wo(["exit"]),drag:wo(["drag","dragControls"]),focus:wo(["whileFocus"]),hover:wo(["whileHover","onHoverStart","onHoverEnd"]),tap:wo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:wo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:wo(["whileInView","onViewportEnter","onViewportLeave"])};function tX(t){for(const e in t)e==="projectionNodeConstructor"?P0.projectionNodeConstructor=t[e]:P0[e].Component=t[e]}function Tg(t){const e=C.useRef(null);return e.current===null&&(e.current=t()),e.current}const $h={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let rX=1;function nX(){return Tg(()=>{if($h.hasEverUpdated)return rX++})}const m3=C.createContext({});class iX extends x.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const oM=C.createContext({}),sX=Symbol.for("motionComponentSymbol");function oX({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:i,Component:s}){t&&tX(t);function o(c,l){const u={...C.useContext(v3),...c,layoutId:aX(c)},{isStatic:f}=u;let d=null;const h=eX(c),p=f?void 0:nX(),v=i(c,f);if(!f&&Ag){h.visualElement=YJ(s,v,u,e);const b=C.useContext(iM).strict,y=C.useContext(oM);h.visualElement&&(d=h.visualElement.loadFeatures(u,b,t,p,r||P0.projectionNodeConstructor,y))}return C.createElement(iX,{visualElement:h.visualElement,props:u},d,C.createElement(kg.Provider,{value:h},n(s,c,p,JJ(v,h.visualElement,l),v,f,h.visualElement)))}const a=C.forwardRef(o);return a[sX]=s,a}function aX({layoutId:t}){const e=C.useContext(m3).id;return e&&t!==void 0?e+"-"+t:t}function cX(t){function e(n,i={}){return oX(t(n,i))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,i)=>(r.has(i)||r.set(i,e(i)),r.get(i))})}const lX=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function y3(t){return typeof t!="string"||t.includes("-")?!1:!!(lX.indexOf(t)>-1||/[A-Z]/.test(t))}const zm={};function uX(t){Object.assign(zm,t)}const Wm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ad=new Set(Wm);function aM(t,{layout:e,layoutId:r}){return ad.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!zm[t]||t==="opacity")}const ni=t=>!!(t!=null&&t.getVelocity),fX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},dX=(t,e)=>Wm.indexOf(t)-Wm.indexOf(e);function hX({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},i,s){let o="";e.sort(dX);for(const a of e)o+=`${fX[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}function cM(t){return t.startsWith("--")}const pX=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Nf=(t,e,r)=>Math.min(Math.max(r,t),e),eu={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Mh={...eu,transform:t=>Nf(0,1,t)},Dp={...eu,default:1},Nh=t=>Math.round(t*1e5)/1e5,T0=/(-)?([\d]*\.?[\d])+/g,Ox=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,vX=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function T1(t){return typeof t=="string"}const I1=t=>({test:e=>T1(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ca=I1("deg"),so=I1("%"),we=I1("px"),mX=I1("vh"),yX=I1("vw"),KA={...so,parse:t=>so.parse(t)/100,transform:t=>so.transform(t*100)},QA={...eu,transform:Math.round},lM={borderWidth:we,borderTopWidth:we,borderRightWidth:we,borderBottomWidth:we,borderLeftWidth:we,borderRadius:we,radius:we,borderTopLeftRadius:we,borderTopRightRadius:we,borderBottomRightRadius:we,borderBottomLeftRadius:we,width:we,maxWidth:we,height:we,maxHeight:we,size:we,top:we,right:we,bottom:we,left:we,padding:we,paddingTop:we,paddingRight:we,paddingBottom:we,paddingLeft:we,margin:we,marginTop:we,marginRight:we,marginBottom:we,marginLeft:we,rotate:Ca,rotateX:Ca,rotateY:Ca,rotateZ:Ca,scale:Dp,scaleX:Dp,scaleY:Dp,scaleZ:Dp,skew:Ca,skewX:Ca,skewY:Ca,distance:we,translateX:we,translateY:we,translateZ:we,x:we,y:we,z:we,perspective:we,transformPerspective:we,opacity:Mh,originX:KA,originY:KA,originZ:we,zIndex:QA,fillOpacity:Mh,strokeOpacity:Mh,numOctaves:QA};function g3(t,e,r,n){const{style:i,vars:s,transform:o,transformKeys:a,transformOrigin:c}=t;a.length=0;let l=!1,u=!1,f=!0;for(const d in e){const h=e[d];if(cM(d)){s[d]=h;continue}const p=lM[d],v=pX(h,p);if(ad.has(d)){if(l=!0,o[d]=v,a.push(d),!f)continue;h!==(p.default||0)&&(f=!1)}else d.startsWith("origin")?(u=!0,c[d]=v):i[d]=v}if(e.transform||(l||n?i.transform=hX(t,r,f,n):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:p=0}=c;i.transformOrigin=`${d} ${h} ${p}`}}const b3=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function uM(t,e,r){for(const n in e)!ni(e[n])&&!aM(n,r)&&(t[n]=e[n])}function gX({transformTemplate:t},e,r){return C.useMemo(()=>{const n=b3();return g3(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function bX(t,e,r){const n=t.style||{},i={};return uM(i,n,t),Object.assign(i,gX(t,e,r)),t.transformValues?t.transformValues(i):i}function wX(t,e,r){const n={},i=bX(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=i,n}const EX=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function Hm(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||EX.has(t)}let fM=t=>!Hm(t);function xX(t){t&&(fM=e=>e.startsWith("on")?!Hm(e):t(e))}try{xX(require("@emotion/is-prop-valid").default)}catch{}function CX(t,e,r){const n={};for(const i in t)i==="values"&&typeof t.values=="object"||(fM(i)||r===!0&&Hm(i)||!e&&!Hm(i)||t.draggable&&i.startsWith("onDrag"))&&(n[i]=t[i]);return n}function YA(t,e,r){return typeof t=="string"?t:we.transform(e+r*t)}function SX(t,e,r){const n=YA(e,t.x,t.width),i=YA(r,t.y,t.height);return`${n} ${i}`}const kX={offset:"stroke-dashoffset",array:"stroke-dasharray"},AX={offset:"strokeDashoffset",array:"strokeDasharray"};function _X(t,e,r=1,n=0,i=!0){t.pathLength=1;const s=i?kX:AX;t[s.offset]=we.transform(-n);const o=we.transform(e),a=we.transform(r);t[s.array]=`${o} ${a}`}function w3(t,{attrX:e,attrY:r,originX:n,originY:i,pathLength:s,pathSpacing:o=1,pathOffset:a=0,...c},l,u,f){if(g3(t,c,l,f),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:p}=t;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(n!==void 0||i!==void 0||h.transform)&&(h.transformOrigin=SX(p,n!==void 0?n:.5,i!==void 0?i:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),s!==void 0&&_X(d,s,o,a,!1)}const dM=()=>({...b3(),attrs:{}}),E3=t=>typeof t=="string"&&t.toLowerCase()==="svg";function PX(t,e,r,n){const i=C.useMemo(()=>{const s=dM();return w3(s,e,{enableHardwareAcceleration:!1},E3(n),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};uM(s,t.style,t),i.style={...s,...i.style}}return i}function TX(t=!1){return(r,n,i,s,{latestValues:o},a)=>{const l=(y3(r)?PX:wX)(n,o,a,r),f={...CX(n,typeof r=="string",t),...l,ref:s},{children:d}=n,h=C.useMemo(()=>ni(d)?d.get():d,[d]);return i&&(f["data-projection-id"]=i),C.createElement(r,{...f,children:h})}}const x3=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function hM(t,{style:e,vars:r},n,i){Object.assign(t.style,e,i&&i.getProjectionStyles(n));for(const s in r)t.style.setProperty(s,r[s])}const pM=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function vM(t,e,r,n){hM(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(pM.has(i)?i:x3(i),e.attrs[i])}function C3(t,e){const{style:r}=t,n={};for(const i in r)(ni(r[i])||e.style&&ni(e.style[i])||aM(i,t))&&(n[i]=r[i]);return n}function mM(t,e){const r=C3(t,e);for(const n in t)if(ni(t[n])||ni(e[n])){const i=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[i]=t[n]}return r}function S3(t,e,r,n={},i={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,i)),e}const qm=t=>Array.isArray(t),IX=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),OX=t=>qm(t)?t[t.length-1]||0:t;function Rv(t){const e=ni(t)?t.get():t;return IX(e)?e.toValue():e}function RX({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,i,s){const o={latestValues:$X(n,i,s,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const yM=t=>(e,r)=>{const n=C.useContext(kg),i=C.useContext(P1),s=()=>RX(t,e,n,i);return r?s():Tg(s)};function $X(t,e,r,n){const i={},s=n(t,{});for(const d in s)i[d]=Rv(s[d]);let{initial:o,animate:a}=t;const c=Pg(t),l=sM(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=r?r.initial===!1:!1;u=u||o===!1;const f=u?a:o;return f&&typeof f!="boolean"&&!_g(f)&&(Array.isArray(f)?f:[f]).forEach(h=>{const p=S3(t,h);if(!p)return;const{transitionEnd:v,transition:b,...y}=p;for(const m in y){let g=y[m];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(i[m]=g)}for(const m in v)i[m]=v[m]}),i}const MX={useVisualState:yM({scrapeMotionValuesFromProps:mM,createRenderState:dM,onMount:(t,e,{renderState:r,latestValues:n})=>{try{r.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}w3(r,n,{enableHardwareAcceleration:!1},E3(e.tagName),t.transformTemplate),vM(e,r)}})},NX={useVisualState:yM({scrapeMotionValuesFromProps:C3,createRenderState:b3})};function DX(t,{forwardMotionProps:e=!1},r,n,i){return{...y3(t)?MX:NX,preloadedFeatures:r,useRender:TX(e),createVisualElement:n,projectionNodeConstructor:i,Component:t}}var vt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(vt||(vt={}));function Ig(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function Rx(t,e,r,n){C.useEffect(()=>{const i=t.current;if(r&&i)return Ig(i,e,r,n)},[t,e,r,n])}function LX({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=C.useCallback(()=>{r&&r.setActive(vt.Focus,!0)},[r]),i=C.useCallback(()=>{r&&r.setActive(vt.Focus,!1)},[r]);Rx(e,"focus",t?n:void 0),Rx(e,"blur",t?i:void 0)}const gM=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function k3(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const bM=t=>e=>gM(e)&&t(e,k3(e));function ff(t,e,r,n){return Ig(t,e,bM(r),n)}function Vm(t,e,r,n){return Rx(t,e,r&&bM(r),n)}function wM(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const JA=wM("dragHorizontal"),XA=wM("dragVertical");function EM(t){let e=!1;if(t==="y")e=XA();else if(t==="x")e=JA();else{const r=JA(),n=XA();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function xM(){const t=EM(!0);return t?(t(),!1):!0}function ZA(t,e,r,n){return(i,s)=>{i.type==="touch"||xM()||(r&&t.animationState&&t.animationState.setActive(vt.Hover,e),n&&n(i,s))}}function FX({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Vm(n,"pointerenter",C.useMemo(()=>t||r?ZA(n,!0,!!r,t):void 0,[t,!!r,n]),{passive:!t}),Vm(n,"pointerleave",C.useMemo(()=>e||r?ZA(n,!1,!!r,e):void 0,[t,!!r,n]),{passive:!e})}const CM=(t,e)=>e?t===e?!0:CM(t,e.parentElement):!1;function A3(t){return C.useEffect(()=>()=>t(),[])}const BX=(t,e)=>r=>e(t(r)),Og=(...t)=>t.reduce(BX);function jX({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:i,...s}){const o=t||e||r||n,a=C.useRef(!1),c=C.useRef(null),l={passive:!(e||t||r||s.onPointerDown)};function u(){c.current&&c.current(),c.current=null}function f(){return u(),a.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(vt.Tap,!1),!xM()}function d(v,b){var y,m,g,S;f()&&(CM(i.current,v.target)?(S=(g=i.getProps()).onTap)===null||S===void 0||S.call(g,v,b):(m=(y=i.getProps()).onTapCancel)===null||m===void 0||m.call(y,v,b))}function h(v,b){var y,m;f()&&((m=(y=i.getProps()).onTapCancel)===null||m===void 0||m.call(y,v,b))}const p=C.useCallback((v,b)=>{var y;if(u(),a.current)return;a.current=!0,c.current=Og(ff(window,"pointerup",d,l),ff(window,"pointercancel",h,l));const m=i.getProps();m.whileTap&&i.animationState&&i.animationState.setActive(vt.Tap,!0),(y=m.onTapStart)===null||y===void 0||y.call(m,v,b)},[!!e,i]);Vm(i,"pointerdown",o?p:void 0,l),A3(u)}const $x=new WeakMap,c2=new WeakMap,UX=t=>{const e=$x.get(t.target);e&&e(t)},zX=t=>{t.forEach(UX)};function WX({root:t,...e}){const r=t||document;c2.has(r)||c2.set(r,{});const n=c2.get(r),i=JSON.stringify(e);return n[i]||(n[i]=new IntersectionObserver(zX,{root:t,...e})),n[i]}function HX(t,e,r){const n=WX(e);return $x.set(t,r),n.observe(t),()=>{$x.delete(t),n.unobserve(t)}}function qX({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:i={}}){const s=C.useRef({hasEnteredView:!1,isInView:!1});let o=!!(e||r||n);i.once&&s.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?KX:GX)(o,s.current,t,i)}const VX={some:0,all:1};function GX(t,e,r,{root:n,margin:i,amount:s="some",once:o}){C.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:i,threshold:typeof s=="number"?s:VX[s]},c=l=>{const{isIntersecting:u}=l;if(e.isInView===u||(e.isInView=u,o&&!u&&e.hasEnteredView))return;u&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(vt.InView,u);const f=r.getProps(),d=u?f.onViewportEnter:f.onViewportLeave;d&&d(l)};return HX(r.current,a,c)},[t,n,i,s])}function KX(t,e,r,{fallback:n=!0}){C.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:i}=r.getProps();i&&i(null),r.animationState&&r.animationState.setActive(vt.InView,!0)})},[t])}const Wa=t=>e=>(t(e),null),QX={inView:Wa(qX),tap:Wa(jX),focus:Wa(LX),hover:Wa(FX)};function SM(){const t=C.useContext(P1);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,i=C.useId();return C.useEffect(()=>n(i),[]),!e&&r?[!1,()=>r&&r(i)]:[!0]}function kM(t,e){if(!Array.isArray(e))return!1;const r=e.length;if(r!==t.length)return!1;for(let n=0;n/^\-?\d*\.?\d+$/.test(t),JX=t=>/^0[^.\s]+$/.test(t),Do={delta:0,timestamp:0},AM=1/60*1e3,XX=typeof performance<"u"?()=>performance.now():()=>Date.now(),_M=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(XX()),AM);function ZX(t){let e=[],r=[],n=0,i=!1,s=!1;const o=new WeakSet,a={schedule:(c,l=!1,u=!1)=>{const f=u&&i,d=f?e:r;return l&&o.add(c),d.indexOf(c)===-1&&(d.push(c),f&&i&&(n=e.length)),c},cancel:c=>{const l=r.indexOf(c);l!==-1&&r.splice(l,1),o.delete(c)},process:c=>{if(i){s=!0;return}if(i=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let l=0;l(t[e]=ZX(()=>I0=!0),t),{}),En=O1.reduce((t,e)=>{const r=Rg[e];return t[e]=(n,i=!1,s=!1)=>(I0||rZ(),r.schedule(n,i,s)),t},{}),lc=O1.reduce((t,e)=>(t[e]=Rg[e].cancel,t),{}),l2=O1.reduce((t,e)=>(t[e]=()=>Rg[e].process(Do),t),{}),tZ=t=>Rg[t].process(Do),PM=t=>{I0=!1,Do.delta=Mx?AM:Math.max(Math.min(t-Do.timestamp,eZ),1),Do.timestamp=t,Nx=!0,O1.forEach(tZ),Nx=!1,I0&&(Mx=!1,_M(PM))},rZ=()=>{I0=!0,Mx=!0,Nx||_M(PM)};function _3(t,e){t.indexOf(e)===-1&&t.push(e)}function P3(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class T3{constructor(){this.subscriptions=[]}add(e){return _3(this.subscriptions,e),()=>P3(this.subscriptions,e)}notify(e,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,r,n);else for(let s=0;s!isNaN(parseFloat(t));class iZ{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:s,timestamp:o}=Do;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,En.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>En.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=nZ(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new T3);const n=this.events[e].add(r);return e==="change"?()=>{n(),En.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,r){this.passiveEffect=e,this.stopPassiveEffect=r}set(e,r=!0){!r||!this.passiveEffect?this.updateAndNotify(e,r):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,r,n){this.set(r),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?I3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=e(r)||null,this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Df(t,e){return new iZ(t,e)}const O3=(t,e)=>r=>!!(T1(r)&&vX.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),TM=(t,e,r)=>n=>{if(!T1(n))return n;const[i,s,o,a]=n.match(T0);return{[t]:parseFloat(i),[e]:parseFloat(s),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},sZ=t=>Nf(0,255,t),u2={...eu,transform:t=>Math.round(sZ(t))},pl={test:O3("rgb","red"),parse:TM("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+u2.transform(t)+", "+u2.transform(e)+", "+u2.transform(r)+", "+Nh(Mh.transform(n))+")"};function oZ(t){let e="",r="",n="",i="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,r+=r,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const Dx={test:O3("#"),parse:oZ,transform:pl.transform},Ku={test:O3("hsl","hue"),parse:TM("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+so.transform(Nh(e))+", "+so.transform(Nh(r))+", "+Nh(Mh.transform(n))+")"},Tn={test:t=>pl.test(t)||Dx.test(t)||Ku.test(t),parse:t=>pl.test(t)?pl.parse(t):Ku.test(t)?Ku.parse(t):Dx.parse(t),transform:t=>T1(t)?t:t.hasOwnProperty("red")?pl.transform(t):Ku.transform(t)},IM="${c}",OM="${n}";function aZ(t){var e,r;return isNaN(t)&&T1(t)&&(((e=t.match(T0))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(Ox))===null||r===void 0?void 0:r.length)||0)>0}function Gm(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const i=t.match(Ox);i&&(r=i.length,t=t.replace(Ox,IM),e.push(...i.map(Tn.parse)));const s=t.match(T0);return s&&(n=s.length,t=t.replace(T0,OM),e.push(...s.map(eu.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function RM(t){return Gm(t).values}function $M(t){const{values:e,numColors:r,tokenised:n}=Gm(t),i=e.length;return s=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function lZ(t){const e=RM(t);return $M(t)(e.map(cZ))}const uc={test:aZ,parse:RM,createTransformer:$M,getAnimatableNone:lZ},uZ=new Set(["brightness","contrast","saturate","opacity"]);function fZ(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(T0)||[];if(!n)return t;const i=r.replace(n,"");let s=uZ.has(e)?1:0;return n!==r&&(s*=100),e+"("+s+i+")"}const dZ=/([a-z-]*)\(.*?\)/g,Lx={...uc,getAnimatableNone:t=>{const e=t.match(dZ);return e?e.map(fZ).join(" "):t}},hZ={...lM,color:Tn,backgroundColor:Tn,outlineColor:Tn,fill:Tn,stroke:Tn,borderColor:Tn,borderTopColor:Tn,borderRightColor:Tn,borderBottomColor:Tn,borderLeftColor:Tn,filter:Lx,WebkitFilter:Lx},R3=t=>hZ[t];function $3(t,e){var r;let n=R3(t);return n!==Lx&&(n=uc),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const MM=t=>e=>e.test(t),pZ={test:t=>t==="auto",parse:t=>t},NM=[eu,we,so,Ca,yX,mX,pZ],Kd=t=>NM.find(MM(t)),vZ=[...NM,Tn,uc],mZ=t=>vZ.find(MM(t));function yZ(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function gZ(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function $g(t,e,r){const n=t.getProps();return S3(n,e,r!==void 0?r:n.custom,yZ(t),gZ(t))}function bZ(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Df(r))}function wZ(t,e){const r=$g(t,e);let{transitionEnd:n={},transition:i={},...s}=r?t.makeTargetAnimatable(r,!1):{};s={...s,...n};for(const o in s){const a=OX(s[o]);bZ(t,o,a)}}function EZ(t,e,r){var n,i;const s=Object.keys(e).filter(a=>!t.hasValue(a)),o=s.length;if(o)for(let a=0;at*1e3,_Z={current:!1},M3=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,N3=t=>e=>1-t(1-e),D3=t=>t*t,PZ=N3(D3),L3=M3(D3),vr=(t,e,r)=>-r*t+r*e+t;function f2(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function TZ({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let i=0,s=0,o=0;if(!e)i=s=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;i=f2(c,a,t+1/3),s=f2(c,a,t),o=f2(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:n}}const d2=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},IZ=[Dx,pl,Ku],OZ=t=>IZ.find(e=>e.test(t));function e_(t){const e=OZ(t);let r=e.parse(t);return e===Ku&&(r=TZ(r)),r}const DM=(t,e)=>{const r=e_(t),n=e_(e),i={...r};return s=>(i.red=d2(r.red,n.red,s),i.green=d2(r.green,n.green,s),i.blue=d2(r.blue,n.blue,s),i.alpha=vr(r.alpha,n.alpha,s),pl.transform(i))};function LM(t,e){return typeof t=="number"?r=>vr(t,e,r):Tn.test(t)?DM(t,e):BM(t,e)}const FM=(t,e)=>{const r=[...t],n=r.length,i=t.map((s,o)=>LM(s,e[o]));return s=>{for(let o=0;o{const r={...t,...e},n={};for(const i in r)t[i]!==void 0&&e[i]!==void 0&&(n[i]=LM(t[i],e[i]));return i=>{for(const s in n)r[s]=n[s](i);return r}},BM=(t,e)=>{const r=uc.createTransformer(e),n=Gm(t),i=Gm(e);return n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?Og(FM(n.values,i.values),r):o=>`${o>0?e:t}`},Ym=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},t_=(t,e)=>r=>vr(t,e,r);function $Z(t){return typeof t=="number"?t_:typeof t=="string"?Tn.test(t)?DM:BM:Array.isArray(t)?FM:typeof t=="object"?RZ:t_}function MZ(t,e,r){const n=[],i=r||$Z(t[0]),s=t.length-1;for(let o=0;ot[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=MZ(e,n,i),a=o.length,c=l=>{let u=0;if(a>1)for(;uc(Nf(t[0],t[s-1],l)):c}const F3=t=>t,UM=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,NZ=1e-7,DZ=12;function LZ(t,e,r,n,i){let s,o,a=0;do o=e+(r-e)/2,s=UM(o,n,i)-t,s>0?r=o:e=o;while(Math.abs(s)>NZ&&++aLZ(s,0,1,t,r);return s=>s===0||s===1?s:UM(i(s),e,n)}const WM=t=>1-Math.sin(Math.acos(t)),B3=N3(WM),FZ=M3(B3),HM=zM(.33,1.53,.69,.99),j3=N3(HM),BZ=M3(j3),jZ=t=>(t*=2)<1?.5*j3(t):.5*(2-Math.pow(2,-10*(t-1))),UZ={linear:F3,easeIn:D3,easeInOut:L3,easeOut:PZ,circIn:WM,circInOut:FZ,circOut:B3,backIn:j3,backInOut:BZ,backOut:HM,anticipate:jZ},r_=t=>{if(Array.isArray(t)){Qm(t.length===4);const[e,r,n,i]=t;return zM(e,r,n,i)}else if(typeof t=="string")return UZ[t];return t},zZ=t=>Array.isArray(t)&&typeof t[0]!="number";function WZ(t,e){return t.map(()=>e||L3).splice(0,t.length-1)}function HZ(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function qZ(t,e){return t.map(r=>r*e)}function Fx({keyframes:t,ease:e=L3,times:r,duration:n=300}){t=[...t];const i=zZ(e)?e.map(r_):r_(e),s={done:!1,value:t[0]},o=qZ(r&&r.length===t.length?r:HZ(t),n);function a(){return jM(o,t,{ease:Array.isArray(i)?i:WZ(t,i)})}let c=a();return{next:l=>(s.value=c(l),s.done=l>=n,s),flipTarget:()=>{t.reverse(),c=a()}}}const h2=.001,VZ=.01,n_=10,GZ=.05,KZ=1;function QZ({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let i,s;AZ(t<=n_*1e3);let o=1-e;o=Nf(GZ,KZ,o),t=Nf(VZ,n_,t/1e3),o<1?(i=l=>{const u=l*o,f=u*t,d=u-r,h=Bx(l,o),p=Math.exp(-f);return h2-d/h*p},s=l=>{const f=l*o*t,d=f*r+r,h=Math.pow(o,2)*Math.pow(l,2)*t,p=Math.exp(-f),v=Bx(Math.pow(l,2),o);return(-i(l)+h2>0?-1:1)*((d-h)*p)/v}):(i=l=>{const u=Math.exp(-l*t),f=(l-r)*t+1;return-h2+u*f},s=l=>{const u=Math.exp(-l*t),f=(r-l)*(t*t);return u*f});const a=5/t,c=JZ(i,s,a);if(t=t*1e3,isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*n;return{stiffness:l,damping:o*2*Math.sqrt(n*l),duration:t}}}const YZ=12;function JZ(t,e,r){let n=r;for(let i=1;it[r]!==void 0)}function eee(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!i_(t,ZZ)&&i_(t,XZ)){const r=QZ(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const tee=5;function qM({keyframes:t,restDelta:e,restSpeed:r,...n}){let i=t[0],s=t[t.length-1];const o={done:!1,value:i},{stiffness:a,damping:c,mass:l,velocity:u,duration:f,isResolvedFromDuration:d}=eee(n);let h=ree,p=u?-(u/1e3):0;const v=c/(2*Math.sqrt(a*l));function b(){const y=s-i,m=Math.sqrt(a/l)/1e3,g=Math.abs(y)<5;if(r||(r=g?.01:2),e||(e=g?.005:.5),v<1){const S=Bx(m,v);h=P=>{const T=Math.exp(-v*m*P);return s-T*((p+v*m*y)/S*Math.sin(S*P)+y*Math.cos(S*P))}}else if(v===1)h=S=>s-Math.exp(-m*S)*(y+(p+m*y)*S);else{const S=m*Math.sqrt(v*v-1);h=P=>{const T=Math.exp(-v*m*P),w=Math.min(S*P,300);return s-T*((p+v*m*y)*Math.sinh(w)+S*y*Math.cosh(w))/S}}}return b(),{next:y=>{const m=h(y);if(d)o.done=y>=f;else{let g=p;if(y!==0)if(v<1){const T=Math.max(0,y-tee);g=I3(m-h(T),y-T)}else g=0;const S=Math.abs(g)<=r,P=Math.abs(s-m)<=e;o.done=S&&P}return o.value=o.done?s:m,o},flipTarget:()=>{p=-p,[i,s]=[s,i],b()}}}qM.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const ree=t=>0;function nee({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:i=.5,modifyTarget:s}){const o=t[0],a={done:!1,value:o};let c=r*e;const l=o+c,u=s===void 0?l:s(l);return u!==l&&(c=u-o),{next:f=>{const d=-c*Math.exp(-f/n);return a.done=!(d>i||d<-i),a.value=a.done?u:u+d,a},flipTarget:()=>{}}}const iee={decay:nee,keyframes:Fx,tween:Fx,spring:qM};function VM(t,e,r=0){return t-e-r}function see(t,e=0,r=0,n=!0){return n?VM(e+-t,e,r):e-(t-e)+r}function oee(t,e,r,n){return n?t>=e+r:t<=-r}const aee=t=>{const e=({delta:r})=>t(r);return{start:()=>En.update(e,!0),stop:()=>lc.update(e)}};function Jm({duration:t,driver:e=aee,elapsed:r=0,repeat:n=0,repeatType:i="loop",repeatDelay:s=0,keyframes:o,autoplay:a=!0,onPlay:c,onStop:l,onComplete:u,onRepeat:f,onUpdate:d,type:h="keyframes",...p}){var v,b;const y=r;let m,g=0,S=t,P=!1,T=!0,w;const I=iee[o.length>2?"keyframes":h]||Fx,B=o[0],j=o[o.length-1];let H={done:!1,value:B};!((b=(v=I).needsInterpolation)===null||b===void 0)&&b.call(v,B,j)&&(w=jM([0,100],[B,j],{clamp:!1}),o=[0,100]);const G=I({...p,duration:t,keyframes:o});function F(){g++,i==="reverse"?(T=g%2===0,r=see(r,S,s,T)):(r=VM(r,S,s),i==="mirror"&&G.flipTarget()),P=!1,f&&f()}function E(){m&&m.stop(),u&&u()}function _(N){T||(N=-N),r+=N,P||(H=G.next(Math.max(0,r)),w&&(H.value=w(H.value)),P=T?H.done:r<=0),d&&d(H.value),P&&(g===0&&(S=S!==void 0?S:r),g{l&&l(),m&&m.stop()},set currentTime(N){r=y,_(N)},sample:N=>{r=y;const k=t&&typeof t=="number"?Math.max(t*.5,50):50;let $=0;for(_(0);$<=N;){const L=N-$;_(Math.min(L,k)),$+=k}return H}}}function cee(t){return!t||Array.isArray(t)||typeof t=="string"&&GM[t]}const fh=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,GM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fh([0,.65,.55,1]),circOut:fh([.55,0,1,.45]),backIn:fh([.31,.01,.66,-.59]),backOut:fh([.33,1.53,.69,.99])};function lee(t){if(t)return Array.isArray(t)?fh(t):GM[t]}function uee(t,e,r,{delay:n=0,duration:i,repeat:s=0,repeatType:o="loop",ease:a,times:c}={}){return t.animate({[e]:r,offset:c},{delay:n,duration:i,easing:lee(a),fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const s_={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},p2={},KM={};for(const t in s_)KM[t]=()=>(p2[t]===void 0&&(p2[t]=s_[t]()),p2[t]);function fee(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const dee=new Set(["opacity"]),Lp=10;function hee(t,e,{onUpdate:r,onComplete:n,...i}){if(!(KM.waapi()&&dee.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:c=0,ease:l}=i;if(i.type==="spring"||!cee(i.ease)){if(i.repeat===1/0)return;const f=Jm({...i,elapsed:0});let d={done:!1,value:o[0]};const h=[];let p=0;for(;!d.done&&p<2e4;)d=f.sample(p),h.push(d.value),p+=Lp;o=h,a=p-Lp,l="linear"}const u=uee(t.owner.current,e,o,{...i,delay:-c,duration:a,ease:l});return u.onfinish=()=>{t.set(fee(o,i)),En.update(()=>u.cancel()),n&&n()},{get currentTime(){return u.currentTime||0},set currentTime(f){u.currentTime=f},stop:()=>{const{currentTime:f}=u;if(f){const d=Jm({...i,autoplay:!1});t.setWithVelocity(d.sample(f-Lp).value,d.sample(f).value,Lp)}En.update(()=>u.cancel())}}}function QM(t,e){const r=performance.now(),n=({timestamp:i})=>{const s=i-r;s>=e&&(lc.read(n),t(s-e))};return En.read(n,!0),()=>lc.read(n)}function pee({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const i=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:QM(i,-e)}:i()}function vee({keyframes:t,velocity:e=0,min:r,max:n,power:i=.8,timeConstant:s=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:f,onComplete:d,onStop:h}){const p=t[0];let v;function b(S){return r!==void 0&&Sn}function y(S){return r===void 0?n:n===void 0||Math.abs(r-S){var T;f==null||f(P),(T=S.onUpdate)===null||T===void 0||T.call(S,P)},onComplete:d,onStop:h})}function g(S){m({type:"spring",stiffness:o,damping:a,restDelta:c,...S})}if(b(p))g({velocity:e,keyframes:[p,y(p)]});else{let S=i*e+p;typeof l<"u"&&(S=l(S));const P=y(S),T=P===r?-1:1;let w,I;const B=j=>{w=I,I=j,e=I3(j-w,Do.delta),(T===1&&j>P||T===-1&&jv==null?void 0:v.stop()}}const Qc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Fp=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),v2=()=>({type:"keyframes",ease:"linear",duration:.3}),mee={type:"keyframes",duration:.8},o_={x:Qc,y:Qc,z:Qc,rotate:Qc,rotateX:Qc,rotateY:Qc,rotateZ:Qc,scaleX:Fp,scaleY:Fp,scale:Fp,opacity:v2,backgroundColor:v2,color:v2,default:Fp},yee=(t,{keyframes:e})=>e.length>2?mee:(o_[t]||o_.default)(e[1]),jx=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&uc.test(e)&&!e.startsWith("url("));function gee({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function a_(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function c_(t){return typeof t=="number"?0:$3("",t)}function YM(t,e){return t[e]||t.default||t}function bee(t,e,r,n){const i=jx(e,r);let s=n.from!==void 0?n.from:t.get();return s==="none"&&i&&typeof r=="string"?s=$3(e,r):a_(s)&&typeof r=="string"?s=c_(r):!Array.isArray(r)&&a_(r)&&typeof s=="string"&&(r=c_(s)),Array.isArray(r)?(r[0]===null&&(r[0]=s),r):[s,r]}const U3=(t,e,r,n={})=>i=>{const s=YM(n,t)||{},o=s.delay||n.delay||0;let{elapsed:a=0}=n;a=a-$v(o);const c=bee(e,t,r,s),l=c[0],u=c[c.length-1],f=jx(t,l),d=jx(t,u);let h={keyframes:c,velocity:e.getVelocity(),...s,elapsed:a,onUpdate:b=>{e.set(b),s.onUpdate&&s.onUpdate(b)},onComplete:()=>{i(),s.onComplete&&s.onComplete()}};if(!f||!d||_Z.current||s.type===!1)return pee(h);if(s.type==="inertia")return vee(h);gee(s)||(h={...h,...yee(t,h)}),h.duration&&(h.duration=$v(h.duration)),h.repeatDelay&&(h.repeatDelay=$v(h.repeatDelay));const p=e.owner,v=p&&p.current;if(p&&v instanceof HTMLElement&&!(p!=null&&p.getProps().onUpdate)){const b=hee(e,t,h);if(b)return b}return Jm(h)};function wee(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const i=e.map(s=>Ux(t,s,r));n=Promise.all(i)}else if(typeof e=="string")n=Ux(t,e,r);else{const i=typeof e=="function"?$g(t,e,r.custom):e;n=JM(t,i,r)}return n.then(()=>t.notify("AnimationComplete",e))}function Ux(t,e,r={}){var n;const i=$g(t,e,r.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};r.transitionOverride&&(s=r.transitionOverride);const o=i?()=>JM(t,i,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:d}=s;return Eee(t,e,u+l,f,d,r)}:()=>Promise.resolve(),{when:c}=s;if(c){const[l,u]=c==="beforeChildren"?[o,a]:[a,o];return l().then(u)}else return Promise.all([o(),a(r.delay)])}function JM(t,e,{delay:r=0,transitionOverride:n,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...c}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");n&&(o=n);const u=[],f=i&&((s=t.animationState)===null||s===void 0?void 0:s.getState()[i]);for(const d in c){const h=t.getValue(d),p=c[d];if(!h||p===void 0||f&&Cee(f,d))continue;const v={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const y=t.getProps()[kZ];y&&(v.elapsed=window.HandoffAppearAnimations(y,d,h,En))}let b=h.start(U3(d,h,p,t.shouldReduceMotion&&ad.has(d)?{type:!1}:v));Km(l)&&(l.add(d),b=b.then(()=>l.remove(d))),u.push(b)}return Promise.all(u).then(()=>{a&&wZ(t,a)})}function Eee(t,e,r=0,n=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*n,c=i===1?(l=0)=>l*n:(l=0)=>a-l*n;return Array.from(t.variantChildren).sort(xee).forEach((l,u)=>{l.notify("AnimationStart",e),o.push(Ux(l,e,{...s,delay:r+c(u)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(o)}function xee(t,e){return t.sortNodePosition(e)}function Cee({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const z3=[vt.Animate,vt.InView,vt.Focus,vt.Hover,vt.Tap,vt.Drag,vt.Exit],See=[...z3].reverse(),kee=z3.length;function Aee(t){return e=>Promise.all(e.map(({animation:r,options:n})=>wee(t,r,n)))}function _ee(t){let e=Aee(t);const r=Tee();let n=!0;const i=(c,l)=>{const u=$g(t,l);if(u){const{transition:f,transitionEnd:d,...h}=u;c={...c,...h,...d}}return c};function s(c){e=c(t)}function o(c,l){const u=t.getProps(),f=t.getVariantContext(!0)||{},d=[],h=new Set;let p={},v=1/0;for(let y=0;yv&&P;const j=Array.isArray(S)?S:[S];let H=j.reduce(i,{});T===!1&&(H={});const{prevResolvedValues:G={}}=g,F={...G,...H},E=_=>{B=!0,h.delete(_),g.needsAnimating[_]=!0};for(const _ in F){const O=H[_],N=G[_];p.hasOwnProperty(_)||(O!==N?qm(O)&&qm(N)?!kM(O,N)||I?E(_):g.protectedKeys[_]=!0:O!==void 0?E(_):h.add(_):O!==void 0&&h.has(_)?E(_):g.protectedKeys[_]=!0)}g.prevProp=S,g.prevResolvedValues=H,g.isActive&&(p={...p,...H}),n&&t.blockInitialAnimation&&(B=!1),B&&!w&&d.push(...j.map(_=>({animation:_,options:{type:m,...c}})))}if(h.size){const y={};h.forEach(m=>{const g=t.getBaseTarget(m);g!==void 0&&(y[m]=g)}),d.push({animation:y})}let b=!!d.length;return n&&u.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),n=!1,b?e(d):Promise.resolve()}function a(c,l,u){var f;if(r[c].isActive===l)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,l)}),r[c].isActive=l;const d=o(u,c);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>r}}function Pee(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!kM(e,t):!1}function Yc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tee(){return{[vt.Animate]:Yc(!0),[vt.InView]:Yc(),[vt.Hover]:Yc(),[vt.Tap]:Yc(),[vt.Drag]:Yc(),[vt.Focus]:Yc(),[vt.Exit]:Yc()}}const Iee={animation:Wa(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=_ee(t)),_g(e)&&C.useEffect(()=>e.subscribe(t),[e])}),exit:Wa(t=>{const{custom:e,visualElement:r}=t,[n,i]=SM(),s=C.useContext(P1);C.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(vt.Exit,!n,{custom:s&&s.custom||e});o&&!n&&o.then(i)},[n])})},l_=(t,e)=>Math.abs(t-e);function Oee(t,e){const r=l_(t.x,e.x),n=l_(t.y,e.y);return Math.sqrt(r**2+n**2)}class XM{constructor(e,r,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const l=y2(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,f=Oee(l.offset,{x:0,y:0})>=3;if(!u&&!f)return;const{point:d}=l,{timestamp:h}=Do;this.history.push({...d,timestamp:h});const{onStart:p,onMove:v}=this.handlers;u||(p&&p(this.lastMoveEvent,l),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,l)},this.handlePointerMove=(l,u)=>{this.lastMoveEvent=l,this.lastMoveEventInfo=m2(u,this.transformPagePoint),En.update(this.updatePoint,!0)},this.handlePointerUp=(l,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:f,onSessionEnd:d}=this.handlers,h=y2(l.type==="pointercancel"?this.lastMoveEventInfo:m2(u,this.transformPagePoint),this.history);this.startEvent&&f&&f(l,h),d&&d(l,h)},!gM(e))return;this.handlers=r,this.transformPagePoint=n;const i=k3(e),s=m2(i,this.transformPagePoint),{point:o}=s,{timestamp:a}=Do;this.history=[{...o,timestamp:a}];const{onSessionStart:c}=r;c&&c(e,y2(s,this.history)),this.removeListeners=Og(ff(window,"pointermove",this.handlePointerMove),ff(window,"pointerup",this.handlePointerUp),ff(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),lc.update(this.updatePoint)}}function m2(t,e){return e?{point:e(t.point)}:t}function u_(t,e){return{x:t.x-e.x,y:t.y-e.y}}function y2({point:t},e){return{point:t,delta:u_(t,ZM(e)),offset:u_(t,Ree(e)),velocity:$ee(e,.1)}}function Ree(t){return t[0]}function ZM(t){return t[t.length-1]}function $ee(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const i=ZM(t);for(;r>=0&&(n=t[r],!(i.timestamp-n.timestamp>$v(e)));)r--;if(!n)return{x:0,y:0};const s=(i.timestamp-n.timestamp)/1e3;if(s===0)return{x:0,y:0};const o={x:(i.x-n.x)/s,y:(i.y-n.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function wi(t){return t.max-t.min}function zx(t,e=0,r=.01){return Math.abs(t-e)<=r}function f_(t,e,r,n=.5){t.origin=n,t.originPoint=vr(e.min,e.max,t.origin),t.scale=wi(r)/wi(e),(zx(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=vr(r.min,r.max,t.origin)-t.originPoint,(zx(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Dh(t,e,r,n){f_(t.x,e.x,r.x,n==null?void 0:n.originX),f_(t.y,e.y,r.y,n==null?void 0:n.originY)}function d_(t,e,r){t.min=r.min+e.min,t.max=t.min+wi(e)}function Mee(t,e,r){d_(t.x,e.x,r.x),d_(t.y,e.y,r.y)}function h_(t,e,r){t.min=e.min-r.min,t.max=t.min+wi(e)}function Lh(t,e,r){h_(t.x,e.x,r.x),h_(t.y,e.y,r.y)}function Nee(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?vr(r,t,n.max):Math.min(t,r)),t}function p_(t,e,r){return{min:e!==void 0?t.min+e:void 0,max:r!==void 0?t.max+r-(t.max-t.min):void 0}}function Dee(t,{top:e,left:r,bottom:n,right:i}){return{x:p_(t.x,r,i),y:p_(t.y,e,n)}}function v_(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Ym(e.min,e.max-n,t.min):n>i&&(r=Ym(t.min,t.max-i,e.min)),Nf(0,1,r)}function Bee(t,e){const r={};return e.min!==void 0&&(r.min=e.min-t.min),e.max!==void 0&&(r.max=e.max-t.min),r}const Wx=.35;function jee(t=Wx){return t===!1?t=0:t===!0&&(t=Wx),{x:m_(t,"left","right"),y:m_(t,"top","bottom")}}function m_(t,e,r){return{min:y_(t,e),max:y_(t,r)}}function y_(t,e){return typeof t=="number"?t:t[e]||0}const g_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fh=()=>({x:g_(),y:g_()}),b_=()=>({min:0,max:0}),Ir=()=>({x:b_(),y:b_()});function js(t){return[t("x"),t("y")]}function eN({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function Uee({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function zee(t,e){if(!e)return t;const r=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function g2(t){return t===void 0||t===1}function Hx({scale:t,scaleX:e,scaleY:r}){return!g2(t)||!g2(e)||!g2(r)}function tl(t){return Hx(t)||tN(t)||t.z||t.rotate||t.rotateX||t.rotateY}function tN(t){return w_(t.x)||w_(t.y)}function w_(t){return t&&t!=="0%"}function Xm(t,e,r){const n=t-r,i=e*n;return r+i}function E_(t,e,r,n,i){return i!==void 0&&(t=Xm(t,i,n)),Xm(t,r,n)+e}function qx(t,e=0,r=1,n,i){t.min=E_(t.min,e,r,n,i),t.max=E_(t.max,e,r,n,i)}function rN(t,{x:e,y:r}){qx(t.x,e.translate,e.scale,e.originPoint),qx(t.y,r.translate,r.scale,r.originPoint)}function Wee(t,e,r,n=!1){var i,s;const o=r.length;if(!o)return;e.x=e.y=1;let a,c;for(let l=0;l1.0000000000001||t<.999999999999?t:1}function Ia(t,e){t.min=t.min+e,t.max=t.max+e}function C_(t,e,[r,n,i]){const s=e[i]!==void 0?e[i]:.5,o=vr(t.min,t.max,s);qx(t,e[r],e[n],o,e.scale)}const Hee=["x","scaleX","originX"],qee=["y","scaleY","originY"];function Qu(t,e){C_(t.x,e,Hee),C_(t.y,e,qee)}function nN(t,e){return eN(zee(t.getBoundingClientRect(),e))}function Vee(t,e,r){const n=nN(t,r),{scroll:i}=e;return i&&(Ia(n.x,i.offset.x),Ia(n.y,i.offset.y)),n}const Gee=new WeakMap;class Kee{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ir(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(k3(a,"page").point)},i=(a,c)=>{var l;const{drag:u,dragPropagation:f,onDragStart:d}=this.getProps();u&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=EM(u),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),js(h=>{var p,v;let b=this.getAxisMotionValue(h).get()||0;if(so.test(b)){const y=(v=(p=this.visualElement.projection)===null||p===void 0?void 0:p.layout)===null||v===void 0?void 0:v.layoutBox[h];y&&(b=wi(y)*(parseFloat(b)/100))}this.originPoint[h]=b}),d==null||d(a,c),(l=this.visualElement.animationState)===null||l===void 0||l.setActive(vt.Drag,!0))},s=(a,c)=>{const{dragPropagation:l,dragDirectionLock:u,onDirectionLock:f,onDrag:d}=this.getProps();if(!l&&!this.openGlobalLock)return;const{offset:h}=c;if(u&&this.currentDirection===null){this.currentDirection=Qee(h),this.currentDirection!==null&&(f==null||f(this.currentDirection));return}this.updateAxis("x",c.point,h),this.updateAxis("y",c.point,h),this.visualElement.render(),d==null||d(a,c)},o=(a,c)=>this.stop(a,c);this.panSession=new XM(e,{onSessionStart:n,onStart:i,onMove:s,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s==null||s(e,r)}cancel(){var e,r;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)===null||e===void 0||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(r=this.visualElement.animationState)===null||r===void 0||r.setActive(vt.Drag,!1)}updateAxis(e,r,n){const{drag:i}=this.getProps();if(!n||!Bp(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Nee(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},i=this.constraints;e&&Gu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=Dee(n.layoutBox,e):this.constraints=!1,this.elastic=jee(r),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&js(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=Bee(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Gu(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Vee(n,i.root,this.visualElement.getTransformPagePoint());let o=Lee(i.layout.layoutBox,s);if(r){const a=r(Uee(o));this.hasMutatedConstraints=!!a,a&&(o=eN(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=js(u=>{if(!Bp(u,r,this.currentDirection))return;let f=(c==null?void 0:c[u])||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,p)});return Promise.all(l).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(U3(e,n,0,r))}stopAnimation(){js(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){js(r=>{const{drag:n}=this.getProps();if(!Bp(r,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(r);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[r];s.set(e[r]-vr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Gu(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};js(a=>{const c=this.getAxisMotionValue(a);if(c){const l=c.get();s[a]=Fee({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),js(a=>{if(!Bp(a,r,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(vr(l,u,s[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Gee.set(this.visualElement,this);const r=this.visualElement.current,n=ff(r,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Gu(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",i);s&&!s.layout&&((e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout()),i();const a=Ig(window,"resize",()=>this.scalePositionWithinConstraints()),c=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(js(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c==null||c()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Wx,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Bp(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function Qee(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function Yee(t){const{dragControls:e,visualElement:r}=t,n=Tg(()=>new Kee(r));C.useEffect(()=>e&&e.subscribe(n),[n,e]),C.useEffect(()=>n.addListeners(),[n])}function Jee({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:i}){const s=t||e||r||n,o=C.useRef(null),{transformPagePoint:a}=C.useContext(v3),c={onSessionStart:n,onStart:e,onMove:t,onEnd:(u,f)=>{o.current=null,r&&r(u,f)}};C.useEffect(()=>{o.current!==null&&o.current.updateHandlers(c)});function l(u){o.current=new XM(u,c,{transformPagePoint:a})}Vm(i,"pointerdown",s&&l),A3(()=>o.current&&o.current.end())}const Xee={pan:Wa(Jee),drag:Wa(Yee)};function Vx(t){return typeof t=="string"&&t.startsWith("var(--")}const iN=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Zee(t){const e=iN.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function Gx(t,e,r=1){const[n,i]=Zee(t);if(!n)return;const s=window.getComputedStyle(e).getPropertyValue(n);return s?s.trim():Vx(i)?Gx(i,e,r+1):i}function ete(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(i=>{const s=i.get();if(!Vx(s))return;const o=Gx(s,n);o&&i.set(o)});for(const i in e){const s=e[i];if(!Vx(s))continue;const o=Gx(s,n);o&&(e[i]=o,r&&r[i]===void 0&&(r[i]=s))}return{target:e,transitionEnd:r}}const tte=new Set(["width","height","top","left","right","bottom","x","y"]),sN=t=>tte.has(t),rte=t=>Object.keys(t).some(sN),S_=t=>t===eu||t===we;var k_;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(k_||(k_={}));const A_=(t,e)=>parseFloat(t.split(", ")[e]),__=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return A_(i[1],e);{const s=n.match(/^matrix\((.+)\)$/);return s?A_(s[1],t):0}},nte=new Set(["x","y","z"]),ite=Wm.filter(t=>!nte.has(t));function ste(t){const e=[];return ite.forEach(r=>{const n=t.getValue(r);n!==void 0&&(e.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),e.length&&t.render(),e}const P_={width:({x:t},{paddingLeft:e="0",paddingRight:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),height:({y:t},{paddingTop:e="0",paddingBottom:r="0"})=>t.max-t.min-parseFloat(e)-parseFloat(r),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:__(4,13),y:__(5,14)},ote=(t,e,r)=>{const n=e.measureViewportBox(),i=e.current,s=getComputedStyle(i),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(l=>{a[l]=P_[l](n,s)}),e.render();const c=e.measureViewportBox();return r.forEach(l=>{const u=e.getValue(l);u&&u.jump(a[l]),t[l]=P_[l](c,s)}),t},ate=(t,e,r={},n={})=>{e={...e},n={...n};const i=Object.keys(e).filter(sN);let s=[],o=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let u=r[c],f=Kd(u);const d=e[c];let h;if(qm(d)){const p=d.length,v=d[0]===null?1:0;u=d[v],f=Kd(u);for(let b=v;b=0?window.pageYOffset:null,l=ote(e,t,a);return s.length&&s.forEach(([u,f])=>{t.getValue(u).set(f)}),t.render(),Ag&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:n}}else return{target:e,transitionEnd:n}};function cte(t,e,r,n){return rte(e)?ate(t,e,r,n):{target:e,transitionEnd:n}}const lte=(t,e,r,n)=>{const i=ete(t,e,n);return e=i.target,n=i.transitionEnd,cte(t,e,r,n)},Kx={current:null},oN={current:!1};function ute(){if(oN.current=!0,!!Ag)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Kx.current=t.matches;t.addListener(e),e()}else Kx.current=!1}function fte(t,e,r){const{willChange:n}=e;for(const i in e){const s=e[i],o=r[i];if(ni(s))t.addValue(i,s),Km(n)&&n.add(i);else if(ni(o))t.addValue(i,Df(s,{owner:t})),Km(n)&&n.remove(i);else if(o!==s)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(s)}else{const a=t.getStaticValue(i);t.addValue(i,Df(a!==void 0?a:s,{owner:t}))}}for(const i in r)e[i]===void 0&&t.removeValue(i);return e}const aN=Object.keys(P0),dte=aN.length,T_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hte{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>En.render(this.render,!1,!0);const{latestValues:o,renderState:a}=i;this.latestValues=o,this.baseTarget={...o},this.initialValues=r.initial?{...o}:{},this.renderState=a,this.parent=e,this.props=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.isControllingVariants=Pg(r),this.isVariantNode=sM(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...l}=this.scrapeMotionValuesFromProps(r,{});for(const u in l){const f=l[u];o[u]!==void 0&&ni(f)&&(f.set(o[u],!1),Km(c)&&c.add(u))}}scrapeMotionValuesFromProps(e,r){return{}}mount(e){var r;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(r=this.parent)===null||r===void 0?void 0:r.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),oN.current||ute(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kx.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,r,n;(e=this.projection)===null||e===void 0||e.unmount(),lc.update(this.notifyUpdate),lc.render(this.render),this.valueSubscriptions.forEach(i=>i()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(e,r){const n=ad.has(e),i=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&En.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,i,s,o,a){const c=[];for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:p})}return c}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ir()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,r){this.latestValues[e]=r}makeTargetAnimatable(e,r=!0){return this.makeTargetAnimatableFromInstance(e,this.props,r)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const r=this.props;this.props=e;for(let n=0;nn.variantChildren.delete(e)}addValue(e,r){r!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,r)),this.values.set(e,r),this.latestValues[e]=r.get()}removeValue(e){var r;this.values.delete(e),(r=this.valueSubscriptions.get(e))===null||r===void 0||r(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,r){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&r!==void 0&&(n=Df(r,{owner:this}),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,r){this.baseTarget[e]=r}getBaseTarget(e){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=S3(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!ni(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new T3),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const cN=["initial",...z3],pte=cN.length;class lN extends hte{sortInstanceNodePosition(e,r){return e.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(e,r){var n;return(n=e.style)===null||n===void 0?void 0:n[r]}removeValueFromRenderState(e,{vars:r,style:n}){delete r[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:r,...n},{transformValues:i},s){let o=CZ(n,e||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),o&&(o=i(o))),s){EZ(this,n,o);const a=lte(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function vte(t){return window.getComputedStyle(t)}class mte extends lN{readValueFromInstance(e,r){if(ad.has(r)){const n=R3(r);return n&&n.default||0}else{const n=vte(e),i=(cM(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:r}){return nN(e,r)}build(e,r,n,i){g3(e,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,r){return C3(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ni(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,i){hM(e,r,n,i)}}class yte extends lN{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return ad.has(r)?((n=R3(r))===null||n===void 0?void 0:n.default)||0:(r=pM.has(r)?r:x3(r),e.getAttribute(r))}measureInstanceViewportBox(){return Ir()}scrapeMotionValuesFromProps(e,r){return mM(e,r)}build(e,r,n,i){w3(e,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,r,n,i){vM(e,r,n,i)}mount(e){this.isSVGTag=E3(e.tagName),super.mount(e)}}const gte=(t,e)=>y3(t)?new yte(e,{enableHardwareAcceleration:!1}):new mte(e,{enableHardwareAcceleration:!0});function I_(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(we.test(t))t=parseFloat(t);else return t;const r=I_(t,e.target.x),n=I_(t,e.target.y);return`${r}% ${n}%`}},O_="_$css",bte={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,i=t.includes("var("),s=[];i&&(t=t.replace(iN,h=>(s.push(h),O_)));const o=uc.parse(t);if(o.length>5)return n;const a=uc.createTransformer(t),c=typeof o[0]!="number"?1:0,l=r.x.scale*e.x,u=r.y.scale*e.y;o[0+c]/=l,o[1+c]/=u;const f=vr(l,u,.5);typeof o[2+c]=="number"&&(o[2+c]/=f),typeof o[3+c]=="number"&&(o[3+c]/=f);let d=a(o);if(i){let h=0;d=d.replace(O_,()=>{const p=s[h];return h++,p})}return d}};class wte extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=e;uX(xte),s&&(r.group&&r.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$h.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||En.postRender(()=>{var a;!((a=o.getStack())===null||a===void 0)&&a.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(i),n!=null&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function Ete(t){const[e,r]=SM(),n=C.useContext(m3);return x.createElement(wte,{...t,layoutGroup:n,switchLayoutGroup:C.useContext(oM),isPresent:e,safeToRemove:r})}const xte={borderRadius:{...Qd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qd,borderTopRightRadius:Qd,borderBottomLeftRadius:Qd,borderBottomRightRadius:Qd,boxShadow:bte},Cte={measureLayout:Ete};function Ste(t,e,r={}){const n=ni(t)?t:Df(t);return n.start(U3("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const uN=["TopLeft","TopRight","BottomLeft","BottomRight"],kte=uN.length,R_=t=>typeof t=="string"?parseFloat(t):t,$_=t=>typeof t=="number"||we.test(t);function Ate(t,e,r,n,i,s){i?(t.opacity=vr(0,r.opacity!==void 0?r.opacity:1,_te(n)),t.opacityExit=vr(e.opacity!==void 0?e.opacity:1,0,Pte(n))):s&&(t.opacity=vr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Ym(t,e,n))}function N_(t,e){t.min=e.min,t.max=e.max}function ts(t,e){N_(t.x,e.x),N_(t.y,e.y)}function D_(t,e,r,n,i){return t-=e,t=Xm(t,1/r,n),i!==void 0&&(t=Xm(t,1/i,n)),t}function Tte(t,e=0,r=1,n=.5,i,s=t,o=t){if(so.test(e)&&(e=parseFloat(e),e=vr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=vr(s.min,s.max,n);t===s&&(a-=e),t.min=D_(t.min,e,r,a,i),t.max=D_(t.max,e,r,a,i)}function L_(t,e,[r,n,i],s,o){Tte(t,e[r],e[n],e[i],e.scale,s,o)}const Ite=["x","scaleX","originX"],Ote=["y","scaleY","originY"];function F_(t,e,r,n){L_(t.x,e,Ite,r==null?void 0:r.x,n==null?void 0:n.x),L_(t.y,e,Ote,r==null?void 0:r.y,n==null?void 0:n.y)}function B_(t){return t.translate===0&&t.scale===1}function dN(t){return B_(t.x)&&B_(t.y)}function hN(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function j_(t){return wi(t.x)/wi(t.y)}class Rte{constructor(){this.members=[]}add(e){_3(this.members,e),e.scheduleRender()}remove(e){if(P3(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(e){const r=this.members.findIndex(i=>e===i);if(r===0)return!1;let n;for(let i=r;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){n=s;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,r&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,i,s,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(i=e.resumingFrom)===null||i===void 0?void 0:(s=i.options).onExitComplete)===null||o===void 0||o.call(s)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function U_(t,e,r){let n="";const i=t.x.translate/e.x,s=t.y.translate/e.y;if((i||s)&&(n=`translate3d(${i}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:c,rotateX:l,rotateY:u}=r;c&&(n+=`rotate(${c}deg) `),l&&(n+=`rotateX(${l}deg) `),u&&(n+=`rotateY(${u}deg) `)}const o=t.x.scale*e.x,a=t.y.scale*e.y;return(o!==1||a!==1)&&(n+=`scale(${o}, ${a})`),n||"none"}const $te=(t,e)=>t.depth-e.depth;class Mte{constructor(){this.children=[],this.isDirty=!1}add(e){_3(this.children,e),this.isDirty=!0}remove(e){P3(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($te),this.isDirty=!1,this.children.forEach(e)}}const z_=["","X","Y","Z"],W_=1e3;let Nte=0;function pN({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o,a={},c=e==null?void 0:e()){this.id=Nte++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Fte),this.nodes.forEach(Ute),this.nodes.forEach(zte)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let l=0;lthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=QM(h,250),$h.hasAnimatedSinceResize&&($h.hasAnimatedSinceResize=!1,this.nodes.forEach(q_))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:v})=>{var b,y,m,g,S;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const P=(y=(b=this.options.transition)!==null&&b!==void 0?b:f.getDefaultTransition())!==null&&y!==void 0?y:Gte,{onLayoutAnimationStart:T,onLayoutAnimationComplete:w}=f.getProps(),I=!this.targetLayout||!hN(this.targetLayout,v)||p,B=!h&&p;if(this.options.layoutRoot||!((m=this.resumeFrom)===null||m===void 0)&&m.instance||B||h&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const j={...YM(P,"layout"),onPlay:T,onComplete:w};(f.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else!h&&this.animationProgress===0&&q_(this),this.isLead()&&((S=(g=this.options).onExitComplete)===null||S===void 0||S.call(g));this.targetLayout=v})}unmount(){var o,a;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(o=this.getStack())===null||o===void 0||o.remove(this),(a=this.parent)===null||a===void 0||a.children.delete(this),this.instance=void 0,lc.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var o;return this.isAnimationBlocked||((o=this.parent)===null||o===void 0?void 0:o.isTreeAnimationBlocked())||!1}startUpdate(){var o;this.isUpdateBlocked()||(this.isUpdating=!0,(o=this.nodes)===null||o===void 0||o.forEach(Wte),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,c,l;if(this.root.isUpdateBlocked()){(c=(a=this.options).onExitComplete)===null||c===void 0||c.call(a);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var o;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{var g;const S=m/1e3;V_(h.x,o.x,S),V_(h.y,o.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((g=this.relativeParent)===null||g===void 0)&&g.layout)&&(Lh(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),qte(this.relativeTarget,this.relativeTargetOrigin,p,S)),v&&(this.animationValues=d,Ate(d,f,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((c=this.resumingFrom.currentAnimation)===null||c===void 0||c.stop()),this.pendingAnimation&&(lc.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=En.update(()=>{$h.hasAnimatedSinceResize=!0,this.currentAnimation=Ste(0,W_,{...o,onUpdate:l=>{var u;this.mixTargetDelta(l),(u=o.onUpdate)===null||u===void 0||u.call(o,l)},onComplete:()=>{var l;(l=o.onComplete)===null||l===void 0||l.call(o),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var o;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(o=this.getStack())===null||o===void 0||o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var o;this.currentAnimation&&((o=this.mixTargetDelta)===null||o===void 0||o.call(this,W_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&vN(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ir();const f=wi(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const d=wi(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+d}ts(a,c),Qu(a,u),Dh(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){var c,l,u;this.sharedNodes.has(o)||this.sharedNodes.set(o,new Rte),this.sharedNodes.get(o).add(a),a.promote({transition:(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.transition,preserveFollowOpacity:(u=(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.shouldPreserveFollowOpacity)===null||u===void 0?void 0:u.call(l,a)})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let u=0;u{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(H_),this.root.sharedNodes.clear()}}}function Dte(t){t.updateLayout()}function Lte(t){var e,r,n;const i=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&i&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:a}=t.options,c=i.source!==t.layout.source;a==="size"?js(h=>{const p=c?i.measuredBox[h]:i.layoutBox[h],v=wi(p);p.min=s[h].min,p.max=p.min+v}):vN(a,i.layoutBox,s)&&js(h=>{const p=c?i.measuredBox[h]:i.layoutBox[h],v=wi(s[h]);p.max=p.min+v});const l=Fh();Dh(l,s,i.layoutBox);const u=Fh();c?Dh(u,t.applyTransform(o,!0),i.measuredBox):Dh(u,s,i.layoutBox);const f=!dN(l);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:v}=h;if(p&&v){const b=Ir();Lh(b,i.layoutBox,p.layoutBox);const y=Ir();Lh(y,s,v.layoutBox),hN(b,y)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function Fte(t){t.isProjectionDirty||(t.isProjectionDirty=!!(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=!!(t.parent&&t.parent.isTransformDirty))}function Bte(t){t.clearSnapshot()}function H_(t){t.clearMeasurements()}function jte(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function q_(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Ute(t){t.resolveTargetDelta()}function zte(t){t.calcProjection()}function Wte(t){t.resetRotation()}function Hte(t){t.removeLeadSnapshot()}function V_(t,e,r){t.translate=vr(e.translate,0,r),t.scale=vr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function G_(t,e,r,n){t.min=vr(e.min,r.min,n),t.max=vr(e.max,r.max,n)}function qte(t,e,r,n){G_(t.x,e.x,r.x,n),G_(t.y,e.y,r.y,n)}function Vte(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Gte={duration:.45,ease:[.4,0,.1,1]};function Kte(t,e){let r=t.root;for(let s=t.path.length-1;s>=0;s--)if(t.path[s].instance){r=t.path[s];break}const i=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);i&&t.mount(i,!0)}function K_(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Qte(t){K_(t.x),K_(t.y)}function vN(t,e,r){return t==="position"||t==="preserve-aspect"&&!zx(j_(e),j_(r),.2)}const Yte=pN({attachResizeListener:(t,e)=>Ig(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),b2={current:void 0},Jte=pN({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!b2.current){const t=new Yte(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),b2.current=t}return b2.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Xte={...Iee,...QX,...Xee,...Cte},O0=cX((t,e)=>DX(t,e,Xte,gte,Jte));function mN(){const t=C.useRef(!1);return Um(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Zte(){const t=mN(),[e,r]=C.useState(0),n=C.useCallback(()=>{t.current&&r(e+1)},[e]);return[C.useCallback(()=>En.postRender(n),[n]),e]}class ere extends C.Component{getSnapshotBeforeUpdate(e){const r=this.props.childRef.current;if(r&&e.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tre({children:t,isPresent:e}){const r=C.useId(),n=C.useRef(null),i=C.useRef({width:0,height:0,top:0,left:0});return C.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:c}=i.current;if(e||!n.current||!s||!o)return;n.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${s}px !important; @@ -55,7 +55,12 @@ Error generating stack: `+s.message+` top: ${a}px !important; left: ${c}px !important; } - `),()=>{document.head.removeChild(l)}},[e]),C.createElement(Yte,{isPresent:e,childRef:n,sizeRef:i},C.cloneElement(t,{ref:n}))}const w2=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Tg(Xte),c=C.useId(),l=C.useMemo(()=>({id:c,initial:e,isPresent:r,custom:i,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?void 0:[r]);return C.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),C.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=C.createElement(Jte,{isPresent:r},t)),C.createElement(P1.Provider,{value:l},t)};function Xte(){return new Map}const Tu=t=>t.key||"";function Zte(t,e){t.forEach(r=>{const n=Tu(r);e.set(n,r)})}function ere(t){const e=[];return C.Children.forEach(t,r=>{C.isValidElement(r)&&e.push(r)}),e}const Mg=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=Qte();const c=C.useContext(y3).forceRender;c&&(a=c);const l=hN(),u=ere(t);let f=u;const d=new Set,h=C.useRef(f),p=C.useRef(new Map).current,v=C.useRef(!0);if(Um(()=>{v.current=!1,Zte(u,p),h.current=f}),_3(()=>{v.current=!0,p.clear(),d.clear()}),v.current)return C.createElement(C.Fragment,null,f.map(g=>C.createElement(w2,{key:Tu(g),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},g)));f=[...f];const b=h.current.map(Tu),y=u.map(Tu),m=b.length;for(let g=0;g{if(y.indexOf(g)!==-1)return;const S=p.get(g);if(!S)return;const P=b.indexOf(g),T=()=>{p.delete(g),d.delete(g);const w=h.current.findIndex(I=>I.key===g);if(h.current.splice(w,1),!d.size){if(h.current=u,l.current===!1)return;a(),n&&n()}};f.splice(P,0,C.createElement(w2,{key:Tu(S),isPresent:!1,onExitComplete:T,custom:e,presenceAffectsLayout:s,mode:o},S))}),f=f.map(g=>{const S=g.key;return d.has(S)?g:C.createElement(w2,{key:Tu(g),isPresent:!0,presenceAffectsLayout:s,mode:o},g)}),C.createElement(C.Fragment,null,d.size?f:f.map(g=>C.cloneElement(g)))};var Ks=function(){return Ks=Object.assign||function(e){for(var r,n=1,i=arguments.length;nfunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),s=Object.keys(i),o=s.filter(c=>"mappings"in i[c]),a=c=>{var l=[],u={},f=E2({},c),d=!1;for(var h of o){var p=c[h];if(p!=null){var v=i[h];d=!0;for(var b of v.mappings)u[b]=p,f[b]==null&&delete f[b]}}var y=d?E2(E2({},u),f):c,m=function(){var T=y[g],w=i[g];try{if(w.mappings)return"continue";if(typeof T=="string"||typeof T=="number")l.push(w.values[T].defaultClass);else if(Array.isArray(T))for(var I=0;It,cre=function(){return ore(are)(...arguments)},vN=cre({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},backgroundPrimary:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},backgroundSecondary:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},backgroundContrast:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},backgroundMuted:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},backgroundControl:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},backgroundInverse:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},backgroundBackdrop:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},backgroundOverlay:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},backgroundRaised:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},borderNormal:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},borderFocus:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},buttonGlass:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},buttonEmphasis:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},buttonInverse:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},text80:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},text100:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},textInverse100:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},arbitrumDark:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},arbitrumLight:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},avalanceDark:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},avalanceLight:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},bscDark:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},bscLight:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},ethereumDark:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},ethereumLight:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},gnosisDark:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},gnosisLight:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},polygonDark:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},polygonLight:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},backgroundPrimary:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},backgroundSecondary:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},backgroundContrast:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},backgroundMuted:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},backgroundControl:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},backgroundInverse:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},backgroundBackdrop:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},backgroundOverlay:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},backgroundRaised:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},borderNormal:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},borderFocus:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},buttonGlass:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},buttonEmphasis:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},buttonInverse:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},text80:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},text100:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},textInverse100:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},arbitrumDark:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},arbitrumLight:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},avalanceDark:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},avalanceLight:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},bscDark:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},bscLight:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},ethereumDark:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},ethereumLight:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},gnosisDark:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},gnosisLight:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},polygonDark:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},polygonLight:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},backgroundPrimary:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},backgroundSecondary:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},backgroundContrast:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},backgroundMuted:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},backgroundControl:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},backgroundInverse:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},backgroundBackdrop:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},backgroundOverlay:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},backgroundRaised:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},borderNormal:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},borderFocus:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},buttonGlass:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},buttonEmphasis:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},buttonInverse:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},text80:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},text100:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},textInverse100:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},arbitrumDark:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},arbitrumLight:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},avalanceDark:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},avalanceLight:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},bscDark:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},bscLight:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},ethereumDark:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},ethereumLight:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},gnosisDark:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},gnosisLight:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},polygonDark:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},polygonLight:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},backgroundPrimary:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},backgroundSecondary:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},backgroundContrast:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},backgroundMuted:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},backgroundControl:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},backgroundInverse:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},backgroundBackdrop:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},backgroundOverlay:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},backgroundRaised:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},borderNormal:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},borderFocus:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},buttonGlass:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},buttonEmphasis:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},buttonInverse:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},text80:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},text100:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},textInverse100:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},arbitrumDark:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},arbitrumLight:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},avalanceDark:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},avalanceLight:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},bscDark:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},bscLight:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},ethereumDark:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},ethereumLight:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},gnosisDark:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},gnosisLight:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},polygonDark:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},polygonLight:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},backgroundPrimary:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},backgroundSecondary:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},backgroundContrast:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},backgroundMuted:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},backgroundControl:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},backgroundInverse:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},backgroundBackdrop:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},backgroundOverlay:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},backgroundRaised:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},borderNormal:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},borderFocus:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},buttonGlass:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},buttonEmphasis:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},buttonInverse:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},text80:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},text100:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},textInverse100:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},arbitrumDark:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},arbitrumLight:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},avalanceDark:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},avalanceLight:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},bscDark:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},bscLight:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},ethereumDark:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},ethereumLight:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},gnosisDark:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},gnosisLight:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},polygonDark:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},polygonLight:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},backgroundPrimary:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},backgroundSecondary:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},backgroundContrast:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},backgroundMuted:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},backgroundControl:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},backgroundInverse:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},backgroundBackdrop:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},backgroundOverlay:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},backgroundRaised:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},borderNormal:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},borderFocus:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},buttonGlass:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},buttonEmphasis:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},buttonInverse:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},text80:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},text100:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},textInverse100:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},arbitrumDark:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},arbitrumLight:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},avalanceDark:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},avalanceLight:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},bscDark:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},bscLight:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},ethereumDark:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},ethereumLight:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},gnosisDark:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},gnosisLight:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},polygonDark:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},polygonLight:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const lre=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Qx=t=>(t.display||(t.display=Object.keys(t).some(e=>lre.includes(e))?"flex":void 0),vN(t));Qx.properties=vN.properties;function mN(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const l in s)Qx.properties.has(l)?o[l]=s[l]:a[l]=s[l];const c=Qx({...o,...n});return C.createElement(r,{className:Si(c,i),...a,ref:e})});var yN={exports:{}},Yd={};/** + `),()=>{document.head.removeChild(l)}},[e]),C.createElement(ere,{isPresent:e,childRef:n,sizeRef:i},C.cloneElement(t,{ref:n}))}const w2=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:s,mode:o})=>{const a=Tg(rre),c=C.useId(),l=C.useMemo(()=>({id:c,initial:e,isPresent:r,custom:i,onExitComplete:u=>{a.set(u,!0);for(const f of a.values())if(!f)return;n&&n()},register:u=>(a.set(u,!1),()=>a.delete(u))}),s?void 0:[r]);return C.useMemo(()=>{a.forEach((u,f)=>a.set(f,!1))},[r]),C.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=C.createElement(tre,{isPresent:r},t)),C.createElement(P1.Provider,{value:l},t)};function rre(){return new Map}const Tu=t=>t.key||"";function nre(t,e){t.forEach(r=>{const n=Tu(r);e.set(n,r)})}function ire(t){const e=[];return C.Children.forEach(t,r=>{C.isValidElement(r)&&e.push(r)}),e}const Mg=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[a]=Zte();const c=C.useContext(m3).forceRender;c&&(a=c);const l=mN(),u=ire(t);let f=u;const d=new Set,h=C.useRef(f),p=C.useRef(new Map).current,v=C.useRef(!0);if(Um(()=>{v.current=!1,nre(u,p),h.current=f}),A3(()=>{v.current=!0,p.clear(),d.clear()}),v.current)return C.createElement(C.Fragment,null,f.map(g=>C.createElement(w2,{key:Tu(g),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:s,mode:o},g)));f=[...f];const b=h.current.map(Tu),y=u.map(Tu),m=b.length;for(let g=0;g{if(y.indexOf(g)!==-1)return;const S=p.get(g);if(!S)return;const P=b.indexOf(g),T=()=>{p.delete(g),d.delete(g);const w=h.current.findIndex(I=>I.key===g);if(h.current.splice(w,1),!d.size){if(h.current=u,l.current===!1)return;a(),n&&n()}};f.splice(P,0,C.createElement(w2,{key:Tu(S),isPresent:!1,onExitComplete:T,custom:e,presenceAffectsLayout:s,mode:o},S))}),f=f.map(g=>{const S=g.key;return d.has(S)?g:C.createElement(w2,{key:Tu(g),isPresent:!0,presenceAffectsLayout:s,mode:o},g)}),C.createElement(C.Fragment,null,d.size?f:f.map(g=>C.cloneElement(g)))};var Ks=function(){return Ks=Object.assign||function(e){for(var r,n=1,i=arguments.length;nfunction(){for(var e=arguments.length,r=new Array(e),n=0;nc.styles)),s=Object.keys(i),o=s.filter(c=>"mappings"in i[c]),a=c=>{var l=[],u={},f=E2({},c),d=!1;for(var h of o){var p=c[h];if(p!=null){var v=i[h];d=!0;for(var b of v.mappings)u[b]=p,f[b]==null&&delete f[b]}}var y=d?E2(E2({},u),f):c,m=function(){var T=y[g],w=i[g];try{if(w.mappings)return"continue";if(typeof T=="string"||typeof T=="number")l.push(w.values[T].defaultClass);else if(Array.isArray(T))for(var I=0;It,vre=function(){return hre(pre)(...arguments)},bN=vre({conditions:{defaultCondition:"sm",conditionNames:["sm","md","lg","xl"],responsiveArray:void 0},styles:{borderWidth:{mappings:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"]},borderRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderLeftRadius:{mappings:["borderBottomLeftRadius","borderTopLeftRadius"]},borderRightRadius:{mappings:["borderBottomRightRadius","borderTopRightRadius"]},borderTopRadius:{mappings:["borderTopLeftRadius","borderTopRightRadius"]},borderBottomRadius:{mappings:["borderBottomLeftRadius","borderBottomRightRadius"]},margin:{mappings:["marginTop","marginBottom","marginLeft","marginRight"]},marginX:{mappings:["marginLeft","marginRight"]},marginY:{mappings:["marginTop","marginBottom"]},overflow:{mappings:["overflowX","overflowY"]},padding:{mappings:["paddingTop","paddingBottom","paddingLeft","paddingRight"]},paddingX:{mappings:["paddingLeft","paddingRight"]},paddingY:{mappings:["paddingTop","paddingBottom"]},placeItems:{mappings:["justifyContent","alignItems"]},inset:{mappings:["top","bottom","left","right"]},width:{values:{0:{conditions:{sm:"fyvr10",md:"fyvr11",lg:"fyvr12",xl:"fyvr13"},defaultClass:"fyvr10"},1:{conditions:{sm:"fyvr14",md:"fyvr15",lg:"fyvr16",xl:"fyvr17"},defaultClass:"fyvr14"},2:{conditions:{sm:"fyvr18",md:"fyvr19",lg:"fyvr1a",xl:"fyvr1b"},defaultClass:"fyvr18"},3:{conditions:{sm:"fyvr1c",md:"fyvr1d",lg:"fyvr1e",xl:"fyvr1f"},defaultClass:"fyvr1c"},4:{conditions:{sm:"fyvr1g",md:"fyvr1h",lg:"fyvr1i",xl:"fyvr1j"},defaultClass:"fyvr1g"},5:{conditions:{sm:"fyvr1k",md:"fyvr1l",lg:"fyvr1m",xl:"fyvr1n"},defaultClass:"fyvr1k"},6:{conditions:{sm:"fyvr1o",md:"fyvr1p",lg:"fyvr1q",xl:"fyvr1r"},defaultClass:"fyvr1o"},7:{conditions:{sm:"fyvr1s",md:"fyvr1t",lg:"fyvr1u",xl:"fyvr1v"},defaultClass:"fyvr1s"},8:{conditions:{sm:"fyvr1w",md:"fyvr1x",lg:"fyvr1y",xl:"fyvr1z"},defaultClass:"fyvr1w"},9:{conditions:{sm:"fyvr110",md:"fyvr111",lg:"fyvr112",xl:"fyvr113"},defaultClass:"fyvr110"},10:{conditions:{sm:"fyvr114",md:"fyvr115",lg:"fyvr116",xl:"fyvr117"},defaultClass:"fyvr114"},12:{conditions:{sm:"fyvr118",md:"fyvr119",lg:"fyvr11a",xl:"fyvr11b"},defaultClass:"fyvr118"},14:{conditions:{sm:"fyvr11c",md:"fyvr11d",lg:"fyvr11e",xl:"fyvr11f"},defaultClass:"fyvr11c"},16:{conditions:{sm:"fyvr11g",md:"fyvr11h",lg:"fyvr11i",xl:"fyvr11j"},defaultClass:"fyvr11g"},"0.25":{conditions:{sm:"fyvr11k",md:"fyvr11l",lg:"fyvr11m",xl:"fyvr11n"},defaultClass:"fyvr11k"},"0.5":{conditions:{sm:"fyvr11o",md:"fyvr11p",lg:"fyvr11q",xl:"fyvr11r"},defaultClass:"fyvr11o"},"1.5":{conditions:{sm:"fyvr11s",md:"fyvr11t",lg:"fyvr11u",xl:"fyvr11v"},defaultClass:"fyvr11s"},none:{conditions:{sm:"fyvr11w",md:"fyvr11x",lg:"fyvr11y",xl:"fyvr11z"},defaultClass:"fyvr11w"},px:{conditions:{sm:"fyvr120",md:"fyvr121",lg:"fyvr122",xl:"fyvr123"},defaultClass:"fyvr120"},auto:{conditions:{sm:"fyvr124",md:"fyvr125",lg:"fyvr126",xl:"fyvr127"},defaultClass:"fyvr124"},full:{conditions:{sm:"fyvr128",md:"fyvr129",lg:"fyvr12a",xl:"fyvr12b"},defaultClass:"fyvr128"},"1/2":{conditions:{sm:"fyvr12c",md:"fyvr12d",lg:"fyvr12e",xl:"fyvr12f"},defaultClass:"fyvr12c"},"1/3":{conditions:{sm:"fyvr12g",md:"fyvr12h",lg:"fyvr12i",xl:"fyvr12j"},defaultClass:"fyvr12g"},"2/3":{conditions:{sm:"fyvr12k",md:"fyvr12l",lg:"fyvr12m",xl:"fyvr12n"},defaultClass:"fyvr12k"},"1/4":{conditions:{sm:"fyvr12o",md:"fyvr12p",lg:"fyvr12q",xl:"fyvr12r"},defaultClass:"fyvr12o"},"3/4":{conditions:{sm:"fyvr12s",md:"fyvr12t",lg:"fyvr12u",xl:"fyvr12v"},defaultClass:"fyvr12s"},fit:{conditions:{sm:"fyvr12w",md:"fyvr12x",lg:"fyvr12y",xl:"fyvr12z"},defaultClass:"fyvr12w"},max:{conditions:{sm:"fyvr130",md:"fyvr131",lg:"fyvr132",xl:"fyvr133"},defaultClass:"fyvr130"},min:{conditions:{sm:"fyvr134",md:"fyvr135",lg:"fyvr136",xl:"fyvr137"},defaultClass:"fyvr134"},vw:{conditions:{sm:"fyvr138",md:"fyvr139",lg:"fyvr13a",xl:"fyvr13b"},defaultClass:"fyvr138"},vh:{conditions:{sm:"fyvr13c",md:"fyvr13d",lg:"fyvr13e",xl:"fyvr13f"},defaultClass:"fyvr13c"}}},height:{values:{0:{conditions:{sm:"fyvr13g",md:"fyvr13h",lg:"fyvr13i",xl:"fyvr13j"},defaultClass:"fyvr13g"},1:{conditions:{sm:"fyvr13k",md:"fyvr13l",lg:"fyvr13m",xl:"fyvr13n"},defaultClass:"fyvr13k"},2:{conditions:{sm:"fyvr13o",md:"fyvr13p",lg:"fyvr13q",xl:"fyvr13r"},defaultClass:"fyvr13o"},3:{conditions:{sm:"fyvr13s",md:"fyvr13t",lg:"fyvr13u",xl:"fyvr13v"},defaultClass:"fyvr13s"},4:{conditions:{sm:"fyvr13w",md:"fyvr13x",lg:"fyvr13y",xl:"fyvr13z"},defaultClass:"fyvr13w"},5:{conditions:{sm:"fyvr140",md:"fyvr141",lg:"fyvr142",xl:"fyvr143"},defaultClass:"fyvr140"},6:{conditions:{sm:"fyvr144",md:"fyvr145",lg:"fyvr146",xl:"fyvr147"},defaultClass:"fyvr144"},7:{conditions:{sm:"fyvr148",md:"fyvr149",lg:"fyvr14a",xl:"fyvr14b"},defaultClass:"fyvr148"},8:{conditions:{sm:"fyvr14c",md:"fyvr14d",lg:"fyvr14e",xl:"fyvr14f"},defaultClass:"fyvr14c"},9:{conditions:{sm:"fyvr14g",md:"fyvr14h",lg:"fyvr14i",xl:"fyvr14j"},defaultClass:"fyvr14g"},10:{conditions:{sm:"fyvr14k",md:"fyvr14l",lg:"fyvr14m",xl:"fyvr14n"},defaultClass:"fyvr14k"},12:{conditions:{sm:"fyvr14o",md:"fyvr14p",lg:"fyvr14q",xl:"fyvr14r"},defaultClass:"fyvr14o"},14:{conditions:{sm:"fyvr14s",md:"fyvr14t",lg:"fyvr14u",xl:"fyvr14v"},defaultClass:"fyvr14s"},16:{conditions:{sm:"fyvr14w",md:"fyvr14x",lg:"fyvr14y",xl:"fyvr14z"},defaultClass:"fyvr14w"},"0.25":{conditions:{sm:"fyvr150",md:"fyvr151",lg:"fyvr152",xl:"fyvr153"},defaultClass:"fyvr150"},"0.5":{conditions:{sm:"fyvr154",md:"fyvr155",lg:"fyvr156",xl:"fyvr157"},defaultClass:"fyvr154"},"1.5":{conditions:{sm:"fyvr158",md:"fyvr159",lg:"fyvr15a",xl:"fyvr15b"},defaultClass:"fyvr158"},none:{conditions:{sm:"fyvr15c",md:"fyvr15d",lg:"fyvr15e",xl:"fyvr15f"},defaultClass:"fyvr15c"},px:{conditions:{sm:"fyvr15g",md:"fyvr15h",lg:"fyvr15i",xl:"fyvr15j"},defaultClass:"fyvr15g"},auto:{conditions:{sm:"fyvr15k",md:"fyvr15l",lg:"fyvr15m",xl:"fyvr15n"},defaultClass:"fyvr15k"},full:{conditions:{sm:"fyvr15o",md:"fyvr15p",lg:"fyvr15q",xl:"fyvr15r"},defaultClass:"fyvr15o"},"1/2":{conditions:{sm:"fyvr15s",md:"fyvr15t",lg:"fyvr15u",xl:"fyvr15v"},defaultClass:"fyvr15s"},"1/3":{conditions:{sm:"fyvr15w",md:"fyvr15x",lg:"fyvr15y",xl:"fyvr15z"},defaultClass:"fyvr15w"},"2/3":{conditions:{sm:"fyvr160",md:"fyvr161",lg:"fyvr162",xl:"fyvr163"},defaultClass:"fyvr160"},"1/4":{conditions:{sm:"fyvr164",md:"fyvr165",lg:"fyvr166",xl:"fyvr167"},defaultClass:"fyvr164"},"3/4":{conditions:{sm:"fyvr168",md:"fyvr169",lg:"fyvr16a",xl:"fyvr16b"},defaultClass:"fyvr168"},fit:{conditions:{sm:"fyvr16c",md:"fyvr16d",lg:"fyvr16e",xl:"fyvr16f"},defaultClass:"fyvr16c"},max:{conditions:{sm:"fyvr16g",md:"fyvr16h",lg:"fyvr16i",xl:"fyvr16j"},defaultClass:"fyvr16g"},min:{conditions:{sm:"fyvr16k",md:"fyvr16l",lg:"fyvr16m",xl:"fyvr16n"},defaultClass:"fyvr16k"},vw:{conditions:{sm:"fyvr16o",md:"fyvr16p",lg:"fyvr16q",xl:"fyvr16r"},defaultClass:"fyvr16o"},vh:{conditions:{sm:"fyvr16s",md:"fyvr16t",lg:"fyvr16u",xl:"fyvr16v"},defaultClass:"fyvr16s"}}},maxWidth:{values:{0:{conditions:{sm:"fyvr16w",md:"fyvr16x",lg:"fyvr16y",xl:"fyvr16z"},defaultClass:"fyvr16w"},1:{conditions:{sm:"fyvr170",md:"fyvr171",lg:"fyvr172",xl:"fyvr173"},defaultClass:"fyvr170"},2:{conditions:{sm:"fyvr174",md:"fyvr175",lg:"fyvr176",xl:"fyvr177"},defaultClass:"fyvr174"},3:{conditions:{sm:"fyvr178",md:"fyvr179",lg:"fyvr17a",xl:"fyvr17b"},defaultClass:"fyvr178"},4:{conditions:{sm:"fyvr17c",md:"fyvr17d",lg:"fyvr17e",xl:"fyvr17f"},defaultClass:"fyvr17c"},5:{conditions:{sm:"fyvr17g",md:"fyvr17h",lg:"fyvr17i",xl:"fyvr17j"},defaultClass:"fyvr17g"},6:{conditions:{sm:"fyvr17k",md:"fyvr17l",lg:"fyvr17m",xl:"fyvr17n"},defaultClass:"fyvr17k"},7:{conditions:{sm:"fyvr17o",md:"fyvr17p",lg:"fyvr17q",xl:"fyvr17r"},defaultClass:"fyvr17o"},8:{conditions:{sm:"fyvr17s",md:"fyvr17t",lg:"fyvr17u",xl:"fyvr17v"},defaultClass:"fyvr17s"},9:{conditions:{sm:"fyvr17w",md:"fyvr17x",lg:"fyvr17y",xl:"fyvr17z"},defaultClass:"fyvr17w"},10:{conditions:{sm:"fyvr180",md:"fyvr181",lg:"fyvr182",xl:"fyvr183"},defaultClass:"fyvr180"},12:{conditions:{sm:"fyvr184",md:"fyvr185",lg:"fyvr186",xl:"fyvr187"},defaultClass:"fyvr184"},14:{conditions:{sm:"fyvr188",md:"fyvr189",lg:"fyvr18a",xl:"fyvr18b"},defaultClass:"fyvr188"},16:{conditions:{sm:"fyvr18c",md:"fyvr18d",lg:"fyvr18e",xl:"fyvr18f"},defaultClass:"fyvr18c"},"0.25":{conditions:{sm:"fyvr18g",md:"fyvr18h",lg:"fyvr18i",xl:"fyvr18j"},defaultClass:"fyvr18g"},"0.5":{conditions:{sm:"fyvr18k",md:"fyvr18l",lg:"fyvr18m",xl:"fyvr18n"},defaultClass:"fyvr18k"},"1.5":{conditions:{sm:"fyvr18o",md:"fyvr18p",lg:"fyvr18q",xl:"fyvr18r"},defaultClass:"fyvr18o"},none:{conditions:{sm:"fyvr18s",md:"fyvr18t",lg:"fyvr18u",xl:"fyvr18v"},defaultClass:"fyvr18s"},px:{conditions:{sm:"fyvr18w",md:"fyvr18x",lg:"fyvr18y",xl:"fyvr18z"},defaultClass:"fyvr18w"},auto:{conditions:{sm:"fyvr190",md:"fyvr191",lg:"fyvr192",xl:"fyvr193"},defaultClass:"fyvr190"},full:{conditions:{sm:"fyvr194",md:"fyvr195",lg:"fyvr196",xl:"fyvr197"},defaultClass:"fyvr194"},"1/2":{conditions:{sm:"fyvr198",md:"fyvr199",lg:"fyvr19a",xl:"fyvr19b"},defaultClass:"fyvr198"},"1/3":{conditions:{sm:"fyvr19c",md:"fyvr19d",lg:"fyvr19e",xl:"fyvr19f"},defaultClass:"fyvr19c"},"2/3":{conditions:{sm:"fyvr19g",md:"fyvr19h",lg:"fyvr19i",xl:"fyvr19j"},defaultClass:"fyvr19g"},"1/4":{conditions:{sm:"fyvr19k",md:"fyvr19l",lg:"fyvr19m",xl:"fyvr19n"},defaultClass:"fyvr19k"},"3/4":{conditions:{sm:"fyvr19o",md:"fyvr19p",lg:"fyvr19q",xl:"fyvr19r"},defaultClass:"fyvr19o"},fit:{conditions:{sm:"fyvr19s",md:"fyvr19t",lg:"fyvr19u",xl:"fyvr19v"},defaultClass:"fyvr19s"},max:{conditions:{sm:"fyvr19w",md:"fyvr19x",lg:"fyvr19y",xl:"fyvr19z"},defaultClass:"fyvr19w"},min:{conditions:{sm:"fyvr1a0",md:"fyvr1a1",lg:"fyvr1a2",xl:"fyvr1a3"},defaultClass:"fyvr1a0"},vw:{conditions:{sm:"fyvr1a4",md:"fyvr1a5",lg:"fyvr1a6",xl:"fyvr1a7"},defaultClass:"fyvr1a4"},vh:{conditions:{sm:"fyvr1a8",md:"fyvr1a9",lg:"fyvr1aa",xl:"fyvr1ab"},defaultClass:"fyvr1a8"}}},maxHeight:{values:{0:{conditions:{sm:"fyvr1ac",md:"fyvr1ad",lg:"fyvr1ae",xl:"fyvr1af"},defaultClass:"fyvr1ac"},1:{conditions:{sm:"fyvr1ag",md:"fyvr1ah",lg:"fyvr1ai",xl:"fyvr1aj"},defaultClass:"fyvr1ag"},2:{conditions:{sm:"fyvr1ak",md:"fyvr1al",lg:"fyvr1am",xl:"fyvr1an"},defaultClass:"fyvr1ak"},3:{conditions:{sm:"fyvr1ao",md:"fyvr1ap",lg:"fyvr1aq",xl:"fyvr1ar"},defaultClass:"fyvr1ao"},4:{conditions:{sm:"fyvr1as",md:"fyvr1at",lg:"fyvr1au",xl:"fyvr1av"},defaultClass:"fyvr1as"},5:{conditions:{sm:"fyvr1aw",md:"fyvr1ax",lg:"fyvr1ay",xl:"fyvr1az"},defaultClass:"fyvr1aw"},6:{conditions:{sm:"fyvr1b0",md:"fyvr1b1",lg:"fyvr1b2",xl:"fyvr1b3"},defaultClass:"fyvr1b0"},7:{conditions:{sm:"fyvr1b4",md:"fyvr1b5",lg:"fyvr1b6",xl:"fyvr1b7"},defaultClass:"fyvr1b4"},8:{conditions:{sm:"fyvr1b8",md:"fyvr1b9",lg:"fyvr1ba",xl:"fyvr1bb"},defaultClass:"fyvr1b8"},9:{conditions:{sm:"fyvr1bc",md:"fyvr1bd",lg:"fyvr1be",xl:"fyvr1bf"},defaultClass:"fyvr1bc"},10:{conditions:{sm:"fyvr1bg",md:"fyvr1bh",lg:"fyvr1bi",xl:"fyvr1bj"},defaultClass:"fyvr1bg"},12:{conditions:{sm:"fyvr1bk",md:"fyvr1bl",lg:"fyvr1bm",xl:"fyvr1bn"},defaultClass:"fyvr1bk"},14:{conditions:{sm:"fyvr1bo",md:"fyvr1bp",lg:"fyvr1bq",xl:"fyvr1br"},defaultClass:"fyvr1bo"},16:{conditions:{sm:"fyvr1bs",md:"fyvr1bt",lg:"fyvr1bu",xl:"fyvr1bv"},defaultClass:"fyvr1bs"},"0.25":{conditions:{sm:"fyvr1bw",md:"fyvr1bx",lg:"fyvr1by",xl:"fyvr1bz"},defaultClass:"fyvr1bw"},"0.5":{conditions:{sm:"fyvr1c0",md:"fyvr1c1",lg:"fyvr1c2",xl:"fyvr1c3"},defaultClass:"fyvr1c0"},"1.5":{conditions:{sm:"fyvr1c4",md:"fyvr1c5",lg:"fyvr1c6",xl:"fyvr1c7"},defaultClass:"fyvr1c4"},none:{conditions:{sm:"fyvr1c8",md:"fyvr1c9",lg:"fyvr1ca",xl:"fyvr1cb"},defaultClass:"fyvr1c8"},px:{conditions:{sm:"fyvr1cc",md:"fyvr1cd",lg:"fyvr1ce",xl:"fyvr1cf"},defaultClass:"fyvr1cc"},auto:{conditions:{sm:"fyvr1cg",md:"fyvr1ch",lg:"fyvr1ci",xl:"fyvr1cj"},defaultClass:"fyvr1cg"},full:{conditions:{sm:"fyvr1ck",md:"fyvr1cl",lg:"fyvr1cm",xl:"fyvr1cn"},defaultClass:"fyvr1ck"},"1/2":{conditions:{sm:"fyvr1co",md:"fyvr1cp",lg:"fyvr1cq",xl:"fyvr1cr"},defaultClass:"fyvr1co"},"1/3":{conditions:{sm:"fyvr1cs",md:"fyvr1ct",lg:"fyvr1cu",xl:"fyvr1cv"},defaultClass:"fyvr1cs"},"2/3":{conditions:{sm:"fyvr1cw",md:"fyvr1cx",lg:"fyvr1cy",xl:"fyvr1cz"},defaultClass:"fyvr1cw"},"1/4":{conditions:{sm:"fyvr1d0",md:"fyvr1d1",lg:"fyvr1d2",xl:"fyvr1d3"},defaultClass:"fyvr1d0"},"3/4":{conditions:{sm:"fyvr1d4",md:"fyvr1d5",lg:"fyvr1d6",xl:"fyvr1d7"},defaultClass:"fyvr1d4"},fit:{conditions:{sm:"fyvr1d8",md:"fyvr1d9",lg:"fyvr1da",xl:"fyvr1db"},defaultClass:"fyvr1d8"},max:{conditions:{sm:"fyvr1dc",md:"fyvr1dd",lg:"fyvr1de",xl:"fyvr1df"},defaultClass:"fyvr1dc"},min:{conditions:{sm:"fyvr1dg",md:"fyvr1dh",lg:"fyvr1di",xl:"fyvr1dj"},defaultClass:"fyvr1dg"},vw:{conditions:{sm:"fyvr1dk",md:"fyvr1dl",lg:"fyvr1dm",xl:"fyvr1dn"},defaultClass:"fyvr1dk"},vh:{conditions:{sm:"fyvr1do",md:"fyvr1dp",lg:"fyvr1dq",xl:"fyvr1dr"},defaultClass:"fyvr1do"}}},minWidth:{values:{0:{conditions:{sm:"fyvr1ds",md:"fyvr1dt",lg:"fyvr1du",xl:"fyvr1dv"},defaultClass:"fyvr1ds"},1:{conditions:{sm:"fyvr1dw",md:"fyvr1dx",lg:"fyvr1dy",xl:"fyvr1dz"},defaultClass:"fyvr1dw"},2:{conditions:{sm:"fyvr1e0",md:"fyvr1e1",lg:"fyvr1e2",xl:"fyvr1e3"},defaultClass:"fyvr1e0"},3:{conditions:{sm:"fyvr1e4",md:"fyvr1e5",lg:"fyvr1e6",xl:"fyvr1e7"},defaultClass:"fyvr1e4"},4:{conditions:{sm:"fyvr1e8",md:"fyvr1e9",lg:"fyvr1ea",xl:"fyvr1eb"},defaultClass:"fyvr1e8"},5:{conditions:{sm:"fyvr1ec",md:"fyvr1ed",lg:"fyvr1ee",xl:"fyvr1ef"},defaultClass:"fyvr1ec"},6:{conditions:{sm:"fyvr1eg",md:"fyvr1eh",lg:"fyvr1ei",xl:"fyvr1ej"},defaultClass:"fyvr1eg"},7:{conditions:{sm:"fyvr1ek",md:"fyvr1el",lg:"fyvr1em",xl:"fyvr1en"},defaultClass:"fyvr1ek"},8:{conditions:{sm:"fyvr1eo",md:"fyvr1ep",lg:"fyvr1eq",xl:"fyvr1er"},defaultClass:"fyvr1eo"},9:{conditions:{sm:"fyvr1es",md:"fyvr1et",lg:"fyvr1eu",xl:"fyvr1ev"},defaultClass:"fyvr1es"},10:{conditions:{sm:"fyvr1ew",md:"fyvr1ex",lg:"fyvr1ey",xl:"fyvr1ez"},defaultClass:"fyvr1ew"},12:{conditions:{sm:"fyvr1f0",md:"fyvr1f1",lg:"fyvr1f2",xl:"fyvr1f3"},defaultClass:"fyvr1f0"},14:{conditions:{sm:"fyvr1f4",md:"fyvr1f5",lg:"fyvr1f6",xl:"fyvr1f7"},defaultClass:"fyvr1f4"},16:{conditions:{sm:"fyvr1f8",md:"fyvr1f9",lg:"fyvr1fa",xl:"fyvr1fb"},defaultClass:"fyvr1f8"},"0.25":{conditions:{sm:"fyvr1fc",md:"fyvr1fd",lg:"fyvr1fe",xl:"fyvr1ff"},defaultClass:"fyvr1fc"},"0.5":{conditions:{sm:"fyvr1fg",md:"fyvr1fh",lg:"fyvr1fi",xl:"fyvr1fj"},defaultClass:"fyvr1fg"},"1.5":{conditions:{sm:"fyvr1fk",md:"fyvr1fl",lg:"fyvr1fm",xl:"fyvr1fn"},defaultClass:"fyvr1fk"},none:{conditions:{sm:"fyvr1fo",md:"fyvr1fp",lg:"fyvr1fq",xl:"fyvr1fr"},defaultClass:"fyvr1fo"},px:{conditions:{sm:"fyvr1fs",md:"fyvr1ft",lg:"fyvr1fu",xl:"fyvr1fv"},defaultClass:"fyvr1fs"},auto:{conditions:{sm:"fyvr1fw",md:"fyvr1fx",lg:"fyvr1fy",xl:"fyvr1fz"},defaultClass:"fyvr1fw"},full:{conditions:{sm:"fyvr1g0",md:"fyvr1g1",lg:"fyvr1g2",xl:"fyvr1g3"},defaultClass:"fyvr1g0"},"1/2":{conditions:{sm:"fyvr1g4",md:"fyvr1g5",lg:"fyvr1g6",xl:"fyvr1g7"},defaultClass:"fyvr1g4"},"1/3":{conditions:{sm:"fyvr1g8",md:"fyvr1g9",lg:"fyvr1ga",xl:"fyvr1gb"},defaultClass:"fyvr1g8"},"2/3":{conditions:{sm:"fyvr1gc",md:"fyvr1gd",lg:"fyvr1ge",xl:"fyvr1gf"},defaultClass:"fyvr1gc"},"1/4":{conditions:{sm:"fyvr1gg",md:"fyvr1gh",lg:"fyvr1gi",xl:"fyvr1gj"},defaultClass:"fyvr1gg"},"3/4":{conditions:{sm:"fyvr1gk",md:"fyvr1gl",lg:"fyvr1gm",xl:"fyvr1gn"},defaultClass:"fyvr1gk"},fit:{conditions:{sm:"fyvr1go",md:"fyvr1gp",lg:"fyvr1gq",xl:"fyvr1gr"},defaultClass:"fyvr1go"},max:{conditions:{sm:"fyvr1gs",md:"fyvr1gt",lg:"fyvr1gu",xl:"fyvr1gv"},defaultClass:"fyvr1gs"},min:{conditions:{sm:"fyvr1gw",md:"fyvr1gx",lg:"fyvr1gy",xl:"fyvr1gz"},defaultClass:"fyvr1gw"},vw:{conditions:{sm:"fyvr1h0",md:"fyvr1h1",lg:"fyvr1h2",xl:"fyvr1h3"},defaultClass:"fyvr1h0"},vh:{conditions:{sm:"fyvr1h4",md:"fyvr1h5",lg:"fyvr1h6",xl:"fyvr1h7"},defaultClass:"fyvr1h4"}}},minHeight:{values:{0:{conditions:{sm:"fyvr1h8",md:"fyvr1h9",lg:"fyvr1ha",xl:"fyvr1hb"},defaultClass:"fyvr1h8"},1:{conditions:{sm:"fyvr1hc",md:"fyvr1hd",lg:"fyvr1he",xl:"fyvr1hf"},defaultClass:"fyvr1hc"},2:{conditions:{sm:"fyvr1hg",md:"fyvr1hh",lg:"fyvr1hi",xl:"fyvr1hj"},defaultClass:"fyvr1hg"},3:{conditions:{sm:"fyvr1hk",md:"fyvr1hl",lg:"fyvr1hm",xl:"fyvr1hn"},defaultClass:"fyvr1hk"},4:{conditions:{sm:"fyvr1ho",md:"fyvr1hp",lg:"fyvr1hq",xl:"fyvr1hr"},defaultClass:"fyvr1ho"},5:{conditions:{sm:"fyvr1hs",md:"fyvr1ht",lg:"fyvr1hu",xl:"fyvr1hv"},defaultClass:"fyvr1hs"},6:{conditions:{sm:"fyvr1hw",md:"fyvr1hx",lg:"fyvr1hy",xl:"fyvr1hz"},defaultClass:"fyvr1hw"},7:{conditions:{sm:"fyvr1i0",md:"fyvr1i1",lg:"fyvr1i2",xl:"fyvr1i3"},defaultClass:"fyvr1i0"},8:{conditions:{sm:"fyvr1i4",md:"fyvr1i5",lg:"fyvr1i6",xl:"fyvr1i7"},defaultClass:"fyvr1i4"},9:{conditions:{sm:"fyvr1i8",md:"fyvr1i9",lg:"fyvr1ia",xl:"fyvr1ib"},defaultClass:"fyvr1i8"},10:{conditions:{sm:"fyvr1ic",md:"fyvr1id",lg:"fyvr1ie",xl:"fyvr1if"},defaultClass:"fyvr1ic"},12:{conditions:{sm:"fyvr1ig",md:"fyvr1ih",lg:"fyvr1ii",xl:"fyvr1ij"},defaultClass:"fyvr1ig"},14:{conditions:{sm:"fyvr1ik",md:"fyvr1il",lg:"fyvr1im",xl:"fyvr1in"},defaultClass:"fyvr1ik"},16:{conditions:{sm:"fyvr1io",md:"fyvr1ip",lg:"fyvr1iq",xl:"fyvr1ir"},defaultClass:"fyvr1io"},"0.25":{conditions:{sm:"fyvr1is",md:"fyvr1it",lg:"fyvr1iu",xl:"fyvr1iv"},defaultClass:"fyvr1is"},"0.5":{conditions:{sm:"fyvr1iw",md:"fyvr1ix",lg:"fyvr1iy",xl:"fyvr1iz"},defaultClass:"fyvr1iw"},"1.5":{conditions:{sm:"fyvr1j0",md:"fyvr1j1",lg:"fyvr1j2",xl:"fyvr1j3"},defaultClass:"fyvr1j0"},none:{conditions:{sm:"fyvr1j4",md:"fyvr1j5",lg:"fyvr1j6",xl:"fyvr1j7"},defaultClass:"fyvr1j4"},px:{conditions:{sm:"fyvr1j8",md:"fyvr1j9",lg:"fyvr1ja",xl:"fyvr1jb"},defaultClass:"fyvr1j8"},auto:{conditions:{sm:"fyvr1jc",md:"fyvr1jd",lg:"fyvr1je",xl:"fyvr1jf"},defaultClass:"fyvr1jc"},full:{conditions:{sm:"fyvr1jg",md:"fyvr1jh",lg:"fyvr1ji",xl:"fyvr1jj"},defaultClass:"fyvr1jg"},"1/2":{conditions:{sm:"fyvr1jk",md:"fyvr1jl",lg:"fyvr1jm",xl:"fyvr1jn"},defaultClass:"fyvr1jk"},"1/3":{conditions:{sm:"fyvr1jo",md:"fyvr1jp",lg:"fyvr1jq",xl:"fyvr1jr"},defaultClass:"fyvr1jo"},"2/3":{conditions:{sm:"fyvr1js",md:"fyvr1jt",lg:"fyvr1ju",xl:"fyvr1jv"},defaultClass:"fyvr1js"},"1/4":{conditions:{sm:"fyvr1jw",md:"fyvr1jx",lg:"fyvr1jy",xl:"fyvr1jz"},defaultClass:"fyvr1jw"},"3/4":{conditions:{sm:"fyvr1k0",md:"fyvr1k1",lg:"fyvr1k2",xl:"fyvr1k3"},defaultClass:"fyvr1k0"},fit:{conditions:{sm:"fyvr1k4",md:"fyvr1k5",lg:"fyvr1k6",xl:"fyvr1k7"},defaultClass:"fyvr1k4"},max:{conditions:{sm:"fyvr1k8",md:"fyvr1k9",lg:"fyvr1ka",xl:"fyvr1kb"},defaultClass:"fyvr1k8"},min:{conditions:{sm:"fyvr1kc",md:"fyvr1kd",lg:"fyvr1ke",xl:"fyvr1kf"},defaultClass:"fyvr1kc"},vw:{conditions:{sm:"fyvr1kg",md:"fyvr1kh",lg:"fyvr1ki",xl:"fyvr1kj"},defaultClass:"fyvr1kg"},vh:{conditions:{sm:"fyvr1kk",md:"fyvr1kl",lg:"fyvr1km",xl:"fyvr1kn"},defaultClass:"fyvr1kk"}}},top:{values:{0:{conditions:{sm:"fyvr1ko",md:"fyvr1kp",lg:"fyvr1kq",xl:"fyvr1kr"},defaultClass:"fyvr1ko"},1:{conditions:{sm:"fyvr1ks",md:"fyvr1kt",lg:"fyvr1ku",xl:"fyvr1kv"},defaultClass:"fyvr1ks"},2:{conditions:{sm:"fyvr1kw",md:"fyvr1kx",lg:"fyvr1ky",xl:"fyvr1kz"},defaultClass:"fyvr1kw"},3:{conditions:{sm:"fyvr1l0",md:"fyvr1l1",lg:"fyvr1l2",xl:"fyvr1l3"},defaultClass:"fyvr1l0"},4:{conditions:{sm:"fyvr1l4",md:"fyvr1l5",lg:"fyvr1l6",xl:"fyvr1l7"},defaultClass:"fyvr1l4"},5:{conditions:{sm:"fyvr1l8",md:"fyvr1l9",lg:"fyvr1la",xl:"fyvr1lb"},defaultClass:"fyvr1l8"},6:{conditions:{sm:"fyvr1lc",md:"fyvr1ld",lg:"fyvr1le",xl:"fyvr1lf"},defaultClass:"fyvr1lc"},7:{conditions:{sm:"fyvr1lg",md:"fyvr1lh",lg:"fyvr1li",xl:"fyvr1lj"},defaultClass:"fyvr1lg"},8:{conditions:{sm:"fyvr1lk",md:"fyvr1ll",lg:"fyvr1lm",xl:"fyvr1ln"},defaultClass:"fyvr1lk"},9:{conditions:{sm:"fyvr1lo",md:"fyvr1lp",lg:"fyvr1lq",xl:"fyvr1lr"},defaultClass:"fyvr1lo"},10:{conditions:{sm:"fyvr1ls",md:"fyvr1lt",lg:"fyvr1lu",xl:"fyvr1lv"},defaultClass:"fyvr1ls"},12:{conditions:{sm:"fyvr1lw",md:"fyvr1lx",lg:"fyvr1ly",xl:"fyvr1lz"},defaultClass:"fyvr1lw"},14:{conditions:{sm:"fyvr1m0",md:"fyvr1m1",lg:"fyvr1m2",xl:"fyvr1m3"},defaultClass:"fyvr1m0"},16:{conditions:{sm:"fyvr1m4",md:"fyvr1m5",lg:"fyvr1m6",xl:"fyvr1m7"},defaultClass:"fyvr1m4"},"0.25":{conditions:{sm:"fyvr1m8",md:"fyvr1m9",lg:"fyvr1ma",xl:"fyvr1mb"},defaultClass:"fyvr1m8"},"0.5":{conditions:{sm:"fyvr1mc",md:"fyvr1md",lg:"fyvr1me",xl:"fyvr1mf"},defaultClass:"fyvr1mc"},"1.5":{conditions:{sm:"fyvr1mg",md:"fyvr1mh",lg:"fyvr1mi",xl:"fyvr1mj"},defaultClass:"fyvr1mg"},auto:{conditions:{sm:"fyvr1mk",md:"fyvr1ml",lg:"fyvr1mm",xl:"fyvr1mn"},defaultClass:"fyvr1mk"}}},bottom:{values:{0:{conditions:{sm:"fyvr1mo",md:"fyvr1mp",lg:"fyvr1mq",xl:"fyvr1mr"},defaultClass:"fyvr1mo"},1:{conditions:{sm:"fyvr1ms",md:"fyvr1mt",lg:"fyvr1mu",xl:"fyvr1mv"},defaultClass:"fyvr1ms"},2:{conditions:{sm:"fyvr1mw",md:"fyvr1mx",lg:"fyvr1my",xl:"fyvr1mz"},defaultClass:"fyvr1mw"},3:{conditions:{sm:"fyvr1n0",md:"fyvr1n1",lg:"fyvr1n2",xl:"fyvr1n3"},defaultClass:"fyvr1n0"},4:{conditions:{sm:"fyvr1n4",md:"fyvr1n5",lg:"fyvr1n6",xl:"fyvr1n7"},defaultClass:"fyvr1n4"},5:{conditions:{sm:"fyvr1n8",md:"fyvr1n9",lg:"fyvr1na",xl:"fyvr1nb"},defaultClass:"fyvr1n8"},6:{conditions:{sm:"fyvr1nc",md:"fyvr1nd",lg:"fyvr1ne",xl:"fyvr1nf"},defaultClass:"fyvr1nc"},7:{conditions:{sm:"fyvr1ng",md:"fyvr1nh",lg:"fyvr1ni",xl:"fyvr1nj"},defaultClass:"fyvr1ng"},8:{conditions:{sm:"fyvr1nk",md:"fyvr1nl",lg:"fyvr1nm",xl:"fyvr1nn"},defaultClass:"fyvr1nk"},9:{conditions:{sm:"fyvr1no",md:"fyvr1np",lg:"fyvr1nq",xl:"fyvr1nr"},defaultClass:"fyvr1no"},10:{conditions:{sm:"fyvr1ns",md:"fyvr1nt",lg:"fyvr1nu",xl:"fyvr1nv"},defaultClass:"fyvr1ns"},12:{conditions:{sm:"fyvr1nw",md:"fyvr1nx",lg:"fyvr1ny",xl:"fyvr1nz"},defaultClass:"fyvr1nw"},14:{conditions:{sm:"fyvr1o0",md:"fyvr1o1",lg:"fyvr1o2",xl:"fyvr1o3"},defaultClass:"fyvr1o0"},16:{conditions:{sm:"fyvr1o4",md:"fyvr1o5",lg:"fyvr1o6",xl:"fyvr1o7"},defaultClass:"fyvr1o4"},"0.25":{conditions:{sm:"fyvr1o8",md:"fyvr1o9",lg:"fyvr1oa",xl:"fyvr1ob"},defaultClass:"fyvr1o8"},"0.5":{conditions:{sm:"fyvr1oc",md:"fyvr1od",lg:"fyvr1oe",xl:"fyvr1of"},defaultClass:"fyvr1oc"},"1.5":{conditions:{sm:"fyvr1og",md:"fyvr1oh",lg:"fyvr1oi",xl:"fyvr1oj"},defaultClass:"fyvr1og"},auto:{conditions:{sm:"fyvr1ok",md:"fyvr1ol",lg:"fyvr1om",xl:"fyvr1on"},defaultClass:"fyvr1ok"}}},left:{values:{0:{conditions:{sm:"fyvr1oo",md:"fyvr1op",lg:"fyvr1oq",xl:"fyvr1or"},defaultClass:"fyvr1oo"},1:{conditions:{sm:"fyvr1os",md:"fyvr1ot",lg:"fyvr1ou",xl:"fyvr1ov"},defaultClass:"fyvr1os"},2:{conditions:{sm:"fyvr1ow",md:"fyvr1ox",lg:"fyvr1oy",xl:"fyvr1oz"},defaultClass:"fyvr1ow"},3:{conditions:{sm:"fyvr1p0",md:"fyvr1p1",lg:"fyvr1p2",xl:"fyvr1p3"},defaultClass:"fyvr1p0"},4:{conditions:{sm:"fyvr1p4",md:"fyvr1p5",lg:"fyvr1p6",xl:"fyvr1p7"},defaultClass:"fyvr1p4"},5:{conditions:{sm:"fyvr1p8",md:"fyvr1p9",lg:"fyvr1pa",xl:"fyvr1pb"},defaultClass:"fyvr1p8"},6:{conditions:{sm:"fyvr1pc",md:"fyvr1pd",lg:"fyvr1pe",xl:"fyvr1pf"},defaultClass:"fyvr1pc"},7:{conditions:{sm:"fyvr1pg",md:"fyvr1ph",lg:"fyvr1pi",xl:"fyvr1pj"},defaultClass:"fyvr1pg"},8:{conditions:{sm:"fyvr1pk",md:"fyvr1pl",lg:"fyvr1pm",xl:"fyvr1pn"},defaultClass:"fyvr1pk"},9:{conditions:{sm:"fyvr1po",md:"fyvr1pp",lg:"fyvr1pq",xl:"fyvr1pr"},defaultClass:"fyvr1po"},10:{conditions:{sm:"fyvr1ps",md:"fyvr1pt",lg:"fyvr1pu",xl:"fyvr1pv"},defaultClass:"fyvr1ps"},12:{conditions:{sm:"fyvr1pw",md:"fyvr1px",lg:"fyvr1py",xl:"fyvr1pz"},defaultClass:"fyvr1pw"},14:{conditions:{sm:"fyvr1q0",md:"fyvr1q1",lg:"fyvr1q2",xl:"fyvr1q3"},defaultClass:"fyvr1q0"},16:{conditions:{sm:"fyvr1q4",md:"fyvr1q5",lg:"fyvr1q6",xl:"fyvr1q7"},defaultClass:"fyvr1q4"},"0.25":{conditions:{sm:"fyvr1q8",md:"fyvr1q9",lg:"fyvr1qa",xl:"fyvr1qb"},defaultClass:"fyvr1q8"},"0.5":{conditions:{sm:"fyvr1qc",md:"fyvr1qd",lg:"fyvr1qe",xl:"fyvr1qf"},defaultClass:"fyvr1qc"},"1.5":{conditions:{sm:"fyvr1qg",md:"fyvr1qh",lg:"fyvr1qi",xl:"fyvr1qj"},defaultClass:"fyvr1qg"},auto:{conditions:{sm:"fyvr1qk",md:"fyvr1ql",lg:"fyvr1qm",xl:"fyvr1qn"},defaultClass:"fyvr1qk"}}},right:{values:{0:{conditions:{sm:"fyvr1qo",md:"fyvr1qp",lg:"fyvr1qq",xl:"fyvr1qr"},defaultClass:"fyvr1qo"},1:{conditions:{sm:"fyvr1qs",md:"fyvr1qt",lg:"fyvr1qu",xl:"fyvr1qv"},defaultClass:"fyvr1qs"},2:{conditions:{sm:"fyvr1qw",md:"fyvr1qx",lg:"fyvr1qy",xl:"fyvr1qz"},defaultClass:"fyvr1qw"},3:{conditions:{sm:"fyvr1r0",md:"fyvr1r1",lg:"fyvr1r2",xl:"fyvr1r3"},defaultClass:"fyvr1r0"},4:{conditions:{sm:"fyvr1r4",md:"fyvr1r5",lg:"fyvr1r6",xl:"fyvr1r7"},defaultClass:"fyvr1r4"},5:{conditions:{sm:"fyvr1r8",md:"fyvr1r9",lg:"fyvr1ra",xl:"fyvr1rb"},defaultClass:"fyvr1r8"},6:{conditions:{sm:"fyvr1rc",md:"fyvr1rd",lg:"fyvr1re",xl:"fyvr1rf"},defaultClass:"fyvr1rc"},7:{conditions:{sm:"fyvr1rg",md:"fyvr1rh",lg:"fyvr1ri",xl:"fyvr1rj"},defaultClass:"fyvr1rg"},8:{conditions:{sm:"fyvr1rk",md:"fyvr1rl",lg:"fyvr1rm",xl:"fyvr1rn"},defaultClass:"fyvr1rk"},9:{conditions:{sm:"fyvr1ro",md:"fyvr1rp",lg:"fyvr1rq",xl:"fyvr1rr"},defaultClass:"fyvr1ro"},10:{conditions:{sm:"fyvr1rs",md:"fyvr1rt",lg:"fyvr1ru",xl:"fyvr1rv"},defaultClass:"fyvr1rs"},12:{conditions:{sm:"fyvr1rw",md:"fyvr1rx",lg:"fyvr1ry",xl:"fyvr1rz"},defaultClass:"fyvr1rw"},14:{conditions:{sm:"fyvr1s0",md:"fyvr1s1",lg:"fyvr1s2",xl:"fyvr1s3"},defaultClass:"fyvr1s0"},16:{conditions:{sm:"fyvr1s4",md:"fyvr1s5",lg:"fyvr1s6",xl:"fyvr1s7"},defaultClass:"fyvr1s4"},"0.25":{conditions:{sm:"fyvr1s8",md:"fyvr1s9",lg:"fyvr1sa",xl:"fyvr1sb"},defaultClass:"fyvr1s8"},"0.5":{conditions:{sm:"fyvr1sc",md:"fyvr1sd",lg:"fyvr1se",xl:"fyvr1sf"},defaultClass:"fyvr1sc"},"1.5":{conditions:{sm:"fyvr1sg",md:"fyvr1sh",lg:"fyvr1si",xl:"fyvr1sj"},defaultClass:"fyvr1sg"},auto:{conditions:{sm:"fyvr1sk",md:"fyvr1sl",lg:"fyvr1sm",xl:"fyvr1sn"},defaultClass:"fyvr1sk"}}},paddingTop:{values:{0:{conditions:{sm:"fyvr1so",md:"fyvr1sp",lg:"fyvr1sq",xl:"fyvr1sr"},defaultClass:"fyvr1so"},1:{conditions:{sm:"fyvr1ss",md:"fyvr1st",lg:"fyvr1su",xl:"fyvr1sv"},defaultClass:"fyvr1ss"},2:{conditions:{sm:"fyvr1sw",md:"fyvr1sx",lg:"fyvr1sy",xl:"fyvr1sz"},defaultClass:"fyvr1sw"},3:{conditions:{sm:"fyvr1t0",md:"fyvr1t1",lg:"fyvr1t2",xl:"fyvr1t3"},defaultClass:"fyvr1t0"},4:{conditions:{sm:"fyvr1t4",md:"fyvr1t5",lg:"fyvr1t6",xl:"fyvr1t7"},defaultClass:"fyvr1t4"},5:{conditions:{sm:"fyvr1t8",md:"fyvr1t9",lg:"fyvr1ta",xl:"fyvr1tb"},defaultClass:"fyvr1t8"},6:{conditions:{sm:"fyvr1tc",md:"fyvr1td",lg:"fyvr1te",xl:"fyvr1tf"},defaultClass:"fyvr1tc"},7:{conditions:{sm:"fyvr1tg",md:"fyvr1th",lg:"fyvr1ti",xl:"fyvr1tj"},defaultClass:"fyvr1tg"},8:{conditions:{sm:"fyvr1tk",md:"fyvr1tl",lg:"fyvr1tm",xl:"fyvr1tn"},defaultClass:"fyvr1tk"},9:{conditions:{sm:"fyvr1to",md:"fyvr1tp",lg:"fyvr1tq",xl:"fyvr1tr"},defaultClass:"fyvr1to"},10:{conditions:{sm:"fyvr1ts",md:"fyvr1tt",lg:"fyvr1tu",xl:"fyvr1tv"},defaultClass:"fyvr1ts"},12:{conditions:{sm:"fyvr1tw",md:"fyvr1tx",lg:"fyvr1ty",xl:"fyvr1tz"},defaultClass:"fyvr1tw"},14:{conditions:{sm:"fyvr1u0",md:"fyvr1u1",lg:"fyvr1u2",xl:"fyvr1u3"},defaultClass:"fyvr1u0"},16:{conditions:{sm:"fyvr1u4",md:"fyvr1u5",lg:"fyvr1u6",xl:"fyvr1u7"},defaultClass:"fyvr1u4"},"0.25":{conditions:{sm:"fyvr1u8",md:"fyvr1u9",lg:"fyvr1ua",xl:"fyvr1ub"},defaultClass:"fyvr1u8"},"0.5":{conditions:{sm:"fyvr1uc",md:"fyvr1ud",lg:"fyvr1ue",xl:"fyvr1uf"},defaultClass:"fyvr1uc"},"1.5":{conditions:{sm:"fyvr1ug",md:"fyvr1uh",lg:"fyvr1ui",xl:"fyvr1uj"},defaultClass:"fyvr1ug"}}},paddingBottom:{values:{0:{conditions:{sm:"fyvr1uk",md:"fyvr1ul",lg:"fyvr1um",xl:"fyvr1un"},defaultClass:"fyvr1uk"},1:{conditions:{sm:"fyvr1uo",md:"fyvr1up",lg:"fyvr1uq",xl:"fyvr1ur"},defaultClass:"fyvr1uo"},2:{conditions:{sm:"fyvr1us",md:"fyvr1ut",lg:"fyvr1uu",xl:"fyvr1uv"},defaultClass:"fyvr1us"},3:{conditions:{sm:"fyvr1uw",md:"fyvr1ux",lg:"fyvr1uy",xl:"fyvr1uz"},defaultClass:"fyvr1uw"},4:{conditions:{sm:"fyvr1v0",md:"fyvr1v1",lg:"fyvr1v2",xl:"fyvr1v3"},defaultClass:"fyvr1v0"},5:{conditions:{sm:"fyvr1v4",md:"fyvr1v5",lg:"fyvr1v6",xl:"fyvr1v7"},defaultClass:"fyvr1v4"},6:{conditions:{sm:"fyvr1v8",md:"fyvr1v9",lg:"fyvr1va",xl:"fyvr1vb"},defaultClass:"fyvr1v8"},7:{conditions:{sm:"fyvr1vc",md:"fyvr1vd",lg:"fyvr1ve",xl:"fyvr1vf"},defaultClass:"fyvr1vc"},8:{conditions:{sm:"fyvr1vg",md:"fyvr1vh",lg:"fyvr1vi",xl:"fyvr1vj"},defaultClass:"fyvr1vg"},9:{conditions:{sm:"fyvr1vk",md:"fyvr1vl",lg:"fyvr1vm",xl:"fyvr1vn"},defaultClass:"fyvr1vk"},10:{conditions:{sm:"fyvr1vo",md:"fyvr1vp",lg:"fyvr1vq",xl:"fyvr1vr"},defaultClass:"fyvr1vo"},12:{conditions:{sm:"fyvr1vs",md:"fyvr1vt",lg:"fyvr1vu",xl:"fyvr1vv"},defaultClass:"fyvr1vs"},14:{conditions:{sm:"fyvr1vw",md:"fyvr1vx",lg:"fyvr1vy",xl:"fyvr1vz"},defaultClass:"fyvr1vw"},16:{conditions:{sm:"fyvr1w0",md:"fyvr1w1",lg:"fyvr1w2",xl:"fyvr1w3"},defaultClass:"fyvr1w0"},"0.25":{conditions:{sm:"fyvr1w4",md:"fyvr1w5",lg:"fyvr1w6",xl:"fyvr1w7"},defaultClass:"fyvr1w4"},"0.5":{conditions:{sm:"fyvr1w8",md:"fyvr1w9",lg:"fyvr1wa",xl:"fyvr1wb"},defaultClass:"fyvr1w8"},"1.5":{conditions:{sm:"fyvr1wc",md:"fyvr1wd",lg:"fyvr1we",xl:"fyvr1wf"},defaultClass:"fyvr1wc"}}},paddingLeft:{values:{0:{conditions:{sm:"fyvr1wg",md:"fyvr1wh",lg:"fyvr1wi",xl:"fyvr1wj"},defaultClass:"fyvr1wg"},1:{conditions:{sm:"fyvr1wk",md:"fyvr1wl",lg:"fyvr1wm",xl:"fyvr1wn"},defaultClass:"fyvr1wk"},2:{conditions:{sm:"fyvr1wo",md:"fyvr1wp",lg:"fyvr1wq",xl:"fyvr1wr"},defaultClass:"fyvr1wo"},3:{conditions:{sm:"fyvr1ws",md:"fyvr1wt",lg:"fyvr1wu",xl:"fyvr1wv"},defaultClass:"fyvr1ws"},4:{conditions:{sm:"fyvr1ww",md:"fyvr1wx",lg:"fyvr1wy",xl:"fyvr1wz"},defaultClass:"fyvr1ww"},5:{conditions:{sm:"fyvr1x0",md:"fyvr1x1",lg:"fyvr1x2",xl:"fyvr1x3"},defaultClass:"fyvr1x0"},6:{conditions:{sm:"fyvr1x4",md:"fyvr1x5",lg:"fyvr1x6",xl:"fyvr1x7"},defaultClass:"fyvr1x4"},7:{conditions:{sm:"fyvr1x8",md:"fyvr1x9",lg:"fyvr1xa",xl:"fyvr1xb"},defaultClass:"fyvr1x8"},8:{conditions:{sm:"fyvr1xc",md:"fyvr1xd",lg:"fyvr1xe",xl:"fyvr1xf"},defaultClass:"fyvr1xc"},9:{conditions:{sm:"fyvr1xg",md:"fyvr1xh",lg:"fyvr1xi",xl:"fyvr1xj"},defaultClass:"fyvr1xg"},10:{conditions:{sm:"fyvr1xk",md:"fyvr1xl",lg:"fyvr1xm",xl:"fyvr1xn"},defaultClass:"fyvr1xk"},12:{conditions:{sm:"fyvr1xo",md:"fyvr1xp",lg:"fyvr1xq",xl:"fyvr1xr"},defaultClass:"fyvr1xo"},14:{conditions:{sm:"fyvr1xs",md:"fyvr1xt",lg:"fyvr1xu",xl:"fyvr1xv"},defaultClass:"fyvr1xs"},16:{conditions:{sm:"fyvr1xw",md:"fyvr1xx",lg:"fyvr1xy",xl:"fyvr1xz"},defaultClass:"fyvr1xw"},"0.25":{conditions:{sm:"fyvr1y0",md:"fyvr1y1",lg:"fyvr1y2",xl:"fyvr1y3"},defaultClass:"fyvr1y0"},"0.5":{conditions:{sm:"fyvr1y4",md:"fyvr1y5",lg:"fyvr1y6",xl:"fyvr1y7"},defaultClass:"fyvr1y4"},"1.5":{conditions:{sm:"fyvr1y8",md:"fyvr1y9",lg:"fyvr1ya",xl:"fyvr1yb"},defaultClass:"fyvr1y8"}}},paddingRight:{values:{0:{conditions:{sm:"fyvr1yc",md:"fyvr1yd",lg:"fyvr1ye",xl:"fyvr1yf"},defaultClass:"fyvr1yc"},1:{conditions:{sm:"fyvr1yg",md:"fyvr1yh",lg:"fyvr1yi",xl:"fyvr1yj"},defaultClass:"fyvr1yg"},2:{conditions:{sm:"fyvr1yk",md:"fyvr1yl",lg:"fyvr1ym",xl:"fyvr1yn"},defaultClass:"fyvr1yk"},3:{conditions:{sm:"fyvr1yo",md:"fyvr1yp",lg:"fyvr1yq",xl:"fyvr1yr"},defaultClass:"fyvr1yo"},4:{conditions:{sm:"fyvr1ys",md:"fyvr1yt",lg:"fyvr1yu",xl:"fyvr1yv"},defaultClass:"fyvr1ys"},5:{conditions:{sm:"fyvr1yw",md:"fyvr1yx",lg:"fyvr1yy",xl:"fyvr1yz"},defaultClass:"fyvr1yw"},6:{conditions:{sm:"fyvr1z0",md:"fyvr1z1",lg:"fyvr1z2",xl:"fyvr1z3"},defaultClass:"fyvr1z0"},7:{conditions:{sm:"fyvr1z4",md:"fyvr1z5",lg:"fyvr1z6",xl:"fyvr1z7"},defaultClass:"fyvr1z4"},8:{conditions:{sm:"fyvr1z8",md:"fyvr1z9",lg:"fyvr1za",xl:"fyvr1zb"},defaultClass:"fyvr1z8"},9:{conditions:{sm:"fyvr1zc",md:"fyvr1zd",lg:"fyvr1ze",xl:"fyvr1zf"},defaultClass:"fyvr1zc"},10:{conditions:{sm:"fyvr1zg",md:"fyvr1zh",lg:"fyvr1zi",xl:"fyvr1zj"},defaultClass:"fyvr1zg"},12:{conditions:{sm:"fyvr1zk",md:"fyvr1zl",lg:"fyvr1zm",xl:"fyvr1zn"},defaultClass:"fyvr1zk"},14:{conditions:{sm:"fyvr1zo",md:"fyvr1zp",lg:"fyvr1zq",xl:"fyvr1zr"},defaultClass:"fyvr1zo"},16:{conditions:{sm:"fyvr1zs",md:"fyvr1zt",lg:"fyvr1zu",xl:"fyvr1zv"},defaultClass:"fyvr1zs"},"0.25":{conditions:{sm:"fyvr1zw",md:"fyvr1zx",lg:"fyvr1zy",xl:"fyvr1zz"},defaultClass:"fyvr1zw"},"0.5":{conditions:{sm:"fyvr1100",md:"fyvr1101",lg:"fyvr1102",xl:"fyvr1103"},defaultClass:"fyvr1100"},"1.5":{conditions:{sm:"fyvr1104",md:"fyvr1105",lg:"fyvr1106",xl:"fyvr1107"},defaultClass:"fyvr1104"}}},marginTop:{values:{0:{conditions:{sm:"fyvr1108",md:"fyvr1109",lg:"fyvr110a",xl:"fyvr110b"},defaultClass:"fyvr1108"},1:{conditions:{sm:"fyvr110c",md:"fyvr110d",lg:"fyvr110e",xl:"fyvr110f"},defaultClass:"fyvr110c"},2:{conditions:{sm:"fyvr110g",md:"fyvr110h",lg:"fyvr110i",xl:"fyvr110j"},defaultClass:"fyvr110g"},3:{conditions:{sm:"fyvr110k",md:"fyvr110l",lg:"fyvr110m",xl:"fyvr110n"},defaultClass:"fyvr110k"},4:{conditions:{sm:"fyvr110o",md:"fyvr110p",lg:"fyvr110q",xl:"fyvr110r"},defaultClass:"fyvr110o"},5:{conditions:{sm:"fyvr110s",md:"fyvr110t",lg:"fyvr110u",xl:"fyvr110v"},defaultClass:"fyvr110s"},6:{conditions:{sm:"fyvr110w",md:"fyvr110x",lg:"fyvr110y",xl:"fyvr110z"},defaultClass:"fyvr110w"},7:{conditions:{sm:"fyvr1110",md:"fyvr1111",lg:"fyvr1112",xl:"fyvr1113"},defaultClass:"fyvr1110"},8:{conditions:{sm:"fyvr1114",md:"fyvr1115",lg:"fyvr1116",xl:"fyvr1117"},defaultClass:"fyvr1114"},9:{conditions:{sm:"fyvr1118",md:"fyvr1119",lg:"fyvr111a",xl:"fyvr111b"},defaultClass:"fyvr1118"},10:{conditions:{sm:"fyvr111c",md:"fyvr111d",lg:"fyvr111e",xl:"fyvr111f"},defaultClass:"fyvr111c"},12:{conditions:{sm:"fyvr111g",md:"fyvr111h",lg:"fyvr111i",xl:"fyvr111j"},defaultClass:"fyvr111g"},14:{conditions:{sm:"fyvr111k",md:"fyvr111l",lg:"fyvr111m",xl:"fyvr111n"},defaultClass:"fyvr111k"},16:{conditions:{sm:"fyvr111o",md:"fyvr111p",lg:"fyvr111q",xl:"fyvr111r"},defaultClass:"fyvr111o"},"0.25":{conditions:{sm:"fyvr111s",md:"fyvr111t",lg:"fyvr111u",xl:"fyvr111v"},defaultClass:"fyvr111s"},"0.5":{conditions:{sm:"fyvr111w",md:"fyvr111x",lg:"fyvr111y",xl:"fyvr111z"},defaultClass:"fyvr111w"},"1.5":{conditions:{sm:"fyvr1120",md:"fyvr1121",lg:"fyvr1122",xl:"fyvr1123"},defaultClass:"fyvr1120"},auto:{conditions:{sm:"fyvr1124",md:"fyvr1125",lg:"fyvr1126",xl:"fyvr1127"},defaultClass:"fyvr1124"}}},marginBottom:{values:{0:{conditions:{sm:"fyvr1128",md:"fyvr1129",lg:"fyvr112a",xl:"fyvr112b"},defaultClass:"fyvr1128"},1:{conditions:{sm:"fyvr112c",md:"fyvr112d",lg:"fyvr112e",xl:"fyvr112f"},defaultClass:"fyvr112c"},2:{conditions:{sm:"fyvr112g",md:"fyvr112h",lg:"fyvr112i",xl:"fyvr112j"},defaultClass:"fyvr112g"},3:{conditions:{sm:"fyvr112k",md:"fyvr112l",lg:"fyvr112m",xl:"fyvr112n"},defaultClass:"fyvr112k"},4:{conditions:{sm:"fyvr112o",md:"fyvr112p",lg:"fyvr112q",xl:"fyvr112r"},defaultClass:"fyvr112o"},5:{conditions:{sm:"fyvr112s",md:"fyvr112t",lg:"fyvr112u",xl:"fyvr112v"},defaultClass:"fyvr112s"},6:{conditions:{sm:"fyvr112w",md:"fyvr112x",lg:"fyvr112y",xl:"fyvr112z"},defaultClass:"fyvr112w"},7:{conditions:{sm:"fyvr1130",md:"fyvr1131",lg:"fyvr1132",xl:"fyvr1133"},defaultClass:"fyvr1130"},8:{conditions:{sm:"fyvr1134",md:"fyvr1135",lg:"fyvr1136",xl:"fyvr1137"},defaultClass:"fyvr1134"},9:{conditions:{sm:"fyvr1138",md:"fyvr1139",lg:"fyvr113a",xl:"fyvr113b"},defaultClass:"fyvr1138"},10:{conditions:{sm:"fyvr113c",md:"fyvr113d",lg:"fyvr113e",xl:"fyvr113f"},defaultClass:"fyvr113c"},12:{conditions:{sm:"fyvr113g",md:"fyvr113h",lg:"fyvr113i",xl:"fyvr113j"},defaultClass:"fyvr113g"},14:{conditions:{sm:"fyvr113k",md:"fyvr113l",lg:"fyvr113m",xl:"fyvr113n"},defaultClass:"fyvr113k"},16:{conditions:{sm:"fyvr113o",md:"fyvr113p",lg:"fyvr113q",xl:"fyvr113r"},defaultClass:"fyvr113o"},"0.25":{conditions:{sm:"fyvr113s",md:"fyvr113t",lg:"fyvr113u",xl:"fyvr113v"},defaultClass:"fyvr113s"},"0.5":{conditions:{sm:"fyvr113w",md:"fyvr113x",lg:"fyvr113y",xl:"fyvr113z"},defaultClass:"fyvr113w"},"1.5":{conditions:{sm:"fyvr1140",md:"fyvr1141",lg:"fyvr1142",xl:"fyvr1143"},defaultClass:"fyvr1140"},auto:{conditions:{sm:"fyvr1144",md:"fyvr1145",lg:"fyvr1146",xl:"fyvr1147"},defaultClass:"fyvr1144"}}},marginLeft:{values:{0:{conditions:{sm:"fyvr1148",md:"fyvr1149",lg:"fyvr114a",xl:"fyvr114b"},defaultClass:"fyvr1148"},1:{conditions:{sm:"fyvr114c",md:"fyvr114d",lg:"fyvr114e",xl:"fyvr114f"},defaultClass:"fyvr114c"},2:{conditions:{sm:"fyvr114g",md:"fyvr114h",lg:"fyvr114i",xl:"fyvr114j"},defaultClass:"fyvr114g"},3:{conditions:{sm:"fyvr114k",md:"fyvr114l",lg:"fyvr114m",xl:"fyvr114n"},defaultClass:"fyvr114k"},4:{conditions:{sm:"fyvr114o",md:"fyvr114p",lg:"fyvr114q",xl:"fyvr114r"},defaultClass:"fyvr114o"},5:{conditions:{sm:"fyvr114s",md:"fyvr114t",lg:"fyvr114u",xl:"fyvr114v"},defaultClass:"fyvr114s"},6:{conditions:{sm:"fyvr114w",md:"fyvr114x",lg:"fyvr114y",xl:"fyvr114z"},defaultClass:"fyvr114w"},7:{conditions:{sm:"fyvr1150",md:"fyvr1151",lg:"fyvr1152",xl:"fyvr1153"},defaultClass:"fyvr1150"},8:{conditions:{sm:"fyvr1154",md:"fyvr1155",lg:"fyvr1156",xl:"fyvr1157"},defaultClass:"fyvr1154"},9:{conditions:{sm:"fyvr1158",md:"fyvr1159",lg:"fyvr115a",xl:"fyvr115b"},defaultClass:"fyvr1158"},10:{conditions:{sm:"fyvr115c",md:"fyvr115d",lg:"fyvr115e",xl:"fyvr115f"},defaultClass:"fyvr115c"},12:{conditions:{sm:"fyvr115g",md:"fyvr115h",lg:"fyvr115i",xl:"fyvr115j"},defaultClass:"fyvr115g"},14:{conditions:{sm:"fyvr115k",md:"fyvr115l",lg:"fyvr115m",xl:"fyvr115n"},defaultClass:"fyvr115k"},16:{conditions:{sm:"fyvr115o",md:"fyvr115p",lg:"fyvr115q",xl:"fyvr115r"},defaultClass:"fyvr115o"},"0.25":{conditions:{sm:"fyvr115s",md:"fyvr115t",lg:"fyvr115u",xl:"fyvr115v"},defaultClass:"fyvr115s"},"0.5":{conditions:{sm:"fyvr115w",md:"fyvr115x",lg:"fyvr115y",xl:"fyvr115z"},defaultClass:"fyvr115w"},"1.5":{conditions:{sm:"fyvr1160",md:"fyvr1161",lg:"fyvr1162",xl:"fyvr1163"},defaultClass:"fyvr1160"},auto:{conditions:{sm:"fyvr1164",md:"fyvr1165",lg:"fyvr1166",xl:"fyvr1167"},defaultClass:"fyvr1164"}}},marginRight:{values:{0:{conditions:{sm:"fyvr1168",md:"fyvr1169",lg:"fyvr116a",xl:"fyvr116b"},defaultClass:"fyvr1168"},1:{conditions:{sm:"fyvr116c",md:"fyvr116d",lg:"fyvr116e",xl:"fyvr116f"},defaultClass:"fyvr116c"},2:{conditions:{sm:"fyvr116g",md:"fyvr116h",lg:"fyvr116i",xl:"fyvr116j"},defaultClass:"fyvr116g"},3:{conditions:{sm:"fyvr116k",md:"fyvr116l",lg:"fyvr116m",xl:"fyvr116n"},defaultClass:"fyvr116k"},4:{conditions:{sm:"fyvr116o",md:"fyvr116p",lg:"fyvr116q",xl:"fyvr116r"},defaultClass:"fyvr116o"},5:{conditions:{sm:"fyvr116s",md:"fyvr116t",lg:"fyvr116u",xl:"fyvr116v"},defaultClass:"fyvr116s"},6:{conditions:{sm:"fyvr116w",md:"fyvr116x",lg:"fyvr116y",xl:"fyvr116z"},defaultClass:"fyvr116w"},7:{conditions:{sm:"fyvr1170",md:"fyvr1171",lg:"fyvr1172",xl:"fyvr1173"},defaultClass:"fyvr1170"},8:{conditions:{sm:"fyvr1174",md:"fyvr1175",lg:"fyvr1176",xl:"fyvr1177"},defaultClass:"fyvr1174"},9:{conditions:{sm:"fyvr1178",md:"fyvr1179",lg:"fyvr117a",xl:"fyvr117b"},defaultClass:"fyvr1178"},10:{conditions:{sm:"fyvr117c",md:"fyvr117d",lg:"fyvr117e",xl:"fyvr117f"},defaultClass:"fyvr117c"},12:{conditions:{sm:"fyvr117g",md:"fyvr117h",lg:"fyvr117i",xl:"fyvr117j"},defaultClass:"fyvr117g"},14:{conditions:{sm:"fyvr117k",md:"fyvr117l",lg:"fyvr117m",xl:"fyvr117n"},defaultClass:"fyvr117k"},16:{conditions:{sm:"fyvr117o",md:"fyvr117p",lg:"fyvr117q",xl:"fyvr117r"},defaultClass:"fyvr117o"},"0.25":{conditions:{sm:"fyvr117s",md:"fyvr117t",lg:"fyvr117u",xl:"fyvr117v"},defaultClass:"fyvr117s"},"0.5":{conditions:{sm:"fyvr117w",md:"fyvr117x",lg:"fyvr117y",xl:"fyvr117z"},defaultClass:"fyvr117w"},"1.5":{conditions:{sm:"fyvr1180",md:"fyvr1181",lg:"fyvr1182",xl:"fyvr1183"},defaultClass:"fyvr1180"},auto:{conditions:{sm:"fyvr1184",md:"fyvr1185",lg:"fyvr1186",xl:"fyvr1187"},defaultClass:"fyvr1184"}}},gap:{values:{0:{conditions:{sm:"fyvr1188",md:"fyvr1189",lg:"fyvr118a",xl:"fyvr118b"},defaultClass:"fyvr1188"},1:{conditions:{sm:"fyvr118c",md:"fyvr118d",lg:"fyvr118e",xl:"fyvr118f"},defaultClass:"fyvr118c"},2:{conditions:{sm:"fyvr118g",md:"fyvr118h",lg:"fyvr118i",xl:"fyvr118j"},defaultClass:"fyvr118g"},3:{conditions:{sm:"fyvr118k",md:"fyvr118l",lg:"fyvr118m",xl:"fyvr118n"},defaultClass:"fyvr118k"},4:{conditions:{sm:"fyvr118o",md:"fyvr118p",lg:"fyvr118q",xl:"fyvr118r"},defaultClass:"fyvr118o"},5:{conditions:{sm:"fyvr118s",md:"fyvr118t",lg:"fyvr118u",xl:"fyvr118v"},defaultClass:"fyvr118s"},6:{conditions:{sm:"fyvr118w",md:"fyvr118x",lg:"fyvr118y",xl:"fyvr118z"},defaultClass:"fyvr118w"},7:{conditions:{sm:"fyvr1190",md:"fyvr1191",lg:"fyvr1192",xl:"fyvr1193"},defaultClass:"fyvr1190"},8:{conditions:{sm:"fyvr1194",md:"fyvr1195",lg:"fyvr1196",xl:"fyvr1197"},defaultClass:"fyvr1194"},9:{conditions:{sm:"fyvr1198",md:"fyvr1199",lg:"fyvr119a",xl:"fyvr119b"},defaultClass:"fyvr1198"},10:{conditions:{sm:"fyvr119c",md:"fyvr119d",lg:"fyvr119e",xl:"fyvr119f"},defaultClass:"fyvr119c"},12:{conditions:{sm:"fyvr119g",md:"fyvr119h",lg:"fyvr119i",xl:"fyvr119j"},defaultClass:"fyvr119g"},14:{conditions:{sm:"fyvr119k",md:"fyvr119l",lg:"fyvr119m",xl:"fyvr119n"},defaultClass:"fyvr119k"},16:{conditions:{sm:"fyvr119o",md:"fyvr119p",lg:"fyvr119q",xl:"fyvr119r"},defaultClass:"fyvr119o"},"0.25":{conditions:{sm:"fyvr119s",md:"fyvr119t",lg:"fyvr119u",xl:"fyvr119v"},defaultClass:"fyvr119s"},"0.5":{conditions:{sm:"fyvr119w",md:"fyvr119x",lg:"fyvr119y",xl:"fyvr119z"},defaultClass:"fyvr119w"},"1.5":{conditions:{sm:"fyvr11a0",md:"fyvr11a1",lg:"fyvr11a2",xl:"fyvr11a3"},defaultClass:"fyvr11a0"}}},borderBottomWidth:{values:{none:{conditions:{sm:"fyvr11a4",md:"fyvr11a5",lg:"fyvr11a6",xl:"fyvr11a7"},defaultClass:"fyvr11a4"},thin:{conditions:{sm:"fyvr11a8",md:"fyvr11a9",lg:"fyvr11aa",xl:"fyvr11ab"},defaultClass:"fyvr11a8"},thick:{conditions:{sm:"fyvr11ac",md:"fyvr11ad",lg:"fyvr11ae",xl:"fyvr11af"},defaultClass:"fyvr11ac"}}},borderLeftWidth:{values:{none:{conditions:{sm:"fyvr11ag",md:"fyvr11ah",lg:"fyvr11ai",xl:"fyvr11aj"},defaultClass:"fyvr11ag"},thin:{conditions:{sm:"fyvr11ak",md:"fyvr11al",lg:"fyvr11am",xl:"fyvr11an"},defaultClass:"fyvr11ak"},thick:{conditions:{sm:"fyvr11ao",md:"fyvr11ap",lg:"fyvr11aq",xl:"fyvr11ar"},defaultClass:"fyvr11ao"}}},borderRightWidth:{values:{none:{conditions:{sm:"fyvr11as",md:"fyvr11at",lg:"fyvr11au",xl:"fyvr11av"},defaultClass:"fyvr11as"},thin:{conditions:{sm:"fyvr11aw",md:"fyvr11ax",lg:"fyvr11ay",xl:"fyvr11az"},defaultClass:"fyvr11aw"},thick:{conditions:{sm:"fyvr11b0",md:"fyvr11b1",lg:"fyvr11b2",xl:"fyvr11b3"},defaultClass:"fyvr11b0"}}},borderTopWidth:{values:{none:{conditions:{sm:"fyvr11b4",md:"fyvr11b5",lg:"fyvr11b6",xl:"fyvr11b7"},defaultClass:"fyvr11b4"},thin:{conditions:{sm:"fyvr11b8",md:"fyvr11b9",lg:"fyvr11ba",xl:"fyvr11bb"},defaultClass:"fyvr11b8"},thick:{conditions:{sm:"fyvr11bc",md:"fyvr11bd",lg:"fyvr11be",xl:"fyvr11bf"},defaultClass:"fyvr11bc"}}},borderBottomLeftRadius:{values:{none:{conditions:{sm:"fyvr11bg",md:"fyvr11bh",lg:"fyvr11bi",xl:"fyvr11bj"},defaultClass:"fyvr11bg"},xs:{conditions:{sm:"fyvr11bk",md:"fyvr11bl",lg:"fyvr11bm",xl:"fyvr11bn"},defaultClass:"fyvr11bk"},sm:{conditions:{sm:"fyvr11bo",md:"fyvr11bp",lg:"fyvr11bq",xl:"fyvr11br"},defaultClass:"fyvr11bo"},md:{conditions:{sm:"fyvr11bs",md:"fyvr11bt",lg:"fyvr11bu",xl:"fyvr11bv"},defaultClass:"fyvr11bs"},lg:{conditions:{sm:"fyvr11bw",md:"fyvr11bx",lg:"fyvr11by",xl:"fyvr11bz"},defaultClass:"fyvr11bw"},circle:{conditions:{sm:"fyvr11c0",md:"fyvr11c1",lg:"fyvr11c2",xl:"fyvr11c3"},defaultClass:"fyvr11c0"}}},borderBottomRightRadius:{values:{none:{conditions:{sm:"fyvr11c4",md:"fyvr11c5",lg:"fyvr11c6",xl:"fyvr11c7"},defaultClass:"fyvr11c4"},xs:{conditions:{sm:"fyvr11c8",md:"fyvr11c9",lg:"fyvr11ca",xl:"fyvr11cb"},defaultClass:"fyvr11c8"},sm:{conditions:{sm:"fyvr11cc",md:"fyvr11cd",lg:"fyvr11ce",xl:"fyvr11cf"},defaultClass:"fyvr11cc"},md:{conditions:{sm:"fyvr11cg",md:"fyvr11ch",lg:"fyvr11ci",xl:"fyvr11cj"},defaultClass:"fyvr11cg"},lg:{conditions:{sm:"fyvr11ck",md:"fyvr11cl",lg:"fyvr11cm",xl:"fyvr11cn"},defaultClass:"fyvr11ck"},circle:{conditions:{sm:"fyvr11co",md:"fyvr11cp",lg:"fyvr11cq",xl:"fyvr11cr"},defaultClass:"fyvr11co"}}},borderTopLeftRadius:{values:{none:{conditions:{sm:"fyvr11cs",md:"fyvr11ct",lg:"fyvr11cu",xl:"fyvr11cv"},defaultClass:"fyvr11cs"},xs:{conditions:{sm:"fyvr11cw",md:"fyvr11cx",lg:"fyvr11cy",xl:"fyvr11cz"},defaultClass:"fyvr11cw"},sm:{conditions:{sm:"fyvr11d0",md:"fyvr11d1",lg:"fyvr11d2",xl:"fyvr11d3"},defaultClass:"fyvr11d0"},md:{conditions:{sm:"fyvr11d4",md:"fyvr11d5",lg:"fyvr11d6",xl:"fyvr11d7"},defaultClass:"fyvr11d4"},lg:{conditions:{sm:"fyvr11d8",md:"fyvr11d9",lg:"fyvr11da",xl:"fyvr11db"},defaultClass:"fyvr11d8"},circle:{conditions:{sm:"fyvr11dc",md:"fyvr11dd",lg:"fyvr11de",xl:"fyvr11df"},defaultClass:"fyvr11dc"}}},borderTopRightRadius:{values:{none:{conditions:{sm:"fyvr11dg",md:"fyvr11dh",lg:"fyvr11di",xl:"fyvr11dj"},defaultClass:"fyvr11dg"},xs:{conditions:{sm:"fyvr11dk",md:"fyvr11dl",lg:"fyvr11dm",xl:"fyvr11dn"},defaultClass:"fyvr11dk"},sm:{conditions:{sm:"fyvr11do",md:"fyvr11dp",lg:"fyvr11dq",xl:"fyvr11dr"},defaultClass:"fyvr11do"},md:{conditions:{sm:"fyvr11ds",md:"fyvr11dt",lg:"fyvr11du",xl:"fyvr11dv"},defaultClass:"fyvr11ds"},lg:{conditions:{sm:"fyvr11dw",md:"fyvr11dx",lg:"fyvr11dy",xl:"fyvr11dz"},defaultClass:"fyvr11dw"},circle:{conditions:{sm:"fyvr11e0",md:"fyvr11e1",lg:"fyvr11e2",xl:"fyvr11e3"},defaultClass:"fyvr11e0"}}},fontSize:{values:{inherit:{conditions:{sm:"fyvr11e4",md:"fyvr11e5",lg:"fyvr11e6",xl:"fyvr11e7"},defaultClass:"fyvr11e4"},xsmall:{conditions:{sm:"fyvr11e8",md:"fyvr11e9",lg:"fyvr11ea",xl:"fyvr11eb"},defaultClass:"fyvr11e8"},small:{conditions:{sm:"fyvr11ec",md:"fyvr11ed",lg:"fyvr11ee",xl:"fyvr11ef"},defaultClass:"fyvr11ec"},normal:{conditions:{sm:"fyvr11eg",md:"fyvr11eh",lg:"fyvr11ei",xl:"fyvr11ej"},defaultClass:"fyvr11eg"},medium:{conditions:{sm:"fyvr11ek",md:"fyvr11el",lg:"fyvr11em",xl:"fyvr11en"},defaultClass:"fyvr11ek"},large:{conditions:{sm:"fyvr11eo",md:"fyvr11ep",lg:"fyvr11eq",xl:"fyvr11er"},defaultClass:"fyvr11eo"},xlarge:{conditions:{sm:"fyvr11es",md:"fyvr11et",lg:"fyvr11eu",xl:"fyvr11ev"},defaultClass:"fyvr11es"}}},fontWeight:{values:{inherit:{conditions:{sm:"fyvr11ew",md:"fyvr11ex",lg:"fyvr11ey",xl:"fyvr11ez"},defaultClass:"fyvr11ew"},normal:{conditions:{sm:"fyvr11f0",md:"fyvr11f1",lg:"fyvr11f2",xl:"fyvr11f3"},defaultClass:"fyvr11f0"},medium:{conditions:{sm:"fyvr11f4",md:"fyvr11f5",lg:"fyvr11f6",xl:"fyvr11f7"},defaultClass:"fyvr11f4"},semibold:{conditions:{sm:"fyvr11f8",md:"fyvr11f9",lg:"fyvr11fa",xl:"fyvr11fb"},defaultClass:"fyvr11f8"},bold:{conditions:{sm:"fyvr11fc",md:"fyvr11fd",lg:"fyvr11fe",xl:"fyvr11ff"},defaultClass:"fyvr11fc"}}},letterSpacing:{values:{inherit:{conditions:{sm:"fyvr11fg",md:"fyvr11fh",lg:"fyvr11fi",xl:"fyvr11fj"},defaultClass:"fyvr11fg"},none:{conditions:{sm:"fyvr11fk",md:"fyvr11fl",lg:"fyvr11fm",xl:"fyvr11fn"},defaultClass:"fyvr11fk"},normal:{conditions:{sm:"fyvr11fo",md:"fyvr11fp",lg:"fyvr11fq",xl:"fyvr11fr"},defaultClass:"fyvr11fo"},wide:{conditions:{sm:"fyvr11fs",md:"fyvr11ft",lg:"fyvr11fu",xl:"fyvr11fv"},defaultClass:"fyvr11fs"}}},lineHeight:{values:{4:{conditions:{sm:"fyvr11fw",md:"fyvr11fx",lg:"fyvr11fy",xl:"fyvr11fz"},defaultClass:"fyvr11fw"},5:{conditions:{sm:"fyvr11g0",md:"fyvr11g1",lg:"fyvr11g2",xl:"fyvr11g3"},defaultClass:"fyvr11g0"},6:{conditions:{sm:"fyvr11g4",md:"fyvr11g5",lg:"fyvr11g6",xl:"fyvr11g7"},defaultClass:"fyvr11g4"},7:{conditions:{sm:"fyvr11g8",md:"fyvr11g9",lg:"fyvr11ga",xl:"fyvr11gb"},defaultClass:"fyvr11g8"},9:{conditions:{sm:"fyvr11gc",md:"fyvr11gd",lg:"fyvr11ge",xl:"fyvr11gf"},defaultClass:"fyvr11gc"},inherit:{conditions:{sm:"fyvr11gg",md:"fyvr11gh",lg:"fyvr11gi",xl:"fyvr11gj"},defaultClass:"fyvr11gg"}}},textAlign:{values:{center:{conditions:{sm:"fyvr11gk",md:"fyvr11gl",lg:"fyvr11gm",xl:"fyvr11gn"},defaultClass:"fyvr11gk"},left:{conditions:{sm:"fyvr11go",md:"fyvr11gp",lg:"fyvr11gq",xl:"fyvr11gr"},defaultClass:"fyvr11go"},right:{conditions:{sm:"fyvr11gs",md:"fyvr11gt",lg:"fyvr11gu",xl:"fyvr11gv"},defaultClass:"fyvr11gs"}}},display:{values:{block:{conditions:{sm:"fyvr11gw",md:"fyvr11gx",lg:"fyvr11gy",xl:"fyvr11gz"},defaultClass:"fyvr11gw"},flex:{conditions:{sm:"fyvr11h0",md:"fyvr11h1",lg:"fyvr11h2",xl:"fyvr11h3"},defaultClass:"fyvr11h0"},grid:{conditions:{sm:"fyvr11h4",md:"fyvr11h5",lg:"fyvr11h6",xl:"fyvr11h7"},defaultClass:"fyvr11h4"},"inline-block":{conditions:{sm:"fyvr11h8",md:"fyvr11h9",lg:"fyvr11ha",xl:"fyvr11hb"},defaultClass:"fyvr11h8"},"inline-flex":{conditions:{sm:"fyvr11hc",md:"fyvr11hd",lg:"fyvr11he",xl:"fyvr11hf"},defaultClass:"fyvr11hc"},none:{conditions:{sm:"fyvr11hg",md:"fyvr11hh",lg:"fyvr11hi",xl:"fyvr11hj"},defaultClass:"fyvr11hg"},contents:{conditions:{sm:"fyvr11hk",md:"fyvr11hl",lg:"fyvr11hm",xl:"fyvr11hn"},defaultClass:"fyvr11hk"}}},position:{values:{absolute:{conditions:{sm:"fyvr11ho",md:"fyvr11hp",lg:"fyvr11hq",xl:"fyvr11hr"},defaultClass:"fyvr11ho"},fixed:{conditions:{sm:"fyvr11hs",md:"fyvr11ht",lg:"fyvr11hu",xl:"fyvr11hv"},defaultClass:"fyvr11hs"},relative:{conditions:{sm:"fyvr11hw",md:"fyvr11hx",lg:"fyvr11hy",xl:"fyvr11hz"},defaultClass:"fyvr11hw"},sticky:{conditions:{sm:"fyvr11i0",md:"fyvr11i1",lg:"fyvr11i2",xl:"fyvr11i3"},defaultClass:"fyvr11i0"}}},flexDirection:{values:{column:{conditions:{sm:"fyvr11i4",md:"fyvr11i5",lg:"fyvr11i6",xl:"fyvr11i7"},defaultClass:"fyvr11i4"},"column-reverse":{conditions:{sm:"fyvr11i8",md:"fyvr11i9",lg:"fyvr11ia",xl:"fyvr11ib"},defaultClass:"fyvr11i8"},row:{conditions:{sm:"fyvr11ic",md:"fyvr11id",lg:"fyvr11ie",xl:"fyvr11if"},defaultClass:"fyvr11ic"},"row-reverse":{conditions:{sm:"fyvr11ig",md:"fyvr11ih",lg:"fyvr11ii",xl:"fyvr11ij"},defaultClass:"fyvr11ig"}}},flexShrink:{values:{0:{conditions:{sm:"fyvr11ik",md:"fyvr11il",lg:"fyvr11im",xl:"fyvr11in"},defaultClass:"fyvr11ik"},1:{conditions:{sm:"fyvr11io",md:"fyvr11ip",lg:"fyvr11iq",xl:"fyvr11ir"},defaultClass:"fyvr11io"}}},flexGrow:{values:{0:{conditions:{sm:"fyvr11is",md:"fyvr11it",lg:"fyvr11iu",xl:"fyvr11iv"},defaultClass:"fyvr11is"},1:{conditions:{sm:"fyvr11iw",md:"fyvr11ix",lg:"fyvr11iy",xl:"fyvr11iz"},defaultClass:"fyvr11iw"}}},flexWrap:{values:{nowrap:{conditions:{sm:"fyvr11j0",md:"fyvr11j1",lg:"fyvr11j2",xl:"fyvr11j3"},defaultClass:"fyvr11j0"},wrap:{conditions:{sm:"fyvr11j4",md:"fyvr11j5",lg:"fyvr11j6",xl:"fyvr11j7"},defaultClass:"fyvr11j4"},"wrap-reverse":{conditions:{sm:"fyvr11j8",md:"fyvr11j9",lg:"fyvr11ja",xl:"fyvr11jb"},defaultClass:"fyvr11j8"}}},justifyContent:{values:{"flex-start":{conditions:{sm:"fyvr11jc",md:"fyvr11jd",lg:"fyvr11je",xl:"fyvr11jf"},defaultClass:"fyvr11jc"},center:{conditions:{sm:"fyvr11jg",md:"fyvr11jh",lg:"fyvr11ji",xl:"fyvr11jj"},defaultClass:"fyvr11jg"},"flex-end":{conditions:{sm:"fyvr11jk",md:"fyvr11jl",lg:"fyvr11jm",xl:"fyvr11jn"},defaultClass:"fyvr11jk"},stretch:{conditions:{sm:"fyvr11jo",md:"fyvr11jp",lg:"fyvr11jq",xl:"fyvr11jr"},defaultClass:"fyvr11jo"},"space-around":{conditions:{sm:"fyvr11js",md:"fyvr11jt",lg:"fyvr11ju",xl:"fyvr11jv"},defaultClass:"fyvr11js"},"space-between":{conditions:{sm:"fyvr11jw",md:"fyvr11jx",lg:"fyvr11jy",xl:"fyvr11jz"},defaultClass:"fyvr11jw"},"space-evenly":{conditions:{sm:"fyvr11k0",md:"fyvr11k1",lg:"fyvr11k2",xl:"fyvr11k3"},defaultClass:"fyvr11k0"}}},justifySelf:{values:{"flex-start":{conditions:{sm:"fyvr11k4",md:"fyvr11k5",lg:"fyvr11k6",xl:"fyvr11k7"},defaultClass:"fyvr11k4"},center:{conditions:{sm:"fyvr11k8",md:"fyvr11k9",lg:"fyvr11ka",xl:"fyvr11kb"},defaultClass:"fyvr11k8"},"flex-end":{conditions:{sm:"fyvr11kc",md:"fyvr11kd",lg:"fyvr11ke",xl:"fyvr11kf"},defaultClass:"fyvr11kc"},stretch:{conditions:{sm:"fyvr11kg",md:"fyvr11kh",lg:"fyvr11ki",xl:"fyvr11kj"},defaultClass:"fyvr11kg"}}},alignItems:{values:{"flex-start":{conditions:{sm:"fyvr11kk",md:"fyvr11kl",lg:"fyvr11km",xl:"fyvr11kn"},defaultClass:"fyvr11kk"},center:{conditions:{sm:"fyvr11ko",md:"fyvr11kp",lg:"fyvr11kq",xl:"fyvr11kr"},defaultClass:"fyvr11ko"},"flex-end":{conditions:{sm:"fyvr11ks",md:"fyvr11kt",lg:"fyvr11ku",xl:"fyvr11kv"},defaultClass:"fyvr11ks"},stretch:{conditions:{sm:"fyvr11kw",md:"fyvr11kx",lg:"fyvr11ky",xl:"fyvr11kz"},defaultClass:"fyvr11kw"},baseline:{conditions:{sm:"fyvr11l0",md:"fyvr11l1",lg:"fyvr11l2",xl:"fyvr11l3"},defaultClass:"fyvr11l0"}}},alignSelf:{values:{"flex-start":{conditions:{sm:"fyvr11l4",md:"fyvr11l5",lg:"fyvr11l6",xl:"fyvr11l7"},defaultClass:"fyvr11l4"},center:{conditions:{sm:"fyvr11l8",md:"fyvr11l9",lg:"fyvr11la",xl:"fyvr11lb"},defaultClass:"fyvr11l8"},"flex-end":{conditions:{sm:"fyvr11lc",md:"fyvr11ld",lg:"fyvr11le",xl:"fyvr11lf"},defaultClass:"fyvr11lc"},stretch:{conditions:{sm:"fyvr11lg",md:"fyvr11lh",lg:"fyvr11li",xl:"fyvr11lj"},defaultClass:"fyvr11lg"},baseline:{conditions:{sm:"fyvr11lk",md:"fyvr11ll",lg:"fyvr11lm",xl:"fyvr11ln"},defaultClass:"fyvr11lk"}}},overflowX:{values:{auto:{conditions:{sm:"fyvr11lo",md:"fyvr11lp",lg:"fyvr11lq",xl:"fyvr11lr"},defaultClass:"fyvr11lo"},hidden:{conditions:{sm:"fyvr11ls",md:"fyvr11lt",lg:"fyvr11lu",xl:"fyvr11lv"},defaultClass:"fyvr11ls"},scroll:{conditions:{sm:"fyvr11lw",md:"fyvr11lx",lg:"fyvr11ly",xl:"fyvr11lz"},defaultClass:"fyvr11lw"},visible:{conditions:{sm:"fyvr11m0",md:"fyvr11m1",lg:"fyvr11m2",xl:"fyvr11m3"},defaultClass:"fyvr11m0"}}},overflowY:{values:{auto:{conditions:{sm:"fyvr11m4",md:"fyvr11m5",lg:"fyvr11m6",xl:"fyvr11m7"},defaultClass:"fyvr11m4"},hidden:{conditions:{sm:"fyvr11m8",md:"fyvr11m9",lg:"fyvr11ma",xl:"fyvr11mb"},defaultClass:"fyvr11m8"},scroll:{conditions:{sm:"fyvr11mc",md:"fyvr11md",lg:"fyvr11me",xl:"fyvr11mf"},defaultClass:"fyvr11mc"},visible:{conditions:{sm:"fyvr11mg",md:"fyvr11mh",lg:"fyvr11mi",xl:"fyvr11mj"},defaultClass:"fyvr11mg"}}},visibility:{values:{hidden:{conditions:{sm:"fyvr11mk",md:"fyvr11ml",lg:"fyvr11mm",xl:"fyvr11mn"},defaultClass:"fyvr11mk"},visible:{conditions:{sm:"fyvr11mo",md:"fyvr11mp",lg:"fyvr11mq",xl:"fyvr11mr"},defaultClass:"fyvr11mo"}}}}},{conditions:void 0,styles:{backdropFilter:{values:{blur:{defaultClass:"fyvr11ms"},none:{defaultClass:"fyvr11mt"}}},fontFamily:{values:{inherit:{defaultClass:"fyvr11mu"},body:{defaultClass:"fyvr11mv"},mono:{defaultClass:"fyvr11mw"}}},textOverflow:{values:{ellipsis:{defaultClass:"fyvr11mx"},clip:{defaultClass:"fyvr11my"}}},textTransform:{values:{capitalize:{defaultClass:"fyvr11mz"},lowercase:{defaultClass:"fyvr11n0"},uppercase:{defaultClass:"fyvr11n1"}}},userSelect:{values:{none:{defaultClass:"fyvr11n2"},text:{defaultClass:"fyvr11n3"},all:{defaultClass:"fyvr11n4"},auto:{defaultClass:"fyvr11n5"}}},whiteSpace:{values:{normal:{defaultClass:"fyvr11n6"},nowrap:{defaultClass:"fyvr11n7"},initial:{defaultClass:"fyvr11n8"},inherit:{defaultClass:"fyvr11n9"}}},wordBreak:{values:{"break-word":{defaultClass:"fyvr11na"}}},wordWrap:{values:{normal:{defaultClass:"fyvr11nb"},"break-word":{defaultClass:"fyvr11nc"},initial:{defaultClass:"fyvr11nd"},inherit:{defaultClass:"fyvr11ne"}}},zIndex:{values:{0:{defaultClass:"fyvr11nf"},1:{defaultClass:"fyvr11ng"},10:{defaultClass:"fyvr11nh"},20:{defaultClass:"fyvr11ni"},30:{defaultClass:"fyvr11nj"},40:{defaultClass:"fyvr11nk"},50:{defaultClass:"fyvr11nl"},"-1":{defaultClass:"fyvr11nm"},auto:{defaultClass:"fyvr11nn"}}},aspectRatio:{values:{"1/1":{defaultClass:"fyvr11no"},"16/9":{defaultClass:"fyvr11np"},"4/3":{defaultClass:"fyvr11nq"},"3/1":{defaultClass:"fyvr11nr"},auto:{defaultClass:"fyvr11ns"}}}}},{conditions:{defaultCondition:"base",conditionNames:["base","active","disabled","focus","hover","checked"],responsiveArray:void 0},styles:{borderColor:{mappings:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]},borderStyle:{mappings:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"]},focusRing:{mappings:["boxShadow","outline"]},background:{values:{black:{conditions:{base:"fyvr11nt",active:"fyvr11nu",disabled:"fyvr11nv",focus:"fyvr11nw",hover:"fyvr11nx",checked:"fyvr11ny"},defaultClass:"fyvr11nt"},white:{conditions:{base:"fyvr11nz",active:"fyvr11o0",disabled:"fyvr11o1",focus:"fyvr11o2",hover:"fyvr11o3",checked:"fyvr11o4"},defaultClass:"fyvr11nz"},inherit:{conditions:{base:"fyvr11o5",active:"fyvr11o6",disabled:"fyvr11o7",focus:"fyvr11o8",hover:"fyvr11o9",checked:"fyvr11oa"},defaultClass:"fyvr11o5"},transparent:{conditions:{base:"fyvr11ob",active:"fyvr11oc",disabled:"fyvr11od",focus:"fyvr11oe",hover:"fyvr11of",checked:"fyvr11og"},defaultClass:"fyvr11ob"},positive:{conditions:{base:"fyvr11oh",active:"fyvr11oi",disabled:"fyvr11oj",focus:"fyvr11ok",hover:"fyvr11ol",checked:"fyvr11om"},defaultClass:"fyvr11oh"},negative:{conditions:{base:"fyvr11on",active:"fyvr11oo",disabled:"fyvr11op",focus:"fyvr11oq",hover:"fyvr11or",checked:"fyvr11os"},defaultClass:"fyvr11on"},info:{conditions:{base:"fyvr11ot",active:"fyvr11ou",disabled:"fyvr11ov",focus:"fyvr11ow",hover:"fyvr11ox",checked:"fyvr11oy"},defaultClass:"fyvr11ot"},warning:{conditions:{base:"fyvr11oz",active:"fyvr11p0",disabled:"fyvr11p1",focus:"fyvr11p2",hover:"fyvr11p3",checked:"fyvr11p4"},defaultClass:"fyvr11oz"},gradientBackdrop:{conditions:{base:"fyvr11p5",active:"fyvr11p6",disabled:"fyvr11p7",focus:"fyvr11p8",hover:"fyvr11p9",checked:"fyvr11pa"},defaultClass:"fyvr11p5"},gradientPrimary:{conditions:{base:"fyvr11pb",active:"fyvr11pc",disabled:"fyvr11pd",focus:"fyvr11pe",hover:"fyvr11pf",checked:"fyvr11pg"},defaultClass:"fyvr11pb"},gradientSecondary:{conditions:{base:"fyvr11ph",active:"fyvr11pi",disabled:"fyvr11pj",focus:"fyvr11pk",hover:"fyvr11pl",checked:"fyvr11pm"},defaultClass:"fyvr11ph"},arbitrumDark:{conditions:{base:"fyvr11pn",active:"fyvr11po",disabled:"fyvr11pp",focus:"fyvr11pq",hover:"fyvr11pr",checked:"fyvr11ps"},defaultClass:"fyvr11pn"},arbitrumLight:{conditions:{base:"fyvr11pt",active:"fyvr11pu",disabled:"fyvr11pv",focus:"fyvr11pw",hover:"fyvr11px",checked:"fyvr11py"},defaultClass:"fyvr11pt"},avalanceDark:{conditions:{base:"fyvr11pz",active:"fyvr11q0",disabled:"fyvr11q1",focus:"fyvr11q2",hover:"fyvr11q3",checked:"fyvr11q4"},defaultClass:"fyvr11pz"},avalanceLight:{conditions:{base:"fyvr11q5",active:"fyvr11q6",disabled:"fyvr11q7",focus:"fyvr11q8",hover:"fyvr11q9",checked:"fyvr11qa"},defaultClass:"fyvr11q5"},bscDark:{conditions:{base:"fyvr11qb",active:"fyvr11qc",disabled:"fyvr11qd",focus:"fyvr11qe",hover:"fyvr11qf",checked:"fyvr11qg"},defaultClass:"fyvr11qb"},bscLight:{conditions:{base:"fyvr11qh",active:"fyvr11qi",disabled:"fyvr11qj",focus:"fyvr11qk",hover:"fyvr11ql",checked:"fyvr11qm"},defaultClass:"fyvr11qh"},ethereumDark:{conditions:{base:"fyvr11qn",active:"fyvr11qo",disabled:"fyvr11qp",focus:"fyvr11qq",hover:"fyvr11qr",checked:"fyvr11qs"},defaultClass:"fyvr11qn"},ethereumLight:{conditions:{base:"fyvr11qt",active:"fyvr11qu",disabled:"fyvr11qv",focus:"fyvr11qw",hover:"fyvr11qx",checked:"fyvr11qy"},defaultClass:"fyvr11qt"},gnosisDark:{conditions:{base:"fyvr11qz",active:"fyvr11r0",disabled:"fyvr11r1",focus:"fyvr11r2",hover:"fyvr11r3",checked:"fyvr11r4"},defaultClass:"fyvr11qz"},gnosisLight:{conditions:{base:"fyvr11r5",active:"fyvr11r6",disabled:"fyvr11r7",focus:"fyvr11r8",hover:"fyvr11r9",checked:"fyvr11ra"},defaultClass:"fyvr11r5"},polygonDark:{conditions:{base:"fyvr11rb",active:"fyvr11rc",disabled:"fyvr11rd",focus:"fyvr11re",hover:"fyvr11rf",checked:"fyvr11rg"},defaultClass:"fyvr11rb"},polygonLight:{conditions:{base:"fyvr11rh",active:"fyvr11ri",disabled:"fyvr11rj",focus:"fyvr11rk",hover:"fyvr11rl",checked:"fyvr11rm"},defaultClass:"fyvr11rh"},text100:{conditions:{base:"fyvr11rn",active:"fyvr11ro",disabled:"fyvr11rp",focus:"fyvr11rq",hover:"fyvr11rr",checked:"fyvr11rs"},defaultClass:"fyvr11rn"},text80:{conditions:{base:"fyvr11rt",active:"fyvr11ru",disabled:"fyvr11rv",focus:"fyvr11rw",hover:"fyvr11rx",checked:"fyvr11ry"},defaultClass:"fyvr11rt"},text50:{conditions:{base:"fyvr11rz",active:"fyvr11s0",disabled:"fyvr11s1",focus:"fyvr11s2",hover:"fyvr11s3",checked:"fyvr11s4"},defaultClass:"fyvr11rz"},textInverse100:{conditions:{base:"fyvr11s5",active:"fyvr11s6",disabled:"fyvr11s7",focus:"fyvr11s8",hover:"fyvr11s9",checked:"fyvr11sa"},defaultClass:"fyvr11s5"},backgroundPrimary:{conditions:{base:"fyvr11sb",active:"fyvr11sc",disabled:"fyvr11sd",focus:"fyvr11se",hover:"fyvr11sf",checked:"fyvr11sg"},defaultClass:"fyvr11sb"},backgroundSecondary:{conditions:{base:"fyvr11sh",active:"fyvr11si",disabled:"fyvr11sj",focus:"fyvr11sk",hover:"fyvr11sl",checked:"fyvr11sm"},defaultClass:"fyvr11sh"},backgroundContrast:{conditions:{base:"fyvr11sn",active:"fyvr11so",disabled:"fyvr11sp",focus:"fyvr11sq",hover:"fyvr11sr",checked:"fyvr11ss"},defaultClass:"fyvr11sn"},backgroundMuted:{conditions:{base:"fyvr11st",active:"fyvr11su",disabled:"fyvr11sv",focus:"fyvr11sw",hover:"fyvr11sx",checked:"fyvr11sy"},defaultClass:"fyvr11st"},backgroundControl:{conditions:{base:"fyvr11sz",active:"fyvr11t0",disabled:"fyvr11t1",focus:"fyvr11t2",hover:"fyvr11t3",checked:"fyvr11t4"},defaultClass:"fyvr11sz"},backgroundInverse:{conditions:{base:"fyvr11t5",active:"fyvr11t6",disabled:"fyvr11t7",focus:"fyvr11t8",hover:"fyvr11t9",checked:"fyvr11ta"},defaultClass:"fyvr11t5"},backgroundBackdrop:{conditions:{base:"fyvr11tb",active:"fyvr11tc",disabled:"fyvr11td",focus:"fyvr11te",hover:"fyvr11tf",checked:"fyvr11tg"},defaultClass:"fyvr11tb"},backgroundOverlay:{conditions:{base:"fyvr11th",active:"fyvr11ti",disabled:"fyvr11tj",focus:"fyvr11tk",hover:"fyvr11tl",checked:"fyvr11tm"},defaultClass:"fyvr11th"},backgroundRaised:{conditions:{base:"fyvr11tn",active:"fyvr11to",disabled:"fyvr11tp",focus:"fyvr11tq",hover:"fyvr11tr",checked:"fyvr11ts"},defaultClass:"fyvr11tn"},buttonGlass:{conditions:{base:"fyvr11tt",active:"fyvr11tu",disabled:"fyvr11tv",focus:"fyvr11tw",hover:"fyvr11tx",checked:"fyvr11ty"},defaultClass:"fyvr11tt"},buttonEmphasis:{conditions:{base:"fyvr11tz",active:"fyvr11u0",disabled:"fyvr11u1",focus:"fyvr11u2",hover:"fyvr11u3",checked:"fyvr11u4"},defaultClass:"fyvr11tz"},buttonInverse:{conditions:{base:"fyvr11u5",active:"fyvr11u6",disabled:"fyvr11u7",focus:"fyvr11u8",hover:"fyvr11u9",checked:"fyvr11ua"},defaultClass:"fyvr11u5"},borderNormal:{conditions:{base:"fyvr11ub",active:"fyvr11uc",disabled:"fyvr11ud",focus:"fyvr11ue",hover:"fyvr11uf",checked:"fyvr11ug"},defaultClass:"fyvr11ub"},borderFocus:{conditions:{base:"fyvr11uh",active:"fyvr11ui",disabled:"fyvr11uj",focus:"fyvr11uk",hover:"fyvr11ul",checked:"fyvr11um"},defaultClass:"fyvr11uh"}}},borderBottomColor:{values:{black:{conditions:{base:"fyvr11un",active:"fyvr11uo",disabled:"fyvr11up",focus:"fyvr11uq",hover:"fyvr11ur",checked:"fyvr11us"},defaultClass:"fyvr11un"},white:{conditions:{base:"fyvr11ut",active:"fyvr11uu",disabled:"fyvr11uv",focus:"fyvr11uw",hover:"fyvr11ux",checked:"fyvr11uy"},defaultClass:"fyvr11ut"},inherit:{conditions:{base:"fyvr11uz",active:"fyvr11v0",disabled:"fyvr11v1",focus:"fyvr11v2",hover:"fyvr11v3",checked:"fyvr11v4"},defaultClass:"fyvr11uz"},transparent:{conditions:{base:"fyvr11v5",active:"fyvr11v6",disabled:"fyvr11v7",focus:"fyvr11v8",hover:"fyvr11v9",checked:"fyvr11va"},defaultClass:"fyvr11v5"},positive:{conditions:{base:"fyvr11vb",active:"fyvr11vc",disabled:"fyvr11vd",focus:"fyvr11ve",hover:"fyvr11vf",checked:"fyvr11vg"},defaultClass:"fyvr11vb"},negative:{conditions:{base:"fyvr11vh",active:"fyvr11vi",disabled:"fyvr11vj",focus:"fyvr11vk",hover:"fyvr11vl",checked:"fyvr11vm"},defaultClass:"fyvr11vh"},info:{conditions:{base:"fyvr11vn",active:"fyvr11vo",disabled:"fyvr11vp",focus:"fyvr11vq",hover:"fyvr11vr",checked:"fyvr11vs"},defaultClass:"fyvr11vn"},warning:{conditions:{base:"fyvr11vt",active:"fyvr11vu",disabled:"fyvr11vv",focus:"fyvr11vw",hover:"fyvr11vx",checked:"fyvr11vy"},defaultClass:"fyvr11vt"},gradientBackdrop:{conditions:{base:"fyvr11vz",active:"fyvr11w0",disabled:"fyvr11w1",focus:"fyvr11w2",hover:"fyvr11w3",checked:"fyvr11w4"},defaultClass:"fyvr11vz"},gradientPrimary:{conditions:{base:"fyvr11w5",active:"fyvr11w6",disabled:"fyvr11w7",focus:"fyvr11w8",hover:"fyvr11w9",checked:"fyvr11wa"},defaultClass:"fyvr11w5"},gradientSecondary:{conditions:{base:"fyvr11wb",active:"fyvr11wc",disabled:"fyvr11wd",focus:"fyvr11we",hover:"fyvr11wf",checked:"fyvr11wg"},defaultClass:"fyvr11wb"},arbitrumDark:{conditions:{base:"fyvr11wh",active:"fyvr11wi",disabled:"fyvr11wj",focus:"fyvr11wk",hover:"fyvr11wl",checked:"fyvr11wm"},defaultClass:"fyvr11wh"},arbitrumLight:{conditions:{base:"fyvr11wn",active:"fyvr11wo",disabled:"fyvr11wp",focus:"fyvr11wq",hover:"fyvr11wr",checked:"fyvr11ws"},defaultClass:"fyvr11wn"},avalanceDark:{conditions:{base:"fyvr11wt",active:"fyvr11wu",disabled:"fyvr11wv",focus:"fyvr11ww",hover:"fyvr11wx",checked:"fyvr11wy"},defaultClass:"fyvr11wt"},avalanceLight:{conditions:{base:"fyvr11wz",active:"fyvr11x0",disabled:"fyvr11x1",focus:"fyvr11x2",hover:"fyvr11x3",checked:"fyvr11x4"},defaultClass:"fyvr11wz"},bscDark:{conditions:{base:"fyvr11x5",active:"fyvr11x6",disabled:"fyvr11x7",focus:"fyvr11x8",hover:"fyvr11x9",checked:"fyvr11xa"},defaultClass:"fyvr11x5"},bscLight:{conditions:{base:"fyvr11xb",active:"fyvr11xc",disabled:"fyvr11xd",focus:"fyvr11xe",hover:"fyvr11xf",checked:"fyvr11xg"},defaultClass:"fyvr11xb"},ethereumDark:{conditions:{base:"fyvr11xh",active:"fyvr11xi",disabled:"fyvr11xj",focus:"fyvr11xk",hover:"fyvr11xl",checked:"fyvr11xm"},defaultClass:"fyvr11xh"},ethereumLight:{conditions:{base:"fyvr11xn",active:"fyvr11xo",disabled:"fyvr11xp",focus:"fyvr11xq",hover:"fyvr11xr",checked:"fyvr11xs"},defaultClass:"fyvr11xn"},gnosisDark:{conditions:{base:"fyvr11xt",active:"fyvr11xu",disabled:"fyvr11xv",focus:"fyvr11xw",hover:"fyvr11xx",checked:"fyvr11xy"},defaultClass:"fyvr11xt"},gnosisLight:{conditions:{base:"fyvr11xz",active:"fyvr11y0",disabled:"fyvr11y1",focus:"fyvr11y2",hover:"fyvr11y3",checked:"fyvr11y4"},defaultClass:"fyvr11xz"},polygonDark:{conditions:{base:"fyvr11y5",active:"fyvr11y6",disabled:"fyvr11y7",focus:"fyvr11y8",hover:"fyvr11y9",checked:"fyvr11ya"},defaultClass:"fyvr11y5"},polygonLight:{conditions:{base:"fyvr11yb",active:"fyvr11yc",disabled:"fyvr11yd",focus:"fyvr11ye",hover:"fyvr11yf",checked:"fyvr11yg"},defaultClass:"fyvr11yb"},text100:{conditions:{base:"fyvr11yh",active:"fyvr11yi",disabled:"fyvr11yj",focus:"fyvr11yk",hover:"fyvr11yl",checked:"fyvr11ym"},defaultClass:"fyvr11yh"},text80:{conditions:{base:"fyvr11yn",active:"fyvr11yo",disabled:"fyvr11yp",focus:"fyvr11yq",hover:"fyvr11yr",checked:"fyvr11ys"},defaultClass:"fyvr11yn"},text50:{conditions:{base:"fyvr11yt",active:"fyvr11yu",disabled:"fyvr11yv",focus:"fyvr11yw",hover:"fyvr11yx",checked:"fyvr11yy"},defaultClass:"fyvr11yt"},textInverse100:{conditions:{base:"fyvr11yz",active:"fyvr11z0",disabled:"fyvr11z1",focus:"fyvr11z2",hover:"fyvr11z3",checked:"fyvr11z4"},defaultClass:"fyvr11yz"},backgroundPrimary:{conditions:{base:"fyvr11z5",active:"fyvr11z6",disabled:"fyvr11z7",focus:"fyvr11z8",hover:"fyvr11z9",checked:"fyvr11za"},defaultClass:"fyvr11z5"},backgroundSecondary:{conditions:{base:"fyvr11zb",active:"fyvr11zc",disabled:"fyvr11zd",focus:"fyvr11ze",hover:"fyvr11zf",checked:"fyvr11zg"},defaultClass:"fyvr11zb"},backgroundContrast:{conditions:{base:"fyvr11zh",active:"fyvr11zi",disabled:"fyvr11zj",focus:"fyvr11zk",hover:"fyvr11zl",checked:"fyvr11zm"},defaultClass:"fyvr11zh"},backgroundMuted:{conditions:{base:"fyvr11zn",active:"fyvr11zo",disabled:"fyvr11zp",focus:"fyvr11zq",hover:"fyvr11zr",checked:"fyvr11zs"},defaultClass:"fyvr11zn"},backgroundControl:{conditions:{base:"fyvr11zt",active:"fyvr11zu",disabled:"fyvr11zv",focus:"fyvr11zw",hover:"fyvr11zx",checked:"fyvr11zy"},defaultClass:"fyvr11zt"},backgroundInverse:{conditions:{base:"fyvr11zz",active:"fyvr1200",disabled:"fyvr1201",focus:"fyvr1202",hover:"fyvr1203",checked:"fyvr1204"},defaultClass:"fyvr11zz"},backgroundBackdrop:{conditions:{base:"fyvr1205",active:"fyvr1206",disabled:"fyvr1207",focus:"fyvr1208",hover:"fyvr1209",checked:"fyvr120a"},defaultClass:"fyvr1205"},backgroundOverlay:{conditions:{base:"fyvr120b",active:"fyvr120c",disabled:"fyvr120d",focus:"fyvr120e",hover:"fyvr120f",checked:"fyvr120g"},defaultClass:"fyvr120b"},backgroundRaised:{conditions:{base:"fyvr120h",active:"fyvr120i",disabled:"fyvr120j",focus:"fyvr120k",hover:"fyvr120l",checked:"fyvr120m"},defaultClass:"fyvr120h"},buttonGlass:{conditions:{base:"fyvr120n",active:"fyvr120o",disabled:"fyvr120p",focus:"fyvr120q",hover:"fyvr120r",checked:"fyvr120s"},defaultClass:"fyvr120n"},buttonEmphasis:{conditions:{base:"fyvr120t",active:"fyvr120u",disabled:"fyvr120v",focus:"fyvr120w",hover:"fyvr120x",checked:"fyvr120y"},defaultClass:"fyvr120t"},buttonInverse:{conditions:{base:"fyvr120z",active:"fyvr1210",disabled:"fyvr1211",focus:"fyvr1212",hover:"fyvr1213",checked:"fyvr1214"},defaultClass:"fyvr120z"},borderNormal:{conditions:{base:"fyvr1215",active:"fyvr1216",disabled:"fyvr1217",focus:"fyvr1218",hover:"fyvr1219",checked:"fyvr121a"},defaultClass:"fyvr1215"},borderFocus:{conditions:{base:"fyvr121b",active:"fyvr121c",disabled:"fyvr121d",focus:"fyvr121e",hover:"fyvr121f",checked:"fyvr121g"},defaultClass:"fyvr121b"}}},borderBottomStyle:{values:{solid:{conditions:{base:"fyvr121h",active:"fyvr121i",disabled:"fyvr121j",focus:"fyvr121k",hover:"fyvr121l",checked:"fyvr121m"},defaultClass:"fyvr121h"},dashed:{conditions:{base:"fyvr121n",active:"fyvr121o",disabled:"fyvr121p",focus:"fyvr121q",hover:"fyvr121r",checked:"fyvr121s"},defaultClass:"fyvr121n"},dotted:{conditions:{base:"fyvr121t",active:"fyvr121u",disabled:"fyvr121v",focus:"fyvr121w",hover:"fyvr121x",checked:"fyvr121y"},defaultClass:"fyvr121t"}}},borderLeftColor:{values:{black:{conditions:{base:"fyvr121z",active:"fyvr1220",disabled:"fyvr1221",focus:"fyvr1222",hover:"fyvr1223",checked:"fyvr1224"},defaultClass:"fyvr121z"},white:{conditions:{base:"fyvr1225",active:"fyvr1226",disabled:"fyvr1227",focus:"fyvr1228",hover:"fyvr1229",checked:"fyvr122a"},defaultClass:"fyvr1225"},inherit:{conditions:{base:"fyvr122b",active:"fyvr122c",disabled:"fyvr122d",focus:"fyvr122e",hover:"fyvr122f",checked:"fyvr122g"},defaultClass:"fyvr122b"},transparent:{conditions:{base:"fyvr122h",active:"fyvr122i",disabled:"fyvr122j",focus:"fyvr122k",hover:"fyvr122l",checked:"fyvr122m"},defaultClass:"fyvr122h"},positive:{conditions:{base:"fyvr122n",active:"fyvr122o",disabled:"fyvr122p",focus:"fyvr122q",hover:"fyvr122r",checked:"fyvr122s"},defaultClass:"fyvr122n"},negative:{conditions:{base:"fyvr122t",active:"fyvr122u",disabled:"fyvr122v",focus:"fyvr122w",hover:"fyvr122x",checked:"fyvr122y"},defaultClass:"fyvr122t"},info:{conditions:{base:"fyvr122z",active:"fyvr1230",disabled:"fyvr1231",focus:"fyvr1232",hover:"fyvr1233",checked:"fyvr1234"},defaultClass:"fyvr122z"},warning:{conditions:{base:"fyvr1235",active:"fyvr1236",disabled:"fyvr1237",focus:"fyvr1238",hover:"fyvr1239",checked:"fyvr123a"},defaultClass:"fyvr1235"},gradientBackdrop:{conditions:{base:"fyvr123b",active:"fyvr123c",disabled:"fyvr123d",focus:"fyvr123e",hover:"fyvr123f",checked:"fyvr123g"},defaultClass:"fyvr123b"},gradientPrimary:{conditions:{base:"fyvr123h",active:"fyvr123i",disabled:"fyvr123j",focus:"fyvr123k",hover:"fyvr123l",checked:"fyvr123m"},defaultClass:"fyvr123h"},gradientSecondary:{conditions:{base:"fyvr123n",active:"fyvr123o",disabled:"fyvr123p",focus:"fyvr123q",hover:"fyvr123r",checked:"fyvr123s"},defaultClass:"fyvr123n"},arbitrumDark:{conditions:{base:"fyvr123t",active:"fyvr123u",disabled:"fyvr123v",focus:"fyvr123w",hover:"fyvr123x",checked:"fyvr123y"},defaultClass:"fyvr123t"},arbitrumLight:{conditions:{base:"fyvr123z",active:"fyvr1240",disabled:"fyvr1241",focus:"fyvr1242",hover:"fyvr1243",checked:"fyvr1244"},defaultClass:"fyvr123z"},avalanceDark:{conditions:{base:"fyvr1245",active:"fyvr1246",disabled:"fyvr1247",focus:"fyvr1248",hover:"fyvr1249",checked:"fyvr124a"},defaultClass:"fyvr1245"},avalanceLight:{conditions:{base:"fyvr124b",active:"fyvr124c",disabled:"fyvr124d",focus:"fyvr124e",hover:"fyvr124f",checked:"fyvr124g"},defaultClass:"fyvr124b"},bscDark:{conditions:{base:"fyvr124h",active:"fyvr124i",disabled:"fyvr124j",focus:"fyvr124k",hover:"fyvr124l",checked:"fyvr124m"},defaultClass:"fyvr124h"},bscLight:{conditions:{base:"fyvr124n",active:"fyvr124o",disabled:"fyvr124p",focus:"fyvr124q",hover:"fyvr124r",checked:"fyvr124s"},defaultClass:"fyvr124n"},ethereumDark:{conditions:{base:"fyvr124t",active:"fyvr124u",disabled:"fyvr124v",focus:"fyvr124w",hover:"fyvr124x",checked:"fyvr124y"},defaultClass:"fyvr124t"},ethereumLight:{conditions:{base:"fyvr124z",active:"fyvr1250",disabled:"fyvr1251",focus:"fyvr1252",hover:"fyvr1253",checked:"fyvr1254"},defaultClass:"fyvr124z"},gnosisDark:{conditions:{base:"fyvr1255",active:"fyvr1256",disabled:"fyvr1257",focus:"fyvr1258",hover:"fyvr1259",checked:"fyvr125a"},defaultClass:"fyvr1255"},gnosisLight:{conditions:{base:"fyvr125b",active:"fyvr125c",disabled:"fyvr125d",focus:"fyvr125e",hover:"fyvr125f",checked:"fyvr125g"},defaultClass:"fyvr125b"},polygonDark:{conditions:{base:"fyvr125h",active:"fyvr125i",disabled:"fyvr125j",focus:"fyvr125k",hover:"fyvr125l",checked:"fyvr125m"},defaultClass:"fyvr125h"},polygonLight:{conditions:{base:"fyvr125n",active:"fyvr125o",disabled:"fyvr125p",focus:"fyvr125q",hover:"fyvr125r",checked:"fyvr125s"},defaultClass:"fyvr125n"},text100:{conditions:{base:"fyvr125t",active:"fyvr125u",disabled:"fyvr125v",focus:"fyvr125w",hover:"fyvr125x",checked:"fyvr125y"},defaultClass:"fyvr125t"},text80:{conditions:{base:"fyvr125z",active:"fyvr1260",disabled:"fyvr1261",focus:"fyvr1262",hover:"fyvr1263",checked:"fyvr1264"},defaultClass:"fyvr125z"},text50:{conditions:{base:"fyvr1265",active:"fyvr1266",disabled:"fyvr1267",focus:"fyvr1268",hover:"fyvr1269",checked:"fyvr126a"},defaultClass:"fyvr1265"},textInverse100:{conditions:{base:"fyvr126b",active:"fyvr126c",disabled:"fyvr126d",focus:"fyvr126e",hover:"fyvr126f",checked:"fyvr126g"},defaultClass:"fyvr126b"},backgroundPrimary:{conditions:{base:"fyvr126h",active:"fyvr126i",disabled:"fyvr126j",focus:"fyvr126k",hover:"fyvr126l",checked:"fyvr126m"},defaultClass:"fyvr126h"},backgroundSecondary:{conditions:{base:"fyvr126n",active:"fyvr126o",disabled:"fyvr126p",focus:"fyvr126q",hover:"fyvr126r",checked:"fyvr126s"},defaultClass:"fyvr126n"},backgroundContrast:{conditions:{base:"fyvr126t",active:"fyvr126u",disabled:"fyvr126v",focus:"fyvr126w",hover:"fyvr126x",checked:"fyvr126y"},defaultClass:"fyvr126t"},backgroundMuted:{conditions:{base:"fyvr126z",active:"fyvr1270",disabled:"fyvr1271",focus:"fyvr1272",hover:"fyvr1273",checked:"fyvr1274"},defaultClass:"fyvr126z"},backgroundControl:{conditions:{base:"fyvr1275",active:"fyvr1276",disabled:"fyvr1277",focus:"fyvr1278",hover:"fyvr1279",checked:"fyvr127a"},defaultClass:"fyvr1275"},backgroundInverse:{conditions:{base:"fyvr127b",active:"fyvr127c",disabled:"fyvr127d",focus:"fyvr127e",hover:"fyvr127f",checked:"fyvr127g"},defaultClass:"fyvr127b"},backgroundBackdrop:{conditions:{base:"fyvr127h",active:"fyvr127i",disabled:"fyvr127j",focus:"fyvr127k",hover:"fyvr127l",checked:"fyvr127m"},defaultClass:"fyvr127h"},backgroundOverlay:{conditions:{base:"fyvr127n",active:"fyvr127o",disabled:"fyvr127p",focus:"fyvr127q",hover:"fyvr127r",checked:"fyvr127s"},defaultClass:"fyvr127n"},backgroundRaised:{conditions:{base:"fyvr127t",active:"fyvr127u",disabled:"fyvr127v",focus:"fyvr127w",hover:"fyvr127x",checked:"fyvr127y"},defaultClass:"fyvr127t"},buttonGlass:{conditions:{base:"fyvr127z",active:"fyvr1280",disabled:"fyvr1281",focus:"fyvr1282",hover:"fyvr1283",checked:"fyvr1284"},defaultClass:"fyvr127z"},buttonEmphasis:{conditions:{base:"fyvr1285",active:"fyvr1286",disabled:"fyvr1287",focus:"fyvr1288",hover:"fyvr1289",checked:"fyvr128a"},defaultClass:"fyvr1285"},buttonInverse:{conditions:{base:"fyvr128b",active:"fyvr128c",disabled:"fyvr128d",focus:"fyvr128e",hover:"fyvr128f",checked:"fyvr128g"},defaultClass:"fyvr128b"},borderNormal:{conditions:{base:"fyvr128h",active:"fyvr128i",disabled:"fyvr128j",focus:"fyvr128k",hover:"fyvr128l",checked:"fyvr128m"},defaultClass:"fyvr128h"},borderFocus:{conditions:{base:"fyvr128n",active:"fyvr128o",disabled:"fyvr128p",focus:"fyvr128q",hover:"fyvr128r",checked:"fyvr128s"},defaultClass:"fyvr128n"}}},borderLeftStyle:{values:{solid:{conditions:{base:"fyvr128t",active:"fyvr128u",disabled:"fyvr128v",focus:"fyvr128w",hover:"fyvr128x",checked:"fyvr128y"},defaultClass:"fyvr128t"},dashed:{conditions:{base:"fyvr128z",active:"fyvr1290",disabled:"fyvr1291",focus:"fyvr1292",hover:"fyvr1293",checked:"fyvr1294"},defaultClass:"fyvr128z"},dotted:{conditions:{base:"fyvr1295",active:"fyvr1296",disabled:"fyvr1297",focus:"fyvr1298",hover:"fyvr1299",checked:"fyvr129a"},defaultClass:"fyvr1295"}}},borderRightColor:{values:{black:{conditions:{base:"fyvr129b",active:"fyvr129c",disabled:"fyvr129d",focus:"fyvr129e",hover:"fyvr129f",checked:"fyvr129g"},defaultClass:"fyvr129b"},white:{conditions:{base:"fyvr129h",active:"fyvr129i",disabled:"fyvr129j",focus:"fyvr129k",hover:"fyvr129l",checked:"fyvr129m"},defaultClass:"fyvr129h"},inherit:{conditions:{base:"fyvr129n",active:"fyvr129o",disabled:"fyvr129p",focus:"fyvr129q",hover:"fyvr129r",checked:"fyvr129s"},defaultClass:"fyvr129n"},transparent:{conditions:{base:"fyvr129t",active:"fyvr129u",disabled:"fyvr129v",focus:"fyvr129w",hover:"fyvr129x",checked:"fyvr129y"},defaultClass:"fyvr129t"},positive:{conditions:{base:"fyvr129z",active:"fyvr12a0",disabled:"fyvr12a1",focus:"fyvr12a2",hover:"fyvr12a3",checked:"fyvr12a4"},defaultClass:"fyvr129z"},negative:{conditions:{base:"fyvr12a5",active:"fyvr12a6",disabled:"fyvr12a7",focus:"fyvr12a8",hover:"fyvr12a9",checked:"fyvr12aa"},defaultClass:"fyvr12a5"},info:{conditions:{base:"fyvr12ab",active:"fyvr12ac",disabled:"fyvr12ad",focus:"fyvr12ae",hover:"fyvr12af",checked:"fyvr12ag"},defaultClass:"fyvr12ab"},warning:{conditions:{base:"fyvr12ah",active:"fyvr12ai",disabled:"fyvr12aj",focus:"fyvr12ak",hover:"fyvr12al",checked:"fyvr12am"},defaultClass:"fyvr12ah"},gradientBackdrop:{conditions:{base:"fyvr12an",active:"fyvr12ao",disabled:"fyvr12ap",focus:"fyvr12aq",hover:"fyvr12ar",checked:"fyvr12as"},defaultClass:"fyvr12an"},gradientPrimary:{conditions:{base:"fyvr12at",active:"fyvr12au",disabled:"fyvr12av",focus:"fyvr12aw",hover:"fyvr12ax",checked:"fyvr12ay"},defaultClass:"fyvr12at"},gradientSecondary:{conditions:{base:"fyvr12az",active:"fyvr12b0",disabled:"fyvr12b1",focus:"fyvr12b2",hover:"fyvr12b3",checked:"fyvr12b4"},defaultClass:"fyvr12az"},arbitrumDark:{conditions:{base:"fyvr12b5",active:"fyvr12b6",disabled:"fyvr12b7",focus:"fyvr12b8",hover:"fyvr12b9",checked:"fyvr12ba"},defaultClass:"fyvr12b5"},arbitrumLight:{conditions:{base:"fyvr12bb",active:"fyvr12bc",disabled:"fyvr12bd",focus:"fyvr12be",hover:"fyvr12bf",checked:"fyvr12bg"},defaultClass:"fyvr12bb"},avalanceDark:{conditions:{base:"fyvr12bh",active:"fyvr12bi",disabled:"fyvr12bj",focus:"fyvr12bk",hover:"fyvr12bl",checked:"fyvr12bm"},defaultClass:"fyvr12bh"},avalanceLight:{conditions:{base:"fyvr12bn",active:"fyvr12bo",disabled:"fyvr12bp",focus:"fyvr12bq",hover:"fyvr12br",checked:"fyvr12bs"},defaultClass:"fyvr12bn"},bscDark:{conditions:{base:"fyvr12bt",active:"fyvr12bu",disabled:"fyvr12bv",focus:"fyvr12bw",hover:"fyvr12bx",checked:"fyvr12by"},defaultClass:"fyvr12bt"},bscLight:{conditions:{base:"fyvr12bz",active:"fyvr12c0",disabled:"fyvr12c1",focus:"fyvr12c2",hover:"fyvr12c3",checked:"fyvr12c4"},defaultClass:"fyvr12bz"},ethereumDark:{conditions:{base:"fyvr12c5",active:"fyvr12c6",disabled:"fyvr12c7",focus:"fyvr12c8",hover:"fyvr12c9",checked:"fyvr12ca"},defaultClass:"fyvr12c5"},ethereumLight:{conditions:{base:"fyvr12cb",active:"fyvr12cc",disabled:"fyvr12cd",focus:"fyvr12ce",hover:"fyvr12cf",checked:"fyvr12cg"},defaultClass:"fyvr12cb"},gnosisDark:{conditions:{base:"fyvr12ch",active:"fyvr12ci",disabled:"fyvr12cj",focus:"fyvr12ck",hover:"fyvr12cl",checked:"fyvr12cm"},defaultClass:"fyvr12ch"},gnosisLight:{conditions:{base:"fyvr12cn",active:"fyvr12co",disabled:"fyvr12cp",focus:"fyvr12cq",hover:"fyvr12cr",checked:"fyvr12cs"},defaultClass:"fyvr12cn"},polygonDark:{conditions:{base:"fyvr12ct",active:"fyvr12cu",disabled:"fyvr12cv",focus:"fyvr12cw",hover:"fyvr12cx",checked:"fyvr12cy"},defaultClass:"fyvr12ct"},polygonLight:{conditions:{base:"fyvr12cz",active:"fyvr12d0",disabled:"fyvr12d1",focus:"fyvr12d2",hover:"fyvr12d3",checked:"fyvr12d4"},defaultClass:"fyvr12cz"},text100:{conditions:{base:"fyvr12d5",active:"fyvr12d6",disabled:"fyvr12d7",focus:"fyvr12d8",hover:"fyvr12d9",checked:"fyvr12da"},defaultClass:"fyvr12d5"},text80:{conditions:{base:"fyvr12db",active:"fyvr12dc",disabled:"fyvr12dd",focus:"fyvr12de",hover:"fyvr12df",checked:"fyvr12dg"},defaultClass:"fyvr12db"},text50:{conditions:{base:"fyvr12dh",active:"fyvr12di",disabled:"fyvr12dj",focus:"fyvr12dk",hover:"fyvr12dl",checked:"fyvr12dm"},defaultClass:"fyvr12dh"},textInverse100:{conditions:{base:"fyvr12dn",active:"fyvr12do",disabled:"fyvr12dp",focus:"fyvr12dq",hover:"fyvr12dr",checked:"fyvr12ds"},defaultClass:"fyvr12dn"},backgroundPrimary:{conditions:{base:"fyvr12dt",active:"fyvr12du",disabled:"fyvr12dv",focus:"fyvr12dw",hover:"fyvr12dx",checked:"fyvr12dy"},defaultClass:"fyvr12dt"},backgroundSecondary:{conditions:{base:"fyvr12dz",active:"fyvr12e0",disabled:"fyvr12e1",focus:"fyvr12e2",hover:"fyvr12e3",checked:"fyvr12e4"},defaultClass:"fyvr12dz"},backgroundContrast:{conditions:{base:"fyvr12e5",active:"fyvr12e6",disabled:"fyvr12e7",focus:"fyvr12e8",hover:"fyvr12e9",checked:"fyvr12ea"},defaultClass:"fyvr12e5"},backgroundMuted:{conditions:{base:"fyvr12eb",active:"fyvr12ec",disabled:"fyvr12ed",focus:"fyvr12ee",hover:"fyvr12ef",checked:"fyvr12eg"},defaultClass:"fyvr12eb"},backgroundControl:{conditions:{base:"fyvr12eh",active:"fyvr12ei",disabled:"fyvr12ej",focus:"fyvr12ek",hover:"fyvr12el",checked:"fyvr12em"},defaultClass:"fyvr12eh"},backgroundInverse:{conditions:{base:"fyvr12en",active:"fyvr12eo",disabled:"fyvr12ep",focus:"fyvr12eq",hover:"fyvr12er",checked:"fyvr12es"},defaultClass:"fyvr12en"},backgroundBackdrop:{conditions:{base:"fyvr12et",active:"fyvr12eu",disabled:"fyvr12ev",focus:"fyvr12ew",hover:"fyvr12ex",checked:"fyvr12ey"},defaultClass:"fyvr12et"},backgroundOverlay:{conditions:{base:"fyvr12ez",active:"fyvr12f0",disabled:"fyvr12f1",focus:"fyvr12f2",hover:"fyvr12f3",checked:"fyvr12f4"},defaultClass:"fyvr12ez"},backgroundRaised:{conditions:{base:"fyvr12f5",active:"fyvr12f6",disabled:"fyvr12f7",focus:"fyvr12f8",hover:"fyvr12f9",checked:"fyvr12fa"},defaultClass:"fyvr12f5"},buttonGlass:{conditions:{base:"fyvr12fb",active:"fyvr12fc",disabled:"fyvr12fd",focus:"fyvr12fe",hover:"fyvr12ff",checked:"fyvr12fg"},defaultClass:"fyvr12fb"},buttonEmphasis:{conditions:{base:"fyvr12fh",active:"fyvr12fi",disabled:"fyvr12fj",focus:"fyvr12fk",hover:"fyvr12fl",checked:"fyvr12fm"},defaultClass:"fyvr12fh"},buttonInverse:{conditions:{base:"fyvr12fn",active:"fyvr12fo",disabled:"fyvr12fp",focus:"fyvr12fq",hover:"fyvr12fr",checked:"fyvr12fs"},defaultClass:"fyvr12fn"},borderNormal:{conditions:{base:"fyvr12ft",active:"fyvr12fu",disabled:"fyvr12fv",focus:"fyvr12fw",hover:"fyvr12fx",checked:"fyvr12fy"},defaultClass:"fyvr12ft"},borderFocus:{conditions:{base:"fyvr12fz",active:"fyvr12g0",disabled:"fyvr12g1",focus:"fyvr12g2",hover:"fyvr12g3",checked:"fyvr12g4"},defaultClass:"fyvr12fz"}}},borderRightStyle:{values:{solid:{conditions:{base:"fyvr12g5",active:"fyvr12g6",disabled:"fyvr12g7",focus:"fyvr12g8",hover:"fyvr12g9",checked:"fyvr12ga"},defaultClass:"fyvr12g5"},dashed:{conditions:{base:"fyvr12gb",active:"fyvr12gc",disabled:"fyvr12gd",focus:"fyvr12ge",hover:"fyvr12gf",checked:"fyvr12gg"},defaultClass:"fyvr12gb"},dotted:{conditions:{base:"fyvr12gh",active:"fyvr12gi",disabled:"fyvr12gj",focus:"fyvr12gk",hover:"fyvr12gl",checked:"fyvr12gm"},defaultClass:"fyvr12gh"}}},borderTopColor:{values:{black:{conditions:{base:"fyvr12gn",active:"fyvr12go",disabled:"fyvr12gp",focus:"fyvr12gq",hover:"fyvr12gr",checked:"fyvr12gs"},defaultClass:"fyvr12gn"},white:{conditions:{base:"fyvr12gt",active:"fyvr12gu",disabled:"fyvr12gv",focus:"fyvr12gw",hover:"fyvr12gx",checked:"fyvr12gy"},defaultClass:"fyvr12gt"},inherit:{conditions:{base:"fyvr12gz",active:"fyvr12h0",disabled:"fyvr12h1",focus:"fyvr12h2",hover:"fyvr12h3",checked:"fyvr12h4"},defaultClass:"fyvr12gz"},transparent:{conditions:{base:"fyvr12h5",active:"fyvr12h6",disabled:"fyvr12h7",focus:"fyvr12h8",hover:"fyvr12h9",checked:"fyvr12ha"},defaultClass:"fyvr12h5"},positive:{conditions:{base:"fyvr12hb",active:"fyvr12hc",disabled:"fyvr12hd",focus:"fyvr12he",hover:"fyvr12hf",checked:"fyvr12hg"},defaultClass:"fyvr12hb"},negative:{conditions:{base:"fyvr12hh",active:"fyvr12hi",disabled:"fyvr12hj",focus:"fyvr12hk",hover:"fyvr12hl",checked:"fyvr12hm"},defaultClass:"fyvr12hh"},info:{conditions:{base:"fyvr12hn",active:"fyvr12ho",disabled:"fyvr12hp",focus:"fyvr12hq",hover:"fyvr12hr",checked:"fyvr12hs"},defaultClass:"fyvr12hn"},warning:{conditions:{base:"fyvr12ht",active:"fyvr12hu",disabled:"fyvr12hv",focus:"fyvr12hw",hover:"fyvr12hx",checked:"fyvr12hy"},defaultClass:"fyvr12ht"},gradientBackdrop:{conditions:{base:"fyvr12hz",active:"fyvr12i0",disabled:"fyvr12i1",focus:"fyvr12i2",hover:"fyvr12i3",checked:"fyvr12i4"},defaultClass:"fyvr12hz"},gradientPrimary:{conditions:{base:"fyvr12i5",active:"fyvr12i6",disabled:"fyvr12i7",focus:"fyvr12i8",hover:"fyvr12i9",checked:"fyvr12ia"},defaultClass:"fyvr12i5"},gradientSecondary:{conditions:{base:"fyvr12ib",active:"fyvr12ic",disabled:"fyvr12id",focus:"fyvr12ie",hover:"fyvr12if",checked:"fyvr12ig"},defaultClass:"fyvr12ib"},arbitrumDark:{conditions:{base:"fyvr12ih",active:"fyvr12ii",disabled:"fyvr12ij",focus:"fyvr12ik",hover:"fyvr12il",checked:"fyvr12im"},defaultClass:"fyvr12ih"},arbitrumLight:{conditions:{base:"fyvr12in",active:"fyvr12io",disabled:"fyvr12ip",focus:"fyvr12iq",hover:"fyvr12ir",checked:"fyvr12is"},defaultClass:"fyvr12in"},avalanceDark:{conditions:{base:"fyvr12it",active:"fyvr12iu",disabled:"fyvr12iv",focus:"fyvr12iw",hover:"fyvr12ix",checked:"fyvr12iy"},defaultClass:"fyvr12it"},avalanceLight:{conditions:{base:"fyvr12iz",active:"fyvr12j0",disabled:"fyvr12j1",focus:"fyvr12j2",hover:"fyvr12j3",checked:"fyvr12j4"},defaultClass:"fyvr12iz"},bscDark:{conditions:{base:"fyvr12j5",active:"fyvr12j6",disabled:"fyvr12j7",focus:"fyvr12j8",hover:"fyvr12j9",checked:"fyvr12ja"},defaultClass:"fyvr12j5"},bscLight:{conditions:{base:"fyvr12jb",active:"fyvr12jc",disabled:"fyvr12jd",focus:"fyvr12je",hover:"fyvr12jf",checked:"fyvr12jg"},defaultClass:"fyvr12jb"},ethereumDark:{conditions:{base:"fyvr12jh",active:"fyvr12ji",disabled:"fyvr12jj",focus:"fyvr12jk",hover:"fyvr12jl",checked:"fyvr12jm"},defaultClass:"fyvr12jh"},ethereumLight:{conditions:{base:"fyvr12jn",active:"fyvr12jo",disabled:"fyvr12jp",focus:"fyvr12jq",hover:"fyvr12jr",checked:"fyvr12js"},defaultClass:"fyvr12jn"},gnosisDark:{conditions:{base:"fyvr12jt",active:"fyvr12ju",disabled:"fyvr12jv",focus:"fyvr12jw",hover:"fyvr12jx",checked:"fyvr12jy"},defaultClass:"fyvr12jt"},gnosisLight:{conditions:{base:"fyvr12jz",active:"fyvr12k0",disabled:"fyvr12k1",focus:"fyvr12k2",hover:"fyvr12k3",checked:"fyvr12k4"},defaultClass:"fyvr12jz"},polygonDark:{conditions:{base:"fyvr12k5",active:"fyvr12k6",disabled:"fyvr12k7",focus:"fyvr12k8",hover:"fyvr12k9",checked:"fyvr12ka"},defaultClass:"fyvr12k5"},polygonLight:{conditions:{base:"fyvr12kb",active:"fyvr12kc",disabled:"fyvr12kd",focus:"fyvr12ke",hover:"fyvr12kf",checked:"fyvr12kg"},defaultClass:"fyvr12kb"},text100:{conditions:{base:"fyvr12kh",active:"fyvr12ki",disabled:"fyvr12kj",focus:"fyvr12kk",hover:"fyvr12kl",checked:"fyvr12km"},defaultClass:"fyvr12kh"},text80:{conditions:{base:"fyvr12kn",active:"fyvr12ko",disabled:"fyvr12kp",focus:"fyvr12kq",hover:"fyvr12kr",checked:"fyvr12ks"},defaultClass:"fyvr12kn"},text50:{conditions:{base:"fyvr12kt",active:"fyvr12ku",disabled:"fyvr12kv",focus:"fyvr12kw",hover:"fyvr12kx",checked:"fyvr12ky"},defaultClass:"fyvr12kt"},textInverse100:{conditions:{base:"fyvr12kz",active:"fyvr12l0",disabled:"fyvr12l1",focus:"fyvr12l2",hover:"fyvr12l3",checked:"fyvr12l4"},defaultClass:"fyvr12kz"},backgroundPrimary:{conditions:{base:"fyvr12l5",active:"fyvr12l6",disabled:"fyvr12l7",focus:"fyvr12l8",hover:"fyvr12l9",checked:"fyvr12la"},defaultClass:"fyvr12l5"},backgroundSecondary:{conditions:{base:"fyvr12lb",active:"fyvr12lc",disabled:"fyvr12ld",focus:"fyvr12le",hover:"fyvr12lf",checked:"fyvr12lg"},defaultClass:"fyvr12lb"},backgroundContrast:{conditions:{base:"fyvr12lh",active:"fyvr12li",disabled:"fyvr12lj",focus:"fyvr12lk",hover:"fyvr12ll",checked:"fyvr12lm"},defaultClass:"fyvr12lh"},backgroundMuted:{conditions:{base:"fyvr12ln",active:"fyvr12lo",disabled:"fyvr12lp",focus:"fyvr12lq",hover:"fyvr12lr",checked:"fyvr12ls"},defaultClass:"fyvr12ln"},backgroundControl:{conditions:{base:"fyvr12lt",active:"fyvr12lu",disabled:"fyvr12lv",focus:"fyvr12lw",hover:"fyvr12lx",checked:"fyvr12ly"},defaultClass:"fyvr12lt"},backgroundInverse:{conditions:{base:"fyvr12lz",active:"fyvr12m0",disabled:"fyvr12m1",focus:"fyvr12m2",hover:"fyvr12m3",checked:"fyvr12m4"},defaultClass:"fyvr12lz"},backgroundBackdrop:{conditions:{base:"fyvr12m5",active:"fyvr12m6",disabled:"fyvr12m7",focus:"fyvr12m8",hover:"fyvr12m9",checked:"fyvr12ma"},defaultClass:"fyvr12m5"},backgroundOverlay:{conditions:{base:"fyvr12mb",active:"fyvr12mc",disabled:"fyvr12md",focus:"fyvr12me",hover:"fyvr12mf",checked:"fyvr12mg"},defaultClass:"fyvr12mb"},backgroundRaised:{conditions:{base:"fyvr12mh",active:"fyvr12mi",disabled:"fyvr12mj",focus:"fyvr12mk",hover:"fyvr12ml",checked:"fyvr12mm"},defaultClass:"fyvr12mh"},buttonGlass:{conditions:{base:"fyvr12mn",active:"fyvr12mo",disabled:"fyvr12mp",focus:"fyvr12mq",hover:"fyvr12mr",checked:"fyvr12ms"},defaultClass:"fyvr12mn"},buttonEmphasis:{conditions:{base:"fyvr12mt",active:"fyvr12mu",disabled:"fyvr12mv",focus:"fyvr12mw",hover:"fyvr12mx",checked:"fyvr12my"},defaultClass:"fyvr12mt"},buttonInverse:{conditions:{base:"fyvr12mz",active:"fyvr12n0",disabled:"fyvr12n1",focus:"fyvr12n2",hover:"fyvr12n3",checked:"fyvr12n4"},defaultClass:"fyvr12mz"},borderNormal:{conditions:{base:"fyvr12n5",active:"fyvr12n6",disabled:"fyvr12n7",focus:"fyvr12n8",hover:"fyvr12n9",checked:"fyvr12na"},defaultClass:"fyvr12n5"},borderFocus:{conditions:{base:"fyvr12nb",active:"fyvr12nc",disabled:"fyvr12nd",focus:"fyvr12ne",hover:"fyvr12nf",checked:"fyvr12ng"},defaultClass:"fyvr12nb"}}},borderTopStyle:{values:{solid:{conditions:{base:"fyvr12nh",active:"fyvr12ni",disabled:"fyvr12nj",focus:"fyvr12nk",hover:"fyvr12nl",checked:"fyvr12nm"},defaultClass:"fyvr12nh"},dashed:{conditions:{base:"fyvr12nn",active:"fyvr12no",disabled:"fyvr12np",focus:"fyvr12nq",hover:"fyvr12nr",checked:"fyvr12ns"},defaultClass:"fyvr12nn"},dotted:{conditions:{base:"fyvr12nt",active:"fyvr12nu",disabled:"fyvr12nv",focus:"fyvr12nw",hover:"fyvr12nx",checked:"fyvr12ny"},defaultClass:"fyvr12nt"}}},color:{values:{black:{conditions:{base:"fyvr12nz",active:"fyvr12o0",disabled:"fyvr12o1",focus:"fyvr12o2",hover:"fyvr12o3",checked:"fyvr12o4"},defaultClass:"fyvr12nz"},white:{conditions:{base:"fyvr12o5",active:"fyvr12o6",disabled:"fyvr12o7",focus:"fyvr12o8",hover:"fyvr12o9",checked:"fyvr12oa"},defaultClass:"fyvr12o5"},inherit:{conditions:{base:"fyvr12ob",active:"fyvr12oc",disabled:"fyvr12od",focus:"fyvr12oe",hover:"fyvr12of",checked:"fyvr12og"},defaultClass:"fyvr12ob"},transparent:{conditions:{base:"fyvr12oh",active:"fyvr12oi",disabled:"fyvr12oj",focus:"fyvr12ok",hover:"fyvr12ol",checked:"fyvr12om"},defaultClass:"fyvr12oh"},positive:{conditions:{base:"fyvr12on",active:"fyvr12oo",disabled:"fyvr12op",focus:"fyvr12oq",hover:"fyvr12or",checked:"fyvr12os"},defaultClass:"fyvr12on"},negative:{conditions:{base:"fyvr12ot",active:"fyvr12ou",disabled:"fyvr12ov",focus:"fyvr12ow",hover:"fyvr12ox",checked:"fyvr12oy"},defaultClass:"fyvr12ot"},info:{conditions:{base:"fyvr12oz",active:"fyvr12p0",disabled:"fyvr12p1",focus:"fyvr12p2",hover:"fyvr12p3",checked:"fyvr12p4"},defaultClass:"fyvr12oz"},warning:{conditions:{base:"fyvr12p5",active:"fyvr12p6",disabled:"fyvr12p7",focus:"fyvr12p8",hover:"fyvr12p9",checked:"fyvr12pa"},defaultClass:"fyvr12p5"},gradientBackdrop:{conditions:{base:"fyvr12pb",active:"fyvr12pc",disabled:"fyvr12pd",focus:"fyvr12pe",hover:"fyvr12pf",checked:"fyvr12pg"},defaultClass:"fyvr12pb"},gradientPrimary:{conditions:{base:"fyvr12ph",active:"fyvr12pi",disabled:"fyvr12pj",focus:"fyvr12pk",hover:"fyvr12pl",checked:"fyvr12pm"},defaultClass:"fyvr12ph"},gradientSecondary:{conditions:{base:"fyvr12pn",active:"fyvr12po",disabled:"fyvr12pp",focus:"fyvr12pq",hover:"fyvr12pr",checked:"fyvr12ps"},defaultClass:"fyvr12pn"},arbitrumDark:{conditions:{base:"fyvr12pt",active:"fyvr12pu",disabled:"fyvr12pv",focus:"fyvr12pw",hover:"fyvr12px",checked:"fyvr12py"},defaultClass:"fyvr12pt"},arbitrumLight:{conditions:{base:"fyvr12pz",active:"fyvr12q0",disabled:"fyvr12q1",focus:"fyvr12q2",hover:"fyvr12q3",checked:"fyvr12q4"},defaultClass:"fyvr12pz"},avalanceDark:{conditions:{base:"fyvr12q5",active:"fyvr12q6",disabled:"fyvr12q7",focus:"fyvr12q8",hover:"fyvr12q9",checked:"fyvr12qa"},defaultClass:"fyvr12q5"},avalanceLight:{conditions:{base:"fyvr12qb",active:"fyvr12qc",disabled:"fyvr12qd",focus:"fyvr12qe",hover:"fyvr12qf",checked:"fyvr12qg"},defaultClass:"fyvr12qb"},bscDark:{conditions:{base:"fyvr12qh",active:"fyvr12qi",disabled:"fyvr12qj",focus:"fyvr12qk",hover:"fyvr12ql",checked:"fyvr12qm"},defaultClass:"fyvr12qh"},bscLight:{conditions:{base:"fyvr12qn",active:"fyvr12qo",disabled:"fyvr12qp",focus:"fyvr12qq",hover:"fyvr12qr",checked:"fyvr12qs"},defaultClass:"fyvr12qn"},ethereumDark:{conditions:{base:"fyvr12qt",active:"fyvr12qu",disabled:"fyvr12qv",focus:"fyvr12qw",hover:"fyvr12qx",checked:"fyvr12qy"},defaultClass:"fyvr12qt"},ethereumLight:{conditions:{base:"fyvr12qz",active:"fyvr12r0",disabled:"fyvr12r1",focus:"fyvr12r2",hover:"fyvr12r3",checked:"fyvr12r4"},defaultClass:"fyvr12qz"},gnosisDark:{conditions:{base:"fyvr12r5",active:"fyvr12r6",disabled:"fyvr12r7",focus:"fyvr12r8",hover:"fyvr12r9",checked:"fyvr12ra"},defaultClass:"fyvr12r5"},gnosisLight:{conditions:{base:"fyvr12rb",active:"fyvr12rc",disabled:"fyvr12rd",focus:"fyvr12re",hover:"fyvr12rf",checked:"fyvr12rg"},defaultClass:"fyvr12rb"},polygonDark:{conditions:{base:"fyvr12rh",active:"fyvr12ri",disabled:"fyvr12rj",focus:"fyvr12rk",hover:"fyvr12rl",checked:"fyvr12rm"},defaultClass:"fyvr12rh"},polygonLight:{conditions:{base:"fyvr12rn",active:"fyvr12ro",disabled:"fyvr12rp",focus:"fyvr12rq",hover:"fyvr12rr",checked:"fyvr12rs"},defaultClass:"fyvr12rn"},text100:{conditions:{base:"fyvr12rt",active:"fyvr12ru",disabled:"fyvr12rv",focus:"fyvr12rw",hover:"fyvr12rx",checked:"fyvr12ry"},defaultClass:"fyvr12rt"},text80:{conditions:{base:"fyvr12rz",active:"fyvr12s0",disabled:"fyvr12s1",focus:"fyvr12s2",hover:"fyvr12s3",checked:"fyvr12s4"},defaultClass:"fyvr12rz"},text50:{conditions:{base:"fyvr12s5",active:"fyvr12s6",disabled:"fyvr12s7",focus:"fyvr12s8",hover:"fyvr12s9",checked:"fyvr12sa"},defaultClass:"fyvr12s5"},textInverse100:{conditions:{base:"fyvr12sb",active:"fyvr12sc",disabled:"fyvr12sd",focus:"fyvr12se",hover:"fyvr12sf",checked:"fyvr12sg"},defaultClass:"fyvr12sb"},backgroundPrimary:{conditions:{base:"fyvr12sh",active:"fyvr12si",disabled:"fyvr12sj",focus:"fyvr12sk",hover:"fyvr12sl",checked:"fyvr12sm"},defaultClass:"fyvr12sh"},backgroundSecondary:{conditions:{base:"fyvr12sn",active:"fyvr12so",disabled:"fyvr12sp",focus:"fyvr12sq",hover:"fyvr12sr",checked:"fyvr12ss"},defaultClass:"fyvr12sn"},backgroundContrast:{conditions:{base:"fyvr12st",active:"fyvr12su",disabled:"fyvr12sv",focus:"fyvr12sw",hover:"fyvr12sx",checked:"fyvr12sy"},defaultClass:"fyvr12st"},backgroundMuted:{conditions:{base:"fyvr12sz",active:"fyvr12t0",disabled:"fyvr12t1",focus:"fyvr12t2",hover:"fyvr12t3",checked:"fyvr12t4"},defaultClass:"fyvr12sz"},backgroundControl:{conditions:{base:"fyvr12t5",active:"fyvr12t6",disabled:"fyvr12t7",focus:"fyvr12t8",hover:"fyvr12t9",checked:"fyvr12ta"},defaultClass:"fyvr12t5"},backgroundInverse:{conditions:{base:"fyvr12tb",active:"fyvr12tc",disabled:"fyvr12td",focus:"fyvr12te",hover:"fyvr12tf",checked:"fyvr12tg"},defaultClass:"fyvr12tb"},backgroundBackdrop:{conditions:{base:"fyvr12th",active:"fyvr12ti",disabled:"fyvr12tj",focus:"fyvr12tk",hover:"fyvr12tl",checked:"fyvr12tm"},defaultClass:"fyvr12th"},backgroundOverlay:{conditions:{base:"fyvr12tn",active:"fyvr12to",disabled:"fyvr12tp",focus:"fyvr12tq",hover:"fyvr12tr",checked:"fyvr12ts"},defaultClass:"fyvr12tn"},backgroundRaised:{conditions:{base:"fyvr12tt",active:"fyvr12tu",disabled:"fyvr12tv",focus:"fyvr12tw",hover:"fyvr12tx",checked:"fyvr12ty"},defaultClass:"fyvr12tt"},buttonGlass:{conditions:{base:"fyvr12tz",active:"fyvr12u0",disabled:"fyvr12u1",focus:"fyvr12u2",hover:"fyvr12u3",checked:"fyvr12u4"},defaultClass:"fyvr12tz"},buttonEmphasis:{conditions:{base:"fyvr12u5",active:"fyvr12u6",disabled:"fyvr12u7",focus:"fyvr12u8",hover:"fyvr12u9",checked:"fyvr12ua"},defaultClass:"fyvr12u5"},buttonInverse:{conditions:{base:"fyvr12ub",active:"fyvr12uc",disabled:"fyvr12ud",focus:"fyvr12ue",hover:"fyvr12uf",checked:"fyvr12ug"},defaultClass:"fyvr12ub"},borderNormal:{conditions:{base:"fyvr12uh",active:"fyvr12ui",disabled:"fyvr12uj",focus:"fyvr12uk",hover:"fyvr12ul",checked:"fyvr12um"},defaultClass:"fyvr12uh"},borderFocus:{conditions:{base:"fyvr12un",active:"fyvr12uo",disabled:"fyvr12up",focus:"fyvr12uq",hover:"fyvr12ur",checked:"fyvr12us"},defaultClass:"fyvr12un"}}},cursor:{values:{default:{conditions:{base:"fyvr12ut",active:"fyvr12uu",disabled:"fyvr12uv",focus:"fyvr12uw",hover:"fyvr12ux",checked:"fyvr12uy"},defaultClass:"fyvr12ut"},pointer:{conditions:{base:"fyvr12uz",active:"fyvr12v0",disabled:"fyvr12v1",focus:"fyvr12v2",hover:"fyvr12v3",checked:"fyvr12v4"},defaultClass:"fyvr12uz"},text:{conditions:{base:"fyvr12v5",active:"fyvr12v6",disabled:"fyvr12v7",focus:"fyvr12v8",hover:"fyvr12v9",checked:"fyvr12va"},defaultClass:"fyvr12v5"}}},opacity:{values:{0:{conditions:{base:"fyvr12vb",active:"fyvr12vc",disabled:"fyvr12vd",focus:"fyvr12ve",hover:"fyvr12vf",checked:"fyvr12vg"},defaultClass:"fyvr12vb"},50:{conditions:{base:"fyvr12vh",active:"fyvr12vi",disabled:"fyvr12vj",focus:"fyvr12vk",hover:"fyvr12vl",checked:"fyvr12vm"},defaultClass:"fyvr12vh"},80:{conditions:{base:"fyvr12vn",active:"fyvr12vo",disabled:"fyvr12vp",focus:"fyvr12vq",hover:"fyvr12vr",checked:"fyvr12vs"},defaultClass:"fyvr12vn"},100:{conditions:{base:"fyvr12vt",active:"fyvr12vu",disabled:"fyvr12vv",focus:"fyvr12vw",hover:"fyvr12vx",checked:"fyvr12vy"},defaultClass:"fyvr12vt"}}},pointerEvents:{values:{none:{conditions:{base:"fyvr12vz",active:"fyvr12w0",disabled:"fyvr12w1",focus:"fyvr12w2",hover:"fyvr12w3",checked:"fyvr12w4"},defaultClass:"fyvr12vz"},auto:{conditions:{base:"fyvr12w5",active:"fyvr12w6",disabled:"fyvr12w7",focus:"fyvr12w8",hover:"fyvr12w9",checked:"fyvr12wa"},defaultClass:"fyvr12w5"}}},outline:{values:{none:{conditions:{base:"fyvr12wb",active:"fyvr12wc",disabled:"fyvr12wd",focus:"fyvr12we",hover:"fyvr12wf",checked:"fyvr12wg"},defaultClass:"fyvr12wb"}}},boxShadow:{values:{none:{conditions:{base:"fyvr12wh",active:"fyvr12wi",disabled:"fyvr12wj",focus:"fyvr12wk",hover:"fyvr12wl",checked:"fyvr12wm"},defaultClass:"fyvr12wh"}}}}});const mre=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Qx=t=>(t.display||(t.display=Object.keys(t).some(e=>mre.includes(e))?"flex":void 0),bN(t));Qx.properties=bN.properties;function wN(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e{const{as:r="div",sx:n={},className:i,...s}=t,o={},a={};for(const l in s)Qx.properties.has(l)?o[l]=s[l]:a[l]=s[l];const c=Qx({...o,...n});return C.createElement(r,{className:Si(c,i),...a,ref:e})});var EN={exports:{}},Yd={};/** * @license React * react-jsx-runtime.production.min.js * @@ -63,8 +68,8 @@ Error generating stack: `+s.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var J_;function ure(){if(J_)return Yd;J_=1;var t=x,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!s.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:i.current}}return Yd.Fragment=r,Yd.jsx=o,Yd.jsxs=o,Yd}yN.exports=ure();var K=yN.exports;function fre(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function dre(t){var e=fre(t,"string");return typeof e=="symbol"?e:String(e)}function hre(t,e,r){return e=dre(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function X_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Z_(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},fr=t=>{var e=r=>{var n=t.defaultClassName,i=Z_(Z_({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[s][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)pre(u,i,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return eP(t.variantClassNames,r=>eP(r,n=>n.split(" ")[0]))}},e};fr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const R0=t=>{const{color:e="backgroundMuted",marginY:r="4",...n}=t;return K.jsx(z,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var vre=fr({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const re=C.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=rre[n];return K.jsx(z,{as:r,className:Si(i,vre({hidden:s,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var mre=fr({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11rh fyvr12sh",emphasis:"fyvr11rn fyvr12sh",raised:"fyvr11qz fyvr12sh",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const tt=C.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:p="fit",shape:v="circle",type:b="button",...y}=t,m=u!==void 0&&l!==void 0,g=f!==void 0&&l!==void 0,S=u!==void 0&&l===void 0,P=d==="xs"?"xs":"sm";return K.jsx(z,{as:r,className:Si(i,mre({activeOutline:n,disabled:s||c,hasLeftIcon:m,hasRightIcon:g,iconOnly:S,size:h==="text"?void 0:d,shape:h==="text"?void 0:v,variant:h})),disabled:s||c,display:o,fontWeight:a,ref:e,type:b,width:p,...y,children:S?K.jsx(u,{size:P}):K.jsxs(z,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[K.jsxs(z,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&K.jsx(u,{size:P}),K.jsx(re,{children:l})]}),f&&K.jsx(f,{size:P})]})})});var yre=fr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const ws=C.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:c="full",...l}=t;return K.jsx(z,{className:Si(r,yre({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function ur(){return ur=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>gre(r,e))}function Ht(...t){return C.useCallback(gN(...t),t)}function Cn(t,e=[]){let r=[];function n(s,o){const a=C.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,v=(d==null?void 0:d[t][c])||a,b=C.useMemo(()=>p,Object.values(p));return C.createElement(v.Provider,{value:b},h)}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=C.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,u]}const i=()=>{const s=r.map(o=>C.createContext(o));return function(a){const c=(a==null?void 0:a[t])||s;return C.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[n,bre(i,...e)]}function bre(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ee(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function zi(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function fc({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=wre({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=zi(r),c=C.useCallback(l=>{if(s){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else i(l)},[s,t,i,a]);return[o,c]}function wre({defaultProp:t,onChange:e}){const r=C.useState(t),[n]=r,i=C.useRef(n),s=zi(e);return C.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function Ng(t){const e=C.useRef({value:t,previous:t});return C.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const Wi=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function Dg(t){const[e,r]=C.useState(void 0);return Wi(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function Ere(t,e){return C.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Oc=t=>{const{present:e,children:r}=t,n=xre(e),i=typeof r=="function"?r({present:n.isPresent}):C.Children.only(r),s=Ht(n.ref,i.ref);return typeof r=="function"||n.isPresent?C.cloneElement(i,{ref:s}):null};Oc.displayName="Presence";function xre(t){const[e,r]=C.useState(),n=C.useRef({}),i=C.useRef(t),s=C.useRef("none"),o=t?"mounted":"unmounted",[a,c]=Ere(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=jp(n.current);s.current=a==="mounted"?l:"none"},[a]),Wi(()=>{const l=n.current,u=i.current;if(u!==t){const d=s.current,h=jp(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),Wi(()=>{if(e){const l=f=>{const h=jp(n.current).includes(f.animationName);f.target===e&&h&&_s.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(s.current=jp(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function jp(t){return(t==null?void 0:t.animationName)||"none"}function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=C.Children.toArray(r),s=i.find(Sre);if(s){const o=s.props.children,a=i.map(c=>c===s?C.Children.count(o)>1?C.Children.only(null):C.isValidElement(o)?o.props.children:null:c);return C.createElement(Yx,xe({},n,{ref:e}),C.isValidElement(o)?C.cloneElement(o,void 0,a):null)}return C.createElement(Yx,xe({},n,{ref:e}),r)});Lf.displayName="Slot";const Yx=C.forwardRef((t,e)=>{const{children:r,...n}=t;return C.isValidElement(r)?C.cloneElement(r,{...kre(n,r.props),ref:e?gN(e,r.ref):r.ref}):C.Children.count(r)>1?C.Children.only(null):null});Yx.displayName="SlotClone";const Cre=({children:t})=>C.createElement(C.Fragment,null,t);function Sre(t){return C.isValidElement(t)&&t.type===Cre}function kre(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const Are=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ze=Are.reduce((t,e)=>{const r=C.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?Lf:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(a,xe({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function H3(t,e){t&&_s.flushSync(()=>t.dispatchEvent(e))}const bN="Checkbox",[_re,iPe]=Cn(bN),[Pre,Tre]=_re(bN),Ire=C.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=C.useState(null),h=Ht(e,g=>d(g)),p=C.useRef(!1),v=f?!!f.closest("form"):!0,[b=!1,y]=fc({prop:i,defaultProp:s,onChange:l}),m=C.useRef(b);return C.useEffect(()=>{const g=f==null?void 0:f.form;if(g){const S=()=>y(m.current);return g.addEventListener("reset",S),()=>g.removeEventListener("reset",S)}},[f,y]),C.createElement(Pre,{scope:r,state:b,disabled:a},C.createElement(Ze.button,ur({type:"button",role:"checkbox","aria-checked":wl(b)?"mixed":b,"aria-required":o,"data-state":wN(b),"data-disabled":a?"":void 0,disabled:a,value:c},u,{ref:h,onKeyDown:Ee(t.onKeyDown,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:Ee(t.onClick,g=>{y(S=>wl(S)?!0:!S),v&&(p.current=g.isPropagationStopped(),p.current||g.stopPropagation())})})),v&&C.createElement($re,{control:f,bubbles:!p.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),Ore="CheckboxIndicator",Rre=C.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=Tre(Ore,r);return C.createElement(Oc,{present:n||wl(s.state)||s.state===!0},C.createElement(Ze.span,ur({"data-state":wN(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),$re=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=C.useRef(null),o=Ng(r),a=Dg(e);return C.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=wl(r),f.call(c,wl(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),C.createElement("input",ur({type:"checkbox","aria-hidden":!0,defaultChecked:wl(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function wl(t){return t==="indeterminate"}function wN(t){return wl(t)?"indeterminate":t?"checked":"unchecked"}const Mre=Ire,Nre=Rre;var Dre=fr({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const tu=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?K.jsxs(z,{flexDirection:"column",gap:"0.5",children:[r&&K.jsx(re,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&K.jsx(re,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return K.jsxs(z,{as:"label",className:Dre({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var yr=fr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const Lre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.168 9.25V2.929h-1.5V9.25h-6.32v1.5h6.32v6.321h1.5V10.75h6.321v-1.5h-6.32Z",clipRule:"evenodd"})}),Bre=({size:t="sm",...e})=>K.jsx(z,{as:Lre,className:yr({size:t}),...e}),Fre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.888 14.47 1.06 1.06L17.48 10l-5.53-5.53-1.06 1.06 3.719 3.72H4.418v1.5h10.19l-3.72 3.72Z",clipRule:"evenodd"})}),Jx=({size:t="sm",...e})=>K.jsx(z,{as:Fre,className:yr({size:t}),...e}),jre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),cd=({size:t="sm",...e})=>K.jsx(z,{as:jre,className:yr({size:t}),...e}),Ure=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),EN=({size:t="sm",...e})=>K.jsx(z,{as:Ure,className:yr({size:t}),...e}),zre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),Lg=({size:t="sm",...e})=>K.jsx(z,{as:zre,className:yr({size:t}),...e}),Wre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),oo=({size:t="sm",...e})=>K.jsx(z,{as:Wre,className:yr({size:t}),...e}),Hre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),ru=({size:t="sm",...e})=>K.jsx(z,{as:Hre,className:yr({size:t}),...e}),qre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.918 4.5h-6V6h4.5v6.5h1.5v-8Zm-1.5 9.5v3h-9V6h3V3h9v11h-3Zm-7.5 1.5v-8h6v8h-6Z",clipRule:"evenodd"})}),Bg=({size:t="sm",...e})=>K.jsx(z,{as:qre,className:yr({size:t}),...e}),Vre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 6.714 3.618 3.547H2.5L4.158 7.02H2.98v.69h1.494v.663H2.981v.69h1.494v1.484h1.036V9.063h1.46v-.69h-1.46v-.66l.001-.003h1.46v-.69h-1.13L7.5 3.547H6.383L5 6.714Zm4.747 8.232v-.788a2.887 2.887 0 0 1-1.04-.249 2.04 2.04 0 0 1-.863-.727 2.213 2.213 0 0 1-.344-1.125h1.017c.02.26.098.476.236.65.14.171.319.299.535.383.144.054.297.09.46.109V10.81l-.319-.093c-.538-.157-.964-.388-1.28-.693-.312-.304-.469-.707-.469-1.209 0-.415.105-.777.315-1.086.21-.31.495-.55.853-.72.273-.133.573-.215.9-.246v-.817h.537v.81c.365.023.692.106.981.249.35.17.626.406.827.706.201.298.306.64.315 1.027h-.978a1.04 1.04 0 0 0-.433-.774 1.47 1.47 0 0 0-.712-.264v2.253l.283.079c.214.056.434.132.659.228a2.6 2.6 0 0 1 .627.38c.192.157.347.351.466.583.12.232.18.51.18.834 0 .407-.098.77-.295 1.086a2.006 2.006 0 0 1-.85.749c-.304.15-.66.239-1.07.265v.79h-.538Zm1.024-1.877c-.148.064-.31.106-.486.128v-2.23c.216.064.41.136.584.218.193.089.345.201.457.337.113.136.17.31.17.524 0 .234-.065.44-.194.615-.129.174-.306.31-.531.408ZM9.747 7.706v2.095a4.605 4.605 0 0 1-.246-.086 2.195 2.195 0 0 1-.4-.207 1.038 1.038 0 0 1-.299-.313.847.847 0 0 1-.111-.443.94.94 0 0 1 .164-.545c.112-.162.268-.288.47-.38.126-.059.267-.099.422-.12Zm7.677 10.086h-4.9v-.897h.34a.342.342 0 0 0 .29-.186c.068-.117.114-.254.137-.411.023-.16.032-.304.028-.432l-.027-.779H12.5v-.896h.76l-.043-1.262c-.018-.472.073-.866.273-1.183.203-.317.473-.555.809-.715.335-.16.697-.24 1.084-.24.346 0 .656.056.931.166.278.11.511.26.7.452.191.188.328.404.41.647.081.243.097.498.048.766l-1.01-.156c.023-.22-.014-.403-.11-.55a.891.891 0 0 0-.395-.33 1.31 1.31 0 0 0-1.102.024c-.177.09-.322.227-.434.411-.11.185-.164.42-.164.708l.048 1.261h1.649v.897H14.34l.029.752c.014.29-.025.55-.116.78-.04.1-.096.193-.166.276h3.337v.897Z",clipRule:"evenodd"})}),Gre=({size:t="sm",...e})=>K.jsx(z,{as:Vre,className:yr({size:t}),...e}),Kre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",d:"m5.285 12.883 6.53-6.53 2.254 2.253-6.531 6.531-2.878.618.625-2.872ZM14.674 8.001l-2.253-2.253 1.502-1.503L16.176 6.5 14.674 8Z"})}),Qre=({size:t="sm",...e})=>K.jsx(z,{as:Kre,className:yr({size:t}),...e}),Yre=t=>K.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[K.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M10.906 8.966c1.459 1.316 1.459 3.45 0 4.765l-2.53 2.282c-1.459 1.316-3.824 1.316-5.282 0-1.459-1.315-1.459-3.449 0-4.764l1.265-1.142"}),K.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M8.094 11c-1.459-1.316-1.459-3.449 0-4.765l2.53-2.282c1.459-1.316 3.823-1.316 5.282 0s1.459 3.449 0 4.765l-1.265 1.14"})]}),Jre=({size:t="sm",...e})=>K.jsx(z,{as:Yre,className:yr({size:t}),...e}),Xre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.918 14.994v.752A7.003 7.003 0 0 1 6.968 5.05a7.003 7.003 0 0 1 8.95-.796v.752a4.979 4.979 0 0 0-3.293 1.459 5 5 0 0 0 3.293 8.53Zm-4.353-.398c.329.329.684.615 1.059.859a5.5 5.5 0 1 1 0-10.91 6.5 6.5 0 0 0-1.06 10.051Z",clipRule:"evenodd"})}),Zre=({size:t="sm",...e})=>K.jsx(z,{as:Xre,className:yr({size:t}),...e}),ene=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.283 6.175a4.643 4.643 0 1 0-6.566 6.567l-.708.707a5.644 5.644 0 1 1 7.982 0l-.708-.707a4.644 4.644 0 0 0 0-6.567Zm-5.097 1.47a2.565 2.565 0 0 1 3.628 3.627l.707.707a3.565 3.565 0 1 0-5.042 0l.707-.707a2.565 2.565 0 0 1 0-3.627ZM10 10.959a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 .667-1.5 6h3l-1.5-6Z",clipRule:"evenodd"})}),tne=({size:t="sm",...e})=>K.jsx(z,{as:ene,className:yr({size:t}),...e}),rne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.418 3.6h-2.5v2.5h2.5V3.6Zm0-1.5h1.5v5.5h-5.5V2.1h4Zm0 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4Zm8-9h2.5v2.5h-2.5V3.6Zm4-1.5h-5.5v5.5h5.5V2.1Zm-1.5 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4ZM9.668 2.1v7.25h-7.25v1.5h8.75V2.1h-1.5Zm1.5 10.5v5.5h-1.5v-5.5h1.5Zm1.75-1.75h5.5v-1.5h-5.5v1.5Z",clipRule:"evenodd"})}),nne=({size:t="sm",...e})=>K.jsx(z,{as:rne,className:yr({size:t}),...e}),ine=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),Fg=({size:t="sm",...e})=>K.jsx(z,{as:ine,className:yr({size:t}),...e}),sne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.529 15.925 9.419 11 4.493 8.89 2.418 8l2.142-.714 11.08-3.693L17.418 3l-.593 1.779-3.693 11.08L12.418 18l-.89-2.075Zm-1.71-6.386L6.635 8.175l6.82-2.273-3.638 3.637Zm1.06 1.061 1.364 3.183 2.273-6.82L10.88 10.6Z",clipRule:"evenodd"})}),jg=({size:t="sm",...e})=>K.jsx(z,{as:sne,className:yr({size:t}),...e}),one=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.775 5.204a5.465 5.465 0 0 0-1.341-.537L11 2.5H9l-.443 2.214c-.444.128-.866.31-1.257.54L5.404 3.99 3.99 5.404l1.283 1.925c-.212.38-.38.787-.497 1.216L2.5 9v2l2.276.455c.118.429.285.836.497 1.216L3.99 14.596l1.414 1.414L7.3 14.746c.391.23.813.412 1.257.54L9 17.5h2l.434-2.167c.474-.12.925-.302 1.341-.537l1.821 1.214 1.414-1.414-1.195-1.793c.253-.427.45-.891.581-1.382L17.5 11V9l-2.104-.42a5.467 5.467 0 0 0-.581-1.383l1.195-1.793-1.414-1.414-1.82 1.214Zm-.59 2.692a2.976 2.976 0 1 0-4.208 4.208 2.976 2.976 0 0 0 4.209-4.208Z",clipRule:"evenodd"})}),xN=({size:t="sm",...e})=>K.jsx(z,{as:one,className:yr({size:t}),...e}),ane=t=>K.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[K.jsx("path",{fill:"currentColor",d:"M4 6.234a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V10.5L14 9v5.734a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h5.769l-1.516 1.5H4Z"}),K.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),K.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),cne=({size:t="sm",...e})=>K.jsx(z,{as:ane,className:yr({size:t}),...e}),lne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.418 3.25h-5.75v13.5h5.75v-1.5h-4.25V4.75h4.25v-1.5Zm4.53 11.28-1.06-1.06 2.72-2.72h-8.19v-1.5h8.19l-2.72-2.72 1.06-1.06L18.48 10l-4.53 4.53Z",clipRule:"evenodd"})}),CN=({size:t="sm",...e})=>K.jsx(z,{as:lne,className:yr({size:t}),...e}),une=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),fne=({size:t="sm",...e})=>K.jsx(z,{as:une,className:yr({size:t}),...e}),dne=t=>K.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[K.jsx("path",{fill:"currentColor",d:"M4.633 10.75a5.878 5.878 0 0 1 .008-1.5H2.202v1.5h2.431ZM5.814 6.456A5.854 5.854 0 0 1 6.88 5.401L5.139 3.66l-1.06 1.06 1.735 1.736ZM4.078 15.28l1.711-1.711c.306.398.662.755 1.058 1.063L5.14 16.34l-1.06-1.06ZM9.668 15.802v2.414h1.5V15.8a5.876 5.876 0 0 1-1.5.003ZM13.98 14.623l1.718 1.717 1.06-1.06-1.721-1.723c-.305.4-.66.758-1.056 1.066ZM16.184 10.75h2.45v-1.5h-2.457a5.882 5.882 0 0 1 .007 1.5ZM15.012 6.467l1.747-1.747-1.061-1.06-1.75 1.75c.399.305.756.66 1.064 1.057ZM11.168 4.258V1.784h-1.5v2.472a5.875 5.875 0 0 1 1.5.002Z"}),K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 12.504a2.504 2.504 0 1 0 0-5.008 2.504 2.504 0 0 0 0 5.008Zm0 1.5a4.004 4.004 0 1 0 0-8.008 4.004 4.004 0 0 0 0 8.008Z",clipRule:"evenodd"})]}),hne=({size:t="sm",...e})=>K.jsx(z,{as:dne,className:yr({size:t}),...e}),pne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),SN=({size:t="sm",...e})=>K.jsx(z,{as:pne,className:yr({size:t}),...e});var vne=fr({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),mne=fr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const yne=({size:t="sm"})=>K.jsx(Nre,{className:mne({size:t}),children:K.jsx(cd,{size:t})});C.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...c}=t;return K.jsx(tu,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:K.jsx(Mre,{className:vne({size:a}),disabled:r,id:n??i,name:i,ref:e,...c,children:K.jsx(yne,{})})})});x.createContext(null);const gne=o7["useId".toString()]||(()=>{});let bne=0;function tc(t){const[e,r]=C.useState(gne());return Wi(()=>{t||r(n=>n??String(bne++))},[t]),t||(e?`radix-${e}`:"")}const kN="Collapsible",[wne,sPe]=Cn(kN);wne(kN);function Ug(t){const e=t+"CollectionProvider",[r,n]=Cn(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:v}=h,b=x.useRef(null),y=x.useRef(new Map).current;return x.createElement(i,{scope:p,itemMap:y,collectionRef:b},v)},a=t+"CollectionSlot",c=x.forwardRef((h,p)=>{const{scope:v,children:b}=h,y=s(a,v),m=Ht(p,y.collectionRef);return x.createElement(Lf,{ref:m},b)}),l=t+"CollectionItemSlot",u="data-radix-collection-item",f=x.forwardRef((h,p)=>{const{scope:v,children:b,...y}=h,m=x.useRef(null),g=Ht(p,m),S=s(l,v);return x.useEffect(()=>(S.itemMap.set(m,{ref:m,...y}),()=>void S.itemMap.delete(m))),x.createElement(Lf,{[u]:"",ref:g},b)});function d(h){const p=s(t+"CollectionConsumer",h);return x.useCallback(()=>{const b=p.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,P)=>y.indexOf(S.ref.current)-y.indexOf(P.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}const Ene=C.createContext(void 0);function zg(t){const e=C.useContext(Ene);return t||e||"ltr"}function xne(t,e=globalThis==null?void 0:globalThis.document){const r=zi(t);C.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Xx="dismissableLayer.update",Cne="dismissableLayer.pointerDownOutside",Sne="dismissableLayer.focusOutside";let tP;const kne=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),q3=C.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,u=C.useContext(kne),[f,d]=C.useState(null),h=(r=f==null?void 0:f.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=C.useState({}),v=Ht(e,I=>d(I)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(y),g=f?b.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=g>=m,T=Ane(I=>{const F=I.target,j=[...u.branches].some(H=>H.contains(F));!P||j||(s==null||s(I),a==null||a(I),I.defaultPrevented||c==null||c())},h),w=_ne(I=>{const F=I.target;[...u.branches].some(H=>H.contains(F))||(o==null||o(I),a==null||a(I),I.defaultPrevented||c==null||c())},h);return xne(I=>{g===u.layers.size-1&&(i==null||i(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},h),C.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(tP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),rP(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=tP)}},[f,h,n,u]),C.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),rP())},[f,u]),C.useEffect(()=>{const I=()=>p({});return document.addEventListener(Xx,I),()=>document.removeEventListener(Xx,I)},[]),C.createElement(Ze.div,xe({},l,{ref:v,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:Ee(t.onFocusCapture,w.onFocusCapture),onBlurCapture:Ee(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Ee(t.onPointerDownCapture,T.onPointerDownCapture)}))});function Ane(t,e=globalThis==null?void 0:globalThis.document){const r=zi(t),n=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let c=function(){AN(Cne,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function _ne(t,e=globalThis==null?void 0:globalThis.document){const r=zi(t),n=C.useRef(!1);return C.useEffect(()=>{const i=s=>{s.target&&!n.current&&AN(Sne,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function rP(){const t=new CustomEvent(Xx);document.dispatchEvent(t)}function AN(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?H3(i,s):i.dispatchEvent(s)}const Pne=q3;let x2=0;function _N(){C.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:nP()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:nP()),x2++,()=>{x2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),x2--}},[])}function nP(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const C2="focusScope.autoFocusOnMount",S2="focusScope.autoFocusOnUnmount",iP={bubbles:!1,cancelable:!0},PN=C.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,c]=C.useState(null),l=zi(i),u=zi(s),f=C.useRef(null),d=Ht(e,v=>c(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(n){let v=function(g){if(h.paused||!a)return;const S=g.target;a.contains(S)?f.current=S:Sa(f.current,{select:!0})},b=function(g){if(h.paused||!a)return;const S=g.relatedTarget;S!==null&&(a.contains(S)||Sa(f.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const P of g)P.removedNodes.length>0&&Sa(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const m=new MutationObserver(y);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),m.disconnect()}}},[n,a,h.paused]),C.useEffect(()=>{if(a){oP.add(h);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(C2,iP);a.addEventListener(C2,l),a.dispatchEvent(y),y.defaultPrevented||(Tne(Mne(TN(a)),{select:!0}),document.activeElement===v&&Sa(a))}return()=>{a.removeEventListener(C2,l),setTimeout(()=>{const y=new CustomEvent(S2,iP);a.addEventListener(S2,u),a.dispatchEvent(y),y.defaultPrevented||Sa(v??document.body,{select:!0}),a.removeEventListener(S2,u),oP.remove(h)},0)}}},[a,l,u,h]);const p=C.useCallback(v=>{if(!r&&!n||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(b&&y){const m=v.currentTarget,[g,S]=Ine(m);g&&S?!v.shiftKey&&y===S?(v.preventDefault(),r&&Sa(g,{select:!0})):v.shiftKey&&y===g&&(v.preventDefault(),r&&Sa(S,{select:!0})):y===m&&v.preventDefault()}},[r,n,h.paused]);return C.createElement(Ze.div,xe({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function Tne(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Sa(n,{select:e}),document.activeElement!==r)return}function Ine(t){const e=TN(t),r=sP(e,t),n=sP(e.reverse(),t);return[r,n]}function TN(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function sP(t,e){for(const r of t)if(!One(r,{upTo:e}))return r}function One(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Rne(t){return t instanceof HTMLInputElement&&"select"in t}function Sa(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Rne(t)&&e&&t.select()}}const oP=$ne();function $ne(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=aP(t,e),t.unshift(e)},remove(e){var r;t=aP(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function aP(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Mne(t){return t.filter(e=>e.tagName!=="A")}const Nne=["top","right","bottom","left"],dc=Math.min,li=Math.max,Zm=Math.round,Up=Math.floor,hc=t=>({x:t,y:t}),Dne={left:"right",right:"left",bottom:"top",top:"bottom"},Lne={start:"end",end:"start"};function Zx(t,e,r){return li(t,dc(e,r))}function Ko(t,e){return typeof t=="function"?t(e):t}function Qo(t){return t.split("-")[0]}function ld(t){return t.split("-")[1]}function V3(t){return t==="x"?"y":"x"}function G3(t){return t==="y"?"height":"width"}function ud(t){return["top","bottom"].includes(Qo(t))?"y":"x"}function K3(t){return V3(ud(t))}function Bne(t,e,r){r===void 0&&(r=!1);const n=ld(t),i=K3(t),s=G3(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ey(o)),[o,ey(o)]}function Fne(t){const e=ey(t);return[eC(t),e,eC(e)]}function eC(t){return t.replace(/start|end/g,e=>Lne[e])}function jne(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function Une(t,e,r,n){const i=ld(t);let s=jne(Qo(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(eC)))),s}function ey(t){return t.replace(/left|right|bottom|top/g,e=>Dne[e])}function zne(t){return{top:0,right:0,bottom:0,left:0,...t}}function IN(t){return typeof t!="number"?zne(t):{top:t,right:t,bottom:t,left:t}}function ty(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function cP(t,e,r){let{reference:n,floating:i}=t;const s=ud(e),o=K3(e),a=G3(o),c=Qo(e),l=s==="y",u=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(ld(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const Wne=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=cP(l,n,c),d=n,h={},p=0;for(let v=0;v({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=Ko(t,e)||{};if(l==null)return{};const f=IN(u),d={x:r,y:n},h=K3(i),p=G3(h),v=await o.getDimensions(l),b=h==="y",y=b?"top":"left",m=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-d[h]-s.floating[p],P=d[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let w=T?T[g]:0;(!w||!await(o.isElement==null?void 0:o.isElement(T)))&&(w=a.floating[g]||s.floating[p]);const I=S/2-P/2,F=w/2-v[p]/2-1,j=dc(f[y],F),H=dc(f[m],F),G=j,B=w-v[p]-H,E=w/2-v[p]/2+I,_=Zx(G,E,B),O=!c.arrow&&ld(i)!=null&&E!=_&&s.reference[p]/2-(EG<=0)){var F,j;const G=(((F=s.flip)==null?void 0:F.index)||0)+1,B=P[G];if(B)return{data:{index:G,overflows:I},reset:{placement:B}};let E=(j=I.filter(_=>_.overflows[0]<=0).sort((_,O)=>_.overflows[1]-O.overflows[1])[0])==null?void 0:j.placement;if(!E)switch(h){case"bestFit":{var H;const _=(H=I.map(O=>[O.placement,O.overflows.filter(N=>N>0).reduce((N,k)=>N+k,0)]).sort((O,N)=>O[1]-N[1])[0])==null?void 0:H[0];_&&(E=_);break}case"initialPlacement":E=a;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function uP(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function fP(t){return Nne.some(e=>t[e]>=0)}const qne=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Ko(t,e);switch(n){case"referenceHidden":{const s=await $0(e,{...i,elementContext:"reference"}),o=uP(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:fP(o)}}}case"escaped":{const s=await $0(e,{...i,altBoundary:!0}),o=uP(s,r.floating);return{data:{escapedOffsets:o,escaped:fP(o)}}}default:return{}}}}};async function Vne(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Qo(r),a=ld(r),c=ud(r)==="y",l=["left","top"].includes(o)?-1:1,u=s&&c?-1:1,f=Ko(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const Gne=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await Vne(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},Kne=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:y,y:m}=b;return{x:y,y:m}}},...c}=Ko(t,e),l={x:r,y:n},u=await $0(e,c),f=ud(Qo(i)),d=V3(f);let h=l[d],p=l[f];if(s){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=h+u[b],g=h-u[y];h=Zx(m,h,g)}if(o){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",m=p+u[b],g=p-u[y];p=Zx(m,p,g)}const v=a.fn({...e,[d]:h,[f]:p});return{...v,data:{x:v.x-r,y:v.y-n}}}}},Qne=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ko(t,e),u={x:r,y:n},f=ud(i),d=V3(f);let h=u[d],p=u[f];const v=Ko(a,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const g=d==="y"?"height":"width",S=s.reference[d]-s.floating[g]+b.mainAxis,P=s.reference[d]+s.reference[g]-b.mainAxis;hP&&(h=P)}if(l){var y,m;const g=d==="y"?"width":"height",S=["top","left"].includes(Qo(i)),P=s.reference[f]-s.floating[g]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:b.crossAxis),T=s.reference[f]+s.reference[g]+(S?0:((m=o.offset)==null?void 0:m[f])||0)-(S?b.crossAxis:0);pT&&(p=T)}return{[d]:h,[f]:p}}}},Yne=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=Ko(t,e),c=await $0(e,a),l=Qo(r),u=ld(r),f=ud(r)==="y",{width:d,height:h}=n.floating;let p,v;l==="top"||l==="bottom"?(p=l,v=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=l,p=u==="end"?"top":"bottom");const b=h-c[p],y=d-c[v],m=!e.middlewareData.shift;let g=b,S=y;if(f){const T=d-c.left-c.right;S=u||m?dc(y,T):T}else{const T=h-c.top-c.bottom;g=u||m?dc(b,T):T}if(m&&!u){const T=li(c.left,0),w=li(c.right,0),I=li(c.top,0),F=li(c.bottom,0);f?S=d-2*(T!==0||w!==0?T+w:li(c.left,c.right)):g=h-2*(I!==0||F!==0?I+F:li(c.top,c.bottom))}await o({...e,availableWidth:S,availableHeight:g});const P=await i.getDimensions(s.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function pc(t){return ON(t)?(t.nodeName||"").toLowerCase():"#document"}function mi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function la(t){var e;return(e=(ON(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ON(t){return t instanceof Node||t instanceof mi(t).Node}function Yo(t){return t instanceof Element||t instanceof mi(t).Element}function vo(t){return t instanceof HTMLElement||t instanceof mi(t).HTMLElement}function dP(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof mi(t).ShadowRoot}function R1(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Hi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function Jne(t){return["table","td","th"].includes(pc(t))}function Q3(t){const e=Y3(),r=Hi(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Xne(t){let e=Bf(t);for(;vo(e)&&!Wg(e);){if(Q3(e))return e;e=Bf(e)}return null}function Y3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wg(t){return["html","body","#document"].includes(pc(t))}function Hi(t){return mi(t).getComputedStyle(t)}function Hg(t){return Yo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Bf(t){if(pc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||dP(t)&&t.host||la(t);return dP(e)?e.host:e}function RN(t){const e=Bf(t);return Wg(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&R1(e)?e:RN(e)}function M0(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=RN(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=mi(i);return s?e.concat(o,o.visualViewport||[],R1(i)?i:[],o.frameElement&&r?M0(o.frameElement):[]):e.concat(i,M0(i,[],r))}function $N(t){const e=Hi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=vo(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Zm(r)!==s||Zm(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function J3(t){return Yo(t)?t:t.contextElement}function df(t){const e=J3(t);if(!vo(e))return hc(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=$N(e);let o=(s?Zm(r.width):r.width)/n,a=(s?Zm(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Zne=hc(0);function MN(t){const e=mi(t);return!Y3()||!e.visualViewport?Zne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function eie(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==mi(t)?!1:e}function Fl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=J3(t);let o=hc(1);e&&(n?Yo(n)&&(o=df(n)):o=df(t));const a=eie(s,r,n)?MN(s):hc(0);let c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=mi(s),h=n&&Yo(n)?mi(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const v=df(p),b=p.getBoundingClientRect(),y=Hi(p),m=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*v.x,g=b.top+(p.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=m,l+=g,p=mi(p).frameElement}}return ty({width:u,height:f,x:c,y:l})}function tie(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=vo(r),s=la(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=hc(1);const c=hc(0);if((i||!i&&n!=="fixed")&&((pc(r)!=="body"||R1(s))&&(o=Hg(r)),vo(r))){const l=Fl(r);a=df(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function rie(t){return Array.from(t.getClientRects())}function NN(t){return Fl(la(t)).left+Hg(t).scrollLeft}function nie(t){const e=la(t),r=Hg(t),n=t.ownerDocument.body,i=li(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=li(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+NN(t);const a=-r.scrollTop;return Hi(n).direction==="rtl"&&(o+=li(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function iie(t,e){const r=mi(t),n=la(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=Y3();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function sie(t,e){const r=Fl(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=vo(t)?df(t):hc(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function hP(t,e,r){let n;if(e==="viewport")n=iie(t,r);else if(e==="document")n=nie(la(t));else if(Yo(e))n=sie(e,r);else{const i=MN(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return ty(n)}function DN(t,e){const r=Bf(t);return r===e||!Yo(r)||Wg(r)?!1:Hi(r).position==="fixed"||DN(r,e)}function oie(t,e){const r=e.get(t);if(r)return r;let n=M0(t,[],!1).filter(a=>Yo(a)&&pc(a)!=="body"),i=null;const s=Hi(t).position==="fixed";let o=s?Bf(t):t;for(;Yo(o)&&!Wg(o);){const a=Hi(o),c=Q3(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||R1(o)&&!c&&DN(t,o))?n=n.filter(u=>u!==o):i=a,o=Bf(o)}return e.set(t,n),n}function aie(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?oie(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=hP(e,u,i);return l.top=li(f.top,l.top),l.right=dc(f.right,l.right),l.bottom=dc(f.bottom,l.bottom),l.left=li(f.left,l.left),l},hP(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function cie(t){return $N(t)}function lie(t,e,r){const n=vo(e),i=la(e),s=r==="fixed",o=Fl(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=hc(0);if(n||!n&&!s)if((pc(e)!=="body"||R1(i))&&(a=Hg(e)),n){const l=Fl(e,!0,s,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else i&&(c.x=NN(i));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function pP(t,e){return!vo(t)||Hi(t).position==="fixed"?null:e?e(t):t.offsetParent}function LN(t,e){const r=mi(t);if(!vo(t))return r;let n=pP(t,e);for(;n&&Jne(n)&&Hi(n).position==="static";)n=pP(n,e);return n&&(pc(n)==="html"||pc(n)==="body"&&Hi(n).position==="static"&&!Q3(n))?r:n||Xne(t)||r}const uie=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||LN,s=this.getDimensions;return{reference:lie(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function fie(t){return Hi(t).direction==="rtl"}const die={convertOffsetParentRelativeRectToViewportRelativeRect:tie,getDocumentElement:la,getClippingRect:aie,getOffsetParent:LN,getElementRects:uie,getClientRects:rie,getDimensions:cie,getScale:df,isElement:Yo,isRTL:fie};function hie(t,e){let r=null,n;const i=la(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=Up(u),p=Up(i.clientWidth-(l+f)),v=Up(i.clientHeight-(u+d)),b=Up(l),m={rootMargin:-h+"px "+-p+"px "+-v+"px "+-b+"px",threshold:li(0,dc(1,c))||1};let g=!0;function S(P){const T=P[0].intersectionRatio;if(T!==c){if(!g)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},100)}g=!1}try{r=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,m)}r.observe(t)}return o(!0),s}function pie(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=J3(t),u=i||s?[...l?M0(l):[],...M0(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=l&&a?hie(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[m]=y;m&&m.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,v=c?Fl(t):null;c&&b();function b(){const y=Fl(t);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&r(),v=y,p=requestAnimationFrame(b)}return r(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const vie=(t,e,r)=>{const n=new Map,i={platform:die,...r},s={...i.platform,_c:n};return Wne(t,e,{...i,platform:s})},mie=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?lP({element:n.current,padding:i}).fn(r):{}:n?lP({element:n,padding:i}).fn(r):{}}}};var Mv=typeof document<"u"?C.useLayoutEffect:C.useEffect;function ry(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!ry(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!ry(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function BN(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vP(t,e){const r=BN(t);return Math.round(e*r)/r}function mP(t){const e=C.useRef(t);return Mv(()=>{e.current=t}),e}function yie(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=C.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=C.useState(n);ry(d,n)||h(n);const[p,v]=C.useState(null),[b,y]=C.useState(null),m=C.useCallback(O=>{O!=T.current&&(T.current=O,v(O))},[v]),g=C.useCallback(O=>{O!==w.current&&(w.current=O,y(O))},[y]),S=s||p,P=o||b,T=C.useRef(null),w=C.useRef(null),I=C.useRef(u),F=mP(c),j=mP(i),H=C.useCallback(()=>{if(!T.current||!w.current)return;const O={placement:e,strategy:r,middleware:d};j.current&&(O.platform=j.current),vie(T.current,w.current,O).then(N=>{const k={...N,isPositioned:!0};G.current&&!ry(I.current,k)&&(I.current=k,_s.flushSync(()=>{f(k)}))})},[d,e,r,j]);Mv(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const G=C.useRef(!1);Mv(()=>(G.current=!0,()=>{G.current=!1}),[]),Mv(()=>{if(S&&(T.current=S),P&&(w.current=P),S&&P){if(F.current)return F.current(S,P,H);H()}},[S,P,H,F]);const B=C.useMemo(()=>({reference:T,floating:w,setReference:m,setFloating:g}),[m,g]),E=C.useMemo(()=>({reference:S,floating:P}),[S,P]),_=C.useMemo(()=>{const O={position:r,left:0,top:0};if(!E.floating)return O;const N=vP(E.floating,u.x),k=vP(E.floating,u.y);return a?{...O,transform:"translate("+N+"px, "+k+"px)",...BN(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:k}},[r,a,E.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:H,refs:B,elements:E,floatingStyles:_}),[u,H,B,E,_])}const FN="Popper",[jN,fd]=Cn(FN),[gie,UN]=jN(FN),bie=t=>{const{__scopePopper:e,children:r}=t,[n,i]=C.useState(null);return C.createElement(gie,{scope:e,anchor:n,onAnchorChange:i},r)},wie="PopperAnchor",Eie=C.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=UN(wie,r),o=C.useRef(null),a=Ht(e,o);return C.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:C.createElement(Ze.div,xe({},i,{ref:a}))}),zN="PopperContent",[xie,oPe]=jN(zN),Cie=C.forwardRef((t,e)=>{var r,n,i,s,o,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:v=0,avoidCollisions:b=!0,collisionBoundary:y=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:S=!1,updatePositionStrategy:P="optimized",onPlaced:T,...w}=t,I=UN(zN,u),[F,j]=C.useState(null),H=Ht(e,ue=>j(ue)),[G,B]=C.useState(null),E=Dg(G),_=(r=E==null?void 0:E.width)!==null&&r!==void 0?r:0,O=(n=E==null?void 0:E.height)!==null&&n!==void 0?n:0,N=f+(h!=="center"?"-"+h:""),k=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},$=Array.isArray(y)?y:[y],L=$.length>0,M={padding:k,boundary:$.filter(Sie),altBoundary:L},{refs:A,floatingStyles:D,placement:V,isPositioned:R,middlewareData:U}=yie({strategy:"fixed",placement:N,whileElementsMounted:(...ue)=>pie(...ue,{animationFrame:P==="always"}),elements:{reference:I.anchor},middleware:[Gne({mainAxis:d+O,alignmentAxis:p}),b&&Kne({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?Qne():void 0,...M}),b&&Hne({...M}),Yne({...M,apply:({elements:ue,rects:ot,availableWidth:Pe,availableHeight:Ae})=>{const{width:at,height:Ce}=ot.reference,be=ue.floating.style;be.setProperty("--radix-popper-available-width",`${Pe}px`),be.setProperty("--radix-popper-available-height",`${Ae}px`),be.setProperty("--radix-popper-anchor-width",`${at}px`),be.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),G&&mie({element:G,padding:v}),kie({arrowWidth:_,arrowHeight:O}),S&&qne({strategy:"referenceHidden",...M})]}),[W,q]=WN(V),Y=zi(T);Wi(()=>{R&&(Y==null||Y())},[R,Y]);const X=(i=U.arrow)===null||i===void 0?void 0:i.x,Q=(s=U.arrow)===null||s===void 0?void 0:s.y,Z=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ae,se]=C.useState();return Wi(()=>{F&&se(window.getComputedStyle(F).zIndex)},[F]),C.createElement("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:R?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},C.createElement(xie,{scope:u,placedSide:W,onArrowChange:B,arrowX:X,arrowY:Q,shouldHideArrow:Z},C.createElement(Ze.div,xe({"data-side":W,"data-align":q},w,{ref:H,style:{...w.style,animation:R?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function Sie(t){return t!==null}const kie=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:c,middlewareData:l}=e,f=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=f?0:t.arrowWidth,h=f?0:t.arrowHeight,[p,v]=WN(a),b={start:"0%",center:"50%",end:"100%"}[v],y=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,m=((s=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let g="",S="";return p==="bottom"?(g=f?b:`${y}px`,S=`${-h}px`):p==="top"?(g=f?b:`${y}px`,S=`${c.floating.height+h}px`):p==="right"?(g=`${-h}px`,S=f?b:`${m}px`):p==="left"&&(g=`${c.floating.width+h}px`,S=f?b:`${m}px`),{data:{x:g,y:S}}}});function WN(t){const[e,r="center"]=t.split("-");return[e,r]}const Aie=bie,_ie=Eie,Pie=Cie,HN=C.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?CV.createPortal(C.createElement(Ze.div,xe({},i,{ref:e})),n):null}),k2="rovingFocusGroup.onEntryFocus",Tie={bubbles:!1,cancelable:!0},X3="RovingFocusGroup",[tC,qN,Iie]=Ug(X3),[Oie,dd]=Cn(X3,[Iie]),[Rie,$ie]=Oie(X3),Mie=C.forwardRef((t,e)=>C.createElement(tC.Provider,{scope:t.__scopeRovingFocusGroup},C.createElement(tC.Slot,{scope:t.__scopeRovingFocusGroup},C.createElement(Nie,xe({},t,{ref:e}))))),Nie=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=t,f=C.useRef(null),d=Ht(e,f),h=zg(s),[p=null,v]=fc({prop:o,defaultProp:a,onChange:c}),[b,y]=C.useState(!1),m=zi(l),g=qN(r),S=C.useRef(!1),[P,T]=C.useState(0);return C.useEffect(()=>{const w=f.current;if(w)return w.addEventListener(k2,m),()=>w.removeEventListener(k2,m)},[m]),C.createElement(Rie,{scope:r,orientation:n,dir:h,loop:i,currentTabStopId:p,onItemFocus:C.useCallback(w=>v(w),[v]),onItemShiftTab:C.useCallback(()=>y(!0),[]),onFocusableItemAdd:C.useCallback(()=>T(w=>w+1),[]),onFocusableItemRemove:C.useCallback(()=>T(w=>w-1),[])},C.createElement(Ze.div,xe({tabIndex:b||P===0?-1:0,"data-orientation":n},u,{ref:d,style:{outline:"none",...t.style},onMouseDown:Ee(t.onMouseDown,()=>{S.current=!0}),onFocus:Ee(t.onFocus,w=>{const I=!S.current;if(w.target===w.currentTarget&&I&&!b){const F=new CustomEvent(k2,Tie);if(w.currentTarget.dispatchEvent(F),!F.defaultPrevented){const j=g().filter(_=>_.focusable),H=j.find(_=>_.active),G=j.find(_=>_.id===p),E=[H,G,...j].filter(Boolean).map(_=>_.ref.current);VN(E)}}S.current=!1}),onBlur:Ee(t.onBlur,()=>y(!1))})))}),Die="RovingFocusGroupItem",Lie=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=tc(),c=s||a,l=$ie(Die,r),u=l.currentTabStopId===c,f=qN(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return C.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),C.createElement(tC.ItemSlot,{scope:r,id:c,focusable:n,active:i},C.createElement(Ze.span,xe({tabIndex:u?0:-1,"data-orientation":l.orientation},o,{ref:e,onMouseDown:Ee(t.onMouseDown,p=>{n?l.onItemFocus(c):p.preventDefault()}),onFocus:Ee(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:Ee(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){l.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const v=jie(p,l.orientation,l.dir);if(v!==void 0){p.preventDefault();let y=f().filter(m=>m.focusable).map(m=>m.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const m=y.indexOf(p.currentTarget);y=l.loop?Uie(y,m+1):y.slice(m+1)}setTimeout(()=>VN(y))}})})))}),Bie={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fie(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function jie(t,e,r){const n=Fie(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Bie[n]}function VN(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function Uie(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const GN=Mie,Z3=Lie;var zie=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},vu=new WeakMap,zp=new WeakMap,Wp={},A2=0,KN=function(t){return t&&(t.host||KN(t.parentNode))},Wie=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=KN(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},Hie=function(t,e,r,n){var i=Wie(e,Array.isArray(t)?t:[t]);Wp[r]||(Wp[r]=new WeakMap);var s=Wp[r],o=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",v=(vu.get(d)||0)+1,b=(s.get(d)||0)+1;vu.set(d,v),s.set(d,b),o.push(d),v===1&&p&&zp.set(d,!0),b===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return u(e),a.clear(),A2++,function(){o.forEach(function(f){var d=vu.get(f)-1,h=s.get(f)-1;vu.set(f,d),s.set(f,h),d||(zp.has(f)||f.removeAttribute(n),zp.delete(f)),h||f.removeAttribute(r)}),A2--,A2||(vu=new WeakMap,vu=new WeakMap,zp=new WeakMap,Wp={})}},QN=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||zie(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Hie(n,i,r,"aria-hidden")):function(){return null}},Qs=function(){return Qs=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return ase;var e=cse(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},use=ZN(),fse=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(Vie,` { + */var X_;function yre(){if(X_)return Yd;X_=1;var t=x,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,c,l){var u,f={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(u in c)n.call(c,u)&&!s.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:e,type:a,key:d,ref:h,props:f,_owner:i.current}}return Yd.Fragment=r,Yd.jsx=o,Yd.jsxs=o,Yd}EN.exports=yre();var K=EN.exports;function gre(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bre(t){var e=gre(t,"string");return typeof e=="symbol"?e:String(e)}function wre(t,e,r){return e=bre(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function eP(t){for(var e=1;e{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},fr=t=>{var e=r=>{var n=t.defaultClassName,i=eP(eP({},t.defaultVariants),r);for(var s in i){var o,a=(o=i[s])!==null&&o!==void 0?o:t.defaultVariants[s];if(a!=null){var c=a;typeof c=="boolean"&&(c=c===!0?"true":"false");var l=t.variantClassNames[s][c];l&&(n+=" "+l)}}for(var[u,f]of t.compoundVariants)Ere(u,i,t.defaultVariants)&&(n+=" "+f);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return tP(t.variantClassNames,r=>tP(r,n=>n.split(" ")[0]))}},e};fr({defaultClassName:"_2q9vfj7",variantClassNames:{variant:{info:"fyvr11ot",warning:"fyvr11oz",success:"fyvr11oh",error:"fyvr11on"},size:{sm:"_1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr1wo fyvr1yk fyvr13w fyvr1e8",md:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ws fyvr1yo fyvr140 fyvr1ec",lg:"_1qxj1ib9 fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc fyvr1ww fyvr1ys fyvr144 fyvr1eg"}},defaultVariants:{},compoundVariants:[]});const R0=t=>{const{color:e="backgroundMuted",marginY:r="4",...n}=t;return K.jsx(z,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var xre=fr({defaultClassName:"_1qxj1ib9",variantClassNames:{variant:{inherit:"fyvr11mu fyvr11e4 fyvr11gg fyvr11fg fyvr11ew",xlarge:"fyvr11mv fyvr11es fyvr11gc fyvr11fk fyvr11fc",large:"fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8",medium:"fyvr11mv fyvr11ek fyvr11g4 fyvr11fo fyvr11fc",normal:"fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",small:"fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4",xsmall:"fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc",code:"fyvr11mw fyvr11eg fyvr11g0 fyvr11fk fyvr11f0"},ellipsis:{true:"fyvr11ls fyvr11m8 fyvr11n7 fyvr11mx"},italic:{true:"_1qxj1ibj"},underline:{true:"_1qxj1ibk"},uppercase:{true:"_1qxj1ibl"},capitalize:{true:"_1qxj1ibm"},hidden:{true:"_1qxj1ibn"}},defaultVariants:{},compoundVariants:[]});const re=C.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:i,hidden:s,italic:o,underline:a,children:c,ellipsis:l,uppercase:u,capitalize:f,...d}=t,h=lre[n];return K.jsx(z,{as:r,className:Si(i,xre({hidden:s,ellipsis:l,italic:o,underline:a,uppercase:u,capitalize:f})),ref:e,...h,...d,children:c})});var Cre=fr({defaultClassName:"_140wn8ng fyvr11ls fyvr11m8 fyvr11n7 fyvr11ko fyvr11h0",variantClassNames:{variant:{base:"_140wn8nh",feature:"_140wn8ni fyvr11ph fyvr12o5",primary:"fyvr11pb fyvr12o5",glass:"fyvr11tt fyvr12rt",emphasis:"fyvr11tz fyvr12rt",raised:"fyvr11tn fyvr12rt",danger:"fyvr11on fyvr12o5",text:"_140wn8no _1qxj1ib9 fyvr11mv fyvr11ec fyvr11fw fyvr11fs fyvr11f4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr11ob fyvr12s5"},shape:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",square:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"},disabled:{true:"fyvr12ut fyvr12vh",false:"fyvr12uz fyvr12vt fyvr12vr"},size:{xs:"_140wn8nt _1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr1ws fyvr1yo",sm:"_140wn8nu _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys",md:"_140wn8nv _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw",lg:"_140wn8nw _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1x0 fyvr1yw"},iconOnly:{true:"_140wn8nx"},hasLeftIcon:{true:"_140wn8ny"},hasRightIcon:{true:"_140wn8nz"},activeOutline:{light:"_140wn8n10",bold:"_140wn8n11"}},defaultVariants:{},compoundVariants:[[{iconOnly:!0,size:"xs"},"_140wn8n12"],[{iconOnly:!0,size:"sm"},"_140wn8n13"],[{iconOnly:!0,size:"md"},"_140wn8n14"],[{iconOnly:!0,size:"lg"},"_140wn8n15"],[{iconOnly:!1,hasLeftIcon:!0,size:"xs"},"_140wn8n16"],[{iconOnly:!1,hasLeftIcon:!0,size:"sm"},"_140wn8n17"],[{iconOnly:!1,hasLeftIcon:!0,size:"md"},"_140wn8n18"],[{iconOnly:!1,hasRightIcon:!0,size:"xs"},"_140wn8n19"],[{iconOnly:!1,hasRightIcon:!0,size:"sm"},"_140wn8n1a"],[{iconOnly:!1,hasRightIcon:!0,size:"md"},"_140wn8n1b"]]});const tt=C.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:i,disabled:s=!1,display:o="inline-flex",fontWeight:a="bold",pending:c=!1,label:l,leftIcon:u,rightIcon:f,size:d="md",variant:h="glass",width:p="fit",shape:v="circle",type:b="button",...y}=t,m=u!==void 0&&l!==void 0,g=f!==void 0&&l!==void 0,S=u!==void 0&&l===void 0,P=d==="xs"?"xs":"sm";return K.jsx(z,{as:r,className:Si(i,Cre({activeOutline:n,disabled:s||c,hasLeftIcon:m,hasRightIcon:g,iconOnly:S,size:h==="text"?void 0:d,shape:h==="text"?void 0:v,variant:h})),disabled:s||c,display:o,fontWeight:a,ref:e,type:b,width:p,...y,children:S?K.jsx(u,{size:P}):K.jsxs(z,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[K.jsxs(z,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[u&&K.jsx(u,{size:P}),K.jsx(re,{children:l})]}),f&&K.jsx(f,{size:P})]})})});var Sre=fr({defaultClassName:"rhmai63",variantClassNames:{clickable:{true:"fyvr12vr fyvr12uz"},disabled:{true:"rhmai65"},outlined:{true:"fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nh fyvr12g5 fyvr121h fyvr128t"},blur:{true:"fyvr11ms"}},defaultVariants:{},compoundVariants:[]});const bs=C.forwardRef((t,e)=>{const{className:r,children:n,clickable:i,outlined:s,disabled:o,blur:a,width:c="full",...l}=t;return K.jsx(z,{className:Si(r,Sre({clickable:i,outlined:s,disabled:o,blur:a})),background:s?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:c,ref:e,...l,children:n})});function dt(){return dt=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>kre(r,e))}function qt(...t){return C.useCallback(xN(...t),t)}function Cn(t,e=[]){let r=[];function n(s,o){const a=C.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,v=(d==null?void 0:d[t][c])||a,b=C.useMemo(()=>p,Object.values(p));return C.createElement(v.Provider,{value:b},h)}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=C.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,u]}const i=()=>{const s=r.map(o=>C.createContext(o));return function(a){const c=(a==null?void 0:a[t])||s;return C.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[n,Are(i,...e)]}function Are(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ee(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function zi(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function fc({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=_re({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=zi(r),c=C.useCallback(l=>{if(s){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else i(l)},[s,t,i,a]);return[o,c]}function _re({defaultProp:t,onChange:e}){const r=C.useState(t),[n]=r,i=C.useRef(n),s=zi(e);return C.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}function Ng(t){const e=C.useRef({value:t,previous:t});return C.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const Wi=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};function Dg(t){const[e,r]=C.useState(void 0);return Wi(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function Pre(t,e){return C.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const Oc=t=>{const{present:e,children:r}=t,n=Tre(e),i=typeof r=="function"?r({present:n.isPresent}):C.Children.only(r),s=qt(n.ref,i.ref);return typeof r=="function"||n.isPresent?C.cloneElement(i,{ref:s}):null};Oc.displayName="Presence";function Tre(t){const[e,r]=C.useState(),n=C.useRef({}),i=C.useRef(t),s=C.useRef("none"),o=t?"mounted":"unmounted",[a,c]=Pre(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=jp(n.current);s.current=a==="mounted"?l:"none"},[a]),Wi(()=>{const l=n.current,u=i.current;if(u!==t){const d=s.current,h=jp(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),Wi(()=>{if(e){const l=f=>{const h=jp(n.current).includes(f.animationName);f.target===e&&h&&_s.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(s.current=jp(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function jp(t){return(t==null?void 0:t.animationName)||"none"}function ke(){return ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,i=C.Children.toArray(r),s=i.find(Ore);if(s){const o=s.props.children,a=i.map(c=>c===s?C.Children.count(o)>1?C.Children.only(null):C.isValidElement(o)?o.props.children:null:c);return C.createElement(Yx,ke({},n,{ref:e}),C.isValidElement(o)?C.cloneElement(o,void 0,a):null)}return C.createElement(Yx,ke({},n,{ref:e}),r)});Lf.displayName="Slot";const Yx=C.forwardRef((t,e)=>{const{children:r,...n}=t;return C.isValidElement(r)?C.cloneElement(r,{...Rre(n,r.props),ref:e?xN(e,r.ref):r.ref}):C.Children.count(r)>1?C.Children.only(null):null});Yx.displayName="SlotClone";const Ire=({children:t})=>C.createElement(C.Fragment,null,t);function Ore(t){return C.isValidElement(t)&&t.type===Ire}function Rre(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const $re=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ze=$re.reduce((t,e)=>{const r=C.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?Lf:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(a,dt({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function W3(t,e){t&&_s.flushSync(()=>t.dispatchEvent(e))}const CN="Checkbox",[Mre,pPe]=Cn(CN),[Nre,Dre]=Mre(CN),Lre=C.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=C.useState(null),h=qt(e,g=>d(g)),p=C.useRef(!1),v=f?!!f.closest("form"):!0,[b=!1,y]=fc({prop:i,defaultProp:s,onChange:l}),m=C.useRef(b);return C.useEffect(()=>{const g=f==null?void 0:f.form;if(g){const S=()=>y(m.current);return g.addEventListener("reset",S),()=>g.removeEventListener("reset",S)}},[f,y]),C.createElement(Nre,{scope:r,state:b,disabled:a},C.createElement(Ze.button,dt({type:"button",role:"checkbox","aria-checked":wl(b)?"mixed":b,"aria-required":o,"data-state":SN(b),"data-disabled":a?"":void 0,disabled:a,value:c},u,{ref:h,onKeyDown:Ee(t.onKeyDown,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:Ee(t.onClick,g=>{y(S=>wl(S)?!0:!S),v&&(p.current=g.isPropagationStopped(),p.current||g.stopPropagation())})})),v&&C.createElement(jre,{control:f,bubbles:!p.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),Fre="CheckboxIndicator",Bre=C.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...i}=t,s=Dre(Fre,r);return C.createElement(Oc,{present:n||wl(s.state)||s.state===!0},C.createElement(Ze.span,dt({"data-state":SN(s.state),"data-disabled":s.disabled?"":void 0},i,{ref:e,style:{pointerEvents:"none",...t.style}})))}),jre=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=C.useRef(null),o=Ng(r),a=Dg(e);return C.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});c.indeterminate=wl(r),f.call(c,wl(r)?!1:r),c.dispatchEvent(d)}},[o,r,n]),C.createElement("input",dt({type:"checkbox","aria-hidden":!0,defaultChecked:wl(r)?!1:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function wl(t){return t==="indeterminate"}function SN(t){return wl(t)?"indeterminate":t?"checked":"unchecked"}const Ure=Lre,zre=Bre;var Wre=fr({defaultClassName:"_43lu9r4",variantClassNames:{labelLocation:{top:"fyvr11kw fyvr11i4 fyvr118k fyvr11h0",left:"_43lu9r6 fyvr11ko fyvr11ic fyvr118k fyvr11h0",right:"_43lu9r7 fyvr11ko fyvr11ic fyvr118k fyvr11h0",hidden:"fyvr1188 fyvr11h0"}},defaultVariants:{},compoundVariants:[]});const tu=t=>{const{id:e,label:r,description:n,labelLocation:i="top",children:s,...o}=t,a=()=>r||n?K.jsxs(z,{flexDirection:"column",gap:"0.5",children:[r&&K.jsx(re,{variant:"small",color:"text100",hidden:i==="hidden",children:r}),n&&K.jsx(re,{variant:"small",color:"text50",hidden:i==="hidden",children:n})]}):null;return K.jsxs(z,{as:"label",className:Wre({labelLocation:i}),htmlFor:e,...o,children:[["left","top","hidden"].includes(i)&&a(),s,i==="right"&&a()]})};var yr=fr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const Hre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.168 9.25V2.929h-1.5V9.25h-6.32v1.5h6.32v6.321h1.5V10.75h6.321v-1.5h-6.32Z",clipRule:"evenodd"})}),qre=({size:t="sm",...e})=>K.jsx(z,{as:Hre,className:yr({size:t}),...e}),Vre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.888 14.47 1.06 1.06L17.48 10l-5.53-5.53-1.06 1.06 3.719 3.72H4.418v1.5h10.19l-3.72 3.72Z",clipRule:"evenodd"})}),Jx=({size:t="sm",...e})=>K.jsx(z,{as:Vre,className:yr({size:t}),...e}),Gre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),cd=({size:t="sm",...e})=>K.jsx(z,{as:Gre,className:yr({size:t}),...e}),Kre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m3.888 7.53 1.06-1.06 5.47 5.47 5.47-5.47 1.06 1.06-6.53 6.53-6.53-6.53Z",clipRule:"evenodd"})}),kN=({size:t="sm",...e})=>K.jsx(z,{as:Kre,className:yr({size:t}),...e}),Qre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.888 3.47 1.06 1.06L8.48 10l5.47 5.47-1.061 1.06L6.358 10l6.53-6.53Z",clipRule:"evenodd"})}),Lg=({size:t="sm",...e})=>K.jsx(z,{as:Qre,className:yr({size:t}),...e}),Yre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m7.949 16.53-1.061-1.06 5.47-5.47-5.47-5.47 1.06-1.06L14.48 10l-6.53 6.53Z",clipRule:"evenodd"})}),oo=({size:t="sm",...e})=>K.jsx(z,{as:Yre,className:yr({size:t}),...e}),Jre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m10.418 11.06 4.47 4.47 1.06-1.06L11.48 10l4.47-4.47-1.06-1.06-4.47 4.47-4.47-4.47-1.06 1.06L9.357 10l-4.47 4.47 1.06 1.06 4.47-4.47Z",clipRule:"evenodd"})}),ru=({size:t="sm",...e})=>K.jsx(z,{as:Jre,className:yr({size:t}),...e}),Xre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.918 4.5h-6V6h4.5v6.5h1.5v-8Zm-1.5 9.5v3h-9V6h3V3h9v11h-3Zm-7.5 1.5v-8h6v8h-6Z",clipRule:"evenodd"})}),Fg=({size:t="sm",...e})=>K.jsx(z,{as:Xre,className:yr({size:t}),...e}),Zre=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 6.714 3.618 3.547H2.5L4.158 7.02H2.98v.69h1.494v.663H2.981v.69h1.494v1.484h1.036V9.063h1.46v-.69h-1.46v-.66l.001-.003h1.46v-.69h-1.13L7.5 3.547H6.383L5 6.714Zm4.747 8.232v-.788a2.887 2.887 0 0 1-1.04-.249 2.04 2.04 0 0 1-.863-.727 2.213 2.213 0 0 1-.344-1.125h1.017c.02.26.098.476.236.65.14.171.319.299.535.383.144.054.297.09.46.109V10.81l-.319-.093c-.538-.157-.964-.388-1.28-.693-.312-.304-.469-.707-.469-1.209 0-.415.105-.777.315-1.086.21-.31.495-.55.853-.72.273-.133.573-.215.9-.246v-.817h.537v.81c.365.023.692.106.981.249.35.17.626.406.827.706.201.298.306.64.315 1.027h-.978a1.04 1.04 0 0 0-.433-.774 1.47 1.47 0 0 0-.712-.264v2.253l.283.079c.214.056.434.132.659.228a2.6 2.6 0 0 1 .627.38c.192.157.347.351.466.583.12.232.18.51.18.834 0 .407-.098.77-.295 1.086a2.006 2.006 0 0 1-.85.749c-.304.15-.66.239-1.07.265v.79h-.538Zm1.024-1.877c-.148.064-.31.106-.486.128v-2.23c.216.064.41.136.584.218.193.089.345.201.457.337.113.136.17.31.17.524 0 .234-.065.44-.194.615-.129.174-.306.31-.531.408ZM9.747 7.706v2.095a4.605 4.605 0 0 1-.246-.086 2.195 2.195 0 0 1-.4-.207 1.038 1.038 0 0 1-.299-.313.847.847 0 0 1-.111-.443.94.94 0 0 1 .164-.545c.112-.162.268-.288.47-.38.126-.059.267-.099.422-.12Zm7.677 10.086h-4.9v-.897h.34a.342.342 0 0 0 .29-.186c.068-.117.114-.254.137-.411.023-.16.032-.304.028-.432l-.027-.779H12.5v-.896h.76l-.043-1.262c-.018-.472.073-.866.273-1.183.203-.317.473-.555.809-.715.335-.16.697-.24 1.084-.24.346 0 .656.056.931.166.278.11.511.26.7.452.191.188.328.404.41.647.081.243.097.498.048.766l-1.01-.156c.023-.22-.014-.403-.11-.55a.891.891 0 0 0-.395-.33 1.31 1.31 0 0 0-1.102.024c-.177.09-.322.227-.434.411-.11.185-.164.42-.164.708l.048 1.261h1.649v.897H14.34l.029.752c.014.29-.025.55-.116.78-.04.1-.096.193-.166.276h3.337v.897Z",clipRule:"evenodd"})}),ene=({size:t="sm",...e})=>K.jsx(z,{as:Zre,className:yr({size:t}),...e}),tne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",d:"m5.285 12.883 6.53-6.53 2.254 2.253-6.531 6.531-2.878.618.625-2.872ZM14.674 8.001l-2.253-2.253 1.502-1.503L16.176 6.5 14.674 8Z"})}),rne=({size:t="sm",...e})=>K.jsx(z,{as:tne,className:yr({size:t}),...e}),nne=t=>K.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[K.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M10.906 8.966c1.459 1.316 1.459 3.45 0 4.765l-2.53 2.282c-1.459 1.316-3.824 1.316-5.282 0-1.459-1.315-1.459-3.449 0-4.764l1.265-1.142"}),K.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,d:"M8.094 11c-1.459-1.316-1.459-3.449 0-4.765l2.53-2.282c1.459-1.316 3.823-1.316 5.282 0s1.459 3.449 0 4.765l-1.265 1.14"})]}),ine=({size:t="sm",...e})=>K.jsx(z,{as:nne,className:yr({size:t}),...e}),sne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.918 14.994v.752A7.003 7.003 0 0 1 6.968 5.05a7.003 7.003 0 0 1 8.95-.796v.752a4.979 4.979 0 0 0-3.293 1.459 5 5 0 0 0 3.293 8.53Zm-4.353-.398c.329.329.684.615 1.059.859a5.5 5.5 0 1 1 0-10.91 6.5 6.5 0 0 0-1.06 10.051Z",clipRule:"evenodd"})}),one=({size:t="sm",...e})=>K.jsx(z,{as:sne,className:yr({size:t}),...e}),ane=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.283 6.175a4.643 4.643 0 1 0-6.566 6.567l-.708.707a5.644 5.644 0 1 1 7.982 0l-.708-.707a4.644 4.644 0 0 0 0-6.567Zm-5.097 1.47a2.565 2.565 0 0 1 3.628 3.627l.707.707a3.565 3.565 0 1 0-5.042 0l.707-.707a2.565 2.565 0 0 1 0-3.627ZM10 10.959a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm0 .667-1.5 6h3l-1.5-6Z",clipRule:"evenodd"})}),cne=({size:t="sm",...e})=>K.jsx(z,{as:ane,className:yr({size:t}),...e}),lne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.418 3.6h-2.5v2.5h2.5V3.6Zm0-1.5h1.5v5.5h-5.5V2.1h4Zm0 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4Zm8-9h2.5v2.5h-2.5V3.6Zm4-1.5h-5.5v5.5h5.5V2.1Zm-1.5 12h-2.5v2.5h2.5v-2.5Zm0-1.5h1.5v5.5h-5.5v-5.5h4ZM9.668 2.1v7.25h-7.25v1.5h8.75V2.1h-1.5Zm1.5 10.5v5.5h-1.5v-5.5h1.5Zm1.75-1.75h5.5v-1.5h-5.5v1.5Z",clipRule:"evenodd"})}),une=({size:t="sm",...e})=>K.jsx(z,{as:lne,className:yr({size:t}),...e}),fne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.918 9.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-.677 4.383a5.5 5.5 0 1 1 1.06-1.06l2.648 2.647-1.061 1.06-2.647-2.647Z",clipRule:"evenodd"})}),Bg=({size:t="sm",...e})=>K.jsx(z,{as:fne,className:yr({size:t}),...e}),dne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.529 15.925 9.419 11 4.493 8.89 2.418 8l2.142-.714 11.08-3.693L17.418 3l-.593 1.779-3.693 11.08L12.418 18l-.89-2.075Zm-1.71-6.386L6.635 8.175l6.82-2.273-3.638 3.637Zm1.06 1.061 1.364 3.183 2.273-6.82L10.88 10.6Z",clipRule:"evenodd"})}),jg=({size:t="sm",...e})=>K.jsx(z,{as:dne,className:yr({size:t}),...e}),hne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.775 5.204a5.465 5.465 0 0 0-1.341-.537L11 2.5H9l-.443 2.214c-.444.128-.866.31-1.257.54L5.404 3.99 3.99 5.404l1.283 1.925c-.212.38-.38.787-.497 1.216L2.5 9v2l2.276.455c.118.429.285.836.497 1.216L3.99 14.596l1.414 1.414L7.3 14.746c.391.23.813.412 1.257.54L9 17.5h2l.434-2.167c.474-.12.925-.302 1.341-.537l1.821 1.214 1.414-1.414-1.195-1.793c.253-.427.45-.891.581-1.382L17.5 11V9l-2.104-.42a5.467 5.467 0 0 0-.581-1.383l1.195-1.793-1.414-1.414-1.82 1.214Zm-.59 2.692a2.976 2.976 0 1 0-4.208 4.208 2.976 2.976 0 0 0 4.209-4.208Z",clipRule:"evenodd"})}),AN=({size:t="sm",...e})=>K.jsx(z,{as:hne,className:yr({size:t}),...e}),pne=t=>K.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[K.jsx("path",{fill:"currentColor",d:"M4 6.234a.5.5 0 0 0-.5.5v8a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5V10.5L14 9v5.734a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h5.769l-1.516 1.5H4Z"}),K.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),K.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),vne=({size:t="sm",...e})=>K.jsx(z,{as:pne,className:yr({size:t}),...e}),mne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.418 3.25h-5.75v13.5h5.75v-1.5h-4.25V4.75h4.25v-1.5Zm4.53 11.28-1.06-1.06 2.72-2.72h-8.19v-1.5h8.19l-2.72-2.72 1.06-1.06L18.48 10l-4.53 4.53Z",clipRule:"evenodd"})}),_N=({size:t="sm",...e})=>K.jsx(z,{as:mne,className:yr({size:t}),...e}),yne=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),gne=({size:t="sm",...e})=>K.jsx(z,{as:yne,className:yr({size:t}),...e}),bne=t=>K.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[K.jsx("path",{fill:"currentColor",d:"M4.633 10.75a5.878 5.878 0 0 1 .008-1.5H2.202v1.5h2.431ZM5.814 6.456A5.854 5.854 0 0 1 6.88 5.401L5.139 3.66l-1.06 1.06 1.735 1.736ZM4.078 15.28l1.711-1.711c.306.398.662.755 1.058 1.063L5.14 16.34l-1.06-1.06ZM9.668 15.802v2.414h1.5V15.8a5.876 5.876 0 0 1-1.5.003ZM13.98 14.623l1.718 1.717 1.06-1.06-1.721-1.723c-.305.4-.66.758-1.056 1.066ZM16.184 10.75h2.45v-1.5h-2.457a5.882 5.882 0 0 1 .007 1.5ZM15.012 6.467l1.747-1.747-1.061-1.06-1.75 1.75c.399.305.756.66 1.064 1.057ZM11.168 4.258V1.784h-1.5v2.472a5.875 5.875 0 0 1 1.5.002Z"}),K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 12.504a2.504 2.504 0 1 0 0-5.008 2.504 2.504 0 0 0 0 5.008Zm0 1.5a4.004 4.004 0 1 0 0-8.008 4.004 4.004 0 0 0 0 8.008Z",clipRule:"evenodd"})]}),wne=({size:t="sm",...e})=>K.jsx(z,{as:bne,className:yr({size:t}),...e}),Ene=t=>K.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:K.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"m12.28 2.856-6.71 8.887h4.134l-1.424 6.2 6.887-8.71h-4.322l1.435-6.377Z",clipRule:"evenodd"})}),PN=({size:t="sm",...e})=>K.jsx(z,{as:Ene,className:yr({size:t}),...e});var xne=fr({defaultClassName:"_1c9x66f1 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11h0 fyvr11ko fyvr11jg fyvr12vt fyvr12vr fyvr12vj fyvr12uz fyvr12uv",variantClassNames:{size:{sm:"_1c9x66f2",lg:"_1c9x66f3"}},defaultVariants:{},compoundVariants:[]}),Cne=fr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12rt fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const Sne=({size:t="sm"})=>K.jsx(zre,{className:Cne({size:t}),children:K.jsx(cd,{size:t})});C.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:i,label:s="",labelLocation:o="left",size:a="sm",...c}=t;return K.jsx(tu,{disabled:r,display:"flex",id:n??i,label:s,labelLocation:o,whiteSpace:"nowrap",children:K.jsx(Ure,{className:xne({size:a}),disabled:r,id:n??i,name:i,ref:e,...c,children:K.jsx(Sne,{})})})});x.createContext(null);const kne=l7["useId".toString()]||(()=>{});let Ane=0;function tc(t){const[e,r]=C.useState(kne());return Wi(()=>{t||r(n=>n??String(Ane++))},[t]),t||(e?`radix-${e}`:"")}const TN="Collapsible",[_ne,vPe]=Cn(TN);_ne(TN);function Ug(t){const e=t+"CollectionProvider",[r,n]=Cn(e),[i,s]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:p,children:v}=h,b=x.useRef(null),y=x.useRef(new Map).current;return x.createElement(i,{scope:p,itemMap:y,collectionRef:b},v)},a=t+"CollectionSlot",c=x.forwardRef((h,p)=>{const{scope:v,children:b}=h,y=s(a,v),m=qt(p,y.collectionRef);return x.createElement(Lf,{ref:m},b)}),l=t+"CollectionItemSlot",u="data-radix-collection-item",f=x.forwardRef((h,p)=>{const{scope:v,children:b,...y}=h,m=x.useRef(null),g=qt(p,m),S=s(l,v);return x.useEffect(()=>(S.itemMap.set(m,{ref:m,...y}),()=>void S.itemMap.delete(m))),x.createElement(Lf,{[u]:"",ref:g},b)});function d(h){const p=s(t+"CollectionConsumer",h);return x.useCallback(()=>{const b=p.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((S,P)=>y.indexOf(S.ref.current)-y.indexOf(P.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:o,Slot:c,ItemSlot:f},d,n]}const Pne=C.createContext(void 0);function zg(t){const e=C.useContext(Pne);return t||e||"ltr"}function Tne(t,e=globalThis==null?void 0:globalThis.document){const r=zi(t);C.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Xx="dismissableLayer.update",Ine="dismissableLayer.pointerDownOutside",One="dismissableLayer.focusOutside";let rP;const Rne=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),H3=C.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,u=C.useContext(Rne),[f,d]=C.useState(null),h=(r=f==null?void 0:f.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=C.useState({}),v=qt(e,I=>d(I)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(y),g=f?b.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=g>=m,T=$ne(I=>{const B=I.target,j=[...u.branches].some(H=>H.contains(B));!P||j||(s==null||s(I),a==null||a(I),I.defaultPrevented||c==null||c())},h),w=Mne(I=>{const B=I.target;[...u.branches].some(H=>H.contains(B))||(o==null||o(I),a==null||a(I),I.defaultPrevented||c==null||c())},h);return Tne(I=>{g===u.layers.size-1&&(i==null||i(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},h),C.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),nP(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=rP)}},[f,h,n,u]),C.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),nP())},[f,u]),C.useEffect(()=>{const I=()=>p({});return document.addEventListener(Xx,I),()=>document.removeEventListener(Xx,I)},[]),C.createElement(Ze.div,ke({},l,{ref:v,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:Ee(t.onFocusCapture,w.onFocusCapture),onBlurCapture:Ee(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Ee(t.onPointerDownCapture,T.onPointerDownCapture)}))});function $ne(t,e=globalThis==null?void 0:globalThis.document){const r=zi(t),n=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let c=function(){IN(Ine,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=c,e.addEventListener("click",i.current,{once:!0})):c()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function Mne(t,e=globalThis==null?void 0:globalThis.document){const r=zi(t),n=C.useRef(!1);return C.useEffect(()=>{const i=s=>{s.target&&!n.current&&IN(One,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function nP(){const t=new CustomEvent(Xx);document.dispatchEvent(t)}function IN(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?W3(i,s):i.dispatchEvent(s)}const Nne=H3;let x2=0;function ON(){C.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:iP()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:iP()),x2++,()=>{x2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),x2--}},[])}function iP(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const C2="focusScope.autoFocusOnMount",S2="focusScope.autoFocusOnUnmount",sP={bubbles:!1,cancelable:!0},RN=C.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,c]=C.useState(null),l=zi(i),u=zi(s),f=C.useRef(null),d=qt(e,v=>c(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(n){let v=function(g){if(h.paused||!a)return;const S=g.target;a.contains(S)?f.current=S:Sa(f.current,{select:!0})},b=function(g){if(h.paused||!a)return;const S=g.relatedTarget;S!==null&&(a.contains(S)||Sa(f.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const P of g)P.removedNodes.length>0&&Sa(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const m=new MutationObserver(y);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),m.disconnect()}}},[n,a,h.paused]),C.useEffect(()=>{if(a){aP.add(h);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(C2,sP);a.addEventListener(C2,l),a.dispatchEvent(y),y.defaultPrevented||(Dne(Une($N(a)),{select:!0}),document.activeElement===v&&Sa(a))}return()=>{a.removeEventListener(C2,l),setTimeout(()=>{const y=new CustomEvent(S2,sP);a.addEventListener(S2,u),a.dispatchEvent(y),y.defaultPrevented||Sa(v??document.body,{select:!0}),a.removeEventListener(S2,u),aP.remove(h)},0)}}},[a,l,u,h]);const p=C.useCallback(v=>{if(!r&&!n||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(b&&y){const m=v.currentTarget,[g,S]=Lne(m);g&&S?!v.shiftKey&&y===S?(v.preventDefault(),r&&Sa(g,{select:!0})):v.shiftKey&&y===g&&(v.preventDefault(),r&&Sa(S,{select:!0})):y===m&&v.preventDefault()}},[r,n,h.paused]);return C.createElement(Ze.div,ke({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function Dne(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Sa(n,{select:e}),document.activeElement!==r)return}function Lne(t){const e=$N(t),r=oP(e,t),n=oP(e.reverse(),t);return[r,n]}function $N(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function oP(t,e){for(const r of t)if(!Fne(r,{upTo:e}))return r}function Fne(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Bne(t){return t instanceof HTMLInputElement&&"select"in t}function Sa(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Bne(t)&&e&&t.select()}}const aP=jne();function jne(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=cP(t,e),t.unshift(e)},remove(e){var r;t=cP(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function cP(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Une(t){return t.filter(e=>e.tagName!=="A")}const zne=["top","right","bottom","left"],dc=Math.min,li=Math.max,Zm=Math.round,Up=Math.floor,hc=t=>({x:t,y:t}),Wne={left:"right",right:"left",bottom:"top",top:"bottom"},Hne={start:"end",end:"start"};function Zx(t,e,r){return li(t,dc(e,r))}function Ko(t,e){return typeof t=="function"?t(e):t}function Qo(t){return t.split("-")[0]}function ld(t){return t.split("-")[1]}function q3(t){return t==="x"?"y":"x"}function V3(t){return t==="y"?"height":"width"}function ud(t){return["top","bottom"].includes(Qo(t))?"y":"x"}function G3(t){return q3(ud(t))}function qne(t,e,r){r===void 0&&(r=!1);const n=ld(t),i=G3(t),s=V3(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=ey(o)),[o,ey(o)]}function Vne(t){const e=ey(t);return[eC(t),e,eC(e)]}function eC(t){return t.replace(/start|end/g,e=>Hne[e])}function Gne(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function Kne(t,e,r,n){const i=ld(t);let s=Gne(Qo(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(eC)))),s}function ey(t){return t.replace(/left|right|bottom|top/g,e=>Wne[e])}function Qne(t){return{top:0,right:0,bottom:0,left:0,...t}}function MN(t){return typeof t!="number"?Qne(t):{top:t,right:t,bottom:t,left:t}}function ty(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function lP(t,e,r){let{reference:n,floating:i}=t;const s=ud(e),o=G3(e),a=V3(o),c=Qo(e),l=s==="y",u=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(ld(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const Yne=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=lP(l,n,c),d=n,h={},p=0;for(let v=0;v({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=Ko(t,e)||{};if(l==null)return{};const f=MN(u),d={x:r,y:n},h=G3(i),p=V3(h),v=await o.getDimensions(l),b=h==="y",y=b?"top":"left",m=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-d[h]-s.floating[p],P=d[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let w=T?T[g]:0;(!w||!await(o.isElement==null?void 0:o.isElement(T)))&&(w=a.floating[g]||s.floating[p]);const I=S/2-P/2,B=w/2-v[p]/2-1,j=dc(f[y],B),H=dc(f[m],B),G=j,F=w-v[p]-H,E=w/2-v[p]/2+I,_=Zx(G,E,F),O=!c.arrow&&ld(i)!=null&&E!=_&&s.reference[p]/2-(EG<=0)){var B,j;const G=(((B=s.flip)==null?void 0:B.index)||0)+1,F=P[G];if(F)return{data:{index:G,overflows:I},reset:{placement:F}};let E=(j=I.filter(_=>_.overflows[0]<=0).sort((_,O)=>_.overflows[1]-O.overflows[1])[0])==null?void 0:j.placement;if(!E)switch(h){case"bestFit":{var H;const _=(H=I.map(O=>[O.placement,O.overflows.filter(N=>N>0).reduce((N,k)=>N+k,0)]).sort((O,N)=>O[1]-N[1])[0])==null?void 0:H[0];_&&(E=_);break}case"initialPlacement":E=a;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function fP(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function dP(t){return zne.some(e=>t[e]>=0)}const Xne=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=Ko(t,e);switch(n){case"referenceHidden":{const s=await $0(e,{...i,elementContext:"reference"}),o=fP(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:dP(o)}}}case"escaped":{const s=await $0(e,{...i,altBoundary:!0}),o=fP(s,r.floating);return{data:{escapedOffsets:o,escaped:dP(o)}}}default:return{}}}}};async function Zne(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=Qo(r),a=ld(r),c=ud(r)==="y",l=["left","top"].includes(o)?-1:1,u=s&&c?-1:1,f=Ko(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const eie=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await Zne(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},tie=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:y,y:m}=b;return{x:y,y:m}}},...c}=Ko(t,e),l={x:r,y:n},u=await $0(e,c),f=ud(Qo(i)),d=q3(f);let h=l[d],p=l[f];if(s){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=h+u[b],g=h-u[y];h=Zx(m,h,g)}if(o){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",m=p+u[b],g=p-u[y];p=Zx(m,p,g)}const v=a.fn({...e,[d]:h,[f]:p});return{...v,data:{x:v.x-r,y:v.y-n}}}}},rie=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Ko(t,e),u={x:r,y:n},f=ud(i),d=q3(f);let h=u[d],p=u[f];const v=Ko(a,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const g=d==="y"?"height":"width",S=s.reference[d]-s.floating[g]+b.mainAxis,P=s.reference[d]+s.reference[g]-b.mainAxis;hP&&(h=P)}if(l){var y,m;const g=d==="y"?"width":"height",S=["top","left"].includes(Qo(i)),P=s.reference[f]-s.floating[g]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:b.crossAxis),T=s.reference[f]+s.reference[g]+(S?0:((m=o.offset)==null?void 0:m[f])||0)-(S?b.crossAxis:0);pT&&(p=T)}return{[d]:h,[f]:p}}}},nie=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=Ko(t,e),c=await $0(e,a),l=Qo(r),u=ld(r),f=ud(r)==="y",{width:d,height:h}=n.floating;let p,v;l==="top"||l==="bottom"?(p=l,v=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=l,p=u==="end"?"top":"bottom");const b=h-c[p],y=d-c[v],m=!e.middlewareData.shift;let g=b,S=y;if(f){const T=d-c.left-c.right;S=u||m?dc(y,T):T}else{const T=h-c.top-c.bottom;g=u||m?dc(b,T):T}if(m&&!u){const T=li(c.left,0),w=li(c.right,0),I=li(c.top,0),B=li(c.bottom,0);f?S=d-2*(T!==0||w!==0?T+w:li(c.left,c.right)):g=h-2*(I!==0||B!==0?I+B:li(c.top,c.bottom))}await o({...e,availableWidth:S,availableHeight:g});const P=await i.getDimensions(s.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function pc(t){return NN(t)?(t.nodeName||"").toLowerCase():"#document"}function mi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function la(t){var e;return(e=(NN(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function NN(t){return t instanceof Node||t instanceof mi(t).Node}function Yo(t){return t instanceof Element||t instanceof mi(t).Element}function vo(t){return t instanceof HTMLElement||t instanceof mi(t).HTMLElement}function hP(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof mi(t).ShadowRoot}function R1(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Hi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function iie(t){return["table","td","th"].includes(pc(t))}function K3(t){const e=Q3(),r=Hi(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function sie(t){let e=Ff(t);for(;vo(e)&&!Wg(e);){if(K3(e))return e;e=Ff(e)}return null}function Q3(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wg(t){return["html","body","#document"].includes(pc(t))}function Hi(t){return mi(t).getComputedStyle(t)}function Hg(t){return Yo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ff(t){if(pc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||hP(t)&&t.host||la(t);return hP(e)?e.host:e}function DN(t){const e=Ff(t);return Wg(e)?t.ownerDocument?t.ownerDocument.body:t.body:vo(e)&&R1(e)?e:DN(e)}function M0(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=DN(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=mi(i);return s?e.concat(o,o.visualViewport||[],R1(i)?i:[],o.frameElement&&r?M0(o.frameElement):[]):e.concat(i,M0(i,[],r))}function LN(t){const e=Hi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=vo(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Zm(r)!==s||Zm(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function Y3(t){return Yo(t)?t:t.contextElement}function df(t){const e=Y3(t);if(!vo(e))return hc(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=LN(e);let o=(s?Zm(r.width):r.width)/n,a=(s?Zm(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const oie=hc(0);function FN(t){const e=mi(t);return!Q3()||!e.visualViewport?oie:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function aie(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==mi(t)?!1:e}function Bl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=Y3(t);let o=hc(1);e&&(n?Yo(n)&&(o=df(n)):o=df(t));const a=aie(s,r,n)?FN(s):hc(0);let c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=mi(s),h=n&&Yo(n)?mi(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const v=df(p),b=p.getBoundingClientRect(),y=Hi(p),m=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*v.x,g=b.top+(p.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=m,l+=g,p=mi(p).frameElement}}return ty({width:u,height:f,x:c,y:l})}function cie(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=vo(r),s=la(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=hc(1);const c=hc(0);if((i||!i&&n!=="fixed")&&((pc(r)!=="body"||R1(s))&&(o=Hg(r)),vo(r))){const l=Bl(r);a=df(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function lie(t){return Array.from(t.getClientRects())}function BN(t){return Bl(la(t)).left+Hg(t).scrollLeft}function uie(t){const e=la(t),r=Hg(t),n=t.ownerDocument.body,i=li(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=li(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+BN(t);const a=-r.scrollTop;return Hi(n).direction==="rtl"&&(o+=li(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function fie(t,e){const r=mi(t),n=la(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=Q3();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function die(t,e){const r=Bl(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=vo(t)?df(t):hc(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function pP(t,e,r){let n;if(e==="viewport")n=fie(t,r);else if(e==="document")n=uie(la(t));else if(Yo(e))n=die(e,r);else{const i=FN(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return ty(n)}function jN(t,e){const r=Ff(t);return r===e||!Yo(r)||Wg(r)?!1:Hi(r).position==="fixed"||jN(r,e)}function hie(t,e){const r=e.get(t);if(r)return r;let n=M0(t,[],!1).filter(a=>Yo(a)&&pc(a)!=="body"),i=null;const s=Hi(t).position==="fixed";let o=s?Ff(t):t;for(;Yo(o)&&!Wg(o);){const a=Hi(o),c=K3(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||R1(o)&&!c&&jN(t,o))?n=n.filter(u=>u!==o):i=a,o=Ff(o)}return e.set(t,n),n}function pie(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?hie(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=pP(e,u,i);return l.top=li(f.top,l.top),l.right=dc(f.right,l.right),l.bottom=dc(f.bottom,l.bottom),l.left=li(f.left,l.left),l},pP(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function vie(t){return LN(t)}function mie(t,e,r){const n=vo(e),i=la(e),s=r==="fixed",o=Bl(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=hc(0);if(n||!n&&!s)if((pc(e)!=="body"||R1(i))&&(a=Hg(e)),n){const l=Bl(e,!0,s,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else i&&(c.x=BN(i));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function vP(t,e){return!vo(t)||Hi(t).position==="fixed"?null:e?e(t):t.offsetParent}function UN(t,e){const r=mi(t);if(!vo(t))return r;let n=vP(t,e);for(;n&&iie(n)&&Hi(n).position==="static";)n=vP(n,e);return n&&(pc(n)==="html"||pc(n)==="body"&&Hi(n).position==="static"&&!K3(n))?r:n||sie(t)||r}const yie=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||UN,s=this.getDimensions;return{reference:mie(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function gie(t){return Hi(t).direction==="rtl"}const bie={convertOffsetParentRelativeRectToViewportRelativeRect:cie,getDocumentElement:la,getClippingRect:pie,getOffsetParent:UN,getElementRects:yie,getClientRects:lie,getDimensions:vie,getScale:df,isElement:Yo,isRTL:gie};function wie(t,e){let r=null,n;const i=la(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=Up(u),p=Up(i.clientWidth-(l+f)),v=Up(i.clientHeight-(u+d)),b=Up(l),m={rootMargin:-h+"px "+-p+"px "+-v+"px "+-b+"px",threshold:li(0,dc(1,c))||1};let g=!0;function S(P){const T=P[0].intersectionRatio;if(T!==c){if(!g)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},100)}g=!1}try{r=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,m)}r.observe(t)}return o(!0),s}function Eie(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=Y3(t),u=i||s?[...l?M0(l):[],...M0(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=l&&a?wie(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[m]=y;m&&m.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,v=c?Bl(t):null;c&&b();function b(){const y=Bl(t);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&r(),v=y,p=requestAnimationFrame(b)}return r(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const xie=(t,e,r)=>{const n=new Map,i={platform:bie,...r},s={...i.platform,_c:n};return Yne(t,e,{...i,platform:s})},Cie=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?uP({element:n.current,padding:i}).fn(r):{}:n?uP({element:n,padding:i}).fn(r):{}}}};var Mv=typeof document<"u"?C.useLayoutEffect:C.useEffect;function ry(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!ry(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!ry(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function zN(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function mP(t,e){const r=zN(t);return Math.round(e*r)/r}function yP(t){const e=C.useRef(t);return Mv(()=>{e.current=t}),e}function Sie(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=C.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=C.useState(n);ry(d,n)||h(n);const[p,v]=C.useState(null),[b,y]=C.useState(null),m=C.useCallback(O=>{O!=T.current&&(T.current=O,v(O))},[v]),g=C.useCallback(O=>{O!==w.current&&(w.current=O,y(O))},[y]),S=s||p,P=o||b,T=C.useRef(null),w=C.useRef(null),I=C.useRef(u),B=yP(c),j=yP(i),H=C.useCallback(()=>{if(!T.current||!w.current)return;const O={placement:e,strategy:r,middleware:d};j.current&&(O.platform=j.current),xie(T.current,w.current,O).then(N=>{const k={...N,isPositioned:!0};G.current&&!ry(I.current,k)&&(I.current=k,_s.flushSync(()=>{f(k)}))})},[d,e,r,j]);Mv(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const G=C.useRef(!1);Mv(()=>(G.current=!0,()=>{G.current=!1}),[]),Mv(()=>{if(S&&(T.current=S),P&&(w.current=P),S&&P){if(B.current)return B.current(S,P,H);H()}},[S,P,H,B]);const F=C.useMemo(()=>({reference:T,floating:w,setReference:m,setFloating:g}),[m,g]),E=C.useMemo(()=>({reference:S,floating:P}),[S,P]),_=C.useMemo(()=>{const O={position:r,left:0,top:0};if(!E.floating)return O;const N=mP(E.floating,u.x),k=mP(E.floating,u.y);return a?{...O,transform:"translate("+N+"px, "+k+"px)",...zN(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:k}},[r,a,E.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:H,refs:F,elements:E,floatingStyles:_}),[u,H,F,E,_])}const WN="Popper",[HN,fd]=Cn(WN),[kie,qN]=HN(WN),Aie=t=>{const{__scopePopper:e,children:r}=t,[n,i]=C.useState(null);return C.createElement(kie,{scope:e,anchor:n,onAnchorChange:i},r)},_ie="PopperAnchor",Pie=C.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=qN(_ie,r),o=C.useRef(null),a=qt(e,o);return C.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:C.createElement(Ze.div,ke({},i,{ref:a}))}),VN="PopperContent",[Tie,mPe]=HN(VN),Iie=C.forwardRef((t,e)=>{var r,n,i,s,o,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:v=0,avoidCollisions:b=!0,collisionBoundary:y=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:S=!1,updatePositionStrategy:P="optimized",onPlaced:T,...w}=t,I=qN(VN,u),[B,j]=C.useState(null),H=qt(e,ue=>j(ue)),[G,F]=C.useState(null),E=Dg(G),_=(r=E==null?void 0:E.width)!==null&&r!==void 0?r:0,O=(n=E==null?void 0:E.height)!==null&&n!==void 0?n:0,N=f+(h!=="center"?"-"+h:""),k=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},$=Array.isArray(y)?y:[y],L=$.length>0,M={padding:k,boundary:$.filter(Oie),altBoundary:L},{refs:A,floatingStyles:D,placement:V,isPositioned:R,middlewareData:U}=Sie({strategy:"fixed",placement:N,whileElementsMounted:(...ue)=>Eie(...ue,{animationFrame:P==="always"}),elements:{reference:I.anchor},middleware:[eie({mainAxis:d+O,alignmentAxis:p}),b&&tie({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?rie():void 0,...M}),b&&Jne({...M}),nie({...M,apply:({elements:ue,rects:ot,availableWidth:Pe,availableHeight:Ae})=>{const{width:at,height:xe}=ot.reference,be=ue.floating.style;be.setProperty("--radix-popper-available-width",`${Pe}px`),be.setProperty("--radix-popper-available-height",`${Ae}px`),be.setProperty("--radix-popper-anchor-width",`${at}px`),be.setProperty("--radix-popper-anchor-height",`${xe}px`)}}),G&&Cie({element:G,padding:v}),Rie({arrowWidth:_,arrowHeight:O}),S&&Xne({strategy:"referenceHidden",...M})]}),[W,q]=GN(V),Y=zi(T);Wi(()=>{R&&(Y==null||Y())},[R,Y]);const X=(i=U.arrow)===null||i===void 0?void 0:i.x,Q=(s=U.arrow)===null||s===void 0?void 0:s.y,Z=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ae,se]=C.useState();return Wi(()=>{B&&se(window.getComputedStyle(B).zIndex)},[B]),C.createElement("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:R?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},C.createElement(Tie,{scope:u,placedSide:W,onArrowChange:F,arrowX:X,arrowY:Q,shouldHideArrow:Z},C.createElement(Ze.div,ke({"data-side":W,"data-align":q},w,{ref:H,style:{...w.style,animation:R?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function Oie(t){return t!==null}const Rie=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:c,middlewareData:l}=e,f=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=f?0:t.arrowWidth,h=f?0:t.arrowHeight,[p,v]=GN(a),b={start:"0%",center:"50%",end:"100%"}[v],y=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,m=((s=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let g="",S="";return p==="bottom"?(g=f?b:`${y}px`,S=`${-h}px`):p==="top"?(g=f?b:`${y}px`,S=`${c.floating.height+h}px`):p==="right"?(g=`${-h}px`,S=f?b:`${m}px`):p==="left"&&(g=`${c.floating.width+h}px`,S=f?b:`${m}px`),{data:{x:g,y:S}}}});function GN(t){const[e,r="center"]=t.split("-");return[e,r]}const $ie=Aie,Mie=Pie,Nie=Iie,KN=C.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=t;return n?_V.createPortal(C.createElement(Ze.div,ke({},i,{ref:e})),n):null}),k2="rovingFocusGroup.onEntryFocus",Die={bubbles:!1,cancelable:!0},J3="RovingFocusGroup",[tC,QN,Lie]=Ug(J3),[Fie,dd]=Cn(J3,[Lie]),[Bie,jie]=Fie(J3),Uie=C.forwardRef((t,e)=>C.createElement(tC.Provider,{scope:t.__scopeRovingFocusGroup},C.createElement(tC.Slot,{scope:t.__scopeRovingFocusGroup},C.createElement(zie,dt({},t,{ref:e}))))),zie=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=t,f=C.useRef(null),d=qt(e,f),h=zg(s),[p=null,v]=fc({prop:o,defaultProp:a,onChange:c}),[b,y]=C.useState(!1),m=zi(l),g=QN(r),S=C.useRef(!1),[P,T]=C.useState(0);return C.useEffect(()=>{const w=f.current;if(w)return w.addEventListener(k2,m),()=>w.removeEventListener(k2,m)},[m]),C.createElement(Bie,{scope:r,orientation:n,dir:h,loop:i,currentTabStopId:p,onItemFocus:C.useCallback(w=>v(w),[v]),onItemShiftTab:C.useCallback(()=>y(!0),[]),onFocusableItemAdd:C.useCallback(()=>T(w=>w+1),[]),onFocusableItemRemove:C.useCallback(()=>T(w=>w-1),[])},C.createElement(Ze.div,dt({tabIndex:b||P===0?-1:0,"data-orientation":n},u,{ref:d,style:{outline:"none",...t.style},onMouseDown:Ee(t.onMouseDown,()=>{S.current=!0}),onFocus:Ee(t.onFocus,w=>{const I=!S.current;if(w.target===w.currentTarget&&I&&!b){const B=new CustomEvent(k2,Die);if(w.currentTarget.dispatchEvent(B),!B.defaultPrevented){const j=g().filter(_=>_.focusable),H=j.find(_=>_.active),G=j.find(_=>_.id===p),E=[H,G,...j].filter(Boolean).map(_=>_.ref.current);YN(E)}}S.current=!1}),onBlur:Ee(t.onBlur,()=>y(!1))})))}),Wie="RovingFocusGroupItem",Hie=C.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:s,...o}=t,a=tc(),c=s||a,l=jie(Wie,r),u=l.currentTabStopId===c,f=QN(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return C.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),C.createElement(tC.ItemSlot,{scope:r,id:c,focusable:n,active:i},C.createElement(Ze.span,dt({tabIndex:u?0:-1,"data-orientation":l.orientation},o,{ref:e,onMouseDown:Ee(t.onMouseDown,p=>{n?l.onItemFocus(c):p.preventDefault()}),onFocus:Ee(t.onFocus,()=>l.onItemFocus(c)),onKeyDown:Ee(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){l.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const v=Gie(p,l.orientation,l.dir);if(v!==void 0){p.preventDefault();let y=f().filter(m=>m.focusable).map(m=>m.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const m=y.indexOf(p.currentTarget);y=l.loop?Kie(y,m+1):y.slice(m+1)}setTimeout(()=>YN(y))}})})))}),qie={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Vie(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Gie(t,e,r){const n=Vie(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return qie[n]}function YN(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function Kie(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const JN=Uie,X3=Hie;var Qie=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},vu=new WeakMap,zp=new WeakMap,Wp={},A2=0,XN=function(t){return t&&(t.host||XN(t.parentNode))},Yie=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=XN(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},Jie=function(t,e,r,n){var i=Yie(e,Array.isArray(t)?t:[t]);Wp[r]||(Wp[r]=new WeakMap);var s=Wp[r],o=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",v=(vu.get(d)||0)+1,b=(s.get(d)||0)+1;vu.set(d,v),s.set(d,b),o.push(d),v===1&&p&&zp.set(d,!0),b===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return u(e),a.clear(),A2++,function(){o.forEach(function(f){var d=vu.get(f)-1,h=s.get(f)-1;vu.set(f,d),s.set(f,h),d||(zp.has(f)||f.removeAttribute(n),zp.delete(f)),h||f.removeAttribute(r)}),A2--,A2||(vu=new WeakMap,vu=new WeakMap,zp=new WeakMap,Wp={})}},ZN=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||Qie(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Jie(n,i,r,"aria-hidden")):function(){return null}},Qs=function(){return Qs=Object.assign||function(e){for(var r,n=1,i=arguments.length;n"u")return pse;var e=vse(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},yse=nD(),gse=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(Zie,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -98,17 +103,17 @@ Error generating stack: `+s.message+` } body { - `).concat(Gie,": ").concat(a,`px; + `).concat(ese,": ").concat(a,`px; } -`)},dse=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=C.useMemo(function(){return lse(i)},[i]);return C.createElement(use,{styles:fse(s,!e,i,r?"":"!important")})},rC=!1;if(typeof window<"u")try{var Hp=Object.defineProperty({},"passive",{get:function(){return rC=!0,!0}});window.addEventListener("test",Hp,Hp),window.removeEventListener("test",Hp,Hp)}catch{rC=!1}var mu=rC?{passive:!1}:!1,hse=function(t){return t.tagName==="TEXTAREA"},eD=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!hse(t)&&r[e]==="visible")},pse=function(t){return eD(t,"overflowY")},vse=function(t){return eD(t,"overflowX")},yP=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=tD(t,r);if(n){var i=rD(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},mse=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},yse=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},tD=function(t,e){return t==="v"?pse(e):vse(e)},rD=function(t,e){return t==="v"?mse(e):yse(e)},gse=function(t,e){return t==="h"&&e==="rtl"?-1:1},bse=function(t,e,r,n,i){var s=gse(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=rD(t,a),p=h[0],v=h[1],b=h[2],y=v-b-s*p;(p||y)&&tD(t,a)&&(f+=y,d+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(i&&f===0||!i&&o>f)||!u&&(i&&d===0||!i&&-o>d))&&(l=!0),l},qp=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},gP=function(t){return[t.deltaX,t.deltaY]},bP=function(t){return t&&"current"in t?t.current:t},wse=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Ese=function(t){return` +`)},bse=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=C.useMemo(function(){return mse(i)},[i]);return C.createElement(yse,{styles:gse(s,!e,i,r?"":"!important")})},rC=!1;if(typeof window<"u")try{var Hp=Object.defineProperty({},"passive",{get:function(){return rC=!0,!0}});window.addEventListener("test",Hp,Hp),window.removeEventListener("test",Hp,Hp)}catch{rC=!1}var mu=rC?{passive:!1}:!1,wse=function(t){return t.tagName==="TEXTAREA"},iD=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!wse(t)&&r[e]==="visible")},Ese=function(t){return iD(t,"overflowY")},xse=function(t){return iD(t,"overflowX")},gP=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=sD(t,r);if(n){var i=oD(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Cse=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Sse=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},sD=function(t,e){return t==="v"?Ese(e):xse(e)},oD=function(t,e){return t==="v"?Cse(e):Sse(e)},kse=function(t,e){return t==="h"&&e==="rtl"?-1:1},Ase=function(t,e,r,n,i){var s=kse(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=oD(t,a),p=h[0],v=h[1],b=h[2],y=v-b-s*p;(p||y)&&sD(t,a)&&(f+=y,d+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(i&&f===0||!i&&o>f)||!u&&(i&&d===0||!i&&-o>d))&&(l=!0),l},qp=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},bP=function(t){return[t.deltaX,t.deltaY]},wP=function(t){return t&&"current"in t?t.current:t},_se=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Pse=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},xse=0,yu=[];function Cse(t){var e=C.useRef([]),r=C.useRef([0,0]),n=C.useRef(),i=C.useState(xse++)[0],s=C.useState(function(){return ZN()})[0],o=C.useRef(t);C.useEffect(function(){o.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=qie([t.lockRef.current],(t.shards||[]).map(bP),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=C.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!o.current.allowPinchZoom;var y=qp(v),m=r.current,g="deltaX"in v?v.deltaX:m[0]-y[0],S="deltaY"in v?v.deltaY:m[1]-y[1],P,T=v.target,w=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in v&&w==="h"&&T.type==="range")return!1;var I=yP(w,T);if(!I)return!0;if(I?P=w:(P=w==="v"?"h":"v",I=yP(w,T)),!I)return!1;if(!n.current&&"changedTouches"in v&&(g||S)&&(n.current=P),!P)return!0;var F=n.current||P;return bse(F,b,v,F==="h"?g:S,!0)},[]),c=C.useCallback(function(v){var b=v;if(!(!yu.length||yu[yu.length-1]!==s)){var y="deltaY"in b?gP(b):qp(b),m=e.current.filter(function(P){return P.name===b.type&&P.target===b.target&&wse(P.delta,y)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var g=(o.current.shards||[]).map(bP).filter(Boolean).filter(function(P){return P.contains(b.target)}),S=g.length>0?a(b,g[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),l=C.useCallback(function(v,b,y,m){var g={name:v,delta:b,target:y,should:m};e.current.push(g),setTimeout(function(){e.current=e.current.filter(function(S){return S!==g})},1)},[]),u=C.useCallback(function(v){r.current=qp(v),n.current=void 0},[]),f=C.useCallback(function(v){l(v.type,gP(v),v.target,a(v,t.lockRef.current))},[]),d=C.useCallback(function(v){l(v.type,qp(v),v.target,a(v,t.lockRef.current))},[]);C.useEffect(function(){return yu.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,mu),document.addEventListener("touchmove",c,mu),document.addEventListener("touchstart",u,mu),function(){yu=yu.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,mu),document.removeEventListener("touchmove",c,mu),document.removeEventListener("touchstart",u,mu)}},[]);var h=t.removeScrollBar,p=t.inert;return C.createElement(C.Fragment,null,p?C.createElement(s,{styles:Ese(i)}):null,h?C.createElement(dse,{gapMode:"margin"}):null)}const Sse=ese(XN,Cse);var nD=C.forwardRef(function(t,e){return C.createElement(qg,Qs({},t,{ref:e,sideCar:Sse}))});nD.classNames=qg.classNames;const iD=nD,kse=["Enter"," "],Vg="Menu",[Ase,aPe,_se]=Ug(Vg),[nu,sD]=Cn(Vg,[_se,fd,dd]);fd();const Pse=dd();nu(Vg);const[cPe,Tse]=nu(Vg),Ise="MenuPortal";nu(Ise,{forceMount:void 0});const Ose="MenuContent",[lPe,oD]=nu(Ose),nC="MenuItem",wP="menu.itemSelect",aD=C.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=C.useRef(null),o=Tse(nC,t.__scopeMenu),a=oD(nC,t.__scopeMenu),c=Ht(e,s),l=C.useRef(!1),u=()=>{const f=s.current;if(!r&&f){const d=new CustomEvent(wP,{bubbles:!0,cancelable:!0});f.addEventListener(wP,h=>n==null?void 0:n(h),{once:!0}),H3(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return C.createElement(Rse,xe({},i,{ref:c,disabled:r,onClick:Ee(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,f),l.current=!0},onPointerUp:Ee(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ee(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||kse.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),Rse=C.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=oD(nC,r),a=Pse(r),c=C.useRef(null),l=Ht(e,c),[u,f]=C.useState(!1),[d,h]=C.useState("");return C.useEffect(()=>{const p=c.current;if(p){var v;h(((v=p.textContent)!==null&&v!==void 0?v:"").trim())}},[s.children]),C.createElement(Ase.ItemSlot,{scope:r,disabled:n,textValue:i??d},C.createElement(Z3,xe({asChild:!0},a,{focusable:!n}),C.createElement(Ze.div,xe({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:l,onPointerMove:Ee(t.onPointerMove,EP(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus())})),onPointerLeave:Ee(t.onPointerLeave,EP(p=>o.onItemLeave(p))),onFocus:Ee(t.onFocus,()=>f(!0)),onBlur:Ee(t.onBlur,()=>f(!1))}))))}),$se=C.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return C.createElement(lD,{scope:t.__scopeMenu,checked:r},C.createElement(aD,xe({role:"menuitemcheckbox","aria-checked":ny(r)?"mixed":r},i,{ref:e,"data-state":eS(r),onSelect:Ee(i.onSelect,()=>n==null?void 0:n(ny(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),Mse="MenuRadioGroup",[uPe,Nse]=nu(Mse,{value:void 0,onValueChange:()=>{}}),Dse="MenuRadioItem",Lse=C.forwardRef((t,e)=>{const{value:r,...n}=t,i=Nse(Dse,t.__scopeMenu),s=r===i.value;return C.createElement(lD,{scope:t.__scopeMenu,checked:s},C.createElement(aD,xe({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":eS(s),onSelect:Ee(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),cD="MenuItemIndicator",[lD,Bse]=nu(cD,{checked:!1}),Fse=C.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=Bse(cD,r);return C.createElement(Oc,{present:n||ny(s.checked)||s.checked===!0},C.createElement(Ze.span,xe({},i,{ref:e,"data-state":eS(s.checked)})))}),jse="MenuSub";nu(jse);function ny(t){return t==="indeterminate"}function eS(t){return ny(t)?"indeterminate":t?"checked":"unchecked"}function EP(t){return e=>e.pointerType==="mouse"?t(e):void 0}const Use=$se,zse=Lse,Wse=Fse,uD="DropdownMenu",[Hse,fPe]=Cn(uD,[sD]),tS=sD();Hse(uD);const qse=C.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=tS(r);return C.createElement(Use,xe({},i,n,{ref:e}))}),Vse=C.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=tS(r);return C.createElement(zse,xe({},i,n,{ref:e}))}),Gse=C.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=tS(r);return C.createElement(Wse,xe({},i,n,{ref:e}))}),Kse=qse,Qse=Vse,fD=Gse;var dD="_1k2mbvi5",hD="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const Yse=({children:t})=>K.jsx(fD,{className:dD,children:t});C.forwardRef(({className:t,children:e,...r},n)=>K.jsxs(Kse,{className:Si(hD,t),...r,ref:n,children:[K.jsx(Yse,{children:K.jsx(cd,{size:"xs"})}),K.jsx(re,{variant:"small",children:e})]}));C.forwardRef(({className:t,children:e,...r},n)=>K.jsxs(Qse,{className:Si(hD,t),...r,ref:n,children:[K.jsx(fD,{className:dD,children:K.jsx(re,{children:"•"})}),K.jsx(re,{variant:"small",children:e})]}));const Jo=C.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return K.jsx(tt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),Jse=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var Xse="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",Zse="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12jz fyvr12cn fyvr11xz fyvr125b fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",eoe=fr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const toe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};C.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=C.useRef(null),p=Jse(h,e),[v,b]=C.useState(null),y=g=>{const S=g.currentTarget.files;if(!S||!S[0])return;const P=S[0],T=P.name,w=P.size/1e3;b({name:T,size:w,extension:T.split(".").pop()??""}),l==null||l(P)},m=f.map(g=>toe[g]).join(",");return K.jsx(tu,{description:n,disabled:i,display:"grid",id:s??c,label:o,labelLocation:a,children:K.jsx(z,{width:"full",children:K.jsxs(z,{justifyContent:v?"space-between":"flex-start",color:v?"text100":"text50",className:Si(Zse,eoe({borderRadius:r})),children:[v?K.jsxs(z,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[K.jsx(re,{children:v.name}),K.jsxs(re,{color:"text50",variant:"xsmall",children:[v.size.toFixed(2)," kb"]})]}):K.jsx(re,{children:u}),K.jsx(z,{accept:m,as:"input",className:Xse,cursor:v?"text":"pointer",disabled:i||!!v,id:s??c,name:c,onChange:y,ref:p,type:"file",...d}),v&&K.jsx(Jo,{cursor:"pointer",icon:ru,size:"xs",onClick:g=>{var S;g.preventDefault(),g.stopPropagation(),(S=h.current)!=null&&S.value&&(h.current.value=""),l==null||l(null),b(null)},zIndex:"10"})]})})})});var roe=fr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const iC=1e3,hf=64,T2=hf/2,I2=(t,e=iC)=>t%e/(iC/hf),rl=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},noe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:rl(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},ioe=(t,e)=>{const r=[];for(let n=0;n{const s=hf/10+I2(n.r,iC*1.5/(i+1));return{...noe(n.a,n.b,n.c),x:I2(n.x),y:I2(n.y),r:s}})},$1=C.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=ioe(r,i);return K.jsxs(z,{as:"svg",className:Si(e,roe({size:n})),viewBox:`0 0 ${hf} ${hf}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[K.jsxs("defs",{children:[K.jsx("clipPath",{id:"circle-clip",children:K.jsx("circle",{cx:T2,cy:T2,r:T2})}),K.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[K.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),K.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),K.jsx("feGaussianBlur",{stdDeviation:hf/10,result:"effect1_foregroundBlur"})]}),K.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[K.jsx("stop",{offset:"0",stopColor:o[0].c}),K.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>K.jsxs(C.Fragment,{children:[K.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[K.jsx("stop",{offset:"0",stopColor:a.a}),K.jsx("stop",{offset:"1",stopColor:a.b})]}),K.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[K.jsx("stop",{offset:"0",stopColor:a.c}),K.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),K.jsxs("g",{clipPath:"url(#circle-clip)",children:[K.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),K.jsx("g",{filter:"url(#blur)",children:o.map(a=>K.jsxs(C.Fragment,{children:[K.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),K.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),mr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=C.useState(!1),o=a=>{s(!0),r==null||r(a)};return K.jsx(z,{as:O0.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},pD="Dialog",[vD,dPe]=Cn(pD),[soe,Rc]=vD(pD),ooe=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=C.useRef(null),c=C.useRef(null),[l=!1,u]=fc({prop:n,defaultProp:i,onChange:s});return C.createElement(soe,{scope:e,triggerRef:a,contentRef:c,contentId:tc(),titleId:tc(),descriptionId:tc(),open:l,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(f=>!f),[u]),modal:o},r)},mD="DialogPortal",[aoe,yD]=vD(mD,{forceMount:void 0}),coe=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=Rc(mD,e);return C.createElement(aoe,{scope:e,forceMount:r},C.Children.map(n,o=>C.createElement(Oc,{present:r||s.open},C.createElement(HN,{asChild:!0,container:i},o))))},sC="DialogOverlay",loe=C.forwardRef((t,e)=>{const r=yD(sC,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=Rc(sC,t.__scopeDialog);return s.modal?C.createElement(Oc,{present:n||s.open},C.createElement(uoe,xe({},i,{ref:e}))):null}),uoe=C.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=Rc(sC,r);return C.createElement(iD,{as:Lf,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement(Ze.div,xe({"data-state":bD(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),N0="DialogContent",foe=C.forwardRef((t,e)=>{const r=yD(N0,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=Rc(N0,t.__scopeDialog);return C.createElement(Oc,{present:n||s.open},s.modal?C.createElement(doe,xe({},i,{ref:e})):C.createElement(hoe,xe({},i,{ref:e})))}),doe=C.forwardRef((t,e)=>{const r=Rc(N0,t.__scopeDialog),n=C.useRef(null),i=Ht(e,r.contentRef,n);return C.useEffect(()=>{const s=n.current;if(s)return QN(s)},[]),C.createElement(gD,xe({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Ee(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:Ee(t.onFocusOutside,s=>s.preventDefault())}))}),hoe=C.forwardRef((t,e)=>{const r=Rc(N0,t.__scopeDialog),n=C.useRef(!1),i=C.useRef(!1);return C.createElement(gD,xe({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),gD=C.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=Rc(N0,r),c=C.useRef(null),l=Ht(e,c);return _N(),C.createElement(C.Fragment,null,C.createElement(PN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},C.createElement(q3,xe({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":bD(a.open)},o,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),poe="DialogClose",voe=C.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=Rc(poe,r);return C.createElement(Ze.button,xe({type:"button"},n,{ref:e,onClick:Ee(t.onClick,()=>i.onOpenChange(!1))}))});function bD(t){return t?"open":"closed"}const moe=ooe,yoe=coe,goe=loe,boe=foe,woe=voe;var Eoe=fr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),xoe=fr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const wD=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return K.jsx(z,{className:Eoe({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:K.jsx(z,{className:xoe({direction:n}),background:"backgroundPrimary",...i,children:e})})},oC=["dark","light"],Coe="dark",Soe="data-theme",xP="@sequence.theme",ED=t=>t?`${xP}.${t}`:xP,koe=t=>{const e=localStorage.getItem(ED(t));return oC.includes(e)?e:Coe},xD=C.createContext(null),Gg=t=>{const[e,r]=C.useState(t.theme||koe(t.scope));C.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),C.useEffect(()=>{t.theme&&oC.includes(t.theme)&&r(t.theme)},[t.theme]),C.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&i.setAttribute(Soe,e)},[e,t.root]);const n=C.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{oC.includes(i)&&(localStorage.setItem(ED(t.scope),i),r(i))}}),[e,t.root,t.scope]);return K.jsx(xD.Provider,{value:n,children:t.children})},M1=()=>{const t=C.useContext(xD);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var Aoe="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",_oe=fr({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11pn fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),Poe="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",Toe="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const rS=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u}=t,{root:f}=M1(),d=document.querySelector(f||"body");return K.jsx(moe,{modal:!0,defaultOpen:!0,onOpenChange:o,children:K.jsx(yoe,{forceMount:!0,container:d,children:K.jsxs(z,{className:Toe,children:[K.jsx(z,{as:goe,asChild:!0,background:r,className:Poe,forceMount:!0,children:K.jsx(O0.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),K.jsx(boe,{asChild:!0,className:_oe({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:h=>{s?o==null||o():h.preventDefault()},onInteractOutside:h=>{s||h.preventDefault()},children:K.jsxs(O0.div,{initial:i?!1:{y:"100%",opacity:c==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?K.jsx(wD,{children:n}):n,s&&K.jsx(woe,{asChild:!0,children:K.jsx(Jo,{icon:ru,backdropFilter:"blur",size:"xs",className:Aoe,"aria-label":"Close"})})]},"modal-content")})]})})})};var Ioe=fr({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),Ooe="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",Roe=fr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const $c=C.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:p="text",numeric:v=!1,...b}=t;return K.jsx(tu,{description:s,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:K.jsx(z,{width:"full",children:K.jsxs(z,{className:Si(Ooe,Roe({borderRadius:i})),children:[u&&K.jsx(u,{size:"sm"}),K.jsx(z,{as:r,autoComplete:n,spellCheck:"false",className:Ioe({numeric:v}),disabled:o,id:a??d,name:d,ref:e,type:p,...b}),f&&K.jsx(f,{size:"sm"}),h]})})})}),$oe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function Moe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const CD=C.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||$oe.test(Moe(u)))&&(i==null||i({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),s==null||s(l),f!==u&&(i==null||i({...l,target:{...l.target,value:f}}))};return K.jsx($c,{name:r,onChange:a,onBlur:c,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});fr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const SD="Progress",Kg=100,[Noe,hPe]=Cn(SD),[Doe,pPe]=Noe(SD),Loe=C.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=Boe,...o}=t,a=aC(i)?i:Kg,c=kD(n,a)?n:null,l=iy(c)?s(c,a):void 0;return C.createElement(Doe,{scope:r,value:c,max:a},C.createElement(Ze.div,ur({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":iy(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":Foe(c,a),"data-value":c??void 0,"data-max":a},o,{ref:e})))});Loe.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!aC(n)?new Error(joe(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=aC(t.max)?t.max:Kg;return n!=null&&!kD(n,s)?new Error(Uoe(i,r)):null}};function Boe(t,e){return`${Math.round(t/e*100)}%`}function Foe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function iy(t){return typeof t=="number"}function aC(t){return iy(t)&&!isNaN(t)&&t>0}function kD(t,e){return iy(t)&&!isNaN(t)&&t<=e&&t>=0}function joe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Kg}\`.`}function Uoe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},Tse=0,yu=[];function Ise(t){var e=C.useRef([]),r=C.useRef([0,0]),n=C.useRef(),i=C.useState(Tse++)[0],s=C.useState(function(){return nD()})[0],o=C.useRef(t);C.useEffect(function(){o.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Xie([t.lockRef.current],(t.shards||[]).map(wP),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=C.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!o.current.allowPinchZoom;var y=qp(v),m=r.current,g="deltaX"in v?v.deltaX:m[0]-y[0],S="deltaY"in v?v.deltaY:m[1]-y[1],P,T=v.target,w=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in v&&w==="h"&&T.type==="range")return!1;var I=gP(w,T);if(!I)return!0;if(I?P=w:(P=w==="v"?"h":"v",I=gP(w,T)),!I)return!1;if(!n.current&&"changedTouches"in v&&(g||S)&&(n.current=P),!P)return!0;var B=n.current||P;return Ase(B,b,v,B==="h"?g:S,!0)},[]),c=C.useCallback(function(v){var b=v;if(!(!yu.length||yu[yu.length-1]!==s)){var y="deltaY"in b?bP(b):qp(b),m=e.current.filter(function(P){return P.name===b.type&&P.target===b.target&&_se(P.delta,y)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var g=(o.current.shards||[]).map(wP).filter(Boolean).filter(function(P){return P.contains(b.target)}),S=g.length>0?a(b,g[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),l=C.useCallback(function(v,b,y,m){var g={name:v,delta:b,target:y,should:m};e.current.push(g),setTimeout(function(){e.current=e.current.filter(function(S){return S!==g})},1)},[]),u=C.useCallback(function(v){r.current=qp(v),n.current=void 0},[]),f=C.useCallback(function(v){l(v.type,bP(v),v.target,a(v,t.lockRef.current))},[]),d=C.useCallback(function(v){l(v.type,qp(v),v.target,a(v,t.lockRef.current))},[]);C.useEffect(function(){return yu.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,mu),document.addEventListener("touchmove",c,mu),document.addEventListener("touchstart",u,mu),function(){yu=yu.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,mu),document.removeEventListener("touchmove",c,mu),document.removeEventListener("touchstart",u,mu)}},[]);var h=t.removeScrollBar,p=t.inert;return C.createElement(C.Fragment,null,p?C.createElement(s,{styles:Pse(i)}):null,h?C.createElement(bse,{gapMode:"margin"}):null)}const Ose=ase(rD,Ise);var aD=C.forwardRef(function(t,e){return C.createElement(qg,Qs({},t,{ref:e,sideCar:Ose}))});aD.classNames=qg.classNames;const cD=aD,Rse=["Enter"," "],Vg="Menu",[$se,yPe,Mse]=Ug(Vg),[nu,lD]=Cn(Vg,[Mse,fd,dd]);fd();const Nse=dd();nu(Vg);const[gPe,Dse]=nu(Vg),Lse="MenuPortal";nu(Lse,{forceMount:void 0});const Fse="MenuContent",[bPe,uD]=nu(Fse),nC="MenuItem",EP="menu.itemSelect",fD=C.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...i}=t,s=C.useRef(null),o=Dse(nC,t.__scopeMenu),a=uD(nC,t.__scopeMenu),c=qt(e,s),l=C.useRef(!1),u=()=>{const f=s.current;if(!r&&f){const d=new CustomEvent(EP,{bubbles:!0,cancelable:!0});f.addEventListener(EP,h=>n==null?void 0:n(h),{once:!0}),W3(f,d),d.defaultPrevented?l.current=!1:o.onClose()}};return C.createElement(Bse,ke({},i,{ref:c,disabled:r,onClick:Ee(t.onClick,u),onPointerDown:f=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,f),l.current=!0},onPointerUp:Ee(t.onPointerUp,f=>{var d;l.current||(d=f.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ee(t.onKeyDown,f=>{const d=a.searchRef.current!=="";r||d&&f.key===" "||Rse.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}))}),Bse=C.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...s}=t,o=uD(nC,r),a=Nse(r),c=C.useRef(null),l=qt(e,c),[u,f]=C.useState(!1),[d,h]=C.useState("");return C.useEffect(()=>{const p=c.current;if(p){var v;h(((v=p.textContent)!==null&&v!==void 0?v:"").trim())}},[s.children]),C.createElement($se.ItemSlot,{scope:r,disabled:n,textValue:i??d},C.createElement(X3,ke({asChild:!0},a,{focusable:!n}),C.createElement(Ze.div,ke({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},s,{ref:l,onPointerMove:Ee(t.onPointerMove,xP(p=>{n?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus())})),onPointerLeave:Ee(t.onPointerLeave,xP(p=>o.onItemLeave(p))),onFocus:Ee(t.onFocus,()=>f(!0)),onBlur:Ee(t.onBlur,()=>f(!1))}))))}),jse=C.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...i}=t;return C.createElement(hD,{scope:t.__scopeMenu,checked:r},C.createElement(fD,ke({role:"menuitemcheckbox","aria-checked":ny(r)?"mixed":r},i,{ref:e,"data-state":Z3(r),onSelect:Ee(i.onSelect,()=>n==null?void 0:n(ny(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),Use="MenuRadioGroup",[wPe,zse]=nu(Use,{value:void 0,onValueChange:()=>{}}),Wse="MenuRadioItem",Hse=C.forwardRef((t,e)=>{const{value:r,...n}=t,i=zse(Wse,t.__scopeMenu),s=r===i.value;return C.createElement(hD,{scope:t.__scopeMenu,checked:s},C.createElement(fD,ke({role:"menuitemradio","aria-checked":s},n,{ref:e,"data-state":Z3(s),onSelect:Ee(n.onSelect,()=>{var o;return(o=i.onValueChange)===null||o===void 0?void 0:o.call(i,r)},{checkForDefaultPrevented:!1})})))}),dD="MenuItemIndicator",[hD,qse]=nu(dD,{checked:!1}),Vse=C.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...i}=t,s=qse(dD,r);return C.createElement(Oc,{present:n||ny(s.checked)||s.checked===!0},C.createElement(Ze.span,ke({},i,{ref:e,"data-state":Z3(s.checked)})))}),Gse="MenuSub";nu(Gse);function ny(t){return t==="indeterminate"}function Z3(t){return ny(t)?"indeterminate":t?"checked":"unchecked"}function xP(t){return e=>e.pointerType==="mouse"?t(e):void 0}const Kse=jse,Qse=Hse,Yse=Vse,pD="DropdownMenu",[Jse,EPe]=Cn(pD,[lD]),eS=lD();Jse(pD);const Xse=C.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=eS(r);return C.createElement(Kse,ke({},i,n,{ref:e}))}),Zse=C.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=eS(r);return C.createElement(Qse,ke({},i,n,{ref:e}))}),eoe=C.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,i=eS(r);return C.createElement(Yse,ke({},i,n,{ref:e}))}),toe=Xse,roe=Zse,vD=eoe;var mD="_1k2mbvi5",yD="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12rz";const noe=({children:t})=>K.jsx(vD,{className:mD,children:t});C.forwardRef(({className:t,children:e,...r},n)=>K.jsxs(toe,{className:Si(yD,t),...r,ref:n,children:[K.jsx(noe,{children:K.jsx(cd,{size:"xs"})}),K.jsx(re,{variant:"small",children:e})]}));C.forwardRef(({className:t,children:e,...r},n)=>K.jsxs(roe,{className:Si(yD,t),...r,ref:n,children:[K.jsx(vD,{className:mD,children:K.jsx(re,{children:"•"})}),K.jsx(re,{variant:"small",children:e})]}));const Jo=C.forwardRef((t,e)=>{const{icon:r,size:n="md",...i}=t;return K.jsx(tt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...i})}),ioe=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var soe="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",ooe="_1hq71vk1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr12n5 fyvr12ft fyvr1215 fyvr128h fyvr12nn fyvr12gb fyvr121n fyvr128z fyvr11ko fyvr11hc fyvr11ic fyvr11jc fyvr1g0 fyvr11hw",aoe=fr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const coe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};C.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:i=!1,id:s,label:o="",labelLocation:a="hidden",name:c,onValueChange:l,placeholder:u="Upload a file",validExtensions:f,...d}=t,h=C.useRef(null),p=ioe(h,e),[v,b]=C.useState(null),y=g=>{const S=g.currentTarget.files;if(!S||!S[0])return;const P=S[0],T=P.name,w=P.size/1e3;b({name:T,size:w,extension:T.split(".").pop()??""}),l==null||l(P)},m=f.map(g=>coe[g]).join(",");return K.jsx(tu,{description:n,disabled:i,display:"grid",id:s??c,label:o,labelLocation:a,children:K.jsx(z,{width:"full",children:K.jsxs(z,{justifyContent:v?"space-between":"flex-start",color:v?"text100":"text50",className:Si(ooe,aoe({borderRadius:r})),children:[v?K.jsxs(z,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[K.jsx(re,{children:v.name}),K.jsxs(re,{color:"text50",variant:"xsmall",children:[v.size.toFixed(2)," kb"]})]}):K.jsx(re,{children:u}),K.jsx(z,{accept:m,as:"input",className:soe,cursor:v?"text":"pointer",disabled:i||!!v,id:s??c,name:c,onChange:y,ref:p,type:"file",...d}),v&&K.jsx(Jo,{cursor:"pointer",icon:ru,size:"xs",onClick:g=>{var S;g.preventDefault(),g.stopPropagation(),(S=h.current)!=null&&S.value&&(h.current.value=""),l==null||l(null),b(null)},zIndex:"10"})]})})})});var loe=fr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const iC=1e3,hf=64,T2=hf/2,I2=(t,e=iC)=>t%e/(iC/hf),rl=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let i=0,s;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),4294967296*(2097151&n)+(r>>>0)},uoe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),i=t%360,s=(t+120)%360,o=r%360;return{id:rl(n),a:`hsl(${i}deg 100% 40%)`,b:`hsl(${s}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},foe=(t,e)=>{const r=[];for(let n=0;n{const s=hf/10+I2(n.r,iC*1.5/(i+1));return{...uoe(n.a,n.b,n.c),x:I2(n.x),y:I2(n.y),r:s}})},$1=C.memo(t=>{const{className:e,address:r,size:n="md",complexity:i=1,...s}=t,o=foe(r,i);return K.jsxs(z,{as:"svg",className:Si(e,loe({size:n})),viewBox:`0 0 ${hf} ${hf}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...s,children:[K.jsxs("defs",{children:[K.jsx("clipPath",{id:"circle-clip",children:K.jsx("circle",{cx:T2,cy:T2,r:T2})}),K.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[K.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),K.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),K.jsx("feGaussianBlur",{stdDeviation:hf/10,result:"effect1_foregroundBlur"})]}),K.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[K.jsx("stop",{offset:"0",stopColor:o[0].c}),K.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>K.jsxs(C.Fragment,{children:[K.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[K.jsx("stop",{offset:"0",stopColor:a.a}),K.jsx("stop",{offset:"1",stopColor:a.b})]}),K.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[K.jsx("stop",{offset:"0",stopColor:a.c}),K.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),K.jsxs("g",{clipPath:"url(#circle-clip)",children:[K.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),K.jsx("g",{filter:"url(#blur)",children:o.map(a=>K.jsxs(C.Fragment,{children:[K.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),K.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),mr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[i,s]=C.useState(!1),o=a=>{s(!0),r==null||r(a)};return K.jsx(z,{as:O0.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:i?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},gD="Dialog",[bD,xPe]=Cn(gD),[doe,Rc]=bD(gD),hoe=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=C.useRef(null),c=C.useRef(null),[l=!1,u]=fc({prop:n,defaultProp:i,onChange:s});return C.createElement(doe,{scope:e,triggerRef:a,contentRef:c,contentId:tc(),titleId:tc(),descriptionId:tc(),open:l,onOpenChange:u,onOpenToggle:C.useCallback(()=>u(f=>!f),[u]),modal:o},r)},wD="DialogPortal",[poe,ED]=bD(wD,{forceMount:void 0}),voe=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:i}=t,s=Rc(wD,e);return C.createElement(poe,{scope:e,forceMount:r},C.Children.map(n,o=>C.createElement(Oc,{present:r||s.open},C.createElement(KN,{asChild:!0,container:i},o))))},sC="DialogOverlay",moe=C.forwardRef((t,e)=>{const r=ED(sC,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=Rc(sC,t.__scopeDialog);return s.modal?C.createElement(Oc,{present:n||s.open},C.createElement(yoe,ke({},i,{ref:e}))):null}),yoe=C.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=Rc(sC,r);return C.createElement(cD,{as:Lf,allowPinchZoom:!0,shards:[i.contentRef]},C.createElement(Ze.div,ke({"data-state":CD(i.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),N0="DialogContent",goe=C.forwardRef((t,e)=>{const r=ED(N0,t.__scopeDialog),{forceMount:n=r.forceMount,...i}=t,s=Rc(N0,t.__scopeDialog);return C.createElement(Oc,{present:n||s.open},s.modal?C.createElement(boe,ke({},i,{ref:e})):C.createElement(woe,ke({},i,{ref:e})))}),boe=C.forwardRef((t,e)=>{const r=Rc(N0,t.__scopeDialog),n=C.useRef(null),i=qt(e,r.contentRef,n);return C.useEffect(()=>{const s=n.current;if(s)return ZN(s)},[]),C.createElement(xD,ke({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Ee(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:Ee(t.onFocusOutside,s=>s.preventDefault())}))}),woe=C.forwardRef((t,e)=>{const r=Rc(N0,t.__scopeDialog),n=C.useRef(!1),i=C.useRef(!1);return C.createElement(xD,ke({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),xD=C.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=Rc(N0,r),c=C.useRef(null),l=qt(e,c);return ON(),C.createElement(C.Fragment,null,C.createElement(RN,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},C.createElement(H3,ke({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":CD(a.open)},o,{ref:l,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),Eoe="DialogClose",xoe=C.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,i=Rc(Eoe,r);return C.createElement(Ze.button,ke({type:"button"},n,{ref:e,onClick:Ee(t.onClick,()=>i.onOpenChange(!1))}))});function CD(t){return t?"open":"closed"}const Coe=hoe,Soe=voe,koe=moe,Aoe=goe,_oe=xoe;var Poe=fr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),Toe=fr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const SD=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:i,...s}=t;return K.jsx(z,{className:Poe({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...s,children:K.jsx(z,{className:Toe({direction:n}),background:"backgroundPrimary",...i,children:e})})};function Ioe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}function Ooe(t,e){var r=t;for(var n of e){if(!(n in r))throw new Error("Path ".concat(e.join(" -> ")," does not exist in object"));r=r[n]}return r}function kD(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],n=t.constructor();for(var i in t){var s=t[i],o=[...r,i];typeof s=="string"||typeof s=="number"||s==null?n[i]=e(s,o):typeof s=="object"&&!Array.isArray(s)?n[i]=kD(s,e,o):console.warn('Skipping invalid key "'.concat(o.join("."),'". Should be a string, number, null or object. Received: "').concat(Array.isArray(s)?"Array":typeof s,'"'))}return n}function CP(t,e,r){t.style.setProperty(Ioe(e),r)}function SP(t,e,r){if(typeof r=="object"){var n=e;kD(r,(o,a)=>{CP(t,Ooe(n,a),String(o))})}else{var i=e;for(var s in i)CP(t,s,i[s])}}const tS=["dark","light"],Roe="dark",$oe="data-theme",kP="@sequence.theme",Moe=t=>tS.includes(t),Noe=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),AD=t=>t?`${kP}.${t}`:kP,Doe=t=>{const e=localStorage.getItem(AD(t));return e&&tS.includes(e)?e:Roe},_D=C.createContext(null),Gg=t=>{const[e,r]=C.useState(t.theme||Doe(t.scope));C.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),C.useEffect(()=>{t.theme&&r(t.theme)},[t.theme]),C.useEffect(()=>{const i=document.querySelector(t.root||":root");i&&(Moe(e)?(i.setAttribute($oe,e),SP(i,Y_,{colors:cre[e]})):Noe(e)&&SP(i,Y_,{colors:e}))},[e,t.root]);const n=C.useMemo(()=>({theme:e,root:t.root,setTheme:i=>{tS.includes(i)&&(localStorage.setItem(AD(t.scope),i),r(i))}}),[e,t.root,t.scope]);return K.jsx(_D.Provider,{value:n,children:t.children})},M1=()=>{const t=C.useContext(_D);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t};var Loe="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",Foe=fr({defaultClassName:"_5b32m95 fyvr11d8 fyvr11dw fyvr11bg fyvr11by fyvr11c4 fyvr11cm fyvr11ls fyvr11m8 fyvr12wk fyvr12we fyvr11h0 fyvr11i4 fyvr11hs fyvr11sb fyvr1mo fyvr1om",variantClassNames:{size:{sm:"_5b32m96",lg:"_5b32m97"},autoHeight:{true:"_5b32m98"}},defaultVariants:{},compoundVariants:[[{autoHeight:!0,size:"lg"},"_5b32m99"]]}),Boe="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",joe="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const rS=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:i=!1,isDismissible:s=!0,onClose:o,scroll:a=!0,size:c="lg",overlayProps:l,contentProps:u}=t,{root:f}=M1(),d=document.querySelector(f||"body");return K.jsx(Coe,{modal:!0,defaultOpen:!0,onOpenChange:o,children:K.jsx(Soe,{forceMount:!0,container:d,children:K.jsxs(z,{className:joe,children:[K.jsx(z,{as:koe,asChild:!0,background:r,className:Boe,forceMount:!0,children:K.jsx(O0.div,{initial:i?!1:{opacity:0},animate:i?!1:{opacity:1},exit:i?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...l},"modal-overlay")}),K.jsx(Aoe,{asChild:!0,className:Foe({autoHeight:e,size:c}),forceMount:!0,onEscapeKeyDown:h=>{s?o==null||o():h.preventDefault()},onInteractOutside:h=>{s||h.preventDefault()},children:K.jsxs(O0.div,{initial:i?!1:{y:"100%",opacity:c==="sm"?0:1},animate:i?!1:{y:0,opacity:1},exit:i?void 0:{y:"100%",opacity:c==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...u,children:[a?K.jsx(SD,{children:n}):n,s&&K.jsx(_oe,{asChild:!0,children:K.jsx(Jo,{icon:ru,backdropFilter:"blur",size:"xs",className:Loe,"aria-label":"Close"})})]},"modal-content")})]})})})};var Uoe=fr({defaultClassName:"_1acm19ya fyvr1t4 fyvr1v0 fyvr12wh fyvr12wb fyvr11gw fyvr128 fyvr15o",variantClassNames:{numeric:{false:"_1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0",true:"_1qxj1ib9 fyvr11mv fyvr11eo fyvr11g8 fyvr11fo fyvr11f8"}},defaultVariants:{},compoundVariants:[]}),zoe="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12rt fyvr1g0 fyvr118g",Woe=fr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const $c=C.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",leftIcon:u,rightIcon:f,name:d,controls:h,type:p="text",numeric:v=!1,...b}=t;return K.jsx(tu,{description:s,disabled:o,display:"grid",id:a??d,label:c,labelLocation:l,children:K.jsx(z,{width:"full",children:K.jsxs(z,{className:Si(zoe,Woe({borderRadius:i})),children:[u&&K.jsx(u,{size:"sm"}),K.jsx(z,{as:r,autoComplete:n,spellCheck:"false",className:Uoe({numeric:v}),disabled:o,id:a??d,name:d,ref:e,type:p,...b}),f&&K.jsx(f,{size:"sm"}),h]})})})}),Hoe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function qoe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const PD=C.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:i,onBlur:s,...o}=t,a=l=>{let{value:u}=l.target;u=u.replace(/,/g,"."),u.startsWith(".")&&(u="0"+u),u.startsWith("0")&&(u=u.replace(/^0+(?=\d)/,"")),(u===""||Hoe.test(qoe(u)))&&(i==null||i({...l,target:{...l.target,value:u}}))},c=l=>{const{value:u}=l.target;let f=u;f.endsWith(".")&&(f=f.slice(0,-1)),f.endsWith(".0")&&(f=f.slice(0,-2)),f==="0"&&(f=""),s==null||s(l),f!==u&&(i==null||i({...l,target:{...l.target,value:f}}))};return K.jsx($c,{name:r,onChange:a,onBlur:c,inputMode:"decimal",autoComplete:"off",autoCorrect:"off",type:"text",pattern:"^[0-9]*[.,]?[0-9]*$",placeholder:n||"0",minLength:1,maxLength:79,spellCheck:"false",numeric:!0,ref:e,...o})});fr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const TD="Progress",Kg=100,[Voe,CPe]=Cn(TD),[Goe,SPe]=Voe(TD),Koe=C.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:i,getValueLabel:s=Qoe,...o}=t,a=oC(i)?i:Kg,c=ID(n,a)?n:null,l=iy(c)?s(c,a):void 0;return C.createElement(Goe,{scope:r,value:c,max:a},C.createElement(Ze.div,dt({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":iy(c)?c:void 0,"aria-valuetext":l,role:"progressbar","data-state":Yoe(c,a),"data-value":c??void 0,"data-max":a},o,{ref:e})))});Koe.propTypes={max(t,e,r){const n=t[e],i=String(n);return n&&!oC(n)?new Error(Joe(i,r)):null},value(t,e,r){const n=t[e],i=String(n),s=oC(t.max)?t.max:Kg;return n!=null&&!ID(n,s)?new Error(Xoe(i,r)):null}};function Qoe(t,e){return`${Math.round(t/e*100)}%`}function Yoe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function iy(t){return typeof t=="number"}function oC(t){return iy(t)&&!isNaN(t)&&t>0}function ID(t,e){return iy(t)&&!isNaN(t)&&t<=e&&t>=0}function Joe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Kg}\`.`}function Xoe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${Kg} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const AD="Radio",[zoe,_D]=Cn(AD),[Woe,Hoe]=zoe(AD),qoe=C.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=C.useState(null),d=Ht(e,v=>f(v)),h=C.useRef(!1),p=u?!!u.closest("form"):!0;return C.createElement(Woe,{scope:r,checked:i,disabled:o},C.createElement(Ze.button,ur({type:"button",role:"radio","aria-checked":i,"data-state":PD(i),"data-disabled":o?"":void 0,disabled:o,value:a},l,{ref:d,onClick:Ee(t.onClick,v=>{i||c==null||c(),p&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})})),p&&C.createElement(Koe,{control:u,bubbles:!h.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),Voe="RadioIndicator",Goe=C.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=Hoe(Voe,r);return C.createElement(Oc,{present:n||s.checked},C.createElement(Ze.span,ur({"data-state":PD(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),Koe=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=C.useRef(null),o=Ng(r),a=Dg(e);return C.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.createElement("input",ur({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function PD(t){return t?"checked":"unchecked"}const Qoe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],TD="RadioGroup",[Yoe,vPe]=Cn(TD,[dd,_D]),ID=dd(),OD=_D(),[Joe,Xoe]=Yoe(TD),Zoe=C.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=ID(r),p=zg(l),[v,b]=fc({prop:s,defaultProp:i,onChange:f});return C.createElement(Joe,{scope:r,name:n,required:o,disabled:a,value:v,onValueChange:b},C.createElement(GN,ur({asChild:!0},h,{orientation:c,dir:p,loop:u}),C.createElement(Ze.div,ur({role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:p},d,{ref:e}))))}),eae="RadioGroupItem",tae=C.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=Xoe(eae,r),o=s.disabled||n,a=ID(r),c=OD(r),l=C.useRef(null),u=Ht(e,l),f=s.value===i.value,d=C.useRef(!1);return C.useEffect(()=>{const h=v=>{Qoe.includes(v.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),C.createElement(Z3,ur({asChild:!0},a,{focusable:!o,active:f}),C.createElement(qoe,ur({disabled:o,required:s.required,checked:f},c,i,{name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ee(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ee(i.onFocus,()=>{var h;d.current&&((h=l.current)===null||h===void 0||h.click())})})))}),rae=C.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=OD(r);return C.createElement(Goe,ur({},i,n,{ref:e}))}),nae=Zoe,iae=tae,sae=rae;var oae=fr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),aae=fr({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12k5 fyvr12ct fyvr11y5 fyvr125h fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const cae=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return K.jsx(z,{alignItems:"center",children:K.jsx(tu,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:K.jsx(iae,{className:aae({size:n}),value:i,id:e,disabled:s,children:K.jsx(sae,{className:oae({size:n})})})})})};C.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...c}=t;return K.jsx(nae,{disabled:n,name:s,ref:e,...c,children:K.jsx(z,{flexDirection:r,gap:i,children:o.map(({label:l,value:u,disabled:f})=>K.jsx(cae,{id:`${s}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function CP(t,[e,r]){return Math.min(r,Math.max(e,t))}const RD=C.forwardRef((t,e)=>C.createElement(Ze.span,xe({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),lae=[" ","Enter","ArrowUp","ArrowDown"],uae=[" ","Enter"],Qg="Select",[Yg,nS,fae]=Ug(Qg),[hd,mPe]=Cn(Qg,[fae,fd]),iS=fd(),[dae,iu]=hd(Qg),[hae,pae]=hd(Qg),vae=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,p=iS(e),[v,b]=C.useState(null),[y,m]=C.useState(null),[g,S]=C.useState(!1),P=zg(l),[T=!1,w]=fc({prop:n,defaultProp:i,onChange:s}),[I,F]=fc({prop:o,defaultProp:a,onChange:c}),j=C.useRef(null),H=v?!!v.closest("form"):!0,[G,B]=C.useState(new Set),E=Array.from(G).map(_=>_.props.value).join(";");return C.createElement(Aie,p,C.createElement(dae,{required:h,scope:e,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:m,valueNodeHasChildren:g,onValueNodeHasChildrenChange:S,contentId:tc(),value:I,onValueChange:F,open:T,onOpenChange:w,dir:P,triggerPointerDownPosRef:j,disabled:d},C.createElement(Yg.Provider,{scope:e},C.createElement(hae,{scope:t.__scopeSelect,onNativeOptionAdd:C.useCallback(_=>{B(O=>new Set(O).add(_))},[]),onNativeOptionRemove:C.useCallback(_=>{B(O=>{const N=new Set(O);return N.delete(_),N})},[])},r)),H?C.createElement(ND,{key:E,"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:I,onChange:_=>F(_.target.value),disabled:d},I===void 0?C.createElement("option",{value:""}):null,Array.from(G)):null))},mae="SelectTrigger",yae=C.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=iS(r),o=iu(mae,r),a=o.disabled||n,c=Ht(e,o.onTriggerChange),l=nS(r),[u,f,d]=DD(p=>{const v=l().filter(m=>!m.disabled),b=v.find(m=>m.value===o.value),y=LD(v,p,b);y!==void 0&&o.onValueChange(y.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return C.createElement(_ie,xe({asChild:!0},s),C.createElement(Ze.button,xe({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":MD(o.value)?"":void 0},i,{ref:c,onClick:Ee(i.onClick,p=>{p.currentTarget.focus()}),onPointerDown:Ee(i.onPointerDown,p=>{const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:Ee(i.onKeyDown,p=>{const v=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(v&&p.key===" ")&&lae.includes(p.key)&&(h(),p.preventDefault())})})))}),gae="SelectValue",bae=C.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,c=iu(gae,r),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,f=Ht(e,c.onValueNodeChange);return Wi(()=>{l(u)},[l,u]),C.createElement(Ze.span,xe({},a,{ref:f,style:{pointerEvents:"none"}}),MD(c.value)?C.createElement(C.Fragment,null,o):s)}),wae=C.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return C.createElement(Ze.span,xe({"aria-hidden":!0},i,{ref:e}),n||"▼")}),Ff="SelectContent",Eae=C.forwardRef((t,e)=>{const r=iu(Ff,t.__scopeSelect),[n,i]=C.useState();if(Wi(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?_s.createPortal(C.createElement($D,{scope:t.__scopeSelect},C.createElement(Yg.Slot,{scope:t.__scopeSelect},C.createElement("div",null,t.children))),s):null}return C.createElement(xae,xe({},t,{ref:e}))}),ko=10,[$D,Jg]=hd(Ff),xae=C.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:v,avoidCollisions:b,...y}=t,m=iu(Ff,r),[g,S]=C.useState(null),[P,T]=C.useState(null),w=Ht(e,W=>S(W)),[I,F]=C.useState(null),[j,H]=C.useState(null),G=nS(r),[B,E]=C.useState(!1),_=C.useRef(!1);C.useEffect(()=>{if(g)return QN(g)},[g]),_N();const O=C.useCallback(W=>{const[q,...Y]=G().map(Z=>Z.ref.current),[X]=Y.slice(-1),Q=document.activeElement;for(const Z of W)if(Z===Q||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===q&&P&&(P.scrollTop=0),Z===X&&P&&(P.scrollTop=P.scrollHeight),Z==null||Z.focus(),document.activeElement!==Q))return},[G,P]),N=C.useCallback(()=>O([I,g]),[O,I,g]);C.useEffect(()=>{B&&N()},[B,N]);const{onOpenChange:k,triggerPointerDownPosRef:$}=m;C.useEffect(()=>{if(g){let W={x:0,y:0};const q=X=>{var Q,Z,ae,se;W={x:Math.abs(Math.round(X.pageX)-((Q=(Z=$.current)===null||Z===void 0?void 0:Z.x)!==null&&Q!==void 0?Q:0)),y:Math.abs(Math.round(X.pageY)-((ae=(se=$.current)===null||se===void 0?void 0:se.y)!==null&&ae!==void 0?ae:0))}},Y=X=>{W.x<=10&&W.y<=10?X.preventDefault():g.contains(X.target)||k(!1),document.removeEventListener("pointermove",q),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Y,{capture:!0})}}},[g,k,$]),C.useEffect(()=>{const W=()=>k(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[k]);const[L,M]=DD(W=>{const q=G().filter(Q=>!Q.disabled),Y=q.find(Q=>Q.ref.current===document.activeElement),X=LD(q,W,Y);X&&setTimeout(()=>X.ref.current.focus())}),A=C.useCallback((W,q,Y)=>{const X=!_.current&&!Y;(m.value!==void 0&&m.value===q||X)&&(F(W),X&&(_.current=!0))},[m.value]),D=C.useCallback(()=>g==null?void 0:g.focus(),[g]),V=C.useCallback((W,q,Y)=>{const X=!_.current&&!Y;(m.value!==void 0&&m.value===q||X)&&H(W)},[m.value]),R=n==="popper"?SP:Cae,U=R===SP?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:v,avoidCollisions:b}:{};return C.createElement($D,{scope:r,content:g,viewport:P,onViewportChange:T,itemRefCallback:A,selectedItem:I,onItemLeave:D,itemTextRefCallback:V,focusSelectedItem:N,selectedItemText:j,position:n,isPositioned:B,searchRef:L},C.createElement(iD,{as:Lf,allowPinchZoom:!0},C.createElement(PN,{asChild:!0,trapped:m.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Ee(i,W=>{var q;(q=m.trigger)===null||q===void 0||q.focus({preventScroll:!0}),W.preventDefault()})},C.createElement(q3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>m.onOpenChange(!1)},C.createElement(R,xe({role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:W=>W.preventDefault()},y,U,{onPlaced:()=>E(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ee(y.onKeyDown,W=>{const q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!q&&W.key.length===1&&M(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let X=G().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(W.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const Q=W.target,Z=X.indexOf(Q);X=X.slice(Z+1)}setTimeout(()=>O(X)),W.preventDefault()}})}))))))}),Cae=C.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=iu(Ff,r),o=Jg(Ff,r),[a,c]=C.useState(null),[l,u]=C.useState(null),f=Ht(e,w=>u(w)),d=nS(r),h=C.useRef(!1),p=C.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:y,focusSelectedItem:m}=o,g=C.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&v&&b&&y){const w=s.trigger.getBoundingClientRect(),I=l.getBoundingClientRect(),F=s.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(s.dir!=="rtl"){const Q=j.left-I.left,Z=F.left-Q,ae=w.left-Z,se=w.width+ae,ue=Math.max(se,I.width),ot=window.innerWidth-ko,Pe=CP(Z,[ko,ot-ue]);a.style.minWidth=se+"px",a.style.left=Pe+"px"}else{const Q=I.right-j.right,Z=window.innerWidth-F.right-Q,ae=window.innerWidth-w.right-Z,se=w.width+ae,ue=Math.max(se,I.width),ot=window.innerWidth-ko,Pe=CP(Z,[ko,ot-ue]);a.style.minWidth=se+"px",a.style.right=Pe+"px"}const H=d(),G=window.innerHeight-ko*2,B=v.scrollHeight,E=window.getComputedStyle(l),_=parseInt(E.borderTopWidth,10),O=parseInt(E.paddingTop,10),N=parseInt(E.borderBottomWidth,10),k=parseInt(E.paddingBottom,10),$=_+O+B+k+N,L=Math.min(b.offsetHeight*5,$),M=window.getComputedStyle(v),A=parseInt(M.paddingTop,10),D=parseInt(M.paddingBottom,10),V=w.top+w.height/2-ko,R=G-V,U=b.offsetHeight/2,W=b.offsetTop+U,q=_+O+W,Y=$-q;if(q<=V){const Q=b===H[H.length-1].ref.current;a.style.bottom="0px";const Z=l.clientHeight-v.offsetTop-v.offsetHeight,ae=Math.max(R,U+(Q?D:0)+Z+N),se=q+ae;a.style.height=se+"px"}else{const Q=b===H[0].ref.current;a.style.top="0px";const ae=Math.max(V,_+v.offsetTop+(Q?A:0)+U)+Y;a.style.height=ae+"px",v.scrollTop=q-V+v.offsetTop}a.style.margin=`${ko}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=G+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,l,v,b,y,s.dir,n]);Wi(()=>g(),[g]);const[S,P]=C.useState();Wi(()=>{l&&P(window.getComputedStyle(l).zIndex)},[l]);const T=C.useCallback(w=>{w&&p.current===!0&&(g(),m==null||m(),p.current=!1)},[g,m]);return C.createElement(Sae,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:T},C.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},C.createElement(Ze.div,xe({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),SP=C.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=ko,...s}=t,o=iS(r);return C.createElement(Pie,xe({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Sae,kae]=hd(Ff,{}),kP="SelectViewport",Aae=C.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Jg(kP,r),s=kae(kP,r),o=Ht(e,i.onViewportChange),a=C.useRef(0);return C.createElement(C.Fragment,null,C.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),C.createElement(Yg.Slot,{scope:r},C.createElement(Ze.div,xe({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ee(n.onScroll,c=>{const l=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&u){const d=Math.abs(a.current-l.scrollTop);if(d>0){const h=window.innerHeight-ko*2,p=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),b=Math.max(p,v);if(b0?g:0,u.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),_ae="SelectGroup",[Pae,yPe]=hd(_ae),Tae=C.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=tc();return C.createElement(Pae,{scope:r,id:i},C.createElement(Ze.div,xe({role:"group","aria-labelledby":i},n,{ref:e})))}),cC="SelectItem",[Iae,Oae]=hd(cC),Rae=C.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=iu(cC,r),c=Jg(cC,r),l=a.value===n,[u,f]=C.useState(s??""),[d,h]=C.useState(!1),p=Ht(e,y=>{var m;return(m=c.itemRefCallback)===null||m===void 0?void 0:m.call(c,y,n,i)}),v=tc(),b=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return C.createElement(Iae,{scope:r,value:n,disabled:i,textId:v,isSelected:l,onItemTextChange:C.useCallback(y=>{f(m=>{var g;return m||((g=y==null?void 0:y.textContent)!==null&&g!==void 0?g:"").trim()})},[])},C.createElement(Yg.ItemSlot,{scope:r,value:n,disabled:i,textValue:u},C.createElement(Ze.div,xe({role:"option","aria-labelledby":v,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:p,onFocus:Ee(o.onFocus,()=>h(!0)),onBlur:Ee(o.onBlur,()=>h(!1)),onPointerUp:Ee(o.onPointerUp,b),onPointerMove:Ee(o.onPointerMove,y=>{if(i){var m;(m=c.onItemLeave)===null||m===void 0||m.call(c)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ee(o.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var m;(m=c.onItemLeave)===null||m===void 0||m.call(c)}}),onKeyDown:Ee(o.onKeyDown,y=>{var m;((m=c.searchRef)===null||m===void 0?void 0:m.current)!==""&&y.key===" "||(uae.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})}))))}),Vp="SelectItemText",$ae=C.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=iu(Vp,r),a=Jg(Vp,r),c=Oae(Vp,r),l=pae(Vp,r),[u,f]=C.useState(null),d=Ht(e,y=>f(y),c.onItemTextChange,y=>{var m;return(m=a.itemTextRefCallback)===null||m===void 0?void 0:m.call(a,y,c.value,c.disabled)}),h=u==null?void 0:u.textContent,p=C.useMemo(()=>C.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return Wi(()=>(v(p),()=>b(p)),[v,b,p]),C.createElement(C.Fragment,null,C.createElement(Ze.span,xe({id:c.textId},s,{ref:d})),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?_s.createPortal(s.children,o.valueNode):null)});function MD(t){return t===""||t===void 0}const ND=C.forwardRef((t,e)=>{const{value:r,...n}=t,i=C.useRef(null),s=Ht(e,i),o=Ng(r);return C.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),C.createElement(RD,{asChild:!0},C.createElement("select",xe({},n,{ref:s,defaultValue:r})))});ND.displayName="BubbleSelect";function DD(t){const e=zi(t),r=C.useRef(""),n=C.useRef(0),i=C.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),s=C.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function LD(t,e,r){const i=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=Mae(t,Math.max(s,0));i.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function Mae(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const Nae=vae,Dae=yae,Lae=bae,Bae=wae,Fae=Eae,jae=Aae,Uae=Tae,zae=Rae,Wae=$ae;var Hae="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",qae="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",Vae="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",Gae=fr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const Kae=C.forwardRef(({children:t,className:e,...r},n)=>K.jsx(zae,{className:Si(qae,e),...r,ref:n,children:K.jsx(Wae,{children:t})}));C.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return K.jsx(tu,{disabled:n,display:"grid",id:i??c,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:K.jsxs(Nae,{disabled:n,name:c,...f,children:[K.jsxs(Dae,{id:i??c,className:Si(Vae,Gae({borderRadius:r})),ref:e,children:[K.jsx(Lae,{placeholder:u}),K.jsx(z,{as:Bae,display:"inline-flex",children:K.jsx(EN,{})})]}),K.jsx(Fae,{className:Hae,children:K.jsx(jae,{children:K.jsx(Uae,{children:l.map(({value:d,label:h,...p})=>K.jsx(Kae,{value:d,...p,children:h},d))})})})]})})});C.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,c=o?K.jsx(Jo,{icon:ru,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return K.jsx($c,{ref:e,name:s,leftIcon:Fg,controls:r||c,placeholder:i,value:o,onChange:l=>n==null?void 0:n(l),...a})});var Qae=fr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const sS=C.forwardRef((t,e)=>{const{size:r="md",...n}=t;return K.jsx(z,{className:Qae({size:r}),color:"text50",ref:e,...n,children:K.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[K.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),K.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});C.forwardRef(({children:t},e)=>K.jsx(z,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const BD="Switch",[Yae,gPe]=Cn(BD),[Jae,Xae]=Yae(BD),Zae=C.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=C.useState(null),h=Ht(e,m=>d(m)),p=C.useRef(!1),v=f?!!f.closest("form"):!0,[b=!1,y]=fc({prop:i,defaultProp:s,onChange:l});return C.createElement(Jae,{scope:r,checked:b,disabled:a},C.createElement(Ze.button,ur({type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":FD(b),"data-disabled":a?"":void 0,disabled:a,value:c},u,{ref:h,onClick:Ee(t.onClick,m=>{y(g=>!g),v&&(p.current=m.isPropagationStopped(),p.current||m.stopPropagation())})})),v&&C.createElement(rce,{control:f,bubbles:!p.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),ece="SwitchThumb",tce=C.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=Xae(ece,r);return C.createElement(Ze.span,ur({"data-state":FD(i.checked),"data-disabled":i.disabled?"":void 0},n,{ref:e}))}),rce=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=C.useRef(null),o=Ng(r),a=Dg(e);return C.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.createElement("input",ur({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function FD(t){return t?"checked":"unchecked"}const nce=Zae,ice=tce;var sce="_1lp2u8e1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11qb fyvr11hw fyvr12uz",oce="_1lp2u8e3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11nz";const O2=t=>{const{disabled:e,label:r,labelLocation:n="left",description:i,id:s,name:o,...a}=t;return K.jsx(tu,{disabled:e,display:"flex",id:s??o,label:r,labelLocation:n,description:i,whiteSpace:"nowrap",children:K.jsx(nce,{className:sce,disabled:e,...a,children:K.jsx(z,{position:"relative",width:"full",height:"full",children:K.jsx(ice,{className:oce})})})})};fr({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11rt fyvr12sn"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12sb"],[{active:!0,variant:"line"},"fyvr12sh"],[{active:!1,variant:"line"},"fyvr12sb"]]});const jD="Tabs",[ace,bPe]=Cn(jD,[dd]),UD=dd(),[cce,oS]=ace(jD),lce=C.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=zg(a),[f,d]=fc({prop:n,onChange:i,defaultProp:s});return C.createElement(cce,{scope:r,baseId:tc(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c},C.createElement(Ze.div,ur({dir:u,"data-orientation":o},l,{ref:e})))}),uce="TabsList",fce=C.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...i}=t,s=oS(uce,r),o=UD(r);return C.createElement(GN,ur({asChild:!0},o,{orientation:s.orientation,dir:s.dir,loop:n}),C.createElement(Ze.div,ur({role:"tablist","aria-orientation":s.orientation},i,{ref:e})))}),dce="TabsTrigger",hce=C.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...s}=t,o=oS(dce,r),a=UD(r),c=zD(o.baseId,n),l=WD(o.baseId,n),u=n===o.value;return C.createElement(Z3,ur({asChild:!0},a,{focusable:!i,active:u}),C.createElement(Ze.button,ur({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},s,{ref:e,onMouseDown:Ee(t.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:Ee(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:Ee(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(n)})})))}),pce="TabsContent",vce=C.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:i,children:s,...o}=t,a=oS(pce,r),c=zD(a.baseId,n),l=WD(a.baseId,n),u=n===a.value,f=C.useRef(u);return C.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),C.createElement(Oc,{present:i||u},({present:d})=>C.createElement(Ze.div,ur({"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0}}),d&&s))});function zD(t,e){return`${t}-trigger-${e}`}function WD(t,e){return`${t}-content-${e}`}const mce=lce,yce=fce,gce=hce;var bce="_10c8o0n1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11pt fyvr14o",wce="_10c8o0n5 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11rh fyvr12vz",Ece="_10c8o0n3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wh fyvr12wb fyvr128 fyvr15o fyvr12uz fyvr11hw fyvr11ob fyvr11n2 fyvr12sb";const xce=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,i=e.findIndex(s=>s.value===r);return K.jsxs(yce,{className:bce,style:{outline:void 0},children:[K.jsx(z,{display:"flex",position:"absolute",inset:"2",height:"8",children:K.jsx("div",{className:wce,style:{width:`${n}%`,transform:`translateX(${i*100}%)`}})}),e.map(s=>K.jsx(gce,{className:Ece,value:s.value,children:K.jsx(re,{variant:"normal",fontWeight:"bold",children:s.label})},s.value))]})},Cce=mce,AP=vce;var Sce="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";C.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return K.jsxs(z,{className:Sce,ref:e,background:"buttonGlass",...i,children:[r&&K.jsx(r,{size:"xs"}),K.jsx(re,{children:n})]})});const kce="ToastProvider",[Ace,wPe,_ce]=Ug("Toast"),[HD,EPe]=Cn("Toast",[_ce]),[xPe,qD]=HD(kce),_P="toast.viewportPause",PP="toast.viewportResume",Xg="Toast",Pce="toast.swipeStart",Tce="toast.swipeMove",Ice="toast.swipeCancel",Oce="toast.swipeEnd",[Rce,$ce]=HD(Xg,{onClose(){}}),Mce=C.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...p}=t,v=qD(Xg,r),[b,y]=C.useState(null),m=Ht(e,E=>y(E)),g=C.useRef(null),S=C.useRef(null),P=i||v.duration,T=C.useRef(0),w=C.useRef(P),I=C.useRef(0),{onToastAdd:F,onToastRemove:j}=v,H=zi(()=>{var E;(b==null?void 0:b.contains(document.activeElement))&&((E=v.viewport)===null||E===void 0||E.focus()),o()}),G=C.useCallback(E=>{!E||E===1/0||(window.clearTimeout(I.current),T.current=new Date().getTime(),I.current=window.setTimeout(H,E))},[H]);C.useEffect(()=>{const E=v.viewport;if(E){const _=()=>{G(w.current),l==null||l()},O=()=>{const N=new Date().getTime()-T.current;w.current=w.current-N,window.clearTimeout(I.current),c==null||c()};return E.addEventListener(_P,O),E.addEventListener(PP,_),()=>{E.removeEventListener(_P,O),E.removeEventListener(PP,_)}}},[v.viewport,P,c,l,G]),C.useEffect(()=>{s&&!v.isClosePausedRef.current&&G(P)},[s,P,v.isClosePausedRef,G]),C.useEffect(()=>(F(),()=>j()),[F,j]);const B=C.useMemo(()=>b?GD(b):null,[b]);return v.viewport?C.createElement(C.Fragment,null,B&&C.createElement(Nce,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},B),C.createElement(Rce,{scope:r,onClose:H},_s.createPortal(C.createElement(Ace.ItemSlot,{scope:r},C.createElement(Pne,{asChild:!0,onEscapeKeyDown:Ee(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||H(),v.isFocusedToastEscapeKeyDownRef.current=!1})},C.createElement(Ze.li,xe({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":v.swipeDirection},p,{ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ee(t.onKeyDown,E=>{E.key==="Escape"&&(a==null||a(E.nativeEvent),E.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:Ee(t.onPointerDown,E=>{E.button===0&&(g.current={x:E.clientX,y:E.clientY})}),onPointerMove:Ee(t.onPointerMove,E=>{if(!g.current)return;const _=E.clientX-g.current.x,O=E.clientY-g.current.y,N=!!S.current,k=["left","right"].includes(v.swipeDirection),$=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,L=k?$(0,_):0,M=k?0:$(0,O),A=E.pointerType==="touch"?10:2,D={x:L,y:M},V={originalEvent:E,delta:D};N?(S.current=D,Gp(Tce,f,V,{discrete:!1})):TP(D,v.swipeDirection,A)?(S.current=D,Gp(Pce,u,V,{discrete:!1}),E.target.setPointerCapture(E.pointerId)):(Math.abs(_)>A||Math.abs(O)>A)&&(g.current=null)}),onPointerUp:Ee(t.onPointerUp,E=>{const _=S.current,O=E.target;if(O.hasPointerCapture(E.pointerId)&&O.releasePointerCapture(E.pointerId),S.current=null,g.current=null,_){const N=E.currentTarget,k={originalEvent:E,delta:_};TP(_,v.swipeDirection,v.swipeThreshold)?Gp(Oce,h,k,{discrete:!0}):Gp(Ice,d,k,{discrete:!0}),N.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})))),v.viewport))):null});Mce.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Xg}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const Nce=t=>{const{__scopeToast:e,children:r,...n}=t,i=qD(Xg,e),[s,o]=C.useState(!1),[a,c]=C.useState(!1);return jce(()=>o(!0)),C.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:C.createElement(HN,{asChild:!0},C.createElement(RD,n,s&&C.createElement(C.Fragment,null,i.label," ",r)))},Dce="ToastAction",Lce=C.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?C.createElement(VD,{altText:r,asChild:!0},C.createElement(Fce,xe({},n,{ref:e}))):null});Lce.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${Dce}\``)}};const Bce="ToastClose",Fce=C.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=$ce(Bce,r);return C.createElement(VD,{asChild:!0},C.createElement(Ze.button,xe({type:"button"},n,{ref:e,onClick:Ee(t.onClick,i.onClose)})))}),VD=C.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return C.createElement(Ze.div,xe({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function GD(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),Uce(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...GD(n))}}),e}function Gp(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?H3(i,s):i.dispatchEvent(s)}const TP=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function jce(t=()=>{}){const e=zi(t);Wi(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function Uce(t){return t.nodeType===t.ELEMENT_NODE}fr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});C.createContext(null);var zce="_15pztn2",Wce="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";C.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return K.jsx(tu,{description:s,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:K.jsx(z,{as:r,autoComplete:n,spellCheck:"false",className:Si(Wce,d&&zce),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:i,...h})})});var Hce="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",qce="bnrrebe",Vce=fr({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});C.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...c}=t;return K.jsx(z,{className:Si(r,Vce({borderRadius:e,size:a})),style:i,flexShrink:"0",...c,children:s?K.jsx(mr,{className:qce,disableAnimation:n,src:s}):K.jsx(re,{className:Hce,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Zg,CPe]=Cn("Tooltip",[fd]);fd();const Gce="TooltipProvider";Zg(Gce);const KD="Tooltip";Zg(KD);const Kce="TooltipPortal";Zg(Kce,{forceMount:void 0});Zg(KD,{isInside:!1});const Qce=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${Q_.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${Q_.lg}px)`);if(!t.startsWith("@media")){const c=r.get(t);if(!c||c==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=c}const n=t.replace(/^@media( ?)/m,""),i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1}=e,[o,a]=C.useState(()=>i?window.matchMedia(n).matches:s);return C.useEffect(()=>{let c=!0;if(!i)return;const l=window.matchMedia(n),u=()=>{c&&a(l.matches)};return u(),l.addListener(u),()=>{c=!1,l.removeListener(u)}},[n,i]),o};function Yce({storage:t,key:e="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:i=JSON.parse,retry:s}){if(t){const o=a=>{try{t.setItem(e,n(a));return}catch(c){return c}};return{persistClient:Jce(a=>{let c=a,l=o(c),u=0;for(;l&&c;)u++,c=s==null?void 0:s({persistedClient:c,error:l,errorCount:u}),c&&(l=o(c))},r),restoreClient:()=>{const a=t.getItem(e);if(a)return i(a)},removeClient:()=>{t.removeItem(e)}}}return{persistClient:IP,restoreClient:()=>{},removeClient:IP}}function Jce(t,e=100){let r=null,n;return function(...i){n=i,r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}}function IP(){}class pd{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const r={listener:e};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const D0=typeof window>"u"||"Deno"in window;function Ii(){}function Xce(t,e){return typeof t=="function"?t(e):t}function lC(t){return typeof t=="number"&&t>=0&&t!==1/0}function QD(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Yu(t,e,r){return N1(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function YD(t,e,r){return N1(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function Oa(t,e,r){return N1(t)?[{...e,queryKey:t},r]:[t||{},e]}function OP(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(N1(o)){if(n){if(e.queryHash!==aS(o,e.options))return!1}else if(!sy(e.queryKey,o))return!1}if(r!=="all"){const c=e.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function RP(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(N1(s)){if(!e.options.mutationKey)return!1;if(r){if(vl(e.options.mutationKey)!==vl(s))return!1}else if(!sy(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function aS(t,e){return((e==null?void 0:e.queryKeyHashFn)||vl)(t)}function vl(t){return JSON.stringify(t,(e,r)=>uC(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function sy(t,e){return JD(t,e)}function JD(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!JD(t[r],e[r])):!1}function XD(t,e){if(t===e)return t;const r=$P(t)&&$P(e);if(r||uC(t)&&uC(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,o=r?[]:{};let a=0;for(let c=0;c"u")return!0;const r=e.prototype;return!(!MP(r)||!r.hasOwnProperty("isPrototypeOf"))}function MP(t){return Object.prototype.toString.call(t)==="[object Object]"}function N1(t){return Array.isArray(t)}function ZD(t){return new Promise(e=>{setTimeout(e,t)})}function NP(t){ZD(0).then(t)}function Zce(){if(typeof AbortController=="function")return new AbortController}function fC(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?XD(t,e):e}class ele extends pd{constructor(){super(),this.setup=e=>{if(!D0&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ay=new ele,DP=["online","offline"];class tle extends pd{constructor(){super(),this.setup=e=>{if(!D0&&window.addEventListener){const r=()=>e();return DP.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{DP.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const cy=new tle;function rle(t){return Math.min(1e3*2**t,3e4)}function eb(t){return(t??"online")==="online"?cy.isOnline():!0}class eL{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Lv(t){return t instanceof eL}function tL(t){let e=!1,r=0,n=!1,i,s,o;const a=new Promise((b,y)=>{s=b,o=y}),c=b=>{n||(h(new eL(b)),t.abort==null||t.abort())},l=()=>{e=!0},u=()=>{e=!1},f=()=>!ay.isFocused()||t.networkMode!=="always"&&!cy.isOnline(),d=b=>{n||(n=!0,t.onSuccess==null||t.onSuccess(b),i==null||i(),s(b))},h=b=>{n||(n=!0,t.onError==null||t.onError(b),i==null||i(),o(b))},p=()=>new Promise(b=>{i=y=>{const m=n||!f();return m&&b(y),m},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),v=()=>{if(n)return;let b;try{b=t.fn()}catch(y){b=Promise.reject(y)}Promise.resolve(b).then(d).catch(y=>{var m,g;if(n)return;const S=(m=t.retry)!=null?m:3,P=(g=t.retryDelay)!=null?g:rle,T=typeof P=="function"?P(r,y):P,w=S===!0||typeof S=="number"&&r{if(f())return p()}).then(()=>{e?h(y):v()})})};return eb(t.networkMode)?v():p().then(v),{promise:a,cancel:c,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:l,continueRetry:u}}const cS=console;function nle(){let t=[],e=0,r=u=>{u()},n=u=>{u()};const i=u=>{let f;e++;try{f=u()}finally{e--,e||a()}return f},s=u=>{e?t.push(u):NP(()=>{r(u)})},o=u=>(...f)=>{s(()=>{u(...f)})},a=()=>{const u=t;t=[],u.length&&NP(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u}}}const vt=nle();class rL{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lC(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(D0?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class ile extends rL{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||cS,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||sle(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=fC(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Ii).catch(Ii):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!QD(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const o=Zce(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(a);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),u={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(c(u),(n=this.options.behavior)==null||n.onFetch(u),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=u.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta})}const d=h=>{if(Lv(h)&&h.silent||this.dispatch({type:"error",error:h}),!Lv(h)){var p,v,b,y;(p=(v=this.cache.config).onError)==null||p.call(v,h,this),(b=(y=this.cache.config).onSettled)==null||b.call(y,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=tL({fn:u.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var p,v,b,y;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(p=(v=this.cache.config).onSuccess)==null||p.call(v,h,this),(b=(y=this.cache.config).onSettled)==null||b.call(y,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,p)=>{this.dispatch({type:"failed",failureCount:h,error:p})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:eb(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Lv(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),vt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function sle(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class ole extends pd{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,o=(i=r.queryHash)!=null?i:aS(s,r);let a=this.get(o);return a||(a=new ile({cache:this,logger:e.getLogger(),queryKey:s,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){vt.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=Oa(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>OP(n,i))}findAll(e,r){const[n]=Oa(e,r);return Object.keys(n).length>0?this.queries.filter(i=>OP(n,i)):this.queries}notify(e){vt.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){vt.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){vt.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class ale extends rL{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||cS,this.observers=[],this.state=e.state||nL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var w;return this.retryer=tL({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(I,F)=>{this.dispatch({type:"failed",failureCount:I,error:F})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(w=this.options.retry)!=null?w:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,o,a,c,l,u;if(!r){var f,d,h,p;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(d=this.mutationCache.config).onMutate)==null?void 0:f.call(d,this.state.variables,this));const I=await((h=(p=this.options).onMutate)==null?void 0:h.call(p,this.state.variables));I!==this.state.context&&this.dispatch({type:"loading",context:I,variables:this.state.variables})}const w=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,w,this.state.variables,this.state.context,this)),await((s=(o=this.options).onSuccess)==null?void 0:s.call(o,w,this.state.variables,this.state.context)),await((a=(c=this.mutationCache.config).onSettled)==null?void 0:a.call(c,w,null,this.state.variables,this.state.context,this)),await((l=(u=this.options).onSettled)==null?void 0:l.call(u,w,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:w}),w}catch(w){try{var v,b,y,m,g,S,P,T;throw await((v=(b=this.mutationCache.config).onError)==null?void 0:v.call(b,w,this.state.variables,this.state.context,this)),await((y=(m=this.options).onError)==null?void 0:y.call(m,w,this.state.variables,this.state.context)),await((g=(S=this.mutationCache.config).onSettled)==null?void 0:g.call(S,void 0,w,this.state.variables,this.state.context,this)),await((P=(T=this.options).onSettled)==null?void 0:P.call(T,void 0,w,this.state.variables,this.state.context)),w}finally{this.dispatch({type:"error",error:w})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!eb(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),vt.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function nL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class cle extends pd{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new ale({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){vt.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>RP(e,r))}findAll(e){return this.mutations.filter(r=>RP(e,r))}notify(e){vt.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return vt.batch(()=>r.reduce((n,i)=>n.then(()=>i.continue().catch(Ii)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function dC(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,c=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,l=c==null?void 0:c.pageParam,u=(c==null?void 0:c.direction)==="forward",f=(c==null?void 0:c.direction)==="backward",d=((s=t.state.data)==null?void 0:s.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let p=h,v=!1;const b=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>{var w;if((w=t.signal)!=null&&w.aborted)v=!0;else{var I;(I=t.signal)==null||I.addEventListener("abort",()=>{v=!0})}return t.signal}})},y=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),m=(T,w,I,F)=>(p=F?[w,...p]:[...p,w],F?[I,...T]:[...T,I]),g=(T,w,I,F)=>{if(v)return Promise.reject("Cancelled");if(typeof I>"u"&&!w&&T.length)return Promise.resolve(T);const j={queryKey:t.queryKey,pageParam:I,meta:t.options.meta};b(j);const H=y(j);return Promise.resolve(H).then(B=>m(T,I,B,F))};let S;if(!d.length)S=g([]);else if(u){const T=typeof l<"u",w=T?l:hC(t.options,d);S=g(d,T,w)}else if(f){const T=typeof l<"u",w=T?l:iL(t.options,d);S=g(d,T,w,!0)}else{p=[];const T=typeof t.options.getNextPageParam>"u";S=(a&&d[0]?a(d[0],0,d):!0)?g([],T,h[0]):Promise.resolve(m([],h[0],d[0]));for(let I=1;I{if(a&&d[I]?a(d[I],I,d):!0){const H=T?h[I]:hC(t.options,F);return g(F,T,H)}return Promise.resolve(m(F,h[I],d[I]))})}return S.then(T=>({pages:T,pageParams:p}))}}}}function hC(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function iL(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function lle(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=hC(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function ule(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=iL(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class lS{constructor(e={}){this.queryCache=e.queryCache||new ole,this.mutationCache=e.mutationCache||new cle,this.logger=e.logger||cS,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=ay.subscribe(()=>{ay.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=cy.subscribe(()=>{cy.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=Oa(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=Yu(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,o=Xce(r,s);if(typeof o>"u")return;const a=Yu(e),c=this.defaultQueryOptions(a);return this.queryCache.build(this,c).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return vt.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=Oa(e,r),i=this.queryCache;vt.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=Oa(e,r,n),o=this.queryCache,a={type:"active",...i};return vt.batch(()=>(o.findAll(i).forEach(c=>{c.reset()}),this.refetchQueries(a,s)))}cancelQueries(e,r,n){const[i,s={}]=Oa(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const o=vt.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(s)));return Promise.all(o).then(Ii).catch(Ii)}invalidateQueries(e,r,n){const[i,s]=Oa(e,r,n);return vt.batch(()=>{var o,a;if(this.queryCache.findAll(i).forEach(l=>{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const c={...i,type:(o=(a=i.refetchType)!=null?a:i.type)!=null?o:"active"};return this.refetchQueries(c,s)})}refetchQueries(e,r,n){const[i,s]=Oa(e,r,n),o=vt.batch(()=>this.queryCache.findAll(i).filter(c=>!c.isDisabled()).map(c=>{var l;return c.fetch(void 0,{...s,cancelRefetch:(l=s==null?void 0:s.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(o).then(Ii);return s!=null&&s.throwOnError||(a=a.catch(Ii)),a}fetchQuery(e,r,n){const i=Yu(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const o=this.queryCache.build(this,s);return o.isStaleByTime(s.staleTime)?o.fetch(s):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Ii).catch(Ii)}fetchInfiniteQuery(e,r,n){const i=Yu(e,r,n);return i.behavior=dC(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Ii).catch(Ii)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>vl(e)===vl(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>sy(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>vl(e)===vl(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>sy(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=aS(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class uS extends pd{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),LP(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pC(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pC(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),oy(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&BP(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e),n=this.createResult(r,e);return dle(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Ii)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),D0||this.currentResult.isStale||!lC(this.options.staleTime))return;const r=QD(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(D0||this.options.enabled===!1||!lC(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ay.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,c=e!==n,l=c?e.state:this.currentQueryInitialState,u=c?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:p,fetchStatus:v,status:b}=f,y=!1,m=!1,g;if(r._optimisticResults){const I=this.hasListeners(),F=!I&&LP(e,r),j=I&&BP(e,n,r,i);(F||j)&&(v=eb(e.options.networkMode)?"fetching":"paused",d||(b="loading")),r._optimisticResults==="isRestoring"&&(v="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&u!=null&&u.isSuccess&&b!=="error")g=u.data,d=u.dataUpdatedAt,b=u.status,y=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(o==null?void 0:o.data)&&r.select===this.selectFn)g=this.selectResult;else try{this.selectFn=r.select,g=r.select(f.data),g=fC(s==null?void 0:s.data,g,r),this.selectResult=g,this.selectError=null}catch(I){this.selectError=I}else g=f.data;if(typeof r.placeholderData<"u"&&typeof g>"u"&&b==="loading"){let I;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))I=s.data;else if(I=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof I<"u")try{I=r.select(I),this.selectError=null}catch(F){this.selectError=F}typeof I<"u"&&(b="success",g=fC(s==null?void 0:s.data,I,r),m=!0)}this.selectError&&(h=this.selectError,g=this.selectResult,p=Date.now(),b="error");const S=v==="fetching",P=b==="loading",T=b==="error";return{status:b,fetchStatus:v,isLoading:P,isSuccess:b==="success",isError:T,isInitialLoading:P&&S,data:g,dataUpdatedAt:d,error:h,errorUpdatedAt:p,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:T&&f.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:m,isPreviousData:y,isRefetchError:T&&f.dataUpdatedAt!==0,isStale:fS(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,oy(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(l=>{const u=l;return this.currentResult[u]!==r[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Lv(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){vt.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var o,a,c,l;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(c=(l=this.options).onSettled)==null||c.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function fle(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function LP(t,e){return fle(t,e)||t.state.dataUpdatedAt>0&&pC(t,e,e.refetchOnMount)}function pC(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&fS(t,e)}return!1}function BP(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&fS(t,r)}function fS(t,e){return t.isStaleByTime(e.staleTime)}function dle(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!oy(t.getCurrentResult(),e)}class hle extends uS{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,r){super.setOptions({...e,behavior:dC()},r)}getOptimisticResult(e){return e.behavior=dC(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,r){var n,i,s,o,a,c;const{state:l}=e,u=super.createResult(e,r),{isFetching:f,isRefetching:d}=u,h=f&&((n=l.fetchMeta)==null||(i=n.fetchMore)==null?void 0:i.direction)==="forward",p=f&&((s=l.fetchMeta)==null||(o=s.fetchMore)==null?void 0:o.direction)==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:lle(r,(a=l.data)==null?void 0:a.pages),hasPreviousPage:ule(r,(c=l.data)==null?void 0:c.pages),isFetchingNextPage:h,isFetchingPreviousPage:p,isRefetching:d&&!h&&!p}}}let ple=class extends pd{constructor(e,r){super(),this.client=e,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const n=this.options;this.options=this.client.defaultMutationOptions(e),oy(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const r={listeners:!0};e.type==="success"?r.onSuccess=!0:e.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:nL(),r={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){vt.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,i,s;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(s=this.mutateOptions).onSettled)==null||i.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,c,l;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(l=this.mutateOptions).onSettled)==null||c.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)})})}};function vle(t){return{mutationKey:t.options.mutationKey,state:t.state}}function mle(t){return{state:t.state,queryKey:t.queryKey,queryHash:t.queryHash}}function yle(t){return t.state.isPaused}function gle(t){return t.state.status==="success"}function ble(t,e={}){const r=[],n=[];if(e.dehydrateMutations!==!1){const i=e.shouldDehydrateMutation||yle;t.getMutationCache().getAll().forEach(s=>{i(s)&&r.push(vle(s))})}if(e.dehydrateQueries!==!1){const i=e.shouldDehydrateQuery||gle;t.getQueryCache().getAll().forEach(s=>{i(s)&&n.push(mle(s))})}return{mutations:r,queries:n}}function wle(t,e,r){if(typeof e!="object"||e===null)return;const n=t.getMutationCache(),i=t.getQueryCache(),s=e.mutations||[],o=e.queries||[];s.forEach(a=>{var c;n.build(t,{...r==null||(c=r.defaultOptions)==null?void 0:c.mutations,mutationKey:a.mutationKey},a.state)}),o.forEach(({queryKey:a,state:c,queryHash:l})=>{var u;const f=i.get(l);if(f){if(f.state.dataUpdatedAt{const{__scopeRadio:r,name:n,checked:i=!1,required:s,disabled:o,value:a="on",onCheck:c,...l}=t,[u,f]=C.useState(null),d=qt(e,v=>f(v)),h=C.useRef(!1),p=u?!!u.closest("form"):!0;return C.createElement(eae,{scope:r,checked:i,disabled:o},C.createElement(Ze.button,dt({type:"button",role:"radio","aria-checked":i,"data-state":$D(i),"data-disabled":o?"":void 0,disabled:o,value:a},l,{ref:d,onClick:Ee(t.onClick,v=>{i||c==null||c(),p&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})})),p&&C.createElement(sae,{control:u,bubbles:!h.current,name:n,value:a,checked:i,required:s,disabled:o,style:{transform:"translateX(-100%)"}}))}),nae="RadioIndicator",iae=C.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...i}=t,s=tae(nae,r);return C.createElement(Oc,{present:n||s.checked},C.createElement(Ze.span,dt({"data-state":$D(s.checked),"data-disabled":s.disabled?"":void 0},i,{ref:e})))}),sae=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=C.useRef(null),o=Ng(r),a=Dg(e);return C.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.createElement("input",dt({type:"radio","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function $D(t){return t?"checked":"unchecked"}const oae=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],MD="RadioGroup",[aae,kPe]=Cn(MD,[dd,RD]),ND=dd(),DD=RD(),[cae,lae]=aae(MD),uae=C.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:i,value:s,required:o=!1,disabled:a=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=t,h=ND(r),p=zg(l),[v,b]=fc({prop:s,defaultProp:i,onChange:f});return C.createElement(cae,{scope:r,name:n,required:o,disabled:a,value:v,onValueChange:b},C.createElement(JN,dt({asChild:!0},h,{orientation:c,dir:p,loop:u}),C.createElement(Ze.div,dt({role:"radiogroup","aria-required":o,"aria-orientation":c,"data-disabled":a?"":void 0,dir:p},d,{ref:e}))))}),fae="RadioGroupItem",dae=C.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...i}=t,s=lae(fae,r),o=s.disabled||n,a=ND(r),c=DD(r),l=C.useRef(null),u=qt(e,l),f=s.value===i.value,d=C.useRef(!1);return C.useEffect(()=>{const h=v=>{oae.includes(v.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}},[]),C.createElement(X3,dt({asChild:!0},a,{focusable:!o,active:f}),C.createElement(rae,dt({disabled:o,required:s.required,checked:f},c,i,{name:s.name,ref:u,onCheck:()=>s.onValueChange(i.value),onKeyDown:Ee(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ee(i.onFocus,()=>{var h;d.current&&((h=l.current)===null||h===void 0||h.click())})})))}),hae=C.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,i=DD(r);return C.createElement(iae,dt({},i,n,{ref:e}))}),pae=uae,vae=dae,mae=hae;var yae=fr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12rt",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),gae=fr({defaultClassName:"io59uy3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr12nb fyvr12fz fyvr121b fyvr128n fyvr12nh fyvr12g5 fyvr121h fyvr128t fyvr11ob fyvr12uz fyvr12uv fyvr12vj",variantClassNames:{size:{sm:"io59uy4 fyvr11a8 fyvr11ak fyvr11aw fyvr11b8",lg:"io59uy5 fyvr11ac fyvr11ao fyvr11b0 fyvr11bc"}},defaultVariants:{},compoundVariants:[]});const bae=t=>{const{id:e,label:r,size:n="sm",value:i,disabled:s}=t;return K.jsx(z,{alignItems:"center",children:K.jsx(tu,{disabled:s,display:"flex",id:e,label:r,labelLocation:"right",children:K.jsx(vae,{className:gae({size:n}),value:i,id:e,disabled:s,children:K.jsx(mae,{className:yae({size:n})})})})})};C.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:i="2",name:s,options:o,size:a="sm",...c}=t;return K.jsx(pae,{disabled:n,name:s,ref:e,...c,children:K.jsx(z,{flexDirection:r,gap:i,children:o.map(({label:l,value:u,disabled:f})=>K.jsx(bae,{id:`${s}-${u}`,label:l,size:a,value:u,disabled:f},u))})})});function AP(t,[e,r]){return Math.min(r,Math.max(e,t))}const LD=C.forwardRef((t,e)=>C.createElement(Ze.span,ke({},t,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}))),wae=[" ","Enter","ArrowUp","ArrowDown"],Eae=[" ","Enter"],Qg="Select",[Yg,nS,xae]=Ug(Qg),[hd,APe]=Cn(Qg,[xae,fd]),iS=fd(),[Cae,iu]=hd(Qg),[Sae,kae]=hd(Qg),Aae=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h}=t,p=iS(e),[v,b]=C.useState(null),[y,m]=C.useState(null),[g,S]=C.useState(!1),P=zg(l),[T=!1,w]=fc({prop:n,defaultProp:i,onChange:s}),[I,B]=fc({prop:o,defaultProp:a,onChange:c}),j=C.useRef(null),H=v?!!v.closest("form"):!0,[G,F]=C.useState(new Set),E=Array.from(G).map(_=>_.props.value).join(";");return C.createElement($ie,p,C.createElement(Cae,{required:h,scope:e,trigger:v,onTriggerChange:b,valueNode:y,onValueNodeChange:m,valueNodeHasChildren:g,onValueNodeHasChildrenChange:S,contentId:tc(),value:I,onValueChange:B,open:T,onOpenChange:w,dir:P,triggerPointerDownPosRef:j,disabled:d},C.createElement(Yg.Provider,{scope:e},C.createElement(Sae,{scope:t.__scopeSelect,onNativeOptionAdd:C.useCallback(_=>{F(O=>new Set(O).add(_))},[]),onNativeOptionRemove:C.useCallback(_=>{F(O=>{const N=new Set(O);return N.delete(_),N})},[])},r)),H?C.createElement(jD,{key:E,"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:I,onChange:_=>B(_.target.value),disabled:d},I===void 0?C.createElement("option",{value:""}):null,Array.from(G)):null))},_ae="SelectTrigger",Pae=C.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...i}=t,s=iS(r),o=iu(_ae,r),a=o.disabled||n,c=qt(e,o.onTriggerChange),l=nS(r),[u,f,d]=UD(p=>{const v=l().filter(m=>!m.disabled),b=v.find(m=>m.value===o.value),y=zD(v,p,b);y!==void 0&&o.onValueChange(y.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return C.createElement(Mie,ke({asChild:!0},s),C.createElement(Ze.button,ke({type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":BD(o.value)?"":void 0},i,{ref:c,onClick:Ee(i.onClick,p=>{p.currentTarget.focus()}),onPointerDown:Ee(i.onPointerDown,p=>{const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:Ee(i.onKeyDown,p=>{const v=u.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&f(p.key),!(v&&p.key===" ")&&wae.includes(p.key)&&(h(),p.preventDefault())})})))}),Tae="SelectValue",Iae=C.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,children:s,placeholder:o="",...a}=t,c=iu(Tae,r),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,f=qt(e,c.onValueNodeChange);return Wi(()=>{l(u)},[l,u]),C.createElement(Ze.span,ke({},a,{ref:f,style:{pointerEvents:"none"}}),BD(c.value)?C.createElement(C.Fragment,null,o):s)}),Oae=C.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...i}=t;return C.createElement(Ze.span,ke({"aria-hidden":!0},i,{ref:e}),n||"▼")}),Bf="SelectContent",Rae=C.forwardRef((t,e)=>{const r=iu(Bf,t.__scopeSelect),[n,i]=C.useState();if(Wi(()=>{i(new DocumentFragment)},[]),!r.open){const s=n;return s?_s.createPortal(C.createElement(FD,{scope:t.__scopeSelect},C.createElement(Yg.Slot,{scope:t.__scopeSelect},C.createElement("div",null,t.children))),s):null}return C.createElement($ae,ke({},t,{ref:e}))}),ko=10,[FD,Jg]=hd(Bf),$ae=C.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:v,avoidCollisions:b,...y}=t,m=iu(Bf,r),[g,S]=C.useState(null),[P,T]=C.useState(null),w=qt(e,W=>S(W)),[I,B]=C.useState(null),[j,H]=C.useState(null),G=nS(r),[F,E]=C.useState(!1),_=C.useRef(!1);C.useEffect(()=>{if(g)return ZN(g)},[g]),ON();const O=C.useCallback(W=>{const[q,...Y]=G().map(Z=>Z.ref.current),[X]=Y.slice(-1),Q=document.activeElement;for(const Z of W)if(Z===Q||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===q&&P&&(P.scrollTop=0),Z===X&&P&&(P.scrollTop=P.scrollHeight),Z==null||Z.focus(),document.activeElement!==Q))return},[G,P]),N=C.useCallback(()=>O([I,g]),[O,I,g]);C.useEffect(()=>{F&&N()},[F,N]);const{onOpenChange:k,triggerPointerDownPosRef:$}=m;C.useEffect(()=>{if(g){let W={x:0,y:0};const q=X=>{var Q,Z,ae,se;W={x:Math.abs(Math.round(X.pageX)-((Q=(Z=$.current)===null||Z===void 0?void 0:Z.x)!==null&&Q!==void 0?Q:0)),y:Math.abs(Math.round(X.pageY)-((ae=(se=$.current)===null||se===void 0?void 0:se.y)!==null&&ae!==void 0?ae:0))}},Y=X=>{W.x<=10&&W.y<=10?X.preventDefault():g.contains(X.target)||k(!1),document.removeEventListener("pointermove",q),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",Y,{capture:!0})}}},[g,k,$]),C.useEffect(()=>{const W=()=>k(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[k]);const[L,M]=UD(W=>{const q=G().filter(Q=>!Q.disabled),Y=q.find(Q=>Q.ref.current===document.activeElement),X=zD(q,W,Y);X&&setTimeout(()=>X.ref.current.focus())}),A=C.useCallback((W,q,Y)=>{const X=!_.current&&!Y;(m.value!==void 0&&m.value===q||X)&&(B(W),X&&(_.current=!0))},[m.value]),D=C.useCallback(()=>g==null?void 0:g.focus(),[g]),V=C.useCallback((W,q,Y)=>{const X=!_.current&&!Y;(m.value!==void 0&&m.value===q||X)&&H(W)},[m.value]),R=n==="popper"?_P:Mae,U=R===_P?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:v,avoidCollisions:b}:{};return C.createElement(FD,{scope:r,content:g,viewport:P,onViewportChange:T,itemRefCallback:A,selectedItem:I,onItemLeave:D,itemTextRefCallback:V,focusSelectedItem:N,selectedItemText:j,position:n,isPositioned:F,searchRef:L},C.createElement(cD,{as:Lf,allowPinchZoom:!0},C.createElement(RN,{asChild:!0,trapped:m.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Ee(i,W=>{var q;(q=m.trigger)===null||q===void 0||q.focus({preventScroll:!0}),W.preventDefault()})},C.createElement(H3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>m.onOpenChange(!1)},C.createElement(R,ke({role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:W=>W.preventDefault()},y,U,{onPlaced:()=>E(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ee(y.onKeyDown,W=>{const q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!q&&W.key.length===1&&M(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let X=G().filter(Q=>!Q.disabled).map(Q=>Q.ref.current);if(["ArrowUp","End"].includes(W.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const Q=W.target,Z=X.indexOf(Q);X=X.slice(Z+1)}setTimeout(()=>O(X)),W.preventDefault()}})}))))))}),Mae=C.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...i}=t,s=iu(Bf,r),o=Jg(Bf,r),[a,c]=C.useState(null),[l,u]=C.useState(null),f=qt(e,w=>u(w)),d=nS(r),h=C.useRef(!1),p=C.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:y,focusSelectedItem:m}=o,g=C.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&v&&b&&y){const w=s.trigger.getBoundingClientRect(),I=l.getBoundingClientRect(),B=s.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(s.dir!=="rtl"){const Q=j.left-I.left,Z=B.left-Q,ae=w.left-Z,se=w.width+ae,ue=Math.max(se,I.width),ot=window.innerWidth-ko,Pe=AP(Z,[ko,ot-ue]);a.style.minWidth=se+"px",a.style.left=Pe+"px"}else{const Q=I.right-j.right,Z=window.innerWidth-B.right-Q,ae=window.innerWidth-w.right-Z,se=w.width+ae,ue=Math.max(se,I.width),ot=window.innerWidth-ko,Pe=AP(Z,[ko,ot-ue]);a.style.minWidth=se+"px",a.style.right=Pe+"px"}const H=d(),G=window.innerHeight-ko*2,F=v.scrollHeight,E=window.getComputedStyle(l),_=parseInt(E.borderTopWidth,10),O=parseInt(E.paddingTop,10),N=parseInt(E.borderBottomWidth,10),k=parseInt(E.paddingBottom,10),$=_+O+F+k+N,L=Math.min(b.offsetHeight*5,$),M=window.getComputedStyle(v),A=parseInt(M.paddingTop,10),D=parseInt(M.paddingBottom,10),V=w.top+w.height/2-ko,R=G-V,U=b.offsetHeight/2,W=b.offsetTop+U,q=_+O+W,Y=$-q;if(q<=V){const Q=b===H[H.length-1].ref.current;a.style.bottom="0px";const Z=l.clientHeight-v.offsetTop-v.offsetHeight,ae=Math.max(R,U+(Q?D:0)+Z+N),se=q+ae;a.style.height=se+"px"}else{const Q=b===H[0].ref.current;a.style.top="0px";const ae=Math.max(V,_+v.offsetTop+(Q?A:0)+U)+Y;a.style.height=ae+"px",v.scrollTop=q-V+v.offsetTop}a.style.margin=`${ko}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=G+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,a,l,v,b,y,s.dir,n]);Wi(()=>g(),[g]);const[S,P]=C.useState();Wi(()=>{l&&P(window.getComputedStyle(l).zIndex)},[l]);const T=C.useCallback(w=>{w&&p.current===!0&&(g(),m==null||m(),p.current=!1)},[g,m]);return C.createElement(Nae,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:T},C.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S}},C.createElement(Ze.div,ke({},i,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}}))))}),_P=C.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=ko,...s}=t,o=iS(r);return C.createElement(Nie,ke({},o,s,{ref:e,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[Nae,Dae]=hd(Bf,{}),PP="SelectViewport",Lae=C.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=Jg(PP,r),s=Dae(PP,r),o=qt(e,i.onViewportChange),a=C.useRef(0);return C.createElement(C.Fragment,null,C.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),C.createElement(Yg.Slot,{scope:r},C.createElement(Ze.div,ke({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ee(n.onScroll,c=>{const l=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&u){const d=Math.abs(a.current-l.scrollTop);if(d>0){const h=window.innerHeight-ko*2,p=parseFloat(u.style.minHeight),v=parseFloat(u.style.height),b=Math.max(p,v);if(b0?g:0,u.style.justifyContent="flex-end")}}}a.current=l.scrollTop})}))))}),Fae="SelectGroup",[Bae,_Pe]=hd(Fae),jae=C.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,i=tc();return C.createElement(Bae,{scope:r,id:i},C.createElement(Ze.div,ke({role:"group","aria-labelledby":i},n,{ref:e})))}),aC="SelectItem",[Uae,zae]=hd(aC),Wae=C.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=t,a=iu(aC,r),c=Jg(aC,r),l=a.value===n,[u,f]=C.useState(s??""),[d,h]=C.useState(!1),p=qt(e,y=>{var m;return(m=c.itemRefCallback)===null||m===void 0?void 0:m.call(c,y,n,i)}),v=tc(),b=()=>{i||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return C.createElement(Uae,{scope:r,value:n,disabled:i,textId:v,isSelected:l,onItemTextChange:C.useCallback(y=>{f(m=>{var g;return m||((g=y==null?void 0:y.textContent)!==null&&g!==void 0?g:"").trim()})},[])},C.createElement(Yg.ItemSlot,{scope:r,value:n,disabled:i,textValue:u},C.createElement(Ze.div,ke({role:"option","aria-labelledby":v,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},o,{ref:p,onFocus:Ee(o.onFocus,()=>h(!0)),onBlur:Ee(o.onBlur,()=>h(!1)),onPointerUp:Ee(o.onPointerUp,b),onPointerMove:Ee(o.onPointerMove,y=>{if(i){var m;(m=c.onItemLeave)===null||m===void 0||m.call(c)}else y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ee(o.onPointerLeave,y=>{if(y.currentTarget===document.activeElement){var m;(m=c.onItemLeave)===null||m===void 0||m.call(c)}}),onKeyDown:Ee(o.onKeyDown,y=>{var m;((m=c.searchRef)===null||m===void 0?void 0:m.current)!==""&&y.key===" "||(Eae.includes(y.key)&&b(),y.key===" "&&y.preventDefault())})}))))}),Vp="SelectItemText",Hae=C.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:i,...s}=t,o=iu(Vp,r),a=Jg(Vp,r),c=zae(Vp,r),l=kae(Vp,r),[u,f]=C.useState(null),d=qt(e,y=>f(y),c.onItemTextChange,y=>{var m;return(m=a.itemTextRefCallback)===null||m===void 0?void 0:m.call(a,y,c.value,c.disabled)}),h=u==null?void 0:u.textContent,p=C.useMemo(()=>C.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},h),[c.disabled,c.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return Wi(()=>(v(p),()=>b(p)),[v,b,p]),C.createElement(C.Fragment,null,C.createElement(Ze.span,ke({id:c.textId},s,{ref:d})),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?_s.createPortal(s.children,o.valueNode):null)});function BD(t){return t===""||t===void 0}const jD=C.forwardRef((t,e)=>{const{value:r,...n}=t,i=C.useRef(null),s=qt(e,i),o=Ng(r);return C.useEffect(()=>{const a=i.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==r&&u){const f=new Event("change",{bubbles:!0});u.call(a,r),a.dispatchEvent(f)}},[o,r]),C.createElement(LD,{asChild:!0},C.createElement("select",ke({},n,{ref:s,defaultValue:r})))});jD.displayName="BubbleSelect";function UD(t){const e=zi(t),r=C.useRef(""),n=C.useRef(0),i=C.useCallback(o=>{const a=r.current+o;e(a),function c(l){r.current=l,window.clearTimeout(n.current),l!==""&&(n.current=window.setTimeout(()=>c(""),1e3))}(a)},[e]),s=C.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return C.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function zD(t,e,r){const i=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,s=r?t.indexOf(r):-1;let o=qae(t,Math.max(s,0));i.length===1&&(o=o.filter(l=>l!==r));const c=o.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function qae(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const Vae=Aae,Gae=Pae,Kae=Iae,Qae=Oae,Yae=Rae,Jae=Lae,Xae=jae,Zae=Wae,ece=Hae;var tce="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11tt fyvr12rt fyvr11nj",rce="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12rt fyvr12vt fyvr12vj",nce="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12rt fyvr118c fyvr11jw fyvr11n2 fyvr12uz",ice=fr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const sce=C.forwardRef(({children:t,className:e,...r},n)=>K.jsx(Zae,{className:Si(rce,e),...r,ref:n,children:K.jsx(ece,{children:t})}));C.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:i,label:s="",description:o,labelLocation:a="hidden",name:c,options:l,placeholder:u,...f}=t;return K.jsx(tu,{disabled:n,display:"grid",id:i??c,label:s,labelLocation:a,description:o,whiteSpace:"nowrap",children:K.jsxs(Vae,{disabled:n,name:c,...f,children:[K.jsxs(Gae,{id:i??c,className:Si(nce,ice({borderRadius:r})),ref:e,children:[K.jsx(Kae,{placeholder:u}),K.jsx(z,{as:Qae,display:"inline-flex",children:K.jsx(kN,{})})]}),K.jsx(Yae,{className:tce,children:K.jsx(Jae,{children:K.jsx(Xae,{children:l.map(({value:d,label:h,...p})=>K.jsx(sce,{value:d,...p,children:h},d))})})})]})})});C.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:i="Search",name:s="search",value:o,...a}=t,c=o?K.jsx(Jo,{icon:ru,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return K.jsx($c,{ref:e,name:s,leftIcon:Bg,controls:r||c,placeholder:i,value:o,onChange:l=>n==null?void 0:n(l),...a})});var oce=fr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const sS=C.forwardRef((t,e)=>{const{size:r="md",...n}=t;return K.jsx(z,{className:oce({size:r}),color:"text50",ref:e,...n,children:K.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[K.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),K.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});C.forwardRef(({children:t},e)=>K.jsx(z,{ref:e,width:"fit",height:"fit",onClick:r=>{r.preventDefault(),r.stopPropagation()},onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.stopPropagation())},children:t}));const WD="Switch",[ace,PPe]=Cn(WD),[cce,lce]=ace(WD),uce=C.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:s,required:o,disabled:a,value:c="on",onCheckedChange:l,...u}=t,[f,d]=C.useState(null),h=qt(e,m=>d(m)),p=C.useRef(!1),v=f?!!f.closest("form"):!0,[b=!1,y]=fc({prop:i,defaultProp:s,onChange:l});return C.createElement(cce,{scope:r,checked:b,disabled:a},C.createElement(Ze.button,dt({type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":HD(b),"data-disabled":a?"":void 0,disabled:a,value:c},u,{ref:h,onClick:Ee(t.onClick,m=>{y(g=>!g),v&&(p.current=m.isPropagationStopped(),p.current||m.stopPropagation())})})),v&&C.createElement(hce,{control:f,bubbles:!p.current,name:n,value:c,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),fce="SwitchThumb",dce=C.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,i=lce(fce,r);return C.createElement(Ze.span,dt({"data-state":HD(i.checked),"data-disabled":i.disabled?"":void 0},n,{ref:e}))}),hce=t=>{const{control:e,checked:r,bubbles:n=!0,...i}=t,s=C.useRef(null),o=Ng(r),a=Dg(e);return C.useEffect(()=>{const c=s.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(o!==r&&f){const d=new Event("click",{bubbles:n});f.call(c,r),c.dispatchEvent(d)}},[o,r,n]),C.createElement("input",dt({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:s,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function HD(t){return t?"checked":"unchecked"}const pce=uce,vce=dce;var mce="_1lp2u8e1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11sz fyvr11hw fyvr12uz",yce="_1lp2u8e3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11nz";const O2=t=>{const{disabled:e,label:r,labelLocation:n="left",description:i,id:s,name:o,...a}=t;return K.jsx(tu,{disabled:e,display:"flex",id:s??o,label:r,labelLocation:n,description:i,whiteSpace:"nowrap",children:K.jsx(pce,{className:mce,disabled:e,...a,children:K.jsx(z,{position:"relative",width:"full",height:"full",children:K.jsx(vce,{className:yce})})})})};fr({defaultClassName:"nwwh3z7",variantClassNames:{variant:{pill:"nwwh3z8",line:"nwwh3z9 fyvr11g0"},active:{true:"fyvr12vx",false:"nwwh3zb"},disabled:{true:"fyvr12vh"}},defaultVariants:{},compoundVariants:[[{active:!0,variant:"pill"},"fyvr11u5 fyvr12sb"],[{active:!1,variant:"pill"},"fyvr11ob fyvr12rz"],[{active:!0,variant:"line"},"fyvr12rt"],[{active:!1,variant:"line"},"fyvr12rz"]]});const qD="Tabs",[gce,TPe]=Cn(qD,[dd]),VD=dd(),[bce,oS]=gce(qD),wce=C.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:a,activationMode:c="automatic",...l}=t,u=zg(a),[f,d]=fc({prop:n,onChange:i,defaultProp:s});return C.createElement(bce,{scope:r,baseId:tc(),value:f,onValueChange:d,orientation:o,dir:u,activationMode:c},C.createElement(Ze.div,dt({dir:u,"data-orientation":o},l,{ref:e})))}),Ece="TabsList",xce=C.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...i}=t,s=oS(Ece,r),o=VD(r);return C.createElement(JN,dt({asChild:!0},o,{orientation:s.orientation,dir:s.dir,loop:n}),C.createElement(Ze.div,dt({role:"tablist","aria-orientation":s.orientation},i,{ref:e})))}),Cce="TabsTrigger",Sce=C.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...s}=t,o=oS(Cce,r),a=VD(r),c=GD(o.baseId,n),l=KD(o.baseId,n),u=n===o.value;return C.createElement(X3,dt({asChild:!0},a,{focusable:!i,active:u}),C.createElement(Ze.button,dt({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},s,{ref:e,onMouseDown:Ee(t.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(n):f.preventDefault()}),onKeyDown:Ee(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(n)}),onFocus:Ee(t.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!i&&f&&o.onValueChange(n)})})))}),kce="TabsContent",Ace=C.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:i,children:s,...o}=t,a=oS(kce,r),c=GD(a.baseId,n),l=KD(a.baseId,n),u=n===a.value,f=C.useRef(u);return C.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),C.createElement(Oc,{present:i||u},({present:d})=>C.createElement(Ze.div,dt({"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0}}),d&&s))});function GD(t,e){return`${t}-trigger-${e}`}function KD(t,e){return`${t}-content-${e}`}const _ce=wce,Pce=xce,Tce=Sce;var Ice="_10c8o0n1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11sh fyvr14o",Oce="_10c8o0n5 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11tt fyvr12vz",Rce="_10c8o0n3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wh fyvr12wb fyvr128 fyvr15o fyvr12uz fyvr11hw fyvr11ob fyvr11n2 fyvr12rz";const $ce=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,i=e.findIndex(s=>s.value===r);return K.jsxs(Pce,{className:Ice,style:{outline:void 0},children:[K.jsx(z,{display:"flex",position:"absolute",inset:"2",height:"8",children:K.jsx("div",{className:Oce,style:{width:`${n}%`,transform:`translateX(${i*100}%)`}})}),e.map(s=>K.jsx(Tce,{className:Rce,value:s.value,children:K.jsx(re,{variant:"normal",fontWeight:"bold",children:s.label})},s.value))]})},Mce=_ce,TP=Ace;var Nce="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";C.forwardRef((t,e)=>{const{icon:r,label:n,...i}=t;return K.jsxs(z,{className:Nce,ref:e,background:"buttonGlass",...i,children:[r&&K.jsx(r,{size:"xs"}),K.jsx(re,{children:n})]})});const Dce="ToastProvider",[Lce,IPe,Fce]=Ug("Toast"),[QD,OPe]=Cn("Toast",[Fce]),[RPe,YD]=QD(Dce),IP="toast.viewportPause",OP="toast.viewportResume",Xg="Toast",Bce="toast.swipeStart",jce="toast.swipeMove",Uce="toast.swipeCancel",zce="toast.swipeEnd",[Wce,Hce]=QD(Xg,{onClose(){}}),qce=C.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:d,onSwipeEnd:h,...p}=t,v=YD(Xg,r),[b,y]=C.useState(null),m=qt(e,E=>y(E)),g=C.useRef(null),S=C.useRef(null),P=i||v.duration,T=C.useRef(0),w=C.useRef(P),I=C.useRef(0),{onToastAdd:B,onToastRemove:j}=v,H=zi(()=>{var E;(b==null?void 0:b.contains(document.activeElement))&&((E=v.viewport)===null||E===void 0||E.focus()),o()}),G=C.useCallback(E=>{!E||E===1/0||(window.clearTimeout(I.current),T.current=new Date().getTime(),I.current=window.setTimeout(H,E))},[H]);C.useEffect(()=>{const E=v.viewport;if(E){const _=()=>{G(w.current),l==null||l()},O=()=>{const N=new Date().getTime()-T.current;w.current=w.current-N,window.clearTimeout(I.current),c==null||c()};return E.addEventListener(IP,O),E.addEventListener(OP,_),()=>{E.removeEventListener(IP,O),E.removeEventListener(OP,_)}}},[v.viewport,P,c,l,G]),C.useEffect(()=>{s&&!v.isClosePausedRef.current&&G(P)},[s,P,v.isClosePausedRef,G]),C.useEffect(()=>(B(),()=>j()),[B,j]);const F=C.useMemo(()=>b?XD(b):null,[b]);return v.viewport?C.createElement(C.Fragment,null,F&&C.createElement(Vce,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},F),C.createElement(Wce,{scope:r,onClose:H},_s.createPortal(C.createElement(Lce.ItemSlot,{scope:r},C.createElement(Nne,{asChild:!0,onEscapeKeyDown:Ee(a,()=>{v.isFocusedToastEscapeKeyDownRef.current||H(),v.isFocusedToastEscapeKeyDownRef.current=!1})},C.createElement(Ze.li,ke({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":v.swipeDirection},p,{ref:m,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ee(t.onKeyDown,E=>{E.key==="Escape"&&(a==null||a(E.nativeEvent),E.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:Ee(t.onPointerDown,E=>{E.button===0&&(g.current={x:E.clientX,y:E.clientY})}),onPointerMove:Ee(t.onPointerMove,E=>{if(!g.current)return;const _=E.clientX-g.current.x,O=E.clientY-g.current.y,N=!!S.current,k=["left","right"].includes(v.swipeDirection),$=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,L=k?$(0,_):0,M=k?0:$(0,O),A=E.pointerType==="touch"?10:2,D={x:L,y:M},V={originalEvent:E,delta:D};N?(S.current=D,Gp(jce,f,V,{discrete:!1})):RP(D,v.swipeDirection,A)?(S.current=D,Gp(Bce,u,V,{discrete:!1}),E.target.setPointerCapture(E.pointerId)):(Math.abs(_)>A||Math.abs(O)>A)&&(g.current=null)}),onPointerUp:Ee(t.onPointerUp,E=>{const _=S.current,O=E.target;if(O.hasPointerCapture(E.pointerId)&&O.releasePointerCapture(E.pointerId),S.current=null,g.current=null,_){const N=E.currentTarget,k={originalEvent:E,delta:_};RP(_,v.swipeDirection,v.swipeThreshold)?Gp(zce,h,k,{discrete:!0}):Gp(Uce,d,k,{discrete:!0}),N.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})))),v.viewport))):null});qce.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Xg}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const Vce=t=>{const{__scopeToast:e,children:r,...n}=t,i=YD(Xg,e),[s,o]=C.useState(!1),[a,c]=C.useState(!1);return Jce(()=>o(!0)),C.useEffect(()=>{const l=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(l)},[]),a?null:C.createElement(KN,{asChild:!0},C.createElement(LD,n,s&&C.createElement(C.Fragment,null,i.label," ",r)))},Gce="ToastAction",Kce=C.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?C.createElement(JD,{altText:r,asChild:!0},C.createElement(Yce,ke({},n,{ref:e}))):null});Kce.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${Gce}\``)}};const Qce="ToastClose",Yce=C.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,i=Hce(Qce,r);return C.createElement(JD,{asChild:!0},C.createElement(Ze.button,ke({type:"button"},n,{ref:e,onClick:Ee(t.onClick,i.onClose)})))}),JD=C.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...i}=t;return C.createElement(Ze.div,ke({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},i,{ref:e}))});function XD(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),Xce(n)){const i=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...XD(n))}}),e}function Gp(t,e,r,{discrete:n}){const i=r.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?W3(i,s):i.dispatchEvent(s)}const RP=(t,e,r=0)=>{const n=Math.abs(t.x),i=Math.abs(t.y),s=n>i;return e==="left"||e==="right"?s&&n>r:!s&&i>r};function Jce(t=()=>{}){const e=zi(t);Wi(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function Xce(t){return t.nodeType===t.ELEMENT_NODE}fr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});C.createContext(null);var Zce="_15pztn2",ele="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12rt fyvr128 fyvr11h0";C.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:i="md",description:s,disabled:o=!1,id:a,label:c="",labelLocation:l="hidden",name:u,rows:f,resize:d=!1,...h}=t;return K.jsx(tu,{description:s,disabled:o,display:"grid",id:a??u,label:c,labelLocation:l,children:K.jsx(z,{as:r,autoComplete:n,spellCheck:"false",className:Si(ele,d&&Zce),disabled:o,id:a??u,name:u,ref:e,rows:f,borderRadius:i,...h})})});var tle="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11sh fyvr128 fyvr15o fyvr11h0",rle="bnrrebe",nle=fr({defaultClassName:"bnrreb5 fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11h0",variantClassNames:{size:{xs:"bnrreb6",sm:"bnrreb7",md:"bnrreb8",lg:"bnrreb9"},borderRadius:{circle:"fyvr11dc fyvr11e0 fyvr11c0 fyvr11co",lg:"fyvr11d8 fyvr11dw fyvr11bw fyvr11ck",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc"}},defaultVariants:{},compoundVariants:[]});C.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:i,src:s,symbol:o,size:a="md",...c}=t;return K.jsx(z,{className:Si(r,nle({borderRadius:e,size:a})),style:i,flexShrink:"0",...c,children:s?K.jsx(mr,{className:rle,disableAnimation:n,src:s}):K.jsx(re,{className:tle,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Zg,$Pe]=Cn("Tooltip",[fd]);fd();const ile="TooltipProvider";Zg(ile);const ZD="Tooltip";Zg(ZD);const sle="TooltipPortal";Zg(sle,{forceMount:void 0});Zg(ZD,{isInside:!1});const ole=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${Q_.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${Q_.lg}px)`);if(!t.startsWith("@media")){const c=r.get(t);if(!c||c==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=c}const n=t.replace(/^@media( ?)/m,""),i=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:s=!1}=e,[o,a]=C.useState(()=>i?window.matchMedia(n).matches:s);return C.useEffect(()=>{let c=!0;if(!i)return;const l=window.matchMedia(n),u=()=>{c&&a(l.matches)};return u(),l.addListener(u),()=>{c=!1,l.removeListener(u)}},[n,i]),o};function ale({storage:t,key:e="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:i=JSON.parse,retry:s}){if(t){const o=a=>{try{t.setItem(e,n(a));return}catch(c){return c}};return{persistClient:cle(a=>{let c=a,l=o(c),u=0;for(;l&&c;)u++,c=s==null?void 0:s({persistedClient:c,error:l,errorCount:u}),c&&(l=o(c))},r),restoreClient:()=>{const a=t.getItem(e);if(a)return i(a)},removeClient:()=>{t.removeItem(e)}}}return{persistClient:$P,restoreClient:()=>{},removeClient:$P}}function cle(t,e=100){let r=null,n;return function(...i){n=i,r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}}function $P(){}class pd{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const r={listener:e};return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const D0=typeof window>"u"||"Deno"in window;function Ii(){}function lle(t,e){return typeof t=="function"?t(e):t}function cC(t){return typeof t=="number"&&t>=0&&t!==1/0}function eL(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Yu(t,e,r){return N1(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function tL(t,e,r){return N1(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function Oa(t,e,r){return N1(t)?[{...e,queryKey:t},r]:[t||{},e]}function MP(t,e){const{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(N1(o)){if(n){if(e.queryHash!==aS(o,e.options))return!1}else if(!sy(e.queryKey,o))return!1}if(r!=="all"){const c=e.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof i<"u"&&i!==e.state.fetchStatus||s&&!s(e))}function NP(t,e){const{exact:r,fetching:n,predicate:i,mutationKey:s}=t;if(N1(s)){if(!e.options.mutationKey)return!1;if(r){if(vl(e.options.mutationKey)!==vl(s))return!1}else if(!sy(e.options.mutationKey,s))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function aS(t,e){return((e==null?void 0:e.queryKeyHashFn)||vl)(t)}function vl(t){return JSON.stringify(t,(e,r)=>lC(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function sy(t,e){return rL(t,e)}function rL(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!rL(t[r],e[r])):!1}function nL(t,e){if(t===e)return t;const r=DP(t)&&DP(e);if(r||lC(t)&&lC(e)){const n=r?t.length:Object.keys(t).length,i=r?e:Object.keys(e),s=i.length,o=r?[]:{};let a=0;for(let c=0;c"u")return!0;const r=e.prototype;return!(!LP(r)||!r.hasOwnProperty("isPrototypeOf"))}function LP(t){return Object.prototype.toString.call(t)==="[object Object]"}function N1(t){return Array.isArray(t)}function iL(t){return new Promise(e=>{setTimeout(e,t)})}function FP(t){iL(0).then(t)}function ule(){if(typeof AbortController=="function")return new AbortController}function uC(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?nL(t,e):e}class fle extends pd{constructor(){super(),this.setup=e=>{if(!D0&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),window.addEventListener("focus",r,!1),()=>{window.removeEventListener("visibilitychange",r),window.removeEventListener("focus",r)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const ay=new fle,BP=["online","offline"];class dle extends pd{constructor(){super(),this.setup=e=>{if(!D0&&window.addEventListener){const r=()=>e();return BP.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{BP.forEach(n=>{window.removeEventListener(n,r)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var r;this.setup=e,(r=this.cleanup)==null||r.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const cy=new dle;function hle(t){return Math.min(1e3*2**t,3e4)}function eb(t){return(t??"online")==="online"?cy.isOnline():!0}class sL{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Lv(t){return t instanceof sL}function oL(t){let e=!1,r=0,n=!1,i,s,o;const a=new Promise((b,y)=>{s=b,o=y}),c=b=>{n||(h(new sL(b)),t.abort==null||t.abort())},l=()=>{e=!0},u=()=>{e=!1},f=()=>!ay.isFocused()||t.networkMode!=="always"&&!cy.isOnline(),d=b=>{n||(n=!0,t.onSuccess==null||t.onSuccess(b),i==null||i(),s(b))},h=b=>{n||(n=!0,t.onError==null||t.onError(b),i==null||i(),o(b))},p=()=>new Promise(b=>{i=y=>{const m=n||!f();return m&&b(y),m},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),v=()=>{if(n)return;let b;try{b=t.fn()}catch(y){b=Promise.reject(y)}Promise.resolve(b).then(d).catch(y=>{var m,g;if(n)return;const S=(m=t.retry)!=null?m:3,P=(g=t.retryDelay)!=null?g:hle,T=typeof P=="function"?P(r,y):P,w=S===!0||typeof S=="number"&&r{if(f())return p()}).then(()=>{e?h(y):v()})})};return eb(t.networkMode)?v():p().then(v),{promise:a,cancel:c,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:l,continueRetry:u}}const cS=console;function ple(){let t=[],e=0,r=u=>{u()},n=u=>{u()};const i=u=>{let f;e++;try{f=u()}finally{e--,e||a()}return f},s=u=>{e?t.push(u):FP(()=>{r(u)})},o=u=>(...f)=>{s(()=>{u(...f)})},a=()=>{const u=t;t=[],u.length&&FP(()=>{n(()=>{u.forEach(f=>{r(f)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u}}}const mt=ple();class aL{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cC(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(D0?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class vle extends aL{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||cS,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||mle(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,r){const n=uC(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){this.dispatch({type:"setState",state:e,setStateOptions:r})}cancel(e){var r;const n=this.promise;return(r=this.retryer)==null||r.cancel(e),n?n.then(Ii).catch(Ii):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!eL(this.state.dataUpdatedAt,e)}onFocus(){var e;const r=this.observers.find(n=>n.shouldFetchOnWindowFocus());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const r=this.observers.find(n=>n.shouldFetchOnReconnect());r&&r.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,r){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var s;return(s=this.retryer)==null||s.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const o=ule(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};c(a);const l=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),u={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:l};if(c(u),(n=this.options.behavior)==null||n.onFetch(u),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=u.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta})}const d=h=>{if(Lv(h)&&h.silent||this.dispatch({type:"error",error:h}),!Lv(h)){var p,v,b,y;(p=(v=this.cache.config).onError)==null||p.call(v,h,this),(b=(y=this.cache.config).onSettled)==null||b.call(y,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=oL({fn:u.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var p,v,b,y;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(p=(v=this.cache.config).onSuccess)==null||p.call(v,h,this),(b=(y=this.cache.config).onSettled)==null||b.call(y,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,p)=>{this.dispatch({type:"failed",failureCount:h,error:p})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var i,s;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:eb(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(s=e.dataUpdatedAt)!=null?s:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Lv(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=r(this.state),mt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function mle(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=typeof e<"u",n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}class yle extends pd{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var i;const s=r.queryKey,o=(i=r.queryHash)!=null?i:aS(s,r);let a=this.get(o);return a||(a=new vle({cache:this,logger:e.getLogger(),queryKey:s,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const r=this.queriesMap[e.queryHash];r&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),r===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){mt.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=Oa(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>MP(n,i))}findAll(e,r){const[n]=Oa(e,r);return Object.keys(n).length>0?this.queries.filter(i=>MP(n,i)):this.queries}notify(e){mt.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){mt.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){mt.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class gle extends aL{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||cS,this.observers=[],this.state=e.state||cL(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(r=>r!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,r;return(e=(r=this.retryer)==null?void 0:r.continue())!=null?e:this.execute()}async execute(){const e=()=>{var w;return this.retryer=oL({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(I,B)=>{this.dispatch({type:"failed",failureCount:I,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(w=this.options.retry)!=null?w:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,i,s,o,a,c,l,u;if(!r){var f,d,h,p;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(d=this.mutationCache.config).onMutate)==null?void 0:f.call(d,this.state.variables,this));const I=await((h=(p=this.options).onMutate)==null?void 0:h.call(p,this.state.variables));I!==this.state.context&&this.dispatch({type:"loading",context:I,variables:this.state.variables})}const w=await e();return await((n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,w,this.state.variables,this.state.context,this)),await((s=(o=this.options).onSuccess)==null?void 0:s.call(o,w,this.state.variables,this.state.context)),await((a=(c=this.mutationCache.config).onSettled)==null?void 0:a.call(c,w,null,this.state.variables,this.state.context,this)),await((l=(u=this.options).onSettled)==null?void 0:l.call(u,w,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:w}),w}catch(w){try{var v,b,y,m,g,S,P,T;throw await((v=(b=this.mutationCache.config).onError)==null?void 0:v.call(b,w,this.state.variables,this.state.context,this)),await((y=(m=this.options).onError)==null?void 0:y.call(m,w,this.state.variables,this.state.context)),await((g=(S=this.mutationCache.config).onSettled)==null?void 0:g.call(S,void 0,w,this.state.variables,this.state.context,this)),await((P=(T=this.options).onSettled)==null?void 0:P.call(T,void 0,w,this.state.variables,this.state.context)),w}finally{this.dispatch({type:"error",error:w})}}}dispatch(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!eb(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=r(this.state),mt.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function cL(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ble extends pd{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const i=new gle({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(r),state:n,defaultOptions:r.mutationKey?e.getMutationDefaults(r.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(r=>r!==e),this.notify({type:"removed",mutation:e})}clear(){mt.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(r=>NP(e,r))}findAll(e){return this.mutations.filter(r=>NP(e,r))}notify(e){mt.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const r=this.mutations.filter(n=>n.state.isPaused);return mt.batch(()=>r.reduce((n,i)=>n.then(()=>i.continue().catch(Ii)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function fC(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,i,s,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,c=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,l=c==null?void 0:c.pageParam,u=(c==null?void 0:c.direction)==="forward",f=(c==null?void 0:c.direction)==="backward",d=((s=t.state.data)==null?void 0:s.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let p=h,v=!1;const b=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>{var w;if((w=t.signal)!=null&&w.aborted)v=!0;else{var I;(I=t.signal)==null||I.addEventListener("abort",()=>{v=!0})}return t.signal}})},y=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),m=(T,w,I,B)=>(p=B?[w,...p]:[...p,w],B?[I,...T]:[...T,I]),g=(T,w,I,B)=>{if(v)return Promise.reject("Cancelled");if(typeof I>"u"&&!w&&T.length)return Promise.resolve(T);const j={queryKey:t.queryKey,pageParam:I,meta:t.options.meta};b(j);const H=y(j);return Promise.resolve(H).then(F=>m(T,I,F,B))};let S;if(!d.length)S=g([]);else if(u){const T=typeof l<"u",w=T?l:dC(t.options,d);S=g(d,T,w)}else if(f){const T=typeof l<"u",w=T?l:lL(t.options,d);S=g(d,T,w,!0)}else{p=[];const T=typeof t.options.getNextPageParam>"u";S=(a&&d[0]?a(d[0],0,d):!0)?g([],T,h[0]):Promise.resolve(m([],h[0],d[0]));for(let I=1;I{if(a&&d[I]?a(d[I],I,d):!0){const H=T?h[I]:dC(t.options,B);return g(B,T,H)}return Promise.resolve(m(B,h[I],d[I]))})}return S.then(T=>({pages:T,pageParams:p}))}}}}function dC(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function lL(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function wle(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=dC(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function Ele(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=lL(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class lS{constructor(e={}){this.queryCache=e.queryCache||new yle,this.mutationCache=e.mutationCache||new ble,this.logger=e.logger||cS,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=ay.subscribe(()=>{ay.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=cy.subscribe(()=>{cy.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,r;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(r=this.unsubscribeOnline)==null||r.call(this),this.unsubscribeOnline=void 0)}isFetching(e,r){const[n]=Oa(e,r);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state.data}ensureQueryData(e,r,n){const i=Yu(e,r,n),s=this.getQueryData(i.queryKey);return s?Promise.resolve(s):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const i=n.data;return[r,i]})}setQueryData(e,r,n){const i=this.queryCache.find(e),s=i==null?void 0:i.state.data,o=lle(r,s);if(typeof o>"u")return;const a=Yu(e),c=this.defaultQueryOptions(a);return this.queryCache.build(this,c).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return mt.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=Oa(e,r),i=this.queryCache;mt.batch(()=>{i.findAll(n).forEach(s=>{i.remove(s)})})}resetQueries(e,r,n){const[i,s]=Oa(e,r,n),o=this.queryCache,a={type:"active",...i};return mt.batch(()=>(o.findAll(i).forEach(c=>{c.reset()}),this.refetchQueries(a,s)))}cancelQueries(e,r,n){const[i,s={}]=Oa(e,r,n);typeof s.revert>"u"&&(s.revert=!0);const o=mt.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(s)));return Promise.all(o).then(Ii).catch(Ii)}invalidateQueries(e,r,n){const[i,s]=Oa(e,r,n);return mt.batch(()=>{var o,a;if(this.queryCache.findAll(i).forEach(l=>{l.invalidate()}),i.refetchType==="none")return Promise.resolve();const c={...i,type:(o=(a=i.refetchType)!=null?a:i.type)!=null?o:"active"};return this.refetchQueries(c,s)})}refetchQueries(e,r,n){const[i,s]=Oa(e,r,n),o=mt.batch(()=>this.queryCache.findAll(i).filter(c=>!c.isDisabled()).map(c=>{var l;return c.fetch(void 0,{...s,cancelRefetch:(l=s==null?void 0:s.cancelRefetch)!=null?l:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(o).then(Ii);return s!=null&&s.throwOnError||(a=a.catch(Ii)),a}fetchQuery(e,r,n){const i=Yu(e,r,n),s=this.defaultQueryOptions(i);typeof s.retry>"u"&&(s.retry=!1);const o=this.queryCache.build(this,s);return o.isStaleByTime(s.staleTime)?o.fetch(s):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Ii).catch(Ii)}fetchInfiniteQuery(e,r,n){const i=Yu(e,r,n);return i.behavior=fC(),this.fetchQuery(i)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Ii).catch(Ii)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,r){const n=this.queryDefaults.find(i=>vl(e)===vl(i.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>sy(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(i=>vl(e)===vl(i.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>sy(e,n.mutationKey));return r==null?void 0:r.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const r={...this.defaultOptions.queries,...this.getQueryDefaults(e==null?void 0:e.queryKey),...e,_defaulted:!0};return!r.queryHash&&r.queryKey&&(r.queryHash=aS(r.queryKey,r)),typeof r.refetchOnReconnect>"u"&&(r.refetchOnReconnect=r.networkMode!=="always"),typeof r.useErrorBoundary>"u"&&(r.useErrorBoundary=!!r.suspense),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e==null?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class uS extends pd{constructor(e,r){super(),this.client=e,this.options=r,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),jP(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hC(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hC(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),oy(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const s=this.hasListeners();s&&UP(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(r),s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();s&&(this.currentQuery!==i||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e),n=this.createResult(r,e);return Cle(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),r}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...r}={}){return this.fetch({...r,meta:{refetchPage:e}})}fetchOptimistic(e){const r=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(e){var r;return this.executeFetch({...e,cancelRefetch:(r=e.cancelRefetch)!=null?r:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let r=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Ii)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),D0||this.currentResult.isStale||!cC(this.options.staleTime))return;const r=eL(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},r)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(D0||this.options.enabled===!1||!cC(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||ay.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,r){const n=this.currentQuery,i=this.options,s=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,c=e!==n,l=c?e.state:this.currentQueryInitialState,u=c?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:p,fetchStatus:v,status:b}=f,y=!1,m=!1,g;if(r._optimisticResults){const I=this.hasListeners(),B=!I&&jP(e,r),j=I&&UP(e,n,r,i);(B||j)&&(v=eb(e.options.networkMode)?"fetching":"paused",d||(b="loading")),r._optimisticResults==="isRestoring"&&(v="idle")}if(r.keepPreviousData&&!f.dataUpdatedAt&&u!=null&&u.isSuccess&&b!=="error")g=u.data,d=u.dataUpdatedAt,b=u.status,y=!0;else if(r.select&&typeof f.data<"u")if(s&&f.data===(o==null?void 0:o.data)&&r.select===this.selectFn)g=this.selectResult;else try{this.selectFn=r.select,g=r.select(f.data),g=uC(s==null?void 0:s.data,g,r),this.selectResult=g,this.selectError=null}catch(I){this.selectError=I}else g=f.data;if(typeof r.placeholderData<"u"&&typeof g>"u"&&b==="loading"){let I;if(s!=null&&s.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))I=s.data;else if(I=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof I<"u")try{I=r.select(I),this.selectError=null}catch(B){this.selectError=B}typeof I<"u"&&(b="success",g=uC(s==null?void 0:s.data,I,r),m=!0)}this.selectError&&(h=this.selectError,g=this.selectResult,p=Date.now(),b="error");const S=v==="fetching",P=b==="loading",T=b==="error";return{status:b,fetchStatus:v,isLoading:P,isSuccess:b==="success",isError:T,isInitialLoading:P&&S,data:g,dataUpdatedAt:d,error:h,errorUpdatedAt:p,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:S,isRefetching:S&&!P,isLoadingError:T&&f.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:m,isPreviousData:y,isRefetchError:T&&f.dataUpdatedAt!==0,isStale:fS(e,r),refetch:this.refetch,remove:this.remove}}updateResult(e){const r=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,oy(n,r))return;this.currentResult=n;const i={cache:!0},s=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const c=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(l=>{const u=l;return this.currentResult[u]!==r[u]&&c.has(u)})};(e==null?void 0:e.listeners)!==!1&&s()&&(i.listeners=!0),this.notify({...i,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const r=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const r={};e.type==="success"?r.onSuccess=!e.manual:e.type==="error"&&!Lv(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){mt.batch(()=>{if(e.onSuccess){var r,n,i,s;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(i=(s=this.options).onSettled)==null||i.call(s,this.currentResult.data,null)}else if(e.onError){var o,a,c,l;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(c=(l=this.options).onSettled)==null||c.call(l,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function xle(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function jP(t,e){return xle(t,e)||t.state.dataUpdatedAt>0&&hC(t,e,e.refetchOnMount)}function hC(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&fS(t,e)}return!1}function UP(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&fS(t,r)}function fS(t,e){return t.isStaleByTime(e.staleTime)}function Cle(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!oy(t.getCurrentResult(),e)}class Sle extends uS{constructor(e,r){super(e,r)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,r){super.setOptions({...e,behavior:fC()},r)}getOptimisticResult(e){return e.behavior=fC(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...r}={}){return this.fetch({...r,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,r){var n,i,s,o,a,c;const{state:l}=e,u=super.createResult(e,r),{isFetching:f,isRefetching:d}=u,h=f&&((n=l.fetchMeta)==null||(i=n.fetchMore)==null?void 0:i.direction)==="forward",p=f&&((s=l.fetchMeta)==null||(o=s.fetchMore)==null?void 0:o.direction)==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:wle(r,(a=l.data)==null?void 0:a.pages),hasPreviousPage:Ele(r,(c=l.data)==null?void 0:c.pages),isFetchingNextPage:h,isFetchingPreviousPage:p,isRefetching:d&&!h&&!p}}}let kle=class extends pd{constructor(e,r){super(),this.client=e,this.setOptions(r),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const n=this.options;this.options=this.client.defaultMutationOptions(e),oy(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(r=this.currentMutation)==null||r.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const r={listeners:!0};e.type==="success"?r.onSuccess=!0:e.type==="error"&&(r.onError=!0),this.notify(r)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,r){return this.mutateOptions=r,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:cL(),r={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=r}notify(e){mt.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,i,s;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(i=(s=this.mutateOptions).onSettled)==null||i.call(s,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,c,l;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(l=this.mutateOptions).onSettled)==null||c.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)})})}};function Ale(t){return{mutationKey:t.options.mutationKey,state:t.state}}function _le(t){return{state:t.state,queryKey:t.queryKey,queryHash:t.queryHash}}function Ple(t){return t.state.isPaused}function Tle(t){return t.state.status==="success"}function Ile(t,e={}){const r=[],n=[];if(e.dehydrateMutations!==!1){const i=e.shouldDehydrateMutation||Ple;t.getMutationCache().getAll().forEach(s=>{i(s)&&r.push(Ale(s))})}if(e.dehydrateQueries!==!1){const i=e.shouldDehydrateQuery||Tle;t.getQueryCache().getAll().forEach(s=>{i(s)&&n.push(_le(s))})}return{mutations:r,queries:n}}function Ole(t,e,r){if(typeof e!="object"||e===null)return;const n=t.getMutationCache(),i=t.getQueryCache(),s=e.mutations||[],o=e.queries||[];s.forEach(a=>{var c;n.build(t,{...r==null||(c=r.defaultOptions)==null?void 0:c.mutations,mutationKey:a.mutationKey},a.state)}),o.forEach(({queryKey:a,state:c,queryHash:l})=>{var u;const f=i.get(l);if(f){if(f.state.dataUpdatedAt"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ple:_le;oL.useSyncExternalStore=jf.useSyncExternalStore!==void 0?jf.useSyncExternalStore:Tle;sL.exports=oL;var dS=sL.exports;const aL=dS.useSyncExternalStore,FP=C.createContext(void 0),cL=C.createContext(!1);function lL(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=FP),window.ReactQueryClientContext):FP)}const tb=({context:t}={})=>{const e=C.useContext(lL(t,C.useContext(cL)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hS=({client:t,children:e,context:r,contextSharing:n=!1})=>{C.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const i=lL(r,n);return C.createElement(cL.Provider,{value:!r&&n},C.createElement(i.Provider,{value:t},e))},uL=C.createContext(!1),fL=()=>C.useContext(uL);uL.Provider;function Ile(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Ole=C.createContext(Ile()),dL=()=>C.useContext(Ole);function hL(t,e){return typeof t=="function"?t(...e):!!t}const Rle=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},$le=t=>{C.useEffect(()=>{t.clearReset()},[t])},Mle=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&hL(r,[t.error,n]),Nle=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},Dle=(t,e)=>t.isLoading&&t.isFetching&&!e,Lle=(t,e,r)=>(t==null?void 0:t.suspense)&&Dle(e,r),Ble=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function pL(t,e){const r=tb({context:t.context}),n=fL(),i=dL(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=vt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=vt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=vt.batchCalls(s.onSettled)),Nle(s),Rle(s,i),$le(i);const[o]=C.useState(()=>new e(r,s)),a=o.getOptimisticResult(s);if(aL(C.useCallback(c=>{const l=n?()=>{}:o.subscribe(vt.batchCalls(c));return o.updateResult(),l},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),C.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),Lle(s,a,n))throw Ble(s,o,i);if(Mle({result:a,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}function si(t,e,r){const n=Yu(t,e,r);return pL(n,uS)}function Fle(t,e,r){const n=YD(t,e,r),i=tb({context:n.context}),[s]=C.useState(()=>new ple(i,n));C.useEffect(()=>{s.setOptions(n)},[s,n]);const o=aL(C.useCallback(c=>s.subscribe(vt.batchCalls(c)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=C.useCallback((c,l)=>{s.mutate(c,l).catch(jle)},[s]);if(o.error&&hL(s.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function jle(){}function Ule(t,e,r){const n=Yu(t,e,r);return pL(n,hle)}const zle=["added","removed","updated"];function jP(t){return zle.includes(t)}async function Wle({queryClient:t,persister:e,maxAge:r=1e3*60*60*24,buster:n="",hydrateOptions:i}){try{const s=await e.restoreClient();if(s)if(s.timestamp){const o=Date.now()-s.timestamp>r,a=s.buster!==n;o||a?e.removeClient():wle(t,s.clientState,i)}else e.removeClient()}catch{e.removeClient()}}async function UP({queryClient:t,persister:e,buster:r="",dehydrateOptions:n}){const i={buster:r,timestamp:Date.now(),clientState:ble(t,n)};await e.persistClient(i)}function Hle(t){const e=t.queryClient.getQueryCache().subscribe(n=>{jP(n.type)&&UP(t)}),r=t.queryClient.getMutationCache().subscribe(n=>{jP(n.type)&&UP(t)});return()=>{e(),r()}}function qle(t){let e=!1,r;const n=()=>{e=!0,r==null||r()},i=Wle(t).then(()=>{e||(r=Hle(t))});return[n,i]}var vL={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||c,d),p=r?r+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)e.call(u,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=r?r+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);dt,rb=t=>t,Qle=()=>`viem@${Gle}`;class ce extends Error{constructor(e,r={}){var s;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:Qle()});const n=r.cause instanceof ce?r.cause.details:(s=r.cause)!=null&&s.message?r.cause.message:r.details,i=r.cause instanceof ce&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` -`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return yL(this,e)}}function yL(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?yL(t.cause,e):e?null:t}class vC extends ce{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class Yle extends ce{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class Jle extends ce{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class gL extends ce{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function bL({chain:t,currentChainId:e}){if(!t)throw new Jle;if(e!==t.id)throw new Yle({chain:t,currentChainId:e})}function pS(t,e={}){const{fees:r=t.fees,formatters:n=t.formatters,serializers:i=t.serializers}=e;return{...t,fees:r,formatters:n,serializers:i}}function vd({blockNumber:t,chain:e,contract:r}){var i;const n=(i=e==null?void 0:e.contracts)==null?void 0:i[r];if(!n)throw new vC({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new vC({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class Xle extends ce{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class Zle extends ce{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class eue extends ce{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function mo(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Lr(t){return mo(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function pf(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let i=0;ir*2)throw new EL({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function tue(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new EL({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;ie.toString(16).padStart(2,"0"));function ua(t,e={}){return typeof t=="number"||typeof t=="bigint"?ze(t,e):typeof t=="string"?vS(t,e):typeof t=="boolean"?xL(t,e):L0(t,e)}function xL(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(Mc(r,{size:e.size}),md(r,{size:e.size})):r}function L0(t,e={}){let r="";for(let i=0;is||ie)throw new eue({givenSize:Lr(t),maxSize:e})}function nb(t,e={}){const{signed:r}=e;e.size&&Mc(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<typeof n=="string"?n:SL(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,difficulty:t.difficulty?BigInt(t.difficulty):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}function Ss(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const lue={"0x0":"reverted","0x1":"success"};function uue(t){return{...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(e=>Ss(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Nn(t.transactionIndex):null,status:t.status?lue[t.status]:null,type:t.type?CL[t.type]||t.type:null}}const fue={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function ib(t){return{...t,gas:typeof t.gas<"u"?ze(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?ze(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?ze(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?ze(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?ze(t.nonce):void 0,type:typeof t.type<"u"?fue[t.type]:void 0,value:typeof t.value<"u"?ze(t.value):void 0}}class B0 extends ce{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const due={gwei:9,wei:18},hue={ether:-9,wei:9};function AL(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,s]=[r.slice(0,r.length-e),r.slice(r.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}function ei(t,e="wei"){return AL(t,hue[e])}class Ju extends ce{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(Ju,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Ju,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class ly extends ce{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ei(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(ly,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class mC extends ce{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ei(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(mC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class yC extends ce{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(yC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class gC extends ce{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(gC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class bC extends ce{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(bC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class wC extends ce{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` -`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(wC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class EC extends ce{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(EC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class xC extends ce{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(xC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class CC extends ce{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(CC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class uy extends ce{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ei(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ei(n)} gwei`:""}).`].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(uy,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class sb extends ce{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}const pue=/^0x[a-fA-F0-9]{40}$/;function Uf(t){return pue.test(t)}function Xo(t){return typeof t[0]=="string"?yS(t):vue(t)}function vue(t){let e=0;for(const i of t)e+=i.length;const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function yS(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function gS(t,e="wei"){return AL(t,due[e])}function D1(t){const e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(r+1)} ${i}`).join(` -`)}class mue extends ce{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class yue extends ce{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",D1(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class gue extends ce{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){const h=D1({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:r==null?void 0:r.address,to:f,value:typeof d<"u"&&`${gS(d)} ${(i==null?void 0:i.nativeCurrency.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ei(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ei(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ei(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class _L extends ce{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){let o="Transaction";n&&s!==void 0&&(o=`Transaction at block time "${n}" at index "${s}"`),e&&s!==void 0&&(o=`Transaction at block hash "${e}" at index "${s}"`),r&&s!==void 0&&(o=`Transaction at block number "${r}" at index "${s}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class PL extends ce{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class bue extends ce{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}function wue(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new yue({transaction:t})}const Eue=pS({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),xue=pS({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Cue=pS({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}});var Sue=Object.defineProperty,kue=(t,e,r)=>e in t?Sue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,st=(t,e,r)=>(kue(t,typeof e!="symbol"?e+"":e,r),r),bS=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Je=(t,e,r)=>(bS(t,e,"read from private field"),r?r.call(t):e.get(t)),Jr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$o=(t,e,r,n)=>(bS(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Or=(t,e,r)=>(bS(t,e,"access private method"),r),ob=class extends mL{constructor({chains:t=[xue,Eue],options:e}){super(),st(this,"chains"),st(this,"options"),st(this,"storage"),this.chains=t,this.options=e}getBlockExplorerUrls(t){const{default:e,...r}=t.blockExplorers??{};if(e)return[e.url,...Object.values(r).map(n=>n.url)]}isChainUnsupported(t){return!this.chains.some(e=>e.id===t)}setStorage(t){this.storage=t}},Aue=class extends Error{constructor({chainId:t,connectorId:e}){super(`Chain "${t}" not configured for connector "${e}".`),st(this,"name","ChainNotConfiguredForConnectorError")}},Ra=class extends Error{constructor(){super(...arguments),st(this,"name","ConnectorNotFoundError"),st(this,"message","Connector not found")}};function Fh(t){return typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}function Nc(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new Fue(t.type);return`${t.name}(${ab(t.inputs,{includeName:e})})`}function ab(t,{includeName:e=!1}={}){return t?t.map(r=>_ue(r,{includeName:e})).join(e?", ":","):""}function _ue(t,{includeName:e}){return t.type.startsWith("tuple")?`(${ab(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Pue extends ce{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` -`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class zP extends ce{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` + */var jf=C;function Rle(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var $le=typeof Object.is=="function"?Object.is:Rle,Mle=jf.useState,Nle=jf.useEffect,Dle=jf.useLayoutEffect,Lle=jf.useDebugValue;function Fle(t,e){var r=e(),n=Mle({inst:{value:r,getSnapshot:e}}),i=n[0].inst,s=n[1];return Dle(function(){i.value=r,i.getSnapshot=e,R2(i)&&s({inst:i})},[t,r,e]),Nle(function(){return R2(i)&&s({inst:i}),t(function(){R2(i)&&s({inst:i})})},[t]),Lle(r),r}function R2(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!$le(t,r)}catch{return!0}}function Ble(t,e){return e()}var jle=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ble:Fle;fL.useSyncExternalStore=jf.useSyncExternalStore!==void 0?jf.useSyncExternalStore:jle;uL.exports=fL;var dS=uL.exports;const dL=dS.useSyncExternalStore,zP=C.createContext(void 0),hL=C.createContext(!1);function pL(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=zP),window.ReactQueryClientContext):zP)}const tb=({context:t}={})=>{const e=C.useContext(pL(t,C.useContext(hL)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hS=({client:t,children:e,context:r,contextSharing:n=!1})=>{C.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const i=pL(r,n);return C.createElement(hL.Provider,{value:!r&&n},C.createElement(i.Provider,{value:t},e))},vL=C.createContext(!1),mL=()=>C.useContext(vL);vL.Provider;function Ule(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const zle=C.createContext(Ule()),yL=()=>C.useContext(zle);function gL(t,e){return typeof t=="function"?t(...e):!!t}const Wle=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},Hle=t=>{C.useEffect(()=>{t.clearReset()},[t])},qle=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&gL(r,[t.error,n]),Vle=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},Gle=(t,e)=>t.isLoading&&t.isFetching&&!e,Kle=(t,e,r)=>(t==null?void 0:t.suspense)&&Gle(e,r),Qle=(t,e,r)=>e.fetchOptimistic(t).then(({data:n})=>{t.onSuccess==null||t.onSuccess(n),t.onSettled==null||t.onSettled(n,null)}).catch(n=>{r.clearReset(),t.onError==null||t.onError(n),t.onSettled==null||t.onSettled(void 0,n)});function bL(t,e){const r=tb({context:t.context}),n=mL(),i=yL(),s=r.defaultQueryOptions(t);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=mt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=mt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=mt.batchCalls(s.onSettled)),Vle(s),Wle(s,i),Hle(i);const[o]=C.useState(()=>new e(r,s)),a=o.getOptimisticResult(s);if(dL(C.useCallback(c=>{const l=n?()=>{}:o.subscribe(mt.batchCalls(c));return o.updateResult(),l},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),C.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),Kle(s,a,n))throw Qle(s,o,i);if(qle({result:a,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}function si(t,e,r){const n=Yu(t,e,r);return bL(n,uS)}function Yle(t,e,r){const n=tL(t,e,r),i=tb({context:n.context}),[s]=C.useState(()=>new kle(i,n));C.useEffect(()=>{s.setOptions(n)},[s,n]);const o=dL(C.useCallback(c=>s.subscribe(mt.batchCalls(c)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=C.useCallback((c,l)=>{s.mutate(c,l).catch(Jle)},[s]);if(o.error&&gL(s.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function Jle(){}function Xle(t,e,r){const n=Yu(t,e,r);return bL(n,Sle)}const Zle=["added","removed","updated"];function WP(t){return Zle.includes(t)}async function eue({queryClient:t,persister:e,maxAge:r=1e3*60*60*24,buster:n="",hydrateOptions:i}){try{const s=await e.restoreClient();if(s)if(s.timestamp){const o=Date.now()-s.timestamp>r,a=s.buster!==n;o||a?e.removeClient():Ole(t,s.clientState,i)}else e.removeClient()}catch{e.removeClient()}}async function HP({queryClient:t,persister:e,buster:r="",dehydrateOptions:n}){const i={buster:r,timestamp:Date.now(),clientState:Ile(t,n)};await e.persistClient(i)}function tue(t){const e=t.queryClient.getQueryCache().subscribe(n=>{WP(n.type)&&HP(t)}),r=t.queryClient.getMutationCache().subscribe(n=>{WP(n.type)&&HP(t)});return()=>{e(),r()}}function rue(t){let e=!1,r;const n=()=>{e=!0,r==null||r()},i=eue(t).then(()=>{e||(r=tue(t))});return[n,i]}var wL={exports:{}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function s(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||c,d),p=r?r+l:l;return c._events[p]?c._events[p].fn?c._events[p]=[c._events[p],h]:c._events[p].push(h):(c._events[p]=h,c._eventsCount++),c}function o(c,l){--c._eventsCount===0?c._events=new n:delete c._events[l]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)e.call(u,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},a.prototype.listeners=function(l){var u=r?r+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);dt,rb=t=>t,oue=()=>`viem@${iue}`;class ce extends Error{constructor(e,r={}){var s;super(),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ViemError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:oue()});const n=r.cause instanceof ce?r.cause.details:(s=r.cause)!=null&&s.message?r.cause.message:r.details,i=r.cause instanceof ce&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: https://viem.sh${i}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` +`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=i,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return xL(this,e)}}function xL(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?xL(t.cause,e):e?null:t}class pC extends ce{constructor({blockNumber:e,chain:r,contract:n}){super(`Chain "${r.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDoesNotSupportContract"})}}class aue extends ce{constructor({chain:e,currentChainId:r}){super(`The current chain of the wallet (id: ${r}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${e.id} – ${e.name}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainMismatchError"})}}class cue extends ce{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotFoundError"})}}class CL extends ce{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function SL({chain:t,currentChainId:e}){if(!t)throw new cue;if(e!==t.id)throw new aue({chain:t,currentChainId:e})}function pS(t,e={}){const{fees:r=t.fees,formatters:n=t.formatters,serializers:i=t.serializers}=e;return{...t,fees:r,formatters:n,serializers:i}}function vd({blockNumber:t,chain:e,contract:r}){var i;const n=(i=e==null?void 0:e.contracts)==null?void 0:i[r];if(!n)throw new pC({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new pC({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class lue extends ce{constructor({max:e,min:r,signed:n,size:i,value:s}){super(`Number "${s}" is not in safe ${i?`${i*8}-bit ${n?"signed":"unsigned"} `:""}integer range ${e?`(${r} to ${e})`:`(above ${r})`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntegerOutOfRangeError"})}}class uue extends ce{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidHexBooleanError"})}}class fue extends ce{constructor({givenSize:e,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${e} bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SizeOverflowError"})}}function mo(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Lr(t){return mo(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function pf(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let i=0;ir*2)throw new AL({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function due(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new AL({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let i=0;ie.toString(16).padStart(2,"0"));function ua(t,e={}){return typeof t=="number"||typeof t=="bigint"?ze(t,e):typeof t=="string"?vS(t,e):typeof t=="boolean"?_L(t,e):L0(t,e)}function _L(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(Mc(r,{size:e.size}),md(r,{size:e.size})):r}function L0(t,e={}){let r="";for(let i=0;is||ie)throw new fue({givenSize:Lr(t),maxSize:e})}function nb(t,e={}){const{signed:r}=e;e.size&&Mc(t,{size:e.size});const n=BigInt(t);if(!r)return n;const i=(t.length-2)/2,s=(1n<typeof n=="string"?n:TL(n));return{...t,baseFeePerGas:t.baseFeePerGas?BigInt(t.baseFeePerGas):null,difficulty:t.difficulty?BigInt(t.difficulty):void 0,gasLimit:t.gasLimit?BigInt(t.gasLimit):void 0,gasUsed:t.gasUsed?BigInt(t.gasUsed):void 0,hash:t.hash?t.hash:null,logsBloom:t.logsBloom?t.logsBloom:null,nonce:t.nonce?t.nonce:null,number:t.number?BigInt(t.number):null,size:t.size?BigInt(t.size):void 0,timestamp:t.timestamp?BigInt(t.timestamp):void 0,transactions:e,totalDifficulty:t.totalDifficulty?BigInt(t.totalDifficulty):null}}function Cs(t,{args:e,eventName:r}={}){return{...t,blockHash:t.blockHash?t.blockHash:null,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,logIndex:t.logIndex?Number(t.logIndex):null,transactionHash:t.transactionHash?t.transactionHash:null,transactionIndex:t.transactionIndex?Number(t.transactionIndex):null,...r?{args:e,eventName:r}:{}}}const wue={"0x0":"reverted","0x1":"success"};function Eue(t){return{...t,blockNumber:t.blockNumber?BigInt(t.blockNumber):null,contractAddress:t.contractAddress?t.contractAddress:null,cumulativeGasUsed:t.cumulativeGasUsed?BigInt(t.cumulativeGasUsed):null,effectiveGasPrice:t.effectiveGasPrice?BigInt(t.effectiveGasPrice):null,gasUsed:t.gasUsed?BigInt(t.gasUsed):null,logs:t.logs?t.logs.map(e=>Cs(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Nn(t.transactionIndex):null,status:t.status?wue[t.status]:null,type:t.type?PL[t.type]||t.type:null}}const xue={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function ib(t){return{...t,gas:typeof t.gas<"u"?ze(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?ze(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?ze(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?ze(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?ze(t.nonce):void 0,type:typeof t.type<"u"?xue[t.type]:void 0,value:typeof t.value<"u"?ze(t.value):void 0}}class F0 extends ce{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Cue={gwei:9,wei:18},Sue={ether:-9,wei:9};function OL(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[i,s]=[r.slice(0,r.length-e),r.slice(r.length-e)];return s=s.replace(/(0+)$/,""),`${n?"-":""}${i||"0"}${s?`.${s}`:""}`}function ei(t,e="wei"){return OL(t,Sue[e])}class Ju extends ce{constructor({cause:e,message:r}={}){var i;const n=(i=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:i.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ExecutionRevertedError"})}}Object.defineProperty(Ju,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Ju,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class ly extends ce{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ei(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooHigh"})}}Object.defineProperty(ly,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class vC extends ce{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ei(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeCapTooLow"})}}Object.defineProperty(vC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class mC extends ce{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooHighError"})}}Object.defineProperty(mC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class yC extends ce{constructor({cause:e,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(` +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceTooLowError"})}}Object.defineProperty(yC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class gC extends ce{constructor({cause:e,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"NonceMaxValueError"})}}Object.defineProperty(gC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class bC extends ce{constructor({cause:e}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(` +`),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InsufficientFundsError"})}}Object.defineProperty(bC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class wC extends ce{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooHighError"})}}Object.defineProperty(wC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class EC extends ce{constructor({cause:e,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"IntrinsicGasTooLowError"})}}Object.defineProperty(EC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class xC extends ce{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionTypeNotSupportedError"})}}Object.defineProperty(xC,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class uy extends ce{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ei(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ei(n)} gwei`:""}).`].join(` +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(uy,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class sb extends ce{constructor({cause:e}){super(`An error occurred while executing: ${e==null?void 0:e.shortMessage}`,{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownNodeError"})}}const kue=/^0x[a-fA-F0-9]{40}$/;function Uf(t){return kue.test(t)}function Xo(t){return typeof t[0]=="string"?yS(t):Aue(t)}function Aue(t){let e=0;for(const i of t)e+=i.length;const r=new Uint8Array(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return r}function yS(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function gS(t,e="wei"){return OL(t,Cue[e])}function D1(t){const e=Object.entries(t).map(([n,i])=>i===void 0||i===!1?null:[n,i]).filter(Boolean),r=e.reduce((n,[i])=>Math.max(n,i.length),0);return e.map(([n,i])=>` ${`${n}:`.padEnd(r+1)} ${i}`).join(` +`)}class _ue extends ce{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FeeConflictError"})}}class Pue extends ce{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",D1(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- a Legacy Transaction with `gasPrice`"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSerializableTransactionError"})}}class Tue extends ce{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){const h=D1({chain:i&&`${i==null?void 0:i.name} (id: ${i==null?void 0:i.id})`,from:r==null?void 0:r.address,to:f,value:typeof d<"u"&&`${gS(d)} ${(i==null?void 0:i.nativeCurrency.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ei(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ei(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ei(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionExecutionError"}),this.cause=e}}class RL extends ce{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){let o="Transaction";n&&s!==void 0&&(o=`Transaction at block time "${n}" at index "${s}"`),e&&s!==void 0&&(o=`Transaction at block hash "${e}" at index "${s}"`),r&&s!==void 0&&(o=`Transaction at block number "${r}" at index "${s}"`),i&&(o=`Transaction with hash "${i}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class $L extends ce{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionReceiptNotFoundError"})}}class Iue extends ce{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WaitForTransactionReceiptTimeoutError"})}}function Oue(t){if(t.type)return t.type;if(typeof t.maxFeePerGas<"u"||typeof t.maxPriorityFeePerGas<"u")return"eip1559";if(typeof t.gasPrice<"u")return typeof t.accessList<"u"?"eip2930":"legacy";throw new Pue({transaction:t})}const Rue=pS({id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0x56522D00C410a43BFfDF00a9A569489297385790",blockCreated:8765204},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0}),$ue=pS({id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Mue=pS({id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}});var Nue=Object.defineProperty,Due=(t,e,r)=>e in t?Nue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,st=(t,e,r)=>(Due(t,typeof e!="symbol"?e+"":e,r),r),bS=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Je=(t,e,r)=>(bS(t,e,"read from private field"),r?r.call(t):e.get(t)),Jr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$o=(t,e,r,n)=>(bS(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Or=(t,e,r)=>(bS(t,e,"access private method"),r),ob=class extends EL{constructor({chains:t=[$ue,Rue],options:e}){super(),st(this,"chains"),st(this,"options"),st(this,"storage"),this.chains=t,this.options=e}getBlockExplorerUrls(t){const{default:e,...r}=t.blockExplorers??{};if(e)return[e.url,...Object.values(r).map(n=>n.url)]}isChainUnsupported(t){return!this.chains.some(e=>e.id===t)}setStorage(t){this.storage=t}},Lue=class extends Error{constructor({chainId:t,connectorId:e}){super(`Chain "${t}" not configured for connector "${e}".`),st(this,"name","ChainNotConfiguredForConnectorError")}},Ra=class extends Error{constructor(){super(...arguments),st(this,"name","ConnectorNotFoundError"),st(this,"message","Connector not found")}};function Bh(t){return typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}function Nc(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new Yue(t.type);return`${t.name}(${ab(t.inputs,{includeName:e})})`}function ab(t,{includeName:e=!1}={}){return t?t.map(r=>Fue(r,{includeName:e})).join(e?", ":","):""}function Fue(t,{includeName:e}){return t.type.startsWith("tuple")?`(${ab(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Bue extends ce{constructor({docsPath:e}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(` +`),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorNotFoundError"})}}class qP extends ce{constructor({docsPath:e}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(` `),{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiConstructorParamsNotFoundError"})}}class wS extends ce{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` -`),{metaMessages:[`Params: (${ab(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class cb extends ce{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class Tue extends ce{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class Iue extends ce{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Lr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class Oue extends ce{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class TL extends ce{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class Rue extends ce{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class $ue extends ce{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class WP extends ce{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` +`),{metaMessages:[`Params: (${ab(r,{includeName:!0})})`,`Data: ${e} (${n} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=r,this.size=n}}class cb extends ce{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class jue extends ce{constructor({expectedLength:e,givenLength:r,type:n}){super([`ABI encoding array length mismatch for type ${n}.`,`Expected length: ${e}`,`Given length: ${r}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingArrayLengthMismatchError"})}}class Uue extends ce{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Lr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class zue extends ce{constructor({expectedLength:e,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${e}`,`Given length (values): ${r}`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingLengthMismatchError"})}}class ML extends ce{constructor(e,{docsPath:r}){super([`Encoded error signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class Wue extends ce{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureEmptyTopicsError"})}}class Hue extends ce{constructor(e,{docsPath:r}){super([`Encoded event signature "${e}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventSignatureNotFoundError"})}}class VP extends ce{constructor(e,{docsPath:r}={}){super([`Event ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(` `),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEventNotFoundError"})}}class fy extends ce{constructor(e,{docsPath:r}={}){super([`Function ${e?`"${e}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class Mue extends ce{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class Nue extends ce{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class Ul extends ce{constructor({abiItem:e,data:r,params:n,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionNotFoundError"})}}class que extends ce{constructor(e,{docsPath:r}){super([`Function "${e}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiFunctionOutputsNotFoundError"})}}class Vue extends ce{constructor({expectedSize:e,givenSize:r}){super(`Expected bytes${e}, got bytes${r}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BytesSizeMismatchError"})}}class Ul extends ce{constructor({abiItem:e,data:r,params:n,size:i}){super([`Data size of ${i} bytes is too small for non-indexed event parameters.`].join(` `),{metaMessages:[`Params: (${ab(n,{includeName:!0})})`,`Data: ${r} (${i} bytes)`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=r,this.params=n,this.size=i}}class yd extends ce{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${Nc(e,{includeName:!0})}".`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class Due extends ce{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class Lue extends ce{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` -`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class Bue extends ce{constructor(e){super([`Value "${e}" is not a valid array.`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class Fue extends ce{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class jue extends ce{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const Uue=/((function|event)\s)?(.*)(\((.*)\))/;function IL(t){const e=t.match(Uue),r=(e==null?void 0:e[2])||void 0,n=e==null?void 0:e[3],i=(e==null?void 0:e[5])||void 0;return{type:r,name:n,params:i}}function zue(t){return IL(t).name}function Wue(t){const e=IL(t).params,r=e==null?void 0:e.split(",").map(n=>n.trim().split(" "));return r==null?void 0:r.map(n=>({type:n[0],name:n[1]==="indexed"?n[2]:n[1],...n[1]==="indexed"?{indexed:!0}:{}}))}function HP(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function OL(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function qP(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Hue(t,e){OL(t);const r=e.outputLen;if(t.length>VP&Kp)}:{h:Number(t>>VP&Kp)|0,l:Number(t&Kp)|0}}function Vue(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;it<>>32-r,Kue=(t,e,r)=>e<>>32-r,Que=(t,e,r)=>e<>>64-r,Yue=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Jue=t=>t instanceof Uint8Array,Xue=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Zue=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Zue)throw new Error("Non little-endian hardware is not supported");function efe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function RL(t){if(typeof t=="string"&&(t=efe(t)),!Jue(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class tfe{clone(){return this._cloneInto()}}function rfe(t){const e=n=>t().update(RL(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[$L,ML,NL]=[[],[],[]],nfe=BigInt(0),Jd=BigInt(1),ife=BigInt(2),sfe=BigInt(7),ofe=BigInt(256),afe=BigInt(113);for(let t=0,e=Jd,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],$L.push(2*(5*n+r)),ML.push((t+1)*(t+2)/2%64);let i=nfe;for(let s=0;s<7;s++)e=(e<>sfe)*afe)%ofe,e&ife&&(i^=Jd<<(Jd<r>32?Que(t,e,r):Gue(t,e,r),KP=(t,e,r)=>r>32?Yue(t,e,r):Kue(t,e,r);function ufe(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=GP(l,u,1)^r[a],d=KP(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=ML[o],c=GP(i,s,a),l=KP(i,s,a),u=$L[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=cfe[n],t[1]^=lfe[n]}r.fill(0)}class ES extends tfe{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,HP(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Xue(this.state)}keccak(){ufe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){qP(this);const{blockLen:r,state:n}=this;e=RL(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return HP(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Hue(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new ES(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const ffe=(t,e,r)=>rfe(()=>new ES(e,t,r)),dfe=ffe(1,136,256/8);function Qn(t,e){const r=e||"hex",n=dfe(mo(t,{strict:!1})?jl(t):t);return r==="bytes"?n:ua(n)}const DL=t=>Qn(jl(t));function LL(t){const e=zue(t),r=Wue(t)||[];return DL(`${e}(${r.map(({type:n})=>n).join(",")})`)}function BL(t){return DL(Nc(t))}const xS=t=>typeof t=="string"?LL(t):BL(t);function Er(t,e,r,{strict:n}={}){return mo(t,{strict:!1})?pfe(t,e,r,{strict:n}):hfe(t,e,r,{strict:n})}function FL(t,e){if(typeof e=="number"&&e>0&&e>Lr(t)-1)throw new wL({offset:e,position:"start",size:Lr(t)})}function jL(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Lr(t)!==r-e)throw new wL({offset:r,position:"end",size:Lr(t)})}function hfe(t,e,r,{strict:n}={}){FL(t,e);const i=t.slice(e,r);return n&&jL(i,e,r),i}function pfe(t,e,r,{strict:n}={}){FL(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&jL(i,e,r),i}function L1(t,e){if(t.length!==e.length)throw new Oue({expectedLength:t.length,givenLength:e.length});const r=vfe({params:t,values:e}),n=SS(r);return n.length===0?"0x":n}function vfe({params:t,values:e}){const r=[];for(let n=0;n0?Xo([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Xo(s.map(({encoded:o})=>o))}}function gfe(t,{param:e}){const[,r]=e.type.split("bytes"),n=Lr(t);if(!r){let i=t;return n%32!==0&&(i=rc(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Xo([rc(ze(n,{size:32})),i])}}if(n!==parseInt(r))throw new Iue({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:rc(t,{dir:"right"})}}function bfe(t){return{dynamic:!1,encoded:rc(xL(t))}}function wfe(t,{signed:e}){return{dynamic:!1,encoded:ze(t,{size:32,signed:e})}}function Efe(t){const e=vS(t),r=Math.ceil(Lr(e)/32),n=[];for(let i=0;ii))}}function lb(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const kS=t=>Er(typeof t=="string"?LL(t):BL(t),0,4);function B1({abi:t,args:e=[],name:r}){const n=mo(r,{strict:!1}),i=t.filter(s=>n?s.type==="function"?kS(s)===r:s.type==="event"?xS(s)===r:!1:"name"in s&&s.name===r);if(i.length!==0){if(i.length===1)return i[0];for(const s of i){if(!("inputs"in s))continue;if(!e||e.length===0){if(!s.inputs||s.inputs.length===0)return s;continue}if(!s.inputs||s.inputs.length===0||s.inputs.length!==e.length)continue;if(e.every((a,c)=>{const l="inputs"in s&&s.inputs[c];return l?SC(a,l):!1}))return s}return i[0]}}function SC(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Uf(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>SC(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>SC(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function F1({abi:t,eventName:e,args:r}){var a;let n=t[0];if(e&&(n=B1({abi:t,args:r,name:e}),!n))throw new WP(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new WP(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=Nc(n),s=xS(i);let o=[];if(r&&"inputs"in n){const c=(a=n.inputs)==null?void 0:a.filter(u=>"indexed"in u&&u.indexed),l=Array.isArray(r)?r:Object.values(r).length>0?(c==null?void 0:c.map(u=>r[u.name]))??[]:[];l.length>0&&(o=(c==null?void 0:c.map((u,f)=>Array.isArray(l[f])?l[f].map((d,h)=>QP({param:u,value:l[f][h]})):l[f]?QP({param:u,value:l[f]}):null))??[])}return[s,...o]}function QP({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return Qn(jl(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new jue(t.type);return L1([t],[e])}function ub(t,{method:e}){var n,i;const r={};return t.transport.type==="fallback"&&((i=(n=t.transport).onResponse)==null||i.call(n,({method:s,response:o,status:a,transport:c})=>{a==="success"&&e===s&&(r[o]=c.request)})),s=>r[s]||t.request}async function UL(t,{address:e,abi:r,args:n,eventName:i,fromBlock:s,strict:o,toBlock:a}){const c=ub(t,{method:"eth_newFilter"}),l=i?F1({abi:r,args:n,eventName:i}):void 0,u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?ze(s):s,toBlock:typeof a=="bigint"?ze(a):a,topics:l}]});return{abi:r,args:n,eventName:i,id:u,request:c(u),strict:o,type:"event"}}function Yi(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function Dc({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=B1({abi:t,args:e,name:r}),!n))throw new fy(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new fy(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const i=Nc(n),s=kS(i),o="inputs"in n&&n.inputs?L1(n.inputs,e??[]):void 0;return yS([s,o??"0x"])}const zL={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Cfe={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Sfe={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function AS(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=Qn(Lo(r),"bytes"),i=(e?r.substring(`${e}0x`.length):r).split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(n[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());return`0x${i.join("")}`}function Li(t,e){if(!Uf(t))throw new B0({address:t});return AS(t,e)}function fb(t,e){if(e==="0x"&&t.length>0)throw new cb;if(Lr(e)&&Lr(e)<32)throw new wS({data:e,params:t,size:Lr(e)});return kfe({data:e,params:t})}function kfe({data:t,params:e}){const r=[];let n=0;for(let i=0;i=Lr(t))throw new wS({data:t,params:e,size:Lr(t)});const s=e[i],{consumed:o,value:a}=vf({data:t,param:s,position:n});r.push(a),n+=o}return r}function vf({data:t,param:e,position:r}){const n=lb(e.type);if(n){const[s,o]=n;return _fe(t,{length:s,param:{...e,type:o},position:r})}if(e.type==="tuple")return Rfe(t,{param:e,position:r});if(e.type==="string")return Ofe(t,{position:r});if(e.type.startsWith("bytes"))return Tfe(t,{param:e,position:r});const i=Er(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Ife(i,{param:e});if(e.type==="address")return Afe(i);if(e.type==="bool")return Pfe(i);throw new Lue(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function Afe(t){return{consumed:32,value:AS(Er(t,-20))}}function _fe(t,{param:e,length:r,position:n}){if(!r){const o=Nn(Er(t,n,n+32,{strict:!0})),a=Nn(Er(t,o,o+32,{strict:!0}));let c=0;const l=[];for(let u=0;u48?nb(t,{signed:r}):Nn(t,{signed:r})}}function Ofe(t,{position:e}){const r=Nn(Er(t,e,e+32,{strict:!0})),n=Nn(Er(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:cue(pf(Er(t,r+32,r+32+n,{strict:!0})))}}function Rfe(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),i=n?[]:{};let s=0;if(dy(e)){const o=Nn(Er(t,r,r+32,{strict:!0}));for(let a=0;as.type==="error"&&r===kS(Nc(s)));if(!i)throw new TL(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?fb(i.inputs,Er(e,4)):void 0,errorName:i.name}}const Dn=(t,e,r)=>JSON.stringify(t,(n,i)=>{const s=typeof i=="bigint"?i.toString():i;return typeof e=="function"?e(n,s):s},r);function WL({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,s)=>`${n&&i.name?`${i.name}: `:""}${typeof e[s]=="object"?Dn(e[s]):e[s]}`).join(", ")})`}class HL extends ce{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){const h=r?Yi(r):void 0,p=D1({from:h==null?void 0:h.address,to:f,value:typeof d<"u"&&`${gS(d)} ${(i==null?void 0:i.nativeCurrency.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ei(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ei(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ei(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class Mfe extends ce{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:s,functionName:o,sender:a}){const c=B1({abi:r,args:n,name:o}),l=c?WL({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,u=c?Nc(c,{includeName:!0}):void 0,f=D1({address:i&&Kle(i),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",f].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}}class kC extends ce{constructor({abi:e,data:r,functionName:n,message:i}){let s,o,a,c;if(r&&r!=="0x")try{o=$fe({abi:e,data:r});const{abiItem:u,errorName:f,args:d}=o;if(f==="Error")c=d[0];else if(f==="Panic"){const[h]=d;c=zL[h]}else{const h=u?Nc(u,{includeName:!0}):void 0,p=u&&d?WL({abiItem:u,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",p&&p!=="()"?` ${[...Array((f==null?void 0:f.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(u){s=u}else i&&(c=i);let l;s instanceof TL&&(l=s.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(` -`):`The contract function "${n}" reverted.`,{cause:s,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=c,this.signature=l}}class Nfe extends ce{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class _S extends ce{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}class jh extends ce{constructor({body:e,details:r,headers:n,status:i,url:s}){super("HTTP request failed.",{details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${rb(s)}`,e&&`Request body: ${Dn(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=s}}class Dfe extends ce{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${rb(n)}`,`Request body: ${Dn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class PS extends ce{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${rb(n)}`,`Request body: ${Dn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class AC extends ce{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${rb(r)}`,`Request body: ${Dn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const Lfe=-1;class oi extends ce{constructor(e,{code:r,docsPath:n,metaMessages:i,shortMessage:s}){super(s,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof PS?e.code:r??Lfe}}class gd extends oi{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class F0 extends oi{constructor(e){super(e,{code:F0.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(F0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class j0 extends oi{constructor(e){super(e,{code:j0.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(j0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class U0 extends oi{constructor(e){super(e,{code:U0.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(U0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class z0 extends oi{constructor(e){super(e,{code:z0.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class Gue extends ce{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiEncodingType"})}}class Kue extends ce{constructor(e,{docsPath:r}){super([`Type "${e}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(` +`),{docsPath:r}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiDecodingType"})}}class Que extends ce{constructor(e){super([`Value "${e}" is not a valid array.`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class Yue extends ce{constructor(e){super([`"${e}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidDefinitionTypeError"})}}class Jue extends ce{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const Xue=/((function|event)\s)?(.*)(\((.*)\))/;function NL(t){const e=t.match(Xue),r=(e==null?void 0:e[2])||void 0,n=e==null?void 0:e[3],i=(e==null?void 0:e[5])||void 0;return{type:r,name:n,params:i}}function Zue(t){return NL(t).name}function efe(t){const e=NL(t).params,r=e==null?void 0:e.split(",").map(n=>n.trim().split(" "));return r==null?void 0:r.map(n=>({type:n[0],name:n[1]==="indexed"?n[2]:n[1],...n[1]==="indexed"?{indexed:!0}:{}}))}function GP(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function DL(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function KP(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function tfe(t,e){DL(t);const r=e.outputLen;if(t.length>QP&Kp)}:{h:Number(t>>QP&Kp)|0,l:Number(t&Kp)|0}}function nfe(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;it<>>32-r,sfe=(t,e,r)=>e<>>32-r,ofe=(t,e,r)=>e<>>64-r,afe=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cfe=t=>t instanceof Uint8Array,lfe=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),ufe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ufe)throw new Error("Non little-endian hardware is not supported");function ffe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function LL(t){if(typeof t=="string"&&(t=ffe(t)),!cfe(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class dfe{clone(){return this._cloneInto()}}function hfe(t){const e=n=>t().update(LL(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[FL,BL,jL]=[[],[],[]],pfe=BigInt(0),Jd=BigInt(1),vfe=BigInt(2),mfe=BigInt(7),yfe=BigInt(256),gfe=BigInt(113);for(let t=0,e=Jd,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],FL.push(2*(5*n+r)),BL.push((t+1)*(t+2)/2%64);let i=pfe;for(let s=0;s<7;s++)e=(e<>mfe)*gfe)%yfe,e&vfe&&(i^=Jd<<(Jd<r>32?ofe(t,e,r):ife(t,e,r),JP=(t,e,r)=>r>32?afe(t,e,r):sfe(t,e,r);function Efe(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],f=YP(l,u,1)^r[a],d=JP(l,u,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=f,t[o+h+1]^=d}let i=t[2],s=t[3];for(let o=0;o<24;o++){const a=BL[o],c=YP(i,s,a),l=JP(i,s,a),u=FL[o];i=t[u],s=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=bfe[n],t[1]^=wfe[n]}r.fill(0)}class ES extends dfe{constructor(e,r,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,GP(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=lfe(this.state)}keccak(){Efe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){KP(this);const{blockLen:r,state:n}=this;e=LL(e);const i=e.length;for(let s=0;s=n&&this.keccak();const o=Math.min(n-this.posOut,s-i);e.set(r.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return GP(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(tfe(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new ES(r,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}const xfe=(t,e,r)=>hfe(()=>new ES(e,t,r)),Cfe=xfe(1,136,256/8);function Qn(t,e){const r=e||"hex",n=Cfe(mo(t,{strict:!1})?jl(t):t);return r==="bytes"?n:ua(n)}const UL=t=>Qn(jl(t));function zL(t){const e=Zue(t),r=efe(t)||[];return UL(`${e}(${r.map(({type:n})=>n).join(",")})`)}function WL(t){return UL(Nc(t))}const xS=t=>typeof t=="string"?zL(t):WL(t);function Er(t,e,r,{strict:n}={}){return mo(t,{strict:!1})?kfe(t,e,r,{strict:n}):Sfe(t,e,r,{strict:n})}function HL(t,e){if(typeof e=="number"&&e>0&&e>Lr(t)-1)throw new kL({offset:e,position:"start",size:Lr(t)})}function qL(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Lr(t)!==r-e)throw new kL({offset:r,position:"end",size:Lr(t)})}function Sfe(t,e,r,{strict:n}={}){HL(t,e);const i=t.slice(e,r);return n&&qL(i,e,r),i}function kfe(t,e,r,{strict:n}={}){HL(t,e);const i=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&qL(i,e,r),i}function L1(t,e){if(t.length!==e.length)throw new zue({expectedLength:t.length,givenLength:e.length});const r=Afe({params:t,values:e}),n=SS(r);return n.length===0?"0x":n}function Afe({params:t,values:e}){const r=[];for(let n=0;n0?Xo([a,o]):a}}if(i)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:Xo(s.map(({encoded:o})=>o))}}function Tfe(t,{param:e}){const[,r]=e.type.split("bytes"),n=Lr(t);if(!r){let i=t;return n%32!==0&&(i=rc(i,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:Xo([rc(ze(n,{size:32})),i])}}if(n!==parseInt(r))throw new Uue({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:rc(t,{dir:"right"})}}function Ife(t){return{dynamic:!1,encoded:rc(_L(t))}}function Ofe(t,{signed:e}){return{dynamic:!1,encoded:ze(t,{size:32,signed:e})}}function Rfe(t){const e=vS(t),r=Math.ceil(Lr(e)/32),n=[];for(let i=0;ii))}}function lb(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const kS=t=>Er(typeof t=="string"?zL(t):WL(t),0,4);function F1({abi:t,args:e=[],name:r}){const n=mo(r,{strict:!1}),i=t.filter(s=>n?s.type==="function"?kS(s)===r:s.type==="event"?xS(s)===r:!1:"name"in s&&s.name===r);if(i.length!==0){if(i.length===1)return i[0];for(const s of i){if(!("inputs"in s))continue;if(!e||e.length===0){if(!s.inputs||s.inputs.length===0)return s;continue}if(!s.inputs||s.inputs.length===0||s.inputs.length!==e.length)continue;if(e.every((a,c)=>{const l="inputs"in s&&s.inputs[c];return l?CC(a,l):!1}))return s}return i[0]}}function CC(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Uf(t);case"bool":return r==="boolean";case"function":return r==="string";case"string":return r==="string";default:return n==="tuple"&&"components"in e?Object.values(e.components).every((i,s)=>CC(Object.values(t)[s],i)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n)?r==="string"||t instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n)?Array.isArray(t)&&t.every(i=>CC(i,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function B1({abi:t,eventName:e,args:r}){var a;let n=t[0];if(e&&(n=F1({abi:t,args:r,name:e}),!n))throw new VP(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new VP(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const i=Nc(n),s=xS(i);let o=[];if(r&&"inputs"in n){const c=(a=n.inputs)==null?void 0:a.filter(u=>"indexed"in u&&u.indexed),l=Array.isArray(r)?r:Object.values(r).length>0?(c==null?void 0:c.map(u=>r[u.name]))??[]:[];l.length>0&&(o=(c==null?void 0:c.map((u,f)=>Array.isArray(l[f])?l[f].map((d,h)=>XP({param:u,value:l[f][h]})):l[f]?XP({param:u,value:l[f]}):null))??[])}return[s,...o]}function XP({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return Qn(jl(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new Jue(t.type);return L1([t],[e])}function ub(t,{method:e}){var n,i;const r={};return t.transport.type==="fallback"&&((i=(n=t.transport).onResponse)==null||i.call(n,({method:s,response:o,status:a,transport:c})=>{a==="success"&&e===s&&(r[o]=c.request)})),s=>r[s]||t.request}async function VL(t,{address:e,abi:r,args:n,eventName:i,fromBlock:s,strict:o,toBlock:a}){const c=ub(t,{method:"eth_newFilter"}),l=i?B1({abi:r,args:n,eventName:i}):void 0,u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?ze(s):s,toBlock:typeof a=="bigint"?ze(a):a,topics:l}]});return{abi:r,args:n,eventName:i,id:u,request:c(u),strict:o,type:"event"}}function Qi(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function Dc({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=F1({abi:t,args:e,name:r}),!n))throw new fy(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new fy(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const i=Nc(n),s=kS(i),o="inputs"in n&&n.inputs?L1(n.inputs,e??[]):void 0;return yS([s,o??"0x"])}const GL={1:"An `assert` condition failed.",17:"Arithmic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Mfe={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Nfe={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function AS(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=Qn(Lo(r),"bytes"),i=(e?r.substring(`${e}0x`.length):r).split("");for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&i[s]&&(i[s]=i[s].toUpperCase()),(n[s>>1]&15)>=8&&i[s+1]&&(i[s+1]=i[s+1].toUpperCase());return`0x${i.join("")}`}function Li(t,e){if(!Uf(t))throw new F0({address:t});return AS(t,e)}function fb(t,e){if(e==="0x"&&t.length>0)throw new cb;if(Lr(e)&&Lr(e)<32)throw new wS({data:e,params:t,size:Lr(e)});return Dfe({data:e,params:t})}function Dfe({data:t,params:e}){const r=[];let n=0;for(let i=0;i=Lr(t))throw new wS({data:t,params:e,size:Lr(t)});const s=e[i],{consumed:o,value:a}=vf({data:t,param:s,position:n});r.push(a),n+=o}return r}function vf({data:t,param:e,position:r}){const n=lb(e.type);if(n){const[s,o]=n;return Ffe(t,{length:s,param:{...e,type:o},position:r})}if(e.type==="tuple")return Wfe(t,{param:e,position:r});if(e.type==="string")return zfe(t,{position:r});if(e.type.startsWith("bytes"))return jfe(t,{param:e,position:r});const i=Er(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Ufe(i,{param:e});if(e.type==="address")return Lfe(i);if(e.type==="bool")return Bfe(i);throw new Kue(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function Lfe(t){return{consumed:32,value:AS(Er(t,-20))}}function Ffe(t,{param:e,length:r,position:n}){if(!r){const o=Nn(Er(t,n,n+32,{strict:!0})),a=Nn(Er(t,o,o+32,{strict:!0}));let c=0;const l=[];for(let u=0;u48?nb(t,{signed:r}):Nn(t,{signed:r})}}function zfe(t,{position:e}){const r=Nn(Er(t,e,e+32,{strict:!0})),n=Nn(Er(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:bue(pf(Er(t,r+32,r+32+n,{strict:!0})))}}function Wfe(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),i=n?[]:{};let s=0;if(dy(e)){const o=Nn(Er(t,r,r+32,{strict:!0}));for(let a=0;as.type==="error"&&r===kS(Nc(s)));if(!i)throw new ML(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?fb(i.inputs,Er(e,4)):void 0,errorName:i.name}}const Dn=(t,e,r)=>JSON.stringify(t,(n,i)=>{const s=typeof i=="bigint"?i.toString():i;return typeof e=="function"?e(n,s):s},r);function KL({abiItem:t,args:e,includeFunctionName:r=!0,includeName:n=!1}){if("name"in t&&"inputs"in t&&t.inputs)return`${r?t.name:""}(${t.inputs.map((i,s)=>`${n&&i.name?`${i.name}: `:""}${typeof e[s]=="object"?Dn(e[s]):e[s]}`).join(", ")})`}class QL extends ce{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){const h=r?Qi(r):void 0,p=D1({from:h==null?void 0:h.address,to:f,value:typeof d<"u"&&`${gS(d)} ${(i==null?void 0:i.nativeCurrency.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ei(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ei(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ei(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",p].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CallExecutionError"}),this.cause=e}}class qfe extends ce{constructor(e,{abi:r,args:n,contractAddress:i,docsPath:s,functionName:o,sender:a}){const c=F1({abi:r,args:n,name:o}),l=c?KL({abiItem:c,args:n,includeFunctionName:!1,includeName:!1}):void 0,u=c?Nc(c,{includeName:!0}):void 0,f=D1({address:i&&sue(i),function:u,args:l&&l!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${l}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:s,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",f].filter(Boolean)}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionExecutionError"}),this.abi=r,this.args=n,this.cause=e,this.contractAddress=i,this.functionName=o,this.sender=a}}class SC extends ce{constructor({abi:e,data:r,functionName:n,message:i}){let s,o,a,c;if(r&&r!=="0x")try{o=Hfe({abi:e,data:r});const{abiItem:u,errorName:f,args:d}=o;if(f==="Error")c=d[0];else if(f==="Panic"){const[h]=d;c=GL[h]}else{const h=u?Nc(u,{includeName:!0}):void 0,p=u&&d?KL({abiItem:u,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",p&&p!=="()"?` ${[...Array((f==null?void 0:f.length)??0).keys()].map(()=>" ").join("")}${p}`:""]}}catch(u){s=u}else i&&(c=i);let l;s instanceof ML&&(l=s.signature,a=[`Unable to decode signature "${l}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${l}.`]),super(c&&c!=="execution reverted"||l?[`The contract function "${n}" reverted with the following ${l?"signature":"reason"}:`,c||l].join(` +`):`The contract function "${n}" reverted.`,{cause:s,metaMessages:a}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=o,this.reason=c,this.signature=l}}class Vfe extends ce{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ContractFunctionZeroDataError"})}}class _S extends ce{constructor({data:e,message:r}){super(r||""),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RawContractError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}class jh extends ce{constructor({body:e,details:r,headers:n,status:i,url:s}){super("HTTP request failed.",{details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${rb(s)}`,e&&`Request body: ${Dn(e)}`].filter(Boolean)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=n,this.status=i,this.url=s}}class Gfe extends ce{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${rb(n)}`,`Request body: ${Dn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class PS extends ce{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${rb(n)}`,`Request body: ${Dn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=r.code}}class kC extends ce{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${rb(r)}`,`Request body: ${Dn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const Kfe=-1;class oi extends ce{constructor(e,{code:r,docsPath:n,metaMessages:i,shortMessage:s}){super(s,{cause:e,docsPath:n,metaMessages:i||(e==null?void 0:e.metaMessages)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e.name,this.code=e instanceof PS?e.code:r??Kfe}}class gd extends oi{constructor(e,r){super(e,r),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderRpcError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=r.data}}class B0 extends oi{constructor(e){super(e,{code:B0.code,shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ParseRpcError"})}}Object.defineProperty(B0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class j0 extends oi{constructor(e){super(e,{code:j0.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(j0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class U0 extends oi{constructor(e){super(e,{code:U0.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(U0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class z0 extends oi{constructor(e){super(e,{code:z0.code,shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(` `)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParamsRpcError"})}}Object.defineProperty(z0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class zf extends oi{constructor(e){super(e,{code:zf.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(zf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class zl extends oi{constructor(e){super(e,{code:zl.code,shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(` -`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(zl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class W0 extends oi{constructor(e){super(e,{code:W0.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(W0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class vc extends oi{constructor(e){super(e,{code:vc.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(vc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class H0 extends oi{constructor(e){super(e,{code:H0.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(H0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class q0 extends oi{constructor(e){super(e,{code:q0.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(q0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class V0 extends oi{constructor(e){super(e,{code:V0.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(V0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class G0 extends oi{constructor(e){super(e,{code:G0.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(G0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Vr extends gd{constructor(e){super(e,{code:Vr.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Vr,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class K0 extends gd{constructor(e){super(e,{code:K0.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(K0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Q0 extends gd{constructor(e){super(e,{code:Q0.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(Q0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Y0 extends gd{constructor(e){super(e,{code:Y0.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(Y0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class J0 extends gd{constructor(e){super(e,{code:J0.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(J0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class mc extends gd{constructor(e){super(e,{code:mc.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Bfe extends oi{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const Ffe=3;function X0(t,{abi:e,address:r,args:n,docsPath:i,functionName:s,sender:o}){const{code:a,data:c,message:l,shortMessage:u}=t instanceof _S?t:t instanceof ce?t.walk(d=>"data"in d)||t.walk():{};let f=t;return t instanceof cb?f=new Nfe({functionName:s}):[Ffe,zf.code].includes(a)&&(c||l||u)&&(f=new kC({abi:e,data:typeof c=="object"?c.data:c,functionName:s,message:u??l})),new Mfe(f,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:s,sender:o})}class bd extends ce{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` -`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class jfe extends ce{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){const h=D1({from:r==null?void 0:r.address,to:f,value:typeof d<"u"&&`${gS(d)} ${(i==null?void 0:i.nativeCurrency.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ei(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ei(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ei(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}function TS(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(i=>i.code===Ju.code);return n instanceof ce?new Ju({cause:t,message:n.details}):Ju.nodeMessage.test(r)?new Ju({cause:t,message:t.details}):ly.nodeMessage.test(r)?new ly({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):mC.nodeMessage.test(r)?new mC({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):yC.nodeMessage.test(r)?new yC({cause:t,nonce:e==null?void 0:e.nonce}):gC.nodeMessage.test(r)?new gC({cause:t,nonce:e==null?void 0:e.nonce}):bC.nodeMessage.test(r)?new bC({cause:t,nonce:e==null?void 0:e.nonce}):wC.nodeMessage.test(r)?new wC({cause:t}):EC.nodeMessage.test(r)?new EC({cause:t,gas:e==null?void 0:e.gas}):xC.nodeMessage.test(r)?new xC({cause:t,gas:e==null?void 0:e.gas}):CC.nodeMessage.test(r)?new CC({cause:t}):uy.nodeMessage.test(r)?new uy({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new sb({cause:t})}function Ufe(t,{docsPath:e,...r}){let n=TS(t,r);return n instanceof sb&&(n=t),new jfe(n,{docsPath:e,...r})}function IS(t,{format:e}){return e?Object.keys(e({})).reduce((n,i)=>(t!=null&&t.hasOwnProperty(i)&&(n[i]=t[i]),n),{}):{}}function j1(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:s}=t,o=e?Yi(e):void 0;if(o&&!Uf(o.address))throw new B0({address:o.address});if(s&&!Uf(s))throw new B0({address:s});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new mue;if(n&&n>2n**256n-1n)throw new ly({maxFeePerGas:n});if(i&&n&&i>n)throw new uy({maxFeePerGas:n,maxPriorityFeePerGas:i})}class zfe extends ce{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class OS extends ce{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class Wfe extends ce{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ei(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class Hfe extends ce{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function yc(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:i}={}){var u,f,d;const s=n??"latest",o=i??!1,a=r!==void 0?ze(r):void 0;let c=null;if(e?c=await t.request({method:"eth_getBlockByHash",params:[e,o]}):c=await t.request({method:"eth_getBlockByNumber",params:[a||s,o]}),!c)throw new Hfe({blockHash:e,blockNumber:r});return(((d=(f=(u=t.chain)==null?void 0:u.formatters)==null?void 0:f.block)==null?void 0:d.format)||kL)(c)}async function RS(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function qfe(t,e){return qL(t,e)}async function qL(t,e){var s,o,a;const{block:r,chain:n=t.chain,request:i}=e||{};if(typeof((s=n==null?void 0:n.fees)==null?void 0:s.defaultPriorityFee)=="function"){const c=r||await yc(t);return n.fees.defaultPriorityFee({block:c,client:t,request:i})}else if((o=n==null?void 0:n.fees)!=null&&o.defaultPriorityFee)return(a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee;try{const c=await t.request({method:"eth_maxPriorityFeePerGas"});return nb(c)}catch{const[c,l]=await Promise.all([r?Promise.resolve(r):yc(t),RS(t)]);if(typeof c.baseFeePerGas!="bigint")throw new OS;const u=l-c.baseFeePerGas;return u<0n?0n:u}}async function Vfe(t,e){return _C(t,e)}async function _C(t,e){var d;const{block:r,chain:n=t.chain,request:i,type:s="eip1559"}=e||{},o=await(async()=>{var h,p;return typeof((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):((p=n==null?void 0:n.fees)==null?void 0:p.baseFeeMultiplier)??1.2})();if(o<1)throw new zfe;const c=10**o.toString().split(".")[1].length,l=h=>h*BigInt(o*c)/BigInt(c),u=r||await yc(t);if(typeof((d=n==null?void 0:n.fees)==null?void 0:d.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:l,request:i,type:s});if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new OS;const h=i!=null&&i.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await qL(t,{block:u,chain:n,request:i}),p=l(u.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??p+h,maxPriorityFeePerGas:h}}return{gasPrice:(i==null?void 0:i.gasPrice)??l(await RS(t))}}async function VL(t,{address:e,blockTag:r="latest",blockNumber:n}){const i=await t.request({method:"eth_getTransactionCount",params:[e,n?ze(n):r]});return Nn(i)}async function db(t,e){const{account:r=t.account,chain:n,gas:i,nonce:s,type:o}=e;if(!r)throw new bd;const a=Yi(r),c=await yc(t,{blockTag:"latest"}),l={...e,from:a.address};if(typeof s>"u"&&(l.nonce=await VL(t,{address:a.address,blockTag:"pending"})),typeof o>"u")try{l.type=wue(l)}catch{l.type=typeof c.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(l.type==="eip1559"){const{maxFeePerGas:u,maxPriorityFeePerGas:f}=await _C(t,{block:c,chain:n,request:l});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(l.gas=await $S(t,{...l,account:{address:a.address,type:"json-rpc"}})),j1(l),l}async function $S(t,e){var i,s,o;const r=e.account??t.account;if(!r)throw new bd({docsPath:"/docs/actions/public/estimateGas"});const n=Yi(r);try{const{accessList:a,blockNumber:c,blockTag:l,data:u,gas:f,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:v,to:b,value:y,...m}=n.type==="local"?await db(t,e):e,S=(c?ze(c):void 0)||l;j1(e);const P=((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:o.format)||ib,T=P({...IS(m,{format:P}),from:n.address,accessList:a,data:u,gas:f,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:v,to:b,value:y}),w=await t.request({method:"eth_estimateGas",params:S?[T,S]:[T]});return BigInt(w)}catch(a){throw Ufe(a,{...e,account:n,chain:t.chain})}}async function Gfe(t,{abi:e,address:r,args:n,functionName:i,...s}){const o=Dc({abi:e,args:n,functionName:i});try{return await $S(t,{data:o,to:r,...s})}catch(a){const c=s.account?Yi(s.account):void 0;throw X0(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:c==null?void 0:c.address})}}const $2="/docs/contract/decodeFunctionResult";function wd({abi:t,args:e,functionName:r,data:n}){let i=t[0];if(r&&(i=B1({abi:t,args:e,name:r}),!i))throw new fy(r,{docsPath:$2});if(i.type!=="function")throw new fy(void 0,{docsPath:$2});if(!i.outputs)throw new Mue(i.name,{docsPath:$2});const s=fb(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}const Kfe="modulepreload",Qfe=function(t,e){return new URL(t,e).href},YP={},GL=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=Qfe(s,n),s in YP)return;YP[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":Kfe,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((u,f)=>{l.addEventListener("load",u),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},PC=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],KL=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],QL=[...KL,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Yfe=[...KL,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],JP=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],XP=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],Jfe=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],Xfe="0x82ad56cb";function Zfe(t,{docsPath:e,...r}){let n=TS(t,r);return n instanceof sb&&(n=t),new HL(n,{docsPath:e,...r})}const M2=new Map;function MS({fn:t,id:e,shouldSplitBatch:r,wait:n=0}){const i=async()=>{const l=a();s();const u=l.map(({args:f})=>f);u.length!==0&&t(u).then(f=>{l.forEach(({pendingPromise:d},h)=>{var p;return(p=d.resolve)==null?void 0:p.call(d,[f[h],f])})}).catch(f=>{l.forEach(({pendingPromise:d})=>{var h;return(h=d.reject)==null?void 0:h.call(d,f)})})},s=()=>M2.delete(e),o=()=>a().map(({args:l})=>l),a=()=>M2.get(e)||[],c=l=>M2.set(e,[...a(),l]);return{flush:s,async schedule(l){const u={},f=new Promise((p,v)=>{u.resolve=p,u.reject=v});return(r==null?void 0:r([...o(),l]))&&i(),a().length>0?(c({args:l,pendingPromise:u}),f):(c({args:l,pendingPromise:u}),setTimeout(i,n),f)}}}async function hb(t,e){var y,m,g,S;const{account:r=t.account,batch:n=!!((y=t.batch)!=null&&y.multicall),blockNumber:i,blockTag:s="latest",accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:d,to:h,value:p,...v}=e,b=r?Yi(r):void 0;try{j1(e);const T=(i?ze(i):void 0)||s,w=((S=(g=(m=t.chain)==null?void 0:m.formatters)==null?void 0:g.transactionRequest)==null?void 0:S.format)||ib,I=w({...IS(v,{format:w}),from:b==null?void 0:b.address,accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:d,to:h,value:p});if(n&&ede({request:I}))try{return await tde(t,{...I,blockNumber:i,blockTag:s})}catch(j){if(!(j instanceof gL)&&!(j instanceof vC))throw j}const F=await t.request({method:"eth_call",params:T?[I,T]:[I]});return F==="0x"?{data:void 0}:{data:F}}catch(P){const T=rde(P),{offchainLookup:w,offchainLookupSignature:I}=await GL(()=>import("./ccip-c80064a1.js"),[],import.meta.url);if((T==null?void 0:T.slice(0,10))===I&&h)return{data:await w(t,{data:T,to:h})};throw Zfe(P,{...e,account:b,chain:t.chain})}}function ede({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(Xfe)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function tde(t,e){var v;const{batchSize:r=1024,wait:n=0}=typeof((v=t.batch)==null?void 0:v.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:o,multicallAddress:a,to:c}=e;let l=a;if(!l){if(!t.chain)throw new gL;l=vd({blockNumber:i,chain:t.chain,contract:"multicall3"})}const f=(i?ze(i):void 0)||s,{schedule:d}=MS({id:`${t.uid}.${f}`,wait:n,shouldSplitBatch(b){return b.reduce((m,{data:g})=>m+(g.length-2),0)>r*2},fn:async b=>{const y=b.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),m=Dc({abi:PC,args:[y],functionName:"aggregate3"}),g=await t.request({method:"eth_call",params:[{data:m,to:l},f]});return wd({abi:PC,args:[y],functionName:"aggregate3",data:g||"0x"})}}),[{returnData:h,success:p}]=await d({data:o,to:c});if(!p)throw new _S({data:h});return h==="0x"?{data:void 0}:{data:h}}function rde(t){if(!(t instanceof ce))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function gc(t,{abi:e,address:r,args:n,functionName:i,...s}){const o=Dc({abi:e,args:n,functionName:i});try{const{data:a}=await hb(t,{data:o,to:r,...s});return wd({abi:e,args:n,functionName:i,data:a||"0x"})}catch(a){throw X0(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}async function nde(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:s,...o}){const a=o.account?Yi(o.account):void 0,c=Dc({abi:e,args:n,functionName:s});try{const{data:l}=await hb(t,{batch:!1,data:`${c}${i?i.replace("0x",""):""}`,to:r,...o});return{result:wd({abi:e,args:n,functionName:s,data:l||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:i,functionName:s,...o}}}catch(l){throw X0(l,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:s,sender:a==null?void 0:a.address})}}const N2=new Map,ZP=new Map;let ide=0;function Ed(t,e,r){const n=++ide,i=()=>N2.get(t)||[],s=()=>{const u=i();N2.set(t,u.filter(f=>f.id!==n))},o=()=>{const u=ZP.get(t);i().length===1&&u&&u(),s()},a=i();if(N2.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const c={};for(const u in e)c[u]=(...f)=>{const d=i();d.length!==0&&d.forEach(h=>{var p,v;return(v=(p=h.fns)[u])==null?void 0:v.call(p,...f)})};const l=r(c);return typeof l=="function"&&ZP.set(t,l),o}async function hy(t){return new Promise(e=>setTimeout(e,t))}function U1(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0;const s=()=>i=!1;return(async()=>{let a;e&&(a=await t({unpoll:s}));const c=await(r==null?void 0:r(a))??n;await hy(c);const l=async()=>{i&&(await t({unpoll:s}),await hy(n),l())};l()})(),s}const eT="/docs/contract/decodeEventLog";function z1({abi:t,data:e,strict:r,topics:n}){const i=r??!0,[s,...o]=n;if(!s)throw new Rue({docsPath:eT});const a=t.find(p=>p.type==="event"&&s===xS(Nc(p)));if(!(a&&"name"in a)||a.type!=="event")throw new $ue(s,{docsPath:eT});const{name:c,inputs:l}=a,u=l==null?void 0:l.some(p=>!("name"in p&&p.name));let f=u?[]:{};const d=l.filter(p=>"indexed"in p&&p.indexed);if(o.length>0)for(let p=0;p!("indexed"in p&&p.indexed));if(h.length>0){if(e&&e!=="0x")try{const p=fb(h,e);if(p)if(u)f=[...f,...p];else for(let v=0;v0?f:void 0}}function sde({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(fb([t],e)||[])[0]}const ode=new Map,ade=new Map;function cde(t){const e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),r=e(t,ode),n=e(t,ade);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function lde(t,{cacheKey:e,cacheTime:r=1/0}){const n=cde(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()`blockNumber.${t}`;async function W1(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await lde(()=>t.request({method:"eth_blockNumber"}),{cacheKey:ude(t.uid),cacheTime:r??e});return BigInt(n)}async function pb(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(i=>{var s;if(typeof i=="string")return i;try{const{eventName:o,args:a}="abi"in e&&e.abi?z1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Ss(i,{args:a,eventName:o})}catch(o){let a,c;if(o instanceof Ul||o instanceof yd){if("strict"in e&&e.strict)return;a=o.abiItem.name,c=(s=o.abiItem.inputs)==null?void 0:s.some(l=>!("name"in l&&l.name))}return Ss(i,{args:c?[]:{},eventName:a})}}).filter(Boolean)}async function NS(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:s,events:o,args:a,strict:c}={}){const l=c??!1,u=o??(s?[s]:void 0);let f=[];u&&(f=[u.flatMap(h=>F1({abi:[h],eventName:h.name,args:a}))],s&&(f=f[0]));let d;return r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:f,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:f,fromBlock:typeof n=="bigint"?ze(n):n,toBlock:typeof i=="bigint"?ze(i):i}]}),d.map(h=>{var p;try{const{eventName:v,args:b}=u?z1({abi:u,data:h.data,topics:h.topics,strict:l}):{eventName:void 0,args:void 0};return Ss(h,{args:b,eventName:v})}catch(v){let b,y;if(v instanceof Ul||v instanceof yd){if(l)return;b=v.abiItem.name,y=(p=v.abiItem.inputs)==null?void 0:p.some(m=>!("name"in m&&m.name))}return Ss(h,{args:y?[]:{},eventName:b})}}).filter(Boolean)}async function vb(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function fde(t,{abi:e,address:r,args:n,batch:i=!0,eventName:s,onError:o,onLogs:a,poll:c,pollingInterval:l=t.pollingInterval,strict:u}){return(typeof c<"u"?c:t.transport.type!=="webSocket")?(()=>{const p=Dn(["watchContractEvent",r,n,i,t.uid,s,l]),v=u??!1;return Ed(p,{onLogs:a,onError:o},b=>{let y,m,g=!1;const S=U1(async()=>{var P;if(!g){try{m=await UL(t,{abi:e,address:r,args:n,eventName:s,strict:v})}catch{}g=!0;return}try{let T;if(m)T=await pb(t,{filter:m});else{const w=await W1(t);y&&y!==w?T=await NS(t,{address:r,args:n,fromBlock:y+1n,toBlock:w,event:B1({abi:e,name:s})}):T=[],y=w}if(T.length===0)return;i?b.onLogs(T):T.forEach(w=>b.onLogs([w]))}catch(T){m&&T instanceof zl&&(g=!1),(P=b.onError)==null||P.call(b,T)}},{emitOnBegin:!0,interval:l});return async()=>{m&&await vb(t,{filter:m}),S()}})})():(()=>{let p=!0,v=()=>p=!1;return(async()=>{try{const b=s?F1({abi:e,eventName:s,args:n}):[],{unsubscribe:y}=await t.transport.subscribe({params:["logs",{address:r,topics:b}],onData(m){var S;if(!p)return;const g=m.result;try{const{eventName:P,args:T}=z1({abi:e,data:g.data,topics:g.topics,strict:u}),w=Ss(g,{args:T,eventName:P});a([w])}catch(P){let T,w;if(P instanceof Ul||P instanceof yd){if(u)return;T=P.abiItem.name,w=(S=P.abiItem.inputs)==null?void 0:S.some(F=>!("name"in F&&F.name))}const I=Ss(g,{args:w?[]:{},eventName:T});a([I])}},onError(m){o==null||o(m)}});v=y,p||v()}catch(b){o==null||o(b)}})(),v})()}function dde(t,{docsPath:e,...r}){let n=TS(t,r);return n instanceof sb&&(n=t),new gue(n,{docsPath:e,...r})}async function Z0(t){const e=await t.request({method:"eth_chainId"});return Nn(e)}async function DS(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function LS(t,e){var v,b,y;const{account:r=t.account,chain:n=t.chain,accessList:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,...h}=e;if(!r)throw new bd({docsPath:"/docs/actions/wallet/sendTransaction"});const p=Yi(r);try{j1(e);let m;if(n!==null&&(m=await Z0(t),bL({currentChainId:m,chain:n})),p.type==="local"){const P=await db(t,{account:p,accessList:i,chain:n,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,...h});m||(m=await Z0(t));const T=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,w=await p.signTransaction({...P,chainId:m},{serializer:T});return await DS(t,{serializedTransaction:w})}const g=((y=(b=n==null?void 0:n.formatters)==null?void 0:b.transactionRequest)==null?void 0:y.format)||ib,S=g({...IS(h,{format:g}),accessList:i,data:s,from:p.address,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d});return await t.request({method:"eth_sendTransaction",params:[S]})}catch(m){throw dde(m,{...e,account:p,chain:e.chain||void 0})}}async function hde(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:s,...o}){const a=Dc({abi:e,args:n,functionName:s});return await LS(t,{data:`${a}${i?i.replace("0x",""):""}`,to:r,...o})}async function pde(t,{chain:e}){const{id:r,name:n,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:ze(r),chainName:n,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]})}const TC=256;let Qp=TC,Yp;function vde(t=11){if(!Yp||Qp+t>TC*2){Yp="",Qp=0;for(let e=0;e{const y=b(v);for(const g in h)delete y[g];const m={...v,...y};return Object.assign(m,{extend:p(m)})}}return Object.assign(h,{extend:p(h)})}function JL(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof e=="function"?e({count:a,error:l}):e;u&&await hy(u),o({count:a+1})};try{const l=await t();i(l)}catch(l){if(a"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof jh&&t.status?t.status!==403&&t.status!==408&&t.status!==413&&t.status!==429&&t.status!==500&&t.status!==502&&t.status!==503&&t.status!==504:!1;function mde(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>JL(async()=>{try{return await t(n)}catch(i){const s=i;switch(s.code){case F0.code:throw new F0(s);case j0.code:throw new j0(s);case U0.code:throw new U0(s);case z0.code:throw new z0(s);case zf.code:throw new zf(s);case zl.code:throw new zl(s);case W0.code:throw new W0(s);case vc.code:throw new vc(s);case H0.code:throw new H0(s);case q0.code:throw new q0(s);case V0.code:throw new V0(s);case G0.code:throw new G0(s);case Vr.code:throw new Vr(s);case K0.code:throw new K0(s);case Q0.code:throw new Q0(s);case Y0.code:throw new Y0(s);case J0.code:throw new J0(s);case mc.code:throw new mc(s);case 5e3:throw new Vr(s);default:throw i instanceof ce?i:new Bfe(s)}}},{delay:({count:i,error:s})=>{var o;if(s&&s instanceof jh){const a=(o=s==null?void 0:s.headers)==null?void 0:o.get("Retry-After");if(a!=null&&a.match(/\d/))return parseInt(a)*1e3}return~~(1<!XL(i)})}function mb({key:t,name:e,request:r,retryCount:n=3,retryDelay:i=150,timeout:s,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:i,timeout:s,type:o},request:mde(r,{retryCount:n,retryDelay:i}),value:a}}function BS(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=e;return({retryCount:s})=>mb({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??s,retryDelay:i,type:"custom"})}function tT(t,e={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:s,retryDelay:o}=e;return({chain:a,pollingInterval:c=4e3,timeout:l})=>{let u=t,f=()=>{};const d=mb({key:r,name:n,async request({method:h,params:p}){const v=async(b=0)=>{const y=u[b]({chain:a,retryCount:0,timeout:l});try{const m=await y.request({method:h,params:p});return f({method:h,params:p,response:m,transport:y,status:"success"}),m}catch(m){if(f({error:m,method:h,params:p,transport:y,status:"error"}),XL(m)||b===u.length-1)throw m;return v(b+1)}};return v()},retryCount:s,retryDelay:o,type:"fallback"},{onResponse:h=>f=h,transports:u.map(h=>h({chain:a,retryCount:0}))});if(i){const h=typeof i=="object"?i:{};yde({chain:a,interval:h.interval??c,onTransports:p=>u=p,sampleCount:h.sampleCount,timeout:h.timeout,transports:u,weights:h.weights})}return d}}function yde({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:s,weights:o={}}){const{stability:a=.7,latency:c=.3}=o,l=[],u=async()=>{const f=await Promise.all(s.map(async p=>{const v=p({chain:t,retryCount:0,timeout:i}),b=Date.now();let y,m;try{await v.request({method:"net_listening"}),m=1}catch{m=0}finally{y=Date.now()}return{latency:y-b,success:m}}));l.push(f),l.length>n&&l.shift();const d=Math.max(...l.map(p=>Math.max(...p.map(({latency:v})=>v)))),h=s.map((p,v)=>{const b=l.map(P=>P[v].latency),m=1-b.reduce((P,T)=>P+T,0)/b.length/d,g=l.map(P=>P[v].success),S=g.reduce((P,T)=>P+T,0)/g.length;return S===0?[0,v]:[c*m+a*S,v]}).sort((p,v)=>v[0]-p[0]);r(h.map(([,p])=>s[p])),await hy(e),u()};u()}class ZL extends ce{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Iu=null;typeof WebSocket<"u"?Iu=WebSocket:typeof MozWebSocket<"u"?Iu=MozWebSocket:typeof global<"u"?Iu=global.WebSocket||global.MozWebSocket:typeof window<"u"?Iu=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Iu=self.WebSocket||self.MozWebSocket);const rT=Iu;function eB(t,{errorInstance:e,timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():s(e)},r)),i(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&s(e),s(a)}finally{clearTimeout(o)}})()})}let IC=0;async function gde(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var a;const{headers:i,method:s,signal:o}=r;try{const c=await eB(async({signal:u})=>await fetch(t,{...r,body:Array.isArray(e)?Dn(e.map(d=>({jsonrpc:"2.0",id:d.id??IC++,...d}))):Dn({jsonrpc:"2.0",id:e.id??IC++,...e}),headers:{...i,"Content-Type":"application/json"},method:s||"POST",signal:o||(n>0?u:void 0)}),{errorInstance:new AC({body:e,url:t}),timeout:n,signal:!0});let l;if((a=c.headers.get("Content-Type"))!=null&&a.startsWith("application/json")?l=await c.json():l=await c.text(),!c.ok)throw new jh({body:e,details:Dn(l.error)||c.statusText,headers:c.headers,status:c.status,url:t});return l}catch(c){throw c instanceof jh||c instanceof AC?c:new jh({body:e,details:c.message,url:t})}}const D2=new Map;async function L2(t){let e=D2.get(t);if(e)return e;const{schedule:r}=MS({id:t,fn:async()=>{const s=new rT(t),o=new Map,a=new Map,c=({data:u})=>{const f=JSON.parse(u),d=f.method==="eth_subscription",h=d?f.params.subscription:f.id,p=d?a:o,v=p.get(h);v&&v({data:u}),d||p.delete(h)},l=()=>{D2.delete(t),s.removeEventListener("close",l),s.removeEventListener("message",c)};return s.addEventListener("close",l),s.addEventListener("message",c),s.readyState===rT.CONNECTING&&await new Promise((u,f)=>{s&&(s.onopen=u,s.onerror=f)}),e=Object.assign(s,{requests:o,subscriptions:a}),D2.set(t,e),[e]}}),[n,[i]]=await r();return i}function bde(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new Dfe({body:e,url:t.url,details:"Socket is closed."});const n=IC++,i=({data:s})=>{var a;const o=JSON.parse(s);typeof o.id=="number"&&n!==o.id||(r==null||r(o),e.method==="eth_subscribe"&&typeof o.result=="string"&&t.subscriptions.set(o.result,i),e.method==="eth_unsubscribe"&&t.subscriptions.delete((a=e.params)==null?void 0:a[0]))};return t.requests.set(n,i),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function wde(t,{body:e,timeout:r=1e4}){return eB(()=>new Promise(n=>mf.webSocket(t,{body:e,onResponse:n})),{errorInstance:new AC({body:e,url:t.url}),timeout:r})}const mf={http:gde,webSocket:bde,webSocketAsync:wde};function tB(t,e={}){const{batch:r,fetchOptions:n,key:i="http",name:s="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:u=1e3,wait:f=0}=typeof r=="object"?r:{},d=e.retryCount??c,h=l??e.timeout??1e4,p=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!p)throw new ZL;return mb({key:i,name:s,async request({method:v,params:b}){const y={method:v,params:b},{schedule:m}=MS({id:`${t}`,wait:f,shouldSplitBatch(T){return T.length>u},fn:T=>mf.http(p,{body:T,fetchOptions:n,timeout:h})}),g=async T=>r?m(T):[await mf.http(p,{body:T,fetchOptions:n,timeout:h})],[{error:S,result:P}]=await g(y);if(S)throw new PS({body:y,error:S,url:p});return P},retryCount:d,retryDelay:o,timeout:h,type:"http"},{url:t})}}function FS(t,e){var n,i,s;if(!(t instanceof ce))return!1;const r=t.walk(o=>o instanceof kC);return r instanceof kC?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((i=r.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||(s=r.reason)!=null&&s.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===zL[50]):!1}function rB(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return mo(e)?e:null}function Bv(t){let e=new Uint8Array(32).fill(0);if(!t)return L0(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const i=rB(r[n]),s=i?jl(i):Qn(Lo(r[n]),"bytes");e=Qn(Xo([e,s]),"bytes")}return L0(e)}function Ede(t){return`[${t.slice(2)}]`}function xde(t){const e=new Uint8Array(32).fill(0);return t?rB(t)||Qn(Lo(t)):L0(e)}function yb(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(Lo(e).byteLength+2);let n=0;const i=e.split(".");for(let s=0;s255&&(o=Lo(Ede(xde(i[s])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Cde(t,{blockNumber:e,blockTag:r,coinType:n,name:i,universalResolverAddress:s}){let o=s;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=vd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=Dc({abi:XP,functionName:"addr",...n!=null?{args:[Bv(i),BigInt(n)]}:{args:[Bv(i)]}}),c=await gc(t,{address:o,abi:QL,functionName:"resolve",args:[ua(yb(i)),a],blockNumber:e,blockTag:r});if(c[0]==="0x")return null;const l=wd({abi:XP,args:n!=null?[Bv(i),BigInt(n)]:void 0,functionName:"addr",data:c[0]});return l==="0x"||pf(l)==="0x00"?null:l}catch(a){if(FS(a,"resolve"))return null;throw a}}class Sde extends ce{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class Xd extends ce{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class jS extends ce{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class kde extends ce{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Ade=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,_de=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Pde=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Tde=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Ide(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function nT(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function nB({uri:t,gatewayUrls:e}){const r=Pde.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=nT(e==null?void 0:e.ipfs,"https://ipfs.io"),i=nT(e==null?void 0:e.arweave,"https://arweave.net"),s=t.match(Ade),{protocol:o,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=o==="ipns:/"||a==="ipns/",f=o==="ipfs:/"||a==="ipfs/"||_de.test(t);if(t.startsWith("http")&&!u&&!f){let h=t;return e!=null&&e.arweave&&(h=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||f)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(Tde,"");if(d.startsWith("i.json());return await US({gatewayUrls:t,uri:iB(r)})}catch{throw new jS({uri:e})}}async function US({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=nB({uri:e,gatewayUrls:t});if(n||await Ide(r))return r;throw new jS({uri:e})}function Rde(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=e.split("/"),[s,o]=r.split(":"),[a,c]=n.split(":");if(!s||s.toLowerCase()!=="eip155")throw new Xd({reason:"Only EIP-155 supported"});if(!o)throw new Xd({reason:"Chain ID not found"});if(!c)throw new Xd({reason:"Contract address not found"});if(!i)throw new Xd({reason:"Token ID not found"});if(!a)throw new Xd({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function $de(t,{nft:e}){if(e.namespace==="erc721")return gc(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return gc(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new kde({namespace:e.namespace})}async function Mde(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?Nde(t,{gatewayUrls:e,record:r}):US({uri:r,gatewayUrls:e})}async function Nde(t,{gatewayUrls:e,record:r}){const n=Rde(r),i=await $de(t,{nft:n}),{uri:s,isOnChain:o,isEncoded:a}=nB({uri:i,gatewayUrls:e});if(o&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return US({uri:iB(u),gatewayUrls:e})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),Ode({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,c)})}async function sB(t,{blockNumber:e,blockTag:r,name:n,key:i,universalResolverAddress:s}){let o=s;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=vd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=await gc(t,{address:o,abi:QL,functionName:"resolve",args:[ua(yb(n)),Dc({abi:JP,functionName:"text",args:[Bv(n),i]})],blockNumber:e,blockTag:r});if(a[0]==="0x")return null;const c=wd({abi:JP,functionName:"text",data:a[0]});return c===""?null:c}catch(a){if(FS(a,"resolve"))return null;throw a}}async function Dde(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:s}){const o=await sB(t,{blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:s});if(!o)return null;try{return await Mde(t,{record:o,gatewayUrls:n})}catch{return null}}async function Lde(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:i}){let s=i;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=vd({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const o=`${e.toLowerCase().substring(2)}.addr.reverse`;try{return(await gc(t,{address:s,abi:Yfe,functionName:"reverse",args:[ua(yb(o))],blockNumber:r,blockTag:n}))[0]}catch(a){if(FS(a,"reverse"))return null;throw a}}async function Bde(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:i}){let s=i;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=vd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await gc(t,{address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ua(yb(n))],blockNumber:e,blockTag:r});return o}async function Fde(t){const e=ub(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function oB(t,{address:e,args:r,event:n,events:i,fromBlock:s,strict:o,toBlock:a}={}){const c=i??(n?[n]:void 0),l=ub(t,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(d=>F1({abi:[d],eventName:d.name,args:r}))],n&&(u=u[0]));const f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?ze(s):s,toBlock:typeof a=="bigint"?ze(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:f,request:l(f),strict:o,toBlock:a,type:"event"}}async function aB(t){const e=ub(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function jde(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r?ze(r):void 0,s=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(s)}async function Ude(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const i=r!==void 0?ze(r):void 0;let s;return e?s=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):s=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),Nn(s)}async function zde(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r!==void 0?ze(r):void 0,s=await t.request({method:"eth_getCode",params:[e,i||n]});if(s!=="0x")return s}function Wde(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function Hde(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const s=r?ze(r):void 0,o=await t.request({method:"eth_feeHistory",params:[ze(e),s||n,i]});return Wde(o)}async function qde(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(i=>{var s;try{const{eventName:o,args:a}="abi"in e&&e.abi?z1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Ss(i,{args:a,eventName:o})}catch(o){let a,c;if(o instanceof Ul||o instanceof yd){if("strict"in e&&e.strict)return;a=o.abiItem.name,c=(s=o.abiItem.inputs)==null?void 0:s.some(l=>!("name"in l&&l.name))}return Ss(i,{args:c?[]:{},eventName:a})}}).filter(Boolean)}async function Vde(t,{address:e,blockNumber:r,blockTag:n="latest",slot:i}){const s=r!==void 0?ze(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,s||n]})}async function zS(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){var u,f,d;const o=n||"latest",a=r!==void 0?ze(r):void 0;let c=null;if(i?c=await t.request({method:"eth_getTransactionByHash",params:[i]}):e?c=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,ze(s)]}):(a||o)&&(c=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,ze(s)]})),!c)throw new _L({blockHash:e,blockNumber:r,blockTag:o,hash:i,index:s});return(((d=(f=(u=t.chain)==null?void 0:u.formatters)==null?void 0:f.transaction)==null?void 0:d.format)||SL)(c)}async function Gde(t,{hash:e,transactionReceipt:r}){const[n,i]=await Promise.all([W1(t),e?zS(t,{hash:e}):void 0]),s=(r==null?void 0:r.blockNumber)||(i==null?void 0:i.blockNumber);return s?n-s+1n:0n}async function OC(t,{hash:e}){var i,s,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new PL({hash:e});return(((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionReceipt)==null?void 0:o.format)||uue)(r)}async function Kde(t,e){var v;const{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:s,contracts:o,multicallAddress:a}=e,c=n??(typeof((v=t.batch)==null?void 0:v.multicall)=="object"&&t.batch.multicall.batchSize||1024);let l=a;if(!l){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");l=vd({blockNumber:i,chain:t.chain,contract:"multicall3"})}const u=[[]];let f=0,d=0;for(let b=0;b0&&d>c&&u[f].length>0&&(f++,d=(P.length-2)/2,u[f]=[]),u[f]=[...u[f],{allowFailure:!0,callData:P,target:m}]}catch(P){const T=X0(P,{abi:y,address:m,args:g,docsPath:"/docs/contract/multicall",functionName:S});if(!r)throw T;u[f]=[...u[f],{allowFailure:!0,callData:"0x",target:m}]}}const h=await Promise.allSettled(u.map(b=>gc(t,{abi:PC,address:l,args:[b],blockNumber:i,blockTag:s,functionName:"aggregate3"}))),p=[];for(let b=0;b"u"?{}:t,s={EIP712Domain:hB({domain:i}),...n};dB({domain:i,message:e,primaryType:r,types:s});const o=["0x1901"];return i&&o.push(Xde({domain:i,types:s})),r!=="EIP712Domain"&&o.push(cB({data:e,primaryType:r,types:s})),Qn(Xo(o))}function Xde({domain:t,types:e}){return cB({data:t,primaryType:"EIP712Domain",types:e})}function cB({data:t,primaryType:e,types:r}){const n=lB({data:t,primaryType:e,types:r});return Qn(n)}function lB({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],i=[Zde({primaryType:e,types:r})];for(const s of r[e]){const[o,a]=fB({types:r,name:s.name,type:s.type,value:t[s.name]});n.push(o),i.push(a)}return L1(n,i)}function Zde({primaryType:t,types:e}){const r=ua(ehe({primaryType:t,types:e}));return Qn(r)}function ehe({primaryType:t,types:e}){let r="";const n=uB({primaryType:t,types:e});n.delete(t);const i=[t,...Array.from(n).sort()];for(const s of i)r+=`${s}(${e[s].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function uB({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),i=n==null?void 0:n[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(const s of e[i])uB({primaryType:s.type,types:e},r);return r}function fB({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},Qn(lB({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},Qn(n)];if(r==="string")return[{type:"bytes32"},Qn(ua(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),s=n.map(o=>fB({name:e,type:i,types:t,value:o}));return[{type:"bytes32"},Qn(L1(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:r},n]}function dB({domain:t,message:e,primaryType:r,types:n}){const i=n,s=(o,a)=>{for(const c of o){const{name:l,type:u}=c,f=u,d=a[l],h=f.match(Yde);if(h&&(typeof d=="number"||typeof d=="bigint")){const[b,y,m]=h;ze(d,{signed:y==="int",size:parseInt(m)/8})}if(f==="address"&&typeof d=="string"&&!Uf(d))throw new B0({address:d});const p=f.match(Qde);if(p){const[b,y]=p;if(y&&Lr(d)!==parseInt(y))throw new Nue({expectedSize:parseInt(y),givenSize:Lr(d)})}const v=i[f];v&&s(v,d)}};if(i.EIP712Domain&&t&&s(i.EIP712Domain,t),r!=="EIP712Domain"){const o=i[r];s(o,e)}}function hB({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const B2="/docs/contract/encodeDeployData";function pB({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new Pue({docsPath:B2});if(!("inputs"in n))throw new zP({docsPath:B2});if(!n.inputs||n.inputs.length===0)throw new zP({docsPath:B2});const i=L1(n.inputs,e);return yS([r,i])}function the(t,e){const r=(()=>typeof t=="string"?Lo(t):t.raw instanceof Uint8Array?t.raw:jl(t.raw))(),n=Lo(`Ethereum Signed Message: -${r.length}`);return Qn(Xo([n,r]),e)}const rhe="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);BigInt(1);BigInt(2);function nhe(t,e){if(t.length!==e.length)return!1;for(let r=0;r{const f=Dn(["watchBlockNumber",t.uid,e,r,o]);return Ed(f,{onBlockNumber:n,onError:i},d=>U1(async()=>{var h;try{const p=await W1(t,{cacheTime:0});if(c){if(p===c)return;if(p-c>1&&r)for(let v=c+1n;vc)&&(d.onBlockNumber(p,c),c=p)}catch(p){(h=d.onError)==null||h.call(d,p)}},{emitOnBegin:e,interval:o}))})():(()=>{let f=!0,d=()=>f=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(p){var b;if(!f)return;const v=nb((b=p.result)==null?void 0:b.number);n(v,c),c=v},onError(p){i==null||i(p)}});d=h,f||d()}catch(h){i==null||i(h)}})(),d})()}async function ahe(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:i=t.pollingInterval,timeout:s}){const o=Dn(["waitForTransactionReceipt",t.uid,r]);let a,c,l,u=!1;return new Promise((f,d)=>{s&&setTimeout(()=>d(new bue({hash:r})),s);const h=Ed(o,{onReplaced:n,resolve:f,reject:d},p=>{const v=mB(t,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(b){if(u)return;let y=b;const m=g=>{v(),g(),h()};try{if(l){if(y-l.blockNumber+1np.resolve(l));return}if(a||(u=!0,await JL(async()=>{a=await zS(t,{hash:r}),a.blockNumber&&(y=a.blockNumber)},{delay:({count:g})=>~~(1<0&&y-l.blockNumber+1np.resolve(l))}catch(g){if(a&&(g instanceof _L||g instanceof PL))try{c=a;const P=(await yc(t,{blockNumber:y,includeTransactions:!0})).transactions.find(({from:w,nonce:I})=>w===c.from&&I===c.nonce);if(!P||(l=await OC(t,{hash:P.hash}),y-l.blockNumber+1n{var w;(w=p.onReplaced)==null||w.call(p,{reason:T,replacedTransaction:c,transaction:P,transactionReceipt:l}),p.resolve(l)})}catch(S){m(()=>p.reject(S))}else m(()=>p.reject(g))}}})})})}function che(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){const l=typeof a<"u"?a:t.transport.type!=="webSocket",u=o??!1;let f;return l?(()=>{const p=Dn(["watchBlocks",t.uid,r,n,u,c]);return Ed(p,{onBlock:i,onError:s},v=>U1(async()=>{var b;try{const y=await yc(t,{blockTag:e,includeTransactions:u});if(y.number&&(f!=null&&f.number)){if(y.number===f.number)return;if(y.number-f.number>1&&r)for(let m=(f==null?void 0:f.number)+1n;mf.number)&&(v.onBlock(y,f),f=y)}catch(y){(b=v.onError)==null||b.call(v,y)}},{emitOnBegin:n,interval:c}))})():(()=>{let p=!0,v=()=>p=!1;return(async()=>{try{const{unsubscribe:b}=await t.transport.subscribe({params:["newHeads"],onData(y){var S,P,T;if(!p)return;const g=(((T=(P=(S=t.chain)==null?void 0:S.formatters)==null?void 0:P.block)==null?void 0:T.format)||kL)(y.result);i(g,f),f=g},onError(y){s==null||s(y)}});v=b,p||v()}catch(b){s==null||s(b)}})(),v})()}function lhe(t,{address:e,args:r,batch:n=!0,event:i,events:s,onError:o,onLogs:a,poll:c,pollingInterval:l=t.pollingInterval,strict:u}){const f=typeof c<"u"?c:t.transport.type!=="webSocket",d=u??!1;return f?(()=>{const v=Dn(["watchEvent",e,r,n,t.uid,i,l]);return Ed(v,{onLogs:a,onError:o},b=>{let y,m,g=!1;const S=U1(async()=>{var P;if(!g){try{m=await oB(t,{address:e,args:r,event:i,events:s,strict:d})}catch{}g=!0;return}try{let T;if(m)T=await pb(t,{filter:m});else{const w=await W1(t);y&&y!==w?T=await NS(t,{address:e,args:r,event:i,events:s,fromBlock:y+1n,toBlock:w}):T=[],y=w}if(T.length===0)return;n?b.onLogs(T):T.forEach(w=>b.onLogs([w]))}catch(T){m&&T instanceof zl&&(g=!1),(P=b.onError)==null||P.call(b,T)}},{emitOnBegin:!0,interval:l});return async()=>{m&&await vb(t,{filter:m}),S()}})})():(()=>{let v=!0,b=()=>v=!1;return(async()=>{try{const y=s??(i?[i]:void 0);let m=[];y&&(m=[y.flatMap(S=>F1({abi:[S],eventName:S.name,args:r}))],i&&(m=m[0]));const{unsubscribe:g}=await t.transport.subscribe({params:["logs",{address:e,topics:m}],onData(S){var T;if(!v)return;const P=S.result;try{const{eventName:w,args:I}=z1({abi:y,data:P.data,topics:P.topics,strict:d}),F=Ss(P,{args:I,eventName:w});a([F])}catch(w){let I,F;if(w instanceof Ul||w instanceof yd){if(u)return;I=w.abiItem.name,F=(T=w.abiItem.inputs)==null?void 0:T.some(H=>!("name"in H&&H.name))}const j=Ss(P,{args:F?[]:{},eventName:I});a([j])}},onError(S){o==null||o(S)}});b=g,v||b()}catch(y){o==null||o(y)}})(),b})()}function uhe(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket")?(()=>{const l=Dn(["watchPendingTransactions",t.uid,e,s]);return Ed(l,{onTransactions:n,onError:r},u=>{let f;const d=U1(async()=>{var h;try{if(!f)try{f=await aB(t);return}catch(v){throw d(),v}const p=await pb(t,{filter:f});if(p.length===0)return;e?u.onTransactions(p):p.forEach(v=>u.onTransactions([v]))}catch(p){(h=u.onError)==null||h.call(u,p)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await vb(t,{filter:f}),d()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:f}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});u=f,l||u()}catch(f){r==null||r(f)}})(),u})()}function fhe(t){return{call:e=>hb(t,e),createBlockFilter:()=>Fde(t),createContractEventFilter:e=>UL(t,e),createEventFilter:e=>oB(t,e),createPendingTransactionFilter:()=>aB(t),estimateContractGas:e=>Gfe(t,e),estimateGas:e=>$S(t,e),getBalance:e=>jde(t,e),getBlock:e=>yc(t,e),getBlockNumber:e=>W1(t,e),getBlockTransactionCount:e=>Ude(t,e),getBytecode:e=>zde(t,e),getChainId:()=>Z0(t),getEnsAddress:e=>Cde(t,e),getEnsAvatar:e=>Dde(t,e),getEnsName:e=>Lde(t,e),getEnsResolver:e=>Bde(t,e),getEnsText:e=>sB(t,e),getFeeHistory:e=>Hde(t,e),estimateFeesPerGas:e=>Vfe(t,e),getFilterChanges:e=>pb(t,e),getFilterLogs:e=>qde(t,e),getGasPrice:()=>RS(t),getLogs:e=>NS(t,e),estimateMaxPriorityFeePerGas:e=>qfe(t,e),getStorageAt:e=>Vde(t,e),getTransaction:e=>zS(t,e),getTransactionConfirmations:e=>Gde(t,e),getTransactionCount:e=>VL(t,e),getTransactionReceipt:e=>OC(t,e),multicall:e=>Kde(t,e),prepareTransactionRequest:e=>db(t,e),readContract:e=>gc(t,e),sendRawTransaction:e=>DS(t,e),simulateContract:e=>nde(t,e),verifyMessage:e=>she(t,e),verifyTypedData:e=>ohe(t,e),uninstallFilter:e=>vb(t,e),waitForTransactionReceipt:e=>ahe(t,e),watchBlocks:e=>che(t,e),watchBlockNumber:e=>mB(t,e),watchContractEvent:e=>fde(t,e),watchEvent:e=>lhe(t,e),watchPendingTransactions:e=>uhe(t,e)}}function iT(t){const{key:e="public",name:r="Public Client"}=t;return YL({...t,key:e,name:r,type:"publicClient"}).extend(fhe)}function dhe(t,{abi:e,args:r,bytecode:n,...i}){const s=pB({abi:e,args:r,bytecode:n});return LS(t,{...i,data:s})}async function hhe(t){return(await t.request({method:"eth_accounts"})).map(r=>AS(r))}async function phe(t){return await t.request({method:"wallet_getPermissions"})}async function vhe(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>Li(r))}async function mhe(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function yhe(t,{account:e=t.account,message:r}){if(!e)throw new bd({docsPath:"/docs/actions/wallet/signMessage"});const n=Yi(e);if(n.type==="local")return n.signMessage({message:r});const i=(()=>typeof r=="string"?vS(r):r.raw instanceof Uint8Array?ua(r.raw):r.raw)();return t.request({method:"personal_sign",params:[i,n.address]})}async function ghe(t,e){var l,u,f,d;const{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new bd({docsPath:"/docs/actions/wallet/signTransaction"});const s=Yi(r);j1({account:s,...e});const o=await Z0(t);n!==null&&bL({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((l=t.chain)==null?void 0:l.formatters),c=((u=a==null?void 0:a.transactionRequest)==null?void 0:u.format)||ib;return s.type==="local"?s.signTransaction({chainId:o,...i},{serializer:(d=(f=t.chain)==null?void 0:f.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...c(i),chainId:ze(o),from:s.address}]})}async function bhe(t,{account:e=t.account,domain:r,message:n,primaryType:i,types:s}){if(!e)throw new bd({docsPath:"/docs/actions/wallet/signTypedData"});const o=Yi(e),a={EIP712Domain:hB({domain:r}),...s};if(dB({domain:r,message:n,primaryType:i,types:a}),o.type==="local")return o.signTypedData({domain:r,primaryType:i,types:a,message:n});const c=Dn({domain:r??{},primaryType:i,types:a,message:n},(l,u)=>mo(u)?u.toLowerCase():u);return t.request({method:"eth_signTypedData_v4",params:[o.address,c]})}async function whe(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:ze(e)}]})}async function Ehe(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function xhe(t){return{addChain:e=>pde(t,e),deployContract:e=>dhe(t,e),getAddresses:()=>hhe(t),getChainId:()=>Z0(t),getPermissions:()=>phe(t),prepareTransactionRequest:e=>db(t,e),requestAddresses:()=>vhe(t),requestPermissions:e=>mhe(t,e),sendRawTransaction:e=>DS(t,e),sendTransaction:e=>LS(t,e),signMessage:e=>yhe(t,e),signTransaction:e=>ghe(t,e),signTypedData:e=>bhe(t,e),switchChain:e=>whe(t,e),watchAsset:e=>Ehe(t,e),writeContract:e=>hde(t,e)}}function gb(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return YL({...t,key:e,name:r,transport:s=>n({...s,retryCount:0}),type:"walletClient"}).extend(xhe)}function Che(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=e;return({chain:s,retryCount:o,timeout:a})=>{var f;const c=e.retryCount??o,l=a??e.timeout??1e4,u=t||((f=s==null?void 0:s.rpcUrls.default.webSocket)==null?void 0:f[0]);if(!u)throw new ZL;return mb({key:r,name:n,async request({method:d,params:h}){const p={method:d,params:h},v=await L2(u),{error:b,result:y}=await mf.webSocketAsync(v,{body:p,timeout:l});if(b)throw new PS({body:p,error:b,url:u});return y},retryCount:c,retryDelay:i,timeout:l,type:"webSocket"},{getSocket(){return L2(u)},async subscribe({params:d,onData:h,onError:p}){const v=await L2(u),{result:b}=await new Promise((y,m)=>mf.webSocket(v,{body:{method:"eth_subscribe",params:d},onResponse(g){if(g.error){m(g.error),p==null||p(g.error);return}if(typeof g.id=="number"){y(g);return}g.method==="eth_subscription"&&h(g.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(y=>mf.webSocket(v,{body:{method:"eth_unsubscribe",params:[b]},onResponse:y}))}}}})}}function She(t){var r;if(!t)return"Injected";const e=n=>{if(n.isApexWallet)return"Apex Wallet";if(n.isAvalanche)return"Core Wallet";if(n.isBackpack)return"Backpack";if(n.isBifrost)return"Bifrost Wallet";if(n.isBitKeep)return"BitKeep";if(n.isBitski)return"Bitski";if(n.isBlockWallet)return"BlockWallet";if(n.isBraveWallet)return"Brave Wallet";if(n.isCoinbaseWallet)return"Coinbase Wallet";if(n.isDawn)return"Dawn Wallet";if(n.isDefiant)return"Defiant";if(n.isEnkrypt)return"Enkrypt";if(n.isExodus)return"Exodus";if(n.isFrame)return"Frame";if(n.isFrontier)return"Frontier Wallet";if(n.isGamestop)return"GameStop Wallet";if(n.isHaqqWallet)return"HAQQ Wallet";if(n.isHyperPay)return"HyperPay Wallet";if(n.isImToken)return"ImToken";if(n.isHaloWallet)return"Halo Wallet";if(n.isKuCoinWallet)return"KuCoin Wallet";if(n.isMathWallet)return"MathWallet";if(n.isNovaWallet)return"Nova Wallet";if(n.isOkxWallet||n.isOKExWallet)return"OKX Wallet";if(n.isOneInchIOSWallet||n.isOneInchAndroidWallet)return"1inch Wallet";if(n.isOpera)return"Opera";if(n.isPhantom)return"Phantom";if(n.isPortal)return"Ripio Portal";if(n.isRabby)return"Rabby Wallet";if(n.isRainbow)return"Rainbow";if(n.isStatus)return"Status";if(n.isTalisman)return"Talisman";if(n.isTally)return"Taho";if(n.isTokenPocket)return"TokenPocket";if(n.isTokenary)return"Tokenary";if(n.isTrust||n.isTrustWallet)return"Trust Wallet";if(n.isTTWallet)return"TTWallet";if(n.isXDEFI)return"XDEFI Wallet";if(n.isZerion)return"Zerion";if(n.isMetaMask)return"MetaMask"};if((r=t.providers)!=null&&r.length){const n=new Set;let i=1;for(const o of t.providers){let a=e(o);a||(a=`Unknown Wallet #${i}`,i+=1),n.add(a)}const s=[...n];return s.length?s:s[0]??"Injected"}return e(t)??"Injected"}var Fv,yB=class extends ob{constructor({chains:t,options:e}={}){const r={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const i=window.ethereum;return i!=null&&i.providers?i.providers[0]:i},...e};super({chains:t,options:r}),st(this,"id","injected"),st(this,"name"),st(this,"ready"),Jr(this,Fv,void 0),st(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),st(this,"onAccountsChanged",i=>{i.length===0?this.emit("disconnect"):this.emit("change",{account:Li(i[0])})}),st(this,"onChainChanged",i=>{const s=Fh(i),o=this.isChainUnsupported(s);this.emit("change",{chain:{id:s,unsupported:o}})}),st(this,"onDisconnect",async i=>{var s;i.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((s=this.storage)==null||s.removeItem(this.shimDisconnectKey)))});const n=r.getProvider();if(typeof r.name=="string")this.name=r.name;else if(n){const i=She(n);r.name?this.name=r.name(i):typeof i=="string"?this.name=i:this.name=i[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:t}={}){var e;try{const r=await this.getProvider();if(!r)throw new Ra;r.on&&(r.on("accountsChanged",this.onAccountsChanged),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await r.request({method:"eth_requestAccounts"}),i=Li(n[0]);let s=await this.getChainId(),o=this.isChainUnsupported(s);return t&&s!==t&&(s=(await this.switchChain(t)).id,o=this.isChainUnsupported(s)),this.options.shimDisconnect&&((e=this.storage)==null||e.setItem(this.shimDisconnectKey,!0)),{account:i,chain:{id:s,unsupported:o}}}catch(r){throw this.isUserRejectedRequestError(r)?new Vr(r):r.code===-32002?new vc(r):r}}async disconnect(){var e;const t=await this.getProvider();t!=null&&t.removeListener&&(t.removeListener("accountsChanged",this.onAccountsChanged),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&((e=this.storage)==null||e.removeItem(this.shimDisconnectKey)))}async getAccount(){const t=await this.getProvider();if(!t)throw new Ra;const e=await t.request({method:"eth_accounts"});return Li(e[0])}async getChainId(){const t=await this.getProvider();if(!t)throw new Ra;return t.request({method:"eth_chainId"}).then(Fh)}async getProvider(){const t=this.options.getProvider();return t&&$o(this,Fv,t),Je(this,Fv)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(i=>i.id===t);if(!e)throw new Error("provider is required.");return gb({account:r,chain:n,transport:BS(e)})}async isAuthorized(){var t;try{if(this.options.shimDisconnect&&!((t=this.storage)!=null&&t.getItem(this.shimDisconnectKey)))return!1;if(!await this.getProvider())throw new Ra;return!!await this.getAccount()}catch{return!1}}async switchChain(t){var n,i,s;const e=await this.getProvider();if(!e)throw new Ra;const r=ze(t);try{return await Promise.all([e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise(o=>this.on("change",({chain:a})=>{(a==null?void 0:a.id)===t&&o()}))]),this.chains.find(o=>o.id===t)??{id:t,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(o){const a=this.chains.find(c=>c.id===t);if(!a)throw new Aue({chainId:t,connectorId:this.id});if(o.code===4902||((i=(n=o==null?void 0:o.data)==null?void 0:n.originalError)==null?void 0:i.code)===4902)try{if(await e.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((s=a.rpcUrls.public)==null?void 0:s.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),await this.getChainId()!==t)throw new Vr(new Error("User rejected switch after adding network."));return a}catch(c){throw new Vr(c)}throw this.isUserRejectedRequestError(o)?new Vr(o):new mc(o)}}async watchAsset({address:t,decimals:e=18,image:r,symbol:n}){const i=await this.getProvider();if(!i)throw new Ra;return i.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:e,image:r,symbol:n}}})}isUserRejectedRequestError(t){return t.code===4001}};Fv=new WeakMap;var WS=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},F2=(t,e,r)=>(WS(t,e,"read from private field"),r?r.call(t):e.get(t)),j2=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Jp=(t,e,r,n)=>(WS(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),khe=(t,e,r)=>(WS(t,e,"access private method"),r);const Ahe=t=>(e,r,n)=>{const i=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=o(n.getState());l=d=>{const h=o(d);if(!u(f,h)){const p=f;a(f=h,p)}},c!=null&&c.fireImmediately&&a(f,f)}return i(l)},t(e,r,n)},_he=Ahe;function Phe(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var s;const o=c=>c===null?null:JSON.parse(c,e==null?void 0:e.reviver),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,e==null?void 0:e.replacer)),removeItem:i=>r.removeItem(i)}}const e1=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return e1(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return e1(n)(r)}}}},The=(t,e)=>(r,n,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:b=>b,version:0,merge:(b,y)=>({...y,...b}),...e},o=!1;const a=new Set,c=new Set;let l;try{l=s.getStorage()}catch{}if(!l)return t((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...b)},n,i);const u=e1(s.serialize),f=()=>{const b=s.partialize({...n()});let y;const m=u({state:b,version:s.version}).then(g=>l.setItem(s.name,g)).catch(g=>{y=g});if(y)throw y;return m},d=i.setState;i.setState=(b,y)=>{d(b,y),f()};const h=t((...b)=>{r(...b),f()},n,i);let p;const v=()=>{var b;if(!l)return;o=!1,a.forEach(m=>m(n()));const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,n()))||void 0;return e1(l.getItem.bind(l))(s.name).then(m=>{if(m)return s.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==s.version){if(s.migrate)return s.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var g;return p=s.merge(m,(g=n())!=null?g:h),r(p,!0),f()}).then(()=>{y==null||y(p,void 0),o=!0,c.forEach(m=>m(p))}).catch(m=>{y==null||y(void 0,m)})};return i.persist={setOptions:b=>{s={...s,...b},b.getStorage&&(l=b.getStorage())},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:b=>(a.add(b),()=>{a.delete(b)}),onFinishHydration:b=>(c.add(b),()=>{c.delete(b)})},v(),p||h},Ihe=(t,e)=>(r,n,i)=>{let s={storage:Phe(()=>localStorage),partialize:v=>v,version:0,merge:(v,b)=>({...b,...v}),...e},o=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...v)},n,i);const u=()=>{const v=s.partialize({...n()});return l.setItem(s.name,{state:v,version:s.version})},f=i.setState;i.setState=(v,b)=>{f(v,b),u()};const d=t((...v)=>{r(...v),u()},n,i);let h;const p=()=>{var v,b;if(!l)return;o=!1,a.forEach(m=>{var g;return m((g=n())!=null?g:d)});const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(v=n())!=null?v:d))||void 0;return e1(l.getItem.bind(l))(s.name).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==s.version){if(s.migrate)return s.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var g;return h=s.merge(m,(g=n())!=null?g:d),r(h,!0),u()}).then(()=>{y==null||y(h,void 0),h=n(),o=!0,c.forEach(m=>m(h))}).catch(m=>{y==null||y(void 0,m)})};return i.persist={setOptions:v=>{s={...s,...v},v.storage&&(l=v.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},s.skipHydration||p(),h||d},Ohe=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?The(t,e):Ihe(t,e),Rhe=Ohe,sT=t=>{let e;const r=new Set,n=(c,l)=>{const u=typeof c=="function"?c(e):c;if(!Object.is(u,e)){const f=e;e=l??typeof u!="object"?u:Object.assign({},e,u),r.forEach(d=>d(e,f))}},i=()=>e,a={setState:n,getState:i,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{r.clear()}};return e=t(n,i,a),a},$he=t=>t?sT(t):sT;function HS(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,i]of t)if(!Object.is(i,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let n=0;nv===f.id)||(c=[...c,p.chain]),l[f.id]=[...l[f.id]||[],...p.rpcUrls.http],p.rpcUrls.webSocket&&(u[f.id]=[...u[f.id]||[],...p.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${f.name}". +`)}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidInputRpcError"})}}Object.defineProperty(zl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class W0 extends oi{constructor(e){super(e,{code:W0.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(W0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class vc extends oi{constructor(e){super(e,{code:vc.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(vc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class H0 extends oi{constructor(e){super(e,{code:H0.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(H0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class q0 extends oi{constructor(e){super(e,{code:q0.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(q0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class V0 extends oi{constructor(e){super(e,{code:V0.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(V0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class G0 extends oi{constructor(e){super(e,{code:G0.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(G0,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Vr extends gd{constructor(e){super(e,{code:Vr.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Vr,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class K0 extends gd{constructor(e){super(e,{code:K0.code,shortMessage:"The requested method and/or account has not been authorized by the user."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnauthorizedProviderError"})}}Object.defineProperty(K0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class Q0 extends gd{constructor(e){super(e,{code:Q0.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(Q0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class Y0 extends gd{constructor(e){super(e,{code:Y0.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(Y0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class J0 extends gd{constructor(e){super(e,{code:J0.code,shortMessage:"The Provider is not connected to the requested chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainDisconnectedError"})}}Object.defineProperty(J0,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class mc extends gd{constructor(e){super(e,{code:mc.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(mc,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class Qfe extends oi{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const Yfe=3;function X0(t,{abi:e,address:r,args:n,docsPath:i,functionName:s,sender:o}){const{code:a,data:c,message:l,shortMessage:u}=t instanceof _S?t:t instanceof ce?t.walk(d=>"data"in d)||t.walk():{};let f=t;return t instanceof cb?f=new Vfe({functionName:s}):[Yfe,zf.code].includes(a)&&(c||l||u)&&(f=new SC({abi:e,data:typeof c=="object"?c.data:c,functionName:s,message:u??l})),new qfe(f,{abi:e,args:n,contractAddress:r,docsPath:i,functionName:s,sender:o})}class bd extends ce{constructor({docsPath:e}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the WalletClient."].join(` +`),{docsPath:e,docsSlug:"account"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AccountNotFoundError"})}}class Jfe extends ce{constructor(e,{account:r,docsPath:n,chain:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d}){const h=D1({from:r==null?void 0:r.address,to:f,value:typeof d<"u"&&`${gS(d)} ${(i==null?void 0:i.nativeCurrency.symbol)||"ETH"}`,data:s,gas:o,gasPrice:typeof a<"u"&&`${ei(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${ei(c)} gwei`,maxPriorityFeePerGas:typeof l<"u"&&`${ei(l)} gwei`,nonce:u});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean)}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EstimateGasExecutionError"}),this.cause=e}}function TS(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(i=>i.code===Ju.code);return n instanceof ce?new Ju({cause:t,message:n.details}):Ju.nodeMessage.test(r)?new Ju({cause:t,message:t.details}):ly.nodeMessage.test(r)?new ly({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):vC.nodeMessage.test(r)?new vC({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):mC.nodeMessage.test(r)?new mC({cause:t,nonce:e==null?void 0:e.nonce}):yC.nodeMessage.test(r)?new yC({cause:t,nonce:e==null?void 0:e.nonce}):gC.nodeMessage.test(r)?new gC({cause:t,nonce:e==null?void 0:e.nonce}):bC.nodeMessage.test(r)?new bC({cause:t}):wC.nodeMessage.test(r)?new wC({cause:t,gas:e==null?void 0:e.gas}):EC.nodeMessage.test(r)?new EC({cause:t,gas:e==null?void 0:e.gas}):xC.nodeMessage.test(r)?new xC({cause:t}):uy.nodeMessage.test(r)?new uy({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new sb({cause:t})}function Xfe(t,{docsPath:e,...r}){let n=TS(t,r);return n instanceof sb&&(n=t),new Jfe(n,{docsPath:e,...r})}function IS(t,{format:e}){return e?Object.keys(e({})).reduce((n,i)=>(t!=null&&t.hasOwnProperty(i)&&(n[i]=t[i]),n),{}):{}}function j1(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i,to:s}=t,o=e?Qi(e):void 0;if(o&&!Uf(o.address))throw new F0({address:o.address});if(s&&!Uf(s))throw new F0({address:s});if(typeof r<"u"&&(typeof n<"u"||typeof i<"u"))throw new _ue;if(n&&n>2n**256n-1n)throw new ly({maxFeePerGas:n});if(i&&n&&i>n)throw new uy({maxFeePerGas:n,maxPriorityFeePerGas:i})}class Zfe extends ce{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class OS extends ce{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class ede extends ce{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ei(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class tde extends ce{constructor({blockHash:e,blockNumber:r}){let n="Block";e&&(n=`Block at hash "${e}"`),r&&(n=`Block at number "${r}"`),super(`${n} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BlockNotFoundError"})}}async function yc(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:i}={}){var u,f,d;const s=n??"latest",o=i??!1,a=r!==void 0?ze(r):void 0;let c=null;if(e?c=await t.request({method:"eth_getBlockByHash",params:[e,o]}):c=await t.request({method:"eth_getBlockByNumber",params:[a||s,o]}),!c)throw new tde({blockHash:e,blockNumber:r});return(((d=(f=(u=t.chain)==null?void 0:u.formatters)==null?void 0:f.block)==null?void 0:d.format)||IL)(c)}async function RS(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function rde(t,e){return YL(t,e)}async function YL(t,e){var s,o,a;const{block:r,chain:n=t.chain,request:i}=e||{};if(typeof((s=n==null?void 0:n.fees)==null?void 0:s.defaultPriorityFee)=="function"){const c=r||await yc(t);return n.fees.defaultPriorityFee({block:c,client:t,request:i})}else if((o=n==null?void 0:n.fees)!=null&&o.defaultPriorityFee)return(a=n==null?void 0:n.fees)==null?void 0:a.defaultPriorityFee;try{const c=await t.request({method:"eth_maxPriorityFeePerGas"});return nb(c)}catch{const[c,l]=await Promise.all([r?Promise.resolve(r):yc(t),RS(t)]);if(typeof c.baseFeePerGas!="bigint")throw new OS;const u=l-c.baseFeePerGas;return u<0n?0n:u}}async function nde(t,e){return AC(t,e)}async function AC(t,e){var d;const{block:r,chain:n=t.chain,request:i,type:s="eip1559"}=e||{},o=await(async()=>{var h,p;return typeof((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:i}):((p=n==null?void 0:n.fees)==null?void 0:p.baseFeeMultiplier)??1.2})();if(o<1)throw new Zfe;const c=10**o.toString().split(".")[1].length,l=h=>h*BigInt(o*c)/BigInt(c),u=r||await yc(t);if(typeof((d=n==null?void 0:n.fees)==null?void 0:d.estimateFeesPerGas)=="function")return n.fees.estimateFeesPerGas({block:r,client:t,multiply:l,request:i,type:s});if(s==="eip1559"){if(typeof u.baseFeePerGas!="bigint")throw new OS;const h=i!=null&&i.maxPriorityFeePerGas?i.maxPriorityFeePerGas:await YL(t,{block:u,chain:n,request:i}),p=l(u.baseFeePerGas);return{maxFeePerGas:(i==null?void 0:i.maxFeePerGas)??p+h,maxPriorityFeePerGas:h}}return{gasPrice:(i==null?void 0:i.gasPrice)??l(await RS(t))}}async function JL(t,{address:e,blockTag:r="latest",blockNumber:n}){const i=await t.request({method:"eth_getTransactionCount",params:[e,n?ze(n):r]});return Nn(i)}async function db(t,e){const{account:r=t.account,chain:n,gas:i,nonce:s,type:o}=e;if(!r)throw new bd;const a=Qi(r),c=await yc(t,{blockTag:"latest"}),l={...e,from:a.address};if(typeof s>"u"&&(l.nonce=await JL(t,{address:a.address,blockTag:"pending"})),typeof o>"u")try{l.type=Oue(l)}catch{l.type=typeof c.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(l.type==="eip1559"){const{maxFeePerGas:u,maxPriorityFeePerGas:f}=await AC(t,{block:c,chain:n,request:l});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(l.gas=await $S(t,{...l,account:{address:a.address,type:"json-rpc"}})),j1(l),l}async function $S(t,e){var i,s,o;const r=e.account??t.account;if(!r)throw new bd({docsPath:"/docs/actions/public/estimateGas"});const n=Qi(r);try{const{accessList:a,blockNumber:c,blockTag:l,data:u,gas:f,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:v,to:b,value:y,...m}=n.type==="local"?await db(t,e):e,S=(c?ze(c):void 0)||l;j1(e);const P=((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionRequest)==null?void 0:o.format)||ib,T=P({...IS(m,{format:P}),from:n.address,accessList:a,data:u,gas:f,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:p,nonce:v,to:b,value:y}),w=await t.request({method:"eth_estimateGas",params:S?[T,S]:[T]});return BigInt(w)}catch(a){throw Xfe(a,{...e,account:n,chain:t.chain})}}async function ide(t,{abi:e,address:r,args:n,functionName:i,...s}){const o=Dc({abi:e,args:n,functionName:i});try{return await $S(t,{data:o,to:r,...s})}catch(a){const c=s.account?Qi(s.account):void 0;throw X0(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:c==null?void 0:c.address})}}const $2="/docs/contract/decodeFunctionResult";function wd({abi:t,args:e,functionName:r,data:n}){let i=t[0];if(r&&(i=F1({abi:t,args:e,name:r}),!i))throw new fy(r,{docsPath:$2});if(i.type!=="function")throw new fy(void 0,{docsPath:$2});if(!i.outputs)throw new que(i.name,{docsPath:$2});const s=fb(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}const sde="modulepreload",ode=function(t,e){return new URL(t,e).href},ZP={},XL=function(e,r,n){if(!r||r.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=ode(s,n),s in ZP)return;ZP[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const f=i[u];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":sde,o||(l.as="script",l.crossOrigin=""),l.href=s,document.head.appendChild(l),o)return new Promise((u,f)=>{l.addEventListener("load",u),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},_C=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],ZL=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],eF=[...ZL,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],ade=[...ZL,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}],e9=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t9=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],cde=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],lde="0x82ad56cb";function ude(t,{docsPath:e,...r}){let n=TS(t,r);return n instanceof sb&&(n=t),new QL(n,{docsPath:e,...r})}const M2=new Map;function MS({fn:t,id:e,shouldSplitBatch:r,wait:n=0}){const i=async()=>{const l=a();s();const u=l.map(({args:f})=>f);u.length!==0&&t(u).then(f=>{l.forEach(({pendingPromise:d},h)=>{var p;return(p=d.resolve)==null?void 0:p.call(d,[f[h],f])})}).catch(f=>{l.forEach(({pendingPromise:d})=>{var h;return(h=d.reject)==null?void 0:h.call(d,f)})})},s=()=>M2.delete(e),o=()=>a().map(({args:l})=>l),a=()=>M2.get(e)||[],c=l=>M2.set(e,[...a(),l]);return{flush:s,async schedule(l){const u={},f=new Promise((p,v)=>{u.resolve=p,u.reject=v});return(r==null?void 0:r([...o(),l]))&&i(),a().length>0?(c({args:l,pendingPromise:u}),f):(c({args:l,pendingPromise:u}),setTimeout(i,n),f)}}}async function hb(t,e){var y,m,g,S;const{account:r=t.account,batch:n=!!((y=t.batch)!=null&&y.multicall),blockNumber:i,blockTag:s="latest",accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:d,to:h,value:p,...v}=e,b=r?Qi(r):void 0;try{j1(e);const T=(i?ze(i):void 0)||s,w=((S=(g=(m=t.chain)==null?void 0:m.formatters)==null?void 0:g.transactionRequest)==null?void 0:S.format)||ib,I=w({...IS(v,{format:w}),from:b==null?void 0:b.address,accessList:o,data:a,gas:c,gasPrice:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:d,to:h,value:p});if(n&&fde({request:I}))try{return await dde(t,{...I,blockNumber:i,blockTag:s})}catch(j){if(!(j instanceof CL)&&!(j instanceof pC))throw j}const B=await t.request({method:"eth_call",params:T?[I,T]:[I]});return B==="0x"?{data:void 0}:{data:B}}catch(P){const T=hde(P),{offchainLookup:w,offchainLookupSignature:I}=await XL(()=>import("./ccip-85cbe570.js"),[],import.meta.url);if((T==null?void 0:T.slice(0,10))===I&&h)return{data:await w(t,{data:T,to:h})};throw ude(P,{...e,account:b,chain:t.chain})}}function fde({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(lde)||!r||Object.values(n).filter(i=>typeof i<"u").length>0)}async function dde(t,e){var v;const{batchSize:r=1024,wait:n=0}=typeof((v=t.batch)==null?void 0:v.multicall)=="object"?t.batch.multicall:{},{blockNumber:i,blockTag:s="latest",data:o,multicallAddress:a,to:c}=e;let l=a;if(!l){if(!t.chain)throw new CL;l=vd({blockNumber:i,chain:t.chain,contract:"multicall3"})}const f=(i?ze(i):void 0)||s,{schedule:d}=MS({id:`${t.uid}.${f}`,wait:n,shouldSplitBatch(b){return b.reduce((m,{data:g})=>m+(g.length-2),0)>r*2},fn:async b=>{const y=b.map(S=>({allowFailure:!0,callData:S.data,target:S.to})),m=Dc({abi:_C,args:[y],functionName:"aggregate3"}),g=await t.request({method:"eth_call",params:[{data:m,to:l},f]});return wd({abi:_C,args:[y],functionName:"aggregate3",data:g||"0x"})}}),[{returnData:h,success:p}]=await d({data:o,to:c});if(!p)throw new _S({data:h});return h==="0x"?{data:void 0}:{data:h}}function hde(t){if(!(t instanceof ce))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function gc(t,{abi:e,address:r,args:n,functionName:i,...s}){const o=Dc({abi:e,args:n,functionName:i});try{const{data:a}=await hb(t,{data:o,to:r,...s});return wd({abi:e,args:n,functionName:i,data:a||"0x"})}catch(a){throw X0(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}async function pde(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:s,...o}){const a=o.account?Qi(o.account):void 0,c=Dc({abi:e,args:n,functionName:s});try{const{data:l}=await hb(t,{batch:!1,data:`${c}${i?i.replace("0x",""):""}`,to:r,...o});return{result:wd({abi:e,args:n,functionName:s,data:l||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:i,functionName:s,...o}}}catch(l){throw X0(l,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:s,sender:a==null?void 0:a.address})}}const N2=new Map,r9=new Map;let vde=0;function Ed(t,e,r){const n=++vde,i=()=>N2.get(t)||[],s=()=>{const u=i();N2.set(t,u.filter(f=>f.id!==n))},o=()=>{const u=r9.get(t);i().length===1&&u&&u(),s()},a=i();if(N2.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const c={};for(const u in e)c[u]=(...f)=>{const d=i();d.length!==0&&d.forEach(h=>{var p,v;return(v=(p=h.fns)[u])==null?void 0:v.call(p,...f)})};const l=r(c);return typeof l=="function"&&r9.set(t,l),o}async function hy(t){return new Promise(e=>setTimeout(e,t))}function U1(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let i=!0;const s=()=>i=!1;return(async()=>{let a;e&&(a=await t({unpoll:s}));const c=await(r==null?void 0:r(a))??n;await hy(c);const l=async()=>{i&&(await t({unpoll:s}),await hy(n),l())};l()})(),s}const n9="/docs/contract/decodeEventLog";function z1({abi:t,data:e,strict:r,topics:n}){const i=r??!0,[s,...o]=n;if(!s)throw new Wue({docsPath:n9});const a=t.find(p=>p.type==="event"&&s===xS(Nc(p)));if(!(a&&"name"in a)||a.type!=="event")throw new Hue(s,{docsPath:n9});const{name:c,inputs:l}=a,u=l==null?void 0:l.some(p=>!("name"in p&&p.name));let f=u?[]:{};const d=l.filter(p=>"indexed"in p&&p.indexed);if(o.length>0)for(let p=0;p!("indexed"in p&&p.indexed));if(h.length>0){if(e&&e!=="0x")try{const p=fb(h,e);if(p)if(u)f=[...f,...p];else for(let v=0;v0?f:void 0}}function mde({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(fb([t],e)||[])[0]}const yde=new Map,gde=new Map;function bde(t){const e=(i,s)=>({clear:()=>s.delete(i),get:()=>s.get(i),set:o=>s.set(i,o)}),r=e(t,yde),n=e(t,gde);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function wde(t,{cacheKey:e,cacheTime:r=1/0}){const n=bde(e),i=n.response.get();if(i&&r>0&&new Date().getTime()-i.created.getTime()`blockNumber.${t}`;async function W1(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await wde(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Ede(t.uid),cacheTime:r??e});return BigInt(n)}async function pb(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(i=>{var s;if(typeof i=="string")return i;try{const{eventName:o,args:a}="abi"in e&&e.abi?z1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Cs(i,{args:a,eventName:o})}catch(o){let a,c;if(o instanceof Ul||o instanceof yd){if("strict"in e&&e.strict)return;a=o.abiItem.name,c=(s=o.abiItem.inputs)==null?void 0:s.some(l=>!("name"in l&&l.name))}return Cs(i,{args:c?[]:{},eventName:a})}}).filter(Boolean)}async function NS(t,{address:e,blockHash:r,fromBlock:n,toBlock:i,event:s,events:o,args:a,strict:c}={}){const l=c??!1,u=o??(s?[s]:void 0);let f=[];u&&(f=[u.flatMap(h=>B1({abi:[h],eventName:h.name,args:a}))],s&&(f=f[0]));let d;return r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:f,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:f,fromBlock:typeof n=="bigint"?ze(n):n,toBlock:typeof i=="bigint"?ze(i):i}]}),d.map(h=>{var p;try{const{eventName:v,args:b}=u?z1({abi:u,data:h.data,topics:h.topics,strict:l}):{eventName:void 0,args:void 0};return Cs(h,{args:b,eventName:v})}catch(v){let b,y;if(v instanceof Ul||v instanceof yd){if(l)return;b=v.abiItem.name,y=(p=v.abiItem.inputs)==null?void 0:p.some(m=>!("name"in m&&m.name))}return Cs(h,{args:y?[]:{},eventName:b})}}).filter(Boolean)}async function vb(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function xde(t,{abi:e,address:r,args:n,batch:i=!0,eventName:s,onError:o,onLogs:a,poll:c,pollingInterval:l=t.pollingInterval,strict:u}){return(typeof c<"u"?c:t.transport.type!=="webSocket")?(()=>{const p=Dn(["watchContractEvent",r,n,i,t.uid,s,l]),v=u??!1;return Ed(p,{onLogs:a,onError:o},b=>{let y,m,g=!1;const S=U1(async()=>{var P;if(!g){try{m=await VL(t,{abi:e,address:r,args:n,eventName:s,strict:v})}catch{}g=!0;return}try{let T;if(m)T=await pb(t,{filter:m});else{const w=await W1(t);y&&y!==w?T=await NS(t,{address:r,args:n,fromBlock:y+1n,toBlock:w,event:F1({abi:e,name:s})}):T=[],y=w}if(T.length===0)return;i?b.onLogs(T):T.forEach(w=>b.onLogs([w]))}catch(T){m&&T instanceof zl&&(g=!1),(P=b.onError)==null||P.call(b,T)}},{emitOnBegin:!0,interval:l});return async()=>{m&&await vb(t,{filter:m}),S()}})})():(()=>{let p=!0,v=()=>p=!1;return(async()=>{try{const b=s?B1({abi:e,eventName:s,args:n}):[],{unsubscribe:y}=await t.transport.subscribe({params:["logs",{address:r,topics:b}],onData(m){var S;if(!p)return;const g=m.result;try{const{eventName:P,args:T}=z1({abi:e,data:g.data,topics:g.topics,strict:u}),w=Cs(g,{args:T,eventName:P});a([w])}catch(P){let T,w;if(P instanceof Ul||P instanceof yd){if(u)return;T=P.abiItem.name,w=(S=P.abiItem.inputs)==null?void 0:S.some(B=>!("name"in B&&B.name))}const I=Cs(g,{args:w?[]:{},eventName:T});a([I])}},onError(m){o==null||o(m)}});v=y,p||v()}catch(b){o==null||o(b)}})(),v})()}function Cde(t,{docsPath:e,...r}){let n=TS(t,r);return n instanceof sb&&(n=t),new Tue(n,{docsPath:e,...r})}async function Z0(t){const e=await t.request({method:"eth_chainId"});return Nn(e)}async function DS(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function LS(t,e){var v,b,y;const{account:r=t.account,chain:n=t.chain,accessList:i,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,...h}=e;if(!r)throw new bd({docsPath:"/docs/actions/wallet/sendTransaction"});const p=Qi(r);try{j1(e);let m;if(n!==null&&(m=await Z0(t),SL({currentChainId:m,chain:n})),p.type==="local"){const P=await db(t,{account:p,accessList:i,chain:n,data:s,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d,...h});m||(m=await Z0(t));const T=(v=n==null?void 0:n.serializers)==null?void 0:v.transaction,w=await p.signTransaction({...P,chainId:m},{serializer:T});return await DS(t,{serializedTransaction:w})}const g=((y=(b=n==null?void 0:n.formatters)==null?void 0:b.transactionRequest)==null?void 0:y.format)||ib,S=g({...IS(h,{format:g}),accessList:i,data:s,from:p.address,gas:o,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:u,to:f,value:d});return await t.request({method:"eth_sendTransaction",params:[S]})}catch(m){throw Cde(m,{...e,account:p,chain:e.chain||void 0})}}async function Sde(t,{abi:e,address:r,args:n,dataSuffix:i,functionName:s,...o}){const a=Dc({abi:e,args:n,functionName:s});return await LS(t,{data:`${a}${i?i.replace("0x",""):""}`,to:r,...o})}async function kde(t,{chain:e}){const{id:r,name:n,nativeCurrency:i,rpcUrls:s,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:ze(r),chainName:n,nativeCurrency:i,rpcUrls:s.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]})}const PC=256;let Qp=PC,Yp;function Ade(t=11){if(!Yp||Qp+t>PC*2){Yp="",Qp=0;for(let e=0;e{const y=b(v);for(const g in h)delete y[g];const m={...v,...y};return Object.assign(m,{extend:p(m)})}}return Object.assign(h,{extend:p(h)})}function rF(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((i,s)=>{const o=async({count:a=0}={})=>{const c=async({error:l})=>{const u=typeof e=="function"?e({count:a,error:l}):e;u&&await hy(u),o({count:a+1})};try{const l=await t();i(l)}catch(l){if(a"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof jh&&t.status?t.status!==403&&t.status!==408&&t.status!==413&&t.status!==429&&t.status!==500&&t.status!==502&&t.status!==503&&t.status!==504:!1;function _de(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>rF(async()=>{try{return await t(n)}catch(i){const s=i;switch(s.code){case B0.code:throw new B0(s);case j0.code:throw new j0(s);case U0.code:throw new U0(s);case z0.code:throw new z0(s);case zf.code:throw new zf(s);case zl.code:throw new zl(s);case W0.code:throw new W0(s);case vc.code:throw new vc(s);case H0.code:throw new H0(s);case q0.code:throw new q0(s);case V0.code:throw new V0(s);case G0.code:throw new G0(s);case Vr.code:throw new Vr(s);case K0.code:throw new K0(s);case Q0.code:throw new Q0(s);case Y0.code:throw new Y0(s);case J0.code:throw new J0(s);case mc.code:throw new mc(s);case 5e3:throw new Vr(s);default:throw i instanceof ce?i:new Qfe(s)}}},{delay:({count:i,error:s})=>{var o;if(s&&s instanceof jh){const a=(o=s==null?void 0:s.headers)==null?void 0:o.get("Retry-After");if(a!=null&&a.match(/\d/))return parseInt(a)*1e3}return~~(1<!nF(i)})}function mb({key:t,name:e,request:r,retryCount:n=3,retryDelay:i=150,timeout:s,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:i,timeout:s,type:o},request:_de(r,{retryCount:n,retryDelay:i}),value:a}}function FS(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:i}=e;return({retryCount:s})=>mb({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??s,retryDelay:i,type:"custom"})}function i9(t,e={}){const{key:r="fallback",name:n="Fallback",rank:i=!1,retryCount:s,retryDelay:o}=e;return({chain:a,pollingInterval:c=4e3,timeout:l})=>{let u=t,f=()=>{};const d=mb({key:r,name:n,async request({method:h,params:p}){const v=async(b=0)=>{const y=u[b]({chain:a,retryCount:0,timeout:l});try{const m=await y.request({method:h,params:p});return f({method:h,params:p,response:m,transport:y,status:"success"}),m}catch(m){if(f({error:m,method:h,params:p,transport:y,status:"error"}),nF(m)||b===u.length-1)throw m;return v(b+1)}};return v()},retryCount:s,retryDelay:o,type:"fallback"},{onResponse:h=>f=h,transports:u.map(h=>h({chain:a,retryCount:0}))});if(i){const h=typeof i=="object"?i:{};Pde({chain:a,interval:h.interval??c,onTransports:p=>u=p,sampleCount:h.sampleCount,timeout:h.timeout,transports:u,weights:h.weights})}return d}}function Pde({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:i=1e3,transports:s,weights:o={}}){const{stability:a=.7,latency:c=.3}=o,l=[],u=async()=>{const f=await Promise.all(s.map(async p=>{const v=p({chain:t,retryCount:0,timeout:i}),b=Date.now();let y,m;try{await v.request({method:"net_listening"}),m=1}catch{m=0}finally{y=Date.now()}return{latency:y-b,success:m}}));l.push(f),l.length>n&&l.shift();const d=Math.max(...l.map(p=>Math.max(...p.map(({latency:v})=>v)))),h=s.map((p,v)=>{const b=l.map(P=>P[v].latency),m=1-b.reduce((P,T)=>P+T,0)/b.length/d,g=l.map(P=>P[v].success),S=g.reduce((P,T)=>P+T,0)/g.length;return S===0?[0,v]:[c*m+a*S,v]}).sort((p,v)=>v[0]-p[0]);r(h.map(([,p])=>s[p])),await hy(e),u()};u()}class iF extends ce{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Iu=null;typeof WebSocket<"u"?Iu=WebSocket:typeof MozWebSocket<"u"?Iu=MozWebSocket:typeof global<"u"?Iu=global.WebSocket||global.MozWebSocket:typeof window<"u"?Iu=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Iu=self.WebSocket||self.MozWebSocket);const s9=Iu;function sF(t,{errorInstance:e,timeout:r,signal:n}){return new Promise((i,s)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():s(e)},r)),i(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&s(e),s(a)}finally{clearTimeout(o)}})()})}let TC=0;async function Tde(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var a;const{headers:i,method:s,signal:o}=r;try{const c=await sF(async({signal:u})=>await fetch(t,{...r,body:Array.isArray(e)?Dn(e.map(d=>({jsonrpc:"2.0",id:d.id??TC++,...d}))):Dn({jsonrpc:"2.0",id:e.id??TC++,...e}),headers:{...i,"Content-Type":"application/json"},method:s||"POST",signal:o||(n>0?u:void 0)}),{errorInstance:new kC({body:e,url:t}),timeout:n,signal:!0});let l;if((a=c.headers.get("Content-Type"))!=null&&a.startsWith("application/json")?l=await c.json():l=await c.text(),!c.ok)throw new jh({body:e,details:Dn(l.error)||c.statusText,headers:c.headers,status:c.status,url:t});return l}catch(c){throw c instanceof jh||c instanceof kC?c:new jh({body:e,details:c.message,url:t})}}const D2=new Map;async function L2(t){let e=D2.get(t);if(e)return e;const{schedule:r}=MS({id:t,fn:async()=>{const s=new s9(t),o=new Map,a=new Map,c=({data:u})=>{const f=JSON.parse(u),d=f.method==="eth_subscription",h=d?f.params.subscription:f.id,p=d?a:o,v=p.get(h);v&&v({data:u}),d||p.delete(h)},l=()=>{D2.delete(t),s.removeEventListener("close",l),s.removeEventListener("message",c)};return s.addEventListener("close",l),s.addEventListener("message",c),s.readyState===s9.CONNECTING&&await new Promise((u,f)=>{s&&(s.onopen=u,s.onerror=f)}),e=Object.assign(s,{requests:o,subscriptions:a}),D2.set(t,e),[e]}}),[n,[i]]=await r();return i}function Ide(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new Gfe({body:e,url:t.url,details:"Socket is closed."});const n=TC++,i=({data:s})=>{var a;const o=JSON.parse(s);typeof o.id=="number"&&n!==o.id||(r==null||r(o),e.method==="eth_subscribe"&&typeof o.result=="string"&&t.subscriptions.set(o.result,i),e.method==="eth_unsubscribe"&&t.subscriptions.delete((a=e.params)==null?void 0:a[0]))};return t.requests.set(n,i),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Ode(t,{body:e,timeout:r=1e4}){return sF(()=>new Promise(n=>mf.webSocket(t,{body:e,onResponse:n})),{errorInstance:new kC({body:e,url:t.url}),timeout:r})}const mf={http:Tde,webSocket:Ide,webSocketAsync:Ode};function oF(t,e={}){const{batch:r,fetchOptions:n,key:i="http",name:s="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:c,timeout:l})=>{const{batchSize:u=1e3,wait:f=0}=typeof r=="object"?r:{},d=e.retryCount??c,h=l??e.timeout??1e4,p=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!p)throw new iF;return mb({key:i,name:s,async request({method:v,params:b}){const y={method:v,params:b},{schedule:m}=MS({id:`${t}`,wait:f,shouldSplitBatch(T){return T.length>u},fn:T=>mf.http(p,{body:T,fetchOptions:n,timeout:h})}),g=async T=>r?m(T):[await mf.http(p,{body:T,fetchOptions:n,timeout:h})],[{error:S,result:P}]=await g(y);if(S)throw new PS({body:y,error:S,url:p});return P},retryCount:d,retryDelay:o,timeout:h,type:"http"},{url:t})}}function BS(t,e){var n,i,s;if(!(t instanceof ce))return!1;const r=t.walk(o=>o instanceof SC);return r instanceof SC?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((i=r.data)==null?void 0:i.errorName)==="ResolverWildcardNotSupported"||(s=r.reason)!=null&&s.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===GL[50]):!1}function aF(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return mo(e)?e:null}function Fv(t){let e=new Uint8Array(32).fill(0);if(!t)return L0(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const i=aF(r[n]),s=i?jl(i):Qn(Lo(r[n]),"bytes");e=Qn(Xo([e,s]),"bytes")}return L0(e)}function Rde(t){return`[${t.slice(2)}]`}function $de(t){const e=new Uint8Array(32).fill(0);return t?aF(t)||Qn(Lo(t)):L0(e)}function yb(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(Lo(e).byteLength+2);let n=0;const i=e.split(".");for(let s=0;s255&&(o=Lo(Rde($de(i[s])))),r[n]=o.length,r.set(o,n+1),n+=o.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}async function Mde(t,{blockNumber:e,blockTag:r,coinType:n,name:i,universalResolverAddress:s}){let o=s;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=vd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=Dc({abi:t9,functionName:"addr",...n!=null?{args:[Fv(i),BigInt(n)]}:{args:[Fv(i)]}}),c=await gc(t,{address:o,abi:eF,functionName:"resolve",args:[ua(yb(i)),a],blockNumber:e,blockTag:r});if(c[0]==="0x")return null;const l=wd({abi:t9,args:n!=null?[Fv(i),BigInt(n)]:void 0,functionName:"addr",data:c[0]});return l==="0x"||pf(l)==="0x00"?null:l}catch(a){if(BS(a,"resolve"))return null;throw a}}class Nde extends ce{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidMetadataError"})}}class Xd extends ce{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class jS extends ce{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUriResolutionError"})}}class Dde extends ce{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarUnsupportedNamespaceError"})}}const Lde=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Fde=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,Bde=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,jde=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function Ude(t){try{const e=await fetch(t,{method:"HEAD"});if(e.status===200){const r=e.headers.get("content-type");return r==null?void 0:r.startsWith("image/")}return!1}catch(e){return typeof e=="object"&&typeof e.response<"u"||!globalThis.hasOwnProperty("Image")?!1:new Promise(r=>{const n=new Image;n.onload=()=>{r(!0)},n.onerror=()=>{r(!1)},n.src=t})}}function o9(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function cF({uri:t,gatewayUrls:e}){const r=Bde.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=o9(e==null?void 0:e.ipfs,"https://ipfs.io"),i=o9(e==null?void 0:e.arweave,"https://arweave.net"),s=t.match(Lde),{protocol:o,subpath:a,target:c,subtarget:l=""}=(s==null?void 0:s.groups)||{},u=o==="ipns:/"||a==="ipns/",f=o==="ipfs:/"||a==="ipfs/"||Fde.test(t);if(t.startsWith("http")&&!u&&!f){let h=t;return e!=null&&e.arweave&&(h=t.replace(/https:\/\/arweave.net/g,e==null?void 0:e.arweave)),{uri:h,isOnChain:!1,isEncoded:!1}}if((u||f)&&c)return{uri:`${n}/${u?"ipns":"ipfs"}/${c}${l}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&c)return{uri:`${i}/${c}${l||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(jde,"");if(d.startsWith("i.json());return await US({gatewayUrls:t,uri:lF(r)})}catch{throw new jS({uri:e})}}async function US({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=cF({uri:e,gatewayUrls:t});if(n||await Ude(r))return r;throw new jS({uri:e})}function Wde(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,i]=e.split("/"),[s,o]=r.split(":"),[a,c]=n.split(":");if(!s||s.toLowerCase()!=="eip155")throw new Xd({reason:"Only EIP-155 supported"});if(!o)throw new Xd({reason:"Chain ID not found"});if(!c)throw new Xd({reason:"Contract address not found"});if(!i)throw new Xd({reason:"Token ID not found"});if(!a)throw new Xd({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:c,tokenID:i}}async function Hde(t,{nft:e}){if(e.namespace==="erc721")return gc(t,{address:e.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(e.tokenID)]});if(e.namespace==="erc1155")return gc(t,{address:e.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(e.tokenID)]});throw new Dde({namespace:e.namespace})}async function qde(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?Vde(t,{gatewayUrls:e,record:r}):US({uri:r,gatewayUrls:e})}async function Vde(t,{gatewayUrls:e,record:r}){const n=Wde(r),i=await Hde(t,{nft:n}),{uri:s,isOnChain:o,isEncoded:a}=cF({uri:i,gatewayUrls:e});if(o&&(s.includes("data:application/json;base64,")||s.startsWith("{"))){const l=a?atob(s.replace("data:application/json;base64,","")):s,u=JSON.parse(l);return US({uri:lF(u),gatewayUrls:e})}let c=n.tokenID;return n.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),zde({gatewayUrls:e,uri:s.replace(/(?:0x)?{id}/,c)})}async function uF(t,{blockNumber:e,blockTag:r,name:n,key:i,universalResolverAddress:s}){let o=s;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=vd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=await gc(t,{address:o,abi:eF,functionName:"resolve",args:[ua(yb(n)),Dc({abi:e9,functionName:"text",args:[Fv(n),i]})],blockNumber:e,blockTag:r});if(a[0]==="0x")return null;const c=wd({abi:e9,functionName:"text",data:a[0]});return c===""?null:c}catch(a){if(BS(a,"resolve"))return null;throw a}}async function Gde(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:i,universalResolverAddress:s}){const o=await uF(t,{blockNumber:e,blockTag:r,key:"avatar",name:i,universalResolverAddress:s});if(!o)return null;try{return await qde(t,{record:o,gatewayUrls:n})}catch{return null}}async function Kde(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:i}){let s=i;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=vd({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const o=`${e.toLowerCase().substring(2)}.addr.reverse`;try{return(await gc(t,{address:s,abi:ade,functionName:"reverse",args:[ua(yb(o))],blockNumber:r,blockTag:n}))[0]}catch(a){if(BS(a,"reverse"))return null;throw a}}async function Qde(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:i}){let s=i;if(!s){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");s=vd({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await gc(t,{address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[ua(yb(n))],blockNumber:e,blockTag:r});return o}async function Yde(t){const e=ub(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function fF(t,{address:e,args:r,event:n,events:i,fromBlock:s,strict:o,toBlock:a}={}){const c=i??(n?[n]:void 0),l=ub(t,{method:"eth_newFilter"});let u=[];c&&(u=[c.flatMap(d=>B1({abi:[d],eventName:d.name,args:r}))],n&&(u=u[0]));const f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof s=="bigint"?ze(s):s,toBlock:typeof a=="bigint"?ze(a):a,...u.length?{topics:u}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:s,id:f,request:l(f),strict:o,toBlock:a,type:"event"}}async function dF(t){const e=ub(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function Jde(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r?ze(r):void 0,s=await t.request({method:"eth_getBalance",params:[e,i||n]});return BigInt(s)}async function Xde(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const i=r!==void 0?ze(r):void 0;let s;return e?s=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):s=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[i||n]}),Nn(s)}async function Zde(t,{address:e,blockNumber:r,blockTag:n="latest"}){const i=r!==void 0?ze(r):void 0,s=await t.request({method:"eth_getCode",params:[e,i||n]});if(s!=="0x")return s}function ehe(t){var e;return{baseFeePerGas:t.baseFeePerGas.map(r=>BigInt(r)),gasUsedRatio:t.gasUsedRatio,oldestBlock:BigInt(t.oldestBlock),reward:(e=t.reward)==null?void 0:e.map(r=>r.map(n=>BigInt(n)))}}async function the(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){const s=r?ze(r):void 0,o=await t.request({method:"eth_feeHistory",params:[ze(e),s||n,i]});return ehe(o)}async function rhe(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(i=>{var s;try{const{eventName:o,args:a}="abi"in e&&e.abi?z1({abi:e.abi,data:i.data,topics:i.topics,strict:r}):{eventName:void 0,args:void 0};return Cs(i,{args:a,eventName:o})}catch(o){let a,c;if(o instanceof Ul||o instanceof yd){if("strict"in e&&e.strict)return;a=o.abiItem.name,c=(s=o.abiItem.inputs)==null?void 0:s.some(l=>!("name"in l&&l.name))}return Cs(i,{args:c?[]:{},eventName:a})}}).filter(Boolean)}async function nhe(t,{address:e,blockNumber:r,blockTag:n="latest",slot:i}){const s=r!==void 0?ze(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,i,s||n]})}async function zS(t,{blockHash:e,blockNumber:r,blockTag:n,hash:i,index:s}){var u,f,d;const o=n||"latest",a=r!==void 0?ze(r):void 0;let c=null;if(i?c=await t.request({method:"eth_getTransactionByHash",params:[i]}):e?c=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,ze(s)]}):(a||o)&&(c=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,ze(s)]})),!c)throw new RL({blockHash:e,blockNumber:r,blockTag:o,hash:i,index:s});return(((d=(f=(u=t.chain)==null?void 0:u.formatters)==null?void 0:f.transaction)==null?void 0:d.format)||TL)(c)}async function ihe(t,{hash:e,transactionReceipt:r}){const[n,i]=await Promise.all([W1(t),e?zS(t,{hash:e}):void 0]),s=(r==null?void 0:r.blockNumber)||(i==null?void 0:i.blockNumber);return s?n-s+1n:0n}async function IC(t,{hash:e}){var i,s,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new $L({hash:e});return(((o=(s=(i=t.chain)==null?void 0:i.formatters)==null?void 0:s.transactionReceipt)==null?void 0:o.format)||Eue)(r)}async function she(t,e){var v;const{allowFailure:r=!0,batchSize:n,blockNumber:i,blockTag:s,contracts:o,multicallAddress:a}=e,c=n??(typeof((v=t.batch)==null?void 0:v.multicall)=="object"&&t.batch.multicall.batchSize||1024);let l=a;if(!l){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");l=vd({blockNumber:i,chain:t.chain,contract:"multicall3"})}const u=[[]];let f=0,d=0;for(let b=0;b0&&d>c&&u[f].length>0&&(f++,d=(P.length-2)/2,u[f]=[]),u[f]=[...u[f],{allowFailure:!0,callData:P,target:m}]}catch(P){const T=X0(P,{abi:y,address:m,args:g,docsPath:"/docs/contract/multicall",functionName:S});if(!r)throw T;u[f]=[...u[f],{allowFailure:!0,callData:"0x",target:m}]}}const h=await Promise.allSettled(u.map(b=>gc(t,{abi:_C,address:l,args:[b],blockNumber:i,blockTag:s,functionName:"aggregate3"}))),p=[];for(let b=0;b"u"?{}:t,s={EIP712Domain:gF({domain:i}),...n};yF({domain:i,message:e,primaryType:r,types:s});const o=["0x1901"];return i&&o.push(lhe({domain:i,types:s})),r!=="EIP712Domain"&&o.push(hF({data:e,primaryType:r,types:s})),Qn(Xo(o))}function lhe({domain:t,types:e}){return hF({data:t,primaryType:"EIP712Domain",types:e})}function hF({data:t,primaryType:e,types:r}){const n=pF({data:t,primaryType:e,types:r});return Qn(n)}function pF({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],i=[uhe({primaryType:e,types:r})];for(const s of r[e]){const[o,a]=mF({types:r,name:s.name,type:s.type,value:t[s.name]});n.push(o),i.push(a)}return L1(n,i)}function uhe({primaryType:t,types:e}){const r=ua(fhe({primaryType:t,types:e}));return Qn(r)}function fhe({primaryType:t,types:e}){let r="";const n=vF({primaryType:t,types:e});n.delete(t);const i=[t,...Array.from(n).sort()];for(const s of i)r+=`${s}(${e[s].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function vF({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),i=n==null?void 0:n[0];if(r.has(i)||e[i]===void 0)return r;r.add(i);for(const s of e[i])vF({primaryType:s.type,types:e},r);return r}function mF({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},Qn(pF({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},Qn(n)];if(r==="string")return[{type:"bytes32"},Qn(ua(n))];if(r.lastIndexOf("]")===r.length-1){const i=r.slice(0,r.lastIndexOf("[")),s=n.map(o=>mF({name:e,type:i,types:t,value:o}));return[{type:"bytes32"},Qn(L1(s.map(([o])=>o),s.map(([,o])=>o)))]}return[{type:r},n]}function yF({domain:t,message:e,primaryType:r,types:n}){const i=n,s=(o,a)=>{for(const c of o){const{name:l,type:u}=c,f=u,d=a[l],h=f.match(ahe);if(h&&(typeof d=="number"||typeof d=="bigint")){const[b,y,m]=h;ze(d,{signed:y==="int",size:parseInt(m)/8})}if(f==="address"&&typeof d=="string"&&!Uf(d))throw new F0({address:d});const p=f.match(ohe);if(p){const[b,y]=p;if(y&&Lr(d)!==parseInt(y))throw new Vue({expectedSize:parseInt(y),givenSize:Lr(d)})}const v=i[f];v&&s(v,d)}};if(i.EIP712Domain&&t&&s(i.EIP712Domain,t),r!=="EIP712Domain"){const o=i[r];s(o,e)}}function gF({domain:t}){return[typeof(t==null?void 0:t.name)=="string"&&{name:"name",type:"string"},(t==null?void 0:t.version)&&{name:"version",type:"string"},typeof(t==null?void 0:t.chainId)=="number"&&{name:"chainId",type:"uint256"},(t==null?void 0:t.verifyingContract)&&{name:"verifyingContract",type:"address"},(t==null?void 0:t.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}const F2="/docs/contract/encodeDeployData";function bF({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new Bue({docsPath:F2});if(!("inputs"in n))throw new qP({docsPath:F2});if(!n.inputs||n.inputs.length===0)throw new qP({docsPath:F2});const i=L1(n.inputs,e);return yS([r,i])}function dhe(t,e){const r=(()=>typeof t=="string"?Lo(t):t.raw instanceof Uint8Array?t.raw:jl(t.raw))(),n=Lo(`Ethereum Signed Message: +${r.length}`);return Qn(Xo([n,r]),e)}const hhe="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);BigInt(1);BigInt(2);function phe(t,e){if(t.length!==e.length)return!1;for(let r=0;r{const f=Dn(["watchBlockNumber",t.uid,e,r,o]);return Ed(f,{onBlockNumber:n,onError:i},d=>U1(async()=>{var h;try{const p=await W1(t,{cacheTime:0});if(c){if(p===c)return;if(p-c>1&&r)for(let v=c+1n;vc)&&(d.onBlockNumber(p,c),c=p)}catch(p){(h=d.onError)==null||h.call(d,p)}},{emitOnBegin:e,interval:o}))})():(()=>{let f=!0,d=()=>f=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(p){var b;if(!f)return;const v=nb((b=p.result)==null?void 0:b.number);n(v,c),c=v},onError(p){i==null||i(p)}});d=h,f||d()}catch(h){i==null||i(h)}})(),d})()}async function ghe(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:i=t.pollingInterval,timeout:s}){const o=Dn(["waitForTransactionReceipt",t.uid,r]);let a,c,l,u=!1;return new Promise((f,d)=>{s&&setTimeout(()=>d(new Iue({hash:r})),s);const h=Ed(o,{onReplaced:n,resolve:f,reject:d},p=>{const v=EF(t,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:i,async onBlockNumber(b){if(u)return;let y=b;const m=g=>{v(),g(),h()};try{if(l){if(y-l.blockNumber+1np.resolve(l));return}if(a||(u=!0,await rF(async()=>{a=await zS(t,{hash:r}),a.blockNumber&&(y=a.blockNumber)},{delay:({count:g})=>~~(1<0&&y-l.blockNumber+1np.resolve(l))}catch(g){if(a&&(g instanceof RL||g instanceof $L))try{c=a;const P=(await yc(t,{blockNumber:y,includeTransactions:!0})).transactions.find(({from:w,nonce:I})=>w===c.from&&I===c.nonce);if(!P||(l=await IC(t,{hash:P.hash}),y-l.blockNumber+1n{var w;(w=p.onReplaced)==null||w.call(p,{reason:T,replacedTransaction:c,transaction:P,transactionReceipt:l}),p.resolve(l)})}catch(S){m(()=>p.reject(S))}else m(()=>p.reject(g))}}})})})}function bhe(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:s,includeTransactions:o,poll:a,pollingInterval:c=t.pollingInterval}){const l=typeof a<"u"?a:t.transport.type!=="webSocket",u=o??!1;let f;return l?(()=>{const p=Dn(["watchBlocks",t.uid,r,n,u,c]);return Ed(p,{onBlock:i,onError:s},v=>U1(async()=>{var b;try{const y=await yc(t,{blockTag:e,includeTransactions:u});if(y.number&&(f!=null&&f.number)){if(y.number===f.number)return;if(y.number-f.number>1&&r)for(let m=(f==null?void 0:f.number)+1n;mf.number)&&(v.onBlock(y,f),f=y)}catch(y){(b=v.onError)==null||b.call(v,y)}},{emitOnBegin:n,interval:c}))})():(()=>{let p=!0,v=()=>p=!1;return(async()=>{try{const{unsubscribe:b}=await t.transport.subscribe({params:["newHeads"],onData(y){var S,P,T;if(!p)return;const g=(((T=(P=(S=t.chain)==null?void 0:S.formatters)==null?void 0:P.block)==null?void 0:T.format)||IL)(y.result);i(g,f),f=g},onError(y){s==null||s(y)}});v=b,p||v()}catch(b){s==null||s(b)}})(),v})()}function whe(t,{address:e,args:r,batch:n=!0,event:i,events:s,onError:o,onLogs:a,poll:c,pollingInterval:l=t.pollingInterval,strict:u}){const f=typeof c<"u"?c:t.transport.type!=="webSocket",d=u??!1;return f?(()=>{const v=Dn(["watchEvent",e,r,n,t.uid,i,l]);return Ed(v,{onLogs:a,onError:o},b=>{let y,m,g=!1;const S=U1(async()=>{var P;if(!g){try{m=await fF(t,{address:e,args:r,event:i,events:s,strict:d})}catch{}g=!0;return}try{let T;if(m)T=await pb(t,{filter:m});else{const w=await W1(t);y&&y!==w?T=await NS(t,{address:e,args:r,event:i,events:s,fromBlock:y+1n,toBlock:w}):T=[],y=w}if(T.length===0)return;n?b.onLogs(T):T.forEach(w=>b.onLogs([w]))}catch(T){m&&T instanceof zl&&(g=!1),(P=b.onError)==null||P.call(b,T)}},{emitOnBegin:!0,interval:l});return async()=>{m&&await vb(t,{filter:m}),S()}})})():(()=>{let v=!0,b=()=>v=!1;return(async()=>{try{const y=s??(i?[i]:void 0);let m=[];y&&(m=[y.flatMap(S=>B1({abi:[S],eventName:S.name,args:r}))],i&&(m=m[0]));const{unsubscribe:g}=await t.transport.subscribe({params:["logs",{address:e,topics:m}],onData(S){var T;if(!v)return;const P=S.result;try{const{eventName:w,args:I}=z1({abi:y,data:P.data,topics:P.topics,strict:d}),B=Cs(P,{args:I,eventName:w});a([B])}catch(w){let I,B;if(w instanceof Ul||w instanceof yd){if(u)return;I=w.abiItem.name,B=(T=w.abiItem.inputs)==null?void 0:T.some(H=>!("name"in H&&H.name))}const j=Cs(P,{args:B?[]:{},eventName:I});a([j])}},onError(S){o==null||o(S)}});b=g,v||b()}catch(y){o==null||o(y)}})(),b})()}function Ehe(t,{batch:e=!0,onError:r,onTransactions:n,poll:i,pollingInterval:s=t.pollingInterval}){return(typeof i<"u"?i:t.transport.type!=="webSocket")?(()=>{const l=Dn(["watchPendingTransactions",t.uid,e,s]);return Ed(l,{onTransactions:n,onError:r},u=>{let f;const d=U1(async()=>{var h;try{if(!f)try{f=await dF(t);return}catch(v){throw d(),v}const p=await pb(t,{filter:f});if(p.length===0)return;e?u.onTransactions(p):p.forEach(v=>u.onTransactions([v]))}catch(p){(h=u.onError)==null||h.call(u,p)}},{emitOnBegin:!0,interval:s});return async()=>{f&&await vb(t,{filter:f}),d()}})})():(()=>{let l=!0,u=()=>l=!1;return(async()=>{try{const{unsubscribe:f}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!l)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});u=f,l||u()}catch(f){r==null||r(f)}})(),u})()}function xhe(t){return{call:e=>hb(t,e),createBlockFilter:()=>Yde(t),createContractEventFilter:e=>VL(t,e),createEventFilter:e=>fF(t,e),createPendingTransactionFilter:()=>dF(t),estimateContractGas:e=>ide(t,e),estimateGas:e=>$S(t,e),getBalance:e=>Jde(t,e),getBlock:e=>yc(t,e),getBlockNumber:e=>W1(t,e),getBlockTransactionCount:e=>Xde(t,e),getBytecode:e=>Zde(t,e),getChainId:()=>Z0(t),getEnsAddress:e=>Mde(t,e),getEnsAvatar:e=>Gde(t,e),getEnsName:e=>Kde(t,e),getEnsResolver:e=>Qde(t,e),getEnsText:e=>uF(t,e),getFeeHistory:e=>the(t,e),estimateFeesPerGas:e=>nde(t,e),getFilterChanges:e=>pb(t,e),getFilterLogs:e=>rhe(t,e),getGasPrice:()=>RS(t),getLogs:e=>NS(t,e),estimateMaxPriorityFeePerGas:e=>rde(t,e),getStorageAt:e=>nhe(t,e),getTransaction:e=>zS(t,e),getTransactionConfirmations:e=>ihe(t,e),getTransactionCount:e=>JL(t,e),getTransactionReceipt:e=>IC(t,e),multicall:e=>she(t,e),prepareTransactionRequest:e=>db(t,e),readContract:e=>gc(t,e),sendRawTransaction:e=>DS(t,e),simulateContract:e=>pde(t,e),verifyMessage:e=>mhe(t,e),verifyTypedData:e=>yhe(t,e),uninstallFilter:e=>vb(t,e),waitForTransactionReceipt:e=>ghe(t,e),watchBlocks:e=>bhe(t,e),watchBlockNumber:e=>EF(t,e),watchContractEvent:e=>xde(t,e),watchEvent:e=>whe(t,e),watchPendingTransactions:e=>Ehe(t,e)}}function a9(t){const{key:e="public",name:r="Public Client"}=t;return tF({...t,key:e,name:r,type:"publicClient"}).extend(xhe)}function Che(t,{abi:e,args:r,bytecode:n,...i}){const s=bF({abi:e,args:r,bytecode:n});return LS(t,{...i,data:s})}async function She(t){return(await t.request({method:"eth_accounts"})).map(r=>AS(r))}async function khe(t){return await t.request({method:"wallet_getPermissions"})}async function Ahe(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>Li(r))}async function _he(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function Phe(t,{account:e=t.account,message:r}){if(!e)throw new bd({docsPath:"/docs/actions/wallet/signMessage"});const n=Qi(e);if(n.type==="local")return n.signMessage({message:r});const i=(()=>typeof r=="string"?vS(r):r.raw instanceof Uint8Array?ua(r.raw):r.raw)();return t.request({method:"personal_sign",params:[i,n.address]})}async function The(t,e){var l,u,f,d;const{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new bd({docsPath:"/docs/actions/wallet/signTransaction"});const s=Qi(r);j1({account:s,...e});const o=await Z0(t);n!==null&&SL({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((l=t.chain)==null?void 0:l.formatters),c=((u=a==null?void 0:a.transactionRequest)==null?void 0:u.format)||ib;return s.type==="local"?s.signTransaction({chainId:o,...i},{serializer:(d=(f=t.chain)==null?void 0:f.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...c(i),chainId:ze(o),from:s.address}]})}async function Ihe(t,{account:e=t.account,domain:r,message:n,primaryType:i,types:s}){if(!e)throw new bd({docsPath:"/docs/actions/wallet/signTypedData"});const o=Qi(e),a={EIP712Domain:gF({domain:r}),...s};if(yF({domain:r,message:n,primaryType:i,types:a}),o.type==="local")return o.signTypedData({domain:r,primaryType:i,types:a,message:n});const c=Dn({domain:r??{},primaryType:i,types:a,message:n},(l,u)=>mo(u)?u.toLowerCase():u);return t.request({method:"eth_signTypedData_v4",params:[o.address,c]})}async function Ohe(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:ze(e)}]})}async function Rhe(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function $he(t){return{addChain:e=>kde(t,e),deployContract:e=>Che(t,e),getAddresses:()=>She(t),getChainId:()=>Z0(t),getPermissions:()=>khe(t),prepareTransactionRequest:e=>db(t,e),requestAddresses:()=>Ahe(t),requestPermissions:e=>_he(t,e),sendRawTransaction:e=>DS(t,e),sendTransaction:e=>LS(t,e),signMessage:e=>Phe(t,e),signTransaction:e=>The(t,e),signTypedData:e=>Ihe(t,e),switchChain:e=>Ohe(t,e),watchAsset:e=>Rhe(t,e),writeContract:e=>Sde(t,e)}}function gb(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return tF({...t,key:e,name:r,transport:s=>n({...s,retryCount:0}),type:"walletClient"}).extend($he)}function Mhe(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:i}=e;return({chain:s,retryCount:o,timeout:a})=>{var f;const c=e.retryCount??o,l=a??e.timeout??1e4,u=t||((f=s==null?void 0:s.rpcUrls.default.webSocket)==null?void 0:f[0]);if(!u)throw new iF;return mb({key:r,name:n,async request({method:d,params:h}){const p={method:d,params:h},v=await L2(u),{error:b,result:y}=await mf.webSocketAsync(v,{body:p,timeout:l});if(b)throw new PS({body:p,error:b,url:u});return y},retryCount:c,retryDelay:i,timeout:l,type:"webSocket"},{getSocket(){return L2(u)},async subscribe({params:d,onData:h,onError:p}){const v=await L2(u),{result:b}=await new Promise((y,m)=>mf.webSocket(v,{body:{method:"eth_subscribe",params:d},onResponse(g){if(g.error){m(g.error),p==null||p(g.error);return}if(typeof g.id=="number"){y(g);return}g.method==="eth_subscription"&&h(g.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(y=>mf.webSocket(v,{body:{method:"eth_unsubscribe",params:[b]},onResponse:y}))}}}})}}function Nhe(t){var r;if(!t)return"Injected";const e=n=>{if(n.isApexWallet)return"Apex Wallet";if(n.isAvalanche)return"Core Wallet";if(n.isBackpack)return"Backpack";if(n.isBifrost)return"Bifrost Wallet";if(n.isBitKeep)return"BitKeep";if(n.isBitski)return"Bitski";if(n.isBlockWallet)return"BlockWallet";if(n.isBraveWallet)return"Brave Wallet";if(n.isCoinbaseWallet)return"Coinbase Wallet";if(n.isDawn)return"Dawn Wallet";if(n.isDefiant)return"Defiant";if(n.isEnkrypt)return"Enkrypt";if(n.isExodus)return"Exodus";if(n.isFrame)return"Frame";if(n.isFrontier)return"Frontier Wallet";if(n.isGamestop)return"GameStop Wallet";if(n.isHaqqWallet)return"HAQQ Wallet";if(n.isHyperPay)return"HyperPay Wallet";if(n.isImToken)return"ImToken";if(n.isHaloWallet)return"Halo Wallet";if(n.isKuCoinWallet)return"KuCoin Wallet";if(n.isMathWallet)return"MathWallet";if(n.isNovaWallet)return"Nova Wallet";if(n.isOkxWallet||n.isOKExWallet)return"OKX Wallet";if(n.isOneInchIOSWallet||n.isOneInchAndroidWallet)return"1inch Wallet";if(n.isOpera)return"Opera";if(n.isPhantom)return"Phantom";if(n.isPortal)return"Ripio Portal";if(n.isRabby)return"Rabby Wallet";if(n.isRainbow)return"Rainbow";if(n.isStatus)return"Status";if(n.isTalisman)return"Talisman";if(n.isTally)return"Taho";if(n.isTokenPocket)return"TokenPocket";if(n.isTokenary)return"Tokenary";if(n.isTrust||n.isTrustWallet)return"Trust Wallet";if(n.isTTWallet)return"TTWallet";if(n.isXDEFI)return"XDEFI Wallet";if(n.isZerion)return"Zerion";if(n.isMetaMask)return"MetaMask"};if((r=t.providers)!=null&&r.length){const n=new Set;let i=1;for(const o of t.providers){let a=e(o);a||(a=`Unknown Wallet #${i}`,i+=1),n.add(a)}const s=[...n];return s.length?s:s[0]??"Injected"}return e(t)??"Injected"}var Bv,xF=class extends ob{constructor({chains:t,options:e}={}){const r={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const i=window.ethereum;return i!=null&&i.providers?i.providers[0]:i},...e};super({chains:t,options:r}),st(this,"id","injected"),st(this,"name"),st(this,"ready"),Jr(this,Bv,void 0),st(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),st(this,"onAccountsChanged",i=>{i.length===0?this.emit("disconnect"):this.emit("change",{account:Li(i[0])})}),st(this,"onChainChanged",i=>{const s=Bh(i),o=this.isChainUnsupported(s);this.emit("change",{chain:{id:s,unsupported:o}})}),st(this,"onDisconnect",async i=>{var s;i.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((s=this.storage)==null||s.removeItem(this.shimDisconnectKey)))});const n=r.getProvider();if(typeof r.name=="string")this.name=r.name;else if(n){const i=Nhe(n);r.name?this.name=r.name(i):typeof i=="string"?this.name=i:this.name=i[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:t}={}){var e;try{const r=await this.getProvider();if(!r)throw new Ra;r.on&&(r.on("accountsChanged",this.onAccountsChanged),r.on("chainChanged",this.onChainChanged),r.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});const n=await r.request({method:"eth_requestAccounts"}),i=Li(n[0]);let s=await this.getChainId(),o=this.isChainUnsupported(s);return t&&s!==t&&(s=(await this.switchChain(t)).id,o=this.isChainUnsupported(s)),this.options.shimDisconnect&&((e=this.storage)==null||e.setItem(this.shimDisconnectKey,!0)),{account:i,chain:{id:s,unsupported:o}}}catch(r){throw this.isUserRejectedRequestError(r)?new Vr(r):r.code===-32002?new vc(r):r}}async disconnect(){var e;const t=await this.getProvider();t!=null&&t.removeListener&&(t.removeListener("accountsChanged",this.onAccountsChanged),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&((e=this.storage)==null||e.removeItem(this.shimDisconnectKey)))}async getAccount(){const t=await this.getProvider();if(!t)throw new Ra;const e=await t.request({method:"eth_accounts"});return Li(e[0])}async getChainId(){const t=await this.getProvider();if(!t)throw new Ra;return t.request({method:"eth_chainId"}).then(Bh)}async getProvider(){const t=this.options.getProvider();return t&&$o(this,Bv,t),Je(this,Bv)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(i=>i.id===t);if(!e)throw new Error("provider is required.");return gb({account:r,chain:n,transport:FS(e)})}async isAuthorized(){var t;try{if(this.options.shimDisconnect&&!((t=this.storage)!=null&&t.getItem(this.shimDisconnectKey)))return!1;if(!await this.getProvider())throw new Ra;return!!await this.getAccount()}catch{return!1}}async switchChain(t){var n,i,s;const e=await this.getProvider();if(!e)throw new Ra;const r=ze(t);try{return await Promise.all([e.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise(o=>this.on("change",({chain:a})=>{(a==null?void 0:a.id)===t&&o()}))]),this.chains.find(o=>o.id===t)??{id:t,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(o){const a=this.chains.find(c=>c.id===t);if(!a)throw new Lue({chainId:t,connectorId:this.id});if(o.code===4902||((i=(n=o==null?void 0:o.data)==null?void 0:n.originalError)==null?void 0:i.code)===4902)try{if(await e.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((s=a.rpcUrls.public)==null?void 0:s.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),await this.getChainId()!==t)throw new Vr(new Error("User rejected switch after adding network."));return a}catch(c){throw new Vr(c)}throw this.isUserRejectedRequestError(o)?new Vr(o):new mc(o)}}async watchAsset({address:t,decimals:e=18,image:r,symbol:n}){const i=await this.getProvider();if(!i)throw new Ra;return i.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:e,image:r,symbol:n}}})}isUserRejectedRequestError(t){return t.code===4001}};Bv=new WeakMap;var WS=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},B2=(t,e,r)=>(WS(t,e,"read from private field"),r?r.call(t):e.get(t)),j2=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Jp=(t,e,r,n)=>(WS(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Dhe=(t,e,r)=>(WS(t,e,"access private method"),r);const Lhe=t=>(e,r,n)=>{const i=n.subscribe;return n.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let f=o(n.getState());l=d=>{const h=o(d);if(!u(f,h)){const p=f;a(f=h,p)}},c!=null&&c.fireImmediately&&a(f,f)}return i(l)},t(e,r,n)},Fhe=Lhe;function Bhe(t,e){let r;try{r=t()}catch{return}return{getItem:i=>{var s;const o=c=>c===null?null:JSON.parse(c,e==null?void 0:e.reviver),a=(s=r.getItem(i))!=null?s:null;return a instanceof Promise?a.then(o):o(a)},setItem:(i,s)=>r.setItem(i,JSON.stringify(s,e==null?void 0:e.replacer)),removeItem:i=>r.removeItem(i)}}const e1=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return e1(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return e1(n)(r)}}}},jhe=(t,e)=>(r,n,i)=>{let s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:b=>b,version:0,merge:(b,y)=>({...y,...b}),...e},o=!1;const a=new Set,c=new Set;let l;try{l=s.getStorage()}catch{}if(!l)return t((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...b)},n,i);const u=e1(s.serialize),f=()=>{const b=s.partialize({...n()});let y;const m=u({state:b,version:s.version}).then(g=>l.setItem(s.name,g)).catch(g=>{y=g});if(y)throw y;return m},d=i.setState;i.setState=(b,y)=>{d(b,y),f()};const h=t((...b)=>{r(...b),f()},n,i);let p;const v=()=>{var b;if(!l)return;o=!1,a.forEach(m=>m(n()));const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,n()))||void 0;return e1(l.getItem.bind(l))(s.name).then(m=>{if(m)return s.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==s.version){if(s.migrate)return s.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var g;return p=s.merge(m,(g=n())!=null?g:h),r(p,!0),f()}).then(()=>{y==null||y(p,void 0),o=!0,c.forEach(m=>m(p))}).catch(m=>{y==null||y(void 0,m)})};return i.persist={setOptions:b=>{s={...s,...b},b.getStorage&&(l=b.getStorage())},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:b=>(a.add(b),()=>{a.delete(b)}),onFinishHydration:b=>(c.add(b),()=>{c.delete(b)})},v(),p||h},Uhe=(t,e)=>(r,n,i)=>{let s={storage:Bhe(()=>localStorage),partialize:v=>v,version:0,merge:(v,b)=>({...b,...v}),...e},o=!1;const a=new Set,c=new Set;let l=s.storage;if(!l)return t((...v)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...v)},n,i);const u=()=>{const v=s.partialize({...n()});return l.setItem(s.name,{state:v,version:s.version})},f=i.setState;i.setState=(v,b)=>{f(v,b),u()};const d=t((...v)=>{r(...v),u()},n,i);let h;const p=()=>{var v,b;if(!l)return;o=!1,a.forEach(m=>{var g;return m((g=n())!=null?g:d)});const y=((b=s.onRehydrateStorage)==null?void 0:b.call(s,(v=n())!=null?v:d))||void 0;return e1(l.getItem.bind(l))(s.name).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==s.version){if(s.migrate)return s.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var g;return h=s.merge(m,(g=n())!=null?g:d),r(h,!0),u()}).then(()=>{y==null||y(h,void 0),h=n(),o=!0,c.forEach(m=>m(h))}).catch(m=>{y==null||y(void 0,m)})};return i.persist={setOptions:v=>{s={...s,...v},v.storage&&(l=v.storage)},clearStorage:()=>{l==null||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:v=>(a.add(v),()=>{a.delete(v)}),onFinishHydration:v=>(c.add(v),()=>{c.delete(v)})},s.skipHydration||p(),h||d},zhe=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?jhe(t,e):Uhe(t,e),Whe=zhe,c9=t=>{let e;const r=new Set,n=(c,l)=>{const u=typeof c=="function"?c(e):c;if(!Object.is(u,e)){const f=e;e=l??typeof u!="object"?u:Object.assign({},e,u),r.forEach(d=>d(e,f))}},i=()=>e,a={setState:n,getState:i,subscribe:c=>(r.add(c),()=>r.delete(c)),destroy:()=>{r.clear()}};return e=t(n,i,a),a},Hhe=t=>t?c9(t):c9;function HS(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,i]of t)if(!Object.is(i,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let n=0;nv===f.id)||(c=[...c,p.chain]),l[f.id]=[...l[f.id]||[],...p.rpcUrls.http],p.rpcUrls.webSocket&&(u[f.id]=[...u[f.id]||[],...p.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${f.name}". `,"You may need to add `jsonRpcProvider` to `configureChains` with the chain's RPC URLs.","Read more: https://wagmi.sh/core/providers/jsonRpc"].join(` -`))}return{chains:c,publicClient:({chainId:f})=>{const d=c.find(v=>v.id===f)??t[0],h=l[d.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${d.id}"`);const p=iT({batch:r,chain:d,transport:tT(h.map(v=>tB(v,{timeout:a})),{rank:i,retryCount:s,retryDelay:o}),pollingInterval:n});return Object.assign(p,{chains:c})},webSocketPublicClient:({chainId:f})=>{const d=c.find(v=>v.id===f)??t[0],h=u[d.id];if(!h||!h[0])return;const p=iT({batch:r,chain:d,transport:tT(h.map(v=>Che(v,{timeout:a})),{rank:i,retryCount:s,retryDelay:o}),pollingInterval:n});return Object.assign(p,{chains:c})}}}var Nhe=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},Dhe=class extends Error{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function RC(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!RC(t[n],e[n]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const i=Object.keys(t);if(r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(s&&!RC(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}var $C=(t,{find:e,replace:r})=>t&&e(t)?r(t):typeof t!="object"?t:Array.isArray(t)?t.map(n=>$C(n,{find:e,replace:r})):t instanceof Object?Object.entries(t).reduce((n,[i,s])=>({...n,[i]:$C(s,{find:e,replace:r})}),{}):t;function Lhe(t){const e=JSON.parse(t);return $C(e,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function oT(t,e){return t.slice(0,e).join(".")||"."}function aT(t,e){const{length:r}=t;for(let n=0;n{const o=typeof s=="bigint"?`#bigint.${s.toString()}`:s;return(e==null?void 0:e(i,o))||o},n),r??void 0)}var gB={getItem:t=>"",setItem:(t,e)=>null,removeItem:t=>null};function bB({deserialize:t=Lhe,key:e="wagmi",serialize:r=Fhe,storage:n}){return{...n,getItem:(i,s=null)=>{const o=n.getItem(`${e}.${i}`);try{return o?t(o):s}catch(a){return console.warn(a),s}},setItem:(i,s)=>{if(s===null)n.removeItem(`${e}.${i}`);else try{n.setItem(`${e}.${i}`,r(s))}catch(o){console.error(o)}},removeItem:i=>n.removeItem(`${e}.${i}`)}}var cT="store",Ou,dh,MC,wB,jhe=class{constructor({autoConnect:e=!1,connectors:r=[new yB],publicClient:n,storage:i=bB({storage:typeof window<"u"?window.localStorage:gB}),logger:s={warn:console.warn},webSocketPublicClient:o}){var u,f;j2(this,MC),this.publicClients=new Map,this.webSocketPublicClients=new Map,j2(this,Ou,void 0),j2(this,dh,void 0),this.args={autoConnect:e,connectors:r,logger:s,publicClient:n,storage:i,webSocketPublicClient:o};let a="disconnected",c;if(e)try{const d=i.getItem(cT),h=(u=d==null?void 0:d.state)==null?void 0:u.data;a=h!=null&&h.account?"reconnecting":"connecting",c=(f=h==null?void 0:h.chain)==null?void 0:f.id}catch{}const l=typeof r=="function"?r():r;l.forEach(d=>d.setStorage(i)),this.store=$he(_he(Rhe(()=>({connectors:l,publicClient:this.getPublicClient({chainId:c}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:c})}),{name:cT,storage:i,partialize:d=>{var h,p;return{...e&&{data:{account:(h=d==null?void 0:d.data)==null?void 0:h.account,chain:(p=d==null?void 0:d.data)==null?void 0:p.chain}},chains:d==null?void 0:d.chains}},version:2}))),this.storage=i,Jp(this,dh,i==null?void 0:i.getItem("wallet")),khe(this,MC,wB).call(this),e&&typeof window<"u"&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){var e,r;return(r=(e=this.data)==null?void 0:e.chain)==null?void 0:r.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const r=typeof e=="function"?e(this.store.getState()):e;this.store.setState(r,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){var e,r;this.connector&&await((r=(e=this.connector).disconnect)==null?void 0:r.call(e)),Jp(this,Ou,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(F2(this,Ou))return;Jp(this,Ou,!0),this.setState(n=>{var i;return{...n,status:(i=n.data)!=null&&i.account?"reconnecting":"connecting"}});const e=F2(this,dh)?[...this.connectors].sort(n=>n.id===F2(this,dh)?-1:1):this.connectors;let r=!1;for(const n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;const s=await n.connect();this.setState(o=>({...o,connector:n,chains:n==null?void 0:n.chains,data:s,status:"connected"})),r=!0;break}return r||this.setState(n=>({...n,data:void 0,status:"disconnected"})),Jp(this,Ou,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const r=typeof e=="function"?e():e;r.forEach(n=>n.setStorage(this.args.storage)),this.setState(n=>({...n,connectors:r}))}getPublicClient({chainId:e}={}){let r=this.publicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.publicClients.get(e??-1),r))return r;const{publicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,this.publicClients.set(e??-1,r),r}setPublicClient(e){var n,i;const r=(i=(n=this.data)==null?void 0:n.chain)==null?void 0:i.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(s=>({...s,publicClient:this.getPublicClient({chainId:r})}))}getWebSocketPublicClient({chainId:e}={}){let r=this.webSocketPublicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.webSocketPublicClients.get(e??-1),r))return r;const{webSocketPublicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,r&&this.webSocketPublicClients.set(e??-1,r),r}setWebSocketPublicClient(e){var n,i;const r=(i=(n=this.data)==null?void 0:n.chain)==null?void 0:i.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(s=>({...s,webSocketPublicClient:this.getWebSocketPublicClient({chainId:r})}))}setLastUsedConnector(e=null){var r;(r=this.storage)==null||r.setItem("wallet",e)}};Ou=new WeakMap;dh=new WeakMap;MC=new WeakSet;wB=function(){const t=a=>{this.setState(c=>({...c,data:{...c.data,...a}}))},e=()=>{this.clearState()},r=a=>{this.setState(c=>({...c,error:a}))};this.store.subscribe(({connector:a})=>a,(a,c)=>{var l,u,f,d,h,p;(l=c==null?void 0:c.off)==null||l.call(c,"change",t),(u=c==null?void 0:c.off)==null||u.call(c,"disconnect",e),(f=c==null?void 0:c.off)==null||f.call(c,"error",r),a&&((d=a.on)==null||d.call(a,"change",t),(h=a.on)==null||h.call(a,"disconnect",e),(p=a.on)==null||p.call(a,"error",r))});const{publicClient:n,webSocketPublicClient:i}=this.args;(typeof n=="function"||typeof i=="function")&&this.store.subscribe(({data:a})=>{var c;return(c=a==null?void 0:a.chain)==null?void 0:c.id},a=>{this.setState(c=>({...c,publicClient:this.getPublicClient({chainId:a}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:a})}))})};var NC;function Uhe(t){const e=new jhe(t);return NC=e,e}function qi(){if(!NC)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return NC}async function zhe({chainId:t,connector:e}){const r=qi(),n=r.connector;if(n&&e.id===n.id)throw new Nhe;try{r.setState(s=>({...s,status:"connecting"}));const i=await e.connect({chainId:t});return r.setLastUsedConnector(e.id),r.setState(s=>({...s,connector:e,chains:e==null?void 0:e.chains,data:i,status:"connected"})),r.storage.setItem("connected",!0),{...i,connector:e}}catch(i){throw r.setState(s=>({...s,status:s.connector?"connected":"disconnected"})),i}}async function Whe(){const t=qi();t.connector&&await t.connector.disconnect(),t.clearState(),t.storage.removeItem("connected")}function DC({chainId:t}={}){const e=qi();return t&&e.getPublicClient({chainId:t})||e.publicClient}async function EB({chainId:t}={}){var n,i;return await((i=(n=qi().connector)==null?void 0:n.getWalletClient)==null?void 0:i.call(n,{chainId:t}))||null}function Hhe(t,e){const r=qi(),n=async()=>e(DC(t));return r.subscribe(({publicClient:s})=>s,n)}function qhe({chainId:t},e){const r=qi(),n=async({chainId:s})=>{if(t&&s&&t!==s)return;const o=await EB({chainId:t});return qi().connector?e(o):e(null)};return r.subscribe(({data:s,connector:o})=>{var a;return{account:s==null?void 0:s.account,chainId:(a=s==null?void 0:s.chain)==null?void 0:a.id,connector:o}},n,{equalityFn:HS})}function xB(){const{data:t,connector:e,status:r}=qi();switch(r){case"connected":return{address:t==null?void 0:t.account,connector:e,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!!(t!=null&&t.account),isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function CB(){var i,s,o,a;const t=qi(),e=(s=(i=t.data)==null?void 0:i.chain)==null?void 0:s.id,r=t.chains??[],n=[...((o=t.publicClient)==null?void 0:o.chains)||[],...r].find(c=>c.id===e)??{id:e,name:`Chain ${e}`,network:`${e}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:e?{...n,...(a=t.data)==null?void 0:a.chain,id:e}:void 0,chains:r}}async function Vhe({chainId:t}){const{connector:e}=qi();if(!e)throw new Ra;if(!e.switchChain)throw new Dhe({connector:e});return e.switchChain(t)}function Ghe(t,{selector:e=r=>r}={}){const r=qi(),n=()=>t(xB());return r.subscribe(({data:s,connector:o,status:a})=>e({address:s==null?void 0:s.account,connector:o,status:a}),n,{equalityFn:HS})}function Khe(t,{selector:e=r=>r}={}){const r=qi(),n=()=>t(CB());return r.subscribe(({data:s,chains:o})=>{var a;return e({chainId:(a=s==null?void 0:s.chain)==null?void 0:a.id,chains:o})},n,{equalityFn:HS})}var Qhe={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},lT={id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}},SB={exports:{}},kB={};/** +`))}return{chains:c,publicClient:({chainId:f})=>{const d=c.find(v=>v.id===f)??t[0],h=l[d.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${d.id}"`);const p=a9({batch:r,chain:d,transport:i9(h.map(v=>oF(v,{timeout:a})),{rank:i,retryCount:s,retryDelay:o}),pollingInterval:n});return Object.assign(p,{chains:c})},webSocketPublicClient:({chainId:f})=>{const d=c.find(v=>v.id===f)??t[0],h=u[d.id];if(!h||!h[0])return;const p=a9({batch:r,chain:d,transport:i9(h.map(v=>Mhe(v,{timeout:a})),{rank:i,retryCount:s,retryDelay:o}),pollingInterval:n});return Object.assign(p,{chains:c})}}}var Vhe=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},Ghe=class extends Error{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function OC(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)&&Array.isArray(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!OC(t[n],e[n]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();const i=Object.keys(t);if(r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(s&&!OC(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}var RC=(t,{find:e,replace:r})=>t&&e(t)?r(t):typeof t!="object"?t:Array.isArray(t)?t.map(n=>RC(n,{find:e,replace:r})):t instanceof Object?Object.entries(t).reduce((n,[i,s])=>({...n,[i]:RC(s,{find:e,replace:r})}),{}):t;function Khe(t){const e=JSON.parse(t);return RC(e,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function l9(t,e){return t.slice(0,e).join(".")||"."}function u9(t,e){const{length:r}=t;for(let n=0;n{const o=typeof s=="bigint"?`#bigint.${s.toString()}`:s;return(e==null?void 0:e(i,o))||o},n),r??void 0)}var CF={getItem:t=>"",setItem:(t,e)=>null,removeItem:t=>null};function SF({deserialize:t=Khe,key:e="wagmi",serialize:r=Yhe,storage:n}){return{...n,getItem:(i,s=null)=>{const o=n.getItem(`${e}.${i}`);try{return o?t(o):s}catch(a){return console.warn(a),s}},setItem:(i,s)=>{if(s===null)n.removeItem(`${e}.${i}`);else try{n.setItem(`${e}.${i}`,r(s))}catch(o){console.error(o)}},removeItem:i=>n.removeItem(`${e}.${i}`)}}var f9="store",Ou,dh,$C,kF,Jhe=class{constructor({autoConnect:e=!1,connectors:r=[new xF],publicClient:n,storage:i=SF({storage:typeof window<"u"?window.localStorage:CF}),logger:s={warn:console.warn},webSocketPublicClient:o}){var u,f;j2(this,$C),this.publicClients=new Map,this.webSocketPublicClients=new Map,j2(this,Ou,void 0),j2(this,dh,void 0),this.args={autoConnect:e,connectors:r,logger:s,publicClient:n,storage:i,webSocketPublicClient:o};let a="disconnected",c;if(e)try{const d=i.getItem(f9),h=(u=d==null?void 0:d.state)==null?void 0:u.data;a=h!=null&&h.account?"reconnecting":"connecting",c=(f=h==null?void 0:h.chain)==null?void 0:f.id}catch{}const l=typeof r=="function"?r():r;l.forEach(d=>d.setStorage(i)),this.store=Hhe(Fhe(Whe(()=>({connectors:l,publicClient:this.getPublicClient({chainId:c}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:c})}),{name:f9,storage:i,partialize:d=>{var h,p;return{...e&&{data:{account:(h=d==null?void 0:d.data)==null?void 0:h.account,chain:(p=d==null?void 0:d.data)==null?void 0:p.chain}},chains:d==null?void 0:d.chains}},version:2}))),this.storage=i,Jp(this,dh,i==null?void 0:i.getItem("wallet")),Dhe(this,$C,kF).call(this),e&&typeof window<"u"&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){var e,r;return(r=(e=this.data)==null?void 0:e.chain)==null?void 0:r.id}get publicClient(){return this.store.getState().publicClient}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketPublicClient(){return this.store.getState().webSocketPublicClient}setState(e){const r=typeof e=="function"?e(this.store.getState()):e;this.store.setState(r,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){var e,r;this.connector&&await((r=(e=this.connector).disconnect)==null?void 0:r.call(e)),Jp(this,Ou,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(B2(this,Ou))return;Jp(this,Ou,!0),this.setState(n=>{var i;return{...n,status:(i=n.data)!=null&&i.account?"reconnecting":"connecting"}});const e=B2(this,dh)?[...this.connectors].sort(n=>n.id===B2(this,dh)?-1:1):this.connectors;let r=!1;for(const n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;const s=await n.connect();this.setState(o=>({...o,connector:n,chains:n==null?void 0:n.chains,data:s,status:"connected"})),r=!0;break}return r||this.setState(n=>({...n,data:void 0,status:"disconnected"})),Jp(this,Ou,!1),this.data}setConnectors(e){this.args={...this.args,connectors:e};const r=typeof e=="function"?e():e;r.forEach(n=>n.setStorage(this.args.storage)),this.setState(n=>({...n,connectors:r}))}getPublicClient({chainId:e}={}){let r=this.publicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.publicClients.get(e??-1),r))return r;const{publicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,this.publicClients.set(e??-1,r),r}setPublicClient(e){var n,i;const r=(i=(n=this.data)==null?void 0:n.chain)==null?void 0:i.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(s=>({...s,publicClient:this.getPublicClient({chainId:r})}))}getWebSocketPublicClient({chainId:e}={}){let r=this.webSocketPublicClients.get(-1);if(r&&(r==null?void 0:r.chain.id)===e||(r=this.webSocketPublicClients.get(e??-1),r))return r;const{webSocketPublicClient:n}=this.args;return r=typeof n=="function"?n({chainId:e}):n,r&&this.webSocketPublicClients.set(e??-1,r),r}setWebSocketPublicClient(e){var n,i;const r=(i=(n=this.data)==null?void 0:n.chain)==null?void 0:i.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(s=>({...s,webSocketPublicClient:this.getWebSocketPublicClient({chainId:r})}))}setLastUsedConnector(e=null){var r;(r=this.storage)==null||r.setItem("wallet",e)}};Ou=new WeakMap;dh=new WeakMap;$C=new WeakSet;kF=function(){const t=a=>{this.setState(c=>({...c,data:{...c.data,...a}}))},e=()=>{this.clearState()},r=a=>{this.setState(c=>({...c,error:a}))};this.store.subscribe(({connector:a})=>a,(a,c)=>{var l,u,f,d,h,p;(l=c==null?void 0:c.off)==null||l.call(c,"change",t),(u=c==null?void 0:c.off)==null||u.call(c,"disconnect",e),(f=c==null?void 0:c.off)==null||f.call(c,"error",r),a&&((d=a.on)==null||d.call(a,"change",t),(h=a.on)==null||h.call(a,"disconnect",e),(p=a.on)==null||p.call(a,"error",r))});const{publicClient:n,webSocketPublicClient:i}=this.args;(typeof n=="function"||typeof i=="function")&&this.store.subscribe(({data:a})=>{var c;return(c=a==null?void 0:a.chain)==null?void 0:c.id},a=>{this.setState(c=>({...c,publicClient:this.getPublicClient({chainId:a}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:a})}))})};var MC;function Xhe(t){const e=new Jhe(t);return MC=e,e}function qi(){if(!MC)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return MC}async function Zhe({chainId:t,connector:e}){const r=qi(),n=r.connector;if(n&&e.id===n.id)throw new Vhe;try{r.setState(s=>({...s,status:"connecting"}));const i=await e.connect({chainId:t});return r.setLastUsedConnector(e.id),r.setState(s=>({...s,connector:e,chains:e==null?void 0:e.chains,data:i,status:"connected"})),r.storage.setItem("connected",!0),{...i,connector:e}}catch(i){throw r.setState(s=>({...s,status:s.connector?"connected":"disconnected"})),i}}async function e0e(){const t=qi();t.connector&&await t.connector.disconnect(),t.clearState(),t.storage.removeItem("connected")}function NC({chainId:t}={}){const e=qi();return t&&e.getPublicClient({chainId:t})||e.publicClient}async function AF({chainId:t}={}){var n,i;return await((i=(n=qi().connector)==null?void 0:n.getWalletClient)==null?void 0:i.call(n,{chainId:t}))||null}function t0e(t,e){const r=qi(),n=async()=>e(NC(t));return r.subscribe(({publicClient:s})=>s,n)}function r0e({chainId:t},e){const r=qi(),n=async({chainId:s})=>{if(t&&s&&t!==s)return;const o=await AF({chainId:t});return qi().connector?e(o):e(null)};return r.subscribe(({data:s,connector:o})=>{var a;return{account:s==null?void 0:s.account,chainId:(a=s==null?void 0:s.chain)==null?void 0:a.id,connector:o}},n,{equalityFn:HS})}function _F(){const{data:t,connector:e,status:r}=qi();switch(r){case"connected":return{address:t==null?void 0:t.account,connector:e,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};case"reconnecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!!(t!=null&&t.account),isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:t==null?void 0:t.account,connector:e,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function PF(){var i,s,o,a;const t=qi(),e=(s=(i=t.data)==null?void 0:i.chain)==null?void 0:s.id,r=t.chains??[],n=[...((o=t.publicClient)==null?void 0:o.chains)||[],...r].find(c=>c.id===e)??{id:e,name:`Chain ${e}`,network:`${e}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:e?{...n,...(a=t.data)==null?void 0:a.chain,id:e}:void 0,chains:r}}async function n0e({chainId:t}){const{connector:e}=qi();if(!e)throw new Ra;if(!e.switchChain)throw new Ghe({connector:e});return e.switchChain(t)}function i0e(t,{selector:e=r=>r}={}){const r=qi(),n=()=>t(_F());return r.subscribe(({data:s,connector:o,status:a})=>e({address:s==null?void 0:s.account,connector:o,status:a}),n,{equalityFn:HS})}function s0e(t,{selector:e=r=>r}={}){const r=qi(),n=()=>t(PF());return r.subscribe(({data:s,chains:o})=>{var a;return e({chainId:(a=s==null?void 0:s.chain)==null?void 0:a.id,chains:o})},n,{equalityFn:HS})}var o0e={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62",blockCreated:16966585},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},d9={id:137,name:"Polygon",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}},TF={exports:{}},IF={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -154,32 +159,32 @@ ${r.length}`);return Qn(Xo([n,r]),e)}const rhe="0x608060405234801562000011576000 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var bb=C,Yhe=dS;function Jhe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Xhe=typeof Object.is=="function"?Object.is:Jhe,Zhe=Yhe.useSyncExternalStore,e0e=bb.useRef,t0e=bb.useEffect,r0e=bb.useMemo,n0e=bb.useDebugValue;kB.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var s=e0e(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=r0e(function(){function c(h){if(!l){if(l=!0,u=h,h=n(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return f=p}return f=h}if(p=f,Xhe(u,h))return p;var v=n(h);return i!==void 0&&i(p,v)?p:(u=h,f=v)}var l=!1,u,f,d=r===void 0?null:r;return[function(){return c(e())},d===null?void 0:function(){return c(d())}]},[e,r,n,i]);var a=Zhe(t,s[0],s[1]);return t0e(function(){o.hasValue=!0,o.value=a},[a]),n0e(a),a};SB.exports=kB;var AB=SB.exports;function i0e({queryClient:t=new lS({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:e=bB({storage:typeof window<"u"&&window.localStorage?window.localStorage:gB}),persister:r=typeof window<"u"?Yce({key:"cache",storage:e,serialize:i=>i,deserialize:i=>i}):void 0,...n}){const i=Uhe({...n,storage:e});return r&&qle({queryClient:t,persister:r,dehydrateOptions:{shouldDehydrateQuery:s=>s.cacheTime!==0&&s.queryKey[0].persist!==!1}}),Object.assign(i,{queryClient:t})}var _B=C.createContext(void 0),wb=C.createContext(void 0);function s0e({children:t,config:e}){return C.createElement(_B.Provider,{children:C.createElement(hS,{children:t,client:e.queryClient,context:wb}),value:e})}function Eb(){const t=C.useContext(_B);if(!t)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` -`));return t}var o0e=dS.useSyncExternalStore;function a0e(t){return Array.isArray(t)}function c0e(t){if(!uT(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!uT(r)||!r.hasOwnProperty("isPrototypeOf"))}function uT(t){return Object.prototype.toString.call(t)==="[object Object]"}function l0e(t,e,r){return a0e(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function u0e(t){return JSON.stringify(t,(e,r)=>c0e(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):typeof r=="bigint"?r.toString():r)}function f0e(t,e){return typeof t=="function"?t(...e):!!t}function d0e(t,e){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(e.trackedProps.add(n),t[n])})}),r}function h0e(t,e){const r=tb({context:t.context}),n=fL(),i=dL(),s=r.defaultQueryOptions({...t,queryKeyHashFn:u0e});s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=vt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=vt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=vt.batchCalls(s.onSettled)),s.suspense&&typeof s.staleTime!="number"&&(s.staleTime=1e3),(s.suspense||s.useErrorBoundary)&&(i.isReset()||(s.retryOnMount=!1));const[o]=C.useState(()=>new e(r,s)),a=o.getOptimisticResult(s);if(o0e(C.useCallback(f=>n?()=>{}:o.subscribe(vt.batchCalls(f)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),C.useEffect(()=>{i.clearReset()},[i]),C.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),s.suspense&&a.isLoading&&a.isFetching&&!n)throw o.fetchOptimistic(s).then(({data:f})=>{var d,h;(d=s.onSuccess)==null||d.call(s,f),(h=s.onSettled)==null||h.call(s,f,null)}).catch(f=>{var d,h;i.clearReset(),(d=s.onError)==null||d.call(s,f),(h=s.onSettled)==null||h.call(s,void 0,f)});if(a.isError&&!i.isReset()&&!a.isFetching&&f0e(s.useErrorBoundary,[a.error,o.getCurrentQuery()]))throw a.error;const c=a.status==="loading"&&a.fetchStatus==="idle"?"idle":a.status,l=c==="idle",u=c==="loading"&&a.fetchStatus==="fetching";return{...a,defaultedOptions:s,isIdle:l,isLoading:u,observer:o,status:c}}function qS(t,e,r){const n=YD(t,e,r);return Fle({context:wb,...n})}function p0e(t,e,r){const n=l0e(t,e,r),i=h0e({context:wb,...n},uS),s={data:i.data,error:i.error,fetchStatus:i.fetchStatus,isError:i.isError,isFetched:i.isFetched,isFetchedAfterMount:i.isFetchedAfterMount,isFetching:i.isFetching,isIdle:i.isIdle,isLoading:i.isLoading,isRefetching:i.isRefetching,isSuccess:i.isSuccess,refetch:i.refetch,status:i.status,internal:{dataUpdatedAt:i.dataUpdatedAt,errorUpdatedAt:i.errorUpdatedAt,failureCount:i.failureCount,isFetchedAfterMount:i.isFetchedAfterMount,isLoadingError:i.isLoadingError,isPaused:i.isPaused,isPlaceholderData:i.isPlaceholderData,isPreviousData:i.isPreviousData,isRefetchError:i.isRefetchError,isStale:i.isStale,remove:i.remove}};return i.defaultedOptions.notifyOnChangeProps?s:d0e(s,i.observer)}var v0e=()=>tb({context:wb});function PB({chainId:t}={}){return AB.useSyncExternalStoreWithSelector(e=>Hhe({chainId:t},e),()=>DC({chainId:t}),()=>DC({chainId:t}),e=>e,(e,r)=>e.uid===r.uid)}function U2({chainId:t}){return[{entity:"walletClient",chainId:t,persist:!1}]}function m0e({queryKey:[{chainId:t}]}){return EB({chainId:t})}function VS({chainId:t,suspense:e,onError:r,onSettled:n,onSuccess:i}={}){const{connector:s}=Sn(),o=xb({chainId:t}),a=p0e(U2({chainId:o}),m0e,{cacheTime:0,enabled:!!s,staleTime:1/0,suspense:e,onError:r,onSettled:n,onSuccess:i}),c=v0e();return C.useEffect(()=>qhe({chainId:o},u=>{u?c.invalidateQueries(U2({chainId:o})):c.removeQueries(U2({chainId:o}))}),[c,o]),a}function xb({chainId:t}={}){return PB({chainId:t}).chain.id}function y0e(){const[,t]=C.useReducer(e=>e+1,0);return t}var z2=t=>typeof t=="object"&&!Array.isArray(t);function TB(t,e,r=e,n=RC){const i=C.useRef([]),s=AB.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(z2(o)&&z2(a)&&i.current.length){for(const c of i.current)if(!n(o[c],a[c]))return!1;return!0}return n(o,a)});if(z2(s)){const o={...s};return Object.defineProperties(o,Object.entries(o).reduce((a,[c,l])=>({...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),l)}}),{})),o}return s}function Sn({onConnect:t,onDisconnect:e}={}){const r=Eb(),n=C.useCallback(a=>Ghe(a),[r]),i=TB(n,xB),s=C.useRef(),o=s.current;return C.useEffect(()=>{(o==null?void 0:o.status)!=="connected"&&i.status==="connected"&&(t==null||t({address:i.address,connector:i.connector,isReconnected:(o==null?void 0:o.status)==="reconnecting"||(o==null?void 0:o.status)===void 0})),(o==null?void 0:o.status)==="connected"&&i.status==="disconnected"&&(e==null||e()),s.current=i},[t,e,o,i]),i}var g0e=t=>[{entity:"connect",...t}],b0e=t=>{const{connector:e,chainId:r}=t;if(!e)throw new Error("connector is required");return zhe({connector:e,chainId:r})};function IB({chainId:t,connector:e,onError:r,onMutate:n,onSettled:i,onSuccess:s}={}){const o=Eb(),{data:a,error:c,isError:l,isIdle:u,isLoading:f,isSuccess:d,mutate:h,mutateAsync:p,reset:v,status:b,variables:y}=qS(g0e({connector:e,chainId:t}),b0e,{onError:r,onMutate:n,onSettled:i,onSuccess:s}),m=C.useCallback(S=>h({chainId:(S==null?void 0:S.chainId)??t,connector:(S==null?void 0:S.connector)??e}),[t,e,h]),g=C.useCallback(S=>p({chainId:(S==null?void 0:S.chainId)??t,connector:(S==null?void 0:S.connector)??e}),[t,e,p]);return{connect:m,connectAsync:g,connectors:o.connectors,data:a,error:c,isError:l,isIdle:u,isLoading:f,isSuccess:d,pendingConnector:y==null?void 0:y.connector,reset:v,status:b,variables:y}}var w0e=[{entity:"disconnect"}],E0e=()=>Whe();function OB({onError:t,onMutate:e,onSettled:r,onSuccess:n}={}){const{error:i,isError:s,isIdle:o,isLoading:a,isSuccess:c,mutate:l,mutateAsync:u,reset:f,status:d}=qS(w0e,E0e,{...t?{onError(h,p,v){t(h,v)}}:{},onMutate:e,...r?{onSettled(h,p,v,b){r(p,b)}}:{},...n?{onSuccess(h,p,v){n(v)}}:{}});return{disconnect:l,disconnectAsync:u,error:i,isError:s,isIdle:o,isLoading:a,isSuccess:c,reset:f,status:d}}function on(){const t=Eb(),e=C.useCallback(r=>Khe(r),[t]);return TB(e,CB)}var x0e=t=>[{entity:"switchNetwork",...t}],C0e=t=>{const{chainId:e}=t;if(!e)throw new Error("chainId is required");return Vhe({chainId:e})};function GS({chainId:t,throwForSwitchChainNotSupported:e,onError:r,onMutate:n,onSettled:i,onSuccess:s}={}){var I;const o=Eb(),a=y0e(),{data:c,error:l,isError:u,isIdle:f,isLoading:d,isSuccess:h,mutate:p,mutateAsync:v,reset:b,status:y,variables:m}=qS(x0e({chainId:t}),C0e,{onError:r,onMutate:n,onSettled:i,onSuccess:s}),g=C.useCallback(F=>p({chainId:F??t}),[t,p]),S=C.useCallback(F=>v({chainId:F??t}),[t,v]);C.useEffect(()=>o.subscribe(({chains:j,connector:H})=>({chains:j,connector:H}),a),[o,a]);let P,T;const w=!!((I=o.connector)!=null&&I.switchChain);return(e||w)&&(P=g,T=S),{chains:o.chains??[],data:c,error:l,isError:u,isIdle:f,isLoading:d,isSuccess:h,pendingChainId:m==null?void 0:m.chainId,reset:b,status:y,switchNetwork:P,switchNetworkAsync:T,variables:m}}const S0e=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var k0e=Object.freeze({__proto__:null,abi:S0e});const A0e=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],_0e={isValidSignatureBytes32:"0x1626ba7e"};var P0e=Object.freeze({__proto__:null,abi:A0e,returns:_0e});const T0e=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var I0e=Object.freeze({__proto__:null,abi:T0e});const O0e=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var R0e=Object.freeze({__proto__:null,abi:O0e});const $0e=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"}];var M0e=Object.freeze({__proto__:null,abi:$0e});const N0e=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var D0e=Object.freeze({__proto__:null,abi:N0e});const L0e=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var B0e=Object.freeze({__proto__:null,abi:L0e});const F0e=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var j0e=Object.freeze({__proto__:null,abi:F0e});const tn={erc6492:I0e,erc5719:k0e,erc1271:P0e,factory:R0e,mainModule:M0e,mainModuleUpgradable:D0e,sequenceUtils:B0e,requireFreshSigner:j0e},U0e=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:tn},Symbol.toStringTag,{value:"Module"}));function py(){return py=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),me({},n)).then(i=>ye(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),me({},n)).then(i=>ye(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),me({},n)).then(i=>ye(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),me({},n)).then(i=>ye(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),me(n,i)).then(s=>ye(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),me(n,i)).then(s=>ye(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),me(n,i)).then(s=>ye(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),me(n,i)).then(s=>ye(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),me(n,i)).then(s=>ye(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),me(n,i)).then(s=>ye(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),me(n,i)).then(s=>ye(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),me(n,i)).then(s=>ye(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),me({},n)).then(i=>ye(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),me(n,i)).then(s=>ye(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),me(n,i)).then(s=>ye(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),me(n,i)).then(s=>ye(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),me(n,i)).then(s=>ye(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),me(n,i)).then(s=>ye(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),me(n,i)).then(s=>ye(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),me({},n)).then(i=>ye(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),me(n,i)).then(s=>ye(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),me(n,i)).then(s=>ye(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),me(n,i)).then(s=>ye(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),me(n,i)).then(s=>ye(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),me(n,i)).then(s=>ye(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),me(n,i)).then(s=>ye(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),me(n,i)).then(s=>ye(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),me(n,i)).then(s=>ye(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),me(n,i)).then(s=>ye(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),me({},n)).then(i=>ye(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.walletRecover=(n,i)=>this.fetch(this.url("WalletRecover"),me(n,i)).then(s=>ye(s).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),me(n,i)).then(s=>ye(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),me(n,i)).then(s=>ye(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),me(n,i)).then(s=>ye(s).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const me=(t={},e={})=>({method:"POST",headers:py({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ye=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),fT=typeof global=="object"?global.fetch:window.fetch;class Uh extends RB{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,fT),this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=py({},s.headers,o),fT(i,s)},this.projectAccessKey=r,this.jwtAuth=n,this.fetch=this._fetch}}const K0e=Object.freeze(Object.defineProperty({__proto__:null,API:RB,SequenceAPIClient:Uh,SmartRampOrderStatus:q0e,SmartRampTxnStatus:V0e,SortOrder:G0e,WebRPCSchemaHash:H0e,WebRPCSchemaVersion:W0e,WebRPCVersion:z0e},Symbol.toStringTag,{value:"Module"})),$B="3.7.5",Q0e=$B,Y0e=typeof atob=="function",J0e=typeof btoa=="function",xd=typeof Buffer=="function",dT=typeof TextDecoder=="function"?new TextDecoder:void 0,hT=typeof TextEncoder=="function"?new TextEncoder:void 0,X0e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",hh=Array.prototype.slice.call(X0e),Xp=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(hh),Z0e=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Xr=String.fromCharCode.bind(String),pT=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),MB=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),NB=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),DB=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=hh[e>>18&63]+hh[e>>12&63]+hh[e>>6&63]+hh[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},KS=J0e?t=>btoa(t):xd?t=>Buffer.from(t,"binary").toString("base64"):DB,LC=xd?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?MB(LC(t)):LC(t),e1e=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Xr(192|e>>>6)+Xr(128|e&63):Xr(224|e>>>12&15)+Xr(128|e>>>6&63)+Xr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Xr(240|e>>>18&7)+Xr(128|e>>>12&63)+Xr(128|e>>>6&63)+Xr(128|e&63)}},t1e=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,LB=t=>t.replace(t1e,e1e),vT=xd?t=>Buffer.from(t,"utf8").toString("base64"):hT?t=>LC(hT.encode(t)):t=>KS(LB(t)),yf=(t,e=!1)=>e?MB(vT(t)):vT(t),mT=t=>yf(t,!0),r1e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,n1e=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return Xr((r>>>10)+55296)+Xr((r&1023)+56320);case 3:return Xr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Xr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},BB=t=>t.replace(r1e,n1e),FB=t=>{if(t=t.replace(/\s+/g,""),!Z0e.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?Xr(e>>16&255,e>>8&255):Xr(e>>16&255,e>>8&255,e&255);return r},QS=Y0e?t=>atob(NB(t)):xd?t=>Buffer.from(t,"base64").toString("binary"):FB,jB=xd?t=>pT(Buffer.from(t,"base64")):t=>pT(QS(t).split("").map(e=>e.charCodeAt(0))),UB=t=>jB(zB(t)),i1e=xd?t=>Buffer.from(t,"base64").toString("utf8"):dT?t=>dT.decode(jB(t)):t=>BB(QS(t)),zB=t=>NB(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),BC=t=>i1e(zB(t)),s1e=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},WB=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),HB=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,WB(r));t("fromBase64",function(){return BC(this)}),t("toBase64",function(e){return yf(this,e)}),t("toBase64URI",function(){return yf(this,!0)}),t("toBase64URL",function(){return yf(this,!0)}),t("toUint8Array",function(){return UB(this)})},qB=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,WB(r));t("toBase64",function(e){return jv(this,e)}),t("toBase64URI",function(){return jv(this,!0)}),t("toBase64URL",function(){return jv(this,!0)})},o1e=()=>{HB(),qB()},Wl={version:$B,VERSION:Q0e,atob:QS,atobPolyfill:FB,btoa:KS,btoaPolyfill:DB,fromBase64:BC,toBase64:yf,encode:yf,encodeURI:mT,encodeURL:mT,utob:LB,btou:BB,decode:BC,isValid:s1e,fromUint8Array:jv,toUint8Array:UB,extendString:HB,extendUint8Array:qB,extendBuiltins:o1e};var FC=function(){return FC=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),c1e=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},l1e=function(t,e,r){return sl(void 0,void 0,void 0,function(){var n,i;return ol(this,function(s){return n=r.messageDigest(),i=$$(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},u1e=function(t,e,r){return sl(void 0,void 0,void 0,function(){var n,i,s,o,a;return ol(this,function(c){switch(c.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=c.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new sd(r.address,s,t),[4,o.isValidSignature(n,ne(r.signature))];case 2:return a=c.sent(),a===f1e?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},f1e="0x1626ba7e",VB="1",jC="eth",d1e={name:"ETHAuth",version:VB},t1=function(){function t(){for(var e=[],r=0;r0&&(c+="."+i.extra),[2,c]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),sl(n,void 0,void 0,function(){var o,a,c,l,u,f,d,h,p,v;return ol(this,function(b){switch(b.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],a!==jC)throw new Error("ethauth: not an ethauth proof");return d=Wl.decode(l),h=JSON.parse(d),p=new Cb({address:c,claims:h,signature:u,extra:f}),[4,this.validateProof(p,s)];case 1:if(v=b.sent(),!v)throw new Error("ethauth: proof is invalid");return[2,p]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),sl(n,void 0,void 0,function(){var o,a;return ol(this,function(c){switch(c.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=c.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");c.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return sl(n,void 0,void 0,function(){var s,c,o,a,c;return ol(this,function(l){switch(l.label){case 0:s=[],c=0,l.label=1;case 1:if(!(cWl.encode(t,!0),YS=t=>Wl.encode(JSON.stringify(t),!0),p1e=t=>{if(t!=null)return Wl.decode(t)},JS=t=>{if(t!=null)return JSON.parse(Wl.decode(t))};function GB(t){return t!=null&&(J.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Fe(t)||typeof t=="bigint"||oa(t))}const XS=t=>ne(Be(typeof t=="string"?gt(t):t)),KB=(t,e,r)=>We(["string","uint256","address","bytes32"],["",e,t,r]),UC=(t,e,r)=>Be(KB(t,e,r)),QB=()=>typeof window>"u"&&typeof process=="object",v1e=()=>!QB(),YB=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Wl.decode(e[1]))};function vy(){return vy=Object.assign?Object.assign.bind():function(t){for(var e=1;ege.configure(t),r1=(t,e,r)=>{const n={};return r&&r.length>0&&(n.Authorization=`BEARER ${r}`),e&&e.length>0&&(n["X-Access-Key"]=e),{url:t,headers:n,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}}};let y1e=class{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${Be(gt(JSON.stringify(i,g1e)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function g1e(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function ZS(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function b1e(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function w1e(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const e8=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),XB=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},ZB=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},eF=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},E1e=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),tF=t=>{const e=vy({},t.types);return delete e.EIP712Domain,Wr.hash(t.domain,e,t.message)},H1=t=>ne(tF(t)),{defineReadOnly:x1e,getStatic:C1e,resolveProperties:S1e,checkProperties:k1e,shallowCopy:A1e,deepCopy:_1e}=MJ,P1e=t=>t.replace(/([^:]\/)\/+/g,"$1"),T1e=Object.freeze(Object.defineProperty({__proto__:null,Logger:JB,PromiseCache:y1e,base64Decode:p1e,base64DecodeObject:JS,base64Encode:h1e,base64EncodeObject:YS,checkProperties:k1e,configureLogger:m1e,deepCopy:_1e,defineReadOnly:x1e,encodeMessageDigest:XS,encodeTypedDataDigest:H1,encodeTypedDataHash:tF,getEthersConnectionInfo:r1,getRandomInt:e8,getStatic:C1e,isBigNumberish:GB,isBrowser:v1e,isNode:QB,jwtDecodeClaims:YB,logger:ge,packMessageData:KB,promisify:ZS,queryStringFromObject:b1e,queryStringToObject:w1e,resolveProperties:S1e,sanitizeAlphanumeric:ZB,sanitizeHost:eF,sanitizeNumberString:XB,shallowCopy:A1e,sleep:E1e,subDigestOf:UC,urlClean:P1e},Symbol.toStringTag,{value:"Module"}));function tr(){return tr=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:J.from(t).toNumber(),O1e=t=>{if(t)return rF(t)},nF=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(l=>l.chainId).sort(),s=i.filter((l,u)=>i.indexOf(l)!==u);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(nF(t,!0,e),t),R1e=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},$1e=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},sF=t=>iF(oF(t)),Es=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=J.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(J.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},M1e=(t,e)=>t?t.name===e||t.chainId===e:!1,N1e=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Sb=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",t8=t=>Sb("https://${network}-indexer.sequence.app",{network:t}),aF=t=>Sb("https://${network}-relayer.sequence.app",{network:t}),cF=t=>Sb("https://nodes.sequence.app/${network}",{network:t});function r8(t){return Es(Wf,t)}function lF(t){return J.isBigNumber(t)?t:GB(t)?J.from(t):J.from(t.chainId)}const Pr=t=>{const e=cF(t);return{rpcUrl:e,relayer:{url:aF(t),provider:{url:e}},indexerUrl:t8(t)}},Wf=sF([tr({},Jt[le.POLYGON],Pr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),tr({},Jt[le.MAINNET],Pr("mainnet")),tr({},Jt[le.BSC],Pr("bsc")),tr({},Jt[le.AVALANCHE],Pr("avalanche")),tr({},Jt[le.ARBITRUM],Pr("arbitrum")),tr({},Jt[le.ARBITRUM_NOVA],Pr("arbitrum-nova")),tr({},Jt[le.OPTIMISM],Pr("optimism")),tr({},Jt[le.POLYGON_ZKEVM],Pr("polygon-zkevm")),tr({},Jt[le.GNOSIS],Pr("gnosis")),tr({},Jt[le.RINKEBY],Pr("rinkeby"),{disabled:!0}),tr({},Jt[le.GOERLI],Pr("goerli")),tr({},Jt[le.SEPOLIA],Pr("sepolia")),tr({},Jt[le.POLYGON_MUMBAI],Pr("mumbai")),tr({},Jt[le.BSC_TESTNET],Pr("bsc-testnet")),tr({},Jt[le.ARBITRUM_GOERLI],Pr("arbitrum-goerli")),tr({},Jt[le.BASE],Pr("base")),tr({},Jt[le.BASE_GOERLI],Pr("base-goerli")),tr({},Jt[le.HOMEVERSE_TESTNET],Pr("homeverse-testnet")),tr({},Jt[le.AVALANCHE_TESTNET],Pr("avalanche-testnet")),tr({},Jt[le.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),tr({},Jt[le.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Hf="2.0";class n8{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=uF(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const uF=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function fF(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function dF(t){return t!==void 0&&t.sendAsync!==void 0}let D1e=0;class my{constructor(e,r){this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,fF(e)?this.send=e.send.bind(e):dF(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Hf,id:++D1e,method:n,params:i},(c,l)=>{c?a(c):o(l?l.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class L1e{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync,this.provider=e}}class B1e{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=zC(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=zC(this.isAllowedFunc)}}const zC=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class i8{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,c)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const l=this.cacheKey(n.method,n.params,c||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(l,a.result):this.setCacheByBlockValue(l,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class hF{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:te(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[qe(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const pF=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},vF=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";ge.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?ge.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):ge.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},F1e=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:te(s)});return}e(r,n,i)},mF=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class j1e{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{if(mF.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class U1e{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...mF],this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}ge.debug("[public-provider] sending request to signer window",n.method),r(n,i)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new Go(e))}}class yF{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,c)=>{n(o,a);for(let l=0;l{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class z1e extends Go{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,c)=>this._sender.send(a,c),this.fetch=(a,c)=>{const l={method:a,params:c,id:this._nextId++,jsonrpc:"2.0"};return _1(this.connection,JSON.stringify(l),W1e).then(f=>f,f=>{throw f})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new n8(i??[new hF({chainId:n}),new yF,new i8({defaultChainId:n,blockCache:s})],new my(this.fetch,n));this._sender=new my(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Jt[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=J.from(r).toNumber(),this.getNetwork()}}}function W1e(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const H1e=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:B1e,CachedProvider:i8,ChainId:le,EagerProvider:hF,JsonRpcExternalProvider:L1e,JsonRpcProvider:z1e,JsonRpcRouter:n8,JsonRpcSender:my,JsonRpcVersion:Hf,NetworkType:Yt,PublicProvider:U1e,SigningProvider:j1e,SingleflightMiddleware:yF,allNetworks:Wf,allowProviderMiddleware:zC,checkNetworkConfig:M1e,createJsonRpcMiddlewareStack:uF,ensureUniqueNetworks:R1e,ensureValidNetworks:iF,exceptionProviderMiddleware:pF,findNetworkConfig:Es,findSupportedNetwork:r8,getChainId:rF,indexerURL:t8,isJsonRpcHandler:dF,isJsonRpcProvider:fF,isNetworkConfig:I1e,isValidNetworkConfig:nF,loggingProviderMiddleware:vF,maybeChainId:O1e,networkProviderMiddleware:F1e,networks:Jt,networksIndex:N1e,nodesURL:cF,relayerURL:aF,sortNetworks:oF,stringTemplate:Sb,toChainIdNumber:lF,updateNetworkConfig:$1e,validateAndSortNetworks:sF},Symbol.toStringTag,{value:"Module"}));function bn(){return bn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(o8(i))return We(["uint8","uint8","address"],[El.Address,i.weight,i.address]);if(i.isDynamic){const s=ne(i.signature);return We(["uint8","uint8","address","uint16","bytes"],[El.DynamicSignature,i.weight,i.address,s.length,s])}return We(["uint8","uint8","bytes"],[El.EOASignature,i.weight,i.signature])});return We(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function CF(t,e,r){const n=q1(e),i=await Promise.all(t.signers.map(async s=>{if(o8(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!s8(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:V1(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function zh(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=J.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const c=e.get(a.address),l=ne(c.signature);return i=i.add(a.weight),c.isDynamic||l.length!==66?bn({},a,{isDynamic:!0,signature:c.signature,address:a.address}):bn({},a,{isDynamic:!1,signature:c.signature})});return{encoded:a8({version:1,threshold:t.threshold,signers:s}),weight:i}}const c8={decode:t=>xF(t),encode:t=>a8(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>CF(t,e,r),encodeSigners:(t,e,r,n)=>zh(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=c8.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var Z1e=Object.freeze({__proto__:null,SignaturePartType:El,isAddressMember:o8,isUnrecoveredSignatureMember:wF,isUnrecoveredSignature:EF,decodeSignature:xF,encodeSignature:a8,recoverSignature:CF,encodeSigners:zh,SignatureCoder:c8});const l8={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Be(Bn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),We(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>J.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:J.from(e.weight).toNumber()})),fromSimple:t=>{if(!Zt.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new Br([...tn.mainModule.abi,...tn.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[l8.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:J.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:J.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:J.from(n.weight),address:n.address}));return{version:e.version,threshold:J.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!Zt.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=zh(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>J.from(s).sub(o).toNumber())){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=zh(t,r,[]);if(a.gte(t.threshold))return o}return zh(t,r,[]).encoded}};var epe=Object.freeze({__proto__:null,ConfigCoder:l8});const SF=1,kF={version:SF,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Io=Object.freeze({__proto__:null,config:epe,signature:Z1e,version:SF,DeployedWalletContext:kF});const u8="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function AF(t){return Be(_F(t))}function _F(t){return We(["bytes32","bytes32"],[u8,t])}function PF(t){const e=ne(t);if(e.length===64&&te(e.slice(0,32))===u8)return te(e.slice(32,64))}function tpe(t){return PF(t)!==void 0}var rpe=Object.freeze({__proto__:null,SetImageHashPrefix:u8,hashSetImageHash:AF,messageSetImageHash:_F,decodeMessageSetImageHash:PF,isMessageSetImageHash:tpe});let qr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),pr=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const yy=66;function Hl(t){return t.left!==void 0&&t.right!==void 0}function Cd(t){return t.tree!==void 0}function G1(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function gy(t){let e=ne(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case pr.Signature:{const s=e[0],o=te(e.slice(1,yy+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(yy+1)}break;case pr.Address:{const s=e[0],o=qe(te(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case pr.DynamicSignature:{const s=e[0],o=qe(te(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],c=te(e.slice(24,24+a));r=n(r,{address:o,signature:c,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case pr.Node:{const s=te(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case pr.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=gy(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case pr.Subdigest:{const s=te(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case pr.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],c=gy(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:c}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${te(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class TF extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function xl(t,e,r){if(Hl(t)){const[n,i]=await Promise.all([xl(t.left,e,r),xl(t.right,e,r)]);return{left:n,right:i}}if(Cd(t))return{weight:t.weight,threshold:t.threshold,tree:await xl(t.tree,e,r)};if(G1(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await s8(t.address,e,t.signature,r))throw new TF(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:V1(e,t.signature),signature:t.signature,subdigest:e};return t}const dn={concat:(t,e)=>We(["bytes","bytes"],[t,e]),node:t=>We(["uint8","bytes32"],[pr.Node,t]),branch:t=>{const e=ne(t);return We(["uint8","uint24","bytes"],[pr.Branch,e.length,e])},nested:(t,e,r)=>{const n=ne(r);return We(["uint8","uint8","uint16","uint24","bytes"],[pr.Nested,t,e,n.length,n])},subdigest:t=>We(["uint8","bytes32"],[pr.Subdigest,t]),signature:(t,e)=>We(["uint8","uint8","bytes"],[pr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ne(r);return We(["uint8","uint8","address","uint24","bytes"],[pr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>We(["uint8","uint8","address"],[pr.Address,t,e])};function Wh(t,e,r,n,i={}){const s=Hh(t.tree,e,r,i);return J.from(n).isZero()?{encoded:We(["uint8","uint16","uint32","bytes"],[qr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:J.from(t.threshold).gt(255)?{encoded:We(["uint8","uint16","uint32","bytes"],[qr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:We(["uint8","uint8","uint32","bytes"],[qr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function Hh(t,e,r,n={}){const i=!n.disableTrim;if(ks(t)){const s=Hh(t.left,e,r),o=Hh(t.right,e,r),a=Ln(t.left),c=Ln(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!c?{encoded:dn.node(ui(t)),weight:Zt}:i&&o.weight.eq(0)&&!c?{encoded:dn.concat(s.encoded,dn.node(ui(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:dn.concat(dn.node(ui(t.left)),dn.branch(o.encoded)),weight:o.weight}:{encoded:dn.concat(s.encoded,dn.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(da(t)){const s=Hh(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:dn.node(ui(t)),weight:Zt}:{encoded:dn.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(ha(t))return{encoded:dn.node(ui(t)),weight:Zt};if(fa(t)){const s=r.includes(t.subdigest);return{encoded:dn.node(ui(t)),weight:s?RR:Zt}}if(Ln(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:dn.dynamicSignature(t.weight,t.address,a),weight:J.from(t.weight)}:{encoded:dn.signature(t.weight,a),weight:J.from(t.weight)}}else return{encoded:dn.address(t.weight,t.address),weight:Zt};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function f8(t){return h8(t)?f8(t.suffix[t.suffix.length-1]):t.config}function d8(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function K1(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(d8)}function IF(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function h8(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(IF)}function kb(t){const e=ne(t),r=e[0];switch(r){case qr.Legacy:return{version:2,type:qr.Legacy,decoded:Uv(e)};case qr.Dynamic:return{version:2,type:qr.Dynamic,decoded:Uv(e.slice(1))};case qr.NoChainIdDynamic:return{version:2,type:qr.NoChainIdDynamic,decoded:Uv(e.slice(1))};case qr.Chained:return OF(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Uv(t){const e=ne(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=gy(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function OF(t){const e=ne(t),r=e[0];if(r!==qr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;ine(ic(s))),i=We(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return We(["uint8","bytes"],[qr.Chained,i])}function ic(t){if(zo(t))return te(t);if(K1(t)||h8(t))return Ab(ic(t),(t.suffix||[]).map(ic));const e=d8(t)?t.decoded:t.config;switch(t.type){case qr.Legacy:if(J.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return WC(e);case qr.NoChainIdDynamic:case qr.Dynamic:return We(["uint8","bytes"],[t.type,WC(e)]);case qr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function WC(t){return We(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,qh(t.tree)])}function qh(t){if(ks(t)||Hl(t)){const e=ne(qh(t.right)),r=ne(qh(t.left));return ks(t.right)||Hl(t.right)?We(["bytes","uint8","uint24","bytes"],[r,pr.Branch,e.length,e]):We(["bytes","bytes"],[r,e])}if(da(t)||Cd(t)){const e=ne(qh(t.tree));return We(["uint8","uint8","uint16","uint24","bytes"],[pr.Nested,t.weight,t.threshold,e.length,e])}if(G1(t)||Ln(t)&&t.signature!==void 0){const e=ne(t.signature);if(t.isDynamic||e.length!==yy){if(!t.address)throw new Error("Dynamic signature leaf must have address");return We(["uint8","uint8","address","uint24","bytes"],[pr.DynamicSignature,t.weight,t.address,e.length,e])}else return We(["uint8","uint8","bytes"],[pr.Signature,t.weight,e])}if(Ln(t))return We(["uint8","uint8","address"],[pr.Address,t.weight,t.address]);if(ha(t))return We(["uint8","bytes32"],[pr.Node,t.nodeHash]);if(fa(t))return We(["uint8","bytes32"],[pr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function Vh(t){return ks(t)?[...Vh(t.left),...Vh(t.right)]:da(t)?Vh(t.tree):Ln(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function Gh(t){return Hl(t)?[...Gh(t.left),...Gh(t.right)]:Cd(t)?Gh(t.tree):G1(t)?[t.signature]:[]}function zv(t){return Hl(t)?[...zv(t.left),...zv(t.right)]:Cd(t)?zv(t.tree):fa(t)?[t.subdigest]:[]}async function by(t){const e=typeof t=="string"?kb(t):t;if(K1(e)){const n=await Promise.all([by(bn({},e,{suffix:void 0})),...e.suffix.map(i=>by(i))]);return Ab(n[0],n.slice(1))}const{trimmed:r}=await Kh(e.decoded.tree);return ic(bn({},e,{decoded:bn({},e.decoded,{tree:r})}))}async function Kh(t,e=!0){if(Hl(t)){const[r,n]=await Promise.all([Kh(t.left),Kh(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await xl(t,Tm,void 0);return{weight:0,trimmed:{nodeHash:ui(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Cd(t)){const r=await Kh(t.tree);if(r.weight===0)try{const n=await xl(t,Tm,void 0);return{weight:0,trimmed:{nodeHash:ui(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return ha(t)&&NF(t.nodeHash)?{weight:0,trimmed:bn({},MF(t.nodeHash))}:G1(t)||Ln(t)&&t.signature!==void 0?{weight:J.from(t.weight).toNumber(),trimmed:t}:!e&&fa(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const _b={decode:t=>kb(t),encode:t=>ic(t),trim:t=>by(t),supportsNoChainId:!0,recover:(t,e,r)=>p8(t,e,r),encodeSigners:(t,e,r,n)=>Wh(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=_b.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=zo(t)?t:ic(t),i=r.map(s=>zo(s)?s:ic(s));return Ab(n,i)},hashSetImageHash:function(t){return AF(t)},signaturesOf(t){return Vh(t.tree)},signaturesOfDecoded:function(t){return Gh(t.decoded.tree)}};var npe=Object.freeze({__proto__:null,SignatureType:qr,SignaturePartType:pr,SignaturePartTypeLength:yy,isUnrecoveredNode:Hl,isUnrecoveredNestedLeaf:Cd,isUnrecoveredSignatureLeaf:G1,decodeSignatureTree:gy,InvalidSignatureLeafError:TF,recoverTopology:xl,partEncoder:dn,encodeSigners:Wh,encodeTree:Hh,deepestConfigOfSignature:f8,isUnrecoveredSignature:d8,isUnrecoveredChainedSignature:K1,isSignature:IF,isChainedSignature:h8,decodeSignature:kb,decodeSignatureBody:Uv,decodeChainedSignature:OF,setImageHashStruct:RF,recoverSignature:p8,encodeChain:Ab,encodeSignature:ic,encodeSignatureBody:WC,encodeSignatureTree:qh,signaturesOf:Vh,signaturesOfDecoded:Gh,subdigestsOfDecoded:zv,trimSignature:by,trimUnrecoveredTree:Kh,SignatureCoder:_b});function Ln(t){return t.address!==void 0&&t.weight!==void 0}function fa(t){return t.subdigest!==void 0&&t.address===void 0}function Qh(t){return ks(t)?JSON.stringify({left:Qh(t.left),right:Qh(t.right)}):da(t)?JSON.stringify({weight:J.from(t.weight).toString(),threshold:J.from(t.threshold).toString(),tree:Qh(t.tree)}):Ln(t)?JSON.stringify({address:t.address,weight:J.from(t.weight).toString()}):JSON.stringify(t)}function Yh(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Yh(e.left),right:Yh(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:J.from(e.weight),threshold:J.from(e.threshold),tree:Yh(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:J.from(e.weight)}:e}function da(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function ha(t){return t.nodeHash!==void 0}function v8(t){return Ln(t)||fa(t)||da(t)||ha(t)}function ks(t){return t.left!==void 0&&t.right!==void 0}function ipe(t){return ks(t)||v8(t)}function $F(t){return We(["uint96","address"],[t.weight,t.address])}function MF(t){const e=ne(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=J.from(e.slice(0,12)),n=qe(te(e.slice(12)));return{weight:r,address:n}}function NF(t){const e=ne(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function ui(t){if(Ln(t))return $F(t);if(fa(t))return ec(["string","bytes32"],[`Sequence static digest: + */var bb=C,a0e=dS;function c0e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var l0e=typeof Object.is=="function"?Object.is:c0e,u0e=a0e.useSyncExternalStore,f0e=bb.useRef,d0e=bb.useEffect,h0e=bb.useMemo,p0e=bb.useDebugValue;IF.useSyncExternalStoreWithSelector=function(t,e,r,n,i){var s=f0e(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=h0e(function(){function c(h){if(!l){if(l=!0,u=h,h=n(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return f=p}return f=h}if(p=f,l0e(u,h))return p;var v=n(h);return i!==void 0&&i(p,v)?p:(u=h,f=v)}var l=!1,u,f,d=r===void 0?null:r;return[function(){return c(e())},d===null?void 0:function(){return c(d())}]},[e,r,n,i]);var a=u0e(t,s[0],s[1]);return d0e(function(){o.hasValue=!0,o.value=a},[a]),p0e(a),a};TF.exports=IF;var OF=TF.exports;function v0e({queryClient:t=new lS({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:e=SF({storage:typeof window<"u"&&window.localStorage?window.localStorage:CF}),persister:r=typeof window<"u"?ale({key:"cache",storage:e,serialize:i=>i,deserialize:i=>i}):void 0,...n}){const i=Xhe({...n,storage:e});return r&&rue({queryClient:t,persister:r,dehydrateOptions:{shouldDehydrateQuery:s=>s.cacheTime!==0&&s.queryKey[0].persist!==!1}}),Object.assign(i,{queryClient:t})}var RF=C.createContext(void 0),wb=C.createContext(void 0);function m0e({children:t,config:e}){return C.createElement(RF.Provider,{children:C.createElement(hS,{children:t,client:e.queryClient,context:wb}),value:e})}function Eb(){const t=C.useContext(RF);if(!t)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` +`));return t}var y0e=dS.useSyncExternalStore;function g0e(t){return Array.isArray(t)}function b0e(t){if(!h9(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!h9(r)||!r.hasOwnProperty("isPrototypeOf"))}function h9(t){return Object.prototype.toString.call(t)==="[object Object]"}function w0e(t,e,r){return g0e(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function E0e(t){return JSON.stringify(t,(e,r)=>b0e(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):typeof r=="bigint"?r.toString():r)}function x0e(t,e){return typeof t=="function"?t(...e):!!t}function C0e(t,e){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(e.trackedProps.add(n),t[n])})}),r}function S0e(t,e){const r=tb({context:t.context}),n=mL(),i=yL(),s=r.defaultQueryOptions({...t,queryKeyHashFn:E0e});s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=mt.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=mt.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=mt.batchCalls(s.onSettled)),s.suspense&&typeof s.staleTime!="number"&&(s.staleTime=1e3),(s.suspense||s.useErrorBoundary)&&(i.isReset()||(s.retryOnMount=!1));const[o]=C.useState(()=>new e(r,s)),a=o.getOptimisticResult(s);if(y0e(C.useCallback(f=>n?()=>{}:o.subscribe(mt.batchCalls(f)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),C.useEffect(()=>{i.clearReset()},[i]),C.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),s.suspense&&a.isLoading&&a.isFetching&&!n)throw o.fetchOptimistic(s).then(({data:f})=>{var d,h;(d=s.onSuccess)==null||d.call(s,f),(h=s.onSettled)==null||h.call(s,f,null)}).catch(f=>{var d,h;i.clearReset(),(d=s.onError)==null||d.call(s,f),(h=s.onSettled)==null||h.call(s,void 0,f)});if(a.isError&&!i.isReset()&&!a.isFetching&&x0e(s.useErrorBoundary,[a.error,o.getCurrentQuery()]))throw a.error;const c=a.status==="loading"&&a.fetchStatus==="idle"?"idle":a.status,l=c==="idle",u=c==="loading"&&a.fetchStatus==="fetching";return{...a,defaultedOptions:s,isIdle:l,isLoading:u,observer:o,status:c}}function qS(t,e,r){const n=tL(t,e,r);return Yle({context:wb,...n})}function k0e(t,e,r){const n=w0e(t,e,r),i=S0e({context:wb,...n},uS),s={data:i.data,error:i.error,fetchStatus:i.fetchStatus,isError:i.isError,isFetched:i.isFetched,isFetchedAfterMount:i.isFetchedAfterMount,isFetching:i.isFetching,isIdle:i.isIdle,isLoading:i.isLoading,isRefetching:i.isRefetching,isSuccess:i.isSuccess,refetch:i.refetch,status:i.status,internal:{dataUpdatedAt:i.dataUpdatedAt,errorUpdatedAt:i.errorUpdatedAt,failureCount:i.failureCount,isFetchedAfterMount:i.isFetchedAfterMount,isLoadingError:i.isLoadingError,isPaused:i.isPaused,isPlaceholderData:i.isPlaceholderData,isPreviousData:i.isPreviousData,isRefetchError:i.isRefetchError,isStale:i.isStale,remove:i.remove}};return i.defaultedOptions.notifyOnChangeProps?s:C0e(s,i.observer)}var A0e=()=>tb({context:wb});function $F({chainId:t}={}){return OF.useSyncExternalStoreWithSelector(e=>t0e({chainId:t},e),()=>NC({chainId:t}),()=>NC({chainId:t}),e=>e,(e,r)=>e.uid===r.uid)}function U2({chainId:t}){return[{entity:"walletClient",chainId:t,persist:!1}]}function _0e({queryKey:[{chainId:t}]}){return AF({chainId:t})}function VS({chainId:t,suspense:e,onError:r,onSettled:n,onSuccess:i}={}){const{connector:s}=Sn(),o=xb({chainId:t}),a=k0e(U2({chainId:o}),_0e,{cacheTime:0,enabled:!!s,staleTime:1/0,suspense:e,onError:r,onSettled:n,onSuccess:i}),c=A0e();return C.useEffect(()=>r0e({chainId:o},u=>{u?c.invalidateQueries(U2({chainId:o})):c.removeQueries(U2({chainId:o}))}),[c,o]),a}function xb({chainId:t}={}){return $F({chainId:t}).chain.id}function P0e(){const[,t]=C.useReducer(e=>e+1,0);return t}var z2=t=>typeof t=="object"&&!Array.isArray(t);function MF(t,e,r=e,n=OC){const i=C.useRef([]),s=OF.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(z2(o)&&z2(a)&&i.current.length){for(const c of i.current)if(!n(o[c],a[c]))return!1;return!0}return n(o,a)});if(z2(s)){const o={...s};return Object.defineProperties(o,Object.entries(o).reduce((a,[c,l])=>({...a,[c]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(c)||i.current.push(c),l)}}),{})),o}return s}function Sn({onConnect:t,onDisconnect:e}={}){const r=Eb(),n=C.useCallback(a=>i0e(a),[r]),i=MF(n,_F),s=C.useRef(),o=s.current;return C.useEffect(()=>{(o==null?void 0:o.status)!=="connected"&&i.status==="connected"&&(t==null||t({address:i.address,connector:i.connector,isReconnected:(o==null?void 0:o.status)==="reconnecting"||(o==null?void 0:o.status)===void 0})),(o==null?void 0:o.status)==="connected"&&i.status==="disconnected"&&(e==null||e()),s.current=i},[t,e,o,i]),i}var T0e=t=>[{entity:"connect",...t}],I0e=t=>{const{connector:e,chainId:r}=t;if(!e)throw new Error("connector is required");return Zhe({connector:e,chainId:r})};function NF({chainId:t,connector:e,onError:r,onMutate:n,onSettled:i,onSuccess:s}={}){const o=Eb(),{data:a,error:c,isError:l,isIdle:u,isLoading:f,isSuccess:d,mutate:h,mutateAsync:p,reset:v,status:b,variables:y}=qS(T0e({connector:e,chainId:t}),I0e,{onError:r,onMutate:n,onSettled:i,onSuccess:s}),m=C.useCallback(S=>h({chainId:(S==null?void 0:S.chainId)??t,connector:(S==null?void 0:S.connector)??e}),[t,e,h]),g=C.useCallback(S=>p({chainId:(S==null?void 0:S.chainId)??t,connector:(S==null?void 0:S.connector)??e}),[t,e,p]);return{connect:m,connectAsync:g,connectors:o.connectors,data:a,error:c,isError:l,isIdle:u,isLoading:f,isSuccess:d,pendingConnector:y==null?void 0:y.connector,reset:v,status:b,variables:y}}var O0e=[{entity:"disconnect"}],R0e=()=>e0e();function DF({onError:t,onMutate:e,onSettled:r,onSuccess:n}={}){const{error:i,isError:s,isIdle:o,isLoading:a,isSuccess:c,mutate:l,mutateAsync:u,reset:f,status:d}=qS(O0e,R0e,{...t?{onError(h,p,v){t(h,v)}}:{},onMutate:e,...r?{onSettled(h,p,v,b){r(p,b)}}:{},...n?{onSuccess(h,p,v){n(v)}}:{}});return{disconnect:l,disconnectAsync:u,error:i,isError:s,isIdle:o,isLoading:a,isSuccess:c,reset:f,status:d}}function on(){const t=Eb(),e=C.useCallback(r=>s0e(r),[t]);return MF(e,PF)}var $0e=t=>[{entity:"switchNetwork",...t}],M0e=t=>{const{chainId:e}=t;if(!e)throw new Error("chainId is required");return n0e({chainId:e})};function GS({chainId:t,throwForSwitchChainNotSupported:e,onError:r,onMutate:n,onSettled:i,onSuccess:s}={}){var I;const o=Eb(),a=P0e(),{data:c,error:l,isError:u,isIdle:f,isLoading:d,isSuccess:h,mutate:p,mutateAsync:v,reset:b,status:y,variables:m}=qS($0e({chainId:t}),M0e,{onError:r,onMutate:n,onSettled:i,onSuccess:s}),g=C.useCallback(B=>p({chainId:B??t}),[t,p]),S=C.useCallback(B=>v({chainId:B??t}),[t,v]);C.useEffect(()=>o.subscribe(({chains:j,connector:H})=>({chains:j,connector:H}),a),[o,a]);let P,T;const w=!!((I=o.connector)!=null&&I.switchChain);return(e||w)&&(P=g,T=S),{chains:o.chains??[],data:c,error:l,isError:u,isIdle:f,isLoading:d,isSuccess:h,pendingChainId:m==null?void 0:m.chainId,reset:b,status:y,switchNetwork:P,switchNetworkAsync:T,variables:m}}const N0e=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var D0e=Object.freeze({__proto__:null,abi:N0e});const L0e=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],F0e={isValidSignatureBytes32:"0x1626ba7e"};var B0e=Object.freeze({__proto__:null,abi:L0e,returns:F0e});const j0e=[{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC1271Revert",type:"error"},{inputs:[{internalType:"bytes",name:"error",type:"bytes"}],name:"ERC6492DeployFailed",type:"error"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSig",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"allowSideEffects",type:"bool"},{internalType:"bool",name:"deployAlreadyDeployed",type:"bool"}],name:"isValidSigImpl",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffects",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],name:"isValidSigWithSideEffectsNoThrow",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}];var U0e=Object.freeze({__proto__:null,abi:j0e});const z0e=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var W0e=Object.freeze({__proto__:null,abi:z0e});const H0e=[{type:"function",name:"nonce",constant:!0,inputs:[],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"readNonce",constant:!0,inputs:[{type:"uint256"}],outputs:[{type:"uint256"}],payable:!1,stateMutability:"view"},{type:"function",name:"updateImplementation",constant:!1,inputs:[{type:"address"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"selfExecute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"execute",constant:!1,inputs:[{components:[{type:"bool",name:"delegateCall"},{type:"bool",name:"revertOnError"},{type:"uint256",name:"gasLimit"},{type:"address",name:"target"},{type:"uint256",name:"value"},{type:"bytes",name:"data"}],type:"tuple[]"},{type:"uint256"},{type:"bytes"}],outputs:[],payable:!1,stateMutability:"nonpayable"},{type:"function",name:"createContract",inputs:[{type:"bytes"}],payable:!0,stateMutability:"payable"}];var q0e=Object.freeze({__proto__:null,abi:H0e});const V0e=[{type:"function",name:"updateImageHash",constant:!0,inputs:[{type:"bytes32"}],outputs:[],payable:!1,stateMutability:"view"},{type:"function",name:"imageHash",constant:!0,inputs:[],outputs:[{type:"bytes32"}],payable:!1,stateMutability:"view"}];var G0e=Object.freeze({__proto__:null,abi:V0e});const K0e=[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_mainModule",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"bytes32",name:"_imageHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"_threshold",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_signers",type:"bytes"}],name:"RequiredConfig",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_wallet",type:"address"},{indexed:!0,internalType:"address",name:"_signer",type:"address"}],name:"RequiredSigner",type:"event"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callBalanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callBlockNumber",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_i",type:"uint256"}],name:"callBlockhash",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"callChainId",outputs:[{internalType:"uint256",name:"id",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCode",outputs:[{internalType:"bytes",name:"code",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeHash",outputs:[{internalType:"bytes32",name:"codeHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_addr",type:"address"}],name:"callCodeSize",outputs:[{internalType:"uint256",name:"size",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callCoinbase",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callDifficulty",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLeft",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasLimit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callGasPrice",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"callOrigin",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"callTimestamp",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"knownImageHashes",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"lastImageHashUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastSignerUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"lastWalletUpdate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bool",name:"delegateCall",type:"bool"},{internalType:"bool",name:"revertOnError",type:"bool"},{internalType:"uint256",name:"gasLimit",type:"uint256"},{internalType:"address",name:"target",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],internalType:"struct IModuleCalls.Transaction[]",name:"_txs",type:"tuple[]"}],name:"multiCall",outputs:[{internalType:"bool[]",name:"_successes",type:"bool[]"},{internalType:"bytes[]",name:"_results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_threshold",type:"uint256"},{components:[{internalType:"uint256",name:"weight",type:"uint256"},{internalType:"address",name:"signer",type:"address"}],internalType:"struct RequireUtils.Member[]",name:"_members",type:"tuple[]"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishConfig",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"uint256",name:"_sizeMembers",type:"uint256"},{internalType:"bytes",name:"_signature",type:"bytes"},{internalType:"bool",name:"_index",type:"bool"}],name:"publishInitialSigners",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_wallet",type:"address"},{internalType:"uint256",name:"_nonce",type:"uint256"}],name:"requireMinNonce",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_expiration",type:"uint256"}],name:"requireNonExpired",outputs:[],stateMutability:"view",type:"function"}];var Q0e=Object.freeze({__proto__:null,abi:K0e});const Y0e=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var J0e=Object.freeze({__proto__:null,abi:Y0e});const tn={erc6492:U0e,erc5719:D0e,erc1271:B0e,factory:W0e,mainModule:q0e,mainModuleUpgradable:G0e,sequenceUtils:Q0e,requireFreshSigner:J0e},X0e=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:tn},Symbol.toStringTag,{value:"Module"}));function py(){return py=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),me({},n)).then(i=>ye(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),me({},n)).then(i=>ye(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),me({},n)).then(i=>ye(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),me({},n)).then(i=>ye(i).then(s=>({data:s.data}))),this.getAuthToken=(n,i)=>this.fetch(this.url("GetAuthToken"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,i)=>this.fetch(this.url("SendPasswordlessLink"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.friendList=(n,i)=>this.fetch(this.url("FriendList"),me(n,i)).then(s=>ye(s).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,i)=>this.fetch(this.url("GetFriendByAddress"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,i)=>this.fetch(this.url("SearchFriends"),me(n,i)).then(s=>ye(s).then(o=>({friends:o.friends}))),this.addFriend=(n,i)=>this.fetch(this.url("AddFriend"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,i)=>this.fetch(this.url("UpdateFriendNickname"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,i)=>this.fetch(this.url("RemoveFriend"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.contractCall=(n,i)=>this.fetch(this.url("ContractCall"),me(n,i)).then(s=>ye(s).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,i)=>this.fetch(this.url("DecodeContractCall"),me(n,i)).then(s=>ye(s).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,i)=>this.fetch(this.url("LookupContractCallSelectors"),me(n,i)).then(s=>ye(s).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,i)=>this.fetch(this.url("UserStorageFetch"),me(n,i)).then(s=>ye(s).then(o=>({object:o.object}))),this.userStorageSave=(n,i)=>this.fetch(this.url("UserStorageSave"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,i)=>this.fetch(this.url("UserStorageDelete"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,i)=>this.fetch(this.url("UserStorageFetchAll"),me(n,i)).then(s=>ye(s).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,i)=>this.fetch(this.url("GetMoonpayLink"),me(n,i)).then(s=>ye(s).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),me({},n)).then(i=>ye(i).then(s=>({token:s.token}))),this.isUsingGoogleMail=(n,i)=>this.fetch(this.url("IsUsingGoogleMail"),me(n,i)).then(s=>ye(s).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,i)=>this.fetch(this.url("ResolveENSAddress"),me(n,i)).then(s=>ye(s).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,i)=>this.fetch(this.url("IsValidSignature"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,i)=>this.fetch(this.url("IsValidMessageSignature"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,i)=>this.fetch(this.url("IsValidTypedDataSignature"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,i)=>this.fetch(this.url("IsValidETHAuthProof"),me(n,i)).then(s=>ye(s).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,i)=>this.fetch(this.url("GetCoinPrices"),me(n,i)).then(s=>ye(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,i)=>this.fetch(this.url("GetCollectiblePrices"),me(n,i)).then(s=>ye(s).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,i)=>this.fetch(this.url("GetExchangeRate"),me(n,i)).then(s=>ye(s).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,i)=>this.fetch(this.url("MemoryStore"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.memoryLoad=(n,i)=>this.fetch(this.url("MemoryLoad"),me(n,i)).then(s=>ye(s).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),me({},n)).then(i=>ye(i).then(s=>({payCards:s.payCards}))),this.savePayCard=(n,i)=>this.fetch(this.url("SavePayCard"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,i)=>this.fetch(this.url("UpdatePayCardCVC"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.deletePayCard=(n,i)=>this.fetch(this.url("DeletePayCard"),me(n,i)).then(s=>ye(s).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,i)=>this.fetch(this.url("SmartRampQuote"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,i)=>this.fetch(this.url("SmartRampPurchase"),me(n,i)).then(s=>ye(s).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,i)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),me(n,i)).then(s=>ye(s).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,i)=>this.fetch(this.url("SmartRampGetOrder"),me(n,i)).then(s=>ye(s).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),me(n,i)).then(s=>ye(s).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,i)=>this.fetch(this.url("SmartRampOrdersList"),me(n,i)).then(s=>ye(s).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,i)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),me(n,i)).then(s=>ye(s).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,i)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,i)=>this.fetch(this.url("AdminSmartRampGetOrder"),me(n,i)).then(s=>ye(s).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),me(n,i)).then(s=>ye(s).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,i)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),me(n,i)).then(s=>ye(s).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),me({},n)).then(i=>ye(i).then(s=>({inviteInfo:s.inviteInfo}))),this.isValidAccessCode=(n,i)=>this.fetch(this.url("IsValidAccessCode"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,i)=>this.fetch(this.url("InternalClaimAccessCode"),me(n,i)).then(s=>ye(s).then(o=>({status:o.status}))),this.walletRecover=(n,i)=>this.fetch(this.url("WalletRecover"),me(n,i)).then(s=>ye(s).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,i)=>this.fetch(this.url("BlockNumberAtTime"),me(n,i)).then(s=>ye(s).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,i)=>this.fetch(this.url("PaperSessionSecret"),me(n,i)).then(s=>ye(s).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,i)=>this.fetch(this.url("PaperSessionSecret2"),me(n,i)).then(s=>ye(s).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const me=(t={},e={})=>({method:"POST",headers:py({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ye=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),p9=typeof global=="object"?global.fetch:window.fetch;class Uh extends LF{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,p9),this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=py({},s.headers,o),p9(i,s)},this.projectAccessKey=r,this.jwtAuth=n,this.fetch=this._fetch}}const s1e=Object.freeze(Object.defineProperty({__proto__:null,API:LF,SequenceAPIClient:Uh,SmartRampOrderStatus:r1e,SmartRampTxnStatus:n1e,SortOrder:i1e,WebRPCSchemaHash:t1e,WebRPCSchemaVersion:e1e,WebRPCVersion:Z0e},Symbol.toStringTag,{value:"Module"})),FF="3.7.5",o1e=FF,a1e=typeof atob=="function",c1e=typeof btoa=="function",xd=typeof Buffer=="function",v9=typeof TextDecoder=="function"?new TextDecoder:void 0,m9=typeof TextEncoder=="function"?new TextEncoder:void 0,l1e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",hh=Array.prototype.slice.call(l1e),Xp=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(hh),u1e=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Xr=String.fromCharCode.bind(String),y9=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),BF=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),jF=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),UF=t=>{let e,r,n,i,s="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,s+=hh[e>>18&63]+hh[e>>12&63]+hh[e>>6&63]+hh[e&63]}return o?s.slice(0,o-3)+"===".substring(o):s},KS=c1e?t=>btoa(t):xd?t=>Buffer.from(t,"binary").toString("base64"):UF,DC=xd?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,i=t.length;ne?BF(DC(t)):DC(t),f1e=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?Xr(192|e>>>6)+Xr(128|e&63):Xr(224|e>>>12&15)+Xr(128|e>>>6&63)+Xr(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return Xr(240|e>>>18&7)+Xr(128|e>>>12&63)+Xr(128|e>>>6&63)+Xr(128|e&63)}},d1e=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,zF=t=>t.replace(d1e,f1e),g9=xd?t=>Buffer.from(t,"utf8").toString("base64"):m9?t=>DC(m9.encode(t)):t=>KS(zF(t)),yf=(t,e=!1)=>e?BF(g9(t)):g9(t),b9=t=>yf(t,!0),h1e=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,p1e=t=>{switch(t.length){case 4:var e=(7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3),r=e-65536;return Xr((r>>>10)+55296)+Xr((r&1023)+56320);case 3:return Xr((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return Xr((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},WF=t=>t.replace(h1e,p1e),HF=t=>{if(t=t.replace(/\s+/g,""),!u1e.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,i;for(let s=0;s>16&255):i===64?Xr(e>>16&255,e>>8&255):Xr(e>>16&255,e>>8&255,e&255);return r},QS=a1e?t=>atob(jF(t)):xd?t=>Buffer.from(t,"base64").toString("binary"):HF,qF=xd?t=>y9(Buffer.from(t,"base64")):t=>y9(QS(t).split("").map(e=>e.charCodeAt(0))),VF=t=>qF(GF(t)),v1e=xd?t=>Buffer.from(t,"base64").toString("utf8"):v9?t=>v9.decode(qF(t)):t=>WF(QS(t)),GF=t=>jF(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),LC=t=>v1e(GF(t)),m1e=t=>{if(typeof t!="string")return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},KF=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),QF=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,KF(r));t("fromBase64",function(){return LC(this)}),t("toBase64",function(e){return yf(this,e)}),t("toBase64URI",function(){return yf(this,!0)}),t("toBase64URL",function(){return yf(this,!0)}),t("toUint8Array",function(){return VF(this)})},YF=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,KF(r));t("toBase64",function(e){return jv(this,e)}),t("toBase64URI",function(){return jv(this,!0)}),t("toBase64URL",function(){return jv(this,!0)})},y1e=()=>{QF(),YF()},Wl={version:FF,VERSION:o1e,atob:QS,atobPolyfill:HF,btoa:KS,btoaPolyfill:UF,fromBase64:LC,toBase64:yf,encode:yf,encodeURI:b9,encodeURL:b9,utob:zF,btou:WF,decode:LC,isValid:m1e,fromUint8Array:jv,toUint8Array:VF,extendString:QF,extendUint8Array:YF,extendBuiltins:y1e};var FC=function(){return FC=Object.assign||function(e){for(var r,n=1,i=arguments.length;n0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]0&&(i.types.Claims.push({name:"app",type:"string"}),i.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(i.types.Claims.push({name:"iat",type:"int64"}),i.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(i.types.Claims.push({name:"exp",type:"int64"}),i.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(i.types.Claims.push({name:"n",type:"uint64"}),i.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(i.types.Claims.push({name:"typ",type:"string"}),i.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(i.types.Claims.push({name:"ogn",type:"string"}),i.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(i.types.Claims.push({name:"v",type:"string"}),i.message.v=this.claims.v),i},t}(),b1e=function(t){if(t.app==="")return{ok:!1,err:new Error("claims: app is empty")};var e=Math.round(new Date().getTime()/1e3),r=5*60,n=60*60*24*365+r;return t.v===""?{ok:!1,err:new Error("claims: ethauth version is empty")}:t.iat&&t.iat!==0&&(t.iat>e+r||t.iate+n?{ok:!1,err:new Error("claims: token has expired")}:{ok:!0}},w1e=function(t,e,r){return sl(void 0,void 0,void 0,function(){var n,i;return ol(this,function(s){return n=r.messageDigest(),i=D$(n,r.signature),i.slice(0,2)==="0x"&&i.length===42&&i.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},E1e=function(t,e,r){return sl(void 0,void 0,void 0,function(){var n,i,s,o,a;return ol(this,function(c){switch(c.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(i=c.sent(),i==="0x"||i.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return s=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new sd(r.address,s,t),[4,o.isValidSignature(n,ne(r.signature))];case 2:return a=c.sent(),a===x1e?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},x1e="0x1626ba7e",JF="1",BC="eth",C1e={name:"ETHAuth",version:JF},t1=function(){function t(){for(var e=[],r=0;r0&&(c+="."+i.extra),[2,c]}})})},this.decodeProof=function(i,s){return s===void 0&&(s=!1),sl(n,void 0,void 0,function(){var o,a,c,l,u,f,d,h,p,v;return ol(this,function(b){switch(b.label){case 0:if(o=i.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],c=o[1],l=o[2],u=o[3],f=o[4],a!==BC)throw new Error("ethauth: not an ethauth proof");return d=Wl.decode(l),h=JSON.parse(d),p=new Cb({address:c,claims:h,signature:u,extra:f}),[4,this.validateProof(p,s)];case 1:if(v=b.sent(),!v)throw new Error("ethauth: proof is invalid");return[2,p]}})})},this.validateProof=function(i,s){return s===void 0&&(s=!1),sl(n,void 0,void 0,function(){var o,a;return ol(this,function(c){switch(c.label){case 0:if(o=this.validateProofClaims(i),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return s===!0?[3,2]:[4,this.validateProofSignature(i)];case 1:if(a=c.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");c.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(i){return sl(n,void 0,void 0,function(){var s,c,o,a,c;return ol(this,function(l){switch(l.label){case 0:s=[],c=0,l.label=1;case 1:if(!(cWl.encode(t,!0),YS=t=>Wl.encode(JSON.stringify(t),!0),k1e=t=>{if(t!=null)return Wl.decode(t)},JS=t=>{if(t!=null)return JSON.parse(Wl.decode(t))};function XF(t){return t!=null&&(J.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||Be(t)||typeof t=="bigint"||oa(t))}const XS=t=>ne(Fe(typeof t=="string"?bt(t):t)),ZF=(t,e,r)=>We(["string","uint256","address","bytes32"],["",e,t,r]),jC=(t,e,r)=>Fe(ZF(t,e,r)),eB=()=>typeof window>"u"&&typeof process=="object",A1e=()=>!eB(),tB=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Wl.decode(e[1]))};function vy(){return vy=Object.assign?Object.assign.bind():function(t){for(var e=1;ege.configure(t),r1=(t,e,r)=>{const n={};return r&&r.length>0&&(n.Authorization=`BEARER ${r}`),e&&e.length>0&&(n["X-Access-Key"]=e),{url:t,headers:n,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}}};let P1e=class{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${Fe(bt(JSON.stringify(i,T1e)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}};function T1e(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function ZS(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(i,s)=>{try{n.push((o,a)=>o?s(o):i(a)),await t.apply(e,n)}catch(o){s(o)}})}}function I1e(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function O1e(t){const e=t.split("&"),r={};for(const n of e){const i=n.split("=");r[decodeURIComponent(i[0])]=JSON.parse(decodeURIComponent(i[1]))}return r}const e8=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),nB=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},iB=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},sB=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},R1e=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),oB=t=>{const e=vy({},t.types);return delete e.EIP712Domain,Wr.hash(t.domain,e,t.message)},H1=t=>ne(oB(t)),{defineReadOnly:$1e,getStatic:M1e,resolveProperties:N1e,checkProperties:D1e,shallowCopy:L1e,deepCopy:F1e}=FJ,B1e=t=>t.replace(/([^:]\/)\/+/g,"$1"),j1e=Object.freeze(Object.defineProperty({__proto__:null,Logger:rB,PromiseCache:P1e,base64Decode:k1e,base64DecodeObject:JS,base64Encode:S1e,base64EncodeObject:YS,checkProperties:D1e,configureLogger:_1e,deepCopy:F1e,defineReadOnly:$1e,encodeMessageDigest:XS,encodeTypedDataDigest:H1,encodeTypedDataHash:oB,getEthersConnectionInfo:r1,getRandomInt:e8,getStatic:M1e,isBigNumberish:XF,isBrowser:A1e,isNode:eB,jwtDecodeClaims:tB,logger:ge,packMessageData:ZF,promisify:ZS,queryStringFromObject:I1e,queryStringToObject:O1e,resolveProperties:N1e,sanitizeAlphanumeric:iB,sanitizeHost:sB,sanitizeNumberString:nB,shallowCopy:L1e,sleep:R1e,subDigestOf:jC,urlClean:B1e},Symbol.toStringTag,{value:"Module"}));function rr(){return rr=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:J.from(t).toNumber(),z1e=t=>{if(t)return aB(t)},cB=(t,e=!1,r=!1)=>{if(!t)throw new Error("invalid network config: empty config");const n=[];if(Array.isArray(t)?n.push(...t):n.push(t),n.length===0){if(e)throw new Error("invalid network config: empty config");return!1}const i=n.map(l=>l.chainId).sort(),s=i.filter((l,u)=>i.indexOf(l)!==u);if(s.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${s}`);return!1}n.forEach(l=>l.name=l.name.toLowerCase());const o=n.map(l=>l.name).sort(),a=o.filter((l,u)=>o.indexOf(l)!==u);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let c=!1;for(let l=0;l(cB(t,!0,e),t),W1e=(t,e=!0)=>{const r=t.map(i=>i.chainId).sort(),n=r.filter((i,s)=>r.indexOf(i)!==s);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},H1e=(t,e)=>{if(!(!t||!e)){if(!t.chainId&&!t.name)throw new Error("failed to update network config: source config is missing chainId or name");if(t.chainId!==e.chainId&&t.name!==e.name)throw new Error("failed to update network config: one of chainId or name must match");t.rpcUrl&&(e.rpcUrl=t.rpcUrl,e.provider=void 0),t.provider&&(e.provider=t.provider),t.relayer&&(e.relayer=t.relayer)}},uB=t=>lB(fB(t)),ws=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=J.from(e).toNumber();return t.find(n=>n.chainId===r)}else return t.find(r=>r.name===e||`${r.chainId}`===e);else{if(typeof e=="number")return t.find(r=>r.chainId===e);if(e.chainId)return t.find(r=>r.chainId===e.chainId);if(J.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},q1e=(t,e)=>t?t.name===e||t.chainId===e:!1,V1e=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,i)=>n.chainId===i.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Sb=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let i=e[n];return typeof i=="function"?i=i():i==null?i="":typeof i=="object"||typeof i=="symbol"?i=i.toString():i=i.valueOf(),i})):"",t8=t=>Sb("https://${network}-indexer.sequence.app",{network:t}),dB=t=>Sb("https://${network}-relayer.sequence.app",{network:t}),hB=t=>Sb("https://nodes.sequence.app/${network}",{network:t});function r8(t){return ws(Wf,t)}function pB(t){return J.isBigNumber(t)?t:XF(t)?J.from(t):J.from(t.chainId)}const Pr=t=>{const e=hB(t);return{rpcUrl:e,relayer:{url:dB(t),provider:{url:e}},indexerUrl:t8(t)}},Wf=uB([rr({},Xt[le.POLYGON],Pr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),rr({},Xt[le.MAINNET],Pr("mainnet")),rr({},Xt[le.BSC],Pr("bsc")),rr({},Xt[le.AVALANCHE],Pr("avalanche")),rr({},Xt[le.ARBITRUM],Pr("arbitrum")),rr({},Xt[le.ARBITRUM_NOVA],Pr("arbitrum-nova")),rr({},Xt[le.OPTIMISM],Pr("optimism")),rr({},Xt[le.POLYGON_ZKEVM],Pr("polygon-zkevm")),rr({},Xt[le.GNOSIS],Pr("gnosis")),rr({},Xt[le.RINKEBY],Pr("rinkeby"),{disabled:!0}),rr({},Xt[le.GOERLI],Pr("goerli")),rr({},Xt[le.SEPOLIA],Pr("sepolia")),rr({},Xt[le.POLYGON_MUMBAI],Pr("mumbai")),rr({},Xt[le.BSC_TESTNET],Pr("bsc-testnet")),rr({},Xt[le.ARBITRUM_GOERLI],Pr("arbitrum-goerli")),rr({},Xt[le.BASE],Pr("base")),rr({},Xt[le.BASE_GOERLI],Pr("base-goerli")),rr({},Xt[le.HOMEVERSE_TESTNET],Pr("homeverse-testnet")),rr({},Xt[le.AVALANCHE_TESTNET],Pr("avalanche-testnet")),rr({},Xt[le.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),rr({},Xt[le.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Hf="2.0";class n8{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=vB(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(i){r(i,void 0)}}}const vB=(t,e)=>{if(t.length===0)return e;const r=i=>i.sendAsyncMiddleware?i.sendAsyncMiddleware:i;let n;n=r(t[t.length-1])(e);for(let i=t.length-2;i>=0;i--)n=r(t[i])(n);return n};function mB(t){return t!==void 0&&t.send!==void 0&&t.constructor.defaultUrl!==void 0&&t.detectNetwork!==void 0&&t.getSigner!==void 0&&t.perform!==void 0}function yB(t){return t!==void 0&&t.sendAsync!==void 0}let G1e=0;class my{constructor(e,r){this.sendAsync=(n,i,s)=>{this.send(n.method,n.params,s||this.defaultChainId).then(o=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{i(o,void 0)})},this.defaultChainId=r,mB(e)?this.send=e.send.bind(e):yB(e)?this.send=(n,i,s)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Hf,id:++G1e,method:n,params:i},(c,l)=>{c?a(c):o(l?l.result:void 0)},s||this.defaultChainId)}):this.send=e,this.request=(n,i)=>this.send(n.method,n.params,i)}}class K1e{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(i=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:i})}).catch(i=>{n(i,void 0)})},this.send=this.sendAsync,this.provider=e}}class Q1e{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=UC(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=UC(this.isAllowedFunc)}}const UC=t=>e=>(r,n,i)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,i)};class i8{constructor(e){this.cachableJsonRpcMethods=["net_version","eth_chainId","eth_accounts","sequence_getWalletContext","sequence_getNetworks"],this.cachableJsonRpcMethodsByBlock=["eth_call","eth_getCode"],this.cacheByBlockResetLock=!1,this.sendAsyncMiddleware=r=>(n,i,s)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,s||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){i(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,c)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const l=this.cacheKey(n.method,n.params,c||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(l,a.result):this.setCacheByBlockValue(l,a.result)}i(o,a)},s||this.defaultChainId)},this.cacheKey=(r,n,i)=>{let s="";return i?s=`${i}:${r}:`:s=`:${r}:`,!n||n.length===0?s+"[]":s+JSON.stringify(n)},this.getCache=()=>this.cache,this.setCache=r=>{this.cache=r,this.onUpdateCallback&&this.onUpdateCallback()},this.getCacheValue=r=>{if(this.cache[r])return this.cache[r];if(this.cacheByBlock[r])return this.cacheByBlock[r]},this.setCacheValue=(r,n)=>{this.cache[r]=n,this.onUpdateCallback&&this.onUpdateCallback(r,n)},this.setCacheByBlockValue=(r,n)=>{this.cacheByBlock[r]=n,this.cacheByBlockResetLock||(this.cacheByBlockResetLock=!0,setTimeout(()=>{this.cacheByBlockResetLock=!1,this.cacheByBlock={}},1500))},this.shouldCacheResponse=(r,n)=>!(!n||!n.result||r.method==="eth_getCode"&&n.result.length<=2),this.clearCache=()=>{this.cache={},this.cacheByBlock={}},this.cache={},this.cacheByBlock={},this.defaultChainId=e==null?void 0:e.defaultChainId,e!=null&&e.blockCache?(e==null?void 0:e.blockCache)!==!0&&(this.cachableJsonRpcMethodsByBlock=e==null?void 0:e.blockCache):this.cachableJsonRpcMethodsByBlock=[]}onUpdate(e){this.onUpdateCallback=e}}class gB{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){i(void 0,{jsonrpc:"2.0",id:o,result:te(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){i(void 0,{jsonrpc:"2.0",id:o,result:[qe(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){i(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,i,s)},this.options=e}}const bB=t=>(e,r,n)=>{t(e,(i,s)=>{if(!i&&s&&s.error)throw typeof s.error=="string"?new Error(s.error):new Error(s.error.message);r(i,s)},n)},wB=t=>(e,r,n)=>{const i=n?` chainId:${n}`:"";ge.info(`[provider request]${i} id:${e.id} method:${e.method} params:`,e.params),t(e,(s,o)=>{s?ge.warn(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"error:",s):ge.info(`[provider response]${i} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(s,o)},n)},Y1e=t=>e=>(r,n,i)=>{const s=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${s}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:te(s)});return}e(r,n,i)},EB=["personal_sign","eth_sign","eth_signTypedData","eth_signTypedData_v4","eth_sendTransaction","eth_sendRawTransaction","sequence_sign","sequence_signTypedData_v4","sequence_getWalletContext","sequence_getWalletConfig","sequence_getWalletState","sequence_getNetworks","sequence_updateConfig","sequence_publishConfig","sequence_gasRefundOptions","sequence_getNonce","sequence_relay","eth_decrypt","eth_getEncryptionPublicKey","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];class J1e{constructor(e){this.sendAsyncMiddleware=r=>(n,i,s)=>{if(EB.includes(n.method)){this.provider.sendAsync(n,i,s);return}r(n,i,s)},this.provider=e}}class X1e{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...EB],this.sendAsyncMiddleware=r=>(n,i)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(s=>{i(void 0,{jsonrpc:"2.0",id:n.id,result:s})}).catch(s=>i(s));return}ge.debug("[public-provider] sending request to signer window",n.method),r(n,i)},e&&this.setRpcUrl(e)}getRpcUrl(){return this.rpcUrl}setRpcUrl(e){!e||e===""?(this.rpcUrl=void 0,this.provider=void 0):(this.rpcUrl=e,this.provider=new Go(e))}}class xB{constructor(){this.singleflightJsonRpcMethods=["eth_chainId","net_version","eth_call","eth_getCode","eth_blockNumber","eth_getBalance","eth_getStorageAt","eth_getTransactionCount","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getBlockByHash","eth_getBlockByNumber","eth_getTransactionByHash","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getLogs"],this.sendAsyncMiddleware=e=>(r,n,i)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,i);return}const s=this.requestKey(r.method,r.params||[],i);if(!this.inflight[s])this.inflight[s]=[];else{this.inflight[s].push({id:r.id,callback:n});return}e(r,(o,a,c)=>{n(o,a);for(let l=0;l{let i="";return n?i=`${n}:${e}:`:i=`:${e}:`,!r||r.length===0?i+"[]":i+JSON.stringify(r)},this.inflight={}}}class Z1e extends Go{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,c)=>this._sender.send(a,c),this.fetch=(a,c)=>{const l={method:a,params:c,id:this._nextId++,jsonrpc:"2.0"};return _1(this.connection,JSON.stringify(l),epe).then(f=>f,f=>{throw f})};const n=r==null?void 0:r.chainId,i=r==null?void 0:r.middlewares,s=r==null?void 0:r.blockCache;this._chainId=n;const o=new n8(i??[new gB({chainId:n}),new xB,new i8({defaultChainId:n,blockCache:s})],new my(this.fetch,n));this._sender=new my(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=Xt[e],n=(r==null?void 0:r.name)||"",i=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:i}}else{const r=await this.send("eth_chainId",[]);return this._chainId=J.from(r).toNumber(),this.getNetwork()}}}function epe(t){if(t.error){const e=new Error(t.error.message);throw e.code=t.error.code,e.data=t.error.data,e}return t.result}const tpe=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:Q1e,CachedProvider:i8,ChainId:le,EagerProvider:gB,JsonRpcExternalProvider:K1e,JsonRpcProvider:Z1e,JsonRpcRouter:n8,JsonRpcSender:my,JsonRpcVersion:Hf,NetworkType:Jt,PublicProvider:X1e,SigningProvider:J1e,SingleflightMiddleware:xB,allNetworks:Wf,allowProviderMiddleware:UC,checkNetworkConfig:q1e,createJsonRpcMiddlewareStack:vB,ensureUniqueNetworks:W1e,ensureValidNetworks:lB,exceptionProviderMiddleware:bB,findNetworkConfig:ws,findSupportedNetwork:r8,getChainId:aB,indexerURL:t8,isJsonRpcHandler:yB,isJsonRpcProvider:mB,isNetworkConfig:U1e,isValidNetworkConfig:cB,loggingProviderMiddleware:wB,maybeChainId:z1e,networkProviderMiddleware:Y1e,networks:Xt,networksIndex:V1e,nodesURL:hB,relayerURL:dB,sortNetworks:fB,stringTemplate:Sb,toChainIdNumber:pB,updateNetworkConfig:H1e,validateAndSortNetworks:uB},Symbol.toStringTag,{value:"Module"}));function bn(){return bn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(o8(i))return We(["uint8","uint8","address"],[El.Address,i.weight,i.address]);if(i.isDynamic){const s=ne(i.signature);return We(["uint8","uint8","address","uint16","bytes"],[El.DynamicSignature,i.weight,i.address,s.length,s])}return We(["uint8","uint8","bytes"],[El.EOASignature,i.weight,i.signature])});return We(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function PB(t,e,r){const n=q1(e),i=await Promise.all(t.signers.map(async s=>{if(o8(s))return s;if(s.isDynamic){if(!s.address)throw new Error("Dynamic signature part must have address");if(!s8(s.address,n,s.signature,r))throw new Error(`Invalid dynamic signature part ${s.address}`);return{address:s.address,weight:s.weight,signature:s.signature}}else return{address:V1(n,s.signature),weight:s.weight,signature:s.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:i}}}function zh(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let i=J.from(0);const s=t.signers.map(a=>{if(!e.has(a.address))return a;const c=e.get(a.address),l=ne(c.signature);return i=i.add(a.weight),c.isDynamic||l.length!==66?bn({},a,{isDynamic:!0,signature:c.signature,address:a.address}):bn({},a,{isDynamic:!1,signature:c.signature})});return{encoded:a8({version:1,threshold:t.threshold,signers:s}),weight:i}}const c8={decode:t=>_B(t),encode:t=>a8(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>PB(t,e,r),encodeSigners:(t,e,r,n)=>zh(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=c8.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{throw new Error("Signature chaining not supported on v1")},hashSetImageHash:function(t){throw new Error("Image hash not supported on v1")},signaturesOf(t){return t.signers.filter(e=>e.signature!==void 0).map(e=>({address:e.address,signature:e.signature}))},signaturesOfDecoded:function(t){return t.signers.map(e=>e.signature).filter(e=>e!==void 0)}};var upe=Object.freeze({__proto__:null,SignaturePartType:El,isAddressMember:o8,isUnrecoveredSignatureMember:kB,isUnrecoveredSignature:AB,decodeSignature:_B,encodeSignature:a8,recoverSignature:PB,encodeSigners:zh,SignatureCoder:c8});const l8={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Fe(Fn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),We(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>J.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:J.from(e.weight).toNumber()})),fromSimple:t=>{if(!er.eq(t.checkpoint))throw new Error("v1 wallet config does not support checkpoint");return{version:1,threshold:t.threshold,signers:t.signers}},update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new Fr([...tn.mainModule.abi,...tn.mainModuleUpgradable.abi]),s=[];return(!n||n==="first")&&s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),s.push({to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[l8.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:s}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:J.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:J.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:J.from(n.weight),address:n.address}));return{version:e.version,threshold:J.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!er.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const i of e.add)n.find(s=>s.address===i.address)||n.push({weight:i.weight,address:i.address});if(e.remove)for(const i of e.remove){const s=n.findIndex(o=>o.address===i);s>=0&&n.splice(s,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,signers:n}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=zh(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:i}of n.sort(({weight:s},{weight:o})=>J.from(s).sub(o).toNumber())){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=zh(t,r,[]);if(a.gte(t.threshold))return o}return zh(t,r,[]).encoded}};var fpe=Object.freeze({__proto__:null,ConfigCoder:l8});const TB=1,IB={version:TB,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Io=Object.freeze({__proto__:null,config:fpe,signature:upe,version:TB,DeployedWalletContext:IB});const u8="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function OB(t){return Fe(RB(t))}function RB(t){return We(["bytes32","bytes32"],[u8,t])}function $B(t){const e=ne(t);if(e.length===64&&te(e.slice(0,32))===u8)return te(e.slice(32,64))}function dpe(t){return $B(t)!==void 0}var hpe=Object.freeze({__proto__:null,SetImageHashPrefix:u8,hashSetImageHash:OB,messageSetImageHash:RB,decodeMessageSetImageHash:$B,isMessageSetImageHash:dpe});let qr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),pr=function(t){return t[t.Signature=0]="Signature",t[t.Address=1]="Address",t[t.DynamicSignature=2]="DynamicSignature",t[t.Node=3]="Node",t[t.Branch=4]="Branch",t[t.Subdigest=5]="Subdigest",t[t.Nested=6]="Nested",t}({});const yy=66;function Hl(t){return t.left!==void 0&&t.right!==void 0}function Cd(t){return t.tree!==void 0}function G1(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function gy(t){let e=ne(t),r;const n=(i,s)=>i?i.right?{left:i,right:s}:{left:i.left,right:s}:{left:s};for(;e.length>0;){const i=e[0];switch(e=e.slice(1),i){case pr.Signature:{const s=e[0],o=te(e.slice(1,yy+1));r=n(r,{signature:o,weight:s,unrecovered:!0,isDynamic:!1}),e=e.slice(yy+1)}break;case pr.Address:{const s=e[0],o=qe(te(e.slice(1,21)));r=n(r,{address:o,weight:s}),e=e.slice(21)}break;case pr.DynamicSignature:{const s=e[0],o=qe(te(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],c=te(e.slice(24,24+a));r=n(r,{address:o,signature:c,weight:s,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case pr.Node:{const s=te(e.slice(0,32));r=n(r,{nodeHash:s}),e=e.slice(32)}break;case pr.Branch:{const s=e[0]<<16|e[1]<<8|e[2],o=gy(e.slice(3,3+s));r=n(r,o),e=e.slice(3+s)}break;case pr.Subdigest:{const s=te(e.slice(0,32));r=n(r,{subdigest:s}),e=e.slice(32)}break;case pr.Nested:{const s=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],c=gy(e.slice(6,6+a));r=n(r,{weight:s,threshold:o,tree:c}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${i}: ${te(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class MB extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function xl(t,e,r){if(Hl(t)){const[n,i]=await Promise.all([xl(t.left,e,r),xl(t.right,e,r)]);return{left:n,right:i}}if(Cd(t))return{weight:t.weight,threshold:t.threshold,tree:await xl(t.tree,e,r)};if(G1(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await s8(t.address,e,t.signature,r))throw new MB(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:V1(e,t.signature),signature:t.signature,subdigest:e};return t}const dn={concat:(t,e)=>We(["bytes","bytes"],[t,e]),node:t=>We(["uint8","bytes32"],[pr.Node,t]),branch:t=>{const e=ne(t);return We(["uint8","uint24","bytes"],[pr.Branch,e.length,e])},nested:(t,e,r)=>{const n=ne(r);return We(["uint8","uint8","uint16","uint24","bytes"],[pr.Nested,t,e,n.length,n])},subdigest:t=>We(["uint8","bytes32"],[pr.Subdigest,t]),signature:(t,e)=>We(["uint8","uint8","bytes"],[pr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ne(r);return We(["uint8","uint8","address","uint24","bytes"],[pr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>We(["uint8","uint8","address"],[pr.Address,t,e])};function Wh(t,e,r,n,i={}){const s=Hh(t.tree,e,r,i);return J.from(n).isZero()?{encoded:We(["uint8","uint16","uint32","bytes"],[qr.NoChainIdDynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:J.from(t.threshold).gt(255)?{encoded:We(["uint8","uint16","uint32","bytes"],[qr.Dynamic,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}:{encoded:We(["uint8","uint8","uint32","bytes"],[qr.Legacy,t.threshold,t.checkpoint,s.encoded]),weight:s.weight}}function Hh(t,e,r,n={}){const i=!n.disableTrim;if(Ss(t)){const s=Hh(t.left,e,r),o=Hh(t.right,e,r),a=Ln(t.left),c=Ln(t.right);return i&&s.weight.eq(0)&&o.weight.eq(0)&&!a&&!c?{encoded:dn.node(ui(t)),weight:er}:i&&o.weight.eq(0)&&!c?{encoded:dn.concat(s.encoded,dn.node(ui(t.right))),weight:s.weight}:i&&s.weight.eq(0)&&!a?{encoded:dn.concat(dn.node(ui(t.left)),dn.branch(o.encoded)),weight:o.weight}:{encoded:dn.concat(s.encoded,dn.branch(o.encoded)),weight:s.weight.add(o.weight)}}if(da(t)){const s=Hh(t.tree,e,r);return i&&s.weight.eq(0)?{encoded:dn.node(ui(t)),weight:er}:{encoded:dn.nested(t.weight,t.threshold,s.encoded),weight:s.weight}}if(ha(t))return{encoded:dn.node(ui(t)),weight:er};if(fa(t)){const s=r.includes(t.subdigest);return{encoded:dn.node(ui(t)),weight:s?NR:er}}if(Ln(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:dn.dynamicSignature(t.weight,t.address,a),weight:J.from(t.weight)}:{encoded:dn.signature(t.weight,a),weight:J.from(t.weight)}}else return{encoded:dn.address(t.weight,t.address),weight:er};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function f8(t){return h8(t)?f8(t.suffix[t.suffix.length-1]):t.config}function d8(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function K1(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(d8)}function NB(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function h8(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(NB)}function kb(t){const e=ne(t),r=e[0];switch(r){case qr.Legacy:return{version:2,type:qr.Legacy,decoded:Uv(e)};case qr.Dynamic:return{version:2,type:qr.Dynamic,decoded:Uv(e.slice(1))};case qr.NoChainIdDynamic:return{version:2,type:qr.NoChainIdDynamic,decoded:Uv(e.slice(1))};case qr.Chained:return DB(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Uv(t){const e=ne(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i=gy(e.slice(6));return{threshold:r,checkpoint:n,tree:i}}function DB(t){const e=ne(t),r=e[0];if(r!==qr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let i=1;for(;ine(ic(s))),i=We(n.map(()=>["uint24","bytes"]).flat(),n.map(s=>[s.length,s]).flat());return We(["uint8","bytes"],[qr.Chained,i])}function ic(t){if(zo(t))return te(t);if(K1(t)||h8(t))return Ab(ic(t),(t.suffix||[]).map(ic));const e=d8(t)?t.decoded:t.config;switch(t.type){case qr.Legacy:if(J.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return zC(e);case qr.NoChainIdDynamic:case qr.Dynamic:return We(["uint8","bytes"],[t.type,zC(e)]);case qr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function zC(t){return We(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,qh(t.tree)])}function qh(t){if(Ss(t)||Hl(t)){const e=ne(qh(t.right)),r=ne(qh(t.left));return Ss(t.right)||Hl(t.right)?We(["bytes","uint8","uint24","bytes"],[r,pr.Branch,e.length,e]):We(["bytes","bytes"],[r,e])}if(da(t)||Cd(t)){const e=ne(qh(t.tree));return We(["uint8","uint8","uint16","uint24","bytes"],[pr.Nested,t.weight,t.threshold,e.length,e])}if(G1(t)||Ln(t)&&t.signature!==void 0){const e=ne(t.signature);if(t.isDynamic||e.length!==yy){if(!t.address)throw new Error("Dynamic signature leaf must have address");return We(["uint8","uint8","address","uint24","bytes"],[pr.DynamicSignature,t.weight,t.address,e.length,e])}else return We(["uint8","uint8","bytes"],[pr.Signature,t.weight,e])}if(Ln(t))return We(["uint8","uint8","address"],[pr.Address,t.weight,t.address]);if(ha(t))return We(["uint8","bytes32"],[pr.Node,t.nodeHash]);if(fa(t))return We(["uint8","bytes32"],[pr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function Vh(t){return Ss(t)?[...Vh(t.left),...Vh(t.right)]:da(t)?Vh(t.tree):Ln(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function Gh(t){return Hl(t)?[...Gh(t.left),...Gh(t.right)]:Cd(t)?Gh(t.tree):G1(t)?[t.signature]:[]}function zv(t){return Hl(t)?[...zv(t.left),...zv(t.right)]:Cd(t)?zv(t.tree):fa(t)?[t.subdigest]:[]}async function by(t){const e=typeof t=="string"?kb(t):t;if(K1(e)){const n=await Promise.all([by(bn({},e,{suffix:void 0})),...e.suffix.map(i=>by(i))]);return Ab(n[0],n.slice(1))}const{trimmed:r}=await Kh(e.decoded.tree);return ic(bn({},e,{decoded:bn({},e.decoded,{tree:r})}))}async function Kh(t,e=!0){if(Hl(t)){const[r,n]=await Promise.all([Kh(t.left),Kh(t.right)]);if(r.weight===0&&n.weight===0)try{const i=await xl(t,Tm,void 0);return{weight:0,trimmed:{nodeHash:ui(i)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Cd(t)){const r=await Kh(t.tree);if(r.weight===0)try{const n=await xl(t,Tm,void 0);return{weight:0,trimmed:{nodeHash:ui(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return ha(t)&&jB(t.nodeHash)?{weight:0,trimmed:bn({},BB(t.nodeHash))}:G1(t)||Ln(t)&&t.signature!==void 0?{weight:J.from(t.weight).toNumber(),trimmed:t}:!e&&fa(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const _b={decode:t=>kb(t),encode:t=>ic(t),trim:t=>by(t),supportsNoChainId:!0,recover:(t,e,r)=>p8(t,e,r),encodeSigners:(t,e,r,n)=>Wh(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=_b.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=zo(t)?t:ic(t),i=r.map(s=>zo(s)?s:ic(s));return Ab(n,i)},hashSetImageHash:function(t){return OB(t)},signaturesOf(t){return Vh(t.tree)},signaturesOfDecoded:function(t){return Gh(t.decoded.tree)}};var ppe=Object.freeze({__proto__:null,SignatureType:qr,SignaturePartType:pr,SignaturePartTypeLength:yy,isUnrecoveredNode:Hl,isUnrecoveredNestedLeaf:Cd,isUnrecoveredSignatureLeaf:G1,decodeSignatureTree:gy,InvalidSignatureLeafError:MB,recoverTopology:xl,partEncoder:dn,encodeSigners:Wh,encodeTree:Hh,deepestConfigOfSignature:f8,isUnrecoveredSignature:d8,isUnrecoveredChainedSignature:K1,isSignature:NB,isChainedSignature:h8,decodeSignature:kb,decodeSignatureBody:Uv,decodeChainedSignature:DB,setImageHashStruct:LB,recoverSignature:p8,encodeChain:Ab,encodeSignature:ic,encodeSignatureBody:zC,encodeSignatureTree:qh,signaturesOf:Vh,signaturesOfDecoded:Gh,subdigestsOfDecoded:zv,trimSignature:by,trimUnrecoveredTree:Kh,SignatureCoder:_b});function Ln(t){return t.address!==void 0&&t.weight!==void 0}function fa(t){return t.subdigest!==void 0&&t.address===void 0}function Qh(t){return Ss(t)?JSON.stringify({left:Qh(t.left),right:Qh(t.right)}):da(t)?JSON.stringify({weight:J.from(t.weight).toString(),threshold:J.from(t.threshold).toString(),tree:Qh(t.tree)}):Ln(t)?JSON.stringify({address:t.address,weight:J.from(t.weight).toString()}):JSON.stringify(t)}function Yh(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:Yh(e.left),right:Yh(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:J.from(e.weight),threshold:J.from(e.threshold),tree:Yh(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:J.from(e.weight)}:e}function da(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function ha(t){return t.nodeHash!==void 0}function v8(t){return Ln(t)||fa(t)||da(t)||ha(t)}function Ss(t){return t.left!==void 0&&t.right!==void 0}function vpe(t){return Ss(t)||v8(t)}function FB(t){return We(["uint96","address"],[t.weight,t.address])}function BB(t){const e=ne(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=J.from(e.slice(0,12)),n=qe(te(e.slice(12)));return{weight:r,address:n}}function jB(t){const e=ne(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function ui(t){if(Ln(t))return FB(t);if(fa(t))return ec(["string","bytes32"],[`Sequence static digest: `,t.subdigest]);if(da(t)){const e=ui(t.tree);return ec(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return ha(t)?t.nodeHash:ec(["bytes32","bytes32"],[ui(t.left),ui(t.right)])}function spe(t){const e=[];let r=t;for(;!v8(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function ope(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function m8(t){return ec(["bytes32","uint256"],[ec(["bytes32","uint256"],[ui(t.tree),t.threshold]),t.checkpoint])}function DF(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function gf(t){return Ln(t)||fa(t)?[t]:da(t)?[{threshold:t.threshold,weight:t.weight,members:gf(t.tree)}]:ha(t)?[]:[...gf(t.left),...gf(t.right)]}function HC(t){return ha(t)?!0:ks(t)?HC(t.left)||HC(t.right):!1}function ape(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:gf(t.tree)}}const LF=(t,e)=>t.map(r=>DF(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function y8(t){if(t.length===0)throw new Error("Empty members array");return LF(t,y8).reduce((r,n)=>({left:r,right:n}))}function g8(t){if(t.length===0)throw new Error("Empty members array");const e=LF(t,g8);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function b8(t){return t.length>8?g8(t):y8(t)}function BF(t,e=b8){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function wy(t,e){return fa(t)?t.subdigest===e:ks(t)?wy(t.left,e)||wy(t.right,e):!1}function qC(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();da(n)?e.push(n.tree):ks(n)?(e.push(n.left),e.push(n.right)):Ln(n)&&r.add({address:n.address,weight:J.from(n.weight).toNumber()})}return Array.from(r)}function Ey(t){return ks(t)?Ey(t.left)&&Ey(t.right):!ha(t)}const Pb={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>m8(t),hasSubdigest:(t,e)=>wy(t.tree,e),checkpointOf:t=>J.from(t.checkpoint),signersOf:t=>qC(t.tree),fromSimple:t=>BF({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>Ey(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new Br(tn.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Pb.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new Br(tn.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=s.decodeFunctionData(s.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!Zt.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!Zt.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:J.from(t.threshold).toString(),checkpoint:J.from(t.checkpoint).toString(),tree:Qh(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:J.from(e.threshold),checkpoint:J.from(e.checkpoint),tree:Yh(e.tree)}},editConfig:function(t,e){var r,n;const i=gf(t.tree);if(e.add)for(const s of e.add)i.find(o=>Ln(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Ln(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:b8(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=Wh(t,r,[],0);if(a.gte(t.threshold))return o}const n=qC(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Wh(t,r,[],0);if(a.gte(t.threshold))return o}return Wh(t,r,[],0).encoded}};var cpe=Object.freeze({__proto__:null,isSignerLeaf:Ln,isSubdigestLeaf:fa,topologyToJSON:Qh,topologyFromJSON:Yh,isNestedLeaf:da,isNodeLeaf:ha,isLeaf:v8,isNode:ks,isTopology:ipe,encodeSignerLeaf:$F,decodeSignerLeaf:MF,isEncodedSignerLeaf:NF,hashNode:ui,leftFace:spe,isWalletConfig:ope,imageHash:m8,isSimpleNestedMember:DF,topologyToMembers:gf,hasUnknownNodes:HC,toSimpleWalletConfig:ape,legacyTopologyBuilder:y8,merkleTopologyBuilder:g8,optimized2SignersTopologyBuilder:b8,toWalletConfig:BF,hasSubdigest:wy,signersOf:qC,isComplete:Ey,ConfigCoder:Pb}),lpe=Object.freeze({__proto__:null});const upe={config:Pb,signature:_b},FF=2,jF={version:FF,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ve=Object.freeze({__proto__:null,config:cpe,signature:npe,context:lpe,chained:rpe,coders:upe,version:FF,DeployedWalletContext:jF});function VC(t,e){const r=Be(We(["bytes","bytes32"],[t.walletCreationCode,ft(t.mainModule,32)])),n=Be(We(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return qe(br(n,12))}async function fpe(t,e,r,n,i,s){return(await Promise.all(XF.map(async a=>{try{const c=a.signature.SignatureCoder.decode(te(r)),l=await a.signature.SignatureCoder.recover(c,{address:t,digest:te(e),chainId:n},i),u=a.config.ConfigCoder.imageHashOf(l.config);if(VC(s[a.version],u).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(c,{address:t,digest:te(e),chainId:n},i),h=a.config.ConfigCoder.imageHashOf(d.config);return VC(s[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function dpe(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function hpe(t){const e=Object.keys(t).length;return t[e]}const ppe={1:kF,2:jF};var vpe=Object.freeze({__proto__:null,addressOf:VC,isValidCounterfactual:fpe,isValidVersionedContext:dpe,latestContext:hpe,defaultContexts:ppe});const Tb=`tuple( +`,e,t.threshold,t.weight])}return ha(t)?t.nodeHash:ec(["bytes32","bytes32"],[ui(t.left),ui(t.right)])}function mpe(t){const e=[];let r=t;for(;!v8(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function ype(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function m8(t){return ec(["bytes32","uint256"],[ec(["bytes32","uint256"],[ui(t.tree),t.threshold]),t.checkpoint])}function UB(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function gf(t){return Ln(t)||fa(t)?[t]:da(t)?[{threshold:t.threshold,weight:t.weight,members:gf(t.tree)}]:ha(t)?[]:[...gf(t.left),...gf(t.right)]}function WC(t){return ha(t)?!0:Ss(t)?WC(t.left)||WC(t.right):!1}function gpe(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:gf(t.tree)}}const zB=(t,e)=>t.map(r=>UB(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function y8(t){if(t.length===0)throw new Error("Empty members array");return zB(t,y8).reduce((r,n)=>({left:r,right:n}))}function g8(t){if(t.length===0)throw new Error("Empty members array");const e=zB(t,g8);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[i]:e[n]={left:e[i],right:e[s]}}return e[0]}function b8(t){return t.length>8?g8(t):y8(t)}function WB(t,e=b8){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function wy(t,e){return fa(t)?t.subdigest===e:Ss(t)?wy(t.left,e)||wy(t.right,e):!1}function HC(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();da(n)?e.push(n.tree):Ss(n)?(e.push(n.left),e.push(n.right)):Ln(n)&&r.add({address:n.address,weight:J.from(n.weight).toNumber()})}return Array.from(r)}function Ey(t){return Ss(t)?Ey(t.left)&&Ey(t.right):!ha(t)}const Pb={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>m8(t),hasSubdigest:(t,e)=>wy(t.tree,e),checkpointOf:t=>J.from(t.checkpoint),signersOf:t=>HC(t.tree),fromSimple:t=>WB({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>Ey(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const i=new Fr(tn.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:i.encodeFunctionData(i.getFunction("updateImageHash"),[Pb.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,i;const s=new Fr(tn.mainModuleUpgradable.abi);if(t.transactions.length!==1)throw new Error("Invalid transaction bundle, expected 1 transaction");const o=t.transactions[0].data;if(!o)throw new Error("Invalid transaction bundle, expected data");const a=s.decodeFunctionData(s.getFunction("updateImageHash"),o);if(!a)throw new Error("Invalid transaction bundle, expected valid data");if(t.transactions[0].to!==t.entrypoint)throw new Error("Invalid transaction bundle, expected to be sent to entrypoint");if(t.transactions[0].delegateCall)throw new Error("Invalid transaction bundle, expected not to be a delegateCall");if(!t.transactions[0].revertOnError)throw new Error("Invalid transaction bundle, expected revertOnError");if(!er.eq((e=(r=t.transactions[0])==null?void 0:r.value)!=null?e:0))throw new Error("Invalid transaction bundle, expected value to be 0");if(!er.eq((n=(i=t.transactions[0])==null?void 0:i.gasLimit)!=null?n:0))throw new Error("Invalid transaction bundle, expected value to be 0");return{address:t.entrypoint,newImageHash:a[0],kind:void 0}}},toJSON:function(t){return JSON.stringify({version:t.version,threshold:J.from(t.threshold).toString(),checkpoint:J.from(t.checkpoint).toString(),tree:Qh(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:J.from(e.threshold),checkpoint:J.from(e.checkpoint),tree:Yh(e.tree)}},editConfig:function(t,e){var r,n;const i=gf(t.tree);if(e.add)for(const s of e.add)i.find(o=>Ln(o)&&o.address===s.address)||i.push({address:s.address,weight:s.weight});if(e.remove)for(const s of e.remove){const o=i.findIndex(a=>Ln(a)&&a.address===s);o>=0&&i.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:b8(i)}},buildStubSignature:function(t,e){const r=new Map;for(const[i,s]of e.entries()){r.set(i,{signature:s,isDynamic:!0});const{encoded:o,weight:a}=Wh(t,r,[],0);if(a.gte(t.threshold))return o}const n=HC(t.tree);for(const{address:i}of n.sort(({weight:s},{weight:o})=>s-o)){const s="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(i,{signature:s,isDynamic:!1});const{encoded:o,weight:a}=Wh(t,r,[],0);if(a.gte(t.threshold))return o}return Wh(t,r,[],0).encoded}};var bpe=Object.freeze({__proto__:null,isSignerLeaf:Ln,isSubdigestLeaf:fa,topologyToJSON:Qh,topologyFromJSON:Yh,isNestedLeaf:da,isNodeLeaf:ha,isLeaf:v8,isNode:Ss,isTopology:vpe,encodeSignerLeaf:FB,decodeSignerLeaf:BB,isEncodedSignerLeaf:jB,hashNode:ui,leftFace:mpe,isWalletConfig:ype,imageHash:m8,isSimpleNestedMember:UB,topologyToMembers:gf,hasUnknownNodes:WC,toSimpleWalletConfig:gpe,legacyTopologyBuilder:y8,merkleTopologyBuilder:g8,optimized2SignersTopologyBuilder:b8,toWalletConfig:WB,hasSubdigest:wy,signersOf:HC,isComplete:Ey,ConfigCoder:Pb}),wpe=Object.freeze({__proto__:null});const Epe={config:Pb,signature:_b},HB=2,qB={version:HB,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Ve=Object.freeze({__proto__:null,config:bpe,signature:ppe,context:wpe,chained:hpe,coders:Epe,version:HB,DeployedWalletContext:qB});function qC(t,e){const r=Fe(We(["bytes","bytes32"],[t.walletCreationCode,ft(t.mainModule,32)])),n=Fe(We(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return qe(br(n,12))}async function xpe(t,e,r,n,i,s){return(await Promise.all(nj.map(async a=>{try{const c=a.signature.SignatureCoder.decode(te(r)),l=await a.signature.SignatureCoder.recover(c,{address:t,digest:te(e),chainId:n},i),u=a.config.ConfigCoder.imageHashOf(l.config);if(qC(s[a.version],u).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(c,{address:t,digest:te(e),chainId:n},i),h=a.config.ConfigCoder.imageHashOf(d.config);return qC(s[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function Cpe(t){const e=Object.keys(t).length;for(let r=1;r<=e;r++){const n=t[r];if(!n||n.version!==r)return!1}return!0}function Spe(t){const e=Object.keys(t).length;return t[e]}const kpe={1:IB,2:qB};var Ape=Object.freeze({__proto__:null,addressOf:qC,isValidCounterfactual:xpe,isValidVersionedContext:Cpe,latestContext:Spe,defaultContexts:kpe});const Tb=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`;function mpe(t,e,r,n){return bn({},t,{chainId:r,intent:{id:n,wallet:e}})}function ype(t){return Be(Bn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function gpe(t){const e=Bn.decode(["uint256",Tb],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function UF(t,e){return Bn.encode(["uint256",Tb],[t,n1(e)])}function zF(t,e){return Be(UF(t,e))}function bpe(t,e,r,n){return q1({address:t,chainId:e,digest:zF(r,n)})}function wpe(t,e,r){return q1({address:t,chainId:e,digest:Be(Bn.encode(["string",Tb],["guest:",n1(r)]))})}function WF(t,e){return e.map(r=>w8(t,r))}function w8(t,e){if(e.to&&e.to!==cr)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new Br(tn.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function Ib(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function HF(t){return t.every(Ib)}function n1(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:Zt,target:(r=e.to)!=null?r:cr,value:e.value!==void 0?e.value:Zt,data:e.data!==void 0?e.data:[]}})}function Epe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function xpe(t,e){const r=J.from(t),n=J.from(e),i=OR.pow(J.from(96));if(!n.div(i).eq(Zt))throw new Error("Space already encoded");return n.add(r.mul(i))}function Cpe(t){const e=J.from(t),r=OR.pow(J.from(96));return[e.div(r),e.mod(r)]}function Spe(t,e){return Array.isArray(e)?HF(e)?e:WF(t,e).map(n=>n.transaction):Ib(e)?[e]:[w8(t,e).transaction]}function qF(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&Ib(r),!0)}function VF(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&qF(t)}function kpe(t){const e=new Br(tn.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),VF(t)?[n1(t.transactions),t.nonce,t.signature]:[n1(t.transactions),0,[]])}const GF="0x61c2926c",KF=`tuple( +)[]`;function _pe(t,e,r,n){return bn({},t,{chainId:r,intent:{id:n,wallet:e}})}function Ppe(t){return Fe(Fn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Tpe(t){const e=Fn.decode(["uint256",Tb],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function VB(t,e){return Fn.encode(["uint256",Tb],[t,n1(e)])}function GB(t,e){return Fe(VB(t,e))}function Ipe(t,e,r,n){return q1({address:t,chainId:e,digest:GB(r,n)})}function Ope(t,e,r){return q1({address:t,chainId:e,digest:Fe(Fn.encode(["string",Tb],["guest:",n1(r)]))})}function KB(t,e){return e.map(r=>w8(t,r))}function w8(t,e){if(e.to&&e.to!==lr)return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit||0,to:e.to,value:e.value||0,data:e.data||"0x"}};{const r=new Fr(tn.mainModule.abi),n=r.encodeFunctionData(r.getFunction("createContract"),[e.data]);return{nonce:e.nonce,transaction:{delegateCall:!1,revertOnError:!1,gasLimit:e.gasLimit,to:t,value:e.value||0,data:n}}}}function Ib(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function QB(t){return t.every(Ib)}function n1(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:er,target:(r=e.to)!=null?r:lr,value:e.value!==void 0?e.value:er,data:e.data!==void 0?e.data:[]}})}function Rpe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function $pe(t,e){const r=J.from(t),n=J.from(e),i=MR.pow(J.from(96));if(!n.div(i).eq(er))throw new Error("Space already encoded");return n.add(r.mul(i))}function Mpe(t){const e=J.from(t),r=MR.pow(J.from(96));return[e.div(r),e.mod(r)]}function Npe(t,e){return Array.isArray(e)?QB(e)?e:KB(t,e).map(n=>n.transaction):Ib(e)?[e]:[w8(t,e).transaction]}function YB(t){return t!==void 0&&t.entrypoint!==void 0&&t.chainId!==void 0&&t.transactions!==void 0&&t.nonce!==void 0&&t.intent!==void 0&&t.intent.id!==void 0&&t.intent.wallet!==void 0&&Array.isArray(t.transactions)&&t.transactions.reduce((e,r)=>e&&Ib(r),!0)}function JB(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&YB(t)}function Dpe(t){const e=new Fr(tn.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),JB(t)?[n1(t.transactions),t.nonce,t.signature]:[n1(t.transactions),0,[]])}const XB="0x61c2926c",ZB=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`,GC=(t,e)=>{const r=[],n=new Br(tn.mainModule.abi);for(const i of e){const s=ne(i.data||"0x");if(i.to===t&&te(s.slice(0,4))===GF){const o=s.slice(4),a=Bn.decode([KF],o)[0];r.push(...GC(i.to,a.map(c=>bn({},c,{to:c.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=GC(t,o.map(c=>bn({},c,{to:c.target})));r.push(...a)}catch{r.push(i)}}return r};var Ape=Object.freeze({__proto__:null,MetaTransactionsType:Tb,intendTransactionBundle:mpe,intendedTransactionID:ype,unpackMetaTransactionsData:gpe,packMetaTransactionsData:UF,digestOfTransactions:zF,subdigestOfTransactions:bpe,subdigestOfGuestModuleTransactions:wpe,toSequenceTransactions:WF,toSequenceTransaction:w8,isSequenceTransaction:Ib,hasSequenceTransactions:HF,sequenceTxAbiEncode:n1,fromTxAbiEncode:Epe,encodeNonce:xpe,decodeNonce:Cpe,fromTransactionish:Spe,isTransactionBundle:qF,isSignedTransactionBundle:VF,encodeBundleExecData:kpe,selfExecuteSelector:GF,selfExecuteAbi:KF,unwind:GC});const QF="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",_pe="0x6492649264926492649264926492649264926492649264926492649264926492";async function YF(t,e,r,n){return await t.call({data:zt([QF,new e3().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var Ppe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:QF,EIP_6492_SUFFIX:_pe,validateEIP6492Offchain:YF});class Tpe{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new sd(e,[...tn.mainModuleUpgradable.abi,...tn.mainModule.abi,...tn.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>ne(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Bn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>ne(i));if(n.length===20)return qe(te(n));if(n.length===32)return Bn.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return YF(this.provider,e,r,n)}}var Ipe=Object.freeze({__proto__:null,OnChainReader:Tpe});function Ope(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var he=Object.freeze({__proto__:null,config:q1e,signature:V1e,context:vpe,signer:X1e,EIP1271:Q1e,transaction:Ape,reader:Ipe,EIP6492:Ppe,isWalletSignRequestMetadata:Ope});const KC=[{config:l8,signature:c8},{config:Pb,signature:_b}];function JF(t){const e=t-1;if(e<0||e>=KC.length)throw new Error(`No coder for version: ${t}`);return KC[e]}function Rpe(t){return JF(t)}var $n=Object.freeze({__proto__:null,ALL_CODERS:KC,coderFor:JF,genericCoderFor:Rpe});const XF=[Io,Ve],$pe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:XF,commons:he,universal:$n,v1:Io,v2:Ve},Symbol.toStringTag,{value:"Module"}));function Mpe(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:i,chainId:s}=e;let o=n,a=i;const c=Object.values(this.contexts),l=[];for(let u=1;une(s).length===0))return yT;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:J.from(i).toNumber(),gasLimit:J.from(i).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const s=await new sd(e,tn.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return he.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=he.transaction.intendedTransactionID(e));let o=!1;const a=async function(u,f){let d=0;for(;!o;){try{return await u()}catch(h){if(d++,i!==void 0&&d>=i)throw ge.error(`giving up after ${d} failed attempts${f?`: ${f}`:""}`,h),h;ge.warn(`attempt #${d} failed${f?`: ${f}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${f?`: ${f}`:""}`)},c=async function(){let u=s.fromBlockLog;if(u<0&&(u=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+u),typeof e!="string")throw new Error("impossible");const f=e.replace("0x","");for(;!o;){const d=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,u-s.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,u-s.deltaBlocksLog)} to ${d}`);u=d;const v=(await Promise.all(h.map(b=>a(()=>s.provider.getTransactionReceipt(b.transactionHash),`unable to get receipt for transaction ${b.transactionHash}`)))).find(b=>b.logs.find(y=>y.topics.length===0&&y.data.replace("0x","")===f||y.topics.length===1&&y.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&y.data.length>=64&&y.data.replace("0x","").startsWith(f)));if(v)return bc({receipt:v},await a(()=>s.provider.getTransaction(v.transactionHash),`unable to get transaction ${v.transactionHash}`));o||await new Promise(b=>setTimeout(b,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([c(),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):c()}}function Upe(t){return t.signer!==void 0&&Nl.isSigner(t.signer)}class zpe extends nj{constructor(e){if(super(Nl.isSigner(e)?{provider:e.provider}:bc({},e,{provider:e.signer.provider})),this.signer=Nl.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&ge.warn("LocalRelayer doesn't accept fee quotes");const i=he.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(bc({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const Wpe="v1",Hpe="v0.4.0",qpe="950b00c821b56110c64d947312b9dea3e197e207";let Ha=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),Vpe=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),Gpe=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),Kpe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class ij{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),lt({},n)).then(i=>ut(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),lt({},n)).then(i=>ut(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),lt({},n)).then(i=>ut(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),lt({},n)).then(i=>ut(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),lt({},n)).then(i=>ut(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),lt(n,i)).then(s=>ut(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),lt(n,i)).then(s=>ut(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),lt(n,i)).then(s=>ut(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),lt(n,i)).then(s=>ut(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),lt({},n)).then(i=>ut(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),lt(n,i)).then(s=>ut(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),lt(n,i)).then(s=>ut(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),lt(n,i)).then(s=>ut(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),lt(n,i)).then(s=>ut(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),lt(n,i)).then(s=>ut(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),lt(n,i)).then(s=>ut(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const lt=(t={},e={})=>({method:"POST",headers:bc({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ut=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var qf=Object.freeze({__proto__:null,WebRPCVersion:Wpe,WebRPCSchemaVersion:Hpe,WebRPCSchemaHash:qpe,ETHTxnStatus:Ha,TransferType:Vpe,FeeTokenType:Gpe,SortOrder:Kpe,Relayer:ij});const Qpe=[Ha.DROPPED,Ha.SUCCEEDED,Ha.PARTIALLY_FAILED,Ha.FAILED],Ype=[Ha.DROPPED,Ha.PARTIALLY_FAILED,Ha.FAILED];function Jpe(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Tc.isProvider(t.provider)}const Xpe=typeof global=="object"?global.fetch:window.fetch;class sj{constructor(e){if(this._fetch=(r,n)=>{const i={},{jwtAuth:s,projectAccessKey:o}=this.options;return s&&s.length>0&&(i.Authorization=`BEARER ${s}`),o&&o.length>0&&(i["X-Access-Key"]=o),n.headers=bc({},n.headers,i),Xpe(r,n)},this.options=e,this.service=new ij(e.url,this._fetch),Tc.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=r1(e.provider.url,n,r);this.provider=new Fm(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=he.transaction.intendedTransactionID(e)),ge.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&Qpe.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=Bn.encode([he.transaction.MetaTransactionsType],[he.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(c=>c.symbol).join(", ");ge.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw ge.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:he.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return ge.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return ge.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:i,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:te(r),simulate:n==null?void 0:n.simulate});return{options:i,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){ge.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?J.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=J.from(i.nonce),[o,a]=he.transaction.decodeNonce(s);return ge.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;ge.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:ge.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw ge.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=he.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(ge.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const c={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:u=>Promise.reject(new Error("impossible"))},l=async function(f){var d;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await i.wait(e.intent.id),p=(d=h.receipt)==null?void 0:d.transactionHash;if(!p)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(c,h),i.provider.waitForTransaction(p,f)};return c.wait=l,c}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||Ype.includes(a.status))throw new Zpe(a);const c=JSON.parse(a.txnReceipt);return{blockHash:c.blockHash,blockNumber:J.from(c.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:c.transactionHash,raw:a.txnReceipt,receipt:c,wait:async function(l){return s.provider.waitForTransaction(c.transactionHash,l)}}}}class Zpe{constructor(e){this.receipt=e}}function oj(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const eve=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:zpe,ProviderRelayer:nj,ProviderRelayerDefaults:rj,RpcRelayer:sj,RpcRelayerProto:qf,isLocalRelayerOptions:Upe,isProviderRelayerOptions:jpe,isRelayer:oj,isRpcRelayerOptions:Jpe,proto:qf},Symbol.toStringTag,{value:"Module"}));function aj(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class cj{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async requestSignature(e,r,n,i){return i.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var ZC=Object.freeze({__proto__:null,isSapientSigner:aj,SignerWrapper:cj});function lj(t){return t.rejected}function E8(t){return t.signature!==void 0}function uj(t){return!lj(t)&&!E8(t)}const fj="Initial";class Ob{constructor(e,r=Ob.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${te(A1(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>aj(r)?r:new cj(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const i=await n.buildDeployTransaction(e);r===void 0?r=i:i!=null&&i.transactions&&(r.transactions=i.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:c}=e,l={ended:!1,message:s,signers:{}};let u=o??{};const f=v=>{u=v,r.notifyObservers(n,l,u)},d=()=>{try{r.notifyObservers(n,l,u);const v=Object.entries(l.signers).filter(([b,y])=>uj(y));if(a&&a(l,f)||v.length===0){l.ended=!0,i(l),r.notifyObservers(n,l,u);return}}catch(v){console.error("Error while notifying observers",v)}};let h=r.signers;if(c){const v=await Promise.all(r.signers.map(async function(b){return b.getAddress()}));h=r.signers.filter((b,y)=>c.includes(v[y]))}const p=await Promise.allSettled(h.map(async function(v){const b=await v.getAddress();return l.signers[b]={situation:fj},v.requestSignature(n,s,o??{},{onSignature:y=>{const m=v.suffix();l.signers[b]={signature:y,suffix:m},d()},onRejection:y=>{l.signers[b]={rejected:!0,error:y},d()},onStatus:y=>{l.signers[b]={situation:y},d()}})}));for(let v=0;vht(e))):ht(t)}const bT=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(E8(n)){const i=ne(n.suffix),s=We(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class i1 extends Nl{constructor(e){if(Zt.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=he.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new i1($a({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new he.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:he.transaction.encodeBundleExecData(r),revertOnError:!0}],i=await this.buildDeployTransaction();return i&&n.unshift(...i.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(he.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=i1.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(n.transactions=i.transactions.concat(n.transactions))}return n}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay($a({},r,{chainId:this.chainId,intent:{id:te(A1(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new Br(tn.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return r}async signDigest(e,r){const n=UC(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const i=$a({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=ne(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(c=>c.address),message:s,metadata:i,callback:(c,l)=>{const u=bT(c),f=$a({},i,{parts:u});return l(f),this.coders.signature.hasEnoughSigningPower(this.config,u)}}),a=bT(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Be(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space)r=J.from(e.space);else if(e===void 0)r=0;else return e;const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return he.transaction.encodeNonce(r,n)}async signTransactions(e,r,n){const i=await gT(e),s=he.transaction.fromTransactionish(this.address,i);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=he.transaction.digestOfTransactions(o,s),c=$a({digest:a,transactions:s},n),l=await this.signDigest(a,c);return{intent:{id:UC(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:l}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r,n){const i=await this.signTransactions(e,r),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,n)}async fillGasLimits(e){const r=await gT(e),n=he.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const c=o.gasLimit?J.from(o.gasLimit).toNumber():s[a].gasLimit;return $a({},o,s[a],{gasLimit:c})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Ma(){return Ma=Object.assign?Object.assign.bind():function(t){for(var e=1;erve(t[e])):!1}function ive(t){if(!t)return[];const e=J.from(t.value);switch(t.token.type){case qf.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case qf.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new Br([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class sve{constructor(e,r,n){this._isSigner=!0,this.account=e,this.chainId=r,this.options=n}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const i of r)if(i.token.type===qf.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(J.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===qf.FeeTokenType.ERC20_TOKEN&&(await new sd(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(J.from(i.value)))return i;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,i,s,o,a;const c=nve(e)?await ht(e):e,l=await this.account.prepareTransactions({txs:c,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),f=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(c,l.feeOptions),d=[...l.transactions,...ive(f)];return this.account.sendTransaction(d,this.chainId,l.feeQuote,void 0,void 0,(a=this.options)!=null&&a.nonceSpace?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(J.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class ove{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return Zt}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Mo{constructor(e){this.address=qe(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.migrations=e.migrations||XC.DefaultMigrations,this.migrator=new JC.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new sve(this,e,r)}static async new(e){var r;const i=new JC.Migrator(e.tracker,(r=e.migrations)!=null?r:XC.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),c=e.contexts[i.version],l=he.context.addressOf(c,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Mo({address:l,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=J.from(e),n=this.networks.find(i=>r.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new Fm(r1(r.rpcUrl,void 0,this.jwt),{name:"",chainId:J.from(e).toNumber()})}reader(e){return Zt.eq(e)?new ove:new he.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return oj(r.relayer)?r.relayer:new sj(Ma({},r.relayer,{jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=$n.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=Zt.eq(e);return new i1({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(P=>{if(!P)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return P}),o=s.then(P=>ZF.counterfactualVersion(this.address,P.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const T=await n.reader(e).implementation(n.address);if(!T)throw new Error(`Implementation not found for wallet ${n.address}`);const w=Object.values(n.contexts);for(let I=0;I0?v[v.length-1].nextImageHash:d,y=await this.tracker.configOfImageHash({imageHash:b});if(!y)throw new Error(`Config not found for imageHash ${b}`);const m=await i,g=await s,S=$n.coderFor(h).config.checkpointOf(y);return{original:Ma({},g,{version:await o}),onChain:{imageHash:f,config:await l,version:u,deployed:m},fullyMigrated:h===this.version,signedMigrations:p,version:h,presignedConfigurations:v,imageHash:b,config:y,checkpoint:S,canOnchainValidate:u===this.version&&m}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),i=await this.predecorateTransactions([],e,r);return he.transaction.fromTransactionish(this.address,i).length>0&&n.push(await this.signTransactions(i,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}async decorateTransactions(e,r,n){var i;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(i=n)!=null?i:e[0].chainId;const s=await this.buildBootstrapTransactions(r,n),o=s.transactions.length>0;if(!o&&e.length===1)return e[0];const{entrypoint:a}=o?s:e[0],c={entrypoint:a,chainId:n,intent:e[0].intent,transactions:[...s.transactions,...e.map(l=>({to:l.entrypoint,data:he.transaction.encodeBundleExecData(l),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};return r.onChain.deployed||(c.intent.id=he.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,c.transactions)),c}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=Be(gt(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore",s){const o=Zt.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,a).signDigest(e,s),u=n?this.decorateSignature(l,a):l;if(!a.canOnchainValidate)switch(i){case"ignore":return u;case"eip6492":return this.buildEIP6492Signature(await u,a,r)}return u}async buildEIP6492Signature(e,r,n){const i=await this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=Bn.encode(["address","bytes","bytes"],[i.entrypoint,he.transaction.encodeBundleExecData(i),e]);return We(["bytes","bytes32"],[s,he.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,Ma({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const i=await this.orchestrator.buildDeployTransaction({chainId:r}),s=(n=i==null?void 0:i.transactions)!=null?n:[];if(!e.onChain.deployed){const c=i1.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...c.transactions)}s.length,s.push(...e.signedMigrations.map(c=>({to:c.tx.entrypoint,data:he.transaction.encodeBundleExecData(c.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:he.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,s),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:s,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Ma({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Be(e),r,!0,n)}async signTransactions(e,r,n,i){const s=n||await this.status(r);this.mustBeFullyMigrated(s);const o=this.walletForStatus(r,s),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},c=await o.signTransactions(e,(i==null?void 0:i.nonceSpace)&&{space:i==null?void 0:i.nonceSpace},a);return Ma({},c,{signature:await this.decorateSignature(c.signature,s)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=$n.coderFor(s.version).config,c=a.imageHashOf(s),l=await this.tracker.configOfImageHash({imageHash:c,noCache:!0});if(!l||a.imageHashOf(l)!==c)throw Error(`Reverse lookup failed for imageHash ${c}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,i,s);const o=i||await this.status(e[0].chainId);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i,s){const o=i||await this.status(r),a=this.walletForStatus(r,o),c=await this.predecorateTransactions(e,o,r),l=he.transaction.fromTransactionish(this.address,c),u=a.coders.config.buildStubSignature(a.config,n),f=te(A1(32)),d={chainId:r,intent:{id:f,wallet:this.address},signature:u,transactions:l,entrypoint:this.address,nonce:0},h=await this.decorateTransactions(d,o),p=he.transaction.encodeBundleExecData(h),v=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,p,s);return Ma({},v,{decorated:h})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),s=he.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s,o){const a=await this.status(r),c=i?e:await this.predecorateTransactions(e,a,r),u=he.transaction.fromTransactionish(this.address,c).length>0?await this.signTransactions(c,r,void 0,o):void 0,f=await this.orchestrator.predecorateSignedTransactions({chainId:r}),d=[];if(u!==void 0&&u.transactions.length>0&&d.push(u),d.push(...f.filter(h=>h.transactions.length>0)),d.length!==0)return this.sendSignedTransactions(d,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=H1({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>$n.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,c){const l=c===o.length-1,u=await e.tracker.configOfImageHash({imageHash:a});if(!u){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}$n.genericCoderFor(u.version).config.signersOf(u).forEach(h=>{const p=r.find(v=>v.address===h.address&&v.network===i);if(p&&l&&p.flaggedForRemoval){p.flaggedForRemoval=!1;return}p||r.push({address:h.address,weight:h.weight,network:i,flaggedForRemoval:!l})})}))})),r}}function ave(t){return t instanceof Mo}const cve=Object.freeze(Object.defineProperty({__proto__:null,Account:Mo,isAccount:ave},Symbol.toStringTag,{value:"Module"}));function xy(){return xy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Fr({},n)).then(i=>jr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Fr({},n)).then(i=>jr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Fr({},n)).then(i=>jr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Fr({},n)).then(i=>jr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),Fr(n,i)).then(s=>jr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),Fr(n,i)).then(s=>jr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),Fr(n,i)).then(s=>jr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),Fr(n,i)).then(s=>jr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),Fr(n,i)).then(s=>jr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),Fr(n,i)).then(s=>jr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),Fr(n,i)).then(s=>jr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),Fr(n,i)).then(s=>jr(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),Fr(n,i)).then(s=>jr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),Fr(n,i)).then(s=>jr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),Fr(n,i)).then(s=>jr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),Fr(n,i)).then(s=>jr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),Fr(n,i)).then(s=>jr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),Fr(n,i)).then(s=>jr(s).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Fr=(t={},e={})=>({method:"POST",headers:xy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),jr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),wT=typeof global=="object"?global.fetch:window.fetch;class C8 extends dj{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,wT),this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=xy({},s.headers,o),wT(i,s)},this.projectAccessKey=r,this.jwtAuth=n,this.fetch=this._fetch}}const yve=Object.freeze(Object.defineProperty({__proto__:null,ContractType:x8,EventLogDataType:hve,EventLogType:dve,Indexer:dj,SequenceIndexer:C8,SortOrder:mve,TransactionStatus:pve,TransactionType:vve,TxnTransferType:as,WebRPCSchemaHash:fve,WebRPCSchemaVersion:uve,WebRPCVersion:lve},Symbol.toStringTag,{value:"Module"}));function Cy(){return Cy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ur({},n)).then(i=>zr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ur({},n)).then(i=>zr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ur({},n)).then(i=>zr(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),Ur(n,i)).then(s=>zr(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),Ur(n,i)).then(s=>zr(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),Ur(n,i)).then(s=>zr(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.projectSetTokenMetadata=(n,i)=>this.fetch(this.url("ProjectSetTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({ok:o.ok}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),Ur(n,i)).then(s=>zr(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),Ur(n,i)).then(s=>zr(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),Ur(n,i)).then(s=>zr(s).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Ur=(t={},e={})=>({method:"POST",headers:Cy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),zr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),ET=typeof global=="object"?global.fetch:window.fetch;class S8 extends hj{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,ET),this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=Cy({},s.headers,o),ET(i,s)},this.projectAccessKey=r,this.jwtAuth=n,this.fetch=this._fetch}}const kve=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Eve,Metadata:hj,PropertyType:xve,SequenceMetadataClient:S8,SortOrder:Sve,SwapType:Cve,WebRPCSchemaHash:wve,WebRPCSchemaVersion:bve,WebRPCVersion:gve},Symbol.toStringTag,{value:"Module"}));function Ave(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function _ve(t){return t.startsWith("ipfs://")}class Pve{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(he.signer.canRecover(n)){const c=he.signer.recoverSigner(r,n);if(c&&c.toLowerCase()===t.toLowerCase())return n}try{if(await he.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await Ive(Tve(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=te(await(i||new Ove).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===te(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return pj(t,e,r,a,i,s+1)}class Ove{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>_ve(n)?Ave(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()},this.gateway=e}}const Rve=(t,e)=>e.some(r=>t instanceof r);let xT,CT;function $ve(){return xT||(xT=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Mve(){return CT||(CT=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const vj=new WeakMap,e5=new WeakMap,mj=new WeakMap,W2=new WeakMap,k8=new WeakMap;function Nve(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(sc(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&vj.set(r,t)}).catch(()=>{}),k8.set(e,t),e}function Dve(t){if(e5.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});e5.set(t,e)}let t5={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return e5.get(t);if(e==="objectStoreNames")return t.objectStoreNames||mj.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return sc(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Lve(t){t5=t(t5)}function Bve(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(H2(this),e,...r);return mj.set(n,e.sort?e.sort():[e]),sc(n)}:Mve().includes(t)?function(...e){return t.apply(H2(this),e),sc(vj.get(this))}:function(...e){return sc(t.apply(H2(this),e))}}function Fve(t){return typeof t=="function"?Bve(t):(t instanceof IDBTransaction&&Dve(t),Rve(t,$ve())?new Proxy(t,t5):t)}function sc(t){if(t instanceof IDBRequest)return Nve(t);if(W2.has(t))return W2.get(t);const e=Fve(t);return e!==t&&(W2.set(t,e),k8.set(e,t)),e}const H2=t=>k8.get(t);function jve(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=sc(o);return n&&o.addEventListener("upgradeneeded",c=>{n(sc(o.result),c.oldVersion,c.newVersion,sc(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const Uve=["get","getKey","getAll","getAllKeys","count"],zve=["put","add","delete","clear"],q2=new Map;function ST(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(q2.get(e))return q2.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=zve.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Uve.includes(r)))return;const s=async function(o,...a){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),i&&c.done]))[0]};return q2.set(e,s),s}Lve(t=>({...t,get:(e,r,n)=>ST(e,r)||t.get(e,r,n),has:(e,r)=>!!ST(e,r)||t.has(e,r)}));class Wve{}var Hve=Object.freeze({__proto__:null,ConfigTracker:Wve});class qve{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),An(e,"? "),An(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),An(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),An(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),An(e,"? "),An(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),An(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),An(e,"? "),An(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),An(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),An(e,"? "),An(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),An({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),An(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),An({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function An(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` -`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var Vve=Object.freeze({__proto__:null,DebugConfigTracker:qve});function wc(){return wc=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var i,s;return Promise.resolve(((i=this.migrations[e])==null||(s=i[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:i,toImageHash:s}),Promise.resolve())}}function bf(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=J.from(n):Array.isArray(n)?e[r]=n.map(i=>bf(i)):typeof n=="object"&&n!==null?e[r]=bf(n):e[r]=n}return e}class Gve{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>bf(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>bf(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>bf(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(c=>({subdigest:c.subdigest,toImageHash:c.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await jve(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function gj(t){return t.left!==void 0&&t.right!==void 0}function bj(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function r5(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var Kve=Object.freeze({__proto__:null,isPlainNode:gj,isPlainNested:bj,isPlainV2Config:r5,MemoryTrackerStore:yj,recreateBigNumbers:bf,IndexedDBStore:Gve});class A8{constructor(e,r=new yj,n=!1){var i=this;this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(gj(o)){const[a,c]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:c}}return bj(o)?{weight:J.from(o.weight),threshold:J.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Ve.config.isNodeLeaf(s))return;const o=Ve.config.hashNode(s);if(Ve.config.isNode(s)){const a=i.saveTopology(s.left),c=i.saveTopology(s.right),l=i.store.saveV2Node(o,{left:Ve.config.hashNode(s.left),right:Ve.config.hashNode(s.right)});await Promise.all([a,c,l]);return}if(Ve.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),c=i.store.saveV2Node(o,{weight:J.from(s.weight).toString(),threshold:J.from(s.threshold).toString(),tree:Ve.config.hashNode(s.tree)});await Promise.all([a,c]);return}if(Ve.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Ve.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(Io.config.ConfigCoder.isWalletConfig(o)){const a=Io.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Ve.config.ConfigCoder.isWalletConfig(o)){const a=Ve.config.ConfigCoder.imageHashOf(o);if(Ve.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!r5(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(r5(a)){const c={version:2,threshold:J.from(a.threshold),checkpoint:J.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=c,c}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,c=$n.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(l=>{const u=he.context.addressOf(l,c);return i.store.saveCounterfactualWallet(u,c,l)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=he.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Ve.signature.SignatureCoder.decode(s.signature),a=$n.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),c=Ve.chained.messageSetImageHash(a),l=Be(c),u={message:c,address:s.wallet,chainId:0,digest:l},f=i.savePayload({payload:u}),d=i.saveWalletConfig({config:s.nextConfig}),h=await Ve.signature.SignatureCoder.recover(o,u,i.provider),p=Ve.signature.signaturesOf(h.config.tree);await Promise.all([f,d,i.saveWalletConfig({config:h.config}),...p.map(v=>i.store.saveSignatureOfSubdigest(v.address,h.subdigest,v.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:c}=s,l=await i.configOfImageHash({imageHash:a});if(!l||!Ve.config.ConfigCoder.isWalletConfig(l))return[];const u=Ve.config.signersOf(l.tree).map(g=>g.address),f=await Promise.all(u.map(g=>i.store.loadSubdigestsOfSigner(g))),d=[...new Set(f.flat())],p=(await Promise.all([...new Set(d)].map(async function(g){return wc({},await i.payloadOfSubdigest({subdigest:g}),{subdigest:g})}))).filter(g=>(g==null?void 0:g.message)&&(g==null?void 0:g.address)&&g.address===o).map(g=>({payload:g,nextImageHash:Ve.chained.decodeMessageSetImageHash(g.message)})).filter(g=>g==null?void 0:g.nextImageHash);let v;const y=(await Promise.all(p.map(async function({nextImageHash:g,payload:S}){const P=await i.configOfImageHash({imageHash:g});if(!P||!Ve.config.isWalletConfig(P))return;const T=J.from(P.checkpoint);return{nextConfig:P,nextCheckpoint:T,nextImageHash:g,payload:S}}))).filter(g=>g!==void 0).filter(g=>g.nextCheckpoint.gt(l.checkpoint)).sort((g,S)=>g.nextCheckpoint.gt(S.nextCheckpoint)?c?1:-1:c?-1:1);for(const g of y){const{nextConfig:S,nextCheckpoint:P,nextImageHash:T,payload:w}=g;if(v){const j=v.checkpoint;if(c){if(P.gte(j))continue}else if(P.lte(j))continue}const I=new Map((await Promise.all(u.map(async function(j){const H=await i.store.loadSignatureOfSubdigest(j,w.subdigest);if(!H)return[j,void 0];const G=te(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(j,w.subdigest,H):H),B=he.signer.tryRecoverSigner(w.subdigest,G)!==j;return[j,{isDynamic:B,signature:G}]}))).filter(j=>!!j[1]));if(I.size===0)continue;const F=Ve.signature.SignatureCoder.encodeSigners(l,I,[],0);F.weight.lt(l.threshold)||(v={nextImageHash:T,checkpoint:J.from(S.checkpoint),signature:F.encoded})}if(!v)return[];const m=await i.loadPresignedConfiguration({wallet:o,fromImageHash:v.nextImageHash,longestPath:c});return[{wallet:o,nextImageHash:v.nextImageHash,signature:v.signature},...m]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=he.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(c=>he.signer.canRecover(c)).map(c=>{const l=he.signer.recoverSigner(a,c);return i.store.saveSignatureOfSubdigest(l,a,c)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(l=>i.payloadOfSubdigest({subdigest:l}))).then(l=>l.filter(u=>u!==void 0)),c=[];for(const l of a){const u=l.address;if(c.find(h=>h.wallet===u))continue;const f=he.signature.subdigestOf(l),d=await i.store.loadSignatureOfSubdigest(s.signer,f);d&&c.push({wallet:u,proof:{digest:l.digest,chainId:J.from(l.chainId),signature:te(d)}})}return c},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new Pve(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Ve.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=tj.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ve.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=he.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),c=Be(a),l={chainId:r.tx.chainId,message:a,address:e,digest:c},u=he.signature.subdigestOf(l),f=this.savePayload({payload:l}),d=this.saveWalletConfig({config:r.toConfig}),h=Io.signature.SignatureCoder.decode(r.tx.signature),p=await Io.signature.SignatureCoder.recover(h,l,this.provider),v=Io.signature.SignatureCoder.signaturesOf(p.config);await Promise.all([f,d,this.saveWalletConfig({config:p.config}),this.store.saveMigrationsSubdigest(e,i,i+1,u,s),...v.map(b=>this.store.saveSignatureOfSubdigest(b.address,p.subdigest,b.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),c=$n.coderFor(n);return!o||!c.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(u){const{subdigest:f,toImageHash:d}=u,h=await s.payloadOfSubdigest({subdigest:f});if(!h||!h.message||!J.from(i).eq(h.chainId))return;const p=c.config.signersOf(o).map(g=>g.address),v=new Map((await Promise.all(p.map(async function(g){const S=await s.store.loadSignatureOfSubdigest(g,f);if(!S)return[g,void 0];const P=te(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(g,f,S):S),T=he.signer.tryRecoverSigner(f,P)!==g;return[g,{isDynamic:T,signature:P}]}))).filter(g=>!!g[1])),b=c.signature.encodeSigners(o,v,[],i);if(!b||b.weightu.filter(f=>f!==void 0)))[0]}updateProvider(e){this.provider=e}}var Qve=Object.freeze({__proto__:null,LocalConfigTracker:A8});let V2=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class Yve{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),ns({},n)).then(i=>is(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),ns(n,i)).then(s=>is(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),ns(n,i)).then(s=>is(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),ns(n,i)).then(s=>is(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),ns(n,i)).then(s=>is(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),ns(n,i)).then(s=>is(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),ns(n,i)).then(s=>is(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),ns(n,i)).then(s=>is(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),ns(n,i)).then(s=>is(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),ns(n,i)).then(s=>is(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),ns(n,i)).then(s=>is(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const ns=(t={},e={})=>({method:"POST",headers:wc({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),is=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class Jve{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new Yve(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(G2(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=$n.genericCoderFor(r.version).config.imageHashOf(r),i=Ve.signature.setImageHashStruct(n),s=Be(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:Zp(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>he.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:Xu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return Xve(r,n)}catch(r){if(G2(r))return;throw r}}async saveWalletConfig(e){const r=Zp(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(G2(r))return;throw r}}async saveCounterfactualWallet(e){const r=Zp(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:i,chainID:s,type:o,signature:a}])=>{switch(o){case V2.EIP712:a+=te(he.signer.SigType.EIP712).slice(2);break;case V2.EthSign:a+=te(he.signer.SigType.ETH_SIGN).slice(2);break;case V2.EIP1271:a+=te(he.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:J.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=Xu(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),c=async function(f){const d=a[f];if(d){const h=Object.keys(d).map(Number).sort((p,v)=>v-p);for(const p of h)for(const[v,b]of Object.entries(d[p]))try{const y=await s.configOfImageHash({imageHash:v});if(y)return{fromVersion:n,toVersion:p,toConfig:y,tx:{entrypoint:b.executor,transactions:b.transactions,nonce:b.nonce,signature:b.signature,chainId:f,intent:{id:he.transaction.subdigestOfTransactions(e,f,b.nonce,b.transactions),wallet:e}}}}catch(y){console.error(y)}}},l=await c(o);if(l)return l;for(const u in a)if(u!==o){const f=await c(u);if(f)return f}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Zp(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(Zve),nonce:Xu(r.tx.nonce),signature:r.tx.signature,chainID:Xu(r.tx.chainId)})}}function Zp(t){switch(t.version){case 1:if(Io.config.ConfigCoder.isWalletConfig(t))return{threshold:ml(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:ml(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ve.config.ConfigCoder.isWalletConfig(t))return{threshold:ml(t.threshold),checkpoint:ml(t.checkpoint),tree:Wv(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Wv(t){return Ve.config.isNode(t)?{left:Wv(t.left),right:Wv(t.right)}:Ve.config.isSignerLeaf(t)?{weight:ml(t.weight),address:t.address}:Ve.config.isNestedLeaf(t)?{weight:ml(t.weight),threshold:ml(t.threshold),tree:Wv(t.tree)}:Ve.config.isNodeLeaf(t)?{node:t.nodeHash}:wc({},t)}function Xve(t,e){switch(t){case 1:return wc({},e,{version:t});case 2:return wc({},e,{version:t,tree:Hv(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Hv(t){switch(typeof t){case"object":const e=wc({},t);return e.left!==void 0&&(e.left=Hv(e.left)),e.right!==void 0&&(e.right=Hv(e.right)),e.tree!==void 0&&(e.tree=Hv(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function Zve(t){return{to:t.to,value:t.value!==void 0?Xu(t.value):void 0,data:t.data!==void 0?te(t.data):void 0,gasLimit:t.gasLimit!==void 0?Xu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function ml(t){return J.from(t).toNumber()}function Xu(t){return J.from(t).toString()}function G2(t){return typeof t=="object"&&t.status===404}var eme=Object.freeze({__proto__:null,RemoteConfigTracker:Jve});function n5(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function ph(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class tme{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,c){return{res:await a.configOfImageHash(e),i:c}}),n=await n5(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:$n.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const i=new A8(void 0),s=await ph(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await n5(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await ph(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:c,signature:l}})=>{const u=`${o}-${a}-${c}`;let f=s.get(u);f||(f={wallet:o,digest:a,chainId:c,signatures:[]},s.set(u,f)),f.signatures.push(l)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await ph(this.trackers.map(c=>c.loadPresignedConfiguration(e)),[]),s=(await ph(n.map(async function(c){const l=c[c.length-1],u=await r.configOfImageHash({imageHash:l.nextImageHash});if(u)return{checkpoint:$n.genericCoderFor(u.version).config.checkpointOf(u),result:c}}),void 0)).reduce((c,l)=>l&&(!c||l.checkpoint.gt(c.checkpoint))?l:c);if(!s)return[];const o=new Map,a=c=>(o.has(c)||o.set(c,this.configOfImageHash({imageHash:c})),o.get(c));return s.result.forEach(async function(c){const l=await a(c.nextImageHash);l&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:l,signature:c.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class rme{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthf&&(!u||f.checkpoint.gt(u.checkpoint))?f:u))==null?void 0:c.result)!=null?a:[]}return i||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class kT{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${Be(gt(JSON.stringify(i,nme)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function nme(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function ime(t){return t instanceof wj}class wj{constructor(e,r=50,n=!1){this.cache=new kT,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new kT}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof A8&&this.tracker.updateProvider(e)}}var _8=Object.freeze({__proto__:null,debug:Vve,local:Qve,remote:eme,stores:Kve,raceUntil:n5,allSafe:ph,MultipleTracker:tme,CachedTracker:rme,isDedupedTracker:ime,DedupedTracker:wj});const sme=Object.freeze(Object.defineProperty({__proto__:null,tracker:Hve,trackers:_8},Symbol.toStringTag,{value:"Module"})),Ej=60*60*24*7,ome=60;class AT{constructor(e,r,n={}){this.proofStrings=new Map,this.onAuthCallbacks=[],this.indexerClients=new Map,this.account=e,this.settings=r,this.status=n}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:Ej,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let i;for(let s=1;;s++)try{i=(await r.getJWT(!0)).token;break}catch(o){if(s===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new Uh(n,void 0,i)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const l=this.status.jwt,u=await l.token;if(this.now(){throw this.status.jwt=void 0,l}),expiration:o};return this.status.jwt=a,a.token.then(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"fulfilled",value:l})}catch{}})}).catch(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"rejected",reason:l})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new t1,n=J.from(this.settings.sequenceApiChainId),i=Es(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new Fm(r1(i.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new Uh(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new S8(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=Es(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const i=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new C8(n.indexerUrl,void 0,i))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const c=this.proofStrings.get(e);if(this.now()(r.signature=c,n.encodeProof(r,!0))).catch(c=>{throw this.proofStrings.delete(e),c}),expiration:o};return this.proofStrings.set(e,a),a}}const xj=async(t,e,r)=>{const n=qe(await t.getAddress());if(!n||n===""||n==="0x")throw Cj;const i=new Cb;if(i.address=n,!r||!r.app||r.app==="")throw new P8("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.claims.n=r.nonce,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):Ej);const s=i.messageTypedData(),o=lF(e);i.signature=await(t instanceof Mo?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const c=await new t1().encodeProof(i,!0);return{typedData:s,proofString:c}};class P8 extends Error{constructor(e){super(e),this.name="AuthError"}}const Cj=new P8("auth error: account address is empty");function al(){return al=Object.assign?Object.assign.bind():function(t){for(var e=1;eI.wallet)));let T;if(P){if(T=new Mo({address:P,tracker:y,networks:b,contexts:v,orchestrator:p}),l&&l.length>0){let I=await T.status(g);if(I.original.version!==I.version||T.version!==I.version){const{migratedAllChains:H,failedChains:G}=await T.isMigratedAllChains();if(G.some(B=>i5.includes(B)))throw Error(`Failed to fetch account status on ${G.join(", ")}`);if(!H){if(h&&!await h(T))throw Error("Migration cancelled, cannot open session");const{failedChains:B}=await T.signAllMigrations(d||(_=>_));if(B.some(_=>i5.includes(_)))throw Error(`Failed to sign migrations on ${B.join(", ")}`);_8.isDedupedTracker(y)&&y.invalidateCache();let E;if([E,I]=await Promise.all([T.isMigratedAllChains().then(_=>_.migratedAllChains),T.status(g)]),!E)throw Error("Failed to migrate account")}}I.onChain.version!==I.version&&await T.doBootstrap(g,void 0,I);const F=I.config,j=T.coders.config.editConfig(F,{add:l,threshold:c});if(T.coders.config.imageHashOf(F)!==T.coders.config.imageHashOf(j)){const H=T.coders.config.editConfig(j,{checkpoint:T.coders.config.checkpointOf(F).add(1)});await T.updateConfig(H)}}}else{if(!l||l.length===0)throw Error("Cannot create new account without signers");if(!c)throw Error("Cannot create new account without threshold");if(T=await Mo.new({config:{threshold:c,checkpoint:0,signers:l},tracker:y,contexts:v,orchestrator:p,networks:b}),P=await u([T.address]),await T.publishWitness(),!(await y.walletsOfSigner({signer:a,noCache:!0})).some(F=>F.wallet===T.address))throw Error("Account not found on tracker")}let w;return m&&(w=new AT(T,m),w.auth(),w.onAuth(I=>{I.status==="fulfilled"&&T.setJwt(I.value)})),new Jh(b,v,T,w)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:c,tracker:l,services:u}=al({},qv,n);let f;if(Sj(r)){var d,h,p;const S=r.config.address||he.context.addressOf(a[1],Io.config.ConfigCoder.imageHashOf(al({},r.config,{version:1}))),P=((d=(h=r.jwt)==null?void 0:h.expiration)!=null?d:0)T.migratedAllChains)){if(s&&!await s(f))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await f.signAllMigrations(i),!await f.isMigratedAllChains().then(T=>T.migratedAllChains))throw Error("Failed to migrate account")}}else if(kj(r)){var v,b,y;const S=((v=(b=r.jwt)==null?void 0:b.expiration)!=null?v:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},cme=Object.freeze(Object.defineProperty({__proto__:null,AuthError:P8,CRITICAL_CHAINS:i5,ErrAccountIsRequired:Cj,Session:Jh,SessionSettingsDefault:qv,ValidateSequenceWalletProof:ame,isSessionDumpV1:Sj,isSessionDumpV2:kj,signAuthorization:xj},Symbol.toStringTag,{value:"Module"}));function Sy(){return Sy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),_n({},n)).then(i=>Pn(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),_n({},n)).then(i=>Pn(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),_n({},n)).then(i=>Pn(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),_n(n,i)).then(s=>Pn(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),_n(n,i)).then(s=>Pn(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),_n(n,i)).then(s=>Pn(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),_n(n,i)).then(s=>Pn(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),_n(n,i)).then(s=>Pn(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),_n(n,i)).then(s=>Pn(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),_n(n,i)).then(s=>Pn(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),_n(n,i)).then(s=>Pn(s).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const _n=(t={},e={})=>({method:"POST",headers:Sy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Pn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),ume=typeof global=="object"?global.fetch:window.fetch;class fme{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=new lme(r,ume)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async requestSignature(e,r,n,i){var s;const{onSignature:o,onRejection:a}=i;if(!he.isWalletSignRequestMetadata(n))return a("expected sequence signature request metadata"),!1;const c=n.guardTotpCode,l=$n.genericCoderFor(n.config.version),{encoded:u}=l.signature.encodeSigners(n.config,(s=n.parts)!=null?s:new Map,[],n.chainId);try{const{sig:h}=await this.guard.signWith({signer:this.address,request:{msg:te(r),auxData:this.packMsgAndSig(n.address,n.digest,u,n.chainId),chainId:J.from(n.chainId).toNumber()},token:c?{id:ky.TOTP,token:c}:void 0});if(ne(h).length===0)throw new Error("guard response contained no signature data");return o(h),!0}catch(h){var f,d;return a(`unable to request guard signature: ${(f=(d=h.message)!=null?d:h.msg)!=null?f:h}`),!1}}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await _T(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return Sy({},r,{methods:r.methods.map(dme)})}async setPin(e,r){const n=await Zd(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Zd(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Zd(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await _T(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Zd(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Zd(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,i){return Bn.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let ky=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function dme(t){switch(t){case ky.PIN:case ky.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function hme(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function _T(t){if(hme(t))return t;{const e=ZC.isSapientSigner(t.signer)?t.signer:new ZC.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=Aj(t.walletAddress,n),s=H1(i),o=te(A1(32));return new Promise((a,c)=>e.requestSignature(o,s,{},{onSignature(l){a({walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:te(l)})},onRejection:c,onStatus(l){}}))}}async function Zd(t){if("wallet"in t){var e;const r=new Date,n=_j(r),i=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:i}}else return t}function Aj(t,e){return{domain:Pj,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:qe(t),timestamp:Tj(e)}}}function _j(t){return{domain:Pj,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:Tj(t)}}}const Pj={name:"Sequence Guard",version:"1",chainId:1};function Tj(t){return t.toUTCString().replace("GMT","UTC")}const pme=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:ky,GuardSigner:fme,getAuthUpdateProofTypedData:_j,getOwnershipProofTypedData:Aj},Symbol.toStringTag,{value:"Module"}));function Ay(){return Ay=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0){r.options.verbose&&console.log("Skip multicall, empty queue");return}if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&(r.options.verbose&&console.log("Scheduling next batch"),r.scheduleExecution());const i=a[0].next;let s;var[a,c]=PT(a,h=>{try{if(h.next!==i)return!1;switch(h.request.method){case Rr.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Rr.ethGetBalance:case Rr.ethGetCode:const p=mme(h.request.params[1]);if(s===void 0&&(s=p),!yme(p,s))return!1}return!0}catch{return!1}});if(c.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(h=>{try{switch(h.request.method){case Rr.ethCall:return{delegateCall:!1,revertOnError:!1,target:h.request.params[0].to,data:h.request.params[0].data,gasLimit:h.request.params[0].gas?h.request.params[0].gas:0,value:0};case Rr.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[h.request.params[0]])};case Rr.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[h.request.params[0]])};default:return null}}catch{return null}});var[a,c]=PT(a,(h,p)=>o[p]!==void 0);if(o=o.filter(h=>h),c.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let l;try{r.options.verbose&&console.log("Encoding multicall"),l=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(h){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",h),r.forward(a);return}const u=e8(),f=await vme(ZS(i)({id:u,jsonrpc:Hf,method:Rr.ethCall,params:[{to:r.options.contract,value:0,data:l},J.isBigNumber(s)?s.toNumber():s]}),h=>({jsonrpc:Hf,id:u,result:void 0,error:h}));if(f.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",f.error),r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),f.result)}catch(h){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",h),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,p)=>{if(!d[0][p])r.options.verbose&&console.warn(`Multicall error for ${h.request.method} not found`),r.forward(h);else switch(h.request.method){case Rr.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][p]});break;case Rr.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Bn.decode(["bytes"],d[1][p])[0]});break;case Rr.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Bn.decode(["uint256"],d[1][p])[0]});break}})},this.options=e?Ay({},Bi.DefaultOptions,e):Bi.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Bi.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Bi.DefaultOptions=Ay({},gme);const Ij=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class bme extends Sg{constructor(e,r){var n;super(e.getNetwork()),n=this,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new _x(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case Rr.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case Rr.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case Rr.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.provider=e,this.listenerCount=e.listenerCount.bind(e),this.multicall=Bi.isMulticall(r)?r:new Bi(r),Ij.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Hf,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(Rr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Rr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Rr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=e8();return(await ZS(this.multicall.handle)(this.next,{jsonrpc:Hf,id:n,method:e,params:r})).result}}class wme{constructor(e,r){if(this.provider=e,this.multicall=Bi.isMulticall(r)?r:new Bi(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const Eme=t=>e=>{const r=Bi.isMulticall(t)?t:new Bi(t);return(n,i)=>r.handle(e,n,i)};var xme=Object.freeze({__proto__:null,ProxyMethods:Ij,MulticallProvider:bme,MulticallExternalProvider:wme,multicallMiddleware:Eme});const Cme=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Bi,providers:xme},Symbol.toStringTag,{value:"Module"}));var Oj={exports:{}};/*! +)[]`,VC=(t,e)=>{const r=[],n=new Fr(tn.mainModule.abi);for(const i of e){const s=ne(i.data||"0x");if(i.to===t&&te(s.slice(0,4))===XB){const o=s.slice(4),a=Fn.decode([ZB],o)[0];r.push(...VC(i.to,a.map(c=>bn({},c,{to:c.target}))))}else try{const o=n.decodeFunctionData("execute",s)[0],a=VC(t,o.map(c=>bn({},c,{to:c.target})));r.push(...a)}catch{r.push(i)}}return r};var Lpe=Object.freeze({__proto__:null,MetaTransactionsType:Tb,intendTransactionBundle:_pe,intendedTransactionID:Ppe,unpackMetaTransactionsData:Tpe,packMetaTransactionsData:VB,digestOfTransactions:GB,subdigestOfTransactions:Ipe,subdigestOfGuestModuleTransactions:Ope,toSequenceTransactions:KB,toSequenceTransaction:w8,isSequenceTransaction:Ib,hasSequenceTransactions:QB,sequenceTxAbiEncode:n1,fromTxAbiEncode:Rpe,encodeNonce:$pe,decodeNonce:Mpe,fromTransactionish:Npe,isTransactionBundle:YB,isSignedTransactionBundle:JB,encodeBundleExecData:Dpe,selfExecuteSelector:XB,selfExecuteAbi:ZB,unwind:VC});const ej="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",Fpe="0x6492649264926492649264926492649264926492649264926492649264926492";async function tj(t,e,r,n){return await t.call({data:Wt([ej,new Z6().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var Bpe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ej,EIP_6492_SUFFIX:Fpe,validateEIP6492Offchain:tj});class jpe{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new sd(e,[...tn.mainModuleUpgradable.abi,...tn.mainModule.abi,...tn.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(i=>ne(i))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Fn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(i=>ne(i));if(n.length===20)return qe(te(n));if(n.length===32)return Fn.decode(["address"],n)[0]}async imageHash(e){try{return await this.module(e).imageHash()}catch{}}async nonce(e,r=0){try{return await this.module(e).readNonce(r)}catch(n){if(!await this.isDeployed(e))return 0;throw n}}async isValidSignature(e,r,n){return tj(this.provider,e,r,n)}}var Upe=Object.freeze({__proto__:null,OnChainReader:jpe});function zpe(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var he=Object.freeze({__proto__:null,config:rpe,signature:npe,context:Ape,signer:lpe,EIP1271:ope,transaction:Lpe,reader:Upe,EIP6492:Bpe,isWalletSignRequestMetadata:zpe});const GC=[{config:l8,signature:c8},{config:Pb,signature:_b}];function rj(t){const e=t-1;if(e<0||e>=GC.length)throw new Error(`No coder for version: ${t}`);return GC[e]}function Wpe(t){return rj(t)}var $n=Object.freeze({__proto__:null,ALL_CODERS:GC,coderFor:rj,genericCoderFor:Wpe});const nj=[Io,Ve],Hpe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:nj,commons:he,universal:$n,v1:Io,v2:Ve},Symbol.toStringTag,{value:"Module"}));function qpe(t,e,r){for(let n=0;ne.version)&&(e=r);if(e===void 0)throw new Error("No migrations");return e}async getAllMigratePresignedTransaction(e){const{address:r,fromImageHash:n,fromVersion:i,chainId:s}=e;let o=n,a=i;const c=Object.values(this.contexts),l=[];for(let u=1;une(s).length===0))return w9;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:i.to,data:i.data,value:i.value})}))).map(i=>({executed:!0,succeeded:!0,gasUsed:J.from(i).toNumber(),gasLimit:J.from(i).toNumber()}))}async getNonce(e,r,n){if(!this.provider)throw new Error("provider is not set");if(await this.provider.getCode(e)==="0x")return 0;r===void 0&&(r=0);const s=await new sd(e,tn.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return he.transaction.encodeNonce(r,s)}async wait(e,r,n=this.waitPollRate,i=5){var s=this;typeof e!="string"&&(e=he.transaction.intendedTransactionID(e));let o=!1;const a=async function(u,f){let d=0;for(;!o;){try{return await u()}catch(h){if(d++,i!==void 0&&d>=i)throw ge.error(`giving up after ${d} failed attempts${f?`: ${f}`:""}`,h),h;ge.warn(`attempt #${d} failed${f?`: ${f}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${f?`: ${f}`:""}`)},c=async function(){let u=s.fromBlockLog;if(u<0&&(u=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number")+u),typeof e!="string")throw new Error("impossible");const f=e.replace("0x","");for(;!o;){const d=await a(()=>s.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>s.provider.getLogs({fromBlock:Math.max(0,u-s.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,u-s.deltaBlocksLog)} to ${d}`);u=d;const v=(await Promise.all(h.map(b=>a(()=>s.provider.getTransactionReceipt(b.transactionHash),`unable to get receipt for transaction ${b.transactionHash}`)))).find(b=>b.logs.find(y=>y.topics.length===0&&y.data.replace("0x","")===f||y.topics.length===1&&y.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&y.data.length>=64&&y.data.replace("0x","").startsWith(f)));if(v)return bc({receipt:v},await a(()=>s.provider.getTransaction(v.transactionHash),`unable to get transaction ${v.transactionHash}`));o||await new Promise(b=>setTimeout(b,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([c(),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):c()}}function Xpe(t){return t.signer!==void 0&&Nl.isSigner(t.signer)}class Zpe extends cj{constructor(e){if(super(Nl.isSigner(e)?{provider:e.provider}:bc({},e,{provider:e.signer.provider})),this.signer=Nl.isSigner(e)?e:e.signer,!this.signer.provider)throw new Error("Signer must have a provider")}async getFeeOptions(e,...r){return{options:[]}}async getFeeOptionsRaw(e,r,n){return{options:[]}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}setTransactionOptions(e){this.txnOptions=e}async relay(e,r,n=!0){r!==void 0&&ge.warn("LocalRelayer doesn't accept fee quotes");const i=he.transaction.encodeBundleExecData(e),s=this.signer.sendTransaction(bc({to:e.entrypoint,data:i},this.txnOptions,{gasLimit:9e6}));if(n){const o=await s;return o.receipt=await o.wait(),o}else return s}}const eve="v1",tve="v0.4.0",rve="950b00c821b56110c64d947312b9dea3e197e207";let Ha=function(t){return t.UNKNOWN="UNKNOWN",t.DROPPED="DROPPED",t.QUEUED="QUEUED",t.SENT="SENT",t.SUCCEEDED="SUCCEEDED",t.PARTIALLY_FAILED="PARTIALLY_FAILED",t.FAILED="FAILED",t}({}),nve=function(t){return t.SEND="SEND",t.RECEIVE="RECEIVE",t.BRIDGE_DEPOSIT="BRIDGE_DEPOSIT",t.BRIDGE_WITHDRAW="BRIDGE_WITHDRAW",t.BURN="BURN",t.UNKNOWN="UNKNOWN",t}({}),ive=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),sve=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class lj{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),lt({},n)).then(i=>ut(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),lt({},n)).then(i=>ut(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),lt({},n)).then(i=>ut(i).then(s=>({status:s.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),lt({},n)).then(i=>ut(i).then(s=>({data:s.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),lt({},n)).then(i=>ut(i).then(s=>({chainID:s.chainID}))),this.sendMetaTxn=(n,i)=>this.fetch(this.url("SendMetaTxn"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,i)=>this.fetch(this.url("GetMetaTxnNonce"),lt(n,i)).then(s=>ut(s).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,i)=>this.fetch(this.url("GetMetaTxnReceipt"),lt(n,i)).then(s=>ut(s).then(o=>({receipt:o.receipt}))),this.simulate=(n,i)=>this.fetch(this.url("Simulate"),lt(n,i)).then(s=>ut(s).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,i)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),lt(n,i)).then(s=>ut(s).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),lt({},n)).then(i=>ut(i).then(s=>({isFeeRequired:s.isFeeRequired,tokens:s.tokens}))),this.feeOptions=(n,i)=>this.fetch(this.url("FeeOptions"),lt(n,i)).then(s=>ut(s).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,i)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),lt(n,i)).then(s=>ut(s).then(o=>({options:o.options}))),this.sentTransactions=(n,i)=>this.fetch(this.url("SentTransactions"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,i)=>this.fetch(this.url("PendingTransactions"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,transactions:o.transactions}))),this.getGasTank=(n,i)=>this.fetch(this.url("GetGasTank"),lt(n,i)).then(s=>ut(s).then(o=>({gasTank:o.gasTank}))),this.addGasTank=(n,i)=>this.fetch(this.url("AddGasTank"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.updateGasTank=(n,i)=>this.fetch(this.url("UpdateGasTank"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasTank:o.gasTank}))),this.getGasSponsor=(n,i)=>this.fetch(this.url("GetGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({gasSponsor:o.gasSponsor}))),this.listGasSponsors=(n,i)=>this.fetch(this.url("ListGasSponsors"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,i)=>this.fetch(this.url("AddGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,i)=>this.fetch(this.url("UpdateGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.removeGasSponsor=(n,i)=>this.fetch(this.url("RemoveGasSponsor"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status}))),this.reportGasSponsorUsage=(n,i)=>this.fetch(this.url("ReportGasSponsorUsage"),lt(n,i)).then(s=>ut(s).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.nextGasTankBalanceAdjustmentNonce=(n,i)=>this.fetch(this.url("NextGasTankBalanceAdjustmentNonce"),lt(n,i)).then(s=>ut(s).then(o=>({nonce:o.nonce}))),this.adjustGasTankBalance=(n,i)=>this.fetch(this.url("AdjustGasTankBalance"),lt(n,i)).then(s=>ut(s).then(o=>({status:o.status,adjustment:o.adjustment}))),this.getGasTankBalanceAdjustment=(n,i)=>this.fetch(this.url("GetGasTankBalanceAdjustment"),lt(n,i)).then(s=>ut(s).then(o=>({adjustment:o.adjustment}))),this.listGasTankBalanceAdjustments=(n,i)=>this.fetch(this.url("ListGasTankBalanceAdjustments"),lt(n,i)).then(s=>ut(s).then(o=>({page:o.page,adjustments:o.adjustments}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const lt=(t={},e={})=>({method:"POST",headers:bc({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ut=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});var qf=Object.freeze({__proto__:null,WebRPCVersion:eve,WebRPCSchemaVersion:tve,WebRPCSchemaHash:rve,ETHTxnStatus:Ha,TransferType:nve,FeeTokenType:ive,SortOrder:sve,Relayer:lj});const ove=[Ha.DROPPED,Ha.SUCCEEDED,Ha.PARTIALLY_FAILED,Ha.FAILED],ave=[Ha.DROPPED,Ha.PARTIALLY_FAILED,Ha.FAILED];function cve(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&Tc.isProvider(t.provider)}const lve=typeof global=="object"?global.fetch:window.fetch;class uj{constructor(e){if(this._fetch=(r,n)=>{const i={},{jwtAuth:s,projectAccessKey:o}=this.options;return s&&s.length>0&&(i.Authorization=`BEARER ${s}`),o&&o.length>0&&(i["X-Access-Key"]=o),n.headers=bc({},n.headers,i),lve(r,n)},this.options=e,this.service=new lj(e.url,this._fetch),Tc.isProvider(e.provider))this.provider=e.provider;else{const{jwtAuth:r,projectAccessKey:n}=this.options,i=r1(e.provider.url,n,r);this.provider=new Bm(i)}}async waitReceipt(e,r=1e3,n=5,i){typeof e!="string"&&(e=he.transaction.intendedTransactionID(e)),ge.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let s=0;for(;i===void 0||!i();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&ove.includes(o.status))return{receipt:o}}catch(o){if(s++,s===n)throw o}(i===void 0||!i())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const i=Fn.encode([he.transaction.MetaTransactionsType],[he.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:i})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const i=n.tokens.map(c=>c.symbol).join(", ");ge.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${i}`);const s=await this.getNonce(e);if(!this.provider)throw ge.warn("[rpc-relayer/getFeeOptions] provider not set, needed for stub signature"),new Error("provider is not set");const{options:o,quote:a}=await this.service.feeOptions({wallet:e,to:e,data:he.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:s})});return ge.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return ge.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r,n){const{options:i,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:te(r),simulate:n==null?void 0:n.simulate});return{options:i,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){ge.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?J.from(r).toHexString():void 0,i=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),s=J.from(i.nonce),[o,a]=he.transaction.decodeNonce(s);return ge.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),s}async relay(e,r,n=!0){var i=this;ge.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let s;if(r!==void 0&&(typeof r._quote=="string"?s=r._quote:ge.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw ge.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=he.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:s});if(ge.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const c={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:u=>Promise.reject(new Error("impossible"))},l=async function(f){var d;if(!i.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await i.wait(e.intent.id),p=(d=h.receipt)==null?void 0:d.transactionHash;if(!p)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(c,h),i.provider.waitForTransaction(p,f)};return c.wait=l,c}}async wait(e,r,n=1e3,i=5){var s=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,i,()=>o),new Promise((l,u)=>setTimeout(()=>{o=!0,u(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,i));if(!a.txnReceipt||ave.includes(a.status))throw new uve(a);const c=JSON.parse(a.txnReceipt);return{blockHash:c.blockHash,blockNumber:J.from(c.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:c.transactionHash,raw:a.txnReceipt,receipt:c,wait:async function(l){return s.provider.waitForTransaction(c.transactionHash,l)}}}}class uve{constructor(e){this.receipt=e}}function fj(t){return typeof t=="object"&&typeof t.simulate=="function"&&typeof t.getFeeOptions=="function"&&typeof t.gasRefundOptions=="function"&&typeof t.getNonce=="function"&&typeof t.relay=="function"&&typeof t.wait=="function"}const fve=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:Zpe,ProviderRelayer:cj,ProviderRelayerDefaults:aj,RpcRelayer:uj,RpcRelayerProto:qf,isLocalRelayerOptions:Xpe,isProviderRelayerOptions:Jpe,isRelayer:fj,isRpcRelayerOptions:cve,proto:qf},Symbol.toStringTag,{value:"Module"}));function dj(t){return t.getAddress!==void 0&&t.buildDeployTransaction!==void 0&&t.predecorateSignedTransactions!==void 0&&t.decorateTransactions!==void 0&&t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class hj{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async requestSignature(e,r,n,i){return i.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var XC=Object.freeze({__proto__:null,isSapientSigner:dj,SignerWrapper:hj});function pj(t){return t.rejected}function E8(t){return t.signature!==void 0}function vj(t){return!pj(t)&&!E8(t)}const mj="Initial";class Ob{constructor(e,r=Ob.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${te(A1(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>dj(r)?r:new hj(r))}async getSigners(){return Promise.all(this.signers.map(async function(e){return e.getAddress()}))}subscribe(e){return this.observers.push(e),()=>{this.observers=this.observers.filter(r=>r!==e)}}async notifyObservers(e,r,n){await Promise.all([...this.signers.map(async function(i){return i.notifyStatusChange(e,r,n)}),...this.observers.map(async function(i){return i(r,n)})])}async buildDeployTransaction(e){let r;for(const n of this.signers){const i=await n.buildDeployTransaction(e);r===void 0?r=i:i!=null&&i.transactions&&(r.transactions=i.transactions.concat(r.transactions))}return r}async predecorateSignedTransactions(e){const r=[];for(const n of this.signers)r.push(...await n.predecorateSignedTransactions(e??{}));return r}async decorateTransactions(e,r){for(const n of this.signers)e=await n.decorateTransactions(e,r??{});return e}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(i){const{message:s,metadata:o,callback:a,candidates:c}=e,l={ended:!1,message:s,signers:{}};let u=o??{};const f=v=>{u=v,r.notifyObservers(n,l,u)},d=()=>{try{r.notifyObservers(n,l,u);const v=Object.entries(l.signers).filter(([b,y])=>vj(y));if(a&&a(l,f)||v.length===0){l.ended=!0,i(l),r.notifyObservers(n,l,u);return}}catch(v){console.error("Error while notifying observers",v)}};let h=r.signers;if(c){const v=await Promise.all(r.signers.map(async function(b){return b.getAddress()}));h=r.signers.filter((b,y)=>c.includes(v[y]))}const p=await Promise.allSettled(h.map(async function(v){const b=await v.getAddress();return l.signers[b]={situation:mj},v.requestSignature(n,s,o??{},{onSignature:y=>{const m=v.suffix();l.signers[b]={signature:y,suffix:m},d()},onRejection:y=>{l.signers[b]={rejected:!0,error:y},d()},onStatus:y=>{l.signers[b]={situation:y},d()}})}));for(let v=0;vpt(e))):pt(t)}const x9=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(E8(n)){const i=ne(n.suffix),s=We(["bytes","bytes"],[n.signature,i]);e.set(r,{signature:s,isDynamic:i.length!==1||i[0]!==2})}}return e};class i1 extends Nl{constructor(e){if(er.eq(e.chainId)&&!e.coders.signature.supportsNoChainId)throw new Error(`Sequence version ${e.config.version} doesn't support chainId 0`);super(),this.context=e.context,this.config=e.config,this.orchestrator=e.orchestrator,this.coders=e.coders,this.address=e.address,this.chainId=e.chainId,this.provider=e.provider,this.relayer=e.relayer,this._reader=e.reader}static newWallet(e){const r=he.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new i1($a({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new he.reader.OnChainReader(this.provider)}setConfig(e){this.config=e}setOrchestrator(e){this.orchestrator=e}setAddress(e){this.address=e}getSigners(){return this.orchestrator.getSigners()}async getAddress(){return this.address}async decorateTransactions(e){const r=await this.orchestrator.decorateTransactions(e);if(await this.reader().isDeployed(this.address))return r;const n=[{to:r.entrypoint,data:he.transaction.encodeBundleExecData(r),revertOnError:!0}],i=await this.buildDeployTransaction();return i&&n.unshift(...i.transactions),{entrypoint:this.context.guestModule,chainId:this.chainId,intent:r.intent,transactions:n}}async buildDeployTransaction(e){if(e!=null&&e.ignoreDeployed&&await this.reader().isDeployed(this.address))return;const r=this.coders.config.imageHashOf(this.config);if(he.context.addressOf(this.context,r)!==this.address)throw new Error(`First address of config ${r} doesn't match wallet address ${this.address}`);const n=i1.buildDeployTransaction(this.context,r);if(e!=null&&e.includeChildren){const i=await this.orchestrator.buildDeployTransaction(e);i&&(n.transactions=i.transactions.concat(n.transactions))}return n}async deploy(e){const r=await this.buildDeployTransaction(e);if(r!==void 0){if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay($a({},r,{chainId:this.chainId,intent:{id:te(A1(32)),wallet:this.address}}))}}static buildDeployTransaction(e,r){const n=new Fr(tn.factory.abi);return{entrypoint:e.guestModule,transactions:[{to:e.factory,data:n.encodeFunctionData(n.getFunction("deploy"),[e.mainModule,r]),gasLimit:1e5,delegateCall:!1,revertOnError:!0,value:0}]}}async buildUpdateConfigurationTransaction(e){if(this.coders.config.update.isKindUsed){const r=await this.reader().implementation(this.address),n=r&&r===this.context.mainModuleUpgradable;return this.coders.config.update.buildTransaction(this.address,e,this.context,n?"later":"first")}return this.coders.config.update.buildTransaction(this.address,e,this.context)}async getNonce(e=0){const r=await this.reader().nonce(this.address,e);if(r===void 0)throw new Error("Unable to determine nonce");return r}async signDigest(e,r){const n=jC(this.address,this.chainId,e);if(this.coders.config.hasSubdigest(this.config,n))return this.coders.signature.encodeSigners(this.config,new Map,[n],this.chainId).encoded;const i=$a({},r,{digest:e,chainId:this.chainId,address:this.address,config:this.config}),s=ne(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(c=>c.address),message:s,metadata:i,callback:(c,l)=>{const u=x9(c),f=$a({},i,{parts:u});return l(f),this.coders.signature.hasEnoughSigningPower(this.config,u)}}),a=x9(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Fe(e),{message:e})}signTransactionBundle(e){if(e.entrypoint!==this.address)throw new Error(`Invalid entrypoint: ${e.entrypoint} !== ${this.address}`);return this.signTransactions(e.transactions,e.nonce)}async fetchNonceOrSpace(e){let r;if(e&&e.space)r=J.from(e.space);else if(e===void 0)r=0;else return e;const n=await this.reader().nonce(this.address,r);if(n===void 0)throw new Error("Unable to determine nonce");return he.transaction.encodeNonce(r,n)}async signTransactions(e,r,n){const i=await E9(e),s=he.transaction.fromTransactionish(this.address,i);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const o=await this.fetchNonceOrSpace(r),a=he.transaction.digestOfTransactions(o,s),c=$a({digest:a,transactions:s},n),l=await this.signDigest(a,c);return{intent:{id:jC(this.address,this.chainId,a),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:o,signature:l}}async sendSignedTransaction(e,r){if(!this.relayer)throw new Error("Wallet sendTransaction requires a relayer");return this.relayer.relay(e,r)}async sendTransaction(e,r,n){const i=await this.signTransactions(e,r),s=await this.decorateTransactions(i);return this.sendSignedTransaction(s,n)}async fillGasLimits(e){const r=await E9(e),n=he.transaction.fromTransactionish(this.address,r),i=this.relayer;if(!i)throw new Error("Wallet fillGasLimits requires a relayer");const s=await i.simulate(this.address,...n);return n.map((o,a)=>{const c=o.gasLimit?J.from(o.gasLimit).toNumber():s[a].gasLimit;return $a({},o,s[a],{gasLimit:c})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Ma(){return Ma=Object.assign?Object.assign.bind():function(t){for(var e=1;ehve(t[e])):!1}function vve(t){if(!t)return[];const e=J.from(t.value);switch(t.token.type){case qf.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case qf.FeeTokenType.ERC20_TOKEN:if(!t.token.contractAddress)throw new Error("No contract address for ERC-20 fee option");return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.token.contractAddress,value:0,data:new Fr([{constant:!1,inputs:[{type:"address"},{type:"uint256"}],name:"transfer",outputs:[],type:"function"}]).encodeFunctionData("transfer",[t.to,e.toHexString()])}];default:throw new Error(`Unhandled fee token type ${t.token.type}`)}}class mve{constructor(e,r,n){this._isSigner=!0,this.account=e,this.chainId=r,this.options=n}get provider(){return this.account.providerFor(this.chainId)}async getAddress(){return this.account.address}signMessage(e){var r,n;return this.account.signMessage(e,this.chainId,(r=(n=this.options)==null?void 0:n.cantValidateBehavior)!=null?r:"throw")}async defaultSelectFee(e,r){if(r.length===0)return;const n=[{constant:!0,inputs:[{type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],type:"function"}];for(const i of r)if(i.token.type===qf.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(J.from(i.value)))return i}else if(i.token.contractAddress&&i.token.type===qf.FeeTokenType.ERC20_TOKEN&&(await new sd(i.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(J.from(i.value)))return i;throw new Error("No fee option available - not enough balance")}async sendTransaction(e,r){var n,i,s,o,a;const c=pve(e)?await pt(e):e,l=await this.account.prepareTransactions({txs:c,chainId:this.chainId,stubSignatureOverrides:(n=(i=this.options)==null?void 0:i.stubSignatureOverrides)!=null?n:new Map,simulateForFeeOptions:r==null?void 0:r.simulateForFeeOptions}),f=await((s=(o=this.options)==null?void 0:o.selectFee)!=null?s:this.defaultSelectFee.bind(this))(c,l.feeOptions),d=[...l.transactions,...vve(f)];return this.account.sendTransaction(d,this.chainId,l.feeQuote,void 0,void 0,(a=this.options)!=null&&a.nonceSpace?{nonceSpace:this.options.nonceSpace}:void 0)}getBalance(e){return this.provider.getBalance(this.account.address,e)}call(e,r){return this.provider.call(e,r)}async resolveName(e){const r=await this.provider.resolveName(e);if(!r)throw new Error(`Could not resolve name ${e}`);return r}connect(e){throw new Error("Method not implemented.")}signTransaction(e){throw new Error("Method not implemented.")}getTransactionCount(e){throw new Error("Method not implemented.")}estimateGas(e){throw new Error("Method not implemented.")}getChainId(){return Promise.resolve(J.from(this.chainId).toNumber())}getGasPrice(){throw new Error("Method not implemented.")}getFeeData(){throw new Error("Method not implemented.")}checkTransaction(e){throw new Error("Method not implemented.")}populateTransaction(e){throw new Error("Method not implemented.")}_checkProvider(e){throw new Error("Method not implemented.")}}class yve{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return er}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class Mo{constructor(e){this.address=qe(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.jwt=e.jwt,this.migrations=e.migrations||JC.DefaultMigrations,this.migrator=new YC.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new mve(this,e,r)}static async new(e){var r;const i=new YC.Migrator(e.tracker,(r=e.migrations)!=null?r:JC.DefaultMigrations,e.contexts).lastMigration(),s=i.configCoder,o=s.fromSimple(e.config),a=s.imageHashOf(o),c=e.contexts[i.version],l=he.context.addressOf(c,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new Mo({address:l,tracker:e.tracker,contexts:e.contexts,networks:e.networks,orchestrator:e.orchestrator,migrations:e.migrations})}getAddress(){return Promise.resolve(this.address)}get version(){return this.migrator.lastMigration().version}get coders(){const e=this.migrator.lastMigration();return{signature:e.signatureCoder,config:e.configCoder}}network(e){const r=J.from(e),n=this.networks.find(i=>r.eq(i.chainId));if(!n)throw new Error(`Network not found for chainId ${e}`);return n}providerFor(e){const r=this.network(e);if(!r.provider&&!r.rpcUrl)throw new Error(`Provider not found for chainId ${e}`);return r.provider||new Bm(r1(r.rpcUrl,void 0,this.jwt),{name:"",chainId:J.from(e).toNumber()})}reader(e){return er.eq(e)?new yve:new he.reader.OnChainReader(this.providerFor(e))}relayer(e){const r=this.network(e);if(!r.relayer)throw new Error(`Relayer not found for chainId ${e}`);return fj(r.relayer)?r.relayer:new uj(Ma({},r.relayer,{jwtAuth:this.jwt}))}setOrchestrator(e){this.orchestrator=e}setJwt(e){this.jwt=e}contextFor(e){const r=this.contexts[e];if(!r)throw new Error(`Context not found for version ${e}`);return r}walletForStatus(e,r){const n=$n.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,i){const s=er.eq(e);return new i1({config:n,context:r,chainId:e,coders:i,relayer:s?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const i=this.reader(e).isDeployed(this.address),s=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(P=>{if(!P)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return P}),o=s.then(P=>ij.counterfactualVersion(this.address,P.imageHash,Object.values(this.contexts))),a=async function(){if(!await i)return o;const T=await n.reader(e).implementation(n.address);if(!T)throw new Error(`Implementation not found for wallet ${n.address}`);const w=Object.values(n.contexts);for(let I=0;I0?v[v.length-1].nextImageHash:d,y=await this.tracker.configOfImageHash({imageHash:b});if(!y)throw new Error(`Config not found for imageHash ${b}`);const m=await i,g=await s,S=$n.coderFor(h).config.checkpointOf(y);return{original:Ma({},g,{version:await o}),onChain:{imageHash:f,config:await l,version:u,deployed:m},fullyMigrated:h===this.version,signedMigrations:p,version:h,presignedConfigurations:v,imageHash:b,config:y,checkpoint:S,canOnchainValidate:u===this.version&&m}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateSignedTransactions(e,r){const n=await this.orchestrator.predecorateSignedTransactions({chainId:r}),i=await this.predecorateTransactions([],e,r);return he.transaction.fromTransactionish(this.address,i).length>0&&n.push(await this.signTransactions(i,r)),n}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const s=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],s.transactions].flat()}return e}async decorateTransactions(e,r,n){var i;if(!Array.isArray(e))return this.decorateTransactions([e],r,n);n=(i=n)!=null?i:e[0].chainId;const s=await this.buildBootstrapTransactions(r,n),o=s.transactions.length>0;if(!o&&e.length===1)return e[0];const{entrypoint:a}=o?s:e[0],c={entrypoint:a,chainId:n,intent:e[0].intent,transactions:[...s.transactions,...e.map(l=>({to:l.entrypoint,data:he.transaction.encodeBundleExecData(l),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}))]};return r.onChain.deployed||(c.intent.id=he.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,n,c.transactions)),c}async decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return e;const n=this.coders.signature,i=r.presignedConfigurations.map(o=>o.signature),s=n.chainSignatures(e,i);return n.trim(s)}async publishWitness(){const e=Fe(bt(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),i=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:i})}async signDigest(e,r,n=!0,i="ignore",s){const o=er.eq(r)?this.networks[0].chainId:r,a=await this.status(o);if(this.mustBeFullyMigrated(a),!a.canOnchainValidate&&i==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,a).signDigest(e,s),u=n?this.decorateSignature(l,a):l;if(!a.canOnchainValidate)switch(i){case"ignore":return u;case"eip6492":return this.buildEIP6492Signature(await u,a,r)}return u}async buildEIP6492Signature(e,r,n){const i=await this.buildBootstrapTransactions(r,n);if(i.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const s=Fn.encode(["address","bytes","bytes"],[i.entrypoint,he.transaction.encodeBundleExecData(i),e]);return We(["bytes","bytes32"],[s,he.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(i=>i.config),n=this.coders.config.editConfig(r,Ma({},e,{checkpoint:this.coders.config.checkpointOf(r).add(1)}));return this.updateConfig(n)}async updateConfig(e){if(!this.coders.config.isWalletConfig(e))throw new Error(`Invalid config for wallet ${this.address}`);const r=this.coders.config.imageHashOf(e),n=this.coders.signature.hashSetImageHash(r),i=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:i});const s=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!s||this.coders.config.imageHashOf(s)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}async buildBootstrapTransactions(e,r){var n;const i=await this.orchestrator.buildDeployTransaction({chainId:r}),s=(n=i==null?void 0:i.transactions)!=null?n:[];if(!e.onChain.deployed){const c=i1.buildDeployTransaction(e.original.context,e.original.imageHash);s.push(...c.transactions)}s.length,s.push(...e.signedMigrations.map(c=>({to:c.tx.entrypoint,data:he.transaction.encodeBundleExecData(c.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const o=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:he.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,s),{guestModule:a}=this.contextFor(e.version);return{entrypoint:a,transactions:s,chainId:r,intent:{id:o,wallet:this.address}}}async bootstrapTransactions(e,r){const n=r||await this.status(e);return this.buildBootstrapTransactions(n,e)}async doBootstrap(e,r,n){const i=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Ma({},i,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Fe(e),r,!0,n)}async signTransactions(e,r,n,i){const s=n||await this.status(r);this.mustBeFullyMigrated(s);const o=this.walletForStatus(r,s),a={address:this.address,digest:"",chainId:r,config:{version:this.version},decorate:!0,cantValidateBehavior:"ignore"},c=await o.signTransactions(e,(i==null?void 0:i.nonceSpace)&&{space:i==null?void 0:i.nonceSpace},a);return Ma({},c,{signature:await this.decorateSignature(c.signature,s)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const i=this.walletForStatus(e,n),s=r(i.config),o=await this.migrator.signNextMigration(this.address,n.version,i,s);if(!o)return!1;await this.tracker.saveWalletConfig({config:s});const a=$n.coderFor(s.version).config,c=a.imageHashOf(s),l=await this.tracker.configOfImageHash({imageHash:c,noCache:!0});if(!l||a.imageHashOf(l)!==c)throw Error(`Reverse lookup failed for imageHash ${c}`);return await this.tracker.saveMigration(this.address,o,this.contexts),!0}async signAllMigrations(e){var r=this;const n=[];return{signedMigrations:(await Promise.all(this.networks.map(async function(o){try{return await r.signMigrations(o.chainId,e)}catch(a){return console.warn(`Failed to sign migrations for chain ${o.chainId}`,a),n.push(o.chainId),null}}))).filter(o=>o!==null),failedChains:n}}async isMigratedAllChains(){var e=this;const r=[];return{migratedAllChains:(await Promise.all(this.networks.map(async function(s){try{return await e.status(s.chainId)}catch(o){return r.push(s.chainId),console.warn(`Failed to get status for chain ${s.chainId}`,o),{fullyMigrated:!0}}}))).every(s=>s.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,i,s){if(!Array.isArray(e))return this.sendSignedTransactions([e],r,n,i,s);const o=i||await this.status(e[0].chainId);this.mustBeFullyMigrated(o);const a=await this.decorateTransactions(e,o);return s==null||s(a),this.relayer(r).relay(a,n)}async fillGasLimits(e,r,n){return this.walletForStatus(r,n||await this.status(r)).fillGasLimits(e)}async gasRefundQuotes(e,r,n,i,s){const o=i||await this.status(r),a=this.walletForStatus(r,o),c=await this.predecorateTransactions(e,o,r),l=he.transaction.fromTransactionish(this.address,c),u=a.coders.config.buildStubSignature(a.config,n),f=te(A1(32)),d={chainId:r,intent:{id:f,wallet:this.address},signature:u,transactions:l,entrypoint:this.address,nonce:0},h=await this.decorateTransactions(d,o),p=he.transaction.encodeBundleExecData(h),v=await this.relayer(r).getFeeOptionsRaw(h.entrypoint,p,s);return Ma({},v,{decorated:h})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),i=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r,{simulate:e.simulateForFeeOptions}),s=he.transaction.unwind(this.address,i.decorated.transactions);return{transactions:n,flatDecorated:s,feeOptions:i.options,feeQuote:i.quote}}async sendTransaction(e,r,n,i=!1,s,o){const a=await this.status(r),c=i?e:await this.predecorateTransactions(e,a,r),u=he.transaction.fromTransactionish(this.address,c).length>0?await this.signTransactions(c,r,void 0,o):void 0,f=await this.orchestrator.predecorateSignedTransactions({chainId:r}),d=[];if(u!==void 0&&u.transactions.length>0&&d.push(u),d.push(...f.filter(h=>h.transactions.length>0)),d.length!==0)return this.sendSignedTransactions(d,r,n,void 0,s)}async signTypedData(e,r,n,i,s="ignore"){const o=H1({domain:e,types:r,message:n});return this.signDigest(o,i,!0,s)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const i=n.chainId,s=await e.status(i,!0),o=[s.onChain.imageHash,...s.onChain.version!==s.version?s.signedMigrations.map(a=>$n.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...s.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,c){const l=c===o.length-1,u=await e.tracker.configOfImageHash({imageHash:a});if(!u){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}$n.genericCoderFor(u.version).config.signersOf(u).forEach(h=>{const p=r.find(v=>v.address===h.address&&v.network===i);if(p&&l&&p.flaggedForRemoval){p.flaggedForRemoval=!1;return}p||r.push({address:h.address,weight:h.weight,network:i,flaggedForRemoval:!l})})}))})),r}}function gve(t){return t instanceof Mo}const bve=Object.freeze(Object.defineProperty({__proto__:null,Account:Mo,isAccount:gve},Symbol.toStringTag,{value:"Module"}));function xy(){return xy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Br({},n)).then(i=>jr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Br({},n)).then(i=>jr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Br({},n)).then(i=>jr(i).then(s=>({status:s.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Br({},n)).then(i=>jr(i).then(s=>({chainID:s.chainID}))),this.getEtherBalance=(n,i)=>this.fetch(this.url("GetEtherBalance"),Br(n,i)).then(s=>jr(s).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,i)=>this.fetch(this.url("GetTokenBalances"),Br(n,i)).then(s=>jr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,i)=>this.fetch(this.url("GetTokenSupplies"),Br(n,i)).then(s=>jr(s).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,i)=>this.fetch(this.url("GetTokenSuppliesMap"),Br(n,i)).then(s=>jr(s).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,i)=>this.fetch(this.url("GetBalanceUpdates"),Br(n,i)).then(s=>jr(s).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,i)=>this.fetch(this.url("GetTransactionHistory"),Br(n,i)).then(s=>jr(s).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,i)=>this.fetch(this.url("SyncBalance"),Br(n,i)).then(s=>jr(s).then(o=>({}))),this.fetchTransactionReceipt=(n,i)=>this.fetch(this.url("FetchTransactionReceipt"),Br(n,i)).then(s=>jr(s).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,i)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),Br(n,i)).then(s=>jr(s).then(o=>({receipt:o.receipt}))),this.getAllWebhookListeners=(n,i)=>this.fetch(this.url("GetAllWebhookListeners"),Br(n,i)).then(s=>jr(s).then(o=>({listeners:o.listeners}))),this.getWebhookListener=(n,i)=>this.fetch(this.url("GetWebhookListener"),Br(n,i)).then(s=>jr(s).then(o=>({listener:o.listener}))),this.addWebhookListener=(n,i)=>this.fetch(this.url("AddWebhookListener"),Br(n,i)).then(s=>jr(s).then(o=>({status:o.status,listener:o.listener}))),this.updateWebhookListener=(n,i)=>this.fetch(this.url("UpdateWebhookListener"),Br(n,i)).then(s=>jr(s).then(o=>({status:o.status}))),this.removeWebhookListener=(n,i)=>this.fetch(this.url("RemoveWebhookListener"),Br(n,i)).then(s=>jr(s).then(o=>({status:o.status}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Br=(t={},e={})=>({method:"POST",headers:xy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),jr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),C9=typeof global=="object"?global.fetch:window.fetch;class C8 extends yj{constructor(e,r,n){super(e.endsWith("/")?e.slice(0,-1):e,C9),this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=xy({},s.headers,o),C9(i,s)},this.projectAccessKey=r,this.jwtAuth=n,this.fetch=this._fetch}}const Pve=Object.freeze(Object.defineProperty({__proto__:null,ContractType:x8,EventLogDataType:Sve,EventLogType:Cve,Indexer:yj,SequenceIndexer:C8,SortOrder:_ve,TransactionStatus:kve,TransactionType:Ave,TxnTransferType:os,WebRPCSchemaHash:xve,WebRPCSchemaVersion:Eve,WebRPCVersion:wve},Symbol.toStringTag,{value:"Module"}));function Cy(){return Cy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),Ur({},n)).then(i=>zr(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),Ur({},n)).then(i=>zr(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Ur({},n)).then(i=>zr(i).then(s=>({status:s.status}))),this.getTokenMetadata=(n,i)=>this.fetch(this.url("GetTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,i)=>this.fetch(this.url("RefreshTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,i)=>this.fetch(this.url("GetTokenMetadataBatch"),Ur(n,i)).then(s=>zr(s).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,i)=>this.fetch(this.url("SearchTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,i)=>this.fetch(this.url("SearchTokenIDs"),Ur(n,i)).then(s=>zr(s).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,i)=>this.fetch(this.url("TokenCollectionFilters"),Ur(n,i)).then(s=>zr(s).then(o=>({filters:o.filters}))),this.getContractInfo=(n,i)=>this.fetch(this.url("GetContractInfo"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,i)=>this.fetch(this.url("GetContractInfoBatch"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,i)=>this.fetch(this.url("SearchContractInfo"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,i)=>this.fetch(this.url("SearchContractInfoBatch"),Ur(n,i)).then(s=>zr(s).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,i)=>this.fetch(this.url("SearchMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.projectSetTokenMetadata=(n,i)=>this.fetch(this.url("ProjectSetTokenMetadata"),Ur(n,i)).then(s=>zr(s).then(o=>({ok:o.ok}))),this.getNiftyswapTokenQuantity=(n,i)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),Ur(n,i)).then(s=>zr(s).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPrices"),Ur(n,i)).then(s=>zr(s).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,i)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),Ur(n,i)).then(s=>zr(s).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const Ur=(t={},e={})=>({method:"POST",headers:Cy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),zr=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),S9=typeof global=="object"?global.fetch:window.fetch;class S8 extends gj{constructor(e="https://metadata.sequence.app",r,n){super(e.endsWith("/")?e.slice(0,-1):e,S9),this._fetch=(i,s)=>{const o={},a=this.jwtAuth,c=this.projectAccessKey;return a&&a.length>0&&(o.Authorization=`BEARER ${a}`),c&&c.length>0&&(o["X-Access-Key"]=c),s.headers=Cy({},s.headers,o),S9(i,s)},this.projectAccessKey=r,this.jwtAuth=n,this.fetch=this._fetch}}const Dve=Object.freeze(Object.defineProperty({__proto__:null,ContractType:Rve,Metadata:gj,PropertyType:$ve,SequenceMetadataClient:S8,SortOrder:Nve,SwapType:Mve,WebRPCSchemaHash:Ove,WebRPCSchemaVersion:Ive,WebRPCVersion:Tve},Symbol.toStringTag,{value:"Module"}));function Lve(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function Fve(t){return t.startsWith("ipfs://")}class Bve{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const i=`${e}-${r}-${n}`,s=Date.now();if(this.pending.has(i)&&s-this.pending.get(i).timestamp10)throw new Error("EIP5719 - Too many tries");if(he.signer.canRecover(n)){const c=he.signer.recoverSigner(r,n);if(c&&c.toLowerCase()===t.toLowerCase())return n}try{if(await he.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await Uve(jve(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=te(await(i||new zve).resolve(o));if(!a||a==="")throw new Error("EIP5719 - Empty alternative signature");if(a===te(n))throw new Error("EIP5719 - Alternative signature is invalid or the same");return bj(t,e,r,a,i,s+1)}class zve{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>Fve(n)?Lve(n,this.gateway):n,this.resolve=async function(n){const i=r.uri(n),s=await fetch(i);if(!s.ok)throw new Error(`URISolverIPFS - Failed to fetch ${i}`);return await s.text()},this.gateway=e}}const Wve=(t,e)=>e.some(r=>t instanceof r);let k9,A9;function Hve(){return k9||(k9=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function qve(){return A9||(A9=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const wj=new WeakMap,ZC=new WeakMap,Ej=new WeakMap,W2=new WeakMap,k8=new WeakMap;function Vve(t){const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{r(sc(t.result)),i()},o=()=>{n(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&wj.set(r,t)}).catch(()=>{}),k8.set(e,t),e}function Gve(t){if(ZC.has(t))return;const e=new Promise((r,n)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{r(),i()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});ZC.set(t,e)}let e5={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return ZC.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Ej.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return sc(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function Kve(t){e5=t(e5)}function Qve(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(H2(this),e,...r);return Ej.set(n,e.sort?e.sort():[e]),sc(n)}:qve().includes(t)?function(...e){return t.apply(H2(this),e),sc(wj.get(this))}:function(...e){return sc(t.apply(H2(this),e))}}function Yve(t){return typeof t=="function"?Qve(t):(t instanceof IDBTransaction&&Gve(t),Wve(t,Hve())?new Proxy(t,e5):t)}function sc(t){if(t instanceof IDBRequest)return Vve(t);if(W2.has(t))return W2.get(t);const e=Yve(t);return e!==t&&(W2.set(t,e),k8.set(e,t)),e}const H2=t=>k8.get(t);function Jve(t,e,{blocked:r,upgrade:n,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=sc(o);return n&&o.addEventListener("upgradeneeded",c=>{n(sc(o.result),c.oldVersion,c.newVersion,sc(o.transaction),c)}),r&&o.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),a.then(c=>{s&&c.addEventListener("close",()=>s()),i&&c.addEventListener("versionchange",l=>i(l.oldVersion,l.newVersion,l))}).catch(()=>{}),a}const Xve=["get","getKey","getAll","getAllKeys","count"],Zve=["put","add","delete","clear"],q2=new Map;function _9(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(q2.get(e))return q2.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,i=Zve.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Xve.includes(r)))return;const s=async function(o,...a){const c=this.transaction(o,i?"readwrite":"readonly");let l=c.store;return n&&(l=l.index(a.shift())),(await Promise.all([l[r](...a),i&&c.done]))[0]};return q2.set(e,s),s}Kve(t=>({...t,get:(e,r,n)=>_9(e,r)||t.get(e,r,n),has:(e,r)=>!!_9(e,r)||t.has(e,r)}));class eme{}var tme=Object.freeze({__proto__:null,ConfigTracker:eme});class rme{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),An(e,"? "),An(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),An(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),An(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),An(e,"? "),An(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),An(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),An(e,"? "),An(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),An(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),An(e,"? "),An(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,i){return console.debug("? getMigration"),An({address:e,fromImageHash:r,fromVersion:n,chainId:i},"? "),An(await this.tracker.getMigration(e,r,n,i),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),An({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function An(t,e=""){switch(t){case void 0:console.debug(e+"undefined");break;default:JSON.stringify(t,void 0,2).split(` +`).map(r=>e+r).forEach(r=>console.debug(r));break}return t}var nme=Object.freeze({__proto__:null,DebugConfigTracker:rme});function wc(){return wc=Object.assign?Object.assign.bind():function(t){for(var e=1;ePromise.resolve(this.configs[e]),this.saveConfig=(e,r)=>(this.configs[e]=r,Promise.resolve()),this.loadV2Node=e=>Promise.resolve(this.v2Nodes[e]),this.saveV2Node=(e,r)=>(this.v2Nodes[e]=r,Promise.resolve()),this.loadCounterfactualWallet=e=>Promise.resolve(this.counterfactualWallets[e]),this.saveCounterfactualWallet=(e,r,n)=>(this.counterfactualWallets[e]={imageHash:r,context:n},Promise.resolve()),this.loadPayloadOfSubdigest=e=>Promise.resolve(this.payloads[e]),this.savePayloadOfSubdigest=(e,r)=>(this.payloads[e]=r,Promise.resolve()),this.loadSubdigestsOfSigner=e=>Promise.resolve(Object.keys(this.signatures[e]||{})),this.loadSignatureOfSubdigest=(e,r)=>{var n;return Promise.resolve((n=this.signatures[e])==null?void 0:n[r])},this.saveSignatureOfSubdigest=(e,r,n)=>(this.signatures[e]||(this.signatures[e]={}),this.signatures[e][r]=n,Promise.resolve()),this.loadMigrationsSubdigest=(e,r,n)=>{var i,s;return Promise.resolve(((i=this.migrations[e])==null||(s=i[r])==null?void 0:s[n])||[])},this.saveMigrationsSubdigest=(e,r,n,i,s)=>(this.migrations[e]||(this.migrations[e]={}),this.migrations[e][r]||(this.migrations[e][r]={}),this.migrations[e][r][n]||(this.migrations[e][r][n]=[]),this.migrations[e][r][n].push({subdigest:i,toImageHash:s}),Promise.resolve())}}function bf(t){if(t===void 0)return;const e={};for(const r of Object.keys(t)){const n=t[r];n._isBigNumber===!0&&n._hex!==void 0&&typeof n._hex=="string"&&n._hex.length!==""?e[r]=J.from(n):Array.isArray(n)?e[r]=n.map(i=>bf(i)):typeof n=="object"&&n!==null?e[r]=bf(n):e[r]=n}return e}class ime{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(s=>bf(s))},this.saveConfig=async function(n,i){await(await r.getDb()).put("configs",i,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(s=>bf(s))},this.saveV2Node=async function(n,i){await(await r.getDb()).put("v2Nodes",i,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,i,s){await(await r.getDb()).put("counterfactualWallets",{imageHash:i,context:s},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(s=>bf(s))},this.savePayloadOfSubdigest=async function(n,i){await(await r.getDb()).put("payloads",i,n)},this.loadSubdigestsOfSigner=async function(n){return(await(await r.getDb()).getAllKeysFromIndex("signatures","signer",IDBKeyRange.only(n))).map(o=>o.split("-")[0])},this.loadSignatureOfSubdigest=async function(n,i){const o=await(await r.getDb()).get("signatures",[i,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,i,s){await(await r.getDb()).put("signatures",{signature:s,signer:n},[i,n].join("-"))},this.loadMigrationsSubdigest=async function(n,i,s){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,i,s]))).map(c=>({subdigest:c.subdigest,toImageHash:c.toImageHash}))},this.saveMigrationsSubdigest=async function(n,i,s,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:i,toVersion:s,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await Jve(e,1,{upgrade(r,n,i,s){console.log(`upgrading ${e} from ${n} to ${i} - ${s}`),n===0&&(r.createObjectStore("configs"),r.createObjectStore("v2Nodes"),r.createObjectStore("counterfactualWallets"),r.createObjectStore("payloads"),r.createObjectStore("signatures").createIndex("signer","signer",{unique:!1}),r.createObjectStore("migrations").createIndex("jump",["wallet","fromVersion","toVersion"]))}}),this._lazyDb}}function Cj(t){return t.left!==void 0&&t.right!==void 0}function Sj(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function t5(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var sme=Object.freeze({__proto__:null,isPlainNode:Cj,isPlainNested:Sj,isPlainV2Config:t5,MemoryTrackerStore:xj,recreateBigNumbers:bf,IndexedDBStore:ime});class A8{constructor(e,r=new xj,n=!1){var i=this;this.loadTopology=async function(s){const o=await i.store.loadV2Node(s);if(!o)return{nodeHash:s};if(Cj(o)){const[a,c]=await Promise.all([i.loadTopology(o.left),i.loadTopology(o.right)]);return{left:a,right:c}}return Sj(o)?{weight:J.from(o.weight),threshold:J.from(o.threshold),tree:await i.loadTopology(o.tree)}:o},this.saveTopology=async function(s){if(Ve.config.isNodeLeaf(s))return;const o=Ve.config.hashNode(s);if(Ve.config.isNode(s)){const a=i.saveTopology(s.left),c=i.saveTopology(s.right),l=i.store.saveV2Node(o,{left:Ve.config.hashNode(s.left),right:Ve.config.hashNode(s.right)});await Promise.all([a,c,l]);return}if(Ve.config.isNestedLeaf(s)){const a=i.saveTopology(s.tree),c=i.store.saveV2Node(o,{weight:J.from(s.weight).toString(),threshold:J.from(s.threshold).toString(),tree:Ve.config.hashNode(s.tree)});await Promise.all([a,c]);return}if(Ve.config.isSignerLeaf(s))return i.store.saveV2Node(o,{address:s.address,weight:s.weight});if(Ve.config.isSubdigestLeaf(s))return i.store.saveV2Node(o,{subdigest:s.subdigest});throw new Error(`Unknown topology type: ${s}`)},this.saveWalletConfig=async function(s){const{config:o}=s;if(Io.config.ConfigCoder.isWalletConfig(o)){const a=Io.config.ConfigCoder.imageHashOf(o);return i.store.saveConfig(a,o)}if(Ve.config.ConfigCoder.isWalletConfig(o)){const a=Ve.config.ConfigCoder.imageHashOf(o);if(Ve.config.isComplete(o.tree))return i.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(s){const{imageHash:o}=s;if(i.configOfImageHashCache[s.imageHash])return i.configOfImageHashCache[s.imageHash];const a=await i.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!t5(a))return i.configOfImageHashCache[s.imageHash]=a,a;if(t5(a)){const c={version:2,threshold:J.from(a.threshold),checkpoint:J.from(a.checkpoint),tree:await i.loadTopology(a.tree)};return i.configOfImageHashCache[s.imageHash]=c,c}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(s){const{config:o,context:a}=s,c=$n.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([i.saveWalletConfig({config:o}),...a.map(l=>{const u=he.context.addressOf(l,c);return i.store.saveCounterfactualWallet(u,c,l)})])},this.imageHashOfCounterfactualWallet=async function(s){const{wallet:o}=s,a=await i.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(s){const{payload:o}=s,a=he.signature.subdigestOf(o);await i.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(s){if(i.payloadOfSubdigestCache[s.subdigest])return i.payloadOfSubdigestCache[s.subdigest];const{subdigest:o}=s,a=await i.store.loadPayloadOfSubdigest(o);return a&&(i.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(s){const o=Ve.signature.SignatureCoder.decode(s.signature),a=$n.genericCoderFor(s.nextConfig.version).config.imageHashOf(s.nextConfig),c=Ve.chained.messageSetImageHash(a),l=Fe(c),u={message:c,address:s.wallet,chainId:0,digest:l},f=i.savePayload({payload:u}),d=i.saveWalletConfig({config:s.nextConfig}),h=await Ve.signature.SignatureCoder.recover(o,u,i.provider),p=Ve.signature.signaturesOf(h.config.tree);await Promise.all([f,d,i.saveWalletConfig({config:h.config}),...p.map(v=>i.store.saveSignatureOfSubdigest(v.address,h.subdigest,v.signature))])},this.loadPresignedConfiguration=async function(s){const{wallet:o,fromImageHash:a,longestPath:c}=s,l=await i.configOfImageHash({imageHash:a});if(!l||!Ve.config.ConfigCoder.isWalletConfig(l))return[];const u=Ve.config.signersOf(l.tree).map(g=>g.address),f=await Promise.all(u.map(g=>i.store.loadSubdigestsOfSigner(g))),d=[...new Set(f.flat())],p=(await Promise.all([...new Set(d)].map(async function(g){return wc({},await i.payloadOfSubdigest({subdigest:g}),{subdigest:g})}))).filter(g=>(g==null?void 0:g.message)&&(g==null?void 0:g.address)&&g.address===o).map(g=>({payload:g,nextImageHash:Ve.chained.decodeMessageSetImageHash(g.message)})).filter(g=>g==null?void 0:g.nextImageHash);let v;const y=(await Promise.all(p.map(async function({nextImageHash:g,payload:S}){const P=await i.configOfImageHash({imageHash:g});if(!P||!Ve.config.isWalletConfig(P))return;const T=J.from(P.checkpoint);return{nextConfig:P,nextCheckpoint:T,nextImageHash:g,payload:S}}))).filter(g=>g!==void 0).filter(g=>g.nextCheckpoint.gt(l.checkpoint)).sort((g,S)=>g.nextCheckpoint.gt(S.nextCheckpoint)?c?1:-1:c?-1:1);for(const g of y){const{nextConfig:S,nextCheckpoint:P,nextImageHash:T,payload:w}=g;if(v){const j=v.checkpoint;if(c){if(P.gte(j))continue}else if(P.lte(j))continue}const I=new Map((await Promise.all(u.map(async function(j){const H=await i.store.loadSignatureOfSubdigest(j,w.subdigest);if(!H)return[j,void 0];const G=te(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(j,w.subdigest,H):H),F=he.signer.tryRecoverSigner(w.subdigest,G)!==j;return[j,{isDynamic:F,signature:G}]}))).filter(j=>!!j[1]));if(I.size===0)continue;const B=Ve.signature.SignatureCoder.encodeSigners(l,I,[],0);B.weight.lt(l.threshold)||(v={nextImageHash:T,checkpoint:J.from(S.checkpoint),signature:B.encoded})}if(!v)return[];const m=await i.loadPresignedConfiguration({wallet:o,fromImageHash:v.nextImageHash,longestPath:c});return[{wallet:o,nextImageHash:v.nextImageHash,signature:v.signature},...m]},this.saveWitnesses=async function(s){const o={digest:s.digest,address:s.wallet,chainId:s.chainId},a=he.signature.subdigestOf(o);await Promise.all([i.savePayload({payload:o}),...s.signatures.filter(c=>he.signer.canRecover(c)).map(c=>{const l=he.signer.recoverSigner(a,c);return i.store.saveSignatureOfSubdigest(l,a,c)})])},this.walletsOfSigner=async function(s){const o=await i.store.loadSubdigestsOfSigner(s.signer),a=await Promise.all(o.map(l=>i.payloadOfSubdigest({subdigest:l}))).then(l=>l.filter(u=>u!==void 0)),c=[];for(const l of a){const u=l.address;if(c.find(h=>h.wallet===u))continue;const f=he.signature.subdigestOf(l),d=await i.store.loadSignatureOfSubdigest(s.signer,f);d&&c.push({wallet:u,proof:{digest:l.digest,chainId:J.from(l.chainId),signature:te(d)}})}return c},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new Bve(e)}async saveMigration(e,r,n){const i=r.fromVersion;if(i!==1)throw new Error("Migration not supported");if(!Ve.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:s,address:o}=oj.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Ve.config.ConfigCoder.imageHashOf(r.toConfig)!=s)throw new Error("Invalid migration transaction - config");const a=he.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),c=Fe(a),l={chainId:r.tx.chainId,message:a,address:e,digest:c},u=he.signature.subdigestOf(l),f=this.savePayload({payload:l}),d=this.saveWalletConfig({config:r.toConfig}),h=Io.signature.SignatureCoder.decode(r.tx.signature),p=await Io.signature.SignatureCoder.recover(h,l,this.provider),v=Io.signature.SignatureCoder.signaturesOf(p.config);await Promise.all([f,d,this.saveWalletConfig({config:p.config}),this.store.saveMigrationsSubdigest(e,i,i+1,u,s),...v.map(b=>this.store.saveSignatureOfSubdigest(b.address,p.subdigest,b.signature))])}async getMigration(e,r,n,i){var s=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),c=$n.coderFor(n);return!o||!c.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(u){const{subdigest:f,toImageHash:d}=u,h=await s.payloadOfSubdigest({subdigest:f});if(!h||!h.message||!J.from(i).eq(h.chainId))return;const p=c.config.signersOf(o).map(g=>g.address),v=new Map((await Promise.all(p.map(async function(g){const S=await s.store.loadSignatureOfSubdigest(g,f);if(!S)return[g,void 0];const P=te(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(g,f,S):S),T=he.signer.tryRecoverSigner(f,P)!==g;return[g,{isDynamic:T,signature:P}]}))).filter(g=>!!g[1])),b=c.signature.encodeSigners(o,v,[],i);if(!b||b.weightu.filter(f=>f!==void 0)))[0]}updateProvider(e){this.provider=e}}var ome=Object.freeze({__proto__:null,LocalConfigTracker:A8});let V2=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class ame{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),rs({},n)).then(i=>ns(i).then(s=>({}))),this.config=(n,i)=>this.fetch(this.url("Config"),rs(n,i)).then(s=>ns(s).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,i)=>this.fetch(this.url("Wallets"),rs(n,i)).then(s=>ns(s).then(o=>({wallets:o.wallets}))),this.deployHash=(n,i)=>this.fetch(this.url("DeployHash"),rs(n,i)).then(s=>ns(s).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,i)=>this.fetch(this.url("ConfigUpdates"),rs(n,i)).then(s=>ns(s).then(o=>({updates:o.updates}))),this.migrations=(n,i)=>this.fetch(this.url("Migrations"),rs(n,i)).then(s=>ns(s).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,i)=>this.fetch(this.url("SaveConfig"),rs(n,i)).then(s=>ns(s).then(o=>({}))),this.saveWallet=(n,i)=>this.fetch(this.url("SaveWallet"),rs(n,i)).then(s=>ns(s).then(o=>({}))),this.saveSignature=(n,i)=>this.fetch(this.url("SaveSignature"),rs(n,i)).then(s=>ns(s).then(o=>({}))),this.saveSignerSignatures=(n,i)=>this.fetch(this.url("SaveSignerSignatures"),rs(n,i)).then(s=>ns(s).then(o=>({}))),this.saveMigration=(n,i)=>this.fetch(this.url("SaveMigration"),rs(n,i)).then(s=>ns(s).then(o=>({}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const rs=(t={},e={})=>({method:"POST",headers:wc({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ns=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r});class cme{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new ame(e,fetch)}async loadPresignedConfiguration(e){try{const{updates:r}=await this.sessions.configUpdates({wallet:e.wallet,fromImageHash:e.fromImageHash,allUpdates:e.longestPath});return r.map(({toImageHash:n,signature:i})=>({wallet:e.wallet,nextImageHash:n,signature:i}))}catch(r){if(G2(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=$n.genericCoderFor(r.version).config.imageHashOf(r),i=Ve.signature.setImageHashStruct(n),s=Fe(i);await this.sessions.saveSignature({wallet:e.wallet,digest:s,chainID:"0",signature:e.signature,toConfig:Zp(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>he.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:Xu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return lme(r,n)}catch(r){if(G2(r))return;throw r}}async saveWalletConfig(e){const r=Zp(e.config);await this.sessions.saveConfig({version:e.config.version,config:r})}async imageHashOfCounterfactualWallet(e){try{const{deployHash:r,context:n}=await this.sessions.deployHash(e);return{imageHash:r,context:n}}catch(r){if(G2(r))return;throw r}}async saveCounterfactualWallet(e){const r=Zp(e.config);await this.sessions.saveWallet({version:e.config.version,deployConfig:r})}async walletsOfSigner(e){const{wallets:r}=await this.sessions.wallets(e);return Object.entries(r).map(([n,{digest:i,chainID:s,type:o,signature:a}])=>{switch(o){case V2.EIP712:a+=te(he.signer.SigType.EIP712).slice(2);break;case V2.EthSign:a+=te(he.signer.SigType.ETH_SIGN).slice(2);break;case V2.EIP1271:a+=te(he.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:i,signature:a,chainId:J.from(s)}}})}async getMigration(e,r,n,i){var s=this;const o=Xu(i),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),c=async function(f){const d=a[f];if(d){const h=Object.keys(d).map(Number).sort((p,v)=>v-p);for(const p of h)for(const[v,b]of Object.entries(d[p]))try{const y=await s.configOfImageHash({imageHash:v});if(y)return{fromVersion:n,toVersion:p,toConfig:y,tx:{entrypoint:b.executor,transactions:b.transactions,nonce:b.nonce,signature:b.signature,chainId:f,intent:{id:he.transaction.subdigestOfTransactions(e,f,b.nonce,b.transactions),wallet:e}}}}catch(y){console.error(y)}}},l=await c(o);if(l)return l;for(const u in a)if(u!==o){const f=await c(u);if(f)return f}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Zp(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(ume),nonce:Xu(r.tx.nonce),signature:r.tx.signature,chainID:Xu(r.tx.chainId)})}}function Zp(t){switch(t.version){case 1:if(Io.config.ConfigCoder.isWalletConfig(t))return{threshold:ml(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:ml(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Ve.config.ConfigCoder.isWalletConfig(t))return{threshold:ml(t.threshold),checkpoint:ml(t.checkpoint),tree:Wv(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Wv(t){return Ve.config.isNode(t)?{left:Wv(t.left),right:Wv(t.right)}:Ve.config.isSignerLeaf(t)?{weight:ml(t.weight),address:t.address}:Ve.config.isNestedLeaf(t)?{weight:ml(t.weight),threshold:ml(t.threshold),tree:Wv(t.tree)}:Ve.config.isNodeLeaf(t)?{node:t.nodeHash}:wc({},t)}function lme(t,e){switch(t){case 1:return wc({},e,{version:t});case 2:return wc({},e,{version:t,tree:Hv(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Hv(t){switch(typeof t){case"object":const e=wc({},t);return e.left!==void 0&&(e.left=Hv(e.left)),e.right!==void 0&&(e.right=Hv(e.right)),e.tree!==void 0&&(e.tree=Hv(e.tree)),e.node!==void 0&&(e.nodeHash=e.node,delete e.node),e;default:throw new Error(`v2 config tree ${t} is not an object`)}}function ume(t){return{to:t.to,value:t.value!==void 0?Xu(t.value):void 0,data:t.data!==void 0?te(t.data):void 0,gasLimit:t.gasLimit!==void 0?Xu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function ml(t){return J.from(t).toNumber()}function Xu(t){return J.from(t).toString()}function G2(t){return typeof t=="object"&&t.status===404}var fme=Object.freeze({__proto__:null,RemoteConfigTracker:cme});function r5(t,e,r){return new Promise(n=>{let i=0;t.forEach(s=>s.then(o=>{r(o)?n(o):(i++,i===t.length&&n(e))}).catch(()=>{i++,i===t.length&&n(e)}))})}async function ph(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class dme{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,c){return{res:await a.configOfImageHash(e),i:c}}),n=await r5(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:$n.genericCoderFor(a.res.version).config.isComplete(a.res));if(n!=null&&n.res)return this.saveWalletConfig({config:n.res,skipTracker:n.i}),n.res;const i=new A8(void 0),s=await ph(r,void 0);for(const a of s)a!=null&&a.res&&await i.saveWalletConfig({config:a.res});const o=await i.configOfImageHash(e);return o&&this.saveWalletConfig({config:o}),o}async saveWalletConfig(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveWalletConfig(e)}))}async imageHashOfCounterfactualWallet(e){const r=await r5(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>!!n);return r&&this.configOfImageHash({imageHash:r.imageHash}).then(n=>{n&&this.saveCounterfactualWallet({config:n,context:[r.context]})}),r}async saveCounterfactualWallet(e){await Promise.all(this.trackers.map((r,n)=>{if(n!==e.skipTracker)return r.saveCounterfactualWallet(e)}))}async walletsOfSigner(e){const r=await ph(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const i=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),s=new Map;return i.forEach(({wallet:o,proof:{digest:a,chainId:c,signature:l}})=>{const u=`${o}-${a}-${c}`;let f=s.get(u);f||(f={wallet:o,digest:a,chainId:c,signatures:[]},s.set(u,f)),f.signatures.push(l)}),s.forEach(o=>this.saveWitnesses(o)),i}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await ph(this.trackers.map(c=>c.loadPresignedConfiguration(e)),[]),s=(await ph(n.map(async function(c){const l=c[c.length-1],u=await r.configOfImageHash({imageHash:l.nextImageHash});if(u)return{checkpoint:$n.genericCoderFor(u.version).config.checkpointOf(u),result:c}}),void 0)).reduce((c,l)=>l&&(!c||l.checkpoint.gt(c.checkpoint))?l:c);if(!s)return[];const o=new Map,a=c=>(o.has(c)||o.set(c,this.configOfImageHash({imageHash:c})),o.get(c));return s.result.forEach(async function(c){const l=await a(c.nextImageHash);l&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:l,signature:c.signature})}),s.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,i){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,i)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(i=>i.saveMigration(e,r,n)))}}class hme{constructor(e,r,n){this.tracker=e,this.cache=r,this.contexts=n}async loadPresignedConfiguration(e){var r=this;const n=[this.tracker.loadPresignedConfiguration(e),this.cache.loadPresignedConfiguration(e)];let i;const[s,o]=await Promise.all(n);if(s.length>0&&o.length>0&&s[s.length-1].nextImageHash===o[o.length-1].nextImageHash)i=e.longestPath===!0?s.length>o.length?s:o:s.lengthf&&(!u||f.checkpoint.gt(u.checkpoint))?f:u))==null?void 0:c.result)!=null?a:[]}return i||[]}async savePresignedConfiguration(e){await Promise.all([this.tracker.savePresignedConfiguration(e),this.cache.savePresignedConfiguration(e)])}async configOfImageHash(e){if(e.noCache!==!0){const n=await this.cache.configOfImageHash(e);if(n)return n}const r=await this.tracker.configOfImageHash(e);return r&&await this.cache.saveWalletConfig({config:r}),r}async saveWalletConfig(e){await Promise.all([this.tracker.saveWalletConfig(e),this.cache.saveWalletConfig(e)])}async imageHashOfCounterfactualWallet(e){if(e.noCache!==!0){const n=await this.cache.imageHashOfCounterfactualWallet(e);if(n)return n}const r=await this.tracker.imageHashOfCounterfactualWallet(e);if(r){const n=await this.configOfImageHash({imageHash:r.imageHash});n&&await this.cache.saveCounterfactualWallet({config:n,context:[r.context]})}return r}async saveCounterfactualWallet(e){await Promise.all([this.tracker.saveCounterfactualWallet(e),this.cache.saveCounterfactualWallet(e)])}async walletsOfSigner(e){if(e.noCache)return this.tracker.walletsOfSigner(e);const r=await Promise.all([this.tracker.walletsOfSigner(e),this.cache.walletsOfSigner(e)]),n=new Map;for(const i of r)for(const s of i)n.set(s.wallet,s);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,i){const s=await this.cache.getMigration(e,r,n,i);if(s)return s;const o=await this.tracker.getMigration(e,r,n,i);return o&&await this.cache.saveMigration(e,o,this.contexts),o}async saveMigration(e,r,n){await Promise.all([this.tracker.saveMigration(e,r,n),this.cache.saveMigration(e,r,n)])}}class P9{constructor(){this.cache=new Map}do(e,r,n,...i){e=`${e}:${Fe(bt(JSON.stringify(i,pme)))}`;let s=this.cache.get(e);if(s&&s.expiration&&new Date>=s.expiration&&(s=void 0,this.cache.delete(e)),!s){const o={promise:n(...i)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),s=o,this.cache.set(e,s)}return s.promise}}function pme(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function vme(t){return t instanceof kj}class kj{constructor(e,r=50,n=!1){this.cache=new P9,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new P9}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,i){return this.cache.do("getMigration",this.window,(...s)=>this.tracker.getMigration(...s),e,r,n,i)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...i)=>this.tracker.saveMigration(...i),e,r,n)}loadPresignedConfiguration(e){return this.cache.do("loadPresignedConfiguration",this.window,r=>this.tracker.loadPresignedConfiguration(r),e)}savePresignedConfiguration(e){return this.cache.do("savePresignedConfiguration",void 0,r=>this.tracker.savePresignedConfiguration(r),e)}saveWitnesses(e){return this.cache.do("saveWitnesses",void 0,r=>this.tracker.saveWitnesses(r),e)}saveWalletConfig(e){return this.cache.do("saveWalletConfig",void 0,r=>this.tracker.saveWalletConfig(r),e)}imageHashOfCounterfactualWallet(e){return this.cache.do("imageHashOfCounterfactualWallet",void 0,r=>this.tracker.imageHashOfCounterfactualWallet(r),e)}saveCounterfactualWallet(e){return this.cache.do("saveCounterfactualWallet",void 0,r=>this.tracker.saveCounterfactualWallet(r),e)}walletsOfSigner(e){return this.cache.do("walletsOfSigner",this.window,r=>this.tracker.walletsOfSigner(r),e)}updateProvider(e){this.tracker instanceof A8&&this.tracker.updateProvider(e)}}var _8=Object.freeze({__proto__:null,debug:nme,local:ome,remote:fme,stores:sme,raceUntil:r5,allSafe:ph,MultipleTracker:dme,CachedTracker:hme,isDedupedTracker:vme,DedupedTracker:kj});const mme=Object.freeze(Object.defineProperty({__proto__:null,tracker:tme,trackers:_8},Symbol.toStringTag,{value:"Module"})),Aj=60*60*24*7,yme=60;class T9{constructor(e,r,n={}){this.proofStrings=new Map,this.onAuthCallbacks=[],this.indexerClients=new Map,this.account=e,this.settings=r,this.status=n}now(){return Math.floor(Date.now()/1e3)}get expiration(){var e;return Math.max((e=this.settings.metadata.expiration)!=null?e:Aj,120)}onAuth(e){return this.onAuthCallbacks.push(e),()=>this.onAuthCallbacks=this.onAuthCallbacks.filter(r=>r!==e)}async dump(){return this.status.jwt?{jwt:{token:await this.status.jwt.token,expiration:this.status.jwt.expiration},metadata:this.status.metadata}:{metadata:this.settings.metadata}}auth(e=5){var r=this;return this._initialAuthRequest?this._initialAuthRequest:(this._initialAuthRequest=async function(){const n=r.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");let i;for(let s=1;;s++)try{i=(await r.getJWT(!0)).token;break}catch(o){if(s===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new Uh(n,void 0,i)}(),this._initialAuthRequest)}async getJWT(e){var r=this;const n=this.settings.sequenceApiUrl;if(!n)throw Error("No sequence api url");if(this.status.jwt){const l=this.status.jwt,u=await l.token;if(this.now(){throw this.status.jwt=void 0,l}),expiration:o};return this.status.jwt=a,a.token.then(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"fulfilled",value:l})}catch{}})}).catch(l=>{this.onAuthCallbacks.forEach(u=>{try{u({status:"rejected",reason:l})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new t1,n=J.from(this.settings.sequenceApiChainId),i=ws(this.account.networks,n);if(!i)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new Bm(r1(i.rpcUrl),{name:"",chainId:n.toNumber()}),await r.decodeProof(e),!0}catch{return!1}}async getAPIClient(e=!0){if(!this.apiClient){const r=this.settings.sequenceApiUrl;if(!r)throw Error("No sequence api url");const n=(await this.getJWT(e)).token;this.apiClient=new Uh(r,void 0,n)}return this.apiClient}async getMetadataClient(e=!0){if(!this.metadataClient){const r=(await this.getJWT(e)).token;this.metadataClient=new S8(this.settings.sequenceMetadataUrl,void 0,r)}return this.metadataClient}async getIndexerClient(e,r=!0){const n=ws(this.account.networks,e);if(!n)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(n.chainId))if(n.indexer)this.indexerClients.set(n.chainId,n.indexer);else if(n.indexerUrl){const i=(await this.getJWT(r)).token;this.indexerClients.set(n.chainId,new C8(n.indexerUrl,void 0,i))}else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(n.chainId)}getProofString(e){if(this.proofStrings.has(e)){const c=this.proofStrings.get(e);if(this.now()(r.signature=c,n.encodeProof(r,!0))).catch(c=>{throw this.proofStrings.delete(e),c}),expiration:o};return this.proofStrings.set(e,a),a}}const _j=async(t,e,r)=>{const n=qe(await t.getAddress());if(!n||n===""||n==="0x")throw Pj;const i=new Cb;if(i.address=n,!r||!r.app||r.app==="")throw new P8("authorization options requires app to be set");i.claims.app=r.app,i.claims.ogn=r.origin,i.claims.n=r.nonce,i.setExpiryIn(r.expiry?Math.max(r.expiry,200):Aj);const s=i.messageTypedData(),o=pB(e);i.signature=await(t instanceof Mo?t.signTypedData(s.domain,s.types,s.message,o,"eip6492"):t.signTypedData(s.domain,s.types,s.message,o));const c=await new t1().encodeProof(i,!0);return{typedData:s,proofString:c}};class P8 extends Error{constructor(e){super(e),this.name="AuthError"}}const Pj=new P8("auth error: account address is empty");function al(){return al=Object.assign?Object.assign.bind():function(t){for(var e=1;eI.wallet)));let T;if(P){if(T=new Mo({address:P,tracker:y,networks:b,contexts:v,orchestrator:p}),l&&l.length>0){let I=await T.status(g);if(I.original.version!==I.version||T.version!==I.version){const{migratedAllChains:H,failedChains:G}=await T.isMigratedAllChains();if(G.some(F=>n5.includes(F)))throw Error(`Failed to fetch account status on ${G.join(", ")}`);if(!H){if(h&&!await h(T))throw Error("Migration cancelled, cannot open session");const{failedChains:F}=await T.signAllMigrations(d||(_=>_));if(F.some(_=>n5.includes(_)))throw Error(`Failed to sign migrations on ${F.join(", ")}`);_8.isDedupedTracker(y)&&y.invalidateCache();let E;if([E,I]=await Promise.all([T.isMigratedAllChains().then(_=>_.migratedAllChains),T.status(g)]),!E)throw Error("Failed to migrate account")}}I.onChain.version!==I.version&&await T.doBootstrap(g,void 0,I);const B=I.config,j=T.coders.config.editConfig(B,{add:l,threshold:c});if(T.coders.config.imageHashOf(B)!==T.coders.config.imageHashOf(j)){const H=T.coders.config.editConfig(j,{checkpoint:T.coders.config.checkpointOf(B).add(1)});await T.updateConfig(H)}}}else{if(!l||l.length===0)throw Error("Cannot create new account without signers");if(!c)throw Error("Cannot create new account without threshold");if(T=await Mo.new({config:{threshold:c,checkpoint:0,signers:l},tracker:y,contexts:v,orchestrator:p,networks:b}),P=await u([T.address]),await T.publishWitness(),!(await y.walletsOfSigner({signer:a,noCache:!0})).some(B=>B.wallet===T.address))throw Error("Account not found on tracker")}let w;return m&&(w=new T9(T,m),w.auth(),w.onAuth(I=>{I.status==="fulfilled"&&T.setJwt(I.value)})),new Jh(b,v,T,w)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:i,onMigration:s,orchestrator:o}=e,{contexts:a,networks:c,tracker:l,services:u}=al({},qv,n);let f;if(Tj(r)){var d,h,p;const S=r.config.address||he.context.addressOf(a[1],Io.config.ConfigCoder.imageHashOf(al({},r.config,{version:1}))),P=((d=(h=r.jwt)==null?void 0:h.expiration)!=null?d:0)T.migratedAllChains)){if(s&&!await s(f))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await f.signAllMigrations(i),!await f.isMigratedAllChains().then(T=>T.migratedAllChains))throw Error("Failed to migrate account")}}else if(Ij(r)){var v,b,y;const S=((v=(b=r.jwt)==null?void 0:b.expiration)!=null?v:0)async(n,i,s)=>{const o=s.messageDigest();return{isValid:await t(i).isValidSignature(s.address,o,s.signature)}},bme=Object.freeze(Object.defineProperty({__proto__:null,AuthError:P8,CRITICAL_CHAINS:n5,ErrAccountIsRequired:Pj,Session:Jh,SessionSettingsDefault:qv,ValidateSequenceWalletProof:gme,isSessionDumpV1:Tj,isSessionDumpV2:Ij,signAuthorization:_j},Symbol.toStringTag,{value:"Module"}));function Sy(){return Sy=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),_n({},n)).then(i=>Pn(i).then(s=>({status:s.status}))),this.version=n=>this.fetch(this.url("Version"),_n({},n)).then(i=>Pn(i).then(s=>({version:s.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),_n({},n)).then(i=>Pn(i).then(s=>({status:s.status}))),this.getSignerConfig=(n,i)=>this.fetch(this.url("GetSignerConfig"),_n(n,i)).then(s=>Pn(s).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,i)=>this.fetch(this.url("Sign"),_n(n,i)).then(s=>Pn(s).then(o=>({sig:o.sig}))),this.signWith=(n,i)=>this.fetch(this.url("SignWith"),_n(n,i)).then(s=>Pn(s).then(o=>({sig:o.sig}))),this.authMethods=(n,i)=>this.fetch(this.url("AuthMethods"),_n(n,i)).then(s=>Pn(s).then(o=>({methods:o.methods,active:o.active}))),this.setPIN=(n,i)=>this.fetch(this.url("SetPIN"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.resetPIN=(n,i)=>this.fetch(this.url("ResetPIN"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.createTOTP=(n,i)=>this.fetch(this.url("CreateTOTP"),_n(n,i)).then(s=>Pn(s).then(o=>({uri:o.uri}))),this.commitTOTP=(n,i)=>this.fetch(this.url("CommitTOTP"),_n(n,i)).then(s=>Pn(s).then(o=>({codes:o.codes}))),this.resetTOTP=(n,i)=>this.fetch(this.url("ResetTOTP"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.reset2FA=(n,i)=>this.fetch(this.url("Reset2FA"),_n(n,i)).then(s=>Pn(s).then(o=>({}))),this.recoveryCodes=(n,i)=>this.fetch(this.url("RecoveryCodes"),_n(n,i)).then(s=>Pn(s).then(o=>({codes:o.codes}))),this.resetRecoveryCodes=(n,i)=>this.fetch(this.url("ResetRecoveryCodes"),_n(n,i)).then(s=>Pn(s).then(o=>({codes:o.codes}))),this.hostname=e,this.fetch=(n,i)=>r(n,i)}url(e){return this.hostname+this.path+e}}const _n=(t={},e={})=>({method:"POST",headers:Sy({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Pn=t=>t.text().then(e=>{let r;try{r=JSON.parse(e)}catch{throw{code:"unknown",msg:`expecting JSON, got: ${e}`,status:t.status}}if(!t.ok)throw r;return r}),Eme=typeof global=="object"?global.fetch:window.fetch;class xme{constructor(e,r,n=!1){this.address=e,this.url=r,this.appendSuffix=n,this.guard=new wme(r,Eme)}async getAddress(){return this.address}async buildDeployTransaction(e){}async predecorateSignedTransactions(e){return[]}async decorateTransactions(e,r){return e}async requestSignature(e,r,n,i){var s;const{onSignature:o,onRejection:a}=i;if(!he.isWalletSignRequestMetadata(n))return a("expected sequence signature request metadata"),!1;const c=n.guardTotpCode,l=$n.genericCoderFor(n.config.version),{encoded:u}=l.signature.encodeSigners(n.config,(s=n.parts)!=null?s:new Map,[],n.chainId);try{const{sig:h}=await this.guard.signWith({signer:this.address,request:{msg:te(r),auxData:this.packMsgAndSig(n.address,n.digest,u,n.chainId),chainId:J.from(n.chainId).toNumber()},token:c?{id:ky.TOTP,token:c}:void 0});if(ne(h).length===0)throw new Error("guard response contained no signature data");return o(h),!0}catch(h){var f,d;return a(`unable to request guard signature: ${(f=(d=h.message)!=null?d:h.msg)!=null?f:h}`),!1}}notifyStatusChange(e,r,n){}async getAuthMethods(e){let r;if("jwt"in e)r=await this.guard.authMethods({},{Authorization:`BEARER ${e.jwt}`});else{const n=await I9(e);r=await this.guard.authMethods({proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}return Sy({},r,{methods:r.methods.map(Cme)})}async setPin(e,r){const n=await Zd(r);e===void 0?await this.guard.resetPIN({timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`}):await this.guard.setPIN({pin:e,timestamp:n.timestamp.getTime(),signature:n.signature},{Authorization:`BEARER ${r.jwt}`})}resetPin(e){return this.setPin(void 0,e)}async createTotp(e){const r=await Zd(e),{uri:n}=await this.guard.createTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return new URL(n)}async commitTotp(e,r){const{codes:n}=await this.guard.commitTOTP({token:e},{Authorization:`BEARER ${r}`});return n}async resetTotp(e){const r=await Zd(e);await this.guard.resetTOTP({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`})}async reset2fa(e,r){if("jwt"in r)await this.guard.reset2FA({code:e},{Authorization:`BEARER ${r.jwt}`});else{const n=await I9(r);await this.guard.reset2FA({code:e,proof:{wallet:n.walletAddress,timestamp:n.timestamp.getTime(),signer:n.signerAddress,signature:n.signature}})}}async getRecoveryCodes(e){const r=await Zd(e),{codes:n}=await this.guard.recoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}async resetRecoveryCodes(e){const r=await Zd(e),{codes:n}=await this.guard.resetRecoveryCodes({timestamp:r.timestamp.getTime(),signature:r.signature},{Authorization:`BEARER ${e.jwt}`});return n}packMsgAndSig(e,r,n,i){return Fn.encode(["address","uint256","bytes","bytes"],[e,i,r,n])}suffix(){return this.appendSuffix?[3]:[]}}let ky=function(t){return t.PIN="PIN",t.TOTP="TOTP",t}({});function Cme(t){switch(t){case ky.PIN:case ky.TOTP:return t;default:throw new Error(`unknown auth method '${t}'`)}}function Sme(t){return"signerAddress"in t&&typeof t.signerAddress=="string"}async function I9(t){if(Sme(t))return t;{const e=XC.isSapientSigner(t.signer)?t.signer:new XC.SignerWrapper(t.signer),r=await e.getAddress(),n=new Date,i=Oj(t.walletAddress,n),s=H1(i),o=te(A1(32));return new Promise((a,c)=>e.requestSignature(o,s,{},{onSignature(l){a({walletAddress:t.walletAddress,timestamp:n,signerAddress:r,signature:te(l)})},onRejection:c,onStatus(l){}}))}}async function Zd(t){if("wallet"in t){var e;const r=new Date,n=Rj(r),i=await t.wallet.signTypedData(n.domain,n.types,n.message,(e=n.domain.chainId)!=null?e:1,"eip6492");return{jwt:t.jwt,timestamp:r,signature:i}}else return t}function Oj(t,e){return{domain:$j,types:{AuthMethods:[{name:"wallet",type:"address"},{name:"timestamp",type:"string"}]},message:{wallet:qe(t),timestamp:Mj(e)}}}function Rj(t){return{domain:$j,types:{AuthUpdate:[{name:"timestamp",type:"string"}]},message:{timestamp:Mj(t)}}}const $j={name:"Sequence Guard",version:"1",chainId:1};function Mj(t){return t.toUTCString().replace("GMT","UTC")}const kme=Object.freeze(Object.defineProperty({__proto__:null,AuthMethod:ky,GuardSigner:xme,getAuthUpdateProofTypedData:Rj,getOwnershipProofTypedData:Oj},Symbol.toStringTag,{value:"Module"}));function Ay(){return Ay=Object.assign?Object.assign.bind():function(t){for(var e=1;e{this.queue.length>0&&(this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.run,this.options.timeWindow))},this.handle=(n,i,s)=>{if(this.batchableJsonRpcMethods.find(o=>o===i.method)){this.queue.push({request:i,callback:s,next:n}),this.options.verbose&&console.log("Scheduling call",i.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",i.method),n(i,s)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0){r.options.verbose&&console.log("Skip multicall, empty queue");return}if(n===1){r.forward(r.queue[0]),r.queue=[],r.options.verbose&&console.log("Skip multicall, single item");return}r.options.verbose&&console.log("Resolving",n);var a=r.queue.slice(0,n);r.queue=n===r.queue.length?[]:r.queue.slice(n),r.options.verbose&&console.log("Updated queue",r.queue.length),r.queue.length!==0&&(r.options.verbose&&console.log("Scheduling next batch"),r.scheduleExecution());const i=a[0].next;let s;var[a,c]=O9(a,h=>{try{if(h.next!==i)return!1;switch(h.request.method){case Rr.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Rr.ethGetBalance:case Rr.ethGetCode:const p=_me(h.request.params[1]);if(s===void 0&&(s=p),!Pme(p,s))return!1}return!0}catch{return!1}});if(c.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls are incompatible");return}let o=a.map(h=>{try{switch(h.request.method){case Rr.ethCall:return{delegateCall:!1,revertOnError:!1,target:h.request.params[0].to,data:h.request.params[0].data,gasLimit:h.request.params[0].gas?h.request.params[0].gas:0,value:0};case Rr.ethGetCode:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callCode"),[h.request.params[0]])};case Rr.ethGetBalance:return{delegateCall:!1,revertOnError:!1,target:r.options.contract,gasLimit:0,value:0,data:r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("callBalanceOf"),[h.request.params[0]])};default:return null}}catch{return null}});var[a,c]=O9(a,(h,p)=>o[p]!==void 0);if(o=o.filter(h=>h),c.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",c.length),r.forward(c),a.length===0)){r.options.verbose&&console.log("Skip multicall, all calls had encoding errors");return}let l;try{r.options.verbose&&console.log("Encoding multicall"),l=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch(h){r.options.verbose&&console.warn("Error encoding multicall, forwarding one by one",h),r.forward(a);return}const u=e8(),f=await Ame(ZS(i)({id:u,jsonrpc:Hf,method:Rr.ethCall,params:[{to:r.options.contract,value:0,data:l},J.isBigNumber(s)?s.toNumber():s]}),h=>({jsonrpc:Hf,id:u,result:void 0,error:h}));if(f.error)return r.options.verbose&&console.warn("Error calling multicall, forwarding one by one",f.error),r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),f.result)}catch(h){r.options.verbose&&console.warn("Error decoding multicall result, forwarding one by one",h),r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,p)=>{if(!d[0][p])r.options.verbose&&console.warn(`Multicall error for ${h.request.method} not found`),r.forward(h);else switch(h.request.method){case Rr.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][p]});break;case Rr.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Fn.decode(["bytes"],d[1][p])[0]});break;case Rr.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Fn.decode(["uint256"],d[1][p])[0]});break}})},this.options=e?Ay({},Fi.DefaultOptions,e):Fi.DefaultOptions,this.options.batchSize<=0)throw new Error(`Invalid batch size of ${this.options.batchSize}`)}forward(e){Array.isArray(e)?e.forEach(r=>r.next(r.request,r.callback)):e.next(e.request,e.callback)}static isMulticall(e){return e&&e.handle!==void 0&&e.conf!==void 0&&Fi.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Fi.DefaultOptions=Ay({},Tme);const Nj=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class Ime extends Sg{constructor(e,r){var n;super(e.getNetwork()),n=this,this.getResolver=async function(i){const s=n.provider;if(s.getResolver){const o=await s.getResolver(await i);return o?new _x(n,o.address,o.name):null}return s.getResolver(await i)},this.next=async function(i,s){try{switch(i.method){case Rr.ethCall:n.callback(i,s,await n.provider.call(i.params[0],i.params[1]));break;case Rr.ethGetCode:n.callback(i,s,await n.provider.getCode(i.params[0],i.params[1]));break;case Rr.ethGetBalance:n.callback(i,s,await n.provider.getBalance(i.params[0],i.params[1]));break}}catch(o){n.callback(i,s,void 0,o)}},this.provider=e,this.listenerCount=e.listenerCount.bind(e),this.multicall=Fi.isMulticall(r)?r:new Fi(r),Nj.forEach(i=>{e[i]!==void 0&&(this[i]=(...s)=>e[i](...s))})}callback(e,r,n,i){r(i,{jsonrpc:Hf,id:e.id,result:n,error:i})}async call(e,r){return this.rpcCall(Rr.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Rr.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Rr.ethGetBalance,e,r)}async rpcCall(e,...r){const n=e8();return(await ZS(this.multicall.handle)(this.next,{jsonrpc:Hf,id:n,method:e,params:r})).result}}class Ome{constructor(e,r){if(this.provider=e,this.multicall=Fi.isMulticall(r)?r:new Fi(r),e.send){const n=async function(s,o){e.send(s,o)};this.send=(i,s)=>{this.multicall.handle(n,i,s)}}if(e.sendAsync){const n=async function(s,o){e.sendAsync(s,o)};this.sendAsync=(i,s)=>{this.multicall.handle(n,i,s)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const Rme=t=>e=>{const r=Fi.isMulticall(t)?t:new Fi(t);return(n,i)=>r.handle(e,n,i)};var $me=Object.freeze({__proto__:null,ProxyMethods:Nj,MulticallProvider:Ime,MulticallExternalProvider:Ome,multicallMiddleware:Rme});const Mme=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Fi,providers:$me},Symbol.toStringTag,{value:"Module"}));var Dj={exports:{}};/*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,i=Array.isArray?Array.isArray:function($){return Object.prototype.toString.call($)==="[object Array]"},s=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",c=typeof Reflect=="object",l=typeof setImmediate=="function",u=l?setImmediate:setTimeout,f=a?c&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(k){var $=Object.getOwnPropertyNames(k);return $.push.apply($,Object.getOwnPropertySymbols(k)),$}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(k){k&&(this._conf=k,k.delimiter&&(this.delimiter=k.delimiter),k.maxListeners!==r&&(this._maxListeners=k.maxListeners),k.wildcard&&(this.wildcard=k.wildcard),k.newListener&&(this._newListener=k.newListener),k.removeListener&&(this._removeListener=k.removeListener),k.verboseMemoryLeak&&(this.verboseMemoryLeak=k.verboseMemoryLeak),k.ignoreErrors&&(this.ignoreErrors=k.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function p(k,$){var L="(node) warning: possible EventEmitter memory leak detected. "+k+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(L+=" Event name: "+$+"."),typeof process<"u"&&process.emitWarning){var M=new Error(L);M.name="MaxListenersExceededWarning",M.emitter=this,M.count=k,process.emitWarning(M)}else console.error(L),console.trace&&console.trace()}var v=function(k,$,L){var M=arguments.length;switch(M){case 0:return[];case 1:return[k];case 2:return[k,$];case 3:return[k,$,L];default:for(var A=new Array(M);M--;)A[M]=arguments[M];return A}};function b(k,$){for(var L={},M,A=k.length,D=$?$.length:0,V=0;V0;)k=D[U],V.call(R,k,L[k]);this._listeners={},this._listenersCount=0,W()}}});function m(k,$,L,M){var A=Object.assign({},$);if(!k)return A;if(typeof k!="object")throw TypeError("options must be an object");var D=Object.keys(k),V=D.length,R,U,W;function q(X){throw Error('Invalid "'+R+'" option value'+(X?". Reason: "+X:""))}for(var Y=0;Y0;)if(R===k[U])return D;V($)}}var P=S(["function"]),T=S(["object","function"]);function w(k,$,L){var M,A,D=0,V,R=new k(function(U,W,q){L=m(L,{timeout:0,overload:!1},{timeout:function(Z,ae){return Z*=1,(typeof Z!="number"||Z<0||!Number.isFinite(Z))&&ae("timeout must be a positive number"),Z}}),M=!L.overload&&typeof k.prototype.cancel=="function"&&typeof q=="function";function Y(){A&&(A=null),D&&(clearTimeout(D),D=0)}var X=function(Z){Y(),U(Z)},Q=function(Z){Y(),W(Z)};M?$(X,Q,q):(A=[function(Z){Q(Z||Error("canceled"))}],$(X,Q,function(Z){if(V)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Z!="function")throw TypeError("onCancel callback must be a function");A.push(Z)}),V=!0),L.timeout>0&&(D=setTimeout(function(){var Z=Error("timeout");Z.code="ETIMEDOUT",D=0,R.cancel(Z),W(Z)},L.timeout))});return M||(R.cancel=function(U){if(A){for(var W=A.length,q=1;q0;)Q=Ae[R],Q!=="_listeners"&&(at=F(k,$,L[Q],M+1,A),at&&(X?X.push.apply(X,at):X=at));return X}else if(ot==="**"){for(ue=M+1===A||M+2===A&&Pe==="*",ue&&L._listeners&&(X=F(k,$,L,A,A)),Ae=f(L),R=Ae.length;R-- >0;)Q=Ae[R],Q!=="_listeners"&&(Q==="*"||Q==="**"?(L[Q]._listeners&&!ue&&(at=F(k,$,L[Q],A,A),at&&(X?X.push.apply(X,at):X=at)),at=F(k,$,L[Q],M,A)):Q===Pe?at=F(k,$,L[Q],M+2,A):at=F(k,$,L[Q],M,A),at&&(X?X.push.apply(X,at):X=at));return X}else L[ot]&&(X=F(k,$,L[ot],M+1,A));if(Z=L["*"],Z&&F(k,$,Z,M+1,A),ae=L["**"],ae)if(M0;)Q=Ae[R],Q!=="_listeners"&&(Q===Pe?F(k,$,ae[Q],M+2,A):Q===ot?F(k,$,ae[Q],M+1,A):(se={},se[Q]=ae[Q],F(k,$,{"**":se},M+1,A)));else ae._listeners?F(k,$,ae,A,A):ae["*"]&&ae["*"]._listeners&&F(k,$,ae["*"],A,A);return X}function j(k,$,L){var M=0,A=0,D,V=this.delimiter,R=V.length,U;if(typeof k=="string")if((D=k.indexOf(V))!==-1){U=new Array(5);do U[M++]=k.slice(A,D),A=D+R;while((D=k.indexOf(V,A))!==-1);U[M++]=k.slice(A)}else U=[k],M=1;else U=k,M=k.length;if(M>1){for(D=0;D+10&&W._listeners.length>this._maxListeners&&(W._listeners.warned=!0,p.call(this,W._listeners.length,q))):W._listeners=$,!0;return!0}function H(k,$,L,M){for(var A=f(k),D=A.length,V,R,U,W=k._listeners,q;D-- >0;)R=A[D],V=k[R],R==="_listeners"?U=L:U=L?L.concat(R):[R],q=M||typeof R=="symbol",W&&$.push(q?U:U.join(this.delimiter)),typeof V=="object"&&H.call(this,V,$,U,q);return $}function G(k){for(var $=f(k),L=$.length,M,A,D;L-- >0;)A=$[L],M=k[A],M&&(D=!0,A!=="_listeners"&&!G(M)&&delete k[A]);return D}function B(k,$,L){this.emitter=k,this.event=$,this.listener=L}B.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function E(k,$,L){if(L===!0)A=!0;else if(L===!1)M=!0;else{if(!L||typeof L!="object")throw TypeError("options should be an object or true");var M=L.async,A=L.promisify,D=L.nextTick,V=L.objectify}if(M||D||A){var R=$,U=$._origin||$;if(D&&!o)throw Error("process.nextTick is not supported");A===r&&(A=$.constructor.name==="AsyncFunction"),$=function(){var W=arguments,q=this,Y=this.event;return A?D?Promise.resolve():new Promise(function(X){u(X)}).then(function(){return q.event=Y,R.apply(q,W)}):(D?process.nextTick:u)(function(){q.event=Y,R.apply(q,W)})},$._async=!0,$._origin=U}return[$,V?new B(this,k,$):this]}function _(k){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,k)}_.EventEmitter2=_,_.prototype.listenTo=function(k,$,L){if(typeof k!="object")throw TypeError("target musts be an object");var M=this;L=m(L,{on:r,off:r,reducers:r},{on:P,off:P,reducers:T});function A(D){if(typeof D!="object")throw TypeError("events must be an object");var V=L.reducers,R=I.call(M,k),U;R===-1?U=new y(M,k,L):U=M._observers[R];for(var W=f(D),q=W.length,Y,X=typeof V=="function",Q=0;Q0;)A=L[M],(!k||A._target===k)&&(A.unsubscribe($),D=!0);return D},_.prototype.delimiter=".",_.prototype.setMaxListeners=function(k){k!==r&&(this._maxListeners=k,this._conf||(this._conf={}),this._conf.maxListeners=k)},_.prototype.getMaxListeners=function(){return this._maxListeners},_.prototype.event="",_.prototype.once=function(k,$,L){return this._once(k,$,!1,L)},_.prototype.prependOnceListener=function(k,$,L){return this._once(k,$,!0,L)},_.prototype._once=function(k,$,L,M){return this._many(k,1,$,L,M)},_.prototype.many=function(k,$,L,M){return this._many(k,$,L,!1,M)},_.prototype.prependMany=function(k,$,L,M){return this._many(k,$,L,!0,M)},_.prototype._many=function(k,$,L,M,A){var D=this;if(typeof L!="function")throw new Error("many only accepts instances of Function");function V(){return--$===0&&D.off(k,V),L.apply(this,arguments)}return V._origin=L,this._on(k,V,M,A)},_.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var k=arguments[0],$,L=this.wildcard,M,A,D,V,R;if(k==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(L&&($=k,k!=="newListener"&&k!=="removeListener"&&typeof k=="object")){if(A=k.length,a){for(D=0;D3)for(M=new Array(U-1),V=1;V3)for(A=new Array(W-1),R=1;R0&&this._events[k].length>this._maxListeners&&(this._events[k].warned=!0,p.call(this,this._events[k].length,k))):this._events[k]=$,A)},_.prototype.off=function(k,$){if(typeof $!="function")throw new Error("removeListener only takes instances of Function");var L,M=[];if(this.wildcard){var A=typeof k=="string"?k.split(this.delimiter):k.slice();if(M=F.call(this,null,A,this.listenerTree,0),!M)return this}else{if(!this._events[k])return this;L=this._events[k],M.push({_listeners:L})}for(var D=0;D0){for(M=this._all,$=0,L=M.length;$0;)M=$[L[D]],typeof M=="function"?A.push(M):A.push.apply(A,M);return A}else{if(this.wildcard){if(V=this.listenerTree,!V)return[];var R=[],U=typeof k=="string"?k.split(this.delimiter):k.slice();return F.call(this,R,U,V,0),R}return $?(M=$[k],M?typeof M=="function"?[M]:M:[]):[]}},_.prototype.eventNames=function(k){var $=this._events;return this.wildcard?H.call(this,this.listenerTree,[],null,k):$?f($):[]},_.prototype.listenerCount=function(k){return this.listeners(k).length},_.prototype.hasListeners=function(k){if(this.wildcard){var $=[],L=typeof k=="string"?k.split(this.delimiter):k.slice();return F.call(this,$,L,this.listenerTree,0),$.length>0}var M=this._events,A=this._all;return!!(A&&A.length||M&&(k===r?f(M).length:M[k]))},_.prototype.listenersAny=function(){return this._all?this._all:[]},_.prototype.waitFor=function(k,$){var L=this,M=typeof $;return M==="number"?$={timeout:$}:M==="function"&&($={filter:$}),$=m($,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:P,Promise:g}),w($.Promise,function(A,D,V){function R(){var U=$.filter;if(!(U&&!U.apply(L,arguments)))if(L.off(k,R),$.handleError){var W=arguments[0];W?D(W):A(v.apply(null,arguments).slice(1))}else A(v.apply(null,arguments))}V(function(){L.off(k,R)}),L._on(k,R,!1)},{timeout:$.timeout,overload:$.overload})};function O(k,$,L){L=m(L,{Promise,timeout:0,overload:!1},{Promise:g});var M=L.Promise;return w(M,function(A,D,V){var R;if(typeof k.addEventListener=="function"){R=function(){A(v.apply(null,arguments))},V(function(){k.removeEventListener($,R)}),k.addEventListener($,R,{once:!0});return}var U=function(){W&&k.removeListener("error",W),A(v.apply(null,arguments))},W;$!=="error"&&(W=function(q){k.removeListener($,U),D(q)},k.once("error",W)),V(function(){W&&k.removeListener("error",W),k.removeListener($,U)}),k.once($,U)},{timeout:L.timeout,overload:L.overload})}var N=_.prototype;Object.defineProperties(_,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(k){if(typeof k!="number"||k<0||Number.isNaN(k))throw TypeError("n must be a non-negative number");N._maxListeners=k},enumerable:!0},once:{value:O,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return _}):t.exports=_})()})(Oj);var Rb=Oj.exports;function Yn(){return Yn=Object.assign?Object.assign.bind():function(t){for(var e=1;e++Sme;class Y1{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Rb.EventEmitter2,this.sendAsync=async function(r,n,i){e.state===Oi.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:Nj(),type:Ke.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,c)=>{if(a)i(a);else if(c)n(c);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(ge.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=T8){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Oi.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=Oi.CLOSED,this._registered=!1,this._init=jt.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===Oi.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Ke.INIT){ge.debug("MessageProvider, received INIT message",e);const{nonce:c}=e.data;if(!c||c.length==0){ge.error("invalid init nonce");return}this._init=jt.OK,this.sendMessage({idx:-1,type:Ke.INIT,data:{sessionId:this._sessionId,nonce:c}})}if(this._init!==jt.OK)return;ge.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Ke.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){ge.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const c=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw ge.error(c),this.close(),c}this.state=Oi.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(l){r.sendMessage(l)});return}if(e.type===Ke.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===Ke.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[qe(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Ke.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===Ke.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Ke.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Ke.CLOSE&&this.state!==Oi.CLOSED&&this.close(e.data),e.type===Ke.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Ke.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==Oi.CLOSED&&(this.state=Oi.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,ge.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(Yn({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function kme(t){return Ame.some(e=>e.predicate(t))}const Ame=[{name:"Decentraland Exception",predicate:Pme},{name:"0x v3 Exception",predicate:Tme}],_me=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function Pme(t){try{const e=ca(t);return _me.test(e)}catch{return!1}}function Tme(t){const e=new Br(Ime);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const Ime=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Vv=gt(`Ethereum Signed Message: -`),Dj=t=>oa(t)||Fe(t)?ne(t):gt(t),$b=t=>{const e=Dj(t);return kme(e)?e:zt([Vv,gt(String(e.length)),e])},Ome=t=>{if(JSON.stringify(t.slice(0,Vv.length))!==JSON.stringify(Vv))return t;const e=t.slice(Vv.length),r=String(e.length).length;let n,i;try{i=Number(ca(e.slice(0,r)))}catch{i=Number(te(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},Vf=async(t,e,r,n)=>new he.reader.OnChainReader(n).isValidSignature(t,e,r),Lj=async(t,e,r,n)=>{const i=$b(e),s=XS(i);return Vf(t,s,r,n)},Bj=(t,e,r,n)=>Vf(t,H1(e),r,n),_y=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",Fj=()=>!!navigator.userAgent.match(/UnitySequence/i),jj=t=>t.onChain.deployed&&t.fullyMigrated;class Uj{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class s1{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!s1.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function Py(){return s1.isAvailable()?new s1:new Uj}async function zj(t){return Array.isArray(t)?Promise.all(t.map(e=>ht(e))):ht(t)}const TT="@sequence.transportSession";class J1{constructor(e){var r=this;this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==jt.OK){if(i.type===Ke.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case Ke.OPEN:{if(r._init!==jt.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case Ke.CLOSE:return r._init!==jt.OK,void 0;case Ke.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:ge.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=XB(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=r8(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,c=a;if(r.appOrigin&&c!=null&&c.origin){if(!_y()&&c.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&c!=null&&c.origin?a.origin=eF(c.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=ZB(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){ge.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{Py().setItem(TT,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Py().getItem(TT);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=jt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,i)=>{this.registered&&this.notifyDisconnect(n,i)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(bs(n.find(i=>i.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,i)=>{this.notifyChainChanged(n,i)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:Ke.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:Ke.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Ke.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:Ke.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Ke.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:Ke.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:Ke.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Ke.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===jt.OK)return ge.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Ke.INIT)return ge.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(ge.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(ge.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===jt.OK){e();return}if(this._init!==jt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{ge.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},T8/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=jt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Ke.INIT,data:{nonce:this._initNonce}}),this._init=jt.SENT_NONCE})}}class Rme{constructor(){const e=new s5,r=new s5;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class s5{constructor(){this.events=new Rb.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class Wj extends Y1{constructor(e){if(super(),this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,i)=>{if(this.state===Oi.CLOSED){this.state=Oi.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:Ke.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=Oi.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=jt.OK}closeWallet(){this.sendMessage({idx:-1,type:Ke.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class $me extends J1{constructor(e,r){super(e),this.port=r,this._init=jt.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function Hj(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...i)=>{n.logfromjs(`${t}: ${K2(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${K2(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${K2(i)}`)},window.logsOverriddenForUnreal=!0}}function K2(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let gu;class qj extends Y1{constructor(e){super(),this.register=()=>{var r;Hj("dapp"),gu&&(gu.unregister(),gu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),gu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),gu===this&&(gu=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new Q1;r&&(s.pathname=r.toLowerCase()),this._init=jt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",YS(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r,n;const i=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",i),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(i)}}class Mme extends J1{constructor(e){super(e),this.onMessageFromUnreal=r=>{ge.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Q1(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:JS(n.get("intent"))}},this._init=jt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;Hj("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){ge.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;ge.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;ge.error(c),this.notifyClose({message:c}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==Ke.INIT&&this._init!==jt.OK){ge.error("impossible state, should not be calling postMessage until inited");return}const i=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(i)}}const I8="sequence-extension-message-handler";class Nme extends J1{constructor(e,r){super(e),this.runtime=r,this._init=jt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:I8})}sendMessage(e){ge.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class Vj extends Y1{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===I8&&(this._init=jt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Dme extends Rb.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;ge.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case Ke.MESSAGE:if(s)this.emit(Ke.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case Ke.DISCONNECT:case Ke.ACCOUNTS_CHANGED:case Ke.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(c,l)=>{if(c)s(c);else if(l)i(l);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream=e,this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let bu;class Gj extends Y1{constructor(e){super(),this.register=()=>{bu&&(bu.unregister(),bu=this),window.addEventListener("message",this.onWindowEvent),bu=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),bu===this&&(bu=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new Q1;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=jt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!_y()&&!Fj()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",YS(n))),i&&o.set("net",`${i}`);let a,c;_y()?(a=[450,750],c=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],c=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const l=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${c[0]},top=${c[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",l)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){ge.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class Lme extends J1{constructor(e){var r;super(e),r=this,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(ge.debug("RECEIVED MESSAGE",i),r._init!==jt.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===jt.OK&&(!r.appOrigin||r.appOrigin.length<8)){ge.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Q1(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:JS(i.get("intent"))}},this._init=jt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){ge.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var c;const l=`failed to open to network ${(c=s)==null?void 0:c.networkId}`;ge.error(l),this.notifyClose({message:l}),window.close()}}).catch(a=>{var c;const l=`failed to open to network ${(c=s)==null?void 0:c.networkId}, due to: ${a}`;ge.error(l),this.notifyClose({message:l}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Ke.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==jt.OK){ge.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):ge.error("unable to postMessage as parentOrigin is invalid")}}function Kj(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class Mb{constructor(...e){var r=this;this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,i,s;const o=new Mb;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new Gj(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new Wj(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new Vj(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new qj(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;njme(t,i))}function jme(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=ne(e.data);if(r.length>=4&&!Ume(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function Ume(t){const e=new Br(tn.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const zme=1e4;class Wme{constructor(e,r,n){var i=this;this.signerReadyCallbacks=[],this.events=new Rb.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(c=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const c={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var l;if((!i.account||i.account===null)&&!Hme.includes(s.method))throw Mj;const f=i.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const d=(l=i.account)==null?void 0:l.providerFor(a??i.defaultChainId());if(!d)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const h=d instanceof Go?d:void 0;switch(s.method){case"net_version":{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send("net_version",[]);c.result=p;break}case"eth_chainId":{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send("eth_chainId",[]);c.result=p;break}case"eth_accounts":{const p=f.address;c.result=[p];break}case"eth_getBalance":{const[p,v]=s.params,b=await d.getBalance(p,v);c.result=b.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let p;switch(s.method){case"sequence_sign":case"personal_sign":{const[m,g]=s.params;p=m;break}case"eth_sign":{const[m,g]=s.params;p=g;break}}let v="";const b=$b(p),y=s.method==="sequence_sign";if(i.prompter===null?v=await f.signMessage(b,a??i.defaultChainId(),y?"eip6492":"ignore"):v=await i.prompter.promptSignMessage({chainId:a,message:b,eip6492:y},i.connectOptions),v&&v.length>0)c.result=v;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[p,v]=s.params;let b;if(typeof v=="string")try{b=JSON.parse(v)}catch(g){console.warn("walletRequestHandler: error parsing typedData",g)}else b=v;if(!b||!b.domain||!b.types||!b.message)throw new Error("invalid typedData object");let y="";const m=s.method==="sequence_signTypedData_v4";if(i.prompter===null?y=await f.signTypedData(b.domain,b.types,b.message,a??i.defaultChainId(),m?"eip6492":"ignore"):y=await i.prompter.promptSignMessage({chainId:a,typedData:b,eip6492:m},i.connectOptions),y&&y.length>0)c.result=y;else throw new Error("declined by user");break}case"eth_sendTransaction":{const p=Fme(s.params[0]).map(b=>("gas"in b&&b.gasLimit===void 0&&(b.gasLimit=b.gas,delete b.gas),b));IT(f.address,p);let v="";if(i.prompter===null){var u;const b=await f.sendTransaction(p,a??i.defaultChainId());v=(u=b==null?void 0:b.hash)!=null?u:""}else v=await i.prompter.promptSendTransaction(p,a,i.connectOptions);if(v)c.result=v;else throw new Error("declined by user");break}case"eth_signTransaction":{const[p]=s.params;if(qe(p.from)!==f.address)throw new Error("sender address does not match wallet");IT(f.address,p),i.prompter===null?c.result=await f.signTransactions(p,a??i.defaultChainId()):c.result=await i.prompter.promptSignTransaction(p,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(he.transaction.isSignedTransactionBundle(s.params[0])){const p=J.from(s.params[0].chainId).toNumber(),v=await f.relayer(p).relay(s.params[0]);c.result=v.hash}else{const p=await d.sendTransaction(s.params[0]);c.result=p.hash}break}case"eth_getTransactionCount":{const p=qe(s.params[0]),v=s.params[1],b=await d.getTransactionCount(p,v);c.result=J.from(b).toHexString();break}case"eth_blockNumber":{c.result=await d.getBlockNumber();break}case"eth_getBlockByNumber":{c.result=await d.getBlock(s.params[0]);break}case"eth_getBlockByHash":{c.result=await d.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{c.result=await d.getTransaction(s.params[0]);break}case"eth_call":{const[p,v]=s.params;c.result=await d.call(p,v);break}case"eth_getCode":{const[p,v]=s.params;c.result=await d.getCode(p,v);break}case"eth_estimateGas":{const[p]=s.params;c.result=await d.estimateGas(p);break}case"eth_gasPrice":{const p=await d.getGasPrice();c.result=p.toHexString();break}case"wallet_switchEthereumChain":{const[p]=s.params;if(!p.chainId||p.chainId.length===0)throw new Error("invalid chainId");const v=J.from(p.chainId);i.setDefaultChainId(v.toNumber()),c.result=null;break}case"sequence_getWalletContext":{c.result=f.contexts;break}case"sequence_getWalletConfig":{const[p]=s.params;p?c.result=[(await f.status(p)).onChain.config]:c.result=await Promise.all(f.networks.map(async function(v){return(await f.status(v.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[p]=s.params;p?c.result=[OT(p,await f.status(p))]:c.result=await Promise.all(f.networks.map(async function(v){const b=await f.status(v.chainId);return OT(v.chainId,b)}));break}case"sequence_getNetworks":{c.result=await i.getNetworks(!0);break}case"sequence_isSequence":{c.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[p]=s.params;if(!p)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(p),c.result=await i.getNetworks(!0);break}default:{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send(s.method,s.params);c.result=p}}}catch(f){ge.error(f),c.result=null,c.error=Yn({},new Error(f),{code:4001})}o(void 0,c)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:i}=r;if(n){const a=this._connectOptions;let c;if(this.prompter!==null){var s;c=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else c=await this.connect(a);this.notifyConnect(c),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=zme){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:le.MAINNET,s=r8(i).chainId,o={connected:!0,chainId:bs(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await xj(this.account,s,a)}catch(c){return ge.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${c.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${c.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=Yn({},e,{data:i});r(s)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=Yn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(ge.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(i=>Yn({},i,{provider:void 0,relayer:void 0}))};if(e){const i=Es(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",bs(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",bs(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){ge.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rc.canOnchainValidate||c.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const c=await r.status(i);return s(c)?!0:(ge.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function OT(t,e){return{context:e.original.context,config:e.onChain.config,address:he.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const Hme=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class Sd{get utils(){return this.provider.utils}constructor(e,r){this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0,this.client=e,this.provider=r}async getAddress(){return this.client.getAddress()}connect(e){if(!kd.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Sd(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new O8(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await zj(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await za(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class O8 extends Sd{constructor(e,r,n){super(e,r.getProvider(n)),this._isSingleNetworkSequenceSigner=!0,this.chainId=n}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class qme{constructor(e){if(this.signer=e,O8.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return Vf(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=$b(r),a=XS(o);return Vf(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,H1(r),n,i)}}class kd extends Sg{constructor(e,r,n=Wf){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new Sd(this.client,this),this.utils=new qme(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(Yn({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Es(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new Yj(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return bs(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=Qj(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=Es(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return _R(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}kd.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function Qj(t){return typeof t=="object"?Qj(t.chainId):J.from(t).toNumber()}class Yj extends kd{constructor(e,r,n){super(e,r),this._isSingleNetworkSequenceProvider=!0,this.chainId=n}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=Es(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}var Vme={name:"@0xsequence/provider",version:"1.4.5",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--loader tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",hardhat:"^2.12.2",ethers:"^5.7.2"},files:["src","dist"]};class Cl{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(Cl.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(Cl.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(Cl.SESSION_LOCALSTORE_KEY)}}Cl.SESSION_LOCALSTORE_KEY="@sequence.session";class Sl{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(Sl.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(Sl.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(Sl.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}Sl.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class R8{constructor(e,r,n,i){var s;if(this.callbacks={},this.projectAccessKey=i,Kj(e))this.transport=Mb.new(e);else if(Rj(e))this.transport=e;else throw new Error("Invalid transport");const o=typeof n=="number"?n:n==null?void 0:n.defaultChainId;this.defaultEIP6492=typeof n=="number"?!1:(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new Cl(r),this.defaultChainId=new Sl(r,o),this.transport.on("accountsChanged",a=>{var c;a.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(c=this.callbacks.accountsChanged)==null||c.forEach(l=>l(a))}),this.transport.on("connect",a=>{var c;const l=bs(this.getChainId());(c=this.callbacks.connect)==null||c.forEach(u=>u(Yn({},a,{chainId:l})))}),this.transport.on("disconnect",(a,c)=>{var l;(l=this.callbacks.disconnect)==null||l.forEach(u=>u(a,c))}),this.transport.on("networks",a=>{var c;(c=this.callbacks.networks)==null||c.forEach(l=>l(a))}),this.transport.on("walletContext",a=>{var c;(c=this.callbacks.walletContext)==null||c.forEach(l=>l(a))}),this.transport.on("open",a=>{var c;(c=this.callbacks.open)==null||c.forEach(l=>l(a))}),this.transport.on("close",()=>{var a;(a=this.callbacks.close)==null||a.forEach(c=>c())}),this.transport.on("chainChanged",(a,c)=>{var l;(l=this.callbacks.chainChanged)==null||l.forEach(u=>u(a,c))}),this.defaultChainId.onDefaultChainIdChanged(a=>{var c;const l=bs(a);(c=this.callbacks.chainChanged)==null||c.forEach(u=>u(l))})}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:Yn({},e,{networkId:this.getChainId(),clientVersion:Vme.version})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=J.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){const n=this.signMethod(r);return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=this.signTypedDataMethod(r),i=Wr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&J.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],i=Bme(n);return this.send({method:"eth_sendTransaction",params:[i]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const o5={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let Js;const Jj=t=>{var e,r,n;const i=t==null?void 0:t.projectAccessKey;if(i||console.warn("Please pass a projectAccessKey in initWallet config as it will be required in near future."),Js)return Js;const s=Yn({},o5,t,{transports:Yn({},o5.transports,t==null?void 0:t.transports)}),o={},a=(e=(r=s.networks)==null?void 0:r.filter(h=>{h.rpcUrl!==void 0&&h.chainId!==void 0&&Wf.find(p=>p.chainId===h.chainId)}))!=null?e:[],c=Wf.map(h=>{var p;const v=(p=s.networks)==null?void 0:p.find(b=>b.chainId===h.chainId);return v?Yn({},h,v):h}).concat(a).map(h=>{const p=i?`/${i}`:"";return h.rpcUrl=h.rpcUrl+p,h}),l=h=>{if(!o[h]){var p;const v=(p=c.find(m=>m.chainId===h))==null?void 0:p.rpcUrl;if(!v)throw new Error(`no rpcUrl found for chainId: ${h}`);const b=new Go(v),y=new n8([vF,pF,new i8],new my(b));o[h]=new U$(y,h)}return o[h]},u=s.defaultNetwork?(n=Es(c,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!u&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||Py(),d=new R8(s.transports,f,{defaultChainId:u,defaultEIP6492:s.defaultEIP6492},i);return Js=new kd(d,l),Js},Xj=()=>{Js&&(Js.client.closeWallet(),Js.client.transport.unregister(),Js=void 0)},Zj=()=>{if(!Js)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return Js},Gme=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:Dme,BaseProviderTransport:Y1,BaseWalletTransport:J1,CHANNEL_ID:I8,DefaultChainIdTracker:Sl,DefaultProviderConfig:o5,ErrSignedInRequired:Mj,EventType:Ke,ExtensionMessageHandler:Nme,ExtensionMessageProvider:Vj,InitState:jt,LocalStorage:s1,MemoryItemStore:Uj,MuxMessageProvider:Mb,OpenState:Oi,PROVIDER_OPEN_TIMEOUT:T8,ProviderError:$j,ProxyMessageChannel:Rme,ProxyMessageChannelPort:s5,ProxyMessageHandler:$me,ProxyMessageProvider:Wj,SequenceClient:R8,SequenceClientSession:Cl,SequenceProvider:kd,SequenceSigner:Sd,SingleNetworkSequenceProvider:Yj,SingleNetworkSequenceSigner:O8,UnrealMessageHandler:Mme,UnrealMessageProvider:qj,WalletRequestHandler:Wme,WindowMessageHandler:Lme,WindowMessageProvider:Gj,WindowSessionParams:Q1,getWallet:Zj,initWallet:Jj,isBrowserExtension:_y,isMuxTransportTemplate:Kj,isProviderTransport:Rj,isUnityPlugin:Fj,isValidMessageSignature:Lj,isValidSignature:Vf,isValidTypedDataSignature:Bj,isWalletUpToDate:jj,messageToBytes:Dj,nextMessageIdx:Nj,prefixEIP191Message:$b,resolveArrayProperties:zj,trimEIP191Prefix:Ome,unregisterWallet:Xj,useBestStore:Py},Symbol.toStringTag,{value:"Module"}));function kn(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var Kme=kn({__proto__:null},[U0e]),Qme=kn({__proto__:null},[K0e]),Yme=kn({__proto__:null},[cme]),Jme=kn({__proto__:null},[pme]),Xme=kn({__proto__:null},[yve]),Zme=kn({__proto__:null},[kve]),eye=kn({__proto__:null},[Cme]),tye=kn({__proto__:null},[H1e]),rye=kn({__proto__:null},[Gme]),nye=kn({__proto__:null},[eve]);const iye=he.transaction;var sye=Object.freeze({__proto__:null,transactions:iye}),oye=kn({__proto__:null,isValidSignature:Vf,isValidMessageSignature:Lj,isValidTypedDataSignature:Bj,isWalletUpToDate:jj},[T1e]),aye=kn({__proto__:null},[$pe]),cye=kn({__proto__:null},[tve]),lye=kn({__proto__:null},[sme]),uye=kn({__proto__:null},[Fpe]),fye=kn({__proto__:null},[cve]),eU=Object.freeze({__proto__:null,abi:Kme,api:Qme,auth:Yme,guard:Jme,indexer:Xme,metadata:Zme,multicall:eye,network:tye,provider:rye,relayer:nye,transactions:sye,utils:oye,core:aye,signhub:cye,sessions:lye,migration:uye,account:fye,initWallet:Jj,getWallet:Zj,unregisterWallet:Xj,SequenceProvider:kd,SequenceClient:R8,SequenceSigner:Sd}),Gv,dye=class extends yB{constructor({chains:t,options:e}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(s){if(s!=null&&s.isMetaMask&&!(s.isBraveWallet&&!s._events&&!s._state)&&!s.isApexWallet&&!s.isAvalanche&&!s.isBitKeep&&!s.isBlockWallet&&!s.isMathWallet&&!(s.isOkxWallet||s.isOKExWallet)&&!(s.isOneInchIOSWallet||s.isOneInchAndroidWallet)&&!s.isOpera&&!s.isPortal&&!s.isRabby&&!s.isDefiant&&!s.isTokenPocket&&!s.isTokenary&&!s.isZerion)return s}if(typeof window>"u")return;const i=window.ethereum;return i!=null&&i.providers?i.providers.find(n):n(i)},...e};super({chains:t,options:r}),st(this,"id","metaMask"),st(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),Jr(this,Gv,void 0),$o(this,Gv,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:t}={}){var e,r,n,i;try{const s=await this.getProvider();if(!s)throw new Ra;s.on&&(s.on("accountsChanged",this.onAccountsChanged),s.on("chainChanged",this.onChainChanged),s.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if(Je(this,Gv)&&((e=this.options)!=null&&e.shimDisconnect)&&!((r=this.storage)!=null&&r.getItem(this.shimDisconnectKey))&&(o=await this.getAccount().catch(()=>null),!!o))try{await s.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(u){if(this.isUserRejectedRequestError(u))throw new Vr(u);if(u.code===new vc(u).code)throw u}if(!o){const l=await s.request({method:"eth_requestAccounts"});o=Li(l[0])}let a=await this.getChainId(),c=this.isChainUnsupported(a);return t&&a!==t&&(a=(await this.switchChain(t)).id,c=this.isChainUnsupported(a)),(n=this.options)!=null&&n.shimDisconnect&&((i=this.storage)==null||i.setItem(this.shimDisconnectKey,!0)),{account:o,chain:{id:a,unsupported:c},provider:s}}catch(s){throw this.isUserRejectedRequestError(s)?new Vr(s):s.code===-32002?new vc(s):s}}};Gv=new WeakMap;var $8={},Nb={},Ue={},tU={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,c){var l=a>>>16&65535,u=a&65535,f=c>>>16&65535,d=c&65535;return u*d+(l*d+u*f<<16>>>0)|0}t.mul=Math.imul||e;function r(a,c){return a+c|0}t.add=r;function n(a,c){return a-c|0}t.sub=n;function i(a,c){return a<>>32-c}t.rotl=i;function s(a,c){return a<<32-c|a>>>c}t.rotr=s;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}t.isInteger=Number.isInteger||o,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(a){return t.isInteger(a)&&a>=-t.MAX_SAFE_INTEGER&&a<=t.MAX_SAFE_INTEGER}})(tU);Object.defineProperty(Ue,"__esModule",{value:!0});var rU=tU;function hye(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Ue.readInt16BE=hye;function pye(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Ue.readUint16BE=pye;function vye(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Ue.readInt16LE=vye;function mye(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Ue.readUint16LE=mye;function nU(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}Ue.writeUint16BE=nU;Ue.writeInt16BE=nU;function iU(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}Ue.writeUint16LE=iU;Ue.writeInt16LE=iU;function a5(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Ue.readInt32BE=a5;function c5(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}Ue.readUint32BE=c5;function l5(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}Ue.readInt32LE=l5;function u5(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}Ue.readUint32LE=u5;function Ty(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}Ue.writeUint32BE=Ty;Ue.writeInt32BE=Ty;function Iy(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}Ue.writeUint32LE=Iy;Ue.writeInt32LE=Iy;function yye(t,e){e===void 0&&(e=0);var r=a5(t,e),n=a5(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Ue.readInt64BE=yye;function gye(t,e){e===void 0&&(e=0);var r=c5(t,e),n=c5(t,e+4);return r*4294967296+n}Ue.readUint64BE=gye;function bye(t,e){e===void 0&&(e=0);var r=l5(t,e),n=l5(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Ue.readInt64LE=bye;function wye(t,e){e===void 0&&(e=0);var r=u5(t,e),n=u5(t,e+4);return n*4294967296+r}Ue.readUint64LE=wye;function sU(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Ty(t/4294967296>>>0,e,r),Ty(t>>>0,e,r+4),e}Ue.writeUint64BE=sU;Ue.writeInt64BE=sU;function oU(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Iy(t>>>0,e,r),Iy(t/4294967296>>>0,e,r+4),e}Ue.writeUint64LE=oU;Ue.writeInt64LE=oU;function Eye(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=t/8+r-1;s>=r;s--)n+=e[s]*i,i*=256;return n}Ue.readUintBE=Eye;function xye(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s=n;s--)r[s]=e/i&255,i*=256;return r}Ue.writeUintBE=Cye;function Sye(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!rU.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s>>32-16|_<<16,H=H+_|0,w^=H,w=w>>>32-12|w<<12,S=S+I|0,O^=S,O=O>>>32-16|O<<16,G=G+O|0,I^=G,I=I>>>32-12|I<<12,P=P+F|0,N^=P,N=N>>>32-16|N<<16,B=B+N|0,F^=B,F=F>>>32-12|F<<12,T=T+j|0,k^=T,k=k>>>32-16|k<<16,E=E+k|0,j^=E,j=j>>>32-12|j<<12,P=P+F|0,N^=P,N=N>>>32-8|N<<8,B=B+N|0,F^=B,F=F>>>32-7|F<<7,T=T+j|0,k^=T,k=k>>>32-8|k<<8,E=E+k|0,j^=E,j=j>>>32-7|j<<7,S=S+I|0,O^=S,O=O>>>32-8|O<<8,G=G+O|0,I^=G,I=I>>>32-7|I<<7,g=g+w|0,_^=g,_=_>>>32-8|_<<8,H=H+_|0,w^=H,w=w>>>32-7|w<<7,g=g+I|0,k^=g,k=k>>>32-16|k<<16,B=B+k|0,I^=B,I=I>>>32-12|I<<12,S=S+F|0,_^=S,_=_>>>32-16|_<<16,E=E+_|0,F^=E,F=F>>>32-12|F<<12,P=P+j|0,O^=P,O=O>>>32-16|O<<16,H=H+O|0,j^=H,j=j>>>32-12|j<<12,T=T+w|0,N^=T,N=N>>>32-16|N<<16,G=G+N|0,w^=G,w=w>>>32-12|w<<12,P=P+j|0,O^=P,O=O>>>32-8|O<<8,H=H+O|0,j^=H,j=j>>>32-7|j<<7,T=T+w|0,N^=T,N=N>>>32-8|N<<8,G=G+N|0,w^=G,w=w>>>32-7|w<<7,S=S+F|0,_^=S,_=_>>>32-8|_<<8,E=E+_|0,F^=E,F=F>>>32-7|F<<7,g=g+I|0,k^=g,k=k>>>32-8|k<<8,B=B+k|0,I^=B,I=I>>>32-7|I<<7;fn.writeUint32LE(g+n|0,t,0),fn.writeUint32LE(S+i|0,t,4),fn.writeUint32LE(P+s|0,t,8),fn.writeUint32LE(T+o|0,t,12),fn.writeUint32LE(w+a|0,t,16),fn.writeUint32LE(I+c|0,t,20),fn.writeUint32LE(F+l|0,t,24),fn.writeUint32LE(j+u|0,t,28),fn.writeUint32LE(H+f|0,t,32),fn.writeUint32LE(G+d|0,t,36),fn.writeUint32LE(B+h|0,t,40),fn.writeUint32LE(E+p|0,t,44),fn.writeUint32LE(_+v|0,t,48),fn.writeUint32LE(O+b|0,t,52),fn.writeUint32LE(N+y|0,t,56),fn.writeUint32LE(k+m|0,t,60)}function aU(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var cU={},Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});function Bye(t,e,r){return~(t-1)&e|t-1&r}Lc.select=Bye;function Fye(t,e){return(t|0)-(e|0)-1>>>31&1}Lc.lessOrEqual=Fye;function lU(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}Lc.compare=lU;function jye(t,e){return t.length===0||e.length===0?!1:lU(t,e)!==0}Lc.equal=jye;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lc,r=Ps;t.DIGEST_LENGTH=16;var n=function(){function o(a){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var c=a[0]|a[1]<<8;this._r[0]=c&8191;var l=a[2]|a[3]<<8;this._r[1]=(c>>>13|l<<3)&8191;var u=a[4]|a[5]<<8;this._r[2]=(l>>>10|u<<6)&7939;var f=a[6]|a[7]<<8;this._r[3]=(u>>>7|f<<9)&8191;var d=a[8]|a[9]<<8;this._r[4]=(f>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var h=a[10]|a[11]<<8;this._r[6]=(d>>>14|h<<2)&8191;var p=a[12]|a[13]<<8;this._r[7]=(h>>>11|p<<5)&8065;var v=a[14]|a[15]<<8;this._r[8]=(p>>>8|v<<8)&8191,this._r[9]=v>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,c,l){for(var u=this._fin?0:2048,f=this._h[0],d=this._h[1],h=this._h[2],p=this._h[3],v=this._h[4],b=this._h[5],y=this._h[6],m=this._h[7],g=this._h[8],S=this._h[9],P=this._r[0],T=this._r[1],w=this._r[2],I=this._r[3],F=this._r[4],j=this._r[5],H=this._r[6],G=this._r[7],B=this._r[8],E=this._r[9];l>=16;){var _=a[c+0]|a[c+1]<<8;f+=_&8191;var O=a[c+2]|a[c+3]<<8;d+=(_>>>13|O<<3)&8191;var N=a[c+4]|a[c+5]<<8;h+=(O>>>10|N<<6)&8191;var k=a[c+6]|a[c+7]<<8;p+=(N>>>7|k<<9)&8191;var $=a[c+8]|a[c+9]<<8;v+=(k>>>4|$<<12)&8191,b+=$>>>1&8191;var L=a[c+10]|a[c+11]<<8;y+=($>>>14|L<<2)&8191;var M=a[c+12]|a[c+13]<<8;m+=(L>>>11|M<<5)&8191;var A=a[c+14]|a[c+15]<<8;g+=(M>>>8|A<<8)&8191,S+=A>>>5|u;var D=0,V=D;V+=f*P,V+=d*(5*E),V+=h*(5*B),V+=p*(5*G),V+=v*(5*H),D=V>>>13,V&=8191,V+=b*(5*j),V+=y*(5*F),V+=m*(5*I),V+=g*(5*w),V+=S*(5*T),D+=V>>>13,V&=8191;var R=D;R+=f*T,R+=d*P,R+=h*(5*E),R+=p*(5*B),R+=v*(5*G),D=R>>>13,R&=8191,R+=b*(5*H),R+=y*(5*j),R+=m*(5*F),R+=g*(5*I),R+=S*(5*w),D+=R>>>13,R&=8191;var U=D;U+=f*w,U+=d*T,U+=h*P,U+=p*(5*E),U+=v*(5*B),D=U>>>13,U&=8191,U+=b*(5*G),U+=y*(5*H),U+=m*(5*j),U+=g*(5*F),U+=S*(5*I),D+=U>>>13,U&=8191;var W=D;W+=f*I,W+=d*w,W+=h*T,W+=p*P,W+=v*(5*E),D=W>>>13,W&=8191,W+=b*(5*B),W+=y*(5*G),W+=m*(5*H),W+=g*(5*j),W+=S*(5*F),D+=W>>>13,W&=8191;var q=D;q+=f*F,q+=d*I,q+=h*w,q+=p*T,q+=v*P,D=q>>>13,q&=8191,q+=b*(5*E),q+=y*(5*B),q+=m*(5*G),q+=g*(5*H),q+=S*(5*j),D+=q>>>13,q&=8191;var Y=D;Y+=f*j,Y+=d*F,Y+=h*I,Y+=p*w,Y+=v*T,D=Y>>>13,Y&=8191,Y+=b*P,Y+=y*(5*E),Y+=m*(5*B),Y+=g*(5*G),Y+=S*(5*H),D+=Y>>>13,Y&=8191;var X=D;X+=f*H,X+=d*j,X+=h*F,X+=p*I,X+=v*w,D=X>>>13,X&=8191,X+=b*T,X+=y*P,X+=m*(5*E),X+=g*(5*B),X+=S*(5*G),D+=X>>>13,X&=8191;var Q=D;Q+=f*G,Q+=d*H,Q+=h*j,Q+=p*F,Q+=v*I,D=Q>>>13,Q&=8191,Q+=b*w,Q+=y*T,Q+=m*P,Q+=g*(5*E),Q+=S*(5*B),D+=Q>>>13,Q&=8191;var Z=D;Z+=f*B,Z+=d*G,Z+=h*H,Z+=p*j,Z+=v*F,D=Z>>>13,Z&=8191,Z+=b*I,Z+=y*w,Z+=m*T,Z+=g*P,Z+=S*(5*E),D+=Z>>>13,Z&=8191;var ae=D;ae+=f*E,ae+=d*B,ae+=h*G,ae+=p*H,ae+=v*j,D=ae>>>13,ae&=8191,ae+=b*F,ae+=y*I,ae+=m*w,ae+=g*T,ae+=S*P,D+=ae>>>13,ae&=8191,D=(D<<2)+D|0,D=D+V|0,V=D&8191,D=D>>>13,R+=D,f=V,d=R,h=U,p=W,v=q,b=Y,y=X,m=Q,g=Z,S=ae,c+=16,l-=16}this._h[0]=f,this._h[1]=d,this._h[2]=h,this._h[3]=p,this._h[4]=v,this._h[5]=b,this._h[6]=y,this._h[7]=m,this._h[8]=g,this._h[9]=S},o.prototype.finish=function(a,c){c===void 0&&(c=0);var l=new Uint16Array(10),u,f,d,h;if(this._leftover){for(h=this._leftover,this._buffer[h++]=1;h<16;h++)this._buffer[h]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,h=2;h<10;h++)this._h[h]+=u,u=this._h[h]>>>13,this._h[h]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,l[0]=this._h[0]+5,u=l[0]>>>13,l[0]&=8191,h=1;h<10;h++)l[h]=this._h[h]+u,u=l[h]>>>13,l[h]&=8191;for(l[9]-=8192,f=(u^1)-1,h=0;h<10;h++)l[h]&=f;for(f=~f,h=0;h<10;h++)this._h[h]=this._h[h]&f|l[h];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,h=1;h<8;h++)d=(this._h[h]+this._pad[h]|0)+(d>>>16)|0,this._h[h]=d&65535;return a[c+0]=this._h[0]>>>0,a[c+1]=this._h[0]>>>8,a[c+2]=this._h[1]>>>0,a[c+3]=this._h[1]>>>8,a[c+4]=this._h[2]>>>0,a[c+5]=this._h[2]>>>8,a[c+6]=this._h[3]>>>0,a[c+7]=this._h[3]>>>8,a[c+8]=this._h[4]>>>0,a[c+9]=this._h[4]>>>8,a[c+10]=this._h[5]>>>0,a[c+11]=this._h[5]>>>8,a[c+12]=this._h[6]>>>0,a[c+13]=this._h[6]>>>8,a[c+14]=this._h[7]>>>0,a[c+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var c=0,l=a.length,u;if(this._leftover){u=16-this._leftover,u>l&&(u=l);for(var f=0;f=16&&(u=l-l%16,this._blocks(a,c,u),c+=u,l-=u),l){for(var f=0;f16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var h=new Uint8Array(16);h.set(l,h.length-l.length);var p=new Uint8Array(32);e.stream(this._key,h,p,4);var v=u.length+this.tagLength,b;if(d){if(d.length!==v)throw new Error("ChaCha20Poly1305: incorrect destination length");b=d}else b=new Uint8Array(v);return e.streamXOR(this._key,h,u,b,4),this._authenticate(b.subarray(b.length-this.tagLength,b.length),p,b.subarray(0,b.length-this.tagLength),f),n.wipe(h),b},c.prototype.open=function(l,u,f,d){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length0&&h.update(o.subarray(d.length%16))),h.update(f),f.length%16>0&&h.update(o.subarray(f.length%16));var p=new Uint8Array(8);d&&i.writeUint64LE(d.length,p),h.update(p),i.writeUint64LE(f.length,p),h.update(p);for(var v=h.digest(),b=0;bthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n256)throw new Error("randomString charset is too long");let d="";const h=u.length,p=256-256%h;for(;l>0;){const v=i(Math.ceil(l*256/p),f);for(let b=0;b0;b++){const y=v[b];y0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=c[u++],l--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(u=s(this._temp,this._state,c,u,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[u++],l--;return this},a.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,u=this._bufferLength,f=l/536870912|0,d=l<<3,h=l%64<56?64:128;this._buffer[u]=128;for(var p=u+1;p0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(c){r.wipe(c.state),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},a}();t.SHA256=n;var i=new Int32Array([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 s(a,c,l,u,f){for(;f>=64;){for(var d=c[0],h=c[1],p=c[2],v=c[3],b=c[4],y=c[5],m=c[6],g=c[7],S=0;S<16;S++){var P=u+S*4;a[S]=e.readUint32BE(l,P)}for(var S=16;S<64;S++){var T=a[S-2],w=(T>>>17|T<<32-17)^(T>>>19|T<<32-19)^T>>>10;T=a[S-15];var I=(T>>>7|T<<32-7)^(T>>>18|T<<32-18)^T>>>3;a[S]=(w+a[S-7]|0)+(I+a[S-16]|0)}for(var S=0;S<64;S++){var w=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&y^~b&m)|0)+(g+(i[S]+a[S]|0)|0)|0,I=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&h^d&p^h&p)|0;g=m,m=y,y=b,b=v+w|0,v=p,p=h,h=d,d=w+I|0}c[0]+=d,c[1]+=h,c[2]+=p,c[3]+=v,c[4]+=b,c[5]+=y,c[6]+=m,c[7]+=g,u+=64,f-=64}return u}function o(a){var c=new n;c.update(a);var l=c.digest();return c.clean(),l}t.hash=o})(jb);var N8={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=Db,r=Ps;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(S){const P=new Float64Array(16);if(S)for(let T=0;T>16&1),T[j-1]&=65535;T[15]=w[15]-32767-(T[14]>>16&1);const F=T[15]>>16&1;T[14]&=65535,a(w,T,1-F)}for(let I=0;I<16;I++)S[2*I]=w[I]&255,S[2*I+1]=w[I]>>8}function l(S,P){for(let T=0;T<16;T++)S[T]=P[2*T]+(P[2*T+1]<<8);S[15]&=32767}function u(S,P,T){for(let w=0;w<16;w++)S[w]=P[w]+T[w]}function f(S,P,T){for(let w=0;w<16;w++)S[w]=P[w]-T[w]}function d(S,P,T){let w,I,F=0,j=0,H=0,G=0,B=0,E=0,_=0,O=0,N=0,k=0,$=0,L=0,M=0,A=0,D=0,V=0,R=0,U=0,W=0,q=0,Y=0,X=0,Q=0,Z=0,ae=0,se=0,ue=0,ot=0,Pe=0,Ae=0,at=0,Ce=T[0],be=T[1],qt=T[2],Te=T[3],Ie=T[4],Vt=T[5],Oe=T[6],Re=T[7],Gt=T[8],$e=T[9],Me=T[10],Kt=T[11],Ne=T[12],De=T[13],Qt=T[14],Le=T[15];w=P[0],F+=w*Ce,j+=w*be,H+=w*qt,G+=w*Te,B+=w*Ie,E+=w*Vt,_+=w*Oe,O+=w*Re,N+=w*Gt,k+=w*$e,$+=w*Me,L+=w*Kt,M+=w*Ne,A+=w*De,D+=w*Qt,V+=w*Le,w=P[1],j+=w*Ce,H+=w*be,G+=w*qt,B+=w*Te,E+=w*Ie,_+=w*Vt,O+=w*Oe,N+=w*Re,k+=w*Gt,$+=w*$e,L+=w*Me,M+=w*Kt,A+=w*Ne,D+=w*De,V+=w*Qt,R+=w*Le,w=P[2],H+=w*Ce,G+=w*be,B+=w*qt,E+=w*Te,_+=w*Ie,O+=w*Vt,N+=w*Oe,k+=w*Re,$+=w*Gt,L+=w*$e,M+=w*Me,A+=w*Kt,D+=w*Ne,V+=w*De,R+=w*Qt,U+=w*Le,w=P[3],G+=w*Ce,B+=w*be,E+=w*qt,_+=w*Te,O+=w*Ie,N+=w*Vt,k+=w*Oe,$+=w*Re,L+=w*Gt,M+=w*$e,A+=w*Me,D+=w*Kt,V+=w*Ne,R+=w*De,U+=w*Qt,W+=w*Le,w=P[4],B+=w*Ce,E+=w*be,_+=w*qt,O+=w*Te,N+=w*Ie,k+=w*Vt,$+=w*Oe,L+=w*Re,M+=w*Gt,A+=w*$e,D+=w*Me,V+=w*Kt,R+=w*Ne,U+=w*De,W+=w*Qt,q+=w*Le,w=P[5],E+=w*Ce,_+=w*be,O+=w*qt,N+=w*Te,k+=w*Ie,$+=w*Vt,L+=w*Oe,M+=w*Re,A+=w*Gt,D+=w*$e,V+=w*Me,R+=w*Kt,U+=w*Ne,W+=w*De,q+=w*Qt,Y+=w*Le,w=P[6],_+=w*Ce,O+=w*be,N+=w*qt,k+=w*Te,$+=w*Ie,L+=w*Vt,M+=w*Oe,A+=w*Re,D+=w*Gt,V+=w*$e,R+=w*Me,U+=w*Kt,W+=w*Ne,q+=w*De,Y+=w*Qt,X+=w*Le,w=P[7],O+=w*Ce,N+=w*be,k+=w*qt,$+=w*Te,L+=w*Ie,M+=w*Vt,A+=w*Oe,D+=w*Re,V+=w*Gt,R+=w*$e,U+=w*Me,W+=w*Kt,q+=w*Ne,Y+=w*De,X+=w*Qt,Q+=w*Le,w=P[8],N+=w*Ce,k+=w*be,$+=w*qt,L+=w*Te,M+=w*Ie,A+=w*Vt,D+=w*Oe,V+=w*Re,R+=w*Gt,U+=w*$e,W+=w*Me,q+=w*Kt,Y+=w*Ne,X+=w*De,Q+=w*Qt,Z+=w*Le,w=P[9],k+=w*Ce,$+=w*be,L+=w*qt,M+=w*Te,A+=w*Ie,D+=w*Vt,V+=w*Oe,R+=w*Re,U+=w*Gt,W+=w*$e,q+=w*Me,Y+=w*Kt,X+=w*Ne,Q+=w*De,Z+=w*Qt,ae+=w*Le,w=P[10],$+=w*Ce,L+=w*be,M+=w*qt,A+=w*Te,D+=w*Ie,V+=w*Vt,R+=w*Oe,U+=w*Re,W+=w*Gt,q+=w*$e,Y+=w*Me,X+=w*Kt,Q+=w*Ne,Z+=w*De,ae+=w*Qt,se+=w*Le,w=P[11],L+=w*Ce,M+=w*be,A+=w*qt,D+=w*Te,V+=w*Ie,R+=w*Vt,U+=w*Oe,W+=w*Re,q+=w*Gt,Y+=w*$e,X+=w*Me,Q+=w*Kt,Z+=w*Ne,ae+=w*De,se+=w*Qt,ue+=w*Le,w=P[12],M+=w*Ce,A+=w*be,D+=w*qt,V+=w*Te,R+=w*Ie,U+=w*Vt,W+=w*Oe,q+=w*Re,Y+=w*Gt,X+=w*$e,Q+=w*Me,Z+=w*Kt,ae+=w*Ne,se+=w*De,ue+=w*Qt,ot+=w*Le,w=P[13],A+=w*Ce,D+=w*be,V+=w*qt,R+=w*Te,U+=w*Ie,W+=w*Vt,q+=w*Oe,Y+=w*Re,X+=w*Gt,Q+=w*$e,Z+=w*Me,ae+=w*Kt,se+=w*Ne,ue+=w*De,ot+=w*Qt,Pe+=w*Le,w=P[14],D+=w*Ce,V+=w*be,R+=w*qt,U+=w*Te,W+=w*Ie,q+=w*Vt,Y+=w*Oe,X+=w*Re,Q+=w*Gt,Z+=w*$e,ae+=w*Me,se+=w*Kt,ue+=w*Ne,ot+=w*De,Pe+=w*Qt,Ae+=w*Le,w=P[15],V+=w*Ce,R+=w*be,U+=w*qt,W+=w*Te,q+=w*Ie,Y+=w*Vt,X+=w*Oe,Q+=w*Re,Z+=w*Gt,ae+=w*$e,se+=w*Me,ue+=w*Kt,ot+=w*Ne,Pe+=w*De,Ae+=w*Qt,at+=w*Le,F+=38*R,j+=38*U,H+=38*W,G+=38*q,B+=38*Y,E+=38*X,_+=38*Q,O+=38*Z,N+=38*ae,k+=38*se,$+=38*ue,L+=38*ot,M+=38*Pe,A+=38*Ae,D+=38*at,I=1,w=F+I+65535,I=Math.floor(w/65536),F=w-I*65536,w=j+I+65535,I=Math.floor(w/65536),j=w-I*65536,w=H+I+65535,I=Math.floor(w/65536),H=w-I*65536,w=G+I+65535,I=Math.floor(w/65536),G=w-I*65536,w=B+I+65535,I=Math.floor(w/65536),B=w-I*65536,w=E+I+65535,I=Math.floor(w/65536),E=w-I*65536,w=_+I+65535,I=Math.floor(w/65536),_=w-I*65536,w=O+I+65535,I=Math.floor(w/65536),O=w-I*65536,w=N+I+65535,I=Math.floor(w/65536),N=w-I*65536,w=k+I+65535,I=Math.floor(w/65536),k=w-I*65536,w=$+I+65535,I=Math.floor(w/65536),$=w-I*65536,w=L+I+65535,I=Math.floor(w/65536),L=w-I*65536,w=M+I+65535,I=Math.floor(w/65536),M=w-I*65536,w=A+I+65535,I=Math.floor(w/65536),A=w-I*65536,w=D+I+65535,I=Math.floor(w/65536),D=w-I*65536,w=V+I+65535,I=Math.floor(w/65536),V=w-I*65536,F+=I-1+37*(I-1),I=1,w=F+I+65535,I=Math.floor(w/65536),F=w-I*65536,w=j+I+65535,I=Math.floor(w/65536),j=w-I*65536,w=H+I+65535,I=Math.floor(w/65536),H=w-I*65536,w=G+I+65535,I=Math.floor(w/65536),G=w-I*65536,w=B+I+65535,I=Math.floor(w/65536),B=w-I*65536,w=E+I+65535,I=Math.floor(w/65536),E=w-I*65536,w=_+I+65535,I=Math.floor(w/65536),_=w-I*65536,w=O+I+65535,I=Math.floor(w/65536),O=w-I*65536,w=N+I+65535,I=Math.floor(w/65536),N=w-I*65536,w=k+I+65535,I=Math.floor(w/65536),k=w-I*65536,w=$+I+65535,I=Math.floor(w/65536),$=w-I*65536,w=L+I+65535,I=Math.floor(w/65536),L=w-I*65536,w=M+I+65535,I=Math.floor(w/65536),M=w-I*65536,w=A+I+65535,I=Math.floor(w/65536),A=w-I*65536,w=D+I+65535,I=Math.floor(w/65536),D=w-I*65536,w=V+I+65535,I=Math.floor(w/65536),V=w-I*65536,F+=I-1+37*(I-1),S[0]=F,S[1]=j,S[2]=H,S[3]=G,S[4]=B,S[5]=E,S[6]=_,S[7]=O,S[8]=N,S[9]=k,S[10]=$,S[11]=L,S[12]=M,S[13]=A,S[14]=D,S[15]=V}function h(S,P){d(S,P,P)}function p(S,P){const T=n();for(let w=0;w<16;w++)T[w]=P[w];for(let w=253;w>=0;w--)h(T,T),w!==2&&w!==4&&d(T,T,P);for(let w=0;w<16;w++)S[w]=T[w]}function v(S,P){const T=new Uint8Array(32),w=new Float64Array(80),I=n(),F=n(),j=n(),H=n(),G=n(),B=n();for(let N=0;N<31;N++)T[N]=S[N];T[31]=S[31]&127|64,T[0]&=248,l(w,P);for(let N=0;N<16;N++)F[N]=w[N];I[0]=H[0]=1;for(let N=254;N>=0;--N){const k=T[N>>>3]>>>(N&7)&1;a(I,F,k),a(j,H,k),u(G,I,j),f(I,I,j),u(j,F,H),f(F,F,H),h(H,G),h(B,I),d(I,j,I),d(j,F,G),u(G,I,j),f(I,I,j),h(F,I),f(j,H,B),d(I,j,s),u(I,I,H),d(j,j,I),d(I,H,B),d(H,F,w),h(F,G),a(I,F,k),a(j,H,k)}for(let N=0;N<16;N++)w[N+16]=I[N],w[N+32]=j[N],w[N+48]=F[N],w[N+64]=H[N];const E=w.subarray(32),_=w.subarray(16);p(E,E),d(_,_,E);const O=new Uint8Array(32);return c(O,_),O}t.scalarMult=v;function b(S){return v(S,i)}t.scalarMultBase=b;function y(S){if(S.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const P=new Uint8Array(S);return{publicKey:b(P),secretKey:P}}t.generateKeyPairFromSeed=y;function m(S){const P=(0,e.randomBytes)(32,S),T=y(P);return(0,r.wipe)(P),T}t.generateKeyPair=m;function g(S,P,T=!1){if(S.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(P.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const w=v(S,P);if(T){let I=0;for(let F=0;Fi+s.length,0));const r=dU(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return D8(r)}function ege(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,S=new Uint8Array(g);y!==m;){for(var P=p[y],T=0,w=g-1;(P!==0||T>>0,S[w]=P%a>>>0,P=P/a>>>0;if(P!==0)throw new Error("Non-zero carry");b=T,y++}for(var I=g-b;I!==g&&S[I]===0;)I++;for(var F=c.repeat(v);I>>0,g=new Uint8Array(m);p[v];){var S=r[p.charCodeAt(v)];if(S===255)return;for(var P=0,T=m-1;(S!==0||P>>0,g[T]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error("Non-zero carry");y=P,v++}if(p[v]!==" "){for(var w=m-y;w!==m&&g[w]===0;)w++;for(var I=new Uint8Array(b+(m-w)),F=b;w!==m;)I[F++]=g[w++];return I}}}function h(p){var v=d(p);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:d,decode:h}}var tge=ege,rge=tge;const nge=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},ige=t=>new TextEncoder().encode(t),sge=t=>new TextDecoder().decode(t);class oge{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class age{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return hU(this,e)}}class cge{constructor(e){this.decoders=e}or(e){return hU(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const hU=(t,e)=>new cge({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class lge{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new oge(e,r,n),this.decoder=new age(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ub=({name:t,prefix:e,encode:r,decode:n})=>new lge(t,e,r,n),Z1=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=rge(r,e);return Ub({prefix:t,name:e,encode:n,decode:s=>nge(i(s))})},uge=(t,e,r,n)=>{const i={};for(let u=0;u=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},fge=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<Ub({prefix:e,name:t,encode(i){return fge(i,n,r)},decode(i){return uge(i,n,r,t)}}),dge=Ub({prefix:"\0",name:"identity",encode:t=>sge(t),decode:t=>ige(t)}),hge=Object.freeze(Object.defineProperty({__proto__:null,identity:dge},Symbol.toStringTag,{value:"Module"})),pge=an({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),vge=Object.freeze(Object.defineProperty({__proto__:null,base2:pge},Symbol.toStringTag,{value:"Module"})),mge=an({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),yge=Object.freeze(Object.defineProperty({__proto__:null,base8:mge},Symbol.toStringTag,{value:"Module"})),gge=Z1({prefix:"9",name:"base10",alphabet:"0123456789"}),bge=Object.freeze(Object.defineProperty({__proto__:null,base10:gge},Symbol.toStringTag,{value:"Module"})),wge=an({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Ege=an({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),xge=Object.freeze(Object.defineProperty({__proto__:null,base16:wge,base16upper:Ege},Symbol.toStringTag,{value:"Module"})),Cge=an({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Sge=an({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),kge=an({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Age=an({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),_ge=an({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Pge=an({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Tge=an({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Ige=an({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Oge=an({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Rge=Object.freeze(Object.defineProperty({__proto__:null,base32:Cge,base32hex:_ge,base32hexpad:Tge,base32hexpadupper:Ige,base32hexupper:Pge,base32pad:kge,base32padupper:Age,base32upper:Sge,base32z:Oge},Symbol.toStringTag,{value:"Module"})),$ge=Z1({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Mge=Z1({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Nge=Object.freeze(Object.defineProperty({__proto__:null,base36:$ge,base36upper:Mge},Symbol.toStringTag,{value:"Module"})),Dge=Z1({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Lge=Z1({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Bge=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Dge,base58flickr:Lge},Symbol.toStringTag,{value:"Module"})),Fge=an({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),jge=an({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Uge=an({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),zge=an({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Wge=Object.freeze(Object.defineProperty({__proto__:null,base64:Fge,base64pad:jge,base64url:Uge,base64urlpad:zge},Symbol.toStringTag,{value:"Module"})),pU=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Hge=pU.reduce((t,e,r)=>(t[r]=e,t),[]),qge=pU.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function Vge(t){return t.reduce((e,r)=>(e+=Hge[r],e),"")}function Gge(t){const e=[];for(const r of t){const n=qge[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const Kge=Ub({prefix:"🚀",name:"base256emoji",encode:Vge,decode:Gge}),Qge=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Kge},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const DT={...hge,...vge,...yge,...bge,...xge,...Rge,...Nge,...Bge,...Wge,...Qge};function vU(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const LT=vU("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Q2=vU("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=dU(t.length);for(let r=0;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new ebe:typeof navigator<"u"?UT(navigator.userAgent):abe()}function sbe(t){return t!==""&&nbe.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var s=i.exec(t);return!!s&&[n,s]},!1)}function UT(t){var e=sbe(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new Zge;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length0;)k=D[U],V.call(R,k,L[k]);this._listeners={},this._listenersCount=0,W()}}});function m(k,$,L,M){var A=Object.assign({},$);if(!k)return A;if(typeof k!="object")throw TypeError("options must be an object");var D=Object.keys(k),V=D.length,R,U,W;function q(X){throw Error('Invalid "'+R+'" option value'+(X?". Reason: "+X:""))}for(var Y=0;Y0;)if(R===k[U])return D;V($)}}var P=S(["function"]),T=S(["object","function"]);function w(k,$,L){var M,A,D=0,V,R=new k(function(U,W,q){L=m(L,{timeout:0,overload:!1},{timeout:function(Z,ae){return Z*=1,(typeof Z!="number"||Z<0||!Number.isFinite(Z))&&ae("timeout must be a positive number"),Z}}),M=!L.overload&&typeof k.prototype.cancel=="function"&&typeof q=="function";function Y(){A&&(A=null),D&&(clearTimeout(D),D=0)}var X=function(Z){Y(),U(Z)},Q=function(Z){Y(),W(Z)};M?$(X,Q,q):(A=[function(Z){Q(Z||Error("canceled"))}],$(X,Q,function(Z){if(V)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Z!="function")throw TypeError("onCancel callback must be a function");A.push(Z)}),V=!0),L.timeout>0&&(D=setTimeout(function(){var Z=Error("timeout");Z.code="ETIMEDOUT",D=0,R.cancel(Z),W(Z)},L.timeout))});return M||(R.cancel=function(U){if(A){for(var W=A.length,q=1;q0;)Q=Ae[R],Q!=="_listeners"&&(at=B(k,$,L[Q],M+1,A),at&&(X?X.push.apply(X,at):X=at));return X}else if(ot==="**"){for(ue=M+1===A||M+2===A&&Pe==="*",ue&&L._listeners&&(X=B(k,$,L,A,A)),Ae=f(L),R=Ae.length;R-- >0;)Q=Ae[R],Q!=="_listeners"&&(Q==="*"||Q==="**"?(L[Q]._listeners&&!ue&&(at=B(k,$,L[Q],A,A),at&&(X?X.push.apply(X,at):X=at)),at=B(k,$,L[Q],M,A)):Q===Pe?at=B(k,$,L[Q],M+2,A):at=B(k,$,L[Q],M,A),at&&(X?X.push.apply(X,at):X=at));return X}else L[ot]&&(X=B(k,$,L[ot],M+1,A));if(Z=L["*"],Z&&B(k,$,Z,M+1,A),ae=L["**"],ae)if(M0;)Q=Ae[R],Q!=="_listeners"&&(Q===Pe?B(k,$,ae[Q],M+2,A):Q===ot?B(k,$,ae[Q],M+1,A):(se={},se[Q]=ae[Q],B(k,$,{"**":se},M+1,A)));else ae._listeners?B(k,$,ae,A,A):ae["*"]&&ae["*"]._listeners&&B(k,$,ae["*"],A,A);return X}function j(k,$,L){var M=0,A=0,D,V=this.delimiter,R=V.length,U;if(typeof k=="string")if((D=k.indexOf(V))!==-1){U=new Array(5);do U[M++]=k.slice(A,D),A=D+R;while((D=k.indexOf(V,A))!==-1);U[M++]=k.slice(A)}else U=[k],M=1;else U=k,M=k.length;if(M>1){for(D=0;D+10&&W._listeners.length>this._maxListeners&&(W._listeners.warned=!0,p.call(this,W._listeners.length,q))):W._listeners=$,!0;return!0}function H(k,$,L,M){for(var A=f(k),D=A.length,V,R,U,W=k._listeners,q;D-- >0;)R=A[D],V=k[R],R==="_listeners"?U=L:U=L?L.concat(R):[R],q=M||typeof R=="symbol",W&&$.push(q?U:U.join(this.delimiter)),typeof V=="object"&&H.call(this,V,$,U,q);return $}function G(k){for(var $=f(k),L=$.length,M,A,D;L-- >0;)A=$[L],M=k[A],M&&(D=!0,A!=="_listeners"&&!G(M)&&delete k[A]);return D}function F(k,$,L){this.emitter=k,this.event=$,this.listener=L}F.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function E(k,$,L){if(L===!0)A=!0;else if(L===!1)M=!0;else{if(!L||typeof L!="object")throw TypeError("options should be an object or true");var M=L.async,A=L.promisify,D=L.nextTick,V=L.objectify}if(M||D||A){var R=$,U=$._origin||$;if(D&&!o)throw Error("process.nextTick is not supported");A===r&&(A=$.constructor.name==="AsyncFunction"),$=function(){var W=arguments,q=this,Y=this.event;return A?D?Promise.resolve():new Promise(function(X){u(X)}).then(function(){return q.event=Y,R.apply(q,W)}):(D?process.nextTick:u)(function(){q.event=Y,R.apply(q,W)})},$._async=!0,$._origin=U}return[$,V?new F(this,k,$):this]}function _(k){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,k)}_.EventEmitter2=_,_.prototype.listenTo=function(k,$,L){if(typeof k!="object")throw TypeError("target musts be an object");var M=this;L=m(L,{on:r,off:r,reducers:r},{on:P,off:P,reducers:T});function A(D){if(typeof D!="object")throw TypeError("events must be an object");var V=L.reducers,R=I.call(M,k),U;R===-1?U=new y(M,k,L):U=M._observers[R];for(var W=f(D),q=W.length,Y,X=typeof V=="function",Q=0;Q0;)A=L[M],(!k||A._target===k)&&(A.unsubscribe($),D=!0);return D},_.prototype.delimiter=".",_.prototype.setMaxListeners=function(k){k!==r&&(this._maxListeners=k,this._conf||(this._conf={}),this._conf.maxListeners=k)},_.prototype.getMaxListeners=function(){return this._maxListeners},_.prototype.event="",_.prototype.once=function(k,$,L){return this._once(k,$,!1,L)},_.prototype.prependOnceListener=function(k,$,L){return this._once(k,$,!0,L)},_.prototype._once=function(k,$,L,M){return this._many(k,1,$,L,M)},_.prototype.many=function(k,$,L,M){return this._many(k,$,L,!1,M)},_.prototype.prependMany=function(k,$,L,M){return this._many(k,$,L,!0,M)},_.prototype._many=function(k,$,L,M,A){var D=this;if(typeof L!="function")throw new Error("many only accepts instances of Function");function V(){return--$===0&&D.off(k,V),L.apply(this,arguments)}return V._origin=L,this._on(k,V,M,A)},_.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var k=arguments[0],$,L=this.wildcard,M,A,D,V,R;if(k==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(L&&($=k,k!=="newListener"&&k!=="removeListener"&&typeof k=="object")){if(A=k.length,a){for(D=0;D3)for(M=new Array(U-1),V=1;V3)for(A=new Array(W-1),R=1;R0&&this._events[k].length>this._maxListeners&&(this._events[k].warned=!0,p.call(this,this._events[k].length,k))):this._events[k]=$,A)},_.prototype.off=function(k,$){if(typeof $!="function")throw new Error("removeListener only takes instances of Function");var L,M=[];if(this.wildcard){var A=typeof k=="string"?k.split(this.delimiter):k.slice();if(M=B.call(this,null,A,this.listenerTree,0),!M)return this}else{if(!this._events[k])return this;L=this._events[k],M.push({_listeners:L})}for(var D=0;D0){for(M=this._all,$=0,L=M.length;$0;)M=$[L[D]],typeof M=="function"?A.push(M):A.push.apply(A,M);return A}else{if(this.wildcard){if(V=this.listenerTree,!V)return[];var R=[],U=typeof k=="string"?k.split(this.delimiter):k.slice();return B.call(this,R,U,V,0),R}return $?(M=$[k],M?typeof M=="function"?[M]:M:[]):[]}},_.prototype.eventNames=function(k){var $=this._events;return this.wildcard?H.call(this,this.listenerTree,[],null,k):$?f($):[]},_.prototype.listenerCount=function(k){return this.listeners(k).length},_.prototype.hasListeners=function(k){if(this.wildcard){var $=[],L=typeof k=="string"?k.split(this.delimiter):k.slice();return B.call(this,$,L,this.listenerTree,0),$.length>0}var M=this._events,A=this._all;return!!(A&&A.length||M&&(k===r?f(M).length:M[k]))},_.prototype.listenersAny=function(){return this._all?this._all:[]},_.prototype.waitFor=function(k,$){var L=this,M=typeof $;return M==="number"?$={timeout:$}:M==="function"&&($={filter:$}),$=m($,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:P,Promise:g}),w($.Promise,function(A,D,V){function R(){var U=$.filter;if(!(U&&!U.apply(L,arguments)))if(L.off(k,R),$.handleError){var W=arguments[0];W?D(W):A(v.apply(null,arguments).slice(1))}else A(v.apply(null,arguments))}V(function(){L.off(k,R)}),L._on(k,R,!1)},{timeout:$.timeout,overload:$.overload})};function O(k,$,L){L=m(L,{Promise,timeout:0,overload:!1},{Promise:g});var M=L.Promise;return w(M,function(A,D,V){var R;if(typeof k.addEventListener=="function"){R=function(){A(v.apply(null,arguments))},V(function(){k.removeEventListener($,R)}),k.addEventListener($,R,{once:!0});return}var U=function(){W&&k.removeListener("error",W),A(v.apply(null,arguments))},W;$!=="error"&&(W=function(q){k.removeListener($,U),D(q)},k.once("error",W)),V(function(){W&&k.removeListener("error",W),k.removeListener($,U)}),k.once($,U)},{timeout:L.timeout,overload:L.overload})}var N=_.prototype;Object.defineProperties(_,{defaultMaxListeners:{get:function(){return N._maxListeners},set:function(k){if(typeof k!="number"||k<0||Number.isNaN(k))throw TypeError("n must be a non-negative number");N._maxListeners=k},enumerable:!0},once:{value:O,writable:!0,configurable:!0}}),Object.defineProperties(N,{_maxListeners:{value:s,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return _}):t.exports=_})()})(Dj);var Rb=Dj.exports;function Yn(){return Yn=Object.assign?Object.assign.bind():function(t){for(var e=1;e++Nme;class Y1{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Rb.EventEmitter2,this.sendAsync=async function(r,n,i){e.state===Oi.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},i);try{e.isOpened()||await e.waitUntilOpened();const s=await e.sendMessageRequest({idx:jj(),type:Ke.MESSAGE,data:r,chainId:i});n(void 0,s.data)}catch(s){n(s)}},this.sendMessageRequest=async function(r){return new Promise((n,i)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&i(new Error("message idx not set"));const s=(a,c)=>{if(a)i(a);else if(c)n(c);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?i(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,s),e.isOpened()?e.sendMessage(r):(ge.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=T8){let n=!1;return Promise.race([new Promise((i,s)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Oi.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),s(new Error("opening wallet timed out"))},r)}),new Promise(i=>{if(e.isOpened()){var s;n=!0,i((s=e.openPayload)==null?void 0:s.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,i(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(i=>{if(e.connectPayload){i(e.connectPayload);return}e.events.once("connect",s=>{e.connectPayload=s,i(s)})}),n=new Promise((i,s)=>{e.events.once("close",o=>{s(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=Oi.CLOSED,this._registered=!1,this._init=Ut.NIL}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}openWallet(e,r,n){throw new Error("abstract method")}closeWallet(){throw new Error("abstract method")}isOpened(){return this.registered&&this.state===Oi.OPENED}isConnected(){var e;const r=(e=this.openPayload)==null?void 0:e.session;return this.registered&&r!==void 0&&!!r.accountAddress&&r.accountAddress.length===42&&!!r.networks&&r.networks.length>0}handleMessage(e){var r=this;if(e.type===Ke.INIT){ge.debug("MessageProvider, received INIT message",e);const{nonce:c}=e.data;if(!c||c.length==0){ge.error("invalid init nonce");return}this._init=Ut.OK,this.sendMessage({idx:-1,type:Ke.INIT,data:{sessionId:this._sessionId,nonce:c}})}if(this._init!==Ut.OK)return;ge.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,i=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Ke.OPEN&&!this.isOpened()){var s,o;if(this._sessionId&&this._sessionId!==((s=e.data)==null?void 0:s.sessionId)){ge.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const c=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw ge.error(c),this.close(),c}this.state=Oi.OPENED,this.openPayload=e.data,this.events.emit("open",this.openPayload),this.pendingMessageRequests.length!==0&&this.pendingMessageRequests.splice(0,this.pendingMessageRequests.length).forEach(async function(l){r.sendMessage(l)});return}if(e.type===Ke.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!i)throw new Error("impossible state");if(i){this.events.emit("message",e),i(e.data.error,e);return}}if(e.type===Ke.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[qe(e.data[0])],origin:e.origin},this.events.emit("accountsChanged",this.accountsChangedPayload.accounts,this.accountsChangedPayload.origin)):this.events.emit("accountsChanged",[],e.origin);return}if(e.type===Ke.CHAIN_CHANGED){this.events.emit("chainChanged",e.data,e.origin);return}if(e.type===Ke.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Ke.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Ke.CLOSE&&this.state!==Oi.CLOSED&&this.close(e.data),e.type===Ke.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Ke.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data,e.origin),this.close())}sendMessage(e){throw new Error("abstract method")}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}emit(e,...r){return this.events.emit(e,...r)}close(e){this.state!==Oi.CLOSED&&(this.state=Oi.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,ge.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(Yn({},new Error("wallet closed"),{code:4001}))}),this.responseCallbacks.clear(),this.connectPayload=void 0,this.openPayload=void 0,this.accountsChangedPayload=void 0,this.networksPayload=void 0,this.walletContextPayload=void 0,this.events.emit("close",e))}}function Dme(t){return Lme.some(e=>e.predicate(t))}const Lme=[{name:"Decentraland Exception",predicate:Bme},{name:"0x v3 Exception",predicate:jme}],Fme=/^Decentraland Login\nEphemeral address: 0x[a-fA-F0-9]{40}\nExpiration: (\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/;function Bme(t){try{const e=ca(t);return Fme.test(e)}catch{return!1}}function jme(t){const e=new Fr(Ume);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const Ume=[{inputs:[{components:[{internalType:"address",name:"makerAddress",type:"address"},{internalType:"address",name:"takerAddress",type:"address"},{internalType:"address",name:"feeRecipientAddress",type:"address"},{internalType:"address",name:"senderAddress",type:"address"},{internalType:"uint256",name:"makerAssetAmount",type:"uint256"},{internalType:"uint256",name:"takerAssetAmount",type:"uint256"},{internalType:"uint256",name:"makerFee",type:"uint256"},{internalType:"uint256",name:"takerFee",type:"uint256"},{internalType:"uint256",name:"expirationTimeSeconds",type:"uint256"},{internalType:"uint256",name:"salt",type:"uint256"},{internalType:"bytes",name:"makerAssetData",type:"bytes"},{internalType:"bytes",name:"takerAssetData",type:"bytes"},{internalType:"bytes",name:"makerFeeAssetData",type:"bytes"},{internalType:"bytes",name:"takerFeeAssetData",type:"bytes"}],internalType:"struct IEIP1271Data.Order",name:"order",type:"tuple"},{internalType:"bytes32",name:"orderHash",type:"bytes32"}],name:"OrderWithHash",outputs:[],stateMutability:"pure",type:"function"}],Vv=bt(`Ethereum Signed Message: +`),Uj=t=>oa(t)||Be(t)?ne(t):bt(t),$b=t=>{const e=Uj(t);return Dme(e)?e:Wt([Vv,bt(String(e.length)),e])},zme=t=>{if(JSON.stringify(t.slice(0,Vv.length))!==JSON.stringify(Vv))return t;const e=t.slice(Vv.length),r=String(e.length).length;let n,i;try{i=Number(ca(e.slice(0,r)))}catch{i=Number(te(e.slice(0,r)))}return i>e.length||!Number.isInteger(i)?n=r-1:n=r,e.slice(n)},Vf=async(t,e,r,n)=>new he.reader.OnChainReader(n).isValidSignature(t,e,r),zj=async(t,e,r,n)=>{const i=$b(e),s=XS(i);return Vf(t,s,r,n)},Wj=(t,e,r,n)=>Vf(t,H1(e),r,n),_y=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",Hj=()=>!!navigator.userAgent.match(/UnitySequence/i),qj=t=>t.onChain.deployed&&t.fullyMigrated;class Vj{constructor(){this.callbacks=[],this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r,this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){delete this.store[e]}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}class s1{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!s1.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(i=>i.key===r).forEach(i=>i.cb(this.getItem(r)))})}getItem(e){return window.localStorage.getItem(e)}setItem(e,r){window.localStorage.setItem(e,r),this.callbacks.filter(n=>n.key===e).forEach(n=>n.cb(r))}removeItem(e){window.localStorage.removeItem(e),this.callbacks.filter(r=>r.key===e).forEach(r=>r.cb(null))}onItemChange(e,r){return this.callbacks.push({key:e,cb:r}),()=>{this.callbacks=this.callbacks.filter(n=>n.cb!==r)}}}function Py(){return s1.isAvailable()?new s1:new Vj}async function Gj(t){return Array.isArray(t)?Promise.all(t.map(e=>pt(e))):pt(t)}const R9="@sequence.transportSession";class J1{constructor(e){var r=this;this.sendAsync=async function(n,i,s){throw new Error("abstract method")},this.handleMessage=async function(n){const i=n;if(r._init!==Ut.OK){if(i.type===Ke.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(i.type){case Ke.OPEN:{if(r._init!==Ut.OK)return;const s={sessionId:i.data.sessionId,intent:i.data.intent,networkId:i.data.networkId};await r.open(s);return}case Ke.CLOSE:return r._init!==Ut.OK,void 0;case Ke.MESSAGE:{const s=await r.walletRequestHandler.sendMessageRequest(i);r.sendMessage(s),s.data.error;return}default:ge.error(`unexpected payload type ${i.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:i,networkId:s}){n&&(r._sessionId=nB(n),r.saveTransportSession({sessionId:n,intent:i,networkId:s})),r.walletRequestHandler.setOpenIntent(i),await r.init();let o;try{if(s){const a=r8(s);if(a)o=a.chainId;else throw new Error(`unknown network ${s}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(i&&i.type==="connect"&&i.options){const a=i.options,c=a;if(r.appOrigin&&c!=null&&c.origin){if(!_y()&&c.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&c!=null&&c.origin?a.origin=sB(c.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=iB(a.app)),a.networkId?s=a.networkId:s&&(a.networkId=s),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(i&&i.type==="connect"){(!o||o<=0)&&console.log("Failed to set default network on open"),r.notifyOpen({sessionId:r._sessionId});try{const a=await r.walletRequestHandler.promptConnect(i.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){ge.warn("promptConnect not connected:",a)}finally{(!i.options||i.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${s}`}),!1;r.notifyOpen({sessionId:r._sessionId,chainId:`${o}`,session:await r.walletRequestHandler.walletSession(o)})}else return r.notifyOpen({sessionId:r._sessionId}),!0;return!0},this.saveTransportSession=n=>{Py().setItem(R9,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Py().getItem(R9);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=Ut.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",(n,i)=>{this.registered&&this.notifyDisconnect(n,i)}),this.walletRequestHandler.on("accountsChanged",(n,i)=>{this.registered&&this.notifyAccountsChanged(n,i)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(gs(n.find(i=>i.isDefaultChain).chainId)))}),this.walletRequestHandler.on("chainChanged",(n,i)=>{this.notifyChainChanged(n,i)}),this.walletRequestHandler.on("walletContext",n=>{!this.registered||!n||this.notifyWalletContext(n)}),this.walletRequestHandler.on("close",n=>{this.registered&&this.notifyClose(n)})}get registered(){return this._registered}register(){throw new Error("abstract method")}unregister(){throw new Error("abstract method")}sendMessage(e){throw new Error("abstract method")}notifyOpen(e){const{chainId:r,sessionId:n,session:i,error:s}=e;this.sendMessage({idx:-1,type:Ke.OPEN,data:{chainId:r,sessionId:n,session:i,error:s}})}notifyClose(e){this.sendMessage({idx:-1,type:Ke.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Ke.CONNECT,data:e})}notifyDisconnect(e,r){this.sendMessage({idx:-1,type:Ke.DISCONNECT,data:e?{error:e}:null,origin:r})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Ke.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e,r){this.sendMessage({idx:-1,type:Ke.CHAIN_CHANGED,data:e,origin:r})}notifyNetworks(e){this.sendMessage({idx:-1,type:Ke.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Ke.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===Ut.OK)return ge.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Ke.INIT)return ge.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(ge.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(ge.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===Ut.OK){e();return}if(this._init!==Ut.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{ge.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},T8/2);this._initCallback=i=>{this._initCallback=void 0,clearTimeout(n),i?r(i):(this._init=Ut.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Ke.INIT,data:{nonce:this._initNonce}}),this._init=Ut.SENT_NONCE})}}class Wme{constructor(){const e=new i5,r=new i5;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class i5{constructor(){this.events=new Rb.EventEmitter2,this.handleMessage=e=>{throw new Error("ProxyMessageChannelPort is not registered")},this.sendMessage=e=>{this.conn.handleMessage(e),e.type==="open"&&this.events.emit("open",e),e.type==="close"&&this.events.emit("close",e),e.type==="connect"&&this.events.emit("connect",e),e.type==="disconnect"&&this.events.emit("disconnect",e)}}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}}class Kj extends Y1{constructor(e){if(super(),this.register=()=>{this.port.handleMessage=r=>{this.handleMessage(r)},this.on("open",(...r)=>{this.port.events.emit("open",...r)}),this.on("close",(...r)=>{this.port.events.emit("close",...r)}),this.on("connect",(...r)=>{this.port.events.emit("connect",...r)}),this.on("disconnect",(...r)=>{this.port.events.emit("disconnect",...r)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),this.events.removeAllListeners(),this.port.handleMessage=void 0},this.openWallet=(r,n,i)=>{if(this.state===Oi.CLOSED){this.state=Oi.OPENING;const s=`${performance.now()}`;this._sessionId=s,this.sendMessage({idx:-1,type:Ke.OPEN,data:{path:r,intent:n,networkId:i,sessionId:s}})}},this.state=Oi.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=Ut.OK}closeWallet(){this.sendMessage({idx:-1,type:Ke.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class Hme extends J1{constructor(e,r){super(e),this.port=r,this._init=Ut.OK}register(){this.port.handleMessage=e=>{this.handleMessage(e)},this._registered=!0}async restoreSession(){const e=await this.getCachedTransportSession();e&&this.open(e)}unregister(){this.port.handleMessage=void 0,this._registered=!1}sendMessage(e){this.port.sendMessage(e)}}function Qj(t){var e;if((e=window.ue)!=null&&e.sequencewallettransport&&!window.logsOverriddenForUnreal){var r;const n=(r=window.ue)==null?void 0:r.sequencewallettransport;console.log=(...i)=>{n.logfromjs(`${t}: ${K2(i)}`)},console.warn=(...i)=>{n.warnfromjs(`${t}: ${K2(i)}`)},console.error=(...i)=>{n.errorfromjs(`${t}: ${K2(i)}`)},window.logsOverriddenForUnreal=!0}}function K2(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let gu;class Yj extends Y1{constructor(e){super(),this.register=()=>{var r;Qj("dapp"),gu&&(gu.unregister(),gu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),gu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),gu===this&&(gu=void 0),((r=window.ue)==null||(n=r.sequencewallettransport)==null?void 0:n.onmessagefromwallet)===this.onUnrealCallback&&delete window.ue.sequencewallettransport.onmessagefromwallet,this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const s=new URL(this.walletURL.href),o=new Q1;r&&(s.pathname=r.toLowerCase()),this._init=Ut.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",YS(n)),i&&o.set("net",`${i}`),s.search=o.toString(),console.log("opening wallet to",s.href),window.open(s.href)},this.onUnrealCallback=r=>{if(!r)throw new Error("ProviderMessage object is empty");this.handleMessage(r)},this.walletURL=new URL(e)}closeWallet(){this.close()}sendMessage(e){var r,n;const i=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",i),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(i)}}class qme extends J1{constructor(e){super(e),this.onMessageFromUnreal=r=>{ge.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new Q1(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:JS(n.get("intent"))}},this._init=Ut.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;Qj("wallet");const{search:n}=new URL(e||window.location.href);let i=this.getUnrealTransportSession(n);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){ge.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(i).then(o=>{if(!o){var a;const c=`failed to open to network ${(a=i)==null?void 0:a.networkId}`;ge.error(c),this.notifyClose({message:c}),window.close()}}).catch(o=>{var a;const c=`failed to open to network ${(a=i)==null?void 0:a.networkId}, due to: ${o}`;ge.error(c),this.notifyClose({message:c}),window.close()})}unregister(){var e,r;((e=window.ue)==null||(r=e.sequencewallettransport)==null?void 0:r.onmessagefromsequencejs)===this.onMessageFromUnreal&&delete window.ue.sequencewallettransport.onmessagefromsequencejs,this._registered=!1}sendMessage(e){var r,n;if(e.type!==Ke.INIT&&this._init!==Ut.OK){ge.error("impossible state, should not be calling postMessage until inited");return}const i=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(i)}}const I8="sequence-extension-message-handler";class Vme extends J1{constructor(e,r){super(e),this.runtime=r,this._init=Ut.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:I8})}sendMessage(e){ge.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class Jj extends Y1{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===I8&&(this._init=Ut.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class Gme extends Rb.EventEmitter2{constructor(e){var r;super(),r=this,this.responseCallbacks=new Map,this._messageIdx=0,this.nextMessageIdx=()=>++this._messageIdx,this.handleMessage=n=>{if(!n.type||!n.data)return;ge.info("[received message]",n);const i=n.idx,s=this.responseCallbacks.get(i);switch(i&&this.responseCallbacks.delete(i),n.type){case Ke.MESSAGE:if(s)this.emit(Ke.MESSAGE,n),s(n.data.error,n);else throw new Error("impossible state");break;case Ke.DISCONNECT:case Ke.ACCOUNTS_CHANGED:case Ke.CHAIN_CHANGED:this.emit(n.type,n.data);break;default:console.error("unknown message type",n);break}},this.sendMessageRequest=async function(n){return new Promise((i,s)=>{(!n.idx||n.idx<=0)&&s(new Error("message idx not set"));const o=(c,l)=>{if(c)s(c);else if(l)i(l);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?s(new Error("duplicate message idx, should never happen")):r.responseCallbacks.set(a,o),r.sendMessage(n)})},this.stream=e,this.stream.on("data",this.handleMessage)}sendMessage(e){this.stream.writable||console.error("window post message stream is not writable"),this.stream.write(e)}}let bu;class Xj extends Y1{constructor(e){super(),this.register=()=>{bu&&(bu.unregister(),bu=this),window.addEventListener("message",this.onWindowEvent),bu=this,this.on("open",()=>{const r=this.walletWindow,n=setInterval(()=>{r&&r.closed&&(clearInterval(n),this.close())},500)}),this.on("close",()=>{this.walletWindow&&(this.walletWindow.close(),this.walletWindow=null)}),this._registered=!0},this.unregister=()=>{this._registered=!1,this.closeWallet(),bu===this&&(bu=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,i)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const s=new URL(this.walletURL.href),o=new Q1;r&&r!==""&&(s.pathname=r.toLowerCase()),this._init=Ut.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!_y()&&!Hj()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",YS(n))),i&&o.set("net",`${i}`);let a,c;_y()?(a=[450,750],c=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],c=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const l=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${c[0]},top=${c[1]}`;s.search=o.toString(),this.walletWindow=window.open(s.href,"sequence.app",l)},this.onWindowEvent=r=>{if(r.origin!==this.walletURL.origin)return;let n;try{n=JSON.parse(r.data)}catch{return}if(!n)throw new Error("ProviderMessage object is empty");this.handleMessage(n)},this.walletURL=new URL(e)}closeWallet(){var e;this.close(),(e=this.walletWindow)==null||e.close()}sendMessage(e){if(!this.walletWindow){ge.warn("WindowMessageProvider: sendMessage failed as walletWindow is unavailable");return}const r=typeof e!="string"?JSON.stringify(e):e;this.walletWindow.postMessage(r,this.walletURL.origin)}}class Kme extends J1{constructor(e){var r;super(e),r=this,this._isPopup=!1,this.onWindowEvent=async function(n){if(!n.origin||n.origin===""||r.appOrigin&&n.origin!==r.appOrigin)return;let i;try{i=JSON.parse(n.data)}catch{return}if(ge.debug("RECEIVED MESSAGE",i),r._init!==Ut.OK&&r.isValidInitAck(i)&&(r.appOrigin=n.origin),r._init===Ut.OK&&(!r.appOrigin||r.appOrigin.length<8)){ge.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(i)},this.getWindowTransportSession=n=>{const i=new Q1(n);return{sessionId:i.get("sid"),networkId:i.get("net"),intent:JS(i.get("intent"))}},this._init=Ut.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:i}=new URL(e||window.location.href);let s=this.getWindowTransportSession(i);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){ge.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(s).then(a=>{if(!a){var c;const l=`failed to open to network ${(c=s)==null?void 0:c.networkId}`;ge.error(l),this.notifyClose({message:l}),window.close()}}).catch(a=>{var c;const l=`failed to open to network ${(c=s)==null?void 0:c.networkId}, due to: ${a}`;ge.error(l),this.notifyClose({message:l}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Ke.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==Ut.OK){ge.error("impossible state, should not be calling postMessage until inited");return}r?this.parentWindow.postMessage(e,"*"):this.appOrigin&&this.appOrigin.length>4?this.parentWindow.postMessage(e,this.appOrigin):ge.error("unable to postMessage as parentOrigin is invalid")}}function Zj(t){return t&&typeof t=="object"&&(t.windowTransport&&typeof t.windowTransport=="object"||t.proxyTransport&&typeof t.proxyTransport=="object"||t.extensionTransport&&typeof t.extensionTransport=="object"||t.unrealTransport&&typeof t.unrealTransport=="object")&&(t.windowTransport&&t.windowTransport.enabled||t.proxyTransport&&t.proxyTransport.enabled||t.extensionTransport&&t.extensionTransport.enabled||t.unrealTransport&&t.unrealTransport.enabled)}class Mb{constructor(...e){var r=this;this.register=()=>{if(this.messageProviders.length===1){this.provider=this.messageProviders[0],this.provider.register();return}this.messageProviders.forEach(n=>{n.register(),n.once("open",()=>{this.provider||(this.provider=n,this.messageProviders.forEach(i=>{this.provider!==i&&i.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,i,s)=>{if(this.provider){this.provider.openWallet(n,i,s);return}this.messageProviders.forEach(o=>o.openWallet(n,i,s))},this.sendAsync=async function(n,i,s){if(r.provider){r.provider.sendAsync(n,i,s);return}throw new Error("impossible state, wallet must be opened first")},this.sendMessageRequest=async function(n){if(r.provider)return r.provider.sendMessageRequest(n);throw new Error("impossible state, wallet must be opened first")},this.waitUntilOpened=async function(){return r.provider?r.provider.waitUntilOpened():Promise.race(r.messageProviders.map(n=>n.waitUntilOpened()))},this.waitUntilConnected=async function(){if(r.provider)return r.provider.waitUntilConnected();throw new Error("impossible state, wallet must be opened first")},this.messageProviders=e,this.provider=void 0}static new(e){var r,n,i,s;const o=new Mb;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new Xj(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new Kj(e.proxyTransport.appPort);o.add(a)}if((i=e.extensionTransport)!=null&&i.enabled){const a=new Jj(e.extensionTransport.runtime);o.add(a)}if((s=e.unrealTransport)!=null&&s.enabled&&e.windowTransport&&e.walletAppURL){const a=new Yj(e.walletAppURL);o.add(a)}return o.register(),o}add(...e){this.messageProviders.push(...e)}closeWallet(){this.provider&&this.provider.closeWallet()}isOpened(){return this.provider?this.provider.isOpened():!1}isConnected(){return this.provider?this.provider.isConnected():!1}on(e,r){if(this.provider){this.provider.on(e,r);return}this.messageProviders.forEach(n=>{n.on(e,r)})}once(e,r){if(this.provider){this.provider.once(e,r);return}this.messageProviders.forEach(n=>{n.once(e,r)})}emit(e,...r){if(this.provider)return this.provider.emit(e,...r);for(let n=0;nJme(t,i))}function Jme(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data){const r=ne(e.data);if(r.length>=4&&!Xme(r))throw new Error("self calls are forbidden")}if(e.delegateCall)throw new Error("delegate calls are forbidden")}function Xme(t){const e=new Fr(tn.mainModule.abi);try{return e.decodeFunctionData("createContract",t),!0}catch{return!1}}const Zme=1e4;class eye{constructor(e,r,n){var i=this;this.signerReadyCallbacks=[],this.events=new Rb.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(s){if(!s&&!i._connectOptions)throw new Error("prompter connect options are empty");if(!i.prompter)return i.connect(s);const o=await i.prompter.promptConnect(s||i._connectOptions).catch(c=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await i.walletSession(s==null?void 0:s.networkId)),o},this.sendAsync=async function(s,o,a){const c={jsonrpc:"2.0",id:s.id,result:null};await i.getAccount();try{var l;if((!i.account||i.account===null)&&!tye.includes(s.method))throw Bj;const f=i.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const d=(l=i.account)==null?void 0:l.providerFor(a??i.defaultChainId());if(!d)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const h=d instanceof Go?d:void 0;switch(s.method){case"net_version":{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send("net_version",[]);c.result=p;break}case"eth_chainId":{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send("eth_chainId",[]);c.result=p;break}case"eth_accounts":{const p=f.address;c.result=[p];break}case"eth_getBalance":{const[p,v]=s.params,b=await d.getBalance(p,v);c.result=b.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let p;switch(s.method){case"sequence_sign":case"personal_sign":{const[m,g]=s.params;p=m;break}case"eth_sign":{const[m,g]=s.params;p=g;break}}let v="";const b=$b(p),y=s.method==="sequence_sign";if(i.prompter===null?v=await f.signMessage(b,a??i.defaultChainId(),y?"eip6492":"ignore"):v=await i.prompter.promptSignMessage({chainId:a,message:b,eip6492:y},i.connectOptions),v&&v.length>0)c.result=v;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[p,v]=s.params;let b;if(typeof v=="string")try{b=JSON.parse(v)}catch(g){console.warn("walletRequestHandler: error parsing typedData",g)}else b=v;if(!b||!b.domain||!b.types||!b.message)throw new Error("invalid typedData object");let y="";const m=s.method==="sequence_signTypedData_v4";if(i.prompter===null?y=await f.signTypedData(b.domain,b.types,b.message,a??i.defaultChainId(),m?"eip6492":"ignore"):y=await i.prompter.promptSignMessage({chainId:a,typedData:b,eip6492:m},i.connectOptions),y&&y.length>0)c.result=y;else throw new Error("declined by user");break}case"eth_sendTransaction":{const p=Yme(s.params[0]).map(b=>("gas"in b&&b.gasLimit===void 0&&(b.gasLimit=b.gas,delete b.gas),b));$9(f.address,p);let v="";if(i.prompter===null){var u;const b=await f.sendTransaction(p,a??i.defaultChainId());v=(u=b==null?void 0:b.hash)!=null?u:""}else v=await i.prompter.promptSendTransaction(p,a,i.connectOptions);if(v)c.result=v;else throw new Error("declined by user");break}case"eth_signTransaction":{const[p]=s.params;if(qe(p.from)!==f.address)throw new Error("sender address does not match wallet");$9(f.address,p),i.prompter===null?c.result=await f.signTransactions(p,a??i.defaultChainId()):c.result=await i.prompter.promptSignTransaction(p,a,i.connectOptions);break}case"eth_sendRawTransaction":{if(he.transaction.isSignedTransactionBundle(s.params[0])){const p=J.from(s.params[0].chainId).toNumber(),v=await f.relayer(p).relay(s.params[0]);c.result=v.hash}else{const p=await d.sendTransaction(s.params[0]);c.result=p.hash}break}case"eth_getTransactionCount":{const p=qe(s.params[0]),v=s.params[1],b=await d.getTransactionCount(p,v);c.result=J.from(b).toHexString();break}case"eth_blockNumber":{c.result=await d.getBlockNumber();break}case"eth_getBlockByNumber":{c.result=await d.getBlock(s.params[0]);break}case"eth_getBlockByHash":{c.result=await d.getBlock(s.params[0]);break}case"eth_getTransactionByHash":{c.result=await d.getTransaction(s.params[0]);break}case"eth_call":{const[p,v]=s.params;c.result=await d.call(p,v);break}case"eth_getCode":{const[p,v]=s.params;c.result=await d.getCode(p,v);break}case"eth_estimateGas":{const[p]=s.params;c.result=await d.estimateGas(p);break}case"eth_gasPrice":{const p=await d.getGasPrice();c.result=p.toHexString();break}case"wallet_switchEthereumChain":{const[p]=s.params;if(!p.chainId||p.chainId.length===0)throw new Error("invalid chainId");const v=J.from(p.chainId);i.setDefaultChainId(v.toNumber()),c.result=null;break}case"sequence_getWalletContext":{c.result=f.contexts;break}case"sequence_getWalletConfig":{const[p]=s.params;p?c.result=[(await f.status(p)).onChain.config]:c.result=await Promise.all(f.networks.map(async function(v){return(await f.status(v.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[p]=s.params;p?c.result=[M9(p,await f.status(p))]:c.result=await Promise.all(f.networks.map(async function(v){const b=await f.status(v.chainId);return M9(v.chainId,b)}));break}case"sequence_getNetworks":{c.result=await i.getNetworks(!0);break}case"sequence_isSequence":{c.result=!0;break}case"sequence_updateConfig":throw new Error("sequence_updateConfig method is not allowed from a dapp");case"sequence_publishConfig":throw new Error("sequence_publishConfig method is not allowed from a dapp");case"sequence_gasRefundOptions":break;case"sequence_getNonce":break;case"sequence_relay":break;case"sequence_setDefaultNetwork":{const[p]=s.params;if(!p)throw new Error("invalid request, method argument defaultChainId cannot be empty");i.setDefaultChainId(p),c.result=await i.getNetworks(!0);break}default:{if(!h)throw new Error("Account provider doesn't support send method");const p=await h.send(s.method,s.params);c.result=p}}}catch(f){ge.error(f),c.result=null,c.error=Yn({},new Error(f),{code:4001})}o(void 0,c)},this.isSignedIn=async function(){return await i.signerReady(),!!i.account},this.getAccount=async function(){if(await i.signerReady(),i.account===void 0)throw new Error("signerReady failed resolve");return i.account},this.account=e,this.prompter=r,this.networks=n}defaultChainId(){var e,r;return(e=(r=this.prompter)==null?void 0:r.getDefaultChainId())!=null?e:this.networks[0].chainId}async signIn(e,r={}){this.setAccount(e);const{connect:n,defaultNetworkId:i}=r;if(n){const a=this._connectOptions;let c;if(this.prompter!==null){var s;c=await((s=this.prompter)==null?void 0:s.promptSignInConnect(a))}else c=await this.connect(a);this.notifyConnect(c),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(i&&this.defaultChainId()!==i){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(i))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=Zme){return new Promise((r,n)=>{this.account!==void 0?r():(setTimeout(()=>{this.account===void 0&&(this.signerReadyCallbacks=[],n("signerReady timed out"))},e),this.signerReadyCallbacks.push(r))})}async connect(e){var r,n;if(!this.account)return{connected:!1,chainId:"0x0",error:"unable to connect without signed in account"};const i=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:le.MAINNET,s=r8(i).chainId,o={connected:!0,chainId:gs(s)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry,nonce:e.authorizeNonce};try{o.proof=await _j(this.account,s,a)}catch(c){return ge.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${c.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${c.message}`}}}return o.session=this.walletSession(s),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,i)=>{const s=Yn({},e,{data:i});r(s)},e.chainId)})}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}async getAddress(){var e,r;return(e=(r=this.account)==null?void 0:r.address)!=null?e:""}get openIntent(){return this._openIntent}setOpenIntent(e){this._openIntent=e}get connectOptions(){return this._connectOptions}setConnectOptions(e){var r;this._connectOptions=e,(r=this.onConnectOptionsChange)==null||r.call(this,e)}async setDefaultChainId(e){var r;return await((r=this.prompter)==null?void 0:r.promptChangeNetwork(e)),this.defaultChainId()}async getNetworks(e){return this.account?e?this.account.networks.map(r=>{const n=Yn({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(ge.warn("signer not set: getNetworks is returning an empty list"),[])}walletSession(e){if(!this.account)return;const r={walletContext:this.account.contexts,accountAddress:this.account.address,networks:this.account.networks.map(i=>Yn({},i,{provider:void 0,relayer:void 0}))};if(e){const i=ws(r.networks,e);if(i){var n;(n=r.networks)==null||n.forEach(s=>delete s.isDefaultChain),i.isDefaultChain=!0}}return r}notifyConnect(e,r){var n;if(console.log("emit connect",e),this.events.emit("connect",e),(n=e.session)!=null&&n.accountAddress){var i;this.events.emit("accountsChanged",[(i=e.session)==null?void 0:i.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect",void 0,e)}notifyChainChanged(e,r){this.events.emit("chainChanged",gs(e),r)}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(i=>i.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",gs(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){ge.warn("signer not set: skipping to notify wallet context");return}const e=this.account.contexts;this.events.emit("walletContext",e)}notifyClose(e){this.events.emit("close",e)}setAccount(e){if(this.account=e,e!==void 0){for(let r=0;rc.canOnchainValidate||c.original.version===2&&n,o=await r.status(i);if(s(o))return!0;if(await e.promptConfirmWalletDeploy(i,this.connectOptions)){const c=await r.status(i);return s(c)?!0:(ge.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function M9(t,e){return{context:e.original.context,config:e.onChain.config,address:he.context.addressOf(e.original.context,e.original.imageHash),chainId:t,deployed:e.onChain.deployed,imageHash:e.imageHash,lastImageHash:e.onChain.imageHash,published:!0,status:e}}const tye=["net_version","eth_chainId","eth_getBalance","eth_getTransactionCount","eth_blockNumber","eth_getBlockByNumber","eth_getBlockByHash","eth_getTransactionByHash","eth_getCode","eth_estimateGas","eth_gasPrice","sequence_getWalletContext","sequence_getNetworks","sequence_setDefaultNetwork"];class Sd{get utils(){return this.provider.utils}constructor(e,r){this.singleNetworkSigners={},this._isSigner=!0,this._isSequenceSigner=!0,this.client=e,this.provider=r}async getAddress(){return this.client.getAddress()}connect(e){if(!kd.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Sd(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new O8(this.client,this.provider,r)),this.singleNetworkSigners[r]}useChainId(e){return this.provider.toChainId(e)||this.client.getChainId()}async signMessage(e,r){const{eip6492:n=!0}=r||{},i=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:i})}async signTypedData(e,r,n,i){const{eip6492:s=!0}=i||{},o=this.useChainId(i==null?void 0:i.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:s,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),i=await Gj(e),s=await this.client.sendTransaction(i,{chainId:n}),o=this.getProvider(n);try{return await za(async function(){const a=await o.getTransaction(s);return a?o._wrapTransaction(a,s):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=s,a}}async getWalletConfig(e){const r=this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}getNetworks(){return this.client.getNetworks()}async getBalance(e,r){return this.getProvider(r==null?void 0:r.chainId).getBalance(this.getAddress(),e)}async estimateGas(e,r){return this.getProvider(r==null?void 0:r.chainId).estimateGas(e)}async call(e,r,n){return this.getProvider(n==null?void 0:n.chainId).call(e,r)}getChainId(){return Promise.resolve(this.client.getChainId())}async getGasPrice(e){return this.getProvider(e==null?void 0:e.chainId).getGasPrice()}async getFeeData(e){return this.getProvider(e==null?void 0:e.chainId).getFeeData()}async resolveName(e){const r=await this.provider.resolveName(e);if(r===null)throw new Error(`ENS name not found: ${e}`);return r}_checkProvider(e){}populateTransaction(e){throw new Error("SequenceSigner does not support populateTransaction")}checkTransaction(e){throw new Error("SequenceSigner does not support checkTransaction")}getTransactionCount(e){throw new Error("SequenceSigner does not support getTransactionCount")}signTransaction(e){throw new Error("SequenceWallet does not support signTransaction, use sendTransaction instead.")}static is(e){return e&&typeof e=="object"&&e._isSequenceSigner===!0}}class O8 extends Sd{constructor(e,r,n){super(e,r.getProvider(n)),this._isSingleNetworkSequenceSigner=!0,this.chainId=n}_useChainId(e){const r=this.provider.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This signer only supports the network ${this.chainId}, but ${r} was requested.`);return r||this.provider.toChainId(this.chainId)}useChainId(e){return this._useChainId(e)}getChainId(){return Promise.resolve(this.provider.toChainId(this.chainId))}getProvider(e){return super.getProvider(this._useChainId(e))}getSigner(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceSigner===!0}}class rye{constructor(e){if(this.signer=e,O8.is(e))throw new Error("WalletUtils does not support SingleNetworkSequenceSigner")}signMessage(e,r,n){return this.signer.signMessage(e,{chainId:r,eip6492:n})}signTypedData(e,r,n,i,s){return this.signer.signTypedData(e,r,n,{chainId:i,eip6492:s})}async isValidSignature(e,r,n,i){return Vf(e,r,n,this.signer.getProvider(i))}async isValidMessageSignature(e,r,n,i){const s=this.signer.getProvider(i),o=$b(r),a=XS(o);return Vf(e,a,n,s)}isValidTypedDataSignature(e,r,n,i){return this.isValidSignature(e,H1(r),n,i)}}class kd extends Sg{constructor(e,r,n=Wf){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(i=>{this.emit("connect",i)}),e.onDisconnect(i=>{this.emit("disconnect",i)}),e.onDefaultChainIdChanged(i=>{this.emit("chainChanged",i)}),e.onAccountsChanged(i=>{this.emit("accountsChanged",i)}),this.signer=new Sd(this.client,this),this.utils=new rye(this.signer)}getSigner(e){return this.signer.getSigner(e)}connect(e){return this.client.connect(e)}disconnect(){return this.client.disconnect()}isConnected(){return this.client.isConnected()}getSession(){return this.client.getSession()}listAccounts(){return[this.client.getAddress()]}getAddress(){return this.client.getAddress()}getNetworks(){return this.client.getNetworks()}getChainId(){return this.client.getChainId()}setDefaultChainId(e){return this.client.setDefaultChainId(this.toChainId(e))}isOpened(){return this.client.isOpened()}closeWallet(){return this.client.closeWallet()}getWalletContext(){return this.client.getWalletContext()}async getWalletConfig(e){const r=await this.useChainId(e);return this.client.getOnchainWalletConfig({chainId:r})}authorize(e){return this.client.connect(Yn({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=ws(this.networks,e);if(!r)throw new Error(`Unsupported network ${e}`);return r.chainId}async useChainId(e){return this.toChainId(e)||this.client.getChainId()}getProvider(e){if(!e)return this;const r=this.toChainId(e);return this.singleNetworkProviders[r]||(this.singleNetworkProviders[r]=new tU(this.client,this.providerFor,r)),this.singleNetworkProviders[r]}async _getSubprovider(e){const r=await this.useChainId(e),n=this.providerFor(r);if(!n)throw new Error(`Unsupported network ${r}`);return n}async perform(e,r){var n;if(e==="eth_chainId")return gs(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=eU(o);return this.setDefaultChainId(a)}if(e==="eth_sendTransaction"||e==="eth_sign"||e==="eth_signTypedData"||e==="eth_signTypedData_v4"||e==="personal_sign"||e==="sequence_sign"||e==="sequence_signTypedData_v4")return this.client.send({method:e,params:r},this.getChainId());const i=await this._getSubprovider(),s=(n=i.prepareRequest(e,r))!=null?n:[e,r];return i.send(s[0],s[1])}send(e,r){return this.perform(e,r)}request(e){return this.perform(e.method,e.params)}async detectNetwork(){const e=this.client.getChainId(),r=ws(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).waitForTransaction(e,r,n)}async getBlockNumber(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getBlockNumber()}async getGasPrice(e){return(await this._getSubprovider(e==null?void 0:e.chainId)).getGasPrice()}async getBalance(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getBalance(e,r)}async getTransactionCount(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getTransactionCount(e,r)}async getCode(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).getCode(e,r)}async getStorageAt(e,r,n,i){return(await this._getSubprovider(i==null?void 0:i.chainId)).getStorageAt(e,r,n)}async call(e,r,n){return(await this._getSubprovider(n==null?void 0:n.chainId)).call(e,r)}async estimateGas(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).estimateGas(e)}async getBlock(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getBlock(e)}async getTransaction(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getTransaction(e)}async getLogs(e,r){return(await this._getSubprovider(r==null?void 0:r.chainId)).getLogs(e)}async supportsENS(){return(await this.getNetworks()).some(r=>r.chainId===1)}async getResolver(e){return await this.supportsENS()?(await this._getSubprovider(1)).getResolver(e):null}async resolveName(e){return IR(await e)?e:await this.supportsENS()?(await this._getSubprovider(1)).resolveName(e):null}async lookupAddress(e){return await this.supportsENS()?(await this._getSubprovider(1)).lookupAddress(e):null}async getAvatar(e){return await this.supportsENS()?(await this._getSubprovider(1)).getAvatar(e):null}}kd.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function eU(t){return typeof t=="object"?eU(t.chainId):J.from(t).toNumber()}class tU extends kd{constructor(e,r,n){super(e,r),this._isSingleNetworkSequenceProvider=!0,this.chainId=n}_useChainId(e){const r=this.toChainId(e);if(r&&r!==this.chainId)throw new Error(`This provider only supports the network ${this.chainId}, but ${r} was requested.`);return r||super.toChainId(this.chainId)}useChainId(e){return Promise.resolve(this._useChainId(e))}getChainId(){return super.toChainId(this.chainId)}async getNetwork(){const e=await this.client.getNetworks(),r=ws(e,this.chainId);if(!r)throw new Error(`Unsupported network ${this.chainId}`);return r}getProvider(e){if(this._useChainId(e)!==this.chainId)throw new Error("Unreachable code");return this}getSigner(e){return super.getSigner(this._useChainId(e))}setDefaultChainId(e){throw new Error(`This provider only supports the network ${this.chainId}; use the parent provider to switch networks.`)}static is(e){return e&&typeof e=="object"&&e._isSingleNetworkSequenceProvider===!0}}var nye={name:"@0xsequence/provider",version:"1.4.5",description:"provider sub-package for Sequence",repository:"https://github.com/0xsequence/sequence.js/tree/master/packages/provider",source:"src/index.ts",main:"dist/0xsequence-provider.cjs.js",module:"dist/0xsequence-provider.esm.js",author:"Horizon Blockchain Games",license:"Apache-2.0",scripts:{test:"pnpm test:concurrently 'pnpm test:run'","test:run":"pnpm test:file tests/**/*.spec.ts","test:file":"NODE_OPTIONS='--loader tsx' mocha --timeout 30000",typecheck:"tsc --noEmit","test:concurrently":"concurrently -k --success first 'pnpm start:hardhat1' 'pnpm start:hardhat2'","start:hardhat1":"pnpm start:hardhat1:verbose > /dev/null 2>&1","start:hardhat2":"pnpm start:hardhat2:verbose > /dev/null 2>&1","start:hardhat1:verbose":"hardhat node --config hardhat1.config.js --hostname 0.0.0.0 --port 9595","start:hardhat2:verbose":"hardhat node --config hardhat2.config.js --hostname 0.0.0.0 --port 8595"},dependencies:{"@0xsequence/abi":"workspace:*","@0xsequence/account":"workspace:*","@0xsequence/auth":"workspace:*","@0xsequence/core":"workspace:*","@0xsequence/migration":"workspace:*","@0xsequence/network":"workspace:*","@0xsequence/relayer":"workspace:*","@0xsequence/utils":"workspace:*","@0xsequence/wallet":"workspace:*",eventemitter2:"^6.4.5","webextension-polyfill":"^0.10.0"},peerDependencies:{ethers:">=5.5 < 6"},devDependencies:{"@types/webextension-polyfill":"^0.10.0",hardhat:"^2.12.2",ethers:"^5.7.2"},files:["src","dist"]};class Cl{constructor(e){this.store=e}connectedSession(){const e=this.getSession();if(e&&e.accountAddress&&e.walletContext&&e.networks)return{accountAddress:e.accountAddress,walletContext:e.walletContext,networks:e.networks};throw new Error("Sequence session not connected")}hasSession(){var e;return((e=this.getSession())==null?void 0:e.accountAddress)!==void 0}setSession(e){return this.store.setItem(Cl.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(Cl.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(Cl.SESSION_LOCALSTORE_KEY)}}Cl.SESSION_LOCALSTORE_KEY="@sequence.session";class Sl{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(Sl.SESSION_CHAIN_ID_KEY,n=>{if(n){const i=parseInt(n);this.callbacks.forEach(s=>s(i))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(Sl.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(Sl.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}Sl.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class R8{constructor(e,r,n,i){var s;if(this.callbacks={},this.projectAccessKey=i,Zj(e))this.transport=Mb.new(e);else if(Lj(e))this.transport=e;else throw new Error("Invalid transport");const o=typeof n=="number"?n:n==null?void 0:n.defaultChainId;this.defaultEIP6492=typeof n=="number"?!1:(s=n==null?void 0:n.defaultEIP6492)!=null?s:!1,this.session=new Cl(r),this.defaultChainId=new Sl(r,o),this.transport.on("accountsChanged",a=>{var c;a.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(c=this.callbacks.accountsChanged)==null||c.forEach(l=>l(a))}),this.transport.on("connect",a=>{var c;const l=gs(this.getChainId());(c=this.callbacks.connect)==null||c.forEach(u=>u(Yn({},a,{chainId:l})))}),this.transport.on("disconnect",(a,c)=>{var l;(l=this.callbacks.disconnect)==null||l.forEach(u=>u(a,c))}),this.transport.on("networks",a=>{var c;(c=this.callbacks.networks)==null||c.forEach(l=>l(a))}),this.transport.on("walletContext",a=>{var c;(c=this.callbacks.walletContext)==null||c.forEach(l=>l(a))}),this.transport.on("open",a=>{var c;(c=this.callbacks.open)==null||c.forEach(l=>l(a))}),this.transport.on("close",()=>{var a;(a=this.callbacks.close)==null||a.forEach(c=>c())}),this.transport.on("chainChanged",(a,c)=>{var l;(l=this.callbacks.chainChanged)==null||l.forEach(u=>u(a,c))}),this.defaultChainId.onDefaultChainIdChanged(a=>{var c;const l=gs(a);(c=this.callbacks.chainChanged)==null||c.forEach(u=>u(l))})}registerCallback(e,r){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),()=>{this.callbacks[e]=this.callbacks[e].filter(n=>n!==r)}}onOpen(e){return this.registerCallback("open",e)}onClose(e){return this.registerCallback("close",e)}onConnect(e){return this.registerCallback("connect",e)}onDisconnect(e){return this.registerCallback("disconnect",e)}onNetworks(e){return this.registerCallback("networks",e)}onAccountsChanged(e){return this.registerCallback("accountsChanged",e)}onWalletContext(e){return this.registerCallback("walletContext",e)}onChainChanged(e){return this.registerCallback("chainChanged",e)}onDefaultChainIdChanged(e){return this.registerCallback("chainChanged",e)}getChainId(){return this.defaultChainId.getDefaultChainId()}setDefaultChainId(e){return this.defaultChainId.setDefaultChainId(e)}async openWallet(e,r){return this.transport.openWallet(e,r,this.getChainId()),await this.transport.waitUntilOpened(),this.isOpened()}closeWallet(){return this.transport.closeWallet()}isOpened(){return this.transport.isOpened()}isConnected(){return this.session.hasSession()}getSession(){return this.session.getSession()}getAddress(){return this.session.connectedSession().accountAddress}async connect(e){if((e==null?void 0:e.authorizeVersion)===void 0&&(e.authorizeVersion=2),(e==null?void 0:e.refresh)===!0&&this.disconnect(),e.projectAccessKey=this.projectAccessKey,e&&e.authorize){if(!e.app)throw new Error("connecting with 'authorize' option also requires 'app' to be set");e.authorizeVersion===void 0&&(e.authorizeVersion=2)}await this.openWallet(void 0,{type:"connect",options:Yn({},e,{networkId:this.getChainId(),clientVersion:nye.version})});const r=await this.transport.waitUntilConnected().catch(n=>n instanceof Error?{connected:!1,error:n.message}:{connected:!1,error:JSON.stringify(n)});if(r.chainId&&(r.chainId=J.from(r.chainId).toString()),r.connected){if(!r.session)throw new Error("impossible state, connect response is missing session");this.session.setSession(r.session)}return r}disconnect(){return this.isOpened()&&this.closeWallet(),this.session.clearSession()}send(e,r){return e.method=this.mapSignMethod(e.method),new Promise((n,i)=>{this.transport.sendAsync(e,(s,o)=>{s?i(s):o===void 0?i(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?i(o.error):typeof o=="object"&&o.result?n(o.result):i(new Error(`Got invalid response for request: ${e}`))},r||this.getChainId())})}async getNetworks(e){const r=this.session.connectedSession();return e&&(r.networks=await this.send({method:"sequence_getNetworks"}),this.session.setSession(r)),r.networks}signMethod(e){return(e==null?void 0:e.eip6492)===void 0?"personal_sign":e.eip6492?"sequence_sign":"legacy_sign"}signTypedDataMethod(e){return(e==null?void 0:e.eip6492)===void 0?"eth_signTypedData_v4":e.eip6492?"sequence_signTypedData_v4":"legacy_signTypedData_v4"}mapSignMethod(e){return e==="personal_sign"?this.defaultEIP6492?"sequence_sign":"personal_sign":e==="eth_signTypedData_v4"?this.defaultEIP6492?"sequence_signTypedData_v4":"eth_signTypedData_v4":e==="legacy_sign"?"personal_sign":e==="legacy_signTypedData_v4"?"eth_signTypedData_v4":e}async signMessage(e,r){const n=this.signMethod(r);return this.send({method:n,params:[e,this.getAddress()]},r==null?void 0:r.chainId)}async signTypedData(e,r){const n=this.signTypedDataMethod(r),i=Wr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),i]},(r==null?void 0:r.chainId)||e.domain.chainId&&J.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],i=Qme(n);return this.send({method:"eth_sendTransaction",params:[i]},r==null?void 0:r.chainId)}async getWalletContext(){return this.send({method:"sequence_getWalletContext"})}async getOnchainWalletConfig(e){const r=await this.send({method:"sequence_getWalletConfig",params:[(e==null?void 0:e.chainId)||this.getChainId()]},e==null?void 0:e.chainId);return Array.isArray(r)?r[0]:r}}const s5={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let Js;const rU=t=>{var e,r,n;const i=t==null?void 0:t.projectAccessKey;if(i||console.warn("Please pass a projectAccessKey in initWallet config as it will be required in near future."),Js)return Js;const s=Yn({},s5,t,{transports:Yn({},s5.transports,t==null?void 0:t.transports)}),o={},a=(e=(r=s.networks)==null?void 0:r.filter(h=>{h.rpcUrl!==void 0&&h.chainId!==void 0&&Wf.find(p=>p.chainId===h.chainId)}))!=null?e:[],c=Wf.map(h=>{var p;const v=(p=s.networks)==null?void 0:p.find(b=>b.chainId===h.chainId);return v?Yn({},h,v):h}).concat(a).map(h=>{const p=i?`/${i}`:"";return h.rpcUrl=h.rpcUrl+p,h}),l=h=>{if(!o[h]){var p;const v=(p=c.find(m=>m.chainId===h))==null?void 0:p.rpcUrl;if(!v)throw new Error(`no rpcUrl found for chainId: ${h}`);const b=new Go(v),y=new n8([wB,bB,new i8],new my(b));o[h]=new H$(y,h)}return o[h]},u=s.defaultNetwork?(n=ws(c,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!u&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||Py(),d=new R8(s.transports,f,{defaultChainId:u,defaultEIP6492:s.defaultEIP6492},i);return Js=new kd(d,l),Js},nU=()=>{Js&&(Js.client.closeWallet(),Js.client.transport.unregister(),Js=void 0)},iU=()=>{if(!Js)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return Js},iye=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:Gme,BaseProviderTransport:Y1,BaseWalletTransport:J1,CHANNEL_ID:I8,DefaultChainIdTracker:Sl,DefaultProviderConfig:s5,ErrSignedInRequired:Bj,EventType:Ke,ExtensionMessageHandler:Vme,ExtensionMessageProvider:Jj,InitState:Ut,LocalStorage:s1,MemoryItemStore:Vj,MuxMessageProvider:Mb,OpenState:Oi,PROVIDER_OPEN_TIMEOUT:T8,ProviderError:Fj,ProxyMessageChannel:Wme,ProxyMessageChannelPort:i5,ProxyMessageHandler:Hme,ProxyMessageProvider:Kj,SequenceClient:R8,SequenceClientSession:Cl,SequenceProvider:kd,SequenceSigner:Sd,SingleNetworkSequenceProvider:tU,SingleNetworkSequenceSigner:O8,UnrealMessageHandler:qme,UnrealMessageProvider:Yj,WalletRequestHandler:eye,WindowMessageHandler:Kme,WindowMessageProvider:Xj,WindowSessionParams:Q1,getWallet:iU,initWallet:rU,isBrowserExtension:_y,isMuxTransportTemplate:Zj,isProviderTransport:Lj,isUnityPlugin:Hj,isValidMessageSignature:zj,isValidSignature:Vf,isValidTypedDataSignature:Wj,isWalletUpToDate:qj,messageToBytes:Uj,nextMessageIdx:jj,prefixEIP191Message:$b,resolveArrayProperties:Gj,trimEIP191Prefix:zme,unregisterWallet:nU,useBestStore:Py},Symbol.toStringTag,{value:"Module"}));function kn(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var sye=kn({__proto__:null},[X0e]),oye=kn({__proto__:null},[s1e]),aye=kn({__proto__:null},[bme]),cye=kn({__proto__:null},[kme]),lye=kn({__proto__:null},[Pve]),uye=kn({__proto__:null},[Dve]),fye=kn({__proto__:null},[Mme]),dye=kn({__proto__:null},[tpe]),hye=kn({__proto__:null},[iye]),pye=kn({__proto__:null},[fve]);const vye=he.transaction;var mye=Object.freeze({__proto__:null,transactions:vye}),yye=kn({__proto__:null,isValidSignature:Vf,isValidMessageSignature:zj,isValidTypedDataSignature:Wj,isWalletUpToDate:qj},[j1e]),gye=kn({__proto__:null},[Hpe]),bye=kn({__proto__:null},[dve]),wye=kn({__proto__:null},[mme]),Eye=kn({__proto__:null},[Ype]),xye=kn({__proto__:null},[bve]),sU=Object.freeze({__proto__:null,abi:sye,api:oye,auth:aye,guard:cye,indexer:lye,metadata:uye,multicall:fye,network:dye,provider:hye,relayer:pye,transactions:mye,utils:yye,core:gye,signhub:bye,sessions:wye,migration:Eye,account:xye,initWallet:rU,getWallet:iU,unregisterWallet:nU,SequenceProvider:kd,SequenceClient:R8,SequenceSigner:Sd}),Gv,Cye=class extends xF{constructor({chains:t,options:e}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(s){if(s!=null&&s.isMetaMask&&!(s.isBraveWallet&&!s._events&&!s._state)&&!s.isApexWallet&&!s.isAvalanche&&!s.isBitKeep&&!s.isBlockWallet&&!s.isMathWallet&&!(s.isOkxWallet||s.isOKExWallet)&&!(s.isOneInchIOSWallet||s.isOneInchAndroidWallet)&&!s.isOpera&&!s.isPortal&&!s.isRabby&&!s.isDefiant&&!s.isTokenPocket&&!s.isTokenary&&!s.isZerion)return s}if(typeof window>"u")return;const i=window.ethereum;return i!=null&&i.providers?i.providers.find(n):n(i)},...e};super({chains:t,options:r}),st(this,"id","metaMask"),st(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),Jr(this,Gv,void 0),$o(this,Gv,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:t}={}){var e,r,n,i;try{const s=await this.getProvider();if(!s)throw new Ra;s.on&&(s.on("accountsChanged",this.onAccountsChanged),s.on("chainChanged",this.onChainChanged),s.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if(Je(this,Gv)&&((e=this.options)!=null&&e.shimDisconnect)&&!((r=this.storage)!=null&&r.getItem(this.shimDisconnectKey))&&(o=await this.getAccount().catch(()=>null),!!o))try{await s.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(u){if(this.isUserRejectedRequestError(u))throw new Vr(u);if(u.code===new vc(u).code)throw u}if(!o){const l=await s.request({method:"eth_requestAccounts"});o=Li(l[0])}let a=await this.getChainId(),c=this.isChainUnsupported(a);return t&&a!==t&&(a=(await this.switchChain(t)).id,c=this.isChainUnsupported(a)),(n=this.options)!=null&&n.shimDisconnect&&((i=this.storage)==null||i.setItem(this.shimDisconnectKey,!0)),{account:o,chain:{id:a,unsupported:c},provider:s}}catch(s){throw this.isUserRejectedRequestError(s)?new Vr(s):s.code===-32002?new vc(s):s}}};Gv=new WeakMap;var $8={},Nb={},Ue={},oU={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,c){var l=a>>>16&65535,u=a&65535,f=c>>>16&65535,d=c&65535;return u*d+(l*d+u*f<<16>>>0)|0}t.mul=Math.imul||e;function r(a,c){return a+c|0}t.add=r;function n(a,c){return a-c|0}t.sub=n;function i(a,c){return a<>>32-c}t.rotl=i;function s(a,c){return a<<32-c|a>>>c}t.rotr=s;function o(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a}t.isInteger=Number.isInteger||o,t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(a){return t.isInteger(a)&&a>=-t.MAX_SAFE_INTEGER&&a<=t.MAX_SAFE_INTEGER}})(oU);Object.defineProperty(Ue,"__esModule",{value:!0});var aU=oU;function Sye(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}Ue.readInt16BE=Sye;function kye(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}Ue.readUint16BE=kye;function Aye(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}Ue.readInt16LE=Aye;function _ye(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}Ue.readUint16LE=_ye;function cU(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}Ue.writeUint16BE=cU;Ue.writeInt16BE=cU;function lU(t,e,r){return e===void 0&&(e=new Uint8Array(2)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}Ue.writeUint16LE=lU;Ue.writeInt16LE=lU;function o5(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}Ue.readInt32BE=o5;function a5(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}Ue.readUint32BE=a5;function c5(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}Ue.readInt32LE=c5;function l5(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}Ue.readUint32LE=l5;function Ty(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}Ue.writeUint32BE=Ty;Ue.writeInt32BE=Ty;function Iy(t,e,r){return e===void 0&&(e=new Uint8Array(4)),r===void 0&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}Ue.writeUint32LE=Iy;Ue.writeInt32LE=Iy;function Pye(t,e){e===void 0&&(e=0);var r=o5(t,e),n=o5(t,e+4);return r*4294967296+n-(n>>31)*4294967296}Ue.readInt64BE=Pye;function Tye(t,e){e===void 0&&(e=0);var r=a5(t,e),n=a5(t,e+4);return r*4294967296+n}Ue.readUint64BE=Tye;function Iye(t,e){e===void 0&&(e=0);var r=c5(t,e),n=c5(t,e+4);return n*4294967296+r-(r>>31)*4294967296}Ue.readInt64LE=Iye;function Oye(t,e){e===void 0&&(e=0);var r=l5(t,e),n=l5(t,e+4);return n*4294967296+r}Ue.readUint64LE=Oye;function uU(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Ty(t/4294967296>>>0,e,r),Ty(t>>>0,e,r+4),e}Ue.writeUint64BE=uU;Ue.writeInt64BE=uU;function fU(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Iy(t>>>0,e,r),Iy(t/4294967296>>>0,e,r+4),e}Ue.writeUint64LE=fU;Ue.writeInt64LE=fU;function Rye(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var n=0,i=1,s=t/8+r-1;s>=r;s--)n+=e[s]*i,i*=256;return n}Ue.readUintBE=Rye;function $ye(t,e,r){if(r===void 0&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s=n;s--)r[s]=e/i&255,i*=256;return r}Ue.writeUintBE=Mye;function Nye(t,e,r,n){if(r===void 0&&(r=new Uint8Array(t/8)),n===void 0&&(n=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!aU.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var i=1,s=n;s>>32-16|_<<16,H=H+_|0,w^=H,w=w>>>32-12|w<<12,S=S+I|0,O^=S,O=O>>>32-16|O<<16,G=G+O|0,I^=G,I=I>>>32-12|I<<12,P=P+B|0,N^=P,N=N>>>32-16|N<<16,F=F+N|0,B^=F,B=B>>>32-12|B<<12,T=T+j|0,k^=T,k=k>>>32-16|k<<16,E=E+k|0,j^=E,j=j>>>32-12|j<<12,P=P+B|0,N^=P,N=N>>>32-8|N<<8,F=F+N|0,B^=F,B=B>>>32-7|B<<7,T=T+j|0,k^=T,k=k>>>32-8|k<<8,E=E+k|0,j^=E,j=j>>>32-7|j<<7,S=S+I|0,O^=S,O=O>>>32-8|O<<8,G=G+O|0,I^=G,I=I>>>32-7|I<<7,g=g+w|0,_^=g,_=_>>>32-8|_<<8,H=H+_|0,w^=H,w=w>>>32-7|w<<7,g=g+I|0,k^=g,k=k>>>32-16|k<<16,F=F+k|0,I^=F,I=I>>>32-12|I<<12,S=S+B|0,_^=S,_=_>>>32-16|_<<16,E=E+_|0,B^=E,B=B>>>32-12|B<<12,P=P+j|0,O^=P,O=O>>>32-16|O<<16,H=H+O|0,j^=H,j=j>>>32-12|j<<12,T=T+w|0,N^=T,N=N>>>32-16|N<<16,G=G+N|0,w^=G,w=w>>>32-12|w<<12,P=P+j|0,O^=P,O=O>>>32-8|O<<8,H=H+O|0,j^=H,j=j>>>32-7|j<<7,T=T+w|0,N^=T,N=N>>>32-8|N<<8,G=G+N|0,w^=G,w=w>>>32-7|w<<7,S=S+B|0,_^=S,_=_>>>32-8|_<<8,E=E+_|0,B^=E,B=B>>>32-7|B<<7,g=g+I|0,k^=g,k=k>>>32-8|k<<8,F=F+k|0,I^=F,I=I>>>32-7|I<<7;fn.writeUint32LE(g+n|0,t,0),fn.writeUint32LE(S+i|0,t,4),fn.writeUint32LE(P+s|0,t,8),fn.writeUint32LE(T+o|0,t,12),fn.writeUint32LE(w+a|0,t,16),fn.writeUint32LE(I+c|0,t,20),fn.writeUint32LE(B+l|0,t,24),fn.writeUint32LE(j+u|0,t,28),fn.writeUint32LE(H+f|0,t,32),fn.writeUint32LE(G+d|0,t,36),fn.writeUint32LE(F+h|0,t,40),fn.writeUint32LE(E+p|0,t,44),fn.writeUint32LE(_+v|0,t,48),fn.writeUint32LE(O+b|0,t,52),fn.writeUint32LE(N+y|0,t,56),fn.writeUint32LE(k+m|0,t,60)}function dU(t,e,r,n,i){if(i===void 0&&(i=0),t.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(n.length>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}var hU={},Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});function Qye(t,e,r){return~(t-1)&e|t-1&r}Lc.select=Qye;function Yye(t,e){return(t|0)-(e|0)-1>>>31&1}Lc.lessOrEqual=Yye;function pU(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}Lc.compare=pU;function Jye(t,e){return t.length===0||e.length===0?!1:pU(t,e)!==0}Lc.equal=Jye;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lc,r=Ps;t.DIGEST_LENGTH=16;var n=function(){function o(a){this.digestLength=t.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var c=a[0]|a[1]<<8;this._r[0]=c&8191;var l=a[2]|a[3]<<8;this._r[1]=(c>>>13|l<<3)&8191;var u=a[4]|a[5]<<8;this._r[2]=(l>>>10|u<<6)&7939;var f=a[6]|a[7]<<8;this._r[3]=(u>>>7|f<<9)&8191;var d=a[8]|a[9]<<8;this._r[4]=(f>>>4|d<<12)&255,this._r[5]=d>>>1&8190;var h=a[10]|a[11]<<8;this._r[6]=(d>>>14|h<<2)&8191;var p=a[12]|a[13]<<8;this._r[7]=(h>>>11|p<<5)&8065;var v=a[14]|a[15]<<8;this._r[8]=(p>>>8|v<<8)&8191,this._r[9]=v>>>5&127,this._pad[0]=a[16]|a[17]<<8,this._pad[1]=a[18]|a[19]<<8,this._pad[2]=a[20]|a[21]<<8,this._pad[3]=a[22]|a[23]<<8,this._pad[4]=a[24]|a[25]<<8,this._pad[5]=a[26]|a[27]<<8,this._pad[6]=a[28]|a[29]<<8,this._pad[7]=a[30]|a[31]<<8}return o.prototype._blocks=function(a,c,l){for(var u=this._fin?0:2048,f=this._h[0],d=this._h[1],h=this._h[2],p=this._h[3],v=this._h[4],b=this._h[5],y=this._h[6],m=this._h[7],g=this._h[8],S=this._h[9],P=this._r[0],T=this._r[1],w=this._r[2],I=this._r[3],B=this._r[4],j=this._r[5],H=this._r[6],G=this._r[7],F=this._r[8],E=this._r[9];l>=16;){var _=a[c+0]|a[c+1]<<8;f+=_&8191;var O=a[c+2]|a[c+3]<<8;d+=(_>>>13|O<<3)&8191;var N=a[c+4]|a[c+5]<<8;h+=(O>>>10|N<<6)&8191;var k=a[c+6]|a[c+7]<<8;p+=(N>>>7|k<<9)&8191;var $=a[c+8]|a[c+9]<<8;v+=(k>>>4|$<<12)&8191,b+=$>>>1&8191;var L=a[c+10]|a[c+11]<<8;y+=($>>>14|L<<2)&8191;var M=a[c+12]|a[c+13]<<8;m+=(L>>>11|M<<5)&8191;var A=a[c+14]|a[c+15]<<8;g+=(M>>>8|A<<8)&8191,S+=A>>>5|u;var D=0,V=D;V+=f*P,V+=d*(5*E),V+=h*(5*F),V+=p*(5*G),V+=v*(5*H),D=V>>>13,V&=8191,V+=b*(5*j),V+=y*(5*B),V+=m*(5*I),V+=g*(5*w),V+=S*(5*T),D+=V>>>13,V&=8191;var R=D;R+=f*T,R+=d*P,R+=h*(5*E),R+=p*(5*F),R+=v*(5*G),D=R>>>13,R&=8191,R+=b*(5*H),R+=y*(5*j),R+=m*(5*B),R+=g*(5*I),R+=S*(5*w),D+=R>>>13,R&=8191;var U=D;U+=f*w,U+=d*T,U+=h*P,U+=p*(5*E),U+=v*(5*F),D=U>>>13,U&=8191,U+=b*(5*G),U+=y*(5*H),U+=m*(5*j),U+=g*(5*B),U+=S*(5*I),D+=U>>>13,U&=8191;var W=D;W+=f*I,W+=d*w,W+=h*T,W+=p*P,W+=v*(5*E),D=W>>>13,W&=8191,W+=b*(5*F),W+=y*(5*G),W+=m*(5*H),W+=g*(5*j),W+=S*(5*B),D+=W>>>13,W&=8191;var q=D;q+=f*B,q+=d*I,q+=h*w,q+=p*T,q+=v*P,D=q>>>13,q&=8191,q+=b*(5*E),q+=y*(5*F),q+=m*(5*G),q+=g*(5*H),q+=S*(5*j),D+=q>>>13,q&=8191;var Y=D;Y+=f*j,Y+=d*B,Y+=h*I,Y+=p*w,Y+=v*T,D=Y>>>13,Y&=8191,Y+=b*P,Y+=y*(5*E),Y+=m*(5*F),Y+=g*(5*G),Y+=S*(5*H),D+=Y>>>13,Y&=8191;var X=D;X+=f*H,X+=d*j,X+=h*B,X+=p*I,X+=v*w,D=X>>>13,X&=8191,X+=b*T,X+=y*P,X+=m*(5*E),X+=g*(5*F),X+=S*(5*G),D+=X>>>13,X&=8191;var Q=D;Q+=f*G,Q+=d*H,Q+=h*j,Q+=p*B,Q+=v*I,D=Q>>>13,Q&=8191,Q+=b*w,Q+=y*T,Q+=m*P,Q+=g*(5*E),Q+=S*(5*F),D+=Q>>>13,Q&=8191;var Z=D;Z+=f*F,Z+=d*G,Z+=h*H,Z+=p*j,Z+=v*B,D=Z>>>13,Z&=8191,Z+=b*I,Z+=y*w,Z+=m*T,Z+=g*P,Z+=S*(5*E),D+=Z>>>13,Z&=8191;var ae=D;ae+=f*E,ae+=d*F,ae+=h*G,ae+=p*H,ae+=v*j,D=ae>>>13,ae&=8191,ae+=b*B,ae+=y*I,ae+=m*w,ae+=g*T,ae+=S*P,D+=ae>>>13,ae&=8191,D=(D<<2)+D|0,D=D+V|0,V=D&8191,D=D>>>13,R+=D,f=V,d=R,h=U,p=W,v=q,b=Y,y=X,m=Q,g=Z,S=ae,c+=16,l-=16}this._h[0]=f,this._h[1]=d,this._h[2]=h,this._h[3]=p,this._h[4]=v,this._h[5]=b,this._h[6]=y,this._h[7]=m,this._h[8]=g,this._h[9]=S},o.prototype.finish=function(a,c){c===void 0&&(c=0);var l=new Uint16Array(10),u,f,d,h;if(this._leftover){for(h=this._leftover,this._buffer[h++]=1;h<16;h++)this._buffer[h]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(u=this._h[1]>>>13,this._h[1]&=8191,h=2;h<10;h++)this._h[h]+=u,u=this._h[h]>>>13,this._h[h]&=8191;for(this._h[0]+=u*5,u=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=u,u=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=u,l[0]=this._h[0]+5,u=l[0]>>>13,l[0]&=8191,h=1;h<10;h++)l[h]=this._h[h]+u,u=l[h]>>>13,l[h]&=8191;for(l[9]-=8192,f=(u^1)-1,h=0;h<10;h++)l[h]&=f;for(f=~f,h=0;h<10;h++)this._h[h]=this._h[h]&f|l[h];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,d=this._h[0]+this._pad[0],this._h[0]=d&65535,h=1;h<8;h++)d=(this._h[h]+this._pad[h]|0)+(d>>>16)|0,this._h[h]=d&65535;return a[c+0]=this._h[0]>>>0,a[c+1]=this._h[0]>>>8,a[c+2]=this._h[1]>>>0,a[c+3]=this._h[1]>>>8,a[c+4]=this._h[2]>>>0,a[c+5]=this._h[2]>>>8,a[c+6]=this._h[3]>>>0,a[c+7]=this._h[3]>>>8,a[c+8]=this._h[4]>>>0,a[c+9]=this._h[4]>>>8,a[c+10]=this._h[5]>>>0,a[c+11]=this._h[5]>>>8,a[c+12]=this._h[6]>>>0,a[c+13]=this._h[6]>>>8,a[c+14]=this._h[7]>>>0,a[c+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var c=0,l=a.length,u;if(this._leftover){u=16-this._leftover,u>l&&(u=l);for(var f=0;f=16&&(u=l-l%16,this._blocks(a,c,u),c+=u,l-=u),l){for(var f=0;f16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var h=new Uint8Array(16);h.set(l,h.length-l.length);var p=new Uint8Array(32);e.stream(this._key,h,p,4);var v=u.length+this.tagLength,b;if(d){if(d.length!==v)throw new Error("ChaCha20Poly1305: incorrect destination length");b=d}else b=new Uint8Array(v);return e.streamXOR(this._key,h,u,b,4),this._authenticate(b.subarray(b.length-this.tagLength,b.length),p,b.subarray(0,b.length-this.tagLength),f),n.wipe(h),b},c.prototype.open=function(l,u,f,d){if(l.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(u.length0&&h.update(o.subarray(d.length%16))),h.update(f),f.length%16>0&&h.update(o.subarray(f.length%16));var p=new Uint8Array(8);d&&i.writeUint64LE(d.length,p),h.update(p),i.writeUint64LE(f.length,p),h.update(p);for(var v=h.digest(),b=0;bthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var i=0;i1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},t.prototype.expand=function(e){for(var r=new Uint8Array(e),n=0;n256)throw new Error("randomString charset is too long");let d="";const h=u.length,p=256-256%h;for(;l>0;){const v=i(Math.ceil(l*256/p),f);for(let b=0;b0;b++){const y=v[b];y0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=c[u++],l--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(l>=this.blockSize&&(u=s(this._temp,this._state,c,u,l),l%=this.blockSize);l>0;)this._buffer[this._bufferLength++]=c[u++],l--;return this},a.prototype.finish=function(c){if(!this._finished){var l=this._bytesHashed,u=this._bufferLength,f=l/536870912|0,d=l<<3,h=l%64<56?64:128;this._buffer[u]=128;for(var p=u+1;p0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(c){return this._state.set(c.state),this._bufferLength=c.bufferLength,c.buffer&&this._buffer.set(c.buffer),this._bytesHashed=c.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(c){r.wipe(c.state),c.buffer&&r.wipe(c.buffer),c.bufferLength=0,c.bytesHashed=0},a}();t.SHA256=n;var i=new Int32Array([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 s(a,c,l,u,f){for(;f>=64;){for(var d=c[0],h=c[1],p=c[2],v=c[3],b=c[4],y=c[5],m=c[6],g=c[7],S=0;S<16;S++){var P=u+S*4;a[S]=e.readUint32BE(l,P)}for(var S=16;S<64;S++){var T=a[S-2],w=(T>>>17|T<<32-17)^(T>>>19|T<<32-19)^T>>>10;T=a[S-15];var I=(T>>>7|T<<32-7)^(T>>>18|T<<32-18)^T>>>3;a[S]=(w+a[S-7]|0)+(I+a[S-16]|0)}for(var S=0;S<64;S++){var w=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&y^~b&m)|0)+(g+(i[S]+a[S]|0)|0)|0,I=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&h^d&p^h&p)|0;g=m,m=y,y=b,b=v+w|0,v=p,p=h,h=d,d=w+I|0}c[0]+=d,c[1]+=h,c[2]+=p,c[3]+=v,c[4]+=b,c[5]+=y,c[6]+=m,c[7]+=g,u+=64,f-=64}return u}function o(a){var c=new n;c.update(a);var l=c.digest();return c.clean(),l}t.hash=o})(jb);var N8={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.sharedKey=t.generateKeyPair=t.generateKeyPairFromSeed=t.scalarMultBase=t.scalarMult=t.SHARED_KEY_LENGTH=t.SECRET_KEY_LENGTH=t.PUBLIC_KEY_LENGTH=void 0;const e=Db,r=Ps;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(S){const P=new Float64Array(16);if(S)for(let T=0;T>16&1),T[j-1]&=65535;T[15]=w[15]-32767-(T[14]>>16&1);const B=T[15]>>16&1;T[14]&=65535,a(w,T,1-B)}for(let I=0;I<16;I++)S[2*I]=w[I]&255,S[2*I+1]=w[I]>>8}function l(S,P){for(let T=0;T<16;T++)S[T]=P[2*T]+(P[2*T+1]<<8);S[15]&=32767}function u(S,P,T){for(let w=0;w<16;w++)S[w]=P[w]+T[w]}function f(S,P,T){for(let w=0;w<16;w++)S[w]=P[w]-T[w]}function d(S,P,T){let w,I,B=0,j=0,H=0,G=0,F=0,E=0,_=0,O=0,N=0,k=0,$=0,L=0,M=0,A=0,D=0,V=0,R=0,U=0,W=0,q=0,Y=0,X=0,Q=0,Z=0,ae=0,se=0,ue=0,ot=0,Pe=0,Ae=0,at=0,xe=T[0],be=T[1],Vt=T[2],Te=T[3],Ie=T[4],Gt=T[5],Oe=T[6],Re=T[7],Kt=T[8],$e=T[9],Me=T[10],Qt=T[11],Ne=T[12],De=T[13],Yt=T[14],Le=T[15];w=P[0],B+=w*xe,j+=w*be,H+=w*Vt,G+=w*Te,F+=w*Ie,E+=w*Gt,_+=w*Oe,O+=w*Re,N+=w*Kt,k+=w*$e,$+=w*Me,L+=w*Qt,M+=w*Ne,A+=w*De,D+=w*Yt,V+=w*Le,w=P[1],j+=w*xe,H+=w*be,G+=w*Vt,F+=w*Te,E+=w*Ie,_+=w*Gt,O+=w*Oe,N+=w*Re,k+=w*Kt,$+=w*$e,L+=w*Me,M+=w*Qt,A+=w*Ne,D+=w*De,V+=w*Yt,R+=w*Le,w=P[2],H+=w*xe,G+=w*be,F+=w*Vt,E+=w*Te,_+=w*Ie,O+=w*Gt,N+=w*Oe,k+=w*Re,$+=w*Kt,L+=w*$e,M+=w*Me,A+=w*Qt,D+=w*Ne,V+=w*De,R+=w*Yt,U+=w*Le,w=P[3],G+=w*xe,F+=w*be,E+=w*Vt,_+=w*Te,O+=w*Ie,N+=w*Gt,k+=w*Oe,$+=w*Re,L+=w*Kt,M+=w*$e,A+=w*Me,D+=w*Qt,V+=w*Ne,R+=w*De,U+=w*Yt,W+=w*Le,w=P[4],F+=w*xe,E+=w*be,_+=w*Vt,O+=w*Te,N+=w*Ie,k+=w*Gt,$+=w*Oe,L+=w*Re,M+=w*Kt,A+=w*$e,D+=w*Me,V+=w*Qt,R+=w*Ne,U+=w*De,W+=w*Yt,q+=w*Le,w=P[5],E+=w*xe,_+=w*be,O+=w*Vt,N+=w*Te,k+=w*Ie,$+=w*Gt,L+=w*Oe,M+=w*Re,A+=w*Kt,D+=w*$e,V+=w*Me,R+=w*Qt,U+=w*Ne,W+=w*De,q+=w*Yt,Y+=w*Le,w=P[6],_+=w*xe,O+=w*be,N+=w*Vt,k+=w*Te,$+=w*Ie,L+=w*Gt,M+=w*Oe,A+=w*Re,D+=w*Kt,V+=w*$e,R+=w*Me,U+=w*Qt,W+=w*Ne,q+=w*De,Y+=w*Yt,X+=w*Le,w=P[7],O+=w*xe,N+=w*be,k+=w*Vt,$+=w*Te,L+=w*Ie,M+=w*Gt,A+=w*Oe,D+=w*Re,V+=w*Kt,R+=w*$e,U+=w*Me,W+=w*Qt,q+=w*Ne,Y+=w*De,X+=w*Yt,Q+=w*Le,w=P[8],N+=w*xe,k+=w*be,$+=w*Vt,L+=w*Te,M+=w*Ie,A+=w*Gt,D+=w*Oe,V+=w*Re,R+=w*Kt,U+=w*$e,W+=w*Me,q+=w*Qt,Y+=w*Ne,X+=w*De,Q+=w*Yt,Z+=w*Le,w=P[9],k+=w*xe,$+=w*be,L+=w*Vt,M+=w*Te,A+=w*Ie,D+=w*Gt,V+=w*Oe,R+=w*Re,U+=w*Kt,W+=w*$e,q+=w*Me,Y+=w*Qt,X+=w*Ne,Q+=w*De,Z+=w*Yt,ae+=w*Le,w=P[10],$+=w*xe,L+=w*be,M+=w*Vt,A+=w*Te,D+=w*Ie,V+=w*Gt,R+=w*Oe,U+=w*Re,W+=w*Kt,q+=w*$e,Y+=w*Me,X+=w*Qt,Q+=w*Ne,Z+=w*De,ae+=w*Yt,se+=w*Le,w=P[11],L+=w*xe,M+=w*be,A+=w*Vt,D+=w*Te,V+=w*Ie,R+=w*Gt,U+=w*Oe,W+=w*Re,q+=w*Kt,Y+=w*$e,X+=w*Me,Q+=w*Qt,Z+=w*Ne,ae+=w*De,se+=w*Yt,ue+=w*Le,w=P[12],M+=w*xe,A+=w*be,D+=w*Vt,V+=w*Te,R+=w*Ie,U+=w*Gt,W+=w*Oe,q+=w*Re,Y+=w*Kt,X+=w*$e,Q+=w*Me,Z+=w*Qt,ae+=w*Ne,se+=w*De,ue+=w*Yt,ot+=w*Le,w=P[13],A+=w*xe,D+=w*be,V+=w*Vt,R+=w*Te,U+=w*Ie,W+=w*Gt,q+=w*Oe,Y+=w*Re,X+=w*Kt,Q+=w*$e,Z+=w*Me,ae+=w*Qt,se+=w*Ne,ue+=w*De,ot+=w*Yt,Pe+=w*Le,w=P[14],D+=w*xe,V+=w*be,R+=w*Vt,U+=w*Te,W+=w*Ie,q+=w*Gt,Y+=w*Oe,X+=w*Re,Q+=w*Kt,Z+=w*$e,ae+=w*Me,se+=w*Qt,ue+=w*Ne,ot+=w*De,Pe+=w*Yt,Ae+=w*Le,w=P[15],V+=w*xe,R+=w*be,U+=w*Vt,W+=w*Te,q+=w*Ie,Y+=w*Gt,X+=w*Oe,Q+=w*Re,Z+=w*Kt,ae+=w*$e,se+=w*Me,ue+=w*Qt,ot+=w*Ne,Pe+=w*De,Ae+=w*Yt,at+=w*Le,B+=38*R,j+=38*U,H+=38*W,G+=38*q,F+=38*Y,E+=38*X,_+=38*Q,O+=38*Z,N+=38*ae,k+=38*se,$+=38*ue,L+=38*ot,M+=38*Pe,A+=38*Ae,D+=38*at,I=1,w=B+I+65535,I=Math.floor(w/65536),B=w-I*65536,w=j+I+65535,I=Math.floor(w/65536),j=w-I*65536,w=H+I+65535,I=Math.floor(w/65536),H=w-I*65536,w=G+I+65535,I=Math.floor(w/65536),G=w-I*65536,w=F+I+65535,I=Math.floor(w/65536),F=w-I*65536,w=E+I+65535,I=Math.floor(w/65536),E=w-I*65536,w=_+I+65535,I=Math.floor(w/65536),_=w-I*65536,w=O+I+65535,I=Math.floor(w/65536),O=w-I*65536,w=N+I+65535,I=Math.floor(w/65536),N=w-I*65536,w=k+I+65535,I=Math.floor(w/65536),k=w-I*65536,w=$+I+65535,I=Math.floor(w/65536),$=w-I*65536,w=L+I+65535,I=Math.floor(w/65536),L=w-I*65536,w=M+I+65535,I=Math.floor(w/65536),M=w-I*65536,w=A+I+65535,I=Math.floor(w/65536),A=w-I*65536,w=D+I+65535,I=Math.floor(w/65536),D=w-I*65536,w=V+I+65535,I=Math.floor(w/65536),V=w-I*65536,B+=I-1+37*(I-1),I=1,w=B+I+65535,I=Math.floor(w/65536),B=w-I*65536,w=j+I+65535,I=Math.floor(w/65536),j=w-I*65536,w=H+I+65535,I=Math.floor(w/65536),H=w-I*65536,w=G+I+65535,I=Math.floor(w/65536),G=w-I*65536,w=F+I+65535,I=Math.floor(w/65536),F=w-I*65536,w=E+I+65535,I=Math.floor(w/65536),E=w-I*65536,w=_+I+65535,I=Math.floor(w/65536),_=w-I*65536,w=O+I+65535,I=Math.floor(w/65536),O=w-I*65536,w=N+I+65535,I=Math.floor(w/65536),N=w-I*65536,w=k+I+65535,I=Math.floor(w/65536),k=w-I*65536,w=$+I+65535,I=Math.floor(w/65536),$=w-I*65536,w=L+I+65535,I=Math.floor(w/65536),L=w-I*65536,w=M+I+65535,I=Math.floor(w/65536),M=w-I*65536,w=A+I+65535,I=Math.floor(w/65536),A=w-I*65536,w=D+I+65535,I=Math.floor(w/65536),D=w-I*65536,w=V+I+65535,I=Math.floor(w/65536),V=w-I*65536,B+=I-1+37*(I-1),S[0]=B,S[1]=j,S[2]=H,S[3]=G,S[4]=F,S[5]=E,S[6]=_,S[7]=O,S[8]=N,S[9]=k,S[10]=$,S[11]=L,S[12]=M,S[13]=A,S[14]=D,S[15]=V}function h(S,P){d(S,P,P)}function p(S,P){const T=n();for(let w=0;w<16;w++)T[w]=P[w];for(let w=253;w>=0;w--)h(T,T),w!==2&&w!==4&&d(T,T,P);for(let w=0;w<16;w++)S[w]=T[w]}function v(S,P){const T=new Uint8Array(32),w=new Float64Array(80),I=n(),B=n(),j=n(),H=n(),G=n(),F=n();for(let N=0;N<31;N++)T[N]=S[N];T[31]=S[31]&127|64,T[0]&=248,l(w,P);for(let N=0;N<16;N++)B[N]=w[N];I[0]=H[0]=1;for(let N=254;N>=0;--N){const k=T[N>>>3]>>>(N&7)&1;a(I,B,k),a(j,H,k),u(G,I,j),f(I,I,j),u(j,B,H),f(B,B,H),h(H,G),h(F,I),d(I,j,I),d(j,B,G),u(G,I,j),f(I,I,j),h(B,I),f(j,H,F),d(I,j,s),u(I,I,H),d(j,j,I),d(I,H,F),d(H,B,w),h(B,G),a(I,B,k),a(j,H,k)}for(let N=0;N<16;N++)w[N+16]=I[N],w[N+32]=j[N],w[N+48]=B[N],w[N+64]=H[N];const E=w.subarray(32),_=w.subarray(16);p(E,E),d(_,_,E);const O=new Uint8Array(32);return c(O,_),O}t.scalarMult=v;function b(S){return v(S,i)}t.scalarMultBase=b;function y(S){if(S.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const P=new Uint8Array(S);return{publicKey:b(P),secretKey:P}}t.generateKeyPairFromSeed=y;function m(S){const P=(0,e.randomBytes)(32,S),T=y(P);return(0,r.wipe)(P),T}t.generateKeyPair=m;function g(S,P,T=!1){if(S.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(P.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const w=v(S,P);if(T){let I=0;for(let B=0;Bi+s.length,0));const r=yU(e);let n=0;for(const i of t)r.set(i,n),n+=i.length;return D8(r)}function fge(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,S=new Uint8Array(g);y!==m;){for(var P=p[y],T=0,w=g-1;(P!==0||T>>0,S[w]=P%a>>>0,P=P/a>>>0;if(P!==0)throw new Error("Non-zero carry");b=T,y++}for(var I=g-b;I!==g&&S[I]===0;)I++;for(var B=c.repeat(v);I>>0,g=new Uint8Array(m);p[v];){var S=r[p.charCodeAt(v)];if(S===255)return;for(var P=0,T=m-1;(S!==0||P>>0,g[T]=S%256>>>0,S=S/256>>>0;if(S!==0)throw new Error("Non-zero carry");y=P,v++}if(p[v]!==" "){for(var w=m-y;w!==m&&g[w]===0;)w++;for(var I=new Uint8Array(b+(m-w)),B=b;w!==m;)I[B++]=g[w++];return I}}}function h(p){var v=d(p);if(v)return v;throw new Error(`Non-${e} character`)}return{encode:f,decodeUnsafe:d,decode:h}}var dge=fge,hge=dge;const pge=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},vge=t=>new TextEncoder().encode(t),mge=t=>new TextDecoder().decode(t);class yge{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class gge{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return gU(this,e)}}class bge{constructor(e){this.decoders=e}or(e){return gU(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const gU=(t,e)=>new bge({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class wge{constructor(e,r,n,i){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=i,this.encoder=new yge(e,r,n),this.decoder=new gge(e,r,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const Ub=({name:t,prefix:e,encode:r,decode:n})=>new wge(t,e,r,n),Z1=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:i}=hge(r,e);return Ub({prefix:t,name:e,encode:n,decode:s=>pge(i(s))})},Ege=(t,e,r,n)=>{const i={};for(let u=0;u=8&&(a-=8,o[l++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o},xge=(t,e,r)=>{const n=e[e.length-1]==="=",i=(1<r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<Ub({prefix:e,name:t,encode(i){return xge(i,n,r)},decode(i){return Ege(i,n,r,t)}}),Cge=Ub({prefix:"\0",name:"identity",encode:t=>mge(t),decode:t=>vge(t)}),Sge=Object.freeze(Object.defineProperty({__proto__:null,identity:Cge},Symbol.toStringTag,{value:"Module"})),kge=an({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Age=Object.freeze(Object.defineProperty({__proto__:null,base2:kge},Symbol.toStringTag,{value:"Module"})),_ge=an({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Pge=Object.freeze(Object.defineProperty({__proto__:null,base8:_ge},Symbol.toStringTag,{value:"Module"})),Tge=Z1({prefix:"9",name:"base10",alphabet:"0123456789"}),Ige=Object.freeze(Object.defineProperty({__proto__:null,base10:Tge},Symbol.toStringTag,{value:"Module"})),Oge=an({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Rge=an({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),$ge=Object.freeze(Object.defineProperty({__proto__:null,base16:Oge,base16upper:Rge},Symbol.toStringTag,{value:"Module"})),Mge=an({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Nge=an({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Dge=an({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Lge=an({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Fge=an({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Bge=an({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),jge=an({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Uge=an({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),zge=an({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Wge=Object.freeze(Object.defineProperty({__proto__:null,base32:Mge,base32hex:Fge,base32hexpad:jge,base32hexpadupper:Uge,base32hexupper:Bge,base32pad:Dge,base32padupper:Lge,base32upper:Nge,base32z:zge},Symbol.toStringTag,{value:"Module"})),Hge=Z1({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),qge=Z1({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Vge=Object.freeze(Object.defineProperty({__proto__:null,base36:Hge,base36upper:qge},Symbol.toStringTag,{value:"Module"})),Gge=Z1({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Kge=Z1({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Qge=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Gge,base58flickr:Kge},Symbol.toStringTag,{value:"Module"})),Yge=an({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Jge=an({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Xge=an({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Zge=an({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),ebe=Object.freeze(Object.defineProperty({__proto__:null,base64:Yge,base64pad:Jge,base64url:Xge,base64urlpad:Zge},Symbol.toStringTag,{value:"Module"})),bU=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),tbe=bU.reduce((t,e,r)=>(t[r]=e,t),[]),rbe=bU.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function nbe(t){return t.reduce((e,r)=>(e+=tbe[r],e),"")}function ibe(t){const e=[];for(const r of t){const n=rbe[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const sbe=Ub({prefix:"🚀",name:"base256emoji",encode:nbe,decode:ibe}),obe=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:sbe},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const B9={...Sge,...Age,...Pge,...Ige,...$ge,...Wge,...Vge,...Qge,...ebe,...obe};function wU(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const j9=wU("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Q2=wU("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=yU(t.length);for(let r=0;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new fbe:typeof navigator<"u"?H9(navigator.userAgent):gbe()}function mbe(t){return t!==""&&pbe.reduce(function(e,r){var n=r[0],i=r[1];if(e)return e;var s=i.exec(t);return!!s&&[n,s]},!1)}function H9(t){var e=mbe(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new ube;var i=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);i?i.length=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function dbe(t,e){return function(r,n){e(r,n,t)}}function hbe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function pbe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function vbe(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function yU(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function gbe(){for(var t=[],e=0;e1||a(d,h)})})}function a(d,h){try{c(n[d](h))}catch(p){f(s[0][3],p)}}function c(d){d.value instanceof o1?Promise.resolve(d.value.v).then(l,u):f(s[0][2],d)}function l(d){a("next",d)}function u(d){a("throw",d)}function f(d,h){d(h),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Ebe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:o1(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function xbe(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof p5=="function"?p5(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function Cbe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Sbe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function kbe(t){return t&&t.__esModule?t:{default:t}}function Abe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function _be(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Pbe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return h5},__asyncDelegator:Ebe,__asyncGenerator:wbe,__asyncValues:xbe,__await:o1,__awaiter:pbe,__classPrivateFieldGet:Abe,__classPrivateFieldSet:_be,__createBinding:mbe,__decorate:fbe,__exportStar:ybe,__extends:lbe,__generator:vbe,__importDefault:kbe,__importStar:Sbe,__makeTemplateObject:Cbe,__metadata:hbe,__param:dbe,__read:yU,__rest:ube,__spread:gbe,__spreadArrays:bbe,__values:p5},Symbol.toStringTag,{value:"Module"})),zb=YI(Pbe);var Y2={},eh={},zT;function Tbe(){if(zT)return eh;zT=1,Object.defineProperty(eh,"__esModule",{value:!0}),eh.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return eh.delay=t,eh}var Jc={},J2={},Xc={},WT;function Ibe(){return WT||(WT=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.ONE_THOUSAND=Xc.ONE_HUNDRED=void 0,Xc.ONE_HUNDRED=100,Xc.ONE_THOUSAND=1e3),Xc}var X2={},HT;function Obe(){return HT||(HT=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(X2)),X2}var qT;function gU(){return qT||(qT=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=zb;e.__exportStar(Ibe(),t),e.__exportStar(Obe(),t)}(J2)),J2}var VT;function Rbe(){if(VT)return Jc;VT=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.fromMiliseconds=Jc.toMiliseconds=void 0;const t=gU();function e(n){return n*t.ONE_THOUSAND}Jc.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Jc.fromMiliseconds=r,Jc}var GT;function $be(){return GT||(GT=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=zb;e.__exportStar(Tbe(),t),e.__exportStar(Rbe(),t)}(Y2)),Y2}var wu={},KT;function Mbe(){if(KT)return wu;KT=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return wu.Watch=t,wu.default=t,wu}var Z2={},th={},QT;function Nbe(){if(QT)return th;QT=1,Object.defineProperty(th,"__esModule",{value:!0}),th.IWatch=void 0;class t{}return th.IWatch=t,th}var YT;function Dbe(){return YT||(YT=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),zb.__exportStar(Nbe(),t)}(Z2)),Z2}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=zb;e.__exportStar($be(),t),e.__exportStar(Mbe(),t),e.__exportStar(Dbe(),t),e.__exportStar(gU(),t)})(kl);var dt={};Object.defineProperty(dt,"__esModule",{value:!0});dt.getLocalStorage=dt.getLocalStorageOrThrow=dt.getCrypto=dt.getCryptoOrThrow=wU=dt.getLocation=dt.getLocationOrThrow=L8=dt.getNavigator=dt.getNavigatorOrThrow=bU=dt.getDocument=dt.getDocumentOrThrow=dt.getFromWindowOrThrow=dt.getFromWindow=void 0;function su(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}dt.getFromWindow=su;function Ad(t){const e=su(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}dt.getFromWindowOrThrow=Ad;function Lbe(){return Ad("document")}dt.getDocumentOrThrow=Lbe;function Bbe(){return su("document")}var bU=dt.getDocument=Bbe;function Fbe(){return Ad("navigator")}dt.getNavigatorOrThrow=Fbe;function jbe(){return su("navigator")}var L8=dt.getNavigator=jbe;function Ube(){return Ad("location")}dt.getLocationOrThrow=Ube;function zbe(){return su("location")}var wU=dt.getLocation=zbe;function Wbe(){return Ad("crypto")}dt.getCryptoOrThrow=Wbe;function Hbe(){return su("crypto")}dt.getCrypto=Hbe;function qbe(){return Ad("localStorage")}dt.getLocalStorageOrThrow=qbe;function Vbe(){return su("localStorage")}dt.getLocalStorage=Vbe;var B8={};Object.defineProperty(B8,"__esModule",{value:!0});var EU=B8.getWindowMetadata=void 0;const JT=dt;function Gbe(){let t,e;try{t=JT.getDocumentOrThrow(),e=JT.getLocationOrThrow()}catch{return null}function r(){const f=t.getElementsByTagName("link"),d=[];for(let h=0;h-1){const b=p.getAttribute("href");if(b)if(b.toLowerCase().indexOf("https:")===-1&&b.toLowerCase().indexOf("http:")===-1&&b.indexOf("//")!==0){let y=e.protocol+"//"+e.host;if(b.indexOf("/")===0)y+=b;else{const m=e.pathname.split("/");m.pop();const g=m.join("/");y+=g+"/"+b}d.push(y)}else if(b.indexOf("//")===0){const y=e.protocol+b;d.push(y)}else d.push(b)}}return d}function n(...f){const d=t.getElementsByTagName("meta");for(let h=0;hp.getAttribute(b)).filter(b=>b?f.includes(b):!1);if(v.length&&v){const b=p.getAttribute("content");if(b)return b}}return""}function i(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=t.title),f}function s(){return n("description","og:description","twitter:description","keywords")}const o=i(),a=s(),c=e.origin,l=r();return{description:a,url:c,icons:l,name:o}}EU=B8.getWindowMetadata=Gbe;var a1={},Kbe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),xU="%[a-f0-9]{2}",XT=new RegExp("("+xU+")|([^%]+?)","gi"),ZT=new RegExp("("+xU+")+","gi");function v5(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],v5(r),v5(n))}function Qbe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(XT)||[],r=1;r{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},Zbe=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),s=0;sm==null,o=Symbol("encodeFragmentIdentifier");function a(m){switch(m.arrayFormat){case"index":return g=>(S,P)=>{const T=S.length;return P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,[u(g,m),"[",T,"]"].join("")]:[...S,[u(g,m),"[",u(T,m),"]=",u(P,m)].join("")]};case"bracket":return g=>(S,P)=>P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,[u(g,m),"[]"].join("")]:[...S,[u(g,m),"[]=",u(P,m)].join("")];case"colon-list-separator":return g=>(S,P)=>P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,[u(g,m),":list="].join("")]:[...S,[u(g,m),":list=",u(P,m)].join("")];case"comma":case"separator":case"bracket-separator":{const g=m.arrayFormat==="bracket-separator"?"[]=":"=";return S=>(P,T)=>T===void 0||m.skipNull&&T===null||m.skipEmptyString&&T===""?P:(T=T===null?"":T,P.length===0?[[u(S,m),g,u(T,m)].join("")]:[[P,u(T,m)].join(m.arrayFormatSeparator)])}default:return g=>(S,P)=>P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,u(g,m)]:[...S,[u(g,m),"=",u(P,m)].join("")]}}function c(m){let g;switch(m.arrayFormat){case"index":return(S,P,T)=>{if(g=/\[(\d*)\]$/.exec(S),S=S.replace(/\[\d*\]$/,""),!g){T[S]=P;return}T[S]===void 0&&(T[S]={}),T[S][g[1]]=P};case"bracket":return(S,P,T)=>{if(g=/(\[\])$/.exec(S),S=S.replace(/\[\]$/,""),!g){T[S]=P;return}if(T[S]===void 0){T[S]=[P];return}T[S]=[].concat(T[S],P)};case"colon-list-separator":return(S,P,T)=>{if(g=/(:list)$/.exec(S),S=S.replace(/:list$/,""),!g){T[S]=P;return}if(T[S]===void 0){T[S]=[P];return}T[S]=[].concat(T[S],P)};case"comma":case"separator":return(S,P,T)=>{const w=typeof P=="string"&&P.includes(m.arrayFormatSeparator),I=typeof P=="string"&&!w&&f(P,m).includes(m.arrayFormatSeparator);P=I?f(P,m):P;const F=w||I?P.split(m.arrayFormatSeparator).map(j=>f(j,m)):P===null?P:f(P,m);T[S]=F};case"bracket-separator":return(S,P,T)=>{const w=/(\[\])$/.test(S);if(S=S.replace(/\[\]$/,""),!w){T[S]=P&&f(P,m);return}const I=P===null?[]:P.split(m.arrayFormatSeparator).map(F=>f(F,m));if(T[S]===void 0){T[S]=I;return}T[S]=[].concat(T[S],I)};default:return(S,P,T)=>{if(T[S]===void 0){T[S]=P;return}T[S]=[].concat(T[S],P)}}}function l(m){if(typeof m!="string"||m.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(m,g){return g.encode?g.strict?e(m):encodeURIComponent(m):m}function f(m,g){return g.decode?r(m):m}function d(m){return Array.isArray(m)?m.sort():typeof m=="object"?d(Object.keys(m)).sort((g,S)=>Number(g)-Number(S)).map(g=>m[g]):m}function h(m){const g=m.indexOf("#");return g!==-1&&(m=m.slice(0,g)),m}function p(m){let g="";const S=m.indexOf("#");return S!==-1&&(g=m.slice(S)),g}function v(m){m=h(m);const g=m.indexOf("?");return g===-1?"":m.slice(g+1)}function b(m,g){return g.parseNumbers&&!Number.isNaN(Number(m))&&typeof m=="string"&&m.trim()!==""?m=Number(m):g.parseBooleans&&m!==null&&(m.toLowerCase()==="true"||m.toLowerCase()==="false")&&(m=m.toLowerCase()==="true"),m}function y(m,g){g=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},g),l(g.arrayFormatSeparator);const S=c(g),P=Object.create(null);if(typeof m!="string"||(m=m.trim().replace(/^[?#&]/,""),!m))return P;for(const T of m.split("&")){if(T==="")continue;let[w,I]=n(g.decode?T.replace(/\+/g," "):T,"=");I=I===void 0?null:["comma","separator","bracket-separator"].includes(g.arrayFormat)?I:f(I,g),S(f(w,g),I,P)}for(const T of Object.keys(P)){const w=P[T];if(typeof w=="object"&&w!==null)for(const I of Object.keys(w))w[I]=b(w[I],g);else P[T]=b(w,g)}return g.sort===!1?P:(g.sort===!0?Object.keys(P).sort():Object.keys(P).sort(g.sort)).reduce((T,w)=>{const I=P[w];return I&&typeof I=="object"&&!Array.isArray(I)?T[w]=d(I):T[w]=I,T},Object.create(null))}t.extract=v,t.parse=y,t.stringify=(m,g)=>{if(!m)return"";g=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},g),l(g.arrayFormatSeparator);const S=I=>g.skipNull&&s(m[I])||g.skipEmptyString&&m[I]==="",P=a(g),T={};for(const I of Object.keys(m))S(I)||(T[I]=m[I]);const w=Object.keys(T);return g.sort!==!1&&w.sort(g.sort),w.map(I=>{const F=m[I];return F===void 0?"":F===null?u(I,g):Array.isArray(F)?F.length===0&&g.arrayFormat==="bracket-separator"?u(I,g)+"[]":F.reduce(P(I),[]).join("&"):u(I,g)+"="+u(F,g)}).filter(I=>I.length>0).join("&")},t.parseUrl=(m,g)=>{g=Object.assign({decode:!0},g);const[S,P]=n(m,"#");return Object.assign({url:S.split("?")[0]||"",query:y(v(m),g)},g&&g.parseFragmentIdentifier&&P?{fragmentIdentifier:f(P,g)}:{})},t.stringifyUrl=(m,g)=>{g=Object.assign({encode:!0,strict:!0,[o]:!0},g);const S=h(m.url).split("?")[0]||"",P=t.extract(m.url),T=t.parse(P,{sort:!1}),w=Object.assign(T,m.query);let I=t.stringify(w,g);I&&(I=`?${I}`);let F=p(m.url);return m.fragmentIdentifier&&(F=`#${g[o]?u(m.fragmentIdentifier,g):m.fragmentIdentifier}`),`${S}${I}${F}`},t.pick=(m,g,S)=>{S=Object.assign({parseFragmentIdentifier:!0,[o]:!1},S);const{url:P,query:T,fragmentIdentifier:w}=t.parseUrl(m,S);return t.stringifyUrl({url:P,query:i(T,g),fragmentIdentifier:w},S)},t.exclude=(m,g,S)=>{const P=Array.isArray(g)?T=>!g.includes(T):(T,w)=>!g(T,w);return t.pick(m,P,S)}})(a1);const ewe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function _Pe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)}),r}function CU(t,e){return t.includes(":")?[t]:e.chains||[]}const SU="base10",ti="base16",m5="base64pad",F8="utf8",kU=0,ep=1,twe=0,e9=1,y5=12,j8=32;function PPe(){const t=N8.generateKeyPair();return{privateKey:As(t.secretKey,ti),publicKey:As(t.publicKey,ti)}}function TPe(){const t=Db.randomBytes(j8);return As(t,ti)}function IPe(t,e){const r=N8.sharedKey(ms(t,ti),ms(e,ti)),n=new Vye(jb.SHA256,r).expand(j8);return As(n,ti)}function OPe(t){const e=jb.hash(ms(t,ti));return As(e,ti)}function RPe(t){const e=jb.hash(ms(t,F8));return As(e,ti)}function rwe(t){return ms(`${t}`,SU)}function Wb(t){return Number(As(t,SU))}function $Pe(t){const e=rwe(typeof t.type<"u"?t.type:kU);if(Wb(e)===ep&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?ms(t.senderPublicKey,ti):void 0,n=typeof t.iv<"u"?ms(t.iv,ti):Db.randomBytes(y5),i=new $8.ChaCha20Poly1305(ms(t.symKey,ti)).seal(n,ms(t.message,F8));return nwe({type:e,sealed:i,iv:n,senderPublicKey:r})}function MPe(t){const e=new $8.ChaCha20Poly1305(ms(t.symKey,ti)),{sealed:r,iv:n}=AU(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return As(i,F8)}function nwe(t){if(Wb(t.type)===ep){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return As(NT([t.type,t.senderPublicKey,t.iv,t.sealed]),m5)}return As(NT([t.type,t.iv,t.sealed]),m5)}function AU(t){const e=ms(t,m5),r=e.slice(twe,e9),n=e9;if(Wb(r)===ep){const a=n+j8,c=a+y5,l=e.slice(n,a),u=e.slice(a,c),f=e.slice(c);return{type:r,sealed:f,iv:u,senderPublicKey:l}}const i=n+y5,s=e.slice(n,i),o=e.slice(i);return{type:r,sealed:o,iv:s}}function NPe(t,e){const r=AU(t);return iwe({type:Wb(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?As(r.senderPublicKey,ti):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function iwe(t){const e=(t==null?void 0:t.type)||kU;if(e===ep){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function DPe(t){return t.type===ep&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var swe=Object.defineProperty,t9=Object.getOwnPropertySymbols,owe=Object.prototype.hasOwnProperty,awe=Object.prototype.propertyIsEnumerable,r9=(t,e,r)=>e in t?swe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n9=(t,e)=>{for(var r in e||(e={}))owe.call(e,r)&&r9(t,r,e[r]);if(t9)for(var r of t9(e))awe.call(e,r)&&r9(t,r,e[r]);return t};const cwe="ReactNative",qa={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},lwe="js";function _U(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function uwe(){return!bU()&&!!L8()&&navigator.product===cwe}function fwe(){return!_U()&&!!L8()}function U8(){return uwe()?qa.reactNative:_U()?qa.node:fwe()?qa.browser:qa.unknown}function dwe(t,e){let r=a1.parse(t);return r=n9(n9({},r),e),t=a1.stringify(r),t}function LPe(){return EU()||{name:"",description:"",url:"",icons:[""]}}function hwe(){if(U8()===qa.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:r,Version:n}=global.Platform;return[r,n].join("-")}const t=ibe();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function pwe(){var t;const e=U8();return e===qa.browser?[e,((t=wU())==null?void 0:t.host)||"unknown"].join(":"):e}function vwe(t,e,r){const n=hwe(),i=pwe();return[[t,e].join("-"),[lwe,r].join("-"),n,i].join("/")}function BPe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o}){const a=r.split("?"),c=vwe(t,e,n),l={auth:i,ua:c,projectId:s,useOnCloseEvent:o||void 0},u=dwe(a[1]||"",l);return a[0]+"?"+u}function yl(t,e){return t.filter(r=>e.includes(r)).length===t.length}function FPe(t){return Object.fromEntries(t.entries())}function jPe(t){return new Map(Object.entries(t))}function UPe(t=kl.FIVE_MINUTES,e){const r=kl.toMiliseconds(t||kl.FIVE_MINUTES);let n,i,s;return{resolve:o=>{s&&n&&(clearTimeout(s),n(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},r),n=o,i=a})}}function zPe(t,e,r){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(r)),e);try{const o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function PU(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function WPe(t){return PU("topic",t)}function HPe(t){return PU("id",t)}function qPe(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function VPe(t,e){return kl.fromMiliseconds((e||Date.now())+kl.toMiliseconds(t))}function GPe(t){return Date.now()>=kl.toMiliseconds(t)}function KPe(t,e){return`${t}${e?`:${e}`:""}`}function eE(t=[],e=[]){return[...new Set([...t,...e])]}async function QPe({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${t}&sessionTopic=${e}`,o=U8();o===qa.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):o===qa.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(s)}catch(n){console.error(n)}}const mwe="irn";function YPe(t){return(t==null?void 0:t.relay)||{protocol:mwe}}function JPe(t){const e=ewe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var ywe=Object.defineProperty,i9=Object.getOwnPropertySymbols,gwe=Object.prototype.hasOwnProperty,bwe=Object.prototype.propertyIsEnumerable,s9=(t,e,r)=>e in t?ywe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,wwe=(t,e)=>{for(var r in e||(e={}))gwe.call(e,r)&&s9(t,r,e[r]);if(i9)for(var r of i9(e))bwe.call(e,r)&&s9(t,r,e[r]);return t};function Ewe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=t[i];r[s]=o}}),r}function XPe(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=a1.parse(s);return{protocol:n,topic:xwe(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:Ewe(o)}}function xwe(t){return t.startsWith("//")?t.substring(2):t}function Cwe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const s=r+e+i;t[i]&&(n[s]=t[i])}),n}function ZPe(t){return`${t.protocol}:${t.topic}@${t.version}?`+a1.stringify(wwe({symKey:t.symKey},Cwe(t.relay)))}var Swe=Object.defineProperty,kwe=Object.defineProperties,Awe=Object.getOwnPropertyDescriptors,o9=Object.getOwnPropertySymbols,_we=Object.prototype.hasOwnProperty,Pwe=Object.prototype.propertyIsEnumerable,a9=(t,e,r)=>e in t?Swe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Twe=(t,e)=>{for(var r in e||(e={}))_we.call(e,r)&&a9(t,r,e[r]);if(o9)for(var r of o9(e))Pwe.call(e,r)&&a9(t,r,e[r]);return t},Iwe=(t,e)=>kwe(t,Awe(e));function _d(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function Owe(t){const e=[];return Object.values(t).forEach(r=>{e.push(..._d(r.accounts))}),e}function Rwe(t,e){const r=[];return Object.values(t).forEach(n=>{_d(n.accounts).includes(e)&&r.push(...n.methods)}),r}function $we(t,e){const r=[];return Object.values(t).forEach(n=>{_d(n.accounts).includes(e)&&r.push(...n.events)}),r}function eTe(t,e){const r=Wwe(t,e);if(r)throw new Error(r.message);const n={};for(const[i,s]of Object.entries(t))n[i]={methods:s.methods,events:s.events,chains:s.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function TU(t){return t.includes(":")}function Mwe(t){return TU(t)?t.split(":")[0]:t}function IU(t){var e,r,n;const i={};if(!z8(t))return i;for(const[s,o]of Object.entries(t)){const a=TU(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],u=Mwe(s);i[u]=Iwe(Twe({},i[u]),{chains:eE(a,(e=i[u])==null?void 0:e.chains),methods:eE(c,(r=i[u])==null?void 0:r.methods),events:eE(l,(n=i[u])==null?void 0:n.events)})}return i}const Nwe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Dwe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function La(t,e){const{message:r,code:n}=Dwe[t];return{message:e?`${r} ${e}`:r,code:n}}function Gf(t,e){const{message:r,code:n}=Nwe[t];return{message:e?`${r} ${e}`:r,code:n}}function Hb(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function z8(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Al(t){return typeof t>"u"}function Ji(t,e){return e&&Al(t)?!0:typeof t=="string"&&!!t.trim().length}function W8(t,e){return e&&Al(t)?!0:typeof t=="number"&&!isNaN(t)}function tTe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let s=!0;return yl(i,n)?(n.forEach(o=>{const{accounts:a,methods:c,events:l}=t.namespaces[o],u=_d(a),f=r[o];(!yl(CU(o,f),u)||!yl(f.methods,c)||!yl(f.events,l))&&(s=!1)}),s):!1}function Oy(t){return Ji(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function Lwe(t){if(Ji(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Oy(r)}}return!1}function rTe(t){if(Ji(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function nTe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function iTe(t){return t==null?void 0:t.topic}function sTe(t,e){let r=null;return Ji(t==null?void 0:t.publicKey,!1)||(r=La("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function c9(t){let e=!0;return Hb(t)?t.length&&(e=t.every(r=>Ji(r,!1))):e=!1,e}function Bwe(t,e,r){let n=null;return Hb(e)&&e.length?e.forEach(i=>{n||Oy(i)||(n=Gf("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):Oy(t)||(n=Gf("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Fwe(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;const o=Bwe(i,CU(i,s),`${e} ${r}`);o&&(n=o)}),n}function jwe(t,e){let r=null;return Hb(t)?t.forEach(n=>{r||Lwe(n)||(r=Gf("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Gf("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function Uwe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=jwe(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function zwe(t,e){let r=null;return c9(t==null?void 0:t.methods)?c9(t==null?void 0:t.events)||(r=Gf("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Gf("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function OU(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=zwe(n,`${e}, namespace`);i&&(r=i)}),r}function oTe(t,e,r){let n=null;if(t&&z8(t)){const i=OU(t,e);i&&(n=i);const s=Fwe(t,e,r);s&&(n=s)}else n=La("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function Wwe(t,e){let r=null;if(t&&z8(t)){const n=OU(t,e);n&&(r=n);const i=Uwe(t,e);i&&(r=i)}else r=La("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function Hwe(t){return Ji(t.protocol,!0)}function aTe(t,e){let r=!1;return e&&!t?r=!0:t&&Hb(t)&&t.length&&t.forEach(n=>{r=Hwe(n)}),r}function cTe(t){return typeof t=="number"}function lTe(t){return typeof t<"u"&&typeof t!==null}function uTe(t){return!(!t||typeof t!="object"||!t.code||!W8(t.code,!1)||!t.message||!Ji(t.message,!1))}function fTe(t){return!(Al(t)||!Ji(t.method,!1))}function dTe(t){return!(Al(t)||Al(t.result)&&Al(t.error)||!W8(t.id,!1)||!Ji(t.jsonrpc,!1))}function hTe(t){return!(Al(t)||!Ji(t.name,!1))}function pTe(t,e){return!(!Oy(e)||!Owe(t).includes(e))}function vTe(t,e,r){return Ji(r,!1)?Rwe(t,e).includes(r):!1}function mTe(t,e,r){return Ji(r,!1)?$we(t,e).includes(r):!1}function yTe(t,e,r){let n=null;const i=qwe(t),s=Vwe(e),o=Object.keys(i),a=Object.keys(s),c=l9(Object.keys(t)),l=l9(Object.keys(e)),u=c.filter(f=>!l.includes(f));return u.length&&(n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. +***************************************************************************** */var f5=function(t,e){return f5=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},f5(t,e)};function wbe(t,e){f5(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var d5=function(){return d5=Object.assign||function(e){for(var r,n=1,i=arguments.length;n=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function Cbe(t,e){return function(r,n){e(r,n,t)}}function Sbe(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function kbe(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(f){o(f)}}function c(u){try{l(n.throw(u))}catch(f){o(f)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})}function Abe(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function xU(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}function Tbe(){for(var t=[],e=0;e1||a(d,h)})})}function a(d,h){try{c(n[d](h))}catch(p){f(s[0][3],p)}}function c(d){d.value instanceof o1?Promise.resolve(d.value.v).then(l,u):f(s[0][2],d)}function l(d){a("next",d)}function u(d){a("throw",d)}function f(d,h){d(h),s.shift(),s.length&&a(s[0][0],s[0][1])}}function Rbe(t){var e,r;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,s){e[i]=t[i]?function(o){return(r=!r)?{value:o1(t[i](o)),done:i==="return"}:s?s(o):o}:s}}function $be(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof h5=="function"?h5(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=t[s]&&function(o){return new Promise(function(a,c){o=t[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function Mbe(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function Nbe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Dbe(t){return t&&t.__esModule?t:{default:t}}function Lbe(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function Fbe(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}const Bbe=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return d5},__asyncDelegator:Rbe,__asyncGenerator:Obe,__asyncValues:$be,__await:o1,__awaiter:kbe,__classPrivateFieldGet:Lbe,__classPrivateFieldSet:Fbe,__createBinding:_be,__decorate:xbe,__exportStar:Pbe,__extends:wbe,__generator:Abe,__importDefault:Dbe,__importStar:Nbe,__makeTemplateObject:Mbe,__metadata:Sbe,__param:Cbe,__read:xU,__rest:Ebe,__spread:Tbe,__spreadArrays:Ibe,__values:h5},Symbol.toStringTag,{value:"Module"})),zb=ZI(Bbe);var Y2={},eh={},q9;function jbe(){if(q9)return eh;q9=1,Object.defineProperty(eh,"__esModule",{value:!0}),eh.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return eh.delay=t,eh}var Jc={},J2={},Xc={},V9;function Ube(){return V9||(V9=1,Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.ONE_THOUSAND=Xc.ONE_HUNDRED=void 0,Xc.ONE_HUNDRED=100,Xc.ONE_THOUSAND=1e3),Xc}var X2={},G9;function zbe(){return G9||(G9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=t.ONE_MINUTE*5,t.TEN_MINUTES=t.ONE_MINUTE*10,t.THIRTY_MINUTES=t.ONE_MINUTE*30,t.SIXTY_MINUTES=t.ONE_MINUTE*60,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=t.ONE_HOUR*3,t.SIX_HOURS=t.ONE_HOUR*6,t.TWELVE_HOURS=t.ONE_HOUR*12,t.TWENTY_FOUR_HOURS=t.ONE_HOUR*24,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=t.ONE_DAY*3,t.FIVE_DAYS=t.ONE_DAY*5,t.SEVEN_DAYS=t.ONE_DAY*7,t.THIRTY_DAYS=t.ONE_DAY*30,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=t.ONE_WEEK*2,t.THREE_WEEKS=t.ONE_WEEK*3,t.FOUR_WEEKS=t.ONE_WEEK*4,t.ONE_YEAR=t.ONE_DAY*365}(X2)),X2}var K9;function CU(){return K9||(K9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=zb;e.__exportStar(Ube(),t),e.__exportStar(zbe(),t)}(J2)),J2}var Q9;function Wbe(){if(Q9)return Jc;Q9=1,Object.defineProperty(Jc,"__esModule",{value:!0}),Jc.fromMiliseconds=Jc.toMiliseconds=void 0;const t=CU();function e(n){return n*t.ONE_THOUSAND}Jc.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Jc.fromMiliseconds=r,Jc}var Y9;function Hbe(){return Y9||(Y9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=zb;e.__exportStar(jbe(),t),e.__exportStar(Wbe(),t)}(Y2)),Y2}var wu={},J9;function qbe(){if(J9)return wu;J9=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.Watch=void 0;class t{constructor(){this.timestamps=new Map}start(r){if(this.timestamps.has(r))throw new Error(`Watch already started for label: ${r}`);this.timestamps.set(r,{started:Date.now()})}stop(r){const n=this.get(r);if(typeof n.elapsed<"u")throw new Error(`Watch already stopped for label: ${r}`);const i=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:i})}get(r){const n=this.timestamps.get(r);if(typeof n>"u")throw new Error(`No timestamp found for label: ${r}`);return n}elapsed(r){const n=this.get(r);return n.elapsed||Date.now()-n.started}}return wu.Watch=t,wu.default=t,wu}var Z2={},th={},X9;function Vbe(){if(X9)return th;X9=1,Object.defineProperty(th,"__esModule",{value:!0}),th.IWatch=void 0;class t{}return th.IWatch=t,th}var Z9;function Gbe(){return Z9||(Z9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),zb.__exportStar(Vbe(),t)}(Z2)),Z2}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=zb;e.__exportStar(Hbe(),t),e.__exportStar(qbe(),t),e.__exportStar(Gbe(),t),e.__exportStar(CU(),t)})(kl);var ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.getLocalStorage=ht.getLocalStorageOrThrow=ht.getCrypto=ht.getCryptoOrThrow=kU=ht.getLocation=ht.getLocationOrThrow=L8=ht.getNavigator=ht.getNavigatorOrThrow=SU=ht.getDocument=ht.getDocumentOrThrow=ht.getFromWindowOrThrow=ht.getFromWindow=void 0;function su(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}ht.getFromWindow=su;function Ad(t){const e=su(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}ht.getFromWindowOrThrow=Ad;function Kbe(){return Ad("document")}ht.getDocumentOrThrow=Kbe;function Qbe(){return su("document")}var SU=ht.getDocument=Qbe;function Ybe(){return Ad("navigator")}ht.getNavigatorOrThrow=Ybe;function Jbe(){return su("navigator")}var L8=ht.getNavigator=Jbe;function Xbe(){return Ad("location")}ht.getLocationOrThrow=Xbe;function Zbe(){return su("location")}var kU=ht.getLocation=Zbe;function ewe(){return Ad("crypto")}ht.getCryptoOrThrow=ewe;function twe(){return su("crypto")}ht.getCrypto=twe;function rwe(){return Ad("localStorage")}ht.getLocalStorageOrThrow=rwe;function nwe(){return su("localStorage")}ht.getLocalStorage=nwe;var F8={};Object.defineProperty(F8,"__esModule",{value:!0});var AU=F8.getWindowMetadata=void 0;const eT=ht;function iwe(){let t,e;try{t=eT.getDocumentOrThrow(),e=eT.getLocationOrThrow()}catch{return null}function r(){const f=t.getElementsByTagName("link"),d=[];for(let h=0;h-1){const b=p.getAttribute("href");if(b)if(b.toLowerCase().indexOf("https:")===-1&&b.toLowerCase().indexOf("http:")===-1&&b.indexOf("//")!==0){let y=e.protocol+"//"+e.host;if(b.indexOf("/")===0)y+=b;else{const m=e.pathname.split("/");m.pop();const g=m.join("/");y+=g+"/"+b}d.push(y)}else if(b.indexOf("//")===0){const y=e.protocol+b;d.push(y)}else d.push(b)}}return d}function n(...f){const d=t.getElementsByTagName("meta");for(let h=0;hp.getAttribute(b)).filter(b=>b?f.includes(b):!1);if(v.length&&v){const b=p.getAttribute("content");if(b)return b}}return""}function i(){let f=n("name","og:site_name","og:title","twitter:title");return f||(f=t.title),f}function s(){return n("description","og:description","twitter:description","keywords")}const o=i(),a=s(),c=e.origin,l=r();return{description:a,url:c,icons:l,name:o}}AU=F8.getWindowMetadata=iwe;var a1={},swe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),_U="%[a-f0-9]{2}",tT=new RegExp("("+_U+")|([^%]+?)","gi"),rT=new RegExp("("+_U+")+","gi");function p5(t,e){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],p5(r),p5(n))}function owe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(tT)||[],r=1;r{if(!(typeof t=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(e==="")return[t];const r=t.indexOf(e);return r===-1?[t]:[t.slice(0,r),t.slice(r+e.length)]},uwe=function(t,e){for(var r={},n=Object.keys(t),i=Array.isArray(e),s=0;sm==null,o=Symbol("encodeFragmentIdentifier");function a(m){switch(m.arrayFormat){case"index":return g=>(S,P)=>{const T=S.length;return P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,[u(g,m),"[",T,"]"].join("")]:[...S,[u(g,m),"[",u(T,m),"]=",u(P,m)].join("")]};case"bracket":return g=>(S,P)=>P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,[u(g,m),"[]"].join("")]:[...S,[u(g,m),"[]=",u(P,m)].join("")];case"colon-list-separator":return g=>(S,P)=>P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,[u(g,m),":list="].join("")]:[...S,[u(g,m),":list=",u(P,m)].join("")];case"comma":case"separator":case"bracket-separator":{const g=m.arrayFormat==="bracket-separator"?"[]=":"=";return S=>(P,T)=>T===void 0||m.skipNull&&T===null||m.skipEmptyString&&T===""?P:(T=T===null?"":T,P.length===0?[[u(S,m),g,u(T,m)].join("")]:[[P,u(T,m)].join(m.arrayFormatSeparator)])}default:return g=>(S,P)=>P===void 0||m.skipNull&&P===null||m.skipEmptyString&&P===""?S:P===null?[...S,u(g,m)]:[...S,[u(g,m),"=",u(P,m)].join("")]}}function c(m){let g;switch(m.arrayFormat){case"index":return(S,P,T)=>{if(g=/\[(\d*)\]$/.exec(S),S=S.replace(/\[\d*\]$/,""),!g){T[S]=P;return}T[S]===void 0&&(T[S]={}),T[S][g[1]]=P};case"bracket":return(S,P,T)=>{if(g=/(\[\])$/.exec(S),S=S.replace(/\[\]$/,""),!g){T[S]=P;return}if(T[S]===void 0){T[S]=[P];return}T[S]=[].concat(T[S],P)};case"colon-list-separator":return(S,P,T)=>{if(g=/(:list)$/.exec(S),S=S.replace(/:list$/,""),!g){T[S]=P;return}if(T[S]===void 0){T[S]=[P];return}T[S]=[].concat(T[S],P)};case"comma":case"separator":return(S,P,T)=>{const w=typeof P=="string"&&P.includes(m.arrayFormatSeparator),I=typeof P=="string"&&!w&&f(P,m).includes(m.arrayFormatSeparator);P=I?f(P,m):P;const B=w||I?P.split(m.arrayFormatSeparator).map(j=>f(j,m)):P===null?P:f(P,m);T[S]=B};case"bracket-separator":return(S,P,T)=>{const w=/(\[\])$/.test(S);if(S=S.replace(/\[\]$/,""),!w){T[S]=P&&f(P,m);return}const I=P===null?[]:P.split(m.arrayFormatSeparator).map(B=>f(B,m));if(T[S]===void 0){T[S]=I;return}T[S]=[].concat(T[S],I)};default:return(S,P,T)=>{if(T[S]===void 0){T[S]=P;return}T[S]=[].concat(T[S],P)}}}function l(m){if(typeof m!="string"||m.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(m,g){return g.encode?g.strict?e(m):encodeURIComponent(m):m}function f(m,g){return g.decode?r(m):m}function d(m){return Array.isArray(m)?m.sort():typeof m=="object"?d(Object.keys(m)).sort((g,S)=>Number(g)-Number(S)).map(g=>m[g]):m}function h(m){const g=m.indexOf("#");return g!==-1&&(m=m.slice(0,g)),m}function p(m){let g="";const S=m.indexOf("#");return S!==-1&&(g=m.slice(S)),g}function v(m){m=h(m);const g=m.indexOf("?");return g===-1?"":m.slice(g+1)}function b(m,g){return g.parseNumbers&&!Number.isNaN(Number(m))&&typeof m=="string"&&m.trim()!==""?m=Number(m):g.parseBooleans&&m!==null&&(m.toLowerCase()==="true"||m.toLowerCase()==="false")&&(m=m.toLowerCase()==="true"),m}function y(m,g){g=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},g),l(g.arrayFormatSeparator);const S=c(g),P=Object.create(null);if(typeof m!="string"||(m=m.trim().replace(/^[?#&]/,""),!m))return P;for(const T of m.split("&")){if(T==="")continue;let[w,I]=n(g.decode?T.replace(/\+/g," "):T,"=");I=I===void 0?null:["comma","separator","bracket-separator"].includes(g.arrayFormat)?I:f(I,g),S(f(w,g),I,P)}for(const T of Object.keys(P)){const w=P[T];if(typeof w=="object"&&w!==null)for(const I of Object.keys(w))w[I]=b(w[I],g);else P[T]=b(w,g)}return g.sort===!1?P:(g.sort===!0?Object.keys(P).sort():Object.keys(P).sort(g.sort)).reduce((T,w)=>{const I=P[w];return I&&typeof I=="object"&&!Array.isArray(I)?T[w]=d(I):T[w]=I,T},Object.create(null))}t.extract=v,t.parse=y,t.stringify=(m,g)=>{if(!m)return"";g=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},g),l(g.arrayFormatSeparator);const S=I=>g.skipNull&&s(m[I])||g.skipEmptyString&&m[I]==="",P=a(g),T={};for(const I of Object.keys(m))S(I)||(T[I]=m[I]);const w=Object.keys(T);return g.sort!==!1&&w.sort(g.sort),w.map(I=>{const B=m[I];return B===void 0?"":B===null?u(I,g):Array.isArray(B)?B.length===0&&g.arrayFormat==="bracket-separator"?u(I,g)+"[]":B.reduce(P(I),[]).join("&"):u(I,g)+"="+u(B,g)}).filter(I=>I.length>0).join("&")},t.parseUrl=(m,g)=>{g=Object.assign({decode:!0},g);const[S,P]=n(m,"#");return Object.assign({url:S.split("?")[0]||"",query:y(v(m),g)},g&&g.parseFragmentIdentifier&&P?{fragmentIdentifier:f(P,g)}:{})},t.stringifyUrl=(m,g)=>{g=Object.assign({encode:!0,strict:!0,[o]:!0},g);const S=h(m.url).split("?")[0]||"",P=t.extract(m.url),T=t.parse(P,{sort:!1}),w=Object.assign(T,m.query);let I=t.stringify(w,g);I&&(I=`?${I}`);let B=p(m.url);return m.fragmentIdentifier&&(B=`#${g[o]?u(m.fragmentIdentifier,g):m.fragmentIdentifier}`),`${S}${I}${B}`},t.pick=(m,g,S)=>{S=Object.assign({parseFragmentIdentifier:!0,[o]:!1},S);const{url:P,query:T,fragmentIdentifier:w}=t.parseUrl(m,S);return t.stringifyUrl({url:P,query:i(T,g),fragmentIdentifier:w},S)},t.exclude=(m,g,S)=>{const P=Array.isArray(g)?T=>!g.includes(T):(T,w)=>!g(T,w);return t.pick(m,P,S)}})(a1);const fwe={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe"}};function LPe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const i=t[n];r.push(...i.accounts)}),r}function PU(t,e){return t.includes(":")?[t]:e.chains||[]}const TU="base10",ti="base16",v5="base64pad",B8="utf8",IU=0,ep=1,dwe=0,nT=1,m5=12,j8=32;function FPe(){const t=N8.generateKeyPair();return{privateKey:ks(t.secretKey,ti),publicKey:ks(t.publicKey,ti)}}function BPe(){const t=Db.randomBytes(j8);return ks(t,ti)}function jPe(t,e){const r=N8.sharedKey(vs(t,ti),vs(e,ti)),n=new nge(jb.SHA256,r).expand(j8);return ks(n,ti)}function UPe(t){const e=jb.hash(vs(t,ti));return ks(e,ti)}function zPe(t){const e=jb.hash(vs(t,B8));return ks(e,ti)}function hwe(t){return vs(`${t}`,TU)}function Wb(t){return Number(ks(t,TU))}function WPe(t){const e=hwe(typeof t.type<"u"?t.type:IU);if(Wb(e)===ep&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?vs(t.senderPublicKey,ti):void 0,n=typeof t.iv<"u"?vs(t.iv,ti):Db.randomBytes(m5),i=new $8.ChaCha20Poly1305(vs(t.symKey,ti)).seal(n,vs(t.message,B8));return pwe({type:e,sealed:i,iv:n,senderPublicKey:r})}function HPe(t){const e=new $8.ChaCha20Poly1305(vs(t.symKey,ti)),{sealed:r,iv:n}=OU(t.encoded),i=e.open(n,r);if(i===null)throw new Error("Failed to decrypt");return ks(i,B8)}function pwe(t){if(Wb(t.type)===ep){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return ks(F9([t.type,t.senderPublicKey,t.iv,t.sealed]),v5)}return ks(F9([t.type,t.iv,t.sealed]),v5)}function OU(t){const e=vs(t,v5),r=e.slice(dwe,nT),n=nT;if(Wb(r)===ep){const a=n+j8,c=a+m5,l=e.slice(n,a),u=e.slice(a,c),f=e.slice(c);return{type:r,sealed:f,iv:u,senderPublicKey:l}}const i=n+m5,s=e.slice(n,i),o=e.slice(i);return{type:r,sealed:o,iv:s}}function qPe(t,e){const r=OU(t);return vwe({type:Wb(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?ks(r.senderPublicKey,ti):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function vwe(t){const e=(t==null?void 0:t.type)||IU;if(e===ep){if(typeof(t==null?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(t==null?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:t==null?void 0:t.senderPublicKey,receiverPublicKey:t==null?void 0:t.receiverPublicKey}}function VPe(t){return t.type===ep&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var mwe=Object.defineProperty,iT=Object.getOwnPropertySymbols,ywe=Object.prototype.hasOwnProperty,gwe=Object.prototype.propertyIsEnumerable,sT=(t,e,r)=>e in t?mwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oT=(t,e)=>{for(var r in e||(e={}))ywe.call(e,r)&&sT(t,r,e[r]);if(iT)for(var r of iT(e))gwe.call(e,r)&&sT(t,r,e[r]);return t};const bwe="ReactNative",qa={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},wwe="js";function RU(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Ewe(){return!SU()&&!!L8()&&navigator.product===bwe}function xwe(){return!RU()&&!!L8()}function U8(){return Ewe()?qa.reactNative:RU()?qa.node:xwe()?qa.browser:qa.unknown}function Cwe(t,e){let r=a1.parse(t);return r=oT(oT({},r),e),t=a1.stringify(r),t}function GPe(){return AU()||{name:"",description:"",url:"",icons:[""]}}function Swe(){if(U8()===qa.reactNative&&typeof global<"u"&&typeof(global==null?void 0:global.Platform)<"u"){const{OS:r,Version:n}=global.Platform;return[r,n].join("-")}const t=vbe();if(t===null)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return t.type==="browser"?[e,t.name,t.version].join("-"):[e,t.version].join("-")}function kwe(){var t;const e=U8();return e===qa.browser?[e,((t=kU())==null?void 0:t.host)||"unknown"].join(":"):e}function Awe(t,e,r){const n=Swe(),i=kwe();return[[t,e].join("-"),[wwe,r].join("-"),n,i].join("/")}function KPe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:i,projectId:s,useOnCloseEvent:o}){const a=r.split("?"),c=Awe(t,e,n),l={auth:i,ua:c,projectId:s,useOnCloseEvent:o||void 0},u=Cwe(a[1]||"",l);return a[0]+"?"+u}function yl(t,e){return t.filter(r=>e.includes(r)).length===t.length}function QPe(t){return Object.fromEntries(t.entries())}function YPe(t){return new Map(Object.entries(t))}function JPe(t=kl.FIVE_MINUTES,e){const r=kl.toMiliseconds(t||kl.FIVE_MINUTES);let n,i,s;return{resolve:o=>{s&&n&&(clearTimeout(s),n(o))},reject:o=>{s&&i&&(clearTimeout(s),i(o))},done:()=>new Promise((o,a)=>{s=setTimeout(()=>{a(new Error(e))},r),n=o,i=a})}}function XPe(t,e,r){return new Promise(async(n,i)=>{const s=setTimeout(()=>i(new Error(r)),e);try{const o=await t;n(o)}catch(o){i(o)}clearTimeout(s)})}function $U(t,e){if(typeof e=="string"&&e.startsWith(`${t}:`))return e;if(t.toLowerCase()==="topic"){if(typeof e!="string")throw new Error('Value must be "string" for expirer target type: topic');return`topic:${e}`}else if(t.toLowerCase()==="id"){if(typeof e!="number")throw new Error('Value must be "number" for expirer target type: id');return`id:${e}`}throw new Error(`Unknown expirer target type: ${t}`)}function ZPe(t){return $U("topic",t)}function e9e(t){return $U("id",t)}function t9e(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if(e==="topic"&&typeof r=="string")n.topic=r;else if(e==="id"&&Number.isInteger(Number(r)))n.id=Number(r);else throw new Error(`Invalid target, expected id:number or topic:string, got ${e}:${r}`);return n}function r9e(t,e){return kl.fromMiliseconds((e||Date.now())+kl.toMiliseconds(t))}function n9e(t){return Date.now()>=kl.toMiliseconds(t)}function i9e(t,e){return`${t}${e?`:${e}`:""}`}function eE(t=[],e=[]){return[...new Set([...t,...e])]}async function s9e({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let i=n==null?void 0:n.href;if(typeof i!="string")return;i.endsWith("/")&&(i=i.slice(0,-1));const s=`${i}/wc?requestId=${t}&sessionTopic=${e}`,o=U8();o===qa.browser?s.startsWith("https://")?window.open(s,"_blank","noreferrer noopener"):window.open(s,"_self","noreferrer noopener"):o===qa.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(s)}catch(n){console.error(n)}}const _we="irn";function o9e(t){return(t==null?void 0:t.relay)||{protocol:_we}}function a9e(t){const e=fwe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var Pwe=Object.defineProperty,aT=Object.getOwnPropertySymbols,Twe=Object.prototype.hasOwnProperty,Iwe=Object.prototype.propertyIsEnumerable,cT=(t,e,r)=>e in t?Pwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Owe=(t,e)=>{for(var r in e||(e={}))Twe.call(e,r)&&cT(t,r,e[r]);if(aT)for(var r of aT(e))Iwe.call(e,r)&&cT(t,r,e[r]);return t};function Rwe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(i=>{if(i.startsWith(n)){const s=i.replace(n,""),o=t[i];r[s]=o}}),r}function c9e(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=a1.parse(s);return{protocol:n,topic:$we(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:Rwe(o)}}function $we(t){return t.startsWith("//")?t.substring(2):t}function Mwe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(i=>{const s=r+e+i;t[i]&&(n[s]=t[i])}),n}function l9e(t){return`${t.protocol}:${t.topic}@${t.version}?`+a1.stringify(Owe({symKey:t.symKey},Mwe(t.relay)))}var Nwe=Object.defineProperty,Dwe=Object.defineProperties,Lwe=Object.getOwnPropertyDescriptors,lT=Object.getOwnPropertySymbols,Fwe=Object.prototype.hasOwnProperty,Bwe=Object.prototype.propertyIsEnumerable,uT=(t,e,r)=>e in t?Nwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,jwe=(t,e)=>{for(var r in e||(e={}))Fwe.call(e,r)&&uT(t,r,e[r]);if(lT)for(var r of lT(e))Bwe.call(e,r)&&uT(t,r,e[r]);return t},Uwe=(t,e)=>Dwe(t,Lwe(e));function _d(t){const e=[];return t.forEach(r=>{const[n,i]=r.split(":");e.push(`${n}:${i}`)}),e}function zwe(t){const e=[];return Object.values(t).forEach(r=>{e.push(..._d(r.accounts))}),e}function Wwe(t,e){const r=[];return Object.values(t).forEach(n=>{_d(n.accounts).includes(e)&&r.push(...n.methods)}),r}function Hwe(t,e){const r=[];return Object.values(t).forEach(n=>{_d(n.accounts).includes(e)&&r.push(...n.events)}),r}function u9e(t,e){const r=e2e(t,e);if(r)throw new Error(r.message);const n={};for(const[i,s]of Object.entries(t))n[i]={methods:s.methods,events:s.events,chains:s.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function MU(t){return t.includes(":")}function qwe(t){return MU(t)?t.split(":")[0]:t}function NU(t){var e,r,n;const i={};if(!z8(t))return i;for(const[s,o]of Object.entries(t)){const a=MU(s)?[s]:o.chains,c=o.methods||[],l=o.events||[],u=qwe(s);i[u]=Uwe(jwe({},i[u]),{chains:eE(a,(e=i[u])==null?void 0:e.chains),methods:eE(c,(r=i[u])==null?void 0:r.methods),events:eE(l,(n=i[u])==null?void 0:n.events)})}return i}const Vwe={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},Gwe={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function La(t,e){const{message:r,code:n}=Gwe[t];return{message:e?`${r} ${e}`:r,code:n}}function Gf(t,e){const{message:r,code:n}=Vwe[t];return{message:e?`${r} ${e}`:r,code:n}}function Hb(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function z8(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function Al(t){return typeof t>"u"}function Yi(t,e){return e&&Al(t)?!0:typeof t=="string"&&!!t.trim().length}function W8(t,e){return e&&Al(t)?!0:typeof t=="number"&&!isNaN(t)}function f9e(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let s=!0;return yl(i,n)?(n.forEach(o=>{const{accounts:a,methods:c,events:l}=t.namespaces[o],u=_d(a),f=r[o];(!yl(PU(o,f),u)||!yl(f.methods,c)||!yl(f.events,l))&&(s=!1)}),s):!1}function Oy(t){return Yi(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function Kwe(t){if(Yi(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Oy(r)}}return!1}function d9e(t){if(Yi(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function h9e(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function p9e(t){return t==null?void 0:t.topic}function v9e(t,e){let r=null;return Yi(t==null?void 0:t.publicKey,!1)||(r=La("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function fT(t){let e=!0;return Hb(t)?t.length&&(e=t.every(r=>Yi(r,!1))):e=!1,e}function Qwe(t,e,r){let n=null;return Hb(e)&&e.length?e.forEach(i=>{n||Oy(i)||(n=Gf("UNSUPPORTED_CHAINS",`${r}, chain ${i} should be a string and conform to "namespace:chainId" format`))}):Oy(t)||(n=Gf("UNSUPPORTED_CHAINS",`${r}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),n}function Ywe(t,e,r){let n=null;return Object.entries(t).forEach(([i,s])=>{if(n)return;const o=Qwe(i,PU(i,s),`${e} ${r}`);o&&(n=o)}),n}function Jwe(t,e){let r=null;return Hb(t)?t.forEach(n=>{r||Kwe(n)||(r=Gf("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Gf("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function Xwe(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Jwe(n==null?void 0:n.accounts,`${e} namespace`);i&&(r=i)}),r}function Zwe(t,e){let r=null;return fT(t==null?void 0:t.methods)?fT(t==null?void 0:t.events)||(r=Gf("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Gf("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function DU(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const i=Zwe(n,`${e}, namespace`);i&&(r=i)}),r}function m9e(t,e,r){let n=null;if(t&&z8(t)){const i=DU(t,e);i&&(n=i);const s=Ywe(t,e,r);s&&(n=s)}else n=La("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function e2e(t,e){let r=null;if(t&&z8(t)){const n=DU(t,e);n&&(r=n);const i=Xwe(t,e);i&&(r=i)}else r=La("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function t2e(t){return Yi(t.protocol,!0)}function y9e(t,e){let r=!1;return e&&!t?r=!0:t&&Hb(t)&&t.length&&t.forEach(n=>{r=t2e(n)}),r}function g9e(t){return typeof t=="number"}function b9e(t){return typeof t<"u"&&typeof t!==null}function w9e(t){return!(!t||typeof t!="object"||!t.code||!W8(t.code,!1)||!t.message||!Yi(t.message,!1))}function E9e(t){return!(Al(t)||!Yi(t.method,!1))}function x9e(t){return!(Al(t)||Al(t.result)&&Al(t.error)||!W8(t.id,!1)||!Yi(t.jsonrpc,!1))}function C9e(t){return!(Al(t)||!Yi(t.name,!1))}function S9e(t,e){return!(!Oy(e)||!zwe(t).includes(e))}function k9e(t,e,r){return Yi(r,!1)?Wwe(t,e).includes(r):!1}function A9e(t,e,r){return Yi(r,!1)?Hwe(t,e).includes(r):!1}function _9e(t,e,r){let n=null;const i=r2e(t),s=n2e(e),o=Object.keys(i),a=Object.keys(s),c=dT(Object.keys(t)),l=dT(Object.keys(e)),u=c.filter(f=>!l.includes(f));return u.length&&(n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. Required: ${u.toString()} Received: ${Object.keys(e).toString()}`)),yl(o,a)||(n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. Required: ${o.toString()} Approved: ${a.toString()}`)),Object.keys(e).forEach(f=>{if(!f.includes(":")||n)return;const d=_d(e[f].accounts);d.includes(f)||(n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${f} Required: ${f} - Approved: ${d.toString()}`))}),o.forEach(f=>{n||(yl(i[f].methods,s[f].methods)?yl(i[f].events,s[f].events)||(n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function qwe(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function l9(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function Vwe(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=_d(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function gTe(t,e){return W8(t,!1)&&t<=e.max&&t>=e.min}var RU="eip155",Gwe="store",$U="requestedChains",g5="wallet_addEthereumChain",sr,Xh,Kv,b5,H8,MU,Qv,w5,E5,NU,Ry,q8,Ru,vh,$y,V8,My,G8,Ny,K8,Kwe=class extends ob{constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),Jr(this,Kv),Jr(this,H8),Jr(this,Qv),Jr(this,E5),Jr(this,Ry),Jr(this,Ru),Jr(this,$y),Jr(this,My),Jr(this,Ny),st(this,"id","walletConnect"),st(this,"name","WalletConnect"),st(this,"ready",!0),Jr(this,sr,void 0),Jr(this,Xh,void 0),st(this,"onAccountsChanged",e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:Li(e[0])})}),st(this,"onChainChanged",e=>{const r=Number(e),n=this.isChainUnsupported(r);this.emit("change",{chain:{id:r,unsupported:n}})}),st(this,"onDisconnect",()=>{Or(this,Ru,vh).call(this,[]),this.emit("disconnect")}),st(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),st(this,"onConnect",()=>{this.emit("connect",{})}),Or(this,Kv,b5).call(this)}async connect({chainId:t,pairingTopic:e}={}){var r,n,i,s,o;try{let a=t;if(!a){const p=(r=this.storage)==null?void 0:r.getItem(Gwe),v=(s=(i=(n=p==null?void 0:p.state)==null?void 0:n.data)==null?void 0:i.chain)==null?void 0:s.id;v&&!this.isChainUnsupported(v)?a=v:a=(o=this.chains[0])==null?void 0:o.id}if(!a)throw new Error("No chains found on connector.");const c=await this.getProvider();Or(this,E5,NU).call(this);const l=Or(this,Qv,w5).call(this);if(c.session&&l&&await c.disconnect(),!c.session||l){const p=this.chains.filter(v=>v.id!==a).map(v=>v.id);this.emit("message",{type:"connecting"}),await c.connect({pairingTopic:e,chains:[a],optionalChains:p.length?p:void 0}),Or(this,Ru,vh).call(this,this.chains.map(({id:v})=>v))}const u=await c.enable(),f=Li(u[0]),d=await this.getChainId(),h=this.isChainUnsupported(d);return{account:f,chain:{id:d,unsupported:h}}}catch(a){throw/user rejected/i.test(a==null?void 0:a.message)?new Vr(a):a}}async disconnect(){const t=await this.getProvider();try{await t.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{Or(this,Ry,q8).call(this),Or(this,Ru,vh).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();return Li(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider({chainId:t}={}){return Je(this,sr)||await Or(this,Kv,b5).call(this),t&&await this.switchChain(t),Je(this,sr)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]),n=this.chains.find(i=>i.id===t);if(!e)throw new Error("provider is required.");return gb({account:r,chain:n,transport:BS(e)})}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),r=Or(this,Qv,w5).call(this);if(!t)return!1;if(r&&e.session){try{await e.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(t){var r,n;const e=this.chains.find(i=>i.id===t);if(!e)throw new mc(new Error("chain not found on connector."));try{const i=await this.getProvider(),s=Or(this,My,G8).call(this),o=Or(this,Ny,K8).call(this);if(!s.includes(t)&&o.includes(g5)){await i.request({method:g5,params:[{chainId:ze(e.id),blockExplorerUrls:[(n=(r=e.blockExplorers)==null?void 0:r.default)==null?void 0:n.url],chainName:e.name,nativeCurrency:e.nativeCurrency,rpcUrls:[...e.rpcUrls.default.http]}]});const c=Or(this,$y,V8).call(this);c.push(t),Or(this,Ru,vh).call(this,c)}return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:ze(t)}]}),e}catch(i){const s=typeof i=="string"?i:i==null?void 0:i.message;throw/user rejected request/i.test(s)?new Vr(i):new mc(i)}}};sr=new WeakMap;Xh=new WeakMap;Kv=new WeakSet;b5=async function(){return!Je(this,Xh)&&typeof window<"u"&&$o(this,Xh,Or(this,H8,MU).call(this)),Je(this,Xh)};H8=new WeakSet;MU=async function(){const{EthereumProvider:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:r}=await GL(()=>import("./index.es-813a7190.js"),[],import.meta.url),[n,...i]=this.chains.map(({id:s})=>s);if(n){const{projectId:s,showQrModal:o=!0,qrModalOptions:a,metadata:c,relayUrl:l}=this.options;$o(this,sr,await t.init({showQrModal:o,qrModalOptions:a,projectId:s,optionalMethods:r,optionalEvents:e,chains:[n],optionalChains:i.length?i:void 0,rpcMap:Object.fromEntries(this.chains.map(u=>[u.id,u.rpcUrls.default.http[0]])),metadata:c,relayUrl:l}))}};Qv=new WeakSet;w5=function(){if(Or(this,Ny,K8).call(this).includes(g5)||!this.options.isNewChainsStale)return!1;const e=Or(this,$y,V8).call(this),r=this.chains.map(({id:i})=>i),n=Or(this,My,G8).call(this);return n.length&&!n.some(i=>r.includes(i))?!1:!r.every(i=>e.includes(i))};E5=new WeakSet;NU=function(){Je(this,sr)&&(Or(this,Ry,q8).call(this),Je(this,sr).on("accountsChanged",this.onAccountsChanged),Je(this,sr).on("chainChanged",this.onChainChanged),Je(this,sr).on("disconnect",this.onDisconnect),Je(this,sr).on("session_delete",this.onDisconnect),Je(this,sr).on("display_uri",this.onDisplayUri),Je(this,sr).on("connect",this.onConnect))};Ry=new WeakSet;q8=function(){Je(this,sr)&&(Je(this,sr).removeListener("accountsChanged",this.onAccountsChanged),Je(this,sr).removeListener("chainChanged",this.onChainChanged),Je(this,sr).removeListener("disconnect",this.onDisconnect),Je(this,sr).removeListener("session_delete",this.onDisconnect),Je(this,sr).removeListener("display_uri",this.onDisplayUri),Je(this,sr).removeListener("connect",this.onConnect))};Ru=new WeakSet;vh=function(t){var e;(e=this.storage)==null||e.setItem($U,t)};$y=new WeakSet;V8=function(){var t;return((t=this.storage)==null?void 0:t.getItem($U))??[]};My=new WeakSet;G8=function(){var n,i,s;if(!Je(this,sr))return[];const t=(n=Je(this,sr).session)==null?void 0:n.namespaces;return t?((s=(i=IU(t)[RU])==null?void 0:i.chains)==null?void 0:s.map(o=>parseInt(o.split(":")[1]||"")))??[]:[]};Ny=new WeakSet;K8=function(){var n,i;if(!Je(this,sr))return[];const t=(n=Je(this,sr).session)==null?void 0:n.namespaces;return t?((i=IU(t)[RU])==null?void 0:i.methods)??[]:[]};var nl,Bs,Qwe=class{constructor(t){st(this,"events",new mL),st(this,"chainId"),Jr(this,nl,void 0),Jr(this,Bs,void 0),this.chainId=t.chainId,$o(this,nl,t)}async enable(){var e;if((e=Je(this,nl).flags)!=null&&e.failConnect)throw new Vr(new Error("Failed to connect."));Je(this,Bs)||$o(this,Bs,Je(this,nl).walletClient);const t=Je(this,Bs).account.address;return this.events.emit("accountsChanged",[t]),[t]}async disconnect(){this.events.emit("disconnect"),$o(this,Bs,void 0)}async getAccounts(){var e;const t=(e=Je(this,Bs))==null?void 0:e.account.address;return t?[Li(t)]:[]}getWalletClient(){const t=Je(this,Bs);if(!t)throw new Error("walletClient not found");return t}async switchChain(t){var e;if((e=Je(this,nl).flags)!=null&&e.failSwitchChain)throw new Vr(new Error("Failed to switch chain."));Je(this,nl).chainId=t,this.chainId=t,this.events.emit("chainChanged",t)}async switchWalletClient(t){const e=t.account.address;$o(this,Bs,t),this.events.emit("accountsChanged",[e])}async watchAsset(t){return!0}async request({method:t,params:e}){var r;return(r=Je(this,Bs))==null?void 0:r.transport.request({method:t,params:e})}on(t,e){return this.events.on(t,e),this}removeListener(t,e){return this.events.removeListener(t,e),this}toJSON(){return""}};nl=new WeakMap;Bs=new WeakMap;var mh,x5,DU,Ywe=class extends ob{constructor({chains:t,options:e}){var r;super({chains:t,options:{...e,chainId:e.chainId??((r=t==null?void 0:t[0])==null?void 0:r.id)}}),Jr(this,x5),st(this,"id","mock"),st(this,"name","Mock"),st(this,"ready",!0),Jr(this,mh,void 0),st(this,"onAccountsChanged",n=>{n.length===0?this.emit("disconnect"):this.emit("change",{account:Li(n[0])})}),st(this,"onChainChanged",n=>{const i=Fh(n),s=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:s}})}),st(this,"onDisconnect",()=>{this.emit("disconnect")})}async connect({chainId:t}={}){var a;const e=await this.getProvider({chainId:t});e.on("accountsChanged",this.onAccountsChanged),e.on("chainChanged",this.onChainChanged),e.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const r=await e.enable(),n=Li(r[0]),i=Fh(e.chainId),s=this.isChainUnsupported(i),o={account:n,chain:{id:i,unsupported:s},provider:e};return(a=this.options.flags)!=null&&a.noSwitchChain||(this.switchChain=Or(this,x5,DU)),new Promise(c=>setTimeout(()=>c(o),100))}async disconnect(){const t=await this.getProvider();await t.disconnect(),t.removeListener("accountsChanged",this.onAccountsChanged),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect)}async getAccount(){const r=(await(await this.getProvider()).getAccounts())[0];if(!r)throw new Error("Failed to get account");return Li(r)}async getChainId(){const t=await this.getProvider();return Fh(t.chainId)}async getProvider({chainId:t}={}){return(!Je(this,mh)||t)&&$o(this,mh,new Qwe({...this.options,chainId:t??this.options.chainId??this.chains[0].id})),Je(this,mh)}async getWalletClient(){return(await this.getProvider()).getWalletClient()}async isAuthorized(){var t;try{const r=await(await this.getProvider()).getAccounts();return((t=this.options.flags)==null?void 0:t.isAuthorized)??!!r}catch{return!1}}async watchAsset(t){return(await this.getProvider()).watchAsset(t)}toJSON(){return""}};mh=new WeakMap;x5=new WeakSet;DU=async function(t){return await(await this.getProvider()).switchChain(t),this.chains.find(r=>r.id===t)??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}};function je(){return je=Object.assign?Object.assign.bind():function(t){for(var e=1;e({account:l[0]}),this.onDisconnect=()=>{this==null||this.emit("disconnect")};const o=(r==null||(n=r.connect)==null||(n=n.settings)==null?void 0:n.signInOptions)||[],a=r==null||(i=r.connect)==null||(i=i.settings)==null?void 0:i.signInWith;if(r==null||(s=r.connect)==null||(s=s.settings)==null?void 0:s.signInWithEmail)this.id="email",this.name="Email";else if(a)this.id=a,this.name=`${a[0].toUpperCase()}${a.slice(1)}`;else if(o.length>0){const l=o[0],u=`${l[0].toUpperCase()}${l.slice(1)}`;this.id=l,this.name=u}this.provider=eU.initWallet({defaultNetwork:r==null?void 0:r.defaultNetwork,transports:{walletAppURL:"https://sequence.app"},defaultEIP6492:!0}),this.provider.on("chainChanged",l=>{this==null||this.emit("change",{chain:{id:C5(l),unsupported:!1}})}),this.provider.on("accountsChanged",l=>{this==null||this.emit("accountsChanged",this.onAccountsChanged(l))}),this.provider.on("disconnect",()=>{this.onDisconnect()})}async connect(){if(!this.provider.isConnected()){var e,r,n;this==null||this.emit("message",{type:"connecting"});const s=(e=this.options)==null?void 0:e.connect,o=localStorage.getItem(yn.Theme),a=localStorage.getItem(yn.EthAuthSettings),c=a?JSON.parse(a):{},l=je({authorize:!0},c,s,{settings:je({theme:o||"dark"},s==null?void 0:s.settings)}),u=await this.provider.connect(l);if(u.error)throw new Vr(new Error(u.error));if(!u.connected)throw new Vr(new Error("Wallet connection rejected"));const f=(r=u.proof)==null?void 0:r.proofString,d=(n=u.proof)==null?void 0:n.typedData;if(f){const h=JSON.stringify({proofString:f,typedData:d});localStorage.setItem(yn.EthAuthProof,h)}}return{account:await this.getAccount(),chain:{id:this.provider.getChainId(),unsupported:this.isChainUnsupported(this.provider.getChainId())}}}async getWalletClient({chainId:e}={}){const r=this.chains.find(n=>n.id===e);return gb({chain:r,account:await this.getAccount(),transport:BS(this.provider)})}onChainChanged(e){this.provider.setDefaultChainId(C5(e))}async switchChain(e){if(this.isChainUnsupported(e))throw new Error("Unsupported chain");return this.provider.setDefaultChainId(e),this.chains.find(r=>r.id===e)}async disconnect(){localStorage.removeItem(yn.EthAuthProof),this.provider.disconnect()}getAccount(){return this.provider.getSigner().getAddress()}async getChainId(){return this.provider.getChainId()}async getProvider(){return this.provider}async getSigner(){return this.provider.getSigner()}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}isChainUnsupported(e){return this.provider.networks.findIndex(r=>r.chainId===e)===-1}}const C5=t=>typeof t=="object"?C5(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t;function Ts(t){if(t==null)throw new TypeError("Cannot destructure "+t)}const u9=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),x.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},x.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},x.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),x.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),x.createElement("defs",{id:"defs1314"},x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},x.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),x.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},x.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),x.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},x.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),x.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},x.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},x.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),x.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},x.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),x.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},x.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},x.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},x.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},x.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),x.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),x.createElement("clipPath",{id:"clip0_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),x.createElement("clipPath",{id:"clip1_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},f9=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),x.createElement("rect",{width:"28",height:"28"}),x.createElement("path",{d:"M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",fill:"#E2761B",stroke:"#E2761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",fill:"#C0AD9E",stroke:"#C0AD9E",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"})))},Jwe=({chains:t})=>({id:"metamask",logoDark:f9,logoLight:f9,name:"Metamask",createConnector:()=>new dye({chains:t,options:{shimDisconnect:!0}})}),d9=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),x.createElement("path",{d:"m126.613 93.9842c62.622-61.3123 164.152-61.3123 226.775 0l7.536 7.3788c3.131 3.066 3.131 8.036 0 11.102l-25.781 25.242c-1.566 1.533-4.104 1.533-5.67 0l-10.371-10.154c-43.687-42.7734-114.517-42.7734-158.204 0l-11.107 10.874c-1.565 1.533-4.103 1.533-5.669 0l-25.781-25.242c-3.132-3.066-3.132-8.036 0-11.102zm280.093 52.2038 22.946 22.465c3.131 3.066 3.131 8.036 0 11.102l-103.463 101.301c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896c-.783-.767-2.052-.767-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0l-103.4657-101.302c-3.1311-3.066-3.1311-8.036 0-11.102l22.9456-22.466c3.1311-3.065 8.2077-3.065 11.3388 0l73.4333 71.897c.782.767 2.051.767 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897c.783.767 2.052.767 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z",fill:"#3396ff"})))},Xwe=({chains:t,options:e})=>({id:"wallet-connect",logoDark:d9,logoLight:d9,name:"Walletconnect",createConnector:()=>new Kwe({chains:t,options:e})});window.ethereum=window.ethereum||{};const h9=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),x.createElement("g",{id:"Frame 2114"},x.createElement("g",{id:"Group"},x.createElement("path",{id:"Vector",d:"M20.7497 16.8828V23.5218H29.9756C29.5705 25.6568 28.3548 27.4647 26.5314 28.6803L32.095 32.9972C35.3366 30.0051 37.2068 25.6102 37.2068 20.3895C37.2068 19.1739 37.0977 18.005 36.895 16.883L20.7497 16.8828Z",fill:"#4285F4"}),x.createElement("path",{id:"Vector_2",d:"M11.1424 23.2627L9.88756 24.2232L5.44592 27.6829C8.2667 33.2777 14.0481 37.1427 20.7493 37.1427C25.3778 37.1427 29.2583 35.6154 32.0947 32.9973L26.5311 28.6803C25.0038 29.7089 23.0557 30.3324 20.7493 30.3324C16.2922 30.3324 12.5053 27.3246 11.1494 23.2726L11.1424 23.2627Z",fill:"#34A853"}),x.createElement("path",{id:"Vector_3",d:"M5.44594 12.3169C4.27718 14.6233 3.60712 17.2259 3.60712 19.9999C3.60712 22.7739 4.27718 25.3765 5.44594 27.6829C5.44594 27.6984 11.1499 23.2569 11.1499 23.2569C10.8071 22.2284 10.6044 21.1375 10.6044 19.9997C10.6044 18.8619 10.8071 17.7711 11.1499 16.7425L5.44594 12.3169Z",fill:"#FBBC05"}),x.createElement("path",{id:"Vector_4",d:"M20.7497 9.6829C23.2744 9.6829 25.5185 10.5556 27.3107 12.2387L32.2198 7.32972C29.2431 4.55574 25.3783 2.85693 20.7497 2.85693C14.0484 2.85693 8.2667 6.70628 5.44592 12.3167L11.1497 16.7427C12.5055 12.6907 16.2926 9.6829 20.7497 9.6829Z",fill:"#EA4335"})))))},p9=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=je({},(Ts(n),n));return x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8355 14.7613C24.5584 13.5329 22.9441 12.9032 21.1356 12.9032C17.9377 12.9032 15.2302 15.0813 14.2595 18.0232L14.2593 18.023C14.0142 18.7662 13.8712 19.5609 13.8712 20.3866C13.8712 21.2124 14.004 22.0072 14.2594 22.7504L14.2587 22.751H14.2595C15.2302 25.6929 17.9377 27.871 21.1356 27.871C22.7907 27.871 24.1904 27.4168 25.2939 26.6736V26.6732C26.5812 25.7958 27.4497 24.5055 27.746 22.9777H21.1355V18.3223H32.6808C32.8034 19.0758 32.875 19.85 32.875 20.6655C32.875 24.4332 31.5467 27.6126 29.2377 29.77L29.2378 29.7703C27.2148 31.6594 24.446 32.7742 21.1356 32.7742C16.3438 32.7742 12.2059 29.9871 10.1931 25.9407V25.94L10.193 25.9401C9.35521 24.2678 8.875 22.3891 8.875 20.3866C8.875 18.384 9.35521 16.5053 10.193 14.833H10.1934C12.2063 10.7869 16.344 8 21.1356 8C24.446 8 27.2148 9.22839 29.3298 11.231L25.8355 14.7613Z",fill:e}))}},Zwe=({chains:t,options:e={}})=>({id:"google",isSequenceBased:!0,logoDark:h9,logoLight:h9,miniLogoDark:p9({isDarkMode:!0}),miniLogoLight:p9({isDarkMode:!1}),name:"Google",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"google"})})})})}}),v9=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),x.createElement("path",{d:"M17.4214 36.9716C9.27855 35.5145 3.10712 28.4859 3.10712 20.0001C3.10712 10.5715 10.8214 2.85718 20.25 2.85718C29.6785 2.85718 37.3928 10.5715 37.3928 20.0001C37.3928 28.4859 31.2214 35.5145 23.0785 36.9716L22.1357 36.2002H18.3643L17.4214 36.9716Z",fill:"url(#paint0_linear_193_14528)"}),x.createElement("path",{d:"M26.9357 24.7999L27.7072 19.9999H23.1643V16.657C23.1643 15.2856 23.6786 14.257 25.7357 14.257H27.9643V9.88558C26.7643 9.71415 25.3929 9.54272 24.1929 9.54272C20.25 9.54272 17.5071 11.9427 17.5071 16.2285V19.9999H13.2214V24.7999H17.5071V36.8857C18.45 37.0571 19.3929 37.1429 20.3357 37.1429C21.2786 37.1429 22.2214 37.0571 23.1643 36.8857V24.7999H26.9357Z",fill:"white"}),x.createElement("defs",null,x.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},x.createElement("stop",{"stop-color":"#0062E0"}),x.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},m9=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),x.createElement("path",{d:"M25.8582 10.4398C24.1222 10.4398 23.6288 11.2098 23.6288 12.9073V15.709H28.246L27.791 20.2476H23.6279V34H18.1024V20.2468H14.375V15.7081H18.1042V12.9851C18.1042 8.40625 19.9399 6 25.0891 6C26.1942 6 27.5163 6.0875 28.3055 6.19775V10.459",fill:e})))}},e2e=({chains:t,options:e={}})=>({id:"facebook",isSequenceBased:!0,logoDark:v9,logoLight:v9,miniLogoDark:m9({isDarkMode:!0}),miniLogoLight:m9({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"facebook"})})})})}}),y9=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},i),x.createElement("path",{d:"M27.702 11.5918C27.5049 11.7448 24.0243 13.7068 24.0243 18.0694C24.0243 23.1155 28.4532 24.9007 28.5858 24.9449C28.5654 25.0537 27.8822 27.3897 26.2506 29.77C24.7958 31.8646 23.2765 33.9558 20.9651 33.9558C18.6538 33.9558 18.0589 32.6127 15.3907 32.6127C12.7904 32.6127 11.8659 34 9.75169 34C7.63748 34 6.1623 32.0618 4.46618 29.6816C2.50154 26.8865 0.914185 22.5443 0.914185 18.423C0.914185 11.8128 5.21057 8.30703 9.43897 8.30703C11.6857 8.30703 13.5586 9.78278 14.9692 9.78278C16.3118 9.78278 18.4056 8.21862 20.9617 8.21862C21.9304 8.21862 25.4111 8.30703 27.702 11.5918ZM19.7483 5.42014C20.8054 4.16542 21.5532 2.42444 21.5532 0.683468C21.5532 0.442044 21.5328 0.19722 21.4886 0C19.7687 0.0646065 17.7224 1.14591 16.4886 2.57746C15.5199 3.67917 14.6157 5.42014 14.6157 7.18492C14.6157 7.45014 14.6599 7.71537 14.6803 7.80038C14.7891 7.82078 14.9658 7.84458 15.1426 7.84458C16.6857 7.84458 18.6266 6.81088 19.7483 5.42014Z",fill:e})))}},g9=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),x.createElement("path",{d:"M27.166 20.8774C27.1338 17.335 30.0617 15.633 30.1936 15.5493C28.5463 13.1395 25.9852 12.8113 25.0714 12.7727C22.8932 12.5507 20.8179 14.0565 19.7111 14.0565C18.6043 14.0565 16.8991 12.8049 15.0909 12.8403C12.7131 12.8757 10.5221 14.2205 9.2962 16.3505C6.8284 20.6297 8.66557 26.9777 11.0722 30.4557C12.2498 32.1545 13.6494 34.0689 15.493 33.9981C17.2691 33.9273 17.9383 32.8495 20.0811 32.8495C22.224 32.8495 22.8289 33.9981 24.7014 33.9627C26.6094 33.9241 27.8191 32.2253 28.9871 30.5201C30.3352 28.5478 30.8918 26.6366 30.924 26.5369C30.8822 26.5208 27.2046 25.1116 27.166 20.8774Z",fill:e}),x.createElement("path",{d:"M23.6429 10.4722C24.621 9.28822 25.2806 7.64089 25.1004 6C23.6911 6.05791 21.9859 6.93949 20.9756 8.12351C20.0715 9.16917 19.2768 10.8455 19.4923 12.4542C21.0592 12.5764 22.6648 11.653 23.6429 10.4722Z",fill:e})))}},t2e=({chains:t,options:e={}})=>({id:"apple",isSequenceBased:!0,logoDark:y9({isDarkMode:!0}),logoLight:y9({isDarkMode:!1}),miniLogoDark:g9({isDarkMode:!0}),miniLogoLight:g9({isDarkMode:!1}),name:"Apple",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"apple"})})})})}}),b9=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},i),x.createElement("path",{d:"M17.0826 16.3805C17.1802 16.4598 17.32 16.4598 17.4176 16.3805L30.1401 6.04341C30.5283 5.72801 30.3053 5.09985 29.8051 5.09985H4.69499C4.19482 5.09985 3.9718 5.72801 4.35998 6.04341L17.0826 16.3805Z",fill:e}),x.createElement("path",{d:"M19.7626 19.2667L33.3838 8.19943C33.731 7.91735 34.2501 8.16441 34.2501 8.61174V24.2249C34.2501 26.5721 32.3473 28.4749 30.0001 28.4749H4.50006C2.15285 28.4749 0.250061 26.5721 0.250061 24.2249V8.61174C0.250061 8.16441 0.769134 7.91735 1.11631 8.19943L14.7375 19.2667C16.2014 20.4561 18.2987 20.4561 19.7626 19.2667Z",fill:e})))}},S5="@sequence.kit.connector.email",r2e=({chains:t,options:e={}})=>({id:"email",isSequenceBased:!0,logoDark:b9({isDarkMode:!0}),logoLight:b9({isDarkMode:!1}),name:"Email",createConnector:()=>{var r;const n=localStorage.getItem(S5);return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInOptions:["email"],signInWithEmail:n||""})})})})}}),ev=({isDarkMode:t})=>{let e;return t===void 0?e="#9146FF":e=t?"white":"black",n=>(je({},(Ts(n),n)),x.createElement(x.Fragment,null,x.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 2400 2800",transform:"scale(0.80)"},x.createElement("g",null,x.createElement("g",{id:"Layer_1-2"},x.createElement("path",{fill:e,d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600 V1300z"}),x.createElement("rect",{x:"1700",y:"550",fill:e,width:"200",height:"600"}),x.createElement("rect",{x:"1150",y:"550",fill:e,width:"200",height:"600"}))))))},n2e=({chains:t,options:e={}})=>({id:"twitch",isSequenceBased:!0,logoDark:ev({}),logoLight:ev({}),miniLogoDark:ev({isDarkMode:!0}),miniLogoLight:ev({isDarkMode:!1}),name:"Twitch",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"twitch"})})})})}}),i2e=({chains:t,options:e})=>({id:"mock",isSequenceBased:!0,logoDark:u9,logoLight:u9,name:"Mock",createConnector:()=>{var r;return new Ywe({chains:t,options:je({chainId:(e==null||(r=e.chain)==null?void 0:r.id)||137,walletClient:gb({account:e.account,chain:(e==null?void 0:e.chain)||Cue,transport:e.transport})},e)})}}),s2e=({chains:t,walletConnectProjectId:e,defaultChainId:r})=>{let n=t[0].id;if(r){const s=t.find(o=>o.id===r);s&&(n=s.id)}return rz([r2e({chains:t,options:{defaultNetwork:n}}),Zwe({chains:t,options:{defaultNetwork:n}}),e2e({chains:t,options:{defaultNetwork:n}}),n2e({chains:t,options:{defaultNetwork:n}}),t2e({chains:t,options:{defaultNetwork:n}}),Jwe({chains:t}),Xwe({chains:t,options:{projectId:e}})])};function Q8(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function tv(){}function w9(){return typeof WeakMap<"u"?new WeakMap:o2e()}function o2e(){return{add:tv,delete:tv,get:tv,set:tv,has:function(t){return!1}}}var a2e=Object.prototype.hasOwnProperty,k5=function(t,e){return a2e.call(t,e)};function tE(t,e){for(var r in e)k5(e,r)&&(t[r]=e[r]);return t}var c2e=/^[ \t]*(?:\r\n|\r|\n)/,l2e=/(?:\r\n|\r|\n)[ \t]*$/,u2e=/^(?:[\r\n]|$)/,f2e=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,d2e=/^[ \t]*[\r\n][ \t\r\n]*$/;function E9(t,e,r){var n=0,i=t[0].match(f2e);i&&(n=i[1].length);var s="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(s,"g");e&&(t=t.slice(1));var a=r.newline,c=r.trimLeadingNewline,l=r.trimTrailingNewline,u=typeof a=="string",f=t.length,d=t.map(function(h,p){return h=h.replace(o,"$1"),p===0&&c&&(h=h.replace(c2e,"")),p===f-1&&l&&(h=h.replace(l2e,"")),u&&(h=h.replace(/\r\n|\n|\r/g,function(v){return a})),h});return d}function h2e(t,e){for(var r="",n=0,i=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Yv=[v2e],ou=()=>{if(Yv.length<1)throw new Error("No adapter configured");return Yv[Yv.length-1]},BU=!1,m2e=t=>{BU||y2e(t)},y2e=t=>{if(!t)throw new Error('No adapter provided when calling "setAdapter"');BU=!0,Yv.push(t)},qb=function(){return ou().appendCss(...arguments)},FU=function(){return ou().registerClassName(...arguments)},g2e=function(){return ou().registerComposition(...arguments)},jU=function(){return ou().markCompositionUsed(...arguments)},b2e=function(){for(var e,r,n=arguments.length,i=new Array(n),s=0;s{n||(yl(i[f].methods,s[f].methods)?yl(i[f].events,s[f].events)||(n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${f}`)):n=La("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${f}`))}),n}function r2e(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(i=>{e[i]={methods:t[r].methods,events:t[r].events}})}),e}function dT(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function n2e(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=_d(t[r].accounts);n==null||n.forEach(i=>{e[i]={accounts:t[r].accounts.filter(s=>s.includes(`${i}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function P9e(t,e){return W8(t,!1)&&t<=e.max&&t>=e.min}var LU="eip155",i2e="store",FU="requestedChains",y5="wallet_addEthereumChain",or,Xh,Kv,g5,H8,BU,Qv,b5,w5,jU,Ry,q8,Ru,vh,$y,V8,My,G8,Ny,K8,s2e=class extends ob{constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),Jr(this,Kv),Jr(this,H8),Jr(this,Qv),Jr(this,w5),Jr(this,Ry),Jr(this,Ru),Jr(this,$y),Jr(this,My),Jr(this,Ny),st(this,"id","walletConnect"),st(this,"name","WalletConnect"),st(this,"ready",!0),Jr(this,or,void 0),Jr(this,Xh,void 0),st(this,"onAccountsChanged",e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:Li(e[0])})}),st(this,"onChainChanged",e=>{const r=Number(e),n=this.isChainUnsupported(r);this.emit("change",{chain:{id:r,unsupported:n}})}),st(this,"onDisconnect",()=>{Or(this,Ru,vh).call(this,[]),this.emit("disconnect")}),st(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),st(this,"onConnect",()=>{this.emit("connect",{})}),Or(this,Kv,g5).call(this)}async connect({chainId:t,pairingTopic:e}={}){var r,n,i,s,o;try{let a=t;if(!a){const p=(r=this.storage)==null?void 0:r.getItem(i2e),v=(s=(i=(n=p==null?void 0:p.state)==null?void 0:n.data)==null?void 0:i.chain)==null?void 0:s.id;v&&!this.isChainUnsupported(v)?a=v:a=(o=this.chains[0])==null?void 0:o.id}if(!a)throw new Error("No chains found on connector.");const c=await this.getProvider();Or(this,w5,jU).call(this);const l=Or(this,Qv,b5).call(this);if(c.session&&l&&await c.disconnect(),!c.session||l){const p=this.chains.filter(v=>v.id!==a).map(v=>v.id);this.emit("message",{type:"connecting"}),await c.connect({pairingTopic:e,chains:[a],optionalChains:p.length?p:void 0}),Or(this,Ru,vh).call(this,this.chains.map(({id:v})=>v))}const u=await c.enable(),f=Li(u[0]),d=await this.getChainId(),h=this.isChainUnsupported(d);return{account:f,chain:{id:d,unsupported:h}}}catch(a){throw/user rejected/i.test(a==null?void 0:a.message)?new Vr(a):a}}async disconnect(){const t=await this.getProvider();try{await t.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{Or(this,Ry,q8).call(this),Or(this,Ru,vh).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();return Li(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider({chainId:t}={}){return Je(this,or)||await Or(this,Kv,g5).call(this),t&&await this.switchChain(t),Je(this,or)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]),n=this.chains.find(i=>i.id===t);if(!e)throw new Error("provider is required.");return gb({account:r,chain:n,transport:FS(e)})}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),r=Or(this,Qv,b5).call(this);if(!t)return!1;if(r&&e.session){try{await e.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(t){var r,n;const e=this.chains.find(i=>i.id===t);if(!e)throw new mc(new Error("chain not found on connector."));try{const i=await this.getProvider(),s=Or(this,My,G8).call(this),o=Or(this,Ny,K8).call(this);if(!s.includes(t)&&o.includes(y5)){await i.request({method:y5,params:[{chainId:ze(e.id),blockExplorerUrls:[(n=(r=e.blockExplorers)==null?void 0:r.default)==null?void 0:n.url],chainName:e.name,nativeCurrency:e.nativeCurrency,rpcUrls:[...e.rpcUrls.default.http]}]});const c=Or(this,$y,V8).call(this);c.push(t),Or(this,Ru,vh).call(this,c)}return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:ze(t)}]}),e}catch(i){const s=typeof i=="string"?i:i==null?void 0:i.message;throw/user rejected request/i.test(s)?new Vr(i):new mc(i)}}};or=new WeakMap;Xh=new WeakMap;Kv=new WeakSet;g5=async function(){return!Je(this,Xh)&&typeof window<"u"&&$o(this,Xh,Or(this,H8,BU).call(this)),Je(this,Xh)};H8=new WeakSet;BU=async function(){const{EthereumProvider:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:r}=await XL(()=>import("./index.es-7c53348b.js"),[],import.meta.url),[n,...i]=this.chains.map(({id:s})=>s);if(n){const{projectId:s,showQrModal:o=!0,qrModalOptions:a,metadata:c,relayUrl:l}=this.options;$o(this,or,await t.init({showQrModal:o,qrModalOptions:a,projectId:s,optionalMethods:r,optionalEvents:e,chains:[n],optionalChains:i.length?i:void 0,rpcMap:Object.fromEntries(this.chains.map(u=>[u.id,u.rpcUrls.default.http[0]])),metadata:c,relayUrl:l}))}};Qv=new WeakSet;b5=function(){if(Or(this,Ny,K8).call(this).includes(y5)||!this.options.isNewChainsStale)return!1;const e=Or(this,$y,V8).call(this),r=this.chains.map(({id:i})=>i),n=Or(this,My,G8).call(this);return n.length&&!n.some(i=>r.includes(i))?!1:!r.every(i=>e.includes(i))};w5=new WeakSet;jU=function(){Je(this,or)&&(Or(this,Ry,q8).call(this),Je(this,or).on("accountsChanged",this.onAccountsChanged),Je(this,or).on("chainChanged",this.onChainChanged),Je(this,or).on("disconnect",this.onDisconnect),Je(this,or).on("session_delete",this.onDisconnect),Je(this,or).on("display_uri",this.onDisplayUri),Je(this,or).on("connect",this.onConnect))};Ry=new WeakSet;q8=function(){Je(this,or)&&(Je(this,or).removeListener("accountsChanged",this.onAccountsChanged),Je(this,or).removeListener("chainChanged",this.onChainChanged),Je(this,or).removeListener("disconnect",this.onDisconnect),Je(this,or).removeListener("session_delete",this.onDisconnect),Je(this,or).removeListener("display_uri",this.onDisplayUri),Je(this,or).removeListener("connect",this.onConnect))};Ru=new WeakSet;vh=function(t){var e;(e=this.storage)==null||e.setItem(FU,t)};$y=new WeakSet;V8=function(){var t;return((t=this.storage)==null?void 0:t.getItem(FU))??[]};My=new WeakSet;G8=function(){var n,i,s;if(!Je(this,or))return[];const t=(n=Je(this,or).session)==null?void 0:n.namespaces;return t?((s=(i=NU(t)[LU])==null?void 0:i.chains)==null?void 0:s.map(o=>parseInt(o.split(":")[1]||"")))??[]:[]};Ny=new WeakSet;K8=function(){var n,i;if(!Je(this,or))return[];const t=(n=Je(this,or).session)==null?void 0:n.namespaces;return t?((i=NU(t)[LU])==null?void 0:i.methods)??[]:[]};var nl,Fs,o2e=class{constructor(t){st(this,"events",new EL),st(this,"chainId"),Jr(this,nl,void 0),Jr(this,Fs,void 0),this.chainId=t.chainId,$o(this,nl,t)}async enable(){var e;if((e=Je(this,nl).flags)!=null&&e.failConnect)throw new Vr(new Error("Failed to connect."));Je(this,Fs)||$o(this,Fs,Je(this,nl).walletClient);const t=Je(this,Fs).account.address;return this.events.emit("accountsChanged",[t]),[t]}async disconnect(){this.events.emit("disconnect"),$o(this,Fs,void 0)}async getAccounts(){var e;const t=(e=Je(this,Fs))==null?void 0:e.account.address;return t?[Li(t)]:[]}getWalletClient(){const t=Je(this,Fs);if(!t)throw new Error("walletClient not found");return t}async switchChain(t){var e;if((e=Je(this,nl).flags)!=null&&e.failSwitchChain)throw new Vr(new Error("Failed to switch chain."));Je(this,nl).chainId=t,this.chainId=t,this.events.emit("chainChanged",t)}async switchWalletClient(t){const e=t.account.address;$o(this,Fs,t),this.events.emit("accountsChanged",[e])}async watchAsset(t){return!0}async request({method:t,params:e}){var r;return(r=Je(this,Fs))==null?void 0:r.transport.request({method:t,params:e})}on(t,e){return this.events.on(t,e),this}removeListener(t,e){return this.events.removeListener(t,e),this}toJSON(){return""}};nl=new WeakMap;Fs=new WeakMap;var mh,E5,UU,a2e=class extends ob{constructor({chains:t,options:e}){var r;super({chains:t,options:{...e,chainId:e.chainId??((r=t==null?void 0:t[0])==null?void 0:r.id)}}),Jr(this,E5),st(this,"id","mock"),st(this,"name","Mock"),st(this,"ready",!0),Jr(this,mh,void 0),st(this,"onAccountsChanged",n=>{n.length===0?this.emit("disconnect"):this.emit("change",{account:Li(n[0])})}),st(this,"onChainChanged",n=>{const i=Bh(n),s=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:s}})}),st(this,"onDisconnect",()=>{this.emit("disconnect")})}async connect({chainId:t}={}){var a;const e=await this.getProvider({chainId:t});e.on("accountsChanged",this.onAccountsChanged),e.on("chainChanged",this.onChainChanged),e.on("disconnect",this.onDisconnect),this.emit("message",{type:"connecting"});const r=await e.enable(),n=Li(r[0]),i=Bh(e.chainId),s=this.isChainUnsupported(i),o={account:n,chain:{id:i,unsupported:s},provider:e};return(a=this.options.flags)!=null&&a.noSwitchChain||(this.switchChain=Or(this,E5,UU)),new Promise(c=>setTimeout(()=>c(o),100))}async disconnect(){const t=await this.getProvider();await t.disconnect(),t.removeListener("accountsChanged",this.onAccountsChanged),t.removeListener("chainChanged",this.onChainChanged),t.removeListener("disconnect",this.onDisconnect)}async getAccount(){const r=(await(await this.getProvider()).getAccounts())[0];if(!r)throw new Error("Failed to get account");return Li(r)}async getChainId(){const t=await this.getProvider();return Bh(t.chainId)}async getProvider({chainId:t}={}){return(!Je(this,mh)||t)&&$o(this,mh,new o2e({...this.options,chainId:t??this.options.chainId??this.chains[0].id})),Je(this,mh)}async getWalletClient(){return(await this.getProvider()).getWalletClient()}async isAuthorized(){var t;try{const r=await(await this.getProvider()).getAccounts();return((t=this.options.flags)==null?void 0:t.isAuthorized)??!!r}catch{return!1}}async watchAsset(t){return(await this.getProvider()).watchAsset(t)}toJSON(){return""}};mh=new WeakMap;E5=new WeakSet;UU=async function(t){return await(await this.getProvider()).switchChain(t),this.chains.find(r=>r.id===t)??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}};function je(){return je=Object.assign?Object.assign.bind():function(t){for(var e=1;e({account:l[0]}),this.onDisconnect=()=>{this==null||this.emit("disconnect")};const o=(r==null||(n=r.connect)==null||(n=n.settings)==null?void 0:n.signInOptions)||[],a=r==null||(i=r.connect)==null||(i=i.settings)==null?void 0:i.signInWith;if(r==null||(s=r.connect)==null||(s=s.settings)==null?void 0:s.signInWithEmail)this.id="email",this.name="Email";else if(a)this.id=a,this.name=`${a[0].toUpperCase()}${a.slice(1)}`;else if(o.length>0){const l=o[0],u=`${l[0].toUpperCase()}${l.slice(1)}`;this.id=l,this.name=u}this.provider=sU.initWallet({defaultNetwork:r==null?void 0:r.defaultNetwork,transports:{walletAppURL:"https://sequence.app"},defaultEIP6492:!0}),this.provider.on("chainChanged",l=>{this==null||this.emit("change",{chain:{id:x5(l),unsupported:!1}})}),this.provider.on("accountsChanged",l=>{this==null||this.emit("accountsChanged",this.onAccountsChanged(l))}),this.provider.on("disconnect",()=>{this.onDisconnect()})}async connect(){if(!this.provider.isConnected()){var e,r,n;this==null||this.emit("message",{type:"connecting"});const s=(e=this.options)==null?void 0:e.connect,o=localStorage.getItem(yn.Theme),a=localStorage.getItem(yn.EthAuthSettings),c=a?JSON.parse(a):{},l=je({authorize:!0},c,s,{settings:je({theme:o||"dark"},s==null?void 0:s.settings)}),u=await this.provider.connect(l);if(u.error)throw new Vr(new Error(u.error));if(!u.connected)throw new Vr(new Error("Wallet connection rejected"));const f=(r=u.proof)==null?void 0:r.proofString,d=(n=u.proof)==null?void 0:n.typedData;if(f){const h=JSON.stringify({proofString:f,typedData:d});localStorage.setItem(yn.EthAuthProof,h)}}return{account:await this.getAccount(),chain:{id:this.provider.getChainId(),unsupported:this.isChainUnsupported(this.provider.getChainId())}}}async getWalletClient({chainId:e}={}){const r=this.chains.find(n=>n.id===e);return gb({chain:r,account:await this.getAccount(),transport:FS(this.provider)})}onChainChanged(e){this.provider.setDefaultChainId(x5(e))}async switchChain(e){if(this.isChainUnsupported(e))throw new Error("Unsupported chain");return this.provider.setDefaultChainId(e),this.chains.find(r=>r.id===e)}async disconnect(){localStorage.removeItem(yn.EthAuthProof),this.provider.disconnect()}getAccount(){return this.provider.getSigner().getAddress()}async getChainId(){return this.provider.getChainId()}async getProvider(){return this.provider}async getSigner(){return this.provider.getSigner()}async isAuthorized(){try{return!!await this.getAccount()}catch{return!1}}isChainUnsupported(e){return this.provider.networks.findIndex(r=>r.chainId===e)===-1}}const x5=t=>typeof t=="object"?x5(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t;function Ts(t){if(t==null)throw new TypeError("Cannot destructure "+t)}const hT=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),x.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},x.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},x.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),x.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),x.createElement("defs",{id:"defs1314"},x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},x.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),x.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},x.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),x.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},x.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),x.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},x.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},x.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),x.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},x.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),x.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},x.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},x.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},x.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},x.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),x.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),x.createElement("clipPath",{id:"clip0_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),x.createElement("clipPath",{id:"clip1_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},pT=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),x.createElement("rect",{width:"28",height:"28"}),x.createElement("path",{d:"M24.0891 3.1199L15.3446 9.61456L16.9617 5.7828L24.0891 3.1199Z",fill:"#E2761B",stroke:"#E2761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M3.90207 3.1199L12.5763 9.67608L11.0383 5.7828L3.90207 3.1199Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M20.9429 18.1745L18.6139 21.7426L23.597 23.1136L25.0295 18.2536L20.9429 18.1745Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M2.97929 18.2536L4.40301 23.1136L9.38607 21.7426L7.05713 18.1745L2.97929 18.2536Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.10483 12.1456L7.71626 14.2461L12.6642 14.4658L12.4884 9.14877L9.10483 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.8864 12.1456L15.4589 9.08725L15.3446 14.4658L20.2837 14.2461L18.8864 12.1456Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.38606 21.7426L12.3566 20.2925L9.79033 18.2888L9.38606 21.7426Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.6347 20.2925L18.6139 21.7426L18.2009 18.2888L15.6347 20.2925Z",fill:"#E4761B",stroke:"#E4761B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.6139 21.7426L15.6347 20.2925L15.8719 22.2348L15.8456 23.0521L18.6139 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.38606 21.7426L12.1544 23.0521L12.1368 22.2348L12.3566 20.2925L9.38606 21.7426Z",fill:"#D7C1B3",stroke:"#D7C1B3",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M12.1984 17.0056L9.72002 16.2762L11.4689 15.4765L12.1984 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.7928 17.0056L16.5223 15.4765L18.28 16.2762L15.7928 17.0056Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.38606 21.7426L9.80791 18.1745L7.05712 18.2536L9.38606 21.7426Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.1921 18.1745L18.6139 21.7426L20.9429 18.2536L18.1921 18.1745Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M20.2837 14.2461L15.3446 14.4658L15.8016 17.0057L16.5311 15.4765L18.2888 16.2762L20.2837 14.2461Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.72002 16.2762L11.4777 15.4765L12.1984 17.0057L12.6642 14.4658L7.71626 14.2461L9.72002 16.2762Z",fill:"#CD6116",stroke:"#CD6116",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M7.71626 14.2461L9.79033 18.2888L9.72002 16.2762L7.71626 14.2461Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M18.2888 16.2762L18.2009 18.2888L20.2837 14.2461L18.2888 16.2762Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M12.6642 14.4658L12.1984 17.0057L12.7784 20.0025L12.9102 16.0565L12.6642 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.3446 14.4658L15.1073 16.0477L15.2128 20.0025L15.8016 17.0057L15.3446 14.4658Z",fill:"#E4751F",stroke:"#E4751F",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.8016 17.0056L15.2128 20.0025L15.6347 20.2925L18.2009 18.2888L18.2888 16.2762L15.8016 17.0056Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.72002 16.2762L9.79033 18.2888L12.3566 20.2925L12.7784 20.0025L12.1984 17.0056L9.72002 16.2762Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.8456 23.0521L15.8719 22.2348L15.6522 22.0414H12.339L12.1368 22.2348L12.1544 23.0521L9.38606 21.7426L10.3528 22.5336L12.3126 23.8958H15.6786L17.6472 22.5336L18.6139 21.7426L15.8456 23.0521Z",fill:"#C0AD9E",stroke:"#C0AD9E",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.6347 20.2925L15.2128 20.0025H12.7784L12.3566 20.2925L12.1368 22.2348L12.339 22.0414H15.6522L15.8719 22.2348L15.6347 20.2925Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M24.4583 10.0364L25.2053 6.45072L24.0891 3.1199L15.6347 9.39485L18.8864 12.1456L23.4827 13.4903L24.5022 12.3038L24.0628 11.9874L24.7658 11.3459L24.221 10.924L24.924 10.3879L24.4583 10.0364Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M2.79472 6.45072L3.54174 10.0364L3.06717 10.3879L3.77024 10.924L3.23415 11.3459L3.93722 11.9874L3.4978 12.3038L4.50847 13.4903L9.10483 12.1456L12.3566 9.39485L3.90207 3.1199L2.79472 6.45072Z",fill:"#763D16",stroke:"#763D16",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M23.4827 13.4903L18.8864 12.1456L20.2837 14.2461L18.2009 18.2888L20.9429 18.2536H25.0295L23.4827 13.4903Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M9.10484 12.1456L4.50848 13.4903L2.97929 18.2536H7.05713L9.79033 18.2888L7.71626 14.2461L9.10484 12.1456Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"}),x.createElement("path",{d:"M15.3446 14.4658L15.6347 9.39485L16.9705 5.7828H11.0383L12.3566 9.39485L12.6642 14.4658L12.7696 16.0653L12.7784 20.0025H15.2128L15.2304 16.0653L15.3446 14.4658Z",fill:"#F6851B",stroke:"#F6851B",strokeWidth:"0.0878845",strokeLinecap:"round",strokeLinejoin:"round"})))},c2e=({chains:t})=>({id:"metamask",logoDark:pT,logoLight:pT,name:"Metamask",createConnector:()=>new Cye({chains:t,options:{shimDisconnect:!0}})}),vT=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),x.createElement("path",{d:"m126.613 93.9842c62.622-61.3123 164.152-61.3123 226.775 0l7.536 7.3788c3.131 3.066 3.131 8.036 0 11.102l-25.781 25.242c-1.566 1.533-4.104 1.533-5.67 0l-10.371-10.154c-43.687-42.7734-114.517-42.7734-158.204 0l-11.107 10.874c-1.565 1.533-4.103 1.533-5.669 0l-25.781-25.242c-3.132-3.066-3.132-8.036 0-11.102zm280.093 52.2038 22.946 22.465c3.131 3.066 3.131 8.036 0 11.102l-103.463 101.301c-3.131 3.065-8.208 3.065-11.339 0l-73.432-71.896c-.783-.767-2.052-.767-2.835 0l-73.43 71.896c-3.131 3.065-8.208 3.065-11.339 0l-103.4657-101.302c-3.1311-3.066-3.1311-8.036 0-11.102l22.9456-22.466c3.1311-3.065 8.2077-3.065 11.3388 0l73.4333 71.897c.782.767 2.051.767 2.834 0l73.429-71.897c3.131-3.065 8.208-3.065 11.339 0l73.433 71.897c.783.767 2.052.767 2.835 0l73.431-71.895c3.132-3.066 8.208-3.066 11.339 0z",fill:"#3396ff"})))},l2e=({chains:t,options:e})=>({id:"wallet-connect",logoDark:vT,logoLight:vT,name:"Walletconnect",createConnector:()=>new s2e({chains:t,options:e})});window.ethereum=window.ethereum||{};const mT=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),x.createElement("g",{id:"Frame 2114"},x.createElement("g",{id:"Group"},x.createElement("path",{id:"Vector",d:"M20.7497 16.8828V23.5218H29.9756C29.5705 25.6568 28.3548 27.4647 26.5314 28.6803L32.095 32.9972C35.3366 30.0051 37.2068 25.6102 37.2068 20.3895C37.2068 19.1739 37.0977 18.005 36.895 16.883L20.7497 16.8828Z",fill:"#4285F4"}),x.createElement("path",{id:"Vector_2",d:"M11.1424 23.2627L9.88756 24.2232L5.44592 27.6829C8.2667 33.2777 14.0481 37.1427 20.7493 37.1427C25.3778 37.1427 29.2583 35.6154 32.0947 32.9973L26.5311 28.6803C25.0038 29.7089 23.0557 30.3324 20.7493 30.3324C16.2922 30.3324 12.5053 27.3246 11.1494 23.2726L11.1424 23.2627Z",fill:"#34A853"}),x.createElement("path",{id:"Vector_3",d:"M5.44594 12.3169C4.27718 14.6233 3.60712 17.2259 3.60712 19.9999C3.60712 22.7739 4.27718 25.3765 5.44594 27.6829C5.44594 27.6984 11.1499 23.2569 11.1499 23.2569C10.8071 22.2284 10.6044 21.1375 10.6044 19.9997C10.6044 18.8619 10.8071 17.7711 11.1499 16.7425L5.44594 12.3169Z",fill:"#FBBC05"}),x.createElement("path",{id:"Vector_4",d:"M20.7497 9.6829C23.2744 9.6829 25.5185 10.5556 27.3107 12.2387L32.2198 7.32972C29.2431 4.55574 25.3783 2.85693 20.7497 2.85693C14.0484 2.85693 8.2667 6.70628 5.44592 12.3167L11.1497 16.7427C12.5055 12.6907 16.2926 9.6829 20.7497 9.6829Z",fill:"#EA4335"})))))},yT=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=je({},(Ts(n),n));return x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8355 14.7613C24.5584 13.5329 22.9441 12.9032 21.1356 12.9032C17.9377 12.9032 15.2302 15.0813 14.2595 18.0232L14.2593 18.023C14.0142 18.7662 13.8712 19.5609 13.8712 20.3866C13.8712 21.2124 14.004 22.0072 14.2594 22.7504L14.2587 22.751H14.2595C15.2302 25.6929 17.9377 27.871 21.1356 27.871C22.7907 27.871 24.1904 27.4168 25.2939 26.6736V26.6732C26.5812 25.7958 27.4497 24.5055 27.746 22.9777H21.1355V18.3223H32.6808C32.8034 19.0758 32.875 19.85 32.875 20.6655C32.875 24.4332 31.5467 27.6126 29.2377 29.77L29.2378 29.7703C27.2148 31.6594 24.446 32.7742 21.1356 32.7742C16.3438 32.7742 12.2059 29.9871 10.1931 25.9407V25.94L10.193 25.9401C9.35521 24.2678 8.875 22.3891 8.875 20.3866C8.875 18.384 9.35521 16.5053 10.193 14.833H10.1934C12.2063 10.7869 16.344 8 21.1356 8C24.446 8 27.2148 9.22839 29.3298 11.231L25.8355 14.7613Z",fill:e}))}},u2e=({chains:t,options:e={}})=>({id:"google",isSequenceBased:!0,logoDark:mT,logoLight:mT,miniLogoDark:yT({isDarkMode:!0}),miniLogoLight:yT({isDarkMode:!1}),name:"Google",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"google"})})})})}}),gT=t=>{let e=je({},(Ts(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),x.createElement("path",{d:"M17.4214 36.9716C9.27855 35.5145 3.10712 28.4859 3.10712 20.0001C3.10712 10.5715 10.8214 2.85718 20.25 2.85718C29.6785 2.85718 37.3928 10.5715 37.3928 20.0001C37.3928 28.4859 31.2214 35.5145 23.0785 36.9716L22.1357 36.2002H18.3643L17.4214 36.9716Z",fill:"url(#paint0_linear_193_14528)"}),x.createElement("path",{d:"M26.9357 24.7999L27.7072 19.9999H23.1643V16.657C23.1643 15.2856 23.6786 14.257 25.7357 14.257H27.9643V9.88558C26.7643 9.71415 25.3929 9.54272 24.1929 9.54272C20.25 9.54272 17.5071 11.9427 17.5071 16.2285V19.9999H13.2214V24.7999H17.5071V36.8857C18.45 37.0571 19.3929 37.1429 20.3357 37.1429C21.2786 37.1429 22.2214 37.0571 23.1643 36.8857V24.7999H26.9357Z",fill:"white"}),x.createElement("defs",null,x.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},x.createElement("stop",{"stop-color":"#0062E0"}),x.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},bT=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),x.createElement("path",{d:"M25.8582 10.4398C24.1222 10.4398 23.6288 11.2098 23.6288 12.9073V15.709H28.246L27.791 20.2476H23.6279V34H18.1024V20.2468H14.375V15.7081H18.1042V12.9851C18.1042 8.40625 19.9399 6 25.0891 6C26.1942 6 27.5163 6.0875 28.3055 6.19775V10.459",fill:e})))}},f2e=({chains:t,options:e={}})=>({id:"facebook",isSequenceBased:!0,logoDark:gT,logoLight:gT,miniLogoDark:bT({isDarkMode:!0}),miniLogoLight:bT({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"facebook"})})})})}}),wT=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},i),x.createElement("path",{d:"M27.702 11.5918C27.5049 11.7448 24.0243 13.7068 24.0243 18.0694C24.0243 23.1155 28.4532 24.9007 28.5858 24.9449C28.5654 25.0537 27.8822 27.3897 26.2506 29.77C24.7958 31.8646 23.2765 33.9558 20.9651 33.9558C18.6538 33.9558 18.0589 32.6127 15.3907 32.6127C12.7904 32.6127 11.8659 34 9.75169 34C7.63748 34 6.1623 32.0618 4.46618 29.6816C2.50154 26.8865 0.914185 22.5443 0.914185 18.423C0.914185 11.8128 5.21057 8.30703 9.43897 8.30703C11.6857 8.30703 13.5586 9.78278 14.9692 9.78278C16.3118 9.78278 18.4056 8.21862 20.9617 8.21862C21.9304 8.21862 25.4111 8.30703 27.702 11.5918ZM19.7483 5.42014C20.8054 4.16542 21.5532 2.42444 21.5532 0.683468C21.5532 0.442044 21.5328 0.19722 21.4886 0C19.7687 0.0646065 17.7224 1.14591 16.4886 2.57746C15.5199 3.67917 14.6157 5.42014 14.6157 7.18492C14.6157 7.45014 14.6599 7.71537 14.6803 7.80038C14.7891 7.82078 14.9658 7.84458 15.1426 7.84458C16.6857 7.84458 18.6266 6.81088 19.7483 5.42014Z",fill:e})))}},ET=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},i),x.createElement("path",{d:"M27.166 20.8774C27.1338 17.335 30.0617 15.633 30.1936 15.5493C28.5463 13.1395 25.9852 12.8113 25.0714 12.7727C22.8932 12.5507 20.8179 14.0565 19.7111 14.0565C18.6043 14.0565 16.8991 12.8049 15.0909 12.8403C12.7131 12.8757 10.5221 14.2205 9.2962 16.3505C6.8284 20.6297 8.66557 26.9777 11.0722 30.4557C12.2498 32.1545 13.6494 34.0689 15.493 33.9981C17.2691 33.9273 17.9383 32.8495 20.0811 32.8495C22.224 32.8495 22.8289 33.9981 24.7014 33.9627C26.6094 33.9241 27.8191 32.2253 28.9871 30.5201C30.3352 28.5478 30.8918 26.6366 30.924 26.5369C30.8822 26.5208 27.2046 25.1116 27.166 20.8774Z",fill:e}),x.createElement("path",{d:"M23.6429 10.4722C24.621 9.28822 25.2806 7.64089 25.1004 6C23.6911 6.05791 21.9859 6.93949 20.9756 8.12351C20.0715 9.16917 19.2768 10.8455 19.4923 12.4542C21.0592 12.5764 22.6648 11.653 23.6429 10.4722Z",fill:e})))}},d2e=({chains:t,options:e={}})=>({id:"apple",isSequenceBased:!0,logoDark:wT({isDarkMode:!0}),logoLight:wT({isDarkMode:!1}),miniLogoDark:ET({isDarkMode:!0}),miniLogoLight:ET({isDarkMode:!1}),name:"Apple",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"apple"})})})})}}),xT=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let i=je({},(Ts(n),n));return x.createElement(x.Fragment,null,x.createElement("svg",je({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},i),x.createElement("path",{d:"M17.0826 16.3805C17.1802 16.4598 17.32 16.4598 17.4176 16.3805L30.1401 6.04341C30.5283 5.72801 30.3053 5.09985 29.8051 5.09985H4.69499C4.19482 5.09985 3.9718 5.72801 4.35998 6.04341L17.0826 16.3805Z",fill:e}),x.createElement("path",{d:"M19.7626 19.2667L33.3838 8.19943C33.731 7.91735 34.2501 8.16441 34.2501 8.61174V24.2249C34.2501 26.5721 32.3473 28.4749 30.0001 28.4749H4.50006C2.15285 28.4749 0.250061 26.5721 0.250061 24.2249V8.61174C0.250061 8.16441 0.769134 7.91735 1.11631 8.19943L14.7375 19.2667C16.2014 20.4561 18.2987 20.4561 19.7626 19.2667Z",fill:e})))}},C5="@sequence.kit.connector.email",h2e=({chains:t,options:e={}})=>({id:"email",isSequenceBased:!0,logoDark:xT({isDarkMode:!0}),logoLight:xT({isDarkMode:!1}),name:"Email",createConnector:()=>{var r;const n=localStorage.getItem(C5);return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInOptions:["email"],signInWithEmail:n||""})})})})}}),ev=({isDarkMode:t})=>{let e;return t===void 0?e="#9146FF":e=t?"white":"black",n=>(je({},(Ts(n),n)),x.createElement(x.Fragment,null,x.createElement("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 2400 2800",transform:"scale(0.80)"},x.createElement("g",null,x.createElement("g",{id:"Layer_1-2"},x.createElement("path",{fill:e,d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600 V1300z"}),x.createElement("rect",{x:"1700",y:"550",fill:e,width:"200",height:"600"}),x.createElement("rect",{x:"1150",y:"550",fill:e,width:"200",height:"600"}))))))},p2e=({chains:t,options:e={}})=>({id:"twitch",isSequenceBased:!0,logoDark:ev({}),logoLight:ev({}),miniLogoDark:ev({isDarkMode:!0}),miniLogoLight:ev({isDarkMode:!1}),name:"Twitch",createConnector:()=>{var r;return new tp({chains:t,options:je({},e,{connect:je({},e==null?void 0:e.connect,{settings:je({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"twitch"})})})})}}),v2e=({chains:t,options:e})=>({id:"mock",isSequenceBased:!0,logoDark:hT,logoLight:hT,name:"Mock",createConnector:()=>{var r;return new a2e({chains:t,options:je({chainId:(e==null||(r=e.chain)==null?void 0:r.id)||137,walletClient:gb({account:e.account,chain:(e==null?void 0:e.chain)||Mue,transport:e.transport})},e)})}}),m2e=({chains:t,walletConnectProjectId:e,defaultChainId:r})=>{let n=t[0].id;if(r){const s=t.find(o=>o.id===r);s&&(n=s.id)}return oz([h2e({chains:t,options:{defaultNetwork:n}}),u2e({chains:t,options:{defaultNetwork:n}}),f2e({chains:t,options:{defaultNetwork:n}}),p2e({chains:t,options:{defaultNetwork:n}}),d2e({chains:t,options:{defaultNetwork:n}}),c2e({chains:t}),l2e({chains:t,options:{projectId:e}})])};function Q8(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function tv(){}function CT(){return typeof WeakMap<"u"?new WeakMap:y2e()}function y2e(){return{add:tv,delete:tv,get:tv,set:tv,has:function(t){return!1}}}var g2e=Object.prototype.hasOwnProperty,S5=function(t,e){return g2e.call(t,e)};function tE(t,e){for(var r in e)S5(e,r)&&(t[r]=e[r]);return t}var b2e=/^[ \t]*(?:\r\n|\r|\n)/,w2e=/(?:\r\n|\r|\n)[ \t]*$/,E2e=/^(?:[\r\n]|$)/,x2e=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,C2e=/^[ \t]*[\r\n][ \t\r\n]*$/;function ST(t,e,r){var n=0,i=t[0].match(x2e);i&&(n=i[1].length);var s="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(s,"g");e&&(t=t.slice(1));var a=r.newline,c=r.trimLeadingNewline,l=r.trimTrailingNewline,u=typeof a=="string",f=t.length,d=t.map(function(h,p){return h=h.replace(o,"$1"),p===0&&c&&(h=h.replace(b2e,"")),p===f-1&&l&&(h=h.replace(w2e,"")),u&&(h=h.replace(/\r\n|\n|\r/g,function(v){return a})),h});return d}function S2e(t,e){for(var r="",n=0,i=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Yv=[A2e],ou=()=>{if(Yv.length<1)throw new Error("No adapter configured");return Yv[Yv.length-1]},WU=!1,_2e=t=>{WU||P2e(t)},P2e=t=>{if(!t)throw new Error('No adapter provided when calling "setAdapter"');WU=!0,Yv.push(t)},qb=function(){return ou().appendCss(...arguments)},HU=function(){return ou().registerClassName(...arguments)},T2e=function(){return ou().registerComposition(...arguments)},qU=function(){return ou().markCompositionUsed(...arguments)},I2e=function(){for(var e,r,n=arguments.length,i=new Array(n),s=0;s{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,i=C9[n];if(!i){var s=document.createElement("style");e.packageName&&s.setAttribute("data-package",e.packageName),s.setAttribute("data-file",e.filePath),s.setAttribute("type","text/css"),i=C9[n]=s,document.head.appendChild(s)}i.innerHTML=r};function S2e(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var k2e={},A2e=k2e.hasOwnProperty,_2e=function(e,r){if(!e)return r;var n={};for(var i in r)n[i]=A2e.call(e,i)?e[i]:r[i];return n},P2e=/[ -,\.\/:-@\[-\^`\{-~]/,T2e=/[ -,\.\/:-@\[\]\^`\{-~]/,I2e=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,J8=function t(e,r){r=_2e(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0),o="",a=0,c=e.length;a126){if(u>=55296&&u<=56319&&a0&&!(c in n[s]);)s=o[s];if(c in n[s]){var f=n[s][c];o[u]=f,i[u]=i[u].concat(i[f])}else o[u]=0}}this.gotoFn=n,this.output=i,this.failure=o},e.prototype.search=function(r){for(var n=0,i=[],s=0;s0&&!(o in this.gotoFn[n]);)n=this.failure[n];if(o in this.gotoFn[n]&&(n=this.gotoFn[n][o],this.output[n].length)){var a=this.output[n];i.push([s,a])}}return i},t.exports=e})()})(UU);var R2e=UU.exports;const $2e=Gi(R2e);var nr;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(nr||(nr={}));var Mi;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(Mi||(Mi={}));const S9=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,M2e=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,N2e=new Map([[126,Mi.Element],[94,Mi.Start],[36,Mi.End],[42,Mi.Any],[33,Mi.Not],[124,Mi.Hyphen]]),D2e=new Set(["has","not","matches","is","where","host","host-context"]);function L2e(t){switch(t.type){case nr.Adjacent:case nr.Child:case nr.Descendant:case nr.Parent:case nr.Sibling:case nr.ColumnCombinator:return!0;default:return!1}}const B2e=new Set(["contains","icontains"]);function F2e(t,e,r){const n=parseInt(e,16)-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function rh(t){return t.replace(M2e,F2e)}function rE(t){return t===39||t===34}function k9(t){return t===32||t===9||t===10||t===12||t===13}function j2e(t){const e=[],r=zU(e,`${t}`,0);if(r0&&r0&&L2e(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function l(d){if(n.length>0&&n[n.length-1].type===nr.Descendant){n[n.length-1].type=d;return}c(),n.push({type:d})}function u(d,h){n.push({type:nr.Attribute,name:d,action:h,value:i(1),namespace:null,ignoreCase:"quirks"})}function f(){if(n.length&&n[n.length-1].type===nr.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");t.push(n)}if(s(0),e.length===r)return r;e:for(;r{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,i=AT[n];if(!i){var s=document.createElement("style");e.packageName&&s.setAttribute("data-package",e.packageName),s.setAttribute("data-file",e.filePath),s.setAttribute("type","text/css"),i=AT[n]=s,document.head.appendChild(s)}i.innerHTML=r};function N2e(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var D2e={},L2e=D2e.hasOwnProperty,F2e=function(e,r){if(!e)return r;var n={};for(var i in r)n[i]=L2e.call(e,i)?e[i]:r[i];return n},B2e=/[ -,\.\/:-@\[-\^`\{-~]/,j2e=/[ -,\.\/:-@\[\]\^`\{-~]/,U2e=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,J8=function t(e,r){r=F2e(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",i=r.isIdentifier,s=e.charAt(0),o="",a=0,c=e.length;a126){if(u>=55296&&u<=56319&&a0;){const a=o.shift();if(a!==void 0)for(const c in r[a]){const l=r[a][c];o.push(l);let u=s[a];for(;u>0&&!(c in r[u]);)u=s[u];if(c in r[u]){const f=r[u][c];s[l]=f,n[l]=[...n[l],...n[f]]}else s[l]=0}}return{gotoFn:r,output:n,failure:s}}search(e){let r=0;const n=[];for(let i=0;i0&&!(s in this.gotoFn[r]);)r=this.failure[r];if(s in this.gotoFn[r]&&(r=this.gotoFn[r][s],this.output[r].length>0)){const o=this.output[r];n.push([i,o])}}return n}}var ir;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(ir||(ir={}));var Mi;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(Mi||(Mi={}));const _T=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,H2e=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,q2e=new Map([[126,Mi.Element],[94,Mi.Start],[36,Mi.End],[42,Mi.Any],[33,Mi.Not],[124,Mi.Hyphen]]),V2e=new Set(["has","not","matches","is","where","host","host-context"]);function G2e(t){switch(t.type){case ir.Adjacent:case ir.Child:case ir.Descendant:case ir.Parent:case ir.Sibling:case ir.ColumnCombinator:return!0;default:return!1}}const K2e=new Set(["contains","icontains"]);function Q2e(t,e,r){const n=parseInt(e,16)-65536;return n!==n||r?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function rh(t){return t.replace(H2e,Q2e)}function rE(t){return t===39||t===34}function PT(t){return t===32||t===9||t===10||t===12||t===13}function Y2e(t){const e=[],r=VU(e,`${t}`,0);if(r0&&r0&&G2e(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function l(d){if(n.length>0&&n[n.length-1].type===ir.Descendant){n[n.length-1].type=d;return}c(),n.push({type:d})}function u(d,h){n.push({type:ir.Attribute,name:d,action:h,value:i(1),namespace:null,ignoreCase:"quirks"})}function f(){if(n.length&&n[n.length-1].type===ir.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");t.push(n)}if(s(0),e.length===r)return r;e:for(;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $r(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}var z2e=/(\u000D|\u000C|\u000D\u000A)/g,W2e=/[\u0000\uD800-\uDFFF]/g,H2e=/(\/\*)[\s\S]*?(\*\/)/g,q2e=function(e,r){r===void 0&&(r=0),e=e.replace(z2e,` -`).replace(W2e,"�"),e=e.replace(H2e,"");for(var n=[];r"})}else if(i===34){var o=A9(e,r);if(o===null)return null;var a=$r(o,2),c=a[0],l=a[1];n.push({type:"",value:l}),r=c}else if(i===35){if(r+1=65&&u<=90||u>=97&&u<=122||u>=128||u>=48&&u<=57||u===92&&r+2",value:l.toLowerCase(),flag:f}),r=c;continue}}}n.push({type:"",value:i})}else if(i===39){var o=A9(e,r);if(o===null)return null;var h=$r(o,2),c=h[0],l=h[1];n.push({type:"",value:l}),r=c}else if(i===40)n.push({type:"<(-token>"});else if(i===41)n.push({type:"<)-token>"});else if(i===43){var p=rv(e,r);if(p===null)n.push({type:"",value:i});else{var v=$r(p,2),c=v[0],b=v[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c}}else if(i===44)n.push({type:""});else if(i===45){var y=rv(e,r);if(y!==null){var m=$r(y,2),c=m[0],b=m[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c;continue}if(r+2"}),r+=2;continue}}var o=_9(e,r);if(o!==null){var S=$r(o,3),c=S[0],l=S[1],P=S[2];n.push({type:P,value:l}),r=c;continue}n.push({type:"",value:i})}else if(i===46){var y=rv(e,r);if(y===null)n.push({type:"",value:i});else{var T=$r(y,2),c=T[0],b=T[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c;continue}}else if(i===58)n.push({type:""});else if(i===59)n.push({type:""});else if(i===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:i})}else if(i===64){var o=Z8(e,r+1);if(o!==null){var I=$r(o,2),c=I[0],l=I[1];n.push({type:"",value:l.toLowerCase()}),r=c;continue}n.push({type:"",value:i})}else if(i===91)n.push({type:"<[-token>"});else if(i===92){var o=rp(e,r);if(o===null)return null;var F=$r(o,2),c=F[0],l=F[1];e=e.slice(0,r)+l+e.slice(c+1),r-=1}else if(i===93)n.push({type:"<]-token>"});else if(i===123)n.push({type:"<{-token>"});else if(i===125)n.push({type:"<}-token>"});else if(i>=48&&i<=57){var o=rv(e,r),j=$r(o,2),c=j[0],b=j[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c}else if(i===95||i>=65&&i<=90||i>=97&&i<=122||i>=128){var o=_9(e,r);if(o===null)return null;var H=$r(o,3),c=H[0],l=H[1],P=H[2];n.push({type:P,value:l}),r=c}else n.push({type:"",value:i})}return n.push({type:""}),n},A9=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),i=[],s=r+1;s=65&&i<=90||i>=97&&i<=122||i>=128)return!0;if(i===92){if(e.length<=r+2)return!1;var s=e.charCodeAt(r+2);return s!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=r+1)return!1;var i=e.charCodeAt(r+1);return i!==10}else return!1}},rp=function(e,r){if(e.length<=r+1||e.charCodeAt(r)!==92)return null;var n=e.charCodeAt(r+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var i=[n],s=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)i.push(a);else break}if(o",o,f]]}return s+1",o]]:[s,["",o,a]]},V2e=function(e,r){if(e.length<=r)return null;var n="integer",i=[],s=e.charCodeAt(r);for((s===43||s===45)&&(r+=1,s===45&&i.push(45));r=48&&o<=57)i.push(o),r+=1;else break}if(r+1=48&&c<=57)for(i.push(a,c),n="number",r+=2;r=48&&o<=57)i.push(o),r+=1;else break}}if(r+1=48&&c<=57;if(u||(c===43||c===45)&&l>=48&&l<=57)for(n="number",u?(i.push(69,c),r+=2):c===45?(i.push(69,45,l),r+=3):(i.push(69,l),r+=3);r=48&&o<=57)i.push(o),r+=1;else break}}}var f=String.fromCharCode.apply(null,i),d=n==="number"?parseFloat(f):parseInt(f);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},G2e=function(e,r){if(e.length<=r)return null;for(var n=[],i=e.charCodeAt(r);r=65&&i<=90||i>=97&&i<=122||i>=128||i>=48&&i<=57){n.push(i);continue}else{var s=rp(e,r);if(s!==null){var o=$r(s,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},Z8=function(e,r){if(e.length<=r||!WU(e,r))return null;for(var n=[],i=e.charCodeAt(r);r=65&&i<=90||i>=97&&i<=122||i>=128||i>=48&&i<=57){n.push(i);continue}else{var s=rp(e,r);if(s!==null){var o=$r(s,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},K2e=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var i=[],s=!1;rs+1){var a=e.charCodeAt(s+1);if(a===40){for(var c=2;s+c"];if(l!==9&&l!==32&&l!==10){var u=K2e(e,s+c);if(u===null)return null;var f=$r(u,2),d=f[0],h=f[1];return[d,h,""]}}return[s+1,o.toLowerCase(),""]}}}else if(e.length>s+1){var a=e.charCodeAt(s+1);if(a===40)return[s+1,o.toLowerCase(),""]}return[s,o.toLowerCase(),""]},Q2e=function(e){for(var r=e.length-1;r>=0;r--)e[r]=Y2e(e[r]);return e},Y2e=function(e){if(e.mediaCondition===null)return e;var r=J2e(e.mediaCondition);return r.operator===null&&r.children.length===1&&"children"in r.children[0]&&(r=r.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:r}},J2e=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var i=t(n);if(i.operator===null&&i.children.length===1)e.children[r]=i.children[0];else if(i.operator===e.operator&&(i.operator==="and"||i.operator==="or")){for(var s=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Hn("Expected whitespace after media");n=2;for(var s=2;s"){i=s;break}else if(o.type==="")throw Hn("Expected '{' in media query but found ';'")}}return r=r.slice(n,i),tEe(r)},eEe=function(e){for(var r=[],n=!1,i=0;i"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(Ly(Ly({},e[i]),{wsBefore:n,wsAfter:!1})),n=!1);return r},tEe=function(e){for(var r,n,i=[[]],s=0;s"?i.push([]):i[i.length-1].push(o)}var a=i.map(eEe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var c=a.map(function(h){return h.length===0?null:rEe(h)}),l=[];try{for(var u=U2e(c),f=u.next();!f.done;f=u.next()){var d=f.value;d!==null&&l.push(d)}}catch(h){r={error:h}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(l.length===0)throw Hn("No valid media queries");return l},rEe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:nE(e,!0)}}catch(f){throw Hn("Expected media condition after '('",f)}else if(r.type===""){var n=null,i=void 0,s=r.value;(s==="only"||s==="not")&&(n=s);var o=n===null?0:1;if(e.length<=o)throw Hn("Expected extra token in media query");var a=e[o];if(a.type===""){var c=a.value;if(c==="all")i="all";else if(c==="print"||c==="screen")i=c;else if(c==="tty"||c==="tv"||c==="projection"||c==="handheld"||c==="braille"||c==="embossed"||c==="aural"||c==="speech")n=n==="not"?null:"not",i="all";else throw Hn("Unknown ident '".concat(c,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var l=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];l.push.apply(l,e),l.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:nE(l,!0)}}catch(f){throw Hn("Expected media condition after '('",f)}}else throw Hn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:i,mediaCondition:null};if(o+4"&&u.value==="and")try{return{mediaPrefix:n,mediaType:i,mediaCondition:nE(e.slice(o+2),!1)}}catch(f){throw Hn("Expected media condition after 'and'",f)}else throw Hn("Expected 'and' after media prefix")}else throw Hn("Expected media condition after media prefix")}else throw Hn("Expected media condition or media prefix")},nE=function t(e,r,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var i=e.length-1,s=0,o=0,a=0;a"?(o+=1,s=Math.max(s,o)):c.type==="<)-token>"&&(o-=1),o===0){i=a;break}}if(o!==0)throw new Error(`Mismatched parens -Invalid media condition`);var l,u=e.slice(0,i+1);if(s===1?l=nEe(u):u[1].type===""&&u[1].value==="not"?l=t(u.slice(2,-1),!0,"not"):l=t(u.slice(1,-1),!0),i===e.length-1)return{operator:n,children:[l]};var f=e[i+1];if(f.type!=="")throw new Error(`Invalid operator +***************************************************************************** */var Ly=function(){return Ly=Object.assign||function(e){for(var r,n=1,i=arguments.length;n=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function $r(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s}var X2e=/(\u000D|\u000C|\u000D\u000A)/g,Z2e=/[\u0000\uD800-\uDFFF]/g,eEe=/(\/\*)[\s\S]*?(\*\/)/g,tEe=function(e,r){r===void 0&&(r=0),e=e.replace(X2e,` +`).replace(Z2e,"�"),e=e.replace(eEe,"");for(var n=[];r"})}else if(i===34){var o=TT(e,r);if(o===null)return null;var a=$r(o,2),c=a[0],l=a[1];n.push({type:"",value:l}),r=c}else if(i===35){if(r+1=65&&u<=90||u>=97&&u<=122||u>=128||u>=48&&u<=57||u===92&&r+2",value:l.toLowerCase(),flag:f}),r=c;continue}}}n.push({type:"",value:i})}else if(i===39){var o=TT(e,r);if(o===null)return null;var h=$r(o,2),c=h[0],l=h[1];n.push({type:"",value:l}),r=c}else if(i===40)n.push({type:"<(-token>"});else if(i===41)n.push({type:"<)-token>"});else if(i===43){var p=rv(e,r);if(p===null)n.push({type:"",value:i});else{var v=$r(p,2),c=v[0],b=v[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c}}else if(i===44)n.push({type:""});else if(i===45){var y=rv(e,r);if(y!==null){var m=$r(y,2),c=m[0],b=m[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c;continue}if(r+2"}),r+=2;continue}}var o=IT(e,r);if(o!==null){var S=$r(o,3),c=S[0],l=S[1],P=S[2];n.push({type:P,value:l}),r=c;continue}n.push({type:"",value:i})}else if(i===46){var y=rv(e,r);if(y===null)n.push({type:"",value:i});else{var T=$r(y,2),c=T[0],b=T[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c;continue}}else if(i===58)n.push({type:""});else if(i===59)n.push({type:""});else if(i===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:i})}else if(i===64){var o=Z8(e,r+1);if(o!==null){var I=$r(o,2),c=I[0],l=I[1];n.push({type:"",value:l.toLowerCase()}),r=c;continue}n.push({type:"",value:i})}else if(i===91)n.push({type:"<[-token>"});else if(i===92){var o=rp(e,r);if(o===null)return null;var B=$r(o,2),c=B[0],l=B[1];e=e.slice(0,r)+l+e.slice(c+1),r-=1}else if(i===93)n.push({type:"<]-token>"});else if(i===123)n.push({type:"<{-token>"});else if(i===125)n.push({type:"<}-token>"});else if(i>=48&&i<=57){var o=rv(e,r),j=$r(o,2),c=j[0],b=j[1];b[0]===""?n.push({type:"",value:b[1],unit:b[2].toLowerCase(),flag:"number"}):b[0]===""?n.push({type:b[0],value:b[1],flag:b[2]}):n.push({type:b[0],value:b[1],flag:"number"}),r=c}else if(i===95||i>=65&&i<=90||i>=97&&i<=122||i>=128){var o=IT(e,r);if(o===null)return null;var H=$r(o,3),c=H[0],l=H[1],P=H[2];n.push({type:P,value:l}),r=c}else n.push({type:"",value:i})}return n.push({type:""}),n},TT=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),i=[],s=r+1;s=65&&i<=90||i>=97&&i<=122||i>=128)return!0;if(i===92){if(e.length<=r+2)return!1;var s=e.charCodeAt(r+2);return s!==10}else return!1}else{if(n===95||n>=65&&n<=90||n>=97&&n<=122||n>=128)return!0;if(n===92){if(e.length<=r+1)return!1;var i=e.charCodeAt(r+1);return i!==10}else return!1}},rp=function(e,r){if(e.length<=r+1||e.charCodeAt(r)!==92)return null;var n=e.charCodeAt(r+1);if(n===10)return null;if(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102){for(var i=[n],s=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)i.push(a);else break}if(o",o,f]]}return s+1",o]]:[s,["",o,a]]},rEe=function(e,r){if(e.length<=r)return null;var n="integer",i=[],s=e.charCodeAt(r);for((s===43||s===45)&&(r+=1,s===45&&i.push(45));r=48&&o<=57)i.push(o),r+=1;else break}if(r+1=48&&c<=57)for(i.push(a,c),n="number",r+=2;r=48&&o<=57)i.push(o),r+=1;else break}}if(r+1=48&&c<=57;if(u||(c===43||c===45)&&l>=48&&l<=57)for(n="number",u?(i.push(69,c),r+=2):c===45?(i.push(69,45,l),r+=3):(i.push(69,l),r+=3);r=48&&o<=57)i.push(o),r+=1;else break}}}var f=String.fromCharCode.apply(null,i),d=n==="number"?parseFloat(f):parseInt(f);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},nEe=function(e,r){if(e.length<=r)return null;for(var n=[],i=e.charCodeAt(r);r=65&&i<=90||i>=97&&i<=122||i>=128||i>=48&&i<=57){n.push(i);continue}else{var s=rp(e,r);if(s!==null){var o=$r(s,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},Z8=function(e,r){if(e.length<=r||!GU(e,r))return null;for(var n=[],i=e.charCodeAt(r);r=65&&i<=90||i>=97&&i<=122||i>=128||i>=48&&i<=57){n.push(i);continue}else{var s=rp(e,r);if(s!==null){var o=$r(s,2),a=o[0],c=o[1];n.push(c),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},iEe=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var i=[],s=!1;rs+1){var a=e.charCodeAt(s+1);if(a===40){for(var c=2;s+c"];if(l!==9&&l!==32&&l!==10){var u=iEe(e,s+c);if(u===null)return null;var f=$r(u,2),d=f[0],h=f[1];return[d,h,""]}}return[s+1,o.toLowerCase(),""]}}}else if(e.length>s+1){var a=e.charCodeAt(s+1);if(a===40)return[s+1,o.toLowerCase(),""]}return[s,o.toLowerCase(),""]},sEe=function(e){for(var r=e.length-1;r>=0;r--)e[r]=oEe(e[r]);return e},oEe=function(e){if(e.mediaCondition===null)return e;var r=aEe(e.mediaCondition);return r.operator===null&&r.children.length===1&&"children"in r.children[0]&&(r=r.children[0]),{mediaPrefix:e.mediaPrefix,mediaType:e.mediaType,mediaCondition:r}},aEe=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var i=t(n);if(i.operator===null&&i.children.length===1)e.children[r]=i.children[0];else if(i.operator===e.operator&&(i.operator==="and"||i.operator==="or")){for(var s=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Hn("Expected whitespace after media");n=2;for(var s=2;s"){i=s;break}else if(o.type==="")throw Hn("Expected '{' in media query but found ';'")}}return r=r.slice(n,i),fEe(r)},uEe=function(e){for(var r=[],n=!1,i=0;i"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(Ly(Ly({},e[i]),{wsBefore:n,wsAfter:!1})),n=!1);return r},fEe=function(e){for(var r,n,i=[[]],s=0;s"?i.push([]):i[i.length-1].push(o)}var a=i.map(uEe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var c=a.map(function(h){return h.length===0?null:dEe(h)}),l=[];try{for(var u=J2e(c),f=u.next();!f.done;f=u.next()){var d=f.value;d!==null&&l.push(d)}}catch(h){r={error:h}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(l.length===0)throw Hn("No valid media queries");return l},dEe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:nE(e,!0)}}catch(f){throw Hn("Expected media condition after '('",f)}else if(r.type===""){var n=null,i=void 0,s=r.value;(s==="only"||s==="not")&&(n=s);var o=n===null?0:1;if(e.length<=o)throw Hn("Expected extra token in media query");var a=e[o];if(a.type===""){var c=a.value;if(c==="all")i="all";else if(c==="print"||c==="screen")i=c;else if(c==="tty"||c==="tv"||c==="projection"||c==="handheld"||c==="braille"||c==="embossed"||c==="aural"||c==="speech")n=n==="not"?null:"not",i="all";else throw Hn("Unknown ident '".concat(c,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var l=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];l.push.apply(l,e),l.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:nE(l,!0)}}catch(f){throw Hn("Expected media condition after '('",f)}}else throw Hn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:i,mediaCondition:null};if(o+4"&&u.value==="and")try{return{mediaPrefix:n,mediaType:i,mediaCondition:nE(e.slice(o+2),!1)}}catch(f){throw Hn("Expected media condition after 'and'",f)}else throw Hn("Expected 'and' after media prefix")}else throw Hn("Expected media condition after media prefix")}else throw Hn("Expected media condition or media prefix")},nE=function t(e,r,n){if(n===void 0&&(n=null),e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media condition");for(var i=e.length-1,s=0,o=0,a=0;a"?(o+=1,s=Math.max(s,o)):c.type==="<)-token>"&&(o-=1),o===0){i=a;break}}if(o!==0)throw new Error(`Mismatched parens +Invalid media condition`);var l,u=e.slice(0,i+1);if(s===1?l=hEe(u):u[1].type===""&&u[1].value==="not"?l=t(u.slice(2,-1),!0,"not"):l=t(u.slice(1,-1),!0),i===e.length-1)return{operator:n,children:[l]};var f=e[i+1];if(f.type!=="")throw new Error(`Invalid operator Invalid media condition`);if(n!==null&&n!==f.value)throw new Error("'".concat(f.value,"' and '").concat(n,`' must not be at same level Invalid media condition`));if(f.value==="or"&&!r)throw new Error(`Cannot use 'or' at top level of a media query Invalid media condition`);if(f.value!=="and"&&f.value!=="or")throw new Error("Invalid operator: '".concat(f.value,`' -Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.value,children:[l].concat(d.children)}},nEe=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var r=[e[0]],n=1;n"&&i.value>0&&s.type===""&&s.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:i.value,denominator:o.value,wsBefore:i.wsBefore,wsAfter:o.wsAfter}),n+=2;continue}}r.push(e[n])}var a=r[1];if(a.type===""&&r.length===3)return{context:"boolean",feature:a.value};if(r.length===5&&r[1].type===""&&r[2].type===""){var c=r[3];if(c.type===""||c.type===""||c.type===""||c.type===""){var l=r[1].value,u=null,f=l.slice(0,4);f==="min-"?(u="min",l=l.slice(4)):f==="max-"&&(u="max",l=l.slice(4)),c.wsBefore,c.wsAfter;var d=A5(c,["wsBefore","wsAfter"]);return{context:"value",prefix:u,feature:l,value:d}}}else if(r.length>=5)try{var h=iEe(r);return{context:"range",feature:h.featureName,range:h}}catch(p){throw Hn("Invalid media feature",p)}throw new Error("Invalid media feature")},iEe=function(e){var r,n,i,s;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var o={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},a=e[1].type===""||e[1].type===""||e[1].type===""||e[1].type===""&&e[1].value==="infinite";if(e[2].type===""){if(e[2].value===60)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]="<=":o[a?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]=">=":o[a?"leftOp":"rightOp"]=">";else if(e[2].value===61)o[a?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(a)o.leftToken=e[1];else if(e[1].type==="")o.featureName=e[1].value;else throw new Error("Invalid range");var c=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),l=e[c];if(a)if(l.type===""){if(o.featureName=l.value,e.length>=7){var u=e[c+1],f=e[c+2];if(u.type===""){var d=u.value;if(d===60)f.type===""&&f.value===61&&!f.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)f.type===""&&f.value===61&&!f.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[c+1+((s=(i=o.rightOp)===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(c+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=l;var p=null,v=o.leftToken,b=o.leftOp,y=o.featureName,m=o.rightOp,g=o.rightToken,S=null;if(v!==null){if(v.type===""){var P=v.type,T=v.value;T==="infinite"&&(S={type:P,value:T})}else if(v.type===""||v.type===""||v.type===""){v.wsBefore,v.wsAfter;var w=A5(v,["wsBefore","wsAfter"]);S=w}}var I=null;if(g!==null){if(g.type===""){var P=g.type,T=g.value;T==="infinite"&&(I={type:P,value:T})}else if(g.type===""||g.type===""||g.type===""){g.wsBefore,g.wsAfter;var F=A5(g,["wsBefore","wsAfter"]);I=F}}if(S!==null&&I!==null)if((b==="<"||b==="<=")&&(m==="<"||m==="<="))p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I};else if((b===">"||b===">=")&&(m===">"||m===">="))p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I};else throw new Error("Invalid range");else S===null&&b===null&&m!==null&&I!==null?p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I}:S!==null&&b!==null&&m===null&&I===null&&(p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I});return p}else throw new Error("Invalid range")};function sEe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oEe(t){var e=sEe(t,"string");return typeof e=="symbol"?e:String(e)}function aEe(t,e,r){return e=oEe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function P9(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zh(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function T9(t,e){if(t==null)return{};var r=cEe(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function nh(t,e){for(var r in t)e(t[r],r)}function Eu(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function lEe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function _5(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var i=new RegExp(".".concat(fEe(X8(e,{isIdentifier:!0}))),"g");return t.replace(i,"&")},n;try{n=j2e(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(i=>{try{for(var s=i.length-1;s>=-1;s--){if(!i[s])throw new Error;var o=i[s];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error(Ws(I9||(I9=Q8([` +Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.value,children:[l].concat(d.children)}},hEe=function(e){if(e.length<3||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid media feature");for(var r=[e[0]],n=1;n"&&i.value>0&&s.type===""&&s.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:i.value,denominator:o.value,wsBefore:i.wsBefore,wsAfter:o.wsAfter}),n+=2;continue}}r.push(e[n])}var a=r[1];if(a.type===""&&r.length===3)return{context:"boolean",feature:a.value};if(r.length===5&&r[1].type===""&&r[2].type===""){var c=r[3];if(c.type===""||c.type===""||c.type===""||c.type===""){var l=r[1].value,u=null,f=l.slice(0,4);f==="min-"?(u="min",l=l.slice(4)):f==="max-"&&(u="max",l=l.slice(4)),c.wsBefore,c.wsAfter;var d=k5(c,["wsBefore","wsAfter"]);return{context:"value",prefix:u,feature:l,value:d}}}else if(r.length>=5)try{var h=pEe(r);return{context:"range",feature:h.featureName,range:h}}catch(p){throw Hn("Invalid media feature",p)}throw new Error("Invalid media feature")},pEe=function(e){var r,n,i,s;if(e.length<5||e[0].type!=="<(-token>"||e[e.length-1].type!=="<)-token>")throw new Error("Invalid range");var o={leftToken:null,leftOp:null,featureName:"",rightOp:null,rightToken:null},a=e[1].type===""||e[1].type===""||e[1].type===""||e[1].type===""&&e[1].value==="infinite";if(e[2].type===""){if(e[2].value===60)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]="<=":o[a?"leftOp":"rightOp"]="<";else if(e[2].value===62)e[3].type===""&&e[3].value===61&&!e[3].wsBefore?o[a?"leftOp":"rightOp"]=">=":o[a?"leftOp":"rightOp"]=">";else if(e[2].value===61)o[a?"leftOp":"rightOp"]="=";else throw new Error("Invalid range");if(a)o.leftToken=e[1];else if(e[1].type==="")o.featureName=e[1].value;else throw new Error("Invalid range");var c=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),l=e[c];if(a)if(l.type===""){if(o.featureName=l.value,e.length>=7){var u=e[c+1],f=e[c+2];if(u.type===""){var d=u.value;if(d===60)f.type===""&&f.value===61&&!f.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)f.type===""&&f.value===61&&!f.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[c+1+((s=(i=o.rightOp)===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(c+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=l;var p=null,v=o.leftToken,b=o.leftOp,y=o.featureName,m=o.rightOp,g=o.rightToken,S=null;if(v!==null){if(v.type===""){var P=v.type,T=v.value;T==="infinite"&&(S={type:P,value:T})}else if(v.type===""||v.type===""||v.type===""){v.wsBefore,v.wsAfter;var w=k5(v,["wsBefore","wsAfter"]);S=w}}var I=null;if(g!==null){if(g.type===""){var P=g.type,T=g.value;T==="infinite"&&(I={type:P,value:T})}else if(g.type===""||g.type===""||g.type===""){g.wsBefore,g.wsAfter;var B=k5(g,["wsBefore","wsAfter"]);I=B}}if(S!==null&&I!==null)if((b==="<"||b==="<=")&&(m==="<"||m==="<="))p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I};else if((b===">"||b===">=")&&(m===">"||m===">="))p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I};else throw new Error("Invalid range");else S===null&&b===null&&m!==null&&I!==null?p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I}:S!==null&&b!==null&&m===null&&I===null&&(p={leftToken:S,leftOp:b,featureName:y,rightOp:m,rightToken:I});return p}else throw new Error("Invalid range")};function vEe(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mEe(t){var e=vEe(t,"string");return typeof e=="symbol"?e:String(e)}function yEe(t,e,r){return e=mEe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function OT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zh(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}function RT(t,e){if(t==null)return{};var r=gEe(t,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function nh(t,e){for(var r in t)e(t[r],r)}function Eu(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function bEe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function A5(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var i=new RegExp(".".concat(EEe(X8(e,{isIdentifier:!0}))),"g");return t.replace(i,"&")},n;try{n=Y2e(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(i=>{try{for(var s=i.length-1;s>=-1;s--){if(!i[s])throw new Error;var o=i[s];if(o.type==="child"||o.type==="parent"||o.type==="sibling"||o.type==="adjacent"||o.type==="descendant")throw new Error;if(o.type==="attribute"&&o.name==="class"&&o.value===e)return}}catch{throw new Error(Ws($T||($T=Q8([` Invalid selector: `,` Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`. @@ -233,22 +238,22 @@ Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.val If your selector is targeting another class, you should move it to the style definition for that class, e.g. given we have styles for 'parent' and 'child' elements, instead of adding a selector of `,") to 'parent', you should add ",` to 'child'). If your selector is targeting something global, use the 'globalStyle' function instead, e.g. if you wanted to write `,", you should instead write 'globalStyle(",`, { ... })' - `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class By{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new By},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var i=r.findOrCreateCondition(n);r=i.children}return r}addRule(e,r,n){var i=this.getConditionalRulesetByPath(n),s=i.findOrCreateCondition(r);if(!s)throw new Error("Failed to add conditional rule");s.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),i=0;ia.has(u.query));l>-1?r.splice(l,0,c):r.push(c)};for(var[i,s]of this.precedenceLookup.entries())n(s);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:i}of this.getSortedRuleset()){var s={};for(var o of n)s[o.selector]=o.rule;Object.assign(s,...i.renderToArray()),e.push({[r]:s})}return e}}var HU={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-input-placeholder":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":focus":!0,":focus-visible":!0,":focus-within":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},hEe=Object.keys(HU),pEe=HU,O9,R9=(t,e)=>new Error(Ws(O9||(O9=Q8([` + `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class Fy{constructor(){this.ruleset=new Map,this.precedenceLookup=new Map}findOrCreateCondition(e){var r=this.ruleset.get(e);return r||(r={query:e,rules:[],children:new Fy},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var i=r.findOrCreateCondition(n);r=i.children}return r}addRule(e,r,n){var i=this.getConditionalRulesetByPath(n),s=i.findOrCreateCondition(r);if(!s)throw new Error("Failed to add conditional rule");s.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),i=0;ia.has(u.query));l>-1?r.splice(l,0,c):r.push(c)};for(var[i,s]of this.precedenceLookup.entries())n(s);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:i}of this.getSortedRuleset()){var s={};for(var o of n)s[o.selector]=o.rule;Object.assign(s,...i.renderToArray()),e.push({[r]:s})}return e}}var KU={":-moz-any-link":!0,":-moz-full-screen":!0,":-moz-placeholder":!0,":-moz-read-only":!0,":-moz-read-write":!0,":-ms-fullscreen":!0,":-ms-input-placeholder":!0,":-webkit-any-link":!0,":-webkit-full-screen":!0,"::-moz-color-swatch":!0,"::-moz-list-bullet":!0,"::-moz-list-number":!0,"::-moz-page-sequence":!0,"::-moz-page":!0,"::-moz-placeholder":!0,"::-moz-progress-bar":!0,"::-moz-range-progress":!0,"::-moz-range-thumb":!0,"::-moz-range-track":!0,"::-moz-scrolled-page-sequence":!0,"::-moz-selection":!0,"::-ms-backdrop":!0,"::-ms-browse":!0,"::-ms-check":!0,"::-ms-clear":!0,"::-ms-fill-lower":!0,"::-ms-fill-upper":!0,"::-ms-fill":!0,"::-ms-reveal":!0,"::-ms-thumb":!0,"::-ms-ticks-after":!0,"::-ms-ticks-before":!0,"::-ms-tooltip":!0,"::-ms-track":!0,"::-ms-value":!0,"::-webkit-backdrop":!0,"::-webkit-inner-spin-button":!0,"::-webkit-input-placeholder":!0,"::-webkit-meter-bar":!0,"::-webkit-meter-even-less-good-value":!0,"::-webkit-meter-inner-element":!0,"::-webkit-meter-optimum-value":!0,"::-webkit-meter-suboptimum-value":!0,"::-webkit-outer-spin-button":!0,"::-webkit-progress-bar":!0,"::-webkit-progress-inner-element":!0,"::-webkit-progress-inner-value":!0,"::-webkit-progress-value":!0,"::-webkit-resizer":!0,"::-webkit-scrollbar-button":!0,"::-webkit-scrollbar-corner":!0,"::-webkit-scrollbar-thumb":!0,"::-webkit-scrollbar-track-piece":!0,"::-webkit-scrollbar-track":!0,"::-webkit-scrollbar":!0,"::-webkit-search-cancel-button":!0,"::-webkit-search-results-button":!0,"::-webkit-slider-runnable-track":!0,"::-webkit-slider-thumb":!0,"::after":!0,"::backdrop":!0,"::before":!0,"::cue":!0,"::file-selector-button":!0,"::first-letter":!0,"::first-line":!0,"::grammar-error":!0,"::marker":!0,"::placeholder":!0,"::selection":!0,"::spelling-error":!0,"::target-text":!0,"::view-transition-group":!0,"::view-transition-image-pair":!0,"::view-transition-new":!0,"::view-transition-old":!0,"::view-transition":!0,":active":!0,":after":!0,":any-link":!0,":before":!0,":blank":!0,":checked":!0,":default":!0,":defined":!0,":disabled":!0,":empty":!0,":enabled":!0,":first-child":!0,":first-letter":!0,":first-line":!0,":first-of-type":!0,":first":!0,":focus-visible":!0,":focus-within":!0,":focus":!0,":fullscreen":!0,":hover":!0,":in-range":!0,":indeterminate":!0,":invalid":!0,":last-child":!0,":last-of-type":!0,":left":!0,":link":!0,":only-child":!0,":only-of-type":!0,":optional":!0,":out-of-range":!0,":placeholder-shown":!0,":read-only":!0,":read-write":!0,":required":!0,":right":!0,":root":!0,":scope":!0,":target":!0,":valid":!0,":visited":!0},CEe=Object.keys(KU),SEe=KU,MT,NT=(t,e)=>new Error(Ws(MT||(MT=Q8([` Invalid media query: "`,`" `,` Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries - `])),t,e)),vEe=t=>{if(t==="@media ")throw R9(t,"Query is empty");try{X2e(t)}catch(e){throw R9(t,e.message)}},mEe=["vars"],yEe=["content"],qU="__DECLARATION",gEe={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function bEe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function wEe(t,e,r,n){var i=t.slice(0,e),s=t.slice(r);return"".concat(i).concat(n).concat(s)}var EEe=" ",xu=[...hEe,"@layer","@media","@supports","@container","selectors"];class xEe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new By],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new $2e(e),this.layers=new Map,this.composedClassLists=r.map(n=>{var{identifier:i,classList:s}=n;return{identifier:i,regex:RegExp("(".concat(s,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(s=>{var[o,a]=s;return[o,this.transformProperties(a)]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new By,e.type==="layer"){var r="@layer ".concat(e.name);this.addLayer([r])}else{var n=Eu(e.rule,xu);this.addRule({selector:e.selector,rule:n}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule)}var i=this.conditionalRulesets[this.conditionalRulesets.length-1];i.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformProperties(e.rule)),i=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var s=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:i,rule:n},s,o)}addRule(e){var r=this.transformVars(this.transformProperties(e.rule)),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}addLayer(e){var r=e.join(" - ");this.layers.set(r,e)}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return nh(e,(r,n)=>{typeof r=="number"&&r!==0&&!gEe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=T9(e,mEe);return r?Zh(Zh({},lEe(r,(i,s)=>S2e(s))),n):n}transformContent(e){var{content:r}=e,n=T9(e,yEe);if(typeof r>"u")return n;var i=Array.isArray(r)?r:[r];return Zh({content:i.map(s=>s&&(s.includes('"')||s.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(s))?s:'"'.concat(s,'"'))},n)}transformClassname(e){return".".concat(X8(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(s,()=>(jU(h),h))};for(var{identifier:i,regex:s}of this.composedClassLists)n(i);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,c=o.length-1;c>=0;c--){var[l,[u]]=o[c],f=l-u.length+1;f>=a||(a=f,r[f-1]!=="."&&(r=wEe(r,f,l+1,this.transformClassname(u))))}return r}transformSelectors(e,r,n){nh(r.selectors,(i,s)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(s.replace(RegExp("&","g"),e.selector));dEe(o,e.selector);var a={selector:o,rule:Eu(i,xu)};n?this.addConditionalRule(a,n):this.addRule(a);var c={type:"selector",selector:o,rule:i};this.transformLayer(c,i["@layer"],n),this.transformSupports(c,i["@supports"],n),this.transformMedia(c,i["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(l=>"@media ".concat(l)));for(var[s,o]of Object.entries(r)){var a="@media ".concat(s);vEe(a);var c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Eu(o,xu)},c),e.type==="local"&&(this.transformSimplePseudos(e,o,c),this.transformSelectors(e,o,c)),this.transformLayer(e,o["@layer"],c),this.transformSupports(e,o["@supports"],c),this.transformContainer(e,o["@container"],c)}}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@container ".concat(s))),nh(r,(s,o)=>{var a="@container ".concat(o),c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Eu(s,xu)},c),e.type==="local"&&(this.transformSimplePseudos(e,s,c),this.transformSelectors(e,s,c)),this.transformLayer(e,s["@layer"],c),this.transformSupports(e,s["@supports"],c),this.transformMedia(e,s["@media"],c)})}}transformLayer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@layer ".concat(s))),nh(r,(s,o)=>{var a=[...n,"@layer ".concat(o)];this.addLayer(a),this.addConditionalRule({selector:e.selector,rule:Eu(s,xu)},a),e.type==="local"&&(this.transformSimplePseudos(e,s,a),this.transformSelectors(e,s,a)),this.transformMedia(e,s["@media"],a),this.transformSupports(e,s["@supports"],a),this.transformContainer(e,s["@container"],a)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@supports ".concat(s))),nh(r,(s,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:Eu(s,xu)},a),e.type==="local"&&(this.transformSimplePseudos(e,s,a),this.transformSelectors(e,s,a)),this.transformLayer(e,s["@layer"],a),this.transformMedia(e,s["@media"],a),this.transformContainer(e,s["@container"],a)})}}transformSimplePseudos(e,r,n){for(var i of Object.keys(r))if(pEe[i]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(i),rule:r[i]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(i),rule:r[i]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(cl({"@font-face":r}));for(var n of this.keyframesRules)e.push(cl({["@keyframes ".concat(n.name)]:n.rule}));for(var i of this.layers.values()){var[s,...o]=i.reverse(),a={[s]:qU};for(var c of o)a={[c]:a};e.push(cl(a))}for(var l of this.rules)e.push(cl({[l.selector]:l.rule}));for(var u of this.conditionalRulesets)for(var f of u.renderToArray())e.push(cl(f));return e.filter(Boolean)}}function cl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(l=>cl({[o]:l},e)));else if(a&&typeof a=="object"){var c=Object.keys(a).length===0;c||r.push("".concat(e).concat(o,` { -`).concat(cl(a,e+EEe),` -`).concat(e,"}"))}else a===qU?r.push("".concat(e).concat(o,";")):r.push("".concat(e).concat(o.startsWith("--")?o:bEe(o),": ").concat(a,";"))};for(var i of Object.keys(t))n(i);return r.join(` -`)}function CEe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,i=new xEe(e,n);for(var s of r)i.processCssObj(s);return i.toCss()}function VU(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ek={exports:{}},iE,$9;function SEe(){return $9||($9=1,iE={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),iE}var sE,M9;function GU(){if(M9)return sE;M9=1;const t=SEe(),e={};for(const i of Object.keys(t))e[t[i]]=i;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};sE=r;for(const i of Object.keys(r)){if(!("channels"in r[i]))throw new Error("missing channels property: "+i);if(!("labels"in r[i]))throw new Error("missing channel labels property: "+i);if(r[i].labels.length!==r[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:s,labels:o}=r[i];delete r[i].channels,delete r[i].labels,Object.defineProperty(r[i],"channels",{value:s}),Object.defineProperty(r[i],"labels",{value:o})}r.rgb.hsl=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.min(s,o,a),l=Math.max(s,o,a),u=l-c;let f,d;l===c?f=0:s===l?f=(o-a)/u:o===l?f=2+(a-s)/u:a===l&&(f=4+(s-o)/u),f=Math.min(f*60,360),f<0&&(f+=360);const h=(c+l)/2;return l===c?d=0:h<=.5?d=u/(l+c):d=u/(2-l-c),[f,d*100,h*100]},r.rgb.hsv=function(i){let s,o,a,c,l;const u=i[0]/255,f=i[1]/255,d=i[2]/255,h=Math.max(u,f,d),p=h-Math.min(u,f,d),v=function(b){return(h-b)/6/p+1/2};return p===0?(c=0,l=0):(l=p/h,s=v(u),o=v(f),a=v(d),u===h?c=a-o:f===h?c=1/3+s-a:d===h&&(c=2/3+o-s),c<0?c+=1:c>1&&(c-=1)),[c*360,l*100,h*100]},r.rgb.hwb=function(i){const s=i[0],o=i[1];let a=i[2];const c=r.rgb.hsl(i)[0],l=1/255*Math.min(s,Math.min(o,a));return a=1-1/255*Math.max(s,Math.max(o,a)),[c,l*100,a*100]},r.rgb.cmyk=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.min(1-s,1-o,1-a),l=(1-s-c)/(1-c)||0,u=(1-o-c)/(1-c)||0,f=(1-a-c)/(1-c)||0;return[l*100,u*100,f*100,c*100]};function n(i,s){return(i[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2}return r.rgb.keyword=function(i){const s=e[i];if(s)return s;let o=1/0,a;for(const c of Object.keys(t)){const l=t[c],u=n(i,l);u.04045?((s+.055)/1.055)**2.4:s/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const c=s*.4124+o*.3576+a*.1805,l=s*.2126+o*.7152+a*.0722,u=s*.0193+o*.1192+a*.9505;return[c*100,l*100,u*100]},r.rgb.lab=function(i){const s=r.rgb.xyz(i);let o=s[0],a=s[1],c=s[2];o/=95.047,a/=100,c/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const l=116*a-16,u=500*(o-a),f=200*(a-c);return[l,u,f]},r.hsl.rgb=function(i){const s=i[0]/360,o=i[1]/100,a=i[2]/100;let c,l,u;if(o===0)return u=a*255,[u,u,u];a<.5?c=a*(1+o):c=a+o-a*o;const f=2*a-c,d=[0,0,0];for(let h=0;h<3;h++)l=s+1/3*-(h-1),l<0&&l++,l>1&&l--,6*l<1?u=f+(c-f)*6*l:2*l<1?u=c:3*l<2?u=f+(c-f)*(2/3-l)*6:u=f,d[h]=u*255;return d},r.hsl.hsv=function(i){const s=i[0];let o=i[1]/100,a=i[2]/100,c=o;const l=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,c*=l<=1?l:2-l;const u=(a+o)/2,f=a===0?2*c/(l+c):2*o/(a+o);return[s,f*100,u*100]},r.hsv.rgb=function(i){const s=i[0]/60,o=i[1]/100;let a=i[2]/100;const c=Math.floor(s)%6,l=s-Math.floor(s),u=255*a*(1-o),f=255*a*(1-o*l),d=255*a*(1-o*(1-l));switch(a*=255,c){case 0:return[a,d,u];case 1:return[f,a,u];case 2:return[u,a,d];case 3:return[u,f,a];case 4:return[d,u,a];case 5:return[a,u,f]}},r.hsv.hsl=function(i){const s=i[0],o=i[1]/100,a=i[2]/100,c=Math.max(a,.01);let l,u;u=(2-o)*a;const f=(2-o)*c;return l=o*c,l/=f<=1?f:2-f,l=l||0,u/=2,[s,l*100,u*100]},r.hwb.rgb=function(i){const s=i[0]/360;let o=i[1]/100,a=i[2]/100;const c=o+a;let l;c>1&&(o/=c,a/=c);const u=Math.floor(6*s),f=1-a;l=6*s-u,u&1&&(l=1-l);const d=o+l*(f-o);let h,p,v;switch(u){default:case 6:case 0:h=f,p=d,v=o;break;case 1:h=d,p=f,v=o;break;case 2:h=o,p=f,v=d;break;case 3:h=o,p=d,v=f;break;case 4:h=d,p=o,v=f;break;case 5:h=f,p=o,v=d;break}return[h*255,p*255,v*255]},r.cmyk.rgb=function(i){const s=i[0]/100,o=i[1]/100,a=i[2]/100,c=i[3]/100,l=1-Math.min(1,s*(1-c)+c),u=1-Math.min(1,o*(1-c)+c),f=1-Math.min(1,a*(1-c)+c);return[l*255,u*255,f*255]},r.xyz.rgb=function(i){const s=i[0]/100,o=i[1]/100,a=i[2]/100;let c,l,u;return c=s*3.2406+o*-1.5372+a*-.4986,l=s*-.9689+o*1.8758+a*.0415,u=s*.0557+o*-.204+a*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),u=Math.min(Math.max(0,u),1),[c*255,l*255,u*255]},r.xyz.lab=function(i){let s=i[0],o=i[1],a=i[2];s/=95.047,o/=100,a/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const c=116*o-16,l=500*(s-o),u=200*(o-a);return[c,l,u]},r.lab.xyz=function(i){const s=i[0],o=i[1],a=i[2];let c,l,u;l=(s+16)/116,c=o/500+l,u=l-a/200;const f=l**3,d=c**3,h=u**3;return l=f>.008856?f:(l-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,u=h>.008856?h:(u-16/116)/7.787,c*=95.047,l*=100,u*=108.883,[c,l,u]},r.lab.lch=function(i){const s=i[0],o=i[1],a=i[2];let c;c=Math.atan2(a,o)*360/2/Math.PI,c<0&&(c+=360);const u=Math.sqrt(o*o+a*a);return[s,u,c]},r.lch.lab=function(i){const s=i[0],o=i[1],c=i[2]/360*2*Math.PI,l=o*Math.cos(c),u=o*Math.sin(c);return[s,l,u]},r.rgb.ansi16=function(i,s=null){const[o,a,c]=i;let l=s===null?r.rgb.hsv(i)[2]:s;if(l=Math.round(l/50),l===0)return 30;let u=30+(Math.round(c/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return l===2&&(u+=60),u},r.hsv.ansi16=function(i){return r.rgb.ansi16(r.hsv.rgb(i),i[2])},r.rgb.ansi256=function(i){const s=i[0],o=i[1],a=i[2];return s===o&&o===a?s<8?16:s>248?231:Math.round((s-8)/247*24)+232:16+36*Math.round(s/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(i){let s=i%10;if(s===0||s===7)return i>50&&(s+=3.5),s=s/10.5*255,[s,s,s];const o=(~~(i>50)+1)*.5,a=(s&1)*o*255,c=(s>>1&1)*o*255,l=(s>>2&1)*o*255;return[a,c,l]},r.ansi256.rgb=function(i){if(i>=232){const l=(i-232)*10+8;return[l,l,l]}i-=16;let s;const o=Math.floor(i/36)/5*255,a=Math.floor((s=i%36)/6)/5*255,c=s%6/5*255;return[o,a,c]},r.rgb.hex=function(i){const o=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(i){const s=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!s)return[0,0,0];let o=s[0];s[0].length===3&&(o=o.split("").map(f=>f+f).join(""));const a=parseInt(o,16),c=a>>16&255,l=a>>8&255,u=a&255;return[c,l,u]},r.rgb.hcg=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.max(Math.max(s,o),a),l=Math.min(Math.min(s,o),a),u=c-l;let f,d;return u<1?f=l/(1-u):f=0,u<=0?d=0:c===s?d=(o-a)/u%6:c===o?d=2+(a-s)/u:d=4+(s-o)/u,d/=6,d%=1,[d*360,u*100,f*100]},r.hsl.hcg=function(i){const s=i[1]/100,o=i[2]/100,a=o<.5?2*s*o:2*s*(1-o);let c=0;return a<1&&(c=(o-.5*a)/(1-a)),[i[0],a*100,c*100]},r.hsv.hcg=function(i){const s=i[1]/100,o=i[2]/100,a=s*o;let c=0;return a<1&&(c=(o-a)/(1-a)),[i[0],a*100,c*100]},r.hcg.rgb=function(i){const s=i[0]/360,o=i[1]/100,a=i[2]/100;if(o===0)return[a*255,a*255,a*255];const c=[0,0,0],l=s%1*6,u=l%1,f=1-u;let d=0;switch(Math.floor(l)){case 0:c[0]=1,c[1]=u,c[2]=0;break;case 1:c[0]=f,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=u;break;case 3:c[0]=0,c[1]=f,c[2]=1;break;case 4:c[0]=u,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=f}return d=(1-o)*a,[(o*c[0]+d)*255,(o*c[1]+d)*255,(o*c[2]+d)*255]},r.hcg.hsv=function(i){const s=i[1]/100,o=i[2]/100,a=s+o*(1-s);let c=0;return a>0&&(c=s/a),[i[0],c*100,a*100]},r.hcg.hsl=function(i){const s=i[1]/100,a=i[2]/100*(1-s)+.5*s;let c=0;return a>0&&a<.5?c=s/(2*a):a>=.5&&a<1&&(c=s/(2*(1-a))),[i[0],c*100,a*100]},r.hcg.hwb=function(i){const s=i[1]/100,o=i[2]/100,a=s+o*(1-s);return[i[0],(a-s)*100,(1-a)*100]},r.hwb.hcg=function(i){const s=i[1]/100,a=1-i[2]/100,c=a-s;let l=0;return c<1&&(l=(a-c)/(1-c)),[i[0],c*100,l*100]},r.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},r.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},r.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},r.gray.hsl=function(i){return[0,0,i[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(i){return[0,100,i[0]]},r.gray.cmyk=function(i){return[0,0,0,i[0]]},r.gray.lab=function(i){return[i[0],0,0]},r.gray.hex=function(i){const s=Math.round(i[0]/100*255)&255,a=((s<<16)+(s<<8)+s).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},sE}var oE,N9;function kEe(){if(N9)return oE;N9=1;const t=GU();function e(){const s={},o=Object.keys(t);for(let a=o.length,c=0;c1&&(c=l),o(c))};return"conversion"in o&&(a.conversion=o.conversion),a}function s(o){const a=function(...c){const l=c[0];if(l==null)return l;l.length>1&&(c=l);const u=o(c);if(typeof u=="object")for(let f=u.length,d=0;d{r[o]={},Object.defineProperty(r[o],"channels",{value:t[o].channels}),Object.defineProperty(r[o],"labels",{value:t[o].labels});const a=e(o);Object.keys(a).forEach(l=>{const u=a[l];r[o][l]=s(u),r[o][l].raw=i(u)})}),aE=r,aE}ek.exports;(function(t){const e=(u,f)=>(...d)=>`\x1B[${u(...d)+f}m`,r=(u,f)=>(...d)=>{const h=u(...d);return`\x1B[${38+f};5;${h}m`},n=(u,f)=>(...d)=>{const h=u(...d);return`\x1B[${38+f};2;${h[0]};${h[1]};${h[2]}m`},i=u=>u,s=(u,f,d)=>[u,f,d],o=(u,f,d)=>{Object.defineProperty(u,f,{get:()=>{const h=d();return Object.defineProperty(u,f,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const c=(u,f,d,h)=>{a===void 0&&(a=AEe());const p=h?10:0,v={};for(const[b,y]of Object.entries(a)){const m=b==="ansi16"?"ansi":b;b===f?v[m]=u(d,p):typeof y=="object"&&(v[m]=u(y[f],p))}return v};function l(){const u=new Map,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};f.color.gray=f.color.blackBright,f.bgColor.bgGray=f.bgColor.bgBlackBright,f.color.grey=f.color.blackBright,f.bgColor.bgGrey=f.bgColor.bgBlackBright;for(const[d,h]of Object.entries(f)){for(const[p,v]of Object.entries(h))f[p]={open:`\x1B[${v[0]}m`,close:`\x1B[${v[1]}m`},h[p]=f[p],u.set(v[0],v[1]);Object.defineProperty(f,d,{value:h,enumerable:!1})}return Object.defineProperty(f,"codes",{value:u,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",o(f.color,"ansi",()=>c(e,"ansi16",i,!1)),o(f.color,"ansi256",()=>c(r,"ansi256",i,!1)),o(f.color,"ansi16m",()=>c(n,"rgb",s,!1)),o(f.bgColor,"ansi",()=>c(e,"ansi16",i,!0)),o(f.bgColor,"ansi256",()=>c(r,"ansi256",i,!0)),o(f.bgColor,"ansi16m",()=>c(n,"rgb",s,!0)),f}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(ek);var _Ee=ek.exports,PEe={stdout:!1,stderr:!1};const TEe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const i=e.length;let s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},IEe=(t,e,r,n)=>{let i=0,s="";do{const o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r + `])),t,e)),kEe=t=>{if(t==="@media ")throw NT(t,"Query is empty");try{cEe(t)}catch(e){throw NT(t,e.message)}},AEe=["vars"],_Ee=["content"],QU="__DECLARATION",PEe={animationIterationCount:!0,borderImage:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,initialLetter:!0,lineClamp:!0,lineHeight:!0,maxLines:!0,opacity:!0,order:!0,orphans:!0,scale:!0,tabSize:!0,WebkitLineClamp:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,maskBorder:!0,maskBorderOutset:!0,maskBorderSlice:!0,maskBorderWidth:!0,shapeImageThreshold:!0,stopOpacity:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function TEe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function IEe(t,e,r,n){var i=t.slice(0,e),s=t.slice(r);return"".concat(i).concat(n).concat(s)}var OEe=" ",xu=[...CEe,"@layer","@media","@supports","@container","selectors"];class REe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new Fy],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new W2e(e),this.layers=new Map,this.composedClassLists=r.map(n=>{var{identifier:i,classList:s}=n;return{identifier:i,regex:RegExp("(".concat(s,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){e.rule=Object.fromEntries(Object.entries(e.rule).map(s=>{var[o,a]=s;return[o,this.transformProperties(a)]})),this.keyframesRules.push(e);return}if(this.currConditionalRuleset=new Fy,e.type==="layer"){var r="@layer ".concat(e.name);this.addLayer([r])}else{var n=Eu(e.rule,xu);this.addRule({selector:e.selector,rule:n}),this.transformLayer(e,e.rule["@layer"]),this.transformMedia(e,e.rule["@media"]),this.transformSupports(e,e.rule["@supports"]),this.transformContainer(e,e.rule["@container"]),this.transformSimplePseudos(e,e.rule),this.transformSelectors(e,e.rule)}var i=this.conditionalRulesets[this.conditionalRulesets.length-1];i.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformProperties(e.rule)),i=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var s=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:i,rule:n},s,o)}addRule(e){var r=this.transformVars(this.transformProperties(e.rule)),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}addLayer(e){var r=e.join(" - ");this.layers.set(r,e)}transformProperties(e){return this.transformContent(this.pixelifyProperties(e))}pixelifyProperties(e){return nh(e,(r,n)=>{typeof r=="number"&&r!==0&&!PEe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=RT(e,AEe);return r?Zh(Zh({},bEe(r,(i,s)=>N2e(s))),n):n}transformContent(e){var{content:r}=e,n=RT(e,_Ee);if(typeof r>"u")return n;var i=Array.isArray(r)?r:[r];return Zh({content:i.map(s=>s&&(s.includes('"')||s.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(s))?s:'"'.concat(s,'"'))},n)}transformClassname(e){return".".concat(X8(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(s,()=>(qU(h),h))};for(var{identifier:i,regex:s}of this.composedClassLists)n(i);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,c=o.length-1;c>=0;c--){var[l,[u]]=o[c],f=l-u.length+1;f>=a||(a=f,r[f-1]!=="."&&(r=IEe(r,f,l+1,this.transformClassname(u))))}return r}transformSelectors(e,r,n){nh(r.selectors,(i,s)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(s.replace(RegExp("&","g"),e.selector));xEe(o,e.selector);var a={selector:o,rule:Eu(i,xu)};n?this.addConditionalRule(a,n):this.addRule(a);var c={type:"selector",selector:o,rule:i};this.transformLayer(c,i["@layer"],n),this.transformSupports(c,i["@supports"],n),this.transformMedia(c,i["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(l=>"@media ".concat(l)));for(var[s,o]of Object.entries(r)){var a="@media ".concat(s);kEe(a);var c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Eu(o,xu)},c),e.type==="local"&&(this.transformSimplePseudos(e,o,c),this.transformSelectors(e,o,c)),this.transformLayer(e,o["@layer"],c),this.transformSupports(e,o["@supports"],c),this.transformContainer(e,o["@container"],c)}}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@container ".concat(s))),nh(r,(s,o)=>{var a="@container ".concat(o),c=[...n,a];this.addConditionalRule({selector:e.selector,rule:Eu(s,xu)},c),e.type==="local"&&(this.transformSimplePseudos(e,s,c),this.transformSelectors(e,s,c)),this.transformLayer(e,s["@layer"],c),this.transformSupports(e,s["@supports"],c),this.transformMedia(e,s["@media"],c)})}}transformLayer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@layer ".concat(s))),nh(r,(s,o)=>{var a=[...n,"@layer ".concat(o)];this.addLayer(a),this.addConditionalRule({selector:e.selector,rule:Eu(s,xu)},a),e.type==="local"&&(this.transformSimplePseudos(e,s,a),this.transformSelectors(e,s,a)),this.transformMedia(e,s["@media"],a),this.transformSupports(e,s["@supports"],a),this.transformContainer(e,s["@container"],a)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var i;(i=this.currConditionalRuleset)===null||i===void 0||i.addConditionPrecedence(n,Object.keys(r).map(s=>"@supports ".concat(s))),nh(r,(s,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:Eu(s,xu)},a),e.type==="local"&&(this.transformSimplePseudos(e,s,a),this.transformSelectors(e,s,a)),this.transformLayer(e,s["@layer"],a),this.transformMedia(e,s["@media"],a),this.transformContainer(e,s["@container"],a)})}}transformSimplePseudos(e,r,n){for(var i of Object.keys(r))if(SEe[i]){if(e.type!=="local")throw new Error("Simple pseudos are not valid in ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));n?this.addConditionalRule({selector:"".concat(e.selector).concat(i),rule:r[i]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(i),rule:r[i]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(cl({"@font-face":r}));for(var n of this.keyframesRules)e.push(cl({["@keyframes ".concat(n.name)]:n.rule}));for(var i of this.layers.values()){var[s,...o]=i.reverse(),a={[s]:QU};for(var c of o)a={[c]:a};e.push(cl(a))}for(var l of this.rules)e.push(cl({[l.selector]:l.rule}));for(var u of this.conditionalRulesets)for(var f of u.renderToArray())e.push(cl(f));return e.filter(Boolean)}}function cl(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=[],n=function(o){var a=t[o];if(a&&Array.isArray(a))r.push(...a.map(l=>cl({[o]:l},e)));else if(a&&typeof a=="object"){var c=Object.keys(a).length===0;c||r.push("".concat(e).concat(o,` { +`).concat(cl(a,e+OEe),` +`).concat(e,"}"))}else a===QU?r.push("".concat(e).concat(o,";")):r.push("".concat(e).concat(o.startsWith("--")?o:TEe(o),": ").concat(a,";"))};for(var i of Object.keys(t))n(i);return r.join(` +`)}function $Ee(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,i=new REe(e,n);for(var s of r)i.processCssObj(s);return i.toCss()}function YU(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var ek={exports:{}},iE,DT;function MEe(){return DT||(DT=1,iE={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),iE}var sE,LT;function JU(){if(LT)return sE;LT=1;const t=MEe(),e={};for(const i of Object.keys(t))e[t[i]]=i;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};sE=r;for(const i of Object.keys(r)){if(!("channels"in r[i]))throw new Error("missing channels property: "+i);if(!("labels"in r[i]))throw new Error("missing channel labels property: "+i);if(r[i].labels.length!==r[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:s,labels:o}=r[i];delete r[i].channels,delete r[i].labels,Object.defineProperty(r[i],"channels",{value:s}),Object.defineProperty(r[i],"labels",{value:o})}r.rgb.hsl=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.min(s,o,a),l=Math.max(s,o,a),u=l-c;let f,d;l===c?f=0:s===l?f=(o-a)/u:o===l?f=2+(a-s)/u:a===l&&(f=4+(s-o)/u),f=Math.min(f*60,360),f<0&&(f+=360);const h=(c+l)/2;return l===c?d=0:h<=.5?d=u/(l+c):d=u/(2-l-c),[f,d*100,h*100]},r.rgb.hsv=function(i){let s,o,a,c,l;const u=i[0]/255,f=i[1]/255,d=i[2]/255,h=Math.max(u,f,d),p=h-Math.min(u,f,d),v=function(b){return(h-b)/6/p+1/2};return p===0?(c=0,l=0):(l=p/h,s=v(u),o=v(f),a=v(d),u===h?c=a-o:f===h?c=1/3+s-a:d===h&&(c=2/3+o-s),c<0?c+=1:c>1&&(c-=1)),[c*360,l*100,h*100]},r.rgb.hwb=function(i){const s=i[0],o=i[1];let a=i[2];const c=r.rgb.hsl(i)[0],l=1/255*Math.min(s,Math.min(o,a));return a=1-1/255*Math.max(s,Math.max(o,a)),[c,l*100,a*100]},r.rgb.cmyk=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.min(1-s,1-o,1-a),l=(1-s-c)/(1-c)||0,u=(1-o-c)/(1-c)||0,f=(1-a-c)/(1-c)||0;return[l*100,u*100,f*100,c*100]};function n(i,s){return(i[0]-s[0])**2+(i[1]-s[1])**2+(i[2]-s[2])**2}return r.rgb.keyword=function(i){const s=e[i];if(s)return s;let o=1/0,a;for(const c of Object.keys(t)){const l=t[c],u=n(i,l);u.04045?((s+.055)/1.055)**2.4:s/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;const c=s*.4124+o*.3576+a*.1805,l=s*.2126+o*.7152+a*.0722,u=s*.0193+o*.1192+a*.9505;return[c*100,l*100,u*100]},r.rgb.lab=function(i){const s=r.rgb.xyz(i);let o=s[0],a=s[1],c=s[2];o/=95.047,a/=100,c/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const l=116*a-16,u=500*(o-a),f=200*(a-c);return[l,u,f]},r.hsl.rgb=function(i){const s=i[0]/360,o=i[1]/100,a=i[2]/100;let c,l,u;if(o===0)return u=a*255,[u,u,u];a<.5?c=a*(1+o):c=a+o-a*o;const f=2*a-c,d=[0,0,0];for(let h=0;h<3;h++)l=s+1/3*-(h-1),l<0&&l++,l>1&&l--,6*l<1?u=f+(c-f)*6*l:2*l<1?u=c:3*l<2?u=f+(c-f)*(2/3-l)*6:u=f,d[h]=u*255;return d},r.hsl.hsv=function(i){const s=i[0];let o=i[1]/100,a=i[2]/100,c=o;const l=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,c*=l<=1?l:2-l;const u=(a+o)/2,f=a===0?2*c/(l+c):2*o/(a+o);return[s,f*100,u*100]},r.hsv.rgb=function(i){const s=i[0]/60,o=i[1]/100;let a=i[2]/100;const c=Math.floor(s)%6,l=s-Math.floor(s),u=255*a*(1-o),f=255*a*(1-o*l),d=255*a*(1-o*(1-l));switch(a*=255,c){case 0:return[a,d,u];case 1:return[f,a,u];case 2:return[u,a,d];case 3:return[u,f,a];case 4:return[d,u,a];case 5:return[a,u,f]}},r.hsv.hsl=function(i){const s=i[0],o=i[1]/100,a=i[2]/100,c=Math.max(a,.01);let l,u;u=(2-o)*a;const f=(2-o)*c;return l=o*c,l/=f<=1?f:2-f,l=l||0,u/=2,[s,l*100,u*100]},r.hwb.rgb=function(i){const s=i[0]/360;let o=i[1]/100,a=i[2]/100;const c=o+a;let l;c>1&&(o/=c,a/=c);const u=Math.floor(6*s),f=1-a;l=6*s-u,u&1&&(l=1-l);const d=o+l*(f-o);let h,p,v;switch(u){default:case 6:case 0:h=f,p=d,v=o;break;case 1:h=d,p=f,v=o;break;case 2:h=o,p=f,v=d;break;case 3:h=o,p=d,v=f;break;case 4:h=d,p=o,v=f;break;case 5:h=f,p=o,v=d;break}return[h*255,p*255,v*255]},r.cmyk.rgb=function(i){const s=i[0]/100,o=i[1]/100,a=i[2]/100,c=i[3]/100,l=1-Math.min(1,s*(1-c)+c),u=1-Math.min(1,o*(1-c)+c),f=1-Math.min(1,a*(1-c)+c);return[l*255,u*255,f*255]},r.xyz.rgb=function(i){const s=i[0]/100,o=i[1]/100,a=i[2]/100;let c,l,u;return c=s*3.2406+o*-1.5372+a*-.4986,l=s*-.9689+o*1.8758+a*.0415,u=s*.0557+o*-.204+a*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,c=Math.min(Math.max(0,c),1),l=Math.min(Math.max(0,l),1),u=Math.min(Math.max(0,u),1),[c*255,l*255,u*255]},r.xyz.lab=function(i){let s=i[0],o=i[1],a=i[2];s/=95.047,o/=100,a/=108.883,s=s>.008856?s**(1/3):7.787*s+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const c=116*o-16,l=500*(s-o),u=200*(o-a);return[c,l,u]},r.lab.xyz=function(i){const s=i[0],o=i[1],a=i[2];let c,l,u;l=(s+16)/116,c=o/500+l,u=l-a/200;const f=l**3,d=c**3,h=u**3;return l=f>.008856?f:(l-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,u=h>.008856?h:(u-16/116)/7.787,c*=95.047,l*=100,u*=108.883,[c,l,u]},r.lab.lch=function(i){const s=i[0],o=i[1],a=i[2];let c;c=Math.atan2(a,o)*360/2/Math.PI,c<0&&(c+=360);const u=Math.sqrt(o*o+a*a);return[s,u,c]},r.lch.lab=function(i){const s=i[0],o=i[1],c=i[2]/360*2*Math.PI,l=o*Math.cos(c),u=o*Math.sin(c);return[s,l,u]},r.rgb.ansi16=function(i,s=null){const[o,a,c]=i;let l=s===null?r.rgb.hsv(i)[2]:s;if(l=Math.round(l/50),l===0)return 30;let u=30+(Math.round(c/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return l===2&&(u+=60),u},r.hsv.ansi16=function(i){return r.rgb.ansi16(r.hsv.rgb(i),i[2])},r.rgb.ansi256=function(i){const s=i[0],o=i[1],a=i[2];return s===o&&o===a?s<8?16:s>248?231:Math.round((s-8)/247*24)+232:16+36*Math.round(s/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(i){let s=i%10;if(s===0||s===7)return i>50&&(s+=3.5),s=s/10.5*255,[s,s,s];const o=(~~(i>50)+1)*.5,a=(s&1)*o*255,c=(s>>1&1)*o*255,l=(s>>2&1)*o*255;return[a,c,l]},r.ansi256.rgb=function(i){if(i>=232){const l=(i-232)*10+8;return[l,l,l]}i-=16;let s;const o=Math.floor(i/36)/5*255,a=Math.floor((s=i%36)/6)/5*255,c=s%6/5*255;return[o,a,c]},r.rgb.hex=function(i){const o=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(i){const s=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!s)return[0,0,0];let o=s[0];s[0].length===3&&(o=o.split("").map(f=>f+f).join(""));const a=parseInt(o,16),c=a>>16&255,l=a>>8&255,u=a&255;return[c,l,u]},r.rgb.hcg=function(i){const s=i[0]/255,o=i[1]/255,a=i[2]/255,c=Math.max(Math.max(s,o),a),l=Math.min(Math.min(s,o),a),u=c-l;let f,d;return u<1?f=l/(1-u):f=0,u<=0?d=0:c===s?d=(o-a)/u%6:c===o?d=2+(a-s)/u:d=4+(s-o)/u,d/=6,d%=1,[d*360,u*100,f*100]},r.hsl.hcg=function(i){const s=i[1]/100,o=i[2]/100,a=o<.5?2*s*o:2*s*(1-o);let c=0;return a<1&&(c=(o-.5*a)/(1-a)),[i[0],a*100,c*100]},r.hsv.hcg=function(i){const s=i[1]/100,o=i[2]/100,a=s*o;let c=0;return a<1&&(c=(o-a)/(1-a)),[i[0],a*100,c*100]},r.hcg.rgb=function(i){const s=i[0]/360,o=i[1]/100,a=i[2]/100;if(o===0)return[a*255,a*255,a*255];const c=[0,0,0],l=s%1*6,u=l%1,f=1-u;let d=0;switch(Math.floor(l)){case 0:c[0]=1,c[1]=u,c[2]=0;break;case 1:c[0]=f,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=u;break;case 3:c[0]=0,c[1]=f,c[2]=1;break;case 4:c[0]=u,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=f}return d=(1-o)*a,[(o*c[0]+d)*255,(o*c[1]+d)*255,(o*c[2]+d)*255]},r.hcg.hsv=function(i){const s=i[1]/100,o=i[2]/100,a=s+o*(1-s);let c=0;return a>0&&(c=s/a),[i[0],c*100,a*100]},r.hcg.hsl=function(i){const s=i[1]/100,a=i[2]/100*(1-s)+.5*s;let c=0;return a>0&&a<.5?c=s/(2*a):a>=.5&&a<1&&(c=s/(2*(1-a))),[i[0],c*100,a*100]},r.hcg.hwb=function(i){const s=i[1]/100,o=i[2]/100,a=s+o*(1-s);return[i[0],(a-s)*100,(1-a)*100]},r.hwb.hcg=function(i){const s=i[1]/100,a=1-i[2]/100,c=a-s;let l=0;return c<1&&(l=(a-c)/(1-c)),[i[0],c*100,l*100]},r.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},r.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},r.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},r.gray.hsl=function(i){return[0,0,i[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(i){return[0,100,i[0]]},r.gray.cmyk=function(i){return[0,0,0,i[0]]},r.gray.lab=function(i){return[i[0],0,0]},r.gray.hex=function(i){const s=Math.round(i[0]/100*255)&255,a=((s<<16)+(s<<8)+s).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},sE}var oE,FT;function NEe(){if(FT)return oE;FT=1;const t=JU();function e(){const s={},o=Object.keys(t);for(let a=o.length,c=0;c1&&(c=l),o(c))};return"conversion"in o&&(a.conversion=o.conversion),a}function s(o){const a=function(...c){const l=c[0];if(l==null)return l;l.length>1&&(c=l);const u=o(c);if(typeof u=="object")for(let f=u.length,d=0;d{r[o]={},Object.defineProperty(r[o],"channels",{value:t[o].channels}),Object.defineProperty(r[o],"labels",{value:t[o].labels});const a=e(o);Object.keys(a).forEach(l=>{const u=a[l];r[o][l]=s(u),r[o][l].raw=i(u)})}),aE=r,aE}ek.exports;(function(t){const e=(u,f)=>(...d)=>`\x1B[${u(...d)+f}m`,r=(u,f)=>(...d)=>{const h=u(...d);return`\x1B[${38+f};5;${h}m`},n=(u,f)=>(...d)=>{const h=u(...d);return`\x1B[${38+f};2;${h[0]};${h[1]};${h[2]}m`},i=u=>u,s=(u,f,d)=>[u,f,d],o=(u,f,d)=>{Object.defineProperty(u,f,{get:()=>{const h=d();return Object.defineProperty(u,f,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const c=(u,f,d,h)=>{a===void 0&&(a=DEe());const p=h?10:0,v={};for(const[b,y]of Object.entries(a)){const m=b==="ansi16"?"ansi":b;b===f?v[m]=u(d,p):typeof y=="object"&&(v[m]=u(y[f],p))}return v};function l(){const u=new Map,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};f.color.gray=f.color.blackBright,f.bgColor.bgGray=f.bgColor.bgBlackBright,f.color.grey=f.color.blackBright,f.bgColor.bgGrey=f.bgColor.bgBlackBright;for(const[d,h]of Object.entries(f)){for(const[p,v]of Object.entries(h))f[p]={open:`\x1B[${v[0]}m`,close:`\x1B[${v[1]}m`},h[p]=f[p],u.set(v[0],v[1]);Object.defineProperty(f,d,{value:h,enumerable:!1})}return Object.defineProperty(f,"codes",{value:u,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",o(f.color,"ansi",()=>c(e,"ansi16",i,!1)),o(f.color,"ansi256",()=>c(r,"ansi256",i,!1)),o(f.color,"ansi16m",()=>c(n,"rgb",s,!1)),o(f.bgColor,"ansi",()=>c(e,"ansi16",i,!0)),o(f.bgColor,"ansi256",()=>c(r,"ansi256",i,!0)),o(f.bgColor,"ansi16m",()=>c(n,"rgb",s,!0)),f}Object.defineProperty(t,"exports",{enumerable:!0,get:l})})(ek);var LEe=ek.exports,FEe={stdout:!1,stderr:!1};const BEe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const i=e.length;let s=0,o="";do o+=t.substr(s,n-s)+e+r,s=n+i,n=t.indexOf(e,s);while(n!==-1);return o+=t.substr(s),o},jEe=(t,e,r,n)=>{let i=0,s="";do{const o=t[n-1]==="\r";s+=t.substr(i,(o?n-1:n)-i)+e+(o?`\r `:` `)+r,i=n+1,n=t.indexOf(` -`,i)}while(n!==-1);return s+=t.substr(i),s};var OEe={stringReplaceAll:TEe,stringEncaseCRLFWithFirstIndex:IEe},cE,L9;function REe(){if(L9)return cE;L9=1;const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function s(l){const u=l[0]==="u",f=l[1]==="{";return u&&!f&&l.length===5||l[0]==="x"&&l.length===3?String.fromCharCode(parseInt(l.slice(1),16)):u&&f?String.fromCodePoint(parseInt(l.slice(2,-1),16)):i.get(l)||l}function o(l,u){const f=[],d=u.trim().split(/\s*,\s*/g);let h;for(const p of d){const v=Number(p);if(!Number.isNaN(v))f.push(v);else if(h=p.match(r))f.push(h[2].replace(n,(b,y,m)=>y?s(y):m));else throw new Error(`Invalid Chalk template style argument: ${p} (in style '${l}')`)}return f}function a(l){e.lastIndex=0;const u=[];let f;for(;(f=e.exec(l))!==null;){const d=f[1];if(f[2]){const h=o(d,f[2]);u.push([d].concat(h))}else u.push([d])}return u}function c(l,u){const f={};for(const h of u)for(const p of h.styles)f[p[0]]=h.inverse?null:p.slice(1);let d=l;for(const[h,p]of Object.entries(f))if(Array.isArray(p)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=p.length>0?d[h](...p):d[h]}return d}return cE=(l,u)=>{const f=[],d=[];let h=[];if(u.replace(t,(p,v,b,y,m,g)=>{if(v)h.push(s(v));else if(y){const S=h.join("");h=[],d.push(f.length===0?S:c(l,f)(S)),f.push({inverse:b,styles:a(y)})}else if(m){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(c(l,f)(h.join(""))),h=[],f.pop()}else h.push(g)}),d.push(h.join("")),f.length>0){const p=`Chalk template literal is missing ${f.length} closing bracket${f.length===1?"":"s"} (\`}\`)`;throw new Error(p)}return d.join("")},cE}const c1=_Ee,{stdout:P5,stderr:T5}=PEe,{stringReplaceAll:$Ee,stringEncaseCRLFWithFirstIndex:MEe}=OEe,{isArray:Fy}=Array,KU=["ansi","ansi","ansi256","ansi16m"],Pd=Object.create(null),NEe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=P5?P5.level:0;t.level=e.level===void 0?r:e.level};class DEe{constructor(e){return QU(e)}}const QU=t=>{const e={};return NEe(e,t),e.template=(...r)=>JU(e.template,...r),Object.setPrototypeOf(e,Vb.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=DEe,e.template};function Vb(t){return QU(t)}for(const[t,e]of Object.entries(c1))Pd[t]={get(){const r=Gb(this,tk(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Pd.visible={get(){const t=Gb(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const YU=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of YU)Pd[t]={get(){const{level:e}=this;return function(...r){const n=tk(c1.color[KU[e]][t](...r),c1.color.close,this._styler);return Gb(this,n,this._isEmpty)}}};for(const t of YU){const e="bg"+t[0].toUpperCase()+t.slice(1);Pd[e]={get(){const{level:r}=this;return function(...n){const i=tk(c1.bgColor[KU[r]][t](...n),c1.bgColor.close,this._styler);return Gb(this,i,this._isEmpty)}}}}const LEe=Object.defineProperties(()=>{},{...Pd,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),tk=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Gb=(t,e,r)=>{const n=(...i)=>Fy(i[0])&&Fy(i[0].raw)?B9(n,JU(n,...i)):B9(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,LEe),n._generator=t,n._styler=e,n._isEmpty=r,n},B9=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;const{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=$Ee(e,r.close,r.open),r=r.parent;const s=e.indexOf(` -`);return s!==-1&&(e=MEe(e,i,n,s)),n+e+i};let lE;const JU=(t,...e)=>{const[r]=e;if(!Fy(r)||!Fy(r.raw))return e.join(" ");const n=e.slice(1),i=[r.raw[0]];for(let s=1;s{uE.push(t)},registerClassName:t=>{j9.add(t)},registerComposition:t=>{U9.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=CEe({localClassNames:Array.from(j9),composedClassLists:U9,cssObjs:uE}).join(` -`);C2e({fileScope:t,css:e}),uE=[]},getIdentOption:()=>"short"};m2e(ZEe);function jy(t,e){return jy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jy(t,e)}function exe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jy(t,e)}function I5(){I5=function(i,s){return new r(i,void 0,s)};var t=RegExp.prototype,e=new WeakMap;function r(i,s,o){var a=new RegExp(i,s);return e.set(a,o||e.get(i)),jy(a,r.prototype)}function n(i,s){var o=e.get(s);return Object.keys(o).reduce(function(a,c){var l=o[c];if(typeof l=="number")a[c]=i[l];else{for(var u=0;i[l[u]]===void 0&&u+1]+)>/g,function(c,l){var u=o[l];return"$"+(Array.isArray(u)?u.join("$"):u)}))}if(typeof s=="function"){var a=this;return t[Symbol.replace].call(this,i,function(){var c=arguments;return typeof c[c.length-1]!="object"&&(c=[].slice.call(c)).push(n(c,a)),s.apply(this,c)})}return t[Symbol.replace].call(this,i,s)},I5.apply(this,arguments)}function txe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:i}=ao(),s=i.match(I5(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(s&&s.groups){var{dir:o,file:a}=s.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function z9(t){return t.match(/^[0-9]/)?"_".concat(t):t}function nk(t){var e=E2e(),{debugId:r,debugFileName:n=!0}=Zh(Zh({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),i=x2e().toString(36),{filePath:s,packageName:o}=ao(),a=VU(o?"".concat(o).concat(s):s),c="".concat(a).concat(i);if(e==="debug"){var l=txe({debugId:r,debugFileName:n});return l&&(c="".concat(l,"__").concat(c)),z9(c)}if(typeof e=="function"){if(c=e({hash:c,debugId:r,filePath:s,packageName:o}),!c.match(/^[A-Z_][0-9A-Z_]+$/i))throw new Error('Identifier function returned invalid indentifier: "'.concat(c,'"'));return c}return z9(c)}function rxe(t,e){var r=nk(e);FU(r,ao());var n=[],i=[];for(var s of t)typeof s=="string"?n.push(s):i.push(s);var o=r;if(n.length>0&&(o="".concat(r," ").concat(uEe(n)),g2e({identifier:r,classList:o},ao()),i.length>0&&jU(r)),i.length>0){var a=XEe.all(i,{arrayMerge:(c,l)=>l});qb({type:"local",selector:r,rule:a},ao())}return o}function ki(t,e){if(Array.isArray(t))return rxe(t,e);var r=nk(e);return FU(r,ao()),qb({type:"local",selector:r,rule:t},ao()),r}function Is(t,e){qb({type:"global",selector:t,rule:e},ao())}function ZU(t,e){var r=X8(nk(e),{isIdentifier:!0});return qb({type:"keyframes",name:r,rule:t},ao()),r}function Ec(){return Ec=Object.assign?Object.assign.bind():function(t){for(var e=1;e svg`,{width:"20px",height:"20px"});cu();const ixe=({onConnect:t,connectors:e})=>{const{theme:r}=M1(),{isLoading:n}=IB();return x.createElement(z,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(i=>{const s=r==="dark"?i._wallet.logoDark:i._wallet.logoLight,o=i._wallet.name;return x.createElement(z,{key:i.id,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:nxe,onClick:()=>t(i)},x.createElement(re,{variant:"medium",color:"text100"},o,n),x.createElement(z,{justifyContent:"center",alignItems:"center",style:{backgroundColor:i._wallet.iconBackground},borderRadius:"md",className:ez},x.createElement(s,null)))}))},sxe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrl:r}=e;return x.createElement(x.Fragment,null,r&&x.createElement(z,{marginTop:"5",justifyContent:"center",alignItems:"center"},x.createElement(mr,{src:r,style:{height:"110px"}})))};let yn=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t.ProjectAccessKey="@kit.projectAccessKey",t}({});const fE={showEmailInput:!0,walletAuthOptions:["metamask","wallet-connect"],socialAuthOptions:["google","facebook","twitch","apple"]},tz=60*60*24*7;function oxe(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}const axe=["createConnector"],rz=t=>{const e=[],r=t.find(i=>i.id==="injected");return t.filter(i=>!r||!r.hideConnectorId?!0:i.id!==r.hideConnectorId).forEach(i=>{const s=oxe(i,axe),o=i.createConnector(),a=Ec({},s),l=((u,f)=>{const d=u;return d._wallet=Ec({},f),d})(o,a);e.push(l)}),e},cxe=t=>/^\S+@\S+\.\S{2,}$/.test(t),R5={1:{name:"Ethereum",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",decimals:18,blockExplorerName:"Etherscan",blockExplorerUrl:"https://etherscan.io"},5:{name:"Goerli",symbol:"ETH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",blockExplorerName:"Etherscan (Goerli)",blockExplorerUrl:"https://goerli.etherscan.io"},10:{name:"Optimism",symbol:"OP",logoURI:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",decimals:18,blockExplorerName:"Etherscan (Optimism)",blockExplorerUrl:"https://optimistic.etherscan.io"},56:{name:"BNB",symbol:"BNB",logoURI:"https://assets.coingecko.com/coins/images/825/thumb/bnb-icon2_2x.png",decimals:18,blockExplorerName:"BscScan",blockExplorerUrl:"https://bscscan.com"},100:{name:"Gnosis",symbol:"GNO",logoURI:"https://assets.coingecko.com/coins/images/662/small/logo_square_simple_300px.png",decimals:18,blockExplorerUrl:"https://gnosisscan.io",blockExplorerName:"Gnosis Scan"},137:{name:"Polygon",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan",blockExplorerUrl:"https://polygonscan.com"},1101:{name:"Polygon zkEVM",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"PolygonScan",blockExplorerUrl:"https://zkevm.polygonscan.com"},42161:{name:"Arbitrum",symbol:"ARB",logoURI:"https://assets.coingecko.com/asset_platforms/images/33/small/arbitrum-one.png",decimals:18,blockExplorerName:"Arbiscan",blockExplorerUrl:"https://arbiscan.io"},43114:{name:"Avalanche",symbol:"AVAX",logoURI:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",decimals:18,blockExplorerName:"Snowtrace",blockExplorerUrl:"https://snowtrace.io"},80001:{name:"Mumbai",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan (Mumbai)",blockExplorerUrl:"https://mumbai.polygonscan.com"}},lxe=(t,e)=>{const r=e.find(s=>s.id===t);if(r){var n,i;return{name:r.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:R5[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(i=r.blockExplorers)==null?void 0:i.default.url}}},_r=(t,e)=>R5[t]||lxe(t,e)||R5[1],lu=()=>{const t=x.createContext(void 0);return[()=>{const r=x.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},sk=t=>{switch(t){case"top-right":return{top:"0px",right:"0px"};case"top-left":return{top:"0px",left:"0px"};case"top-center":return{top:"0px"};case"bottom-right":return{bottom:"0px",right:"0px"};case"bottom-left":return{bottom:"0px",left:"0px"};case"bottom-center":return{bottom:"0px"};case"middle-right":return{right:"0px"};case"middle-left":return{left:"0px"};case"center":default:return{}}},uxe=(t,e="light")=>{switch(t){case 1:return"#abf";case 137:return"#c7a6ff";case 42161:return"#52A7E6";case 10:return"#DB3132";case 56:return e==="light"?"#CB9C1D":"#EEB445";case 43114:return"#E84142";case 100:return e==="light"?"#00193C":"#D8E8FF";case 5:return e==="light"?"#A77A00":"#FFA700";case 80001:return e==="light"?"#D68828":"#FFA700";default:return"#abf"}},fxe=(t,e="light")=>{switch(t){case 1:return"#132362";case 137:return"#350881";case 42161:return e==="light"?"#EDF7FF":"#0C3754";case 10:return e==="light"?"#FFEAE9":"#390B0C";case 56:return e==="light"?"#FFE8AB":"#554018";case 43114:return e==="light"?"#FBDFDF":"#390B0C";case 100:return e==="light"?"#D8E8FF":"#00193C";case 5:return e==="light"?"#FFD871":"#554018";case 80001:return e==="light"?"#FFE8CD":"#554018";default:return"#132362"}};function dxe(t){var e;const{account:r,chain:n,transport:i}=t,s={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return new U$(i,s).getSigner(r.address)}function hxe(t){var e;const{chain:r,transport:n}=t,i={chainId:r.id,name:r.name,ensAddress:(e=r.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return n.type==="fallback"?new EJ(n.transports.map(({value:s})=>new Go(s==null?void 0:s.url,i))):new Go(n.url,i)}const pxe=async t=>{const e=localStorage.getItem(yn.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(yn.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),i=t.account.address,s=new Cb;s.address=i,s.claims.app=n.app||"app",s.claims.ogn=n.origin,s.claims.n=n.nonce,s.setExpiryIn(n.expiry?Math.max(n.expiry,200):tz);const o=s.messageTypedData();o.domain.verifyingContract;const c=await dxe(t)._signTypedData(o.domain,o.types,o.message);s.signature=c;const u=await new t1().encodeProof(s,!0);return{typedData:o,proofString:u}},vxe=async(t,e,r)=>{const n=t.account.address,s=await new t1().decodeProof(r.proofString,!0),o=hxe(e);return await eU.utils.isValidTypedDataSignature(n,r.typedData,s.signature,o)},cn=t=>{const e=Jt[t];if(!e)throw"invalid network";const r=localStorage.getItem(yn.ProjectAccessKey)||void 0,n=new S8("https://metadata.sequence.app",r),i=new C8(t8(e.name),r),s=new Uh("https://api.sequence.app",r);return{network:e,metadataClient:n,indexerClient:i,apiClient:s}},mxe=t=>{const{isConnected:e}=Sn(),{theme:r}=M1(),{config:n={}}=t,{signIn:i={}}=n,{showEmailInput:s=fE.showEmailInput,socialAuthOptions:o=fE.socialAuthOptions,walletAuthOptions:a=fE.walletAuthOptions}=i,{openConnectModal:c,setOpenConnectModal:l}=t,[u,f]=C.useState(""),{connectors:d,connect:h,isLoading:p}=IB(),v=d,[b,y]=C.useState(!1),m=v.find(j=>j.id==="mock"),g=v.find(j=>j._wallet.id==="email"),S=v.filter(j=>!!a.find(G=>G===j._wallet.id)),P=v.filter(j=>!!o.find(G=>G===j._wallet.id)),T=S.length>4,w=j=>{f(j.target.value)};C.useEffect(()=>{e&&c&&l(!1)},[e,c]);const I=j=>{if(i.useMock&&m){h({connector:m});return}if(j._wallet.id==="email"){const H=prompt("Auto-email login, please specify the email address:");localStorage.setItem(S5,H||"")}h({connector:j})},F=j=>{if(i.useMock&&m){h({connector:m});return}j.preventDefault(),localStorage.setItem(S5,u),h({connector:g})};return b?x.createElement(x.Fragment,null,x.createElement(z,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>y(!1),className:yh},x.createElement(Lg,null)),x.createElement(ixe,{connectors:S,onConnect:I})):x.createElement(x.Fragment,null,x.createElement(sxe,{config:n}),x.createElement(z,{marginTop:"5"},g&&s&&x.createElement(x.Fragment,null,x.createElement("form",{onSubmit:F},x.createElement($c,{onChange:w,value:u,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),x.createElement(tt,{type:"submit",disabled:!cxe(u),marginTop:"4",width:"full",label:"Continue",rightIcon:oo}))),P.length>0&&x.createElement(x.Fragment,null,g&&s&&x.createElement(x.Fragment,null,x.createElement(z,{style:{marginBottom:"-4px"}},x.createElement(R0,{color:"backgroundSecondary"})),x.createElement(z,{justifyContent:"center",alignItems:"center"},x.createElement(re,{variant:"small",color:"text50"},"or sign in via"))),x.createElement(z,{marginTop:"3",gap:"3",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},P.slice(0,6).map(j=>{const H=r==="dark"?j._wallet.logoDark:j._wallet.logoLight;return x.createElement(ws,{key:j._wallet.id,className:yh,justifyContent:"center",alignItems:"center",onClick:()=>I(j),style:{height:"110px",width:`calc(50% - ${ve.space[2]})`}},x.createElement(z,{className:O5,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},x.createElement(H,null),x.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},j._wallet.name)))}))),S.length>0&&x.createElement(x.Fragment,null,(g&&s||P.length>0)&&x.createElement(x.Fragment,null,x.createElement(z,{style:{marginBottom:"-4px"}},x.createElement(R0,{color:"backgroundSecondary"})),x.createElement(z,{justifyContent:"center",alignItems:"center"},x.createElement(re,{variant:"small",color:"text50"},"or select a wallet"))),x.createElement(z,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"center",alignItems:"center"},S.map(j=>{const H=r==="dark"?j._wallet.logoDark||j._wallet.logoDark:j._wallet.logoLight||j._wallet.logoLight;return x.createElement(ws,{key:j._wallet.id,className:yh,justifyContent:"center",alignItems:"center",onClick:()=>I(j),style:{height:"110px",width:`calc(50% - ${ve.space[2]})`}},x.createElement(z,{className:O5,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},x.createElement(H,null),x.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},j._wallet.name)))})),T&&x.createElement(z,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:yh,onClick:()=>y(!0)},x.createElement(re,{variant:"medium"},"More options"),x.createElement(oo,null)))))};function yxe(t){if(t==null)throw new TypeError("Cannot destructure "+t)}const gxe=t=>{let e=Ec({},(yxe(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",Ec({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),x.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},x.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},x.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),x.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),x.createElement("defs",{id:"defs1314"},x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},x.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),x.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},x.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),x.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},x.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),x.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},x.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},x.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),x.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},x.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),x.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},x.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},x.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},x.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},x.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),x.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),x.createElement("clipPath",{id:"clip0_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),x.createElement("clipPath",{id:"clip1_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},[bxe,wxe]=lu(),[Exe,xxe]=lu(),[Cxe,Sxe]=lu(),nz={dark:"dark",light:"light"},kxe=t=>{const{config:e={},children:r}=t,{projectAccessKey:n,defaultTheme:i="dark",signIn:s={},position:o="center",displayedAssets:a=[],ethAuth:c={}}=e,l=s.projectName||"app",{expiry:u=tz,app:f=l,origin:d=location.origin,nonce:h}=c,{projectName:p}=s,[v,b]=C.useState(!1),[y,m]=C.useState(i||nz.dark),[g,S]=C.useState(o),[P,T]=C.useState(a),w=()=>{window.open("https://sequence.xyz")};return C.useEffect(()=>{n?localStorage.setItem(yn.ProjectAccessKey,n):localStorage.removeItem(yn.ProjectAccessKey)},[n]),C.useEffect(()=>{y!==i&&m(i)},[i]),C.useEffect(()=>{g!==o&&S(o)},[o]),C.useEffect(()=>{localStorage.setItem(yn.Theme,y),localStorage.setItem(yn.EthAuthSettings,JSON.stringify({expiry:u,app:f,origin:d,nonce:h}))},[y,c]),C.useEffect(()=>{T(P)},[a]),x.createElement(xxe,{value:{theme:y,setTheme:m,position:g,setPosition:S}},x.createElement(wxe,{value:{setOpenConnectModal:b,openConnectModalState:v}},x.createElement(Sxe,{value:{setDisplayedAssets:T,displayedAssets:P}},x.createElement("div",{id:"kit-provider"},x.createElement(Gg,{root:"#kit-provider",scope:"kit",theme:y},x.createElement(Mg,null,v&&x.createElement(rS,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:Ec({maxWidth:"364px"},sk(o))},onClose:()=>b(!1)},x.createElement(z,{padding:"4",className:ik},x.createElement(z,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},x.createElement(re,null,"Sign in ",p?`to ${p}`:"")),x.createElement(mxe,Ec({openConnectModal:v,setOpenConnectModal:b},t)),x.createElement(z,{onClick:w,className:yh,gap:"1",marginTop:"2",flexDirection:"row",alignItems:"center",justifyContent:"center"},x.createElement(re,{fontSize:"small",color:"text100"},"Powered by Sequence"),x.createElement(z,{height:"5",width:"5"},x.createElement(gxe,null)))))))),r)))},Axe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=bxe();return{setOpenConnectModal:t,openConnectModalState:e}},np=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=Exe();return{setTheme:t,theme:e,position:r,setPosition:n}},_xe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=Cxe();return{displayedAssets:e,setDisplayedAssets:t}};function Pxe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var iz=Pxe;function Txe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=RCe}var hz=$Ce,MCe=Kb,NCe=hz,DCe=Qb,LCe="[object Arguments]",BCe="[object Array]",FCe="[object Boolean]",jCe="[object Date]",UCe="[object Error]",zCe="[object Function]",WCe="[object Map]",HCe="[object Number]",qCe="[object Object]",VCe="[object RegExp]",GCe="[object Set]",KCe="[object String]",QCe="[object WeakMap]",YCe="[object ArrayBuffer]",JCe="[object DataView]",XCe="[object Float32Array]",ZCe="[object Float64Array]",e5e="[object Int8Array]",t5e="[object Int16Array]",r5e="[object Int32Array]",n5e="[object Uint8Array]",i5e="[object Uint8ClampedArray]",s5e="[object Uint16Array]",o5e="[object Uint32Array]",Ft={};Ft[XCe]=Ft[ZCe]=Ft[e5e]=Ft[t5e]=Ft[r5e]=Ft[n5e]=Ft[i5e]=Ft[s5e]=Ft[o5e]=!0;Ft[LCe]=Ft[BCe]=Ft[YCe]=Ft[FCe]=Ft[JCe]=Ft[jCe]=Ft[UCe]=Ft[zCe]=Ft[WCe]=Ft[HCe]=Ft[qCe]=Ft[VCe]=Ft[GCe]=Ft[KCe]=Ft[QCe]=!1;function a5e(t){return DCe(t)&&NCe(t.length)&&!!Ft[MCe(t)]}var c5e=a5e;function l5e(t){return function(e){return t(e)}}var u5e=l5e,zy={exports:{}};zy.exports;(function(t,e){var r=oz,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(zy,zy.exports);var f5e=zy.exports,d5e=c5e,h5e=u5e,G9=f5e,K9=G9&&G9.isTypedArray,p5e=K9?h5e(K9):d5e,v5e=p5e,m5e=Kxe,y5e=SCe,g5e=fz,b5e=PCe,w5e=dz,E5e=v5e,x5e=Object.prototype,C5e=x5e.hasOwnProperty;function S5e(t,e){var r=g5e(t),n=!r&&y5e(t),i=!r&&!n&&b5e(t),s=!r&&!n&&!i&&E5e(t),o=r||n||i||s,a=o?m5e(t.length,String):[],c=a.length;for(var l in t)(e||C5e.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||w5e(l,c)))&&a.push(l);return a}var k5e=S5e,A5e=Object.prototype;function _5e(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||A5e;return t===r}var P5e=_5e;function T5e(t,e){return function(r){return t(e(r))}}var I5e=T5e,O5e=I5e,R5e=O5e(Object.keys,Object),$5e=R5e,M5e=P5e,N5e=$5e,D5e=Object.prototype,L5e=D5e.hasOwnProperty;function B5e(t){if(!M5e(t))return N5e(t);var e=[];for(var r in Object(t))L5e.call(t,r)&&r!="constructor"&&e.push(r);return e}var F5e=B5e;function j5e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ok=j5e,U5e=Kb,z5e=ok,W5e="[object AsyncFunction]",H5e="[object Function]",q5e="[object GeneratorFunction]",V5e="[object Proxy]";function G5e(t){if(!z5e(t))return!1;var e=U5e(t);return e==H5e||e==q5e||e==W5e||e==V5e}var K5e=G5e,Q5e=K5e,Y5e=hz;function J5e(t){return t!=null&&Y5e(t.length)&&!Q5e(t)}var pz=J5e,X5e=k5e,Z5e=F5e,e6e=pz;function t6e(t){return e6e(t)?X5e(t):Z5e(t)}var r6e=t6e,n6e=Vxe,i6e=r6e;function s6e(t){return t==null?[]:n6e(t,i6e(t))}var o6e=s6e,a6e=iz,c6e=sz,l6e=o6e;function u6e(t,e){var r=l6e(t);return c6e(r,a6e(e,0,r.length))}var f6e=u6e;function d6e(t,e){return t===e||t!==t&&e!==e}var h6e=d6e,p6e=h6e,v6e=pz,m6e=dz,y6e=ok;function g6e(t,e,r){if(!y6e(r))return!1;var n=typeof e;return(n=="number"?v6e(r)&&m6e(e,r.length):n=="string"&&e in r)?p6e(r[e],t):!1}var b6e=g6e,w6e=/\s/;function E6e(t){for(var e=t.length;e--&&w6e.test(t.charAt(e)););return e}var x6e=E6e,C6e=x6e,S6e=/^\s+/;function k6e(t){return t&&t.slice(0,C6e(t)+1).replace(S6e,"")}var A6e=k6e,_6e=Kb,P6e=Qb,T6e="[object Symbol]";function I6e(t){return typeof t=="symbol"||P6e(t)&&_6e(t)==T6e}var O6e=I6e,R6e=A6e,Q9=ok,$6e=O6e,Y9=0/0,M6e=/^[-+]0x[0-9a-f]+$/i,N6e=/^0b[01]+$/i,D6e=/^0o[0-7]+$/i,L6e=parseInt;function B6e(t){if(typeof t=="number")return t;if($6e(t))return Y9;if(Q9(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Q9(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=R6e(t);var r=N6e.test(t);return r||D6e.test(t)?L6e(t.slice(2),r?2:8):M6e.test(t)?Y9:+t}var F6e=B6e,j6e=F6e,J9=1/0,U6e=17976931348623157e292;function z6e(t){if(!t)return t===0?t:0;if(t=j6e(t),t===J9||t===-J9){var e=t<0?-1:1;return e*U6e}return t===t?t:0}var W6e=z6e,H6e=W6e;function q6e(t){var e=H6e(t),r=e%1;return e===e?r?e-r:e:0}var V6e=q6e,G6e=Uxe,K6e=f6e,Q6e=fz,Y6e=b6e,J6e=V6e;function X6e(t,e,r){(r?Y6e(t,e,r):e===void 0)?e=1:e=J6e(e);var n=Q6e(t)?G6e:K6e;return n(t,e)}var Z6e=X6e;const e3e=Gi(Z6e);var Yb={},t3e=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=X9[e.format]||X9.default;window.clipboardData.setData(f,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),n=i3e("message"in e?e.message:n3e),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),i()}return c}var o3e=s3e;function $5(t){"@babel/helpers - typeof";return $5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$5(t)}Object.defineProperty(Yb,"__esModule",{value:!0});Yb.CopyToClipboard=void 0;var nv=vz(C),a3e=vz(o3e),c3e=["text","onCopy","options","children"];function vz(t){return t&&t.__esModule?t:{default:t}}function Z9(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function eI(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function u3e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}function f3e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tI(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wy(t){return Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Wy(t)}function ak(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yz=function(t){h3e(r,t);var e=p3e(r);function r(){var n;f3e(this,r);for(var i=arguments.length,s=new Array(i),o=0;oe in t?g3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u1=(t,e)=>{for(var r in e||(e={}))bz.call(e,r)&&rI(t,r,e[r]);if(Hy)for(var r of Hy(e))wz.call(e,r)&&rI(t,r,e[r]);return t},ck=(t,e)=>{var r={};for(var n in t)bz.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Hy)for(var n of Hy(t))e.indexOf(n)<0&&wz.call(t,n)&&(r[n]=t[n]);return r};/** +`,i)}while(n!==-1);return s+=t.substr(i),s};var UEe={stringReplaceAll:BEe,stringEncaseCRLFWithFirstIndex:jEe},cE,jT;function zEe(){if(jT)return cE;jT=1;const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,e=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function s(l){const u=l[0]==="u",f=l[1]==="{";return u&&!f&&l.length===5||l[0]==="x"&&l.length===3?String.fromCharCode(parseInt(l.slice(1),16)):u&&f?String.fromCodePoint(parseInt(l.slice(2,-1),16)):i.get(l)||l}function o(l,u){const f=[],d=u.trim().split(/\s*,\s*/g);let h;for(const p of d){const v=Number(p);if(!Number.isNaN(v))f.push(v);else if(h=p.match(r))f.push(h[2].replace(n,(b,y,m)=>y?s(y):m));else throw new Error(`Invalid Chalk template style argument: ${p} (in style '${l}')`)}return f}function a(l){e.lastIndex=0;const u=[];let f;for(;(f=e.exec(l))!==null;){const d=f[1];if(f[2]){const h=o(d,f[2]);u.push([d].concat(h))}else u.push([d])}return u}function c(l,u){const f={};for(const h of u)for(const p of h.styles)f[p[0]]=h.inverse?null:p.slice(1);let d=l;for(const[h,p]of Object.entries(f))if(Array.isArray(p)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=p.length>0?d[h](...p):d[h]}return d}return cE=(l,u)=>{const f=[],d=[];let h=[];if(u.replace(t,(p,v,b,y,m,g)=>{if(v)h.push(s(v));else if(y){const S=h.join("");h=[],d.push(f.length===0?S:c(l,f)(S)),f.push({inverse:b,styles:a(y)})}else if(m){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(c(l,f)(h.join(""))),h=[],f.pop()}else h.push(g)}),d.push(h.join("")),f.length>0){const p=`Chalk template literal is missing ${f.length} closing bracket${f.length===1?"":"s"} (\`}\`)`;throw new Error(p)}return d.join("")},cE}const c1=LEe,{stdout:_5,stderr:P5}=FEe,{stringReplaceAll:WEe,stringEncaseCRLFWithFirstIndex:HEe}=UEe,{isArray:By}=Array,XU=["ansi","ansi","ansi256","ansi16m"],Pd=Object.create(null),qEe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=_5?_5.level:0;t.level=e.level===void 0?r:e.level};class VEe{constructor(e){return ZU(e)}}const ZU=t=>{const e={};return qEe(e,t),e.template=(...r)=>tz(e.template,...r),Object.setPrototypeOf(e,Vb.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=VEe,e.template};function Vb(t){return ZU(t)}for(const[t,e]of Object.entries(c1))Pd[t]={get(){const r=Gb(this,tk(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Pd.visible={get(){const t=Gb(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const ez=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of ez)Pd[t]={get(){const{level:e}=this;return function(...r){const n=tk(c1.color[XU[e]][t](...r),c1.color.close,this._styler);return Gb(this,n,this._isEmpty)}}};for(const t of ez){const e="bg"+t[0].toUpperCase()+t.slice(1);Pd[e]={get(){const{level:r}=this;return function(...n){const i=tk(c1.bgColor[XU[r]][t](...n),c1.bgColor.close,this._styler);return Gb(this,i,this._isEmpty)}}}}const GEe=Object.defineProperties(()=>{},{...Pd,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),tk=(t,e,r)=>{let n,i;return r===void 0?(n=t,i=e):(n=r.openAll+t,i=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:i,parent:r}},Gb=(t,e,r)=>{const n=(...i)=>By(i[0])&&By(i[0].raw)?UT(n,tz(n,...i)):UT(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,GEe),n._generator=t,n._styler=e,n._isEmpty=r,n},UT=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;const{openAll:n,closeAll:i}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=WEe(e,r.close,r.open),r=r.parent;const s=e.indexOf(` +`);return s!==-1&&(e=HEe(e,i,n,s)),n+e+i};let lE;const tz=(t,...e)=>{const[r]=e;if(!By(r)||!By(r.raw))return e.join(" ");const n=e.slice(1),i=[r.raw[0]];for(let s=1;s{uE.push(t)},registerClassName:t=>{WT.add(t)},registerComposition:t=>{HT.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=$Ee({localClassNames:Array.from(WT),composedClassLists:HT,cssObjs:uE}).join(` +`);M2e({fileScope:t,css:e}),uE=[]},getIdentOption:()=>"short"};_2e(lxe);function jy(t,e){return jy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},jy(t,e)}function uxe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jy(t,e)}function T5(){T5=function(i,s){return new r(i,void 0,s)};var t=RegExp.prototype,e=new WeakMap;function r(i,s,o){var a=new RegExp(i,s);return e.set(a,o||e.get(i)),jy(a,r.prototype)}function n(i,s){var o=e.get(s);return Object.keys(o).reduce(function(a,c){var l=o[c];if(typeof l=="number")a[c]=i[l];else{for(var u=0;i[l[u]]===void 0&&u+1]+)>/g,function(c,l){var u=o[l];return"$"+(Array.isArray(u)?u.join("$"):u)}))}if(typeof s=="function"){var a=this;return t[Symbol.replace].call(this,i,function(){var c=arguments;return typeof c[c.length-1]!="object"&&(c=[].slice.call(c)).push(n(c,a)),s.apply(this,c)})}return t[Symbol.replace].call(this,i,s)},T5.apply(this,arguments)}function fxe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:i}=ao(),s=i.match(T5(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(s&&s.groups){var{dir:o,file:a}=s.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function qT(t){return t.match(/^[0-9]/)?"_".concat(t):t}function nk(t){var e=R2e(),{debugId:r,debugFileName:n=!0}=Zh(Zh({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),i=$2e().toString(36),{filePath:s,packageName:o}=ao(),a=YU(o?"".concat(o).concat(s):s),c="".concat(a).concat(i);if(e==="debug"){var l=fxe({debugId:r,debugFileName:n});return l&&(c="".concat(l,"__").concat(c)),qT(c)}if(typeof e=="function"){if(c=e({hash:c,debugId:r,filePath:s,packageName:o}),!c.match(/^[A-Z_][0-9A-Z_]+$/i))throw new Error('Identifier function returned invalid indentifier: "'.concat(c,'"'));return c}return qT(c)}function dxe(t,e){var r=nk(e);HU(r,ao());var n=[],i=[];for(var s of t)typeof s=="string"?n.push(s):i.push(s);var o=r;if(n.length>0&&(o="".concat(r," ").concat(wEe(n)),T2e({identifier:r,classList:o},ao()),i.length>0&&qU(r)),i.length>0){var a=cxe.all(i,{arrayMerge:(c,l)=>l});qb({type:"local",selector:r,rule:a},ao())}return o}function ki(t,e){if(Array.isArray(t))return dxe(t,e);var r=nk(e);return HU(r,ao()),qb({type:"local",selector:r,rule:t},ao()),r}function Is(t,e){qb({type:"global",selector:t,rule:e},ao())}function nz(t,e){var r=X8(nk(e),{isIdentifier:!0});return qb({type:"keyframes",name:r,rule:t},ao()),r}function Ec(){return Ec=Object.assign?Object.assign.bind():function(t){for(var e=1;e svg`,{width:"20px",height:"20px"});cu();const pxe=({onConnect:t,connectors:e})=>{const{theme:r}=M1(),{isLoading:n}=NF();return x.createElement(z,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(i=>{const s=r==="dark"?i._wallet.logoDark:i._wallet.logoLight,o=i._wallet.name;return x.createElement(z,{key:i.id,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:hxe,onClick:()=>t(i)},x.createElement(re,{variant:"medium",color:"text100"},o,n),x.createElement(z,{justifyContent:"center",alignItems:"center",style:{backgroundColor:i._wallet.iconBackground},borderRadius:"md",className:iz},x.createElement(s,null)))}))},vxe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrl:r}=e;return x.createElement(x.Fragment,null,r&&x.createElement(z,{marginTop:"5",justifyContent:"center",alignItems:"center"},x.createElement(mr,{src:r,style:{height:"110px"}})))};let yn=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t.ProjectAccessKey="@kit.projectAccessKey",t}({});const fE={showEmailInput:!0,walletAuthOptions:["metamask","wallet-connect"],socialAuthOptions:["google","facebook","twitch","apple"]},sz=60*60*24*7;function mxe(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}const yxe=["createConnector"],oz=t=>{const e=[],r=t.find(i=>i.id==="injected");return t.filter(i=>!r||!r.hideConnectorId?!0:i.id!==r.hideConnectorId).forEach(i=>{const s=mxe(i,yxe),o=i.createConnector(),a=Ec({},s),l=((u,f)=>{const d=u;return d._wallet=Ec({},f),d})(o,a);e.push(l)}),e},gxe=t=>/^\S+@\S+\.\S{2,}$/.test(t),O5={1:{name:"Ethereum",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",decimals:18,blockExplorerName:"Etherscan",blockExplorerUrl:"https://etherscan.io"},5:{name:"Goerli",symbol:"ETH",decimals:18,logoURI:"https://assets.coingecko.com/coins/images/279/thumb/ethereum.png",blockExplorerName:"Etherscan (Goerli)",blockExplorerUrl:"https://goerli.etherscan.io"},10:{name:"Optimism",symbol:"OP",logoURI:"https://assets.coingecko.com/coins/images/25244/small/Optimism.png",decimals:18,blockExplorerName:"Etherscan (Optimism)",blockExplorerUrl:"https://optimistic.etherscan.io"},56:{name:"BNB",symbol:"BNB",logoURI:"https://assets.coingecko.com/coins/images/825/thumb/bnb-icon2_2x.png",decimals:18,blockExplorerName:"BscScan",blockExplorerUrl:"https://bscscan.com"},100:{name:"Gnosis",symbol:"GNO",logoURI:"https://assets.coingecko.com/coins/images/662/small/logo_square_simple_300px.png",decimals:18,blockExplorerUrl:"https://gnosisscan.io",blockExplorerName:"Gnosis Scan"},137:{name:"Polygon",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan",blockExplorerUrl:"https://polygonscan.com"},1101:{name:"Polygon zkEVM",symbol:"ETH",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"PolygonScan",blockExplorerUrl:"https://zkevm.polygonscan.com"},42161:{name:"Arbitrum",symbol:"ARB",logoURI:"https://assets.coingecko.com/asset_platforms/images/33/small/arbitrum-one.png",decimals:18,blockExplorerName:"Arbiscan",blockExplorerUrl:"https://arbiscan.io"},43114:{name:"Avalanche",symbol:"AVAX",logoURI:"https://assets.coingecko.com/coins/images/12559/small/Avalanche_Circle_RedWhite_Trans.png",decimals:18,blockExplorerName:"Snowtrace",blockExplorerUrl:"https://snowtrace.io"},80001:{name:"Mumbai",symbol:"MATIC",logoURI:"https://assets.coingecko.com/coins/images/4713/thumb/matic-token-icon.png",decimals:18,blockExplorerName:"Polyscan (Mumbai)",blockExplorerUrl:"https://mumbai.polygonscan.com"}},bxe=(t,e)=>{const r=e.find(s=>s.id===t);if(r){var n,i;return{name:r.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:O5[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(i=r.blockExplorers)==null?void 0:i.default.url}}},_r=(t,e)=>O5[t]||bxe(t,e)||O5[1],lu=()=>{const t=x.createContext(void 0);return[()=>{const r=x.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},sk=t=>{switch(t){case"top-right":return{top:"0px",right:"0px"};case"top-left":return{top:"0px",left:"0px"};case"top-center":return{top:"0px"};case"bottom-right":return{bottom:"0px",right:"0px"};case"bottom-left":return{bottom:"0px",left:"0px"};case"bottom-center":return{bottom:"0px"};case"middle-right":return{right:"0px"};case"middle-left":return{left:"0px"};case"center":default:return{}}},wxe=(t,e="light")=>{switch(t){case 1:return"#abf";case 137:return"#c7a6ff";case 42161:return"#52A7E6";case 10:return"#DB3132";case 56:return e==="light"?"#CB9C1D":"#EEB445";case 43114:return"#E84142";case 100:return e==="light"?"#00193C":"#D8E8FF";case 5:return e==="light"?"#A77A00":"#FFA700";case 80001:return e==="light"?"#D68828":"#FFA700";default:return"#abf"}},Exe=(t,e="light")=>{switch(t){case 1:return"#132362";case 137:return"#350881";case 42161:return e==="light"?"#EDF7FF":"#0C3754";case 10:return e==="light"?"#FFEAE9":"#390B0C";case 56:return e==="light"?"#FFE8AB":"#554018";case 43114:return e==="light"?"#FBDFDF":"#390B0C";case 100:return e==="light"?"#D8E8FF":"#00193C";case 5:return e==="light"?"#FFD871":"#554018";case 80001:return e==="light"?"#FFE8CD":"#554018";default:return"#132362"}};function xxe(t){var e;const{account:r,chain:n,transport:i}=t,s={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return new H$(i,s).getSigner(r.address)}function Cxe(t){var e;const{chain:r,transport:n}=t,i={chainId:r.id,name:r.name,ensAddress:(e=r.contracts)==null||(e=e.ensRegistry)==null?void 0:e.address};return n.type==="fallback"?new kJ(n.transports.map(({value:s})=>new Go(s==null?void 0:s.url,i))):new Go(n.url,i)}const Sxe=async t=>{const e=localStorage.getItem(yn.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(yn.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),i=t.account.address,s=new Cb;s.address=i,s.claims.app=n.app||"app",s.claims.ogn=n.origin,s.claims.n=n.nonce,s.setExpiryIn(n.expiry?Math.max(n.expiry,200):sz);const o=s.messageTypedData();o.domain.verifyingContract;const c=await xxe(t)._signTypedData(o.domain,o.types,o.message);s.signature=c;const u=await new t1().encodeProof(s,!0);return{typedData:o,proofString:u}},kxe=async(t,e,r)=>{const n=t.account.address,s=await new t1().decodeProof(r.proofString,!0),o=Cxe(e);return await sU.utils.isValidTypedDataSignature(n,r.typedData,s.signature,o)},cn=t=>{const e=Xt[t];if(!e)throw"invalid network";const r=localStorage.getItem(yn.ProjectAccessKey)||void 0,n=new S8("https://metadata.sequence.app",r),i=new C8(t8(e.name),r),s=new Uh("https://api.sequence.app",r);return{network:e,metadataClient:n,indexerClient:i,apiClient:s}},Axe=t=>{const{isConnected:e}=Sn(),{theme:r}=M1(),{config:n={}}=t,{signIn:i={}}=n,{showEmailInput:s=fE.showEmailInput,socialAuthOptions:o=fE.socialAuthOptions,walletAuthOptions:a=fE.walletAuthOptions}=i,{openConnectModal:c,setOpenConnectModal:l}=t,[u,f]=C.useState(""),{connectors:d,connect:h,isLoading:p}=NF(),v=d,[b,y]=C.useState(!1),m=v.find(j=>j.id==="mock"),g=v.find(j=>j._wallet.id==="email"),S=v.filter(j=>!!a.find(G=>G===j._wallet.id)),P=v.filter(j=>!!o.find(G=>G===j._wallet.id)),T=S.length>4,w=j=>{f(j.target.value)};C.useEffect(()=>{e&&c&&l(!1)},[e,c]);const I=j=>{if(i.useMock&&m){h({connector:m});return}if(j._wallet.id==="email"){const H=prompt("Auto-email login, please specify the email address:");localStorage.setItem(C5,H||"")}h({connector:j})},B=j=>{if(i.useMock&&m){h({connector:m});return}j.preventDefault(),localStorage.setItem(C5,u),h({connector:g})};return b?x.createElement(x.Fragment,null,x.createElement(z,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>y(!1),className:yh},x.createElement(Lg,null)),x.createElement(pxe,{connectors:S,onConnect:I})):x.createElement(x.Fragment,null,x.createElement(vxe,{config:n}),x.createElement(z,{marginTop:"5"},g&&s&&x.createElement(x.Fragment,null,x.createElement("form",{onSubmit:B},x.createElement($c,{onChange:w,value:u,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),x.createElement(tt,{type:"submit",disabled:!gxe(u),marginTop:"4",width:"full",label:"Continue",rightIcon:oo}))),P.length>0&&x.createElement(x.Fragment,null,g&&s&&x.createElement(x.Fragment,null,x.createElement(z,{style:{marginBottom:"-4px"}},x.createElement(R0,{color:"backgroundSecondary"})),x.createElement(z,{justifyContent:"center",alignItems:"center"},x.createElement(re,{variant:"small",color:"text50"},"or sign in via"))),x.createElement(z,{marginTop:"3",gap:"3",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},P.slice(0,6).map(j=>{const H=r==="dark"?j._wallet.logoDark:j._wallet.logoLight;return x.createElement(bs,{key:j._wallet.id,className:yh,justifyContent:"center",alignItems:"center",onClick:()=>I(j),style:{height:"110px",width:`calc(50% - ${ve.space[2]})`}},x.createElement(z,{className:I5,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},x.createElement(H,null),x.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},j._wallet.name)))}))),S.length>0&&x.createElement(x.Fragment,null,(g&&s||P.length>0)&&x.createElement(x.Fragment,null,x.createElement(z,{style:{marginBottom:"-4px"}},x.createElement(R0,{color:"backgroundSecondary"})),x.createElement(z,{justifyContent:"center",alignItems:"center"},x.createElement(re,{variant:"small",color:"text50"},"or select a wallet"))),x.createElement(z,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"center",alignItems:"center"},S.map(j=>{const H=r==="dark"?j._wallet.logoDark||j._wallet.logoDark:j._wallet.logoLight||j._wallet.logoLight;return x.createElement(bs,{key:j._wallet.id,className:yh,justifyContent:"center",alignItems:"center",onClick:()=>I(j),style:{height:"110px",width:`calc(50% - ${ve.space[2]})`}},x.createElement(z,{className:I5,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},x.createElement(H,null),x.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},j._wallet.name)))})),T&&x.createElement(z,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:yh,onClick:()=>y(!0)},x.createElement(re,{variant:"medium"},"More options"),x.createElement(oo,null)))))};function _xe(t){if(t==null)throw new TypeError("Cannot destructure "+t)}const Pxe=t=>{let e=Ec({},(_xe(t),t));return x.createElement(x.Fragment,null,x.createElement("svg",Ec({xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"},id:"svg1316",version:"1.1",viewBox:"0 0 396 396"},e),x.createElement("g",{transform:"translate(0,38)",id:"g1256",clipPath:"url(#clip0_5_131)"},x.createElement("g",{id:"g1254",clipPath:"url(#clip1_5_131)"},x.createElement("path",{style:{fill:"#111111"},id:"path1232",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint0_linear_5_13"},id:"path1234",d:"M 0,67.5049 V 250.165 c 0,37.282 30.1402,67.505 67.32,67.505 h 261.36 c 37.18,0 67.32,-30.223 67.32,-67.505 V 67.5049 C 396,30.223 365.86,0 328.68,0 H 67.32 C 30.1402,0 0,30.223 0,67.5049 Z"}),x.createElement("path",{style:{fill:"url(#paint1_linear_5_131"},id:"path1236",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint2_linear_5_131)"},id:"path1238",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint3_linear_5_131)"},id:"path1240",d:"m 98.9999,79.4176 c 0,-10.9653 -8.8648,-19.8544 -19.8,-19.8544 -10.9352,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.8648,19.8544 19.8,19.8544 10.9352,0 19.8,-8.8892 19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint4_linear_5_131)"},id:"path1242",d:"m 98.9999,238.126 c 0,-10.965 -8.8648,-19.854 -19.8,-19.854 -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.966 8.8648,19.855 19.8,19.855 10.9352,0 19.8,-8.889 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint5_linear_5_131)"},id:"path1244",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint6_linear_5_131)"},id:"path1246",d:"m 336.6,158.835 c 0,-10.965 -8.865,-19.854 -19.8,-19.854 -10.935,0 -19.8,8.889 -19.8,19.854 0,10.965 8.865,19.855 19.8,19.855 10.935,0 19.8,-8.89 19.8,-19.855 z"}),x.createElement("path",{style:{fill:"url(#paint7_linear_5_131)"},id:"path1248",d:"M 316.8,59.5632 H 158.4 c -10.935,0 -19.8,8.8891 -19.8,19.8544 0,10.9652 8.865,19.8544 19.8,19.8544 h 158.4 c 10.935,0 19.8,-8.8892 19.8,-19.8544 0,-10.9653 -8.865,-19.8544 -19.8,-19.8544 z"}),x.createElement("path",{style:{fill:"url(#paint8_linear_5_131)"},id:"path1250",d:"M 316.8,218.272 H 158.4 c -10.935,0 -19.8,8.889 -19.8,19.854 0,10.966 8.865,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.889 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}),x.createElement("path",{style:{fill:"url(#paint9_linear_5_131)"},id:"path1252",d:"M 237.6,138.981 H 79.2 c -10.9352,0 -19.8,8.889 -19.8,19.854 0,10.965 8.8648,19.855 19.8,19.855 h 158.4 c 10.935,0 19.8,-8.89 19.8,-19.855 0,-10.965 -8.865,-19.854 -19.8,-19.854 z"}))),x.createElement("defs",{id:"defs1314"},x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"318",x2:"198",y1:"4.0585401e-05",x1:"198",id:"paint0_linear_5_131"},x.createElement("stop",{id:"stop1258",stopColor:"#1D273D"}),x.createElement("stop",{id:"stop1260",stopColor:"#0D0F13",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"63",x2:"92.5",y1:"99",x1:"65.5",id:"paint1_linear_5_131"},x.createElement("stop",{id:"stop1263",stopColor:"#4462FE"}),x.createElement("stop",{id:"stop1265",stopColor:"#7D69FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint2_linear_5_131"},x.createElement("stop",{id:"stop1268",stopColor:"#3757FD"}),x.createElement("stop",{id:"stop1270",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"97.591103",x2:"96.137703",y1:"99.291199",x1:"62.879902",id:"paint3_linear_5_131"},x.createElement("stop",{id:"stop1273",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1275",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"223.5",x2:"91.5",y1:"251.5",x1:"65",id:"paint4_linear_5_131"},x.createElement("stop",{id:"stop1278",stopColor:"#BC3EE6"}),x.createElement("stop",{id:"stop1280",stopColor:"#D972F1",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"146",x2:"329.5",y1:"172",x1:"305",id:"paint5_linear_5_131"},x.createElement("stop",{id:"stop1283",stopColor:"#29BDFF"}),x.createElement("stop",{id:"stop1285",stopColor:"#96E7FB",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"176.772",x2:"334.56699",y1:"178.418",x1:"300.17999",id:"paint6_linear_5_131"},x.createElement("stop",{id:"stop1288",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1290",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"60",x2:"317.5",y1:"99",x1:"154.5",id:"paint7_linear_5_131"},x.createElement("stop",{id:"stop1293",stopColor:"#23BBFF"}),x.createElement("stop",{id:"stop1295",stopColor:"#85E7FF",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"218",x2:"312.5",y1:"258",x1:"156",id:"paint8_linear_5_131"},x.createElement("stop",{id:"stop1298",stopColor:"#2447FF"}),x.createElement("stop",{id:"stop1300",stopColor:"#6980FA",offset:"1"})),x.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"139",x2:"235.5",y1:"179",x1:"86.000099",id:"paint9_linear_5_131"},x.createElement("stop",{id:"stop1303",stopColor:"#6634FF"}),x.createElement("stop",{id:"stop1305",stopColor:"#9C6DFF",offset:"1"})),x.createElement("clipPath",{id:"clip0_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1308",height:"317.67001",width:"396"})),x.createElement("clipPath",{id:"clip1_5_131"},x.createElement("rect",{style:{fill:"#ffffff"},y:"0",x:"0",id:"rect1311",height:"317.67001",width:"396"})))))},[Txe,Ixe]=lu(),[Oxe,Rxe]=lu(),[$xe,Mxe]=lu(),az={dark:"dark",light:"light"},Nxe=t=>{const{config:e={},children:r}=t,{projectAccessKey:n,defaultTheme:i="dark",signIn:s={},position:o="center",displayedAssets:a=[],ethAuth:c={}}=e,l=s.projectName||"app",{expiry:u=sz,app:f=l,origin:d=location.origin,nonce:h}=c,{projectName:p}=s,[v,b]=C.useState(!1),[y,m]=C.useState(i||az.dark),[g,S]=C.useState(o),[P,T]=C.useState(a),w=()=>{window.open("https://sequence.xyz")};return C.useEffect(()=>{n?localStorage.setItem(yn.ProjectAccessKey,n):localStorage.removeItem(yn.ProjectAccessKey)},[n]),C.useEffect(()=>{y!==i&&m(i)},[i]),C.useEffect(()=>{g!==o&&S(o)},[o]),C.useEffect(()=>{typeof y=="object"||localStorage.setItem(yn.Theme,y),localStorage.setItem(yn.EthAuthSettings,JSON.stringify({expiry:u,app:f,origin:d,nonce:h}))},[y,c]),C.useEffect(()=>{T(P)},[a]),x.createElement(Rxe,{value:{theme:y,setTheme:m,position:g,setPosition:S}},x.createElement(Ixe,{value:{setOpenConnectModal:b,openConnectModalState:v}},x.createElement(Mxe,{value:{setDisplayedAssets:T,displayedAssets:P}},x.createElement("div",{id:"kit-provider"},x.createElement(Gg,{root:"#kit-provider",scope:"kit",theme:y},x.createElement(Mg,null,v&&x.createElement(rS,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:Ec({maxWidth:"364px"},sk(o))},onClose:()=>b(!1)},x.createElement(z,{padding:"4",className:ik},x.createElement(z,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},x.createElement(re,null,"Sign in ",p?`to ${p}`:"")),x.createElement(Axe,Ec({openConnectModal:v,setOpenConnectModal:b},t)),x.createElement(z,{onClick:w,className:yh,gap:"1",marginTop:"2",flexDirection:"row",alignItems:"center",justifyContent:"center"},x.createElement(re,{fontSize:"small",color:"text100"},"Powered by Sequence"),x.createElement(z,{height:"5",width:"5"},x.createElement(Pxe,null)))))))),r)))},Dxe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=Txe();return{setOpenConnectModal:t,openConnectModalState:e}},np=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=Oxe();return{setTheme:t,theme:e,position:r,setPosition:n}},Lxe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=$xe();return{displayedAssets:e,setDisplayedAssets:t}};function Fxe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var cz=Fxe;function Bxe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=zCe}var yz=WCe,HCe=Kb,qCe=yz,VCe=Qb,GCe="[object Arguments]",KCe="[object Array]",QCe="[object Boolean]",YCe="[object Date]",JCe="[object Error]",XCe="[object Function]",ZCe="[object Map]",e5e="[object Number]",t5e="[object Object]",r5e="[object RegExp]",n5e="[object Set]",i5e="[object String]",s5e="[object WeakMap]",o5e="[object ArrayBuffer]",a5e="[object DataView]",c5e="[object Float32Array]",l5e="[object Float64Array]",u5e="[object Int8Array]",f5e="[object Int16Array]",d5e="[object Int32Array]",h5e="[object Uint8Array]",p5e="[object Uint8ClampedArray]",v5e="[object Uint16Array]",m5e="[object Uint32Array]",jt={};jt[c5e]=jt[l5e]=jt[u5e]=jt[f5e]=jt[d5e]=jt[h5e]=jt[p5e]=jt[v5e]=jt[m5e]=!0;jt[GCe]=jt[KCe]=jt[o5e]=jt[QCe]=jt[a5e]=jt[YCe]=jt[JCe]=jt[XCe]=jt[ZCe]=jt[e5e]=jt[t5e]=jt[r5e]=jt[n5e]=jt[i5e]=jt[s5e]=!1;function y5e(t){return VCe(t)&&qCe(t.length)&&!!jt[HCe(t)]}var g5e=y5e;function b5e(t){return function(e){return t(e)}}var w5e=b5e,zy={exports:{}};zy.exports;(function(t,e){var r=uz,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===n,o=s&&r.process,a=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(zy,zy.exports);var E5e=zy.exports,x5e=g5e,C5e=w5e,YT=E5e,JT=YT&&YT.isTypedArray,S5e=JT?C5e(JT):x5e,k5e=S5e,A5e=iCe,_5e=MCe,P5e=vz,T5e=FCe,I5e=mz,O5e=k5e,R5e=Object.prototype,$5e=R5e.hasOwnProperty;function M5e(t,e){var r=P5e(t),n=!r&&_5e(t),i=!r&&!n&&T5e(t),s=!r&&!n&&!i&&O5e(t),o=r||n||i||s,a=o?A5e(t.length,String):[],c=a.length;for(var l in t)(e||$5e.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||I5e(l,c)))&&a.push(l);return a}var N5e=M5e,D5e=Object.prototype;function L5e(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||D5e;return t===r}var F5e=L5e;function B5e(t,e){return function(r){return t(e(r))}}var j5e=B5e,U5e=j5e,z5e=U5e(Object.keys,Object),W5e=z5e,H5e=F5e,q5e=W5e,V5e=Object.prototype,G5e=V5e.hasOwnProperty;function K5e(t){if(!H5e(t))return q5e(t);var e=[];for(var r in Object(t))G5e.call(t,r)&&r!="constructor"&&e.push(r);return e}var Q5e=K5e;function Y5e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var ok=Y5e,J5e=Kb,X5e=ok,Z5e="[object AsyncFunction]",e6e="[object Function]",t6e="[object GeneratorFunction]",r6e="[object Proxy]";function n6e(t){if(!X5e(t))return!1;var e=J5e(t);return e==e6e||e==t6e||e==Z5e||e==r6e}var i6e=n6e,s6e=i6e,o6e=yz;function a6e(t){return t!=null&&o6e(t.length)&&!s6e(t)}var gz=a6e,c6e=N5e,l6e=Q5e,u6e=gz;function f6e(t){return u6e(t)?c6e(t):l6e(t)}var d6e=f6e,h6e=rCe,p6e=d6e;function v6e(t){return t==null?[]:h6e(t,p6e(t))}var m6e=v6e,y6e=cz,g6e=lz,b6e=m6e;function w6e(t,e){var r=b6e(t);return g6e(r,y6e(e,0,r.length))}var E6e=w6e;function x6e(t,e){return t===e||t!==t&&e!==e}var C6e=x6e,S6e=C6e,k6e=gz,A6e=mz,_6e=ok;function P6e(t,e,r){if(!_6e(r))return!1;var n=typeof e;return(n=="number"?k6e(r)&&A6e(e,r.length):n=="string"&&e in r)?S6e(r[e],t):!1}var T6e=P6e,I6e=/\s/;function O6e(t){for(var e=t.length;e--&&I6e.test(t.charAt(e)););return e}var R6e=O6e,$6e=R6e,M6e=/^\s+/;function N6e(t){return t&&t.slice(0,$6e(t)+1).replace(M6e,"")}var D6e=N6e,L6e=Kb,F6e=Qb,B6e="[object Symbol]";function j6e(t){return typeof t=="symbol"||F6e(t)&&L6e(t)==B6e}var U6e=j6e,z6e=D6e,XT=ok,W6e=U6e,ZT=0/0,H6e=/^[-+]0x[0-9a-f]+$/i,q6e=/^0b[01]+$/i,V6e=/^0o[0-7]+$/i,G6e=parseInt;function K6e(t){if(typeof t=="number")return t;if(W6e(t))return ZT;if(XT(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=XT(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=z6e(t);var r=q6e.test(t);return r||V6e.test(t)?G6e(t.slice(2),r?2:8):H6e.test(t)?ZT:+t}var Q6e=K6e,Y6e=Q6e,eI=1/0,J6e=17976931348623157e292;function X6e(t){if(!t)return t===0?t:0;if(t=Y6e(t),t===eI||t===-eI){var e=t<0?-1:1;return e*J6e}return t===t?t:0}var Z6e=X6e,e3e=Z6e;function t3e(t){var e=e3e(t),r=e%1;return e===e?r?e-r:e:0}var r3e=t3e,n3e=Jxe,i3e=E6e,s3e=vz,o3e=T6e,a3e=r3e;function c3e(t,e,r){(r?o3e(t,e,r):e===void 0)?e=1:e=a3e(e);var n=s3e(t)?n3e:i3e;return n(t,e)}var l3e=c3e;const u3e=As(l3e);var Yb={},f3e=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=tI[e.format]||tI.default;window.clipboardData.setData(f,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),c=!0}catch(f){r&&console.error("unable to copy using clipboardData: ",f),r&&console.error("falling back to prompt"),n=p3e("message"in e?e.message:h3e),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),i()}return c}var m3e=v3e;function R5(t){"@babel/helpers - typeof";return R5=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R5(t)}Object.defineProperty(Yb,"__esModule",{value:!0});Yb.CopyToClipboard=void 0;var nv=bz(C),y3e=bz(m3e),g3e=["text","onCopy","options","children"];function bz(t){return t&&t.__esModule?t:{default:t}}function rI(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function nI(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function w3e(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,s;for(s=0;s=0)&&(r[i]=t[i]);return r}function E3e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iI(t,e){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wy(t){return Wy=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Wy(t)}function ak(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ez=function(t){C3e(r,t);var e=S3e(r);function r(){var n;E3e(this,r);for(var i=arguments.length,s=new Array(i),o=0;oe in t?P3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u1=(t,e)=>{for(var r in e||(e={}))Cz.call(e,r)&&sI(t,r,e[r]);if(Hy)for(var r of Hy(e))Sz.call(e,r)&&sI(t,r,e[r]);return t},ck=(t,e)=>{var r={};for(var n in t)Cz.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Hy)for(var n of Hy(t))e.indexOf(n)<0&&Sz.call(t,n)&&(r[n]=t[n]);return r};/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT @@ -256,8 +261,8 @@ Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.val * @license qrcode.react * Copyright (c) Paul O'Shannessy * SPDX-License-Identifier: ISC - */var Ez={L:Zu.QrCode.Ecc.LOW,M:Zu.QrCode.Ecc.MEDIUM,Q:Zu.QrCode.Ecc.QUARTILE,H:Zu.QrCode.Ecc.HIGH},xz=128,Cz="L",Sz="#FFFFFF",kz="#000000",Az=!1,lk=4,b3e=.1;function _z(t,e=0){const r=[];return t.forEach(function(n,i){let s=null;n.forEach(function(o,a){if(!o&&s!==null){r.push(`M${s+e} ${i+e}h${a-s}v1H${s+e}z`),s=null;return}if(a===n.length-1){if(!o)return;s===null?r.push(`M${a+e},${i+e} h1v1H${a+e}z`):r.push(`M${s+e},${i+e} h${a+1-s}v1H${s+e}z`);return}o&&s===null&&(s=a)})}),r.join("")}function Pz(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((i,s)=>s=e.x+e.w?i:!1))}function Tz(t,e,r,n){if(n==null)return null;const i=r?lk:0,s=t.length+i*2,o=Math.floor(e*b3e),a=s/e,c=(n.width||o)*a,l=(n.height||o)*a,u=n.x==null?t.length/2-c/2:n.x*a,f=n.y==null?t.length/2-l/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(u),p=Math.floor(f),v=Math.ceil(c+u-h),b=Math.ceil(l+f-p);d={x:h,y:p,w:v,h:b}}return{x:u,y:f,h:l,w:c,excavation:d}}var w3e=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function E3e(t){const e=t,{value:r,size:n=xz,level:i=Cz,bgColor:s=Sz,fgColor:o=kz,includeMargin:a=Az,style:c,imageSettings:l}=e,u=ck(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),f=l==null?void 0:l.src,d=C.useRef(null),h=C.useRef(null),[p,v]=C.useState(!1);C.useEffect(()=>{if(d.current!=null){const m=d.current,g=m.getContext("2d");if(!g)return;let S=Zu.QrCode.encodeText(r,Ez[i]).getModules();const P=a?lk:0,T=S.length+P*2,w=Tz(S,n,a,l),I=h.current,F=w!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;F&&w.excavation!=null&&(S=Pz(S,w.excavation));const j=window.devicePixelRatio||1;m.height=m.width=n*j;const H=n/T*j;g.scale(H,H),g.fillStyle=s,g.fillRect(0,0,T,T),g.fillStyle=o,w3e?g.fill(new Path2D(_z(S,P))):S.forEach(function(G,B){G.forEach(function(E,_){E&&g.fillRect(_+P,B+P,1,1)})}),F&&g.drawImage(I,w.x+P,w.y+P,w.w,w.h)}}),C.useEffect(()=>{v(!1)},[f]);const b=u1({height:n,width:n},c);let y=null;return f!=null&&(y=x.createElement("img",{src:f,key:f,style:{display:"none"},onLoad:()=>{v(!0)},ref:h})),x.createElement(x.Fragment,null,x.createElement("canvas",u1({style:b,height:n,width:n,ref:d},u)),y)}function x3e(t){const e=t,{value:r,size:n=xz,level:i=Cz,bgColor:s=Sz,fgColor:o=kz,includeMargin:a=Az,imageSettings:c}=e,l=ck(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=Zu.QrCode.encodeText(r,Ez[i]).getModules();const f=a?lk:0,d=u.length+f*2,h=Tz(u,n,a,c);let p=null;c!=null&&h!=null&&(h.excavation!=null&&(u=Pz(u,h.excavation)),p=x.createElement("image",{xlinkHref:c.src,height:h.h,width:h.w,x:h.x+f,y:h.y+f,preserveAspectRatio:"none"}));const v=_z(u,f);return x.createElement("svg",u1({height:n,width:n,viewBox:`0 0 ${d} ${d}`},l),x.createElement("path",{fill:s,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),x.createElement("path",{fill:o,d:v,shapeRendering:"crispEdges"}),p)}var C3e=t=>{const e=t,{renderAs:r}=e,n=ck(e,["renderAs"]);return r==="svg"?x.createElement(x3e,u1({},n)):x.createElement(E3e,u1({},n))},Iz={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ul,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",u="week",f="month",d="quarter",h="year",p="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var _=["th","st","nd","rd"],O=E%100;return"["+E+(_[(O-20)%10]||_[O]||_[0])+"]"}},g=function(E,_,O){var N=String(E);return!N||N.length>=_?E:""+Array(_+1-N.length).join(O)+E},S={s:g,z:function(E){var _=-E.utcOffset(),O=Math.abs(_),N=Math.floor(O/60),k=O%60;return(_<=0?"+":"-")+g(N,2,"0")+":"+g(k,2,"0")},m:function E(_,O){if(_.date()1)return E(L[0])}else{var M=_.name;T[M]=_,k=M}return!N&&k&&(P=k),k||!N&&P},j=function(E,_){if(I(E))return E.clone();var O=typeof _=="object"?_:{};return O.date=E,O.args=arguments,new G(O)},H=S;H.l=F,H.i=I,H.w=function(E,_){return j(E,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var G=function(){function E(O){this.$L=F(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[w]=!0}var _=E.prototype;return _.parse=function(O){this.$d=function(N){var k=N.date,$=N.utc;if(k===null)return new Date(NaN);if(H.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var L=k.match(b);if(L){var M=L[2]-1||0,A=(L[7]||"0").substring(0,3);return $?new Date(Date.UTC(L[1],M,L[3]||1,L[4]||0,L[5]||0,L[6]||0,A)):new Date(L[1],M,L[3]||1,L[4]||0,L[5]||0,L[6]||0,A)}}return new Date(k)}(O),this.init()},_.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},_.$utils=function(){return H},_.isValid=function(){return this.$d.toString()!==v},_.isSame=function(O,N){var k=j(O);return this.startOf(N)<=k&&k<=this.endOf(N)},_.isAfter=function(O,N){return j(O)`Invalid value for key ${t}`,R3e=t=>`Pattern length exceeds max of ${t}.`,$3e=t=>`Missing ${t} property in key`,M3e=t=>`Property 'weight' in key '${t}' must be a positive integer`,nI=Object.prototype.hasOwnProperty;class N3e{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let i=Nz(n);r+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Nz(t){let e=null,r=null,n=null,i=1,s=null;if(Xs(t)||Zo(t))n=t,e=iI(t),r=D5(t);else{if(!nI.call(t,"name"))throw new Error($3e("name"));const o=t.name;if(n=o,nI.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(M3e(o));e=iI(o),r=D5(o),s=t.getFn}return{path:e,id:r,weight:i,src:n,getFn:s}}function iI(t){return Zo(t)?t:t.split(".")}function D5(t){return Zo(t)?t.join("."):t}function D3e(t,e){let r=[],n=!1;const i=(s,o,a)=>{if(fi(s))if(!o[a])r.push(s);else{let c=o[a];const l=s[c];if(!fi(l))return;if(a===o.length-1&&(Xs(l)||Rz(l)||P3e(l)))r.push(_3e(l));else if(Zo(l)){n=!0;for(let u=0,f=l.length;ut.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Xs(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();Xs(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let o=i.getFn?i.getFn(e):this.getFn(e,i.path);if(fi(o)){if(Zo(o)){let a=[];const c=[{nestedArrIndex:-1,value:o}];for(;c.length;){const{nestedArrIndex:l,value:u}=c.pop();if(fi(u))if(Xs(u)&&!dE(u)){let f={v:u,i:l,n:this.norm.get(u)};a.push(f)}else Zo(u)&&u.forEach((f,d)=>{c.push({nestedArrIndex:d,value:f})})}n.$[s]=a}else if(Xs(o)&&!dE(o)){let a={v:o,n:this.norm.get(o)};n.$[s]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Dz(t,e,{getFn:r=Se.getFn,fieldNormWeight:n=Se.fieldNormWeight}={}){const i=new uk({getFn:r,fieldNormWeight:n});return i.setKeys(t.map(Nz)),i.setSources(e),i.create(),i}function W3e(t,{getFn:e=Se.getFn,fieldNormWeight:r=Se.fieldNormWeight}={}){const{keys:n,records:i}=t,s=new uk({getFn:e,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s}function iv(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:i=Se.distance,ignoreLocation:s=Se.ignoreLocation}={}){const o=e/t.length;if(s)return o;const a=Math.abs(n-r);return i?o+a/i:a?1:o}function H3e(t=[],e=Se.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let o=t.length;s=e&&r.push([n,i]),n=-1)}return t[s-1]&&s-n>=e&&r.push([n,s-1]),r}const ll=32;function q3e(t,e,r,{location:n=Se.location,distance:i=Se.distance,threshold:s=Se.threshold,findAllMatches:o=Se.findAllMatches,minMatchCharLength:a=Se.minMatchCharLength,includeMatches:c=Se.includeMatches,ignoreLocation:l=Se.ignoreLocation}={}){if(e.length>ll)throw new Error(R3e(ll));const u=e.length,f=t.length,d=Math.max(0,Math.min(n,f));let h=s,p=d;const v=a>1||c,b=v?Array(f):[];let y;for(;(y=t.indexOf(e,p))>-1;){let w=iv(e,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:l});if(h=Math.min(w,h),p=y+u,v){let I=0;for(;I=j;E-=1){let _=E-1,O=r[t.charAt(_)];if(v&&(b[_]=+!!O),G[E]=(G[E+1]<<1|1)&O,w&&(G[E]|=(m[E+1]|m[E])<<1|1|m[E+1]),G[E]&P&&(g=iv(e,{errors:w,currentLocation:_,expectedLocation:d,distance:i,ignoreLocation:l}),g<=h)){if(h=g,p=_,p<=d)break;j=Math.max(1,2*d-p)}}if(iv(e,{errors:w+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:l})>h)break;m=G}const T={isMatch:p>=0,score:Math.max(.001,g)};if(v){const w=H3e(b,a);w.length?c&&(T.indices=w):T.isMatch=!1}return T}function V3e(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:V3e(d),startIndex:h})},f=this.pattern.length;if(f>ll){let d=0;const h=f%ll,p=f-h;for(;d{const{isMatch:y,score:m,indices:g}=q3e(e,p,v,{location:i+b,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:c,includeMatches:n,ignoreLocation:l});y&&(d=!0),f+=m,y&&g&&(u=[...u,...g])});let h={isMatch:d,score:d?f/this.chunks.length:1};return d&&n&&(h.indices=u),h}}class Bc{constructor(e){this.pattern=e}static isMultiMatch(e){return sI(e,this.multiRegex)}static isSingleMatch(e){return sI(e,this.singleRegex)}search(){}}function sI(t,e){const r=t.match(e);return r?r[1]:null}class G3e extends Bc{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class K3e extends Bc{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class Q3e extends Bc{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class Y3e extends Bc{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class J3e extends Bc{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class X3e extends Bc{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class Bz extends Bc{constructor(e,{location:r=Se.location,threshold:n=Se.threshold,distance:i=Se.distance,includeMatches:s=Se.includeMatches,findAllMatches:o=Se.findAllMatches,minMatchCharLength:a=Se.minMatchCharLength,isCaseSensitive:c=Se.isCaseSensitive,ignoreLocation:l=Se.ignoreLocation}={}){super(e),this._bitapSearch=new Lz(e,{location:r,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Fz extends Bc{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const i=[],s=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+s,i.push([n,r-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const L5=[G3e,Fz,Q3e,Y3e,X3e,J3e,K3e,Bz],oI=L5.length,Z3e=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,eSe="|";function tSe(t,e={}){return t.split(eSe).map(r=>{let n=r.trim().split(Z3e).filter(s=>s&&!!s.trim()),i=[];for(let s=0,o=n.length;s!!(t[qy.AND]||t[qy.OR]),sSe=t=>!!t[j5.PATH],oSe=t=>!Zo(t)&&$z(t)&&!U5(t),aI=t=>({[qy.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function jz(t,e,{auto:r=!0}={}){const n=i=>{let s=Object.keys(i);const o=sSe(i);if(!o&&s.length>1&&!U5(i))return n(aI(i));if(oSe(i)){const c=o?i[j5.PATH]:s[0],l=o?i[j5.PATTERN]:i[c];if(!Xs(l))throw new Error(O3e(c));const u={keyId:D5(c),pattern:l};return r&&(u.searcher=F5(l,e)),u}let a={children:[],operator:s[0]};return s.forEach(c=>{const l=i[c];Zo(l)&&l.forEach(u=>{a.children.push(n(u))})}),a};return U5(t)||(t=aI(t)),n(t)}function aSe(t,{ignoreFieldNorm:e=Se.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:s,score:o})=>{const a=i?i.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:s))}),r.score=n})}function cSe(t,e){const r=t.matches;e.matches=[],fi(r)&&r.forEach(n=>{if(!fi(n.indices)||!n.indices.length)return;const{indices:i,value:s}=n;let o={indices:i,value:s};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function lSe(t,e){e.score=t.score}function uSe(t,e,{includeMatches:r=Se.includeMatches,includeScore:n=Se.includeScore}={}){const i=[];return r&&i.push(cSe),n&&i.push(lSe),t.map(s=>{const{idx:o}=s,a={item:e[o],refIndex:o};return i.length&&i.forEach(c=>{c(s,a)}),a})}class ea{constructor(e,r={},n){this.options={...Se,...r},this.options.useExtendedSearch,this._keyStore=new N3e(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof uk))throw new Error(I3e);this._myIndex=r||Dz(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){fi(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,i=this._docs.length;n-1&&(c=c.slice(0,r)),uSe(c,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const r=F5(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:s,i:o,n:a})=>{if(!fi(s))return;const{isMatch:c,score:l,indices:u}=r.searchIn(s);c&&i.push({item:s,idx:o,matches:[{score:l,value:s,norm:a,indices:u}]})}),i}_searchLogical(e){const r=jz(e,this.options),n=(a,c,l)=>{if(!a.children){const{keyId:f,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(c,f),searcher:d});return h&&h.length?[{idx:l,item:c,matches:h}]:[]}const u=[];for(let f=0,d=a.children.length;f{if(fi(a)){let l=n(r,a,c);l.length&&(s[c]||(s[c]={idx:c,item:a,matches:[]},o.push(s[c])),l.forEach(({matches:u})=>{s[c].matches.push(...u)}))}}),o}_searchObjectList(e){const r=F5(e,this.options),{keys:n,records:i}=this._myIndex,s=[];return i.forEach(({$:o,i:a})=>{if(!fi(o))return;let c=[];n.forEach((l,u)=>{c.push(...this._findMatches({key:l,value:o[u],searcher:r}))}),c.length&&s.push({idx:a,item:o,matches:c})}),s}_findMatches({key:e,value:r,searcher:n}){if(!fi(r))return[];let i=[];if(Zo(r))r.forEach(({v:s,i:o,n:a})=>{if(!fi(s))return;const{isMatch:c,score:l,indices:u}=n.searchIn(s);c&&i.push({score:l,key:e,value:s,idx:o,norm:a,indices:u})});else{const{v:s,n:o}=r,{isMatch:a,score:c,indices:l}=n.searchIn(s);a&&i.push({score:c,key:e,value:s,norm:o,indices:l})}return i}}ea.version="6.6.2";ea.createIndex=Dz;ea.parseIndex=W3e;ea.config=Se;ea.parseQuery=jz;iSe(nSe);function Uz(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;et.forEach(r=>dSe(r,e))}function uu(...t){return C.useCallback(zz(...t),t)}function Wz(t,e=[]){let r=[];function n(s,o){const a=C.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,v=(d==null?void 0:d[t][c])||a,b=C.useMemo(()=>p,Object.values(p));return C.createElement(v.Provider,{value:b},h)}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=C.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,u]}const i=()=>{const s=r.map(o=>C.createContext(o));return function(a){const c=(a==null?void 0:a[t])||s;return C.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[n,hSe(i,...e)]}function hSe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const fk=C.forwardRef((t,e)=>{const{children:r,...n}=t,i=C.Children.toArray(r),s=i.find(vSe);if(s){const o=s.props.children,a=i.map(c=>c===s?C.Children.count(o)>1?C.Children.only(null):C.isValidElement(o)?o.props.children:null:c);return C.createElement(z5,nn({},n,{ref:e}),C.isValidElement(o)?C.cloneElement(o,void 0,a):null)}return C.createElement(z5,nn({},n,{ref:e}),r)});fk.displayName="Slot";const z5=C.forwardRef((t,e)=>{const{children:r,...n}=t;return C.isValidElement(r)?C.cloneElement(r,{...mSe(n,r.props),ref:e?zz(e,r.ref):r.ref}):C.Children.count(r)>1?C.Children.only(null):null});z5.displayName="SlotClone";const pSe=({children:t})=>C.createElement(C.Fragment,null,t);function vSe(t){return C.isValidElement(t)&&t.type===pSe}function mSe(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const ySe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ip=ySe.reduce((t,e)=>{const r=C.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?fk:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(a,nn({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function gSe(t,e){t&&_s.flushSync(()=>t.dispatchEvent(e))}function xc(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function bSe(t,e=globalThis==null?void 0:globalThis.document){const r=xc(t);C.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const W5="dismissableLayer.update",wSe="dismissableLayer.pointerDownOutside",ESe="dismissableLayer.focusOutside";let cI;const xSe=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),CSe=C.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,u=C.useContext(xSe),[f,d]=C.useState(null),h=(r=f==null?void 0:f.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=C.useState({}),v=uu(e,I=>d(I)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(y),g=f?b.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=g>=m,T=SSe(I=>{const F=I.target,j=[...u.branches].some(H=>H.contains(F));!P||j||(s==null||s(I),a==null||a(I),I.defaultPrevented||c==null||c())},h),w=kSe(I=>{const F=I.target;[...u.branches].some(H=>H.contains(F))||(o==null||o(I),a==null||a(I),I.defaultPrevented||c==null||c())},h);return bSe(I=>{g===u.layers.size-1&&(i==null||i(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},h),C.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(cI=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),lI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=cI)}},[f,h,n,u]),C.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),lI())},[f,u]),C.useEffect(()=>{const I=()=>p({});return document.addEventListener(W5,I),()=>document.removeEventListener(W5,I)},[]),C.createElement(ip.div,nn({},l,{ref:v,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:_l(t.onFocusCapture,w.onFocusCapture),onBlurCapture:_l(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:_l(t.onPointerDownCapture,T.onPointerDownCapture)}))});function SSe(t,e=globalThis==null?void 0:globalThis.document){const r=xc(t),n=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){Hz(wSe,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function kSe(t,e=globalThis==null?void 0:globalThis.document){const r=xc(t),n=C.useRef(!1);return C.useEffect(()=>{const i=s=>{s.target&&!n.current&&Hz(ESe,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function lI(){const t=new CustomEvent(W5);document.dispatchEvent(t)}function Hz(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?gSe(i,s):i.dispatchEvent(s)}let hE=0;function ASe(){C.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:uI()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:uI()),hE++,()=>{hE===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),hE--}},[])}function uI(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const pE="focusScope.autoFocusOnMount",vE="focusScope.autoFocusOnUnmount",fI={bubbles:!1,cancelable:!0},_Se=C.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,c]=C.useState(null),l=xc(i),u=xc(s),f=C.useRef(null),d=uu(e,v=>c(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(n){let v=function(g){if(h.paused||!a)return;const S=g.target;a.contains(S)?f.current=S:ka(f.current,{select:!0})},b=function(g){if(h.paused||!a)return;const S=g.relatedTarget;S!==null&&(a.contains(S)||ka(f.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const P of g)P.removedNodes.length>0&&ka(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const m=new MutationObserver(y);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),m.disconnect()}}},[n,a,h.paused]),C.useEffect(()=>{if(a){hI.add(h);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(pE,fI);a.addEventListener(pE,l),a.dispatchEvent(y),y.defaultPrevented||(PSe($Se(qz(a)),{select:!0}),document.activeElement===v&&ka(a))}return()=>{a.removeEventListener(pE,l),setTimeout(()=>{const y=new CustomEvent(vE,fI);a.addEventListener(vE,u),a.dispatchEvent(y),y.defaultPrevented||ka(v??document.body,{select:!0}),a.removeEventListener(vE,u),hI.remove(h)},0)}}},[a,l,u,h]);const p=C.useCallback(v=>{if(!r&&!n||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(b&&y){const m=v.currentTarget,[g,S]=TSe(m);g&&S?!v.shiftKey&&y===S?(v.preventDefault(),r&&ka(g,{select:!0})):v.shiftKey&&y===g&&(v.preventDefault(),r&&ka(S,{select:!0})):y===m&&v.preventDefault()}},[r,n,h.paused]);return C.createElement(ip.div,nn({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function PSe(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(ka(n,{select:e}),document.activeElement!==r)return}function TSe(t){const e=qz(t),r=dI(e,t),n=dI(e.reverse(),t);return[r,n]}function qz(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function dI(t,e){for(const r of t)if(!ISe(r,{upTo:e}))return r}function ISe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function OSe(t){return t instanceof HTMLInputElement&&"select"in t}function ka(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&OSe(t)&&e&&t.select()}}const hI=RSe();function RSe(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=pI(t,e),t.unshift(e)},remove(e){var r;t=pI(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function pI(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function $Se(t){return t.filter(e=>e.tagName!=="A")}const Qf=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},MSe=o7["useId".toString()]||(()=>{});let NSe=0;function DSe(t){const[e,r]=C.useState(MSe());return Qf(()=>{t||r(n=>n??String(NSe++))},[t]),t||(e?`radix-${e}`:"")}const LSe=["top","right","bottom","left"],Cc=Math.min,di=Math.max,Vy=Math.round,sv=Math.floor,Sc=t=>({x:t,y:t}),BSe={left:"right",right:"left",bottom:"top",top:"bottom"},FSe={start:"end",end:"start"};function H5(t,e,r){return di(t,Cc(e,r))}function ta(t,e){return typeof t=="function"?t(e):t}function ra(t){return t.split("-")[0]}function Td(t){return t.split("-")[1]}function dk(t){return t==="x"?"y":"x"}function hk(t){return t==="y"?"height":"width"}function Id(t){return["top","bottom"].includes(ra(t))?"y":"x"}function pk(t){return dk(Id(t))}function jSe(t,e,r){r===void 0&&(r=!1);const n=Td(t),i=pk(t),s=hk(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gy(o)),[o,Gy(o)]}function USe(t){const e=Gy(t);return[q5(t),e,q5(e)]}function q5(t){return t.replace(/start|end/g,e=>FSe[e])}function zSe(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function WSe(t,e,r,n){const i=Td(t);let s=zSe(ra(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(q5)))),s}function Gy(t){return t.replace(/left|right|bottom|top/g,e=>BSe[e])}function HSe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Vz(t){return typeof t!="number"?HSe(t):{top:t,right:t,bottom:t,left:t}}function Ky(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function vI(t,e,r){let{reference:n,floating:i}=t;const s=Id(e),o=pk(e),a=hk(o),c=ra(e),l=s==="y",u=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(Td(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const qSe=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=vI(l,n,c),d=n,h={},p=0;for(let v=0;v({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=ta(t,e)||{};if(l==null)return{};const f=Vz(u),d={x:r,y:n},h=pk(i),p=hk(h),v=await o.getDimensions(l),b=h==="y",y=b?"top":"left",m=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-d[h]-s.floating[p],P=d[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let w=T?T[g]:0;(!w||!await(o.isElement==null?void 0:o.isElement(T)))&&(w=a.floating[g]||s.floating[p]);const I=S/2-P/2,F=w/2-v[p]/2-1,j=Cc(f[y],F),H=Cc(f[m],F),G=j,B=w-v[p]-H,E=w/2-v[p]/2+I,_=H5(G,E,B),O=!c.arrow&&Td(i)!=null&&E!=_&&s.reference[p]/2-(EG<=0)){var F,j;const G=(((F=s.flip)==null?void 0:F.index)||0)+1,B=P[G];if(B)return{data:{index:G,overflows:I},reset:{placement:B}};let E=(j=I.filter(_=>_.overflows[0]<=0).sort((_,O)=>_.overflows[1]-O.overflows[1])[0])==null?void 0:j.placement;if(!E)switch(h){case"bestFit":{var H;const _=(H=I.map(O=>[O.placement,O.overflows.filter(N=>N>0).reduce((N,k)=>N+k,0)]).sort((O,N)=>O[1]-N[1])[0])==null?void 0:H[0];_&&(E=_);break}case"initialPlacement":E=a;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function yI(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function gI(t){return LSe.some(e=>t[e]>=0)}const GSe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=ta(t,e);switch(n){case"referenceHidden":{const s=await f1(e,{...i,elementContext:"reference"}),o=yI(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:gI(o)}}}case"escaped":{const s=await f1(e,{...i,altBoundary:!0}),o=yI(s,r.floating);return{data:{escapedOffsets:o,escaped:gI(o)}}}default:return{}}}}};async function KSe(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ra(r),a=Td(r),c=Id(r)==="y",l=["left","top"].includes(o)?-1:1,u=s&&c?-1:1,f=ta(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const QSe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await KSe(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},YSe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:y,y:m}=b;return{x:y,y:m}}},...c}=ta(t,e),l={x:r,y:n},u=await f1(e,c),f=Id(ra(i)),d=dk(f);let h=l[d],p=l[f];if(s){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=h+u[b],g=h-u[y];h=H5(m,h,g)}if(o){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",m=p+u[b],g=p-u[y];p=H5(m,p,g)}const v=a.fn({...e,[d]:h,[f]:p});return{...v,data:{x:v.x-r,y:v.y-n}}}}},JSe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=ta(t,e),u={x:r,y:n},f=Id(i),d=dk(f);let h=u[d],p=u[f];const v=ta(a,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const g=d==="y"?"height":"width",S=s.reference[d]-s.floating[g]+b.mainAxis,P=s.reference[d]+s.reference[g]-b.mainAxis;hP&&(h=P)}if(l){var y,m;const g=d==="y"?"width":"height",S=["top","left"].includes(ra(i)),P=s.reference[f]-s.floating[g]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:b.crossAxis),T=s.reference[f]+s.reference[g]+(S?0:((m=o.offset)==null?void 0:m[f])||0)-(S?b.crossAxis:0);pT&&(p=T)}return{[d]:h,[f]:p}}}},XSe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=ta(t,e),c=await f1(e,a),l=ra(r),u=Td(r),f=Id(r)==="y",{width:d,height:h}=n.floating;let p,v;l==="top"||l==="bottom"?(p=l,v=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=l,p=u==="end"?"top":"bottom");const b=h-c[p],y=d-c[v],m=!e.middlewareData.shift;let g=b,S=y;if(f){const T=d-c.left-c.right;S=u||m?Cc(y,T):T}else{const T=h-c.top-c.bottom;g=u||m?Cc(b,T):T}if(m&&!u){const T=di(c.left,0),w=di(c.right,0),I=di(c.top,0),F=di(c.bottom,0);f?S=d-2*(T!==0||w!==0?T+w:di(c.left,c.right)):g=h-2*(I!==0||F!==0?I+F:di(c.top,c.bottom))}await o({...e,availableWidth:S,availableHeight:g});const P=await i.getDimensions(s.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function kc(t){return Gz(t)?(t.nodeName||"").toLowerCase():"#document"}function yi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pa(t){var e;return(e=(Gz(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gz(t){return t instanceof Node||t instanceof yi(t).Node}function na(t){return t instanceof Element||t instanceof yi(t).Element}function yo(t){return t instanceof HTMLElement||t instanceof yi(t).HTMLElement}function bI(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof yi(t).ShadowRoot}function sp(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Vi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function ZSe(t){return["table","td","th"].includes(kc(t))}function vk(t){const e=mk(),r=Vi(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function e8e(t){let e=Yf(t);for(;yo(e)&&!Jb(e);){if(vk(e))return e;e=Yf(e)}return null}function mk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jb(t){return["html","body","#document"].includes(kc(t))}function Vi(t){return yi(t).getComputedStyle(t)}function Xb(t){return na(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Yf(t){if(kc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||bI(t)&&t.host||pa(t);return bI(e)?e.host:e}function Kz(t){const e=Yf(t);return Jb(e)?t.ownerDocument?t.ownerDocument.body:t.body:yo(e)&&sp(e)?e:Kz(e)}function d1(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=Kz(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=yi(i);return s?e.concat(o,o.visualViewport||[],sp(i)?i:[],o.frameElement&&r?d1(o.frameElement):[]):e.concat(i,d1(i,[],r))}function Qz(t){const e=Vi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=yo(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Vy(r)!==s||Vy(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function yk(t){return na(t)?t:t.contextElement}function wf(t){const e=yk(t);if(!yo(e))return Sc(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=Qz(e);let o=(s?Vy(r.width):r.width)/n,a=(s?Vy(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const t8e=Sc(0);function Yz(t){const e=yi(t);return!mk()||!e.visualViewport?t8e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function r8e(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==yi(t)?!1:e}function Vl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=yk(t);let o=Sc(1);e&&(n?na(n)&&(o=wf(n)):o=wf(t));const a=r8e(s,r,n)?Yz(s):Sc(0);let c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=yi(s),h=n&&na(n)?yi(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const v=wf(p),b=p.getBoundingClientRect(),y=Vi(p),m=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*v.x,g=b.top+(p.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=m,l+=g,p=yi(p).frameElement}}return Ky({width:u,height:f,x:c,y:l})}function n8e(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=yo(r),s=pa(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=Sc(1);const c=Sc(0);if((i||!i&&n!=="fixed")&&((kc(r)!=="body"||sp(s))&&(o=Xb(r)),yo(r))){const l=Vl(r);a=wf(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function i8e(t){return Array.from(t.getClientRects())}function Jz(t){return Vl(pa(t)).left+Xb(t).scrollLeft}function s8e(t){const e=pa(t),r=Xb(t),n=t.ownerDocument.body,i=di(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=di(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Jz(t);const a=-r.scrollTop;return Vi(n).direction==="rtl"&&(o+=di(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function o8e(t,e){const r=yi(t),n=pa(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=mk();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function a8e(t,e){const r=Vl(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=yo(t)?wf(t):Sc(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function wI(t,e,r){let n;if(e==="viewport")n=o8e(t,r);else if(e==="document")n=s8e(pa(t));else if(na(e))n=a8e(e,r);else{const i=Yz(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Ky(n)}function Xz(t,e){const r=Yf(t);return r===e||!na(r)||Jb(r)?!1:Vi(r).position==="fixed"||Xz(r,e)}function c8e(t,e){const r=e.get(t);if(r)return r;let n=d1(t,[],!1).filter(a=>na(a)&&kc(a)!=="body"),i=null;const s=Vi(t).position==="fixed";let o=s?Yf(t):t;for(;na(o)&&!Jb(o);){const a=Vi(o),c=vk(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||sp(o)&&!c&&Xz(t,o))?n=n.filter(u=>u!==o):i=a,o=Yf(o)}return e.set(t,n),n}function l8e(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?c8e(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=wI(e,u,i);return l.top=di(f.top,l.top),l.right=Cc(f.right,l.right),l.bottom=Cc(f.bottom,l.bottom),l.left=di(f.left,l.left),l},wI(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u8e(t){return Qz(t)}function f8e(t,e,r){const n=yo(e),i=pa(e),s=r==="fixed",o=Vl(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=Sc(0);if(n||!n&&!s)if((kc(e)!=="body"||sp(i))&&(a=Xb(e)),n){const l=Vl(e,!0,s,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else i&&(c.x=Jz(i));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function EI(t,e){return!yo(t)||Vi(t).position==="fixed"?null:e?e(t):t.offsetParent}function Zz(t,e){const r=yi(t);if(!yo(t))return r;let n=EI(t,e);for(;n&&ZSe(n)&&Vi(n).position==="static";)n=EI(n,e);return n&&(kc(n)==="html"||kc(n)==="body"&&Vi(n).position==="static"&&!vk(n))?r:n||e8e(t)||r}const d8e=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||Zz,s=this.getDimensions;return{reference:f8e(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function h8e(t){return Vi(t).direction==="rtl"}const p8e={convertOffsetParentRelativeRectToViewportRelativeRect:n8e,getDocumentElement:pa,getClippingRect:l8e,getOffsetParent:Zz,getElementRects:d8e,getClientRects:i8e,getDimensions:u8e,getScale:wf,isElement:na,isRTL:h8e};function v8e(t,e){let r=null,n;const i=pa(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=sv(u),p=sv(i.clientWidth-(l+f)),v=sv(i.clientHeight-(u+d)),b=sv(l),m={rootMargin:-h+"px "+-p+"px "+-v+"px "+-b+"px",threshold:di(0,Cc(1,c))||1};let g=!0;function S(P){const T=P[0].intersectionRatio;if(T!==c){if(!g)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},100)}g=!1}try{r=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,m)}r.observe(t)}return o(!0),s}function m8e(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=yk(t),u=i||s?[...l?d1(l):[],...d1(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=l&&a?v8e(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[m]=y;m&&m.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,v=c?Vl(t):null;c&&b();function b(){const y=Vl(t);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&r(),v=y,p=requestAnimationFrame(b)}return r(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const y8e=(t,e,r)=>{const n=new Map,i={platform:p8e,...r},s={...i.platform,_c:n};return qSe(t,e,{...i,platform:s})},g8e=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?mI({element:n.current,padding:i}).fn(r):{}:n?mI({element:n,padding:i}).fn(r):{}}}};var Jv=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Qy(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Qy(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!Qy(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function eW(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function xI(t,e){const r=eW(t);return Math.round(e*r)/r}function CI(t){const e=C.useRef(t);return Jv(()=>{e.current=t}),e}function b8e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=C.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=C.useState(n);Qy(d,n)||h(n);const[p,v]=C.useState(null),[b,y]=C.useState(null),m=C.useCallback(O=>{O!=T.current&&(T.current=O,v(O))},[v]),g=C.useCallback(O=>{O!==w.current&&(w.current=O,y(O))},[y]),S=s||p,P=o||b,T=C.useRef(null),w=C.useRef(null),I=C.useRef(u),F=CI(c),j=CI(i),H=C.useCallback(()=>{if(!T.current||!w.current)return;const O={placement:e,strategy:r,middleware:d};j.current&&(O.platform=j.current),y8e(T.current,w.current,O).then(N=>{const k={...N,isPositioned:!0};G.current&&!Qy(I.current,k)&&(I.current=k,_s.flushSync(()=>{f(k)}))})},[d,e,r,j]);Jv(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const G=C.useRef(!1);Jv(()=>(G.current=!0,()=>{G.current=!1}),[]),Jv(()=>{if(S&&(T.current=S),P&&(w.current=P),S&&P){if(F.current)return F.current(S,P,H);H()}},[S,P,H,F]);const B=C.useMemo(()=>({reference:T,floating:w,setReference:m,setFloating:g}),[m,g]),E=C.useMemo(()=>({reference:S,floating:P}),[S,P]),_=C.useMemo(()=>{const O={position:r,left:0,top:0};if(!E.floating)return O;const N=xI(E.floating,u.x),k=xI(E.floating,u.y);return a?{...O,transform:"translate("+N+"px, "+k+"px)",...eW(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:k}},[r,a,E.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:H,refs:B,elements:E,floatingStyles:_}),[u,H,B,E,_])}function w8e(t){const[e,r]=C.useState(void 0);return Qf(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}const tW="Popper",[rW,nW]=Wz(tW),[E8e,iW]=rW(tW),x8e=t=>{const{__scopePopper:e,children:r}=t,[n,i]=C.useState(null);return C.createElement(E8e,{scope:e,anchor:n,onAnchorChange:i},r)},C8e="PopperAnchor",S8e=C.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=iW(C8e,r),o=C.useRef(null),a=uu(e,o);return C.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:C.createElement(ip.div,nn({},i,{ref:a}))}),sW="PopperContent",[k8e,bTe]=rW(sW),A8e=C.forwardRef((t,e)=>{var r,n,i,s,o,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:v=0,avoidCollisions:b=!0,collisionBoundary:y=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:S=!1,updatePositionStrategy:P="optimized",onPlaced:T,...w}=t,I=iW(sW,u),[F,j]=C.useState(null),H=uu(e,ue=>j(ue)),[G,B]=C.useState(null),E=w8e(G),_=(r=E==null?void 0:E.width)!==null&&r!==void 0?r:0,O=(n=E==null?void 0:E.height)!==null&&n!==void 0?n:0,N=f+(h!=="center"?"-"+h:""),k=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},$=Array.isArray(y)?y:[y],L=$.length>0,M={padding:k,boundary:$.filter(_8e),altBoundary:L},{refs:A,floatingStyles:D,placement:V,isPositioned:R,middlewareData:U}=b8e({strategy:"fixed",placement:N,whileElementsMounted:(...ue)=>m8e(...ue,{animationFrame:P==="always"}),elements:{reference:I.anchor},middleware:[QSe({mainAxis:d+O,alignmentAxis:p}),b&&YSe({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?JSe():void 0,...M}),b&&VSe({...M}),XSe({...M,apply:({elements:ue,rects:ot,availableWidth:Pe,availableHeight:Ae})=>{const{width:at,height:Ce}=ot.reference,be=ue.floating.style;be.setProperty("--radix-popper-available-width",`${Pe}px`),be.setProperty("--radix-popper-available-height",`${Ae}px`),be.setProperty("--radix-popper-anchor-width",`${at}px`),be.setProperty("--radix-popper-anchor-height",`${Ce}px`)}}),G&&g8e({element:G,padding:v}),P8e({arrowWidth:_,arrowHeight:O}),S&&GSe({strategy:"referenceHidden",...M})]}),[W,q]=oW(V),Y=xc(T);Qf(()=>{R&&(Y==null||Y())},[R,Y]);const X=(i=U.arrow)===null||i===void 0?void 0:i.x,Q=(s=U.arrow)===null||s===void 0?void 0:s.y,Z=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ae,se]=C.useState();return Qf(()=>{F&&se(window.getComputedStyle(F).zIndex)},[F]),C.createElement("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:R?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},C.createElement(k8e,{scope:u,placedSide:W,onArrowChange:B,arrowX:X,arrowY:Q,shouldHideArrow:Z},C.createElement(ip.div,nn({"data-side":W,"data-align":q},w,{ref:H,style:{...w.style,animation:R?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function _8e(t){return t!==null}const P8e=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:c,middlewareData:l}=e,f=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=f?0:t.arrowWidth,h=f?0:t.arrowHeight,[p,v]=oW(a),b={start:"0%",center:"50%",end:"100%"}[v],y=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,m=((s=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let g="",S="";return p==="bottom"?(g=f?b:`${y}px`,S=`${-h}px`):p==="top"?(g=f?b:`${y}px`,S=`${c.floating.height+h}px`):p==="right"?(g=`${-h}px`,S=f?b:`${m}px`):p==="left"&&(g=`${c.floating.width+h}px`,S=f?b:`${m}px`),{data:{x:g,y:S}}}});function oW(t){const[e,r="center"]=t.split("-");return[e,r]}const T8e=x8e,aW=S8e,I8e=A8e;function O8e(t,e){return C.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const cW=t=>{const{present:e,children:r}=t,n=R8e(e),i=typeof r=="function"?r({present:n.isPresent}):C.Children.only(r),s=uu(n.ref,i.ref);return typeof r=="function"||n.isPresent?C.cloneElement(i,{ref:s}):null};cW.displayName="Presence";function R8e(t){const[e,r]=C.useState(),n=C.useRef({}),i=C.useRef(t),s=C.useRef("none"),o=t?"mounted":"unmounted",[a,c]=O8e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=ov(n.current);s.current=a==="mounted"?l:"none"},[a]),Qf(()=>{const l=n.current,u=i.current;if(u!==t){const d=s.current,h=ov(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),Qf(()=>{if(e){const l=f=>{const h=ov(n.current).includes(f.animationName);f.target===e&&h&&_s.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(s.current=ov(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function ov(t){return(t==null?void 0:t.animationName)||"none"}function $8e({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=M8e({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=xc(r),c=C.useCallback(l=>{if(s){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else i(l)},[s,t,i,a]);return[o,c]}function M8e({defaultProp:t,onChange:e}){const r=C.useState(t),[n]=r,i=C.useRef(n),s=xc(e);return C.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}var N8e=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Cu=new WeakMap,av=new WeakMap,cv={},mE=0,lW=function(t){return t&&(t.host||lW(t.parentNode))},D8e=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=lW(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},L8e=function(t,e,r,n){var i=D8e(e,Array.isArray(t)?t:[t]);cv[r]||(cv[r]=new WeakMap);var s=cv[r],o=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",v=(Cu.get(d)||0)+1,b=(s.get(d)||0)+1;Cu.set(d,v),s.set(d,b),o.push(d),v===1&&p&&av.set(d,!0),b===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return u(e),a.clear(),mE++,function(){o.forEach(function(f){var d=Cu.get(f)-1,h=s.get(f)-1;Cu.set(f,d),s.set(f,h),d||(av.has(f)||f.removeAttribute(n),av.delete(f)),h||f.removeAttribute(r)}),mE--,mE||(Cu=new WeakMap,Cu=new WeakMap,av=new WeakMap,cv={})}},B8e=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||N8e(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),L8e(n,i,r,"aria-hidden")):function(){return null}},Xv="right-scroll-bar-position",Zv="width-before-scroll-bar",F8e="with-scroll-bars-hidden",j8e="--removed-body-scroll-bar-size";function U8e(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function z8e(t,e){var r=C.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=e,r.facade}function W8e(t,e){return z8e(e||null,function(r){return t.forEach(function(n){return U8e(n,r)})})}function H8e(t){return t}function q8e(t,e){e===void 0&&(e=H8e);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var o=e(s,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(n=!0;r.length;){var o=r;r=[],o.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(s),o=r}var c=function(){var u=o;o=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){o.push(u),l()},filter:function(u){return o=o.filter(u),r}}}};return i}function V8e(t){t===void 0&&(t={});var e=q8e(null);return e.options=Ks({async:!0,ssr:!1},t),e}var uW=function(t){var e=t.sideCar,r=pN(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return C.createElement(n,Ks({},r))};uW.isSideCarExport=!0;function G8e(t,e){return t.useMedium(e),uW}var fW=V8e(),yE=function(){},Zb=C.forwardRef(function(t,e){var r=C.useRef(null),n=C.useState({onScrollCapture:yE,onWheelCapture:yE,onTouchMoveCapture:yE}),i=n[0],s=n[1],o=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noIsolation,p=t.inert,v=t.allowPinchZoom,b=t.as,y=b===void 0?"div":b,m=pN(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),g=d,S=W8e([r,e]),P=Ks(Ks({},m),i);return C.createElement(C.Fragment,null,u&&C.createElement(g,{sideCar:fW,removeScrollBar:l,shards:f,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:r}),o?C.cloneElement(C.Children.only(a),Ks(Ks({},P),{ref:S})):C.createElement(y,Ks({},P,{className:c,ref:S}),a))});Zb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zb.classNames={fullWidth:Zv,zeroRight:Xv};var SI,K8e=function(){if(SI)return SI;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Q8e(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=K8e();return e&&t.setAttribute("nonce",e),t}function Y8e(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function J8e(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var X8e=function(){var t=0,e=null;return{add:function(r){t==0&&(e=Q8e())&&(Y8e(e,r),J8e(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Z8e=function(){var t=X8e();return function(e,r){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},dW=function(){var t=Z8e(),e=function(r){var n=r.styles,i=r.dynamic;return t(n,i),null};return e},eke={left:0,top:0,right:0,gap:0},gE=function(t){return parseInt(t||"",10)||0},tke=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[gE(r),gE(n),gE(i)]},rke=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return eke;var e=tke(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},nke=dW(),ike=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(F8e,` { + */var kz={L:Zu.QrCode.Ecc.LOW,M:Zu.QrCode.Ecc.MEDIUM,Q:Zu.QrCode.Ecc.QUARTILE,H:Zu.QrCode.Ecc.HIGH},Az=128,_z="L",Pz="#FFFFFF",Tz="#000000",Iz=!1,lk=4,T3e=.1;function Oz(t,e=0){const r=[];return t.forEach(function(n,i){let s=null;n.forEach(function(o,a){if(!o&&s!==null){r.push(`M${s+e} ${i+e}h${a-s}v1H${s+e}z`),s=null;return}if(a===n.length-1){if(!o)return;s===null?r.push(`M${a+e},${i+e} h1v1H${a+e}z`):r.push(`M${s+e},${i+e} h${a+1-s}v1H${s+e}z`);return}o&&s===null&&(s=a)})}),r.join("")}function Rz(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((i,s)=>s=e.x+e.w?i:!1))}function $z(t,e,r,n){if(n==null)return null;const i=r?lk:0,s=t.length+i*2,o=Math.floor(e*T3e),a=s/e,c=(n.width||o)*a,l=(n.height||o)*a,u=n.x==null?t.length/2-c/2:n.x*a,f=n.y==null?t.length/2-l/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(u),p=Math.floor(f),v=Math.ceil(c+u-h),b=Math.ceil(l+f-p);d={x:h,y:p,w:v,h:b}}return{x:u,y:f,h:l,w:c,excavation:d}}var I3e=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function O3e(t){const e=t,{value:r,size:n=Az,level:i=_z,bgColor:s=Pz,fgColor:o=Tz,includeMargin:a=Iz,style:c,imageSettings:l}=e,u=ck(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),f=l==null?void 0:l.src,d=C.useRef(null),h=C.useRef(null),[p,v]=C.useState(!1);C.useEffect(()=>{if(d.current!=null){const m=d.current,g=m.getContext("2d");if(!g)return;let S=Zu.QrCode.encodeText(r,kz[i]).getModules();const P=a?lk:0,T=S.length+P*2,w=$z(S,n,a,l),I=h.current,B=w!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;B&&w.excavation!=null&&(S=Rz(S,w.excavation));const j=window.devicePixelRatio||1;m.height=m.width=n*j;const H=n/T*j;g.scale(H,H),g.fillStyle=s,g.fillRect(0,0,T,T),g.fillStyle=o,I3e?g.fill(new Path2D(Oz(S,P))):S.forEach(function(G,F){G.forEach(function(E,_){E&&g.fillRect(_+P,F+P,1,1)})}),B&&g.drawImage(I,w.x+P,w.y+P,w.w,w.h)}}),C.useEffect(()=>{v(!1)},[f]);const b=u1({height:n,width:n},c);let y=null;return f!=null&&(y=x.createElement("img",{src:f,key:f,style:{display:"none"},onLoad:()=>{v(!0)},ref:h})),x.createElement(x.Fragment,null,x.createElement("canvas",u1({style:b,height:n,width:n,ref:d},u)),y)}function R3e(t){const e=t,{value:r,size:n=Az,level:i=_z,bgColor:s=Pz,fgColor:o=Tz,includeMargin:a=Iz,imageSettings:c}=e,l=ck(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let u=Zu.QrCode.encodeText(r,kz[i]).getModules();const f=a?lk:0,d=u.length+f*2,h=$z(u,n,a,c);let p=null;c!=null&&h!=null&&(h.excavation!=null&&(u=Rz(u,h.excavation)),p=x.createElement("image",{xlinkHref:c.src,height:h.h,width:h.w,x:h.x+f,y:h.y+f,preserveAspectRatio:"none"}));const v=Oz(u,f);return x.createElement("svg",u1({height:n,width:n,viewBox:`0 0 ${d} ${d}`},l),x.createElement("path",{fill:s,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),x.createElement("path",{fill:o,d:v,shapeRendering:"crispEdges"}),p)}var $3e=t=>{const e=t,{renderAs:r}=e,n=ck(e,["renderAs"]);return r==="svg"?x.createElement(R3e,u1({},n)):x.createElement(O3e,u1({},n))},Mz={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(ul,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",c="hour",l="day",u="week",f="month",d="quarter",h="year",p="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var _=["th","st","nd","rd"],O=E%100;return"["+E+(_[(O-20)%10]||_[O]||_[0])+"]"}},g=function(E,_,O){var N=String(E);return!N||N.length>=_?E:""+Array(_+1-N.length).join(O)+E},S={s:g,z:function(E){var _=-E.utcOffset(),O=Math.abs(_),N=Math.floor(O/60),k=O%60;return(_<=0?"+":"-")+g(N,2,"0")+":"+g(k,2,"0")},m:function E(_,O){if(_.date()1)return E(L[0])}else{var M=_.name;T[M]=_,k=M}return!N&&k&&(P=k),k||!N&&P},j=function(E,_){if(I(E))return E.clone();var O=typeof _=="object"?_:{};return O.date=E,O.args=arguments,new G(O)},H=S;H.l=B,H.i=I,H.w=function(E,_){return j(E,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var G=function(){function E(O){this.$L=B(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[w]=!0}var _=E.prototype;return _.parse=function(O){this.$d=function(N){var k=N.date,$=N.utc;if(k===null)return new Date(NaN);if(H.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var L=k.match(b);if(L){var M=L[2]-1||0,A=(L[7]||"0").substring(0,3);return $?new Date(Date.UTC(L[1],M,L[3]||1,L[4]||0,L[5]||0,L[6]||0,A)):new Date(L[1],M,L[3]||1,L[4]||0,L[5]||0,L[6]||0,A)}}return new Date(k)}(O),this.init()},_.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},_.$utils=function(){return H},_.isValid=function(){return this.$d.toString()!==v},_.isSame=function(O,N){var k=j(O);return this.startOf(N)<=k&&k<=this.endOf(N)},_.isAfter=function(O,N){return j(O)`Invalid value for key ${t}`,z3e=t=>`Pattern length exceeds max of ${t}.`,W3e=t=>`Missing ${t} property in key`,H3e=t=>`Property 'weight' in key '${t}' must be a positive integer`,oI=Object.prototype.hasOwnProperty;class q3e{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let i=Bz(n);r+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Bz(t){let e=null,r=null,n=null,i=1,s=null;if(Xs(t)||Zo(t))n=t,e=aI(t),r=N5(t);else{if(!oI.call(t,"name"))throw new Error(W3e("name"));const o=t.name;if(n=o,oI.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(H3e(o));e=aI(o),r=N5(o),s=t.getFn}return{path:e,id:r,weight:i,src:n,getFn:s}}function aI(t){return Zo(t)?t:t.split(".")}function N5(t){return Zo(t)?t.join("."):t}function V3e(t,e){let r=[],n=!1;const i=(s,o,a)=>{if(fi(s))if(!o[a])r.push(s);else{let c=o[a];const l=s[c];if(!fi(l))return;if(a===o.length-1&&(Xs(l)||Dz(l)||F3e(l)))r.push(L3e(l));else if(Zo(l)){n=!0;for(let u=0,f=l.length;ut.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Xs(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();Xs(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r{let o=i.getFn?i.getFn(e):this.getFn(e,i.path);if(fi(o)){if(Zo(o)){let a=[];const c=[{nestedArrIndex:-1,value:o}];for(;c.length;){const{nestedArrIndex:l,value:u}=c.pop();if(fi(u))if(Xs(u)&&!dE(u)){let f={v:u,i:l,n:this.norm.get(u)};a.push(f)}else Zo(u)&&u.forEach((f,d)=>{c.push({nestedArrIndex:d,value:f})})}n.$[s]=a}else if(Xs(o)&&!dE(o)){let a={v:o,n:this.norm.get(o)};n.$[s]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function jz(t,e,{getFn:r=Ce.getFn,fieldNormWeight:n=Ce.fieldNormWeight}={}){const i=new uk({getFn:r,fieldNormWeight:n});return i.setKeys(t.map(Bz)),i.setSources(e),i.create(),i}function Z3e(t,{getFn:e=Ce.getFn,fieldNormWeight:r=Ce.fieldNormWeight}={}){const{keys:n,records:i}=t,s=new uk({getFn:e,fieldNormWeight:r});return s.setKeys(n),s.setIndexRecords(i),s}function iv(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:i=Ce.distance,ignoreLocation:s=Ce.ignoreLocation}={}){const o=e/t.length;if(s)return o;const a=Math.abs(n-r);return i?o+a/i:a?1:o}function eSe(t=[],e=Ce.minMatchCharLength){let r=[],n=-1,i=-1,s=0;for(let o=t.length;s=e&&r.push([n,i]),n=-1)}return t[s-1]&&s-n>=e&&r.push([n,s-1]),r}const ll=32;function tSe(t,e,r,{location:n=Ce.location,distance:i=Ce.distance,threshold:s=Ce.threshold,findAllMatches:o=Ce.findAllMatches,minMatchCharLength:a=Ce.minMatchCharLength,includeMatches:c=Ce.includeMatches,ignoreLocation:l=Ce.ignoreLocation}={}){if(e.length>ll)throw new Error(z3e(ll));const u=e.length,f=t.length,d=Math.max(0,Math.min(n,f));let h=s,p=d;const v=a>1||c,b=v?Array(f):[];let y;for(;(y=t.indexOf(e,p))>-1;){let w=iv(e,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:l});if(h=Math.min(w,h),p=y+u,v){let I=0;for(;I=j;E-=1){let _=E-1,O=r[t.charAt(_)];if(v&&(b[_]=+!!O),G[E]=(G[E+1]<<1|1)&O,w&&(G[E]|=(m[E+1]|m[E])<<1|1|m[E+1]),G[E]&P&&(g=iv(e,{errors:w,currentLocation:_,expectedLocation:d,distance:i,ignoreLocation:l}),g<=h)){if(h=g,p=_,p<=d)break;j=Math.max(1,2*d-p)}}if(iv(e,{errors:w+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:l})>h)break;m=G}const T={isMatch:p>=0,score:Math.max(.001,g)};if(v){const w=eSe(b,a);w.length?c&&(T.indices=w):T.isMatch=!1}return T}function rSe(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:rSe(d),startIndex:h})},f=this.pattern.length;if(f>ll){let d=0;const h=f%ll,p=f-h;for(;d{const{isMatch:y,score:m,indices:g}=tSe(e,p,v,{location:i+b,distance:s,threshold:o,findAllMatches:a,minMatchCharLength:c,includeMatches:n,ignoreLocation:l});y&&(d=!0),f+=m,y&&g&&(u=[...u,...g])});let h={isMatch:d,score:d?f/this.chunks.length:1};return d&&n&&(h.indices=u),h}}class Fc{constructor(e){this.pattern=e}static isMultiMatch(e){return cI(e,this.multiRegex)}static isSingleMatch(e){return cI(e,this.singleRegex)}search(){}}function cI(t,e){const r=t.match(e);return r?r[1]:null}class nSe extends Fc{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class iSe extends Fc{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class sSe extends Fc{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class oSe extends Fc{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class aSe extends Fc{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class cSe extends Fc{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class zz extends Fc{constructor(e,{location:r=Ce.location,threshold:n=Ce.threshold,distance:i=Ce.distance,includeMatches:s=Ce.includeMatches,findAllMatches:o=Ce.findAllMatches,minMatchCharLength:a=Ce.minMatchCharLength,isCaseSensitive:c=Ce.isCaseSensitive,ignoreLocation:l=Ce.ignoreLocation}={}){super(e),this._bitapSearch=new Uz(e,{location:r,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Wz extends Fc{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const i=[],s=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+s,i.push([n,r-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const D5=[nSe,Wz,sSe,oSe,cSe,aSe,iSe,zz],lI=D5.length,lSe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,uSe="|";function fSe(t,e={}){return t.split(uSe).map(r=>{let n=r.trim().split(lSe).filter(s=>s&&!!s.trim()),i=[];for(let s=0,o=n.length;s!!(t[qy.AND]||t[qy.OR]),vSe=t=>!!t[B5.PATH],mSe=t=>!Zo(t)&&Lz(t)&&!j5(t),uI=t=>({[qy.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Hz(t,e,{auto:r=!0}={}){const n=i=>{let s=Object.keys(i);const o=vSe(i);if(!o&&s.length>1&&!j5(i))return n(uI(i));if(mSe(i)){const c=o?i[B5.PATH]:s[0],l=o?i[B5.PATTERN]:i[c];if(!Xs(l))throw new Error(U3e(c));const u={keyId:N5(c),pattern:l};return r&&(u.searcher=F5(l,e)),u}let a={children:[],operator:s[0]};return s.forEach(c=>{const l=i[c];Zo(l)&&l.forEach(u=>{a.children.push(n(u))})}),a};return j5(t)||(t=uI(t)),n(t)}function ySe(t,{ignoreFieldNorm:e=Ce.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:s,score:o})=>{const a=i?i.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:s))}),r.score=n})}function gSe(t,e){const r=t.matches;e.matches=[],fi(r)&&r.forEach(n=>{if(!fi(n.indices)||!n.indices.length)return;const{indices:i,value:s}=n;let o={indices:i,value:s};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function bSe(t,e){e.score=t.score}function wSe(t,e,{includeMatches:r=Ce.includeMatches,includeScore:n=Ce.includeScore}={}){const i=[];return r&&i.push(gSe),n&&i.push(bSe),t.map(s=>{const{idx:o}=s,a={item:e[o],refIndex:o};return i.length&&i.forEach(c=>{c(s,a)}),a})}class ea{constructor(e,r={},n){this.options={...Ce,...r},this.options.useExtendedSearch,this._keyStore=new q3e(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof uk))throw new Error(j3e);this._myIndex=r||jz(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){fi(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,i=this._docs.length;n-1&&(c=c.slice(0,r)),wSe(c,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const r=F5(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:s,i:o,n:a})=>{if(!fi(s))return;const{isMatch:c,score:l,indices:u}=r.searchIn(s);c&&i.push({item:s,idx:o,matches:[{score:l,value:s,norm:a,indices:u}]})}),i}_searchLogical(e){const r=Hz(e,this.options),n=(a,c,l)=>{if(!a.children){const{keyId:f,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(c,f),searcher:d});return h&&h.length?[{idx:l,item:c,matches:h}]:[]}const u=[];for(let f=0,d=a.children.length;f{if(fi(a)){let l=n(r,a,c);l.length&&(s[c]||(s[c]={idx:c,item:a,matches:[]},o.push(s[c])),l.forEach(({matches:u})=>{s[c].matches.push(...u)}))}}),o}_searchObjectList(e){const r=F5(e,this.options),{keys:n,records:i}=this._myIndex,s=[];return i.forEach(({$:o,i:a})=>{if(!fi(o))return;let c=[];n.forEach((l,u)=>{c.push(...this._findMatches({key:l,value:o[u],searcher:r}))}),c.length&&s.push({idx:a,item:o,matches:c})}),s}_findMatches({key:e,value:r,searcher:n}){if(!fi(r))return[];let i=[];if(Zo(r))r.forEach(({v:s,i:o,n:a})=>{if(!fi(s))return;const{isMatch:c,score:l,indices:u}=n.searchIn(s);c&&i.push({score:l,key:e,value:s,idx:o,norm:a,indices:u})});else{const{v:s,n:o}=r,{isMatch:a,score:c,indices:l}=n.searchIn(s);a&&i.push({score:c,key:e,value:s,norm:o,indices:l})}return i}}ea.version="6.6.2";ea.createIndex=jz;ea.parseIndex=Z3e;ea.config=Ce;ea.parseQuery=Hz;pSe(hSe);function qz(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;et.forEach(r=>xSe(r,e))}function uu(...t){return C.useCallback(Vz(...t),t)}function Gz(t,e=[]){let r=[];function n(s,o){const a=C.createContext(o),c=r.length;r=[...r,o];function l(f){const{scope:d,children:h,...p}=f,v=(d==null?void 0:d[t][c])||a,b=C.useMemo(()=>p,Object.values(p));return C.createElement(v.Provider,{value:b},h)}function u(f,d){const h=(d==null?void 0:d[t][c])||a,p=C.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return l.displayName=s+"Provider",[l,u]}const i=()=>{const s=r.map(o=>C.createContext(o));return function(a){const c=(a==null?void 0:a[t])||s;return C.useMemo(()=>({[`__scope${t}`]:{...a,[t]:c}}),[a,c])}};return i.scopeName=t,[n,CSe(i,...e)]}function CSe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=n.reduce((a,{useScope:c,scopeName:l})=>{const f=c(s)[`__scope${l}`];return{...a,...f}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const fk=C.forwardRef((t,e)=>{const{children:r,...n}=t,i=C.Children.toArray(r),s=i.find(kSe);if(s){const o=s.props.children,a=i.map(c=>c===s?C.Children.count(o)>1?C.Children.only(null):C.isValidElement(o)?o.props.children:null:c);return C.createElement(U5,nn({},n,{ref:e}),C.isValidElement(o)?C.cloneElement(o,void 0,a):null)}return C.createElement(U5,nn({},n,{ref:e}),r)});fk.displayName="Slot";const U5=C.forwardRef((t,e)=>{const{children:r,...n}=t;return C.isValidElement(r)?C.cloneElement(r,{...ASe(n,r.props),ref:e?Vz(e,r.ref):r.ref}):C.Children.count(r)>1?C.Children.only(null):null});U5.displayName="SlotClone";const SSe=({children:t})=>C.createElement(C.Fragment,null,t);function kSe(t){return C.isValidElement(t)&&t.type===SSe}function ASe(t,e){const r={...e};for(const n in e){const i=t[n],s=e[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...a)=>{s(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...s}:n==="className"&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...t,...r}}const _Se=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ip=_Se.reduce((t,e)=>{const r=C.forwardRef((n,i)=>{const{asChild:s,...o}=n,a=s?fk:e;return C.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.createElement(a,nn({},o,{ref:i}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function PSe(t,e){t&&_s.flushSync(()=>t.dispatchEvent(e))}function xc(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function TSe(t,e=globalThis==null?void 0:globalThis.document){const r=xc(t);C.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const z5="dismissableLayer.update",ISe="dismissableLayer.pointerDownOutside",OSe="dismissableLayer.focusOutside";let fI;const RSe=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$Se=C.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=t,u=C.useContext(RSe),[f,d]=C.useState(null),h=(r=f==null?void 0:f.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,p]=C.useState({}),v=uu(e,I=>d(I)),b=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(y),g=f?b.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,P=g>=m,T=MSe(I=>{const B=I.target,j=[...u.branches].some(H=>H.contains(B));!P||j||(s==null||s(I),a==null||a(I),I.defaultPrevented||c==null||c())},h),w=NSe(I=>{const B=I.target;[...u.branches].some(H=>H.contains(B))||(o==null||o(I),a==null||a(I),I.defaultPrevented||c==null||c())},h);return TSe(I=>{g===u.layers.size-1&&(i==null||i(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},h),C.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(fI=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),dI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=fI)}},[f,h,n,u]),C.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),dI())},[f,u]),C.useEffect(()=>{const I=()=>p({});return document.addEventListener(z5,I),()=>document.removeEventListener(z5,I)},[]),C.createElement(ip.div,nn({},l,{ref:v,style:{pointerEvents:S?P?"auto":"none":void 0,...t.style},onFocusCapture:_l(t.onFocusCapture,w.onFocusCapture),onBlurCapture:_l(t.onBlurCapture,w.onBlurCapture),onPointerDownCapture:_l(t.onPointerDownCapture,T.onPointerDownCapture)}))});function MSe(t,e=globalThis==null?void 0:globalThis.document){const r=xc(t),n=C.useRef(!1),i=C.useRef(()=>{});return C.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){Kz(ISe,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function NSe(t,e=globalThis==null?void 0:globalThis.document){const r=xc(t),n=C.useRef(!1);return C.useEffect(()=>{const i=s=>{s.target&&!n.current&&Kz(OSe,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function dI(){const t=new CustomEvent(z5);document.dispatchEvent(t)}function Kz(t,e,r,{discrete:n}){const i=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),n?PSe(i,s):i.dispatchEvent(s)}let hE=0;function DSe(){C.useEffect(()=>{var t,e;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(t=r[0])!==null&&t!==void 0?t:hI()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:hI()),hE++,()=>{hE===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),hE--}},[])}function hI(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}const pE="focusScope.autoFocusOnMount",vE="focusScope.autoFocusOnUnmount",pI={bubbles:!1,cancelable:!0},LSe=C.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,c]=C.useState(null),l=xc(i),u=xc(s),f=C.useRef(null),d=uu(e,v=>c(v)),h=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(n){let v=function(g){if(h.paused||!a)return;const S=g.target;a.contains(S)?f.current=S:ka(f.current,{select:!0})},b=function(g){if(h.paused||!a)return;const S=g.relatedTarget;S!==null&&(a.contains(S)||ka(f.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const P of g)P.removedNodes.length>0&&ka(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const m=new MutationObserver(y);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),m.disconnect()}}},[n,a,h.paused]),C.useEffect(()=>{if(a){mI.add(h);const v=document.activeElement;if(!a.contains(v)){const y=new CustomEvent(pE,pI);a.addEventListener(pE,l),a.dispatchEvent(y),y.defaultPrevented||(FSe(WSe(Qz(a)),{select:!0}),document.activeElement===v&&ka(a))}return()=>{a.removeEventListener(pE,l),setTimeout(()=>{const y=new CustomEvent(vE,pI);a.addEventListener(vE,u),a.dispatchEvent(y),y.defaultPrevented||ka(v??document.body,{select:!0}),a.removeEventListener(vE,u),mI.remove(h)},0)}}},[a,l,u,h]);const p=C.useCallback(v=>{if(!r&&!n||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(b&&y){const m=v.currentTarget,[g,S]=BSe(m);g&&S?!v.shiftKey&&y===S?(v.preventDefault(),r&&ka(g,{select:!0})):v.shiftKey&&y===g&&(v.preventDefault(),r&&ka(S,{select:!0})):y===m&&v.preventDefault()}},[r,n,h.paused]);return C.createElement(ip.div,nn({tabIndex:-1},o,{ref:d,onKeyDown:p}))});function FSe(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(ka(n,{select:e}),document.activeElement!==r)return}function BSe(t){const e=Qz(t),r=vI(e,t),n=vI(e.reverse(),t);return[r,n]}function Qz(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function vI(t,e){for(const r of t)if(!jSe(r,{upTo:e}))return r}function jSe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function USe(t){return t instanceof HTMLInputElement&&"select"in t}function ka(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&USe(t)&&e&&t.select()}}const mI=zSe();function zSe(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=yI(t,e),t.unshift(e)},remove(e){var r;t=yI(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function yI(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function WSe(t){return t.filter(e=>e.tagName!=="A")}const Qf=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},HSe=l7["useId".toString()]||(()=>{});let qSe=0;function VSe(t){const[e,r]=C.useState(HSe());return Qf(()=>{t||r(n=>n??String(qSe++))},[t]),t||(e?`radix-${e}`:"")}const GSe=["top","right","bottom","left"],Cc=Math.min,di=Math.max,Vy=Math.round,sv=Math.floor,Sc=t=>({x:t,y:t}),KSe={left:"right",right:"left",bottom:"top",top:"bottom"},QSe={start:"end",end:"start"};function W5(t,e,r){return di(t,Cc(e,r))}function ta(t,e){return typeof t=="function"?t(e):t}function ra(t){return t.split("-")[0]}function Td(t){return t.split("-")[1]}function dk(t){return t==="x"?"y":"x"}function hk(t){return t==="y"?"height":"width"}function Id(t){return["top","bottom"].includes(ra(t))?"y":"x"}function pk(t){return dk(Id(t))}function YSe(t,e,r){r===void 0&&(r=!1);const n=Td(t),i=pk(t),s=hk(i);let o=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Gy(o)),[o,Gy(o)]}function JSe(t){const e=Gy(t);return[H5(t),e,H5(e)]}function H5(t){return t.replace(/start|end/g,e=>QSe[e])}function XSe(t,e,r){const n=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?i:n:e?n:i;case"left":case"right":return e?s:o;default:return[]}}function ZSe(t,e,r,n){const i=Td(t);let s=XSe(ra(t),r==="start",n);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(H5)))),s}function Gy(t){return t.replace(/left|right|bottom|top/g,e=>KSe[e])}function e8e(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yz(t){return typeof t!="number"?e8e(t):{top:t,right:t,bottom:t,left:t}}function Ky(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function gI(t,e,r){let{reference:n,floating:i}=t;const s=Id(e),o=pk(e),a=hk(o),c=ra(e),l=s==="y",u=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2,d=n[a]/2-i[a]/2;let h;switch(c){case"top":h={x:u,y:n.y-i.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:f};break;case"left":h={x:n.x-i.width,y:f};break;default:h={x:n.x,y:n.y}}switch(Td(e)){case"start":h[o]-=d*(r&&l?-1:1);break;case"end":h[o]+=d*(r&&l?-1:1);break}return h}const t8e=async(t,e,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:o}=r,a=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=gI(l,n,c),d=n,h={},p=0;for(let v=0;v({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:i,rects:s,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=ta(t,e)||{};if(l==null)return{};const f=Yz(u),d={x:r,y:n},h=pk(i),p=hk(h),v=await o.getDimensions(l),b=h==="y",y=b?"top":"left",m=b?"bottom":"right",g=b?"clientHeight":"clientWidth",S=s.reference[p]+s.reference[h]-d[h]-s.floating[p],P=d[h]-s.reference[h],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let w=T?T[g]:0;(!w||!await(o.isElement==null?void 0:o.isElement(T)))&&(w=a.floating[g]||s.floating[p]);const I=S/2-P/2,B=w/2-v[p]/2-1,j=Cc(f[y],B),H=Cc(f[m],B),G=j,F=w-v[p]-H,E=w/2-v[p]/2+I,_=W5(G,E,F),O=!c.arrow&&Td(i)!=null&&E!=_&&s.reference[p]/2-(EG<=0)){var B,j;const G=(((B=s.flip)==null?void 0:B.index)||0)+1,F=P[G];if(F)return{data:{index:G,overflows:I},reset:{placement:F}};let E=(j=I.filter(_=>_.overflows[0]<=0).sort((_,O)=>_.overflows[1]-O.overflows[1])[0])==null?void 0:j.placement;if(!E)switch(h){case"bestFit":{var H;const _=(H=I.map(O=>[O.placement,O.overflows.filter(N=>N>0).reduce((N,k)=>N+k,0)]).sort((O,N)=>O[1]-N[1])[0])==null?void 0:H[0];_&&(E=_);break}case"initialPlacement":E=a;break}if(i!==E)return{reset:{placement:E}}}return{}}}};function wI(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function EI(t){return GSe.some(e=>t[e]>=0)}const n8e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...i}=ta(t,e);switch(n){case"referenceHidden":{const s=await f1(e,{...i,elementContext:"reference"}),o=wI(s,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:EI(o)}}}case"escaped":{const s=await f1(e,{...i,altBoundary:!0}),o=wI(s,r.floating);return{data:{escapedOffsets:o,escaped:EI(o)}}}default:return{}}}}};async function i8e(t,e){const{placement:r,platform:n,elements:i}=t,s=await(n.isRTL==null?void 0:n.isRTL(i.floating)),o=ra(r),a=Td(r),c=Id(r)==="y",l=["left","top"].includes(o)?-1:1,u=s&&c?-1:1,f=ta(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const s8e=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,i=await i8e(e,t);return{x:r+i.x,y:n+i.y,data:i}}}},o8e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:y,y:m}=b;return{x:y,y:m}}},...c}=ta(t,e),l={x:r,y:n},u=await f1(e,c),f=Id(ra(i)),d=dk(f);let h=l[d],p=l[f];if(s){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=h+u[b],g=h-u[y];h=W5(m,h,g)}if(o){const b=f==="y"?"top":"left",y=f==="y"?"bottom":"right",m=p+u[b],g=p-u[y];p=W5(m,p,g)}const v=a.fn({...e,[d]:h,[f]:p});return{...v,data:{x:v.x-r,y:v.y-n}}}}},a8e=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=ta(t,e),u={x:r,y:n},f=Id(i),d=dk(f);let h=u[d],p=u[f];const v=ta(a,e),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const g=d==="y"?"height":"width",S=s.reference[d]-s.floating[g]+b.mainAxis,P=s.reference[d]+s.reference[g]-b.mainAxis;hP&&(h=P)}if(l){var y,m;const g=d==="y"?"width":"height",S=["top","left"].includes(ra(i)),P=s.reference[f]-s.floating[g]+(S&&((y=o.offset)==null?void 0:y[f])||0)+(S?0:b.crossAxis),T=s.reference[f]+s.reference[g]+(S?0:((m=o.offset)==null?void 0:m[f])||0)-(S?b.crossAxis:0);pT&&(p=T)}return{[d]:h,[f]:p}}}},c8e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:i,elements:s}=e,{apply:o=()=>{},...a}=ta(t,e),c=await f1(e,a),l=ra(r),u=Td(r),f=Id(r)==="y",{width:d,height:h}=n.floating;let p,v;l==="top"||l==="bottom"?(p=l,v=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=l,p=u==="end"?"top":"bottom");const b=h-c[p],y=d-c[v],m=!e.middlewareData.shift;let g=b,S=y;if(f){const T=d-c.left-c.right;S=u||m?Cc(y,T):T}else{const T=h-c.top-c.bottom;g=u||m?Cc(b,T):T}if(m&&!u){const T=di(c.left,0),w=di(c.right,0),I=di(c.top,0),B=di(c.bottom,0);f?S=d-2*(T!==0||w!==0?T+w:di(c.left,c.right)):g=h-2*(I!==0||B!==0?I+B:di(c.top,c.bottom))}await o({...e,availableWidth:S,availableHeight:g});const P=await i.getDimensions(s.floating);return d!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function kc(t){return Jz(t)?(t.nodeName||"").toLowerCase():"#document"}function yi(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function pa(t){var e;return(e=(Jz(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Jz(t){return t instanceof Node||t instanceof yi(t).Node}function na(t){return t instanceof Element||t instanceof yi(t).Element}function yo(t){return t instanceof HTMLElement||t instanceof yi(t).HTMLElement}function xI(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof yi(t).ShadowRoot}function sp(t){const{overflow:e,overflowX:r,overflowY:n,display:i}=Vi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(i)}function l8e(t){return["table","td","th"].includes(kc(t))}function vk(t){const e=mk(),r=Vi(t);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function u8e(t){let e=Yf(t);for(;yo(e)&&!Jb(e);){if(vk(e))return e;e=Yf(e)}return null}function mk(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Jb(t){return["html","body","#document"].includes(kc(t))}function Vi(t){return yi(t).getComputedStyle(t)}function Xb(t){return na(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Yf(t){if(kc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||xI(t)&&t.host||pa(t);return xI(e)?e.host:e}function Xz(t){const e=Yf(t);return Jb(e)?t.ownerDocument?t.ownerDocument.body:t.body:yo(e)&&sp(e)?e:Xz(e)}function d1(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=Xz(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=yi(i);return s?e.concat(o,o.visualViewport||[],sp(i)?i:[],o.frameElement&&r?d1(o.frameElement):[]):e.concat(i,d1(i,[],r))}function Zz(t){const e=Vi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const i=yo(t),s=i?t.offsetWidth:r,o=i?t.offsetHeight:n,a=Vy(r)!==s||Vy(n)!==o;return a&&(r=s,n=o),{width:r,height:n,$:a}}function yk(t){return na(t)?t:t.contextElement}function wf(t){const e=yk(t);if(!yo(e))return Sc(1);const r=e.getBoundingClientRect(),{width:n,height:i,$:s}=Zz(e);let o=(s?Vy(r.width):r.width)/n,a=(s?Vy(r.height):r.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const f8e=Sc(0);function eW(t){const e=yi(t);return!mk()||!e.visualViewport?f8e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function d8e(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==yi(t)?!1:e}function Vl(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),s=yk(t);let o=Sc(1);e&&(n?na(n)&&(o=wf(n)):o=wf(t));const a=d8e(s,r,n)?eW(s):Sc(0);let c=(i.left+a.x)/o.x,l=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const d=yi(s),h=n&&na(n)?yi(n):n;let p=d.frameElement;for(;p&&n&&h!==d;){const v=wf(p),b=p.getBoundingClientRect(),y=Vi(p),m=b.left+(p.clientLeft+parseFloat(y.paddingLeft))*v.x,g=b.top+(p.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=m,l+=g,p=yi(p).frameElement}}return Ky({width:u,height:f,x:c,y:l})}function h8e(t){let{rect:e,offsetParent:r,strategy:n}=t;const i=yo(r),s=pa(r);if(r===s)return e;let o={scrollLeft:0,scrollTop:0},a=Sc(1);const c=Sc(0);if((i||!i&&n!=="fixed")&&((kc(r)!=="body"||sp(s))&&(o=Xb(r)),yo(r))){const l=Vl(r);a=wf(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function p8e(t){return Array.from(t.getClientRects())}function tW(t){return Vl(pa(t)).left+Xb(t).scrollLeft}function v8e(t){const e=pa(t),r=Xb(t),n=t.ownerDocument.body,i=di(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=di(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+tW(t);const a=-r.scrollTop;return Vi(n).direction==="rtl"&&(o+=di(e.clientWidth,n.clientWidth)-i),{width:i,height:s,x:o,y:a}}function m8e(t,e){const r=yi(t),n=pa(t),i=r.visualViewport;let s=n.clientWidth,o=n.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;const l=mk();(!l||l&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a,y:c}}function y8e(t,e){const r=Vl(t,!0,e==="fixed"),n=r.top+t.clientTop,i=r.left+t.clientLeft,s=yo(t)?wf(t):Sc(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,c=i*s.x,l=n*s.y;return{width:o,height:a,x:c,y:l}}function CI(t,e,r){let n;if(e==="viewport")n=m8e(t,r);else if(e==="document")n=v8e(pa(t));else if(na(e))n=y8e(e,r);else{const i=eW(t);n={...e,x:e.x-i.x,y:e.y-i.y}}return Ky(n)}function rW(t,e){const r=Yf(t);return r===e||!na(r)||Jb(r)?!1:Vi(r).position==="fixed"||rW(r,e)}function g8e(t,e){const r=e.get(t);if(r)return r;let n=d1(t,[],!1).filter(a=>na(a)&&kc(a)!=="body"),i=null;const s=Vi(t).position==="fixed";let o=s?Yf(t):t;for(;na(o)&&!Jb(o);){const a=Vi(o),c=vk(o);!c&&a.position==="fixed"&&(i=null),(s?!c&&!i:!c&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||sp(o)&&!c&&rW(t,o))?n=n.filter(u=>u!==o):i=a,o=Yf(o)}return e.set(t,n),n}function b8e(t){let{element:e,boundary:r,rootBoundary:n,strategy:i}=t;const o=[...r==="clippingAncestors"?g8e(e,this._c):[].concat(r),n],a=o[0],c=o.reduce((l,u)=>{const f=CI(e,u,i);return l.top=di(f.top,l.top),l.right=Cc(f.right,l.right),l.bottom=Cc(f.bottom,l.bottom),l.left=di(f.left,l.left),l},CI(e,a,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function w8e(t){return Zz(t)}function E8e(t,e,r){const n=yo(e),i=pa(e),s=r==="fixed",o=Vl(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const c=Sc(0);if(n||!n&&!s)if((kc(e)!=="body"||sp(i))&&(a=Xb(e)),n){const l=Vl(e,!0,s,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else i&&(c.x=tW(i));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function SI(t,e){return!yo(t)||Vi(t).position==="fixed"?null:e?e(t):t.offsetParent}function nW(t,e){const r=yi(t);if(!yo(t))return r;let n=SI(t,e);for(;n&&l8e(n)&&Vi(n).position==="static";)n=SI(n,e);return n&&(kc(n)==="html"||kc(n)==="body"&&Vi(n).position==="static"&&!vk(n))?r:n||u8e(t)||r}const x8e=async function(t){let{reference:e,floating:r,strategy:n}=t;const i=this.getOffsetParent||nW,s=this.getDimensions;return{reference:E8e(e,await i(r),n),floating:{x:0,y:0,...await s(r)}}};function C8e(t){return Vi(t).direction==="rtl"}const S8e={convertOffsetParentRelativeRectToViewportRelativeRect:h8e,getDocumentElement:pa,getClippingRect:b8e,getOffsetParent:nW,getElementRects:x8e,getClientRects:p8e,getDimensions:w8e,getScale:wf,isElement:na,isRTL:C8e};function k8e(t,e){let r=null,n;const i=pa(t);function s(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const{left:l,top:u,width:f,height:d}=t.getBoundingClientRect();if(a||e(),!f||!d)return;const h=sv(u),p=sv(i.clientWidth-(l+f)),v=sv(i.clientHeight-(u+d)),b=sv(l),m={rootMargin:-h+"px "+-p+"px "+-v+"px "+-b+"px",threshold:di(0,Cc(1,c))||1};let g=!0;function S(P){const T=P[0].intersectionRatio;if(T!==c){if(!g)return o();T?o(!1,T):n=setTimeout(()=>{o(!1,1e-7)},100)}g=!1}try{r=new IntersectionObserver(S,{...m,root:i.ownerDocument})}catch{r=new IntersectionObserver(S,m)}r.observe(t)}return o(!0),s}function A8e(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=yk(t),u=i||s?[...l?d1(l):[],...d1(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=l&&a?k8e(l,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[m]=y;m&&m.target===l&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),l&&!c&&h.observe(l),h.observe(e));let p,v=c?Vl(t):null;c&&b();function b(){const y=Vl(t);v&&(y.x!==v.x||y.y!==v.y||y.width!==v.width||y.height!==v.height)&&r(),v=y,p=requestAnimationFrame(b)}return r(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),f&&f(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const _8e=(t,e,r)=>{const n=new Map,i={platform:S8e,...r},s={...i.platform,_c:n};return t8e(t,e,{...i,platform:s})},P8e=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:i}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?bI({element:n.current,padding:i}).fn(r):{}:n?bI({element:n,padding:i}).fn(r):{}}}};var Jv=typeof document<"u"?C.useLayoutEffect:C.useEffect;function Qy(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!Qy(t[n],e[n]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,i[n]))return!1;for(n=r;n--!==0;){const s=i[n];if(!(s==="_owner"&&t.$$typeof)&&!Qy(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function iW(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function kI(t,e){const r=iW(t);return Math.round(e*r)/r}function AI(t){const e=C.useRef(t);return Jv(()=>{e.current=t}),e}function T8e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=t,[u,f]=C.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=C.useState(n);Qy(d,n)||h(n);const[p,v]=C.useState(null),[b,y]=C.useState(null),m=C.useCallback(O=>{O!=T.current&&(T.current=O,v(O))},[v]),g=C.useCallback(O=>{O!==w.current&&(w.current=O,y(O))},[y]),S=s||p,P=o||b,T=C.useRef(null),w=C.useRef(null),I=C.useRef(u),B=AI(c),j=AI(i),H=C.useCallback(()=>{if(!T.current||!w.current)return;const O={placement:e,strategy:r,middleware:d};j.current&&(O.platform=j.current),_8e(T.current,w.current,O).then(N=>{const k={...N,isPositioned:!0};G.current&&!Qy(I.current,k)&&(I.current=k,_s.flushSync(()=>{f(k)}))})},[d,e,r,j]);Jv(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[l]);const G=C.useRef(!1);Jv(()=>(G.current=!0,()=>{G.current=!1}),[]),Jv(()=>{if(S&&(T.current=S),P&&(w.current=P),S&&P){if(B.current)return B.current(S,P,H);H()}},[S,P,H,B]);const F=C.useMemo(()=>({reference:T,floating:w,setReference:m,setFloating:g}),[m,g]),E=C.useMemo(()=>({reference:S,floating:P}),[S,P]),_=C.useMemo(()=>{const O={position:r,left:0,top:0};if(!E.floating)return O;const N=kI(E.floating,u.x),k=kI(E.floating,u.y);return a?{...O,transform:"translate("+N+"px, "+k+"px)",...iW(E.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:k}},[r,a,E.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:H,refs:F,elements:E,floatingStyles:_}),[u,H,F,E,_])}function I8e(t){const[e,r]=C.useState(void 0);return Qf(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}const sW="Popper",[oW,aW]=Gz(sW),[O8e,cW]=oW(sW),R8e=t=>{const{__scopePopper:e,children:r}=t,[n,i]=C.useState(null);return C.createElement(O8e,{scope:e,anchor:n,onAnchorChange:i},r)},$8e="PopperAnchor",M8e=C.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...i}=t,s=cW($8e,r),o=C.useRef(null),a=uu(e,o);return C.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:C.createElement(ip.div,nn({},i,{ref:a}))}),lW="PopperContent",[N8e,T9e]=oW(lW),D8e=C.forwardRef((t,e)=>{var r,n,i,s,o,a,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:v=0,avoidCollisions:b=!0,collisionBoundary:y=[],collisionPadding:m=0,sticky:g="partial",hideWhenDetached:S=!1,updatePositionStrategy:P="optimized",onPlaced:T,...w}=t,I=cW(lW,u),[B,j]=C.useState(null),H=uu(e,ue=>j(ue)),[G,F]=C.useState(null),E=I8e(G),_=(r=E==null?void 0:E.width)!==null&&r!==void 0?r:0,O=(n=E==null?void 0:E.height)!==null&&n!==void 0?n:0,N=f+(h!=="center"?"-"+h:""),k=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},$=Array.isArray(y)?y:[y],L=$.length>0,M={padding:k,boundary:$.filter(L8e),altBoundary:L},{refs:A,floatingStyles:D,placement:V,isPositioned:R,middlewareData:U}=T8e({strategy:"fixed",placement:N,whileElementsMounted:(...ue)=>A8e(...ue,{animationFrame:P==="always"}),elements:{reference:I.anchor},middleware:[s8e({mainAxis:d+O,alignmentAxis:p}),b&&o8e({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?a8e():void 0,...M}),b&&r8e({...M}),c8e({...M,apply:({elements:ue,rects:ot,availableWidth:Pe,availableHeight:Ae})=>{const{width:at,height:xe}=ot.reference,be=ue.floating.style;be.setProperty("--radix-popper-available-width",`${Pe}px`),be.setProperty("--radix-popper-available-height",`${Ae}px`),be.setProperty("--radix-popper-anchor-width",`${at}px`),be.setProperty("--radix-popper-anchor-height",`${xe}px`)}}),G&&P8e({element:G,padding:v}),F8e({arrowWidth:_,arrowHeight:O}),S&&n8e({strategy:"referenceHidden",...M})]}),[W,q]=uW(V),Y=xc(T);Qf(()=>{R&&(Y==null||Y())},[R,Y]);const X=(i=U.arrow)===null||i===void 0?void 0:i.x,Q=(s=U.arrow)===null||s===void 0?void 0:s.y,Z=((o=U.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ae,se]=C.useState();return Qf(()=>{B&&se(window.getComputedStyle(B).zIndex)},[B]),C.createElement("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:R?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(a=U.transformOrigin)===null||a===void 0?void 0:a.x,(c=U.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:t.dir},C.createElement(N8e,{scope:u,placedSide:W,onArrowChange:F,arrowX:X,arrowY:Q,shouldHideArrow:Z},C.createElement(ip.div,nn({"data-side":W,"data-align":q},w,{ref:H,style:{...w.style,animation:R?void 0:"none",opacity:(l=U.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))});function L8e(t){return t!==null}const F8e=t=>({name:"transformOrigin",options:t,fn(e){var r,n,i,s,o;const{placement:a,rects:c,middlewareData:l}=e,f=((r=l.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=f?0:t.arrowWidth,h=f?0:t.arrowHeight,[p,v]=uW(a),b={start:"0%",center:"50%",end:"100%"}[v],y=((n=(i=l.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+d/2,m=((s=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&s!==void 0?s:0)+h/2;let g="",S="";return p==="bottom"?(g=f?b:`${y}px`,S=`${-h}px`):p==="top"?(g=f?b:`${y}px`,S=`${c.floating.height+h}px`):p==="right"?(g=`${-h}px`,S=f?b:`${m}px`):p==="left"&&(g=`${c.floating.width+h}px`,S=f?b:`${m}px`),{data:{x:g,y:S}}}});function uW(t){const[e,r="center"]=t.split("-");return[e,r]}const B8e=R8e,fW=M8e,j8e=D8e;function U8e(t,e){return C.useReducer((r,n)=>{const i=e[r][n];return i??r},t)}const dW=t=>{const{present:e,children:r}=t,n=z8e(e),i=typeof r=="function"?r({present:n.isPresent}):C.Children.only(r),s=uu(n.ref,i.ref);return typeof r=="function"||n.isPresent?C.cloneElement(i,{ref:s}):null};dW.displayName="Presence";function z8e(t){const[e,r]=C.useState(),n=C.useRef({}),i=C.useRef(t),s=C.useRef("none"),o=t?"mounted":"unmounted",[a,c]=U8e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const l=ov(n.current);s.current=a==="mounted"?l:"none"},[a]),Qf(()=>{const l=n.current,u=i.current;if(u!==t){const d=s.current,h=ov(l);t?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,c]),Qf(()=>{if(e){const l=f=>{const h=ov(n.current).includes(f.animationName);f.target===e&&h&&_s.flushSync(()=>c("ANIMATION_END"))},u=f=>{f.target===e&&(s.current=ov(n.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:C.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function ov(t){return(t==null?void 0:t.animationName)||"none"}function W8e({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,i]=H8e({defaultProp:e,onChange:r}),s=t!==void 0,o=s?t:n,a=xc(r),c=C.useCallback(l=>{if(s){const f=typeof l=="function"?l(t):l;f!==t&&a(f)}else i(l)},[s,t,i,a]);return[o,c]}function H8e({defaultProp:t,onChange:e}){const r=C.useState(t),[n]=r,i=C.useRef(n),s=xc(e);return C.useEffect(()=>{i.current!==n&&(s(n),i.current=n)},[n,i,s]),r}var q8e=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Cu=new WeakMap,av=new WeakMap,cv={},mE=0,hW=function(t){return t&&(t.host||hW(t.parentNode))},V8e=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=hW(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},G8e=function(t,e,r,n){var i=V8e(e,Array.isArray(t)?t:[t]);cv[r]||(cv[r]=new WeakMap);var s=cv[r],o=[],a=new Set,c=new Set(i),l=function(f){!f||a.has(f)||(a.add(f),l(f.parentNode))};i.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else{var h=d.getAttribute(n),p=h!==null&&h!=="false",v=(Cu.get(d)||0)+1,b=(s.get(d)||0)+1;Cu.set(d,v),s.set(d,b),o.push(d),v===1&&p&&av.set(d,!0),b===1&&d.setAttribute(r,"true"),p||d.setAttribute(n,"true")}})};return u(e),a.clear(),mE++,function(){o.forEach(function(f){var d=Cu.get(f)-1,h=s.get(f)-1;Cu.set(f,d),s.set(f,h),d||(av.has(f)||f.removeAttribute(n),av.delete(f)),h||f.removeAttribute(r)}),mE--,mE||(Cu=new WeakMap,Cu=new WeakMap,av=new WeakMap,cv={})}},K8e=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),i=e||q8e(t);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),G8e(n,i,r,"aria-hidden")):function(){return null}},Xv="right-scroll-bar-position",Zv="width-before-scroll-bar",Q8e="with-scroll-bars-hidden",Y8e="--removed-body-scroll-bar-size";function J8e(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function X8e(t,e){var r=C.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=e,r.facade}function Z8e(t,e){return X8e(e||null,function(r){return t.forEach(function(n){return J8e(n,r)})})}function eke(t){return t}function tke(t,e){e===void 0&&(e=eke);var r=[],n=!1,i={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var o=e(s,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(n=!0;r.length;){var o=r;r=[],o.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(s),o=r}var c=function(){var u=o;o=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){o.push(u),l()},filter:function(u){return o=o.filter(u),r}}}};return i}function rke(t){t===void 0&&(t={});var e=tke(null);return e.options=Ks({async:!0,ssr:!1},t),e}var pW=function(t){var e=t.sideCar,r=yN(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return C.createElement(n,Ks({},r))};pW.isSideCarExport=!0;function nke(t,e){return t.useMedium(e),pW}var vW=rke(),yE=function(){},Zb=C.forwardRef(function(t,e){var r=C.useRef(null),n=C.useState({onScrollCapture:yE,onWheelCapture:yE,onTouchMoveCapture:yE}),i=n[0],s=n[1],o=t.forwardProps,a=t.children,c=t.className,l=t.removeScrollBar,u=t.enabled,f=t.shards,d=t.sideCar,h=t.noIsolation,p=t.inert,v=t.allowPinchZoom,b=t.as,y=b===void 0?"div":b,m=yN(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),g=d,S=Z8e([r,e]),P=Ks(Ks({},m),i);return C.createElement(C.Fragment,null,u&&C.createElement(g,{sideCar:vW,removeScrollBar:l,shards:f,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!v,lockRef:r}),o?C.cloneElement(C.Children.only(a),Ks(Ks({},P),{ref:S})):C.createElement(y,Ks({},P,{className:c,ref:S}),a))});Zb.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zb.classNames={fullWidth:Zv,zeroRight:Xv};var _I,ike=function(){if(_I)return _I;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ske(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=ike();return e&&t.setAttribute("nonce",e),t}function oke(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ake(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var cke=function(){var t=0,e=null;return{add:function(r){t==0&&(e=ske())&&(oke(e,r),ake(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},lke=function(){var t=cke();return function(e,r){C.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},mW=function(){var t=lke(),e=function(r){var n=r.styles,i=r.dynamic;return t(n,i),null};return e},uke={left:0,top:0,right:0,gap:0},gE=function(t){return parseInt(t||"",10)||0},fke=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[gE(r),gE(n),gE(i)]},dke=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return uke;var e=fke(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},hke=mW(),pke=function(t,e,r,n){var i=t.left,s=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(Q8e,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -291,12 +296,12 @@ Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.val } body { - `).concat(j8e,": ").concat(a,`px; + `).concat(Y8e,": ").concat(a,`px; } -`)},ske=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=C.useMemo(function(){return rke(i)},[i]);return C.createElement(nke,{styles:ike(s,!e,i,r?"":"!important")})},V5=!1;if(typeof window<"u")try{var lv=Object.defineProperty({},"passive",{get:function(){return V5=!0,!0}});window.addEventListener("test",lv,lv),window.removeEventListener("test",lv,lv)}catch{V5=!1}var Su=V5?{passive:!1}:!1,oke=function(t){return t.tagName==="TEXTAREA"},hW=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!oke(t)&&r[e]==="visible")},ake=function(t){return hW(t,"overflowY")},cke=function(t){return hW(t,"overflowX")},kI=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=pW(t,r);if(n){var i=vW(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},lke=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},uke=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},pW=function(t,e){return t==="v"?ake(e):cke(e)},vW=function(t,e){return t==="v"?lke(e):uke(e)},fke=function(t,e){return t==="h"&&e==="rtl"?-1:1},dke=function(t,e,r,n,i){var s=fke(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=vW(t,a),p=h[0],v=h[1],b=h[2],y=v-b-s*p;(p||y)&&pW(t,a)&&(f+=y,d+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(i&&f===0||!i&&o>f)||!u&&(i&&d===0||!i&&-o>d))&&(l=!0),l},uv=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},AI=function(t){return[t.deltaX,t.deltaY]},_I=function(t){return t&&"current"in t?t.current:t},hke=function(t,e){return t[0]===e[0]&&t[1]===e[1]},pke=function(t){return` +`)},vke=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,i=n===void 0?"margin":n,s=C.useMemo(function(){return dke(i)},[i]);return C.createElement(hke,{styles:pke(s,!e,i,r?"":"!important")})},q5=!1;if(typeof window<"u")try{var lv=Object.defineProperty({},"passive",{get:function(){return q5=!0,!0}});window.addEventListener("test",lv,lv),window.removeEventListener("test",lv,lv)}catch{q5=!1}var Su=q5?{passive:!1}:!1,mke=function(t){return t.tagName==="TEXTAREA"},yW=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!mke(t)&&r[e]==="visible")},yke=function(t){return yW(t,"overflowY")},gke=function(t){return yW(t,"overflowX")},PI=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=gW(t,r);if(n){var i=bW(t,r),s=i[1],o=i[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},bke=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},wke=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},gW=function(t,e){return t==="v"?yke(e):gke(e)},bW=function(t,e){return t==="v"?bke(e):wke(e)},Eke=function(t,e){return t==="h"&&e==="rtl"?-1:1},xke=function(t,e,r,n,i){var s=Eke(t,window.getComputedStyle(e).direction),o=s*n,a=r.target,c=e.contains(a),l=!1,u=o>0,f=0,d=0;do{var h=bW(t,a),p=h[0],v=h[1],b=h[2],y=v-b-s*p;(p||y)&&gW(t,a)&&(f+=y,d+=p),a=a.parentNode}while(!c&&a!==document.body||c&&(e.contains(a)||e===a));return(u&&(i&&f===0||!i&&o>f)||!u&&(i&&d===0||!i&&-o>d))&&(l=!0),l},uv=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},TI=function(t){return[t.deltaX,t.deltaY]},II=function(t){return t&&"current"in t?t.current:t},Cke=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Ske=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},vke=0,ku=[];function mke(t){var e=C.useRef([]),r=C.useRef([0,0]),n=C.useRef(),i=C.useState(vke++)[0],s=C.useState(function(){return dW()})[0],o=C.useRef(t);C.useEffect(function(){o.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=tre([t.lockRef.current],(t.shards||[]).map(_I),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=C.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!o.current.allowPinchZoom;var y=uv(v),m=r.current,g="deltaX"in v?v.deltaX:m[0]-y[0],S="deltaY"in v?v.deltaY:m[1]-y[1],P,T=v.target,w=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in v&&w==="h"&&T.type==="range")return!1;var I=kI(w,T);if(!I)return!0;if(I?P=w:(P=w==="v"?"h":"v",I=kI(w,T)),!I)return!1;if(!n.current&&"changedTouches"in v&&(g||S)&&(n.current=P),!P)return!0;var F=n.current||P;return dke(F,b,v,F==="h"?g:S,!0)},[]),c=C.useCallback(function(v){var b=v;if(!(!ku.length||ku[ku.length-1]!==s)){var y="deltaY"in b?AI(b):uv(b),m=e.current.filter(function(P){return P.name===b.type&&P.target===b.target&&hke(P.delta,y)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var g=(o.current.shards||[]).map(_I).filter(Boolean).filter(function(P){return P.contains(b.target)}),S=g.length>0?a(b,g[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),l=C.useCallback(function(v,b,y,m){var g={name:v,delta:b,target:y,should:m};e.current.push(g),setTimeout(function(){e.current=e.current.filter(function(S){return S!==g})},1)},[]),u=C.useCallback(function(v){r.current=uv(v),n.current=void 0},[]),f=C.useCallback(function(v){l(v.type,AI(v),v.target,a(v,t.lockRef.current))},[]),d=C.useCallback(function(v){l(v.type,uv(v),v.target,a(v,t.lockRef.current))},[]);C.useEffect(function(){return ku.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Su),document.addEventListener("touchmove",c,Su),document.addEventListener("touchstart",u,Su),function(){ku=ku.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,Su),document.removeEventListener("touchmove",c,Su),document.removeEventListener("touchstart",u,Su)}},[]);var h=t.removeScrollBar,p=t.inert;return C.createElement(C.Fragment,null,p?C.createElement(s,{styles:pke(i)}):null,h?C.createElement(ske,{gapMode:"margin"}):null)}const yke=G8e(fW,mke);var mW=C.forwardRef(function(t,e){return C.createElement(Zb,Ks({},t,{ref:e,sideCar:yke}))});mW.classNames=Zb.classNames;const gke=mW,yW="Popover",[gW,wTe]=Wz(yW,[nW]),ew=nW(),[bke,Od]=gW(yW),wke=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,a=ew(e),c=C.useRef(null),[l,u]=C.useState(!1),[f=!1,d]=$8e({prop:n,defaultProp:i,onChange:s});return C.createElement(T8e,a,C.createElement(bke,{scope:e,contentId:DSe(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:l,onCustomAnchorAdd:C.useCallback(()=>u(!0),[]),onCustomAnchorRemove:C.useCallback(()=>u(!1),[]),modal:o},r))},Eke="PopoverAnchor",xke=C.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,i=Od(Eke,r),s=ew(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return C.useEffect(()=>(o(),()=>a()),[o,a]),C.createElement(aW,nn({},s,n,{ref:e}))}),Cke="PopoverTrigger",Ske=C.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,i=Od(Cke,r),s=ew(r),o=uu(e,i.triggerRef),a=C.createElement(ip.button,nn({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":wW(i.open)},n,{ref:o,onClick:_l(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:C.createElement(aW,nn({asChild:!0},s),a)}),kke="PopoverPortal",[ETe,Ake]=gW(kke,{forceMount:void 0}),h1="PopoverContent",_ke=C.forwardRef((t,e)=>{const r=Ake(h1,t.__scopePopover),{forceMount:n=r.forceMount,...i}=t,s=Od(h1,t.__scopePopover);return C.createElement(cW,{present:n||s.open},s.modal?C.createElement(Pke,nn({},i,{ref:e})):C.createElement(Tke,nn({},i,{ref:e})))}),Pke=C.forwardRef((t,e)=>{const r=Od(h1,t.__scopePopover),n=C.useRef(null),i=uu(e,n),s=C.useRef(!1);return C.useEffect(()=>{const o=n.current;if(o)return B8e(o)},[]),C.createElement(gke,{as:fk,allowPinchZoom:!0},C.createElement(bW,nn({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_l(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:_l(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:_l(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),Tke=C.forwardRef((t,e)=>{const r=Od(h1,t.__scopePopover),n=C.useRef(!1),i=C.useRef(!1);return C.createElement(bW,nn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),bW=C.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...f}=t,d=Od(h1,r),h=ew(r);return ASe(),C.createElement(_Se,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},C.createElement(CSe,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1)},C.createElement(I8e,nn({"data-state":wW(d.open),role:"dialog",id:d.contentId},h,f,{ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function wW(t){return t?"open":"closed"}const Ike=wke,Oke=xke,Rke=Ske,$ke=_ke,[Mke,Nke]=lu(),op=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=Mke();return{setOpenWalletModal:t,openWalletModalState:e}};function gn(){return gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}const or=(t,e)=>t.toLowerCase()===e.toLowerCase(),gk=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},EW=t=>`0x${gk((t==null?void 0:t.substring(2))||"",8)}`;var Aa=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Aa||{});const ia=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Aa.VERY_LARGE:e<1e-10?r=Aa.VERY_TINY:e<1?r=Aa.FRACTION:r=Aa.MIXED;let n,i;switch(r){case Aa.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case Aa.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case Aa.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",gn({notation:n},i)).format(e)},Dke=t=>t.charAt(0).toUpperCase()+t.slice(1),xW=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},Yy=t=>/0x[a-fA-F0-9]{40}/.test(t),Lke=t=>t>0?ve.colors.positive:t<0?ve.colors.negative:ve.colors.text50,PI=(t,e)=>{var r;const n=e.find(s=>or(s.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},go=({balance:t,prices:e,decimals:r,conversionRate:n})=>{var i;let s=0;const o=e.find(f=>or(f.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((i=o.price)==null?void 0:i.value)||0,c=xr(t.balance,r),l=parseFloat(c)*a;return s+=l,`${(s*n).toFixed(2)}`},CW=t=>{const e=[],r=[],n=[];return t.forEach(i=>{i.contractAddress===cr?e.push(i):i.contractType==="ERC20"?r.push(i):(i.contractType==="ERC721"||i.contractType==="ERC1155")&&n.push(i)}),{nativeTokens:e,erc20Tokens:r,collectibles:n}},SW=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},Jy=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await cn(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:cr,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:x8.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},bk=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await cn(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},Xy=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:s=!0})=>{try{const{indexerClient:o}=await cn(e),a=await o.getTokenBalances(gn({accountAddress:t,includeMetadata:s},r?{contractAddress:r}:{}));let c=(a==null?void 0:a.balances)||[];if(n&&c.length>0){const l=await bk({tokens:c.map(u=>({chainId:u.chainId,contractAddress:u.contractAddress,tokenId:u.tokenID}))});c=c.filter(u=>{const f=l==null?void 0:l.find(d=>or(d.token.contractAddress,u.contractAddress)&&d.token.chainId===u.chainId);return u.contractType!=="ERC20"||!!f&&f.price!==null})}return i&&c.length>0&&(c=c.filter(l=>l.contractType!=="ERC721"&&l.contractType!=="ERC1155")),c}catch(o){return console.error(o),[]}},Bke=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([Jy({accountAddress:t,chainId:e}),Xy({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(i){return console.error(i),[]}},kW=async({accountAddress:t,chainId:e,collectionAddress:r,includeMetadata:n=!0})=>{try{const{indexerClient:i}=await cn(e),s=await i.getTokenBalances({accountAddress:t,includeMetadata:n,contractAddress:r});return(s==null?void 0:s.balances)||[]}catch(i){return console.error(i),[]}},Fke=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:i})=>{let o=[];const a=r.length>0;try{if(a){const S=r.filter(I=>or(I.contractAddress,cr)),P=r.filter(I=>!or(I.contractAddress,cr)),T={},w={};S.forEach(I=>{T[I.chainId]||(T[I.chainId]=[]),T[I.chainId].push(I)}),P.forEach(I=>{w[I.chainId]||(w[I.chainId]=[]),w[I.chainId].push(I)}),o=(await Promise.all([...Object.keys(T).map(I=>Jy({accountAddress:t,chainId:Number(I)})),...Object.keys(w).map(I=>w[Number(I)].map(F=>Xy({accountAddress:t,chainId:Number(I),contractAddress:F.contractAddress},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:!1}))).flat()])).flat()}else o=(await Promise.all([...e.map(S=>Jy({accountAddress:t,chainId:S})),...e.map(S=>Xy({accountAddress:t,chainId:S},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:!1}))])).flat();const{nativeTokens:c,erc20Tokens:l,collectibles:u}=CW(o),f=new Promise(async(S,P)=>{if(l.length>0){const T=l.map(I=>({chainId:I.chainId,contractAddress:I.contractAddress})),w=await bk({tokens:T})||[];S(w)}else S([])}),d=u.map(async S=>a?S:await kW({accountAddress:t,chainId:S.chainId,collectionAddress:S.contractAddress,includeMetadata:!1})),h=async()=>{const S={},P={};l.forEach(w=>{P[w.chainId]?P[w.chainId].push(w):P[w.chainId]=[w]});const T=Object.keys(P).map(async w=>{const{metadataClient:I}=cn(w),j=P[Number(w)].map(G=>G.contractAddress),H=await I.getContractInfoBatch({chainID:String(w),contractAddresses:j});S[Number(w)]=H});return await Promise.all([...T]),S},[p,v,...b]=await Promise.all([f,h(),...d]),y=l.sort((S,P)=>{var T,w;const I=p.find(k=>or(k.token.contractAddress,S.contractAddress)),F=p.find(k=>or(k.token.contractAddress,P.contractAddress)),j=I!=null&&I.price?I.price.value:0,H=F!=null&&F.price?F.price.value:0,G=(T=v[S.chainId].contractInfoMap[S.contractAddress])==null?void 0:T.decimals,B=(w=v[P.chainId].contractInfoMap[P.contractAddress])==null?void 0:w.decimals,E=G===void 0?0:Number(xr(S.balance,G)),_=B===void 0?0:Number(xr(P.balance,B)),O=E*j;return _*H-O}),m=e3e(b.flat(),10).sort((S,P)=>S.contractAddress.localeCompare(P.contractAddress));return i?[...c.length>0?[c[0]]:[],...y.length>0?y.slice(0,11):[]]:[...c.length>0?[c[0]]:[],...y.length>0?[y[0]]:[],...m.length>0?[...m]:[]]}catch(c){return console.error(c),[]}},jke=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n})=>{const{indexerClient:i}=await cn(e);return(await i.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n})).balances[0]},Uke=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await cn(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},AW=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:i})=>{const{indexerClient:s}=cn(t);return s.getTransactionHistory({includeMetadata:!0,page:i,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},zke=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(s=>AW({chainId:s,accountAddress:e,page:{page:1}}))])).map(s=>s.transactions).flat().sort((s,o)=>{const a=new Date(s.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),Wke=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=cn(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},Hke=async({tokens:t})=>{const{metadataClient:e}=cn(t.chainId);return(await e.getTokenMetadata({chainID:t.chainId.toString(),contractAddress:t.contractAddress,tokenIDs:t.tokenIds})).tokenMetadata},qke=async t=>{const{metadataClient:e}=cn(Number(t.chainID));return(await e.getContractInfo(t)).contractInfo},Vke=["chainIds"],Gke=["disabled"],Xi={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},wk=(t,e)=>si({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=tw(t,Vke);return(await Promise.all(r.map(s=>Bke(gn({},n,{chainId:s}),e)))).flat()},retry:!0,staleTime:10*Xi.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),Kke=t=>si({queryKey:["collectionBalance",t],queryFn:()=>kW(t),retry:!0,staleTime:10*Xi.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),fu=t=>{let{disabled:e}=t,r=tw(t,Gke);return si({queryKey:["coinPrices",r],queryFn:()=>bk(r),retry:!0,staleTime:1*Xi.oneMinute,enabled:r.tokens.length>0&&!e})},Qke=(t,e)=>si({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>Fke(t,e),retry:!0,staleTime:10*Xi.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),Yke=(t,e)=>si({queryKey:["coinBalance",t,e],queryFn:()=>or((t==null?void 0:t.contractAddress)||"",cr)?Jy({accountAddress:t.accountAddress,chainId:t.chainId}).then(i=>i[0]):Xy(t,e).then(n=>n[0]),retry:!0,staleTime:1*Xi.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),_W=t=>si({queryKey:["collectibleBalance",t],queryFn:()=>jke(t),retry:!0,staleTime:5*Xi.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),PW=t=>si({queryKey:["useCollectiblePrices",t],queryFn:()=>Uke(t),retry:!0,staleTime:5*Xi.oneMinute,enabled:t.tokens.length>0}),TW=t=>Ule({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>AW(gn({},t,e?{page:{page:e}}:{page:{page:1}})),getNextPageParam:({page:e})=>{if(e.more)return(e==null?void 0:e.page)||1},retry:!0,staleTime:10*Xi.oneMinute,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),Jke=t=>si({queryKey:["transactionHistorySummary",t],queryFn:()=>zke(t),retry:!0,staleTime:10*Xi.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),Fc=t=>si({queryKey:["useConversionRate",t],queryFn:()=>Wke(t),retry:!0,staleTime:60*Xi.oneMinute}),Xke=t=>si({queryKey:["useTokenMetadata",t],queryFn:()=>Hke(t),retry:!0,staleTime:60*Xi.oneMinute,enabled:!!t.tokens.chainId&&!!t.tokens.contractAddress}),Zke=t=>si({queryKey:["useContractInfo",t],queryFn:()=>qke(t),retry:!0,staleTime:60*Xi.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[eAe,tAe]=lu(),Os=()=>{const{setHistory:t,history:e}=eAe();return{setNavigation:i=>{const s=document.getElementById("sequence-kit-wallet-content"),o=s==null?void 0:s.parentElement;o==null||o.scrollTo(0,0);const a=[...e,i];t(a)},history:e,setHistory:t,goBack:()=>{const i=[...e];i.pop(),t(i)}}},rAe=[{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],nAe=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],iAe=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],IW=[{symbol:"USD",sign:"$",name:{message:"US Dollar"},decimals:2},{symbol:"CAD",sign:"$",name:{message:"Canadian Dollar"},decimals:2},{symbol:"GBP",sign:"£",name:{message:"British Pound Sterling"},decimals:2},{symbol:"EUR",sign:"€",name:{message:"Euro"},decimals:2},{symbol:"CNY",sign:"¥",name:{message:"Chinese Yuan"},decimals:2},{symbol:"JPY",sign:"¥",name:{message:"Japanese Yen"},decimals:2},{symbol:"KRW",sign:"₩",name:{message:"South Korean Won"},decimals:2},{symbol:"SGD",sign:"$",name:{message:"Singapore Dollar"},decimals:2},{symbol:"CHF",sign:"CHF ",name:{message:"Swiss Franc"},decimals:2},{symbol:"AUD",sign:"$",name:{message:"Australian Dollar"},decimals:2},{symbol:"NZD",sign:"$",name:{message:"New Zealand Dollar"},decimals:2},{symbol:"SEK",sign:"kr ",name:{message:"Swedish Krona"},decimals:2},{symbol:"NOK",sign:"kr ",name:{message:"Norwegian Krone"},decimals:2},{symbol:"MXN",sign:"$",name:{message:"Mexican Peso"},decimals:2},{symbol:"INR",sign:"₹",name:{message:"Indian Rupee"},decimals:2},{symbol:"ZAR",sign:"R ",name:{message:"South African Rand"},decimals:2},{symbol:"TRY",sign:"₺",name:{message:"Turkish Lira"},decimals:2},{symbol:"BRL",sign:"R$",name:{message:"Brazilian Real"},decimals:2},{symbol:"DKK",sign:"kr ",name:{message:"Danish Krone"},decimals:2},{symbol:"PLN",sign:"zł ",name:{message:"Polish Zloty"},decimals:2},{symbol:"THB",sign:"฿",name:{message:"Thai Baht"},decimals:2},{symbol:"IDR",sign:"Rp",name:{message:"Indonesian Rupiah"},decimals:2}],sAe=IW[0],Ai="54px",Rs=navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px",Un=()=>{const{chains:t}=on(),e=()=>{let l=!0,u=!1,f=sAe,d=t.map(h=>h.id);try{const h=localStorage.getItem(yn.Settings),p=JSON.parse(h||"{}");if((p==null?void 0:p.hideUnlistedTokens)!==void 0&&(l=p==null?void 0:p.hideUnlistedTokens),(p==null?void 0:p.hideCollectibles)!==void 0&&(u=p==null?void 0:p.hideCollectibles),(p==null?void 0:p.fiatCurrency)!==void 0&&(f=p==null?void 0:p.fiatCurrency),(p==null?void 0:p.selectedNetworks)!==void 0){let v=!0;p.selectedNetworks.forEach(b=>{t.find(y=>y.id===b)===void 0&&(v=!1)}),v&&(d=p==null?void 0:p.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:l,hideCollectibles:u,fiatCurrency:f,selectedNetworks:d}},r=e(),[n,i]=C.useState(r);return gn({},n,{setFiatCurrency:l=>{const u=e(),f=gn({},u,{fiatCurrency:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)},setHideCollectibles:l=>{const u=e(),f=gn({},u,{hideCollectibles:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)},setHideUnlistedTokens:l=>{const u=e(),f=gn({},u,{hideUnlistedTokens:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)},setSelectedNetworks:l=>{const u=e(),f=gn({},u,{selectedNetworks:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)}})},oAe=({size:t=30})=>x.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},x.createElement(re,{variant:"large",color:"textInverse100"},"?")),Gl=({imageUrl:t,size:e=30})=>t?x.createElement(mr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):x.createElement(oAe,{size:e}),TI=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:i,priceChangePercentage:s,symbol:o})=>{const{fiatCurrency:a}=Un(),c=s>0?"+":"";return x.createElement(z,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},x.createElement(z,{marginBottom:"1"},x.createElement(Gl,{size:36,imageUrl:e})),x.createElement(z,{marginBottom:"3"},x.createElement(z,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},x.createElement(re,{fontWeight:"bold",whiteSpace:"nowrap",color:"text100",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),x.createElement(Gl,{size:12,imageUrl:t})),x.createElement(re,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),x.createElement(z,null,x.createElement(z,null,x.createElement(re,{fontWeight:"bold",color:"text100"},`${a.sign}${i}`)),x.createElement(re,{style:{color:Lke(s)}},`${c}${s.toFixed(2)}%`)))},II=({balance:t})=>{var e;const{chains:r=[]}=on(),{fiatCurrency:n}=Un(),i=or(t.contractAddress,cr),s=_r(t.chainId,r),{data:o=[],isLoading:a}=fu({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:c=1,isLoading:l}=Fc({toCurrency:n.symbol}),{data:u,isLoading:f}=Zke({chainID:String(t.chainId),contractAddress:t.contractAddress});if(a||l||f)return x.createElement(z,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(i){const P=go({balance:t,prices:o,conversionRate:c,decimals:s.decimals}),T=PI(t,o),w=xr(t.balance,s.decimals),I=ia(w);return x.createElement(TI,{networkLogoUrl:s.logoURI,logoUrl:s.logoURI,tokenName:s.name,balance:I,balanceFiat:P,priceChangePercentage:T,symbol:s.symbol})}const h=(e=u==null?void 0:u.decimals)!=null?e:18,p=go({balance:t,prices:o,conversionRate:c,decimals:h}),v=PI(t,o),b=xr(t.balance,h),y=ia(b),m=(u==null?void 0:u.name)||"Unknown",g=(u==null?void 0:u.name)||"TOKEN",S=u==null?void 0:u.logoURI;return x.createElement(TI,{networkLogoUrl:s.logoURI,logoUrl:S,tokenName:m,balance:y,balanceFiat:p,priceChangePercentage:v,symbol:g})},Ek=({imageUrl:t})=>x.createElement(ws,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"md",background:"backgroundSecondary"},x.createElement(mr,{style:{height:"100%"},src:t})),aAe=({balance:t})=>{var e;const{data:r}=Xke({tokens:{chainId:t.chainId,contractAddress:t.contractAddress,tokenIds:[t.tokenID]}}),n=r==null||(e=r[0])==null?void 0:e.image;return x.createElement(Ek,{imageUrl:n})};au("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const cAe=ZU({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),lAe=ki({height:"76px",backgroundColor:"#909090",animation:`${cAe} 2s ease-in-out infinite`},"skeleton");cu();const yt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>x.createElement(z,{className:lAe,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),uAe=()=>x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]}},Array(12).fill(null).map((t,e)=>x.createElement(z,{key:e},x.createElement(yt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));au("packages/wallet/src/shared/styles.css.ts","kit");const co=ki({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),xk=ki({"> div":{overflowY:"scroll"}},"scrollbar");Is(`html:not(.is-apple) ${xk} > div::-webkit-scrollbar-thumb`,{background:"none",backgroundClip:"content-box",transition:"background 0.5s linear"});Is(`html:not(.is-apple) ${xk} > div:hover::-webkit-scrollbar-thumb`,{background:ve.colors.text50,backgroundClip:"content-box"});const Ck=ki({},"walletContent");Is(`${Ck} + button`,{backgroundColor:"transparent"});Is(`${Ck} + button > svg`,{width:"20px",height:"20px"});cu();const fAe=()=>{const{address:t}=Sn(),{setNavigation:e}=Os(),{displayedAssets:r}=_xe(),{hideUnlistedTokens:n,hideCollectibles:i,selectedNetworks:s}=Un(),{data:o=[],isLoading:a}=Qke({accountAddress:t||"",chainIds:s,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:i});if(a)return x.createElement(uAe,null);const{nativeTokens:c,erc20Tokens:l,collectibles:u}=CW(o),f=d=>{d.contractType==="ERC1155"||d.contractType==="ERC721"?e&&e({location:"collectible-details",params:{contractAddress:d.contractAddress,chainId:d.chainId,tokenId:d.tokenID}}):d.contractType==="ERC20"?e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}}):e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}})};return x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]}},c.map(d=>x.createElement(z,{key:d.contractAddress,className:co,aspectRatio:"1/1",onClick:()=>f(d)},x.createElement(II,{balance:d}))),l.map(d=>x.createElement(z,{className:co,key:d.contractAddress,aspectRatio:"1/1",onClick:()=>f(d)},x.createElement(II,{balance:d}))),u.map(d=>x.createElement(z,{className:co,aspectRatio:"1/1",key:`${d.contractAddress}-${d.tokenID}}`,onClick:()=>f(d)},x.createElement(aAe,{balance:d}))))},dAe=()=>x.createElement(z,{paddingLeft:"5",paddingBottom:"5",gap:"4",flexDirection:"column",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(fAe,null)),hAe=()=>{const{address:t}=Sn(),{chain:e,chains:r=[]}=on(),[n,i]=C.useState(!1),s=_r((e==null?void 0:e.id)||1,r);C.useEffect(()=>{n&&setTimeout(()=>{i(!1)},4e3)},[n]);const o=()=>{i(!0)},a=()=>{window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},x.createElement(z,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},x.createElement(C3e,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),x.createElement(z,null,x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},x.createElement(re,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),x.createElement(mr,{width:"5",src:s.logoURI,alt:"icon"})),x.createElement(z,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},x.createElement(re,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),x.createElement(z,{gap:"3"},x.createElement(gz.CopyToClipboard,{text:t||""},x.createElement(tt,{onClick:o,leftIcon:Bg,label:n?"Copied!":"Copy"})),x.createElement(tt,{onClick:a,leftIcon:cne,label:"Share"})),x.createElement(z,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},x.createElement(re,{color:"text100",variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${s.name} address. Please only send assets on the ${s.name} network.`))))},OW=({imageUrl:t,name:e,decimals:r,balance:n,symbol:i,fiatValue:s,chainId:o,showSquareImage:a})=>{const{chains:c=[]}=on(),{fiatCurrency:l}=Un(),u=xr(n,r),f=ia(u),d=_r(o,c);return x.createElement(z,{alignItems:"flex-end",justifyContent:"space-between"},x.createElement(z,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?x.createElement(z,{style:{width:"40px"}},x.createElement(Ek,{imageUrl:t})):x.createElement(Gl,{imageUrl:t,size:40}),x.createElement(z,{flexDirection:"column",alignItems:"flex-start"},x.createElement(z,{flexDirection:"row",alignItems:"center",gap:"1"},x.createElement(re,{variant:"medium",color:"text100"},e),x.createElement(Gl,{imageUrl:d.logoURI,size:12})),x.createElement(re,{color:"text50",variant:"normal"}," ",`${f} ${i} available`))),x.createElement(z,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},s&&x.createElement(re,{variant:"normal",color:"text100"},`${l.sign}${s}`)))},pAe=({chainId:t,contractAddress:e})=>{var r,n,i,s,o;const{chains:a=[]}=on(),c=xb(),{address:l="",connector:u}=Sn(),f=!!(u!=null&&(r=u._wallet)!=null&&r.isSequenceBased),d=c===t,h=!d&&!f,{switchNetwork:p}=GS(),v=C.useRef(null),{setOpenWalletModal:b}=op(),{fiatCurrency:y}=Un(),[m,g]=C.useState("0"),[S,P]=C.useState(""),{data:T}=VS(),{data:w=[],isLoading:I}=wk({accountAddress:l,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),F=_r(t,a),j=w.find(Q=>Q.contractAddress===e),{data:H=[],isLoading:G}=fu({tokens:[{chainId:t,contractAddress:e}]}),{data:B=1,isLoading:E}=Fc({toCurrency:y.symbol});if(I||G||E)return null;const O=or(e,cr),N=O?F.decimals:(j==null||(n=j.contractInfo)==null?void 0:n.decimals)||18,k=O?F.name:(j==null||(i=j.contractInfo)==null?void 0:i.name)||"",$=O?F.logoURI:j==null||(s=j.contractInfo)==null?void 0:s.logoURI,L=O?F.symbol:(j==null||(o=j.contractInfo)==null?void 0:o.symbol)||"",M=m===""?"0":m,A=Mf(M,N),D=go({balance:gn({},j,{balance:A.toString()}),prices:H,conversionRate:B,decimals:N}),V=A.gt((j==null?void 0:j.balance)||"0"),R=A.gt(0),U=Q=>{const{value:Z}=Q.target,ae=xW(Z,N);g(ae)},W=()=>{var Q;(Q=v.current)==null||Q.focus();const Z=xr((j==null?void 0:j.balance)||0,N).toString();g(Z)},q=async()=>{const Q=await navigator.clipboard.readText();P(Q)},Y=()=>{P("")},X=async Q=>{!d&&f&&p&&p(t),Q.preventDefault();const Z=Mf(M,N);O?T==null||T.sendTransaction({to:S,value:BigInt(Z.toString())}).catch(ae=>console.error("User rejected transaction",ae)):T==null||T.sendTransaction({to:j==null?void 0:j.contractAddress,data:new Br(nAe).encodeFunctionData("transfer",[S,Z.toHexString()])}).catch(ae=>console.error("User rejected transaction",ae)),b(!1)};return x.createElement(z,{padding:"5",paddingTop:"3",style:{marginTop:Ai},gap:"2",flexDirection:"column",as:"form",onSubmit:X},x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(OW,{imageUrl:$,decimals:N,name:k,symbol:L,balance:(j==null?void 0:j.balance)||"0",fiatValue:go({balance:j,prices:H,conversionRate:B,decimals:N}),chainId:t}),x.createElement(CD,{ref:v,style:{fontSize:ve.fontSizes.xlarge,fontWeight:ve.fontWeights.bold},name:"amount",value:m,onChange:U,controls:x.createElement(x.Fragment,null,x.createElement(re,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${y.sign}${D}`),x.createElement(tt,{size:"xs",shape:"square",label:"Max",onClick:W,"data-id":"maxCoin",flexShrink:"0"}),x.createElement(re,{fontSize:"xlarge",fontWeight:"bold",color:"text100"},L))}),V&&x.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(re,{fontSize:"normal",color:"text50"},"To"),Yy(S)?x.createElement(z,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:co,onClick:Y,style:{height:"52px"}},x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},x.createElement($1,{address:S,style:{width:"20px"}}),x.createElement(re,{color:"text100"},`0x${gk(S.substring(2),8)}`)),x.createElement(ru,{size:"xs"})):x.createElement($c,{value:S,onChange:Q=>P(Q.target.value),placeholder:`${F.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:x.createElement(tt,{size:"xs",shape:"square",label:"Paste",onClick:q,"data-id":"to-address",flexShrink:"0",leftIcon:Bg})})),h&&x.createElement(z,{marginTop:"3"},x.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),x.createElement(tt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>p&&p(t),disabled:d,style:{height:"52px",borderRadius:ve.radii.md}})),x.createElement(tt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!R||!Yy(S)||V||!d&&!f,label:"Send",rightIcon:oo,style:{height:"52px",borderRadius:ve.radii.md}}))},vAe=({chainId:t,contractAddress:e,tokenId:r})=>{var n,i,s,o,a;const{chains:c=[]}=on(),l=xb(),{address:u="",connector:f}=Sn(),d=!!(f!=null&&(n=f._wallet)!=null&&n.isSequenceBased),h=l===t,p=!h&&!d,{switchNetwork:v}=GS(),b=C.useRef(null),{setOpenWalletModal:y}=op(),[m,g]=C.useState("0"),[S,P]=C.useState(""),{data:T}=VS(),{data:w,isLoading:I}=_W({accountAddress:u,chainId:t,collectionAddress:e,tokenId:r}),F=_r(t,c);if(I)return null;const H=(w==null||(i=w.tokenMetadata)==null?void 0:i.decimals)||0,G=(w==null||(s=w.tokenMetadata)==null?void 0:s.name)||"Unknown",B=(w==null||(o=w.tokenMetadata)==null?void 0:o.image)||(w==null||(a=w.contractInfo)==null?void 0:a.logoURI)||"",E=m===""?"0":m,_=Mf(E,H),O=_.gt((w==null?void 0:w.balance)||"0"),N=_.gt(0),k=q=>{const{value:Y}=q.target,X=xW(Y,H);g(X)},$=()=>{var q;(q=b.current)==null||q.focus();const Y=Number(m)-1,X=Math.max(Y,0).toString();g(X)},L=()=>{var q;(q=b.current)==null||q.focus();const Y=Number(m)+1,X=Number(xr((w==null?void 0:w.balance)||0,H)),Q=Math.min(Y,X).toString();g(Q)},M=()=>{var q;(q=b.current)==null||q.focus();const Y=xr((w==null?void 0:w.balance)||0,H).toString();g(Y)},A=async()=>{const q=await navigator.clipboard.readText();P(q)},D=()=>{P("")},V=async q=>{q.preventDefault(),!h&&d&&v&&v(t);const Y=Mf(E,H),{contractType:X}=w;switch(X){case"ERC721":T==null||T.sendTransaction({to:w.contractAddress,data:new Br(iAe).encodeFunctionData("safeTransferFrom",[u,S,r])}).catch(Q=>console.error("User rejected transaction",Q));break;case"ERC1155":default:T==null||T.sendTransaction({to:w.contractAddress,data:new Br(rAe).encodeFunctionData("safeBatchTransferFrom",[u,S,[r],[Y.toHexString()],[]])}).catch(Q=>console.error("User rejected transaction",Q))}y(!1)},R=xr((w==null?void 0:w.balance)||0,H).toString(),U=Number(m)===0,W=Number(m)>=Number(R);return x.createElement(z,{padding:"5",paddingTop:"3",style:{marginTop:Ai},gap:"2",flexDirection:"column",as:"form",onSubmit:V},x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(OW,{imageUrl:B,showSquareImage:!0,decimals:H,name:G,symbol:"",balance:(w==null?void 0:w.balance)||"0",chainId:t}),x.createElement(CD,{ref:b,style:{fontSize:ve.fontSizes.xlarge,fontWeight:ve.fontWeights.bold},name:"amount",value:m,onChange:k,controls:x.createElement(z,{gap:"2"},x.createElement(tt,{disabled:U,size:"xs",onClick:$,leftIcon:fne}),x.createElement(tt,{disabled:W,size:"xs",onClick:L,leftIcon:Bre}),x.createElement(tt,{size:"xs",shape:"square",label:"Max",onClick:M,"data-id":"maxCoin",flexShrink:"0"}))}),O&&x.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(re,{fontSize:"normal",color:"text50"},"To"),Yy(S)?x.createElement(z,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:co,onClick:D,style:{height:"52px"}},x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},x.createElement($1,{address:S,style:{width:"20px"}}),x.createElement(re,{color:"text100"},`0x${gk(S.substring(2),8)}`)),x.createElement(ru,{size:"xs"})):x.createElement($c,{value:S,onChange:q=>P(q.target.value),placeholder:`${F.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:x.createElement(tt,{size:"xs",shape:"square",label:"Paste",onClick:A,"data-id":"to-address",flexShrink:"0",leftIcon:Bg})})),p&&x.createElement(z,{marginTop:"3"},x.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),x.createElement(tt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>v&&v(t),disabled:h,style:{height:"52px",borderRadius:ve.radii.md}})),x.createElement(tt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!N||!Yy(S)||O||!h&&!d,label:"Send",rightIcon:oo,style:{height:"52px",borderRadius:ve.radii.md}}))},mAe=({transaction:t})=>{var e;const{chains:r=[]}=on(),{fiatCurrency:n}=Un(),{setNavigation:i}=Os(),s=()=>{i({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(m=>{const g=m.contractAddress;o.includes(g)||o.push(g)});const{data:a=[],isLoading:c}=fu({tokens:o.map(m=>({contractAddress:m,chainId:t.chainId}))}),{data:l=1,isLoading:u}=Fc({toCurrency:n.symbol}),f=c||u,{transfers:d}=t,h=_r(t.chainId,r),p=m=>{switch(m){case as.SEND:return x.createElement(Jx,{style:{transform:"rotate(270deg)",width:"16px"}});case as.RECEIVE:return x.createElement(Jx,{style:{transform:"rotate(90deg)",width:"16px"}});case as.UNKNOWN:default:return x.createElement(SN,{style:{width:"14px"}})}},v=m=>{switch(m){case as.SEND:return"Sent";case as.RECEIVE:return"Received";case as.UNKNOWN:default:return"Transacted"}},b=(m,g,S)=>{let P="";S===as.SEND?P="-":S===as.RECEIVE&&(P="+");let T="text50";return S===as.SEND?T=ve.colors.negative:S===as.RECEIVE&&(T=ve.colors.positive),x.createElement(re,{fontWeight:"bold",fontSize:"normal",style:{color:T}},`${P}${m} ${g}`)},y=({transfer:m,isFirstItem:g})=>{const{amounts:S}=m,P=Oz(t.timestamp).format("MMM DD, YYYY");return x.createElement(z,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",justifyContent:"space-between"},x.createElement(z,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},p(m.transferType),x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text100"},v(m.transferType)),x.createElement(mr,{src:h.logoURI,width:"3"})),g&&x.createElement(z,null,x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},P))),S.map((T,w)=>{var I,F,j,H,G,B;const E=_r(t.chainId,r),_=or(m.contractAddress,cr),O=((I=m.contractInfo)==null?void 0:I.type)==="ERC721"||((F=m.contractInfo)==null?void 0:F.type)==="ERC1155";let N;const k=(j=m.tokenIds)==null?void 0:j[w];if(O&&k){var $;N=(($=m.tokenMetadata)==null||($=$[k])==null?void 0:$.decimals)||0}else{var L;N=_?E.decimals:(L=m.contractInfo)==null?void 0:L.decimals}const M=xr(T,N),A=_?E.symbol:((H=m.contractInfo)==null?void 0:H.symbol)||"",D=_?E.logoURI:(G=m.contractInfo)==null?void 0:G.logoURI,V=(B=a.find(R=>or(R.token.contractAddress,m.contractAddress)))==null||(B=B.price)==null?void 0:B.value;return x.createElement(z,{key:w,flexDirection:"row",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},D&&x.createElement(mr,{src:D,width:"5",alt:"token logo"}),b(ia(M),A,m.transferType)),f&&x.createElement(yt,{width:"35px",height:"20px"}),V&&x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(M)*V*l).toFixed(2)}`))}))};return x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:co,onClick:()=>s()},d==null?void 0:d.map((m,g)=>x.createElement(z,{key:`${t.txnHash}-${g}`,width:"full"},y({transfer:m,isFirstItem:g===0}))))},Sk=()=>{const t=()=>x.createElement(z,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",justifyContent:"space-between"},x.createElement(yt,{width:"65px",height:"20px"}),x.createElement(yt,{width:"75px",height:"17px"})),x.createElement(z,{flexDirection:"row",justifyContent:"space-between"},x.createElement(yt,{width:"120px",height:"20px"}),x.createElement(yt,{width:"35px",height:"17px"})));return x.createElement(z,{flexDirection:"column",gap:"3"},x.createElement(yt,{width:"70px",height:"17px"}),x.createElement(z,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>x.createElement(z,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},kk=({transactions:t,isLoading:e,isFetchingNextPage:r})=>{const n=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"week",label:"Last Week"},{id:"month",label:"Last Month"},{id:"year",label:"Last Year"},{id:"years",label:"Past Years"}],i=C.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),c=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),l=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const p=new Date(h.timestamp).getTime();p>a?d.today.push(h):p>c?d.yesterday.push(h):p>l?d.week.push(h):p>u?d.month.push(h):p>f?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return x.createElement(z,{flexDirection:"column",gap:"2"},x.createElement(Sk,null));const s=({label:a})=>x.createElement(z,null,x.createElement(re,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>x.createElement(z,{flexDirection:"column",gap:"2"},a.map((c,l)=>x.createElement(z,{key:`${c.txnHash}-${l}`,flexDirection:"column",gap:"2"},x.createElement(mAe,{transaction:c}))));return x.createElement(z,{flexDirection:"column",gap:"5"},n.map(a=>{const c=i[a.id];return c.length===0?null:x.createElement(z,{key:a.id,flexDirection:"column",gap:"3"},x.createElement(s,{label:a.label}),x.createElement(o,{transactions:c}))}),t.length===0&&x.createElement(z,{flexDirection:"column",gap:"3"},x.createElement(s,{label:"History"}),x.createElement(re,{color:"text100"},"No Recent Transaction History Found")),r&&x.createElement(z,{margin:"4",alignItems:"center",justifyContent:"center"},x.createElement(sS,null)))},yAe=()=>{const{selectedNetworks:t}=Un(),{address:e}=Sn(),{data:r=[],isLoading:n}=Jke({accountAddress:e||"",chainIds:t});return x.createElement(z,null,x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(kk,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},Zy=({balance:t})=>{var e,r;const{chains:n=[]}=on(),{setNavigation:i}=Os(),s=or(t.contractAddress,cr),o=_r(t.chainId,n),a=s?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,c=s?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",l=()=>{var f,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=s?o.decimals:t==null||(f=t.contractInfo)==null?void 0:f.decimals,p=xr(t.balance,h||0),v=ia(p),b=s?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${v} ${b}`},u=()=>{const f=t.contractType==="ERC721"||t.contractType==="ERC1155";i(f?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return x.createElement(z,{key:t.contractAddress,onClick:u,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:co},x.createElement(z,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},x.createElement(Gl,{imageUrl:a,size:30}),x.createElement(z,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},x.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},c),x.createElement(mr,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},x.createElement(re,{color:"text50",fontWeight:"bold",fontSize:"normal"},l()),x.createElement(oo,{color:"text50"})))},OI=({toLocation:t,label:e})=>{const{setNavigation:r}=Os(),n=()=>{r(t)};return x.createElement(z,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:co},x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center"},x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),x.createElement(oo,{color:"text50",size:"sm"})))},gAe=()=>{const{chains:t=[]}=on(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Un(),[i,s]=C.useState(""),{address:o}=Sn(),{data:a,isLoading:c}=wk({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),l=(a==null?void 0:a.filter(j=>j.contractType==="ERC20"||or(j.contractAddress,cr)))||[],{data:u=[],isLoading:f}=fu({tokens:l.map(j=>({chainId:j.chainId,contractAddress:j.contractAddress}))}),{data:d=1,isLoading:h}=Fc({toCurrency:e.symbol}),p=l.sort((j,H)=>{var G,B;return Number(go({balance:H,prices:u,conversionRate:d,decimals:((G=H.contractInfo)==null?void 0:G.decimals)||18}))-Number(go({balance:j,prices:u,conversionRate:d,decimals:((B=H.contractInfo)==null?void 0:B.decimals)||18}))}),b=((a==null?void 0:a.filter(j=>j.contractType==="ERC721"||j.contractType==="ERC1155"))||[]).sort((j,H)=>Number(H.balance)-Number(j.balance)),y=c||f||h,m=b.map((j,H)=>{var G;return{index:H,name:((G=j.contractInfo)==null?void 0:G.name)||"Unknown"}}),g=p.map((j,H)=>{if(or(j.contractAddress,cr)){const B=_r(j.chainId,t);return{index:H,name:B.name}}else{var G;return{index:H,name:((G=j.contractInfo)==null?void 0:G.name)||"Unknown"}}}),S=p.length,P=b.length,T=new ea(g,{keys:["name"]}),w=new ea(m,{keys:["name"]}),I=(i===""?g:T.search(i).map(j=>j.item)).slice(0,5),F=(i===""?m:w.search(i).map(j=>j.item)).slice(0,5);return x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{width:"full"},x.createElement($c,{autoFocus:!0,name:"search wallet",leftIcon:Fg,value:i,onChange:j=>s(j.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),x.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},x.createElement(OI,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${P})`}),y?Array(5).fill(null).map((j,H)=>x.createElement(yt,{key:H,width:"100%",height:"32px"})):F.length===0?x.createElement(re,{color:"text100"},"No collections found"):F.map(j=>{const H=b[j.index];return x.createElement(Zy,{key:H.contractAddress,balance:H})})),x.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},x.createElement(OI,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${S})`}),y?Array(5).fill(null).map((j,H)=>x.createElement(yt,{key:H,width:"100%",height:"32px"})):I.length===0?x.createElement(re,{color:"text100"},"No coins found"):I.map(j=>{const H=p[j.index];return x.createElement(Zy,{key:H.contractAddress,balance:H})})))},bAe=({defaultTab:t})=>{const{chains:e=[]}=on(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:i}=Un(),[s,o]=C.useState(""),[a,c]=C.useState(t);C.useEffect(()=>{o("")},[a]);const{address:l}=Sn(),{data:u,isLoading:f}=wk({accountAddress:l||"",chainIds:i},{hideUnlistedTokens:n}),d=(u==null?void 0:u.filter(_=>_.contractType==="ERC20"||or(_.contractAddress,cr)))||[],{data:h=[],isLoading:p}=fu({tokens:d.map(_=>({chainId:_.chainId,contractAddress:_.contractAddress}))}),{data:v=1,isLoading:b}=Fc({toCurrency:r.symbol}),y=d.sort((_,O)=>{var N,k;return Number(go({balance:O,prices:h,conversionRate:v,decimals:((N=O.contractInfo)==null?void 0:N.decimals)||18}))-Number(go({balance:_,prices:h,conversionRate:v,decimals:((k=_.contractInfo)==null?void 0:k.decimals)||18}))}),g=((u==null?void 0:u.filter(_=>_.contractType==="ERC721"||_.contractType==="ERC1155"))||[]).sort((_,O)=>Number(O.balance)-Number(_.balance)),S=y.length,P=g.length,T=f||p||b,w=g.map((_,O)=>{var N;return{index:O,name:((N=_.contractInfo)==null?void 0:N.name)||"Unknown"}}),I=y.map((_,O)=>{if(or(_.contractAddress,cr)){const k=_r(_.chainId,e);return{index:O,name:k.name}}else{var N;return{index:O,name:((N=_.contractInfo)==null?void 0:N.name)||"Unknown"}}}),F=new ea(I,{keys:["name"]}),j=new ea(w,{keys:["name"]}),H=s===""?I:F.search(s).map(_=>_.item),G=s===""?w:j.search(s).map(_=>_.item),B=()=>x.createElement(yt,{width:"360px",height:"48px"}),E=()=>x.createElement(x.Fragment,null,Array(8).fill(null).map((_,O)=>x.createElement(yt,{key:O,width:"full",height:"32px"})));return x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{width:"full"},x.createElement($c,{autoFocus:!0,name:"search wallet",leftIcon:Fg,value:s,onChange:_=>o(_.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),x.createElement(z,{width:"full"},x.createElement(Cce,{value:a,onValueChange:_=>c(_)},x.createElement(z,{marginBottom:"5"},!T&&x.createElement(xce,{value:a,tabs:[{label:`Collections (${P})`,value:"collections"},{label:`Coins (${S})`,value:"coins"}]}),T&&x.createElement(B,null)),x.createElement(AP,{value:"collections"},x.createElement(z,{flexDirection:"column",gap:"3"},T&&x.createElement(E,null),!T&&G.length===0&&x.createElement(re,{color:"text100"},"No Collectibles Found"),!T&&G.length>0&&G.map(_=>{const O=g[_.index];return x.createElement(Zy,{key:O.contractAddress,balance:O})}))),x.createElement(AP,{value:"coins"},x.createElement(z,{flexDirection:"column",gap:"3"},T&&x.createElement(E,null),!T&&y.length==0&&x.createElement(re,{color:"text100"},"No Coins Found"),!T&&H.length>0&&H.map(_=>{const O=y[_.index];return x.createElement(Zy,{key:O.contractAddress,balance:O})}))))))},wAe=()=>{const{setNavigation:t}=Os(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{padding:"5",paddingTop:"3"},x.createElement(z,{flexDirection:"column",gap:"2"},x.createElement(tt,{onClick:e,leftIcon:xN,rightIcon:oo,width:"full",label:"General",style:{height:"52px",borderRadius:ve.radii.md}}),x.createElement(tt,{onClick:r,leftIcon:Gre,rightIcon:oo,width:"full",label:"Currency",style:{height:"52px",borderRadius:ve.radii.md}}),x.createElement(tt,{onClick:n,leftIcon:tne,rightIcon:oo,width:"full",label:"Networks",style:{height:"52px",borderRadius:ve.radii.md}}))))},EAe=()=>{const{theme:t,setTheme:e}=np(),{hideUnlistedTokens:r,setHideUnlistedTokens:n,hideCollectibles:i,setHideCollectibles:s}=Un(),o=()=>{e&&e(t==="light"?"dark":"light")},a=()=>{n(!r)},c=()=>{s(!i)};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},x.createElement(ws,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},"Dark mode"),x.createElement(O2,{checked:t==="dark",onCheckedChange:o})),x.createElement(ws,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},"Hide unlisted tokens"),x.createElement(O2,{checked:r,onCheckedChange:a})),x.createElement(ws,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},"Hide collectibles"),x.createElement(O2,{checked:i,onCheckedChange:c}))))},xAe=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return x.createElement(z,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":ve.radii.circle,width:"20px",height:"20px"}},x.createElement(z,{as:O0.div,background:n?"borderNormal":"backgroundInverse",position:"absolute",color:"textInverse100",initial:{opacity:e?1:0,scale:e?1:.5},animate:{opacity:e?1:0,scale:e?1:.5},transition:{ease:"backOut"},style:{borderRadius:n?"4px":ve.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&x.createElement(cd,{color:"white",style:{width:"14px",height:"14px"}})))},CAe=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],RW=t=>{const{value:e,selected:r,children:n,disabled:i,onClick:s,className:o,hideIndicator:a,squareIndicator:c=!1}=t,l=tw(t,CAe);return x.createElement(ws,gn({as:"button",clickable:!0,className:fSe(o),disabled:i,onClick:()=>s(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},l),n,!a&&x.createElement(xAe,{selected:r,squareIndicator:c}))},SAe=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Un();return x.createElement(z,{paddingBottom:"5",paddingLeft:"5",paddingTop:"3",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{flexDirection:"column",gap:"2"},IW.map(r=>x.createElement(RW,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},x.createElement(z,{gap:"2",justifyContent:"flex-start",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},r.symbol),x.createElement(re,{color:"text50"},r.name.message))))))},kAe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Un(),{chains:r=[]}=on(),n=i=>{if(t.includes(i)){if(t.length===1)return;e(t.filter(s=>s!==i))}else e([...t,i])};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{padding:"5",paddingTop:"3"},x.createElement(re,{variant:"small",color:"text50"},"Networks"),x.createElement(z,{flexDirection:"column",gap:"2"},r.map(i=>{const s=_r(i.id,r);return x.createElement(RW,{disabled:t.length===1&&t.includes(i.id),key:i.id,selected:t.includes(i.id),onClick:()=>n(i.id),value:i.id,squareIndicator:!0},x.createElement(z,{gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(mr,{width:"3",height:"3",src:s.logoURI,alt:"network"}),x.createElement(re,{color:"text100",variant:"small"},s.name)))}))))},ap=({chainId:t})=>{const{chains:e=[]}=on(),{network:r}=cn(t),n=_r(t,e),i=uxe(t),s=fxe(t);return x.createElement(z,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:s},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"min"},x.createElement(mr,{style:{width:"14px"},src:n.logoURI}),x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",style:{color:i}},Dke(r.name)))},AAe=({chainId:t})=>x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(yt,{width:"32px",height:"32px"}),x.createElement(yt,{height:"24px",width:"70px"}),x.createElement(ap,{chainId:t})),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(yt,{width:"150px",height:"36px"}),x.createElement(yt,{width:"33px",height:"17px"}))),x.createElement(tt,{marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:jg,label:"Send",disabled:!0,onClick:()=>{}}),x.createElement(z,null,x.createElement(Sk,null)))),_Ae=(t,e)=>{var r;const[n,i]=C.useState(null),s=C.useMemo(()=>new IntersectionObserver(([o])=>i(o),e),[]);return C.useEffect(()=>(t.current&&s.observe(t.current),()=>{t.current&&s.disconnect()}),[t.current,s]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},$W=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[i,s]=C.useState(0),[o,a]=C.useState(!1),c=C.useRef(null),l=_Ae(c);C.useEffect(()=>{l&&r&&!o&&u()},[l]);const u=async()=>{a(!0),await e(i),s(f=>f+1),a(!1)};return x.createElement(x.Fragment,null,n,x.createElement("div",{ref:c}))},PAe=({contractAddress:t,chainId:e})=>{var r,n,i,s;const{chains:o=[]}=on(),{setNavigation:a}=Os(),{fiatCurrency:c,hideUnlistedTokens:l}=Un(),{address:u}=Sn(),{data:f,isLoading:d,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:v}=TW({chainId:e,accountAddress:u||"",contractAddress:t}),b=SW(f),{data:y,isLoading:m}=Yke({accountAddress:u||"",contractAddress:t,chainId:e},{hideUnlistedTokens:l}),{data:g,isLoading:S}=fu({tokens:[{chainId:e,contractAddress:t}]}),{data:P=1,isLoading:T}=Fc({toCurrency:c.symbol});if(m||S||T)return x.createElement(AAe,{chainId:e});const I=or(t,cr),F=I?_r(e,o).logoURI:y==null||(r=y.contractInfo)==null?void 0:r.logoURI,j=I?_r(e,o).symbol:y==null||(n=y.contractInfo)==null?void 0:n.symbol,H=I?_r(e,o).name:y==null||(i=y.contractInfo)==null?void 0:i.name,G=I?_r(e,o).decimals:y==null||(s=y.contractInfo)==null?void 0:s.decimals,B=xr((y==null?void 0:y.balance)||"0",G),E=ia(B),_=y?go({balance:y,prices:g||[],conversionRate:P,decimals:G||0}):"0",O=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(mr,{width:"8",src:F,alt:"logo"}),x.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},H),x.createElement(ap,{chainId:e})),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${E} ${j}`),x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${c.sign}${_}`))),x.createElement(tt,{width:"full",variant:"primary",leftIcon:jg,label:"Send",onClick:O}),x.createElement(z,null,x.createElement($W,{onLoad:()=>h(),hasMore:p},x.createElement(kk,{transactions:b,isLoading:d,isFetchingNextPage:v})))))},TAe=({chainId:t})=>x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(yt,{width:"32px",height:"32px"}),x.createElement(yt,{width:"100px",height:"24px"}),x.createElement(ap,{chainId:t}),x.createElement(yt,{width:"142px",height:"17px"})),x.createElement(z,{width:"full"},x.createElement(yt,{width:"168px",height:"20px"}),x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>x.createElement(yt,{width:"full",aspectRatio:"1/1"}))))),IAe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Os(),{address:i}=Sn(),{data:s,isLoading:o}=Kke({chainId:t,accountAddress:i||"",collectionAddress:e}),a=s==null||(r=s[0])==null?void 0:r.contractInfo,c=a==null?void 0:a.logoURI;if(o)return x.createElement(TAe,{chainId:t});const l=u=>{n&&n({location:"collectible-details",params:{contractAddress:u.contractAddress,chainId:u.chainId,tokenId:u.tokenID}})};return x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(Gl,{imageUrl:c,size:32}),x.createElement(re,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),x.createElement(ap,{chainId:t}),x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(s==null?void 0:s.length)||0} Unique Collectibles`)),x.createElement(z,{width:"full"},x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(s==null?void 0:s.length)||0})`),x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]},width:"full",marginTop:"3"},s==null?void 0:s.map(u=>{var f,d,h;const p=u.balance,v=(u==null||(f=u.tokenMetadata)==null?void 0:f.decimals)||0,b=ia(xr(p,v));return x.createElement(z,{key:`${u.contractAddress}-${u.tokenID}`,onClick:()=>l(u),className:co},x.createElement(z,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},x.createElement(mr,{style:{height:"100%"},src:(d=u.tokenMetadata)==null?void 0:d.image})),x.createElement(z,null,x.createElement(re,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(h=u.tokenMetadata)==null?void 0:h.name}`)),x.createElement(z,null,x.createElement(re,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},b," Owned")))}))))},OAe=()=>x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(yt,{width:"120px",height:"30px"}),x.createElement(yt,{width:"140px",height:"40px"})),x.createElement(z,null,x.createElement(yt,{width:"347px",height:"347px"})),x.createElement(z,null,x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(yt,{width:"44px",height:"36px"}),x.createElement(yt,{width:"34px",height:"17px"}))),x.createElement(tt,{marginTop:"4",width:"full",variant:"primary",leftIcon:jg,label:"Send",onClick:()=>{}})),x.createElement(z,null,x.createElement(re,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),x.createElement(Sk,null)))),RAe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,i,s,o,a,c;const{chains:l=[]}=on(),{address:u}=Sn(),{fiatCurrency:f}=Un(),{setNavigation:d}=Os(),{data:h,isLoading:p,fetchNextPage:v,hasNextPage:b,isFetchingNextPage:y}=TW({chainId:e,accountAddress:u||"",contractAddress:t,tokenId:r}),m=SW(h),{data:g,isLoading:S}=_W({accountAddress:u||"",collectionAddress:t,chainId:e,tokenId:r}),{data:P,isLoading:T}=PW({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:w=1,isLoading:I}=Fc({toCurrency:f.symbol});if(S||T||I)return x.createElement(OAe,null);const j=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},H=_r(e,l),G=g==null||(n=g.contractInfo)==null?void 0:n.logoURI,B=(g==null||(i=g.contractInfo)==null?void 0:i.name)||"Unknown Collection",E=(g==null||(s=g.tokenMetadata)==null?void 0:s.decimals)||0,_=(g==null?void 0:g.balance)||"0",O=xr(_,E),N=ia(Number(O)),k=g?go({balance:g,prices:P||[],conversionRate:w,decimals:E}):"0";return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(z,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(mr,{borderRadius:"circle",width:"8",src:G,alt:"collection logo",style:{objectFit:"cover"}}),x.createElement(z,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},x.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text100"},B),x.createElement(mr,{width:"3",src:H.logoURI,alt:"collection logo"}))),x.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},(g==null||(o=g.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),x.createElement(re,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),x.createElement(z,null,x.createElement(Ek,{imageUrl:g==null||(a=g.tokenMetadata)==null?void 0:a.image})),x.createElement(z,null,x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},N),P&&((c=P[0].price)==null?void 0:c.value)&&x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${f.symbol} ${k}`))),x.createElement(tt,{marginTop:"4",width:"full",variant:"primary",leftIcon:jg,label:"Send",onClick:j})),x.createElement(z,null,x.createElement($W,{onLoad:()=>v(),hasMore:b},x.createElement(kk,{transactions:m,isLoading:p,isFetchingNextPage:y})))))},$Ae=["buttonVariant","text","size"],MW=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,i=tw(t,$Ae),[s,o]=C.useState(!1);C.useEffect(()=>{s&&setTimeout(()=>{o(!1)},4e3)},[s]);const a=()=>{o(!0)},c=s?"Copied!":"Copy",l=e==="icon"?"rgba(0,0,0,0)":ve.colors.buttonGlass;return x.createElement(gz.CopyToClipboard,{text:r,onCopy:a},x.createElement(Jo,gn({size:n,icon:s?cd:Bg},i,{style:gn({background:l},t==null?void 0:t.style),label:e==="with-label"?c:void 0})))},MAe=({transaction:t})=>{var e,r;const{chains:n=[]}=on(),{fiatCurrency:i}=Un(),s=[],o=[];(e=t.transfers)==null||e.forEach(m=>{var g,S;if(((g=m.contractInfo)==null?void 0:g.type)==="ERC721"||((S=m.contractInfo)==null?void 0:S.type)==="ERC1155"){var P;(P=m.tokenIds)==null||P.forEach(w=>{if(!o.find(j=>{var H;return j.chainId===t.chainId&&or(j.contractAddress,((H=m.contractInfo)==null?void 0:H.address)||"")&&j.tokenId===w})){var F;o.push({chainId:t.chainId,contractAddress:((F=m.contractInfo)==null?void 0:F.address)||"",tokenId:w})}})}else{var T;const w=(m==null||(T=m.contractInfo)==null?void 0:T.address)||cr;s.find(F=>F.chainId===t.chainId&&or(F.contractAddress,w))||s.push({chainId:t.chainId,contractAddress:w})}});const{data:a,isLoading:c}=fu({tokens:s}),{data:l,isLoading:u}=PW({tokens:o}),{data:f=1,isLoading:d}=Fc({toCurrency:i.symbol}),h=s.length>0&&c||o.length>0&&u||d,p=_r(t.chainId,n),v=Oz(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),b=()=>{window.open(`${p.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},y=({transfer:m})=>{var g,S,P,T;const w=m.to,I=w.substring(0,10)+"..."+w.substring(m.to.length-4,m.to.length),F=or((m==null||(g=m.contractInfo)==null?void 0:g.address)||"",cr),j=F?p.logoURI:m==null||(S=m.contractInfo)==null?void 0:S.logoURI,H=F?p.symbol:(m==null||(P=m.contractInfo)==null?void 0:P.symbol)||"";return x.createElement(x.Fragment,null,(T=m.amounts)==null?void 0:T.map((G,B)=>{var E,_,O,N,k;const $=m.contractType==="ERC721"||m.contractType==="ERC1155",L=((E=m.tokenIds)==null?void 0:E[B])||"0",M=(m==null||(_=m.tokenMetadata)==null||(_=_[L])==null?void 0:_.decimals)||0,A=F?p.decimals:(m==null||(O=m.contractInfo)==null?void 0:O.decimals)||0,V=xr(G,$?M:A),R=ia(V),U=$?l==null||(N=l.find(q=>{var Y,X;return or(q.token.contractAddress,((Y=m.contractInfo)==null?void 0:Y.address)||"")&&q.token.tokenId===((X=m.tokenIds)==null?void 0:X[B])&&q.token.chainId===t.chainId}))==null||(N=N.price)==null?void 0:N.value:a==null||(k=a.find(q=>{var Y;return or(q.token.contractAddress,((Y=m.contractInfo)==null?void 0:Y.address)||cr)&&q.token.chainId===t.chainId}))==null||(k=k.price)==null?void 0:k.value,W=(parseFloat(V)*(f*(U||0))).toFixed(2);return x.createElement(z,{key:B,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},x.createElement(z,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},x.createElement(Gl,{imageUrl:j,size:20}),x.createElement(z,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${R} ${H}`),h?x.createElement(yt,{width:"44px",height:"12px"}):x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},U?`${i.sign}${W}`:""))),x.createElement(Jx,{color:"text50",style:{width:"16px"}}),x.createElement(z,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},x.createElement($1,{address:w,style:{width:"20px"}}),x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},I)))}))};return x.createElement(z,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},x.createElement(z,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},x.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),x.createElement(re,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},v),x.createElement(ap,{chainId:t.chainId})),x.createElement(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},x.createElement(z,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},x.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),x.createElement(mr,{width:"3",src:p.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((m,g)=>x.createElement(z,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${g}`},x.createElement(y,{transfer:m})))),x.createElement(tt,{onClick:b,width:"full",borderRadius:"md",rightIcon:Jre,label:`View on ${p.blockExplorerName}`}),x.createElement(z,null,x.createElement(z,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},x.createElement(R0,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),x.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text100"},"Complete")),x.createElement(z,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},x.createElement(R0,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),x.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),x.createElement(MW,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},NAe=C.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Sn();return x.createElement(z,{gap:"2",alignItems:"center"},x.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},x.createElement(z,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:co,position:"relative",ref:e},x.createElement($1,{size:"sm",address:r||""}),x.createElement(re,{color:"text100",fontWeight:"medium",variant:"normal"},EW(r||"")),x.createElement(EN,null))))}),DAe=C.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Os(),{setOpenWalletModal:n}=op(),{address:i}=Sn(),{disconnect:s}=OB(),{theme:o}=np(),a=()=>{t(!1),r({location:"receive"})},c=()=>{t(!1),r({location:"history"})},l=()=>{t(!1),r({location:"settings"})},u=()=>{n(!1),t(!1),s()};return x.createElement(z,{padding:"3",ref:e,zIndex:"30",borderRadius:"md",style:{position:"relative",pointerEvents:"auto",width:"370px",backdropFilter:"blur(12.5px)",top:"16px",left:"15px",background:o==="dark"?"rgba(38, 38, 38, 0.85)":"rgba(217, 217, 217, 0.85)"}},x.createElement(z,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2",color:"text100"},x.createElement($1,{style:{width:"28px"},size:"md",address:i||""}),x.createElement(re,{fontSize:"large",style:{fontWeight:"700"},color:"text100"},EW(i||"")),x.createElement(MW,{buttonVariant:"icon",size:"md",text:i||"",color:"text100",style:{marginLeft:"-16px"}})),x.createElement(Jo,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:ru})),x.createElement(z,{gap:"2",marginTop:"3",flexDirection:"column"},x.createElement(tt,{style:{borderRadius:ve.radii.md},width:"full",leftIcon:nne,label:"Receive",onClick:a}),x.createElement(tt,{style:{borderRadius:ve.radii.md},width:"full",leftIcon:SN,label:"History",onClick:c}),x.createElement(tt,{style:{borderRadius:ve.radii.md},width:"full",leftIcon:xN,label:"Settings",onClick:l}),x.createElement(tt,{label:"Sign Out",style:{borderRadius:ve.radii.md},width:"full",leftIcon:CN,onClick:u})))});au("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const LAe=ki({":focus-visible":{boxShadow:"none"}},"searchButton");cu();const bE=({})=>{const{openWalletModalState:t}=op(),[e,r]=C.useState(!1),{goBack:n,history:i,setNavigation:s}=Os(),o=C.useRef(!1);C.useEffect(()=>{t||r(!1)},[t]),C.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[i.length,e]);const a=()=>{r(!0)},c=()=>{n()},l=()=>{s({location:"search"})};return x.createElement(z,{as:O0.div},x.createElement(Ike,{open:e},x.createElement(Oke,null),x.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Ai,paddingTop:"6px"}},i.length>0?x.createElement(Jo,{onClick:c,icon:Lg,style:{backgroundColor:ve.colors.backgroundPrimary,width:"44px"}}):x.createElement(Jo,{onClick:l,icon:Fg,className:LAe,style:{backgroundColor:ve.colors.backgroundPrimary,width:"44px"}}),x.createElement(Rke,{asChild:!0},x.createElement(NAe,{onClickAccount:a})),x.createElement(z,{style:{width:"44px"}})),x.createElement(Mg,null,e&&x.createElement($ke,{asChild:!0,side:"bottom",align:"start"},x.createElement(DAe,{setOpenWalletDropdown:r})))))},Ds=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Os(),i=()=>{r()};return x.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Ai,paddingTop:"6px",backgroundColor:ve.colors.backgroundPrimary}},n.length>0?x.createElement(Jo,{onClick:i,icon:Lg,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):x.createElement(z,null),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),x.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),x.createElement(z,{style:{width:"44px"}}))},RI=t=>{const{location:e}=t;switch(e){case"send-coin":return x.createElement(pAe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return x.createElement(vAe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return x.createElement(hAe,null);case"history":return x.createElement(yAe,null);case"search":return x.createElement(gAe,null);case"search-view-all":return x.createElement(bAe,{defaultTab:t.params.defaultTab});case"settings":return x.createElement(wAe,null);case"settings-general":return x.createElement(EAe,null);case"settings-currency":return x.createElement(SAe,null);case"settings-networks":return x.createElement(kAe,null);case"coin-details":return x.createElement(PAe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return x.createElement(RAe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return x.createElement(IAe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return x.createElement(MAe,{transaction:t.params.transaction});case"home":default:return x.createElement(dAe,null)}},BAe=t=>{const{location:e}=t;switch(e){case"search":return x.createElement(Ds,{primaryText:"Search wallet"});case"search-view-all":return x.createElement(Ds,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return x.createElement(Ds,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return x.createElement(Ds,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return x.createElement(Ds,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return x.createElement(Ds,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return x.createElement(Ds,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return x.createElement(Ds,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return x.createElement(bE,null);case"collectible-details":return x.createElement(bE,null);case"transaction-details":return x.createElement(Ds,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return x.createElement(Ds,{secondaryText:"Wallet /",primaryText:"Send"});case"home":default:return x.createElement(bE,null)}},FAe={location:"home"},jAe=t=>{const e=new lS;return x.createElement(hS,{client:e},x.createElement(UAe,t))},UAe=({children:t})=>{const{theme:e,position:r}=np(),[n,i]=C.useState(!1),[s,o]=C.useState([]),a=s.length>0?s[s.length-1]:FAe,c=a.location==="home"||a.location==="collection-details"||a.location==="collectible-details"||a.location==="coin-details"||a.location==="history"||a.location==="search"||a.location==="search-view-all"||a.location==="settings-currency";return C.useEffect(()=>{n&&o([])},[n]),x.createElement(Nke,{value:{setOpenWalletModal:i,openWalletModalState:n}},x.createElement(tAe,{value:{setHistory:o,history:s}},x.createElement("div",{id:"kit-wallet"},x.createElement(Gg,{root:"#kit-wallet",scope:"kit",theme:e},x.createElement(Mg,null,n&&x.createElement(rS,{contentProps:{style:gn({maxWidth:"400px",height:"fit-content"},sk(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>i(!1)},x.createElement(z,{className:Ck,id:"sequence-kit-wallet-content"},BAe(a),c?x.createElement(wD,{className:xk,style:{paddingTop:Ai,height:"min(800px, 80vh)"}},RI(a)):RI(a)))))),t))};var zAe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",WAe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),NW=()=>{var t;return zAe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":WAe()?window.location.origin:"https://withpaper.com"},DW={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},HAe=Object.defineProperty,qAe=Object.defineProperties,VAe=Object.getOwnPropertyDescriptors,$I=Object.getOwnPropertySymbols,GAe=Object.prototype.hasOwnProperty,KAe=Object.prototype.propertyIsEnumerable,MI=(t,e,r)=>e in t?HAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Wn=(t,e)=>{for(var r in e||(e={}))GAe.call(e,r)&&MI(t,r,e[r]);if($I)for(var r of $I(e))KAe.call(e,r)&&MI(t,r,e[r]);return t},NI=(t,e)=>qAe(t,VAe(e)),QAe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),LW=QAe((t,e)=>{e.exports={name:"@paperxyz/js-client-sdk",description:"Paper JS SDK for Checkout Elements",version:"0.2.5",license:"Apache-2.0",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",files:["dist/**"],bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",scripts:{build:"tsup src/index.ts --env.NODE_ENV production","build-package-checkout":"yarn build","dev-checkout":"tsup src/index.ts --env.NODE_ENV development --watch",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/js-client-sdk"},keywords:[],devDependencies:{"@paperxyz/tsconfig":"*","eslint-config-paperxyz":"*",typescript:"^4.7.4"},dependencies:{"@paperxyz/sdk-common-utilities":"*",ethers:"^5.7.2"},publishConfig:{access:"public"}}}),BW=NW(),YAe="/sdk/2022-08-12/checkout-with-card",JAe=(t=>(t.UserAbandonedCheckout="User abandoned the checkout",t.UserLoginFailed="User login failed",t.InvalidProps="The props you passed in to this component are not valid.",t.InvalidCard="The card information is invalid. Please double check that the Card, CVC, and Zip code are all correct.",t.EmailNotVerified="The email was unable to be verified.",t.NotEnoughSupply="There is not enough supply to claim.",t.AddressNotAllowed="This address is not on the allowlist.",t.NoActiveClaimPhase="There is no active claim phase at the moment.",t))(JAe||{}),XAe=(t=>(t.ErrorConnectingToWallet="Error connecting to wallet",t.ErrorSendingTransaction="Something went wrong sending transaction",t.InsufficientBalance="Insufficient ETH",t.TransactionCancelled="Transaction Cancelled",t.WrongChain="Wrong Chain Detected",t.ChainSwitchUnderway="There is a network switch already underway",t.PendingSignature="Pending Signature",t))(XAe||{}),ZAe=class{constructor(t){this.link=t}addStylingOptions(t){t.colorPrimary&&this.link.searchParams.set("colorPrimary",t.colorPrimary),t.colorBackground&&this.link.searchParams.set("colorBackground",t.colorBackground),t.colorText&&this.link.searchParams.set("colorText",t.colorText),t.borderRadius!==void 0&&this.link.searchParams.set("borderRadius",t.borderRadius.toString()),t.fontFamily&&this.link.searchParams.set("fontFamily",t.fontFamily),t.inputBackgroundColor&&this.link.searchParams.set("inputBackgroundColor",t.inputBackgroundColor),t.inputBorderColor&&this.link.searchParams.set("inputBorderColor",t.inputBorderColor)}addClientSecret(t){this.link.searchParams.set("sdkClientSecret",t)}addLocale(t){t&&this.link.searchParams.set("locale",t.toString())}addOTP(){this.link.searchParams.set("withOTP","true")}addAppName(t){t&&this.link.searchParams.set("appName",t)}addShowConnectWalletOptions(t){this.link.searchParams.append("showConnectWalletOptions",t.toString())}addReceivingWalletType(t){this.link.searchParams.append("walletType",t||"Preset")}addRecipientWalletAddress(t){this.link.searchParams.set("recipientWalletAddress",t)}addPayerWalletAddress(t){this.link.searchParams.append("payerWalletAddress",t)}addDate(t){this.link.searchParams.set("date",t?t.toString():Date.now().toString())}getLink(){return this.link}},e4e=({url:t,width:e=440,height:r=700})=>{if(!(window!=null&&window.top))return null;let n=window.top.outerHeight/2+window.top.screenY-r/2,i=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${i}`)};function DI(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Wn({eventType:e},r),"*")}var t4e=LW(),r4e=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let i=document.createElement("iframe");if(i.src=r.href,i.id=n,i.allow="payment",i.setAttribute("style","margin-left:auto; margin-right:auto; width:100%; height: 100%; min-height:375px; transition-property:all; transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1); transition-duration:150ms; color-scheme: light;"),i.onload=a=>{this.onLoad&&this.onLoad(a)},i.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${t4e.version}`),!this.elementOrId)return window.addEventListener("message",e(i)),i;let s=this.elementOrId;if(typeof s=="string"){let a=document.getElementById(s);if(!a)throw new Error("Invalid id given");s=a}let o=s.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(i)),s.appendChild(i))}},LI={top:"0px",left:"0px",right:"0px",bottom:"0px"},n4e=()=>({main:NI(Wn({},LI),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center"}),overlay:NI(Wn({},LI),{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.33)"}),body:{background:"transparent",borderRadius:"12px",position:"relative",overflow:"hidden",width:"100%",maxWidth:"500px",height:"700px",maxHeight:"80%",animation:"pew-modal-slideIn 0.2s forwards"},spinner:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",margin:"auto",borderWidth:"3px",borderColor:"#2D3748 #2D3748 transparent transparent",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite"},iframe:{position:"relative",height:"100%",width:"100%",border:"none",background:"transparent"}}),i4e=` +`)},kke=0,ku=[];function Ake(t){var e=C.useRef([]),r=C.useRef([0,0]),n=C.useRef(),i=C.useState(kke++)[0],s=C.useState(function(){return mW()})[0],o=C.useRef(t);C.useEffect(function(){o.current=t},[t]),C.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=sre([t.lockRef.current],(t.shards||[]).map(II),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=C.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!o.current.allowPinchZoom;var y=uv(v),m=r.current,g="deltaX"in v?v.deltaX:m[0]-y[0],S="deltaY"in v?v.deltaY:m[1]-y[1],P,T=v.target,w=Math.abs(g)>Math.abs(S)?"h":"v";if("touches"in v&&w==="h"&&T.type==="range")return!1;var I=PI(w,T);if(!I)return!0;if(I?P=w:(P=w==="v"?"h":"v",I=PI(w,T)),!I)return!1;if(!n.current&&"changedTouches"in v&&(g||S)&&(n.current=P),!P)return!0;var B=n.current||P;return xke(B,b,v,B==="h"?g:S,!0)},[]),c=C.useCallback(function(v){var b=v;if(!(!ku.length||ku[ku.length-1]!==s)){var y="deltaY"in b?TI(b):uv(b),m=e.current.filter(function(P){return P.name===b.type&&P.target===b.target&&Cke(P.delta,y)})[0];if(m&&m.should){b.cancelable&&b.preventDefault();return}if(!m){var g=(o.current.shards||[]).map(II).filter(Boolean).filter(function(P){return P.contains(b.target)}),S=g.length>0?a(b,g[0]):!o.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),l=C.useCallback(function(v,b,y,m){var g={name:v,delta:b,target:y,should:m};e.current.push(g),setTimeout(function(){e.current=e.current.filter(function(S){return S!==g})},1)},[]),u=C.useCallback(function(v){r.current=uv(v),n.current=void 0},[]),f=C.useCallback(function(v){l(v.type,TI(v),v.target,a(v,t.lockRef.current))},[]),d=C.useCallback(function(v){l(v.type,uv(v),v.target,a(v,t.lockRef.current))},[]);C.useEffect(function(){return ku.push(s),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Su),document.addEventListener("touchmove",c,Su),document.addEventListener("touchstart",u,Su),function(){ku=ku.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,Su),document.removeEventListener("touchmove",c,Su),document.removeEventListener("touchstart",u,Su)}},[]);var h=t.removeScrollBar,p=t.inert;return C.createElement(C.Fragment,null,p?C.createElement(s,{styles:Ske(i)}):null,h?C.createElement(vke,{gapMode:"margin"}):null)}const _ke=nke(vW,Ake);var wW=C.forwardRef(function(t,e){return C.createElement(Zb,Ks({},t,{ref:e,sideCar:_ke}))});wW.classNames=Zb.classNames;const Pke=wW,EW="Popover",[xW,I9e]=Gz(EW,[aW]),ew=aW(),[Tke,Od]=xW(EW),Ike=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:i,onOpenChange:s,modal:o=!1}=t,a=ew(e),c=C.useRef(null),[l,u]=C.useState(!1),[f=!1,d]=W8e({prop:n,defaultProp:i,onChange:s});return C.createElement(B8e,a,C.createElement(Tke,{scope:e,contentId:VSe(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:C.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:l,onCustomAnchorAdd:C.useCallback(()=>u(!0),[]),onCustomAnchorRemove:C.useCallback(()=>u(!1),[]),modal:o},r))},Oke="PopoverAnchor",Rke=C.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,i=Od(Oke,r),s=ew(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=i;return C.useEffect(()=>(o(),()=>a()),[o,a]),C.createElement(fW,nn({},s,n,{ref:e}))}),$ke="PopoverTrigger",Mke=C.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,i=Od($ke,r),s=ew(r),o=uu(e,i.triggerRef),a=C.createElement(ip.button,nn({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":SW(i.open)},n,{ref:o,onClick:_l(t.onClick,i.onOpenToggle)}));return i.hasCustomAnchor?a:C.createElement(fW,nn({asChild:!0},s),a)}),Nke="PopoverPortal",[O9e,Dke]=xW(Nke,{forceMount:void 0}),h1="PopoverContent",Lke=C.forwardRef((t,e)=>{const r=Dke(h1,t.__scopePopover),{forceMount:n=r.forceMount,...i}=t,s=Od(h1,t.__scopePopover);return C.createElement(dW,{present:n||s.open},s.modal?C.createElement(Fke,nn({},i,{ref:e})):C.createElement(Bke,nn({},i,{ref:e})))}),Fke=C.forwardRef((t,e)=>{const r=Od(h1,t.__scopePopover),n=C.useRef(null),i=uu(e,n),s=C.useRef(!1);return C.useEffect(()=>{const o=n.current;if(o)return K8e(o)},[]),C.createElement(Pke,{as:fk,allowPinchZoom:!0},C.createElement(CW,nn({},t,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_l(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),s.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:_l(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:_l(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),Bke=C.forwardRef((t,e)=>{const r=Od(h1,t.__scopePopover),n=C.useRef(!1),i=C.useRef(!1);return C.createElement(CW,nn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,s),!s.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),s.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:s=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=s.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}}))}),CW=C.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...f}=t,d=Od(h1,r),h=ew(r);return DSe(),C.createElement(LSe,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s},C.createElement($Se,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1)},C.createElement(j8e,nn({"data-state":SW(d.open),role:"dialog",id:d.contentId},h,f,{ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function SW(t){return t?"open":"closed"}const jke=Ike,Uke=Rke,zke=Mke,Wke=Lke,[Hke,qke]=lu(),op=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=Hke();return{setOpenWalletModal:t,openWalletModalState:e}};function gn(){return gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[i]=t[i]);return r}const ar=(t,e)=>t.toLowerCase()===e.toLowerCase(),gk=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},kW=t=>`0x${gk((t==null?void 0:t.substring(2))||"",8)}`;var Aa=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(Aa||{});const ia=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=Aa.VERY_LARGE:e<1e-10?r=Aa.VERY_TINY:e<1?r=Aa.FRACTION:r=Aa.MIXED;let n,i;switch(r){case Aa.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case Aa.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case Aa.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",gn({notation:n},i)).format(e)},Vke=t=>t.charAt(0).toUpperCase()+t.slice(1),AW=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},Yy=t=>/0x[a-fA-F0-9]{40}/.test(t),Gke=t=>t>0?ve.colors.positive:t<0?ve.colors.negative:ve.colors.text50,OI=(t,e)=>{var r;const n=e.find(s=>ar(s.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},go=({balance:t,prices:e,decimals:r,conversionRate:n})=>{var i;let s=0;const o=e.find(f=>ar(f.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((i=o.price)==null?void 0:i.value)||0,c=xr(t.balance,r),l=parseFloat(c)*a;return s+=l,`${(s*n).toFixed(2)}`},_W=t=>{const e=[],r=[],n=[];return t.forEach(i=>{i.contractAddress===lr?e.push(i):i.contractType==="ERC20"?r.push(i):(i.contractType==="ERC721"||i.contractType==="ERC1155")&&n.push(i)}),{nativeTokens:e,erc20Tokens:r,collectibles:n}},PW=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},Jy=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await cn(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:lr,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:x8.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},bk=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await cn(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},Xy=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:s=!0})=>{try{const{indexerClient:o}=await cn(e),a=await o.getTokenBalances(gn({accountAddress:t,includeMetadata:s},r?{contractAddress:r}:{}));let c=(a==null?void 0:a.balances)||[];if(n&&c.length>0){const l=await bk({tokens:c.map(u=>({chainId:u.chainId,contractAddress:u.contractAddress,tokenId:u.tokenID}))});c=c.filter(u=>{const f=l==null?void 0:l.find(d=>ar(d.token.contractAddress,u.contractAddress)&&d.token.chainId===u.chainId);return u.contractType!=="ERC20"||!!f&&f.price!==null})}return i&&c.length>0&&(c=c.filter(l=>l.contractType!=="ERC721"&&l.contractType!=="ERC1155")),c}catch(o){return console.error(o),[]}},Kke=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([Jy({accountAddress:t,chainId:e}),Xy({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(i){return console.error(i),[]}},TW=async({accountAddress:t,chainId:e,collectionAddress:r,includeMetadata:n=!0})=>{try{const{indexerClient:i}=await cn(e),s=await i.getTokenBalances({accountAddress:t,includeMetadata:n,contractAddress:r});return(s==null?void 0:s.balances)||[]}catch(i){return console.error(i),[]}},Qke=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:i})=>{let o=[];const a=r.length>0;try{if(a){const S=r.filter(I=>ar(I.contractAddress,lr)),P=r.filter(I=>!ar(I.contractAddress,lr)),T={},w={};S.forEach(I=>{T[I.chainId]||(T[I.chainId]=[]),T[I.chainId].push(I)}),P.forEach(I=>{w[I.chainId]||(w[I.chainId]=[]),w[I.chainId].push(I)}),o=(await Promise.all([...Object.keys(T).map(I=>Jy({accountAddress:t,chainId:Number(I)})),...Object.keys(w).map(I=>w[Number(I)].map(B=>Xy({accountAddress:t,chainId:Number(I),contractAddress:B.contractAddress},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:!1}))).flat()])).flat()}else o=(await Promise.all([...e.map(S=>Jy({accountAddress:t,chainId:S})),...e.map(S=>Xy({accountAddress:t,chainId:S},{hideUnlistedTokens:n,hideCollectibles:i,includeMetadata:!1}))])).flat();const{nativeTokens:c,erc20Tokens:l,collectibles:u}=_W(o),f=new Promise(async(S,P)=>{if(l.length>0){const T=l.map(I=>({chainId:I.chainId,contractAddress:I.contractAddress})),w=await bk({tokens:T})||[];S(w)}else S([])}),d=u.map(async S=>a?S:await TW({accountAddress:t,chainId:S.chainId,collectionAddress:S.contractAddress,includeMetadata:!1})),h=async()=>{const S={},P={};l.forEach(w=>{P[w.chainId]?P[w.chainId].push(w):P[w.chainId]=[w]});const T=Object.keys(P).map(async w=>{const{metadataClient:I}=cn(w),j=P[Number(w)].map(G=>G.contractAddress),H=await I.getContractInfoBatch({chainID:String(w),contractAddresses:j});S[Number(w)]=H});return await Promise.all([...T]),S},[p,v,...b]=await Promise.all([f,h(),...d]),y=l.sort((S,P)=>{var T,w;const I=p.find(k=>ar(k.token.contractAddress,S.contractAddress)),B=p.find(k=>ar(k.token.contractAddress,P.contractAddress)),j=I!=null&&I.price?I.price.value:0,H=B!=null&&B.price?B.price.value:0,G=(T=v[S.chainId].contractInfoMap[S.contractAddress])==null?void 0:T.decimals,F=(w=v[P.chainId].contractInfoMap[P.contractAddress])==null?void 0:w.decimals,E=G===void 0?0:Number(xr(S.balance,G)),_=F===void 0?0:Number(xr(P.balance,F)),O=E*j;return _*H-O}),m=u3e(b.flat(),10).sort((S,P)=>S.contractAddress.localeCompare(P.contractAddress));return i?[...c.length>0?[c[0]]:[],...y.length>0?y.slice(0,11):[]]:[...c.length>0?[c[0]]:[],...y.length>0?[y[0]]:[],...m.length>0?[...m]:[]]}catch(c){return console.error(c),[]}},Yke=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n})=>{const{indexerClient:i}=await cn(e);return(await i.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n})).balances[0]},Jke=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await cn(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},IW=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:i})=>{const{indexerClient:s}=cn(t);return s.getTransactionHistory({includeMetadata:!0,page:i,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},Xke=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(s=>IW({chainId:s,accountAddress:e,page:{page:1}}))])).map(s=>s.transactions).flat().sort((s,o)=>{const a=new Date(s.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),Zke=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=cn(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},e4e=async({tokens:t})=>{const{metadataClient:e}=cn(t.chainId);return(await e.getTokenMetadata({chainID:t.chainId.toString(),contractAddress:t.contractAddress,tokenIDs:t.tokenIds})).tokenMetadata},t4e=async t=>{const{metadataClient:e}=cn(Number(t.chainID));return(await e.getContractInfo(t)).contractInfo},r4e=["chainIds"],n4e=["disabled"],Ji={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},wk=(t,e)=>si({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=tw(t,r4e);return(await Promise.all(r.map(s=>Kke(gn({},n,{chainId:s}),e)))).flat()},retry:!0,staleTime:10*Ji.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),i4e=t=>si({queryKey:["collectionBalance",t],queryFn:()=>TW(t),retry:!0,staleTime:10*Ji.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),fu=t=>{let{disabled:e}=t,r=tw(t,n4e);return si({queryKey:["coinPrices",r],queryFn:()=>bk(r),retry:!0,staleTime:1*Ji.oneMinute,enabled:r.tokens.length>0&&!e})},s4e=(t,e)=>si({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>Qke(t,e),retry:!0,staleTime:10*Ji.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),o4e=(t,e)=>si({queryKey:["coinBalance",t,e],queryFn:()=>ar((t==null?void 0:t.contractAddress)||"",lr)?Jy({accountAddress:t.accountAddress,chainId:t.chainId}).then(i=>i[0]):Xy(t,e).then(n=>n[0]),retry:!0,staleTime:1*Ji.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),OW=t=>si({queryKey:["collectibleBalance",t],queryFn:()=>Yke(t),retry:!0,staleTime:5*Ji.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),RW=t=>si({queryKey:["useCollectiblePrices",t],queryFn:()=>Jke(t),retry:!0,staleTime:5*Ji.oneMinute,enabled:t.tokens.length>0}),$W=t=>Xle({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>IW(gn({},t,e?{page:{page:e}}:{page:{page:1}})),getNextPageParam:({page:e})=>{if(e.more)return(e==null?void 0:e.page)||1},retry:!0,staleTime:10*Ji.oneMinute,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),a4e=t=>si({queryKey:["transactionHistorySummary",t],queryFn:()=>Xke(t),retry:!0,staleTime:10*Ji.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),Bc=t=>si({queryKey:["useConversionRate",t],queryFn:()=>Zke(t),retry:!0,staleTime:60*Ji.oneMinute}),c4e=t=>si({queryKey:["useTokenMetadata",t],queryFn:()=>e4e(t),retry:!0,staleTime:60*Ji.oneMinute,enabled:!!t.tokens.chainId&&!!t.tokens.contractAddress}),l4e=t=>si({queryKey:["useContractInfo",t],queryFn:()=>t4e(t),retry:!0,staleTime:60*Ji.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[u4e,f4e]=lu(),Os=()=>{const{setHistory:t,history:e}=u4e();return{setNavigation:i=>{const s=document.getElementById("sequence-kit-wallet-content"),o=s==null?void 0:s.parentElement;o==null||o.scrollTo(0,0);const a=[...e,i];t(a)},history:e,setHistory:t,goBack:()=>{const i=[...e];i.pop(),t(i)}}},d4e=[{inputs:[{internalType:"address",name:"_from",type:"address"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256[]",name:"_ids",type:"uint256[]"},{internalType:"uint256[]",name:"_amounts",type:"uint256[]"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],h4e=[{constant:!1,inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],p4e=[{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}],MW=[{symbol:"USD",sign:"$",name:{message:"US Dollar"},decimals:2},{symbol:"CAD",sign:"$",name:{message:"Canadian Dollar"},decimals:2},{symbol:"GBP",sign:"£",name:{message:"British Pound Sterling"},decimals:2},{symbol:"EUR",sign:"€",name:{message:"Euro"},decimals:2},{symbol:"CNY",sign:"¥",name:{message:"Chinese Yuan"},decimals:2},{symbol:"JPY",sign:"¥",name:{message:"Japanese Yen"},decimals:2},{symbol:"KRW",sign:"₩",name:{message:"South Korean Won"},decimals:2},{symbol:"SGD",sign:"$",name:{message:"Singapore Dollar"},decimals:2},{symbol:"CHF",sign:"CHF ",name:{message:"Swiss Franc"},decimals:2},{symbol:"AUD",sign:"$",name:{message:"Australian Dollar"},decimals:2},{symbol:"NZD",sign:"$",name:{message:"New Zealand Dollar"},decimals:2},{symbol:"SEK",sign:"kr ",name:{message:"Swedish Krona"},decimals:2},{symbol:"NOK",sign:"kr ",name:{message:"Norwegian Krone"},decimals:2},{symbol:"MXN",sign:"$",name:{message:"Mexican Peso"},decimals:2},{symbol:"INR",sign:"₹",name:{message:"Indian Rupee"},decimals:2},{symbol:"ZAR",sign:"R ",name:{message:"South African Rand"},decimals:2},{symbol:"TRY",sign:"₺",name:{message:"Turkish Lira"},decimals:2},{symbol:"BRL",sign:"R$",name:{message:"Brazilian Real"},decimals:2},{symbol:"DKK",sign:"kr ",name:{message:"Danish Krone"},decimals:2},{symbol:"PLN",sign:"zł ",name:{message:"Polish Zloty"},decimals:2},{symbol:"THB",sign:"฿",name:{message:"Thai Baht"},decimals:2},{symbol:"IDR",sign:"Rp",name:{message:"Indonesian Rupiah"},decimals:2}],v4e=MW[0],Ai="54px",Rs=navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px",Un=()=>{const{chains:t}=on(),e=()=>{let l=!0,u=!1,f=v4e,d=t.map(h=>h.id);try{const h=localStorage.getItem(yn.Settings),p=JSON.parse(h||"{}");if((p==null?void 0:p.hideUnlistedTokens)!==void 0&&(l=p==null?void 0:p.hideUnlistedTokens),(p==null?void 0:p.hideCollectibles)!==void 0&&(u=p==null?void 0:p.hideCollectibles),(p==null?void 0:p.fiatCurrency)!==void 0&&(f=p==null?void 0:p.fiatCurrency),(p==null?void 0:p.selectedNetworks)!==void 0){let v=!0;p.selectedNetworks.forEach(b=>{t.find(y=>y.id===b)===void 0&&(v=!1)}),v&&(d=p==null?void 0:p.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:l,hideCollectibles:u,fiatCurrency:f,selectedNetworks:d}},r=e(),[n,i]=C.useState(r);return gn({},n,{setFiatCurrency:l=>{const u=e(),f=gn({},u,{fiatCurrency:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)},setHideCollectibles:l=>{const u=e(),f=gn({},u,{hideCollectibles:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)},setHideUnlistedTokens:l=>{const u=e(),f=gn({},u,{hideUnlistedTokens:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)},setSelectedNetworks:l=>{const u=e(),f=gn({},u,{selectedNetworks:l});localStorage.setItem(yn.Settings,JSON.stringify(f)),i(f)}})},m4e=({size:t=30})=>x.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},x.createElement(re,{variant:"large",color:"textInverse100"},"?")),Gl=({imageUrl:t,size:e=30})=>t?x.createElement(mr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):x.createElement(m4e,{size:e}),RI=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:i,priceChangePercentage:s,symbol:o})=>{const{fiatCurrency:a}=Un(),c=s>0?"+":"";return x.createElement(z,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},x.createElement(z,{marginBottom:"1"},x.createElement(Gl,{size:36,imageUrl:e})),x.createElement(z,{marginBottom:"3"},x.createElement(z,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},x.createElement(re,{fontWeight:"bold",whiteSpace:"nowrap",color:"text100",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),x.createElement(Gl,{size:12,imageUrl:t})),x.createElement(re,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),x.createElement(z,null,x.createElement(z,null,x.createElement(re,{fontWeight:"bold",color:"text100"},`${a.sign}${i}`)),x.createElement(re,{style:{color:Gke(s)}},`${c}${s.toFixed(2)}%`)))},$I=({balance:t})=>{var e;const{chains:r=[]}=on(),{fiatCurrency:n}=Un(),i=ar(t.contractAddress,lr),s=_r(t.chainId,r),{data:o=[],isLoading:a}=fu({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:c=1,isLoading:l}=Bc({toCurrency:n.symbol}),{data:u,isLoading:f}=l4e({chainID:String(t.chainId),contractAddress:t.contractAddress});if(a||l||f)return x.createElement(z,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(i){const P=go({balance:t,prices:o,conversionRate:c,decimals:s.decimals}),T=OI(t,o),w=xr(t.balance,s.decimals),I=ia(w);return x.createElement(RI,{networkLogoUrl:s.logoURI,logoUrl:s.logoURI,tokenName:s.name,balance:I,balanceFiat:P,priceChangePercentage:T,symbol:s.symbol})}const h=(e=u==null?void 0:u.decimals)!=null?e:18,p=go({balance:t,prices:o,conversionRate:c,decimals:h}),v=OI(t,o),b=xr(t.balance,h),y=ia(b),m=(u==null?void 0:u.name)||"Unknown",g=(u==null?void 0:u.name)||"TOKEN",S=u==null?void 0:u.logoURI;return x.createElement(RI,{networkLogoUrl:s.logoURI,logoUrl:S,tokenName:m,balance:y,balanceFiat:p,priceChangePercentage:v,symbol:g})},Ek=({imageUrl:t})=>x.createElement(bs,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"md",background:"backgroundSecondary"},x.createElement(mr,{style:{height:"100%"},src:t})),y4e=({balance:t})=>{var e;const{data:r}=c4e({tokens:{chainId:t.chainId,contractAddress:t.contractAddress,tokenIds:[t.tokenID]}}),n=r==null||(e=r[0])==null?void 0:e.image;return x.createElement(Ek,{imageUrl:n})};au("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const g4e=nz({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),b4e=ki({height:"76px",backgroundColor:"#909090",animation:`${g4e} 2s ease-in-out infinite`},"skeleton");cu();const gt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>x.createElement(z,{className:b4e,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),w4e=()=>x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]}},Array(12).fill(null).map((t,e)=>x.createElement(z,{key:e},x.createElement(gt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));au("packages/wallet/src/shared/styles.css.ts","kit");const co=ki({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),xk=ki({"> div":{overflowY:"scroll"}},"scrollbar");Is(`html:not(.is-apple) ${xk} > div::-webkit-scrollbar-thumb`,{background:"none",backgroundClip:"content-box",transition:"background 0.5s linear"});Is(`html:not(.is-apple) ${xk} > div:hover::-webkit-scrollbar-thumb`,{background:ve.colors.text50,backgroundClip:"content-box"});const Ck=ki({},"walletContent");Is(`${Ck} + button`,{backgroundColor:"transparent"});Is(`${Ck} + button > svg`,{width:"20px",height:"20px"});cu();const E4e=()=>{const{address:t}=Sn(),{setNavigation:e}=Os(),{displayedAssets:r}=Lxe(),{hideUnlistedTokens:n,hideCollectibles:i,selectedNetworks:s}=Un(),{data:o=[],isLoading:a}=s4e({accountAddress:t||"",chainIds:s,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:i});if(a)return x.createElement(w4e,null);const{nativeTokens:c,erc20Tokens:l,collectibles:u}=_W(o),f=d=>{d.contractType==="ERC1155"||d.contractType==="ERC721"?e&&e({location:"collectible-details",params:{contractAddress:d.contractAddress,chainId:d.chainId,tokenId:d.tokenID}}):d.contractType==="ERC20"?e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}}):e&&e({location:"coin-details",params:{contractAddress:d.contractAddress,chainId:d.chainId}})};return x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]}},c.map(d=>x.createElement(z,{key:d.contractAddress,className:co,aspectRatio:"1/1",onClick:()=>f(d)},x.createElement($I,{balance:d}))),l.map(d=>x.createElement(z,{className:co,key:d.contractAddress,aspectRatio:"1/1",onClick:()=>f(d)},x.createElement($I,{balance:d}))),u.map(d=>x.createElement(z,{className:co,aspectRatio:"1/1",key:`${d.contractAddress}-${d.tokenID}}`,onClick:()=>f(d)},x.createElement(y4e,{balance:d}))))},x4e=()=>x.createElement(z,{paddingLeft:"5",paddingBottom:"5",gap:"4",flexDirection:"column",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(E4e,null)),C4e=()=>{const{address:t}=Sn(),{chain:e,chains:r=[]}=on(),[n,i]=C.useState(!1),s=_r((e==null?void 0:e.id)||1,r);C.useEffect(()=>{n&&setTimeout(()=>{i(!1)},4e3)},[n]);const o=()=>{i(!0)},a=()=>{window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},x.createElement(z,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},x.createElement($3e,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),x.createElement(z,null,x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},x.createElement(re,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),x.createElement(mr,{width:"5",src:s.logoURI,alt:"icon"})),x.createElement(z,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},x.createElement(re,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),x.createElement(z,{gap:"3"},x.createElement(xz.CopyToClipboard,{text:t||""},x.createElement(tt,{onClick:o,leftIcon:Fg,label:n?"Copied!":"Copy"})),x.createElement(tt,{onClick:a,leftIcon:vne,label:"Share"})),x.createElement(z,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},x.createElement(re,{color:"text100",variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${s.name} address. Please only send assets on the ${s.name} network.`))))},NW=({imageUrl:t,name:e,decimals:r,balance:n,symbol:i,fiatValue:s,chainId:o,showSquareImage:a})=>{const{chains:c=[]}=on(),{fiatCurrency:l}=Un(),u=xr(n,r),f=ia(u),d=_r(o,c);return x.createElement(z,{alignItems:"flex-end",justifyContent:"space-between"},x.createElement(z,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?x.createElement(z,{style:{width:"40px"}},x.createElement(Ek,{imageUrl:t})):x.createElement(Gl,{imageUrl:t,size:40}),x.createElement(z,{flexDirection:"column",alignItems:"flex-start"},x.createElement(z,{flexDirection:"row",alignItems:"center",gap:"1"},x.createElement(re,{variant:"medium",color:"text100"},e),x.createElement(Gl,{imageUrl:d.logoURI,size:12})),x.createElement(re,{color:"text50",variant:"normal"}," ",`${f} ${i} available`))),x.createElement(z,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},s&&x.createElement(re,{variant:"normal",color:"text100"},`${l.sign}${s}`)))},S4e=({chainId:t,contractAddress:e})=>{var r,n,i,s,o;const{chains:a=[]}=on(),c=xb(),{address:l="",connector:u}=Sn(),f=!!(u!=null&&(r=u._wallet)!=null&&r.isSequenceBased),d=c===t,h=!d&&!f,{switchNetwork:p}=GS(),v=C.useRef(null),{setOpenWalletModal:b}=op(),{fiatCurrency:y}=Un(),[m,g]=C.useState("0"),[S,P]=C.useState(""),{data:T}=VS(),{data:w=[],isLoading:I}=wk({accountAddress:l,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),B=_r(t,a),j=w.find(Q=>Q.contractAddress===e),{data:H=[],isLoading:G}=fu({tokens:[{chainId:t,contractAddress:e}]}),{data:F=1,isLoading:E}=Bc({toCurrency:y.symbol});if(I||G||E)return null;const O=ar(e,lr),N=O?B.decimals:(j==null||(n=j.contractInfo)==null?void 0:n.decimals)||18,k=O?B.name:(j==null||(i=j.contractInfo)==null?void 0:i.name)||"",$=O?B.logoURI:j==null||(s=j.contractInfo)==null?void 0:s.logoURI,L=O?B.symbol:(j==null||(o=j.contractInfo)==null?void 0:o.symbol)||"",M=m===""?"0":m,A=Mf(M,N),D=go({balance:gn({},j,{balance:A.toString()}),prices:H,conversionRate:F,decimals:N}),V=A.gt((j==null?void 0:j.balance)||"0"),R=A.gt(0),U=Q=>{const{value:Z}=Q.target,ae=AW(Z,N);g(ae)},W=()=>{var Q;(Q=v.current)==null||Q.focus();const Z=xr((j==null?void 0:j.balance)||0,N).toString();g(Z)},q=async()=>{const Q=await navigator.clipboard.readText();P(Q)},Y=()=>{P("")},X=async Q=>{!d&&f&&p&&p(t),Q.preventDefault();const Z=Mf(M,N);O?T==null||T.sendTransaction({to:S,value:BigInt(Z.toString())}).catch(ae=>console.error("User rejected transaction",ae)):T==null||T.sendTransaction({to:j==null?void 0:j.contractAddress,data:new Fr(h4e).encodeFunctionData("transfer",[S,Z.toHexString()])}).catch(ae=>console.error("User rejected transaction",ae)),b(!1)};return x.createElement(z,{padding:"5",paddingTop:"3",style:{marginTop:Ai},gap:"2",flexDirection:"column",as:"form",onSubmit:X},x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(NW,{imageUrl:$,decimals:N,name:k,symbol:L,balance:(j==null?void 0:j.balance)||"0",fiatValue:go({balance:j,prices:H,conversionRate:F,decimals:N}),chainId:t}),x.createElement(PD,{ref:v,style:{fontSize:ve.fontSizes.xlarge,fontWeight:ve.fontWeights.bold},name:"amount",value:m,onChange:U,controls:x.createElement(x.Fragment,null,x.createElement(re,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${y.sign}${D}`),x.createElement(tt,{size:"xs",shape:"square",label:"Max",onClick:W,"data-id":"maxCoin",flexShrink:"0"}),x.createElement(re,{fontSize:"xlarge",fontWeight:"bold",color:"text100"},L))}),V&&x.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(re,{fontSize:"normal",color:"text50"},"To"),Yy(S)?x.createElement(z,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:co,onClick:Y,style:{height:"52px"}},x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},x.createElement($1,{address:S,style:{width:"20px"}}),x.createElement(re,{color:"text100"},`0x${gk(S.substring(2),8)}`)),x.createElement(ru,{size:"xs"})):x.createElement($c,{value:S,onChange:Q=>P(Q.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:x.createElement(tt,{size:"xs",shape:"square",label:"Paste",onClick:q,"data-id":"to-address",flexShrink:"0",leftIcon:Fg})})),h&&x.createElement(z,{marginTop:"3"},x.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),x.createElement(tt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>p&&p(t),disabled:d,style:{height:"52px",borderRadius:ve.radii.md}})),x.createElement(tt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!R||!Yy(S)||V||!d&&!f,label:"Send",rightIcon:oo,style:{height:"52px",borderRadius:ve.radii.md}}))},k4e=({chainId:t,contractAddress:e,tokenId:r})=>{var n,i,s,o,a;const{chains:c=[]}=on(),l=xb(),{address:u="",connector:f}=Sn(),d=!!(f!=null&&(n=f._wallet)!=null&&n.isSequenceBased),h=l===t,p=!h&&!d,{switchNetwork:v}=GS(),b=C.useRef(null),{setOpenWalletModal:y}=op(),[m,g]=C.useState("0"),[S,P]=C.useState(""),{data:T}=VS(),{data:w,isLoading:I}=OW({accountAddress:u,chainId:t,collectionAddress:e,tokenId:r}),B=_r(t,c);if(I)return null;const H=(w==null||(i=w.tokenMetadata)==null?void 0:i.decimals)||0,G=(w==null||(s=w.tokenMetadata)==null?void 0:s.name)||"Unknown",F=(w==null||(o=w.tokenMetadata)==null?void 0:o.image)||(w==null||(a=w.contractInfo)==null?void 0:a.logoURI)||"",E=m===""?"0":m,_=Mf(E,H),O=_.gt((w==null?void 0:w.balance)||"0"),N=_.gt(0),k=q=>{const{value:Y}=q.target,X=AW(Y,H);g(X)},$=()=>{var q;(q=b.current)==null||q.focus();const Y=Number(m)-1,X=Math.max(Y,0).toString();g(X)},L=()=>{var q;(q=b.current)==null||q.focus();const Y=Number(m)+1,X=Number(xr((w==null?void 0:w.balance)||0,H)),Q=Math.min(Y,X).toString();g(Q)},M=()=>{var q;(q=b.current)==null||q.focus();const Y=xr((w==null?void 0:w.balance)||0,H).toString();g(Y)},A=async()=>{const q=await navigator.clipboard.readText();P(q)},D=()=>{P("")},V=async q=>{q.preventDefault(),!h&&d&&v&&v(t);const Y=Mf(E,H),{contractType:X}=w;switch(X){case"ERC721":T==null||T.sendTransaction({to:w.contractAddress,data:new Fr(p4e).encodeFunctionData("safeTransferFrom",[u,S,r])}).catch(Q=>console.error("User rejected transaction",Q));break;case"ERC1155":default:T==null||T.sendTransaction({to:w.contractAddress,data:new Fr(d4e).encodeFunctionData("safeBatchTransferFrom",[u,S,[r],[Y.toHexString()],[]])}).catch(Q=>console.error("User rejected transaction",Q))}y(!1)},R=xr((w==null?void 0:w.balance)||0,H).toString(),U=Number(m)===0,W=Number(m)>=Number(R);return x.createElement(z,{padding:"5",paddingTop:"3",style:{marginTop:Ai},gap:"2",flexDirection:"column",as:"form",onSubmit:V},x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(NW,{imageUrl:F,showSquareImage:!0,decimals:H,name:G,symbol:"",balance:(w==null?void 0:w.balance)||"0",chainId:t}),x.createElement(PD,{ref:b,style:{fontSize:ve.fontSizes.xlarge,fontWeight:ve.fontWeights.bold},name:"amount",value:m,onChange:k,controls:x.createElement(z,{gap:"2"},x.createElement(tt,{disabled:U,size:"xs",onClick:$,leftIcon:gne}),x.createElement(tt,{disabled:W,size:"xs",onClick:L,leftIcon:qre}),x.createElement(tt,{size:"xs",shape:"square",label:"Max",onClick:M,"data-id":"maxCoin",flexShrink:"0"}))}),O&&x.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},x.createElement(re,{fontSize:"normal",color:"text50"},"To"),Yy(S)?x.createElement(z,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:co,onClick:D,style:{height:"52px"}},x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},x.createElement($1,{address:S,style:{width:"20px"}}),x.createElement(re,{color:"text100"},`0x${gk(S.substring(2),8)}`)),x.createElement(ru,{size:"xs"})):x.createElement($c,{value:S,onChange:q=>P(q.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:x.createElement(tt,{size:"xs",shape:"square",label:"Paste",onClick:A,"data-id":"to-address",flexShrink:"0",leftIcon:Fg})})),p&&x.createElement(z,{marginTop:"3"},x.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),x.createElement(tt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>v&&v(t),disabled:h,style:{height:"52px",borderRadius:ve.radii.md}})),x.createElement(tt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!N||!Yy(S)||O||!h&&!d,label:"Send",rightIcon:oo,style:{height:"52px",borderRadius:ve.radii.md}}))},A4e=({transaction:t})=>{var e;const{chains:r=[]}=on(),{fiatCurrency:n}=Un(),{setNavigation:i}=Os(),s=()=>{i({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(m=>{const g=m.contractAddress;o.includes(g)||o.push(g)});const{data:a=[],isLoading:c}=fu({tokens:o.map(m=>({contractAddress:m,chainId:t.chainId}))}),{data:l=1,isLoading:u}=Bc({toCurrency:n.symbol}),f=c||u,{transfers:d}=t,h=_r(t.chainId,r),p=m=>{switch(m){case os.SEND:return x.createElement(Jx,{style:{transform:"rotate(270deg)",width:"16px"}});case os.RECEIVE:return x.createElement(Jx,{style:{transform:"rotate(90deg)",width:"16px"}});case os.UNKNOWN:default:return x.createElement(PN,{style:{width:"14px"}})}},v=m=>{switch(m){case os.SEND:return"Sent";case os.RECEIVE:return"Received";case os.UNKNOWN:default:return"Transacted"}},b=(m,g,S)=>{let P="";S===os.SEND?P="-":S===os.RECEIVE&&(P="+");let T="text50";return S===os.SEND?T=ve.colors.negative:S===os.RECEIVE&&(T=ve.colors.positive),x.createElement(re,{fontWeight:"bold",fontSize:"normal",style:{color:T}},`${P}${m} ${g}`)},y=({transfer:m,isFirstItem:g})=>{const{amounts:S}=m,P=Nz(t.timestamp).format("MMM DD, YYYY");return x.createElement(z,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",justifyContent:"space-between"},x.createElement(z,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},p(m.transferType),x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text100"},v(m.transferType)),x.createElement(mr,{src:h.logoURI,width:"3"})),g&&x.createElement(z,null,x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},P))),S.map((T,w)=>{var I,B,j,H,G,F;const E=_r(t.chainId,r),_=ar(m.contractAddress,lr),O=((I=m.contractInfo)==null?void 0:I.type)==="ERC721"||((B=m.contractInfo)==null?void 0:B.type)==="ERC1155";let N;const k=(j=m.tokenIds)==null?void 0:j[w];if(O&&k){var $;N=(($=m.tokenMetadata)==null||($=$[k])==null?void 0:$.decimals)||0}else{var L;N=_?E.decimals:(L=m.contractInfo)==null?void 0:L.decimals}const M=xr(T,N),A=_?E.symbol:((H=m.contractInfo)==null?void 0:H.symbol)||"",D=_?E.logoURI:(G=m.contractInfo)==null?void 0:G.logoURI,V=(F=a.find(R=>ar(R.token.contractAddress,m.contractAddress)))==null||(F=F.price)==null?void 0:F.value;return x.createElement(z,{key:w,flexDirection:"row",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},D&&x.createElement(mr,{src:D,width:"5",alt:"token logo"}),b(ia(M),A,m.transferType)),f&&x.createElement(gt,{width:"35px",height:"20px"}),V&&x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(M)*V*l).toFixed(2)}`))}))};return x.createElement(z,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:co,onClick:()=>s()},d==null?void 0:d.map((m,g)=>x.createElement(z,{key:`${t.txnHash}-${g}`,width:"full"},y({transfer:m,isFirstItem:g===0}))))},Sk=()=>{const t=()=>x.createElement(z,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",justifyContent:"space-between"},x.createElement(gt,{width:"65px",height:"20px"}),x.createElement(gt,{width:"75px",height:"17px"})),x.createElement(z,{flexDirection:"row",justifyContent:"space-between"},x.createElement(gt,{width:"120px",height:"20px"}),x.createElement(gt,{width:"35px",height:"17px"})));return x.createElement(z,{flexDirection:"column",gap:"3"},x.createElement(gt,{width:"70px",height:"17px"}),x.createElement(z,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>x.createElement(z,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},kk=({transactions:t,isLoading:e,isFetchingNextPage:r})=>{const n=[{id:"today",label:"Today"},{id:"yesterday",label:"Yesterday"},{id:"week",label:"Last Week"},{id:"month",label:"Last Month"},{id:"year",label:"Last Year"},{id:"years",label:"Past Years"}],i=C.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),c=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),l=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const p=new Date(h.timestamp).getTime();p>a?d.today.push(h):p>c?d.yesterday.push(h):p>l?d.week.push(h):p>u?d.month.push(h):p>f?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return x.createElement(z,{flexDirection:"column",gap:"2"},x.createElement(Sk,null));const s=({label:a})=>x.createElement(z,null,x.createElement(re,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>x.createElement(z,{flexDirection:"column",gap:"2"},a.map((c,l)=>x.createElement(z,{key:`${c.txnHash}-${l}`,flexDirection:"column",gap:"2"},x.createElement(A4e,{transaction:c}))));return x.createElement(z,{flexDirection:"column",gap:"5"},n.map(a=>{const c=i[a.id];return c.length===0?null:x.createElement(z,{key:a.id,flexDirection:"column",gap:"3"},x.createElement(s,{label:a.label}),x.createElement(o,{transactions:c}))}),t.length===0&&x.createElement(z,{flexDirection:"column",gap:"3"},x.createElement(s,{label:"History"}),x.createElement(re,{color:"text100"},"No Recent Transaction History Found")),r&&x.createElement(z,{margin:"4",alignItems:"center",justifyContent:"center"},x.createElement(sS,null)))},_4e=()=>{const{selectedNetworks:t}=Un(),{address:e}=Sn(),{data:r=[],isLoading:n}=a4e({accountAddress:e||"",chainIds:t});return x.createElement(z,null,x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(kk,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},Zy=({balance:t})=>{var e,r;const{chains:n=[]}=on(),{setNavigation:i}=Os(),s=ar(t.contractAddress,lr),o=_r(t.chainId,n),a=s?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,c=s?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",l=()=>{var f,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=s?o.decimals:t==null||(f=t.contractInfo)==null?void 0:f.decimals,p=xr(t.balance,h||0),v=ia(p),b=s?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${v} ${b}`},u=()=>{const f=t.contractType==="ERC721"||t.contractType==="ERC1155";i(f?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return x.createElement(z,{key:t.contractAddress,onClick:u,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:co},x.createElement(z,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},x.createElement(Gl,{imageUrl:a,size:30}),x.createElement(z,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},x.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},c),x.createElement(mr,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},x.createElement(re,{color:"text50",fontWeight:"bold",fontSize:"normal"},l()),x.createElement(oo,{color:"text50"})))},MI=({toLocation:t,label:e})=>{const{setNavigation:r}=Os(),n=()=>{r(t)};return x.createElement(z,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:co},x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center"},x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),x.createElement(oo,{color:"text50",size:"sm"})))},P4e=()=>{const{chains:t=[]}=on(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Un(),[i,s]=C.useState(""),{address:o}=Sn(),{data:a,isLoading:c}=wk({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),l=(a==null?void 0:a.filter(j=>j.contractType==="ERC20"||ar(j.contractAddress,lr)))||[],{data:u=[],isLoading:f}=fu({tokens:l.map(j=>({chainId:j.chainId,contractAddress:j.contractAddress}))}),{data:d=1,isLoading:h}=Bc({toCurrency:e.symbol}),p=l.sort((j,H)=>{var G,F;return Number(go({balance:H,prices:u,conversionRate:d,decimals:((G=H.contractInfo)==null?void 0:G.decimals)||18}))-Number(go({balance:j,prices:u,conversionRate:d,decimals:((F=H.contractInfo)==null?void 0:F.decimals)||18}))}),b=((a==null?void 0:a.filter(j=>j.contractType==="ERC721"||j.contractType==="ERC1155"))||[]).sort((j,H)=>Number(H.balance)-Number(j.balance)),y=c||f||h,m=b.map((j,H)=>{var G;return{index:H,name:((G=j.contractInfo)==null?void 0:G.name)||"Unknown"}}),g=p.map((j,H)=>{if(ar(j.contractAddress,lr)){const F=_r(j.chainId,t);return{index:H,name:F.name}}else{var G;return{index:H,name:((G=j.contractInfo)==null?void 0:G.name)||"Unknown"}}}),S=p.length,P=b.length,T=new ea(g,{keys:["name"]}),w=new ea(m,{keys:["name"]}),I=(i===""?g:T.search(i).map(j=>j.item)).slice(0,5),B=(i===""?m:w.search(i).map(j=>j.item)).slice(0,5);return x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{width:"full"},x.createElement($c,{autoFocus:!0,name:"search wallet",leftIcon:Bg,value:i,onChange:j=>s(j.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),x.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},x.createElement(MI,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${P})`}),y?Array(5).fill(null).map((j,H)=>x.createElement(gt,{key:H,width:"100%",height:"32px"})):B.length===0?x.createElement(re,{color:"text100"},"No collections found"):B.map(j=>{const H=b[j.index];return x.createElement(Zy,{key:H.contractAddress,balance:H})})),x.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},x.createElement(MI,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${S})`}),y?Array(5).fill(null).map((j,H)=>x.createElement(gt,{key:H,width:"100%",height:"32px"})):I.length===0?x.createElement(re,{color:"text100"},"No coins found"):I.map(j=>{const H=p[j.index];return x.createElement(Zy,{key:H.contractAddress,balance:H})})))},T4e=({defaultTab:t})=>{const{chains:e=[]}=on(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:i}=Un(),[s,o]=C.useState(""),[a,c]=C.useState(t);C.useEffect(()=>{o("")},[a]);const{address:l}=Sn(),{data:u,isLoading:f}=wk({accountAddress:l||"",chainIds:i},{hideUnlistedTokens:n}),d=(u==null?void 0:u.filter(_=>_.contractType==="ERC20"||ar(_.contractAddress,lr)))||[],{data:h=[],isLoading:p}=fu({tokens:d.map(_=>({chainId:_.chainId,contractAddress:_.contractAddress}))}),{data:v=1,isLoading:b}=Bc({toCurrency:r.symbol}),y=d.sort((_,O)=>{var N,k;return Number(go({balance:O,prices:h,conversionRate:v,decimals:((N=O.contractInfo)==null?void 0:N.decimals)||18}))-Number(go({balance:_,prices:h,conversionRate:v,decimals:((k=_.contractInfo)==null?void 0:k.decimals)||18}))}),g=((u==null?void 0:u.filter(_=>_.contractType==="ERC721"||_.contractType==="ERC1155"))||[]).sort((_,O)=>Number(O.balance)-Number(_.balance)),S=y.length,P=g.length,T=f||p||b,w=g.map((_,O)=>{var N;return{index:O,name:((N=_.contractInfo)==null?void 0:N.name)||"Unknown"}}),I=y.map((_,O)=>{if(ar(_.contractAddress,lr)){const k=_r(_.chainId,e);return{index:O,name:k.name}}else{var N;return{index:O,name:((N=_.contractInfo)==null?void 0:N.name)||"Unknown"}}}),B=new ea(I,{keys:["name"]}),j=new ea(w,{keys:["name"]}),H=s===""?I:B.search(s).map(_=>_.item),G=s===""?w:j.search(s).map(_=>_.item),F=()=>x.createElement(gt,{width:"360px",height:"48px"}),E=()=>x.createElement(x.Fragment,null,Array(8).fill(null).map((_,O)=>x.createElement(gt,{key:O,width:"full",height:"32px"})));return x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{width:"full"},x.createElement($c,{autoFocus:!0,name:"search wallet",leftIcon:Bg,value:s,onChange:_=>o(_.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),x.createElement(z,{width:"full"},x.createElement(Mce,{value:a,onValueChange:_=>c(_)},x.createElement(z,{marginBottom:"5"},!T&&x.createElement($ce,{value:a,tabs:[{label:`Collections (${P})`,value:"collections"},{label:`Coins (${S})`,value:"coins"}]}),T&&x.createElement(F,null)),x.createElement(TP,{value:"collections"},x.createElement(z,{flexDirection:"column",gap:"3"},T&&x.createElement(E,null),!T&&G.length===0&&x.createElement(re,{color:"text100"},"No Collectibles Found"),!T&&G.length>0&&G.map(_=>{const O=g[_.index];return x.createElement(Zy,{key:O.contractAddress,balance:O})}))),x.createElement(TP,{value:"coins"},x.createElement(z,{flexDirection:"column",gap:"3"},T&&x.createElement(E,null),!T&&y.length==0&&x.createElement(re,{color:"text100"},"No Coins Found"),!T&&H.length>0&&H.map(_=>{const O=y[_.index];return x.createElement(Zy,{key:O.contractAddress,balance:O})}))))))},I4e=()=>{const{setNavigation:t}=Os(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{padding:"5",paddingTop:"3"},x.createElement(z,{flexDirection:"column",gap:"2"},x.createElement(tt,{onClick:e,leftIcon:AN,rightIcon:oo,width:"full",label:"General",style:{height:"52px",borderRadius:ve.radii.md}}),x.createElement(tt,{onClick:r,leftIcon:ene,rightIcon:oo,width:"full",label:"Currency",style:{height:"52px",borderRadius:ve.radii.md}}),x.createElement(tt,{onClick:n,leftIcon:cne,rightIcon:oo,width:"full",label:"Networks",style:{height:"52px",borderRadius:ve.radii.md}}))))},O4e=()=>{const{theme:t,setTheme:e}=np(),{hideUnlistedTokens:r,setHideUnlistedTokens:n,hideCollectibles:i,setHideCollectibles:s}=Un(),o=()=>{e&&e(t==="light"?"dark":"light")},a=()=>{n(!r)},c=()=>{s(!i)};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},x.createElement(bs,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},"Dark mode"),x.createElement(O2,{checked:t==="dark",onCheckedChange:o})),x.createElement(bs,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},"Hide unlisted tokens"),x.createElement(O2,{checked:r,onCheckedChange:a})),x.createElement(bs,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},"Hide collectibles"),x.createElement(O2,{checked:i,onCheckedChange:c}))))},R4e=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return x.createElement(z,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":ve.radii.circle,width:"20px",height:"20px"}},x.createElement(z,{as:O0.div,background:n?"borderNormal":"backgroundInverse",position:"absolute",color:"textInverse100",initial:{opacity:e?1:0,scale:e?1:.5},animate:{opacity:e?1:0,scale:e?1:.5},transition:{ease:"backOut"},style:{borderRadius:n?"4px":ve.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&x.createElement(cd,{color:"white",style:{width:"14px",height:"14px"}})))},$4e=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],DW=t=>{const{value:e,selected:r,children:n,disabled:i,onClick:s,className:o,hideIndicator:a,squareIndicator:c=!1}=t,l=tw(t,$4e);return x.createElement(bs,gn({as:"button",clickable:!0,className:ESe(o),disabled:i,onClick:()=>s(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},l),n,!a&&x.createElement(R4e,{selected:r,squareIndicator:c}))},M4e=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Un();return x.createElement(z,{paddingBottom:"5",paddingLeft:"5",paddingTop:"3",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{flexDirection:"column",gap:"2"},MW.map(r=>x.createElement(DW,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},x.createElement(z,{gap:"2",justifyContent:"flex-start",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold"},r.symbol),x.createElement(re,{color:"text50"},r.name.message))))))},N4e=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Un(),{chains:r=[]}=on(),n=i=>{if(t.includes(i)){if(t.length===1)return;e(t.filter(s=>s!==i))}else e([...t,i])};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{padding:"5",paddingTop:"3"},x.createElement(re,{variant:"small",color:"text50"},"Networks"),x.createElement(z,{flexDirection:"column",gap:"2"},r.map(i=>{const s=_r(i.id,r);return x.createElement(DW,{disabled:t.length===1&&t.includes(i.id),key:i.id,selected:t.includes(i.id),onClick:()=>n(i.id),value:i.id,squareIndicator:!0},x.createElement(z,{gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(mr,{width:"3",height:"3",src:s.logoURI,alt:"network"}),x.createElement(re,{color:"text100",variant:"small"},s.name)))}))))},ap=({chainId:t})=>{const{chains:e=[]}=on(),{network:r}=cn(t),n=_r(t,e),i=wxe(t),s=Exe(t);return x.createElement(z,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:s},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"min"},x.createElement(mr,{style:{width:"14px"},src:n.logoURI}),x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",style:{color:i}},Vke(r.name)))},D4e=({chainId:t})=>x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(gt,{width:"32px",height:"32px"}),x.createElement(gt,{height:"24px",width:"70px"}),x.createElement(ap,{chainId:t})),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(gt,{width:"150px",height:"36px"}),x.createElement(gt,{width:"33px",height:"17px"}))),x.createElement(tt,{marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:jg,label:"Send",disabled:!0,onClick:()=>{}}),x.createElement(z,null,x.createElement(Sk,null)))),L4e=(t,e)=>{var r;const[n,i]=C.useState(null),s=C.useMemo(()=>new IntersectionObserver(([o])=>i(o),e),[]);return C.useEffect(()=>(t.current&&s.observe(t.current),()=>{t.current&&s.disconnect()}),[t.current,s]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},LW=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[i,s]=C.useState(0),[o,a]=C.useState(!1),c=C.useRef(null),l=L4e(c);C.useEffect(()=>{l&&r&&!o&&u()},[l]);const u=async()=>{a(!0),await e(i),s(f=>f+1),a(!1)};return x.createElement(x.Fragment,null,n,x.createElement("div",{ref:c}))},F4e=({contractAddress:t,chainId:e})=>{var r,n,i,s;const{chains:o=[]}=on(),{setNavigation:a}=Os(),{fiatCurrency:c,hideUnlistedTokens:l}=Un(),{address:u}=Sn(),{data:f,isLoading:d,fetchNextPage:h,hasNextPage:p,isFetchingNextPage:v}=$W({chainId:e,accountAddress:u||"",contractAddress:t}),b=PW(f),{data:y,isLoading:m}=o4e({accountAddress:u||"",contractAddress:t,chainId:e},{hideUnlistedTokens:l}),{data:g,isLoading:S}=fu({tokens:[{chainId:e,contractAddress:t}]}),{data:P=1,isLoading:T}=Bc({toCurrency:c.symbol});if(m||S||T)return x.createElement(D4e,{chainId:e});const I=ar(t,lr),B=I?_r(e,o).logoURI:y==null||(r=y.contractInfo)==null?void 0:r.logoURI,j=I?_r(e,o).symbol:y==null||(n=y.contractInfo)==null?void 0:n.symbol,H=I?_r(e,o).name:y==null||(i=y.contractInfo)==null?void 0:i.name,G=I?_r(e,o).decimals:y==null||(s=y.contractInfo)==null?void 0:s.decimals,F=xr((y==null?void 0:y.balance)||"0",G),E=ia(F),_=y?go({balance:y,prices:g||[],conversionRate:P,decimals:G||0}):"0",O=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(mr,{width:"8",src:B,alt:"logo"}),x.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},H),x.createElement(ap,{chainId:e})),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${E} ${j}`),x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${c.sign}${_}`))),x.createElement(tt,{width:"full",variant:"primary",leftIcon:jg,label:"Send",onClick:O}),x.createElement(z,null,x.createElement(LW,{onLoad:()=>h(),hasMore:p},x.createElement(kk,{transactions:b,isLoading:d,isFetchingNextPage:v})))))},B4e=({chainId:t})=>x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(gt,{width:"32px",height:"32px"}),x.createElement(gt,{width:"100px",height:"24px"}),x.createElement(ap,{chainId:t}),x.createElement(gt,{width:"142px",height:"17px"})),x.createElement(z,{width:"full"},x.createElement(gt,{width:"168px",height:"20px"}),x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>x.createElement(gt,{width:"full",aspectRatio:"1/1"}))))),j4e=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Os(),{address:i}=Sn(),{data:s,isLoading:o}=i4e({chainId:t,accountAddress:i||"",collectionAddress:e}),a=s==null||(r=s[0])==null?void 0:r.contractInfo,c=a==null?void 0:a.logoURI;if(o)return x.createElement(B4e,{chainId:t});const l=u=>{n&&n({location:"collectible-details",params:{contractAddress:u.contractAddress,chainId:u.chainId,tokenId:u.tokenID}})};return x.createElement(z,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(Gl,{imageUrl:c,size:32}),x.createElement(re,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),x.createElement(ap,{chainId:t}),x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(s==null?void 0:s.length)||0} Unique Collectibles`)),x.createElement(z,{width:"full"},x.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(s==null?void 0:s.length)||0})`),x.createElement(z,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ve.space[1]}) calc(50% - ${ve.space[1]})`,gap:ve.space[2]},width:"full",marginTop:"3"},s==null?void 0:s.map(u=>{var f,d,h;const p=u.balance,v=(u==null||(f=u.tokenMetadata)==null?void 0:f.decimals)||0,b=ia(xr(p,v));return x.createElement(z,{key:`${u.contractAddress}-${u.tokenID}`,onClick:()=>l(u),className:co},x.createElement(z,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},x.createElement(mr,{style:{height:"100%"},src:(d=u.tokenMetadata)==null?void 0:d.image})),x.createElement(z,null,x.createElement(re,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(h=u.tokenMetadata)==null?void 0:h.name}`)),x.createElement(z,null,x.createElement(re,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},b," Owned")))}))))},U4e=()=>x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(gt,{width:"120px",height:"30px"}),x.createElement(gt,{width:"140px",height:"40px"})),x.createElement(z,null,x.createElement(gt,{width:"347px",height:"347px"})),x.createElement(z,null,x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(gt,{width:"44px",height:"36px"}),x.createElement(gt,{width:"34px",height:"17px"}))),x.createElement(tt,{marginTop:"4",width:"full",variant:"primary",leftIcon:jg,label:"Send",onClick:()=>{}})),x.createElement(z,null,x.createElement(re,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),x.createElement(Sk,null)))),z4e=({contractAddress:t,chainId:e,tokenId:r})=>{var n,i,s,o,a,c;const{chains:l=[]}=on(),{address:u}=Sn(),{fiatCurrency:f}=Un(),{setNavigation:d}=Os(),{data:h,isLoading:p,fetchNextPage:v,hasNextPage:b,isFetchingNextPage:y}=$W({chainId:e,accountAddress:u||"",contractAddress:t,tokenId:r}),m=PW(h),{data:g,isLoading:S}=OW({accountAddress:u||"",collectionAddress:t,chainId:e,tokenId:r}),{data:P,isLoading:T}=RW({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:w=1,isLoading:I}=Bc({toCurrency:f.symbol});if(S||T||I)return x.createElement(U4e,null);const j=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},H=_r(e,l),G=g==null||(n=g.contractInfo)==null?void 0:n.logoURI,F=(g==null||(i=g.contractInfo)==null?void 0:i.name)||"Unknown Collection",E=(g==null||(s=g.tokenMetadata)==null?void 0:s.decimals)||0,_=(g==null?void 0:g.balance)||"0",O=xr(_,E),N=ia(Number(O)),k=g?go({balance:g,prices:P||[],conversionRate:w,decimals:E}):"0";return x.createElement(z,{style:{paddingTop:Ai}},x.createElement(z,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ve.space[5]} - ${Rs})`}},x.createElement(z,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},x.createElement(z,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},x.createElement(mr,{borderRadius:"circle",width:"8",src:G,alt:"collection logo",style:{objectFit:"cover"}}),x.createElement(z,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},x.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text100"},F),x.createElement(mr,{width:"3",src:H.logoURI,alt:"collection logo"}))),x.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"center"},x.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},(g==null||(o=g.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),x.createElement(re,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),x.createElement(z,null,x.createElement(Ek,{imageUrl:g==null||(a=g.tokenMetadata)==null?void 0:a.image})),x.createElement(z,null,x.createElement(z,null,x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),x.createElement(z,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},x.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},N),P&&((c=P[0].price)==null?void 0:c.value)&&x.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${f.symbol} ${k}`))),x.createElement(tt,{marginTop:"4",width:"full",variant:"primary",leftIcon:jg,label:"Send",onClick:j})),x.createElement(z,null,x.createElement(LW,{onLoad:()=>v(),hasMore:b},x.createElement(kk,{transactions:m,isLoading:p,isFetchingNextPage:y})))))},W4e=["buttonVariant","text","size"],FW=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,i=tw(t,W4e),[s,o]=C.useState(!1);C.useEffect(()=>{s&&setTimeout(()=>{o(!1)},4e3)},[s]);const a=()=>{o(!0)},c=s?"Copied!":"Copy",l=e==="icon"?"rgba(0,0,0,0)":ve.colors.buttonGlass;return x.createElement(xz.CopyToClipboard,{text:r,onCopy:a},x.createElement(Jo,gn({size:n,icon:s?cd:Fg},i,{style:gn({background:l},t==null?void 0:t.style),label:e==="with-label"?c:void 0})))},H4e=({transaction:t})=>{var e,r;const{chains:n=[]}=on(),{fiatCurrency:i}=Un(),s=[],o=[];(e=t.transfers)==null||e.forEach(m=>{var g,S;if(((g=m.contractInfo)==null?void 0:g.type)==="ERC721"||((S=m.contractInfo)==null?void 0:S.type)==="ERC1155"){var P;(P=m.tokenIds)==null||P.forEach(w=>{if(!o.find(j=>{var H;return j.chainId===t.chainId&&ar(j.contractAddress,((H=m.contractInfo)==null?void 0:H.address)||"")&&j.tokenId===w})){var B;o.push({chainId:t.chainId,contractAddress:((B=m.contractInfo)==null?void 0:B.address)||"",tokenId:w})}})}else{var T;const w=(m==null||(T=m.contractInfo)==null?void 0:T.address)||lr;s.find(B=>B.chainId===t.chainId&&ar(B.contractAddress,w))||s.push({chainId:t.chainId,contractAddress:w})}});const{data:a,isLoading:c}=fu({tokens:s}),{data:l,isLoading:u}=RW({tokens:o}),{data:f=1,isLoading:d}=Bc({toCurrency:i.symbol}),h=s.length>0&&c||o.length>0&&u||d,p=_r(t.chainId,n),v=Nz(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),b=()=>{window.open(`${p.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},y=({transfer:m})=>{var g,S,P,T;const w=m.to,I=w.substring(0,10)+"..."+w.substring(m.to.length-4,m.to.length),B=ar((m==null||(g=m.contractInfo)==null?void 0:g.address)||"",lr),j=B?p.logoURI:m==null||(S=m.contractInfo)==null?void 0:S.logoURI,H=B?p.symbol:(m==null||(P=m.contractInfo)==null?void 0:P.symbol)||"";return x.createElement(x.Fragment,null,(T=m.amounts)==null?void 0:T.map((G,F)=>{var E,_,O,N,k;const $=m.contractType==="ERC721"||m.contractType==="ERC1155",L=((E=m.tokenIds)==null?void 0:E[F])||"0",M=(m==null||(_=m.tokenMetadata)==null||(_=_[L])==null?void 0:_.decimals)||0,A=B?p.decimals:(m==null||(O=m.contractInfo)==null?void 0:O.decimals)||0,V=xr(G,$?M:A),R=ia(V),U=$?l==null||(N=l.find(q=>{var Y,X;return ar(q.token.contractAddress,((Y=m.contractInfo)==null?void 0:Y.address)||"")&&q.token.tokenId===((X=m.tokenIds)==null?void 0:X[F])&&q.token.chainId===t.chainId}))==null||(N=N.price)==null?void 0:N.value:a==null||(k=a.find(q=>{var Y;return ar(q.token.contractAddress,((Y=m.contractInfo)==null?void 0:Y.address)||lr)&&q.token.chainId===t.chainId}))==null||(k=k.price)==null?void 0:k.value,W=(parseFloat(V)*(f*(U||0))).toFixed(2);return x.createElement(z,{key:F,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},x.createElement(z,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},x.createElement(Gl,{imageUrl:j,size:20}),x.createElement(z,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${R} ${H}`),h?x.createElement(gt,{width:"44px",height:"12px"}):x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},U?`${i.sign}${W}`:""))),x.createElement(Jx,{color:"text50",style:{width:"16px"}}),x.createElement(z,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},x.createElement($1,{address:w,style:{width:"20px"}}),x.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},I)))}))};return x.createElement(z,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},x.createElement(z,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},x.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),x.createElement(re,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},v),x.createElement(ap,{chainId:t.chainId})),x.createElement(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},x.createElement(z,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},x.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),x.createElement(mr,{width:"3",src:p.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((m,g)=>x.createElement(z,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${g}`},x.createElement(y,{transfer:m})))),x.createElement(tt,{onClick:b,width:"full",borderRadius:"md",rightIcon:ine,label:`View on ${p.blockExplorerName}`}),x.createElement(z,null,x.createElement(z,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},x.createElement(R0,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),x.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text100"},"Complete")),x.createElement(z,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},x.createElement(R0,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),x.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),x.createElement(FW,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},q4e=C.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Sn();return x.createElement(z,{gap:"2",alignItems:"center"},x.createElement(z,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},x.createElement(z,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:co,position:"relative",ref:e},x.createElement($1,{size:"sm",address:r||""}),x.createElement(re,{color:"text100",fontWeight:"medium",variant:"normal"},kW(r||"")),x.createElement(kN,null))))}),V4e=C.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Os(),{setOpenWalletModal:n}=op(),{address:i}=Sn(),{disconnect:s}=DF(),{theme:o}=np(),a=()=>{t(!1),r({location:"receive"})},c=()=>{t(!1),r({location:"history"})},l=()=>{t(!1),r({location:"settings"})},u=()=>{n(!1),t(!1),s()};return x.createElement(z,{padding:"3",ref:e,zIndex:"30",borderRadius:"md",style:{position:"relative",pointerEvents:"auto",width:"370px",backdropFilter:"blur(12.5px)",top:"16px",left:"15px",background:o==="dark"?"rgba(38, 38, 38, 0.85)":"rgba(217, 217, 217, 0.85)"}},x.createElement(z,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},x.createElement(z,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2",color:"text100"},x.createElement($1,{style:{width:"28px"},size:"md",address:i||""}),x.createElement(re,{fontSize:"large",style:{fontWeight:"700"},color:"text100"},kW(i||"")),x.createElement(FW,{buttonVariant:"icon",size:"md",text:i||"",color:"text100",style:{marginLeft:"-16px"}})),x.createElement(Jo,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:ru})),x.createElement(z,{gap:"2",marginTop:"3",flexDirection:"column"},x.createElement(tt,{style:{borderRadius:ve.radii.md},width:"full",leftIcon:une,label:"Receive",onClick:a}),x.createElement(tt,{style:{borderRadius:ve.radii.md},width:"full",leftIcon:PN,label:"History",onClick:c}),x.createElement(tt,{style:{borderRadius:ve.radii.md},width:"full",leftIcon:AN,label:"Settings",onClick:l}),x.createElement(tt,{label:"Sign Out",style:{borderRadius:ve.radii.md},width:"full",leftIcon:_N,onClick:u})))});au("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const G4e=ki({":focus-visible":{boxShadow:"none"}},"searchButton");cu();const bE=({})=>{const{openWalletModalState:t}=op(),[e,r]=C.useState(!1),{goBack:n,history:i,setNavigation:s}=Os(),o=C.useRef(!1);C.useEffect(()=>{t||r(!1)},[t]),C.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[i.length,e]);const a=()=>{r(!0)},c=()=>{n()},l=()=>{s({location:"search"})};return x.createElement(z,{as:O0.div},x.createElement(jke,{open:e},x.createElement(Uke,null),x.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Ai,paddingTop:"6px"}},i.length>0?x.createElement(Jo,{onClick:c,icon:Lg,style:{backgroundColor:ve.colors.backgroundPrimary,width:"44px"}}):x.createElement(Jo,{onClick:l,icon:Bg,className:G4e,style:{backgroundColor:ve.colors.backgroundPrimary,width:"44px"}}),x.createElement(zke,{asChild:!0},x.createElement(q4e,{onClickAccount:a})),x.createElement(z,{style:{width:"44px"}})),x.createElement(Mg,null,e&&x.createElement(Wke,{asChild:!0,side:"bottom",align:"start"},x.createElement(V4e,{setOpenWalletDropdown:r})))))},Ds=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Os(),i=()=>{r()};return x.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Ai,paddingTop:"6px",backgroundColor:ve.colors.backgroundPrimary}},n.length>0?x.createElement(Jo,{onClick:i,icon:Lg,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):x.createElement(z,null),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),x.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),x.createElement(z,{style:{width:"44px"}}))},NI=t=>{const{location:e}=t;switch(e){case"send-coin":return x.createElement(S4e,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return x.createElement(k4e,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return x.createElement(C4e,null);case"history":return x.createElement(_4e,null);case"search":return x.createElement(P4e,null);case"search-view-all":return x.createElement(T4e,{defaultTab:t.params.defaultTab});case"settings":return x.createElement(I4e,null);case"settings-general":return x.createElement(O4e,null);case"settings-currency":return x.createElement(M4e,null);case"settings-networks":return x.createElement(N4e,null);case"coin-details":return x.createElement(F4e,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return x.createElement(z4e,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return x.createElement(j4e,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return x.createElement(H4e,{transaction:t.params.transaction});case"home":default:return x.createElement(x4e,null)}},K4e=t=>{const{location:e}=t;switch(e){case"search":return x.createElement(Ds,{primaryText:"Search wallet"});case"search-view-all":return x.createElement(Ds,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return x.createElement(Ds,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return x.createElement(Ds,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return x.createElement(Ds,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return x.createElement(Ds,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return x.createElement(Ds,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return x.createElement(Ds,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return x.createElement(bE,null);case"collectible-details":return x.createElement(bE,null);case"transaction-details":return x.createElement(Ds,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return x.createElement(Ds,{secondaryText:"Wallet /",primaryText:"Send"});case"home":default:return x.createElement(bE,null)}},Q4e={location:"home"},Y4e=t=>{const e=new lS;return x.createElement(hS,{client:e},x.createElement(J4e,t))},J4e=({children:t})=>{const{theme:e,position:r}=np(),[n,i]=C.useState(!1),[s,o]=C.useState([]),a=s.length>0?s[s.length-1]:Q4e,c=a.location==="home"||a.location==="collection-details"||a.location==="collectible-details"||a.location==="coin-details"||a.location==="history"||a.location==="search"||a.location==="search-view-all"||a.location==="settings-currency";return C.useEffect(()=>{n&&o([])},[n]),x.createElement(qke,{value:{setOpenWalletModal:i,openWalletModalState:n}},x.createElement(f4e,{value:{setHistory:o,history:s}},x.createElement("div",{id:"kit-wallet"},x.createElement(Gg,{root:"#kit-wallet",scope:"kit",theme:e},x.createElement(Mg,null,n&&x.createElement(rS,{contentProps:{style:gn({maxWidth:"400px",height:"fit-content"},sk(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>i(!1)},x.createElement(z,{className:Ck,id:"sequence-kit-wallet-content"},K4e(a),c?x.createElement(SD,{className:xk,style:{paddingTop:Ai,height:"min(800px, 80vh)"}},NI(a)):NI(a)))))),t))};var X4e=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",Z4e=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),BW=()=>{var t;return X4e()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":Z4e()?window.location.origin:"https://withpaper.com"},jW={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},eAe=Object.defineProperty,tAe=Object.defineProperties,rAe=Object.getOwnPropertyDescriptors,DI=Object.getOwnPropertySymbols,nAe=Object.prototype.hasOwnProperty,iAe=Object.prototype.propertyIsEnumerable,LI=(t,e,r)=>e in t?eAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Wn=(t,e)=>{for(var r in e||(e={}))nAe.call(e,r)&&LI(t,r,e[r]);if(DI)for(var r of DI(e))iAe.call(e,r)&&LI(t,r,e[r]);return t},FI=(t,e)=>tAe(t,rAe(e)),sAe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),UW=sAe((t,e)=>{e.exports={name:"@paperxyz/js-client-sdk",description:"Paper JS SDK for Checkout Elements",version:"0.2.5",license:"Apache-2.0",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",files:["dist/**"],bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",scripts:{build:"tsup src/index.ts --env.NODE_ENV production","build-package-checkout":"yarn build","dev-checkout":"tsup src/index.ts --env.NODE_ENV development --watch",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/js-client-sdk"},keywords:[],devDependencies:{"@paperxyz/tsconfig":"*","eslint-config-paperxyz":"*",typescript:"^4.7.4"},dependencies:{"@paperxyz/sdk-common-utilities":"*",ethers:"^5.7.2"},publishConfig:{access:"public"}}}),zW=BW(),oAe="/sdk/2022-08-12/checkout-with-card",aAe=(t=>(t.UserAbandonedCheckout="User abandoned the checkout",t.UserLoginFailed="User login failed",t.InvalidProps="The props you passed in to this component are not valid.",t.InvalidCard="The card information is invalid. Please double check that the Card, CVC, and Zip code are all correct.",t.EmailNotVerified="The email was unable to be verified.",t.NotEnoughSupply="There is not enough supply to claim.",t.AddressNotAllowed="This address is not on the allowlist.",t.NoActiveClaimPhase="There is no active claim phase at the moment.",t))(aAe||{}),cAe=(t=>(t.ErrorConnectingToWallet="Error connecting to wallet",t.ErrorSendingTransaction="Something went wrong sending transaction",t.InsufficientBalance="Insufficient ETH",t.TransactionCancelled="Transaction Cancelled",t.WrongChain="Wrong Chain Detected",t.ChainSwitchUnderway="There is a network switch already underway",t.PendingSignature="Pending Signature",t))(cAe||{}),lAe=class{constructor(t){this.link=t}addStylingOptions(t){t.colorPrimary&&this.link.searchParams.set("colorPrimary",t.colorPrimary),t.colorBackground&&this.link.searchParams.set("colorBackground",t.colorBackground),t.colorText&&this.link.searchParams.set("colorText",t.colorText),t.borderRadius!==void 0&&this.link.searchParams.set("borderRadius",t.borderRadius.toString()),t.fontFamily&&this.link.searchParams.set("fontFamily",t.fontFamily),t.inputBackgroundColor&&this.link.searchParams.set("inputBackgroundColor",t.inputBackgroundColor),t.inputBorderColor&&this.link.searchParams.set("inputBorderColor",t.inputBorderColor)}addClientSecret(t){this.link.searchParams.set("sdkClientSecret",t)}addLocale(t){t&&this.link.searchParams.set("locale",t.toString())}addOTP(){this.link.searchParams.set("withOTP","true")}addAppName(t){t&&this.link.searchParams.set("appName",t)}addShowConnectWalletOptions(t){this.link.searchParams.append("showConnectWalletOptions",t.toString())}addReceivingWalletType(t){this.link.searchParams.append("walletType",t||"Preset")}addRecipientWalletAddress(t){this.link.searchParams.set("recipientWalletAddress",t)}addPayerWalletAddress(t){this.link.searchParams.append("payerWalletAddress",t)}addDate(t){this.link.searchParams.set("date",t?t.toString():Date.now().toString())}getLink(){return this.link}},uAe=({url:t,width:e=440,height:r=700})=>{if(!(window!=null&&window.top))return null;let n=window.top.outerHeight/2+window.top.screenY-r/2,i=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${i}`)};function BI(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Wn({eventType:e},r),"*")}var fAe=UW(),dAe=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let i=document.createElement("iframe");if(i.src=r.href,i.id=n,i.allow="payment",i.setAttribute("style","margin-left:auto; margin-right:auto; width:100%; height: 100%; min-height:375px; transition-property:all; transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1); transition-duration:150ms; color-scheme: light;"),i.onload=a=>{this.onLoad&&this.onLoad(a)},i.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${fAe.version}`),!this.elementOrId)return window.addEventListener("message",e(i)),i;let s=this.elementOrId;if(typeof s=="string"){let a=document.getElementById(s);if(!a)throw new Error("Invalid id given");s=a}let o=s.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(i)),s.appendChild(i))}},jI={top:"0px",left:"0px",right:"0px",bottom:"0px"},hAe=()=>({main:FI(Wn({},jI),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center"}),overlay:FI(Wn({},jI),{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.33)"}),body:{background:"transparent",borderRadius:"12px",position:"relative",overflow:"hidden",width:"100%",maxWidth:"500px",height:"700px",maxHeight:"80%",animation:"pew-modal-slideIn 0.2s forwards"},spinner:{position:"absolute",top:"0",bottom:"0",left:"0",right:"0",margin:"auto",borderWidth:"3px",borderColor:"#2D3748 #2D3748 transparent transparent",borderRadius:"50%",width:"30px",height:"30px",animation:"spin 1s linear infinite"},iframe:{position:"relative",height:"100%",width:"100%",border:"none",background:"transparent"}}),pAe=` @keyframes pew-modal-slideIn { from {opacity: 0; transform: translate3d(0, 20px, 0);} to {opacity: 1; transform: translate3d(0, 0, 0);} @@ -310,11 +315,11 @@ Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.val @keyframes spin { to { transform: rotate(360deg); } } -`,sh="paper-js-sdk-modal",s4e=class{constructor(t,e){this.styles=n4e(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=sh,this.overlay=document.createElement("div"),this.overlay.id=`${sh}-overlay`,this.body=document.createElement("div"),this.body.id=`${sh}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${sh}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${sh}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=i4e,this.assignStyles(this.main,this.styles.main),this.assignStyles(this.overlay,this.styles.overlay),this.assignStyles(this.body,this.styles.body),this.assignStyles(this.spinner,this.styles.spinner),this.assignStyles(this.iframe,this.styles.iframe)}open({iframeUrl:t}={}){t&&(this.body.appendChild(this.spinner),this.iframe.src=t,this.iframe.onload=()=>this.body.removeChild(this.spinner),this.body.appendChild(this.iframe)),this.addAccessibility(),this.main.appendChild(this.overlay),this.main.appendChild(this.style),this.main.appendChild(this.body),this.container.appendChild(this.main),document.body.style.overflow="hidden"}close(){this.body.style.animation="pew-modal-slideOut 0.2s forwards",window.setTimeout(()=>this.main.remove(),250)}mergeStyles(t){this.styles.body=Wn(Wn({},this.styles.body),t.body||{}),this.styles.spinner=Wn(Wn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Wn(Wn({},this.styles.overlay),t.overlay||{}),this.styles.main=Wn(Wn({},this.styles.main),t.main||{}),this.styles.iframe=Wn(Wn({},this.styles.iframe),t.iframe||{})}addAccessibility(){this.main.setAttribute("aria-hidden","true"),this.overlay.setAttribute("aria-hidden","true"),this.body.setAttribute("aria-modal","true"),this.body.setAttribute("role","dialog")}assignStyles(t,e){Object.assign(t.style,e)}};function o4e({sdkClientSecret:t,appName:e,options:r=Wn({},DW),locale:n,configs:i}){let s=new URL(YAe,BW),o=t;if(!o&&i&&(o=btoa(JSON.stringify(i))),!o){let c="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",l=NW();return new URL(c,l)}let a=new ZAe(s);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function a4e({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:i,onPriceUpdate:s}){let o;return a=>{if(!a.origin.startsWith(BW))return;let{data:c}=a;switch(c.eventType){case"checkoutWithCardError":e&&e({code:c.code,error:c.error});break;case"paymentSuccess":n&&n({transactionId:c.id,id:c.id}),c.postToIframe&&DI(t,c.eventType,c);break;case"reviewComplete":r&&r({id:c.id,cardholderName:c.cardholderName});break;case"openModalWithUrl":i&&c.url&&c.url.includes("promptKYCModal")?i({url:c.url}):(o=new s4e(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:c.url}));break;case"completedSDKModal":o.close(),c.postToIframe&&DI(t,c.eventType,c);break;case"requestedPopup":{e4e({url:c.url,width:c.width,height:c.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=c.height+"px",t.style.maxHeight=c.height+"px";break;case"onPriceUpdate":{s==null||s(c);break}}}}function c4e({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:i,onLoad:s,onError:o,locale:a,options:c,onPaymentSuccess:l,onReview:u,onBeforeModalOpen:f,onPriceUpdate:d,useAltDomain:h=!0,configs:p}){let v="checkout-with-card-iframe",b=m=>a4e({iframe:m,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:l,onReview:u,onBeforeModalOpen:f,onPriceUpdate:d,useAltDomain:h}),y=o4e({sdkClientSecret:r,appName:n,locale:a,options:c,useAltDomain:h,configs:p});return new r4e({onLoad:s,elementOrId:i}).createPaymentElement({handler:b,iframeId:v,link:y})}LW();function l4e(t){if(t.sheet)return t.sheet;for(var e=0;e0?Zr(Rd,--ii):0,Jf--,kr===10&&(Jf=1,nw--),kr}function gi(){return kr=ii2||v1(kr)>3?"":" "}function x4e(t,e){for(;--e&&gi()&&!(kr<48||kr>102||kr>57&&kr<65||kr>70&&kr<97););return cp(t,em()+(e<6&&lo()==32&&gi()==32))}function K5(t){for(;gi();)switch(kr){case t:return ii;case 34:case 39:t!==34&&t!==39&&K5(kr);break;case 40:t===41&&K5(t);break;case 92:gi();break}return ii}function C4e(t,e){for(;gi()&&t+kr!==47+10;)if(t+kr===42+42&&lo()===47)break;return"/*"+cp(e,ii-1)+"*"+rw(t===47?t:gi())}function S4e(t){for(;!v1(lo());)gi();return cp(t,ii)}function k4e(t){return HW(rm("",null,null,null,[""],t=WW(t),0,[0],t))}function rm(t,e,r,n,i,s,o,a,c){for(var l=0,u=0,f=o,d=0,h=0,p=0,v=1,b=1,y=1,m=0,g="",S=i,P=s,T=n,w=g;b;)switch(p=m,m=gi()){case 40:if(p!=108&&Zr(w,f-1)==58){G5(w+=it(tm(m),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:w+=tm(m);break;case 9:case 10:case 13:case 32:w+=E4e(p);break;case 92:w+=x4e(em()-1,7);continue;case 47:switch(lo()){case 42:case 47:fv(A4e(C4e(gi(),em()),e,r),c);break;default:w+="/"}break;case 123*v:a[l++]=Hs(w)*y;case 125*v:case 59:case 0:switch(m){case 0:case 125:b=0;case 59+u:y==-1&&(w=it(w,/\f/g,"")),h>0&&Hs(w)-f&&fv(h>32?FI(w+";",n,r,f-1):FI(it(w," ","")+";",n,r,f-2),c);break;case 59:w+=";";default:if(fv(T=BI(w,e,r,l,u,i,a,g,S=[],P=[],f),s),m===123)if(u===0)rm(w,e,T,T,S,s,f,a,P);else switch(d===99&&Zr(w,3)===110?100:d){case 100:case 108:case 109:case 115:rm(t,T,T,n&&fv(BI(t,T,T,0,0,i,a,g,i,S=[],f),P),i,P,f,a,n?S:P);break;default:rm(w,T,T,T,[""],P,0,a,P)}}l=u=h=0,v=y=1,g=w="",f=o;break;case 58:f=1+Hs(w),h=p;default:if(v<1){if(m==123)--v;else if(m==125&&v++==0&&w4e()==125)continue}switch(w+=rw(m),m*v){case 38:y=u>0?1:(w+="\f",-1);break;case 44:a[l++]=(Hs(w)-1)*y,y=1;break;case 64:lo()===45&&(w+=tm(gi())),d=lo(),u=f=Hs(g=w+=S4e(em())),m++;break;case 45:p===45&&Hs(w)==2&&(v=0)}}return s}function BI(t,e,r,n,i,s,o,a,c,l,u){for(var f=i-1,d=i===0?s:[""],h=Pk(d),p=0,v=0,b=0;p0?d[y]+" "+m:it(m,/&\f/g,d[y])))&&(c[b++]=g);return iw(t,e,r,i===0?Ak:a,c,l,u)}function A4e(t,e,r){return iw(t,e,r,FW,rw(b4e()),p1(t,2,-2),0)}function FI(t,e,r,n){return iw(t,e,r,_k,p1(t,0,n),p1(t,n+1,-1),n)}function Ef(t,e){for(var r="",n=Pk(t),i=0;i6)switch(Zr(t,e+1)){case 109:if(Zr(t,e+4)!==45)break;case 102:return it(t,/(.+:)(.+)-([^]+)/,"$1"+nt+"$2-$3$1"+eg+(Zr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~G5(t,"stretch")?qW(it(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Zr(t,e+1)!==115)break;case 6444:switch(Zr(t,Hs(t)-3-(~G5(t,"!important")&&10))){case 107:return it(t,":",":"+nt)+t;case 101:return it(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nt+(Zr(t,14)===45?"inline-":"")+"box$3$1"+nt+"$2$3$1"+hn+"$2box$3")+t}break;case 5936:switch(Zr(t,e+11)){case 114:return nt+t+hn+it(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return nt+t+hn+it(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return nt+t+hn+it(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return nt+t+hn+t+t}return t}var D4e=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case _k:e.return=qW(e.value,e.length);break;case jW:return Ef([oh(e,{value:it(e.value,"@","@"+nt)})],i);case Ak:if(e.length)return g4e(e.props,function(s){switch(y4e(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ef([oh(e,{props:[it(s,/:(read-\w+)/,":"+eg+"$1")]})],i);case"::placeholder":return Ef([oh(e,{props:[it(s,/:(plac\w+)/,":"+nt+"input-$1")]}),oh(e,{props:[it(s,/:(plac\w+)/,":"+eg+"$1")]}),oh(e,{props:[it(s,/:(plac\w+)/,hn+"input-$1")]})],i)}return""})}},L4e=[D4e],B4e=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||L4e,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),y=1;ye in t?Y4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Z4e=(t,e)=>{for(var r in e||(e={}))J4e.call(e,r)&&GI(t,r,e[r]);if(VI)for(var r of VI(e))X4e.call(e,r)&&GI(t,r,e[r]);return t},e_e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ik=e_e((t,e)=>{e.exports={name:"@paperxyz/react-client-sdk",version:"1.1.3",description:"Paper React Client SDK for Checkout Elements",license:"Apache-2.0",main:"dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist/**"],exports:{".":{import:"./dist/index.js",types:"./dist/index.d.ts"}},bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",keywords:[],scripts:{build:"tsup-node src/index.ts --env.NODE_ENV production --env.ESM_ONLY true ","build-package-checkout":"yarn build","dev-checkout":"tsup-node src/index.ts --env.NODE_ENV development --watch --env.ESM_ONLY true",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/react-client-sdk"},peerDependencies:{react:">=16.0.0","react-dom":">=16.0.0"},devDependencies:{"@paperxyz/tsconfig":"*","@types/react":"18.0.26","eslint-config-paperxyz":"*",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^4.7.4"},dependencies:{"@emotion/css":"11.10.5","@headlessui/react":"1.7.6","@paperxyz/js-client-sdk":"*","@paperxyz/sdk-common-utilities":"*"}}}),t_e=C.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),r_e=()=>C.useContext(t_e);$s` +`,sh="paper-js-sdk-modal",vAe=class{constructor(t,e){this.styles=hAe(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=sh,this.overlay=document.createElement("div"),this.overlay.id=`${sh}-overlay`,this.body=document.createElement("div"),this.body.id=`${sh}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${sh}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${sh}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=pAe,this.assignStyles(this.main,this.styles.main),this.assignStyles(this.overlay,this.styles.overlay),this.assignStyles(this.body,this.styles.body),this.assignStyles(this.spinner,this.styles.spinner),this.assignStyles(this.iframe,this.styles.iframe)}open({iframeUrl:t}={}){t&&(this.body.appendChild(this.spinner),this.iframe.src=t,this.iframe.onload=()=>this.body.removeChild(this.spinner),this.body.appendChild(this.iframe)),this.addAccessibility(),this.main.appendChild(this.overlay),this.main.appendChild(this.style),this.main.appendChild(this.body),this.container.appendChild(this.main),document.body.style.overflow="hidden"}close(){this.body.style.animation="pew-modal-slideOut 0.2s forwards",window.setTimeout(()=>this.main.remove(),250)}mergeStyles(t){this.styles.body=Wn(Wn({},this.styles.body),t.body||{}),this.styles.spinner=Wn(Wn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Wn(Wn({},this.styles.overlay),t.overlay||{}),this.styles.main=Wn(Wn({},this.styles.main),t.main||{}),this.styles.iframe=Wn(Wn({},this.styles.iframe),t.iframe||{})}addAccessibility(){this.main.setAttribute("aria-hidden","true"),this.overlay.setAttribute("aria-hidden","true"),this.body.setAttribute("aria-modal","true"),this.body.setAttribute("role","dialog")}assignStyles(t,e){Object.assign(t.style,e)}};function mAe({sdkClientSecret:t,appName:e,options:r=Wn({},jW),locale:n,configs:i}){let s=new URL(oAe,zW),o=t;if(!o&&i&&(o=btoa(JSON.stringify(i))),!o){let c="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",l=BW();return new URL(c,l)}let a=new lAe(s);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function yAe({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:i,onPriceUpdate:s}){let o;return a=>{if(!a.origin.startsWith(zW))return;let{data:c}=a;switch(c.eventType){case"checkoutWithCardError":e&&e({code:c.code,error:c.error});break;case"paymentSuccess":n&&n({transactionId:c.id,id:c.id}),c.postToIframe&&BI(t,c.eventType,c);break;case"reviewComplete":r&&r({id:c.id,cardholderName:c.cardholderName});break;case"openModalWithUrl":i&&c.url&&c.url.includes("promptKYCModal")?i({url:c.url}):(o=new vAe(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:c.url}));break;case"completedSDKModal":o.close(),c.postToIframe&&BI(t,c.eventType,c);break;case"requestedPopup":{uAe({url:c.url,width:c.width,height:c.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=c.height+"px",t.style.maxHeight=c.height+"px";break;case"onPriceUpdate":{s==null||s(c);break}}}}function gAe({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:i,onLoad:s,onError:o,locale:a,options:c,onPaymentSuccess:l,onReview:u,onBeforeModalOpen:f,onPriceUpdate:d,useAltDomain:h=!0,configs:p}){let v="checkout-with-card-iframe",b=m=>yAe({iframe:m,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:l,onReview:u,onBeforeModalOpen:f,onPriceUpdate:d,useAltDomain:h}),y=mAe({sdkClientSecret:r,appName:n,locale:a,options:c,useAltDomain:h,configs:p});return new dAe({onLoad:s,elementOrId:i}).createPaymentElement({handler:b,iframeId:v,link:y})}UW();function bAe(t){if(t.sheet)return t.sheet;for(var e=0;e0?Zr(Rd,--ii):0,Jf--,kr===10&&(Jf=1,nw--),kr}function gi(){return kr=ii2||v1(kr)>3?"":" "}function RAe(t,e){for(;--e&&gi()&&!(kr<48||kr>102||kr>57&&kr<65||kr>70&&kr<97););return cp(t,em()+(e<6&&lo()==32&&gi()==32))}function G5(t){for(;gi();)switch(kr){case t:return ii;case 34:case 39:t!==34&&t!==39&&G5(kr);break;case 40:t===41&&G5(t);break;case 92:gi();break}return ii}function $Ae(t,e){for(;gi()&&t+kr!==47+10;)if(t+kr===42+42&&lo()===47)break;return"/*"+cp(e,ii-1)+"*"+rw(t===47?t:gi())}function MAe(t){for(;!v1(lo());)gi();return cp(t,ii)}function NAe(t){return KW(rm("",null,null,null,[""],t=GW(t),0,[0],t))}function rm(t,e,r,n,i,s,o,a,c){for(var l=0,u=0,f=o,d=0,h=0,p=0,v=1,b=1,y=1,m=0,g="",S=i,P=s,T=n,w=g;b;)switch(p=m,m=gi()){case 40:if(p!=108&&Zr(w,f-1)==58){V5(w+=it(tm(m),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:w+=tm(m);break;case 9:case 10:case 13:case 32:w+=OAe(p);break;case 92:w+=RAe(em()-1,7);continue;case 47:switch(lo()){case 42:case 47:fv(DAe($Ae(gi(),em()),e,r),c);break;default:w+="/"}break;case 123*v:a[l++]=Hs(w)*y;case 125*v:case 59:case 0:switch(m){case 0:case 125:b=0;case 59+u:y==-1&&(w=it(w,/\f/g,"")),h>0&&Hs(w)-f&&fv(h>32?zI(w+";",n,r,f-1):zI(it(w," ","")+";",n,r,f-2),c);break;case 59:w+=";";default:if(fv(T=UI(w,e,r,l,u,i,a,g,S=[],P=[],f),s),m===123)if(u===0)rm(w,e,T,T,S,s,f,a,P);else switch(d===99&&Zr(w,3)===110?100:d){case 100:case 108:case 109:case 115:rm(t,T,T,n&&fv(UI(t,T,T,0,0,i,a,g,i,S=[],f),P),i,P,f,a,n?S:P);break;default:rm(w,T,T,T,[""],P,0,a,P)}}l=u=h=0,v=y=1,g=w="",f=o;break;case 58:f=1+Hs(w),h=p;default:if(v<1){if(m==123)--v;else if(m==125&&v++==0&&IAe()==125)continue}switch(w+=rw(m),m*v){case 38:y=u>0?1:(w+="\f",-1);break;case 44:a[l++]=(Hs(w)-1)*y,y=1;break;case 64:lo()===45&&(w+=tm(gi())),d=lo(),u=f=Hs(g=w+=MAe(em())),m++;break;case 45:p===45&&Hs(w)==2&&(v=0)}}return s}function UI(t,e,r,n,i,s,o,a,c,l,u){for(var f=i-1,d=i===0?s:[""],h=Pk(d),p=0,v=0,b=0;p0?d[y]+" "+m:it(m,/&\f/g,d[y])))&&(c[b++]=g);return iw(t,e,r,i===0?Ak:a,c,l,u)}function DAe(t,e,r){return iw(t,e,r,WW,rw(TAe()),p1(t,2,-2),0)}function zI(t,e,r,n){return iw(t,e,r,_k,p1(t,0,n),p1(t,n+1,-1),n)}function Ef(t,e){for(var r="",n=Pk(t),i=0;i6)switch(Zr(t,e+1)){case 109:if(Zr(t,e+4)!==45)break;case 102:return it(t,/(.+:)(.+)-([^]+)/,"$1"+nt+"$2-$3$1"+eg+(Zr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~V5(t,"stretch")?QW(it(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Zr(t,e+1)!==115)break;case 6444:switch(Zr(t,Hs(t)-3-(~V5(t,"!important")&&10))){case 107:return it(t,":",":"+nt)+t;case 101:return it(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nt+(Zr(t,14)===45?"inline-":"")+"box$3$1"+nt+"$2$3$1"+hn+"$2box$3")+t}break;case 5936:switch(Zr(t,e+11)){case 114:return nt+t+hn+it(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return nt+t+hn+it(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return nt+t+hn+it(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return nt+t+hn+t+t}return t}var VAe=function(e,r,n,i){if(e.length>-1&&!e.return)switch(e.type){case _k:e.return=QW(e.value,e.length);break;case HW:return Ef([oh(e,{value:it(e.value,"@","@"+nt)})],i);case Ak:if(e.length)return PAe(e.props,function(s){switch(_Ae(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ef([oh(e,{props:[it(s,/:(read-\w+)/,":"+eg+"$1")]})],i);case"::placeholder":return Ef([oh(e,{props:[it(s,/:(plac\w+)/,":"+nt+"input-$1")]}),oh(e,{props:[it(s,/:(plac\w+)/,":"+eg+"$1")]}),oh(e,{props:[it(s,/:(plac\w+)/,hn+"input-$1")]})],i)}return""})}},GAe=[VAe],KAe=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=e.stylisPlugins||GAe,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),y=1;ye in t?o_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l_e=(t,e)=>{for(var r in e||(e={}))a_e.call(e,r)&&YI(t,r,e[r]);if(QI)for(var r of QI(e))c_e.call(e,r)&&YI(t,r,e[r]);return t},u_e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ik=u_e((t,e)=>{e.exports={name:"@paperxyz/react-client-sdk",version:"1.1.3",description:"Paper React Client SDK for Checkout Elements",license:"Apache-2.0",main:"dist/index.js",types:"./dist/index.d.ts",type:"module",files:["dist/**"],exports:{".":{import:"./dist/index.js",types:"./dist/index.d.ts"}},bugs:{url:"https://github.com/paperxyz/js-sdk/issues"},homepage:"https://github.com/paperxyz/js-sdk",repository:{type:"git",url:"git+https://github.com/paperxyz/js-sdk.git"},author:"Paper ",keywords:[],scripts:{build:"tsup-node src/index.ts --env.NODE_ENV production --env.ESM_ONLY true ","build-package-checkout":"yarn build","dev-checkout":"tsup-node src/index.ts --env.NODE_ENV development --watch --env.ESM_ONLY true",lint:'eslint "src/**/*.ts*"',"lint:fix":"yarn lint --fix",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",prepare:"cd ../../ && node ./scripts/postInstall && cd ./packages/react-client-sdk"},peerDependencies:{react:">=16.0.0","react-dom":">=16.0.0"},devDependencies:{"@paperxyz/tsconfig":"*","@types/react":"18.0.26","eslint-config-paperxyz":"*",react:"^18.2.0","react-dom":"^18.2.0",typescript:"^4.7.4"},dependencies:{"@emotion/css":"11.10.5","@headlessui/react":"1.7.6","@paperxyz/js-client-sdk":"*","@paperxyz/sdk-common-utilities":"*"}}}),f_e=C.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),d_e=()=>C.useContext(f_e);$s` opacity: 0; `;$s` opacity: 1; -`;var n_e=$s` +`;var h_e=$s` position: relative; width: 100%; height: 100%; @@ -333,31 +338,31 @@ Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.val background-color: transparent; grid-column-start: 1; grid-row-start: 1; -`;var i_e=({className:t})=>pe("div",{id:"loader",className:K4e(o_e,t)}),s_e=Q4e` +`;var p_e=({className:t})=>pe("div",{id:"loader",className:i_e(m_e,t)}),v_e=s_e` from { transform: rotate(0deg); } to { transform: rotate(360deg); } -`,o_e=$s` +`,m_e=$s` border: 0.15rem solid #f3f3f300; border-top: 0.15rem solid #000000; border-left: 0.15rem solid #000000; border-radius: 50%; width: 4rem; height: 4rem; - animation: ${s_e} 1s linear infinite; -`,a_e=()=>pe("div",{className:c_e,children:pe(i_e,{className:l_e})}),c_e=$s` + animation: ${v_e} 1s linear infinite; +`,y_e=()=>pe("div",{className:g_e,children:pe(p_e,{className:b_e})}),g_e=$s` position: absolute; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0); -`,l_e=$s` +`,b_e=$s` color: #000000; width: 2rem; height: 2rem; -`,u_e=Ik(),f_e=({sdkClientSecret:t,appName:e,options:r=Z4e({},DW),onPaymentSuccess:n,onReview:i,onError:s,onBeforeModalOpen:o,onPriceUpdate:a,locale:c,configs:l})=>{let{appName:u}=r_e(),[f,d]=C.useState(!0),h=C.useCallback(()=>{d(!1)},[]),p=C.useRef(null),v=e||u;return C.useEffect(()=>{let b=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(b)}},[]),C.useEffect(()=>{p.current&&c4e({sdkClientSecret:t,appName:v,elementOrId:p.current,locale:c,onError:s,onLoad:h,onPaymentSuccess:n,onReview:i,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:l})},[p.current]),pe(bH,{children:pe("div",{className:n_e,ref:p,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${u_e.version}`,children:f&&pe(a_e,{})})})};$s` +`,w_e=Ik(),E_e=({sdkClientSecret:t,appName:e,options:r=l_e({},jW),onPaymentSuccess:n,onReview:i,onError:s,onBeforeModalOpen:o,onPriceUpdate:a,locale:c,configs:l})=>{let{appName:u}=d_e(),[f,d]=C.useState(!0),h=C.useCallback(()=>{d(!1)},[]),p=C.useRef(null),v=e||u;return C.useEffect(()=>{let b=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(b)}},[]),C.useEffect(()=>{p.current&&gAe({sdkClientSecret:t,appName:v,elementOrId:p.current,locale:c,onError:s,onLoad:h,onPaymentSuccess:n,onReview:i,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:l})},[p.current]),pe(CH,{children:pe("div",{className:h_e,ref:p,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${w_e.version}`,children:f&&pe(y_e,{})})})};$s` padding-top: 0.625rem; padding-bottom: 0.625rem; padding-left: 1.25rem; @@ -372,7 +377,7 @@ Invalid media condition`));var d=t(e.slice(i+2),r,f.value);return{operator:f.val border-radius: 0.5rem; border: none; cursor: pointer; -`;Ik();Ik();var d_e=(t=>(t.THIRDWEB_NFT_DROP_V2="THIRDWEB_NFT_DROP_V2",t.THIRDWEB_EDITION_DROP_V2="THIRDWEB_EDITION_DROP_V2",t.THIRDWEB_SIGNATURE="THIRDWEB_SIGNATURE",t.CANDY_MACHINE="CANDY_MACHINE",t.AUCTION_HOUSE="AUCTION_HOUSE",t))(d_e||{}),h_e=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(h_e||{});const[p_e,v_e]=lu(),lp=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=p_e();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Kl(){return Kl=Object.assign?Object.assign.bind():function(t){for(var e=1;et.toLowerCase()===e.toLowerCase();var _a=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(_a||{});const Q5=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=_a.VERY_LARGE:e<1e-10?r=_a.VERY_TINY:e<1?r=_a.FRACTION:r=_a.MIXED;let n,i;switch(r){case _a.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case _a.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case _a.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Kl({notation:n},i)).format(e)},m_e=t=>t.charAt(0).toUpperCase()+t.slice(1),y_e=t=>t.chainId===1?"Ethereum":m_e(t.name),g_e=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await cn(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:cr,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:x8.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},b_e=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await cn(e),n=await r.getTokenBalances({accountAddress:t,includeMetadata:!0});return(n==null?void 0:n.balances)||[]}catch(r){return console.error(r),[]}},w_e=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([g_e({accountAddress:t,chainId:e}),b_e({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},E_e=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=await cn(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},x_e=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=await cn(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},C_e=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:i,collectionContractAddress:s,methodArguments:o,currency:a,currencyAmount:c,methodName:l,recipientAddress:u})=>{const{network:f,apiClient:d}=await cn(t),h=y_e(f),p=JSON.stringify(Kl({title:i,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${c} * $QUANTITY`},name:l},walletAddress:u},s?{contractArgs:{collectionContractAddress:s}}:{})),{secret:v}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:p});return v},Ok={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},S_e=t=>si({queryKey:["balances",t],queryFn:()=>w_e(t),retry:!0,staleTime:10*Ok.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),k_e=t=>si({queryKey:["useTokenMetadata",t],queryFn:()=>E_e(t),retry:!0,staleTime:10*Ok.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),KW=t=>si({queryKey:["useContractInfo",t],queryFn:()=>x_e(t),retry:!0,staleTime:60*Ok.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[A_e,__e]=lu(),P_e=({settings:t})=>{var e,r;const[n,i]=C.useState(!0),[s,o]=C.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,c]=C.useState(s),[l,u]=C.useState(null),[f,d]=C.useState(!1),{setNavigation:h}=$d(),p=()=>{n&&o(a||""),n||c(s),i(!n)},v=async()=>{d(!0);try{if(!s)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const P=await C_e(Kl({email:s},t.creditCardCheckout));u(P)}catch(P){console.error("Failed to fetch paper secret",P),h({location:"transaction-error",params:{error:P}})}d(!1)};C.useEffect(()=>{const P=setInterval(()=>{const T=document.getElementById("paper-js-sdk-modal");T&&(T.style.pointerEvents="visible")},100);return()=>{clearInterval(P)}},[]),C.useEffect(()=>{s!==""&&v()},[s]);const b=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),y=P=>{c(P.target.value)},m=P=>{h({location:"transaction-pending",params:{transactionId:P}})},g=P=>{h({location:"transaction-error",params:{error:P}})},S=()=>n?x.createElement(z,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:p},x.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},x.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),x.createElement($c,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:y,"data-1p-ignore":!0})),x.createElement(tt,{size:"xs",label:"Save",leftIcon:cd,disabled:!b(),type:"submit"})):x.createElement(z,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},x.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},x.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),x.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},s)),x.createElement(tt,{size:"xs",label:"Edit",leftIcon:Qre,onClick:p}));return x.createElement(z,null,S(),f&&x.createElement(z,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},x.createElement(sS,{size:"lg",style:{width:"60px",height:"60px"}})),l&&!f&&x.createElement(ws,{marginY:"4",flexDirection:"column"},x.createElement(f_e,{sdkClientSecret:l,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:P=>{m(P.id)},onError:P=>{console.error("Payment error:",P),g(P.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},Rk="54px",T_e=()=>{const{settings:t}=lp();return x.createElement(z,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:Rk}},t&&x.createElement(P_e,{settings:t}))},I_e=10*1e3,O_e=()=>{const t=$d(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,i=async()=>{try{console.log("Polling for transaction status");const s=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(c=>c.json()),o=s.result.status,a=s.result.transactionHash;if(console.log("transaction status poll response:",o),o==="PENDING")return;if(o==="TRANSFER_SUCCEEDED"){r&&r({location:"transaction-success",params:{transactionHash:a}});return}if(o==="TRANSFER_FAILED"||o==="PAYMENT_FAILED"){r&&r({location:"transaction-error",params:{error:new Error("Failed to transfer collectible")}});return}}catch(s){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:s}})}};return C.useEffect(()=>{const s=setInterval(()=>{i()},I_e);return()=>{clearInterval(s)}},[]),x.createElement(z,{style:{height:"500px"}},x.createElement(z,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},x.createElement(sS,{size:"lg",style:{width:"60px",height:"60px"}}),x.createElement(re,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",x.createElement("br",null),"This may take a few minutes.")))},R_e=()=>{const{closeCheckout:t,settings:e}=lp(),n=$d().navigation;return C.useEffect(()=>{setTimeout(()=>{var i,s;t(),!(e==null||(i=e.creditCardCheckout)==null)&&i.onSuccess&&(e==null||(s=e.creditCardCheckout)==null||s.onSuccess(n.params.transactionHash))},3e3)},[]),x.createElement(z,{style:{height:"500px"}},x.createElement(z,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},x.createElement($_e,null),x.createElement(re,{fontSize:"xlarge"},"Success!"),x.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},$_e=()=>x.createElement(z,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},x.createElement(cd,{size:"xl"})),M_e=()=>{const{closeCheckout:t,settings:e}=lp(),n=$d().navigation;return C.useEffect(()=>{setTimeout(()=>{var i,s;t(),!(e==null||(i=e.creditCardCheckout)==null)&&i.onError&&(e==null||(s=e.creditCardCheckout)==null||s.onError(n.params.error))},3e3)},[]),x.createElement(z,{style:{height:"500px"}},x.createElement(z,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},x.createElement(N_e,null),x.createElement(re,{fontSize:"xlarge"},"Error"),x.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},N_e=()=>x.createElement(z,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},x.createElement(ru,{size:"xl"})),D_e=({size:t=30})=>x.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},x.createElement(re,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),e0=({imageUrl:t,size:e=30})=>t?x.createElement(mr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):x.createElement(D_e,{size:e});au("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const L_e=ZU({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),B_e=ki({height:"76px",backgroundColor:"#909090",animation:`${L_e} 2s ease-in-out infinite`},"skeleton");cu();const ef=({width:t="100%",height:e="100%",borderRadius:r="md"})=>x.createElement(z,{className:B_e,borderRadius:r,style:{width:t,height:e}}),F_e=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:i=[]}=on(),{data:s,isLoading:o}=k_e({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:c}=KW({chainID:String(n),contractAddress:t});if(o||c)return x.createElement(j_e,null);const u=_r(n,i),{name:f="unknown",image:d,decimals:h=0}=s||{},{logoURI:p,name:v="Unknown Collection"}=a||{},b=xr(r,h);return x.createElement(ws,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},x.createElement(z,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},x.createElement(mr,{src:d,borderRadius:"md",style:{height:"80px"}})),x.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},x.createElement(z,{gap:"1",alignItems:"center"},x.createElement(e0,{size:12,imageUrl:p}),x.createElement(re,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},v),x.createElement(e0,{size:12,imageUrl:u.logoURI})),x.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},x.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"normal"},f),x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),x.createElement(z,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${Q5(b)}`))},j_e=()=>x.createElement(ws,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},x.createElement(ef,{height:"80px",width:"80px"}),x.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},x.createElement(ef,{width:"100px",height:"14px"}),x.createElement(ef,{width:"180px",height:"34px"}))),x.createElement(ef,{height:"14px",width:"14px"}));au("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const QW=ki({},"insufficientBalanceButton");Is(`${QW} > div`,{justifyContent:"center"});cu();const U_e=()=>{var t,e,r,n;const{chains:i=[]}=on();$d();const{closeCheckout:s,settings:o}=lp(),{address:a}=Sn(),c=o==null?void 0:o.cryptoCheckout,l=!!c,{data:u,isLoading:f}=KW({contractAddress:(c==null||(t=c.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((c==null?void 0:c.chainId)||1)}),{data:d,isLoading:h}=S_e({accountAddress:a||"",chainId:(c==null?void 0:c.chainId)||1}),p=(f||h)&&c,v=KI((c==null||(e=c.coinQuantity)==null?void 0:e.contractAddress)||"",cr),b=_r((c==null?void 0:c.chainId)||1,i),y=v?b.decimals:(u==null?void 0:u.decimals)||0,m=v?b.symbol:(u==null?void 0:u.symbol)||"COIN",g=v?b.logoURI:(u==null?void 0:u.logoURI)||"",S=d==null?void 0:d.find(B=>{var E;return KI(B.contractAddress,(c==null||(E=c.coinQuantity)==null?void 0:E.contractAddress)||"")}),P=S?S.balance:"0",T=(c==null||(r=c.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",w=xr(P,y),I=xr(T,y),F=J.from(P).lt(J.from(T)),j=(o==null?void 0:o.orderSummaryItems)||[],H=(o==null||(n=o.cryptoCheckout)==null?void 0:n.chainId)||1,G=()=>{var B;console.log("trigger transaction");const E=o==null||(B=o.cryptoCheckout)==null?void 0:B.triggerTransaction;E&&E(),s()};return x.createElement(z,{paddingX:"5",paddingBottom:"5",style:{marginTop:Rk},flexDirection:"column",gap:"3"},j.length>0&&x.createElement(x.Fragment,null,x.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),x.createElement(z,{flexDirection:"column",gap:"2"},j.map((B,E)=>x.createElement(F_e,Kl({key:E},B,{chainId:H})))),x.createElement(z,{marginTop:"2"},x.createElement(R0,{color:"backgroundSecondary",style:{margin:"0px"}}))),l&&x.createElement(z,{justifyContent:"space-between",alignItems:"center"},x.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),p?x.createElement(ef,{width:"100px",height:"17px"}):x.createElement(z,{flexDirection:"row",gap:"1",alignItems:"center"},x.createElement(e0,{imageUrl:g,size:12}),x.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${Q5(I)} ${m}`))),x.createElement(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},l&&!F&&!p&&x.createElement(tt,{style:{borderRadius:ve.radii.md,height:"56px"},width:"full",leftIcon:()=>x.createElement(e0,{size:20,imageUrl:g}),variant:"primary",label:`Pay with ${m}`,rightIcon:oo,onClick:G}),l&&(F||p)&&x.createElement(tt,{className:QW,style:{borderRadius:ve.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>x.createElement(e0,{size:20,imageUrl:g}),variant:"glass",label:`Insufficient ${m}`,onClick:G,disabled:!0})),l&&x.createElement(z,{width:"full",justifyContent:"flex-end"},p?x.createElement(ef,{width:"102px",height:"14px"}):x.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${Q5(w)} ${m}`)))},xE=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:i}=$d(),s=()=>{n()};return x.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Rk,paddingTop:"6px",backgroundColor:ve.colors.backgroundPrimary}},i.length>0&&!r?x.createElement(Jo,{onClick:s,icon:Lg,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):x.createElement(z,null),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),x.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),x.createElement(z,{style:{width:"44px"}}))};au("packages/checkout/src/shared/styles.css.ts","kit");const $k=ki({},"walletContent");Is(`${$k} + button`,{backgroundColor:"transparent"});Is(`${$k} + button > svg`,{width:"20px",height:"20px"});cu();const YW={location:"select-method-checkout"},z_e=t=>{const e=new lS;return x.createElement(hS,{client:e},x.createElement(W_e,t))},W_e=({children:t})=>{const{theme:e,position:r}=np(),[n,i]=C.useState(!1),[s,o]=C.useState(),[a,c]=C.useState([]),l=a.length>0?a[a.length-1]:YW,u=p=>{o(p),i(!0)},f=()=>{i(!1)},d=()=>{const{location:p}=l;switch(p){case"select-method-checkout":return x.createElement(U_e,null);case"transaction-pending":return x.createElement(O_e,null);case"transaction-success":return x.createElement(R_e,null);case"transaction-error":return x.createElement(M_e,null);case"transaction-form":default:return x.createElement(T_e,null)}},h=()=>{const{location:p}=l;switch(p){case"select-method-checkout":return x.createElement(xE,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return x.createElement(xE,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return x.createElement(xE,{primaryText:"Pay with credit or debit card"})}};return C.useEffect(()=>{n&&c([])},[n]),x.createElement(v_e,{value:{triggerCheckout:u,closeCheckout:f,settings:s,theme:e}},x.createElement(__e,{value:{history:a,setHistory:c}},x.createElement("div",{id:"kit-checkout"},x.createElement(Gg,{root:"#kit-checkout",scope:"kit",theme:e},x.createElement(Mg,null,n&&x.createElement(rS,{contentProps:{style:Kl({maxWidth:"400px",height:"auto"},sk(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>i(!1)},x.createElement(z,{id:"sequence-kit-checkout-content",className:$k},h(),d()))))),t))},$d=()=>{const{setHistory:t,history:e}=A_e(),r=s=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const c=[...e,s];t(c)},n=()=>{const s=[...e];s.pop(),t(s)},i=e.length>0?e[e.length-1]:YW;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:i}},H_e=`Two roads diverged in a yellow wood, +`;Ik();Ik();var x_e=(t=>(t.THIRDWEB_NFT_DROP_V2="THIRDWEB_NFT_DROP_V2",t.THIRDWEB_EDITION_DROP_V2="THIRDWEB_EDITION_DROP_V2",t.THIRDWEB_SIGNATURE="THIRDWEB_SIGNATURE",t.CANDY_MACHINE="CANDY_MACHINE",t.AUCTION_HOUSE="AUCTION_HOUSE",t))(x_e||{}),C_e=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(C_e||{});const[S_e,k_e]=lu(),lp=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=S_e();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Kl(){return Kl=Object.assign?Object.assign.bind():function(t){for(var e=1;et.toLowerCase()===e.toLowerCase();var _a=function(t){return t[t.VERY_LARGE=0]="VERY_LARGE",t[t.FRACTION=1]="FRACTION",t[t.VERY_TINY=2]="VERY_TINY",t[t.MIXED=3]="MIXED",t}(_a||{});const K5=t=>{if(isNaN(Number(t)))return console.error(`display format error ${t} is not a number`),"NaN";const e=Number(t);if(e===0)return"0";let r;e>1e8?r=_a.VERY_LARGE:e<1e-10?r=_a.VERY_TINY:e<1?r=_a.FRACTION:r=_a.MIXED;let n,i;switch(r){case _a.VERY_LARGE:n="compact",i={maximumFractionDigits:4};break;case _a.VERY_TINY:n="scientific",i={maximumFractionDigits:4};break;case _a.FRACTION:n="standard",i={maximumSignificantDigits:4};break;default:n="standard",i={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Kl({notation:n},i)).format(e)},A_e=t=>t.charAt(0).toUpperCase()+t.slice(1),__e=t=>t.chainId===1?"Ethereum":A_e(t.name),P_e=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await cn(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:lr,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:x8.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},T_e=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await cn(e),n=await r.getTokenBalances({accountAddress:t,includeMetadata:!0});return(n==null?void 0:n.balances)||[]}catch(r){return console.error(r),[]}},I_e=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([P_e({accountAddress:t,chainId:e}),T_e({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},O_e=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=await cn(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},R_e=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=await cn(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},$_e=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:i,collectionContractAddress:s,methodArguments:o,currency:a,currencyAmount:c,methodName:l,recipientAddress:u})=>{const{network:f,apiClient:d}=await cn(t),h=__e(f),p=JSON.stringify(Kl({title:i,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${c} * $QUANTITY`},name:l},walletAddress:u},s?{contractArgs:{collectionContractAddress:s}}:{})),{secret:v}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:p});return v},Ok={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},M_e=t=>si({queryKey:["balances",t],queryFn:()=>I_e(t),retry:!0,staleTime:10*Ok.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),N_e=t=>si({queryKey:["useTokenMetadata",t],queryFn:()=>O_e(t),retry:!0,staleTime:10*Ok.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),XW=t=>si({queryKey:["useContractInfo",t],queryFn:()=>R_e(t),retry:!0,staleTime:60*Ok.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[D_e,L_e]=lu(),F_e=({settings:t})=>{var e,r;const[n,i]=C.useState(!0),[s,o]=C.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,c]=C.useState(s),[l,u]=C.useState(null),[f,d]=C.useState(!1),{setNavigation:h}=$d(),p=()=>{n&&o(a||""),n||c(s),i(!n)},v=async()=>{d(!0);try{if(!s)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const P=await $_e(Kl({email:s},t.creditCardCheckout));u(P)}catch(P){console.error("Failed to fetch paper secret",P),h({location:"transaction-error",params:{error:P}})}d(!1)};C.useEffect(()=>{const P=setInterval(()=>{const T=document.getElementById("paper-js-sdk-modal");T&&(T.style.pointerEvents="visible")},100);return()=>{clearInterval(P)}},[]),C.useEffect(()=>{s!==""&&v()},[s]);const b=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),y=P=>{c(P.target.value)},m=P=>{h({location:"transaction-pending",params:{transactionId:P}})},g=P=>{h({location:"transaction-error",params:{error:P}})},S=()=>n?x.createElement(z,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:p},x.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},x.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),x.createElement($c,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:y,"data-1p-ignore":!0})),x.createElement(tt,{size:"xs",label:"Save",leftIcon:cd,disabled:!b(),type:"submit"})):x.createElement(z,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},x.createElement(z,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},x.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),x.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},s)),x.createElement(tt,{size:"xs",label:"Edit",leftIcon:rne,onClick:p}));return x.createElement(z,null,S(),f&&x.createElement(z,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},x.createElement(sS,{size:"lg",style:{width:"60px",height:"60px"}})),l&&!f&&x.createElement(bs,{marginY:"4",flexDirection:"column"},x.createElement(E_e,{sdkClientSecret:l,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:P=>{m(P.id)},onError:P=>{console.error("Payment error:",P),g(P.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},Rk="54px",B_e=()=>{const{settings:t}=lp();return x.createElement(z,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:Rk}},t&&x.createElement(F_e,{settings:t}))},j_e=10*1e3,U_e=()=>{const t=$d(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,i=async()=>{try{console.log("Polling for transaction status");const s=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(c=>c.json()),o=s.result.status,a=s.result.transactionHash;if(console.log("transaction status poll response:",o),o==="PENDING")return;if(o==="TRANSFER_SUCCEEDED"){r&&r({location:"transaction-success",params:{transactionHash:a}});return}if(o==="TRANSFER_FAILED"||o==="PAYMENT_FAILED"){r&&r({location:"transaction-error",params:{error:new Error("Failed to transfer collectible")}});return}}catch(s){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:s}})}};return C.useEffect(()=>{const s=setInterval(()=>{i()},j_e);return()=>{clearInterval(s)}},[]),x.createElement(z,{style:{height:"500px"}},x.createElement(z,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},x.createElement(sS,{size:"lg",style:{width:"60px",height:"60px"}}),x.createElement(re,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",x.createElement("br",null),"This may take a few minutes.")))},z_e=()=>{const{closeCheckout:t,settings:e}=lp(),n=$d().navigation;return C.useEffect(()=>{setTimeout(()=>{var i,s;t(),!(e==null||(i=e.creditCardCheckout)==null)&&i.onSuccess&&(e==null||(s=e.creditCardCheckout)==null||s.onSuccess(n.params.transactionHash))},3e3)},[]),x.createElement(z,{style:{height:"500px"}},x.createElement(z,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},x.createElement(W_e,null),x.createElement(re,{fontSize:"xlarge"},"Success!"),x.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},W_e=()=>x.createElement(z,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},x.createElement(cd,{size:"xl"})),H_e=()=>{const{closeCheckout:t,settings:e}=lp(),n=$d().navigation;return C.useEffect(()=>{setTimeout(()=>{var i,s;t(),!(e==null||(i=e.creditCardCheckout)==null)&&i.onError&&(e==null||(s=e.creditCardCheckout)==null||s.onError(n.params.error))},3e3)},[]),x.createElement(z,{style:{height:"500px"}},x.createElement(z,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},x.createElement(q_e,null),x.createElement(re,{fontSize:"xlarge"},"Error"),x.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},q_e=()=>x.createElement(z,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},x.createElement(ru,{size:"xl"})),V_e=({size:t=30})=>x.createElement(z,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},x.createElement(re,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),e0=({imageUrl:t,size:e=30})=>t?x.createElement(mr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):x.createElement(V_e,{size:e});au("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const G_e=nz({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),K_e=ki({height:"76px",backgroundColor:"#909090",animation:`${G_e} 2s ease-in-out infinite`},"skeleton");cu();const ef=({width:t="100%",height:e="100%",borderRadius:r="md"})=>x.createElement(z,{className:K_e,borderRadius:r,style:{width:t,height:e}}),Q_e=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:i=[]}=on(),{data:s,isLoading:o}=N_e({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:c}=XW({chainID:String(n),contractAddress:t});if(o||c)return x.createElement(Y_e,null);const u=_r(n,i),{name:f="unknown",image:d,decimals:h=0}=s||{},{logoURI:p,name:v="Unknown Collection"}=a||{},b=xr(r,h);return x.createElement(bs,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},x.createElement(z,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},x.createElement(mr,{src:d,borderRadius:"md",style:{height:"80px"}})),x.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},x.createElement(z,{gap:"1",alignItems:"center"},x.createElement(e0,{size:12,imageUrl:p}),x.createElement(re,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},v),x.createElement(e0,{size:12,imageUrl:u.logoURI})),x.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},x.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"normal"},f),x.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),x.createElement(z,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${K5(b)}`))},Y_e=()=>x.createElement(bs,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},x.createElement(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},x.createElement(ef,{height:"80px",width:"80px"}),x.createElement(z,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},x.createElement(ef,{width:"100px",height:"14px"}),x.createElement(ef,{width:"180px",height:"34px"}))),x.createElement(ef,{height:"14px",width:"14px"}));au("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const ZW=ki({},"insufficientBalanceButton");Is(`${ZW} > div`,{justifyContent:"center"});cu();const J_e=()=>{var t,e,r,n;const{chains:i=[]}=on();$d();const{closeCheckout:s,settings:o}=lp(),{address:a}=Sn(),c=o==null?void 0:o.cryptoCheckout,l=!!c,{data:u,isLoading:f}=XW({contractAddress:(c==null||(t=c.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((c==null?void 0:c.chainId)||1)}),{data:d,isLoading:h}=M_e({accountAddress:a||"",chainId:(c==null?void 0:c.chainId)||1}),p=(f||h)&&c,v=JI((c==null||(e=c.coinQuantity)==null?void 0:e.contractAddress)||"",lr),b=_r((c==null?void 0:c.chainId)||1,i),y=v?b.decimals:(u==null?void 0:u.decimals)||0,m=v?b.symbol:(u==null?void 0:u.symbol)||"COIN",g=v?b.logoURI:(u==null?void 0:u.logoURI)||"",S=d==null?void 0:d.find(F=>{var E;return JI(F.contractAddress,(c==null||(E=c.coinQuantity)==null?void 0:E.contractAddress)||"")}),P=S?S.balance:"0",T=(c==null||(r=c.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",w=xr(P,y),I=xr(T,y),B=J.from(P).lt(J.from(T)),j=(o==null?void 0:o.orderSummaryItems)||[],H=(o==null||(n=o.cryptoCheckout)==null?void 0:n.chainId)||1,G=()=>{var F;console.log("trigger transaction");const E=o==null||(F=o.cryptoCheckout)==null?void 0:F.triggerTransaction;E&&E(),s()};return x.createElement(z,{paddingX:"5",paddingBottom:"5",style:{marginTop:Rk},flexDirection:"column",gap:"3"},j.length>0&&x.createElement(x.Fragment,null,x.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),x.createElement(z,{flexDirection:"column",gap:"2"},j.map((F,E)=>x.createElement(Q_e,Kl({key:E},F,{chainId:H})))),x.createElement(z,{marginTop:"2"},x.createElement(R0,{color:"backgroundSecondary",style:{margin:"0px"}}))),l&&x.createElement(z,{justifyContent:"space-between",alignItems:"center"},x.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),p?x.createElement(ef,{width:"100px",height:"17px"}):x.createElement(z,{flexDirection:"row",gap:"1",alignItems:"center"},x.createElement(e0,{imageUrl:g,size:12}),x.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${K5(I)} ${m}`))),x.createElement(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},l&&!B&&!p&&x.createElement(tt,{style:{borderRadius:ve.radii.md,height:"56px"},width:"full",leftIcon:()=>x.createElement(e0,{size:20,imageUrl:g}),variant:"primary",label:`Pay with ${m}`,rightIcon:oo,onClick:G}),l&&(B||p)&&x.createElement(tt,{className:ZW,style:{borderRadius:ve.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>x.createElement(e0,{size:20,imageUrl:g}),variant:"glass",label:`Insufficient ${m}`,onClick:G,disabled:!0})),l&&x.createElement(z,{width:"full",justifyContent:"flex-end"},p?x.createElement(ef,{width:"102px",height:"14px"}):x.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${K5(w)} ${m}`)))},xE=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:i}=$d(),s=()=>{n()};return x.createElement(z,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Rk,paddingTop:"6px",backgroundColor:ve.colors.backgroundPrimary}},i.length>0&&!r?x.createElement(Jo,{onClick:s,icon:Lg,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):x.createElement(z,null),x.createElement(z,null,x.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),x.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),x.createElement(z,{style:{width:"44px"}}))};au("packages/checkout/src/shared/styles.css.ts","kit");const $k=ki({},"walletContent");Is(`${$k} + button`,{backgroundColor:"transparent"});Is(`${$k} + button > svg`,{width:"20px",height:"20px"});cu();const eH={location:"select-method-checkout"},X_e=t=>{const e=new lS;return x.createElement(hS,{client:e},x.createElement(Z_e,t))},Z_e=({children:t})=>{const{theme:e,position:r}=np(),[n,i]=C.useState(!1),[s,o]=C.useState(),[a,c]=C.useState([]),l=a.length>0?a[a.length-1]:eH,u=p=>{o(p),i(!0)},f=()=>{i(!1)},d=()=>{const{location:p}=l;switch(p){case"select-method-checkout":return x.createElement(J_e,null);case"transaction-pending":return x.createElement(U_e,null);case"transaction-success":return x.createElement(z_e,null);case"transaction-error":return x.createElement(H_e,null);case"transaction-form":default:return x.createElement(B_e,null)}},h=()=>{const{location:p}=l;switch(p){case"select-method-checkout":return x.createElement(xE,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return x.createElement(xE,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return x.createElement(xE,{primaryText:"Pay with credit or debit card"})}};return C.useEffect(()=>{n&&c([])},[n]),x.createElement(k_e,{value:{triggerCheckout:u,closeCheckout:f,settings:s,theme:e}},x.createElement(L_e,{value:{history:a,setHistory:c}},x.createElement("div",{id:"kit-checkout"},x.createElement(Gg,{root:"#kit-checkout",scope:"kit",theme:e},x.createElement(Mg,null,n&&x.createElement(rS,{contentProps:{style:Kl({maxWidth:"400px",height:"auto"},sk(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>i(!1)},x.createElement(z,{id:"sequence-kit-checkout-content",className:$k},h(),d()))))),t))},$d=()=>{const{setHistory:t,history:e}=D_e(),r=s=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const c=[...e,s];t(c)},n=()=>{const s=[...e];s.pop(),t(s)},i=e.length>0?e[e.length-1]:eH;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:i}},ePe=`Two roads diverged in a yellow wood, Robert Frost poet And sorry I could not travel both @@ -396,4 +401,4 @@ I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I— I took the one less traveled by, -And that has made all the difference.`,q_e=[{label:"Terms",url:"https://sequence.xyz/terms"},{label:"About",url:"https://github.com/0xsequence/kit"},{label:"Blog",url:"https://sequence.xyz/blog"},{label:"Builder",url:"https://sequence.build"},{label:"Docs",url:"https://docs.sequence.xyz/wallet/connectors/kit/kit/overview"}],V_e=[{id:"discord",url:"https://discord.gg/sequence",icon:"img/social/discord.svg"},{id:"twitter",url:"https://www.twitter.com/0xsequence",icon:"img/social/twitter.svg"},{id:"youtube",url:"https://www.youtube.com/channel/UC1zHgUyV-doddTcnFNqt62Q",icon:"img/social/youtube.svg"},{id:"github",url:"https://github.com/0xsequence",icon:"img/social/github.svg"}];var QI="u3q5o00";const G_e=()=>{const{theme:t}=M1(),e=Qce("isMobile"),r=s=>{window.open(s)},n=()=>pe(z,{flexDirection:"row",gap:"4",children:q_e.map((s,o)=>pe(z,{onClick:()=>r(s.url),className:QI,gap:"4",children:pe(re,{fontWeight:"normal",fontSize:"small",color:"text50",children:s.label})},o))}),i=()=>pe(z,{gap:"4",justifyContent:"center",alignItems:"center",children:V_e.map((s,o)=>pe(z,{className:QI,onClick:()=>window.open(s.url),children:pe(mr,{height:"3",src:s.icon,alt:s.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?Ti(z,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe(n,{}),pe(i,{})]}):Ti(z,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe(n,{}),pe(i,{})]})},K_e=t=>({cryptoCheckout:{chainId:137,triggerTransaction:async()=>{console.log("triggered transaction")},coinQuantity:{contractAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",amountRequiredRaw:"10000000000"}},orderSummaryItems:[{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",tokenId:"66597",quantityRaw:"100"},{contractAddress:"0x624e4fa6980afcf8ea27bfe08e2fb5979b64df1c",tokenId:"1741",quantityRaw:"100"}]}),Q_e=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},Y_e=t=>`0x${Q_e((t==null?void 0:t.substring(2))||"",8)}`;function J_e(){const{theme:t,setTheme:e}=M1(),{setTheme:r}=np(),{address:n,connector:i,isConnected:s}=Sn(),{setOpenConnectModal:o}=Axe(),{setOpenWalletModal:a}=op(),{triggerCheckout:c}=lp(),{disconnect:l}=OB(),{data:u}=VS(),{switchNetwork:f}=GS(),d=xb(),h=PB(),{debug:p}=eM.parse(location.search),v=p==="true",b=async()=>{if(!(!u||!h))try{const F=await pxe(u);console.log("proof:",F);const j=await vxe(u,h,F);console.log("isValid?:",j)}catch(F){console.error(F)}},y=async()=>{if(u)try{const F=H_e,j=await u.signMessage({account:n||"",message:F});console.log("signature:",j);const[H]=await u.getAddresses(),G=await h.verifyMessage({address:H,message:F,signature:j});console.log("isValid?",G)}catch(F){console.error(F)}},m=()=>{e(t==="dark"?"light":"dark"),r(t==="dark"?"light":"dark")},g=()=>s?Ti(z,{padding:"5",justifyContent:"space-between",children:[Ti(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(mr,{style:{width:"36px"},src:"kit-logo.svg"}),pe(mr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(z,{children:Ti(z,{flexDirection:"column",children:[Ti(z,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe(z,{style:{marginRight:"-12px"},children:pe(w,{})}),pe(re,{fontWeight:"medium",fontSize:"normal",color:"text100",children:Y_e(n||"")})]}),pe(z,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe(re,{fontWeight:"medium",fontSize:"normal",color:"text50",children:i==null?void 0:i.name})})]})})]}):pe(z,{padding:"5",justifyContent:"flex-end",children:pe(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:pe(w,{})})}),S=({title:F,description:j,onClick:H})=>Ti(ws,{style:{width:"332px"},clickable:!0,onClick:H,children:[pe(re,{color:"text100",lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:F}),pe(z,{marginTop:"1",children:pe(re,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:j})})]}),P=()=>{o(!0)},T=()=>{c(K_e())},w=()=>pe(tt,{variant:"base",style:{color:ve.colors.text100},onClick:m,leftIcon:t==="dark"?hne:Zre});return Ti(z,{background:"backgroundPrimary",children:[v&&pe(z,{justifyContent:"center",alignItems:"center",children:pe(re,{children:"Debug mode"})}),pe(z,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe(g,{})}),pe(z,{style:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?Ti(z,{flexDirection:"column",gap:"4",children:[Ti(z,{flexDirection:"column",gap:"2",children:[pe(re,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe(S,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>a(!0)}),pe(S,{title:"Checkout",description:"Checkout screen before placing a purchase on coins or collections",onClick:T}),pe(S,{title:"Sign message",description:"Sign a message with your wallet",onClick:y}),v&&pe(S,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:b}),v&&pe(S,{title:"Switch network",description:"Switch network",onClick:()=>{f(d===1?137:1)}})]}),pe(z,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe(tt,{onClick:()=>l(),leftIcon:CN,label:"Sign out"})})]}):pe(z,{children:Ti(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[Ti(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(mr,{style:{width:"48px"},src:"kit-logo.svg"}),pe(mr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(z,{gap:"2",flexDirection:"row",alignItems:"center",children:pe(tt,{onClick:P,variant:"feature",label:"Connect"})})]})})}),pe(G_e,{})]})}function X_e(){return function(t){return t.rpcUrls.public.http[0]?{chain:t,rpcUrls:t.rpcUrls.public}:null}}function Z_e(){const{debug:t}=eM.parse(location.search),e=t==="true",{chains:r,publicClient:n,webSocketPublicClient:i}=Mhe([lT,Qhe],[X_e()]),s=[...s2e({chains:r,walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:137}),...e?rz([i2e({chains:r,options:{chain:lT,account:"0xCb88b6315507e9d8c35D81AFB7F190aB6c3227C9",transport:tB()}})]):[]],o=i0e({autoConnect:!0,publicClient:n,webSocketPublicClient:i,connectors:s}),a={defaultTheme:nz.dark,signIn:{projectName:"Skyweaver",useMock:e},displayedAssets:[{contractAddress:cr,chainId:137},{contractAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",chainId:137},{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",chainId:137}]};return pe(s0e,{config:o,children:pe(kxe,{config:a,children:pe(jAe,{children:pe(z_e,{children:pe("div",{id:"app",children:pe(Gg,{root:"#app",scope:"app",theme:"dark",children:pe(J_e,{})})})})})})})}const ePe=CE.createRoot(document.getElementById("root"));ePe.render(pe(x.StrictMode,{children:pe(Z_e,{})}));export{Wb as $,nTe as A,lTe as B,MPe as C,NPe as D,rTe as E,Ji as F,qPe as G,WPe as H,Al as I,HPe as J,uwe as K,fwe as L,_U as M,FPe as N,RPe as O,iwe as P,YPe as Q,JPe as R,Hb as S,LPe as T,iTe as U,DPe as V,z8 as W,UPe as X,jPe as Y,AU as Z,OPe as _,YI as a,eTe as a0,QPe as a1,tTe as a2,aTe as a3,oTe as a4,Wwe as a5,yTe as a6,uTe as a7,Hwe as a8,sTe as a9,pTe as aa,fTe as ab,vTe as ac,gTe as ad,dTe as ae,hTe as af,mTe as ag,cTe as ah,Mwe as ai,TU as aj,eE as ak,_Pe as al,GL as am,ce as an,rb as ao,Dn as ap,Uf as aq,B0 as ar,$fe as as,hb as at,Xo as au,L1 as av,jh as aw,mo as ax,kl as b,ul as c,Ue as d,Db as e,ms as f,Gi as g,NT as h,La as i,PPe as j,TPe as k,IPe as l,$Pe as m,ti as n,zPe as o,ep as p,BPe as q,zb as r,VPe as s,As as t,XPe as u,KPe as v,Ps as w,Gf as x,ZPe as y,GPe as z}; +And that has made all the difference.`,tPe=[{label:"Terms",url:"https://sequence.xyz/terms"},{label:"About",url:"https://github.com/0xsequence/kit"},{label:"Blog",url:"https://sequence.xyz/blog"},{label:"Builder",url:"https://sequence.build"},{label:"Docs",url:"https://docs.sequence.xyz/wallet/connectors/kit/kit/overview"}],rPe=[{id:"discord",url:"https://discord.gg/sequence",icon:"img/social/discord.svg"},{id:"twitter",url:"https://www.twitter.com/0xsequence",icon:"img/social/twitter.svg"},{id:"youtube",url:"https://www.youtube.com/channel/UC1zHgUyV-doddTcnFNqt62Q",icon:"img/social/youtube.svg"},{id:"github",url:"https://github.com/0xsequence",icon:"img/social/github.svg"}];var XI="u3q5o00";const nPe=()=>{const{theme:t}=M1(),e=ole("isMobile"),r=s=>{window.open(s)},n=()=>pe(z,{flexDirection:"row",gap:"4",children:tPe.map((s,o)=>pe(z,{onClick:()=>r(s.url),className:XI,gap:"4",children:pe(re,{fontWeight:"normal",fontSize:"small",color:"text50",children:s.label})},o))}),i=()=>pe(z,{gap:"4",justifyContent:"center",alignItems:"center",children:rPe.map((s,o)=>pe(z,{className:XI,onClick:()=>window.open(s.url),children:pe(mr,{height:"3",src:s.icon,alt:s.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?Ti(z,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe(n,{}),pe(i,{})]}):Ti(z,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe(n,{}),pe(i,{})]})},iPe=t=>({cryptoCheckout:{chainId:137,triggerTransaction:async()=>{console.log("triggered transaction")},coinQuantity:{contractAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",amountRequiredRaw:"10000000000"}},orderSummaryItems:[{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",tokenId:"66597",quantityRaw:"100"},{contractAddress:"0x624e4fa6980afcf8ea27bfe08e2fb5979b64df1c",tokenId:"1741",quantityRaw:"100"}]}),sPe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},oPe=t=>`0x${sPe((t==null?void 0:t.substring(2))||"",8)}`;function aPe(){const{theme:t,setTheme:e}=M1(),{setTheme:r}=np(),{address:n,connector:i,isConnected:s}=Sn(),{setOpenConnectModal:o}=Dxe(),{setOpenWalletModal:a}=op(),{triggerCheckout:c}=lp(),{disconnect:l}=DF(),{data:u}=VS(),{switchNetwork:f}=GS(),d=xb(),h=$F(),{debug:p}=nM.parse(location.search),v=p==="true",b=async()=>{if(!(!u||!h))try{const B=await Sxe(u);console.log("proof:",B);const j=await kxe(u,h,B);console.log("isValid?:",j)}catch(B){console.error(B)}},y=async()=>{if(u)try{const B=ePe,j=await u.signMessage({account:n||"",message:B});console.log("signature:",j);const[H]=await u.getAddresses(),G=await h.verifyMessage({address:H,message:B,signature:j});console.log("isValid?",G)}catch(B){console.error(B)}},m=()=>{e(t==="dark"?"light":"dark"),r(t==="dark"?"light":"dark")},g=()=>s?Ti(z,{padding:"5",justifyContent:"space-between",children:[Ti(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(mr,{style:{width:"36px"},src:"kit-logo.svg"}),pe(mr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(z,{children:Ti(z,{flexDirection:"column",children:[Ti(z,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe(z,{style:{marginRight:"-12px"},children:pe(w,{})}),pe(re,{fontWeight:"medium",fontSize:"normal",color:"text100",children:oPe(n||"")})]}),pe(z,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe(re,{fontWeight:"medium",fontSize:"normal",color:"text50",children:i==null?void 0:i.name})})]})})]}):pe(z,{padding:"5",justifyContent:"flex-end",children:pe(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:pe(w,{})})}),S=({title:B,description:j,onClick:H})=>Ti(bs,{style:{width:"332px"},clickable:!0,onClick:H,children:[pe(re,{color:"text100",lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:B}),pe(z,{marginTop:"1",children:pe(re,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:j})})]}),P=()=>{o(!0)},T=()=>{c(iPe())},w=()=>pe(tt,{variant:"base",style:{color:ve.colors.text100},onClick:m,leftIcon:t==="dark"?wne:one});return Ti(z,{background:"backgroundPrimary",children:[v&&pe(z,{justifyContent:"center",alignItems:"center",children:pe(re,{children:"Debug mode"})}),pe(z,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe(g,{})}),pe(z,{style:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?Ti(z,{flexDirection:"column",gap:"4",children:[Ti(z,{flexDirection:"column",gap:"2",children:[pe(re,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe(S,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>a(!0)}),pe(S,{title:"Checkout",description:"Checkout screen before placing a purchase on coins or collections",onClick:T}),pe(S,{title:"Sign message",description:"Sign a message with your wallet",onClick:y}),v&&pe(S,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:b}),v&&pe(S,{title:"Switch network",description:"Switch network",onClick:()=>{f(d===1?137:1)}})]}),pe(z,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe(tt,{onClick:()=>l(),leftIcon:_N,label:"Sign out"})})]}):pe(z,{children:Ti(z,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[Ti(z,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(mr,{style:{width:"48px"},src:"kit-logo.svg"}),pe(mr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(z,{gap:"2",flexDirection:"row",alignItems:"center",children:pe(tt,{onClick:P,variant:"feature",label:"Connect"})})]})})}),pe(nPe,{})]})}function cPe(){return function(t){return t.rpcUrls.public.http[0]?{chain:t,rpcUrls:t.rpcUrls.public}:null}}function lPe(){const{debug:t}=nM.parse(location.search),e=t==="true",{chains:r,publicClient:n,webSocketPublicClient:i}=qhe([d9,o0e],[cPe()]),s=[...m2e({chains:r,walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:137}),...e?oz([v2e({chains:r,options:{chain:d9,account:"0xCb88b6315507e9d8c35D81AFB7F190aB6c3227C9",transport:oF()}})]):[]],o=v0e({autoConnect:!0,publicClient:n,webSocketPublicClient:i,connectors:s}),a={projectAccessKey:"iK0DPkHRt0IFo8o4M3fZIIOAAAAAAAAAA",defaultTheme:az.dark,signIn:{projectName:"Skyweaver",useMock:e},displayedAssets:[{contractAddress:lr,chainId:137},{contractAddress:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",chainId:137},{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",chainId:137}]};return pe(m0e,{config:o,children:pe(Nxe,{config:a,children:pe(Y4e,{children:pe(X_e,{children:pe("div",{id:"app",children:pe(Gg,{root:"#app",scope:"app",theme:"dark",children:pe(aPe,{})})})})})})})}const uPe=CE.createRoot(document.getElementById("root"));uPe.render(pe(x.StrictMode,{children:pe(lPe,{})}));export{Wb as $,h9e as A,b9e as B,HPe as C,qPe as D,d9e as E,Yi as F,t9e as G,ZPe as H,Al as I,e9e as J,Ewe as K,xwe as L,RU as M,QPe as N,zPe as O,vwe as P,o9e as Q,a9e as R,Hb as S,GPe as T,p9e as U,VPe as V,z8 as W,JPe as X,YPe as Y,OU as Z,UPe as _,ZI as a,u9e as a0,s9e as a1,f9e as a2,y9e as a3,m9e as a4,e2e as a5,_9e as a6,w9e as a7,t2e as a8,v9e as a9,S9e as aa,E9e as ab,k9e as ac,P9e as ad,x9e as ae,C9e as af,A9e as ag,g9e as ah,qwe as ai,MU as aj,eE as ak,LPe as al,XL as am,ce as an,rb as ao,Dn as ap,Uf as aq,F0 as ar,Hfe as as,hb as at,Xo as au,L1 as av,jh as aw,mo as ax,Ue as b,kl as c,Db as d,F9 as e,vs as f,As as g,ul as h,La as i,FPe as j,BPe as k,jPe as l,WPe as m,ti as n,XPe as o,ep as p,KPe as q,zb as r,r9e as s,ks as t,c9e as u,i9e as v,Ps as w,Gf as x,l9e as y,n9e as z}; diff --git a/assets/index-f4824932.css b/assets/index-f4824932.css new file mode 100644 index 00000000..f784a0d7 --- /dev/null +++ b/assets/index-f4824932.css @@ -0,0 +1 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}:root{--blur-blur: blur(12.5px);--blur-none: none;--border-widths-none: 0;--border-widths-thin: .075rem;--border-widths-thick: .125rem;--fonts-inherit: inherit;--fonts-body: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, "Helvetica Neue", Arial;--fonts-mono: "iAWriter Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--font-sizes-inherit: inherit;--font-sizes-xsmall: .625rem;--font-sizes-small: .75rem;--font-sizes-normal: .875rem;--font-sizes-medium: 1rem;--font-sizes-large: 1.25rem;--font-sizes-xlarge: 1.875rem;--font-weights-inherit: inherit;--font-weights-normal: 400;--font-weights-medium: 500;--font-weights-semibold: 600;--font-weights-bold: 700;--letter-spacings-inherit: inherit;--letter-spacings-none: 0;--letter-spacings-normal: .01em;--letter-spacings-wide: .03em;--line-heights-4: 1rem;--line-heights-5: 1.25rem;--line-heights-6: 1.5rem;--line-heights-7: 1.75rem;--line-heights-9: 2.25rem;--line-heights-inherit: inherit;--opacity-0: 0;--opacity-50: .5;--opacity-80: .8;--opacity-100: 1;--radii-none: 0;--radii-xs: .25rem;--radii-sm: .5rem;--radii-md: .75rem;--radii-lg: 1rem;--radii-circle: 9999px;--space-0: 0;--space-1: .25rem;--space-2: .5rem;--space-3: .75rem;--space-4: 1rem;--space-5: 1.25rem;--space-6: 1.5rem;--space-7: 1.75rem;--space-8: 2rem;--space-9: 2.25rem;--space-10: 2.5rem;--space-12: 3rem;--space-14: 3.5rem;--space-16: 4rem;--space-0_25: .0625rem;--space-0_5: .125rem;--space-1_5: .375rem}:root{--colors-black: #000000;--colors-white: #ffffff;--colors-inherit: inherit;--colors-transparent: transparent;--colors-positive: #1FC266;--colors-negative: #C2501F;--colors-info: #0076CC;--colors-warning: #F4B03E;--colors-gradient-backdrop: linear-gradient( 243.18deg, rgba(86, 52, 189, .85) 0%, rgba(49, 41, 223, .85) 63.54%, rgba(7, 98, 149, .85) 100% );--colors-gradient-primary: linear-gradient(89.69deg, #4411E1 .27%, #7537F9 99.73%);--colors-gradient-secondary: linear-gradient(32.51deg, #951990 -15.23%, #3A35B1 48.55%, #20A8B0 100%);--colors-arbitrum-dark: #212D44;--colors-arbitrum-light: #93D4FF;--colors-avalance-dark: #810C0C;--colors-avalance-light: #FF8080;--colors-bsc-dark: #584508;--colors-bsc-light: #FCCF43;--colors-ethereum-dark: #132362;--colors-ethereum-light: #AABBFF;--colors-gnosis-dark: #084246;--colors-gnosis-light: #8CF6FD;--colors-polygon-dark: #350881;--colors-polygon-light: #C7A6FF;--colors-text100: rgba(255, 255, 255, 1);--colors-text80: rgba(255, 255, 255, .8);--colors-text50: rgba(255, 255, 255, .5);--colors-text-inverse100: rgba(0, 0, 0, 1);--colors-background-primary: rgba(0, 0, 0, 1);--colors-background-secondary: rgba(255, 255, 255, .1);--colors-background-contrast: rgba(0, 0, 0, .5);--colors-background-muted: rgba(255, 255, 255, .05);--colors-background-control: rgba(255, 255, 255, .25);--colors-background-inverse: rgba(255, 255, 255, 1);--colors-background-backdrop: rgba(34, 34, 34, .9);--colors-background-overlay: rgba(0, 0, 0, .7);--colors-background-raised: rgba(54, 54, 54, .7);--colors-button-glass: rgba(255, 255, 255, .15);--colors-button-emphasis: rgba(0, 0, 0, .5);--colors-button-inverse: rgba(255, 255, 255, .8);--colors-border-normal: rgba(255, 255, 255, .25);--colors-border-focus: rgba(255, 255, 255, .5)}*{background:transparent none repeat 0 0 / auto auto padding-box border-box scroll;background:initial;border:medium none currentcolor;border:initial;color:inherit;font-family:var(--fonts-body);font-stretch:inherit;font-style:inherit;font-feature-settings:;font-variant:inherit;font-weight:inherit;list-style-type:none;margin:0;outline:medium none currentcolor;outline:initial;padding:0;text-decoration:none;text-decoration:initial}*,*:before,*:after{box-sizing:border-box}*:focus{outline:none}*:focus-visible{outline:none;box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset;border-color:transparent}body{background:var(--colors-background-primary);color:var(--colors-text80);font-size:1rem}html:not(.is-apple) *::-webkit-scrollbar{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:13px;background:rgba(0,0,0,0)}html:not(.is-apple) *::-webkit-scrollbar-thumb{background:var(--colors-text50);border:3px solid transparent;background-clip:content-box;border-radius:7px}.fyvr10{width:var(--space-0)}.fyvr14{width:var(--space-1)}.fyvr18{width:var(--space-2)}.fyvr1c{width:var(--space-3)}.fyvr1g{width:var(--space-4)}.fyvr1k{width:var(--space-5)}.fyvr1o{width:var(--space-6)}.fyvr1s{width:var(--space-7)}.fyvr1w{width:var(--space-8)}.fyvr110{width:var(--space-9)}.fyvr114{width:var(--space-10)}.fyvr118{width:var(--space-12)}.fyvr11c{width:var(--space-14)}.fyvr11g{width:var(--space-16)}.fyvr11k{width:var(--space-0_25)}.fyvr11o{width:var(--space-0_5)}.fyvr11s{width:var(--space-1_5)}.fyvr11w{width:0}.fyvr120{width:1px}.fyvr124{width:auto}.fyvr128{width:100%}.fyvr12c{width:50%}.fyvr12g{width:33.33333%}.fyvr12k{width:66.66667%}.fyvr12o{width:25%}.fyvr12s{width:75%}.fyvr12w{width:-moz-fit-content;width:fit-content}.fyvr130{width:-moz-max-content;width:max-content}.fyvr134{width:-moz-min-content;width:min-content}.fyvr138{width:100vw}.fyvr13c{width:100vh}.fyvr13g{height:var(--space-0)}.fyvr13k{height:var(--space-1)}.fyvr13o{height:var(--space-2)}.fyvr13s{height:var(--space-3)}.fyvr13w{height:var(--space-4)}.fyvr140{height:var(--space-5)}.fyvr144{height:var(--space-6)}.fyvr148{height:var(--space-7)}.fyvr14c{height:var(--space-8)}.fyvr14g{height:var(--space-9)}.fyvr14k{height:var(--space-10)}.fyvr14o{height:var(--space-12)}.fyvr14s{height:var(--space-14)}.fyvr14w{height:var(--space-16)}.fyvr150{height:var(--space-0_25)}.fyvr154{height:var(--space-0_5)}.fyvr158{height:var(--space-1_5)}.fyvr15c{height:0}.fyvr15g{height:1px}.fyvr15k{height:auto}.fyvr15o{height:100%}.fyvr15s{height:50%}.fyvr15w{height:33.33333%}.fyvr160{height:66.66667%}.fyvr164{height:25%}.fyvr168{height:75%}.fyvr16c{height:-moz-fit-content;height:fit-content}.fyvr16g{height:-moz-max-content;height:max-content}.fyvr16k{height:-moz-min-content;height:min-content}.fyvr16o{height:100vw}.fyvr16s{height:100vh}.fyvr16w{max-width:var(--space-0)}.fyvr170{max-width:var(--space-1)}.fyvr174{max-width:var(--space-2)}.fyvr178{max-width:var(--space-3)}.fyvr17c{max-width:var(--space-4)}.fyvr17g{max-width:var(--space-5)}.fyvr17k{max-width:var(--space-6)}.fyvr17o{max-width:var(--space-7)}.fyvr17s{max-width:var(--space-8)}.fyvr17w{max-width:var(--space-9)}.fyvr180{max-width:var(--space-10)}.fyvr184{max-width:var(--space-12)}.fyvr188{max-width:var(--space-14)}.fyvr18c{max-width:var(--space-16)}.fyvr18g{max-width:var(--space-0_25)}.fyvr18k{max-width:var(--space-0_5)}.fyvr18o{max-width:var(--space-1_5)}.fyvr18s{max-width:0}.fyvr18w{max-width:1px}.fyvr190{max-width:auto}.fyvr194{max-width:100%}.fyvr198{max-width:50%}.fyvr19c{max-width:33.33333%}.fyvr19g{max-width:66.66667%}.fyvr19k{max-width:25%}.fyvr19o{max-width:75%}.fyvr19s{max-width:-moz-fit-content;max-width:fit-content}.fyvr19w{max-width:-moz-max-content;max-width:max-content}.fyvr1a0{max-width:-moz-min-content;max-width:min-content}.fyvr1a4{max-width:100vw}.fyvr1a8{max-width:100vh}.fyvr1ac{max-height:var(--space-0)}.fyvr1ag{max-height:var(--space-1)}.fyvr1ak{max-height:var(--space-2)}.fyvr1ao{max-height:var(--space-3)}.fyvr1as{max-height:var(--space-4)}.fyvr1aw{max-height:var(--space-5)}.fyvr1b0{max-height:var(--space-6)}.fyvr1b4{max-height:var(--space-7)}.fyvr1b8{max-height:var(--space-8)}.fyvr1bc{max-height:var(--space-9)}.fyvr1bg{max-height:var(--space-10)}.fyvr1bk{max-height:var(--space-12)}.fyvr1bo{max-height:var(--space-14)}.fyvr1bs{max-height:var(--space-16)}.fyvr1bw{max-height:var(--space-0_25)}.fyvr1c0{max-height:var(--space-0_5)}.fyvr1c4{max-height:var(--space-1_5)}.fyvr1c8{max-height:0}.fyvr1cc{max-height:1px}.fyvr1cg{max-height:auto}.fyvr1ck{max-height:100%}.fyvr1co{max-height:50%}.fyvr1cs{max-height:33.33333%}.fyvr1cw{max-height:66.66667%}.fyvr1d0{max-height:25%}.fyvr1d4{max-height:75%}.fyvr1d8{max-height:-moz-fit-content;max-height:fit-content}.fyvr1dc{max-height:-moz-max-content;max-height:max-content}.fyvr1dg{max-height:-moz-min-content;max-height:min-content}.fyvr1dk{max-height:100vw}.fyvr1do{max-height:100vh}.fyvr1ds{min-width:var(--space-0)}.fyvr1dw{min-width:var(--space-1)}.fyvr1e0{min-width:var(--space-2)}.fyvr1e4{min-width:var(--space-3)}.fyvr1e8{min-width:var(--space-4)}.fyvr1ec{min-width:var(--space-5)}.fyvr1eg{min-width:var(--space-6)}.fyvr1ek{min-width:var(--space-7)}.fyvr1eo{min-width:var(--space-8)}.fyvr1es{min-width:var(--space-9)}.fyvr1ew{min-width:var(--space-10)}.fyvr1f0{min-width:var(--space-12)}.fyvr1f4{min-width:var(--space-14)}.fyvr1f8{min-width:var(--space-16)}.fyvr1fc{min-width:var(--space-0_25)}.fyvr1fg{min-width:var(--space-0_5)}.fyvr1fk{min-width:var(--space-1_5)}.fyvr1fo{min-width:0}.fyvr1fs{min-width:1px}.fyvr1fw{min-width:auto}.fyvr1g0{min-width:100%}.fyvr1g4{min-width:50%}.fyvr1g8{min-width:33.33333%}.fyvr1gc{min-width:66.66667%}.fyvr1gg{min-width:25%}.fyvr1gk{min-width:75%}.fyvr1go{min-width:-moz-fit-content;min-width:fit-content}.fyvr1gs{min-width:-moz-max-content;min-width:max-content}.fyvr1gw{min-width:-moz-min-content;min-width:min-content}.fyvr1h0{min-width:100vw}.fyvr1h4{min-width:100vh}.fyvr1h8{min-height:var(--space-0)}.fyvr1hc{min-height:var(--space-1)}.fyvr1hg{min-height:var(--space-2)}.fyvr1hk{min-height:var(--space-3)}.fyvr1ho{min-height:var(--space-4)}.fyvr1hs{min-height:var(--space-5)}.fyvr1hw{min-height:var(--space-6)}.fyvr1i0{min-height:var(--space-7)}.fyvr1i4{min-height:var(--space-8)}.fyvr1i8{min-height:var(--space-9)}.fyvr1ic{min-height:var(--space-10)}.fyvr1ig{min-height:var(--space-12)}.fyvr1ik{min-height:var(--space-14)}.fyvr1io{min-height:var(--space-16)}.fyvr1is{min-height:var(--space-0_25)}.fyvr1iw{min-height:var(--space-0_5)}.fyvr1j0{min-height:var(--space-1_5)}.fyvr1j4{min-height:0}.fyvr1j8{min-height:1px}.fyvr1jc{min-height:auto}.fyvr1jg{min-height:100%}.fyvr1jk{min-height:50%}.fyvr1jo{min-height:33.33333%}.fyvr1js{min-height:66.66667%}.fyvr1jw{min-height:25%}.fyvr1k0{min-height:75%}.fyvr1k4{min-height:-moz-fit-content;min-height:fit-content}.fyvr1k8{min-height:-moz-max-content;min-height:max-content}.fyvr1kc{min-height:-moz-min-content;min-height:min-content}.fyvr1kg{min-height:100vw}.fyvr1kk{min-height:100vh}.fyvr1ko{top:var(--space-0)}.fyvr1ks{top:var(--space-1)}.fyvr1kw{top:var(--space-2)}.fyvr1l0{top:var(--space-3)}.fyvr1l4{top:var(--space-4)}.fyvr1l8{top:var(--space-5)}.fyvr1lc{top:var(--space-6)}.fyvr1lg{top:var(--space-7)}.fyvr1lk{top:var(--space-8)}.fyvr1lo{top:var(--space-9)}.fyvr1ls{top:var(--space-10)}.fyvr1lw{top:var(--space-12)}.fyvr1m0{top:var(--space-14)}.fyvr1m4{top:var(--space-16)}.fyvr1m8{top:var(--space-0_25)}.fyvr1mc{top:var(--space-0_5)}.fyvr1mg{top:var(--space-1_5)}.fyvr1mk{top:auto}.fyvr1mo{bottom:var(--space-0)}.fyvr1ms{bottom:var(--space-1)}.fyvr1mw{bottom:var(--space-2)}.fyvr1n0{bottom:var(--space-3)}.fyvr1n4{bottom:var(--space-4)}.fyvr1n8{bottom:var(--space-5)}.fyvr1nc{bottom:var(--space-6)}.fyvr1ng{bottom:var(--space-7)}.fyvr1nk{bottom:var(--space-8)}.fyvr1no{bottom:var(--space-9)}.fyvr1ns{bottom:var(--space-10)}.fyvr1nw{bottom:var(--space-12)}.fyvr1o0{bottom:var(--space-14)}.fyvr1o4{bottom:var(--space-16)}.fyvr1o8{bottom:var(--space-0_25)}.fyvr1oc{bottom:var(--space-0_5)}.fyvr1og{bottom:var(--space-1_5)}.fyvr1ok{bottom:auto}.fyvr1oo{left:var(--space-0)}.fyvr1os{left:var(--space-1)}.fyvr1ow{left:var(--space-2)}.fyvr1p0{left:var(--space-3)}.fyvr1p4{left:var(--space-4)}.fyvr1p8{left:var(--space-5)}.fyvr1pc{left:var(--space-6)}.fyvr1pg{left:var(--space-7)}.fyvr1pk{left:var(--space-8)}.fyvr1po{left:var(--space-9)}.fyvr1ps{left:var(--space-10)}.fyvr1pw{left:var(--space-12)}.fyvr1q0{left:var(--space-14)}.fyvr1q4{left:var(--space-16)}.fyvr1q8{left:var(--space-0_25)}.fyvr1qc{left:var(--space-0_5)}.fyvr1qg{left:var(--space-1_5)}.fyvr1qk{left:auto}.fyvr1qo{right:var(--space-0)}.fyvr1qs{right:var(--space-1)}.fyvr1qw{right:var(--space-2)}.fyvr1r0{right:var(--space-3)}.fyvr1r4{right:var(--space-4)}.fyvr1r8{right:var(--space-5)}.fyvr1rc{right:var(--space-6)}.fyvr1rg{right:var(--space-7)}.fyvr1rk{right:var(--space-8)}.fyvr1ro{right:var(--space-9)}.fyvr1rs{right:var(--space-10)}.fyvr1rw{right:var(--space-12)}.fyvr1s0{right:var(--space-14)}.fyvr1s4{right:var(--space-16)}.fyvr1s8{right:var(--space-0_25)}.fyvr1sc{right:var(--space-0_5)}.fyvr1sg{right:var(--space-1_5)}.fyvr1sk{right:auto}.fyvr1so{padding-top:var(--space-0)}.fyvr1ss{padding-top:var(--space-1)}.fyvr1sw{padding-top:var(--space-2)}.fyvr1t0{padding-top:var(--space-3)}.fyvr1t4{padding-top:var(--space-4)}.fyvr1t8{padding-top:var(--space-5)}.fyvr1tc{padding-top:var(--space-6)}.fyvr1tg{padding-top:var(--space-7)}.fyvr1tk{padding-top:var(--space-8)}.fyvr1to{padding-top:var(--space-9)}.fyvr1ts{padding-top:var(--space-10)}.fyvr1tw{padding-top:var(--space-12)}.fyvr1u0{padding-top:var(--space-14)}.fyvr1u4{padding-top:var(--space-16)}.fyvr1u8{padding-top:var(--space-0_25)}.fyvr1uc{padding-top:var(--space-0_5)}.fyvr1ug{padding-top:var(--space-1_5)}.fyvr1uk{padding-bottom:var(--space-0)}.fyvr1uo{padding-bottom:var(--space-1)}.fyvr1us{padding-bottom:var(--space-2)}.fyvr1uw{padding-bottom:var(--space-3)}.fyvr1v0{padding-bottom:var(--space-4)}.fyvr1v4{padding-bottom:var(--space-5)}.fyvr1v8{padding-bottom:var(--space-6)}.fyvr1vc{padding-bottom:var(--space-7)}.fyvr1vg{padding-bottom:var(--space-8)}.fyvr1vk{padding-bottom:var(--space-9)}.fyvr1vo{padding-bottom:var(--space-10)}.fyvr1vs{padding-bottom:var(--space-12)}.fyvr1vw{padding-bottom:var(--space-14)}.fyvr1w0{padding-bottom:var(--space-16)}.fyvr1w4{padding-bottom:var(--space-0_25)}.fyvr1w8{padding-bottom:var(--space-0_5)}.fyvr1wc{padding-bottom:var(--space-1_5)}.fyvr1wg{padding-left:var(--space-0)}.fyvr1wk{padding-left:var(--space-1)}.fyvr1wo{padding-left:var(--space-2)}.fyvr1ws{padding-left:var(--space-3)}.fyvr1ww{padding-left:var(--space-4)}.fyvr1x0{padding-left:var(--space-5)}.fyvr1x4{padding-left:var(--space-6)}.fyvr1x8{padding-left:var(--space-7)}.fyvr1xc{padding-left:var(--space-8)}.fyvr1xg{padding-left:var(--space-9)}.fyvr1xk{padding-left:var(--space-10)}.fyvr1xo{padding-left:var(--space-12)}.fyvr1xs{padding-left:var(--space-14)}.fyvr1xw{padding-left:var(--space-16)}.fyvr1y0{padding-left:var(--space-0_25)}.fyvr1y4{padding-left:var(--space-0_5)}.fyvr1y8{padding-left:var(--space-1_5)}.fyvr1yc{padding-right:var(--space-0)}.fyvr1yg{padding-right:var(--space-1)}.fyvr1yk{padding-right:var(--space-2)}.fyvr1yo{padding-right:var(--space-3)}.fyvr1ys{padding-right:var(--space-4)}.fyvr1yw{padding-right:var(--space-5)}.fyvr1z0{padding-right:var(--space-6)}.fyvr1z4{padding-right:var(--space-7)}.fyvr1z8{padding-right:var(--space-8)}.fyvr1zc{padding-right:var(--space-9)}.fyvr1zg{padding-right:var(--space-10)}.fyvr1zk{padding-right:var(--space-12)}.fyvr1zo{padding-right:var(--space-14)}.fyvr1zs{padding-right:var(--space-16)}.fyvr1zw{padding-right:var(--space-0_25)}.fyvr1100{padding-right:var(--space-0_5)}.fyvr1104{padding-right:var(--space-1_5)}.fyvr1108{margin-top:var(--space-0)}.fyvr110c{margin-top:var(--space-1)}.fyvr110g{margin-top:var(--space-2)}.fyvr110k{margin-top:var(--space-3)}.fyvr110o{margin-top:var(--space-4)}.fyvr110s{margin-top:var(--space-5)}.fyvr110w{margin-top:var(--space-6)}.fyvr1110{margin-top:var(--space-7)}.fyvr1114{margin-top:var(--space-8)}.fyvr1118{margin-top:var(--space-9)}.fyvr111c{margin-top:var(--space-10)}.fyvr111g{margin-top:var(--space-12)}.fyvr111k{margin-top:var(--space-14)}.fyvr111o{margin-top:var(--space-16)}.fyvr111s{margin-top:var(--space-0_25)}.fyvr111w{margin-top:var(--space-0_5)}.fyvr1120{margin-top:var(--space-1_5)}.fyvr1124{margin-top:auto}.fyvr1128{margin-bottom:var(--space-0)}.fyvr112c{margin-bottom:var(--space-1)}.fyvr112g{margin-bottom:var(--space-2)}.fyvr112k{margin-bottom:var(--space-3)}.fyvr112o{margin-bottom:var(--space-4)}.fyvr112s{margin-bottom:var(--space-5)}.fyvr112w{margin-bottom:var(--space-6)}.fyvr1130{margin-bottom:var(--space-7)}.fyvr1134{margin-bottom:var(--space-8)}.fyvr1138{margin-bottom:var(--space-9)}.fyvr113c{margin-bottom:var(--space-10)}.fyvr113g{margin-bottom:var(--space-12)}.fyvr113k{margin-bottom:var(--space-14)}.fyvr113o{margin-bottom:var(--space-16)}.fyvr113s{margin-bottom:var(--space-0_25)}.fyvr113w{margin-bottom:var(--space-0_5)}.fyvr1140{margin-bottom:var(--space-1_5)}.fyvr1144{margin-bottom:auto}.fyvr1148{margin-left:var(--space-0)}.fyvr114c{margin-left:var(--space-1)}.fyvr114g{margin-left:var(--space-2)}.fyvr114k{margin-left:var(--space-3)}.fyvr114o{margin-left:var(--space-4)}.fyvr114s{margin-left:var(--space-5)}.fyvr114w{margin-left:var(--space-6)}.fyvr1150{margin-left:var(--space-7)}.fyvr1154{margin-left:var(--space-8)}.fyvr1158{margin-left:var(--space-9)}.fyvr115c{margin-left:var(--space-10)}.fyvr115g{margin-left:var(--space-12)}.fyvr115k{margin-left:var(--space-14)}.fyvr115o{margin-left:var(--space-16)}.fyvr115s{margin-left:var(--space-0_25)}.fyvr115w{margin-left:var(--space-0_5)}.fyvr1160{margin-left:var(--space-1_5)}.fyvr1164{margin-left:auto}.fyvr1168{margin-right:var(--space-0)}.fyvr116c{margin-right:var(--space-1)}.fyvr116g{margin-right:var(--space-2)}.fyvr116k{margin-right:var(--space-3)}.fyvr116o{margin-right:var(--space-4)}.fyvr116s{margin-right:var(--space-5)}.fyvr116w{margin-right:var(--space-6)}.fyvr1170{margin-right:var(--space-7)}.fyvr1174{margin-right:var(--space-8)}.fyvr1178{margin-right:var(--space-9)}.fyvr117c{margin-right:var(--space-10)}.fyvr117g{margin-right:var(--space-12)}.fyvr117k{margin-right:var(--space-14)}.fyvr117o{margin-right:var(--space-16)}.fyvr117s{margin-right:var(--space-0_25)}.fyvr117w{margin-right:var(--space-0_5)}.fyvr1180{margin-right:var(--space-1_5)}.fyvr1184{margin-right:auto}.fyvr1188{gap:var(--space-0)}.fyvr118c{gap:var(--space-1)}.fyvr118g{gap:var(--space-2)}.fyvr118k{gap:var(--space-3)}.fyvr118o{gap:var(--space-4)}.fyvr118s{gap:var(--space-5)}.fyvr118w{gap:var(--space-6)}.fyvr1190{gap:var(--space-7)}.fyvr1194{gap:var(--space-8)}.fyvr1198{gap:var(--space-9)}.fyvr119c{gap:var(--space-10)}.fyvr119g{gap:var(--space-12)}.fyvr119k{gap:var(--space-14)}.fyvr119o{gap:var(--space-16)}.fyvr119s{gap:var(--space-0_25)}.fyvr119w{gap:var(--space-0_5)}.fyvr11a0{gap:var(--space-1_5)}.fyvr11a4{border-bottom-width:var(--border-widths-none)}.fyvr11a8{border-bottom-width:var(--border-widths-thin)}.fyvr11ac{border-bottom-width:var(--border-widths-thick)}.fyvr11ag{border-left-width:var(--border-widths-none)}.fyvr11ak{border-left-width:var(--border-widths-thin)}.fyvr11ao{border-left-width:var(--border-widths-thick)}.fyvr11as{border-right-width:var(--border-widths-none)}.fyvr11aw{border-right-width:var(--border-widths-thin)}.fyvr11b0{border-right-width:var(--border-widths-thick)}.fyvr11b4{border-top-width:var(--border-widths-none)}.fyvr11b8{border-top-width:var(--border-widths-thin)}.fyvr11bc{border-top-width:var(--border-widths-thick)}.fyvr11bg{border-bottom-left-radius:var(--radii-none)}.fyvr11bk{border-bottom-left-radius:var(--radii-xs)}.fyvr11bo{border-bottom-left-radius:var(--radii-sm)}.fyvr11bs{border-bottom-left-radius:var(--radii-md)}.fyvr11bw{border-bottom-left-radius:var(--radii-lg)}.fyvr11c0{border-bottom-left-radius:var(--radii-circle)}.fyvr11c4{border-bottom-right-radius:var(--radii-none)}.fyvr11c8{border-bottom-right-radius:var(--radii-xs)}.fyvr11cc{border-bottom-right-radius:var(--radii-sm)}.fyvr11cg{border-bottom-right-radius:var(--radii-md)}.fyvr11ck{border-bottom-right-radius:var(--radii-lg)}.fyvr11co{border-bottom-right-radius:var(--radii-circle)}.fyvr11cs{border-top-left-radius:var(--radii-none)}.fyvr11cw{border-top-left-radius:var(--radii-xs)}.fyvr11d0{border-top-left-radius:var(--radii-sm)}.fyvr11d4{border-top-left-radius:var(--radii-md)}.fyvr11d8{border-top-left-radius:var(--radii-lg)}.fyvr11dc{border-top-left-radius:var(--radii-circle)}.fyvr11dg{border-top-right-radius:var(--radii-none)}.fyvr11dk{border-top-right-radius:var(--radii-xs)}.fyvr11do{border-top-right-radius:var(--radii-sm)}.fyvr11ds{border-top-right-radius:var(--radii-md)}.fyvr11dw{border-top-right-radius:var(--radii-lg)}.fyvr11e0{border-top-right-radius:var(--radii-circle)}.fyvr11e4{font-size:var(--font-sizes-inherit)}.fyvr11e8{font-size:var(--font-sizes-xsmall)}.fyvr11ec{font-size:var(--font-sizes-small)}.fyvr11eg{font-size:var(--font-sizes-normal)}.fyvr11ek{font-size:var(--font-sizes-medium)}.fyvr11eo{font-size:var(--font-sizes-large)}.fyvr11es{font-size:var(--font-sizes-xlarge)}.fyvr11ew{font-weight:var(--font-weights-inherit)}.fyvr11f0{font-weight:var(--font-weights-normal)}.fyvr11f4{font-weight:var(--font-weights-medium)}.fyvr11f8{font-weight:var(--font-weights-semibold)}.fyvr11fc{font-weight:var(--font-weights-bold)}.fyvr11fg{letter-spacing:var(--letter-spacings-inherit)}.fyvr11fk{letter-spacing:var(--letter-spacings-none)}.fyvr11fo{letter-spacing:var(--letter-spacings-normal)}.fyvr11fs{letter-spacing:var(--letter-spacings-wide)}.fyvr11fw{line-height:var(--line-heights-4)}.fyvr11g0{line-height:var(--line-heights-5)}.fyvr11g4{line-height:var(--line-heights-6)}.fyvr11g8{line-height:var(--line-heights-7)}.fyvr11gc{line-height:var(--line-heights-9)}.fyvr11gg{line-height:var(--line-heights-inherit)}.fyvr11gk{text-align:center}.fyvr11go{text-align:left}.fyvr11gs{text-align:right}.fyvr11gw{display:block}.fyvr11h0{display:flex}.fyvr11h4{display:grid}.fyvr11h8{display:inline-block}.fyvr11hc{display:inline-flex}.fyvr11hg{display:none}.fyvr11hk{display:contents}.fyvr11ho{position:absolute}.fyvr11hs{position:fixed}.fyvr11hw{position:relative}.fyvr11i0{position:sticky}.fyvr11i4{flex-direction:column}.fyvr11i8{flex-direction:column-reverse}.fyvr11ic{flex-direction:row}.fyvr11ig{flex-direction:row-reverse}.fyvr11ik{flex-shrink:0}.fyvr11io{flex-shrink:1}.fyvr11is{flex-grow:0}.fyvr11iw{flex-grow:1}.fyvr11j0{flex-wrap:nowrap}.fyvr11j4{flex-wrap:wrap}.fyvr11j8{flex-wrap:wrap-reverse}.fyvr11jc{justify-content:flex-start}.fyvr11jg{justify-content:center}.fyvr11jk{justify-content:flex-end}.fyvr11jo{justify-content:stretch}.fyvr11js{justify-content:space-around}.fyvr11jw{justify-content:space-between}.fyvr11k0{justify-content:space-evenly}.fyvr11k4{justify-self:flex-start}.fyvr11k8{justify-self:center}.fyvr11kc{justify-self:flex-end}.fyvr11kg{justify-self:stretch}.fyvr11kk{align-items:flex-start}.fyvr11ko{align-items:center}.fyvr11ks{align-items:flex-end}.fyvr11kw{align-items:stretch}.fyvr11l0{align-items:baseline}.fyvr11l4{align-self:flex-start}.fyvr11l8{align-self:center}.fyvr11lc{align-self:flex-end}.fyvr11lg{align-self:stretch}.fyvr11lk{align-self:baseline}.fyvr11lo{overflow-x:auto}.fyvr11ls{overflow-x:hidden}.fyvr11lw{overflow-x:scroll}.fyvr11m0{overflow-x:visible}.fyvr11m4{overflow-y:auto}.fyvr11m8{overflow-y:hidden}.fyvr11mc{overflow-y:scroll}.fyvr11mg{overflow-y:visible}.fyvr11mk{visibility:hidden}.fyvr11mo{visibility:visible}.fyvr11ms{-webkit-backdrop-filter:var(--blur-blur);backdrop-filter:var(--blur-blur)}.fyvr11mt{-webkit-backdrop-filter:var(--blur-none);backdrop-filter:var(--blur-none)}.fyvr11mu{font-family:var(--fonts-inherit)}.fyvr11mv{font-family:var(--fonts-body)}.fyvr11mw{font-family:var(--fonts-mono)}.fyvr11mx{text-overflow:ellipsis}.fyvr11my{text-overflow:clip}.fyvr11mz{text-transform:capitalize}.fyvr11n0{text-transform:lowercase}.fyvr11n1{text-transform:uppercase}.fyvr11n2{-webkit-user-select:none;-moz-user-select:none;user-select:none}.fyvr11n3{-webkit-user-select:text;-moz-user-select:text;user-select:text}.fyvr11n4{-webkit-user-select:all;-moz-user-select:all;user-select:all}.fyvr11n5{-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.fyvr11n6{white-space:normal}.fyvr11n7{white-space:nowrap}.fyvr11n8{white-space:normal;white-space:initial}.fyvr11n9{white-space:inherit}.fyvr11na{word-break:break-word}.fyvr11nb{word-wrap:normal}.fyvr11nc{word-wrap:break-word}.fyvr11nd{word-wrap:initial}.fyvr11ne{word-wrap:inherit}.fyvr11nf{z-index:0}.fyvr11ng{z-index:1}.fyvr11nh{z-index:10}.fyvr11ni{z-index:20}.fyvr11nj{z-index:30}.fyvr11nk{z-index:40}.fyvr11nl{z-index:50}.fyvr11nm{z-index:-1}.fyvr11nn{z-index:auto}.fyvr11no{aspect-ratio:1 / 1}.fyvr11np{aspect-ratio:16 / 9}.fyvr11nq{aspect-ratio:4 / 3}.fyvr11nr{aspect-ratio:3 / 1}.fyvr11ns{aspect-ratio:auto}.fyvr11nt,.fyvr11nu:active{background:var(--colors-black)}.fyvr11nv:disabled,.fyvr11nv[data-disabled]{background:var(--colors-black)}.fyvr11nw:focus{background:var(--colors-black)}.fyvr11nx:hover:not([disabled]){background:var(--colors-black)}.fyvr11ny[data-state=checked]{background:var(--colors-black)}.fyvr11nz,.fyvr11o0:active{background:var(--colors-white)}.fyvr11o1:disabled,.fyvr11o1[data-disabled]{background:var(--colors-white)}.fyvr11o2:focus{background:var(--colors-white)}.fyvr11o3:hover:not([disabled]){background:var(--colors-white)}.fyvr11o4[data-state=checked]{background:var(--colors-white)}.fyvr11o5,.fyvr11o6:active{background:var(--colors-inherit)}.fyvr11o7:disabled,.fyvr11o7[data-disabled]{background:var(--colors-inherit)}.fyvr11o8:focus{background:var(--colors-inherit)}.fyvr11o9:hover:not([disabled]){background:var(--colors-inherit)}.fyvr11oa[data-state=checked]{background:var(--colors-inherit)}.fyvr11ob,.fyvr11oc:active{background:var(--colors-transparent)}.fyvr11od:disabled,.fyvr11od[data-disabled]{background:var(--colors-transparent)}.fyvr11oe:focus{background:var(--colors-transparent)}.fyvr11of:hover:not([disabled]){background:var(--colors-transparent)}.fyvr11og[data-state=checked]{background:var(--colors-transparent)}.fyvr11oh,.fyvr11oi:active{background:var(--colors-positive)}.fyvr11oj:disabled,.fyvr11oj[data-disabled]{background:var(--colors-positive)}.fyvr11ok:focus{background:var(--colors-positive)}.fyvr11ol:hover:not([disabled]){background:var(--colors-positive)}.fyvr11om[data-state=checked]{background:var(--colors-positive)}.fyvr11on,.fyvr11oo:active{background:var(--colors-negative)}.fyvr11op:disabled,.fyvr11op[data-disabled]{background:var(--colors-negative)}.fyvr11oq:focus{background:var(--colors-negative)}.fyvr11or:hover:not([disabled]){background:var(--colors-negative)}.fyvr11os[data-state=checked]{background:var(--colors-negative)}.fyvr11ot,.fyvr11ou:active{background:var(--colors-info)}.fyvr11ov:disabled,.fyvr11ov[data-disabled]{background:var(--colors-info)}.fyvr11ow:focus{background:var(--colors-info)}.fyvr11ox:hover:not([disabled]){background:var(--colors-info)}.fyvr11oy[data-state=checked]{background:var(--colors-info)}.fyvr11oz,.fyvr11p0:active{background:var(--colors-warning)}.fyvr11p1:disabled,.fyvr11p1[data-disabled]{background:var(--colors-warning)}.fyvr11p2:focus{background:var(--colors-warning)}.fyvr11p3:hover:not([disabled]){background:var(--colors-warning)}.fyvr11p4[data-state=checked]{background:var(--colors-warning)}.fyvr11p5,.fyvr11p6:active{background:var(--colors-gradient-backdrop)}.fyvr11p7:disabled,.fyvr11p7[data-disabled]{background:var(--colors-gradient-backdrop)}.fyvr11p8:focus{background:var(--colors-gradient-backdrop)}.fyvr11p9:hover:not([disabled]){background:var(--colors-gradient-backdrop)}.fyvr11pa[data-state=checked]{background:var(--colors-gradient-backdrop)}.fyvr11pb,.fyvr11pc:active{background:var(--colors-gradient-primary)}.fyvr11pd:disabled,.fyvr11pd[data-disabled]{background:var(--colors-gradient-primary)}.fyvr11pe:focus{background:var(--colors-gradient-primary)}.fyvr11pf:hover:not([disabled]){background:var(--colors-gradient-primary)}.fyvr11pg[data-state=checked]{background:var(--colors-gradient-primary)}.fyvr11ph,.fyvr11pi:active{background:var(--colors-gradient-secondary)}.fyvr11pj:disabled,.fyvr11pj[data-disabled]{background:var(--colors-gradient-secondary)}.fyvr11pk:focus{background:var(--colors-gradient-secondary)}.fyvr11pl:hover:not([disabled]){background:var(--colors-gradient-secondary)}.fyvr11pm[data-state=checked]{background:var(--colors-gradient-secondary)}.fyvr11pn,.fyvr11po:active{background:var(--colors-arbitrum-dark)}.fyvr11pp:disabled,.fyvr11pp[data-disabled]{background:var(--colors-arbitrum-dark)}.fyvr11pq:focus{background:var(--colors-arbitrum-dark)}.fyvr11pr:hover:not([disabled]){background:var(--colors-arbitrum-dark)}.fyvr11ps[data-state=checked]{background:var(--colors-arbitrum-dark)}.fyvr11pt,.fyvr11pu:active{background:var(--colors-arbitrum-light)}.fyvr11pv:disabled,.fyvr11pv[data-disabled]{background:var(--colors-arbitrum-light)}.fyvr11pw:focus{background:var(--colors-arbitrum-light)}.fyvr11px:hover:not([disabled]){background:var(--colors-arbitrum-light)}.fyvr11py[data-state=checked]{background:var(--colors-arbitrum-light)}.fyvr11pz,.fyvr11q0:active{background:var(--colors-avalance-dark)}.fyvr11q1:disabled,.fyvr11q1[data-disabled]{background:var(--colors-avalance-dark)}.fyvr11q2:focus{background:var(--colors-avalance-dark)}.fyvr11q3:hover:not([disabled]){background:var(--colors-avalance-dark)}.fyvr11q4[data-state=checked]{background:var(--colors-avalance-dark)}.fyvr11q5,.fyvr11q6:active{background:var(--colors-avalance-light)}.fyvr11q7:disabled,.fyvr11q7[data-disabled]{background:var(--colors-avalance-light)}.fyvr11q8:focus{background:var(--colors-avalance-light)}.fyvr11q9:hover:not([disabled]){background:var(--colors-avalance-light)}.fyvr11qa[data-state=checked]{background:var(--colors-avalance-light)}.fyvr11qb,.fyvr11qc:active{background:var(--colors-bsc-dark)}.fyvr11qd:disabled,.fyvr11qd[data-disabled]{background:var(--colors-bsc-dark)}.fyvr11qe:focus{background:var(--colors-bsc-dark)}.fyvr11qf:hover:not([disabled]){background:var(--colors-bsc-dark)}.fyvr11qg[data-state=checked]{background:var(--colors-bsc-dark)}.fyvr11qh,.fyvr11qi:active{background:var(--colors-bsc-light)}.fyvr11qj:disabled,.fyvr11qj[data-disabled]{background:var(--colors-bsc-light)}.fyvr11qk:focus{background:var(--colors-bsc-light)}.fyvr11ql:hover:not([disabled]){background:var(--colors-bsc-light)}.fyvr11qm[data-state=checked]{background:var(--colors-bsc-light)}.fyvr11qn,.fyvr11qo:active{background:var(--colors-ethereum-dark)}.fyvr11qp:disabled,.fyvr11qp[data-disabled]{background:var(--colors-ethereum-dark)}.fyvr11qq:focus{background:var(--colors-ethereum-dark)}.fyvr11qr:hover:not([disabled]){background:var(--colors-ethereum-dark)}.fyvr11qs[data-state=checked]{background:var(--colors-ethereum-dark)}.fyvr11qt,.fyvr11qu:active{background:var(--colors-ethereum-light)}.fyvr11qv:disabled,.fyvr11qv[data-disabled]{background:var(--colors-ethereum-light)}.fyvr11qw:focus{background:var(--colors-ethereum-light)}.fyvr11qx:hover:not([disabled]){background:var(--colors-ethereum-light)}.fyvr11qy[data-state=checked]{background:var(--colors-ethereum-light)}.fyvr11qz,.fyvr11r0:active{background:var(--colors-gnosis-dark)}.fyvr11r1:disabled,.fyvr11r1[data-disabled]{background:var(--colors-gnosis-dark)}.fyvr11r2:focus{background:var(--colors-gnosis-dark)}.fyvr11r3:hover:not([disabled]){background:var(--colors-gnosis-dark)}.fyvr11r4[data-state=checked]{background:var(--colors-gnosis-dark)}.fyvr11r5,.fyvr11r6:active{background:var(--colors-gnosis-light)}.fyvr11r7:disabled,.fyvr11r7[data-disabled]{background:var(--colors-gnosis-light)}.fyvr11r8:focus{background:var(--colors-gnosis-light)}.fyvr11r9:hover:not([disabled]){background:var(--colors-gnosis-light)}.fyvr11ra[data-state=checked]{background:var(--colors-gnosis-light)}.fyvr11rb,.fyvr11rc:active{background:var(--colors-polygon-dark)}.fyvr11rd:disabled,.fyvr11rd[data-disabled]{background:var(--colors-polygon-dark)}.fyvr11re:focus{background:var(--colors-polygon-dark)}.fyvr11rf:hover:not([disabled]){background:var(--colors-polygon-dark)}.fyvr11rg[data-state=checked]{background:var(--colors-polygon-dark)}.fyvr11rh,.fyvr11ri:active{background:var(--colors-polygon-light)}.fyvr11rj:disabled,.fyvr11rj[data-disabled]{background:var(--colors-polygon-light)}.fyvr11rk:focus{background:var(--colors-polygon-light)}.fyvr11rl:hover:not([disabled]){background:var(--colors-polygon-light)}.fyvr11rm[data-state=checked]{background:var(--colors-polygon-light)}.fyvr11rn,.fyvr11ro:active{background:var(--colors-text100)}.fyvr11rp:disabled,.fyvr11rp[data-disabled]{background:var(--colors-text100)}.fyvr11rq:focus{background:var(--colors-text100)}.fyvr11rr:hover:not([disabled]){background:var(--colors-text100)}.fyvr11rs[data-state=checked]{background:var(--colors-text100)}.fyvr11rt,.fyvr11ru:active{background:var(--colors-text80)}.fyvr11rv:disabled,.fyvr11rv[data-disabled]{background:var(--colors-text80)}.fyvr11rw:focus{background:var(--colors-text80)}.fyvr11rx:hover:not([disabled]){background:var(--colors-text80)}.fyvr11ry[data-state=checked]{background:var(--colors-text80)}.fyvr11rz,.fyvr11s0:active{background:var(--colors-text50)}.fyvr11s1:disabled,.fyvr11s1[data-disabled]{background:var(--colors-text50)}.fyvr11s2:focus{background:var(--colors-text50)}.fyvr11s3:hover:not([disabled]){background:var(--colors-text50)}.fyvr11s4[data-state=checked]{background:var(--colors-text50)}.fyvr11s5,.fyvr11s6:active{background:var(--colors-text-inverse100)}.fyvr11s7:disabled,.fyvr11s7[data-disabled]{background:var(--colors-text-inverse100)}.fyvr11s8:focus{background:var(--colors-text-inverse100)}.fyvr11s9:hover:not([disabled]){background:var(--colors-text-inverse100)}.fyvr11sa[data-state=checked]{background:var(--colors-text-inverse100)}.fyvr11sb,.fyvr11sc:active{background:var(--colors-background-primary)}.fyvr11sd:disabled,.fyvr11sd[data-disabled]{background:var(--colors-background-primary)}.fyvr11se:focus{background:var(--colors-background-primary)}.fyvr11sf:hover:not([disabled]){background:var(--colors-background-primary)}.fyvr11sg[data-state=checked]{background:var(--colors-background-primary)}.fyvr11sh,.fyvr11si:active{background:var(--colors-background-secondary)}.fyvr11sj:disabled,.fyvr11sj[data-disabled]{background:var(--colors-background-secondary)}.fyvr11sk:focus{background:var(--colors-background-secondary)}.fyvr11sl:hover:not([disabled]){background:var(--colors-background-secondary)}.fyvr11sm[data-state=checked]{background:var(--colors-background-secondary)}.fyvr11sn,.fyvr11so:active{background:var(--colors-background-contrast)}.fyvr11sp:disabled,.fyvr11sp[data-disabled]{background:var(--colors-background-contrast)}.fyvr11sq:focus{background:var(--colors-background-contrast)}.fyvr11sr:hover:not([disabled]){background:var(--colors-background-contrast)}.fyvr11ss[data-state=checked]{background:var(--colors-background-contrast)}.fyvr11st,.fyvr11su:active{background:var(--colors-background-muted)}.fyvr11sv:disabled,.fyvr11sv[data-disabled]{background:var(--colors-background-muted)}.fyvr11sw:focus{background:var(--colors-background-muted)}.fyvr11sx:hover:not([disabled]){background:var(--colors-background-muted)}.fyvr11sy[data-state=checked]{background:var(--colors-background-muted)}.fyvr11sz,.fyvr11t0:active{background:var(--colors-background-control)}.fyvr11t1:disabled,.fyvr11t1[data-disabled]{background:var(--colors-background-control)}.fyvr11t2:focus{background:var(--colors-background-control)}.fyvr11t3:hover:not([disabled]){background:var(--colors-background-control)}.fyvr11t4[data-state=checked]{background:var(--colors-background-control)}.fyvr11t5,.fyvr11t6:active{background:var(--colors-background-inverse)}.fyvr11t7:disabled,.fyvr11t7[data-disabled]{background:var(--colors-background-inverse)}.fyvr11t8:focus{background:var(--colors-background-inverse)}.fyvr11t9:hover:not([disabled]){background:var(--colors-background-inverse)}.fyvr11ta[data-state=checked]{background:var(--colors-background-inverse)}.fyvr11tb,.fyvr11tc:active{background:var(--colors-background-backdrop)}.fyvr11td:disabled,.fyvr11td[data-disabled]{background:var(--colors-background-backdrop)}.fyvr11te:focus{background:var(--colors-background-backdrop)}.fyvr11tf:hover:not([disabled]){background:var(--colors-background-backdrop)}.fyvr11tg[data-state=checked]{background:var(--colors-background-backdrop)}.fyvr11th,.fyvr11ti:active{background:var(--colors-background-overlay)}.fyvr11tj:disabled,.fyvr11tj[data-disabled]{background:var(--colors-background-overlay)}.fyvr11tk:focus{background:var(--colors-background-overlay)}.fyvr11tl:hover:not([disabled]){background:var(--colors-background-overlay)}.fyvr11tm[data-state=checked]{background:var(--colors-background-overlay)}.fyvr11tn,.fyvr11to:active{background:var(--colors-background-raised)}.fyvr11tp:disabled,.fyvr11tp[data-disabled]{background:var(--colors-background-raised)}.fyvr11tq:focus{background:var(--colors-background-raised)}.fyvr11tr:hover:not([disabled]){background:var(--colors-background-raised)}.fyvr11ts[data-state=checked]{background:var(--colors-background-raised)}.fyvr11tt,.fyvr11tu:active{background:var(--colors-button-glass)}.fyvr11tv:disabled,.fyvr11tv[data-disabled]{background:var(--colors-button-glass)}.fyvr11tw:focus{background:var(--colors-button-glass)}.fyvr11tx:hover:not([disabled]){background:var(--colors-button-glass)}.fyvr11ty[data-state=checked]{background:var(--colors-button-glass)}.fyvr11tz,.fyvr11u0:active{background:var(--colors-button-emphasis)}.fyvr11u1:disabled,.fyvr11u1[data-disabled]{background:var(--colors-button-emphasis)}.fyvr11u2:focus{background:var(--colors-button-emphasis)}.fyvr11u3:hover:not([disabled]){background:var(--colors-button-emphasis)}.fyvr11u4[data-state=checked]{background:var(--colors-button-emphasis)}.fyvr11u5,.fyvr11u6:active{background:var(--colors-button-inverse)}.fyvr11u7:disabled,.fyvr11u7[data-disabled]{background:var(--colors-button-inverse)}.fyvr11u8:focus{background:var(--colors-button-inverse)}.fyvr11u9:hover:not([disabled]){background:var(--colors-button-inverse)}.fyvr11ua[data-state=checked]{background:var(--colors-button-inverse)}.fyvr11ub,.fyvr11uc:active{background:var(--colors-border-normal)}.fyvr11ud:disabled,.fyvr11ud[data-disabled]{background:var(--colors-border-normal)}.fyvr11ue:focus{background:var(--colors-border-normal)}.fyvr11uf:hover:not([disabled]){background:var(--colors-border-normal)}.fyvr11ug[data-state=checked]{background:var(--colors-border-normal)}.fyvr11uh,.fyvr11ui:active{background:var(--colors-border-focus)}.fyvr11uj:disabled,.fyvr11uj[data-disabled]{background:var(--colors-border-focus)}.fyvr11uk:focus{background:var(--colors-border-focus)}.fyvr11ul:hover:not([disabled]){background:var(--colors-border-focus)}.fyvr11um[data-state=checked]{background:var(--colors-border-focus)}.fyvr11un,.fyvr11uo:active{border-bottom-color:var(--colors-black)}.fyvr11up:disabled,.fyvr11up[data-disabled]{border-bottom-color:var(--colors-black)}.fyvr11uq:focus{border-bottom-color:var(--colors-black)}.fyvr11ur:hover:not([disabled]){border-bottom-color:var(--colors-black)}.fyvr11us[data-state=checked]{border-bottom-color:var(--colors-black)}.fyvr11ut,.fyvr11uu:active{border-bottom-color:var(--colors-white)}.fyvr11uv:disabled,.fyvr11uv[data-disabled]{border-bottom-color:var(--colors-white)}.fyvr11uw:focus{border-bottom-color:var(--colors-white)}.fyvr11ux:hover:not([disabled]){border-bottom-color:var(--colors-white)}.fyvr11uy[data-state=checked]{border-bottom-color:var(--colors-white)}.fyvr11uz,.fyvr11v0:active{border-bottom-color:var(--colors-inherit)}.fyvr11v1:disabled,.fyvr11v1[data-disabled]{border-bottom-color:var(--colors-inherit)}.fyvr11v2:focus{border-bottom-color:var(--colors-inherit)}.fyvr11v3:hover:not([disabled]){border-bottom-color:var(--colors-inherit)}.fyvr11v4[data-state=checked]{border-bottom-color:var(--colors-inherit)}.fyvr11v5,.fyvr11v6:active{border-bottom-color:var(--colors-transparent)}.fyvr11v7:disabled,.fyvr11v7[data-disabled]{border-bottom-color:var(--colors-transparent)}.fyvr11v8:focus{border-bottom-color:var(--colors-transparent)}.fyvr11v9:hover:not([disabled]){border-bottom-color:var(--colors-transparent)}.fyvr11va[data-state=checked]{border-bottom-color:var(--colors-transparent)}.fyvr11vb,.fyvr11vc:active{border-bottom-color:var(--colors-positive)}.fyvr11vd:disabled,.fyvr11vd[data-disabled]{border-bottom-color:var(--colors-positive)}.fyvr11ve:focus{border-bottom-color:var(--colors-positive)}.fyvr11vf:hover:not([disabled]){border-bottom-color:var(--colors-positive)}.fyvr11vg[data-state=checked]{border-bottom-color:var(--colors-positive)}.fyvr11vh,.fyvr11vi:active{border-bottom-color:var(--colors-negative)}.fyvr11vj:disabled,.fyvr11vj[data-disabled]{border-bottom-color:var(--colors-negative)}.fyvr11vk:focus{border-bottom-color:var(--colors-negative)}.fyvr11vl:hover:not([disabled]){border-bottom-color:var(--colors-negative)}.fyvr11vm[data-state=checked]{border-bottom-color:var(--colors-negative)}.fyvr11vn,.fyvr11vo:active{border-bottom-color:var(--colors-info)}.fyvr11vp:disabled,.fyvr11vp[data-disabled]{border-bottom-color:var(--colors-info)}.fyvr11vq:focus{border-bottom-color:var(--colors-info)}.fyvr11vr:hover:not([disabled]){border-bottom-color:var(--colors-info)}.fyvr11vs[data-state=checked]{border-bottom-color:var(--colors-info)}.fyvr11vt,.fyvr11vu:active{border-bottom-color:var(--colors-warning)}.fyvr11vv:disabled,.fyvr11vv[data-disabled]{border-bottom-color:var(--colors-warning)}.fyvr11vw:focus{border-bottom-color:var(--colors-warning)}.fyvr11vx:hover:not([disabled]){border-bottom-color:var(--colors-warning)}.fyvr11vy[data-state=checked]{border-bottom-color:var(--colors-warning)}.fyvr11vz,.fyvr11w0:active{border-bottom-color:var(--colors-gradient-backdrop)}.fyvr11w1:disabled,.fyvr11w1[data-disabled]{border-bottom-color:var(--colors-gradient-backdrop)}.fyvr11w2:focus{border-bottom-color:var(--colors-gradient-backdrop)}.fyvr11w3:hover:not([disabled]){border-bottom-color:var(--colors-gradient-backdrop)}.fyvr11w4[data-state=checked]{border-bottom-color:var(--colors-gradient-backdrop)}.fyvr11w5,.fyvr11w6:active{border-bottom-color:var(--colors-gradient-primary)}.fyvr11w7:disabled,.fyvr11w7[data-disabled]{border-bottom-color:var(--colors-gradient-primary)}.fyvr11w8:focus{border-bottom-color:var(--colors-gradient-primary)}.fyvr11w9:hover:not([disabled]){border-bottom-color:var(--colors-gradient-primary)}.fyvr11wa[data-state=checked]{border-bottom-color:var(--colors-gradient-primary)}.fyvr11wb,.fyvr11wc:active{border-bottom-color:var(--colors-gradient-secondary)}.fyvr11wd:disabled,.fyvr11wd[data-disabled]{border-bottom-color:var(--colors-gradient-secondary)}.fyvr11we:focus{border-bottom-color:var(--colors-gradient-secondary)}.fyvr11wf:hover:not([disabled]){border-bottom-color:var(--colors-gradient-secondary)}.fyvr11wg[data-state=checked]{border-bottom-color:var(--colors-gradient-secondary)}.fyvr11wh,.fyvr11wi:active{border-bottom-color:var(--colors-arbitrum-dark)}.fyvr11wj:disabled,.fyvr11wj[data-disabled]{border-bottom-color:var(--colors-arbitrum-dark)}.fyvr11wk:focus{border-bottom-color:var(--colors-arbitrum-dark)}.fyvr11wl:hover:not([disabled]){border-bottom-color:var(--colors-arbitrum-dark)}.fyvr11wm[data-state=checked]{border-bottom-color:var(--colors-arbitrum-dark)}.fyvr11wn,.fyvr11wo:active{border-bottom-color:var(--colors-arbitrum-light)}.fyvr11wp:disabled,.fyvr11wp[data-disabled]{border-bottom-color:var(--colors-arbitrum-light)}.fyvr11wq:focus{border-bottom-color:var(--colors-arbitrum-light)}.fyvr11wr:hover:not([disabled]){border-bottom-color:var(--colors-arbitrum-light)}.fyvr11ws[data-state=checked]{border-bottom-color:var(--colors-arbitrum-light)}.fyvr11wt,.fyvr11wu:active{border-bottom-color:var(--colors-avalance-dark)}.fyvr11wv:disabled,.fyvr11wv[data-disabled]{border-bottom-color:var(--colors-avalance-dark)}.fyvr11ww:focus{border-bottom-color:var(--colors-avalance-dark)}.fyvr11wx:hover:not([disabled]){border-bottom-color:var(--colors-avalance-dark)}.fyvr11wy[data-state=checked]{border-bottom-color:var(--colors-avalance-dark)}.fyvr11wz,.fyvr11x0:active{border-bottom-color:var(--colors-avalance-light)}.fyvr11x1:disabled,.fyvr11x1[data-disabled]{border-bottom-color:var(--colors-avalance-light)}.fyvr11x2:focus{border-bottom-color:var(--colors-avalance-light)}.fyvr11x3:hover:not([disabled]){border-bottom-color:var(--colors-avalance-light)}.fyvr11x4[data-state=checked]{border-bottom-color:var(--colors-avalance-light)}.fyvr11x5,.fyvr11x6:active{border-bottom-color:var(--colors-bsc-dark)}.fyvr11x7:disabled,.fyvr11x7[data-disabled]{border-bottom-color:var(--colors-bsc-dark)}.fyvr11x8:focus{border-bottom-color:var(--colors-bsc-dark)}.fyvr11x9:hover:not([disabled]){border-bottom-color:var(--colors-bsc-dark)}.fyvr11xa[data-state=checked]{border-bottom-color:var(--colors-bsc-dark)}.fyvr11xb,.fyvr11xc:active{border-bottom-color:var(--colors-bsc-light)}.fyvr11xd:disabled,.fyvr11xd[data-disabled]{border-bottom-color:var(--colors-bsc-light)}.fyvr11xe:focus{border-bottom-color:var(--colors-bsc-light)}.fyvr11xf:hover:not([disabled]){border-bottom-color:var(--colors-bsc-light)}.fyvr11xg[data-state=checked]{border-bottom-color:var(--colors-bsc-light)}.fyvr11xh,.fyvr11xi:active{border-bottom-color:var(--colors-ethereum-dark)}.fyvr11xj:disabled,.fyvr11xj[data-disabled]{border-bottom-color:var(--colors-ethereum-dark)}.fyvr11xk:focus{border-bottom-color:var(--colors-ethereum-dark)}.fyvr11xl:hover:not([disabled]){border-bottom-color:var(--colors-ethereum-dark)}.fyvr11xm[data-state=checked]{border-bottom-color:var(--colors-ethereum-dark)}.fyvr11xn,.fyvr11xo:active{border-bottom-color:var(--colors-ethereum-light)}.fyvr11xp:disabled,.fyvr11xp[data-disabled]{border-bottom-color:var(--colors-ethereum-light)}.fyvr11xq:focus{border-bottom-color:var(--colors-ethereum-light)}.fyvr11xr:hover:not([disabled]){border-bottom-color:var(--colors-ethereum-light)}.fyvr11xs[data-state=checked]{border-bottom-color:var(--colors-ethereum-light)}.fyvr11xt,.fyvr11xu:active{border-bottom-color:var(--colors-gnosis-dark)}.fyvr11xv:disabled,.fyvr11xv[data-disabled]{border-bottom-color:var(--colors-gnosis-dark)}.fyvr11xw:focus{border-bottom-color:var(--colors-gnosis-dark)}.fyvr11xx:hover:not([disabled]){border-bottom-color:var(--colors-gnosis-dark)}.fyvr11xy[data-state=checked]{border-bottom-color:var(--colors-gnosis-dark)}.fyvr11xz,.fyvr11y0:active{border-bottom-color:var(--colors-gnosis-light)}.fyvr11y1:disabled,.fyvr11y1[data-disabled]{border-bottom-color:var(--colors-gnosis-light)}.fyvr11y2:focus{border-bottom-color:var(--colors-gnosis-light)}.fyvr11y3:hover:not([disabled]){border-bottom-color:var(--colors-gnosis-light)}.fyvr11y4[data-state=checked]{border-bottom-color:var(--colors-gnosis-light)}.fyvr11y5,.fyvr11y6:active{border-bottom-color:var(--colors-polygon-dark)}.fyvr11y7:disabled,.fyvr11y7[data-disabled]{border-bottom-color:var(--colors-polygon-dark)}.fyvr11y8:focus{border-bottom-color:var(--colors-polygon-dark)}.fyvr11y9:hover:not([disabled]){border-bottom-color:var(--colors-polygon-dark)}.fyvr11ya[data-state=checked]{border-bottom-color:var(--colors-polygon-dark)}.fyvr11yb,.fyvr11yc:active{border-bottom-color:var(--colors-polygon-light)}.fyvr11yd:disabled,.fyvr11yd[data-disabled]{border-bottom-color:var(--colors-polygon-light)}.fyvr11ye:focus{border-bottom-color:var(--colors-polygon-light)}.fyvr11yf:hover:not([disabled]){border-bottom-color:var(--colors-polygon-light)}.fyvr11yg[data-state=checked]{border-bottom-color:var(--colors-polygon-light)}.fyvr11yh,.fyvr11yi:active{border-bottom-color:var(--colors-text100)}.fyvr11yj:disabled,.fyvr11yj[data-disabled]{border-bottom-color:var(--colors-text100)}.fyvr11yk:focus{border-bottom-color:var(--colors-text100)}.fyvr11yl:hover:not([disabled]){border-bottom-color:var(--colors-text100)}.fyvr11ym[data-state=checked]{border-bottom-color:var(--colors-text100)}.fyvr11yn,.fyvr11yo:active{border-bottom-color:var(--colors-text80)}.fyvr11yp:disabled,.fyvr11yp[data-disabled]{border-bottom-color:var(--colors-text80)}.fyvr11yq:focus{border-bottom-color:var(--colors-text80)}.fyvr11yr:hover:not([disabled]){border-bottom-color:var(--colors-text80)}.fyvr11ys[data-state=checked]{border-bottom-color:var(--colors-text80)}.fyvr11yt,.fyvr11yu:active{border-bottom-color:var(--colors-text50)}.fyvr11yv:disabled,.fyvr11yv[data-disabled]{border-bottom-color:var(--colors-text50)}.fyvr11yw:focus{border-bottom-color:var(--colors-text50)}.fyvr11yx:hover:not([disabled]){border-bottom-color:var(--colors-text50)}.fyvr11yy[data-state=checked]{border-bottom-color:var(--colors-text50)}.fyvr11yz,.fyvr11z0:active{border-bottom-color:var(--colors-text-inverse100)}.fyvr11z1:disabled,.fyvr11z1[data-disabled]{border-bottom-color:var(--colors-text-inverse100)}.fyvr11z2:focus{border-bottom-color:var(--colors-text-inverse100)}.fyvr11z3:hover:not([disabled]){border-bottom-color:var(--colors-text-inverse100)}.fyvr11z4[data-state=checked]{border-bottom-color:var(--colors-text-inverse100)}.fyvr11z5,.fyvr11z6:active{border-bottom-color:var(--colors-background-primary)}.fyvr11z7:disabled,.fyvr11z7[data-disabled]{border-bottom-color:var(--colors-background-primary)}.fyvr11z8:focus{border-bottom-color:var(--colors-background-primary)}.fyvr11z9:hover:not([disabled]){border-bottom-color:var(--colors-background-primary)}.fyvr11za[data-state=checked]{border-bottom-color:var(--colors-background-primary)}.fyvr11zb,.fyvr11zc:active{border-bottom-color:var(--colors-background-secondary)}.fyvr11zd:disabled,.fyvr11zd[data-disabled]{border-bottom-color:var(--colors-background-secondary)}.fyvr11ze:focus{border-bottom-color:var(--colors-background-secondary)}.fyvr11zf:hover:not([disabled]){border-bottom-color:var(--colors-background-secondary)}.fyvr11zg[data-state=checked]{border-bottom-color:var(--colors-background-secondary)}.fyvr11zh,.fyvr11zi:active{border-bottom-color:var(--colors-background-contrast)}.fyvr11zj:disabled,.fyvr11zj[data-disabled]{border-bottom-color:var(--colors-background-contrast)}.fyvr11zk:focus{border-bottom-color:var(--colors-background-contrast)}.fyvr11zl:hover:not([disabled]){border-bottom-color:var(--colors-background-contrast)}.fyvr11zm[data-state=checked]{border-bottom-color:var(--colors-background-contrast)}.fyvr11zn,.fyvr11zo:active{border-bottom-color:var(--colors-background-muted)}.fyvr11zp:disabled,.fyvr11zp[data-disabled]{border-bottom-color:var(--colors-background-muted)}.fyvr11zq:focus{border-bottom-color:var(--colors-background-muted)}.fyvr11zr:hover:not([disabled]){border-bottom-color:var(--colors-background-muted)}.fyvr11zs[data-state=checked]{border-bottom-color:var(--colors-background-muted)}.fyvr11zt,.fyvr11zu:active{border-bottom-color:var(--colors-background-control)}.fyvr11zv:disabled,.fyvr11zv[data-disabled]{border-bottom-color:var(--colors-background-control)}.fyvr11zw:focus{border-bottom-color:var(--colors-background-control)}.fyvr11zx:hover:not([disabled]){border-bottom-color:var(--colors-background-control)}.fyvr11zy[data-state=checked]{border-bottom-color:var(--colors-background-control)}.fyvr11zz,.fyvr1200:active{border-bottom-color:var(--colors-background-inverse)}.fyvr1201:disabled,.fyvr1201[data-disabled]{border-bottom-color:var(--colors-background-inverse)}.fyvr1202:focus{border-bottom-color:var(--colors-background-inverse)}.fyvr1203:hover:not([disabled]){border-bottom-color:var(--colors-background-inverse)}.fyvr1204[data-state=checked]{border-bottom-color:var(--colors-background-inverse)}.fyvr1205,.fyvr1206:active{border-bottom-color:var(--colors-background-backdrop)}.fyvr1207:disabled,.fyvr1207[data-disabled]{border-bottom-color:var(--colors-background-backdrop)}.fyvr1208:focus{border-bottom-color:var(--colors-background-backdrop)}.fyvr1209:hover:not([disabled]){border-bottom-color:var(--colors-background-backdrop)}.fyvr120a[data-state=checked]{border-bottom-color:var(--colors-background-backdrop)}.fyvr120b,.fyvr120c:active{border-bottom-color:var(--colors-background-overlay)}.fyvr120d:disabled,.fyvr120d[data-disabled]{border-bottom-color:var(--colors-background-overlay)}.fyvr120e:focus{border-bottom-color:var(--colors-background-overlay)}.fyvr120f:hover:not([disabled]){border-bottom-color:var(--colors-background-overlay)}.fyvr120g[data-state=checked]{border-bottom-color:var(--colors-background-overlay)}.fyvr120h,.fyvr120i:active{border-bottom-color:var(--colors-background-raised)}.fyvr120j:disabled,.fyvr120j[data-disabled]{border-bottom-color:var(--colors-background-raised)}.fyvr120k:focus{border-bottom-color:var(--colors-background-raised)}.fyvr120l:hover:not([disabled]){border-bottom-color:var(--colors-background-raised)}.fyvr120m[data-state=checked]{border-bottom-color:var(--colors-background-raised)}.fyvr120n,.fyvr120o:active{border-bottom-color:var(--colors-button-glass)}.fyvr120p:disabled,.fyvr120p[data-disabled]{border-bottom-color:var(--colors-button-glass)}.fyvr120q:focus{border-bottom-color:var(--colors-button-glass)}.fyvr120r:hover:not([disabled]){border-bottom-color:var(--colors-button-glass)}.fyvr120s[data-state=checked]{border-bottom-color:var(--colors-button-glass)}.fyvr120t,.fyvr120u:active{border-bottom-color:var(--colors-button-emphasis)}.fyvr120v:disabled,.fyvr120v[data-disabled]{border-bottom-color:var(--colors-button-emphasis)}.fyvr120w:focus{border-bottom-color:var(--colors-button-emphasis)}.fyvr120x:hover:not([disabled]){border-bottom-color:var(--colors-button-emphasis)}.fyvr120y[data-state=checked]{border-bottom-color:var(--colors-button-emphasis)}.fyvr120z,.fyvr1210:active{border-bottom-color:var(--colors-button-inverse)}.fyvr1211:disabled,.fyvr1211[data-disabled]{border-bottom-color:var(--colors-button-inverse)}.fyvr1212:focus{border-bottom-color:var(--colors-button-inverse)}.fyvr1213:hover:not([disabled]){border-bottom-color:var(--colors-button-inverse)}.fyvr1214[data-state=checked]{border-bottom-color:var(--colors-button-inverse)}.fyvr1215,.fyvr1216:active{border-bottom-color:var(--colors-border-normal)}.fyvr1217:disabled,.fyvr1217[data-disabled]{border-bottom-color:var(--colors-border-normal)}.fyvr1218:focus{border-bottom-color:var(--colors-border-normal)}.fyvr1219:hover:not([disabled]){border-bottom-color:var(--colors-border-normal)}.fyvr121a[data-state=checked]{border-bottom-color:var(--colors-border-normal)}.fyvr121b,.fyvr121c:active{border-bottom-color:var(--colors-border-focus)}.fyvr121d:disabled,.fyvr121d[data-disabled]{border-bottom-color:var(--colors-border-focus)}.fyvr121e:focus{border-bottom-color:var(--colors-border-focus)}.fyvr121f:hover:not([disabled]){border-bottom-color:var(--colors-border-focus)}.fyvr121g[data-state=checked]{border-bottom-color:var(--colors-border-focus)}.fyvr121h,.fyvr121i:active{border-bottom-style:solid}.fyvr121j:disabled,.fyvr121j[data-disabled]{border-bottom-style:solid}.fyvr121k:focus{border-bottom-style:solid}.fyvr121l:hover:not([disabled]){border-bottom-style:solid}.fyvr121m[data-state=checked]{border-bottom-style:solid}.fyvr121n,.fyvr121o:active{border-bottom-style:dashed}.fyvr121p:disabled,.fyvr121p[data-disabled]{border-bottom-style:dashed}.fyvr121q:focus{border-bottom-style:dashed}.fyvr121r:hover:not([disabled]){border-bottom-style:dashed}.fyvr121s[data-state=checked]{border-bottom-style:dashed}.fyvr121t,.fyvr121u:active{border-bottom-style:dotted}.fyvr121v:disabled,.fyvr121v[data-disabled]{border-bottom-style:dotted}.fyvr121w:focus{border-bottom-style:dotted}.fyvr121x:hover:not([disabled]){border-bottom-style:dotted}.fyvr121y[data-state=checked]{border-bottom-style:dotted}.fyvr121z,.fyvr1220:active{border-left-color:var(--colors-black)}.fyvr1221:disabled,.fyvr1221[data-disabled]{border-left-color:var(--colors-black)}.fyvr1222:focus{border-left-color:var(--colors-black)}.fyvr1223:hover:not([disabled]){border-left-color:var(--colors-black)}.fyvr1224[data-state=checked]{border-left-color:var(--colors-black)}.fyvr1225,.fyvr1226:active{border-left-color:var(--colors-white)}.fyvr1227:disabled,.fyvr1227[data-disabled]{border-left-color:var(--colors-white)}.fyvr1228:focus{border-left-color:var(--colors-white)}.fyvr1229:hover:not([disabled]){border-left-color:var(--colors-white)}.fyvr122a[data-state=checked]{border-left-color:var(--colors-white)}.fyvr122b,.fyvr122c:active{border-left-color:var(--colors-inherit)}.fyvr122d:disabled,.fyvr122d[data-disabled]{border-left-color:var(--colors-inherit)}.fyvr122e:focus{border-left-color:var(--colors-inherit)}.fyvr122f:hover:not([disabled]){border-left-color:var(--colors-inherit)}.fyvr122g[data-state=checked]{border-left-color:var(--colors-inherit)}.fyvr122h,.fyvr122i:active{border-left-color:var(--colors-transparent)}.fyvr122j:disabled,.fyvr122j[data-disabled]{border-left-color:var(--colors-transparent)}.fyvr122k:focus{border-left-color:var(--colors-transparent)}.fyvr122l:hover:not([disabled]){border-left-color:var(--colors-transparent)}.fyvr122m[data-state=checked]{border-left-color:var(--colors-transparent)}.fyvr122n,.fyvr122o:active{border-left-color:var(--colors-positive)}.fyvr122p:disabled,.fyvr122p[data-disabled]{border-left-color:var(--colors-positive)}.fyvr122q:focus{border-left-color:var(--colors-positive)}.fyvr122r:hover:not([disabled]){border-left-color:var(--colors-positive)}.fyvr122s[data-state=checked]{border-left-color:var(--colors-positive)}.fyvr122t,.fyvr122u:active{border-left-color:var(--colors-negative)}.fyvr122v:disabled,.fyvr122v[data-disabled]{border-left-color:var(--colors-negative)}.fyvr122w:focus{border-left-color:var(--colors-negative)}.fyvr122x:hover:not([disabled]){border-left-color:var(--colors-negative)}.fyvr122y[data-state=checked]{border-left-color:var(--colors-negative)}.fyvr122z,.fyvr1230:active{border-left-color:var(--colors-info)}.fyvr1231:disabled,.fyvr1231[data-disabled]{border-left-color:var(--colors-info)}.fyvr1232:focus{border-left-color:var(--colors-info)}.fyvr1233:hover:not([disabled]){border-left-color:var(--colors-info)}.fyvr1234[data-state=checked]{border-left-color:var(--colors-info)}.fyvr1235,.fyvr1236:active{border-left-color:var(--colors-warning)}.fyvr1237:disabled,.fyvr1237[data-disabled]{border-left-color:var(--colors-warning)}.fyvr1238:focus{border-left-color:var(--colors-warning)}.fyvr1239:hover:not([disabled]){border-left-color:var(--colors-warning)}.fyvr123a[data-state=checked]{border-left-color:var(--colors-warning)}.fyvr123b,.fyvr123c:active{border-left-color:var(--colors-gradient-backdrop)}.fyvr123d:disabled,.fyvr123d[data-disabled]{border-left-color:var(--colors-gradient-backdrop)}.fyvr123e:focus{border-left-color:var(--colors-gradient-backdrop)}.fyvr123f:hover:not([disabled]){border-left-color:var(--colors-gradient-backdrop)}.fyvr123g[data-state=checked]{border-left-color:var(--colors-gradient-backdrop)}.fyvr123h,.fyvr123i:active{border-left-color:var(--colors-gradient-primary)}.fyvr123j:disabled,.fyvr123j[data-disabled]{border-left-color:var(--colors-gradient-primary)}.fyvr123k:focus{border-left-color:var(--colors-gradient-primary)}.fyvr123l:hover:not([disabled]){border-left-color:var(--colors-gradient-primary)}.fyvr123m[data-state=checked]{border-left-color:var(--colors-gradient-primary)}.fyvr123n,.fyvr123o:active{border-left-color:var(--colors-gradient-secondary)}.fyvr123p:disabled,.fyvr123p[data-disabled]{border-left-color:var(--colors-gradient-secondary)}.fyvr123q:focus{border-left-color:var(--colors-gradient-secondary)}.fyvr123r:hover:not([disabled]){border-left-color:var(--colors-gradient-secondary)}.fyvr123s[data-state=checked]{border-left-color:var(--colors-gradient-secondary)}.fyvr123t,.fyvr123u:active{border-left-color:var(--colors-arbitrum-dark)}.fyvr123v:disabled,.fyvr123v[data-disabled]{border-left-color:var(--colors-arbitrum-dark)}.fyvr123w:focus{border-left-color:var(--colors-arbitrum-dark)}.fyvr123x:hover:not([disabled]){border-left-color:var(--colors-arbitrum-dark)}.fyvr123y[data-state=checked]{border-left-color:var(--colors-arbitrum-dark)}.fyvr123z,.fyvr1240:active{border-left-color:var(--colors-arbitrum-light)}.fyvr1241:disabled,.fyvr1241[data-disabled]{border-left-color:var(--colors-arbitrum-light)}.fyvr1242:focus{border-left-color:var(--colors-arbitrum-light)}.fyvr1243:hover:not([disabled]){border-left-color:var(--colors-arbitrum-light)}.fyvr1244[data-state=checked]{border-left-color:var(--colors-arbitrum-light)}.fyvr1245,.fyvr1246:active{border-left-color:var(--colors-avalance-dark)}.fyvr1247:disabled,.fyvr1247[data-disabled]{border-left-color:var(--colors-avalance-dark)}.fyvr1248:focus{border-left-color:var(--colors-avalance-dark)}.fyvr1249:hover:not([disabled]){border-left-color:var(--colors-avalance-dark)}.fyvr124a[data-state=checked]{border-left-color:var(--colors-avalance-dark)}.fyvr124b,.fyvr124c:active{border-left-color:var(--colors-avalance-light)}.fyvr124d:disabled,.fyvr124d[data-disabled]{border-left-color:var(--colors-avalance-light)}.fyvr124e:focus{border-left-color:var(--colors-avalance-light)}.fyvr124f:hover:not([disabled]){border-left-color:var(--colors-avalance-light)}.fyvr124g[data-state=checked]{border-left-color:var(--colors-avalance-light)}.fyvr124h,.fyvr124i:active{border-left-color:var(--colors-bsc-dark)}.fyvr124j:disabled,.fyvr124j[data-disabled]{border-left-color:var(--colors-bsc-dark)}.fyvr124k:focus{border-left-color:var(--colors-bsc-dark)}.fyvr124l:hover:not([disabled]){border-left-color:var(--colors-bsc-dark)}.fyvr124m[data-state=checked]{border-left-color:var(--colors-bsc-dark)}.fyvr124n,.fyvr124o:active{border-left-color:var(--colors-bsc-light)}.fyvr124p:disabled,.fyvr124p[data-disabled]{border-left-color:var(--colors-bsc-light)}.fyvr124q:focus{border-left-color:var(--colors-bsc-light)}.fyvr124r:hover:not([disabled]){border-left-color:var(--colors-bsc-light)}.fyvr124s[data-state=checked]{border-left-color:var(--colors-bsc-light)}.fyvr124t,.fyvr124u:active{border-left-color:var(--colors-ethereum-dark)}.fyvr124v:disabled,.fyvr124v[data-disabled]{border-left-color:var(--colors-ethereum-dark)}.fyvr124w:focus{border-left-color:var(--colors-ethereum-dark)}.fyvr124x:hover:not([disabled]){border-left-color:var(--colors-ethereum-dark)}.fyvr124y[data-state=checked]{border-left-color:var(--colors-ethereum-dark)}.fyvr124z,.fyvr1250:active{border-left-color:var(--colors-ethereum-light)}.fyvr1251:disabled,.fyvr1251[data-disabled]{border-left-color:var(--colors-ethereum-light)}.fyvr1252:focus{border-left-color:var(--colors-ethereum-light)}.fyvr1253:hover:not([disabled]){border-left-color:var(--colors-ethereum-light)}.fyvr1254[data-state=checked]{border-left-color:var(--colors-ethereum-light)}.fyvr1255,.fyvr1256:active{border-left-color:var(--colors-gnosis-dark)}.fyvr1257:disabled,.fyvr1257[data-disabled]{border-left-color:var(--colors-gnosis-dark)}.fyvr1258:focus{border-left-color:var(--colors-gnosis-dark)}.fyvr1259:hover:not([disabled]){border-left-color:var(--colors-gnosis-dark)}.fyvr125a[data-state=checked]{border-left-color:var(--colors-gnosis-dark)}.fyvr125b,.fyvr125c:active{border-left-color:var(--colors-gnosis-light)}.fyvr125d:disabled,.fyvr125d[data-disabled]{border-left-color:var(--colors-gnosis-light)}.fyvr125e:focus{border-left-color:var(--colors-gnosis-light)}.fyvr125f:hover:not([disabled]){border-left-color:var(--colors-gnosis-light)}.fyvr125g[data-state=checked]{border-left-color:var(--colors-gnosis-light)}.fyvr125h,.fyvr125i:active{border-left-color:var(--colors-polygon-dark)}.fyvr125j:disabled,.fyvr125j[data-disabled]{border-left-color:var(--colors-polygon-dark)}.fyvr125k:focus{border-left-color:var(--colors-polygon-dark)}.fyvr125l:hover:not([disabled]){border-left-color:var(--colors-polygon-dark)}.fyvr125m[data-state=checked]{border-left-color:var(--colors-polygon-dark)}.fyvr125n,.fyvr125o:active{border-left-color:var(--colors-polygon-light)}.fyvr125p:disabled,.fyvr125p[data-disabled]{border-left-color:var(--colors-polygon-light)}.fyvr125q:focus{border-left-color:var(--colors-polygon-light)}.fyvr125r:hover:not([disabled]){border-left-color:var(--colors-polygon-light)}.fyvr125s[data-state=checked]{border-left-color:var(--colors-polygon-light)}.fyvr125t,.fyvr125u:active{border-left-color:var(--colors-text100)}.fyvr125v:disabled,.fyvr125v[data-disabled]{border-left-color:var(--colors-text100)}.fyvr125w:focus{border-left-color:var(--colors-text100)}.fyvr125x:hover:not([disabled]){border-left-color:var(--colors-text100)}.fyvr125y[data-state=checked]{border-left-color:var(--colors-text100)}.fyvr125z,.fyvr1260:active{border-left-color:var(--colors-text80)}.fyvr1261:disabled,.fyvr1261[data-disabled]{border-left-color:var(--colors-text80)}.fyvr1262:focus{border-left-color:var(--colors-text80)}.fyvr1263:hover:not([disabled]){border-left-color:var(--colors-text80)}.fyvr1264[data-state=checked]{border-left-color:var(--colors-text80)}.fyvr1265,.fyvr1266:active{border-left-color:var(--colors-text50)}.fyvr1267:disabled,.fyvr1267[data-disabled]{border-left-color:var(--colors-text50)}.fyvr1268:focus{border-left-color:var(--colors-text50)}.fyvr1269:hover:not([disabled]){border-left-color:var(--colors-text50)}.fyvr126a[data-state=checked]{border-left-color:var(--colors-text50)}.fyvr126b,.fyvr126c:active{border-left-color:var(--colors-text-inverse100)}.fyvr126d:disabled,.fyvr126d[data-disabled]{border-left-color:var(--colors-text-inverse100)}.fyvr126e:focus{border-left-color:var(--colors-text-inverse100)}.fyvr126f:hover:not([disabled]){border-left-color:var(--colors-text-inverse100)}.fyvr126g[data-state=checked]{border-left-color:var(--colors-text-inverse100)}.fyvr126h,.fyvr126i:active{border-left-color:var(--colors-background-primary)}.fyvr126j:disabled,.fyvr126j[data-disabled]{border-left-color:var(--colors-background-primary)}.fyvr126k:focus{border-left-color:var(--colors-background-primary)}.fyvr126l:hover:not([disabled]){border-left-color:var(--colors-background-primary)}.fyvr126m[data-state=checked]{border-left-color:var(--colors-background-primary)}.fyvr126n,.fyvr126o:active{border-left-color:var(--colors-background-secondary)}.fyvr126p:disabled,.fyvr126p[data-disabled]{border-left-color:var(--colors-background-secondary)}.fyvr126q:focus{border-left-color:var(--colors-background-secondary)}.fyvr126r:hover:not([disabled]){border-left-color:var(--colors-background-secondary)}.fyvr126s[data-state=checked]{border-left-color:var(--colors-background-secondary)}.fyvr126t,.fyvr126u:active{border-left-color:var(--colors-background-contrast)}.fyvr126v:disabled,.fyvr126v[data-disabled]{border-left-color:var(--colors-background-contrast)}.fyvr126w:focus{border-left-color:var(--colors-background-contrast)}.fyvr126x:hover:not([disabled]){border-left-color:var(--colors-background-contrast)}.fyvr126y[data-state=checked]{border-left-color:var(--colors-background-contrast)}.fyvr126z,.fyvr1270:active{border-left-color:var(--colors-background-muted)}.fyvr1271:disabled,.fyvr1271[data-disabled]{border-left-color:var(--colors-background-muted)}.fyvr1272:focus{border-left-color:var(--colors-background-muted)}.fyvr1273:hover:not([disabled]){border-left-color:var(--colors-background-muted)}.fyvr1274[data-state=checked]{border-left-color:var(--colors-background-muted)}.fyvr1275,.fyvr1276:active{border-left-color:var(--colors-background-control)}.fyvr1277:disabled,.fyvr1277[data-disabled]{border-left-color:var(--colors-background-control)}.fyvr1278:focus{border-left-color:var(--colors-background-control)}.fyvr1279:hover:not([disabled]){border-left-color:var(--colors-background-control)}.fyvr127a[data-state=checked]{border-left-color:var(--colors-background-control)}.fyvr127b,.fyvr127c:active{border-left-color:var(--colors-background-inverse)}.fyvr127d:disabled,.fyvr127d[data-disabled]{border-left-color:var(--colors-background-inverse)}.fyvr127e:focus{border-left-color:var(--colors-background-inverse)}.fyvr127f:hover:not([disabled]){border-left-color:var(--colors-background-inverse)}.fyvr127g[data-state=checked]{border-left-color:var(--colors-background-inverse)}.fyvr127h,.fyvr127i:active{border-left-color:var(--colors-background-backdrop)}.fyvr127j:disabled,.fyvr127j[data-disabled]{border-left-color:var(--colors-background-backdrop)}.fyvr127k:focus{border-left-color:var(--colors-background-backdrop)}.fyvr127l:hover:not([disabled]){border-left-color:var(--colors-background-backdrop)}.fyvr127m[data-state=checked]{border-left-color:var(--colors-background-backdrop)}.fyvr127n,.fyvr127o:active{border-left-color:var(--colors-background-overlay)}.fyvr127p:disabled,.fyvr127p[data-disabled]{border-left-color:var(--colors-background-overlay)}.fyvr127q:focus{border-left-color:var(--colors-background-overlay)}.fyvr127r:hover:not([disabled]){border-left-color:var(--colors-background-overlay)}.fyvr127s[data-state=checked]{border-left-color:var(--colors-background-overlay)}.fyvr127t,.fyvr127u:active{border-left-color:var(--colors-background-raised)}.fyvr127v:disabled,.fyvr127v[data-disabled]{border-left-color:var(--colors-background-raised)}.fyvr127w:focus{border-left-color:var(--colors-background-raised)}.fyvr127x:hover:not([disabled]){border-left-color:var(--colors-background-raised)}.fyvr127y[data-state=checked]{border-left-color:var(--colors-background-raised)}.fyvr127z,.fyvr1280:active{border-left-color:var(--colors-button-glass)}.fyvr1281:disabled,.fyvr1281[data-disabled]{border-left-color:var(--colors-button-glass)}.fyvr1282:focus{border-left-color:var(--colors-button-glass)}.fyvr1283:hover:not([disabled]){border-left-color:var(--colors-button-glass)}.fyvr1284[data-state=checked]{border-left-color:var(--colors-button-glass)}.fyvr1285,.fyvr1286:active{border-left-color:var(--colors-button-emphasis)}.fyvr1287:disabled,.fyvr1287[data-disabled]{border-left-color:var(--colors-button-emphasis)}.fyvr1288:focus{border-left-color:var(--colors-button-emphasis)}.fyvr1289:hover:not([disabled]){border-left-color:var(--colors-button-emphasis)}.fyvr128a[data-state=checked]{border-left-color:var(--colors-button-emphasis)}.fyvr128b,.fyvr128c:active{border-left-color:var(--colors-button-inverse)}.fyvr128d:disabled,.fyvr128d[data-disabled]{border-left-color:var(--colors-button-inverse)}.fyvr128e:focus{border-left-color:var(--colors-button-inverse)}.fyvr128f:hover:not([disabled]){border-left-color:var(--colors-button-inverse)}.fyvr128g[data-state=checked]{border-left-color:var(--colors-button-inverse)}.fyvr128h,.fyvr128i:active{border-left-color:var(--colors-border-normal)}.fyvr128j:disabled,.fyvr128j[data-disabled]{border-left-color:var(--colors-border-normal)}.fyvr128k:focus{border-left-color:var(--colors-border-normal)}.fyvr128l:hover:not([disabled]){border-left-color:var(--colors-border-normal)}.fyvr128m[data-state=checked]{border-left-color:var(--colors-border-normal)}.fyvr128n,.fyvr128o:active{border-left-color:var(--colors-border-focus)}.fyvr128p:disabled,.fyvr128p[data-disabled]{border-left-color:var(--colors-border-focus)}.fyvr128q:focus{border-left-color:var(--colors-border-focus)}.fyvr128r:hover:not([disabled]){border-left-color:var(--colors-border-focus)}.fyvr128s[data-state=checked]{border-left-color:var(--colors-border-focus)}.fyvr128t,.fyvr128u:active{border-left-style:solid}.fyvr128v:disabled,.fyvr128v[data-disabled]{border-left-style:solid}.fyvr128w:focus{border-left-style:solid}.fyvr128x:hover:not([disabled]){border-left-style:solid}.fyvr128y[data-state=checked]{border-left-style:solid}.fyvr128z,.fyvr1290:active{border-left-style:dashed}.fyvr1291:disabled,.fyvr1291[data-disabled]{border-left-style:dashed}.fyvr1292:focus{border-left-style:dashed}.fyvr1293:hover:not([disabled]){border-left-style:dashed}.fyvr1294[data-state=checked]{border-left-style:dashed}.fyvr1295,.fyvr1296:active{border-left-style:dotted}.fyvr1297:disabled,.fyvr1297[data-disabled]{border-left-style:dotted}.fyvr1298:focus{border-left-style:dotted}.fyvr1299:hover:not([disabled]){border-left-style:dotted}.fyvr129a[data-state=checked]{border-left-style:dotted}.fyvr129b,.fyvr129c:active{border-right-color:var(--colors-black)}.fyvr129d:disabled,.fyvr129d[data-disabled]{border-right-color:var(--colors-black)}.fyvr129e:focus{border-right-color:var(--colors-black)}.fyvr129f:hover:not([disabled]){border-right-color:var(--colors-black)}.fyvr129g[data-state=checked]{border-right-color:var(--colors-black)}.fyvr129h,.fyvr129i:active{border-right-color:var(--colors-white)}.fyvr129j:disabled,.fyvr129j[data-disabled]{border-right-color:var(--colors-white)}.fyvr129k:focus{border-right-color:var(--colors-white)}.fyvr129l:hover:not([disabled]){border-right-color:var(--colors-white)}.fyvr129m[data-state=checked]{border-right-color:var(--colors-white)}.fyvr129n,.fyvr129o:active{border-right-color:var(--colors-inherit)}.fyvr129p:disabled,.fyvr129p[data-disabled]{border-right-color:var(--colors-inherit)}.fyvr129q:focus{border-right-color:var(--colors-inherit)}.fyvr129r:hover:not([disabled]){border-right-color:var(--colors-inherit)}.fyvr129s[data-state=checked]{border-right-color:var(--colors-inherit)}.fyvr129t,.fyvr129u:active{border-right-color:var(--colors-transparent)}.fyvr129v:disabled,.fyvr129v[data-disabled]{border-right-color:var(--colors-transparent)}.fyvr129w:focus{border-right-color:var(--colors-transparent)}.fyvr129x:hover:not([disabled]){border-right-color:var(--colors-transparent)}.fyvr129y[data-state=checked]{border-right-color:var(--colors-transparent)}.fyvr129z,.fyvr12a0:active{border-right-color:var(--colors-positive)}.fyvr12a1:disabled,.fyvr12a1[data-disabled]{border-right-color:var(--colors-positive)}.fyvr12a2:focus{border-right-color:var(--colors-positive)}.fyvr12a3:hover:not([disabled]){border-right-color:var(--colors-positive)}.fyvr12a4[data-state=checked]{border-right-color:var(--colors-positive)}.fyvr12a5,.fyvr12a6:active{border-right-color:var(--colors-negative)}.fyvr12a7:disabled,.fyvr12a7[data-disabled]{border-right-color:var(--colors-negative)}.fyvr12a8:focus{border-right-color:var(--colors-negative)}.fyvr12a9:hover:not([disabled]){border-right-color:var(--colors-negative)}.fyvr12aa[data-state=checked]{border-right-color:var(--colors-negative)}.fyvr12ab,.fyvr12ac:active{border-right-color:var(--colors-info)}.fyvr12ad:disabled,.fyvr12ad[data-disabled]{border-right-color:var(--colors-info)}.fyvr12ae:focus{border-right-color:var(--colors-info)}.fyvr12af:hover:not([disabled]){border-right-color:var(--colors-info)}.fyvr12ag[data-state=checked]{border-right-color:var(--colors-info)}.fyvr12ah,.fyvr12ai:active{border-right-color:var(--colors-warning)}.fyvr12aj:disabled,.fyvr12aj[data-disabled]{border-right-color:var(--colors-warning)}.fyvr12ak:focus{border-right-color:var(--colors-warning)}.fyvr12al:hover:not([disabled]){border-right-color:var(--colors-warning)}.fyvr12am[data-state=checked]{border-right-color:var(--colors-warning)}.fyvr12an,.fyvr12ao:active{border-right-color:var(--colors-gradient-backdrop)}.fyvr12ap:disabled,.fyvr12ap[data-disabled]{border-right-color:var(--colors-gradient-backdrop)}.fyvr12aq:focus{border-right-color:var(--colors-gradient-backdrop)}.fyvr12ar:hover:not([disabled]){border-right-color:var(--colors-gradient-backdrop)}.fyvr12as[data-state=checked]{border-right-color:var(--colors-gradient-backdrop)}.fyvr12at,.fyvr12au:active{border-right-color:var(--colors-gradient-primary)}.fyvr12av:disabled,.fyvr12av[data-disabled]{border-right-color:var(--colors-gradient-primary)}.fyvr12aw:focus{border-right-color:var(--colors-gradient-primary)}.fyvr12ax:hover:not([disabled]){border-right-color:var(--colors-gradient-primary)}.fyvr12ay[data-state=checked]{border-right-color:var(--colors-gradient-primary)}.fyvr12az,.fyvr12b0:active{border-right-color:var(--colors-gradient-secondary)}.fyvr12b1:disabled,.fyvr12b1[data-disabled]{border-right-color:var(--colors-gradient-secondary)}.fyvr12b2:focus{border-right-color:var(--colors-gradient-secondary)}.fyvr12b3:hover:not([disabled]){border-right-color:var(--colors-gradient-secondary)}.fyvr12b4[data-state=checked]{border-right-color:var(--colors-gradient-secondary)}.fyvr12b5,.fyvr12b6:active{border-right-color:var(--colors-arbitrum-dark)}.fyvr12b7:disabled,.fyvr12b7[data-disabled]{border-right-color:var(--colors-arbitrum-dark)}.fyvr12b8:focus{border-right-color:var(--colors-arbitrum-dark)}.fyvr12b9:hover:not([disabled]){border-right-color:var(--colors-arbitrum-dark)}.fyvr12ba[data-state=checked]{border-right-color:var(--colors-arbitrum-dark)}.fyvr12bb,.fyvr12bc:active{border-right-color:var(--colors-arbitrum-light)}.fyvr12bd:disabled,.fyvr12bd[data-disabled]{border-right-color:var(--colors-arbitrum-light)}.fyvr12be:focus{border-right-color:var(--colors-arbitrum-light)}.fyvr12bf:hover:not([disabled]){border-right-color:var(--colors-arbitrum-light)}.fyvr12bg[data-state=checked]{border-right-color:var(--colors-arbitrum-light)}.fyvr12bh,.fyvr12bi:active{border-right-color:var(--colors-avalance-dark)}.fyvr12bj:disabled,.fyvr12bj[data-disabled]{border-right-color:var(--colors-avalance-dark)}.fyvr12bk:focus{border-right-color:var(--colors-avalance-dark)}.fyvr12bl:hover:not([disabled]){border-right-color:var(--colors-avalance-dark)}.fyvr12bm[data-state=checked]{border-right-color:var(--colors-avalance-dark)}.fyvr12bn,.fyvr12bo:active{border-right-color:var(--colors-avalance-light)}.fyvr12bp:disabled,.fyvr12bp[data-disabled]{border-right-color:var(--colors-avalance-light)}.fyvr12bq:focus{border-right-color:var(--colors-avalance-light)}.fyvr12br:hover:not([disabled]){border-right-color:var(--colors-avalance-light)}.fyvr12bs[data-state=checked]{border-right-color:var(--colors-avalance-light)}.fyvr12bt,.fyvr12bu:active{border-right-color:var(--colors-bsc-dark)}.fyvr12bv:disabled,.fyvr12bv[data-disabled]{border-right-color:var(--colors-bsc-dark)}.fyvr12bw:focus{border-right-color:var(--colors-bsc-dark)}.fyvr12bx:hover:not([disabled]){border-right-color:var(--colors-bsc-dark)}.fyvr12by[data-state=checked]{border-right-color:var(--colors-bsc-dark)}.fyvr12bz,.fyvr12c0:active{border-right-color:var(--colors-bsc-light)}.fyvr12c1:disabled,.fyvr12c1[data-disabled]{border-right-color:var(--colors-bsc-light)}.fyvr12c2:focus{border-right-color:var(--colors-bsc-light)}.fyvr12c3:hover:not([disabled]){border-right-color:var(--colors-bsc-light)}.fyvr12c4[data-state=checked]{border-right-color:var(--colors-bsc-light)}.fyvr12c5,.fyvr12c6:active{border-right-color:var(--colors-ethereum-dark)}.fyvr12c7:disabled,.fyvr12c7[data-disabled]{border-right-color:var(--colors-ethereum-dark)}.fyvr12c8:focus{border-right-color:var(--colors-ethereum-dark)}.fyvr12c9:hover:not([disabled]){border-right-color:var(--colors-ethereum-dark)}.fyvr12ca[data-state=checked]{border-right-color:var(--colors-ethereum-dark)}.fyvr12cb,.fyvr12cc:active{border-right-color:var(--colors-ethereum-light)}.fyvr12cd:disabled,.fyvr12cd[data-disabled]{border-right-color:var(--colors-ethereum-light)}.fyvr12ce:focus{border-right-color:var(--colors-ethereum-light)}.fyvr12cf:hover:not([disabled]){border-right-color:var(--colors-ethereum-light)}.fyvr12cg[data-state=checked]{border-right-color:var(--colors-ethereum-light)}.fyvr12ch,.fyvr12ci:active{border-right-color:var(--colors-gnosis-dark)}.fyvr12cj:disabled,.fyvr12cj[data-disabled]{border-right-color:var(--colors-gnosis-dark)}.fyvr12ck:focus{border-right-color:var(--colors-gnosis-dark)}.fyvr12cl:hover:not([disabled]){border-right-color:var(--colors-gnosis-dark)}.fyvr12cm[data-state=checked]{border-right-color:var(--colors-gnosis-dark)}.fyvr12cn,.fyvr12co:active{border-right-color:var(--colors-gnosis-light)}.fyvr12cp:disabled,.fyvr12cp[data-disabled]{border-right-color:var(--colors-gnosis-light)}.fyvr12cq:focus{border-right-color:var(--colors-gnosis-light)}.fyvr12cr:hover:not([disabled]){border-right-color:var(--colors-gnosis-light)}.fyvr12cs[data-state=checked]{border-right-color:var(--colors-gnosis-light)}.fyvr12ct,.fyvr12cu:active{border-right-color:var(--colors-polygon-dark)}.fyvr12cv:disabled,.fyvr12cv[data-disabled]{border-right-color:var(--colors-polygon-dark)}.fyvr12cw:focus{border-right-color:var(--colors-polygon-dark)}.fyvr12cx:hover:not([disabled]){border-right-color:var(--colors-polygon-dark)}.fyvr12cy[data-state=checked]{border-right-color:var(--colors-polygon-dark)}.fyvr12cz,.fyvr12d0:active{border-right-color:var(--colors-polygon-light)}.fyvr12d1:disabled,.fyvr12d1[data-disabled]{border-right-color:var(--colors-polygon-light)}.fyvr12d2:focus{border-right-color:var(--colors-polygon-light)}.fyvr12d3:hover:not([disabled]){border-right-color:var(--colors-polygon-light)}.fyvr12d4[data-state=checked]{border-right-color:var(--colors-polygon-light)}.fyvr12d5,.fyvr12d6:active{border-right-color:var(--colors-text100)}.fyvr12d7:disabled,.fyvr12d7[data-disabled]{border-right-color:var(--colors-text100)}.fyvr12d8:focus{border-right-color:var(--colors-text100)}.fyvr12d9:hover:not([disabled]){border-right-color:var(--colors-text100)}.fyvr12da[data-state=checked]{border-right-color:var(--colors-text100)}.fyvr12db,.fyvr12dc:active{border-right-color:var(--colors-text80)}.fyvr12dd:disabled,.fyvr12dd[data-disabled]{border-right-color:var(--colors-text80)}.fyvr12de:focus{border-right-color:var(--colors-text80)}.fyvr12df:hover:not([disabled]){border-right-color:var(--colors-text80)}.fyvr12dg[data-state=checked]{border-right-color:var(--colors-text80)}.fyvr12dh,.fyvr12di:active{border-right-color:var(--colors-text50)}.fyvr12dj:disabled,.fyvr12dj[data-disabled]{border-right-color:var(--colors-text50)}.fyvr12dk:focus{border-right-color:var(--colors-text50)}.fyvr12dl:hover:not([disabled]){border-right-color:var(--colors-text50)}.fyvr12dm[data-state=checked]{border-right-color:var(--colors-text50)}.fyvr12dn,.fyvr12do:active{border-right-color:var(--colors-text-inverse100)}.fyvr12dp:disabled,.fyvr12dp[data-disabled]{border-right-color:var(--colors-text-inverse100)}.fyvr12dq:focus{border-right-color:var(--colors-text-inverse100)}.fyvr12dr:hover:not([disabled]){border-right-color:var(--colors-text-inverse100)}.fyvr12ds[data-state=checked]{border-right-color:var(--colors-text-inverse100)}.fyvr12dt,.fyvr12du:active{border-right-color:var(--colors-background-primary)}.fyvr12dv:disabled,.fyvr12dv[data-disabled]{border-right-color:var(--colors-background-primary)}.fyvr12dw:focus{border-right-color:var(--colors-background-primary)}.fyvr12dx:hover:not([disabled]){border-right-color:var(--colors-background-primary)}.fyvr12dy[data-state=checked]{border-right-color:var(--colors-background-primary)}.fyvr12dz,.fyvr12e0:active{border-right-color:var(--colors-background-secondary)}.fyvr12e1:disabled,.fyvr12e1[data-disabled]{border-right-color:var(--colors-background-secondary)}.fyvr12e2:focus{border-right-color:var(--colors-background-secondary)}.fyvr12e3:hover:not([disabled]){border-right-color:var(--colors-background-secondary)}.fyvr12e4[data-state=checked]{border-right-color:var(--colors-background-secondary)}.fyvr12e5,.fyvr12e6:active{border-right-color:var(--colors-background-contrast)}.fyvr12e7:disabled,.fyvr12e7[data-disabled]{border-right-color:var(--colors-background-contrast)}.fyvr12e8:focus{border-right-color:var(--colors-background-contrast)}.fyvr12e9:hover:not([disabled]){border-right-color:var(--colors-background-contrast)}.fyvr12ea[data-state=checked]{border-right-color:var(--colors-background-contrast)}.fyvr12eb,.fyvr12ec:active{border-right-color:var(--colors-background-muted)}.fyvr12ed:disabled,.fyvr12ed[data-disabled]{border-right-color:var(--colors-background-muted)}.fyvr12ee:focus{border-right-color:var(--colors-background-muted)}.fyvr12ef:hover:not([disabled]){border-right-color:var(--colors-background-muted)}.fyvr12eg[data-state=checked]{border-right-color:var(--colors-background-muted)}.fyvr12eh,.fyvr12ei:active{border-right-color:var(--colors-background-control)}.fyvr12ej:disabled,.fyvr12ej[data-disabled]{border-right-color:var(--colors-background-control)}.fyvr12ek:focus{border-right-color:var(--colors-background-control)}.fyvr12el:hover:not([disabled]){border-right-color:var(--colors-background-control)}.fyvr12em[data-state=checked]{border-right-color:var(--colors-background-control)}.fyvr12en,.fyvr12eo:active{border-right-color:var(--colors-background-inverse)}.fyvr12ep:disabled,.fyvr12ep[data-disabled]{border-right-color:var(--colors-background-inverse)}.fyvr12eq:focus{border-right-color:var(--colors-background-inverse)}.fyvr12er:hover:not([disabled]){border-right-color:var(--colors-background-inverse)}.fyvr12es[data-state=checked]{border-right-color:var(--colors-background-inverse)}.fyvr12et,.fyvr12eu:active{border-right-color:var(--colors-background-backdrop)}.fyvr12ev:disabled,.fyvr12ev[data-disabled]{border-right-color:var(--colors-background-backdrop)}.fyvr12ew:focus{border-right-color:var(--colors-background-backdrop)}.fyvr12ex:hover:not([disabled]){border-right-color:var(--colors-background-backdrop)}.fyvr12ey[data-state=checked]{border-right-color:var(--colors-background-backdrop)}.fyvr12ez,.fyvr12f0:active{border-right-color:var(--colors-background-overlay)}.fyvr12f1:disabled,.fyvr12f1[data-disabled]{border-right-color:var(--colors-background-overlay)}.fyvr12f2:focus{border-right-color:var(--colors-background-overlay)}.fyvr12f3:hover:not([disabled]){border-right-color:var(--colors-background-overlay)}.fyvr12f4[data-state=checked]{border-right-color:var(--colors-background-overlay)}.fyvr12f5,.fyvr12f6:active{border-right-color:var(--colors-background-raised)}.fyvr12f7:disabled,.fyvr12f7[data-disabled]{border-right-color:var(--colors-background-raised)}.fyvr12f8:focus{border-right-color:var(--colors-background-raised)}.fyvr12f9:hover:not([disabled]){border-right-color:var(--colors-background-raised)}.fyvr12fa[data-state=checked]{border-right-color:var(--colors-background-raised)}.fyvr12fb,.fyvr12fc:active{border-right-color:var(--colors-button-glass)}.fyvr12fd:disabled,.fyvr12fd[data-disabled]{border-right-color:var(--colors-button-glass)}.fyvr12fe:focus{border-right-color:var(--colors-button-glass)}.fyvr12ff:hover:not([disabled]){border-right-color:var(--colors-button-glass)}.fyvr12fg[data-state=checked]{border-right-color:var(--colors-button-glass)}.fyvr12fh,.fyvr12fi:active{border-right-color:var(--colors-button-emphasis)}.fyvr12fj:disabled,.fyvr12fj[data-disabled]{border-right-color:var(--colors-button-emphasis)}.fyvr12fk:focus{border-right-color:var(--colors-button-emphasis)}.fyvr12fl:hover:not([disabled]){border-right-color:var(--colors-button-emphasis)}.fyvr12fm[data-state=checked]{border-right-color:var(--colors-button-emphasis)}.fyvr12fn,.fyvr12fo:active{border-right-color:var(--colors-button-inverse)}.fyvr12fp:disabled,.fyvr12fp[data-disabled]{border-right-color:var(--colors-button-inverse)}.fyvr12fq:focus{border-right-color:var(--colors-button-inverse)}.fyvr12fr:hover:not([disabled]){border-right-color:var(--colors-button-inverse)}.fyvr12fs[data-state=checked]{border-right-color:var(--colors-button-inverse)}.fyvr12ft,.fyvr12fu:active{border-right-color:var(--colors-border-normal)}.fyvr12fv:disabled,.fyvr12fv[data-disabled]{border-right-color:var(--colors-border-normal)}.fyvr12fw:focus{border-right-color:var(--colors-border-normal)}.fyvr12fx:hover:not([disabled]){border-right-color:var(--colors-border-normal)}.fyvr12fy[data-state=checked]{border-right-color:var(--colors-border-normal)}.fyvr12fz,.fyvr12g0:active{border-right-color:var(--colors-border-focus)}.fyvr12g1:disabled,.fyvr12g1[data-disabled]{border-right-color:var(--colors-border-focus)}.fyvr12g2:focus{border-right-color:var(--colors-border-focus)}.fyvr12g3:hover:not([disabled]){border-right-color:var(--colors-border-focus)}.fyvr12g4[data-state=checked]{border-right-color:var(--colors-border-focus)}.fyvr12g5,.fyvr12g6:active{border-right-style:solid}.fyvr12g7:disabled,.fyvr12g7[data-disabled]{border-right-style:solid}.fyvr12g8:focus{border-right-style:solid}.fyvr12g9:hover:not([disabled]){border-right-style:solid}.fyvr12ga[data-state=checked]{border-right-style:solid}.fyvr12gb,.fyvr12gc:active{border-right-style:dashed}.fyvr12gd:disabled,.fyvr12gd[data-disabled]{border-right-style:dashed}.fyvr12ge:focus{border-right-style:dashed}.fyvr12gf:hover:not([disabled]){border-right-style:dashed}.fyvr12gg[data-state=checked]{border-right-style:dashed}.fyvr12gh,.fyvr12gi:active{border-right-style:dotted}.fyvr12gj:disabled,.fyvr12gj[data-disabled]{border-right-style:dotted}.fyvr12gk:focus{border-right-style:dotted}.fyvr12gl:hover:not([disabled]){border-right-style:dotted}.fyvr12gm[data-state=checked]{border-right-style:dotted}.fyvr12gn,.fyvr12go:active{border-top-color:var(--colors-black)}.fyvr12gp:disabled,.fyvr12gp[data-disabled]{border-top-color:var(--colors-black)}.fyvr12gq:focus{border-top-color:var(--colors-black)}.fyvr12gr:hover:not([disabled]){border-top-color:var(--colors-black)}.fyvr12gs[data-state=checked]{border-top-color:var(--colors-black)}.fyvr12gt,.fyvr12gu:active{border-top-color:var(--colors-white)}.fyvr12gv:disabled,.fyvr12gv[data-disabled]{border-top-color:var(--colors-white)}.fyvr12gw:focus{border-top-color:var(--colors-white)}.fyvr12gx:hover:not([disabled]){border-top-color:var(--colors-white)}.fyvr12gy[data-state=checked]{border-top-color:var(--colors-white)}.fyvr12gz,.fyvr12h0:active{border-top-color:var(--colors-inherit)}.fyvr12h1:disabled,.fyvr12h1[data-disabled]{border-top-color:var(--colors-inherit)}.fyvr12h2:focus{border-top-color:var(--colors-inherit)}.fyvr12h3:hover:not([disabled]){border-top-color:var(--colors-inherit)}.fyvr12h4[data-state=checked]{border-top-color:var(--colors-inherit)}.fyvr12h5,.fyvr12h6:active{border-top-color:var(--colors-transparent)}.fyvr12h7:disabled,.fyvr12h7[data-disabled]{border-top-color:var(--colors-transparent)}.fyvr12h8:focus{border-top-color:var(--colors-transparent)}.fyvr12h9:hover:not([disabled]){border-top-color:var(--colors-transparent)}.fyvr12ha[data-state=checked]{border-top-color:var(--colors-transparent)}.fyvr12hb,.fyvr12hc:active{border-top-color:var(--colors-positive)}.fyvr12hd:disabled,.fyvr12hd[data-disabled]{border-top-color:var(--colors-positive)}.fyvr12he:focus{border-top-color:var(--colors-positive)}.fyvr12hf:hover:not([disabled]){border-top-color:var(--colors-positive)}.fyvr12hg[data-state=checked]{border-top-color:var(--colors-positive)}.fyvr12hh,.fyvr12hi:active{border-top-color:var(--colors-negative)}.fyvr12hj:disabled,.fyvr12hj[data-disabled]{border-top-color:var(--colors-negative)}.fyvr12hk:focus{border-top-color:var(--colors-negative)}.fyvr12hl:hover:not([disabled]){border-top-color:var(--colors-negative)}.fyvr12hm[data-state=checked]{border-top-color:var(--colors-negative)}.fyvr12hn,.fyvr12ho:active{border-top-color:var(--colors-info)}.fyvr12hp:disabled,.fyvr12hp[data-disabled]{border-top-color:var(--colors-info)}.fyvr12hq:focus{border-top-color:var(--colors-info)}.fyvr12hr:hover:not([disabled]){border-top-color:var(--colors-info)}.fyvr12hs[data-state=checked]{border-top-color:var(--colors-info)}.fyvr12ht,.fyvr12hu:active{border-top-color:var(--colors-warning)}.fyvr12hv:disabled,.fyvr12hv[data-disabled]{border-top-color:var(--colors-warning)}.fyvr12hw:focus{border-top-color:var(--colors-warning)}.fyvr12hx:hover:not([disabled]){border-top-color:var(--colors-warning)}.fyvr12hy[data-state=checked]{border-top-color:var(--colors-warning)}.fyvr12hz,.fyvr12i0:active{border-top-color:var(--colors-gradient-backdrop)}.fyvr12i1:disabled,.fyvr12i1[data-disabled]{border-top-color:var(--colors-gradient-backdrop)}.fyvr12i2:focus{border-top-color:var(--colors-gradient-backdrop)}.fyvr12i3:hover:not([disabled]){border-top-color:var(--colors-gradient-backdrop)}.fyvr12i4[data-state=checked]{border-top-color:var(--colors-gradient-backdrop)}.fyvr12i5,.fyvr12i6:active{border-top-color:var(--colors-gradient-primary)}.fyvr12i7:disabled,.fyvr12i7[data-disabled]{border-top-color:var(--colors-gradient-primary)}.fyvr12i8:focus{border-top-color:var(--colors-gradient-primary)}.fyvr12i9:hover:not([disabled]){border-top-color:var(--colors-gradient-primary)}.fyvr12ia[data-state=checked]{border-top-color:var(--colors-gradient-primary)}.fyvr12ib,.fyvr12ic:active{border-top-color:var(--colors-gradient-secondary)}.fyvr12id:disabled,.fyvr12id[data-disabled]{border-top-color:var(--colors-gradient-secondary)}.fyvr12ie:focus{border-top-color:var(--colors-gradient-secondary)}.fyvr12if:hover:not([disabled]){border-top-color:var(--colors-gradient-secondary)}.fyvr12ig[data-state=checked]{border-top-color:var(--colors-gradient-secondary)}.fyvr12ih,.fyvr12ii:active{border-top-color:var(--colors-arbitrum-dark)}.fyvr12ij:disabled,.fyvr12ij[data-disabled]{border-top-color:var(--colors-arbitrum-dark)}.fyvr12ik:focus{border-top-color:var(--colors-arbitrum-dark)}.fyvr12il:hover:not([disabled]){border-top-color:var(--colors-arbitrum-dark)}.fyvr12im[data-state=checked]{border-top-color:var(--colors-arbitrum-dark)}.fyvr12in,.fyvr12io:active{border-top-color:var(--colors-arbitrum-light)}.fyvr12ip:disabled,.fyvr12ip[data-disabled]{border-top-color:var(--colors-arbitrum-light)}.fyvr12iq:focus{border-top-color:var(--colors-arbitrum-light)}.fyvr12ir:hover:not([disabled]){border-top-color:var(--colors-arbitrum-light)}.fyvr12is[data-state=checked]{border-top-color:var(--colors-arbitrum-light)}.fyvr12it,.fyvr12iu:active{border-top-color:var(--colors-avalance-dark)}.fyvr12iv:disabled,.fyvr12iv[data-disabled]{border-top-color:var(--colors-avalance-dark)}.fyvr12iw:focus{border-top-color:var(--colors-avalance-dark)}.fyvr12ix:hover:not([disabled]){border-top-color:var(--colors-avalance-dark)}.fyvr12iy[data-state=checked]{border-top-color:var(--colors-avalance-dark)}.fyvr12iz,.fyvr12j0:active{border-top-color:var(--colors-avalance-light)}.fyvr12j1:disabled,.fyvr12j1[data-disabled]{border-top-color:var(--colors-avalance-light)}.fyvr12j2:focus{border-top-color:var(--colors-avalance-light)}.fyvr12j3:hover:not([disabled]){border-top-color:var(--colors-avalance-light)}.fyvr12j4[data-state=checked]{border-top-color:var(--colors-avalance-light)}.fyvr12j5,.fyvr12j6:active{border-top-color:var(--colors-bsc-dark)}.fyvr12j7:disabled,.fyvr12j7[data-disabled]{border-top-color:var(--colors-bsc-dark)}.fyvr12j8:focus{border-top-color:var(--colors-bsc-dark)}.fyvr12j9:hover:not([disabled]){border-top-color:var(--colors-bsc-dark)}.fyvr12ja[data-state=checked]{border-top-color:var(--colors-bsc-dark)}.fyvr12jb,.fyvr12jc:active{border-top-color:var(--colors-bsc-light)}.fyvr12jd:disabled,.fyvr12jd[data-disabled]{border-top-color:var(--colors-bsc-light)}.fyvr12je:focus{border-top-color:var(--colors-bsc-light)}.fyvr12jf:hover:not([disabled]){border-top-color:var(--colors-bsc-light)}.fyvr12jg[data-state=checked]{border-top-color:var(--colors-bsc-light)}.fyvr12jh,.fyvr12ji:active{border-top-color:var(--colors-ethereum-dark)}.fyvr12jj:disabled,.fyvr12jj[data-disabled]{border-top-color:var(--colors-ethereum-dark)}.fyvr12jk:focus{border-top-color:var(--colors-ethereum-dark)}.fyvr12jl:hover:not([disabled]){border-top-color:var(--colors-ethereum-dark)}.fyvr12jm[data-state=checked]{border-top-color:var(--colors-ethereum-dark)}.fyvr12jn,.fyvr12jo:active{border-top-color:var(--colors-ethereum-light)}.fyvr12jp:disabled,.fyvr12jp[data-disabled]{border-top-color:var(--colors-ethereum-light)}.fyvr12jq:focus{border-top-color:var(--colors-ethereum-light)}.fyvr12jr:hover:not([disabled]){border-top-color:var(--colors-ethereum-light)}.fyvr12js[data-state=checked]{border-top-color:var(--colors-ethereum-light)}.fyvr12jt,.fyvr12ju:active{border-top-color:var(--colors-gnosis-dark)}.fyvr12jv:disabled,.fyvr12jv[data-disabled]{border-top-color:var(--colors-gnosis-dark)}.fyvr12jw:focus{border-top-color:var(--colors-gnosis-dark)}.fyvr12jx:hover:not([disabled]){border-top-color:var(--colors-gnosis-dark)}.fyvr12jy[data-state=checked]{border-top-color:var(--colors-gnosis-dark)}.fyvr12jz,.fyvr12k0:active{border-top-color:var(--colors-gnosis-light)}.fyvr12k1:disabled,.fyvr12k1[data-disabled]{border-top-color:var(--colors-gnosis-light)}.fyvr12k2:focus{border-top-color:var(--colors-gnosis-light)}.fyvr12k3:hover:not([disabled]){border-top-color:var(--colors-gnosis-light)}.fyvr12k4[data-state=checked]{border-top-color:var(--colors-gnosis-light)}.fyvr12k5,.fyvr12k6:active{border-top-color:var(--colors-polygon-dark)}.fyvr12k7:disabled,.fyvr12k7[data-disabled]{border-top-color:var(--colors-polygon-dark)}.fyvr12k8:focus{border-top-color:var(--colors-polygon-dark)}.fyvr12k9:hover:not([disabled]){border-top-color:var(--colors-polygon-dark)}.fyvr12ka[data-state=checked]{border-top-color:var(--colors-polygon-dark)}.fyvr12kb,.fyvr12kc:active{border-top-color:var(--colors-polygon-light)}.fyvr12kd:disabled,.fyvr12kd[data-disabled]{border-top-color:var(--colors-polygon-light)}.fyvr12ke:focus{border-top-color:var(--colors-polygon-light)}.fyvr12kf:hover:not([disabled]){border-top-color:var(--colors-polygon-light)}.fyvr12kg[data-state=checked]{border-top-color:var(--colors-polygon-light)}.fyvr12kh,.fyvr12ki:active{border-top-color:var(--colors-text100)}.fyvr12kj:disabled,.fyvr12kj[data-disabled]{border-top-color:var(--colors-text100)}.fyvr12kk:focus{border-top-color:var(--colors-text100)}.fyvr12kl:hover:not([disabled]){border-top-color:var(--colors-text100)}.fyvr12km[data-state=checked]{border-top-color:var(--colors-text100)}.fyvr12kn,.fyvr12ko:active{border-top-color:var(--colors-text80)}.fyvr12kp:disabled,.fyvr12kp[data-disabled]{border-top-color:var(--colors-text80)}.fyvr12kq:focus{border-top-color:var(--colors-text80)}.fyvr12kr:hover:not([disabled]){border-top-color:var(--colors-text80)}.fyvr12ks[data-state=checked]{border-top-color:var(--colors-text80)}.fyvr12kt,.fyvr12ku:active{border-top-color:var(--colors-text50)}.fyvr12kv:disabled,.fyvr12kv[data-disabled]{border-top-color:var(--colors-text50)}.fyvr12kw:focus{border-top-color:var(--colors-text50)}.fyvr12kx:hover:not([disabled]){border-top-color:var(--colors-text50)}.fyvr12ky[data-state=checked]{border-top-color:var(--colors-text50)}.fyvr12kz,.fyvr12l0:active{border-top-color:var(--colors-text-inverse100)}.fyvr12l1:disabled,.fyvr12l1[data-disabled]{border-top-color:var(--colors-text-inverse100)}.fyvr12l2:focus{border-top-color:var(--colors-text-inverse100)}.fyvr12l3:hover:not([disabled]){border-top-color:var(--colors-text-inverse100)}.fyvr12l4[data-state=checked]{border-top-color:var(--colors-text-inverse100)}.fyvr12l5,.fyvr12l6:active{border-top-color:var(--colors-background-primary)}.fyvr12l7:disabled,.fyvr12l7[data-disabled]{border-top-color:var(--colors-background-primary)}.fyvr12l8:focus{border-top-color:var(--colors-background-primary)}.fyvr12l9:hover:not([disabled]){border-top-color:var(--colors-background-primary)}.fyvr12la[data-state=checked]{border-top-color:var(--colors-background-primary)}.fyvr12lb,.fyvr12lc:active{border-top-color:var(--colors-background-secondary)}.fyvr12ld:disabled,.fyvr12ld[data-disabled]{border-top-color:var(--colors-background-secondary)}.fyvr12le:focus{border-top-color:var(--colors-background-secondary)}.fyvr12lf:hover:not([disabled]){border-top-color:var(--colors-background-secondary)}.fyvr12lg[data-state=checked]{border-top-color:var(--colors-background-secondary)}.fyvr12lh,.fyvr12li:active{border-top-color:var(--colors-background-contrast)}.fyvr12lj:disabled,.fyvr12lj[data-disabled]{border-top-color:var(--colors-background-contrast)}.fyvr12lk:focus{border-top-color:var(--colors-background-contrast)}.fyvr12ll:hover:not([disabled]){border-top-color:var(--colors-background-contrast)}.fyvr12lm[data-state=checked]{border-top-color:var(--colors-background-contrast)}.fyvr12ln,.fyvr12lo:active{border-top-color:var(--colors-background-muted)}.fyvr12lp:disabled,.fyvr12lp[data-disabled]{border-top-color:var(--colors-background-muted)}.fyvr12lq:focus{border-top-color:var(--colors-background-muted)}.fyvr12lr:hover:not([disabled]){border-top-color:var(--colors-background-muted)}.fyvr12ls[data-state=checked]{border-top-color:var(--colors-background-muted)}.fyvr12lt,.fyvr12lu:active{border-top-color:var(--colors-background-control)}.fyvr12lv:disabled,.fyvr12lv[data-disabled]{border-top-color:var(--colors-background-control)}.fyvr12lw:focus{border-top-color:var(--colors-background-control)}.fyvr12lx:hover:not([disabled]){border-top-color:var(--colors-background-control)}.fyvr12ly[data-state=checked]{border-top-color:var(--colors-background-control)}.fyvr12lz,.fyvr12m0:active{border-top-color:var(--colors-background-inverse)}.fyvr12m1:disabled,.fyvr12m1[data-disabled]{border-top-color:var(--colors-background-inverse)}.fyvr12m2:focus{border-top-color:var(--colors-background-inverse)}.fyvr12m3:hover:not([disabled]){border-top-color:var(--colors-background-inverse)}.fyvr12m4[data-state=checked]{border-top-color:var(--colors-background-inverse)}.fyvr12m5,.fyvr12m6:active{border-top-color:var(--colors-background-backdrop)}.fyvr12m7:disabled,.fyvr12m7[data-disabled]{border-top-color:var(--colors-background-backdrop)}.fyvr12m8:focus{border-top-color:var(--colors-background-backdrop)}.fyvr12m9:hover:not([disabled]){border-top-color:var(--colors-background-backdrop)}.fyvr12ma[data-state=checked]{border-top-color:var(--colors-background-backdrop)}.fyvr12mb,.fyvr12mc:active{border-top-color:var(--colors-background-overlay)}.fyvr12md:disabled,.fyvr12md[data-disabled]{border-top-color:var(--colors-background-overlay)}.fyvr12me:focus{border-top-color:var(--colors-background-overlay)}.fyvr12mf:hover:not([disabled]){border-top-color:var(--colors-background-overlay)}.fyvr12mg[data-state=checked]{border-top-color:var(--colors-background-overlay)}.fyvr12mh,.fyvr12mi:active{border-top-color:var(--colors-background-raised)}.fyvr12mj:disabled,.fyvr12mj[data-disabled]{border-top-color:var(--colors-background-raised)}.fyvr12mk:focus{border-top-color:var(--colors-background-raised)}.fyvr12ml:hover:not([disabled]){border-top-color:var(--colors-background-raised)}.fyvr12mm[data-state=checked]{border-top-color:var(--colors-background-raised)}.fyvr12mn,.fyvr12mo:active{border-top-color:var(--colors-button-glass)}.fyvr12mp:disabled,.fyvr12mp[data-disabled]{border-top-color:var(--colors-button-glass)}.fyvr12mq:focus{border-top-color:var(--colors-button-glass)}.fyvr12mr:hover:not([disabled]){border-top-color:var(--colors-button-glass)}.fyvr12ms[data-state=checked]{border-top-color:var(--colors-button-glass)}.fyvr12mt,.fyvr12mu:active{border-top-color:var(--colors-button-emphasis)}.fyvr12mv:disabled,.fyvr12mv[data-disabled]{border-top-color:var(--colors-button-emphasis)}.fyvr12mw:focus{border-top-color:var(--colors-button-emphasis)}.fyvr12mx:hover:not([disabled]){border-top-color:var(--colors-button-emphasis)}.fyvr12my[data-state=checked]{border-top-color:var(--colors-button-emphasis)}.fyvr12mz,.fyvr12n0:active{border-top-color:var(--colors-button-inverse)}.fyvr12n1:disabled,.fyvr12n1[data-disabled]{border-top-color:var(--colors-button-inverse)}.fyvr12n2:focus{border-top-color:var(--colors-button-inverse)}.fyvr12n3:hover:not([disabled]){border-top-color:var(--colors-button-inverse)}.fyvr12n4[data-state=checked]{border-top-color:var(--colors-button-inverse)}.fyvr12n5,.fyvr12n6:active{border-top-color:var(--colors-border-normal)}.fyvr12n7:disabled,.fyvr12n7[data-disabled]{border-top-color:var(--colors-border-normal)}.fyvr12n8:focus{border-top-color:var(--colors-border-normal)}.fyvr12n9:hover:not([disabled]){border-top-color:var(--colors-border-normal)}.fyvr12na[data-state=checked]{border-top-color:var(--colors-border-normal)}.fyvr12nb,.fyvr12nc:active{border-top-color:var(--colors-border-focus)}.fyvr12nd:disabled,.fyvr12nd[data-disabled]{border-top-color:var(--colors-border-focus)}.fyvr12ne:focus{border-top-color:var(--colors-border-focus)}.fyvr12nf:hover:not([disabled]){border-top-color:var(--colors-border-focus)}.fyvr12ng[data-state=checked]{border-top-color:var(--colors-border-focus)}.fyvr12nh,.fyvr12ni:active{border-top-style:solid}.fyvr12nj:disabled,.fyvr12nj[data-disabled]{border-top-style:solid}.fyvr12nk:focus{border-top-style:solid}.fyvr12nl:hover:not([disabled]){border-top-style:solid}.fyvr12nm[data-state=checked]{border-top-style:solid}.fyvr12nn,.fyvr12no:active{border-top-style:dashed}.fyvr12np:disabled,.fyvr12np[data-disabled]{border-top-style:dashed}.fyvr12nq:focus{border-top-style:dashed}.fyvr12nr:hover:not([disabled]){border-top-style:dashed}.fyvr12ns[data-state=checked]{border-top-style:dashed}.fyvr12nt,.fyvr12nu:active{border-top-style:dotted}.fyvr12nv:disabled,.fyvr12nv[data-disabled]{border-top-style:dotted}.fyvr12nw:focus{border-top-style:dotted}.fyvr12nx:hover:not([disabled]){border-top-style:dotted}.fyvr12ny[data-state=checked]{border-top-style:dotted}.fyvr12nz,.fyvr12o0:active{color:var(--colors-black)}.fyvr12o1:disabled,.fyvr12o1[data-disabled]{color:var(--colors-black)}.fyvr12o2:focus{color:var(--colors-black)}.fyvr12o3:hover:not([disabled]){color:var(--colors-black)}.fyvr12o4[data-state=checked]{color:var(--colors-black)}.fyvr12o5,.fyvr12o6:active{color:var(--colors-white)}.fyvr12o7:disabled,.fyvr12o7[data-disabled]{color:var(--colors-white)}.fyvr12o8:focus{color:var(--colors-white)}.fyvr12o9:hover:not([disabled]){color:var(--colors-white)}.fyvr12oa[data-state=checked]{color:var(--colors-white)}.fyvr12ob,.fyvr12oc:active{color:var(--colors-inherit)}.fyvr12od:disabled,.fyvr12od[data-disabled]{color:var(--colors-inherit)}.fyvr12oe:focus{color:var(--colors-inherit)}.fyvr12of:hover:not([disabled]){color:var(--colors-inherit)}.fyvr12og[data-state=checked]{color:var(--colors-inherit)}.fyvr12oh,.fyvr12oi:active{color:var(--colors-transparent)}.fyvr12oj:disabled,.fyvr12oj[data-disabled]{color:var(--colors-transparent)}.fyvr12ok:focus{color:var(--colors-transparent)}.fyvr12ol:hover:not([disabled]){color:var(--colors-transparent)}.fyvr12om[data-state=checked]{color:var(--colors-transparent)}.fyvr12on,.fyvr12oo:active{color:var(--colors-positive)}.fyvr12op:disabled,.fyvr12op[data-disabled]{color:var(--colors-positive)}.fyvr12oq:focus{color:var(--colors-positive)}.fyvr12or:hover:not([disabled]){color:var(--colors-positive)}.fyvr12os[data-state=checked]{color:var(--colors-positive)}.fyvr12ot,.fyvr12ou:active{color:var(--colors-negative)}.fyvr12ov:disabled,.fyvr12ov[data-disabled]{color:var(--colors-negative)}.fyvr12ow:focus{color:var(--colors-negative)}.fyvr12ox:hover:not([disabled]){color:var(--colors-negative)}.fyvr12oy[data-state=checked]{color:var(--colors-negative)}.fyvr12oz,.fyvr12p0:active{color:var(--colors-info)}.fyvr12p1:disabled,.fyvr12p1[data-disabled]{color:var(--colors-info)}.fyvr12p2:focus{color:var(--colors-info)}.fyvr12p3:hover:not([disabled]){color:var(--colors-info)}.fyvr12p4[data-state=checked]{color:var(--colors-info)}.fyvr12p5,.fyvr12p6:active{color:var(--colors-warning)}.fyvr12p7:disabled,.fyvr12p7[data-disabled]{color:var(--colors-warning)}.fyvr12p8:focus{color:var(--colors-warning)}.fyvr12p9:hover:not([disabled]){color:var(--colors-warning)}.fyvr12pa[data-state=checked]{color:var(--colors-warning)}.fyvr12pb,.fyvr12pc:active{color:var(--colors-gradient-backdrop)}.fyvr12pd:disabled,.fyvr12pd[data-disabled]{color:var(--colors-gradient-backdrop)}.fyvr12pe:focus{color:var(--colors-gradient-backdrop)}.fyvr12pf:hover:not([disabled]){color:var(--colors-gradient-backdrop)}.fyvr12pg[data-state=checked]{color:var(--colors-gradient-backdrop)}.fyvr12ph,.fyvr12pi:active{color:var(--colors-gradient-primary)}.fyvr12pj:disabled,.fyvr12pj[data-disabled]{color:var(--colors-gradient-primary)}.fyvr12pk:focus{color:var(--colors-gradient-primary)}.fyvr12pl:hover:not([disabled]){color:var(--colors-gradient-primary)}.fyvr12pm[data-state=checked]{color:var(--colors-gradient-primary)}.fyvr12pn,.fyvr12po:active{color:var(--colors-gradient-secondary)}.fyvr12pp:disabled,.fyvr12pp[data-disabled]{color:var(--colors-gradient-secondary)}.fyvr12pq:focus{color:var(--colors-gradient-secondary)}.fyvr12pr:hover:not([disabled]){color:var(--colors-gradient-secondary)}.fyvr12ps[data-state=checked]{color:var(--colors-gradient-secondary)}.fyvr12pt,.fyvr12pu:active{color:var(--colors-arbitrum-dark)}.fyvr12pv:disabled,.fyvr12pv[data-disabled]{color:var(--colors-arbitrum-dark)}.fyvr12pw:focus{color:var(--colors-arbitrum-dark)}.fyvr12px:hover:not([disabled]){color:var(--colors-arbitrum-dark)}.fyvr12py[data-state=checked]{color:var(--colors-arbitrum-dark)}.fyvr12pz,.fyvr12q0:active{color:var(--colors-arbitrum-light)}.fyvr12q1:disabled,.fyvr12q1[data-disabled]{color:var(--colors-arbitrum-light)}.fyvr12q2:focus{color:var(--colors-arbitrum-light)}.fyvr12q3:hover:not([disabled]){color:var(--colors-arbitrum-light)}.fyvr12q4[data-state=checked]{color:var(--colors-arbitrum-light)}.fyvr12q5,.fyvr12q6:active{color:var(--colors-avalance-dark)}.fyvr12q7:disabled,.fyvr12q7[data-disabled]{color:var(--colors-avalance-dark)}.fyvr12q8:focus{color:var(--colors-avalance-dark)}.fyvr12q9:hover:not([disabled]){color:var(--colors-avalance-dark)}.fyvr12qa[data-state=checked]{color:var(--colors-avalance-dark)}.fyvr12qb,.fyvr12qc:active{color:var(--colors-avalance-light)}.fyvr12qd:disabled,.fyvr12qd[data-disabled]{color:var(--colors-avalance-light)}.fyvr12qe:focus{color:var(--colors-avalance-light)}.fyvr12qf:hover:not([disabled]){color:var(--colors-avalance-light)}.fyvr12qg[data-state=checked]{color:var(--colors-avalance-light)}.fyvr12qh,.fyvr12qi:active{color:var(--colors-bsc-dark)}.fyvr12qj:disabled,.fyvr12qj[data-disabled]{color:var(--colors-bsc-dark)}.fyvr12qk:focus{color:var(--colors-bsc-dark)}.fyvr12ql:hover:not([disabled]){color:var(--colors-bsc-dark)}.fyvr12qm[data-state=checked]{color:var(--colors-bsc-dark)}.fyvr12qn,.fyvr12qo:active{color:var(--colors-bsc-light)}.fyvr12qp:disabled,.fyvr12qp[data-disabled]{color:var(--colors-bsc-light)}.fyvr12qq:focus{color:var(--colors-bsc-light)}.fyvr12qr:hover:not([disabled]){color:var(--colors-bsc-light)}.fyvr12qs[data-state=checked]{color:var(--colors-bsc-light)}.fyvr12qt,.fyvr12qu:active{color:var(--colors-ethereum-dark)}.fyvr12qv:disabled,.fyvr12qv[data-disabled]{color:var(--colors-ethereum-dark)}.fyvr12qw:focus{color:var(--colors-ethereum-dark)}.fyvr12qx:hover:not([disabled]){color:var(--colors-ethereum-dark)}.fyvr12qy[data-state=checked]{color:var(--colors-ethereum-dark)}.fyvr12qz,.fyvr12r0:active{color:var(--colors-ethereum-light)}.fyvr12r1:disabled,.fyvr12r1[data-disabled]{color:var(--colors-ethereum-light)}.fyvr12r2:focus{color:var(--colors-ethereum-light)}.fyvr12r3:hover:not([disabled]){color:var(--colors-ethereum-light)}.fyvr12r4[data-state=checked]{color:var(--colors-ethereum-light)}.fyvr12r5,.fyvr12r6:active{color:var(--colors-gnosis-dark)}.fyvr12r7:disabled,.fyvr12r7[data-disabled]{color:var(--colors-gnosis-dark)}.fyvr12r8:focus{color:var(--colors-gnosis-dark)}.fyvr12r9:hover:not([disabled]){color:var(--colors-gnosis-dark)}.fyvr12ra[data-state=checked]{color:var(--colors-gnosis-dark)}.fyvr12rb,.fyvr12rc:active{color:var(--colors-gnosis-light)}.fyvr12rd:disabled,.fyvr12rd[data-disabled]{color:var(--colors-gnosis-light)}.fyvr12re:focus{color:var(--colors-gnosis-light)}.fyvr12rf:hover:not([disabled]){color:var(--colors-gnosis-light)}.fyvr12rg[data-state=checked]{color:var(--colors-gnosis-light)}.fyvr12rh,.fyvr12ri:active{color:var(--colors-polygon-dark)}.fyvr12rj:disabled,.fyvr12rj[data-disabled]{color:var(--colors-polygon-dark)}.fyvr12rk:focus{color:var(--colors-polygon-dark)}.fyvr12rl:hover:not([disabled]){color:var(--colors-polygon-dark)}.fyvr12rm[data-state=checked]{color:var(--colors-polygon-dark)}.fyvr12rn,.fyvr12ro:active{color:var(--colors-polygon-light)}.fyvr12rp:disabled,.fyvr12rp[data-disabled]{color:var(--colors-polygon-light)}.fyvr12rq:focus{color:var(--colors-polygon-light)}.fyvr12rr:hover:not([disabled]){color:var(--colors-polygon-light)}.fyvr12rs[data-state=checked]{color:var(--colors-polygon-light)}.fyvr12rt,.fyvr12ru:active{color:var(--colors-text100)}.fyvr12rv:disabled,.fyvr12rv[data-disabled]{color:var(--colors-text100)}.fyvr12rw:focus{color:var(--colors-text100)}.fyvr12rx:hover:not([disabled]){color:var(--colors-text100)}.fyvr12ry[data-state=checked]{color:var(--colors-text100)}.fyvr12rz,.fyvr12s0:active{color:var(--colors-text80)}.fyvr12s1:disabled,.fyvr12s1[data-disabled]{color:var(--colors-text80)}.fyvr12s2:focus{color:var(--colors-text80)}.fyvr12s3:hover:not([disabled]){color:var(--colors-text80)}.fyvr12s4[data-state=checked]{color:var(--colors-text80)}.fyvr12s5,.fyvr12s6:active{color:var(--colors-text50)}.fyvr12s7:disabled,.fyvr12s7[data-disabled]{color:var(--colors-text50)}.fyvr12s8:focus{color:var(--colors-text50)}.fyvr12s9:hover:not([disabled]){color:var(--colors-text50)}.fyvr12sa[data-state=checked]{color:var(--colors-text50)}.fyvr12sb,.fyvr12sc:active{color:var(--colors-text-inverse100)}.fyvr12sd:disabled,.fyvr12sd[data-disabled]{color:var(--colors-text-inverse100)}.fyvr12se:focus{color:var(--colors-text-inverse100)}.fyvr12sf:hover:not([disabled]){color:var(--colors-text-inverse100)}.fyvr12sg[data-state=checked]{color:var(--colors-text-inverse100)}.fyvr12sh,.fyvr12si:active{color:var(--colors-background-primary)}.fyvr12sj:disabled,.fyvr12sj[data-disabled]{color:var(--colors-background-primary)}.fyvr12sk:focus{color:var(--colors-background-primary)}.fyvr12sl:hover:not([disabled]){color:var(--colors-background-primary)}.fyvr12sm[data-state=checked]{color:var(--colors-background-primary)}.fyvr12sn,.fyvr12so:active{color:var(--colors-background-secondary)}.fyvr12sp:disabled,.fyvr12sp[data-disabled]{color:var(--colors-background-secondary)}.fyvr12sq:focus{color:var(--colors-background-secondary)}.fyvr12sr:hover:not([disabled]){color:var(--colors-background-secondary)}.fyvr12ss[data-state=checked]{color:var(--colors-background-secondary)}.fyvr12st,.fyvr12su:active{color:var(--colors-background-contrast)}.fyvr12sv:disabled,.fyvr12sv[data-disabled]{color:var(--colors-background-contrast)}.fyvr12sw:focus{color:var(--colors-background-contrast)}.fyvr12sx:hover:not([disabled]){color:var(--colors-background-contrast)}.fyvr12sy[data-state=checked]{color:var(--colors-background-contrast)}.fyvr12sz,.fyvr12t0:active{color:var(--colors-background-muted)}.fyvr12t1:disabled,.fyvr12t1[data-disabled]{color:var(--colors-background-muted)}.fyvr12t2:focus{color:var(--colors-background-muted)}.fyvr12t3:hover:not([disabled]){color:var(--colors-background-muted)}.fyvr12t4[data-state=checked]{color:var(--colors-background-muted)}.fyvr12t5,.fyvr12t6:active{color:var(--colors-background-control)}.fyvr12t7:disabled,.fyvr12t7[data-disabled]{color:var(--colors-background-control)}.fyvr12t8:focus{color:var(--colors-background-control)}.fyvr12t9:hover:not([disabled]){color:var(--colors-background-control)}.fyvr12ta[data-state=checked]{color:var(--colors-background-control)}.fyvr12tb,.fyvr12tc:active{color:var(--colors-background-inverse)}.fyvr12td:disabled,.fyvr12td[data-disabled]{color:var(--colors-background-inverse)}.fyvr12te:focus{color:var(--colors-background-inverse)}.fyvr12tf:hover:not([disabled]){color:var(--colors-background-inverse)}.fyvr12tg[data-state=checked]{color:var(--colors-background-inverse)}.fyvr12th,.fyvr12ti:active{color:var(--colors-background-backdrop)}.fyvr12tj:disabled,.fyvr12tj[data-disabled]{color:var(--colors-background-backdrop)}.fyvr12tk:focus{color:var(--colors-background-backdrop)}.fyvr12tl:hover:not([disabled]){color:var(--colors-background-backdrop)}.fyvr12tm[data-state=checked]{color:var(--colors-background-backdrop)}.fyvr12tn,.fyvr12to:active{color:var(--colors-background-overlay)}.fyvr12tp:disabled,.fyvr12tp[data-disabled]{color:var(--colors-background-overlay)}.fyvr12tq:focus{color:var(--colors-background-overlay)}.fyvr12tr:hover:not([disabled]){color:var(--colors-background-overlay)}.fyvr12ts[data-state=checked]{color:var(--colors-background-overlay)}.fyvr12tt,.fyvr12tu:active{color:var(--colors-background-raised)}.fyvr12tv:disabled,.fyvr12tv[data-disabled]{color:var(--colors-background-raised)}.fyvr12tw:focus{color:var(--colors-background-raised)}.fyvr12tx:hover:not([disabled]){color:var(--colors-background-raised)}.fyvr12ty[data-state=checked]{color:var(--colors-background-raised)}.fyvr12tz,.fyvr12u0:active{color:var(--colors-button-glass)}.fyvr12u1:disabled,.fyvr12u1[data-disabled]{color:var(--colors-button-glass)}.fyvr12u2:focus{color:var(--colors-button-glass)}.fyvr12u3:hover:not([disabled]){color:var(--colors-button-glass)}.fyvr12u4[data-state=checked]{color:var(--colors-button-glass)}.fyvr12u5,.fyvr12u6:active{color:var(--colors-button-emphasis)}.fyvr12u7:disabled,.fyvr12u7[data-disabled]{color:var(--colors-button-emphasis)}.fyvr12u8:focus{color:var(--colors-button-emphasis)}.fyvr12u9:hover:not([disabled]){color:var(--colors-button-emphasis)}.fyvr12ua[data-state=checked]{color:var(--colors-button-emphasis)}.fyvr12ub,.fyvr12uc:active{color:var(--colors-button-inverse)}.fyvr12ud:disabled,.fyvr12ud[data-disabled]{color:var(--colors-button-inverse)}.fyvr12ue:focus{color:var(--colors-button-inverse)}.fyvr12uf:hover:not([disabled]){color:var(--colors-button-inverse)}.fyvr12ug[data-state=checked]{color:var(--colors-button-inverse)}.fyvr12uh,.fyvr12ui:active{color:var(--colors-border-normal)}.fyvr12uj:disabled,.fyvr12uj[data-disabled]{color:var(--colors-border-normal)}.fyvr12uk:focus{color:var(--colors-border-normal)}.fyvr12ul:hover:not([disabled]){color:var(--colors-border-normal)}.fyvr12um[data-state=checked]{color:var(--colors-border-normal)}.fyvr12un,.fyvr12uo:active{color:var(--colors-border-focus)}.fyvr12up:disabled,.fyvr12up[data-disabled]{color:var(--colors-border-focus)}.fyvr12uq:focus{color:var(--colors-border-focus)}.fyvr12ur:hover:not([disabled]){color:var(--colors-border-focus)}.fyvr12us[data-state=checked]{color:var(--colors-border-focus)}.fyvr12ut,.fyvr12uu:active{cursor:default}.fyvr12uv:disabled,.fyvr12uv[data-disabled]{cursor:default}.fyvr12uw:focus{cursor:default}.fyvr12ux:hover:not([disabled]){cursor:default}.fyvr12uy[data-state=checked]{cursor:default}.fyvr12uz,.fyvr12v0:active{cursor:pointer}.fyvr12v1:disabled,.fyvr12v1[data-disabled]{cursor:pointer}.fyvr12v2:focus{cursor:pointer}.fyvr12v3:hover:not([disabled]){cursor:pointer}.fyvr12v4[data-state=checked]{cursor:pointer}.fyvr12v5,.fyvr12v6:active{cursor:text}.fyvr12v7:disabled,.fyvr12v7[data-disabled]{cursor:text}.fyvr12v8:focus{cursor:text}.fyvr12v9:hover:not([disabled]){cursor:text}.fyvr12va[data-state=checked]{cursor:text}.fyvr12vb,.fyvr12vc:active{opacity:var(--opacity-0)}.fyvr12vd:disabled,.fyvr12vd[data-disabled]{opacity:var(--opacity-0)}.fyvr12ve:focus{opacity:var(--opacity-0)}.fyvr12vf:hover:not([disabled]){opacity:var(--opacity-0)}.fyvr12vg[data-state=checked]{opacity:var(--opacity-0)}.fyvr12vh,.fyvr12vi:active{opacity:var(--opacity-50)}.fyvr12vj:disabled,.fyvr12vj[data-disabled]{opacity:var(--opacity-50)}.fyvr12vk:focus{opacity:var(--opacity-50)}.fyvr12vl:hover:not([disabled]){opacity:var(--opacity-50)}.fyvr12vm[data-state=checked]{opacity:var(--opacity-50)}.fyvr12vn,.fyvr12vo:active{opacity:var(--opacity-80)}.fyvr12vp:disabled,.fyvr12vp[data-disabled]{opacity:var(--opacity-80)}.fyvr12vq:focus{opacity:var(--opacity-80)}.fyvr12vr:hover:not([disabled]){opacity:var(--opacity-80)}.fyvr12vs[data-state=checked]{opacity:var(--opacity-80)}.fyvr12vt,.fyvr12vu:active{opacity:var(--opacity-100)}.fyvr12vv:disabled,.fyvr12vv[data-disabled]{opacity:var(--opacity-100)}.fyvr12vw:focus{opacity:var(--opacity-100)}.fyvr12vx:hover:not([disabled]){opacity:var(--opacity-100)}.fyvr12vy[data-state=checked]{opacity:var(--opacity-100)}.fyvr12vz,.fyvr12w0:active{pointer-events:none}.fyvr12w1:disabled,.fyvr12w1[data-disabled]{pointer-events:none}.fyvr12w2:focus{pointer-events:none}.fyvr12w3:hover:not([disabled]){pointer-events:none}.fyvr12w4[data-state=checked]{pointer-events:none}.fyvr12w5,.fyvr12w6:active{pointer-events:auto}.fyvr12w7:disabled,.fyvr12w7[data-disabled]{pointer-events:auto}.fyvr12w8:focus{pointer-events:auto}.fyvr12w9:hover:not([disabled]){pointer-events:auto}.fyvr12wa[data-state=checked]{pointer-events:auto}.fyvr12wb,.fyvr12wc:active{outline:none}.fyvr12wd:disabled,.fyvr12wd[data-disabled]{outline:none}.fyvr12we:focus{outline:none}.fyvr12wf:hover:not([disabled]){outline:none}.fyvr12wg[data-state=checked]{outline:none}.fyvr12wh,.fyvr12wi:active{box-shadow:none}.fyvr12wj:disabled,.fyvr12wj[data-disabled]{box-shadow:none}.fyvr12wk:focus{box-shadow:none}.fyvr12wl:hover:not([disabled]){box-shadow:none}.fyvr12wm[data-state=checked]{box-shadow:none}@media (min-width: 480px){.fyvr11{width:var(--space-0)}.fyvr15{width:var(--space-1)}.fyvr19{width:var(--space-2)}.fyvr1d{width:var(--space-3)}.fyvr1h{width:var(--space-4)}.fyvr1l{width:var(--space-5)}.fyvr1p{width:var(--space-6)}.fyvr1t{width:var(--space-7)}.fyvr1x{width:var(--space-8)}.fyvr111{width:var(--space-9)}.fyvr115{width:var(--space-10)}.fyvr119{width:var(--space-12)}.fyvr11d{width:var(--space-14)}.fyvr11h{width:var(--space-16)}.fyvr11l{width:var(--space-0_25)}.fyvr11p{width:var(--space-0_5)}.fyvr11t{width:var(--space-1_5)}.fyvr11x{width:0}.fyvr121{width:1px}.fyvr125{width:auto}.fyvr129{width:100%}.fyvr12d{width:50%}.fyvr12h{width:33.33333%}.fyvr12l{width:66.66667%}.fyvr12p{width:25%}.fyvr12t{width:75%}.fyvr12x{width:-moz-fit-content;width:fit-content}.fyvr131{width:-moz-max-content;width:max-content}.fyvr135{width:-moz-min-content;width:min-content}.fyvr139{width:100vw}.fyvr13d{width:100vh}.fyvr13h{height:var(--space-0)}.fyvr13l{height:var(--space-1)}.fyvr13p{height:var(--space-2)}.fyvr13t{height:var(--space-3)}.fyvr13x{height:var(--space-4)}.fyvr141{height:var(--space-5)}.fyvr145{height:var(--space-6)}.fyvr149{height:var(--space-7)}.fyvr14d{height:var(--space-8)}.fyvr14h{height:var(--space-9)}.fyvr14l{height:var(--space-10)}.fyvr14p{height:var(--space-12)}.fyvr14t{height:var(--space-14)}.fyvr14x{height:var(--space-16)}.fyvr151{height:var(--space-0_25)}.fyvr155{height:var(--space-0_5)}.fyvr159{height:var(--space-1_5)}.fyvr15d{height:0}.fyvr15h{height:1px}.fyvr15l{height:auto}.fyvr15p{height:100%}.fyvr15t{height:50%}.fyvr15x{height:33.33333%}.fyvr161{height:66.66667%}.fyvr165{height:25%}.fyvr169{height:75%}.fyvr16d{height:-moz-fit-content;height:fit-content}.fyvr16h{height:-moz-max-content;height:max-content}.fyvr16l{height:-moz-min-content;height:min-content}.fyvr16p{height:100vw}.fyvr16t{height:100vh}.fyvr16x{max-width:var(--space-0)}.fyvr171{max-width:var(--space-1)}.fyvr175{max-width:var(--space-2)}.fyvr179{max-width:var(--space-3)}.fyvr17d{max-width:var(--space-4)}.fyvr17h{max-width:var(--space-5)}.fyvr17l{max-width:var(--space-6)}.fyvr17p{max-width:var(--space-7)}.fyvr17t{max-width:var(--space-8)}.fyvr17x{max-width:var(--space-9)}.fyvr181{max-width:var(--space-10)}.fyvr185{max-width:var(--space-12)}.fyvr189{max-width:var(--space-14)}.fyvr18d{max-width:var(--space-16)}.fyvr18h{max-width:var(--space-0_25)}.fyvr18l{max-width:var(--space-0_5)}.fyvr18p{max-width:var(--space-1_5)}.fyvr18t{max-width:0}.fyvr18x{max-width:1px}.fyvr191{max-width:auto}.fyvr195{max-width:100%}.fyvr199{max-width:50%}.fyvr19d{max-width:33.33333%}.fyvr19h{max-width:66.66667%}.fyvr19l{max-width:25%}.fyvr19p{max-width:75%}.fyvr19t{max-width:-moz-fit-content;max-width:fit-content}.fyvr19x{max-width:-moz-max-content;max-width:max-content}.fyvr1a1{max-width:-moz-min-content;max-width:min-content}.fyvr1a5{max-width:100vw}.fyvr1a9{max-width:100vh}.fyvr1ad{max-height:var(--space-0)}.fyvr1ah{max-height:var(--space-1)}.fyvr1al{max-height:var(--space-2)}.fyvr1ap{max-height:var(--space-3)}.fyvr1at{max-height:var(--space-4)}.fyvr1ax{max-height:var(--space-5)}.fyvr1b1{max-height:var(--space-6)}.fyvr1b5{max-height:var(--space-7)}.fyvr1b9{max-height:var(--space-8)}.fyvr1bd{max-height:var(--space-9)}.fyvr1bh{max-height:var(--space-10)}.fyvr1bl{max-height:var(--space-12)}.fyvr1bp{max-height:var(--space-14)}.fyvr1bt{max-height:var(--space-16)}.fyvr1bx{max-height:var(--space-0_25)}.fyvr1c1{max-height:var(--space-0_5)}.fyvr1c5{max-height:var(--space-1_5)}.fyvr1c9{max-height:0}.fyvr1cd{max-height:1px}.fyvr1ch{max-height:auto}.fyvr1cl{max-height:100%}.fyvr1cp{max-height:50%}.fyvr1ct{max-height:33.33333%}.fyvr1cx{max-height:66.66667%}.fyvr1d1{max-height:25%}.fyvr1d5{max-height:75%}.fyvr1d9{max-height:-moz-fit-content;max-height:fit-content}.fyvr1dd{max-height:-moz-max-content;max-height:max-content}.fyvr1dh{max-height:-moz-min-content;max-height:min-content}.fyvr1dl{max-height:100vw}.fyvr1dp{max-height:100vh}.fyvr1dt{min-width:var(--space-0)}.fyvr1dx{min-width:var(--space-1)}.fyvr1e1{min-width:var(--space-2)}.fyvr1e5{min-width:var(--space-3)}.fyvr1e9{min-width:var(--space-4)}.fyvr1ed{min-width:var(--space-5)}.fyvr1eh{min-width:var(--space-6)}.fyvr1el{min-width:var(--space-7)}.fyvr1ep{min-width:var(--space-8)}.fyvr1et{min-width:var(--space-9)}.fyvr1ex{min-width:var(--space-10)}.fyvr1f1{min-width:var(--space-12)}.fyvr1f5{min-width:var(--space-14)}.fyvr1f9{min-width:var(--space-16)}.fyvr1fd{min-width:var(--space-0_25)}.fyvr1fh{min-width:var(--space-0_5)}.fyvr1fl{min-width:var(--space-1_5)}.fyvr1fp{min-width:0}.fyvr1ft{min-width:1px}.fyvr1fx{min-width:auto}.fyvr1g1{min-width:100%}.fyvr1g5{min-width:50%}.fyvr1g9{min-width:33.33333%}.fyvr1gd{min-width:66.66667%}.fyvr1gh{min-width:25%}.fyvr1gl{min-width:75%}.fyvr1gp{min-width:-moz-fit-content;min-width:fit-content}.fyvr1gt{min-width:-moz-max-content;min-width:max-content}.fyvr1gx{min-width:-moz-min-content;min-width:min-content}.fyvr1h1{min-width:100vw}.fyvr1h5{min-width:100vh}.fyvr1h9{min-height:var(--space-0)}.fyvr1hd{min-height:var(--space-1)}.fyvr1hh{min-height:var(--space-2)}.fyvr1hl{min-height:var(--space-3)}.fyvr1hp{min-height:var(--space-4)}.fyvr1ht{min-height:var(--space-5)}.fyvr1hx{min-height:var(--space-6)}.fyvr1i1{min-height:var(--space-7)}.fyvr1i5{min-height:var(--space-8)}.fyvr1i9{min-height:var(--space-9)}.fyvr1id{min-height:var(--space-10)}.fyvr1ih{min-height:var(--space-12)}.fyvr1il{min-height:var(--space-14)}.fyvr1ip{min-height:var(--space-16)}.fyvr1it{min-height:var(--space-0_25)}.fyvr1ix{min-height:var(--space-0_5)}.fyvr1j1{min-height:var(--space-1_5)}.fyvr1j5{min-height:0}.fyvr1j9{min-height:1px}.fyvr1jd{min-height:auto}.fyvr1jh{min-height:100%}.fyvr1jl{min-height:50%}.fyvr1jp{min-height:33.33333%}.fyvr1jt{min-height:66.66667%}.fyvr1jx{min-height:25%}.fyvr1k1{min-height:75%}.fyvr1k5{min-height:-moz-fit-content;min-height:fit-content}.fyvr1k9{min-height:-moz-max-content;min-height:max-content}.fyvr1kd{min-height:-moz-min-content;min-height:min-content}.fyvr1kh{min-height:100vw}.fyvr1kl{min-height:100vh}.fyvr1kp{top:var(--space-0)}.fyvr1kt{top:var(--space-1)}.fyvr1kx{top:var(--space-2)}.fyvr1l1{top:var(--space-3)}.fyvr1l5{top:var(--space-4)}.fyvr1l9{top:var(--space-5)}.fyvr1ld{top:var(--space-6)}.fyvr1lh{top:var(--space-7)}.fyvr1ll{top:var(--space-8)}.fyvr1lp{top:var(--space-9)}.fyvr1lt{top:var(--space-10)}.fyvr1lx{top:var(--space-12)}.fyvr1m1{top:var(--space-14)}.fyvr1m5{top:var(--space-16)}.fyvr1m9{top:var(--space-0_25)}.fyvr1md{top:var(--space-0_5)}.fyvr1mh{top:var(--space-1_5)}.fyvr1ml{top:auto}.fyvr1mp{bottom:var(--space-0)}.fyvr1mt{bottom:var(--space-1)}.fyvr1mx{bottom:var(--space-2)}.fyvr1n1{bottom:var(--space-3)}.fyvr1n5{bottom:var(--space-4)}.fyvr1n9{bottom:var(--space-5)}.fyvr1nd{bottom:var(--space-6)}.fyvr1nh{bottom:var(--space-7)}.fyvr1nl{bottom:var(--space-8)}.fyvr1np{bottom:var(--space-9)}.fyvr1nt{bottom:var(--space-10)}.fyvr1nx{bottom:var(--space-12)}.fyvr1o1{bottom:var(--space-14)}.fyvr1o5{bottom:var(--space-16)}.fyvr1o9{bottom:var(--space-0_25)}.fyvr1od{bottom:var(--space-0_5)}.fyvr1oh{bottom:var(--space-1_5)}.fyvr1ol{bottom:auto}.fyvr1op{left:var(--space-0)}.fyvr1ot{left:var(--space-1)}.fyvr1ox{left:var(--space-2)}.fyvr1p1{left:var(--space-3)}.fyvr1p5{left:var(--space-4)}.fyvr1p9{left:var(--space-5)}.fyvr1pd{left:var(--space-6)}.fyvr1ph{left:var(--space-7)}.fyvr1pl{left:var(--space-8)}.fyvr1pp{left:var(--space-9)}.fyvr1pt{left:var(--space-10)}.fyvr1px{left:var(--space-12)}.fyvr1q1{left:var(--space-14)}.fyvr1q5{left:var(--space-16)}.fyvr1q9{left:var(--space-0_25)}.fyvr1qd{left:var(--space-0_5)}.fyvr1qh{left:var(--space-1_5)}.fyvr1ql{left:auto}.fyvr1qp{right:var(--space-0)}.fyvr1qt{right:var(--space-1)}.fyvr1qx{right:var(--space-2)}.fyvr1r1{right:var(--space-3)}.fyvr1r5{right:var(--space-4)}.fyvr1r9{right:var(--space-5)}.fyvr1rd{right:var(--space-6)}.fyvr1rh{right:var(--space-7)}.fyvr1rl{right:var(--space-8)}.fyvr1rp{right:var(--space-9)}.fyvr1rt{right:var(--space-10)}.fyvr1rx{right:var(--space-12)}.fyvr1s1{right:var(--space-14)}.fyvr1s5{right:var(--space-16)}.fyvr1s9{right:var(--space-0_25)}.fyvr1sd{right:var(--space-0_5)}.fyvr1sh{right:var(--space-1_5)}.fyvr1sl{right:auto}.fyvr1sp{padding-top:var(--space-0)}.fyvr1st{padding-top:var(--space-1)}.fyvr1sx{padding-top:var(--space-2)}.fyvr1t1{padding-top:var(--space-3)}.fyvr1t5{padding-top:var(--space-4)}.fyvr1t9{padding-top:var(--space-5)}.fyvr1td{padding-top:var(--space-6)}.fyvr1th{padding-top:var(--space-7)}.fyvr1tl{padding-top:var(--space-8)}.fyvr1tp{padding-top:var(--space-9)}.fyvr1tt{padding-top:var(--space-10)}.fyvr1tx{padding-top:var(--space-12)}.fyvr1u1{padding-top:var(--space-14)}.fyvr1u5{padding-top:var(--space-16)}.fyvr1u9{padding-top:var(--space-0_25)}.fyvr1ud{padding-top:var(--space-0_5)}.fyvr1uh{padding-top:var(--space-1_5)}.fyvr1ul{padding-bottom:var(--space-0)}.fyvr1up{padding-bottom:var(--space-1)}.fyvr1ut{padding-bottom:var(--space-2)}.fyvr1ux{padding-bottom:var(--space-3)}.fyvr1v1{padding-bottom:var(--space-4)}.fyvr1v5{padding-bottom:var(--space-5)}.fyvr1v9{padding-bottom:var(--space-6)}.fyvr1vd{padding-bottom:var(--space-7)}.fyvr1vh{padding-bottom:var(--space-8)}.fyvr1vl{padding-bottom:var(--space-9)}.fyvr1vp{padding-bottom:var(--space-10)}.fyvr1vt{padding-bottom:var(--space-12)}.fyvr1vx{padding-bottom:var(--space-14)}.fyvr1w1{padding-bottom:var(--space-16)}.fyvr1w5{padding-bottom:var(--space-0_25)}.fyvr1w9{padding-bottom:var(--space-0_5)}.fyvr1wd{padding-bottom:var(--space-1_5)}.fyvr1wh{padding-left:var(--space-0)}.fyvr1wl{padding-left:var(--space-1)}.fyvr1wp{padding-left:var(--space-2)}.fyvr1wt{padding-left:var(--space-3)}.fyvr1wx{padding-left:var(--space-4)}.fyvr1x1{padding-left:var(--space-5)}.fyvr1x5{padding-left:var(--space-6)}.fyvr1x9{padding-left:var(--space-7)}.fyvr1xd{padding-left:var(--space-8)}.fyvr1xh{padding-left:var(--space-9)}.fyvr1xl{padding-left:var(--space-10)}.fyvr1xp{padding-left:var(--space-12)}.fyvr1xt{padding-left:var(--space-14)}.fyvr1xx{padding-left:var(--space-16)}.fyvr1y1{padding-left:var(--space-0_25)}.fyvr1y5{padding-left:var(--space-0_5)}.fyvr1y9{padding-left:var(--space-1_5)}.fyvr1yd{padding-right:var(--space-0)}.fyvr1yh{padding-right:var(--space-1)}.fyvr1yl{padding-right:var(--space-2)}.fyvr1yp{padding-right:var(--space-3)}.fyvr1yt{padding-right:var(--space-4)}.fyvr1yx{padding-right:var(--space-5)}.fyvr1z1{padding-right:var(--space-6)}.fyvr1z5{padding-right:var(--space-7)}.fyvr1z9{padding-right:var(--space-8)}.fyvr1zd{padding-right:var(--space-9)}.fyvr1zh{padding-right:var(--space-10)}.fyvr1zl{padding-right:var(--space-12)}.fyvr1zp{padding-right:var(--space-14)}.fyvr1zt{padding-right:var(--space-16)}.fyvr1zx{padding-right:var(--space-0_25)}.fyvr1101{padding-right:var(--space-0_5)}.fyvr1105{padding-right:var(--space-1_5)}.fyvr1109{margin-top:var(--space-0)}.fyvr110d{margin-top:var(--space-1)}.fyvr110h{margin-top:var(--space-2)}.fyvr110l{margin-top:var(--space-3)}.fyvr110p{margin-top:var(--space-4)}.fyvr110t{margin-top:var(--space-5)}.fyvr110x{margin-top:var(--space-6)}.fyvr1111{margin-top:var(--space-7)}.fyvr1115{margin-top:var(--space-8)}.fyvr1119{margin-top:var(--space-9)}.fyvr111d{margin-top:var(--space-10)}.fyvr111h{margin-top:var(--space-12)}.fyvr111l{margin-top:var(--space-14)}.fyvr111p{margin-top:var(--space-16)}.fyvr111t{margin-top:var(--space-0_25)}.fyvr111x{margin-top:var(--space-0_5)}.fyvr1121{margin-top:var(--space-1_5)}.fyvr1125{margin-top:auto}.fyvr1129{margin-bottom:var(--space-0)}.fyvr112d{margin-bottom:var(--space-1)}.fyvr112h{margin-bottom:var(--space-2)}.fyvr112l{margin-bottom:var(--space-3)}.fyvr112p{margin-bottom:var(--space-4)}.fyvr112t{margin-bottom:var(--space-5)}.fyvr112x{margin-bottom:var(--space-6)}.fyvr1131{margin-bottom:var(--space-7)}.fyvr1135{margin-bottom:var(--space-8)}.fyvr1139{margin-bottom:var(--space-9)}.fyvr113d{margin-bottom:var(--space-10)}.fyvr113h{margin-bottom:var(--space-12)}.fyvr113l{margin-bottom:var(--space-14)}.fyvr113p{margin-bottom:var(--space-16)}.fyvr113t{margin-bottom:var(--space-0_25)}.fyvr113x{margin-bottom:var(--space-0_5)}.fyvr1141{margin-bottom:var(--space-1_5)}.fyvr1145{margin-bottom:auto}.fyvr1149{margin-left:var(--space-0)}.fyvr114d{margin-left:var(--space-1)}.fyvr114h{margin-left:var(--space-2)}.fyvr114l{margin-left:var(--space-3)}.fyvr114p{margin-left:var(--space-4)}.fyvr114t{margin-left:var(--space-5)}.fyvr114x{margin-left:var(--space-6)}.fyvr1151{margin-left:var(--space-7)}.fyvr1155{margin-left:var(--space-8)}.fyvr1159{margin-left:var(--space-9)}.fyvr115d{margin-left:var(--space-10)}.fyvr115h{margin-left:var(--space-12)}.fyvr115l{margin-left:var(--space-14)}.fyvr115p{margin-left:var(--space-16)}.fyvr115t{margin-left:var(--space-0_25)}.fyvr115x{margin-left:var(--space-0_5)}.fyvr1161{margin-left:var(--space-1_5)}.fyvr1165{margin-left:auto}.fyvr1169{margin-right:var(--space-0)}.fyvr116d{margin-right:var(--space-1)}.fyvr116h{margin-right:var(--space-2)}.fyvr116l{margin-right:var(--space-3)}.fyvr116p{margin-right:var(--space-4)}.fyvr116t{margin-right:var(--space-5)}.fyvr116x{margin-right:var(--space-6)}.fyvr1171{margin-right:var(--space-7)}.fyvr1175{margin-right:var(--space-8)}.fyvr1179{margin-right:var(--space-9)}.fyvr117d{margin-right:var(--space-10)}.fyvr117h{margin-right:var(--space-12)}.fyvr117l{margin-right:var(--space-14)}.fyvr117p{margin-right:var(--space-16)}.fyvr117t{margin-right:var(--space-0_25)}.fyvr117x{margin-right:var(--space-0_5)}.fyvr1181{margin-right:var(--space-1_5)}.fyvr1185{margin-right:auto}.fyvr1189{gap:var(--space-0)}.fyvr118d{gap:var(--space-1)}.fyvr118h{gap:var(--space-2)}.fyvr118l{gap:var(--space-3)}.fyvr118p{gap:var(--space-4)}.fyvr118t{gap:var(--space-5)}.fyvr118x{gap:var(--space-6)}.fyvr1191{gap:var(--space-7)}.fyvr1195{gap:var(--space-8)}.fyvr1199{gap:var(--space-9)}.fyvr119d{gap:var(--space-10)}.fyvr119h{gap:var(--space-12)}.fyvr119l{gap:var(--space-14)}.fyvr119p{gap:var(--space-16)}.fyvr119t{gap:var(--space-0_25)}.fyvr119x{gap:var(--space-0_5)}.fyvr11a1{gap:var(--space-1_5)}.fyvr11a5{border-bottom-width:var(--border-widths-none)}.fyvr11a9{border-bottom-width:var(--border-widths-thin)}.fyvr11ad{border-bottom-width:var(--border-widths-thick)}.fyvr11ah{border-left-width:var(--border-widths-none)}.fyvr11al{border-left-width:var(--border-widths-thin)}.fyvr11ap{border-left-width:var(--border-widths-thick)}.fyvr11at{border-right-width:var(--border-widths-none)}.fyvr11ax{border-right-width:var(--border-widths-thin)}.fyvr11b1{border-right-width:var(--border-widths-thick)}.fyvr11b5{border-top-width:var(--border-widths-none)}.fyvr11b9{border-top-width:var(--border-widths-thin)}.fyvr11bd{border-top-width:var(--border-widths-thick)}.fyvr11bh{border-bottom-left-radius:var(--radii-none)}.fyvr11bl{border-bottom-left-radius:var(--radii-xs)}.fyvr11bp{border-bottom-left-radius:var(--radii-sm)}.fyvr11bt{border-bottom-left-radius:var(--radii-md)}.fyvr11bx{border-bottom-left-radius:var(--radii-lg)}.fyvr11c1{border-bottom-left-radius:var(--radii-circle)}.fyvr11c5{border-bottom-right-radius:var(--radii-none)}.fyvr11c9{border-bottom-right-radius:var(--radii-xs)}.fyvr11cd{border-bottom-right-radius:var(--radii-sm)}.fyvr11ch{border-bottom-right-radius:var(--radii-md)}.fyvr11cl{border-bottom-right-radius:var(--radii-lg)}.fyvr11cp{border-bottom-right-radius:var(--radii-circle)}.fyvr11ct{border-top-left-radius:var(--radii-none)}.fyvr11cx{border-top-left-radius:var(--radii-xs)}.fyvr11d1{border-top-left-radius:var(--radii-sm)}.fyvr11d5{border-top-left-radius:var(--radii-md)}.fyvr11d9{border-top-left-radius:var(--radii-lg)}.fyvr11dd{border-top-left-radius:var(--radii-circle)}.fyvr11dh{border-top-right-radius:var(--radii-none)}.fyvr11dl{border-top-right-radius:var(--radii-xs)}.fyvr11dp{border-top-right-radius:var(--radii-sm)}.fyvr11dt{border-top-right-radius:var(--radii-md)}.fyvr11dx{border-top-right-radius:var(--radii-lg)}.fyvr11e1{border-top-right-radius:var(--radii-circle)}.fyvr11e5{font-size:var(--font-sizes-inherit)}.fyvr11e9{font-size:var(--font-sizes-xsmall)}.fyvr11ed{font-size:var(--font-sizes-small)}.fyvr11eh{font-size:var(--font-sizes-normal)}.fyvr11el{font-size:var(--font-sizes-medium)}.fyvr11ep{font-size:var(--font-sizes-large)}.fyvr11et{font-size:var(--font-sizes-xlarge)}.fyvr11ex{font-weight:var(--font-weights-inherit)}.fyvr11f1{font-weight:var(--font-weights-normal)}.fyvr11f5{font-weight:var(--font-weights-medium)}.fyvr11f9{font-weight:var(--font-weights-semibold)}.fyvr11fd{font-weight:var(--font-weights-bold)}.fyvr11fh{letter-spacing:var(--letter-spacings-inherit)}.fyvr11fl{letter-spacing:var(--letter-spacings-none)}.fyvr11fp{letter-spacing:var(--letter-spacings-normal)}.fyvr11ft{letter-spacing:var(--letter-spacings-wide)}.fyvr11fx{line-height:var(--line-heights-4)}.fyvr11g1{line-height:var(--line-heights-5)}.fyvr11g5{line-height:var(--line-heights-6)}.fyvr11g9{line-height:var(--line-heights-7)}.fyvr11gd{line-height:var(--line-heights-9)}.fyvr11gh{line-height:var(--line-heights-inherit)}.fyvr11gl{text-align:center}.fyvr11gp{text-align:left}.fyvr11gt{text-align:right}.fyvr11gx{display:block}.fyvr11h1{display:flex}.fyvr11h5{display:grid}.fyvr11h9{display:inline-block}.fyvr11hd{display:inline-flex}.fyvr11hh{display:none}.fyvr11hl{display:contents}.fyvr11hp{position:absolute}.fyvr11ht{position:fixed}.fyvr11hx{position:relative}.fyvr11i1{position:sticky}.fyvr11i5{flex-direction:column}.fyvr11i9{flex-direction:column-reverse}.fyvr11id{flex-direction:row}.fyvr11ih{flex-direction:row-reverse}.fyvr11il{flex-shrink:0}.fyvr11ip{flex-shrink:1}.fyvr11it{flex-grow:0}.fyvr11ix{flex-grow:1}.fyvr11j1{flex-wrap:nowrap}.fyvr11j5{flex-wrap:wrap}.fyvr11j9{flex-wrap:wrap-reverse}.fyvr11jd{justify-content:flex-start}.fyvr11jh{justify-content:center}.fyvr11jl{justify-content:flex-end}.fyvr11jp{justify-content:stretch}.fyvr11jt{justify-content:space-around}.fyvr11jx{justify-content:space-between}.fyvr11k1{justify-content:space-evenly}.fyvr11k5{justify-self:flex-start}.fyvr11k9{justify-self:center}.fyvr11kd{justify-self:flex-end}.fyvr11kh{justify-self:stretch}.fyvr11kl{align-items:flex-start}.fyvr11kp{align-items:center}.fyvr11kt{align-items:flex-end}.fyvr11kx{align-items:stretch}.fyvr11l1{align-items:baseline}.fyvr11l5{align-self:flex-start}.fyvr11l9{align-self:center}.fyvr11ld{align-self:flex-end}.fyvr11lh{align-self:stretch}.fyvr11ll{align-self:baseline}.fyvr11lp{overflow-x:auto}.fyvr11lt{overflow-x:hidden}.fyvr11lx{overflow-x:scroll}.fyvr11m1{overflow-x:visible}.fyvr11m5{overflow-y:auto}.fyvr11m9{overflow-y:hidden}.fyvr11md{overflow-y:scroll}.fyvr11mh{overflow-y:visible}.fyvr11ml{visibility:hidden}.fyvr11mp{visibility:visible}}@media (min-width: 769px){.fyvr12{width:var(--space-0)}.fyvr16{width:var(--space-1)}.fyvr1a{width:var(--space-2)}.fyvr1e{width:var(--space-3)}.fyvr1i{width:var(--space-4)}.fyvr1m{width:var(--space-5)}.fyvr1q{width:var(--space-6)}.fyvr1u{width:var(--space-7)}.fyvr1y{width:var(--space-8)}.fyvr112{width:var(--space-9)}.fyvr116{width:var(--space-10)}.fyvr11a{width:var(--space-12)}.fyvr11e{width:var(--space-14)}.fyvr11i{width:var(--space-16)}.fyvr11m{width:var(--space-0_25)}.fyvr11q{width:var(--space-0_5)}.fyvr11u{width:var(--space-1_5)}.fyvr11y{width:0}.fyvr122{width:1px}.fyvr126{width:auto}.fyvr12a{width:100%}.fyvr12e{width:50%}.fyvr12i{width:33.33333%}.fyvr12m{width:66.66667%}.fyvr12q{width:25%}.fyvr12u{width:75%}.fyvr12y{width:-moz-fit-content;width:fit-content}.fyvr132{width:-moz-max-content;width:max-content}.fyvr136{width:-moz-min-content;width:min-content}.fyvr13a{width:100vw}.fyvr13e{width:100vh}.fyvr13i{height:var(--space-0)}.fyvr13m{height:var(--space-1)}.fyvr13q{height:var(--space-2)}.fyvr13u{height:var(--space-3)}.fyvr13y{height:var(--space-4)}.fyvr142{height:var(--space-5)}.fyvr146{height:var(--space-6)}.fyvr14a{height:var(--space-7)}.fyvr14e{height:var(--space-8)}.fyvr14i{height:var(--space-9)}.fyvr14m{height:var(--space-10)}.fyvr14q{height:var(--space-12)}.fyvr14u{height:var(--space-14)}.fyvr14y{height:var(--space-16)}.fyvr152{height:var(--space-0_25)}.fyvr156{height:var(--space-0_5)}.fyvr15a{height:var(--space-1_5)}.fyvr15e{height:0}.fyvr15i{height:1px}.fyvr15m{height:auto}.fyvr15q{height:100%}.fyvr15u{height:50%}.fyvr15y{height:33.33333%}.fyvr162{height:66.66667%}.fyvr166{height:25%}.fyvr16a{height:75%}.fyvr16e{height:-moz-fit-content;height:fit-content}.fyvr16i{height:-moz-max-content;height:max-content}.fyvr16m{height:-moz-min-content;height:min-content}.fyvr16q{height:100vw}.fyvr16u{height:100vh}.fyvr16y{max-width:var(--space-0)}.fyvr172{max-width:var(--space-1)}.fyvr176{max-width:var(--space-2)}.fyvr17a{max-width:var(--space-3)}.fyvr17e{max-width:var(--space-4)}.fyvr17i{max-width:var(--space-5)}.fyvr17m{max-width:var(--space-6)}.fyvr17q{max-width:var(--space-7)}.fyvr17u{max-width:var(--space-8)}.fyvr17y{max-width:var(--space-9)}.fyvr182{max-width:var(--space-10)}.fyvr186{max-width:var(--space-12)}.fyvr18a{max-width:var(--space-14)}.fyvr18e{max-width:var(--space-16)}.fyvr18i{max-width:var(--space-0_25)}.fyvr18m{max-width:var(--space-0_5)}.fyvr18q{max-width:var(--space-1_5)}.fyvr18u{max-width:0}.fyvr18y{max-width:1px}.fyvr192{max-width:auto}.fyvr196{max-width:100%}.fyvr19a{max-width:50%}.fyvr19e{max-width:33.33333%}.fyvr19i{max-width:66.66667%}.fyvr19m{max-width:25%}.fyvr19q{max-width:75%}.fyvr19u{max-width:-moz-fit-content;max-width:fit-content}.fyvr19y{max-width:-moz-max-content;max-width:max-content}.fyvr1a2{max-width:-moz-min-content;max-width:min-content}.fyvr1a6{max-width:100vw}.fyvr1aa{max-width:100vh}.fyvr1ae{max-height:var(--space-0)}.fyvr1ai{max-height:var(--space-1)}.fyvr1am{max-height:var(--space-2)}.fyvr1aq{max-height:var(--space-3)}.fyvr1au{max-height:var(--space-4)}.fyvr1ay{max-height:var(--space-5)}.fyvr1b2{max-height:var(--space-6)}.fyvr1b6{max-height:var(--space-7)}.fyvr1ba{max-height:var(--space-8)}.fyvr1be{max-height:var(--space-9)}.fyvr1bi{max-height:var(--space-10)}.fyvr1bm{max-height:var(--space-12)}.fyvr1bq{max-height:var(--space-14)}.fyvr1bu{max-height:var(--space-16)}.fyvr1by{max-height:var(--space-0_25)}.fyvr1c2{max-height:var(--space-0_5)}.fyvr1c6{max-height:var(--space-1_5)}.fyvr1ca{max-height:0}.fyvr1ce{max-height:1px}.fyvr1ci{max-height:auto}.fyvr1cm{max-height:100%}.fyvr1cq{max-height:50%}.fyvr1cu{max-height:33.33333%}.fyvr1cy{max-height:66.66667%}.fyvr1d2{max-height:25%}.fyvr1d6{max-height:75%}.fyvr1da{max-height:-moz-fit-content;max-height:fit-content}.fyvr1de{max-height:-moz-max-content;max-height:max-content}.fyvr1di{max-height:-moz-min-content;max-height:min-content}.fyvr1dm{max-height:100vw}.fyvr1dq{max-height:100vh}.fyvr1du{min-width:var(--space-0)}.fyvr1dy{min-width:var(--space-1)}.fyvr1e2{min-width:var(--space-2)}.fyvr1e6{min-width:var(--space-3)}.fyvr1ea{min-width:var(--space-4)}.fyvr1ee{min-width:var(--space-5)}.fyvr1ei{min-width:var(--space-6)}.fyvr1em{min-width:var(--space-7)}.fyvr1eq{min-width:var(--space-8)}.fyvr1eu{min-width:var(--space-9)}.fyvr1ey{min-width:var(--space-10)}.fyvr1f2{min-width:var(--space-12)}.fyvr1f6{min-width:var(--space-14)}.fyvr1fa{min-width:var(--space-16)}.fyvr1fe{min-width:var(--space-0_25)}.fyvr1fi{min-width:var(--space-0_5)}.fyvr1fm{min-width:var(--space-1_5)}.fyvr1fq{min-width:0}.fyvr1fu{min-width:1px}.fyvr1fy{min-width:auto}.fyvr1g2{min-width:100%}.fyvr1g6{min-width:50%}.fyvr1ga{min-width:33.33333%}.fyvr1ge{min-width:66.66667%}.fyvr1gi{min-width:25%}.fyvr1gm{min-width:75%}.fyvr1gq{min-width:-moz-fit-content;min-width:fit-content}.fyvr1gu{min-width:-moz-max-content;min-width:max-content}.fyvr1gy{min-width:-moz-min-content;min-width:min-content}.fyvr1h2{min-width:100vw}.fyvr1h6{min-width:100vh}.fyvr1ha{min-height:var(--space-0)}.fyvr1he{min-height:var(--space-1)}.fyvr1hi{min-height:var(--space-2)}.fyvr1hm{min-height:var(--space-3)}.fyvr1hq{min-height:var(--space-4)}.fyvr1hu{min-height:var(--space-5)}.fyvr1hy{min-height:var(--space-6)}.fyvr1i2{min-height:var(--space-7)}.fyvr1i6{min-height:var(--space-8)}.fyvr1ia{min-height:var(--space-9)}.fyvr1ie{min-height:var(--space-10)}.fyvr1ii{min-height:var(--space-12)}.fyvr1im{min-height:var(--space-14)}.fyvr1iq{min-height:var(--space-16)}.fyvr1iu{min-height:var(--space-0_25)}.fyvr1iy{min-height:var(--space-0_5)}.fyvr1j2{min-height:var(--space-1_5)}.fyvr1j6{min-height:0}.fyvr1ja{min-height:1px}.fyvr1je{min-height:auto}.fyvr1ji{min-height:100%}.fyvr1jm{min-height:50%}.fyvr1jq{min-height:33.33333%}.fyvr1ju{min-height:66.66667%}.fyvr1jy{min-height:25%}.fyvr1k2{min-height:75%}.fyvr1k6{min-height:-moz-fit-content;min-height:fit-content}.fyvr1ka{min-height:-moz-max-content;min-height:max-content}.fyvr1ke{min-height:-moz-min-content;min-height:min-content}.fyvr1ki{min-height:100vw}.fyvr1km{min-height:100vh}.fyvr1kq{top:var(--space-0)}.fyvr1ku{top:var(--space-1)}.fyvr1ky{top:var(--space-2)}.fyvr1l2{top:var(--space-3)}.fyvr1l6{top:var(--space-4)}.fyvr1la{top:var(--space-5)}.fyvr1le{top:var(--space-6)}.fyvr1li{top:var(--space-7)}.fyvr1lm{top:var(--space-8)}.fyvr1lq{top:var(--space-9)}.fyvr1lu{top:var(--space-10)}.fyvr1ly{top:var(--space-12)}.fyvr1m2{top:var(--space-14)}.fyvr1m6{top:var(--space-16)}.fyvr1ma{top:var(--space-0_25)}.fyvr1me{top:var(--space-0_5)}.fyvr1mi{top:var(--space-1_5)}.fyvr1mm{top:auto}.fyvr1mq{bottom:var(--space-0)}.fyvr1mu{bottom:var(--space-1)}.fyvr1my{bottom:var(--space-2)}.fyvr1n2{bottom:var(--space-3)}.fyvr1n6{bottom:var(--space-4)}.fyvr1na{bottom:var(--space-5)}.fyvr1ne{bottom:var(--space-6)}.fyvr1ni{bottom:var(--space-7)}.fyvr1nm{bottom:var(--space-8)}.fyvr1nq{bottom:var(--space-9)}.fyvr1nu{bottom:var(--space-10)}.fyvr1ny{bottom:var(--space-12)}.fyvr1o2{bottom:var(--space-14)}.fyvr1o6{bottom:var(--space-16)}.fyvr1oa{bottom:var(--space-0_25)}.fyvr1oe{bottom:var(--space-0_5)}.fyvr1oi{bottom:var(--space-1_5)}.fyvr1om{bottom:auto}.fyvr1oq{left:var(--space-0)}.fyvr1ou{left:var(--space-1)}.fyvr1oy{left:var(--space-2)}.fyvr1p2{left:var(--space-3)}.fyvr1p6{left:var(--space-4)}.fyvr1pa{left:var(--space-5)}.fyvr1pe{left:var(--space-6)}.fyvr1pi{left:var(--space-7)}.fyvr1pm{left:var(--space-8)}.fyvr1pq{left:var(--space-9)}.fyvr1pu{left:var(--space-10)}.fyvr1py{left:var(--space-12)}.fyvr1q2{left:var(--space-14)}.fyvr1q6{left:var(--space-16)}.fyvr1qa{left:var(--space-0_25)}.fyvr1qe{left:var(--space-0_5)}.fyvr1qi{left:var(--space-1_5)}.fyvr1qm{left:auto}.fyvr1qq{right:var(--space-0)}.fyvr1qu{right:var(--space-1)}.fyvr1qy{right:var(--space-2)}.fyvr1r2{right:var(--space-3)}.fyvr1r6{right:var(--space-4)}.fyvr1ra{right:var(--space-5)}.fyvr1re{right:var(--space-6)}.fyvr1ri{right:var(--space-7)}.fyvr1rm{right:var(--space-8)}.fyvr1rq{right:var(--space-9)}.fyvr1ru{right:var(--space-10)}.fyvr1ry{right:var(--space-12)}.fyvr1s2{right:var(--space-14)}.fyvr1s6{right:var(--space-16)}.fyvr1sa{right:var(--space-0_25)}.fyvr1se{right:var(--space-0_5)}.fyvr1si{right:var(--space-1_5)}.fyvr1sm{right:auto}.fyvr1sq{padding-top:var(--space-0)}.fyvr1su{padding-top:var(--space-1)}.fyvr1sy{padding-top:var(--space-2)}.fyvr1t2{padding-top:var(--space-3)}.fyvr1t6{padding-top:var(--space-4)}.fyvr1ta{padding-top:var(--space-5)}.fyvr1te{padding-top:var(--space-6)}.fyvr1ti{padding-top:var(--space-7)}.fyvr1tm{padding-top:var(--space-8)}.fyvr1tq{padding-top:var(--space-9)}.fyvr1tu{padding-top:var(--space-10)}.fyvr1ty{padding-top:var(--space-12)}.fyvr1u2{padding-top:var(--space-14)}.fyvr1u6{padding-top:var(--space-16)}.fyvr1ua{padding-top:var(--space-0_25)}.fyvr1ue{padding-top:var(--space-0_5)}.fyvr1ui{padding-top:var(--space-1_5)}.fyvr1um{padding-bottom:var(--space-0)}.fyvr1uq{padding-bottom:var(--space-1)}.fyvr1uu{padding-bottom:var(--space-2)}.fyvr1uy{padding-bottom:var(--space-3)}.fyvr1v2{padding-bottom:var(--space-4)}.fyvr1v6{padding-bottom:var(--space-5)}.fyvr1va{padding-bottom:var(--space-6)}.fyvr1ve{padding-bottom:var(--space-7)}.fyvr1vi{padding-bottom:var(--space-8)}.fyvr1vm{padding-bottom:var(--space-9)}.fyvr1vq{padding-bottom:var(--space-10)}.fyvr1vu{padding-bottom:var(--space-12)}.fyvr1vy{padding-bottom:var(--space-14)}.fyvr1w2{padding-bottom:var(--space-16)}.fyvr1w6{padding-bottom:var(--space-0_25)}.fyvr1wa{padding-bottom:var(--space-0_5)}.fyvr1we{padding-bottom:var(--space-1_5)}.fyvr1wi{padding-left:var(--space-0)}.fyvr1wm{padding-left:var(--space-1)}.fyvr1wq{padding-left:var(--space-2)}.fyvr1wu{padding-left:var(--space-3)}.fyvr1wy{padding-left:var(--space-4)}.fyvr1x2{padding-left:var(--space-5)}.fyvr1x6{padding-left:var(--space-6)}.fyvr1xa{padding-left:var(--space-7)}.fyvr1xe{padding-left:var(--space-8)}.fyvr1xi{padding-left:var(--space-9)}.fyvr1xm{padding-left:var(--space-10)}.fyvr1xq{padding-left:var(--space-12)}.fyvr1xu{padding-left:var(--space-14)}.fyvr1xy{padding-left:var(--space-16)}.fyvr1y2{padding-left:var(--space-0_25)}.fyvr1y6{padding-left:var(--space-0_5)}.fyvr1ya{padding-left:var(--space-1_5)}.fyvr1ye{padding-right:var(--space-0)}.fyvr1yi{padding-right:var(--space-1)}.fyvr1ym{padding-right:var(--space-2)}.fyvr1yq{padding-right:var(--space-3)}.fyvr1yu{padding-right:var(--space-4)}.fyvr1yy{padding-right:var(--space-5)}.fyvr1z2{padding-right:var(--space-6)}.fyvr1z6{padding-right:var(--space-7)}.fyvr1za{padding-right:var(--space-8)}.fyvr1ze{padding-right:var(--space-9)}.fyvr1zi{padding-right:var(--space-10)}.fyvr1zm{padding-right:var(--space-12)}.fyvr1zq{padding-right:var(--space-14)}.fyvr1zu{padding-right:var(--space-16)}.fyvr1zy{padding-right:var(--space-0_25)}.fyvr1102{padding-right:var(--space-0_5)}.fyvr1106{padding-right:var(--space-1_5)}.fyvr110a{margin-top:var(--space-0)}.fyvr110e{margin-top:var(--space-1)}.fyvr110i{margin-top:var(--space-2)}.fyvr110m{margin-top:var(--space-3)}.fyvr110q{margin-top:var(--space-4)}.fyvr110u{margin-top:var(--space-5)}.fyvr110y{margin-top:var(--space-6)}.fyvr1112{margin-top:var(--space-7)}.fyvr1116{margin-top:var(--space-8)}.fyvr111a{margin-top:var(--space-9)}.fyvr111e{margin-top:var(--space-10)}.fyvr111i{margin-top:var(--space-12)}.fyvr111m{margin-top:var(--space-14)}.fyvr111q{margin-top:var(--space-16)}.fyvr111u{margin-top:var(--space-0_25)}.fyvr111y{margin-top:var(--space-0_5)}.fyvr1122{margin-top:var(--space-1_5)}.fyvr1126{margin-top:auto}.fyvr112a{margin-bottom:var(--space-0)}.fyvr112e{margin-bottom:var(--space-1)}.fyvr112i{margin-bottom:var(--space-2)}.fyvr112m{margin-bottom:var(--space-3)}.fyvr112q{margin-bottom:var(--space-4)}.fyvr112u{margin-bottom:var(--space-5)}.fyvr112y{margin-bottom:var(--space-6)}.fyvr1132{margin-bottom:var(--space-7)}.fyvr1136{margin-bottom:var(--space-8)}.fyvr113a{margin-bottom:var(--space-9)}.fyvr113e{margin-bottom:var(--space-10)}.fyvr113i{margin-bottom:var(--space-12)}.fyvr113m{margin-bottom:var(--space-14)}.fyvr113q{margin-bottom:var(--space-16)}.fyvr113u{margin-bottom:var(--space-0_25)}.fyvr113y{margin-bottom:var(--space-0_5)}.fyvr1142{margin-bottom:var(--space-1_5)}.fyvr1146{margin-bottom:auto}.fyvr114a{margin-left:var(--space-0)}.fyvr114e{margin-left:var(--space-1)}.fyvr114i{margin-left:var(--space-2)}.fyvr114m{margin-left:var(--space-3)}.fyvr114q{margin-left:var(--space-4)}.fyvr114u{margin-left:var(--space-5)}.fyvr114y{margin-left:var(--space-6)}.fyvr1152{margin-left:var(--space-7)}.fyvr1156{margin-left:var(--space-8)}.fyvr115a{margin-left:var(--space-9)}.fyvr115e{margin-left:var(--space-10)}.fyvr115i{margin-left:var(--space-12)}.fyvr115m{margin-left:var(--space-14)}.fyvr115q{margin-left:var(--space-16)}.fyvr115u{margin-left:var(--space-0_25)}.fyvr115y{margin-left:var(--space-0_5)}.fyvr1162{margin-left:var(--space-1_5)}.fyvr1166{margin-left:auto}.fyvr116a{margin-right:var(--space-0)}.fyvr116e{margin-right:var(--space-1)}.fyvr116i{margin-right:var(--space-2)}.fyvr116m{margin-right:var(--space-3)}.fyvr116q{margin-right:var(--space-4)}.fyvr116u{margin-right:var(--space-5)}.fyvr116y{margin-right:var(--space-6)}.fyvr1172{margin-right:var(--space-7)}.fyvr1176{margin-right:var(--space-8)}.fyvr117a{margin-right:var(--space-9)}.fyvr117e{margin-right:var(--space-10)}.fyvr117i{margin-right:var(--space-12)}.fyvr117m{margin-right:var(--space-14)}.fyvr117q{margin-right:var(--space-16)}.fyvr117u{margin-right:var(--space-0_25)}.fyvr117y{margin-right:var(--space-0_5)}.fyvr1182{margin-right:var(--space-1_5)}.fyvr1186{margin-right:auto}.fyvr118a{gap:var(--space-0)}.fyvr118e{gap:var(--space-1)}.fyvr118i{gap:var(--space-2)}.fyvr118m{gap:var(--space-3)}.fyvr118q{gap:var(--space-4)}.fyvr118u{gap:var(--space-5)}.fyvr118y{gap:var(--space-6)}.fyvr1192{gap:var(--space-7)}.fyvr1196{gap:var(--space-8)}.fyvr119a{gap:var(--space-9)}.fyvr119e{gap:var(--space-10)}.fyvr119i{gap:var(--space-12)}.fyvr119m{gap:var(--space-14)}.fyvr119q{gap:var(--space-16)}.fyvr119u{gap:var(--space-0_25)}.fyvr119y{gap:var(--space-0_5)}.fyvr11a2{gap:var(--space-1_5)}.fyvr11a6{border-bottom-width:var(--border-widths-none)}.fyvr11aa{border-bottom-width:var(--border-widths-thin)}.fyvr11ae{border-bottom-width:var(--border-widths-thick)}.fyvr11ai{border-left-width:var(--border-widths-none)}.fyvr11am{border-left-width:var(--border-widths-thin)}.fyvr11aq{border-left-width:var(--border-widths-thick)}.fyvr11au{border-right-width:var(--border-widths-none)}.fyvr11ay{border-right-width:var(--border-widths-thin)}.fyvr11b2{border-right-width:var(--border-widths-thick)}.fyvr11b6{border-top-width:var(--border-widths-none)}.fyvr11ba{border-top-width:var(--border-widths-thin)}.fyvr11be{border-top-width:var(--border-widths-thick)}.fyvr11bi{border-bottom-left-radius:var(--radii-none)}.fyvr11bm{border-bottom-left-radius:var(--radii-xs)}.fyvr11bq{border-bottom-left-radius:var(--radii-sm)}.fyvr11bu{border-bottom-left-radius:var(--radii-md)}.fyvr11by{border-bottom-left-radius:var(--radii-lg)}.fyvr11c2{border-bottom-left-radius:var(--radii-circle)}.fyvr11c6{border-bottom-right-radius:var(--radii-none)}.fyvr11ca{border-bottom-right-radius:var(--radii-xs)}.fyvr11ce{border-bottom-right-radius:var(--radii-sm)}.fyvr11ci{border-bottom-right-radius:var(--radii-md)}.fyvr11cm{border-bottom-right-radius:var(--radii-lg)}.fyvr11cq{border-bottom-right-radius:var(--radii-circle)}.fyvr11cu{border-top-left-radius:var(--radii-none)}.fyvr11cy{border-top-left-radius:var(--radii-xs)}.fyvr11d2{border-top-left-radius:var(--radii-sm)}.fyvr11d6{border-top-left-radius:var(--radii-md)}.fyvr11da{border-top-left-radius:var(--radii-lg)}.fyvr11de{border-top-left-radius:var(--radii-circle)}.fyvr11di{border-top-right-radius:var(--radii-none)}.fyvr11dm{border-top-right-radius:var(--radii-xs)}.fyvr11dq{border-top-right-radius:var(--radii-sm)}.fyvr11du{border-top-right-radius:var(--radii-md)}.fyvr11dy{border-top-right-radius:var(--radii-lg)}.fyvr11e2{border-top-right-radius:var(--radii-circle)}.fyvr11e6{font-size:var(--font-sizes-inherit)}.fyvr11ea{font-size:var(--font-sizes-xsmall)}.fyvr11ee{font-size:var(--font-sizes-small)}.fyvr11ei{font-size:var(--font-sizes-normal)}.fyvr11em{font-size:var(--font-sizes-medium)}.fyvr11eq{font-size:var(--font-sizes-large)}.fyvr11eu{font-size:var(--font-sizes-xlarge)}.fyvr11ey{font-weight:var(--font-weights-inherit)}.fyvr11f2{font-weight:var(--font-weights-normal)}.fyvr11f6{font-weight:var(--font-weights-medium)}.fyvr11fa{font-weight:var(--font-weights-semibold)}.fyvr11fe{font-weight:var(--font-weights-bold)}.fyvr11fi{letter-spacing:var(--letter-spacings-inherit)}.fyvr11fm{letter-spacing:var(--letter-spacings-none)}.fyvr11fq{letter-spacing:var(--letter-spacings-normal)}.fyvr11fu{letter-spacing:var(--letter-spacings-wide)}.fyvr11fy{line-height:var(--line-heights-4)}.fyvr11g2{line-height:var(--line-heights-5)}.fyvr11g6{line-height:var(--line-heights-6)}.fyvr11ga{line-height:var(--line-heights-7)}.fyvr11ge{line-height:var(--line-heights-9)}.fyvr11gi{line-height:var(--line-heights-inherit)}.fyvr11gm{text-align:center}.fyvr11gq{text-align:left}.fyvr11gu{text-align:right}.fyvr11gy{display:block}.fyvr11h2{display:flex}.fyvr11h6{display:grid}.fyvr11ha{display:inline-block}.fyvr11he{display:inline-flex}.fyvr11hi{display:none}.fyvr11hm{display:contents}.fyvr11hq{position:absolute}.fyvr11hu{position:fixed}.fyvr11hy{position:relative}.fyvr11i2{position:sticky}.fyvr11i6{flex-direction:column}.fyvr11ia{flex-direction:column-reverse}.fyvr11ie{flex-direction:row}.fyvr11ii{flex-direction:row-reverse}.fyvr11im{flex-shrink:0}.fyvr11iq{flex-shrink:1}.fyvr11iu{flex-grow:0}.fyvr11iy{flex-grow:1}.fyvr11j2{flex-wrap:nowrap}.fyvr11j6{flex-wrap:wrap}.fyvr11ja{flex-wrap:wrap-reverse}.fyvr11je{justify-content:flex-start}.fyvr11ji{justify-content:center}.fyvr11jm{justify-content:flex-end}.fyvr11jq{justify-content:stretch}.fyvr11ju{justify-content:space-around}.fyvr11jy{justify-content:space-between}.fyvr11k2{justify-content:space-evenly}.fyvr11k6{justify-self:flex-start}.fyvr11ka{justify-self:center}.fyvr11ke{justify-self:flex-end}.fyvr11ki{justify-self:stretch}.fyvr11km{align-items:flex-start}.fyvr11kq{align-items:center}.fyvr11ku{align-items:flex-end}.fyvr11ky{align-items:stretch}.fyvr11l2{align-items:baseline}.fyvr11l6{align-self:flex-start}.fyvr11la{align-self:center}.fyvr11le{align-self:flex-end}.fyvr11li{align-self:stretch}.fyvr11lm{align-self:baseline}.fyvr11lq{overflow-x:auto}.fyvr11lu{overflow-x:hidden}.fyvr11ly{overflow-x:scroll}.fyvr11m2{overflow-x:visible}.fyvr11m6{overflow-y:auto}.fyvr11ma{overflow-y:hidden}.fyvr11me{overflow-y:scroll}.fyvr11mi{overflow-y:visible}.fyvr11mm{visibility:hidden}.fyvr11mq{visibility:visible}}@media (min-width: 1281px){.fyvr13{width:var(--space-0)}.fyvr17{width:var(--space-1)}.fyvr1b{width:var(--space-2)}.fyvr1f{width:var(--space-3)}.fyvr1j{width:var(--space-4)}.fyvr1n{width:var(--space-5)}.fyvr1r{width:var(--space-6)}.fyvr1v{width:var(--space-7)}.fyvr1z{width:var(--space-8)}.fyvr113{width:var(--space-9)}.fyvr117{width:var(--space-10)}.fyvr11b{width:var(--space-12)}.fyvr11f{width:var(--space-14)}.fyvr11j{width:var(--space-16)}.fyvr11n{width:var(--space-0_25)}.fyvr11r{width:var(--space-0_5)}.fyvr11v{width:var(--space-1_5)}.fyvr11z{width:0}.fyvr123{width:1px}.fyvr127{width:auto}.fyvr12b{width:100%}.fyvr12f{width:50%}.fyvr12j{width:33.33333%}.fyvr12n{width:66.66667%}.fyvr12r{width:25%}.fyvr12v{width:75%}.fyvr12z{width:-moz-fit-content;width:fit-content}.fyvr133{width:-moz-max-content;width:max-content}.fyvr137{width:-moz-min-content;width:min-content}.fyvr13b{width:100vw}.fyvr13f{width:100vh}.fyvr13j{height:var(--space-0)}.fyvr13n{height:var(--space-1)}.fyvr13r{height:var(--space-2)}.fyvr13v{height:var(--space-3)}.fyvr13z{height:var(--space-4)}.fyvr143{height:var(--space-5)}.fyvr147{height:var(--space-6)}.fyvr14b{height:var(--space-7)}.fyvr14f{height:var(--space-8)}.fyvr14j{height:var(--space-9)}.fyvr14n{height:var(--space-10)}.fyvr14r{height:var(--space-12)}.fyvr14v{height:var(--space-14)}.fyvr14z{height:var(--space-16)}.fyvr153{height:var(--space-0_25)}.fyvr157{height:var(--space-0_5)}.fyvr15b{height:var(--space-1_5)}.fyvr15f{height:0}.fyvr15j{height:1px}.fyvr15n{height:auto}.fyvr15r{height:100%}.fyvr15v{height:50%}.fyvr15z{height:33.33333%}.fyvr163{height:66.66667%}.fyvr167{height:25%}.fyvr16b{height:75%}.fyvr16f{height:-moz-fit-content;height:fit-content}.fyvr16j{height:-moz-max-content;height:max-content}.fyvr16n{height:-moz-min-content;height:min-content}.fyvr16r{height:100vw}.fyvr16v{height:100vh}.fyvr16z{max-width:var(--space-0)}.fyvr173{max-width:var(--space-1)}.fyvr177{max-width:var(--space-2)}.fyvr17b{max-width:var(--space-3)}.fyvr17f{max-width:var(--space-4)}.fyvr17j{max-width:var(--space-5)}.fyvr17n{max-width:var(--space-6)}.fyvr17r{max-width:var(--space-7)}.fyvr17v{max-width:var(--space-8)}.fyvr17z{max-width:var(--space-9)}.fyvr183{max-width:var(--space-10)}.fyvr187{max-width:var(--space-12)}.fyvr18b{max-width:var(--space-14)}.fyvr18f{max-width:var(--space-16)}.fyvr18j{max-width:var(--space-0_25)}.fyvr18n{max-width:var(--space-0_5)}.fyvr18r{max-width:var(--space-1_5)}.fyvr18v{max-width:0}.fyvr18z{max-width:1px}.fyvr193{max-width:auto}.fyvr197{max-width:100%}.fyvr19b{max-width:50%}.fyvr19f{max-width:33.33333%}.fyvr19j{max-width:66.66667%}.fyvr19n{max-width:25%}.fyvr19r{max-width:75%}.fyvr19v{max-width:-moz-fit-content;max-width:fit-content}.fyvr19z{max-width:-moz-max-content;max-width:max-content}.fyvr1a3{max-width:-moz-min-content;max-width:min-content}.fyvr1a7{max-width:100vw}.fyvr1ab{max-width:100vh}.fyvr1af{max-height:var(--space-0)}.fyvr1aj{max-height:var(--space-1)}.fyvr1an{max-height:var(--space-2)}.fyvr1ar{max-height:var(--space-3)}.fyvr1av{max-height:var(--space-4)}.fyvr1az{max-height:var(--space-5)}.fyvr1b3{max-height:var(--space-6)}.fyvr1b7{max-height:var(--space-7)}.fyvr1bb{max-height:var(--space-8)}.fyvr1bf{max-height:var(--space-9)}.fyvr1bj{max-height:var(--space-10)}.fyvr1bn{max-height:var(--space-12)}.fyvr1br{max-height:var(--space-14)}.fyvr1bv{max-height:var(--space-16)}.fyvr1bz{max-height:var(--space-0_25)}.fyvr1c3{max-height:var(--space-0_5)}.fyvr1c7{max-height:var(--space-1_5)}.fyvr1cb{max-height:0}.fyvr1cf{max-height:1px}.fyvr1cj{max-height:auto}.fyvr1cn{max-height:100%}.fyvr1cr{max-height:50%}.fyvr1cv{max-height:33.33333%}.fyvr1cz{max-height:66.66667%}.fyvr1d3{max-height:25%}.fyvr1d7{max-height:75%}.fyvr1db{max-height:-moz-fit-content;max-height:fit-content}.fyvr1df{max-height:-moz-max-content;max-height:max-content}.fyvr1dj{max-height:-moz-min-content;max-height:min-content}.fyvr1dn{max-height:100vw}.fyvr1dr{max-height:100vh}.fyvr1dv{min-width:var(--space-0)}.fyvr1dz{min-width:var(--space-1)}.fyvr1e3{min-width:var(--space-2)}.fyvr1e7{min-width:var(--space-3)}.fyvr1eb{min-width:var(--space-4)}.fyvr1ef{min-width:var(--space-5)}.fyvr1ej{min-width:var(--space-6)}.fyvr1en{min-width:var(--space-7)}.fyvr1er{min-width:var(--space-8)}.fyvr1ev{min-width:var(--space-9)}.fyvr1ez{min-width:var(--space-10)}.fyvr1f3{min-width:var(--space-12)}.fyvr1f7{min-width:var(--space-14)}.fyvr1fb{min-width:var(--space-16)}.fyvr1ff{min-width:var(--space-0_25)}.fyvr1fj{min-width:var(--space-0_5)}.fyvr1fn{min-width:var(--space-1_5)}.fyvr1fr{min-width:0}.fyvr1fv{min-width:1px}.fyvr1fz{min-width:auto}.fyvr1g3{min-width:100%}.fyvr1g7{min-width:50%}.fyvr1gb{min-width:33.33333%}.fyvr1gf{min-width:66.66667%}.fyvr1gj{min-width:25%}.fyvr1gn{min-width:75%}.fyvr1gr{min-width:-moz-fit-content;min-width:fit-content}.fyvr1gv{min-width:-moz-max-content;min-width:max-content}.fyvr1gz{min-width:-moz-min-content;min-width:min-content}.fyvr1h3{min-width:100vw}.fyvr1h7{min-width:100vh}.fyvr1hb{min-height:var(--space-0)}.fyvr1hf{min-height:var(--space-1)}.fyvr1hj{min-height:var(--space-2)}.fyvr1hn{min-height:var(--space-3)}.fyvr1hr{min-height:var(--space-4)}.fyvr1hv{min-height:var(--space-5)}.fyvr1hz{min-height:var(--space-6)}.fyvr1i3{min-height:var(--space-7)}.fyvr1i7{min-height:var(--space-8)}.fyvr1ib{min-height:var(--space-9)}.fyvr1if{min-height:var(--space-10)}.fyvr1ij{min-height:var(--space-12)}.fyvr1in{min-height:var(--space-14)}.fyvr1ir{min-height:var(--space-16)}.fyvr1iv{min-height:var(--space-0_25)}.fyvr1iz{min-height:var(--space-0_5)}.fyvr1j3{min-height:var(--space-1_5)}.fyvr1j7{min-height:0}.fyvr1jb{min-height:1px}.fyvr1jf{min-height:auto}.fyvr1jj{min-height:100%}.fyvr1jn{min-height:50%}.fyvr1jr{min-height:33.33333%}.fyvr1jv{min-height:66.66667%}.fyvr1jz{min-height:25%}.fyvr1k3{min-height:75%}.fyvr1k7{min-height:-moz-fit-content;min-height:fit-content}.fyvr1kb{min-height:-moz-max-content;min-height:max-content}.fyvr1kf{min-height:-moz-min-content;min-height:min-content}.fyvr1kj{min-height:100vw}.fyvr1kn{min-height:100vh}.fyvr1kr{top:var(--space-0)}.fyvr1kv{top:var(--space-1)}.fyvr1kz{top:var(--space-2)}.fyvr1l3{top:var(--space-3)}.fyvr1l7{top:var(--space-4)}.fyvr1lb{top:var(--space-5)}.fyvr1lf{top:var(--space-6)}.fyvr1lj{top:var(--space-7)}.fyvr1ln{top:var(--space-8)}.fyvr1lr{top:var(--space-9)}.fyvr1lv{top:var(--space-10)}.fyvr1lz{top:var(--space-12)}.fyvr1m3{top:var(--space-14)}.fyvr1m7{top:var(--space-16)}.fyvr1mb{top:var(--space-0_25)}.fyvr1mf{top:var(--space-0_5)}.fyvr1mj{top:var(--space-1_5)}.fyvr1mn{top:auto}.fyvr1mr{bottom:var(--space-0)}.fyvr1mv{bottom:var(--space-1)}.fyvr1mz{bottom:var(--space-2)}.fyvr1n3{bottom:var(--space-3)}.fyvr1n7{bottom:var(--space-4)}.fyvr1nb{bottom:var(--space-5)}.fyvr1nf{bottom:var(--space-6)}.fyvr1nj{bottom:var(--space-7)}.fyvr1nn{bottom:var(--space-8)}.fyvr1nr{bottom:var(--space-9)}.fyvr1nv{bottom:var(--space-10)}.fyvr1nz{bottom:var(--space-12)}.fyvr1o3{bottom:var(--space-14)}.fyvr1o7{bottom:var(--space-16)}.fyvr1ob{bottom:var(--space-0_25)}.fyvr1of{bottom:var(--space-0_5)}.fyvr1oj{bottom:var(--space-1_5)}.fyvr1on{bottom:auto}.fyvr1or{left:var(--space-0)}.fyvr1ov{left:var(--space-1)}.fyvr1oz{left:var(--space-2)}.fyvr1p3{left:var(--space-3)}.fyvr1p7{left:var(--space-4)}.fyvr1pb{left:var(--space-5)}.fyvr1pf{left:var(--space-6)}.fyvr1pj{left:var(--space-7)}.fyvr1pn{left:var(--space-8)}.fyvr1pr{left:var(--space-9)}.fyvr1pv{left:var(--space-10)}.fyvr1pz{left:var(--space-12)}.fyvr1q3{left:var(--space-14)}.fyvr1q7{left:var(--space-16)}.fyvr1qb{left:var(--space-0_25)}.fyvr1qf{left:var(--space-0_5)}.fyvr1qj{left:var(--space-1_5)}.fyvr1qn{left:auto}.fyvr1qr{right:var(--space-0)}.fyvr1qv{right:var(--space-1)}.fyvr1qz{right:var(--space-2)}.fyvr1r3{right:var(--space-3)}.fyvr1r7{right:var(--space-4)}.fyvr1rb{right:var(--space-5)}.fyvr1rf{right:var(--space-6)}.fyvr1rj{right:var(--space-7)}.fyvr1rn{right:var(--space-8)}.fyvr1rr{right:var(--space-9)}.fyvr1rv{right:var(--space-10)}.fyvr1rz{right:var(--space-12)}.fyvr1s3{right:var(--space-14)}.fyvr1s7{right:var(--space-16)}.fyvr1sb{right:var(--space-0_25)}.fyvr1sf{right:var(--space-0_5)}.fyvr1sj{right:var(--space-1_5)}.fyvr1sn{right:auto}.fyvr1sr{padding-top:var(--space-0)}.fyvr1sv{padding-top:var(--space-1)}.fyvr1sz{padding-top:var(--space-2)}.fyvr1t3{padding-top:var(--space-3)}.fyvr1t7{padding-top:var(--space-4)}.fyvr1tb{padding-top:var(--space-5)}.fyvr1tf{padding-top:var(--space-6)}.fyvr1tj{padding-top:var(--space-7)}.fyvr1tn{padding-top:var(--space-8)}.fyvr1tr{padding-top:var(--space-9)}.fyvr1tv{padding-top:var(--space-10)}.fyvr1tz{padding-top:var(--space-12)}.fyvr1u3{padding-top:var(--space-14)}.fyvr1u7{padding-top:var(--space-16)}.fyvr1ub{padding-top:var(--space-0_25)}.fyvr1uf{padding-top:var(--space-0_5)}.fyvr1uj{padding-top:var(--space-1_5)}.fyvr1un{padding-bottom:var(--space-0)}.fyvr1ur{padding-bottom:var(--space-1)}.fyvr1uv{padding-bottom:var(--space-2)}.fyvr1uz{padding-bottom:var(--space-3)}.fyvr1v3{padding-bottom:var(--space-4)}.fyvr1v7{padding-bottom:var(--space-5)}.fyvr1vb{padding-bottom:var(--space-6)}.fyvr1vf{padding-bottom:var(--space-7)}.fyvr1vj{padding-bottom:var(--space-8)}.fyvr1vn{padding-bottom:var(--space-9)}.fyvr1vr{padding-bottom:var(--space-10)}.fyvr1vv{padding-bottom:var(--space-12)}.fyvr1vz{padding-bottom:var(--space-14)}.fyvr1w3{padding-bottom:var(--space-16)}.fyvr1w7{padding-bottom:var(--space-0_25)}.fyvr1wb{padding-bottom:var(--space-0_5)}.fyvr1wf{padding-bottom:var(--space-1_5)}.fyvr1wj{padding-left:var(--space-0)}.fyvr1wn{padding-left:var(--space-1)}.fyvr1wr{padding-left:var(--space-2)}.fyvr1wv{padding-left:var(--space-3)}.fyvr1wz{padding-left:var(--space-4)}.fyvr1x3{padding-left:var(--space-5)}.fyvr1x7{padding-left:var(--space-6)}.fyvr1xb{padding-left:var(--space-7)}.fyvr1xf{padding-left:var(--space-8)}.fyvr1xj{padding-left:var(--space-9)}.fyvr1xn{padding-left:var(--space-10)}.fyvr1xr{padding-left:var(--space-12)}.fyvr1xv{padding-left:var(--space-14)}.fyvr1xz{padding-left:var(--space-16)}.fyvr1y3{padding-left:var(--space-0_25)}.fyvr1y7{padding-left:var(--space-0_5)}.fyvr1yb{padding-left:var(--space-1_5)}.fyvr1yf{padding-right:var(--space-0)}.fyvr1yj{padding-right:var(--space-1)}.fyvr1yn{padding-right:var(--space-2)}.fyvr1yr{padding-right:var(--space-3)}.fyvr1yv{padding-right:var(--space-4)}.fyvr1yz{padding-right:var(--space-5)}.fyvr1z3{padding-right:var(--space-6)}.fyvr1z7{padding-right:var(--space-7)}.fyvr1zb{padding-right:var(--space-8)}.fyvr1zf{padding-right:var(--space-9)}.fyvr1zj{padding-right:var(--space-10)}.fyvr1zn{padding-right:var(--space-12)}.fyvr1zr{padding-right:var(--space-14)}.fyvr1zv{padding-right:var(--space-16)}.fyvr1zz{padding-right:var(--space-0_25)}.fyvr1103{padding-right:var(--space-0_5)}.fyvr1107{padding-right:var(--space-1_5)}.fyvr110b{margin-top:var(--space-0)}.fyvr110f{margin-top:var(--space-1)}.fyvr110j{margin-top:var(--space-2)}.fyvr110n{margin-top:var(--space-3)}.fyvr110r{margin-top:var(--space-4)}.fyvr110v{margin-top:var(--space-5)}.fyvr110z{margin-top:var(--space-6)}.fyvr1113{margin-top:var(--space-7)}.fyvr1117{margin-top:var(--space-8)}.fyvr111b{margin-top:var(--space-9)}.fyvr111f{margin-top:var(--space-10)}.fyvr111j{margin-top:var(--space-12)}.fyvr111n{margin-top:var(--space-14)}.fyvr111r{margin-top:var(--space-16)}.fyvr111v{margin-top:var(--space-0_25)}.fyvr111z{margin-top:var(--space-0_5)}.fyvr1123{margin-top:var(--space-1_5)}.fyvr1127{margin-top:auto}.fyvr112b{margin-bottom:var(--space-0)}.fyvr112f{margin-bottom:var(--space-1)}.fyvr112j{margin-bottom:var(--space-2)}.fyvr112n{margin-bottom:var(--space-3)}.fyvr112r{margin-bottom:var(--space-4)}.fyvr112v{margin-bottom:var(--space-5)}.fyvr112z{margin-bottom:var(--space-6)}.fyvr1133{margin-bottom:var(--space-7)}.fyvr1137{margin-bottom:var(--space-8)}.fyvr113b{margin-bottom:var(--space-9)}.fyvr113f{margin-bottom:var(--space-10)}.fyvr113j{margin-bottom:var(--space-12)}.fyvr113n{margin-bottom:var(--space-14)}.fyvr113r{margin-bottom:var(--space-16)}.fyvr113v{margin-bottom:var(--space-0_25)}.fyvr113z{margin-bottom:var(--space-0_5)}.fyvr1143{margin-bottom:var(--space-1_5)}.fyvr1147{margin-bottom:auto}.fyvr114b{margin-left:var(--space-0)}.fyvr114f{margin-left:var(--space-1)}.fyvr114j{margin-left:var(--space-2)}.fyvr114n{margin-left:var(--space-3)}.fyvr114r{margin-left:var(--space-4)}.fyvr114v{margin-left:var(--space-5)}.fyvr114z{margin-left:var(--space-6)}.fyvr1153{margin-left:var(--space-7)}.fyvr1157{margin-left:var(--space-8)}.fyvr115b{margin-left:var(--space-9)}.fyvr115f{margin-left:var(--space-10)}.fyvr115j{margin-left:var(--space-12)}.fyvr115n{margin-left:var(--space-14)}.fyvr115r{margin-left:var(--space-16)}.fyvr115v{margin-left:var(--space-0_25)}.fyvr115z{margin-left:var(--space-0_5)}.fyvr1163{margin-left:var(--space-1_5)}.fyvr1167{margin-left:auto}.fyvr116b{margin-right:var(--space-0)}.fyvr116f{margin-right:var(--space-1)}.fyvr116j{margin-right:var(--space-2)}.fyvr116n{margin-right:var(--space-3)}.fyvr116r{margin-right:var(--space-4)}.fyvr116v{margin-right:var(--space-5)}.fyvr116z{margin-right:var(--space-6)}.fyvr1173{margin-right:var(--space-7)}.fyvr1177{margin-right:var(--space-8)}.fyvr117b{margin-right:var(--space-9)}.fyvr117f{margin-right:var(--space-10)}.fyvr117j{margin-right:var(--space-12)}.fyvr117n{margin-right:var(--space-14)}.fyvr117r{margin-right:var(--space-16)}.fyvr117v{margin-right:var(--space-0_25)}.fyvr117z{margin-right:var(--space-0_5)}.fyvr1183{margin-right:var(--space-1_5)}.fyvr1187{margin-right:auto}.fyvr118b{gap:var(--space-0)}.fyvr118f{gap:var(--space-1)}.fyvr118j{gap:var(--space-2)}.fyvr118n{gap:var(--space-3)}.fyvr118r{gap:var(--space-4)}.fyvr118v{gap:var(--space-5)}.fyvr118z{gap:var(--space-6)}.fyvr1193{gap:var(--space-7)}.fyvr1197{gap:var(--space-8)}.fyvr119b{gap:var(--space-9)}.fyvr119f{gap:var(--space-10)}.fyvr119j{gap:var(--space-12)}.fyvr119n{gap:var(--space-14)}.fyvr119r{gap:var(--space-16)}.fyvr119v{gap:var(--space-0_25)}.fyvr119z{gap:var(--space-0_5)}.fyvr11a3{gap:var(--space-1_5)}.fyvr11a7{border-bottom-width:var(--border-widths-none)}.fyvr11ab{border-bottom-width:var(--border-widths-thin)}.fyvr11af{border-bottom-width:var(--border-widths-thick)}.fyvr11aj{border-left-width:var(--border-widths-none)}.fyvr11an{border-left-width:var(--border-widths-thin)}.fyvr11ar{border-left-width:var(--border-widths-thick)}.fyvr11av{border-right-width:var(--border-widths-none)}.fyvr11az{border-right-width:var(--border-widths-thin)}.fyvr11b3{border-right-width:var(--border-widths-thick)}.fyvr11b7{border-top-width:var(--border-widths-none)}.fyvr11bb{border-top-width:var(--border-widths-thin)}.fyvr11bf{border-top-width:var(--border-widths-thick)}.fyvr11bj{border-bottom-left-radius:var(--radii-none)}.fyvr11bn{border-bottom-left-radius:var(--radii-xs)}.fyvr11br{border-bottom-left-radius:var(--radii-sm)}.fyvr11bv{border-bottom-left-radius:var(--radii-md)}.fyvr11bz{border-bottom-left-radius:var(--radii-lg)}.fyvr11c3{border-bottom-left-radius:var(--radii-circle)}.fyvr11c7{border-bottom-right-radius:var(--radii-none)}.fyvr11cb{border-bottom-right-radius:var(--radii-xs)}.fyvr11cf{border-bottom-right-radius:var(--radii-sm)}.fyvr11cj{border-bottom-right-radius:var(--radii-md)}.fyvr11cn{border-bottom-right-radius:var(--radii-lg)}.fyvr11cr{border-bottom-right-radius:var(--radii-circle)}.fyvr11cv{border-top-left-radius:var(--radii-none)}.fyvr11cz{border-top-left-radius:var(--radii-xs)}.fyvr11d3{border-top-left-radius:var(--radii-sm)}.fyvr11d7{border-top-left-radius:var(--radii-md)}.fyvr11db{border-top-left-radius:var(--radii-lg)}.fyvr11df{border-top-left-radius:var(--radii-circle)}.fyvr11dj{border-top-right-radius:var(--radii-none)}.fyvr11dn{border-top-right-radius:var(--radii-xs)}.fyvr11dr{border-top-right-radius:var(--radii-sm)}.fyvr11dv{border-top-right-radius:var(--radii-md)}.fyvr11dz{border-top-right-radius:var(--radii-lg)}.fyvr11e3{border-top-right-radius:var(--radii-circle)}.fyvr11e7{font-size:var(--font-sizes-inherit)}.fyvr11eb{font-size:var(--font-sizes-xsmall)}.fyvr11ef{font-size:var(--font-sizes-small)}.fyvr11ej{font-size:var(--font-sizes-normal)}.fyvr11en{font-size:var(--font-sizes-medium)}.fyvr11er{font-size:var(--font-sizes-large)}.fyvr11ev{font-size:var(--font-sizes-xlarge)}.fyvr11ez{font-weight:var(--font-weights-inherit)}.fyvr11f3{font-weight:var(--font-weights-normal)}.fyvr11f7{font-weight:var(--font-weights-medium)}.fyvr11fb{font-weight:var(--font-weights-semibold)}.fyvr11ff{font-weight:var(--font-weights-bold)}.fyvr11fj{letter-spacing:var(--letter-spacings-inherit)}.fyvr11fn{letter-spacing:var(--letter-spacings-none)}.fyvr11fr{letter-spacing:var(--letter-spacings-normal)}.fyvr11fv{letter-spacing:var(--letter-spacings-wide)}.fyvr11fz{line-height:var(--line-heights-4)}.fyvr11g3{line-height:var(--line-heights-5)}.fyvr11g7{line-height:var(--line-heights-6)}.fyvr11gb{line-height:var(--line-heights-7)}.fyvr11gf{line-height:var(--line-heights-9)}.fyvr11gj{line-height:var(--line-heights-inherit)}.fyvr11gn{text-align:center}.fyvr11gr{text-align:left}.fyvr11gv{text-align:right}.fyvr11gz{display:block}.fyvr11h3{display:flex}.fyvr11h7{display:grid}.fyvr11hb{display:inline-block}.fyvr11hf{display:inline-flex}.fyvr11hj{display:none}.fyvr11hn{display:contents}.fyvr11hr{position:absolute}.fyvr11hv{position:fixed}.fyvr11hz{position:relative}.fyvr11i3{position:sticky}.fyvr11i7{flex-direction:column}.fyvr11ib{flex-direction:column-reverse}.fyvr11if{flex-direction:row}.fyvr11ij{flex-direction:row-reverse}.fyvr11in{flex-shrink:0}.fyvr11ir{flex-shrink:1}.fyvr11iv{flex-grow:0}.fyvr11iz{flex-grow:1}.fyvr11j3{flex-wrap:nowrap}.fyvr11j7{flex-wrap:wrap}.fyvr11jb{flex-wrap:wrap-reverse}.fyvr11jf{justify-content:flex-start}.fyvr11jj{justify-content:center}.fyvr11jn{justify-content:flex-end}.fyvr11jr{justify-content:stretch}.fyvr11jv{justify-content:space-around}.fyvr11jz{justify-content:space-between}.fyvr11k3{justify-content:space-evenly}.fyvr11k7{justify-self:flex-start}.fyvr11kb{justify-self:center}.fyvr11kf{justify-self:flex-end}.fyvr11kj{justify-self:stretch}.fyvr11kn{align-items:flex-start}.fyvr11kr{align-items:center}.fyvr11kv{align-items:flex-end}.fyvr11kz{align-items:stretch}.fyvr11l3{align-items:baseline}.fyvr11l7{align-self:flex-start}.fyvr11lb{align-self:center}.fyvr11lf{align-self:flex-end}.fyvr11lj{align-self:stretch}.fyvr11ln{align-self:baseline}.fyvr11lr{overflow-x:auto}.fyvr11lv{overflow-x:hidden}.fyvr11lz{overflow-x:scroll}.fyvr11m3{overflow-x:visible}.fyvr11m7{overflow-y:auto}.fyvr11mb{overflow-y:hidden}.fyvr11mf{overflow-y:scroll}.fyvr11mj{overflow-y:visible}.fyvr11mn{visibility:hidden}.fyvr11mr{visibility:visible}}._1qxj1ibj{font-style:italic}._1qxj1ibk{-webkit-text-decoration:underline;text-decoration:underline}._1qxj1ibl{text-transform:uppercase}._1qxj1ibm{text-transform:capitalize}._1qxj1ibn{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}._2q9vfj7{font-weight:var(--font-weights-normal)}._140wn8ni{outline:2px solid rgba(255,255,255,.1);outline-offset:-2px}._140wn8no{outline-offset:1px}._140wn8nt{height:28px}._140wn8nu{height:36px}._140wn8nv{height:44px}._140wn8nw{height:52px}._140wn8nx{padding:0;display:flex;align-items:center;justify-content:center}._140wn8n10{outline-color:var(--colors-background-secondary);outline-style:solid;outline-offset:calc(var(--border-widths-thick) * -1);outline-width:var(--border-widths-thick);border-color:transparent}._140wn8n11{outline-color:var(--colors-border-normal);outline-style:solid;outline-offset:calc(var(--border-widths-thick) * -1);outline-width:var(--border-widths-thick);border-color:transparent}._140wn8n12{width:28px}._140wn8n13{width:36px}._140wn8n14{width:44px}._140wn8n15{width:52px}._140wn8n16,._140wn8n17{padding-left:var(--space-2)}._140wn8n18{padding-left:var(--space-4)}._140wn8n19,._140wn8n1a{padding-right:var(--space-2)}._140wn8n1b{padding-right:var(--space-4)}.rhmai65{opacity:.5;cursor:default;pointer-events:none}._43lu9r6{grid-template-columns:1fr 2fr}._43lu9r7{grid-template-columns:2fr 1fr}._1dizidw0{flex-shrink:0}._1dizidw1{height:var(--line-heights-4);width:var(--line-heights-4)}._1dizidw2{height:var(--line-heights-5);width:var(--line-heights-5)}._1dizidw3{height:var(--line-heights-6);width:var(--line-heights-6)}._1dizidw4{height:var(--line-heights-7);width:var(--line-heights-7)}._1dizidw5{height:var(--line-heights-9);width:var(--line-heights-9)}._1c9x66f2{height:20px;width:20px}._1c9x66f3{height:28px;width:28px}._1c9x66f6{height:20px;width:20px}._1c9x66f7{height:28px;width:28px}._4j62fl0{min-height:64px}._4j62fl2{border:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:64px}._4j62fl4{transform-origin:top}._4j62fl5{height:1.25rem;width:1.25rem;display:block}._1k2mbvi1{width:160px}._1k2mbvi2{fill:var(--colors-background-raised)}._1k2mbvi4[data-disabled]{opacity:.8;cursor:default;pointer-events:none;color:var(--colors-text50)}._1k2mbvi4[data-highlighted]{background:var(--colors-background-contrast)}._1k2mbvi5{position:absolute;left:0;width:var(--space-6);display:inline-flex;align-items:center;justify-content:center}._1hq71vk1{height:52px}._1hq71vk1:has(:disabled),._1hq71vk1:has(:disabled):hover{cursor:default;opacity:.5}._1hq71vk1:focus-within{opacity:1!important;box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset;border-color:transparent}._1bhyzin1{width:12px;height:12px}._1bhyzin2{width:20px;height:20px}._1bhyzin3{width:32px;height:32px}._1bhyzin4{width:40px;height:40px}._1bhyzin5{width:52px;height:52px}._1vqx0w92{height:100%;overflow-y:auto;overscroll-behavior-y:contain}._1vqx0w93{overflow-x:auto;overscroll-behavior-x:contain;width:100%}._1vqx0w95:before{content:"";position:absolute;z-index:1;pointer-events:none}._1vqx0w95:after{content:"";position:absolute;z-index:1;pointer-events:none}._1vqx0w96:before{display:none}._1vqx0w96:after{display:none}._1vqx0w97:before{background:linear-gradient(to top,transparent 0%,var(--colors-background-primary) 100%);left:0;top:0;width:100%;height:var(--space-4)}._1vqx0w97:after{background:linear-gradient(to bottom,transparent 0%,var(--colors-background-primary) 100%);left:0;bottom:0;width:100%;height:var(--space-4)}._1vqx0w98:before{background:linear-gradient(to left,transparent 0%,var(--colors-background-primary) 100%);left:0;top:0;height:100%;width:var(--space-4)}._1vqx0w98:after{background:linear-gradient(to right,transparent 0%,var(--colors-background-primary) 100%);right:0;top:0;height:100%;width:var(--space-4)}._5b32m95{-ms-overflow-style:none;scrollbar-width:none}._5b32m95::-webkit-scrollbar{display:none}._5b32m96{width:100vw;min-height:100px;max-height:calc(100vh - 80px);max-height:calc(100dvh - 80px)}._5b32m97{width:100vw;height:calc(100vh - 70px);height:calc(100dvh - 70px)}._5b32m99{height:auto!important}@media screen and (min-width: 769px){._5b32m96{width:540px;max-height:min(800px,calc(100vh - 80px));max-height:min(800px,calc(100dvh - 80px))}._5b32m97{width:720px;max-height:min(800px,calc(100vh - 80px));max-height:min(800px,calc(100dvh - 80px));height:800px}}._1acm19y1{cursor:text;height:52px;box-shadow:0 0 0 var(--border-widths-thin) var(--colors-border-normal) inset}._1acm19y1:has(:disabled),._1acm19y1:has(:disabled):hover{cursor:default;opacity:.5}._1acm19y1:focus-within{opacity:1!important;box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset;border-color:transparent}@keyframes dtv8gt0{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.dtv8gt1{background-image:linear-gradient(-45deg,transparent,var(--colors-background-secondary),transparent);background-size:400% 400%;background-repeat:no-repeat;animation:dtv8gt0 1s ease infinite}.dtv8gt2{width:96px;height:var(--line-heights-4)}.dtv8gt3{width:100px;height:var(--line-heights-5)}.dtv8gt4{width:124px;height:var(--line-heights-6)}.dtv8gt5{width:124px;height:var(--line-heights-7)}.dtv8gt6{width:148px;height:var(--line-heights-9)}.io59uy4{height:20px;width:20px}.io59uy5{height:28px;width:28px}.io59uy7:after{content:"";display:block;border-radius:999px;background:currentColor}.io59uy9:after{width:14px;height:14px}.io59uya:after{width:18px;height:18px}.gohwum1{height:52px;box-shadow:0 0 0 var(--border-widths-thin) var(--colors-border-normal) inset}.gohwum1:has(:disabled),.gohwum1:has(:disabled):hover{cursor:default;opacity:.5}.gohwum1:focus-within{opacity:1!important;box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset;border-color:transparent}.gohwuma{box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset}.gohwume{height:52px}.gohwume[data-highlighted]{background:var(--colors-background-secondary)}.gohwume[data-state=checked]{background:var(--colors-background-control)}@keyframes en4abt0{to{transform:rotate(1turn)}}.en4abt1{animation:en4abt0 2s linear infinite}.en4abt2{width:16px;height:16px;stroke-width:3px}.en4abt3{width:24px;height:24px;stroke-width:2px}.en4abt4{width:32px;height:32px;stroke-width:1.5px}._1lp2u8e1{width:48px;height:28px}._1lp2u8e1[data-state=checked]{background:var(--colors-gradient-primary)}._1lp2u8e1:disabled{cursor:default;opacity:.5}._1lp2u8e3{transition:transform .1s ease-out,background .1s ease-out;transform:translate(0);will-change:transform}._1lp2u8e3[data-state=checked]{transform:translate(var(--space-5))}.nwwh3z9{font-size:.625rem;letter-spacing:.8px}._10c8o0n1:has(:focus-visible){box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset}._10c8o0n3{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;z-index:2}._10c8o0n3[data-state=active]{color:var(--colors-text100)}._10c8o0n3[disabled]{opacity:.5}._10c8o0n5{transition:transform .2s ease-out}@keyframes _6wut8v2{0%{transform:translate(var(--radix-toast-swipe-end-x))}to{transform:translate(100%)}}._6wut8v1{padding:var(--space-4);padding-top:0;z-index:1000;list-style:none;max-width:532px}._6wut8v3{will-change:transform,opacity}._6wut8v3[data-swipe=move]{transform:translate(var(--radix-toast-swipe-move-x))!important}._6wut8v3[data-swipe=cancel]{transition:transform .2s ease-out;transform:translate(0)}._6wut8v3[data-swipe=end]{animation:_6wut8v2 .2s ease-out}._6wut8v5{color:positive}._6wut8v6{color:negative}._15pztn1{resize:none;cursor:text;box-shadow:0 0 0 var(--border-widths-thin) var(--colors-border-normal) inset}._15pztn1:disabled,._15pztn1:disabled:hover{cursor:default;opacity:.5}._15pztn1:focus{opacity:1!important;box-shadow:0 0 0 var(--border-widths-thick) var(--colors-border-focus) inset;border-color:transparent}._15pztn2{resize:vertical}.bnrreb6{width:12px;height:12px;font-size:4px}.bnrreb7{width:20px;height:20px;font-size:8px}.bnrreb8{width:32px;height:32px;font-size:9px}.bnrreb9{width:40px;height:40px;font-size:11px}.bnrrebe{max-width:100%;max-height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.bnrreb5.bnrreb0.fyvr11ls.fyvr11m8.fyvr11jg.fyvr11ko.fyvr11h0.bnrreb6 .bnrrebe{max-width:12px;max-height:12px}.bnrreb5.bnrreb0.fyvr11ls.fyvr11m8.fyvr11jg.fyvr11ko.fyvr11h0.bnrreb7 .bnrrebe{max-width:20px;max-height:20px}.bnrreb5.bnrreb0.fyvr11ls.fyvr11m8.fyvr11jg.fyvr11ko.fyvr11h0.bnrreb8 .bnrrebe{max-width:32px;max-height:32px}.bnrreb5.bnrreb0.fyvr11ls.fyvr11m8.fyvr11jg.fyvr11ko.fyvr11h0.bnrreb9 .bnrrebe{max-width:40px;max-height:40px}.bnrrebg{font-size:inherit}.q888p21{fill:var(--colors-background-raised);box-shadow:0 0 10px #00000080}.u3q5o00:hover{cursor:pointer;opacity:.8;-webkit-user-select:none;user-select:none} diff --git a/assets/index.es-7c53348b.js b/assets/index.es-7c53348b.js new file mode 100644 index 00000000..b2f023a1 --- /dev/null +++ b/assets/index.es-7c53348b.js @@ -0,0 +1,27 @@ +import{g as _c,a as mm,r as vn,c as se,b as wm,w as ql,d as Bl,f as bc,t as yo,e as _m,h as jr,I as bi,A as bm,U as Em,i as Q,j as Im,k as hc,l as xm,_ as Sm,P as Pm,V as Dh,m as Am,D as Cm,C as Om,Z as Lh,$ as Rm,n as Tm,o as lo,q as Nm,p as Hl,s as $r,y as Dm,u as Lm,X as fn,v as Ft,x as rr,z as _i,B as hr,E as Fm,F as pn,G as kl,H as $m,J as Mm,K as jm,L as Kl,M as zm,N as Vl,Y as Gl,O as dn,Q as lc,R as so,S as yn,T as Um,W as oo,a0 as qm,a1 as Bm,a2 as Hm,a3 as km,a4 as Km,a5 as Ga,a6 as Fh,a7 as Vm,a8 as Gm,a9 as Wm,aa as $h,ab as Jm,ac as Ym,ad as Xm,ae as Zm,af as Qm,ag as e1,ah as t1,ai as ao,aj as Wl,ak as Wa,al as r1,am as i1}from"./index-f07e9ad7.js";var Ec={exports:{}},gn=typeof Reflect=="object"?Reflect:null,Mh=gn&&typeof gn.apply=="function"?gn.apply:function(t,i,s){return Function.prototype.apply.call(t,i,s)},co;gn&&typeof gn.ownKeys=="function"?co=gn.ownKeys:Object.getOwnPropertySymbols?co=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:co=function(t){return Object.getOwnPropertyNames(t)};function n1(a){console&&console.warn&&console.warn(a)}var Jl=Number.isNaN||function(t){return t!==t};function He(){He.init.call(this)}Ec.exports=He;Ec.exports.once=c1;He.EventEmitter=He;He.prototype._events=void 0;He.prototype._eventsCount=0;He.prototype._maxListeners=void 0;var jh=10;function vo(a){if(typeof a!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a)}Object.defineProperty(He,"defaultMaxListeners",{enumerable:!0,get:function(){return jh},set:function(a){if(typeof a!="number"||a<0||Jl(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");jh=a}});He.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};He.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Jl(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Yl(a){return a._maxListeners===void 0?He.defaultMaxListeners:a._maxListeners}He.prototype.getMaxListeners=function(){return Yl(this)};He.prototype.emit=function(t){for(var i=[],s=1;s0&&(p=i[0]),p instanceof Error)throw p;var g=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw g.context=p,g}var _=h[t];if(_===void 0)return!1;if(typeof _=="function")Mh(_,this,i);else for(var m=_.length,x=tf(_,m),s=0;s0&&p.length>o&&!p.warned){p.warned=!0;var g=new Error("Possible EventEmitter memory leak detected. "+p.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");g.name="MaxListenersExceededWarning",g.emitter=a,g.type=t,g.count=p.length,n1(g)}return a}He.prototype.addListener=function(t,i){return Xl(this,t,i,!1)};He.prototype.on=He.prototype.addListener;He.prototype.prependListener=function(t,i){return Xl(this,t,i,!0)};function s1(){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 Zl(a,t,i){var s={fired:!1,wrapFn:void 0,target:a,type:t,listener:i},o=s1.bind(s);return o.listener=i,s.wrapFn=o,o}He.prototype.once=function(t,i){return vo(i),this.on(t,Zl(this,t,i)),this};He.prototype.prependOnceListener=function(t,i){return vo(i),this.prependListener(t,Zl(this,t,i)),this};He.prototype.removeListener=function(t,i){var s,o,h,p,g;if(vo(i),o=this._events,o===void 0)return this;if(s=o[t],s===void 0)return this;if(s===i||s.listener===i)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,s.listener||i));else if(typeof s!="function"){for(h=-1,p=s.length-1;p>=0;p--)if(s[p]===i||s[p].listener===i){g=s[p].listener,h=p;break}if(h<0)return this;h===0?s.shift():o1(s,h),s.length===1&&(o[t]=s[0]),o.removeListener!==void 0&&this.emit("removeListener",t,g||i)}return this};He.prototype.off=He.prototype.removeListener;He.prototype.removeAllListeners=function(t){var i,s,o;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[t]),this;if(arguments.length===0){var h=Object.keys(s),p;for(o=0;o=0;o--)this.removeListener(t,i[o]);return this};function Ql(a,t,i){var s=a._events;if(s===void 0)return[];var o=s[t];return o===void 0?[]:typeof o=="function"?i?[o.listener||o]:[o]:i?a1(o):tf(o,o.length)}He.prototype.listeners=function(t){return Ql(this,t,!0)};He.prototype.rawListeners=function(t){return Ql(this,t,!1)};He.listenerCount=function(a,t){return typeof a.listenerCount=="function"?a.listenerCount(t):ef.call(a,t)};He.prototype.listenerCount=ef;function ef(a){var t=this._events;if(t!==void 0){var i=t[a];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}He.prototype.eventNames=function(){return this._eventsCount>0?co(this._events):[]};function tf(a,t){for(var i=new Array(t),s=0;s{const a=new Map;return{name:b1,options:{},hasItem(t){return a.has(t)},getItem(t){return a.get(t)??null},getItemRaw(t){return a.get(t)??null},setItem(t,i){a.set(t,i)},setItemRaw(t,i){a.set(t,i)},removeItem(t){a.delete(t)},getKeys(){return Array.from(a.keys())},clear(){a.clear()},dispose(){a.clear()}}};function I1(a={}){const t={mounts:{"":a.driver||E1()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},i=m=>{for(const x of t.mountpoints)if(m.startsWith(x))return{base:x,relativeKey:m.slice(x.length),driver:t.mounts[x]};return{base:"",relativeKey:m,driver:t.mounts[""]}},s=(m,x)=>t.mountpoints.filter(O=>O.startsWith(m)||x&&m.startsWith(O)).map(O=>({relativeBase:m.length>O.length?m.slice(O.length):void 0,mountpoint:O,driver:t.mounts[O]})),o=(m,x)=>{if(t.watching){x=ur(x);for(const O of t.watchListeners)O(m,x)}},h=async()=>{if(!t.watching){t.watching=!0;for(const m in t.mounts)t.unwatch[m]=await zh(t.mounts[m],o,m)}},p=async()=>{if(t.watching){for(const m in t.unwatch)await t.unwatch[m]();t.unwatch={},t.watching=!1}},g=(m,x,O)=>{const L=new Map,z=R=>{let K=L.get(R.base);return K||(K={driver:R.driver,base:R.base,items:[]},L.set(R.base,K)),K};for(const R of m){const K=typeof R=="string",re=ur(K?R:R.key),he=K?void 0:R.value,le=K||!R.options?x:{...x,...R.options},fe=i(re);z(fe).items.push({key:re,value:he,relativeKey:fe.relativeKey,options:le})}return Promise.all([...L.values()].map(R=>O(R))).then(R=>R.flat())},_={hasItem(m,x={}){m=ur(m);const{relativeKey:O,driver:L}=i(m);return Bt(L.hasItem,O,x)},getItem(m,x={}){m=ur(m);const{relativeKey:O,driver:L}=i(m);return Bt(L.getItem,O,x).then(z=>eo(z))},getItems(m,x){return g(m,x,O=>O.driver.getItems?Bt(O.driver.getItems,O.items.map(L=>({key:L.relativeKey,options:L.options})),x).then(L=>L.map(z=>({key:_1(O.base,z.key),value:eo(z.value)}))):Promise.all(O.items.map(L=>Bt(O.driver.getItem,L.relativeKey,L.options).then(z=>({key:L.key,value:eo(z)})))))},getItemRaw(m,x={}){m=ur(m);const{relativeKey:O,driver:L}=i(m);return L.getItemRaw?Bt(L.getItemRaw,O,x):Bt(L.getItem,O,x).then(z=>w1(z))},async setItem(m,x,O={}){if(x===void 0)return _.removeItem(m);m=ur(m);const{relativeKey:L,driver:z}=i(m);z.setItem&&(await Bt(z.setItem,L,uo(x),O),z.watch||o("update",m))},async setItems(m,x){await g(m,x,async O=>{O.driver.setItems&&await Bt(O.driver.setItems,O.items.map(L=>({key:L.relativeKey,value:uo(L.value),options:L.options})),x),O.driver.setItem&&await Promise.all(O.items.map(L=>Bt(O.driver.setItem,L.relativeKey,uo(L.value),L.options)))})},async setItemRaw(m,x,O={}){if(x===void 0)return _.removeItem(m,O);m=ur(m);const{relativeKey:L,driver:z}=i(m);if(z.setItemRaw)await Bt(z.setItemRaw,L,x,O);else if(z.setItem)await Bt(z.setItem,L,m1(x),O);else return;z.watch||o("update",m)},async removeItem(m,x={}){typeof x=="boolean"&&(x={removeMeta:x}),m=ur(m);const{relativeKey:O,driver:L}=i(m);L.removeItem&&(await Bt(L.removeItem,O,x),(x.removeMeta||x.removeMata)&&await Bt(L.removeItem,O+"$",x),L.watch||o("remove",m))},async getMeta(m,x={}){typeof x=="boolean"&&(x={nativeOnly:x}),m=ur(m);const{relativeKey:O,driver:L}=i(m),z=Object.create(null);if(L.getMeta&&Object.assign(z,await Bt(L.getMeta,O,x)),!x.nativeOnly){const R=await Bt(L.getItem,O+"$",x).then(K=>eo(K));R&&typeof R=="object"&&(typeof R.atime=="string"&&(R.atime=new Date(R.atime)),typeof R.mtime=="string"&&(R.mtime=new Date(R.mtime)),Object.assign(z,R))}return z},setMeta(m,x,O={}){return this.setItem(m+"$",x,O)},removeMeta(m,x={}){return this.removeItem(m+"$",x)},async getKeys(m,x={}){m=to(m);const O=s(m,!0);let L=[];const z=[];for(const R of O){const re=(await Bt(R.driver.getKeys,R.relativeBase,x)).map(he=>R.mountpoint+ur(he)).filter(he=>!L.some(le=>he.startsWith(le)));z.push(...re),L=[R.mountpoint,...L.filter(he=>!he.startsWith(R.mountpoint))]}return m?z.filter(R=>R.startsWith(m)&&!R.endsWith("$")):z.filter(R=>!R.endsWith("$"))},async clear(m,x={}){m=to(m),await Promise.all(s(m,!1).map(async O=>{if(O.driver.clear)return Bt(O.driver.clear,O.relativeBase,x);if(O.driver.removeItem){const L=await O.driver.getKeys(O.relativeBase||"",x);return Promise.all(L.map(z=>O.driver.removeItem(z,x)))}}))},async dispose(){await Promise.all(Object.values(t.mounts).map(m=>Uh(m)))},async watch(m){return await h(),t.watchListeners.push(m),async()=>{t.watchListeners=t.watchListeners.filter(x=>x!==m),t.watchListeners.length===0&&await p()}},async unwatch(){t.watchListeners=[],await p()},mount(m,x){if(m=to(m),m&&t.mounts[m])throw new Error(`already mounted at ${m}`);return m&&(t.mountpoints.push(m),t.mountpoints.sort((O,L)=>L.length-O.length)),t.mounts[m]=x,t.watching&&Promise.resolve(zh(x,o,m)).then(O=>{t.unwatch[m]=O}).catch(console.error),_},async unmount(m,x=!0){m=to(m),!(!m||!t.mounts[m])&&(t.watching&&m in t.unwatch&&(t.unwatch[m](),delete t.unwatch[m]),x&&await Uh(t.mounts[m]),t.mountpoints=t.mountpoints.filter(O=>O!==m),delete t.mounts[m])},getMount(m=""){m=ur(m)+":";const x=i(m);return{driver:x.driver,base:x.base}},getMounts(m="",x={}){return m=ur(m),s(m,x.parents).map(L=>({driver:L.driver,base:L.mountpoint}))}};return _}function zh(a,t,i){return a.watch?a.watch((s,o)=>t(s,i+o)):()=>{}}async function Uh(a){typeof a.dispose=="function"&&await Bt(a.dispose)}function Bi(a){return new Promise((t,i)=>{a.oncomplete=a.onsuccess=()=>t(a.result),a.onabort=a.onerror=()=>i(a.error)})}function sf(a,t){const i=indexedDB.open(a);i.onupgradeneeded=()=>i.result.createObjectStore(t);const s=Bi(i);return(o,h)=>s.then(p=>h(p.transaction(t,o).objectStore(t)))}let Ja;function Gn(){return Ja||(Ja=sf("keyval-store","keyval")),Ja}function qh(a,t=Gn()){return t("readonly",i=>Bi(i.get(a)))}function x1(a,t,i=Gn()){return i("readwrite",s=>(s.put(t,a),Bi(s.transaction)))}function S1(a,t=Gn()){return t("readwrite",i=>(i.delete(a),Bi(i.transaction)))}function P1(a=Gn()){return a("readwrite",t=>(t.clear(),Bi(t.transaction)))}function A1(a,t){return a.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},Bi(a.transaction)}function C1(a=Gn()){return a("readonly",t=>{if(t.getAllKeys)return Bi(t.getAllKeys());const i=[];return A1(t,s=>i.push(s.key)).then(()=>i)})}const O1=a=>JSON.stringify(a,(t,i)=>typeof i=="bigint"?i.toString()+"n":i),R1=a=>{const t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,i=a.replace(t,'$1"$2n"$3');return JSON.parse(i,(s,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function Wn(a){if(typeof a!="string")throw new Error(`Cannot safe json parse value of type ${typeof a}`);try{return R1(a)}catch{return a}}function qi(a){return typeof a=="string"?a:O1(a)||""}const T1="idb-keyval";var N1=(a={})=>{const t=a.base&&a.base.length>0?`${a.base}:`:"",i=o=>t+o;let s;return a.dbName&&a.storeName&&(s=sf(a.dbName,a.storeName)),{name:T1,options:a,async hasItem(o){return!(typeof await qh(i(o),s)>"u")},async getItem(o){return await qh(i(o),s)??null},setItem(o,h){return x1(i(o),h,s)},removeItem(o){return S1(i(o),s)},getKeys(){return C1(s)},clear(){return P1(s)}}};const D1="WALLET_CONNECT_V2_INDEXED_DB",L1="keyvaluestorage";let F1=class{constructor(){this.indexedDb=I1({driver:N1({dbName:D1,storeName:L1})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(t=>[t.key,t.value])}async getItem(t){const i=await this.indexedDb.getItem(t);if(i!==null)return i}async setItem(t,i){await this.indexedDb.setItem(t,qi(i))}async removeItem(t){await this.indexedDb.removeItem(t)}};var Ya=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ho={exports:{}};(function(){let a;function t(){}a=t,a.prototype.getItem=function(i){return this.hasOwnProperty(i)?String(this[i]):null},a.prototype.setItem=function(i,s){this[i]=String(s)},a.prototype.removeItem=function(i){delete this[i]},a.prototype.clear=function(){const i=this;Object.keys(i).forEach(function(s){i[s]=void 0,delete i[s]})},a.prototype.key=function(i){return i=i||0,Object.keys(this)[i]},a.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof Ya<"u"&&Ya.localStorage?ho.exports=Ya.localStorage:typeof window<"u"&&window.localStorage?ho.exports=window.localStorage:ho.exports=new t})();function $1(a){var t;return[a[0],Wn((t=a[1])!=null?t:"")]}let M1=class{constructor(){this.localStorage=ho.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map($1)}async getItem(t){const i=this.localStorage.getItem(t);if(i!==null)return Wn(i)}async setItem(t,i){this.localStorage.setItem(t,qi(i))}async removeItem(t){this.localStorage.removeItem(t)}};const j1="wc_storage_version",Bh=1,z1=async(a,t,i)=>{const s=j1,o=await t.getItem(s);if(o&&o>=Bh){i(t);return}const h=await a.getKeys();if(!h.length){i(t);return}const p=[];for(;h.length;){const g=h.shift();if(!g)continue;const _=g.toLowerCase();if(_.includes("wc@")||_.includes("walletconnect")||_.includes("wc_")||_.includes("wallet_connect")){const m=await a.getItem(g);await t.setItem(g,m),p.push(g)}}await t.setItem(s,Bh),i(t),U1(a,p)},U1=async(a,t)=>{t.length&&t.forEach(async i=>{await a.removeItem(i)})};let q1=class{constructor(){this.initialized=!1,this.setInitialized=i=>{this.storage=i,this.initialized=!0};const t=new M1;this.storage=t;try{const i=new F1;z1(t,i,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(t){return await this.initialize(),this.storage.getItem(t)}async setItem(t,i){return await this.initialize(),this.storage.setItem(t,i)}async removeItem(t){return await this.initialize(),this.storage.removeItem(t)}async initialize(){this.initialized||await new Promise(t=>{const i=setInterval(()=>{this.initialized&&(clearInterval(i),t())},20)})}};var mn={},jn={},Xa={},zn={};let Hi=class{};const B1=Object.freeze(Object.defineProperty({__proto__:null,IEvents:Hi},Symbol.toStringTag,{value:"Module"})),H1=mm(B1);var Hh;function k1(){if(Hh)return zn;Hh=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.IHeartBeat=void 0;const a=H1;class t extends a.IEvents{constructor(s){super()}}return zn.IHeartBeat=t,zn}var kh;function of(){return kh||(kh=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),vn.__exportStar(k1(),a)}(Xa)),Xa}var Za={},zi={},Kh;function K1(){if(Kh)return zi;Kh=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.HEARTBEAT_EVENTS=zi.HEARTBEAT_INTERVAL=void 0;const a=se;return zi.HEARTBEAT_INTERVAL=a.FIVE_SECONDS,zi.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},zi}var Vh;function af(){return Vh||(Vh=1,function(a){Object.defineProperty(a,"__esModule",{value:!0}),vn.__exportStar(K1(),a)}(Za)),Za}var Gh;function V1(){if(Gh)return jn;Gh=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.HeartBeat=void 0;const a=vn,t=vr,i=se,s=of(),o=af();class h extends s.IHeartBeat{constructor(g){super(g),this.events=new t.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(g==null?void 0:g.interval)||o.HEARTBEAT_INTERVAL}static init(g){return a.__awaiter(this,void 0,void 0,function*(){const _=new h(g);return yield _.init(),_})}init(){return a.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(g,_){this.events.on(g,_)}once(g,_){this.events.once(g,_)}off(g,_){this.events.off(g,_)}removeListener(g,_){this.events.removeListener(g,_)}initialize(){return a.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),i.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return jn.HeartBeat=h,jn}(function(a){Object.defineProperty(a,"__esModule",{value:!0});const t=vn;t.__exportStar(V1(),a),t.__exportStar(of(),a),t.__exportStar(af(),a)})(mn);var Re={},Qa,Wh;function G1(){if(Wh)return Qa;Wh=1;function a(i){try{return JSON.stringify(i)}catch{return'"[Circular]"'}}Qa=t;function t(i,s,o){var h=o&&o.stringify||a,p=1;if(typeof i=="object"&&i!==null){var g=s.length+p;if(g===1)return i;var _=new Array(g);_[0]=h(i);for(var m=1;m-1?z:0,i.charCodeAt(K+1)){case 100:case 102:if(L>=x||s[L]==null)break;z=x||s[L]==null)break;z=x||s[L]===void 0)break;z",z=K+2,K++;break}O+=h(s[L]),z=K+2,K++;break;case 115:if(L>=x)break;z-1&&(ue=!1);const Te=["error","fatal","warn","info","debug","trace"];typeof W=="function"&&(W.error=W.fatal=W.warn=W.info=W.debug=W.trace=W),F.enabled===!1&&(F.level="silent");const Ue=F.level||"info",v=Object.create(W);v.log||(v.log=re),Object.defineProperty(v,"levelVal",{get:X}),Object.defineProperty(v,"level",{get:ce,set:V});const I={transmit:q,serialize:ie,asObject:F.browser.asObject,levels:Te,timestamp:z(F)};v.levels=o.levels,v.level=Ue,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=re,v.serializers=ve,v._serialize=ie,v._stdErrSerialize=ue,v.child=B,q&&(v._logEvent=O());function X(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ce(){return this._level}function V(k){if(k!=="silent"&&!this.levels.values[k])throw Error("unknown level "+k);this._level=k,h(I,v,"error","log"),h(I,v,"fatal","error"),h(I,v,"warn","error"),h(I,v,"info","log"),h(I,v,"debug","log"),h(I,v,"trace","log")}function B(k,G){if(!k)throw new Error("missing bindings for child Pino");G=G||{},ie&&k.serializers&&(G.serializers=k.serializers);const Ye=G.serializers;if(ie&&Ye){var ke=Object.assign({},ve,Ye),zr=F.browser.serialize===!0?Object.keys(ke):ie;delete k.serializers,_([k],zr,ke,this._stdErrSerialize)}function Ie(St){this._childLevel=(St._childLevel|0)+1,this.error=m(St,k,"error"),this.fatal=m(St,k,"fatal"),this.warn=m(St,k,"warn"),this.info=m(St,k,"info"),this.debug=m(St,k,"debug"),this.trace=m(St,k,"trace"),ke&&(this.serializers=ke,this._serialize=zr),q&&(this._logEvent=O([].concat(St._logEvent.bindings,k)))}return Ie.prototype=this,new Ie(this)}return v}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=i,o.stdTimeFunctions=Object.assign({},{nullTime:he,epochTime:le,unixTime:fe,isoTime:pe});function h(F,q,W,ve){const ie=Object.getPrototypeOf(q);q[W]=q.levelVal>q.levels.values[W]?re:ie[W]?ie[W]:t[W]||t[ve]||re,p(F,q,W)}function p(F,q,W){!F.transmit&&q[W]===re||(q[W]=function(ve){return function(){const ue=F.timestamp(),Te=new Array(arguments.length),Ue=Object.getPrototypeOf&&Object.getPrototypeOf(this)===t?t:this;for(var v=0;v-1&&ue in W&&(F[ie][ue]=W[ue](F[ie][ue]))}function m(F,q,W){return function(){const ve=new Array(1+arguments.length);ve[0]=q;for(var ie=1;ie"u"?m=i(g,_):m=g.bindings().context||"",m}tr.getLoggerContext=o;function h(g,_,m=a.PINO_CUSTOM_CONTEXT_KEY){const x=o(g,m);return x.trim()?`${x}/${_}`:_}tr.formatChildLoggerContext=h;function p(g,_,m=a.PINO_CUSTOM_CONTEXT_KEY){const x=h(g,_,m),O=g.child({context:x});return s(O,x,m)}return tr.generateChildLogger=p,tr}(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.pino=void 0;const t=vn,i=t.__importDefault(W1());Object.defineProperty(a,"pino",{enumerable:!0,get:function(){return i.default}}),t.__exportStar(cf(),a),t.__exportStar(J1(),a)})(Re);class Y1 extends Hi{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}}class X1 extends Hi{constructor(t,i){super(),this.core=t,this.logger=i,this.records=new Map}}class Z1{constructor(t,i){this.logger=t,this.core=i}}let Q1=class extends Hi{constructor(t,i){super(),this.relayer=t,this.logger=i}},ew=class extends Hi{constructor(t){super()}},tw=class{constructor(t,i,s,o){this.core=t,this.logger=i,this.name=s}};class rw extends Hi{constructor(t,i){super(),this.relayer=t,this.logger=i}}let iw=class extends Hi{constructor(t,i){super(),this.core=t,this.logger=i}},nw=class{constructor(t,i){this.projectId=t,this.logger=i}},sw=class{constructor(t){this.opts=t,this.protocol="wc",this.version=2}},ow=class{constructor(t){this.client=t}};var xc={},uf={};(function(a){Object.defineProperty(a,"__esModule",{value:!0});var t=wm,i=ql;a.DIGEST_LENGTH=64,a.BLOCK_SIZE=128;var s=function(){function g(){this.digestLength=a.DIGEST_LENGTH,this.blockSize=a.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return g.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},g.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},g.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},g.prototype.update=function(_,m){if(m===void 0&&(m=_.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var x=0;if(this._bytesHashed+=m,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=_[x++],m--;this._bufferLength===this.blockSize&&(h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(m>=this.blockSize&&(x=h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,_,x,m),m%=this.blockSize);m>0;)this._buffer[this._bufferLength++]=_[x++],m--;return this},g.prototype.finish=function(_){if(!this._finished){var m=this._bytesHashed,x=this._bufferLength,O=m/536870912|0,L=m<<3,z=m%128<112?128:256;this._buffer[x]=128;for(var R=x+1;R0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},g.prototype.restoreState=function(_){return this._stateHi.set(_.stateHi),this._stateLo.set(_.stateLo),this._bufferLength=_.bufferLength,_.buffer&&this._buffer.set(_.buffer),this._bytesHashed=_.bytesHashed,this._finished=!1,this},g.prototype.cleanSavedState=function(_){i.wipe(_.stateHi),i.wipe(_.stateLo),_.buffer&&i.wipe(_.buffer),_.bufferLength=0,_.bytesHashed=0},g}();a.SHA512=s;var o=new Int32Array([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 h(g,_,m,x,O,L,z){for(var R=m[0],K=m[1],re=m[2],he=m[3],le=m[4],fe=m[5],pe=m[6],de=m[7],F=x[0],q=x[1],W=x[2],ve=x[3],ie=x[4],ue=x[5],Te=x[6],Ue=x[7],v,I,X,ce,V,B,k,G;z>=128;){for(var Ye=0;Ye<16;Ye++){var ke=8*Ye+L;g[Ye]=t.readUint32BE(O,ke),_[Ye]=t.readUint32BE(O,ke+4)}for(var Ye=0;Ye<80;Ye++){var zr=R,Ie=K,St=re,D=he,N=le,C=fe,u=pe,E=de,ee=F,ge=q,be=W,Ne=ve,Le=ie,Pe=ue,Pt=Te,wt=Ue;if(v=de,I=Ue,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=(le>>>14|ie<<32-14)^(le>>>18|ie<<32-18)^(ie>>>41-32|le<<32-(41-32)),I=(ie>>>14|le<<32-14)^(ie>>>18|le<<32-18)^(le>>>41-32|ie<<32-(41-32)),V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,v=le&fe^~le&pe,I=ie&ue^~ie&Te,V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,v=o[Ye*2],I=o[Ye*2+1],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,v=g[Ye%16],I=_[Ye%16],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,X=k&65535|G<<16,ce=V&65535|B<<16,v=X,I=ce,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=(R>>>28|F<<32-28)^(F>>>34-32|R<<32-(34-32))^(F>>>39-32|R<<32-(39-32)),I=(F>>>28|R<<32-28)^(R>>>34-32|F<<32-(34-32))^(R>>>39-32|F<<32-(39-32)),V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,v=R&K^R&re^K&re,I=F&q^F&W^q&W,V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,E=k&65535|G<<16,wt=V&65535|B<<16,v=D,I=Ne,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=X,I=ce,V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,D=k&65535|G<<16,Ne=V&65535|B<<16,K=zr,re=Ie,he=St,le=D,fe=N,pe=C,de=u,R=E,q=ee,W=ge,ve=be,ie=Ne,ue=Le,Te=Pe,Ue=Pt,F=wt,Ye%16===15)for(var ke=0;ke<16;ke++)v=g[ke],I=_[ke],V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=g[(ke+9)%16],I=_[(ke+9)%16],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,X=g[(ke+1)%16],ce=_[(ke+1)%16],v=(X>>>1|ce<<32-1)^(X>>>8|ce<<32-8)^X>>>7,I=(ce>>>1|X<<32-1)^(ce>>>8|X<<32-8)^(ce>>>7|X<<32-7),V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,X=g[(ke+14)%16],ce=_[(ke+14)%16],v=(X>>>19|ce<<32-19)^(ce>>>61-32|X<<32-(61-32))^X>>>6,I=(ce>>>19|X<<32-19)^(X>>>61-32|ce<<32-(61-32))^(ce>>>6|X<<32-6),V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,g[ke]=k&65535|G<<16,_[ke]=V&65535|B<<16}v=R,I=F,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[0],I=x[0],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[0]=R=k&65535|G<<16,x[0]=F=V&65535|B<<16,v=K,I=q,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[1],I=x[1],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[1]=K=k&65535|G<<16,x[1]=q=V&65535|B<<16,v=re,I=W,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[2],I=x[2],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[2]=re=k&65535|G<<16,x[2]=W=V&65535|B<<16,v=he,I=ve,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[3],I=x[3],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[3]=he=k&65535|G<<16,x[3]=ve=V&65535|B<<16,v=le,I=ie,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[4],I=x[4],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[4]=le=k&65535|G<<16,x[4]=ie=V&65535|B<<16,v=fe,I=ue,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[5],I=x[5],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[5]=fe=k&65535|G<<16,x[5]=ue=V&65535|B<<16,v=pe,I=Te,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[6],I=x[6],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[6]=pe=k&65535|G<<16,x[6]=Te=V&65535|B<<16,v=de,I=Ue,V=I&65535,B=I>>>16,k=v&65535,G=v>>>16,v=m[7],I=x[7],V+=I&65535,B+=I>>>16,k+=v&65535,G+=v>>>16,B+=V>>>16,k+=B>>>16,G+=k>>>16,m[7]=de=k&65535|G<<16,x[7]=Ue=V&65535|B<<16,L+=128,z-=128}return L}function p(g){var _=new s;_.update(g);var m=_.digest();return _.clean(),m}a.hash=p})(uf);(function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.convertSecretKeyToX25519=a.convertPublicKeyToX25519=a.verify=a.sign=a.extractPublicKeyFromSecretKey=a.generateKeyPair=a.generateKeyPairFromSeed=a.SEED_LENGTH=a.SECRET_KEY_LENGTH=a.PUBLIC_KEY_LENGTH=a.SIGNATURE_LENGTH=void 0;const t=Bl,i=uf,s=ql;a.SIGNATURE_LENGTH=64,a.PUBLIC_KEY_LENGTH=32,a.SECRET_KEY_LENGTH=64,a.SEED_LENGTH=32;function o(D){const N=new Float64Array(16);if(D)for(let C=0;C>16&1),C[ge-1]&=65535;C[15]=u[15]-32767-(C[14]>>16&1);const ee=C[15]>>16&1;C[14]&=65535,K(u,C,1-ee)}for(let E=0;E<16;E++)D[2*E]=u[E]&255,D[2*E+1]=u[E]>>8}function he(D,N){let C=0;for(let u=0;u<32;u++)C|=D[u]^N[u];return(1&C-1>>>8)-1}function le(D,N){const C=new Uint8Array(32),u=new Uint8Array(32);return re(C,D),re(u,N),he(C,u)}function fe(D){const N=new Uint8Array(32);return re(N,D),N[0]&1}function pe(D,N){for(let C=0;C<16;C++)D[C]=N[2*C]+(N[2*C+1]<<8);D[15]&=32767}function de(D,N,C){for(let u=0;u<16;u++)D[u]=N[u]+C[u]}function F(D,N,C){for(let u=0;u<16;u++)D[u]=N[u]-C[u]}function q(D,N,C){let u,E,ee=0,ge=0,be=0,Ne=0,Le=0,Pe=0,Pt=0,wt=0,ot=0,$e=0,Ze=0,Qe=0,at=0,qe=0,et=0,De=0,Ke=0,ht=0,je=0,At=0,$t=0,Ht=0,kt=0,zt=0,Jt=0,ir=0,Ur=0,Yt=0,Wr=0,ui=0,Si=0,lt=C[0],it=C[1],ft=C[2],pt=C[3],ct=C[4],nt=C[5],Ct=C[6],Ot=C[7],dt=C[8],Rt=C[9],gt=C[10],_t=C[11],yt=C[12],Xe=C[13],Tt=C[14],Nt=C[15];u=N[0],ee+=u*lt,ge+=u*it,be+=u*ft,Ne+=u*pt,Le+=u*ct,Pe+=u*nt,Pt+=u*Ct,wt+=u*Ot,ot+=u*dt,$e+=u*Rt,Ze+=u*gt,Qe+=u*_t,at+=u*yt,qe+=u*Xe,et+=u*Tt,De+=u*Nt,u=N[1],ge+=u*lt,be+=u*it,Ne+=u*ft,Le+=u*pt,Pe+=u*ct,Pt+=u*nt,wt+=u*Ct,ot+=u*Ot,$e+=u*dt,Ze+=u*Rt,Qe+=u*gt,at+=u*_t,qe+=u*yt,et+=u*Xe,De+=u*Tt,Ke+=u*Nt,u=N[2],be+=u*lt,Ne+=u*it,Le+=u*ft,Pe+=u*pt,Pt+=u*ct,wt+=u*nt,ot+=u*Ct,$e+=u*Ot,Ze+=u*dt,Qe+=u*Rt,at+=u*gt,qe+=u*_t,et+=u*yt,De+=u*Xe,Ke+=u*Tt,ht+=u*Nt,u=N[3],Ne+=u*lt,Le+=u*it,Pe+=u*ft,Pt+=u*pt,wt+=u*ct,ot+=u*nt,$e+=u*Ct,Ze+=u*Ot,Qe+=u*dt,at+=u*Rt,qe+=u*gt,et+=u*_t,De+=u*yt,Ke+=u*Xe,ht+=u*Tt,je+=u*Nt,u=N[4],Le+=u*lt,Pe+=u*it,Pt+=u*ft,wt+=u*pt,ot+=u*ct,$e+=u*nt,Ze+=u*Ct,Qe+=u*Ot,at+=u*dt,qe+=u*Rt,et+=u*gt,De+=u*_t,Ke+=u*yt,ht+=u*Xe,je+=u*Tt,At+=u*Nt,u=N[5],Pe+=u*lt,Pt+=u*it,wt+=u*ft,ot+=u*pt,$e+=u*ct,Ze+=u*nt,Qe+=u*Ct,at+=u*Ot,qe+=u*dt,et+=u*Rt,De+=u*gt,Ke+=u*_t,ht+=u*yt,je+=u*Xe,At+=u*Tt,$t+=u*Nt,u=N[6],Pt+=u*lt,wt+=u*it,ot+=u*ft,$e+=u*pt,Ze+=u*ct,Qe+=u*nt,at+=u*Ct,qe+=u*Ot,et+=u*dt,De+=u*Rt,Ke+=u*gt,ht+=u*_t,je+=u*yt,At+=u*Xe,$t+=u*Tt,Ht+=u*Nt,u=N[7],wt+=u*lt,ot+=u*it,$e+=u*ft,Ze+=u*pt,Qe+=u*ct,at+=u*nt,qe+=u*Ct,et+=u*Ot,De+=u*dt,Ke+=u*Rt,ht+=u*gt,je+=u*_t,At+=u*yt,$t+=u*Xe,Ht+=u*Tt,kt+=u*Nt,u=N[8],ot+=u*lt,$e+=u*it,Ze+=u*ft,Qe+=u*pt,at+=u*ct,qe+=u*nt,et+=u*Ct,De+=u*Ot,Ke+=u*dt,ht+=u*Rt,je+=u*gt,At+=u*_t,$t+=u*yt,Ht+=u*Xe,kt+=u*Tt,zt+=u*Nt,u=N[9],$e+=u*lt,Ze+=u*it,Qe+=u*ft,at+=u*pt,qe+=u*ct,et+=u*nt,De+=u*Ct,Ke+=u*Ot,ht+=u*dt,je+=u*Rt,At+=u*gt,$t+=u*_t,Ht+=u*yt,kt+=u*Xe,zt+=u*Tt,Jt+=u*Nt,u=N[10],Ze+=u*lt,Qe+=u*it,at+=u*ft,qe+=u*pt,et+=u*ct,De+=u*nt,Ke+=u*Ct,ht+=u*Ot,je+=u*dt,At+=u*Rt,$t+=u*gt,Ht+=u*_t,kt+=u*yt,zt+=u*Xe,Jt+=u*Tt,ir+=u*Nt,u=N[11],Qe+=u*lt,at+=u*it,qe+=u*ft,et+=u*pt,De+=u*ct,Ke+=u*nt,ht+=u*Ct,je+=u*Ot,At+=u*dt,$t+=u*Rt,Ht+=u*gt,kt+=u*_t,zt+=u*yt,Jt+=u*Xe,ir+=u*Tt,Ur+=u*Nt,u=N[12],at+=u*lt,qe+=u*it,et+=u*ft,De+=u*pt,Ke+=u*ct,ht+=u*nt,je+=u*Ct,At+=u*Ot,$t+=u*dt,Ht+=u*Rt,kt+=u*gt,zt+=u*_t,Jt+=u*yt,ir+=u*Xe,Ur+=u*Tt,Yt+=u*Nt,u=N[13],qe+=u*lt,et+=u*it,De+=u*ft,Ke+=u*pt,ht+=u*ct,je+=u*nt,At+=u*Ct,$t+=u*Ot,Ht+=u*dt,kt+=u*Rt,zt+=u*gt,Jt+=u*_t,ir+=u*yt,Ur+=u*Xe,Yt+=u*Tt,Wr+=u*Nt,u=N[14],et+=u*lt,De+=u*it,Ke+=u*ft,ht+=u*pt,je+=u*ct,At+=u*nt,$t+=u*Ct,Ht+=u*Ot,kt+=u*dt,zt+=u*Rt,Jt+=u*gt,ir+=u*_t,Ur+=u*yt,Yt+=u*Xe,Wr+=u*Tt,ui+=u*Nt,u=N[15],De+=u*lt,Ke+=u*it,ht+=u*ft,je+=u*pt,At+=u*ct,$t+=u*nt,Ht+=u*Ct,kt+=u*Ot,zt+=u*dt,Jt+=u*Rt,ir+=u*gt,Ur+=u*_t,Yt+=u*yt,Wr+=u*Xe,ui+=u*Tt,Si+=u*Nt,ee+=38*Ke,ge+=38*ht,be+=38*je,Ne+=38*At,Le+=38*$t,Pe+=38*Ht,Pt+=38*kt,wt+=38*zt,ot+=38*Jt,$e+=38*ir,Ze+=38*Ur,Qe+=38*Yt,at+=38*Wr,qe+=38*ui,et+=38*Si,E=1,u=ee+E+65535,E=Math.floor(u/65536),ee=u-E*65536,u=ge+E+65535,E=Math.floor(u/65536),ge=u-E*65536,u=be+E+65535,E=Math.floor(u/65536),be=u-E*65536,u=Ne+E+65535,E=Math.floor(u/65536),Ne=u-E*65536,u=Le+E+65535,E=Math.floor(u/65536),Le=u-E*65536,u=Pe+E+65535,E=Math.floor(u/65536),Pe=u-E*65536,u=Pt+E+65535,E=Math.floor(u/65536),Pt=u-E*65536,u=wt+E+65535,E=Math.floor(u/65536),wt=u-E*65536,u=ot+E+65535,E=Math.floor(u/65536),ot=u-E*65536,u=$e+E+65535,E=Math.floor(u/65536),$e=u-E*65536,u=Ze+E+65535,E=Math.floor(u/65536),Ze=u-E*65536,u=Qe+E+65535,E=Math.floor(u/65536),Qe=u-E*65536,u=at+E+65535,E=Math.floor(u/65536),at=u-E*65536,u=qe+E+65535,E=Math.floor(u/65536),qe=u-E*65536,u=et+E+65535,E=Math.floor(u/65536),et=u-E*65536,u=De+E+65535,E=Math.floor(u/65536),De=u-E*65536,ee+=E-1+37*(E-1),E=1,u=ee+E+65535,E=Math.floor(u/65536),ee=u-E*65536,u=ge+E+65535,E=Math.floor(u/65536),ge=u-E*65536,u=be+E+65535,E=Math.floor(u/65536),be=u-E*65536,u=Ne+E+65535,E=Math.floor(u/65536),Ne=u-E*65536,u=Le+E+65535,E=Math.floor(u/65536),Le=u-E*65536,u=Pe+E+65535,E=Math.floor(u/65536),Pe=u-E*65536,u=Pt+E+65535,E=Math.floor(u/65536),Pt=u-E*65536,u=wt+E+65535,E=Math.floor(u/65536),wt=u-E*65536,u=ot+E+65535,E=Math.floor(u/65536),ot=u-E*65536,u=$e+E+65535,E=Math.floor(u/65536),$e=u-E*65536,u=Ze+E+65535,E=Math.floor(u/65536),Ze=u-E*65536,u=Qe+E+65535,E=Math.floor(u/65536),Qe=u-E*65536,u=at+E+65535,E=Math.floor(u/65536),at=u-E*65536,u=qe+E+65535,E=Math.floor(u/65536),qe=u-E*65536,u=et+E+65535,E=Math.floor(u/65536),et=u-E*65536,u=De+E+65535,E=Math.floor(u/65536),De=u-E*65536,ee+=E-1+37*(E-1),D[0]=ee,D[1]=ge,D[2]=be,D[3]=Ne,D[4]=Le,D[5]=Pe,D[6]=Pt,D[7]=wt,D[8]=ot,D[9]=$e,D[10]=Ze,D[11]=Qe,D[12]=at,D[13]=qe,D[14]=et,D[15]=De}function W(D,N){q(D,N,N)}function ve(D,N){const C=o();let u;for(u=0;u<16;u++)C[u]=N[u];for(u=253;u>=0;u--)W(C,C),u!==2&&u!==4&&q(C,C,N);for(u=0;u<16;u++)D[u]=C[u]}function ie(D,N){const C=o();let u;for(u=0;u<16;u++)C[u]=N[u];for(u=250;u>=0;u--)W(C,C),u!==1&&q(C,C,N);for(u=0;u<16;u++)D[u]=C[u]}function ue(D,N){const C=o(),u=o(),E=o(),ee=o(),ge=o(),be=o(),Ne=o(),Le=o(),Pe=o();F(C,D[1],D[0]),F(Pe,N[1],N[0]),q(C,C,Pe),de(u,D[0],D[1]),de(Pe,N[0],N[1]),q(u,u,Pe),q(E,D[3],N[3]),q(E,E,m),q(ee,D[2],N[2]),de(ee,ee,ee),F(ge,u,C),F(be,ee,E),de(Ne,ee,E),de(Le,u,C),q(D[0],ge,be),q(D[1],Le,Ne),q(D[2],Ne,be),q(D[3],ge,Le)}function Te(D,N,C){for(let u=0;u<4;u++)K(D[u],N[u],C)}function Ue(D,N){const C=o(),u=o(),E=o();ve(E,N[2]),q(C,N[0],E),q(u,N[1],E),re(D,u),D[31]^=fe(C)<<7}function v(D,N,C){z(D[0],p),z(D[1],g),z(D[2],g),z(D[3],p);for(let u=255;u>=0;--u){const E=C[u/8|0]>>(u&7)&1;Te(D,N,E),ue(N,D),ue(D,D),Te(D,N,E)}}function I(D,N){const C=[o(),o(),o(),o()];z(C[0],x),z(C[1],O),z(C[2],g),q(C[3],x,O),v(D,C,N)}function X(D){if(D.length!==a.SEED_LENGTH)throw new Error(`ed25519: seed must be ${a.SEED_LENGTH} bytes`);const N=(0,i.hash)(D);N[0]&=248,N[31]&=127,N[31]|=64;const C=new Uint8Array(32),u=[o(),o(),o(),o()];I(u,N),Ue(C,u);const E=new Uint8Array(64);return E.set(D),E.set(C,32),{publicKey:C,secretKey:E}}a.generateKeyPairFromSeed=X;function ce(D){const N=(0,t.randomBytes)(32,D),C=X(N);return(0,s.wipe)(N),C}a.generateKeyPair=ce;function V(D){if(D.length!==a.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${a.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(D.subarray(32))}a.extractPublicKeyFromSecretKey=V;const B=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function k(D,N){let C,u,E,ee;for(u=63;u>=32;--u){for(C=0,E=u-32,ee=u-12;E>4)*B[E],C=N[E]>>8,N[E]&=255;for(E=0;E<32;E++)N[E]-=C*B[E];for(u=0;u<32;u++)N[u+1]+=N[u]>>8,D[u]=N[u]&255}function G(D){const N=new Float64Array(64);for(let C=0;C<64;C++)N[C]=D[C];for(let C=0;C<64;C++)D[C]=0;k(D,N)}function Ye(D,N){const C=new Float64Array(64),u=[o(),o(),o(),o()],E=(0,i.hash)(D.subarray(0,32));E[0]&=248,E[31]&=127,E[31]|=64;const ee=new Uint8Array(64);ee.set(E.subarray(32),32);const ge=new i.SHA512;ge.update(ee.subarray(32)),ge.update(N);const be=ge.digest();ge.clean(),G(be),I(u,be),Ue(ee,u),ge.reset(),ge.update(ee.subarray(0,32)),ge.update(D.subarray(32)),ge.update(N);const Ne=ge.digest();G(Ne);for(let Le=0;Le<32;Le++)C[Le]=be[Le];for(let Le=0;Le<32;Le++)for(let Pe=0;Pe<32;Pe++)C[Le+Pe]+=Ne[Le]*E[Pe];return k(ee.subarray(32),C),ee}a.sign=Ye;function ke(D,N){const C=o(),u=o(),E=o(),ee=o(),ge=o(),be=o(),Ne=o();return z(D[2],g),pe(D[1],N),W(E,D[1]),q(ee,E,_),F(E,E,D[2]),de(ee,D[2],ee),W(ge,ee),W(be,ge),q(Ne,be,ge),q(C,Ne,E),q(C,C,ee),ie(C,C),q(C,C,E),q(C,C,ee),q(C,C,ee),q(D[0],C,ee),W(u,D[0]),q(u,u,ee),le(u,E)&&q(D[0],D[0],L),W(u,D[0]),q(u,u,ee),le(u,E)?-1:(fe(D[0])===N[31]>>7&&F(D[0],p,D[0]),q(D[3],D[0],D[1]),0)}function zr(D,N,C){const u=new Uint8Array(32),E=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(C.length!==a.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${a.SIGNATURE_LENGTH} bytes`);if(ke(ee,D))return!1;const ge=new i.SHA512;ge.update(C.subarray(0,32)),ge.update(D),ge.update(N);const be=ge.digest();return G(be),v(E,ee,be),I(ee,C.subarray(32)),ue(E,ee),Ue(u,E),!he(C,u)}a.verify=zr;function Ie(D){let N=[o(),o(),o(),o()];if(ke(N,D))throw new Error("Ed25519: invalid public key");let C=o(),u=o(),E=N[1];de(C,g,E),F(u,g,E),ve(u,u),q(C,C,u);let ee=new Uint8Array(32);return re(ee,C),ee}a.convertPublicKeyToX25519=Ie;function St(D){const N=(0,i.hash)(D.subarray(0,32));N[0]&=248,N[31]&=127,N[31]|=64;const C=new Uint8Array(N.subarray(0,32));return(0,s.wipe)(N),C}a.convertSecretKeyToX25519=St})(xc);const aw="EdDSA",cw="JWT",hf=".",lf="base64url",uw="utf8",hw="utf8",lw=":",fw="did",pw="key",Zh="base58btc",dw="z",gw="K36",yw=32;function fo(a){return yo(bc(qi(a),uw),lf)}function ff(a){const t=bc(gw,Zh),i=dw+yo(_m([t,a]),Zh);return[fw,pw,i].join(lw)}function vw(a){return yo(a,lf)}function mw(a){return bc([fo(a.header),fo(a.payload)].join(hf),hw)}function ww(a){return[fo(a.header),fo(a.payload),vw(a.signature)].join(hf)}function Qh(a=Bl.randomBytes(yw)){return xc.generateKeyPairFromSeed(a)}async function _w(a,t,i,s,o=se.fromMiliseconds(Date.now())){const h={alg:aw,typ:cw},p=ff(s.publicKey),g=o+i,_={iss:p,sub:a,aud:t,iat:o,exp:g},m=mw({header:h,payload:_}),x=xc.sign(s.secretKey,m);return ww({header:h,payload:_,signature:x})}const bw="PARSE_ERROR",Ew="INVALID_REQUEST",Iw="METHOD_NOT_FOUND",xw="INVALID_PARAMS",pf="INTERNAL_ERROR",Sc="SERVER_ERROR",Sw=[-32700,-32600,-32601,-32602,-32603],Vn={[bw]:{code:-32700,message:"Parse error"},[Ew]:{code:-32600,message:"Invalid Request"},[Iw]:{code:-32601,message:"Method not found"},[xw]:{code:-32602,message:"Invalid params"},[pf]:{code:-32603,message:"Internal error"},[Sc]:{code:-32e3,message:"Server error"}},df=Sc;function Pw(a){return Sw.includes(a)}function el(a){return Object.keys(Vn).includes(a)?Vn[a]:Vn[df]}function Aw(a){const t=Object.values(Vn).find(i=>i.code===a);return t||Vn[df]}function gf(a,t,i){return a.message.includes("getaddrinfo ENOTFOUND")||a.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${i} RPC url at ${t}`):a}var yf={},oi={},tl;function Cw(){if(tl)return oi;tl=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.isBrowserCryptoAvailable=oi.getSubtleCrypto=oi.getBrowerCrypto=void 0;function a(){return(jr===null||jr===void 0?void 0:jr.crypto)||(jr===null||jr===void 0?void 0:jr.msCrypto)||{}}oi.getBrowerCrypto=a;function t(){const s=a();return s.subtle||s.webkitSubtle}oi.getSubtleCrypto=t;function i(){return!!a()&&!!t()}return oi.isBrowserCryptoAvailable=i,oi}var ai={},rl;function Ow(){if(rl)return ai;rl=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.isBrowser=ai.isNode=ai.isReactNative=void 0;function a(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ai.isReactNative=a;function t(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}ai.isNode=t;function i(){return!a()&&!t()}return ai.isBrowser=i,ai}(function(a){Object.defineProperty(a,"__esModule",{value:!0});const t=vn;t.__exportStar(Cw(),a),t.__exportStar(Ow(),a)})(yf);function vf(a=3){const t=Date.now()*Math.pow(10,a),i=Math.floor(Math.random()*Math.pow(10,a));return t+i}function Pc(a=6){return BigInt(vf(a))}function mo(a,t,i){return{id:i||vf(),jsonrpc:"2.0",method:a,params:t}}function Ac(a,t){return{id:a,jsonrpc:"2.0",result:t}}function wo(a,t,i){return{id:a,jsonrpc:"2.0",error:Rw(t,i)}}function Rw(a,t){return typeof a>"u"?el(pf):(typeof a=="string"&&(a=Object.assign(Object.assign({},el(Sc)),{message:a})),typeof t<"u"&&(a.data=t),Pw(a.code)&&(a=Aw(a.code)),a)}class Tw{}class Nw extends Tw{constructor(){super()}}class Dw extends Nw{constructor(t){super()}}const Lw="^https?:",Fw="^wss?:";function $w(a){const t=a.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function mf(a,t){const i=$w(a);return typeof i>"u"?!1:new RegExp(t).test(i)}function il(a){return mf(a,Lw)}function nl(a){return mf(a,Fw)}function Mw(a){return new RegExp("wss?://localhost(:d{2,5})?").test(a)}function wf(a){return typeof a=="object"&&"id"in a&&"jsonrpc"in a&&a.jsonrpc==="2.0"}function Cc(a){return wf(a)&&"method"in a}function _o(a){return wf(a)&&(ci(a)||Mr(a))}function ci(a){return"result"in a}function Mr(a){return"error"in a}class Ii extends Dw{constructor(t){super(t),this.events=new vr.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,i){this.events.on(t,i)}once(t,i){this.events.once(t,i)}off(t,i){this.events.off(t,i)}removeListener(t,i){this.events.removeListener(t,i)}async request(t,i){return this.requestStrict(mo(t.method,t.params||[],t.id||Pc().toString()),i)}async requestStrict(t,i){return new Promise(async(s,o)=>{if(!this.connection.connected)try{await this.open()}catch(h){o(h)}this.events.on(`${t.id}`,h=>{Mr(h)?o(h.error):s(h.result)});try{await this.connection.send(t,i)}catch(h){o(h)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),_o(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const jw=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),zw=()=>typeof window<"u",sl=a=>a.split("?")[0],ol=10,Uw=jw();class qw{constructor(t){if(this.url=t,this.events=new vr.EventEmitter,this.registering=!1,!nl(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,i){this.events.on(t,i)}once(t,i){this.events.once(t,i)}off(t,i){this.events.off(t,i)}removeListener(t,i){this.events.removeListener(t,i)}async open(t=this.url){await this.register(t)}async close(){return new Promise((t,i)=>{if(typeof this.socket>"u"){i(new Error("Connection already closed"));return}this.socket.onclose=s=>{this.onClose(s),t()},this.socket.close()})}async send(t,i){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(qi(t))}catch(s){this.onError(t.id,s)}}register(t=this.url){if(!nl(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((s,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));s(this.socket)})})}return this.url=t,this.registering=!0,new Promise((i,s)=>{const o=yf.isReactNative()?void 0:{rejectUnauthorized:!Mw(t)},h=new Uw(t,[],o);zw()?h.onerror=p=>{const g=p;s(this.emitError(g.error))}:h.on("error",p=>{s(this.emitError(p))}),h.onopen=()=>{this.onOpen(h),i(h)}})}onOpen(t){t.onmessage=i=>this.onPayload(i),t.onclose=i=>this.onClose(i),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const i=typeof t.data=="string"?Wn(t.data):t.data;this.events.emit("payload",i)}onError(t,i){const s=this.parseError(i),o=s.message||s.toString(),h=wo(t,o);this.events.emit("payload",h)}parseError(t,i=this.url){return gf(t,sl(i),"WS")}resetMaxListeners(){this.events.getMaxListeners()>ol&&this.events.setMaxListeners(ol)}emitError(t){const i=this.parseError(new Error((t==null?void 0:t.message)||`WebSocket connection failed for host: ${sl(this.url)}`));return this.events.emit("register_error",i),i}}var po={exports:{}};po.exports;(function(a,t){var i=200,s="__lodash_hash_undefined__",o=1,h=2,p=9007199254740991,g="[object Arguments]",_="[object Array]",m="[object AsyncFunction]",x="[object Boolean]",O="[object Date]",L="[object Error]",z="[object Function]",R="[object GeneratorFunction]",K="[object Map]",re="[object Number]",he="[object Null]",le="[object Object]",fe="[object Promise]",pe="[object Proxy]",de="[object RegExp]",F="[object Set]",q="[object String]",W="[object Symbol]",ve="[object Undefined]",ie="[object WeakMap]",ue="[object ArrayBuffer]",Te="[object DataView]",Ue="[object Float32Array]",v="[object Float64Array]",I="[object Int8Array]",X="[object Int16Array]",ce="[object Int32Array]",V="[object Uint8Array]",B="[object Uint8ClampedArray]",k="[object Uint16Array]",G="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,ke=/^\[object .+?Constructor\]$/,zr=/^(?:0|[1-9]\d*)$/,Ie={};Ie[Ue]=Ie[v]=Ie[I]=Ie[X]=Ie[ce]=Ie[V]=Ie[B]=Ie[k]=Ie[G]=!0,Ie[g]=Ie[_]=Ie[ue]=Ie[x]=Ie[Te]=Ie[O]=Ie[L]=Ie[z]=Ie[K]=Ie[re]=Ie[le]=Ie[de]=Ie[F]=Ie[q]=Ie[ie]=!1;var St=typeof jr=="object"&&jr&&jr.Object===Object&&jr,D=typeof self=="object"&&self&&self.Object===Object&&self,N=St||D||Function("return this")(),C=t&&!t.nodeType&&t,u=C&&!0&&a&&!a.nodeType&&a,E=u&&u.exports===C,ee=E&&St.process,ge=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),be=ge&&ge.isTypedArray;function Ne(y,S){for(var U=-1,Y=y==null?0:y.length,Ge=0,me=[];++U-1}function Ro(y,S){var U=this.__data__,Y=Pi(U,y);return Y<0?(++this.size,U.push([y,S])):U[Y][1]=S,this}mr.prototype.clear=Po,mr.prototype.delete=Ao,mr.prototype.get=Co,mr.prototype.has=Oo,mr.prototype.set=Ro;function Jr(y){var S=-1,U=y==null?0:y.length;for(this.clear();++SDt))return!1;var We=me.get(y);if(We&&me.get(S))return We==S;var bt=-1,nr=!0,Lt=U&h?new Gi:void 0;for(me.set(y,S),me.set(S,y);++bt-1&&y%1==0&&y-1&&y%1==0&&y<=p}function ps(y){var S=typeof y;return y!=null&&(S=="object"||S=="function")}function Oi(y){return y!=null&&typeof y=="object"}var ds=be?wt(be):ts;function Ho(y){return qo(y)?Qn(y):rs(y)}function Ve(){return[]}function Be(){return!1}a.exports=Bo})(po,po.exports);var Bw=po.exports;const Hw=_c(Bw);function kw(a,t){if(a.length>=255)throw new TypeError("Alphabet too long");for(var i=new Uint8Array(256),s=0;s>>0,pe=new Uint8Array(fe);he!==le;){for(var de=R[he],F=0,q=fe-1;(de!==0||F>>0,pe[q]=de%g>>>0,de=de/g>>>0;if(de!==0)throw new Error("Non-zero carry");re=F,he++}for(var W=fe-re;W!==fe&&pe[W]===0;)W++;for(var ve=_.repeat(K);W>>0,fe=new Uint8Array(le);R[K];){var pe=i[R.charCodeAt(K)];if(pe===255)return;for(var de=0,F=le-1;(pe!==0||de>>0,fe[F]=pe%256>>>0,pe=pe/256>>>0;if(pe!==0)throw new Error("Non-zero carry");he=de,K++}if(R[K]!==" "){for(var q=le-he;q!==le&&fe[q]===0;)q++;for(var W=new Uint8Array(re+(le-q)),ve=re;q!==le;)W[ve++]=fe[q++];return W}}}function z(R){var K=L(R);if(K)return K;throw new Error(`Non-${t} character`)}return{encode:O,decodeUnsafe:L,decode:z}}var Kw=kw,Vw=Kw;const _f=a=>{if(a instanceof Uint8Array&&a.constructor.name==="Uint8Array")return a;if(a instanceof ArrayBuffer)return new Uint8Array(a);if(ArrayBuffer.isView(a))return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw new Error("Unknown type, must be binary type")},Gw=a=>new TextEncoder().encode(a),Ww=a=>new TextDecoder().decode(a);class Jw{constructor(t,i,s){this.name=t,this.prefix=i,this.baseEncode=s}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Yw{constructor(t,i,s){if(this.name=t,this.prefix=i,i.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i.codePointAt(0),this.baseDecode=s}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return bf(this,t)}}class Xw{constructor(t){this.decoders=t}or(t){return bf(this,t)}decode(t){const i=t[0],s=this.decoders[i];if(s)return s.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const bf=(a,t)=>new Xw({...a.decoders||{[a.prefix]:a},...t.decoders||{[t.prefix]:t}});class Zw{constructor(t,i,s,o){this.name=t,this.prefix=i,this.baseEncode=s,this.baseDecode=o,this.encoder=new Jw(t,i,s),this.decoder=new Yw(t,i,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const bo=({name:a,prefix:t,encode:i,decode:s})=>new Zw(a,t,i,s),Jn=({prefix:a,name:t,alphabet:i})=>{const{encode:s,decode:o}=Vw(i,t);return bo({prefix:a,name:t,encode:s,decode:h=>_f(o(h))})},Qw=(a,t,i,s)=>{const o={};for(let x=0;x=8&&(g-=8,p[m++]=255&_>>g)}if(g>=i||255&_<<8-g)throw new SyntaxError("Unexpected end of data");return p},e_=(a,t,i)=>{const s=t[t.length-1]==="=",o=(1<i;)p-=i,h+=t[o&g>>p];if(p&&(h+=t[o&g<bo({prefix:t,name:a,encode(o){return e_(o,s,i)},decode(o){return Qw(o,s,i,a)}}),t_=bo({prefix:"\0",name:"identity",encode:a=>Ww(a),decode:a=>Gw(a)});var r_=Object.freeze({__proto__:null,identity:t_});const i_=Vt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var n_=Object.freeze({__proto__:null,base2:i_});const s_=Vt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var o_=Object.freeze({__proto__:null,base8:s_});const a_=Jn({prefix:"9",name:"base10",alphabet:"0123456789"});var c_=Object.freeze({__proto__:null,base10:a_});const u_=Vt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),h_=Vt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var l_=Object.freeze({__proto__:null,base16:u_,base16upper:h_});const f_=Vt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),p_=Vt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),d_=Vt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),g_=Vt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),y_=Vt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),v_=Vt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),m_=Vt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),w_=Vt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),__=Vt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var b_=Object.freeze({__proto__:null,base32:f_,base32upper:p_,base32pad:d_,base32padupper:g_,base32hex:y_,base32hexupper:v_,base32hexpad:m_,base32hexpadupper:w_,base32z:__});const E_=Jn({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),I_=Jn({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var x_=Object.freeze({__proto__:null,base36:E_,base36upper:I_});const S_=Jn({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),P_=Jn({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var A_=Object.freeze({__proto__:null,base58btc:S_,base58flickr:P_});const C_=Vt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),O_=Vt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),R_=Vt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),T_=Vt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var N_=Object.freeze({__proto__:null,base64:C_,base64pad:O_,base64url:R_,base64urlpad:T_});const Ef=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),D_=Ef.reduce((a,t,i)=>(a[i]=t,a),[]),L_=Ef.reduce((a,t,i)=>(a[t.codePointAt(0)]=i,a),[]);function F_(a){return a.reduce((t,i)=>(t+=D_[i],t),"")}function $_(a){const t=[];for(const i of a){const s=L_[i.codePointAt(0)];if(s===void 0)throw new Error(`Non-base256emoji character: ${i}`);t.push(s)}return new Uint8Array(t)}const M_=bo({prefix:"🚀",name:"base256emoji",encode:F_,decode:$_});var j_=Object.freeze({__proto__:null,base256emoji:M_}),z_=If,al=128,U_=127,q_=~U_,B_=Math.pow(2,31);function If(a,t,i){t=t||[],i=i||0;for(var s=i;a>=B_;)t[i++]=a&255|al,a/=128;for(;a&q_;)t[i++]=a&255|al,a>>>=7;return t[i]=a|0,If.bytes=i-s+1,t}var H_=pc,k_=128,cl=127;function pc(a,s){var i=0,s=s||0,o=0,h=s,p,g=a.length;do{if(h>=g)throw pc.bytes=0,new RangeError("Could not decode varint");p=a[h++],i+=o<28?(p&cl)<=k_);return pc.bytes=h-s,i}var K_=Math.pow(2,7),V_=Math.pow(2,14),G_=Math.pow(2,21),W_=Math.pow(2,28),J_=Math.pow(2,35),Y_=Math.pow(2,42),X_=Math.pow(2,49),Z_=Math.pow(2,56),Q_=Math.pow(2,63),eb=function(a){return a(xf.encode(a,t,i),t),hl=a=>xf.encodingLength(a),dc=(a,t)=>{const i=t.byteLength,s=hl(a),o=s+hl(i),h=new Uint8Array(o+i);return ul(a,h,0),ul(i,h,s),h.set(t,o),new rb(a,i,t,h)};class rb{constructor(t,i,s,o){this.code=t,this.size=i,this.digest=s,this.bytes=o}}const Sf=({name:a,code:t,encode:i})=>new ib(a,t,i);class ib{constructor(t,i,s){this.name=t,this.code=i,this.encode=s}digest(t){if(t instanceof Uint8Array){const i=this.encode(t);return i instanceof Uint8Array?dc(this.code,i):i.then(s=>dc(this.code,s))}else throw Error("Unknown type, must be binary type")}}const Pf=a=>async t=>new Uint8Array(await crypto.subtle.digest(a,t)),nb=Sf({name:"sha2-256",code:18,encode:Pf("SHA-256")}),sb=Sf({name:"sha2-512",code:19,encode:Pf("SHA-512")});var ob=Object.freeze({__proto__:null,sha256:nb,sha512:sb});const Af=0,ab="identity",Cf=_f,cb=a=>dc(Af,Cf(a)),ub={code:Af,name:ab,encode:Cf,digest:cb};var hb=Object.freeze({__proto__:null,identity:ub});new TextEncoder,new TextDecoder;const ll={...r_,...n_,...o_,...c_,...l_,...b_,...x_,...A_,...N_,...j_};({...ob,...hb});function Of(a){return globalThis.Buffer!=null?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):a}function lb(a=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Of(globalThis.Buffer.allocUnsafe(a)):new Uint8Array(a)}function Rf(a,t,i,s){return{name:a,prefix:t,encoder:{name:a,prefix:t,encode:i},decoder:{decode:s}}}const fl=Rf("utf8","u",a=>"u"+new TextDecoder("utf8").decode(a),a=>new TextEncoder().encode(a.substring(1))),tc=Rf("ascii","a",a=>{let t="a";for(let i=0;i{a=a.substring(1);const t=lb(a.length);for(let i=0;i{if(!this.initialized){const s=await this.getKeyChain();typeof s<"u"&&(this.keychain=s),this.initialized=!0}},this.has=s=>(this.isInitialized(),this.keychain.has(s)),this.set=async(s,o)=>{this.isInitialized(),this.keychain.set(s,o),await this.persist()},this.get=s=>{this.isInitialized();const o=this.keychain.get(s);if(typeof o>"u"){const{message:h}=Q("NO_MATCHING_KEY",`${this.name}: ${s}`);throw new Error(h)}return o},this.del=async s=>{this.isInitialized(),this.keychain.delete(s),await this.persist()},this.core=t,this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,Vl(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Gl(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Hb{constructor(t,i,s){this.core=t,this.logger=i,this.name=vb,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),h=Qh(o);return ff(h.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=Im();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const h=await this.getClientSeed(),p=Qh(h),g=hc();return await _w(g,o,mb,p)},this.generateSharedKey=(o,h,p)=>{this.isInitialized();const g=this.getPrivateKey(o),_=xm(g,h);return this.setSymKey(_,p)},this.setSymKey=async(o,h)=>{this.isInitialized();const p=h||Sm(o);return await this.keychain.set(p,o),p},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,h,p)=>{this.isInitialized();const g=Pm(p),_=qi(h);if(Dh(g)){const L=g.senderPublicKey,z=g.receiverPublicKey;o=await this.generateSharedKey(L,z)}const m=this.getSymKey(o),{type:x,senderPublicKey:O}=g;return Am({type:x,symKey:m,message:_,senderPublicKey:O})},this.decode=async(o,h,p)=>{this.isInitialized();const g=Cm(h,p);if(Dh(g)){const x=g.receiverPublicKey,O=g.senderPublicKey;o=await this.generateSharedKey(x,O)}const _=this.getSymKey(o),m=Om({symKey:_,encoded:h});return Wn(m)},this.getPayloadType=o=>{const h=Lh(o);return Rm(h.type)},this.getPayloadSenderPublicKey=o=>{const h=Lh(o);return h.senderPublicKey?yo(h.senderPublicKey,Tm):void 0},this.core=t,this.logger=Re.generateChildLogger(i,this.name),this.keychain=s||new Bb(this.core,this.logger)}get context(){return Re.getLoggerContext(this.logger)}async setPrivateKey(t,i){return await this.keychain.set(t,i),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(pl)}catch{t=hc(),await this.keychain.set(pl,t)}return pb(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}}class kb extends Z1{constructor(t,i){super(t,i),this.logger=t,this.core=i,this.messages=new Map,this.name=bb,this.version=Eb,this.initialized=!1,this.storagePrefix=Ei,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const s=await this.getRelayerMessages();typeof s<"u"&&(this.messages=s),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(s){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(s)}finally{this.initialized=!0}}},this.set=async(s,o)=>{this.isInitialized();const h=dn(o);let p=this.messages.get(s);return typeof p>"u"&&(p={}),typeof p[h]<"u"||(p[h]=o,this.messages.set(s,p),await this.persist()),h},this.get=s=>{this.isInitialized();let o=this.messages.get(s);return typeof o>"u"&&(o={}),o},this.has=(s,o)=>{this.isInitialized();const h=this.get(s),p=dn(o);return typeof h[p]<"u"},this.del=async s=>{this.isInitialized(),this.messages.delete(s),await this.persist()},this.logger=Re.generateChildLogger(t,this.name),this.core=i}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,Vl(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Gl(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Kb extends Q1{constructor(t,i){super(t,i),this.relayer=t,this.logger=i,this.events=new vr.EventEmitter,this.name=xb,this.queue=new Map,this.publishTimeout=se.toMiliseconds(se.TEN_SECONDS),this.queueTimeout=se.toMiliseconds(se.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(s,o,h)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:s,message:o,opts:h}});try{const p=(h==null?void 0:h.ttl)||Ib,g=lc(h),_=(h==null?void 0:h.prompt)||!1,m=(h==null?void 0:h.tag)||0,x=(h==null?void 0:h.id)||Pc().toString(),O={topic:s,message:o,opts:{ttl:p,relay:g,prompt:_,tag:m,id:x}},L=setTimeout(()=>this.queue.set(x,O),this.queueTimeout);try{await await lo(this.rpcPublish(s,o,p,g,_,m,x),this.publishTimeout),clearTimeout(L),this.relayer.events.emit(mt.publish,O)}catch{this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0;return}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:s,message:o,opts:h}})}catch(p){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(p),p}},this.on=(s,o)=>{this.events.on(s,o)},this.once=(s,o)=>{this.events.once(s,o)},this.off=(s,o)=>{this.events.off(s,o)},this.removeListener=(s,o)=>{this.events.removeListener(s,o)},this.relayer=t,this.logger=Re.generateChildLogger(i,this.name),this.registerEventListeners()}get context(){return Re.getLoggerContext(this.logger)}rpcPublish(t,i,s,o,h,p,g){var _,m,x,O;const L={method:so(o.protocol).publish,params:{topic:t,message:i,ttl:s,prompt:h,tag:p},id:g};return bi((_=L.params)==null?void 0:_.prompt)&&((m=L.params)==null||delete m.prompt),bi((x=L.params)==null?void 0:x.tag)&&((O=L.params)==null||delete O.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:L}),this.relayer.request(L)}onPublish(t){this.queue.delete(t)}checkQueue(){this.queue.forEach(async t=>{const{topic:i,message:s,opts:o}=t;await this.publish(i,s,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(mn.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(mt.connection_stalled);return}this.checkQueue()}),this.relayer.on(mt.message_ack,t=>{this.onPublish(t.id.toString())})}}class Vb{constructor(){this.map=new Map,this.set=(t,i)=>{const s=this.get(t);this.exists(t,i)||this.map.set(t,[...s,i])},this.get=t=>this.map.get(t)||[],this.exists=(t,i)=>this.get(t).includes(i),this.delete=(t,i)=>{if(typeof i>"u"){this.map.delete(t);return}if(!this.map.has(t))return;const s=this.get(t);if(!this.exists(t,i))return;const o=s.filter(h=>h!==i);if(!o.length){this.map.delete(t);return}this.map.set(t,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Gb=Object.defineProperty,Wb=Object.defineProperties,Jb=Object.getOwnPropertyDescriptors,yl=Object.getOwnPropertySymbols,Yb=Object.prototype.hasOwnProperty,Xb=Object.prototype.propertyIsEnumerable,vl=(a,t,i)=>t in a?Gb(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,Bn=(a,t)=>{for(var i in t||(t={}))Yb.call(t,i)&&vl(a,i,t[i]);if(yl)for(var i of yl(t))Xb.call(t,i)&&vl(a,i,t[i]);return a},ic=(a,t)=>Wb(a,Jb(t));class Zb extends rw{constructor(t,i){super(t,i),this.relayer=t,this.logger=i,this.subscriptions=new Map,this.topicMap=new Vb,this.events=new vr.EventEmitter,this.name=Db,this.version=Lb,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Ei,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(s,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:s,opts:o}});try{const h=lc(o),p={topic:s,relay:h};this.pending.set(s,p);const g=await this.rpcSubscribe(s,h);return this.onSubscribe(g,p),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:s,opts:o}}),g}catch(h){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(h),h}},this.unsubscribe=async(s,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(s,o.id,o):await this.unsubscribeByTopic(s,o)},this.isSubscribed=async s=>this.topics.includes(s)?!0:await new Promise((o,h)=>{const p=new se.Watch;p.start(this.pendingSubscriptionWatchLabel);const g=setInterval(()=>{!this.pending.has(s)&&this.topics.includes(s)&&(clearInterval(g),p.stop(this.pendingSubscriptionWatchLabel),o(!0)),p.elapsed(this.pendingSubscriptionWatchLabel)>=Fb&&(clearInterval(g),p.stop(this.pendingSubscriptionWatchLabel),h(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(s,o)=>{this.events.on(s,o)},this.once=(s,o)=>{this.events.once(s,o)},this.off=(s,o)=>{this.events.off(s,o)},this.removeListener=(s,o)=>{this.events.removeListener(s,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=t,this.logger=Re.generateChildLogger(i,this.name),this.clientId=""}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,i){let s=!1;try{s=this.getSubscription(t).topic===i}catch{}return s}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,i){const s=this.topicMap.get(t);await Promise.all(s.map(async o=>await this.unsubscribeById(t,o,i)))}async unsubscribeById(t,i,s){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:i,opts:s}});try{const o=lc(s);await this.rpcUnsubscribe(t,i,o);const h=rr("USER_DISCONNECTED",`${this.name}, ${t}`);await this.onUnsubscribe(t,i,h),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:i,opts:s}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(t,i){const s={method:so(i.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});try{await await lo(this.relayer.request(s),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}return dn(t+this.clientId)}async rpcBatchSubscribe(t){if(!t.length)return;const i=t[0].relay,s={method:so(i.protocol).batchSubscribe,params:{topics:t.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});try{return await await lo(this.relayer.request(s),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}}rpcUnsubscribe(t,i,s){const o={method:so(s.protocol).unsubscribe,params:{topic:t,id:i}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(t,i){this.setSubscription(t,ic(Bn({},i),{id:t})),this.pending.delete(i.topic)}onBatchSubscribe(t){t.length&&t.forEach(i=>{this.setSubscription(i.id,Bn({},i)),this.pending.delete(i.topic)})}async onUnsubscribe(t,i,s){this.events.removeAllListeners(i),this.hasSubscription(i,t)&&this.deleteSubscription(i,s),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,i){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:i}),this.addSubscription(t,i))}addSubscription(t,i){this.subscriptions.set(t,Bn({},i)),this.topicMap.set(i.topic,t),this.events.emit(Gr.created,i)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const i=this.subscriptions.get(t);if(!i){const{message:s}=Q("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(s)}return i}deleteSubscription(t,i){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:i});const s=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(s.topic,t),this.events.emit(Gr.deleted,ic(Bn({},s),{reason:i}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Gr.sync)}async reset(){if(this.cached.length){const t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i"u"||!t.length)return;if(this.subscriptions.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(i)}this.cached=t,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(t)}}async batchSubscribe(t){if(!t.length)return;const i=await this.rpcBatchSubscribe(t);yn(i)&&this.onBatchSubscribe(i.map((s,o)=>ic(Bn({},t[o]),{id:s})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const t=[];this.pending.forEach(i=>{t.push(i)}),await this.batchSubscribe(t)}registerEventListeners(){this.relayer.core.heartbeat.on(mn.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(mt.connect,async()=>{await this.onConnect()}),this.relayer.on(mt.disconnect,()=>{this.onDisconnect()}),this.events.on(Gr.created,async t=>{const i=Gr.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:t}),await this.persist()}),this.events.on(Gr.deleted,async t=>{const i=Gr.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:t}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(){this.restartInProgress&&await new Promise(t=>{const i=setInterval(()=>{this.restartInProgress||(clearInterval(i),t())},this.pollingInterval)})}}var Qb=Object.defineProperty,ml=Object.getOwnPropertySymbols,eE=Object.prototype.hasOwnProperty,tE=Object.prototype.propertyIsEnumerable,wl=(a,t,i)=>t in a?Qb(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,rE=(a,t)=>{for(var i in t||(t={}))eE.call(t,i)&&wl(a,i,t[i]);if(ml)for(var i of ml(t))tE.call(t,i)&&wl(a,i,t[i]);return a};class iE extends ew{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new vr.EventEmitter,this.name=Pb,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async i=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(i)}catch(s){throw this.logger.debug("Failed to Publish Request"),this.logger.error(s),s}},this.core=t.core,this.logger=typeof t.logger<"u"&&typeof t.logger!="string"?Re.generateChildLogger(t.logger,this.name):Re.pino(Re.getDefaultLoggerOptions({level:t.logger||Sb})),this.messages=new kb(this.logger,t.core),this.subscriber=new Zb(this,this.logger),this.publisher=new Kb(this,this.logger),this.relayUrl=(t==null?void 0:t.relayUrl)||Df,this.projectId=t.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${dl}...`),await this.restartTransport(dl)}this.registerEventListeners(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},Rb)}get context(){return Re.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,i,s){this.isInitialized(),await this.publisher.publish(t,i,s),await this.recordMessageEvent({topic:t,message:i,publishedAt:Date.now()})}async subscribe(t,i){var s;this.isInitialized();let o=((s=this.subscriber.topicMap.get(t))==null?void 0:s[0])||"";return o||(await Promise.all([new Promise(h=>{this.subscriber.once(Gr.created,p=>{p.topic===t&&h()})}),new Promise(async h=>{o=await this.subscriber.subscribe(t,i),h()})]),o)}async unsubscribe(t,i){this.isInitialized(),await this.subscriber.unsubscribe(t,i)}on(t,i){this.events.on(t,i)}once(t,i){this.events.once(t,i)}off(t,i){this.events.off(t,i)}removeListener(t,i){this.events.removeListener(t,i)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(mt.transport_closed))}async transportOpen(t){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=t||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise(i=>{this.initialized||i(),this.subscriber.once(Gr.resubscribed,()=>{i()})}),await Promise.race([new Promise(async(i,s)=>{await lo(this.provider.connect(),5e3,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>s(o)).then(()=>i()).finally(()=>this.removeListener(mt.transport_closed,this.rejectTransportOpen))}),new Promise(i=>this.once(mt.transport_closed,this.rejectTransportOpen))])])}catch(i){this.logger.error(i);const s=i;if(!this.isConnectionStalled(s.message))throw i;this.events.emit(mt.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(t){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=t||this.relayUrl,this.connected&&await Promise.all([new Promise(i=>{this.provider.once(Un.disconnect,()=>{i()})}),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(t){return this.staleConnectionErrors.some(i=>t.includes(i))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ii(new qw(Nm({sdkVersion:Ob,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(t){const{topic:i,message:s}=t;await this.messages.set(i,s)}async shouldIgnoreMessageEvent(t){const{topic:i,message:s}=t;return await this.subscriber.isSubscribed(i)?this.messages.has(i,s):!0}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),Cc(t)){if(!t.method.endsWith(Ab))return;const i=t.params,{topic:s,message:o,publishedAt:h}=i.data,p={topic:s,message:o,publishedAt:h};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(rE({type:"event",event:i.id},p)),this.events.emit(i.id,p),await this.acknowledgePayload(t),await this.onMessageEvent(p)}else _o(t)&&this.events.emit(mt.message_ack,t)}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(mt.message,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){const i=Ac(t.id,!0);await this.provider.connection.send(i)}registerProviderListeners(){this.provider.on(Un.payload,t=>this.onProviderPayload(t)),this.provider.on(Un.connect,()=>{this.events.emit(mt.connect)}),this.provider.on(Un.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Un.error,t=>{this.logger.error(t),this.events.emit(mt.error,t)})}registerEventListeners(){this.events.on(mt.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(mt.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},se.toMiliseconds(Cb))}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(t=>{const i=setInterval(()=>{this.connected&&(clearInterval(i),t())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var nE=Object.defineProperty,_l=Object.getOwnPropertySymbols,sE=Object.prototype.hasOwnProperty,oE=Object.prototype.propertyIsEnumerable,bl=(a,t,i)=>t in a?nE(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,El=(a,t)=>{for(var i in t||(t={}))sE.call(t,i)&&bl(a,i,t[i]);if(_l)for(var i of _l(t))oE.call(t,i)&&bl(a,i,t[i]);return a};class Eo extends tw{constructor(t,i,s,o=Ei,h=void 0){super(t,i,s,o),this.core=t,this.logger=i,this.name=s,this.map=new Map,this.version=Tb,this.cached=[],this.initialized=!1,this.storagePrefix=Ei,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(p=>{this.getKey&&p!==null&&!bi(p)?this.map.set(this.getKey(p),p):bm(p)?this.map.set(p.id,p):Em(p)&&this.map.set(p.topic,p)}),this.cached=[],this.initialized=!0)},this.set=async(p,g)=>{this.isInitialized(),this.map.has(p)?await this.update(p,g):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:p,value:g}),this.map.set(p,g),await this.persist())},this.get=p=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:p}),this.getData(p)),this.getAll=p=>(this.isInitialized(),p?this.values.filter(g=>Object.keys(p).every(_=>Hw(g[_],p[_]))):this.values),this.update=async(p,g)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:p,update:g});const _=El(El({},this.getData(p)),g);this.map.set(p,_),await this.persist()},this.delete=async(p,g)=>{this.isInitialized(),this.map.has(p)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:p,reason:g}),this.map.delete(p),await this.persist())},this.logger=Re.generateChildLogger(i,this.name),this.storagePrefix=o,this.getKey=h}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const i=this.map.get(t);if(!i){const{message:s}=Q("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(s),new Error(s)}return i}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=t,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}}class aE{constructor(t,i){this.core=t,this.logger=i,this.name=$b,this.version=Mb,this.events=new Ic,this.initialized=!1,this.storagePrefix=Ei,this.ignoredPayloadTypes=[Hl],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:s})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...s])]},this.create=async()=>{this.isInitialized();const s=hc(),o=await this.core.crypto.setSymKey(s),h=$r(se.FIVE_MINUTES),p={protocol:Nf},g={topic:o,expiry:h,relay:p,active:!1},_=Dm({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:s,relay:p});return await this.pairings.set(o,g),await this.core.relayer.subscribe(o),this.core.expirer.set(o,h),{topic:o,uri:_}},this.pair=async s=>{this.isInitialized(),this.isValidPair(s);const{topic:o,symKey:h,relay:p}=Lm(s.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const g=$r(se.FIVE_MINUTES),_={topic:o,relay:p,expiry:g,active:!1};return await this.pairings.set(o,_),await this.core.crypto.setSymKey(h,o),await this.core.relayer.subscribe(o,{relay:p}),this.core.expirer.set(o,g),s.activatePairing&&await this.activate({topic:o}),_},this.activate=async({topic:s})=>{this.isInitialized();const o=$r(se.THIRTY_DAYS);await this.pairings.update(s,{active:!0,expiry:o}),this.core.expirer.set(s,o)},this.ping=async s=>{this.isInitialized(),await this.isValidPing(s);const{topic:o}=s;if(this.pairings.keys.includes(o)){const h=await this.sendRequest(o,"wc_pairingPing",{}),{done:p,resolve:g,reject:_}=fn();this.events.once(Ft("pairing_ping",h),({error:m})=>{m?_(m):g()}),await p()}},this.updateExpiry=async({topic:s,expiry:o})=>{this.isInitialized(),await this.pairings.update(s,{expiry:o})},this.updateMetadata=async({topic:s,metadata:o})=>{this.isInitialized(),await this.pairings.update(s,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async s=>{this.isInitialized(),await this.isValidDisconnect(s);const{topic:o}=s;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",rr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(s,o,h)=>{const p=mo(o,h),g=await this.core.crypto.encode(s,p),_=qn[o].req;return this.core.history.set(s,p),this.core.relayer.publish(s,g,_),p.id},this.sendResult=async(s,o,h)=>{const p=Ac(s,h),g=await this.core.crypto.encode(o,p),_=await this.core.history.get(o,s),m=qn[_.request.method].res;await this.core.relayer.publish(o,g,m),await this.core.history.resolve(p)},this.sendError=async(s,o,h)=>{const p=wo(s,h),g=await this.core.crypto.encode(o,p),_=await this.core.history.get(o,s),m=qn[_.request.method]?qn[_.request.method].res:qn.unregistered_method.res;await this.core.relayer.publish(o,g,m),await this.core.history.resolve(p)},this.deletePairing=async(s,o)=>{await this.core.relayer.unsubscribe(s),await Promise.all([this.pairings.delete(s,rr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(s),o?Promise.resolve():this.core.expirer.del(s)])},this.cleanup=async()=>{const s=this.pairings.getAll().filter(o=>_i(o.expiry));await Promise.all(s.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=s=>{const{topic:o,payload:h}=s,p=h.method;if(this.pairings.keys.includes(o))switch(p){case"wc_pairingPing":return this.onPairingPingRequest(o,h);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,h);default:return this.onUnknownRpcMethodRequest(o,h)}},this.onRelayEventResponse=async s=>{const{topic:o,payload:h}=s,p=(await this.core.history.get(o,h.id)).request.method;if(this.pairings.keys.includes(o))switch(p){case"wc_pairingPing":return this.onPairingPingResponse(o,h);default:return this.onUnknownRpcMethodResponse(p)}},this.onPairingPingRequest=async(s,o)=>{const{id:h}=o;try{this.isValidPing({topic:s}),await this.sendResult(h,s,!0),this.events.emit("pairing_ping",{id:h,topic:s})}catch(p){await this.sendError(h,s,p),this.logger.error(p)}},this.onPairingPingResponse=(s,o)=>{const{id:h}=o;setTimeout(()=>{ci(o)?this.events.emit(Ft("pairing_ping",h),{}):Mr(o)&&this.events.emit(Ft("pairing_ping",h),{error:o.error})},500)},this.onPairingDeleteRequest=async(s,o)=>{const{id:h}=o;try{this.isValidDisconnect({topic:s}),await this.deletePairing(s),this.events.emit("pairing_delete",{id:h,topic:s})}catch(p){await this.sendError(h,s,p),this.logger.error(p)}},this.onUnknownRpcMethodRequest=async(s,o)=>{const{id:h,method:p}=o;try{if(this.registeredMethods.includes(p))return;const g=rr("WC_METHOD_UNSUPPORTED",p);await this.sendError(h,s,g),this.logger.error(g)}catch(g){await this.sendError(h,s,g),this.logger.error(g)}},this.onUnknownRpcMethodResponse=s=>{this.registeredMethods.includes(s)||this.logger.error(rr("WC_METHOD_UNSUPPORTED",s))},this.isValidPair=s=>{if(!hr(s)){const{message:o}=Q("MISSING_OR_INVALID",`pair() params: ${s}`);throw new Error(o)}if(!Fm(s.uri)){const{message:o}=Q("MISSING_OR_INVALID",`pair() uri: ${s.uri}`);throw new Error(o)}},this.isValidPing=async s=>{if(!hr(s)){const{message:h}=Q("MISSING_OR_INVALID",`ping() params: ${s}`);throw new Error(h)}const{topic:o}=s;await this.isValidPairingTopic(o)},this.isValidDisconnect=async s=>{if(!hr(s)){const{message:h}=Q("MISSING_OR_INVALID",`disconnect() params: ${s}`);throw new Error(h)}const{topic:o}=s;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async s=>{if(!pn(s,!1)){const{message:o}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${s}`);throw new Error(o)}if(!this.pairings.keys.includes(s)){const{message:o}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${s}`);throw new Error(o)}if(_i(this.pairings.get(s).expiry)){await this.deletePairing(s);const{message:o}=Q("EXPIRED",`pairing topic: ${s}`);throw new Error(o)}},this.core=t,this.logger=Re.generateChildLogger(i,this.name),this.pairings=new Eo(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Re.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(mt.message,async t=>{const{topic:i,message:s}=t;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(s)))return;const o=await this.core.crypto.decode(i,s);Cc(o)?(this.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):_o(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.core.history.delete(i,o.id))})}registerExpirerEvents(){this.core.expirer.on(Cr.expired,async t=>{const{topic:i}=kl(t.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit("pairing_expire",{topic:i}))})}}class cE extends X1{constructor(t,i){super(t,i),this.core=t,this.logger=i,this.records=new Map,this.events=new vr.EventEmitter,this.name=jb,this.version=zb,this.cached=[],this.initialized=!1,this.storagePrefix=Ei,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(s=>this.records.set(s.id,s)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(s,o,h)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:s,request:o,chainId:h}),this.records.has(o.id))return;const p={id:o.id,topic:s,request:{method:o.method,params:o.params||null},chainId:h,expiry:$r(se.THIRTY_DAYS)};this.records.set(p.id,p),this.events.emit(Vr.created,p)},this.resolve=async s=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:s}),!this.records.has(s.id))return;const o=await this.getRecord(s.id);typeof o.response>"u"&&(o.response=Mr(s)?{error:s.error}:{result:s.result},this.records.set(o.id,o),this.events.emit(Vr.updated,o))},this.get=async(s,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:s,id:o}),await this.getRecord(o)),this.delete=(s,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(h=>{if(h.topic===s){if(typeof o<"u"&&h.id!==o)return;this.records.delete(h.id),this.events.emit(Vr.deleted,h)}})},this.exists=async(s,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===s:!1),this.on=(s,o)=>{this.events.on(s,o)},this.once=(s,o)=>{this.events.once(s,o)},this.off=(s,o)=>{this.events.off(s,o)},this.removeListener=(s,o)=>{this.events.removeListener(s,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(i=>{if(typeof i.response<"u")return;const s={topic:i.topic,request:mo(i.request.method,i.request.params,i.id),chainId:i.chainId};return t.push(s)}),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const i=this.records.get(t);if(!i){const{message:s}=Q("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(s)}return i}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Vr.sync)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=t,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(t)}}registerEventListeners(){this.events.on(Vr.created,t=>{const i=Vr.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:t}),this.persist()}),this.events.on(Vr.updated,t=>{const i=Vr.updated;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:t}),this.persist()}),this.events.on(Vr.deleted,t=>{const i=Vr.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:t}),this.persist()}),this.core.heartbeat.on(mn.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(t=>{se.toMiliseconds(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.delete(t.topic,t.id))})}catch(t){this.logger.warn(t)}}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}}class uE extends iw{constructor(t,i){super(t,i),this.core=t,this.logger=i,this.expirations=new Map,this.events=new vr.EventEmitter,this.name=Ub,this.version=qb,this.cached=[],this.initialized=!1,this.storagePrefix=Ei,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(s=>this.expirations.set(s.target,s)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=s=>{try{const o=this.formatTarget(s);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(s,o)=>{this.isInitialized();const h=this.formatTarget(s),p={target:h,expiry:o};this.expirations.set(h,p),this.checkExpiry(h,p),this.events.emit(Cr.created,{target:h,expiration:p})},this.get=s=>{this.isInitialized();const o=this.formatTarget(s);return this.getExpiration(o)},this.del=s=>{if(this.isInitialized(),this.has(s)){const o=this.formatTarget(s),h=this.getExpiration(o);this.expirations.delete(o),this.events.emit(Cr.deleted,{target:o,expiration:h})}},this.on=(s,o)=>{this.events.on(s,o)},this.once=(s,o)=>{this.events.once(s,o)},this.off=(s,o)=>{this.events.off(s,o)},this.removeListener=(s,o)=>{this.events.removeListener(s,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if(typeof t=="string")return $m(t);if(typeof t=="number")return Mm(t);const{message:i}=Q("UNKNOWN_TYPE",`Target type: ${typeof t}`);throw new Error(i)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Cr.sync)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=t,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(t)}}getExpiration(t){const i=this.expirations.get(t);if(!i){const{message:s}=Q("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(s),new Error(s)}return i}checkExpiry(t,i){const{expiry:s}=i;se.toMiliseconds(s)-Date.now()<=0&&this.expire(t,i)}expire(t,i){this.expirations.delete(t),this.events.emit(Cr.expired,{target:t,expiration:i})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,i)=>this.checkExpiry(i,t))}registerEventListeners(){this.core.heartbeat.on(mn.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Cr.created,t=>{const i=Cr.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:t}),this.persist()}),this.events.on(Cr.expired,t=>{const i=Cr.expired;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:t}),this.persist()}),this.events.on(Cr.deleted,t=>{const i=Cr.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}}class hE extends nw{constructor(t,i){super(t,i),this.projectId=t,this.logger=i,this.name=rc,this.initialized=!1,this.init=async s=>{jm()||!Kl()||(this.verifyUrl=(s==null?void 0:s.verifyUrl)||gl,await this.createIframe())},this.register=async s=>{var o;if(this.initialized||await this.init(),!!this.iframe)try{(o=this.iframe.contentWindow)==null||o.postMessage(s.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${s.attestationId} ${this.verifyUrl}`)}catch{}},this.resolve=async s=>{var o;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${s.attestationId}`);const h=this.startAbortTimer(se.FIVE_SECONDS),p=await fetch(`${this.verifyUrl}/attestation/${s.attestationId}`,{signal:this.abortController.signal});return clearTimeout(h),p.status===200?(o=await p.json())==null?void 0:o.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise((s,o)=>{if(document.getElementById(rc))return s();const h=document.createElement("iframe");h.setAttribute("id",rc),h.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),h.style.display="none",h.addEventListener("load",()=>{this.initialized=!0,s()}),h.addEventListener("error",p=>{o(p)}),document.body.append(h),this.iframe=h}),new Promise(s=>{setTimeout(()=>s("iframe load timeout"),se.toMiliseconds(se.ONE_SECOND/2))})])}catch(s){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(s)}},this.logger=Re.generateChildLogger(i,this.name),this.verifyUrl=gl,this.abortController=new AbortController,this.isDevEnv=zm()&&{}.IS_VITEST}get context(){return Re.getLoggerContext(this.logger)}startAbortTimer(t){return setTimeout(()=>this.abortController.abort(),se.toMiliseconds(t))}}var lE=Object.defineProperty,Il=Object.getOwnPropertySymbols,fE=Object.prototype.hasOwnProperty,pE=Object.prototype.propertyIsEnumerable,xl=(a,t,i)=>t in a?lE(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,Sl=(a,t)=>{for(var i in t||(t={}))fE.call(t,i)&&xl(a,i,t[i]);if(Il)for(var i of Il(t))pE.call(t,i)&&xl(a,i,t[i]);return a};class Rc extends Y1{constructor(t){super(t),this.protocol=Tf,this.version=db,this.name=Oc,this.events=new vr.EventEmitter,this.initialized=!1,this.on=(s,o)=>this.events.on(s,o),this.once=(s,o)=>this.events.once(s,o),this.off=(s,o)=>this.events.off(s,o),this.removeListener=(s,o)=>this.events.removeListener(s,o),this.projectId=t==null?void 0:t.projectId,this.relayUrl=(t==null?void 0:t.relayUrl)||Df;const i=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Re.pino(Re.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||gb.logger}));this.logger=Re.generateChildLogger(i,this.name),this.heartbeat=new mn.HeartBeat,this.crypto=new Hb(this,this.logger,t==null?void 0:t.keychain),this.history=new cE(this,this.logger),this.expirer=new uE(this,this.logger),this.storage=t!=null&&t.storage?t.storage:new q1(Sl(Sl({},yb),t==null?void 0:t.storageOptions)),this.relayer=new iE({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new aE(this,this.logger),this.verify=new hE(this.projectId||"",this.logger)}static async init(t){const i=new Rc(t);await i.initialize();const s=await i.crypto.getClientId();return await i.storage.setItem(Nb,s),i}get context(){return Re.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(t){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,t),this.logger.error(t.message),t}}}const dE=Rc,Lf="wc",Ff=2,$f="client",Tc=`${Lf}@${Ff}:${$f}:`,nc={name:$f,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},gE="WALLETCONNECT_DEEPLINK_CHOICE",yE="proposal",Mf="Proposal expired",vE="session",ro=se.SEVEN_DAYS,mE="engine",Hn={wc_sessionPropose:{req:{ttl:se.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1104},res:{ttl:se.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1106},res:{ttl:se.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:se.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:se.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:se.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:se.ONE_DAY,prompt:!1,tag:1112},res:{ttl:se.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:se.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:se.THIRTY_SECONDS,prompt:!1,tag:1115}}},sc={min:se.FIVE_MINUTES,max:se.SEVEN_DAYS},wE="request",_E=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var bE=Object.defineProperty,EE=Object.defineProperties,IE=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertySymbols,xE=Object.prototype.hasOwnProperty,SE=Object.prototype.propertyIsEnumerable,Al=(a,t,i)=>t in a?bE(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,Ar=(a,t)=>{for(var i in t||(t={}))xE.call(t,i)&&Al(a,i,t[i]);if(Pl)for(var i of Pl(t))SE.call(t,i)&&Al(a,i,t[i]);return a},oc=(a,t)=>EE(a,IE(t));class PE extends ow{constructor(t){super(t),this.name=mE,this.events=new Ic,this.initialized=!1,this.ignoredPayloadTypes=[Hl],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(Hn)}),this.initialized=!0)},this.connect=async i=>{this.isInitialized();const s=oc(Ar({},i),{requiredNamespaces:i.requiredNamespaces||{},optionalNamespaces:i.optionalNamespaces||{}});await this.isValidConnect(s);const{pairingTopic:o,requiredNamespaces:h,optionalNamespaces:p,sessionProperties:g,relays:_}=s;let m=o,x,O=!1;if(m&&(O=this.client.core.pairing.pairings.get(m).active),!m||!O){const{topic:fe,uri:pe}=await this.client.core.pairing.create();m=fe,x=pe}const L=await this.client.core.crypto.generateKeyPair(),z=Ar({requiredNamespaces:h,optionalNamespaces:p,relays:_??[{protocol:Nf}],proposer:{publicKey:L,metadata:this.client.metadata}},g&&{sessionProperties:g}),{reject:R,resolve:K,done:re}=fn(se.FIVE_MINUTES,Mf);if(this.events.once(Ft("session_connect"),async({error:fe,session:pe})=>{if(fe)R(fe);else if(pe){pe.self.publicKey=L;const de=oc(Ar({},pe),{requiredNamespaces:pe.requiredNamespaces,optionalNamespaces:pe.optionalNamespaces});await this.client.session.set(pe.topic,de),await this.setExpiry(pe.topic,pe.expiry),m&&await this.client.core.pairing.updateMetadata({topic:m,metadata:pe.peer.metadata}),K(de)}}),!m){const{message:fe}=Q("NO_MATCHING_KEY",`connect() pairing topic: ${m}`);throw new Error(fe)}const he=await this.sendRequest(m,"wc_sessionPropose",z),le=$r(se.FIVE_MINUTES);return await this.setProposal(he,Ar({id:he,expiry:le},z)),{uri:x,approval:re}},this.pair=async i=>(this.isInitialized(),await this.client.core.pairing.pair(i)),this.approve=async i=>{this.isInitialized(),await this.isValidApprove(i);const{id:s,relayProtocol:o,namespaces:h,sessionProperties:p}=i,g=this.client.proposal.get(s);let{pairingTopic:_,proposer:m,requiredNamespaces:x,optionalNamespaces:O}=g;_=_||"",oo(x)||(x=qm(h,"approve()"));const L=await this.client.core.crypto.generateKeyPair(),z=m.publicKey,R=await this.client.core.crypto.generateSharedKey(L,z);_&&s&&(await this.client.core.pairing.updateMetadata({topic:_,metadata:m.metadata}),await this.sendResult(s,_,{relay:{protocol:o??"irn"},responderPublicKey:L}),await this.client.proposal.delete(s,rr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:_}));const K=Ar({relay:{protocol:o??"irn"},namespaces:h,requiredNamespaces:x,optionalNamespaces:O,pairingTopic:_,controller:{publicKey:L,metadata:this.client.metadata},expiry:$r(ro)},p&&{sessionProperties:p});await this.client.core.relayer.subscribe(R),await this.sendRequest(R,"wc_sessionSettle",K);const re=oc(Ar({},K),{topic:R,pairingTopic:_,acknowledged:!1,self:K.controller,peer:{publicKey:m.publicKey,metadata:m.metadata},controller:L});return await this.client.session.set(R,re),await this.setExpiry(R,$r(ro)),{topic:R,acknowledged:()=>new Promise(he=>setTimeout(()=>he(this.client.session.get(R)),500))}},this.reject=async i=>{this.isInitialized(),await this.isValidReject(i);const{id:s,reason:o}=i,{pairingTopic:h}=this.client.proposal.get(s);h&&(await this.sendError(s,h,o),await this.client.proposal.delete(s,rr("USER_DISCONNECTED")))},this.update=async i=>{this.isInitialized(),await this.isValidUpdate(i);const{topic:s,namespaces:o}=i,h=await this.sendRequest(s,"wc_sessionUpdate",{namespaces:o}),{done:p,resolve:g,reject:_}=fn();return this.events.once(Ft("session_update",h),({error:m})=>{m?_(m):g()}),await this.client.session.update(s,{namespaces:o}),{acknowledged:p}},this.extend=async i=>{this.isInitialized(),await this.isValidExtend(i);const{topic:s}=i,o=await this.sendRequest(s,"wc_sessionExtend",{}),{done:h,resolve:p,reject:g}=fn();return this.events.once(Ft("session_extend",o),({error:_})=>{_?g(_):p()}),await this.setExpiry(s,$r(ro)),{acknowledged:h}},this.request=async i=>{this.isInitialized(),await this.isValidRequest(i);const{chainId:s,request:o,topic:h,expiry:p}=i,g=await this.sendRequest(h,"wc_sessionRequest",{request:o,chainId:s},p),{done:_,resolve:m,reject:x}=fn(p);this.events.once(Ft("session_request",g),({error:L,result:z})=>{L?x(L):m(z)}),this.client.events.emit("session_request_sent",{topic:h,request:o,chainId:s,id:g});const O=await this.client.core.storage.getItem(gE);return Bm({id:g,topic:h,wcDeepLink:O}),await _()},this.respond=async i=>{this.isInitialized(),await this.isValidRespond(i);const{topic:s,response:o}=i,{id:h}=o;ci(o)?await this.sendResult(h,s,o.result):Mr(o)&&await this.sendError(h,s,o.error),this.deletePendingSessionRequest(i.response.id,{message:"fulfilled",code:0})},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:s}=i;if(this.client.session.keys.includes(s)){const o=await this.sendRequest(s,"wc_sessionPing",{}),{done:h,resolve:p,reject:g}=fn();this.events.once(Ft("session_ping",o),({error:_})=>{_?g(_):p()}),await h()}else this.client.core.pairing.pairings.keys.includes(s)&&await this.client.core.pairing.ping({topic:s})},this.emit=async i=>{this.isInitialized(),await this.isValidEmit(i);const{topic:s,event:o,chainId:h}=i;await this.sendRequest(s,"wc_sessionEvent",{event:o,chainId:h})},this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:s}=i;if(this.client.session.keys.includes(s)){const o=Pc().toString();let h;const p=g=>{(g==null?void 0:g.id.toString())===o&&(this.client.core.relayer.events.removeListener(mt.message_ack,p),h())};await Promise.all([new Promise(g=>{h=g,this.client.core.relayer.on(mt.message_ack,p)}),this.sendRequest(s,"wc_sessionDelete",rr("USER_DISCONNECTED"),void 0,o)]),await this.deleteSession(s)}else await this.client.core.pairing.disconnect({topic:s})},this.find=i=>(this.isInitialized(),this.client.session.getAll().filter(s=>Hm(s,i))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async i=>{if(i.pairingTopic)try{const s=this.client.core.pairing.pairings.get(i.pairingTopic),o=this.client.core.pairing.pairings.getAll().filter(h=>{var p,g;return((p=h.peerMetadata)==null?void 0:p.url)&&((g=h.peerMetadata)==null?void 0:g.url)===i.peer.metadata.url&&h.topic&&h.topic!==s.topic});if(o.length===0)return;this.client.logger.info(`Cleaning up ${o.length} duplicate pairing(s)`),await Promise.all(o.map(h=>this.client.core.pairing.disconnect({topic:h.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(s){this.client.logger.error(s)}},this.deleteSession=async(i,s)=>{const{self:o}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),this.client.session.delete(i,rr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),s||this.client.core.expirer.del(i)},this.deleteProposal=async(i,s)=>{await Promise.all([this.client.proposal.delete(i,rr("USER_DISCONNECTED")),s?Promise.resolve():this.client.core.expirer.del(i)])},this.deletePendingSessionRequest=async(i,s,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(i,s),o?Promise.resolve():this.client.core.expirer.del(i)])},this.setExpiry=async(i,s)=>{this.client.session.keys.includes(i)&&await this.client.session.update(i,{expiry:s}),this.client.core.expirer.set(i,s)},this.setProposal=async(i,s)=>{await this.client.proposal.set(i,s),this.client.core.expirer.set(i,s.expiry)},this.setPendingSessionRequest=async i=>{const s=Hn.wc_sessionRequest.req.ttl,{id:o,topic:h,params:p}=i;await this.client.pendingRequest.set(o,{id:o,topic:h,params:p}),s&&this.client.core.expirer.set(o,$r(s))},this.sendRequest=async(i,s,o,h,p)=>{const g=mo(s,o);if(Kl()&&_E.includes(s)){const x=dn(JSON.stringify(g));await this.client.core.verify.register({attestationId:x})}const _=await this.client.core.crypto.encode(i,g),m=Hn[s].req;return h&&(m.ttl=h),p&&(m.id=p),this.client.core.history.set(i,g),this.client.core.relayer.publish(i,_,m),g.id},this.sendResult=async(i,s,o)=>{const h=Ac(i,o),p=await this.client.core.crypto.encode(s,h),g=await this.client.core.history.get(s,i),_=Hn[g.request.method].res;this.client.core.relayer.publish(s,p,_),await this.client.core.history.resolve(h)},this.sendError=async(i,s,o)=>{const h=wo(i,o),p=await this.client.core.crypto.encode(s,h),g=await this.client.core.history.get(s,i),_=Hn[g.request.method].res;this.client.core.relayer.publish(s,p,_),await this.client.core.history.resolve(h)},this.cleanup=async()=>{const i=[],s=[];this.client.session.getAll().forEach(o=>{_i(o.expiry)&&i.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{_i(o.expiry)&&s.push(o.id)}),await Promise.all([...i.map(o=>this.deleteSession(o)),...s.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=i=>{const{topic:s,payload:o}=i,h=o.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeRequest(s,o);case"wc_sessionSettle":return this.onSessionSettleRequest(s,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(s,o);case"wc_sessionExtend":return this.onSessionExtendRequest(s,o);case"wc_sessionPing":return this.onSessionPingRequest(s,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(s,o);case"wc_sessionRequest":return this.onSessionRequest(s,o);case"wc_sessionEvent":return this.onSessionEventRequest(s,o);default:return this.client.logger.info(`Unsupported request method ${h}`)}},this.onRelayEventResponse=async i=>{const{topic:s,payload:o}=i,h=(await this.client.core.history.get(s,o.id)).request.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeResponse(s,o);case"wc_sessionSettle":return this.onSessionSettleResponse(s,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(s,o);case"wc_sessionExtend":return this.onSessionExtendResponse(s,o);case"wc_sessionPing":return this.onSessionPingResponse(s,o);case"wc_sessionRequest":return this.onSessionRequestResponse(s,o);default:return this.client.logger.info(`Unsupported response method ${h}`)}},this.onRelayEventUnknownPayload=i=>{const{topic:s}=i,{message:o}=Q("MISSING_OR_INVALID",`Decoded payload on topic ${s} is not identifiable as a JSON-RPC request or a response.`);throw new Error(o)},this.onSessionProposeRequest=async(i,s)=>{const{params:o,id:h}=s;try{this.isValidConnect(Ar({},s.params));const p=$r(se.FIVE_MINUTES),g=Ar({id:h,pairingTopic:i,expiry:p},o);await this.setProposal(h,g);const _=dn(JSON.stringify(s)),m=await this.getVerifyContext(_,g.proposer.metadata);this.client.events.emit("session_proposal",{id:h,params:g,verifyContext:m})}catch(p){await this.sendError(h,i,p),this.client.logger.error(p)}},this.onSessionProposeResponse=async(i,s)=>{const{id:o}=s;if(ci(s)){const{result:h}=s;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:h});const p=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:p});const g=p.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:g});const _=h.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:_});const m=await this.client.core.crypto.generateSharedKey(g,_);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:m});const x=await this.client.core.relayer.subscribe(m);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:x}),await this.client.core.pairing.activate({topic:i})}else Mr(s)&&(await this.client.proposal.delete(o,rr("USER_DISCONNECTED")),this.events.emit(Ft("session_connect"),{error:s.error}))},this.onSessionSettleRequest=async(i,s)=>{const{id:o,params:h}=s;try{this.isValidSessionSettleRequest(h);const{relay:p,controller:g,expiry:_,namespaces:m,requiredNamespaces:x,optionalNamespaces:O,sessionProperties:L,pairingTopic:z}=s.params,R=Ar({topic:i,relay:p,expiry:_,namespaces:m,acknowledged:!0,pairingTopic:z,requiredNamespaces:x,optionalNamespaces:O,controller:g.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:g.publicKey,metadata:g.metadata}},L&&{sessionProperties:L});await this.sendResult(s.id,i,!0),this.events.emit(Ft("session_connect"),{session:R}),this.cleanupDuplicatePairings(R)}catch(p){await this.sendError(o,i,p),this.client.logger.error(p)}},this.onSessionSettleResponse=async(i,s)=>{const{id:o}=s;ci(s)?(await this.client.session.update(i,{acknowledged:!0}),this.events.emit(Ft("session_approve",o),{})):Mr(s)&&(await this.client.session.delete(i,rr("USER_DISCONNECTED")),this.events.emit(Ft("session_approve",o),{error:s.error}))},this.onSessionUpdateRequest=async(i,s)=>{const{params:o,id:h}=s;try{this.isValidUpdate(Ar({topic:i},o)),await this.client.session.update(i,{namespaces:o.namespaces}),await this.sendResult(h,i,!0),this.client.events.emit("session_update",{id:h,topic:i,params:o})}catch(p){await this.sendError(h,i,p),this.client.logger.error(p)}},this.onSessionUpdateResponse=(i,s)=>{const{id:o}=s;ci(s)?this.events.emit(Ft("session_update",o),{}):Mr(s)&&this.events.emit(Ft("session_update",o),{error:s.error})},this.onSessionExtendRequest=async(i,s)=>{const{id:o}=s;try{this.isValidExtend({topic:i}),await this.setExpiry(i,$r(ro)),await this.sendResult(o,i,!0),this.client.events.emit("session_extend",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionExtendResponse=(i,s)=>{const{id:o}=s;ci(s)?this.events.emit(Ft("session_extend",o),{}):Mr(s)&&this.events.emit(Ft("session_extend",o),{error:s.error})},this.onSessionPingRequest=async(i,s)=>{const{id:o}=s;try{this.isValidPing({topic:i}),await this.sendResult(o,i,!0),this.client.events.emit("session_ping",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionPingResponse=(i,s)=>{const{id:o}=s;setTimeout(()=>{ci(s)?this.events.emit(Ft("session_ping",o),{}):Mr(s)&&this.events.emit(Ft("session_ping",o),{error:s.error})},500)},this.onSessionDeleteRequest=async(i,s)=>{const{id:o}=s;try{this.isValidDisconnect({topic:i,reason:s.params}),await Promise.all([new Promise(h=>{this.client.core.relayer.once(mt.publish,async()=>{h(await this.deleteSession(i))})}),this.sendResult(o,i,!0)]),this.client.events.emit("session_delete",{id:o,topic:i})}catch(h){this.client.logger.error(h)}},this.onSessionRequest=async(i,s)=>{const{id:o,params:h}=s;try{this.isValidRequest(Ar({topic:i},h)),await this.setPendingSessionRequest({id:o,topic:i,params:h});const p=dn(JSON.stringify(s)),g=this.client.session.get(i),_=await this.getVerifyContext(p,g.peer.metadata);this.client.events.emit("session_request",{id:o,topic:i,params:h,verifyContext:_})}catch(p){await this.sendError(o,i,p),this.client.logger.error(p)}},this.onSessionRequestResponse=(i,s)=>{const{id:o}=s;ci(s)?this.events.emit(Ft("session_request",o),{result:s.result}):Mr(s)&&this.events.emit(Ft("session_request",o),{error:s.error})},this.onSessionEventRequest=async(i,s)=>{const{id:o,params:h}=s;try{this.isValidEmit(Ar({topic:i},h)),this.client.events.emit("session_event",{id:o,topic:i,params:h})}catch(p){await this.sendError(o,i,p),this.client.logger.error(p)}},this.isValidConnect=async i=>{if(!hr(i)){const{message:_}=Q("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(i)}`);throw new Error(_)}const{pairingTopic:s,requiredNamespaces:o,optionalNamespaces:h,sessionProperties:p,relays:g}=i;if(bi(s)||await this.isValidPairingTopic(s),!km(g,!0)){const{message:_}=Q("MISSING_OR_INVALID",`connect() relays: ${g}`);throw new Error(_)}!bi(o)&&oo(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!bi(h)&&oo(h)!==0&&this.validateNamespaces(h,"optionalNamespaces"),bi(p)||this.validateSessionProps(p,"sessionProperties")},this.validateNamespaces=(i,s)=>{const o=Km(i,"connect()",s);if(o)throw new Error(o.message)},this.isValidApprove=async i=>{if(!hr(i))throw new Error(Q("MISSING_OR_INVALID",`approve() params: ${i}`).message);const{id:s,namespaces:o,relayProtocol:h,sessionProperties:p}=i;await this.isValidProposalId(s);const g=this.client.proposal.get(s),_=Ga(o,"approve()");if(_)throw new Error(_.message);const m=Fh(g.requiredNamespaces,o,"approve()");if(m)throw new Error(m.message);if(!pn(h,!0)){const{message:x}=Q("MISSING_OR_INVALID",`approve() relayProtocol: ${h}`);throw new Error(x)}bi(p)||this.validateSessionProps(p,"sessionProperties")},this.isValidReject=async i=>{if(!hr(i)){const{message:h}=Q("MISSING_OR_INVALID",`reject() params: ${i}`);throw new Error(h)}const{id:s,reason:o}=i;if(await this.isValidProposalId(s),!Vm(o)){const{message:h}=Q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidSessionSettleRequest=i=>{if(!hr(i)){const{message:m}=Q("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${i}`);throw new Error(m)}const{relay:s,controller:o,namespaces:h,expiry:p}=i;if(!Gm(s)){const{message:m}=Q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(m)}const g=Wm(o,"onSessionSettleRequest()");if(g)throw new Error(g.message);const _=Ga(h,"onSessionSettleRequest()");if(_)throw new Error(_.message);if(_i(p)){const{message:m}=Q("EXPIRED","onSessionSettleRequest()");throw new Error(m)}},this.isValidUpdate=async i=>{if(!hr(i)){const{message:_}=Q("MISSING_OR_INVALID",`update() params: ${i}`);throw new Error(_)}const{topic:s,namespaces:o}=i;await this.isValidSessionTopic(s);const h=this.client.session.get(s),p=Ga(o,"update()");if(p)throw new Error(p.message);const g=Fh(h.requiredNamespaces,o,"update()");if(g)throw new Error(g.message)},this.isValidExtend=async i=>{if(!hr(i)){const{message:o}=Q("MISSING_OR_INVALID",`extend() params: ${i}`);throw new Error(o)}const{topic:s}=i;await this.isValidSessionTopic(s)},this.isValidRequest=async i=>{if(!hr(i)){const{message:_}=Q("MISSING_OR_INVALID",`request() params: ${i}`);throw new Error(_)}const{topic:s,request:o,chainId:h,expiry:p}=i;await this.isValidSessionTopic(s);const{namespaces:g}=this.client.session.get(s);if(!$h(g,h)){const{message:_}=Q("MISSING_OR_INVALID",`request() chainId: ${h}`);throw new Error(_)}if(!Jm(o)){const{message:_}=Q("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(_)}if(!Ym(g,h,o.method)){const{message:_}=Q("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(_)}if(p&&!Xm(p,sc)){const{message:_}=Q("MISSING_OR_INVALID",`request() expiry: ${p}. Expiry must be a number (in seconds) between ${sc.min} and ${sc.max}`);throw new Error(_)}},this.isValidRespond=async i=>{if(!hr(i)){const{message:h}=Q("MISSING_OR_INVALID",`respond() params: ${i}`);throw new Error(h)}const{topic:s,response:o}=i;if(await this.isValidSessionTopic(s),!Zm(o)){const{message:h}=Q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidPing=async i=>{if(!hr(i)){const{message:o}=Q("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(o)}const{topic:s}=i;await this.isValidSessionOrPairingTopic(s)},this.isValidEmit=async i=>{if(!hr(i)){const{message:g}=Q("MISSING_OR_INVALID",`emit() params: ${i}`);throw new Error(g)}const{topic:s,event:o,chainId:h}=i;await this.isValidSessionTopic(s);const{namespaces:p}=this.client.session.get(s);if(!$h(p,h)){const{message:g}=Q("MISSING_OR_INVALID",`emit() chainId: ${h}`);throw new Error(g)}if(!Qm(o)){const{message:g}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(g)}if(!e1(p,h,o.name)){const{message:g}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(g)}},this.isValidDisconnect=async i=>{if(!hr(i)){const{message:o}=Q("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(o)}const{topic:s}=i;await this.isValidSessionOrPairingTopic(s)},this.getVerifyContext=async(i,s)=>{const o={verified:{verifyUrl:s.verifyUrl||"",validation:"UNKNOWN",origin:s.url||""}};try{const h=await this.client.core.verify.resolve({attestationId:i,verifyUrl:s.verifyUrl});h&&(o.verified.origin=h,o.verified.validation=h===s.url?"VALID":"INVALID")}catch(h){this.client.logger.error(h)}return this.client.logger.info(`Verify context: ${JSON.stringify(o)}`),o},this.validateSessionProps=(i,s)=>{Object.values(i).forEach(o=>{if(!pn(o,!1)){const{message:h}=Q("MISSING_OR_INVALID",`${s} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(h)}})}}isInitialized(){if(!this.initialized){const{message:t}=Q("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.client.core.relayer.on(mt.message,async t=>{const{topic:i,message:s}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(s)))return;const o=await this.client.core.crypto.decode(i,s);Cc(o)?(this.client.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):_o(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.client.core.history.delete(i,o.id)):this.onRelayEventUnknownPayload({topic:i,payload:o})})}registerExpirerEvents(){this.client.core.expirer.on(Cr.expired,async t=>{const{topic:i,id:s}=kl(t.target);if(s&&this.client.pendingRequest.keys.includes(s))return await this.deletePendingSessionRequest(s,Q("EXPIRED"),!0);i?this.client.session.keys.includes(i)&&(await this.deleteSession(i,!0),this.client.events.emit("session_expire",{topic:i})):s&&(await this.deleteProposal(s,!0),this.client.events.emit("proposal_expire",{id:s}))})}isValidPairingTopic(t){if(!pn(t,!1)){const{message:i}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(i)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:i}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(i)}if(_i(this.client.core.pairing.pairings.get(t).expiry)){const{message:i}=Q("EXPIRED",`pairing topic: ${t}`);throw new Error(i)}}async isValidSessionTopic(t){if(!pn(t,!1)){const{message:i}=Q("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(i)}if(!this.client.session.keys.includes(t)){const{message:i}=Q("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(i)}if(_i(this.client.session.get(t).expiry)){await this.deleteSession(t);const{message:i}=Q("EXPIRED",`session topic: ${t}`);throw new Error(i)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else if(this.client.core.pairing.pairings.keys.includes(t))this.isValidPairingTopic(t);else if(pn(t,!1)){const{message:i}=Q("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(i)}else{const{message:i}=Q("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(i)}}async isValidProposalId(t){if(!t1(t)){const{message:i}=Q("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(i)}if(!this.client.proposal.keys.includes(t)){const{message:i}=Q("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(i)}if(_i(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);const{message:i}=Q("EXPIRED",`proposal id: ${t}`);throw new Error(i)}}}class AE extends Eo{constructor(t,i){super(t,i,yE,Tc),this.core=t,this.logger=i}}class CE extends Eo{constructor(t,i){super(t,i,vE,Tc),this.core=t,this.logger=i}}class OE extends Eo{constructor(t,i){super(t,i,wE,Tc,s=>s.id),this.core=t,this.logger=i}}let RE=class jf extends sw{constructor(t){super(t),this.protocol=Lf,this.version=Ff,this.name=nc.name,this.events=new vr.EventEmitter,this.on=(s,o)=>this.events.on(s,o),this.once=(s,o)=>this.events.once(s,o),this.off=(s,o)=>this.events.off(s,o),this.removeListener=(s,o)=>this.events.removeListener(s,o),this.removeAllListeners=s=>this.events.removeAllListeners(s),this.connect=async s=>{try{return await this.engine.connect(s)}catch(o){throw this.logger.error(o.message),o}},this.pair=async s=>{try{return await this.engine.pair(s)}catch(o){throw this.logger.error(o.message),o}},this.approve=async s=>{try{return await this.engine.approve(s)}catch(o){throw this.logger.error(o.message),o}},this.reject=async s=>{try{return await this.engine.reject(s)}catch(o){throw this.logger.error(o.message),o}},this.update=async s=>{try{return await this.engine.update(s)}catch(o){throw this.logger.error(o.message),o}},this.extend=async s=>{try{return await this.engine.extend(s)}catch(o){throw this.logger.error(o.message),o}},this.request=async s=>{try{return await this.engine.request(s)}catch(o){throw this.logger.error(o.message),o}},this.respond=async s=>{try{return await this.engine.respond(s)}catch(o){throw this.logger.error(o.message),o}},this.ping=async s=>{try{return await this.engine.ping(s)}catch(o){throw this.logger.error(o.message),o}},this.emit=async s=>{try{return await this.engine.emit(s)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async s=>{try{return await this.engine.disconnect(s)}catch(o){throw this.logger.error(o.message),o}},this.find=s=>{try{return this.engine.find(s)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(s){throw this.logger.error(s.message),s}},this.name=(t==null?void 0:t.name)||nc.name,this.metadata=(t==null?void 0:t.metadata)||Um();const i=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Re.pino(Re.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||nc.logger}));this.core=(t==null?void 0:t.core)||new dE(t),this.logger=Re.generateChildLogger(i,this.name),this.session=new CE(this.core,this.logger),this.proposal=new AE(this.core,this.logger),this.pendingRequest=new OE(this.core,this.logger),this.engine=new PE(this)}static async init(t){const i=new jf(t);return await i.initialize(),i}get context(){return Re.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}};var gc={exports:{}};(function(a,t){var i=typeof self<"u"?self:jr,s=function(){function h(){this.fetch=!1,this.DOMException=i.DOMException}return h.prototype=i,new h}();(function(h){(function(p){var g={searchParams:"URLSearchParams"in h,iterable:"Symbol"in h&&"iterator"in Symbol,blob:"FileReader"in h&&"Blob"in h&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in h,arrayBuffer:"ArrayBuffer"in h};function _(v){return v&&DataView.prototype.isPrototypeOf(v)}if(g.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],x=ArrayBuffer.isView||function(v){return v&&m.indexOf(Object.prototype.toString.call(v))>-1};function O(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()}function L(v){return typeof v!="string"&&(v=String(v)),v}function z(v){var I={next:function(){var X=v.shift();return{done:X===void 0,value:X}}};return g.iterable&&(I[Symbol.iterator]=function(){return I}),I}function R(v){this.map={},v instanceof R?v.forEach(function(I,X){this.append(X,I)},this):Array.isArray(v)?v.forEach(function(I){this.append(I[0],I[1])},this):v&&Object.getOwnPropertyNames(v).forEach(function(I){this.append(I,v[I])},this)}R.prototype.append=function(v,I){v=O(v),I=L(I);var X=this.map[v];this.map[v]=X?X+", "+I:I},R.prototype.delete=function(v){delete this.map[O(v)]},R.prototype.get=function(v){return v=O(v),this.has(v)?this.map[v]:null},R.prototype.has=function(v){return this.map.hasOwnProperty(O(v))},R.prototype.set=function(v,I){this.map[O(v)]=L(I)},R.prototype.forEach=function(v,I){for(var X in this.map)this.map.hasOwnProperty(X)&&v.call(I,this.map[X],X,this)},R.prototype.keys=function(){var v=[];return this.forEach(function(I,X){v.push(X)}),z(v)},R.prototype.values=function(){var v=[];return this.forEach(function(I){v.push(I)}),z(v)},R.prototype.entries=function(){var v=[];return this.forEach(function(I,X){v.push([X,I])}),z(v)},g.iterable&&(R.prototype[Symbol.iterator]=R.prototype.entries);function K(v){if(v.bodyUsed)return Promise.reject(new TypeError("Already read"));v.bodyUsed=!0}function re(v){return new Promise(function(I,X){v.onload=function(){I(v.result)},v.onerror=function(){X(v.error)}})}function he(v){var I=new FileReader,X=re(I);return I.readAsArrayBuffer(v),X}function le(v){var I=new FileReader,X=re(I);return I.readAsText(v),X}function fe(v){for(var I=new Uint8Array(v),X=new Array(I.length),ce=0;ce-1?I:v}function W(v,I){I=I||{};var X=I.body;if(v instanceof W){if(v.bodyUsed)throw new TypeError("Already read");this.url=v.url,this.credentials=v.credentials,I.headers||(this.headers=new R(v.headers)),this.method=v.method,this.mode=v.mode,this.signal=v.signal,!X&&v._bodyInit!=null&&(X=v._bodyInit,v.bodyUsed=!0)}else this.url=String(v);if(this.credentials=I.credentials||this.credentials||"same-origin",(I.headers||!this.headers)&&(this.headers=new R(I.headers)),this.method=q(I.method||this.method||"GET"),this.mode=I.mode||this.mode||null,this.signal=I.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}W.prototype.clone=function(){return new W(this,{body:this._bodyInit})};function ve(v){var I=new FormData;return v.trim().split("&").forEach(function(X){if(X){var ce=X.split("="),V=ce.shift().replace(/\+/g," "),B=ce.join("=").replace(/\+/g," ");I.append(decodeURIComponent(V),decodeURIComponent(B))}}),I}function ie(v){var I=new R,X=v.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(ce){var V=ce.split(":"),B=V.shift().trim();if(B){var k=V.join(":").trim();I.append(B,k)}}),I}de.call(W.prototype);function ue(v,I){I||(I={}),this.type="default",this.status=I.status===void 0?200:I.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in I?I.statusText:"OK",this.headers=new R(I.headers),this.url=I.url||"",this._initBody(v)}de.call(ue.prototype),ue.prototype.clone=function(){return new ue(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new R(this.headers),url:this.url})},ue.error=function(){var v=new ue(null,{status:0,statusText:""});return v.type="error",v};var Te=[301,302,303,307,308];ue.redirect=function(v,I){if(Te.indexOf(I)===-1)throw new RangeError("Invalid status code");return new ue(null,{status:I,headers:{location:v}})},p.DOMException=h.DOMException;try{new p.DOMException}catch{p.DOMException=function(I,X){this.message=I,this.name=X;var ce=Error(I);this.stack=ce.stack},p.DOMException.prototype=Object.create(Error.prototype),p.DOMException.prototype.constructor=p.DOMException}function Ue(v,I){return new Promise(function(X,ce){var V=new W(v,I);if(V.signal&&V.signal.aborted)return ce(new p.DOMException("Aborted","AbortError"));var B=new XMLHttpRequest;function k(){B.abort()}B.onload=function(){var G={status:B.status,statusText:B.statusText,headers:ie(B.getAllResponseHeaders()||"")};G.url="responseURL"in B?B.responseURL:G.headers.get("X-Request-URL");var Ye="response"in B?B.response:B.responseText;X(new ue(Ye,G))},B.onerror=function(){ce(new TypeError("Network request failed"))},B.ontimeout=function(){ce(new TypeError("Network request failed"))},B.onabort=function(){ce(new p.DOMException("Aborted","AbortError"))},B.open(V.method,V.url,!0),V.credentials==="include"?B.withCredentials=!0:V.credentials==="omit"&&(B.withCredentials=!1),"responseType"in B&&g.blob&&(B.responseType="blob"),V.headers.forEach(function(G,Ye){B.setRequestHeader(Ye,G)}),V.signal&&(V.signal.addEventListener("abort",k),B.onreadystatechange=function(){B.readyState===4&&V.signal.removeEventListener("abort",k)}),B.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return Ue.polyfill=!0,h.fetch||(h.fetch=Ue,h.Headers=R,h.Request=W,h.Response=ue),p.Headers=R,p.Request=W,p.Response=ue,p.fetch=Ue,Object.defineProperty(p,"__esModule",{value:!0}),p})({})})(s),s.fetch.ponyfill=!0,delete s.fetch.polyfill;var o=s;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,a.exports=t})(gc,gc.exports);var TE=gc.exports;const Cl=_c(TE),NE={Accept:"application/json","Content-Type":"application/json"},DE="POST",Ol={headers:NE,method:DE},Rl=10;class ki{constructor(t,i=!1){if(this.url=t,this.disableProviderPing=i,this.events=new vr.EventEmitter,this.isAvailable=!1,this.registering=!1,!il(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t,this.disableProviderPing=i}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,i){this.events.on(t,i)}once(t,i){this.events.once(t,i)}off(t,i){this.events.off(t,i)}removeListener(t,i){this.events.removeListener(t,i)}async open(t=this.url){await this.register(t)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(t,i){this.isAvailable||await this.register();try{const s=qi(t),h=await(await Cl(this.url,Object.assign(Object.assign({},Ol),{body:s}))).json();this.onPayload({data:h})}catch(s){this.onError(t.id,s)}}async register(t=this.url){if(!il(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((s,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));s()})})}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){const i=qi({id:1,jsonrpc:"2.0",method:"test",params:[]});await Cl(t,Object.assign(Object.assign({},Ol),{body:i}))}this.onOpen()}catch(i){const s=this.parseError(i);throw this.events.emit("register_error",s),this.onClose(),s}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;const i=typeof t.data=="string"?Wn(t.data):t.data;this.events.emit("payload",i)}onError(t,i){const s=this.parseError(i),o=s.message||s.toString(),h=wo(t,o);this.events.emit("payload",h)}parseError(t,i=this.url){return gf(t,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Rl&&this.events.setMaxListeners(Rl)}}const Tl="error",LE="wss://relay.walletconnect.com",FE="wc",$E="universal_provider",Nl=`${FE}@2:${$E}:`,ME="https://rpc.walletconnect.com/v1",xi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yc={exports:{}};/** +* @license +* Lodash +* Copyright OpenJS Foundation and other contributors +* Released under MIT license +* Based on Underscore.js 1.8.3 +* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +*/(function(a,t){(function(){var i,s="4.17.21",o=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",p="Expected a function",g="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",m=500,x="__lodash_placeholder__",O=1,L=2,z=4,R=1,K=2,re=1,he=2,le=4,fe=8,pe=16,de=32,F=64,q=128,W=256,ve=512,ie=30,ue="...",Te=800,Ue=16,v=1,I=2,X=3,ce=1/0,V=9007199254740991,B=17976931348623157e292,k=0/0,G=4294967295,Ye=G-1,ke=G>>>1,zr=[["ary",q],["bind",re],["bindKey",he],["curry",fe],["curryRight",pe],["flip",ve],["partial",de],["partialRight",F],["rearg",W]],Ie="[object Arguments]",St="[object Array]",D="[object AsyncFunction]",N="[object Boolean]",C="[object Date]",u="[object DOMException]",E="[object Error]",ee="[object Function]",ge="[object GeneratorFunction]",be="[object Map]",Ne="[object Number]",Le="[object Null]",Pe="[object Object]",Pt="[object Promise]",wt="[object Proxy]",ot="[object RegExp]",$e="[object Set]",Ze="[object String]",Qe="[object Symbol]",at="[object Undefined]",qe="[object WeakMap]",et="[object WeakSet]",De="[object ArrayBuffer]",Ke="[object DataView]",ht="[object Float32Array]",je="[object Float64Array]",At="[object Int8Array]",$t="[object Int16Array]",Ht="[object Int32Array]",kt="[object Uint8Array]",zt="[object Uint8ClampedArray]",Jt="[object Uint16Array]",ir="[object Uint32Array]",Ur=/\b__p \+= '';/g,Yt=/\b(__p \+=) '' \+/g,Wr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ui=/&(?:amp|lt|gt|quot|#39);/g,Si=/[&<>"']/g,lt=RegExp(ui.source),it=RegExp(Si.source),ft=/<%-([\s\S]+?)%>/g,pt=/<%([\s\S]+?)%>/g,ct=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ct=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(dt.source),gt=/^\s+/,_t=/\s/,yt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xe=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,Nt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Io=/[()=,{}\[\]\/\s]/,xo=/\\(\\)?/g,So=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mr=/\w*$/,Po=/^[-+]0x[0-9a-f]+$/i,Ao=/^0b[01]+$/i,Co=/^\[object .+?Constructor\]$/,Oo=/^0o[0-7]+$/i,Ro=/^(?:0|[1-9]\d*)$/,Jr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ki=/($^)/,To=/['\n\r\u2028\u2029\\]/g,Vi="\\ud800-\\udfff",No="\\u0300-\\u036f",Do="\\ufe20-\\ufe2f",Gi="\\u20d0-\\u20ff",Yn=No+Do+Gi,Xn="\\u2700-\\u27bf",Rr="a-z\\xdf-\\xf6\\xf8-\\xff",Lo="\\xac\\xb1\\xd7\\xf7",Fo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$o="\\u2000-\\u206f",Mo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Zn="A-Z\\xc0-\\xd6\\xd8-\\xde",Qn="\\ufe0e\\ufe0f",Pi=Lo+Fo+$o+Mo,wn="['’]",Ai="["+Vi+"]",_n="["+Pi+"]",Ci="["+Yn+"]",es="\\d+",jo="["+Xn+"]",ts="["+Rr+"]",rs="[^"+Vi+Pi+es+Xn+Rr+Zn+"]",Wi="\\ud83c[\\udffb-\\udfff]",zo="(?:"+Ci+"|"+Wi+")",is="[^"+Vi+"]",Ji="(?:\\ud83c[\\udde6-\\uddff]){2}",hi="[\\ud800-\\udbff][\\udc00-\\udfff]",lr="["+Zn+"]",ns="\\u200d",ss="(?:"+ts+"|"+rs+")",qr="(?:"+lr+"|"+rs+")",os="(?:"+wn+"(?:d|ll|m|re|s|t|ve))?",as="(?:"+wn+"(?:D|LL|M|RE|S|T|VE))?",cs=zo+"?",us="["+Qn+"]?",Uo="(?:"+ns+"(?:"+[is,Ji,hi].join("|")+")"+us+cs+")*",Yr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hs="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ls=us+cs+Uo,Yi="(?:"+[jo,Ji,hi].join("|")+")"+ls,qo="(?:"+[is+Ci+"?",Ci,Ji,hi,Ai].join("|")+")",bn=RegExp(wn,"g"),Bo=RegExp(Ci,"g"),Xi=RegExp(Wi+"(?="+Wi+")|"+qo+ls,"g"),fs=RegExp([lr+"?"+ts+"+"+os+"(?="+[_n,lr,"$"].join("|")+")",qr+"+"+as+"(?="+[_n,lr+ss,"$"].join("|")+")",lr+"?"+ss+"+"+os,lr+"+"+as,hs,Yr,es,Yi].join("|"),"g"),ps=RegExp("["+ns+Vi+Yn+Qn+"]"),Oi=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ds=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ho=-1,Ve={};Ve[ht]=Ve[je]=Ve[At]=Ve[$t]=Ve[Ht]=Ve[kt]=Ve[zt]=Ve[Jt]=Ve[ir]=!0,Ve[Ie]=Ve[St]=Ve[De]=Ve[N]=Ve[Ke]=Ve[C]=Ve[E]=Ve[ee]=Ve[be]=Ve[Ne]=Ve[Pe]=Ve[ot]=Ve[$e]=Ve[Ze]=Ve[qe]=!1;var Be={};Be[Ie]=Be[St]=Be[De]=Be[Ke]=Be[N]=Be[C]=Be[ht]=Be[je]=Be[At]=Be[$t]=Be[Ht]=Be[be]=Be[Ne]=Be[Pe]=Be[ot]=Be[$e]=Be[Ze]=Be[Qe]=Be[kt]=Be[zt]=Be[Jt]=Be[ir]=!0,Be[E]=Be[ee]=Be[qe]=!1;var y={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},S={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ge=parseFloat,me=parseInt,tt=typeof kn=="object"&&kn&&kn.Object===Object&&kn,Dt=typeof self=="object"&&self&&self.Object===Object&&self,Ce=tt||Dt||Function("return this")(),We=t&&!t.nodeType&&t,bt=We&&!0&&a&&!a.nodeType&&a,nr=bt&&bt.exports===We,Lt=nr&&tt.process,rt=function(){try{var P=bt&&bt.require&&bt.require("util").types;return P||Lt&&Lt.binding&&Lt.binding("util")}catch{}}(),Xt=rt&&rt.isArrayBuffer,Tr=rt&&rt.isDate,wr=rt&&rt.isMap,Br=rt&&rt.isRegExp,En=rt&&rt.isSet,Ri=rt&&rt.isTypedArray;function Ut(P,$,T){switch(T.length){case 0:return P.call($);case 1:return P.call($,T[0]);case 2:return P.call($,T[0],T[1]);case 3:return P.call($,T[0],T[1],T[2])}return P.apply($,T)}function qf(P,$,T,Z){for(var ye=-1,Fe=P==null?0:P.length;++ye-1}function ko(P,$,T){for(var Z=-1,ye=P==null?0:P.length;++Z-1;);return T}function qc(P,$){for(var T=P.length;T--&&Zi($,P[T],0)>-1;);return T}function Yf(P,$){for(var T=P.length,Z=0;T--;)P[T]===$&&++Z;return Z}var Xf=Wo(y),Zf=Wo(S);function Qf(P){return"\\"+Y[P]}function ep(P,$){return P==null?i:P[$]}function Qi(P){return ps.test(P)}function tp(P){return Oi.test(P)}function rp(P){for(var $,T=[];!($=P.next()).done;)T.push($.value);return T}function Zo(P){var $=-1,T=Array(P.size);return P.forEach(function(Z,ye){T[++$]=[ye,Z]}),T}function Bc(P,$){return function(T){return P($(T))}}function pi(P,$){for(var T=-1,Z=P.length,ye=0,Fe=[];++T-1}function Hp(e,r){var n=this.__data__,c=Ns(n,e);return c<0?(++this.size,n.push([e,r])):n[c][1]=r,this}Xr.prototype.clear=zp,Xr.prototype.delete=Up,Xr.prototype.get=qp,Xr.prototype.has=Bp,Xr.prototype.set=Hp;function Zr(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r=r?e:r)),e}function Ir(e,r,n,c,l,d){var w,b=r&O,A=r&L,M=r&z;if(n&&(w=l?n(e,c,l,d):n(e)),w!==i)return w;if(!ut(e))return e;var j=we(e);if(j){if(w=Gd(e),!b)return sr(e,w)}else{var H=Wt(e),J=H==ee||H==ge;if(wi(e))return xu(e,b);if(H==Pe||H==Ie||J&&!l){if(w=A||J?{}:Hu(e),!b)return A?$d(e,sd(w,e)):Fd(e,eu(w,e))}else{if(!Be[H])return l?e:{};w=Wd(e,H,b)}}d||(d=new Dr);var te=d.get(e);if(te)return te;d.set(e,w),mh(e)?e.forEach(function(ae){w.add(Ir(ae,r,n,ae,e,d))}):yh(e)&&e.forEach(function(ae,Se){w.set(Se,Ir(ae,r,n,Se,e,d))});var oe=M?A?xa:Ia:A?ar:qt,Ee=j?i:oe(e);return _r(Ee||e,function(ae,Se){Ee&&(Se=ae,ae=e[Se]),On(w,Se,Ir(ae,r,n,Se,e,d))}),w}function od(e){var r=qt(e);return function(n){return tu(n,e,r)}}function tu(e,r,n){var c=n.length;if(e==null)return!c;for(e=Je(e);c--;){var l=n[c],d=r[l],w=e[l];if(w===i&&!(l in e)||!d(w))return!1}return!0}function ru(e,r,n){if(typeof e!="function")throw new br(p);return $n(function(){e.apply(i,n)},r)}function Rn(e,r,n,c){var l=-1,d=gs,w=!0,b=e.length,A=[],M=r.length;if(!b)return A;n&&(r=st(r,fr(n))),c?(d=ko,w=!1):r.length>=o&&(d=In,w=!1,r=new Di(r));e:for(;++ll?0:l+n),c=c===i||c>l?l:_e(c),c<0&&(c+=l),c=n>c?0:_h(c);n0&&n(b)?r>1?Kt(b,r-1,n,c,l):fi(l,b):c||(l[l.length]=b)}return l}var sa=Ru(),su=Ru(!0);function Hr(e,r){return e&&sa(e,r,qt)}function oa(e,r){return e&&su(e,r,qt)}function Ls(e,r){return li(r,function(n){return ii(e[n])})}function Fi(e,r){r=vi(r,e);for(var n=0,c=r.length;e!=null&&nr}function ud(e,r){return e!=null&&ze.call(e,r)}function hd(e,r){return e!=null&&r in Je(e)}function ld(e,r,n){return e>=Gt(r,n)&&e=120&&j.length>=120)?new Di(w&&j):i}j=e[0];var H=-1,J=b[0];e:for(;++H-1;)b!==e&&Ss.call(b,A,1),Ss.call(e,A,1);return e}function yu(e,r){for(var n=e?r.length:0,c=n-1;n--;){var l=r[n];if(n==c||l!==d){var d=l;ri(l)?Ss.call(e,l,1):ya(e,l)}}return e}function pa(e,r){return e+Cs(Yc()*(r-e+1))}function xd(e,r,n,c){for(var l=-1,d=jt(As((r-e)/(n||1)),0),w=T(d);d--;)w[c?d:++l]=e,e+=n;return w}function da(e,r){var n="";if(!e||r<1||r>V)return n;do r%2&&(n+=e),r=Cs(r/2),r&&(e+=e);while(r);return n}function xe(e,r){return Ta(Vu(e,r,cr),e+"")}function Sd(e){return Qc(ln(e))}function Pd(e,r){var n=ln(e);return Ks(n,Li(r,0,n.length))}function Dn(e,r,n,c){if(!ut(e))return e;r=vi(r,e);for(var l=-1,d=r.length,w=d-1,b=e;b!=null&&++ll?0:l+r),n=n>l?l:n,n<0&&(n+=l),l=r>n?0:n-r>>>0,r>>>=0;for(var d=T(l);++c>>1,w=e[d];w!==null&&!dr(w)&&(n?w<=r:w=o){var M=r?null:Ud(e);if(M)return vs(M);w=!1,l=In,A=new Di}else A=r?[]:b;e:for(;++c=c?e:xr(e,r,n)}var Iu=vp||function(e){return Ce.clearTimeout(e)};function xu(e,r){if(r)return e.slice();var n=e.length,c=Kc?Kc(n):new e.constructor(n);return e.copy(c),c}function _a(e){var r=new e.constructor(e.byteLength);return new Is(r).set(new Is(e)),r}function Td(e,r){var n=r?_a(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Nd(e){var r=new e.constructor(e.source,mr.exec(e));return r.lastIndex=e.lastIndex,r}function Dd(e){return Cn?Je(Cn.call(e)):{}}function Su(e,r){var n=r?_a(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Pu(e,r){if(e!==r){var n=e!==i,c=e===null,l=e===e,d=dr(e),w=r!==i,b=r===null,A=r===r,M=dr(r);if(!b&&!M&&!d&&e>r||d&&w&&A&&!b&&!M||c&&w&&A||!n&&A||!l)return 1;if(!c&&!d&&!M&&e=b)return A;var M=n[c];return A*(M=="desc"?-1:1)}}return e.index-r.index}function Au(e,r,n,c){for(var l=-1,d=e.length,w=n.length,b=-1,A=r.length,M=jt(d-w,0),j=T(A+M),H=!c;++b1?n[l-1]:i,w=l>2?n[2]:i;for(d=e.length>3&&typeof d=="function"?(l--,d):i,w&&Qt(n[0],n[1],w)&&(d=l<3?i:d,l=1),r=Je(r);++c-1?l[d?r[w]:w]:i}}function Du(e){return ti(function(r){var n=r.length,c=n,l=Er.prototype.thru;for(e&&r.reverse();c--;){var d=r[c];if(typeof d!="function")throw new br(p);if(l&&!w&&Hs(d)=="wrapper")var w=new Er([],!0)}for(c=w?c:n;++c1&&Oe.reverse(),j&&Ab))return!1;var M=d.get(e),j=d.get(r);if(M&&j)return M==r&&j==e;var H=-1,J=!0,te=n&K?new Di:i;for(d.set(e,r),d.set(r,e);++H1?"& ":"")+r[c],r=r.join(n>2?", ":" "),e.replace(yt,`{ +/* [wrapped with `+r+`] */ +`)}function Yd(e){return we(e)||ji(e)||!!(Wc&&e&&e[Wc])}function ri(e,r){var n=typeof e;return r=r??V,!!r&&(n=="number"||n!="symbol"&&Ro.test(e))&&e>-1&&e%1==0&&e0){if(++r>=Te)return arguments[0]}else r=0;return e.apply(i,arguments)}}function Ks(e,r){var n=-1,c=e.length,l=c-1;for(r=r===i?c:r;++n1?e[r-1]:i;return n=typeof n=="function"?(e.pop(),n):i,nh(e,n)});function sh(e){var r=f(e);return r.__chain__=!0,r}function ay(e,r){return r(e),e}function Vs(e,r){return r(e)}var cy=ti(function(e){var r=e.length,n=r?e[0]:0,c=this.__wrapped__,l=function(d){return na(d,e)};return r>1||this.__actions__.length||!(c instanceof Ae)||!ri(n)?this.thru(l):(c=c.slice(n,+n+(r?1:0)),c.__actions__.push({func:Vs,args:[l],thisArg:i}),new Er(c,this.__chain__).thru(function(d){return r&&!d.length&&d.push(i),d}))});function uy(){return sh(this)}function hy(){return new Er(this.value(),this.__chain__)}function ly(){this.__values__===i&&(this.__values__=wh(this.value()));var e=this.__index__>=this.__values__.length,r=e?i:this.__values__[this.__index__++];return{done:e,value:r}}function fy(){return this}function py(e){for(var r,n=this;n instanceof Ts;){var c=Zu(n);c.__index__=0,c.__values__=i,r?l.__wrapped__=c:r=c;var l=c;n=n.__wrapped__}return l.__wrapped__=e,r}function dy(){var e=this.__wrapped__;if(e instanceof Ae){var r=e;return this.__actions__.length&&(r=new Ae(this)),r=r.reverse(),r.__actions__.push({func:Vs,args:[Na],thisArg:i}),new Er(r,this.__chain__)}return this.thru(Na)}function gy(){return bu(this.__wrapped__,this.__actions__)}var yy=js(function(e,r,n){ze.call(e,n)?++e[n]:Qr(e,n,1)});function vy(e,r,n){var c=we(e)?Lc:ad;return n&&Qt(e,r,n)&&(r=i),c(e,ne(r,3))}function my(e,r){var n=we(e)?li:nu;return n(e,ne(r,3))}var wy=Nu(Qu),_y=Nu(eh);function by(e,r){return Kt(Gs(e,r),1)}function Ey(e,r){return Kt(Gs(e,r),ce)}function Iy(e,r,n){return n=n===i?1:_e(n),Kt(Gs(e,r),n)}function oh(e,r){var n=we(e)?_r:gi;return n(e,ne(r,3))}function ah(e,r){var n=we(e)?Bf:iu;return n(e,ne(r,3))}var xy=js(function(e,r,n){ze.call(e,n)?e[n].push(r):Qr(e,n,[r])});function Sy(e,r,n,c){e=or(e)?e:ln(e),n=n&&!c?_e(n):0;var l=e.length;return n<0&&(n=jt(l+n,0)),Zs(e)?n<=l&&e.indexOf(r,n)>-1:!!l&&Zi(e,r,n)>-1}var Py=xe(function(e,r,n){var c=-1,l=typeof r=="function",d=or(e)?T(e.length):[];return gi(e,function(w){d[++c]=l?Ut(r,w,n):Tn(w,r,n)}),d}),Ay=js(function(e,r,n){Qr(e,n,r)});function Gs(e,r){var n=we(e)?st:hu;return n(e,ne(r,3))}function Cy(e,r,n,c){return e==null?[]:(we(r)||(r=r==null?[]:[r]),n=c?i:n,we(n)||(n=n==null?[]:[n]),du(e,r,n))}var Oy=js(function(e,r,n){e[n?0:1].push(r)},function(){return[[],[]]});function Ry(e,r,n){var c=we(e)?Ko:jc,l=arguments.length<3;return c(e,ne(r,4),n,l,gi)}function Ty(e,r,n){var c=we(e)?Hf:jc,l=arguments.length<3;return c(e,ne(r,4),n,l,iu)}function Ny(e,r){var n=we(e)?li:nu;return n(e,Ys(ne(r,3)))}function Dy(e){var r=we(e)?Qc:Sd;return r(e)}function Ly(e,r,n){(n?Qt(e,r,n):r===i)?r=1:r=_e(r);var c=we(e)?rd:Pd;return c(e,r)}function Fy(e){var r=we(e)?id:Cd;return r(e)}function $y(e){if(e==null)return 0;if(or(e))return Zs(e)?en(e):e.length;var r=Wt(e);return r==be||r==$e?e.size:ha(e).length}function My(e,r,n){var c=we(e)?Vo:Od;return n&&Qt(e,r,n)&&(r=i),c(e,ne(r,3))}var jy=xe(function(e,r){if(e==null)return[];var n=r.length;return n>1&&Qt(e,r[0],r[1])?r=[]:n>2&&Qt(r[0],r[1],r[2])&&(r=[r[0]]),du(e,Kt(r,1),[])}),Ws=mp||function(){return Ce.Date.now()};function zy(e,r){if(typeof r!="function")throw new br(p);return e=_e(e),function(){if(--e<1)return r.apply(this,arguments)}}function ch(e,r,n){return r=n?i:r,r=e&&r==null?e.length:r,ei(e,q,i,i,i,i,r)}function uh(e,r){var n;if(typeof r!="function")throw new br(p);return e=_e(e),function(){return--e>0&&(n=r.apply(this,arguments)),e<=1&&(r=i),n}}var La=xe(function(e,r,n){var c=re;if(n.length){var l=pi(n,un(La));c|=de}return ei(e,c,r,n,l)}),hh=xe(function(e,r,n){var c=re|he;if(n.length){var l=pi(n,un(hh));c|=de}return ei(r,c,e,n,l)});function lh(e,r,n){r=n?i:r;var c=ei(e,fe,i,i,i,i,i,r);return c.placeholder=lh.placeholder,c}function fh(e,r,n){r=n?i:r;var c=ei(e,pe,i,i,i,i,i,r);return c.placeholder=fh.placeholder,c}function ph(e,r,n){var c,l,d,w,b,A,M=0,j=!1,H=!1,J=!0;if(typeof e!="function")throw new br(p);r=Pr(r)||0,ut(n)&&(j=!!n.leading,H="maxWait"in n,d=H?jt(Pr(n.maxWait)||0,r):d,J="trailing"in n?!!n.trailing:J);function te(It){var Fr=c,si=l;return c=l=i,M=It,w=e.apply(si,Fr),w}function oe(It){return M=It,b=$n(Se,r),j?te(It):w}function Ee(It){var Fr=It-A,si=It-M,Nh=r-Fr;return H?Gt(Nh,d-si):Nh}function ae(It){var Fr=It-A,si=It-M;return A===i||Fr>=r||Fr<0||H&&si>=d}function Se(){var It=Ws();if(ae(It))return Oe(It);b=$n(Se,Ee(It))}function Oe(It){return b=i,J&&c?te(It):(c=l=i,w)}function gr(){b!==i&&Iu(b),M=0,c=A=l=b=i}function er(){return b===i?w:Oe(Ws())}function yr(){var It=Ws(),Fr=ae(It);if(c=arguments,l=this,A=It,Fr){if(b===i)return oe(A);if(H)return Iu(b),b=$n(Se,r),te(A)}return b===i&&(b=$n(Se,r)),w}return yr.cancel=gr,yr.flush=er,yr}var Uy=xe(function(e,r){return ru(e,1,r)}),qy=xe(function(e,r,n){return ru(e,Pr(r)||0,n)});function By(e){return ei(e,ve)}function Js(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new br(p);var n=function(){var c=arguments,l=r?r.apply(this,c):c[0],d=n.cache;if(d.has(l))return d.get(l);var w=e.apply(this,c);return n.cache=d.set(l,w)||d,w};return n.cache=new(Js.Cache||Zr),n}Js.Cache=Zr;function Ys(e){if(typeof e!="function")throw new br(p);return function(){var r=arguments;switch(r.length){case 0:return!e.call(this);case 1:return!e.call(this,r[0]);case 2:return!e.call(this,r[0],r[1]);case 3:return!e.call(this,r[0],r[1],r[2])}return!e.apply(this,r)}}function Hy(e){return uh(2,e)}var ky=Rd(function(e,r){r=r.length==1&&we(r[0])?st(r[0],fr(ne())):st(Kt(r,1),fr(ne()));var n=r.length;return xe(function(c){for(var l=-1,d=Gt(c.length,n);++l=r}),ji=au(function(){return arguments}())?au:function(e){return vt(e)&&ze.call(e,"callee")&&!Gc.call(e,"callee")},we=T.isArray,sv=Xt?fr(Xt):pd;function or(e){return e!=null&&Xs(e.length)&&!ii(e)}function Et(e){return vt(e)&&or(e)}function ov(e){return e===!0||e===!1||vt(e)&&Zt(e)==N}var wi=_p||Va,av=Tr?fr(Tr):dd;function cv(e){return vt(e)&&e.nodeType===1&&!Mn(e)}function uv(e){if(e==null)return!0;if(or(e)&&(we(e)||typeof e=="string"||typeof e.splice=="function"||wi(e)||hn(e)||ji(e)))return!e.length;var r=Wt(e);if(r==be||r==$e)return!e.size;if(Fn(e))return!ha(e).length;for(var n in e)if(ze.call(e,n))return!1;return!0}function hv(e,r){return Nn(e,r)}function lv(e,r,n){n=typeof n=="function"?n:i;var c=n?n(e,r):i;return c===i?Nn(e,r,i,n):!!c}function $a(e){if(!vt(e))return!1;var r=Zt(e);return r==E||r==u||typeof e.message=="string"&&typeof e.name=="string"&&!Mn(e)}function fv(e){return typeof e=="number"&&Jc(e)}function ii(e){if(!ut(e))return!1;var r=Zt(e);return r==ee||r==ge||r==D||r==wt}function gh(e){return typeof e=="number"&&e==_e(e)}function Xs(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=V}function ut(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}function vt(e){return e!=null&&typeof e=="object"}var yh=wr?fr(wr):yd;function pv(e,r){return e===r||ua(e,r,Pa(r))}function dv(e,r,n){return n=typeof n=="function"?n:i,ua(e,r,Pa(r),n)}function gv(e){return vh(e)&&e!=+e}function yv(e){if(Qd(e))throw new ye(h);return cu(e)}function vv(e){return e===null}function mv(e){return e==null}function vh(e){return typeof e=="number"||vt(e)&&Zt(e)==Ne}function Mn(e){if(!vt(e)||Zt(e)!=Pe)return!1;var r=xs(e);if(r===null)return!0;var n=ze.call(r,"constructor")&&r.constructor;return typeof n=="function"&&n instanceof n&&_s.call(n)==dp}var Ma=Br?fr(Br):vd;function wv(e){return gh(e)&&e>=-V&&e<=V}var mh=En?fr(En):md;function Zs(e){return typeof e=="string"||!we(e)&&vt(e)&&Zt(e)==Ze}function dr(e){return typeof e=="symbol"||vt(e)&&Zt(e)==Qe}var hn=Ri?fr(Ri):wd;function _v(e){return e===i}function bv(e){return vt(e)&&Wt(e)==qe}function Ev(e){return vt(e)&&Zt(e)==et}var Iv=Bs(la),xv=Bs(function(e,r){return e<=r});function wh(e){if(!e)return[];if(or(e))return Zs(e)?Nr(e):sr(e);if(xn&&e[xn])return rp(e[xn]());var r=Wt(e),n=r==be?Zo:r==$e?vs:ln;return n(e)}function ni(e){if(!e)return e===0?e:0;if(e=Pr(e),e===ce||e===-ce){var r=e<0?-1:1;return r*B}return e===e?e:0}function _e(e){var r=ni(e),n=r%1;return r===r?n?r-n:r:0}function _h(e){return e?Li(_e(e),0,G):0}function Pr(e){if(typeof e=="number")return e;if(dr(e))return k;if(ut(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=ut(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=zc(e);var n=Ao.test(e);return n||Oo.test(e)?me(e.slice(2),n?2:8):Po.test(e)?k:+e}function bh(e){return kr(e,ar(e))}function Sv(e){return e?Li(_e(e),-V,V):e===0?e:0}function Me(e){return e==null?"":pr(e)}var Pv=an(function(e,r){if(Fn(r)||or(r)){kr(r,qt(r),e);return}for(var n in r)ze.call(r,n)&&On(e,n,r[n])}),Eh=an(function(e,r){kr(r,ar(r),e)}),Qs=an(function(e,r,n,c){kr(r,ar(r),e,c)}),Av=an(function(e,r,n,c){kr(r,qt(r),e,c)}),Cv=ti(na);function Ov(e,r){var n=on(e);return r==null?n:eu(n,r)}var Rv=xe(function(e,r){e=Je(e);var n=-1,c=r.length,l=c>2?r[2]:i;for(l&&Qt(r[0],r[1],l)&&(c=1);++n1),d}),kr(e,xa(e),n),c&&(n=Ir(n,O|L|z,qd));for(var l=r.length;l--;)ya(n,r[l]);return n});function Wv(e,r){return xh(e,Ys(ne(r)))}var Jv=ti(function(e,r){return e==null?{}:Ed(e,r)});function xh(e,r){if(e==null)return{};var n=st(xa(e),function(c){return[c]});return r=ne(r),gu(e,n,function(c,l){return r(c,l[0])})}function Yv(e,r,n){r=vi(r,e);var c=-1,l=r.length;for(l||(l=1,e=i);++cr){var c=e;e=r,r=c}if(n||e%1||r%1){var l=Yc();return Gt(e+l*(r-e+Ge("1e-"+((l+"").length-1))),r)}return pa(e,r)}var a0=cn(function(e,r,n){return r=r.toLowerCase(),e+(n?Ah(r):r)});function Ah(e){return Ua(Me(e).toLowerCase())}function Ch(e){return e=Me(e),e&&e.replace(Jr,Xf).replace(Bo,"")}function c0(e,r,n){e=Me(e),r=pr(r);var c=e.length;n=n===i?c:Li(_e(n),0,c);var l=n;return n-=r.length,n>=0&&e.slice(n,l)==r}function u0(e){return e=Me(e),e&&it.test(e)?e.replace(Si,Zf):e}function h0(e){return e=Me(e),e&&Rt.test(e)?e.replace(dt,"\\$&"):e}var l0=cn(function(e,r,n){return e+(n?"-":"")+r.toLowerCase()}),f0=cn(function(e,r,n){return e+(n?" ":"")+r.toLowerCase()}),p0=Tu("toLowerCase");function d0(e,r,n){e=Me(e),r=_e(r);var c=r?en(e):0;if(!r||c>=r)return e;var l=(r-c)/2;return qs(Cs(l),n)+e+qs(As(l),n)}function g0(e,r,n){e=Me(e),r=_e(r);var c=r?en(e):0;return r&&c>>0,n?(e=Me(e),e&&(typeof r=="string"||r!=null&&!Ma(r))&&(r=pr(r),!r&&Qi(e))?mi(Nr(e),0,n):e.split(r,n)):[]}var E0=cn(function(e,r,n){return e+(n?" ":"")+Ua(r)});function I0(e,r,n){return e=Me(e),n=n==null?0:Li(_e(n),0,e.length),r=pr(r),e.slice(n,n+r.length)==r}function x0(e,r,n){var c=f.templateSettings;n&&Qt(e,r,n)&&(r=i),e=Me(e),r=Qs({},r,c,ju);var l=Qs({},r.imports,c.imports,ju),d=qt(l),w=Xo(l,d),b,A,M=0,j=r.interpolate||Ki,H="__p += '",J=Qo((r.escape||Ki).source+"|"+j.source+"|"+(j===ct?So:Ki).source+"|"+(r.evaluate||Ki).source+"|$","g"),te="//# sourceURL="+(ze.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ho+"]")+` +`;e.replace(J,function(ae,Se,Oe,gr,er,yr){return Oe||(Oe=gr),H+=e.slice(M,yr).replace(To,Qf),Se&&(b=!0,H+=`' + +__e(`+Se+`) + +'`),er&&(A=!0,H+=`'; +`+er+`; +__p += '`),Oe&&(H+=`' + +((__t = (`+Oe+`)) == null ? '' : __t) + +'`),M=yr+ae.length,ae}),H+=`'; +`;var oe=ze.call(r,"variable")&&r.variable;if(!oe)H=`with (obj) { +`+H+` +} +`;else if(Io.test(oe))throw new ye(g);H=(A?H.replace(Ur,""):H).replace(Yt,"$1").replace(Wr,"$1;"),H="function("+(oe||"obj")+`) { +`+(oe?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(b?", __e = _.escape":"")+(A?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+H+`return __p +}`;var Ee=Rh(function(){return Fe(d,te+"return "+H).apply(i,w)});if(Ee.source=H,$a(Ee))throw Ee;return Ee}function S0(e){return Me(e).toLowerCase()}function P0(e){return Me(e).toUpperCase()}function A0(e,r,n){if(e=Me(e),e&&(n||r===i))return zc(e);if(!e||!(r=pr(r)))return e;var c=Nr(e),l=Nr(r),d=Uc(c,l),w=qc(c,l)+1;return mi(c,d,w).join("")}function C0(e,r,n){if(e=Me(e),e&&(n||r===i))return e.slice(0,Hc(e)+1);if(!e||!(r=pr(r)))return e;var c=Nr(e),l=qc(c,Nr(r))+1;return mi(c,0,l).join("")}function O0(e,r,n){if(e=Me(e),e&&(n||r===i))return e.replace(gt,"");if(!e||!(r=pr(r)))return e;var c=Nr(e),l=Uc(c,Nr(r));return mi(c,l).join("")}function R0(e,r){var n=ie,c=ue;if(ut(r)){var l="separator"in r?r.separator:l;n="length"in r?_e(r.length):n,c="omission"in r?pr(r.omission):c}e=Me(e);var d=e.length;if(Qi(e)){var w=Nr(e);d=w.length}if(n>=d)return e;var b=n-en(c);if(b<1)return c;var A=w?mi(w,0,b).join(""):e.slice(0,b);if(l===i)return A+c;if(w&&(b+=A.length-b),Ma(l)){if(e.slice(b).search(l)){var M,j=A;for(l.global||(l=Qo(l.source,Me(mr.exec(l))+"g")),l.lastIndex=0;M=l.exec(j);)var H=M.index;A=A.slice(0,H===i?b:H)}}else if(e.indexOf(pr(l),b)!=b){var J=A.lastIndexOf(l);J>-1&&(A=A.slice(0,J))}return A+c}function T0(e){return e=Me(e),e&<.test(e)?e.replace(ui,op):e}var N0=cn(function(e,r,n){return e+(n?" ":"")+r.toUpperCase()}),Ua=Tu("toUpperCase");function Oh(e,r,n){return e=Me(e),r=n?i:r,r===i?tp(e)?up(e):Vf(e):e.match(r)||[]}var Rh=xe(function(e,r){try{return Ut(e,i,r)}catch(n){return $a(n)?n:new ye(n)}}),D0=ti(function(e,r){return _r(r,function(n){n=Kr(n),Qr(e,n,La(e[n],e))}),e});function L0(e){var r=e==null?0:e.length,n=ne();return e=r?st(e,function(c){if(typeof c[1]!="function")throw new br(p);return[n(c[0]),c[1]]}):[],xe(function(c){for(var l=-1;++lV)return[];var n=G,c=Gt(e,G);r=ne(r),e-=G;for(var l=Yo(c,r);++n0||r<0)?new Ae(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),r!==i&&(r=_e(r),n=r<0?n.dropRight(-r):n.take(r-e)),n)},Ae.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ae.prototype.toArray=function(){return this.take(G)},Hr(Ae.prototype,function(e,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),c=/^(?:head|last)$/.test(r),l=f[c?"take"+(r=="last"?"Right":""):r],d=c||/^find/.test(r);l&&(f.prototype[r]=function(){var w=this.__wrapped__,b=c?[1]:arguments,A=w instanceof Ae,M=b[0],j=A||we(w),H=function(Se){var Oe=l.apply(f,fi([Se],b));return c&&J?Oe[0]:Oe};j&&n&&typeof M=="function"&&M.length!=1&&(A=j=!1);var J=this.__chain__,te=!!this.__actions__.length,oe=d&&!J,Ee=A&&!te;if(!d&&j){w=Ee?w:new Ae(this);var ae=e.apply(w,b);return ae.__actions__.push({func:Vs,args:[H],thisArg:i}),new Er(ae,J)}return oe&&Ee?e.apply(this,b):(ae=this.thru(H),oe?c?ae.value()[0]:ae.value():ae)})}),_r(["pop","push","shift","sort","splice","unshift"],function(e){var r=ms[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(c&&!this.__chain__){var d=this.value();return r.apply(we(d)?d:[],l)}return this[n](function(w){return r.apply(we(w)?w:[],l)})}}),Hr(Ae.prototype,function(e,r){var n=f[r];if(n){var c=n.name+"";ze.call(sn,c)||(sn[c]=[]),sn[c].push({name:r,func:n})}}),sn[zs(i,he).name]=[{name:"wrapper",func:i}],Ae.prototype.clone=Tp,Ae.prototype.reverse=Np,Ae.prototype.value=Dp,f.prototype.at=cy,f.prototype.chain=uy,f.prototype.commit=hy,f.prototype.next=ly,f.prototype.plant=py,f.prototype.reverse=dy,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=gy,f.prototype.first=f.prototype.head,xn&&(f.prototype[xn]=fy),f},tn=hp();bt?((bt.exports=tn)._=tn,We._=tn):Ce._=tn}).call(kn)})(yc,yc.exports);var jE=Object.defineProperty,zE=Object.defineProperties,UE=Object.getOwnPropertyDescriptors,Dl=Object.getOwnPropertySymbols,qE=Object.prototype.hasOwnProperty,BE=Object.prototype.propertyIsEnumerable,Ll=(a,t,i)=>t in a?jE(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,io=(a,t)=>{for(var i in t||(t={}))qE.call(t,i)&&Ll(a,i,t[i]);if(Dl)for(var i of Dl(t))BE.call(t,i)&&Ll(a,i,t[i]);return a},HE=(a,t)=>zE(a,UE(t));function Or(a,t,i){let s;const o=vc(a);return t.rpcMap&&(s=t.rpcMap[o]),s||(s=`${ME}?chainId=eip155:${o}&projectId=${i}`),s}function vc(a){return a.includes("eip155")?Number(a.split(":")[1]):Number(a)}function zf(a){return a.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}function kE(a,t){const i=Object.keys(t.namespaces).filter(o=>o.includes(a));if(!i.length)return[];const s=[];return i.forEach(o=>{const h=t.namespaces[o].accounts;s.push(...h)}),s}function KE(a={},t={}){const i=Fl(a),s=Fl(t);return yc.exports.merge(i,s)}function Fl(a){var t,i,s,o;const h={};if(!oo(a))return h;for(const[p,g]of Object.entries(a)){const _=Wl(p)?[p]:g.chains,m=g.methods||[],x=g.events||[],O=g.rpcMap||{},L=ao(p);h[L]=HE(io(io({},h[L]),g),{chains:Wa(_,(t=h[L])==null?void 0:t.chains),methods:Wa(m,(i=h[L])==null?void 0:i.methods),events:Wa(x,(s=h[L])==null?void 0:s.events),rpcMap:io(io({},O),(o=h[L])==null?void 0:o.rpcMap)})}return h}function VE(a){return a.includes(":")?a.split(":")[2]:a}function GE(a){const t={};for(const[i,s]of Object.entries(a)){const o=s.methods||[],h=s.events||[],p=s.accounts||[],g=Wl(i)?[i]:s.chains?s.chains:zf(s.accounts);t[i]={chains:g,methods:o,events:h,accounts:p}}return t}const Uf={},xt=a=>Uf[a],ac=(a,t)=>{Uf[a]=t};class WE{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,i){if(this.chainId=t,!this.httpProviders[t]){const s=i||Or(`${this.name}:${t}`,this.namespace);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{var s;t[i]=this.createHttpProvider(i,(s=this.namespace.rpcMap)==null?void 0:s[i])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProvider(t,i){const s=i||Or(t,this.namespace);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}}class JE{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,i){const s=vc(t);if(!this.httpProviders[s]){const o=i||Or(`${this.name}:${s}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${s}`);this.setHttpProvider(s,o)}this.chainId=s,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${s}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,i){const s=i||Or(`${this.name}:${t}`,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{var s;const o=vc(i);t[o]=this.createHttpProvider(o,(s=this.namespace.rpcMap)==null?void 0:s[i])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}async handleSwitchChain(t){var i,s;let o=t.request.params?(i=t.request.params[0])==null?void 0:i.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const h=parseInt(o,16);if(this.isChainApproved(h))this.setDefaultChain(`${h}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:o}]},chainId:(s=this.namespace.chains)==null?void 0:s[0]}),this.setDefaultChain(`${h}`);else throw new Error(`Failed to switch to chain 'eip155:${h}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(t){return this.namespace.chains.includes(`${this.name}:${t}`)}}class YE{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,i){if(!this.httpProviders[t]){const s=i||Or(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{var s;t[i]=this.createHttpProvider(i,(s=this.namespace.rpcMap)==null?void 0:s[i])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProvider(t,i){const s=i||Or(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}}class XE{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,i){if(this.chainId=t,!this.httpProviders[t]){const s=i||Or(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{var s;t[i]=this.createHttpProvider(i,(s=this.namespace.rpcMap)==null?void 0:s[i])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProvider(t,i){const s=i||Or(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}}class ZE{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,i){if(this.chainId=t,!this.httpProviders[t]){const s=i||this.getCardanoRPCUrl(t);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{const s=this.getCardanoRPCUrl(i);t[i]=this.createHttpProvider(i,s)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}getCardanoRPCUrl(t){const i=this.namespace.rpcMap;if(i)return i[t]}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProvider(t,i){const s=i||this.getCardanoRPCUrl(t);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}}class QE{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,i){if(!this.httpProviders[t]){const s=i||Or(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{var s;t[i]=this.createHttpProvider(i,(s=this.namespace.rpcMap)==null?void 0:s[i])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProvider(t,i){const s=i||Or(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}}class eI{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=xt("events"),this.client=xt("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,i){if(!this.httpProviders[t]){const s=i||Or(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!s)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,s)}this.chainId=t,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(i=>{var s;t[i]=this.createHttpProvider(i,(s=this.namespace.rpcMap)==null?void 0:s[i])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,i=this.httpProviders[t];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return i}setHttpProvider(t,i){const s=this.createHttpProvider(t,i);s&&(this.httpProviders[t]=s)}createHttpProvider(t,i){const s=i||Or(t,this.namespace,this.client.core.projectId);return typeof s>"u"?void 0:new Ii(new ki(s,xt("disableProviderPing")))}}var tI=Object.defineProperty,rI=Object.defineProperties,iI=Object.getOwnPropertyDescriptors,$l=Object.getOwnPropertySymbols,nI=Object.prototype.hasOwnProperty,sI=Object.prototype.propertyIsEnumerable,Ml=(a,t,i)=>t in a?tI(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,no=(a,t)=>{for(var i in t||(t={}))nI.call(t,i)&&Ml(a,i,t[i]);if($l)for(var i of $l(t))sI.call(t,i)&&Ml(a,i,t[i]);return a},cc=(a,t)=>rI(a,iI(t));class Nc{constructor(t){this.events=new Ic,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(t==null?void 0:t.logger)<"u"&&typeof(t==null?void 0:t.logger)!="string"?t.logger:Re.pino(Re.getDefaultLoggerOptions({level:(t==null?void 0:t.logger)||Tl})),this.disableProviderPing=(t==null?void 0:t.disableProviderPing)||!1}static async init(t){const i=new Nc(t);return await i.initialize(),i}async request(t,i){const[s,o]=this.validateChain(i);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(s).request({request:no({},t),chainId:`${s}:${o}`,topic:this.session.topic})}sendAsync(t,i,s){this.request(t,s).then(o=>i(null,o)).catch(o=>i(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(t=this.session)==null?void 0:t.topic,reason:rr("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,i){this.events.on(t,i)}once(t,i){this.events.once(t,i)}removeListener(t,i){this.events.removeListener(t,i)}off(t,i){this.events.off(t,i)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:s,approval:o}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});s&&(this.uri=s,this.events.emit("display_uri",s)),await o().then(h=>{this.session=h,this.namespaces||(this.namespaces=GE(h.namespaces),this.persist("namespaces",this.namespaces))}).catch(h=>{if(h.message!==Mf)throw h;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,i){try{if(!this.session)return;const[s,o]=this.validateChain(t);this.getProvider(s).setDefaultChain(o,i)}catch(s){if(!/Please call connect/.test(s.message))throw s}}async cleanupPendingPairings(t={}){this.logger.info("Cleaning up inactive pairings...");const i=this.client.pairing.getAll();if(yn(i)){for(const s of i)t.deletePairings?this.client.core.expirer.set(s.topic,0):await this.client.core.relayer.subscriber.unsubscribe(s.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await RE.init({logger:this.providerOpts.logger||Tl,relayUrl:this.providerOpts.relayUrl||LE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const t=[...new Set(Object.keys(this.session.namespaces).map(i=>ao(i)))];ac("client",this.client),ac("events",this.events),ac("disableProviderPing",this.disableProviderPing),t.forEach(i=>{if(!this.session)return;const s=kE(i,this.session),o=zf(s),h=KE(this.namespaces,this.optionalNamespaces),p=cc(no({},h[i]),{accounts:s,chains:o});switch(i){case"eip155":this.rpcProviders[i]=new JE({namespace:p});break;case"solana":this.rpcProviders[i]=new YE({namespace:p});break;case"cosmos":this.rpcProviders[i]=new XE({namespace:p});break;case"polkadot":this.rpcProviders[i]=new WE({namespace:p});break;case"cip34":this.rpcProviders[i]=new ZE({namespace:p});break;case"elrond":this.rpcProviders[i]=new QE({namespace:p});break;case"multiversx":this.rpcProviders[i]=new eI({namespace:p});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",t=>{this.events.emit("session_ping",t)}),this.client.on("session_event",t=>{const{params:i}=t,{event:s}=i;if(s.name==="accountsChanged"){const o=s.data;o&&yn(o)&&this.events.emit("accountsChanged",o.map(VE))}else s.name==="chainChanged"?this.onChainChanged(i.chainId):this.events.emit(s.name,s.data);this.events.emit("session_event",t)}),this.client.on("session_update",({topic:t,params:i})=>{var s;const{namespaces:o}=i,h=(s=this.client)==null?void 0:s.session.get(t);this.session=cc(no({},h),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:t,params:i})}),this.client.on("session_delete",async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",cc(no({},rr("USER_DISCONNECTED")),{data:t.topic}))}),this.on(xi.DEFAULT_CHAIN_CHANGED,t=>{this.onChainChanged(t,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var i;this.getProvider(t).updateNamespace((i=this.session)==null?void 0:i.namespaces[t])})}setNamespaces(t){const{namespaces:i,optionalNamespaces:s,sessionProperties:o}=t;i&&Object.keys(i).length&&(this.namespaces=i),s&&Object.keys(s).length&&(this.optionalNamespaces=s),this.sessionProperties=o,this.persist("namespaces",i),this.persist("optionalNamespaces",s)}validateChain(t){const[i,s]=(t==null?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,s];if(i&&!Object.keys(this.namespaces||{}).map(p=>ao(p)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&s)return[i,s];const o=ao(Object.keys(this.namespaces)[0]),h=this.rpcProviders[o].getDefaultChain();return[o,h]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t,i=!1){var s;if(!this.namespaces)return;const[o,h]=this.validateChain(t);i||this.getProvider(o).setDefaultChain(h),((s=this.namespaces[o])!=null?s:this.namespaces[`${o}:${h}`]).defaultChain=h,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",h)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(t,i){this.client.core.storage.setItem(`${Nl}/${t}`,i)}async getFromStore(t){return await this.client.core.storage.getItem(`${Nl}/${t}`)}}const oI=Nc,aI="wc",cI="ethereum_provider",uI=`${aI}@2:${cI}:`,hI="https://rpc.walletconnect.com/v1/",mc=["eth_sendTransaction","personal_sign"],lI=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],wc=["chainChanged","accountsChanged"],fI=["message","disconnect","connect"];var pI=Object.defineProperty,dI=Object.defineProperties,gI=Object.getOwnPropertyDescriptors,jl=Object.getOwnPropertySymbols,yI=Object.prototype.hasOwnProperty,vI=Object.prototype.propertyIsEnumerable,zl=(a,t,i)=>t in a?pI(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,Kn=(a,t)=>{for(var i in t||(t={}))yI.call(t,i)&&zl(a,i,t[i]);if(jl)for(var i of jl(t))vI.call(t,i)&&zl(a,i,t[i]);return a},Ul=(a,t)=>dI(a,gI(t));function go(a){return Number(a[0].split(":")[1])}function uc(a){return`0x${a.toString(16)}`}function mI(a){const{chains:t,optionalChains:i,methods:s,optionalMethods:o,events:h,optionalEvents:p,rpcMap:g}=a;if(!yn(t))throw new Error("Invalid chains");const _={chains:t,methods:s||mc,events:h||wc,rpcMap:Kn({},t.length?{[go(t)]:g[go(t)]}:{})},m=h==null?void 0:h.filter(z=>!wc.includes(z)),x=s==null?void 0:s.filter(z=>!mc.includes(z));if(!i&&!p&&!o&&!(m!=null&&m.length)&&!(x!=null&&x.length))return{required:t.length?_:void 0};const O=(m==null?void 0:m.length)&&(x==null?void 0:x.length)||!i,L={chains:[...new Set(O?_.chains.concat(i||[]):i)],methods:[...new Set(_.methods.concat(o!=null&&o.length?o:lI))],events:[...new Set(_.events.concat(p||fI))],rpcMap:g};return{required:t.length?_:void 0,optional:i.length?L:void 0}}class Dc{constructor(){this.events=new vr.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=uI,this.on=(t,i)=>(this.events.on(t,i),this),this.once=(t,i)=>(this.events.once(t,i),this),this.removeListener=(t,i)=>(this.events.removeListener(t,i),this),this.off=(t,i)=>(this.events.off(t,i),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const i=new Dc;return await i.initialize(t),i}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,i){this.signer.sendAsync(t,i,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:i,optional:s}=mI(this.rpc);try{const o=await new Promise(async(p,g)=>{var _;this.rpc.showQrModal&&((_=this.modal)==null||_.subscribeModal(m=>{!m.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),g(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(Ul(Kn({namespaces:Kn({},i&&{[this.namespace]:i})},s&&{optionalNamespaces:{[this.namespace]:s}}),{pairingTopic:t==null?void 0:t.pairingTopic})).then(m=>{p(m)}).catch(m=>{g(new Error(m.message))})});if(!o)return;this.setChainIds(this.rpc.chains);const h=r1(o.namespaces,[this.namespace]);this.setAccounts(h),this.events.emit("connect",{chainId:uc(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",t=>{const{params:i}=t,{event:s}=i;s.name==="accountsChanged"?(this.accounts=this.parseAccounts(s.data),this.events.emit("accountsChanged",this.accounts)):s.name==="chainChanged"?this.setChainId(this.formatChainId(s.data)):this.events.emit(s.name,s.data),this.events.emit("session_event",t)}),this.signer.on("chainChanged",t=>{const i=parseInt(t);this.chainId=i,this.events.emit("chainChanged",uc(this.chainId)),this.persist()}),this.signer.on("session_update",t=>{this.events.emit("session_update",t)}),this.signer.on("session_delete",t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",Ul(Kn({},rr("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",t=>{var i,s;this.rpc.showQrModal&&((i=this.modal)==null||i.closeModal(),(s=this.modal)==null||s.openModal({uri:t})),this.events.emit("display_uri",t)})}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return typeof t=="string"?t.startsWith(`${this.namespace}:`):!1}formatChainId(t){return`${this.namespace}:${t}`}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const i=t.filter(s=>this.isCompatibleChainId(s)).map(s=>this.parseChainId(s));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",uc(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const i=this.parseChainId(t);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(t){const[i,s,o]=t.split(":");return{chainId:`${i}:${s}`,address:o}}setAccounts(t){this.accounts=t.filter(i=>this.parseChainId(this.parseAccountId(i).chainId)===this.chainId).map(i=>this.parseAccountId(i).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var i,s;const o=(i=t==null?void 0:t.chains)!=null?i:[],h=(s=t==null?void 0:t.optionalChains)!=null?s:[],p=o.concat(h);if(!p.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const g=o.length?(t==null?void 0:t.methods)||mc:[],_=o.length?(t==null?void 0:t.events)||wc:[],m=(t==null?void 0:t.optionalMethods)||[],x=(t==null?void 0:t.optionalEvents)||[],O=(t==null?void 0:t.rpcMap)||this.buildRpcMap(p,t.projectId),L=(t==null?void 0:t.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(z=>this.formatChainId(z)),optionalChains:h.map(z=>this.formatChainId(z)),methods:g,events:_,optionalMethods:m,optionalEvents:x,rpcMap:O,showQrModal:!!(t!=null&&t.showQrModal),qrModalOptions:L,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,i){const s={};return t.forEach(o=>{s[o]=this.getRpcUrl(o,i)}),s}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?go(this.rpc.chains):go(this.rpc.optionalChains),this.signer=await oI.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let i;try{const{WalletConnectModal:s}=await i1(()=>import("./index-92afd94f.js").then(o=>o.a),["./index-92afd94f.js","./index-f07e9ad7.js","./index-f4824932.css"],import.meta.url);i=s}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(i)try{this.modal=new i(Kn({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(s){throw this.signer.logger.error(s),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:i,optionalChains:s,rpcMap:o}=t;i&&yn(i)&&(this.rpc.chains=i.map(h=>this.formatChainId(h)),i.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)})),s&&yn(s)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=s==null?void 0:s.map(h=>this.formatChainId(h)),s.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)}))}getRpcUrl(t,i){var s;return((s=this.rpc.rpcMap)==null?void 0:s[t])||`${hI}?chainId=eip155:${t}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${t}`]?this.session.namespaces[`${this.namespace}:${t}`]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:i==null?void 0:i.accounts),this.setAccounts(i==null?void 0:i.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(t){return typeof t=="string"||t instanceof String?[this.parseAccount(t)]:t.map(i=>this.parseAccount(i))}}const TI=Dc;export{TI as EthereumProvider,fI as OPTIONAL_EVENTS,lI as OPTIONAL_METHODS,wc as REQUIRED_EVENTS,mc as REQUIRED_METHODS,Dc as default}; diff --git a/assets/index.es-813a7190.js b/assets/index.es-813a7190.js deleted file mode 100644 index b4ed99b6..00000000 --- a/assets/index.es-813a7190.js +++ /dev/null @@ -1,27 +0,0 @@ -import{g as gc,c as ur,r as bi,a as d1,b as ne,d as g1,w as Ml,e as Ul,f as vc,t as lo,h as v1,I as _i,A as y1,U as m1,i as Q,j as _1,k as oc,l as w1,_ as b1,P as E1,V as Oh,m as x1,D as I1,C as S1,Z as Rh,$ as P1,n as A1,o as ao,q as C1,p as ql,s as Fr,y as O1,u as R1,X as cs,v as Ft,x as tr,z as mi,B as cr,E as T1,F as us,G as zl,H as N1,J as L1,K as D1,L as kl,M as F1,N as Hl,Y as Bl,O as ls,Q as ac,R as io,S as ps,T as $1,W as so,a0 as j1,a1 as M1,a2 as U1,a3 as q1,a4 as z1,a5 as Ba,a6 as Th,a7 as k1,a8 as H1,a9 as B1,aa as Nh,ab as V1,ac as K1,ad as G1,ae as W1,af as J1,ag as Y1,ah as X1,ai as no,aj as Vl,ak as Va,al as Z1,am as Q1}from"./index-dddcbded.js";var yc={exports:{}},fs=typeof Reflect=="object"?Reflect:null,Lh=fs&&typeof fs.apply=="function"?fs.apply:function(r,i,n){return Function.prototype.apply.call(r,i,n)},oo;fs&&typeof fs.ownKeys=="function"?oo=fs.ownKeys:Object.getOwnPropertySymbols?oo=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:oo=function(r){return Object.getOwnPropertyNames(r)};function em(c){console&&console.warn&&console.warn(c)}var Kl=Number.isNaN||function(r){return r!==r};function He(){He.init.call(this)}yc.exports=He;yc.exports.once=sm;He.EventEmitter=He;He.prototype._events=void 0;He.prototype._eventsCount=0;He.prototype._maxListeners=void 0;var Dh=10;function fo(c){if(typeof c!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}Object.defineProperty(He,"defaultMaxListeners",{enumerable:!0,get:function(){return Dh},set:function(c){if(typeof c!="number"||c<0||Kl(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");Dh=c}});He.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};He.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||Kl(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this};function Gl(c){return c._maxListeners===void 0?He.defaultMaxListeners:c._maxListeners}He.prototype.getMaxListeners=function(){return Gl(this)};He.prototype.emit=function(r){for(var i=[],n=1;n0&&(d=i[0]),d instanceof Error)throw d;var y=new Error("Unhandled error."+(d?" ("+d.message+")":""));throw y.context=d,y}var w=h[r];if(w===void 0)return!1;if(typeof w=="function")Lh(w,this,i);else for(var A=w.length,F=Zl(w,A),n=0;n0&&d.length>o&&!d.warned){d.warned=!0;var y=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(r)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=c,y.type=r,y.count=d.length,em(y)}return c}He.prototype.addListener=function(r,i){return Wl(this,r,i,!1)};He.prototype.on=He.prototype.addListener;He.prototype.prependListener=function(r,i){return Wl(this,r,i,!0)};function tm(){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 Jl(c,r,i){var n={fired:!1,wrapFn:void 0,target:c,type:r,listener:i},o=tm.bind(n);return o.listener=i,n.wrapFn=o,o}He.prototype.once=function(r,i){return fo(i),this.on(r,Jl(this,r,i)),this};He.prototype.prependOnceListener=function(r,i){return fo(i),this.prependListener(r,Jl(this,r,i)),this};He.prototype.removeListener=function(r,i){var n,o,h,d,y;if(fo(i),o=this._events,o===void 0)return this;if(n=o[r],n===void 0)return this;if(n===i||n.listener===i)--this._eventsCount===0?this._events=Object.create(null):(delete o[r],o.removeListener&&this.emit("removeListener",r,n.listener||i));else if(typeof n!="function"){for(h=-1,d=n.length-1;d>=0;d--)if(n[d]===i||n[d].listener===i){y=n[d].listener,h=d;break}if(h<0)return this;h===0?n.shift():rm(n,h),n.length===1&&(o[r]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",r,y||i)}return this};He.prototype.off=He.prototype.removeListener;He.prototype.removeAllListeners=function(r){var i,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[r]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[r]),this;if(arguments.length===0){var h=Object.keys(n),d;for(o=0;o=0;o--)this.removeListener(r,i[o]);return this};function Yl(c,r,i){var n=c._events;if(n===void 0)return[];var o=n[r];return o===void 0?[]:typeof o=="function"?i?[o.listener||o]:[o]:i?im(o):Zl(o,o.length)}He.prototype.listeners=function(r){return Yl(this,r,!0)};He.prototype.rawListeners=function(r){return Yl(this,r,!1)};He.listenerCount=function(c,r){return typeof c.listenerCount=="function"?c.listenerCount(r):Xl.call(c,r)};He.prototype.listenerCount=Xl;function Xl(c){var r=this._events;if(r!==void 0){var i=r[c];if(typeof i=="function")return 1;if(i!==void 0)return i.length}return 0}He.prototype.eventNames=function(){return this._eventsCount>0?oo(this._events):[]};function Zl(c,r){for(var i=new Array(r),n=0;ntypeof i>"u"?null:i)}Gs.safeJsonStringify=am;var Ds={exports:{}},Fh;function cm(){return Fh||(Fh=1,function(){let c;function r(){}c=r,c.prototype.getItem=function(i){return this.hasOwnProperty(i)?String(this[i]):null},c.prototype.setItem=function(i,n){this[i]=String(n)},c.prototype.removeItem=function(i){delete this[i]},c.prototype.clear=function(){const i=this;Object.keys(i).forEach(function(n){i[n]=void 0,delete i[n]})},c.prototype.key=function(i){return i=i||0,Object.keys(this)[i]},c.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof ur<"u"&&ur.localStorage?Ds.exports=ur.localStorage:typeof window<"u"&&window.localStorage?Ds.exports=window.localStorage:Ds.exports=new r}()),Ds.exports}var Ka={},Fs={},$h;function um(){if($h)return Fs;$h=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.IKeyValueStorage=void 0;class c{}return Fs.IKeyValueStorage=c,Fs}var $s={},jh;function hm(){if(jh)return $s;jh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.parseEntry=void 0;const c=Gs;function r(i){var n;return[i[0],c.safeJsonParse((n=i[1])!==null&&n!==void 0?n:"")]}return $s.parseEntry=r,$s}var Mh;function lm(){return Mh||(Mh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(um(),c),r.__exportStar(hm(),c)}(Ka)),Ka}Object.defineProperty(po,"__esModule",{value:!0});po.KeyValueStorage=void 0;const hs=bi,Uh=Gs,fm=hs.__importDefault(cm()),pm=lm();class ef{constructor(){this.localStorage=fm.default}getKeys(){return hs.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return hs.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map(pm.parseEntry)})}getItem(r){return hs.__awaiter(this,void 0,void 0,function*(){const i=this.localStorage.getItem(r);if(i!==null)return Uh.safeJsonParse(i)})}setItem(r,i){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(r,Uh.safeJsonStringify(i))})}removeItem(r){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(r)})}}po.KeyValueStorage=ef;var dm=po.default=ef,ds={},js={},Ga={},Ms={};let qi=class{};const gm=Object.freeze(Object.defineProperty({__proto__:null,IEvents:qi},Symbol.toStringTag,{value:"Module"})),vm=d1(gm);var qh;function ym(){if(qh)return Ms;qh=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.IHeartBeat=void 0;const c=vm;class r extends c.IEvents{constructor(n){super()}}return Ms.IHeartBeat=r,Ms}var zh;function tf(){return zh||(zh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(ym(),c)}(Ga)),Ga}var Wa={},Mi={},kh;function mm(){if(kh)return Mi;kh=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.HEARTBEAT_EVENTS=Mi.HEARTBEAT_INTERVAL=void 0;const c=ne;return Mi.HEARTBEAT_INTERVAL=c.FIVE_SECONDS,Mi.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"},Mi}var Hh;function rf(){return Hh||(Hh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(mm(),c)}(Wa)),Wa}var Bh;function _m(){if(Bh)return js;Bh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.HeartBeat=void 0;const c=bi,r=vr,i=ne,n=tf(),o=rf();class h extends n.IHeartBeat{constructor(y){super(y),this.events=new r.EventEmitter,this.interval=o.HEARTBEAT_INTERVAL,this.interval=(y==null?void 0:y.interval)||o.HEARTBEAT_INTERVAL}static init(y){return c.__awaiter(this,void 0,void 0,function*(){const w=new h(y);return yield w.init(),w})}init(){return c.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(y,w){this.events.on(y,w)}once(y,w){this.events.once(y,w)}off(y,w){this.events.off(y,w)}removeListener(y,w){this.events.removeListener(y,w)}initialize(){return c.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),i.toMiliseconds(this.interval))})}pulse(){this.events.emit(o.HEARTBEAT_EVENTS.pulse)}}return js.HeartBeat=h,js}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(_m(),c),r.__exportStar(tf(),c),r.__exportStar(rf(),c)})(ds);var Re={},Ja,Vh;function wm(){if(Vh)return Ja;Vh=1;function c(i){try{return JSON.stringify(i)}catch{return'"[Circular]"'}}Ja=r;function r(i,n,o){var h=o&&o.stringify||c,d=1;if(typeof i=="object"&&i!==null){var y=n.length+d;if(y===1)return i;var w=new Array(y);w[0]=h(i);for(var A=1;A-1?G:0,i.charCodeAt(V+1)){case 100:case 102:if(J>=F||n[J]==null)break;G=F||n[J]==null)break;G=F||n[J]===void 0)break;G",G=V+2,V++;break}K+=h(n[J]),G=V+2,V++;break;case 115:if(J>=F)break;G-1&&(ue=!1);const Te=["error","fatal","warn","info","debug","trace"];typeof B=="function"&&(B.error=B.fatal=B.warn=B.info=B.debug=B.trace=B),T.enabled===!1&&(T.level="silent");const qe=T.level||"info",v=Object.create(B);v.log||(v.log=ie),Object.defineProperty(v,"levelVal",{get:X}),Object.defineProperty(v,"level",{get:ce,set:k});const E={transmit:M,serialize:re,asObject:T.browser.asObject,levels:Te,timestamp:G(T)};v.levels=o.levels,v.level=qe,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=ie,v.serializers=ve,v._serialize=re,v._stdErrSerialize=ue,v.child=U,M&&(v._logEvent=K());function X(){return this.level==="silent"?1/0:this.levels.values[this.level]}function ce(){return this._level}function k(z){if(z!=="silent"&&!this.levels.values[z])throw Error("unknown level "+z);this._level=z,h(E,v,"error","log"),h(E,v,"fatal","error"),h(E,v,"warn","error"),h(E,v,"info","log"),h(E,v,"debug","log"),h(E,v,"trace","log")}function U(z,H){if(!z)throw new Error("missing bindings for child Pino");H=H||{},re&&z.serializers&&(H.serializers=z.serializers);const Ye=H.serializers;if(re&&Ye){var Be=Object.assign({},ve,Ye),jr=T.browser.serialize===!0?Object.keys(Be):re;delete z.serializers,w([z],jr,Be,this._stdErrSerialize)}function xe(St){this._childLevel=(St._childLevel|0)+1,this.error=A(St,z,"error"),this.fatal=A(St,z,"fatal"),this.warn=A(St,z,"warn"),this.info=A(St,z,"info"),this.debug=A(St,z,"debug"),this.trace=A(St,z,"trace"),Be&&(this.serializers=Be,this._serialize=jr),M&&(this._logEvent=K([].concat(St._logEvent.bindings,z)))}return xe.prototype=this,new xe(this)}return v}o.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},o.stdSerializers=i,o.stdTimeFunctions=Object.assign({},{nullTime:Ee,epochTime:ge,unixTime:pe,isoTime:he});function h(T,M,B,ve){const re=Object.getPrototypeOf(M);M[B]=M.levelVal>M.levels.values[B]?ie:re[B]?re[B]:r[B]||r[ve]||ie,d(T,M,B)}function d(T,M,B){!T.transmit&&M[B]===ie||(M[B]=function(ve){return function(){const ue=T.timestamp(),Te=new Array(arguments.length),qe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===r?r:this;for(var v=0;v-1&&ue in B&&(T[re][ue]=B[ue](T[re][ue]))}function A(T,M,B){return function(){const ve=new Array(1+arguments.length);ve[0]=M;for(var re=1;re"u"?A=i(y,w):A=y.bindings().context||"",A}er.getLoggerContext=o;function h(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=o(y,A);return F.trim()?`${F}/${w}`:w}er.formatChildLoggerContext=h;function d(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=h(y,w,A),K=y.child({context:F});return n(K,F,A)}return er.generateChildLogger=d,er}(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.pino=void 0;const r=bi,i=r.__importDefault(bm());Object.defineProperty(c,"pino",{enumerable:!0,get:function(){return i.default}}),r.__exportStar(sf(),c),r.__exportStar(Em(),c)})(Re);class xm extends qi{constructor(r){super(),this.opts=r,this.protocol="wc",this.version=2}}class Im extends qi{constructor(r,i){super(),this.core=r,this.logger=i,this.records=new Map}}class Sm{constructor(r,i){this.logger=r,this.core=i}}let Pm=class extends qi{constructor(r,i){super(),this.relayer=r,this.logger=i}},Am=class extends qi{constructor(r){super()}},Cm=class{constructor(r,i,n,o){this.core=r,this.logger=i,this.name=n}};class Om extends qi{constructor(r,i){super(),this.relayer=r,this.logger=i}}let Rm=class extends qi{constructor(r,i){super(),this.core=r,this.logger=i}},Tm=class{constructor(r,i){this.projectId=r,this.logger=i}},Nm=class{constructor(r){this.opts=r,this.protocol="wc",this.version=2}},Lm=class{constructor(r){this.client=r}};const Dm=c=>JSON.stringify(c,(r,i)=>typeof i=="bigint"?i.toString()+"n":i),Fm=c=>{const r=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,i=c.replace(r,'$1"$2n"$3');return JSON.parse(i,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function _c(c){if(typeof c!="string")throw new Error(`Cannot safe json parse value of type ${typeof c}`);try{return Fm(c)}catch{return c}}function Ks(c){return typeof c=="string"?c:Dm(c)||""}var wc={},nf={};(function(c){Object.defineProperty(c,"__esModule",{value:!0});var r=g1,i=Ml;c.DIGEST_LENGTH=64,c.BLOCK_SIZE=128;var n=function(){function y(){this.digestLength=c.DIGEST_LENGTH,this.blockSize=c.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return y.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},y.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},y.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},y.prototype.update=function(w,A){if(A===void 0&&(A=w.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var F=0;if(this._bytesHashed+=A,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=w[F++],A--;this._bufferLength===this.blockSize&&(h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(A>=this.blockSize&&(F=h(this._tempHi,this._tempLo,this._stateHi,this._stateLo,w,F,A),A%=this.blockSize);A>0;)this._buffer[this._bufferLength++]=w[F++],A--;return this},y.prototype.finish=function(w){if(!this._finished){var A=this._bytesHashed,F=this._bufferLength,K=A/536870912|0,J=A<<3,G=A%128<112?128:256;this._buffer[F]=128;for(var j=F+1;j0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},y.prototype.restoreState=function(w){return this._stateHi.set(w.stateHi),this._stateLo.set(w.stateLo),this._bufferLength=w.bufferLength,w.buffer&&this._buffer.set(w.buffer),this._bytesHashed=w.bytesHashed,this._finished=!1,this},y.prototype.cleanSavedState=function(w){i.wipe(w.stateHi),i.wipe(w.stateLo),w.buffer&&i.wipe(w.buffer),w.bufferLength=0,w.bytesHashed=0},y}();c.SHA512=n;var o=new Int32Array([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 h(y,w,A,F,K,J,G){for(var j=A[0],V=A[1],ie=A[2],Ee=A[3],ge=A[4],pe=A[5],he=A[6],le=A[7],T=F[0],M=F[1],B=F[2],ve=F[3],re=F[4],ue=F[5],Te=F[6],qe=F[7],v,E,X,ce,k,U,z,H;G>=128;){for(var Ye=0;Ye<16;Ye++){var Be=8*Ye+J;y[Ye]=r.readUint32BE(K,Be),w[Ye]=r.readUint32BE(K,Be+4)}for(var Ye=0;Ye<80;Ye++){var jr=j,xe=V,St=ie,R=Ee,O=ge,P=pe,u=he,b=le,ee=T,fe=M,we=B,Ne=ve,De=re,Pe=ue,Pt=Te,_t=qe;if(v=le,E=qe,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=(ge>>>14|re<<32-14)^(ge>>>18|re<<32-18)^(re>>>41-32|ge<<32-(41-32)),E=(re>>>14|ge<<32-14)^(re>>>18|ge<<32-18)^(ge>>>41-32|re<<32-(41-32)),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=ge&pe^~ge&he,E=re&ue^~re&Te,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=o[Ye*2],E=o[Ye*2+1],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=y[Ye%16],E=w[Ye%16],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,X=z&65535|H<<16,ce=k&65535|U<<16,v=X,E=ce,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=(j>>>28|T<<32-28)^(T>>>34-32|j<<32-(34-32))^(T>>>39-32|j<<32-(39-32)),E=(T>>>28|j<<32-28)^(j>>>34-32|T<<32-(34-32))^(j>>>39-32|T<<32-(39-32)),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,v=j&V^j&ie^V&ie,E=T&M^T&B^M&B,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,b=z&65535|H<<16,_t=k&65535|U<<16,v=R,E=Ne,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=X,E=ce,k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,R=z&65535|H<<16,Ne=k&65535|U<<16,V=jr,ie=xe,Ee=St,ge=R,pe=O,he=P,le=u,j=b,M=ee,B=fe,ve=we,re=Ne,ue=De,Te=Pe,qe=Pt,T=_t,Ye%16===15)for(var Be=0;Be<16;Be++)v=y[Be],E=w[Be],k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=y[(Be+9)%16],E=w[(Be+9)%16],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,X=y[(Be+1)%16],ce=w[(Be+1)%16],v=(X>>>1|ce<<32-1)^(X>>>8|ce<<32-8)^X>>>7,E=(ce>>>1|X<<32-1)^(ce>>>8|X<<32-8)^(ce>>>7|X<<32-7),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,X=y[(Be+14)%16],ce=w[(Be+14)%16],v=(X>>>19|ce<<32-19)^(ce>>>61-32|X<<32-(61-32))^X>>>6,E=(ce>>>19|X<<32-19)^(X>>>61-32|ce<<32-(61-32))^(ce>>>6|X<<32-6),k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,y[Be]=z&65535|H<<16,w[Be]=k&65535|U<<16}v=j,E=T,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[0],E=F[0],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[0]=j=z&65535|H<<16,F[0]=T=k&65535|U<<16,v=V,E=M,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[1],E=F[1],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[1]=V=z&65535|H<<16,F[1]=M=k&65535|U<<16,v=ie,E=B,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[2],E=F[2],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[2]=ie=z&65535|H<<16,F[2]=B=k&65535|U<<16,v=Ee,E=ve,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[3],E=F[3],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[3]=Ee=z&65535|H<<16,F[3]=ve=k&65535|U<<16,v=ge,E=re,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[4],E=F[4],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[4]=ge=z&65535|H<<16,F[4]=re=k&65535|U<<16,v=pe,E=ue,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[5],E=F[5],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[5]=pe=z&65535|H<<16,F[5]=ue=k&65535|U<<16,v=he,E=Te,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[6],E=F[6],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[6]=he=z&65535|H<<16,F[6]=Te=k&65535|U<<16,v=le,E=qe,k=E&65535,U=E>>>16,z=v&65535,H=v>>>16,v=A[7],E=F[7],k+=E&65535,U+=E>>>16,z+=v&65535,H+=v>>>16,U+=k>>>16,z+=U>>>16,H+=z>>>16,A[7]=le=z&65535|H<<16,F[7]=qe=k&65535|U<<16,J+=128,G-=128}return J}function d(y){var w=new n;w.update(y);var A=w.digest();return w.clean(),A}c.hash=d})(nf);(function(c){Object.defineProperty(c,"__esModule",{value:!0}),c.convertSecretKeyToX25519=c.convertPublicKeyToX25519=c.verify=c.sign=c.extractPublicKeyFromSecretKey=c.generateKeyPair=c.generateKeyPairFromSeed=c.SEED_LENGTH=c.SECRET_KEY_LENGTH=c.PUBLIC_KEY_LENGTH=c.SIGNATURE_LENGTH=void 0;const r=Ul,i=nf,n=Ml;c.SIGNATURE_LENGTH=64,c.PUBLIC_KEY_LENGTH=32,c.SECRET_KEY_LENGTH=64,c.SEED_LENGTH=32;function o(R){const O=new Float64Array(16);if(R)for(let P=0;P>16&1),P[fe-1]&=65535;P[15]=u[15]-32767-(P[14]>>16&1);const ee=P[15]>>16&1;P[14]&=65535,V(u,P,1-ee)}for(let b=0;b<16;b++)R[2*b]=u[b]&255,R[2*b+1]=u[b]>>8}function Ee(R,O){let P=0;for(let u=0;u<32;u++)P|=R[u]^O[u];return(1&P-1>>>8)-1}function ge(R,O){const P=new Uint8Array(32),u=new Uint8Array(32);return ie(P,R),ie(u,O),Ee(P,u)}function pe(R){const O=new Uint8Array(32);return ie(O,R),O[0]&1}function he(R,O){for(let P=0;P<16;P++)R[P]=O[2*P]+(O[2*P+1]<<8);R[15]&=32767}function le(R,O,P){for(let u=0;u<16;u++)R[u]=O[u]+P[u]}function T(R,O,P){for(let u=0;u<16;u++)R[u]=O[u]-P[u]}function M(R,O,P){let u,b,ee=0,fe=0,we=0,Ne=0,De=0,Pe=0,Pt=0,_t=0,ot=0,$e=0,Ze=0,Qe=0,at=0,ze=0,et=0,Le=0,Ve=0,ht=0,Me=0,At=0,$t=0,kt=0,Ht=0,Ut=0,Wt=0,rr=0,Mr=0,Jt=0,Kr=0,ai=0,Ii=0,lt=P[0],it=P[1],ft=P[2],pt=P[3],ct=P[4],st=P[5],Ct=P[6],Ot=P[7],dt=P[8],Rt=P[9],gt=P[10],wt=P[11],vt=P[12],Xe=P[13],Tt=P[14],Nt=P[15];u=O[0],ee+=u*lt,fe+=u*it,we+=u*ft,Ne+=u*pt,De+=u*ct,Pe+=u*st,Pt+=u*Ct,_t+=u*Ot,ot+=u*dt,$e+=u*Rt,Ze+=u*gt,Qe+=u*wt,at+=u*vt,ze+=u*Xe,et+=u*Tt,Le+=u*Nt,u=O[1],fe+=u*lt,we+=u*it,Ne+=u*ft,De+=u*pt,Pe+=u*ct,Pt+=u*st,_t+=u*Ct,ot+=u*Ot,$e+=u*dt,Ze+=u*Rt,Qe+=u*gt,at+=u*wt,ze+=u*vt,et+=u*Xe,Le+=u*Tt,Ve+=u*Nt,u=O[2],we+=u*lt,Ne+=u*it,De+=u*ft,Pe+=u*pt,Pt+=u*ct,_t+=u*st,ot+=u*Ct,$e+=u*Ot,Ze+=u*dt,Qe+=u*Rt,at+=u*gt,ze+=u*wt,et+=u*vt,Le+=u*Xe,Ve+=u*Tt,ht+=u*Nt,u=O[3],Ne+=u*lt,De+=u*it,Pe+=u*ft,Pt+=u*pt,_t+=u*ct,ot+=u*st,$e+=u*Ct,Ze+=u*Ot,Qe+=u*dt,at+=u*Rt,ze+=u*gt,et+=u*wt,Le+=u*vt,Ve+=u*Xe,ht+=u*Tt,Me+=u*Nt,u=O[4],De+=u*lt,Pe+=u*it,Pt+=u*ft,_t+=u*pt,ot+=u*ct,$e+=u*st,Ze+=u*Ct,Qe+=u*Ot,at+=u*dt,ze+=u*Rt,et+=u*gt,Le+=u*wt,Ve+=u*vt,ht+=u*Xe,Me+=u*Tt,At+=u*Nt,u=O[5],Pe+=u*lt,Pt+=u*it,_t+=u*ft,ot+=u*pt,$e+=u*ct,Ze+=u*st,Qe+=u*Ct,at+=u*Ot,ze+=u*dt,et+=u*Rt,Le+=u*gt,Ve+=u*wt,ht+=u*vt,Me+=u*Xe,At+=u*Tt,$t+=u*Nt,u=O[6],Pt+=u*lt,_t+=u*it,ot+=u*ft,$e+=u*pt,Ze+=u*ct,Qe+=u*st,at+=u*Ct,ze+=u*Ot,et+=u*dt,Le+=u*Rt,Ve+=u*gt,ht+=u*wt,Me+=u*vt,At+=u*Xe,$t+=u*Tt,kt+=u*Nt,u=O[7],_t+=u*lt,ot+=u*it,$e+=u*ft,Ze+=u*pt,Qe+=u*ct,at+=u*st,ze+=u*Ct,et+=u*Ot,Le+=u*dt,Ve+=u*Rt,ht+=u*gt,Me+=u*wt,At+=u*vt,$t+=u*Xe,kt+=u*Tt,Ht+=u*Nt,u=O[8],ot+=u*lt,$e+=u*it,Ze+=u*ft,Qe+=u*pt,at+=u*ct,ze+=u*st,et+=u*Ct,Le+=u*Ot,Ve+=u*dt,ht+=u*Rt,Me+=u*gt,At+=u*wt,$t+=u*vt,kt+=u*Xe,Ht+=u*Tt,Ut+=u*Nt,u=O[9],$e+=u*lt,Ze+=u*it,Qe+=u*ft,at+=u*pt,ze+=u*ct,et+=u*st,Le+=u*Ct,Ve+=u*Ot,ht+=u*dt,Me+=u*Rt,At+=u*gt,$t+=u*wt,kt+=u*vt,Ht+=u*Xe,Ut+=u*Tt,Wt+=u*Nt,u=O[10],Ze+=u*lt,Qe+=u*it,at+=u*ft,ze+=u*pt,et+=u*ct,Le+=u*st,Ve+=u*Ct,ht+=u*Ot,Me+=u*dt,At+=u*Rt,$t+=u*gt,kt+=u*wt,Ht+=u*vt,Ut+=u*Xe,Wt+=u*Tt,rr+=u*Nt,u=O[11],Qe+=u*lt,at+=u*it,ze+=u*ft,et+=u*pt,Le+=u*ct,Ve+=u*st,ht+=u*Ct,Me+=u*Ot,At+=u*dt,$t+=u*Rt,kt+=u*gt,Ht+=u*wt,Ut+=u*vt,Wt+=u*Xe,rr+=u*Tt,Mr+=u*Nt,u=O[12],at+=u*lt,ze+=u*it,et+=u*ft,Le+=u*pt,Ve+=u*ct,ht+=u*st,Me+=u*Ct,At+=u*Ot,$t+=u*dt,kt+=u*Rt,Ht+=u*gt,Ut+=u*wt,Wt+=u*vt,rr+=u*Xe,Mr+=u*Tt,Jt+=u*Nt,u=O[13],ze+=u*lt,et+=u*it,Le+=u*ft,Ve+=u*pt,ht+=u*ct,Me+=u*st,At+=u*Ct,$t+=u*Ot,kt+=u*dt,Ht+=u*Rt,Ut+=u*gt,Wt+=u*wt,rr+=u*vt,Mr+=u*Xe,Jt+=u*Tt,Kr+=u*Nt,u=O[14],et+=u*lt,Le+=u*it,Ve+=u*ft,ht+=u*pt,Me+=u*ct,At+=u*st,$t+=u*Ct,kt+=u*Ot,Ht+=u*dt,Ut+=u*Rt,Wt+=u*gt,rr+=u*wt,Mr+=u*vt,Jt+=u*Xe,Kr+=u*Tt,ai+=u*Nt,u=O[15],Le+=u*lt,Ve+=u*it,ht+=u*ft,Me+=u*pt,At+=u*ct,$t+=u*st,kt+=u*Ct,Ht+=u*Ot,Ut+=u*dt,Wt+=u*Rt,rr+=u*gt,Mr+=u*wt,Jt+=u*vt,Kr+=u*Xe,ai+=u*Tt,Ii+=u*Nt,ee+=38*Ve,fe+=38*ht,we+=38*Me,Ne+=38*At,De+=38*$t,Pe+=38*kt,Pt+=38*Ht,_t+=38*Ut,ot+=38*Wt,$e+=38*rr,Ze+=38*Mr,Qe+=38*Jt,at+=38*Kr,ze+=38*ai,et+=38*Ii,b=1,u=ee+b+65535,b=Math.floor(u/65536),ee=u-b*65536,u=fe+b+65535,b=Math.floor(u/65536),fe=u-b*65536,u=we+b+65535,b=Math.floor(u/65536),we=u-b*65536,u=Ne+b+65535,b=Math.floor(u/65536),Ne=u-b*65536,u=De+b+65535,b=Math.floor(u/65536),De=u-b*65536,u=Pe+b+65535,b=Math.floor(u/65536),Pe=u-b*65536,u=Pt+b+65535,b=Math.floor(u/65536),Pt=u-b*65536,u=_t+b+65535,b=Math.floor(u/65536),_t=u-b*65536,u=ot+b+65535,b=Math.floor(u/65536),ot=u-b*65536,u=$e+b+65535,b=Math.floor(u/65536),$e=u-b*65536,u=Ze+b+65535,b=Math.floor(u/65536),Ze=u-b*65536,u=Qe+b+65535,b=Math.floor(u/65536),Qe=u-b*65536,u=at+b+65535,b=Math.floor(u/65536),at=u-b*65536,u=ze+b+65535,b=Math.floor(u/65536),ze=u-b*65536,u=et+b+65535,b=Math.floor(u/65536),et=u-b*65536,u=Le+b+65535,b=Math.floor(u/65536),Le=u-b*65536,ee+=b-1+37*(b-1),b=1,u=ee+b+65535,b=Math.floor(u/65536),ee=u-b*65536,u=fe+b+65535,b=Math.floor(u/65536),fe=u-b*65536,u=we+b+65535,b=Math.floor(u/65536),we=u-b*65536,u=Ne+b+65535,b=Math.floor(u/65536),Ne=u-b*65536,u=De+b+65535,b=Math.floor(u/65536),De=u-b*65536,u=Pe+b+65535,b=Math.floor(u/65536),Pe=u-b*65536,u=Pt+b+65535,b=Math.floor(u/65536),Pt=u-b*65536,u=_t+b+65535,b=Math.floor(u/65536),_t=u-b*65536,u=ot+b+65535,b=Math.floor(u/65536),ot=u-b*65536,u=$e+b+65535,b=Math.floor(u/65536),$e=u-b*65536,u=Ze+b+65535,b=Math.floor(u/65536),Ze=u-b*65536,u=Qe+b+65535,b=Math.floor(u/65536),Qe=u-b*65536,u=at+b+65535,b=Math.floor(u/65536),at=u-b*65536,u=ze+b+65535,b=Math.floor(u/65536),ze=u-b*65536,u=et+b+65535,b=Math.floor(u/65536),et=u-b*65536,u=Le+b+65535,b=Math.floor(u/65536),Le=u-b*65536,ee+=b-1+37*(b-1),R[0]=ee,R[1]=fe,R[2]=we,R[3]=Ne,R[4]=De,R[5]=Pe,R[6]=Pt,R[7]=_t,R[8]=ot,R[9]=$e,R[10]=Ze,R[11]=Qe,R[12]=at,R[13]=ze,R[14]=et,R[15]=Le}function B(R,O){M(R,O,O)}function ve(R,O){const P=o();let u;for(u=0;u<16;u++)P[u]=O[u];for(u=253;u>=0;u--)B(P,P),u!==2&&u!==4&&M(P,P,O);for(u=0;u<16;u++)R[u]=P[u]}function re(R,O){const P=o();let u;for(u=0;u<16;u++)P[u]=O[u];for(u=250;u>=0;u--)B(P,P),u!==1&&M(P,P,O);for(u=0;u<16;u++)R[u]=P[u]}function ue(R,O){const P=o(),u=o(),b=o(),ee=o(),fe=o(),we=o(),Ne=o(),De=o(),Pe=o();T(P,R[1],R[0]),T(Pe,O[1],O[0]),M(P,P,Pe),le(u,R[0],R[1]),le(Pe,O[0],O[1]),M(u,u,Pe),M(b,R[3],O[3]),M(b,b,A),M(ee,R[2],O[2]),le(ee,ee,ee),T(fe,u,P),T(we,ee,b),le(Ne,ee,b),le(De,u,P),M(R[0],fe,we),M(R[1],De,Ne),M(R[2],Ne,we),M(R[3],fe,De)}function Te(R,O,P){for(let u=0;u<4;u++)V(R[u],O[u],P)}function qe(R,O){const P=o(),u=o(),b=o();ve(b,O[2]),M(P,O[0],b),M(u,O[1],b),ie(R,u),R[31]^=pe(P)<<7}function v(R,O,P){G(R[0],d),G(R[1],y),G(R[2],y),G(R[3],d);for(let u=255;u>=0;--u){const b=P[u/8|0]>>(u&7)&1;Te(R,O,b),ue(O,R),ue(R,R),Te(R,O,b)}}function E(R,O){const P=[o(),o(),o(),o()];G(P[0],F),G(P[1],K),G(P[2],y),M(P[3],F,K),v(R,P,O)}function X(R){if(R.length!==c.SEED_LENGTH)throw new Error(`ed25519: seed must be ${c.SEED_LENGTH} bytes`);const O=(0,i.hash)(R);O[0]&=248,O[31]&=127,O[31]|=64;const P=new Uint8Array(32),u=[o(),o(),o(),o()];E(u,O),qe(P,u);const b=new Uint8Array(64);return b.set(R),b.set(P,32),{publicKey:P,secretKey:b}}c.generateKeyPairFromSeed=X;function ce(R){const O=(0,r.randomBytes)(32,R),P=X(O);return(0,n.wipe)(O),P}c.generateKeyPair=ce;function k(R){if(R.length!==c.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${c.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(R.subarray(32))}c.extractPublicKeyFromSecretKey=k;const U=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function z(R,O){let P,u,b,ee;for(u=63;u>=32;--u){for(P=0,b=u-32,ee=u-12;b>4)*U[b],P=O[b]>>8,O[b]&=255;for(b=0;b<32;b++)O[b]-=P*U[b];for(u=0;u<32;u++)O[u+1]+=O[u]>>8,R[u]=O[u]&255}function H(R){const O=new Float64Array(64);for(let P=0;P<64;P++)O[P]=R[P];for(let P=0;P<64;P++)R[P]=0;z(R,O)}function Ye(R,O){const P=new Float64Array(64),u=[o(),o(),o(),o()],b=(0,i.hash)(R.subarray(0,32));b[0]&=248,b[31]&=127,b[31]|=64;const ee=new Uint8Array(64);ee.set(b.subarray(32),32);const fe=new i.SHA512;fe.update(ee.subarray(32)),fe.update(O);const we=fe.digest();fe.clean(),H(we),E(u,we),qe(ee,u),fe.reset(),fe.update(ee.subarray(0,32)),fe.update(R.subarray(32)),fe.update(O);const Ne=fe.digest();H(Ne);for(let De=0;De<32;De++)P[De]=we[De];for(let De=0;De<32;De++)for(let Pe=0;Pe<32;Pe++)P[De+Pe]+=Ne[De]*b[Pe];return z(ee.subarray(32),P),ee}c.sign=Ye;function Be(R,O){const P=o(),u=o(),b=o(),ee=o(),fe=o(),we=o(),Ne=o();return G(R[2],y),he(R[1],O),B(b,R[1]),M(ee,b,w),T(b,b,R[2]),le(ee,R[2],ee),B(fe,ee),B(we,fe),M(Ne,we,fe),M(P,Ne,b),M(P,P,ee),re(P,P),M(P,P,b),M(P,P,ee),M(P,P,ee),M(R[0],P,ee),B(u,R[0]),M(u,u,ee),ge(u,b)&&M(R[0],R[0],J),B(u,R[0]),M(u,u,ee),ge(u,b)?-1:(pe(R[0])===O[31]>>7&&T(R[0],d,R[0]),M(R[3],R[0],R[1]),0)}function jr(R,O,P){const u=new Uint8Array(32),b=[o(),o(),o(),o()],ee=[o(),o(),o(),o()];if(P.length!==c.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${c.SIGNATURE_LENGTH} bytes`);if(Be(ee,R))return!1;const fe=new i.SHA512;fe.update(P.subarray(0,32)),fe.update(R),fe.update(O);const we=fe.digest();return H(we),v(b,ee,we),E(ee,P.subarray(32)),ue(b,ee),qe(u,b),!Ee(P,u)}c.verify=jr;function xe(R){let O=[o(),o(),o(),o()];if(Be(O,R))throw new Error("Ed25519: invalid public key");let P=o(),u=o(),b=O[1];le(P,y,b),T(u,y,b),ve(u,u),M(P,P,u);let ee=new Uint8Array(32);return ie(ee,P),ee}c.convertPublicKeyToX25519=xe;function St(R){const O=(0,i.hash)(R.subarray(0,32));O[0]&=248,O[31]&=127,O[31]|=64;const P=new Uint8Array(O.subarray(0,32));return(0,n.wipe)(O),P}c.convertSecretKeyToX25519=St})(wc);const $m="EdDSA",jm="JWT",of=".",af="base64url",Mm="utf8",Um="utf8",qm=":",zm="did",km="key",Jh="base58btc",Hm="z",Bm="K36",Vm=32;function co(c){return lo(vc(Ks(c),Mm),af)}function cf(c){const r=vc(Bm,Jh),i=Hm+lo(v1([r,c]),Jh);return[zm,km,i].join(qm)}function Km(c){return lo(c,af)}function Gm(c){return vc([co(c.header),co(c.payload)].join(of),Um)}function Wm(c){return[co(c.header),co(c.payload),Km(c.signature)].join(of)}function Yh(c=Ul.randomBytes(Vm)){return wc.generateKeyPairFromSeed(c)}async function Jm(c,r,i,n,o=ne.fromMiliseconds(Date.now())){const h={alg:$m,typ:jm},d=cf(n.publicKey),y=o+i,w={iss:d,sub:c,aud:r,iat:o,exp:y},A=Gm({header:h,payload:w}),F=wc.sign(n.secretKey,A);return Wm({header:h,payload:w,signature:F})}const Ym="PARSE_ERROR",Xm="INVALID_REQUEST",Zm="METHOD_NOT_FOUND",Qm="INVALID_PARAMS",uf="INTERNAL_ERROR",bc="SERVER_ERROR",e_=[-32700,-32600,-32601,-32602,-32603],Vs={[Ym]:{code:-32700,message:"Parse error"},[Xm]:{code:-32600,message:"Invalid Request"},[Zm]:{code:-32601,message:"Method not found"},[Qm]:{code:-32602,message:"Invalid params"},[uf]:{code:-32603,message:"Internal error"},[bc]:{code:-32e3,message:"Server error"}},hf=bc;function t_(c){return e_.includes(c)}function Xh(c){return Object.keys(Vs).includes(c)?Vs[c]:Vs[hf]}function r_(c){const r=Object.values(Vs).find(i=>i.code===c);return r||Vs[hf]}function lf(c,r,i){return c.message.includes("getaddrinfo ENOTFOUND")||c.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${i} RPC url at ${r}`):c}var ff={},si={},Zh;function i_(){if(Zh)return si;Zh=1,Object.defineProperty(si,"__esModule",{value:!0}),si.isBrowserCryptoAvailable=si.getSubtleCrypto=si.getBrowerCrypto=void 0;function c(){return(ur===null||ur===void 0?void 0:ur.crypto)||(ur===null||ur===void 0?void 0:ur.msCrypto)||{}}si.getBrowerCrypto=c;function r(){const n=c();return n.subtle||n.webkitSubtle}si.getSubtleCrypto=r;function i(){return!!c()&&!!r()}return si.isBrowserCryptoAvailable=i,si}var ni={},Qh;function s_(){if(Qh)return ni;Qh=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.isBrowser=ni.isNode=ni.isReactNative=void 0;function c(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}ni.isReactNative=c;function r(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}ni.isNode=r;function i(){return!c()&&!r()}return ni.isBrowser=i,ni}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(i_(),c),r.__exportStar(s_(),c)})(ff);function pf(c=3){const r=Date.now()*Math.pow(10,c),i=Math.floor(Math.random()*Math.pow(10,c));return r+i}function Ec(c=6){return BigInt(pf(c))}function go(c,r,i){return{id:i||pf(),jsonrpc:"2.0",method:c,params:r}}function xc(c,r){return{id:c,jsonrpc:"2.0",result:r}}function vo(c,r,i){return{id:c,jsonrpc:"2.0",error:n_(r,i)}}function n_(c,r){return typeof c>"u"?Xh(uf):(typeof c=="string"&&(c=Object.assign(Object.assign({},Xh(bc)),{message:c})),typeof r<"u"&&(c.data=r),t_(c.code)&&(c=r_(c.code)),c)}class o_{}class a_ extends o_{constructor(){super()}}class c_ extends a_{constructor(r){super()}}const u_="^https?:",h_="^wss?:";function l_(c){const r=c.match(new RegExp(/^\w+:/,"gi"));if(!(!r||!r.length))return r[0]}function df(c,r){const i=l_(c);return typeof i>"u"?!1:new RegExp(r).test(i)}function el(c){return df(c,u_)}function tl(c){return df(c,h_)}function f_(c){return new RegExp("wss?://localhost(:d{2,5})?").test(c)}function gf(c){return typeof c=="object"&&"id"in c&&"jsonrpc"in c&&c.jsonrpc==="2.0"}function Ic(c){return gf(c)&&"method"in c}function yo(c){return gf(c)&&(oi(c)||$r(c))}function oi(c){return"result"in c}function $r(c){return"error"in c}class Ei extends c_{constructor(r){super(r),this.events=new vr.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(r),this.connection.connected&&this.registerEventListeners()}async connect(r=this.connection){await this.open(r)}async disconnect(){await this.close()}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async request(r,i){return this.requestStrict(go(r.method,r.params||[],r.id||Ec().toString()),i)}async requestStrict(r,i){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(h){o(h)}this.events.on(`${r.id}`,h=>{$r(h)?o(h.error):n(h.result)});try{await this.connection.send(r,i)}catch(h){o(h)}})}setConnection(r=this.connection){return r}onPayload(r){this.events.emit("payload",r),yo(r)?this.events.emit(`${r.id}`,r):this.events.emit("message",{type:r.method,data:r.params})}onClose(r){r&&r.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${r.code} ${r.reason?`(${r.reason})`:""}`)),this.events.emit("disconnect")}async open(r=this.connection){this.connection===r&&this.connection.connected||(this.connection.connected&&this.close(),typeof r=="string"&&(await this.connection.open(r),r=this.connection),this.connection=this.setConnection(r),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",r=>this.onPayload(r)),this.connection.on("close",r=>this.onClose(r)),this.connection.on("error",r=>this.events.emit("error",r)),this.connection.on("register_error",r=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const p_=()=>typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:require("ws"),d_=()=>typeof window<"u",rl=c=>c.split("?")[0],il=10,g_=p_();class v_{constructor(r){if(this.url=r,this.events=new vr.EventEmitter,this.registering=!1,!tl(r))throw new Error(`Provided URL is not compatible with WebSocket connection: ${r}`);this.url=r}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){return new Promise((r,i)=>{if(typeof this.socket>"u"){i(new Error("Connection already closed"));return}this.socket.onclose=n=>{this.onClose(n),r()},this.socket.close()})}async send(r,i){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send(Ks(r))}catch(n){this.onError(r.id,n)}}register(r=this.url){if(!tl(r))throw new Error(`Provided URL is not compatible with WebSocket connection: ${r}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((n,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return o(new Error("WebSocket connection is missing or invalid"));n(this.socket)})})}return this.url=r,this.registering=!0,new Promise((i,n)=>{const o=ff.isReactNative()?void 0:{rejectUnauthorized:!f_(r)},h=new g_(r,[],o);d_()?h.onerror=d=>{const y=d;n(this.emitError(y.error))}:h.on("error",d=>{n(this.emitError(d))}),h.onopen=()=>{this.onOpen(h),i(h)}})}onOpen(r){r.onmessage=i=>this.onPayload(i),r.onclose=i=>this.onClose(i),this.socket=r,this.registering=!1,this.events.emit("open")}onClose(r){this.socket=void 0,this.registering=!1,this.events.emit("close",r)}onPayload(r){if(typeof r.data>"u")return;const i=typeof r.data=="string"?_c(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=vo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return lf(r,rl(i),"WS")}resetMaxListeners(){this.events.getMaxListeners()>il&&this.events.setMaxListeners(il)}emitError(r){const i=this.parseError(new Error((r==null?void 0:r.message)||`WebSocket connection failed for host: ${rl(this.url)}`));return this.events.emit("register_error",i),i}}var uo={exports:{}};uo.exports;(function(c,r){var i=200,n="__lodash_hash_undefined__",o=1,h=2,d=9007199254740991,y="[object Arguments]",w="[object Array]",A="[object AsyncFunction]",F="[object Boolean]",K="[object Date]",J="[object Error]",G="[object Function]",j="[object GeneratorFunction]",V="[object Map]",ie="[object Number]",Ee="[object Null]",ge="[object Object]",pe="[object Promise]",he="[object Proxy]",le="[object RegExp]",T="[object Set]",M="[object String]",B="[object Symbol]",ve="[object Undefined]",re="[object WeakMap]",ue="[object ArrayBuffer]",Te="[object DataView]",qe="[object Float32Array]",v="[object Float64Array]",E="[object Int8Array]",X="[object Int16Array]",ce="[object Int32Array]",k="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",H="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,jr=/^(?:0|[1-9]\d*)$/,xe={};xe[qe]=xe[v]=xe[E]=xe[X]=xe[ce]=xe[k]=xe[U]=xe[z]=xe[H]=!0,xe[y]=xe[w]=xe[ue]=xe[F]=xe[Te]=xe[K]=xe[J]=xe[G]=xe[V]=xe[ie]=xe[ge]=xe[le]=xe[T]=xe[M]=xe[re]=!1;var St=typeof ur=="object"&&ur&&ur.Object===Object&&ur,R=typeof self=="object"&&self&&self.Object===Object&&self,O=St||R||Function("return this")(),P=r&&!r.nodeType&&r,u=P&&!0&&c&&!c.nodeType&&c,b=u&&u.exports===P,ee=b&&St.process,fe=function(){try{return ee&&ee.binding&&ee.binding("util")}catch{}}(),we=fe&&fe.isTypedArray;function Ne(g,x){for(var $=-1,Y=g==null?0:g.length,Ge=0,ye=[];++$-1}function Ao(g,x){var $=this.__data__,Y=Si($,g);return Y<0?(++this.size,$.push([g,x])):$[Y][1]=x,this}yr.prototype.clear=xo,yr.prototype.delete=Io,yr.prototype.get=So,yr.prototype.has=Po,yr.prototype.set=Ao;function Gr(g){var x=-1,$=g==null?0:g.length;for(this.clear();++x<$;){var Y=g[x];this.set(Y[0],Y[1])}}function ki(){this.size=0,this.__data__={hash:new Xe,map:new(it||yr),string:new Xe}}function Co(g){var x=ci(this,g).delete(g);return this.size-=x?1:0,x}function Hi(g){return ci(this,g).get(g)}function Oo(g){return ci(this,g).has(g)}function Ro(g,x){var $=ci(this,g),Y=$.size;return $.set(g,x),this.size+=$.size==Y?0:1,this}Gr.prototype.clear=ki,Gr.prototype.delete=Co,Gr.prototype.get=Hi,Gr.prototype.has=Oo,Gr.prototype.set=Ro;function Bi(g){var x=-1,$=g==null?0:g.length;for(this.__data__=new Gr;++x<$;)this.add(g[x])}function Js(g){return this.__data__.set(g,n),this}function Ys(g){return this.__data__.has(g)}Bi.prototype.add=Bi.prototype.push=Js,Bi.prototype.has=Ys;function Or(g){var x=this.__data__=new yr(g);this.size=x.size}function To(){this.__data__=new yr,this.size=0}function No(g){var x=this.__data__,$=x.delete(g);return this.size=x.size,$}function Lo(g){return this.__data__.get(g)}function Do(g){return this.__data__.has(g)}function Xs(g,x){var $=this.__data__;if($ instanceof yr){var Y=$.__data__;if(!it||Y.lengthLt))return!1;var We=ye.get(g);if(We&&ye.get(x))return We==x;var bt=-1,ir=!0,Dt=$&h?new Bi:void 0;for(ye.set(g,x),ye.set(x,g);++bt-1&&g%1==0&&g-1&&g%1==0&&g<=d}function pn(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Ci(g){return g!=null&&typeof g=="object"}var dn=we?_t(we):en;function qo(g){return Mo(g)?Zs(g):tn(g)}function Ke(){return[]}function ke(){return!1}c.exports=Uo})(uo,uo.exports);var y_=uo.exports;const m_=gc(y_);function __(c,r){if(c.length>=255)throw new TypeError("Alphabet too long");for(var i=new Uint8Array(256),n=0;n>>0,he=new Uint8Array(pe);Ee!==ge;){for(var le=j[Ee],T=0,M=pe-1;(le!==0||T>>0,he[M]=le%y>>>0,le=le/y>>>0;if(le!==0)throw new Error("Non-zero carry");ie=T,Ee++}for(var B=pe-ie;B!==pe&&he[B]===0;)B++;for(var ve=w.repeat(V);B>>0,pe=new Uint8Array(ge);j[V];){var he=i[j.charCodeAt(V)];if(he===255)return;for(var le=0,T=ge-1;(he!==0||le>>0,pe[T]=he%256>>>0,he=he/256>>>0;if(he!==0)throw new Error("Non-zero carry");Ee=le,V++}if(j[V]!==" "){for(var M=ge-Ee;M!==ge&&pe[M]===0;)M++;for(var B=new Uint8Array(ie+(ge-M)),ve=ie;M!==ge;)B[ve++]=pe[M++];return B}}}function G(j){var V=J(j);if(V)return V;throw new Error(`Non-${r} character`)}return{encode:K,decodeUnsafe:J,decode:G}}var w_=__,b_=w_;const vf=c=>{if(c instanceof Uint8Array&&c.constructor.name==="Uint8Array")return c;if(c instanceof ArrayBuffer)return new Uint8Array(c);if(ArrayBuffer.isView(c))return new Uint8Array(c.buffer,c.byteOffset,c.byteLength);throw new Error("Unknown type, must be binary type")},E_=c=>new TextEncoder().encode(c),x_=c=>new TextDecoder().decode(c);class I_{constructor(r,i,n){this.name=r,this.prefix=i,this.baseEncode=n}encode(r){if(r instanceof Uint8Array)return`${this.prefix}${this.baseEncode(r)}`;throw Error("Unknown type, must be binary type")}}class S_{constructor(r,i,n){if(this.name=r,this.prefix=i,i.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i.codePointAt(0),this.baseDecode=n}decode(r){if(typeof r=="string"){if(r.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(r.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(r){return yf(this,r)}}class P_{constructor(r){this.decoders=r}or(r){return yf(this,r)}decode(r){const i=r[0],n=this.decoders[i];if(n)return n.decode(r);throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const yf=(c,r)=>new P_({...c.decoders||{[c.prefix]:c},...r.decoders||{[r.prefix]:r}});class A_{constructor(r,i,n,o){this.name=r,this.prefix=i,this.baseEncode=n,this.baseDecode=o,this.encoder=new I_(r,i,n),this.decoder=new S_(r,i,o)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const mo=({name:c,prefix:r,encode:i,decode:n})=>new A_(c,r,i,n),Ws=({prefix:c,name:r,alphabet:i})=>{const{encode:n,decode:o}=b_(i,r);return mo({prefix:c,name:r,encode:n,decode:h=>vf(o(h))})},C_=(c,r,i,n)=>{const o={};for(let F=0;F=8&&(y-=8,d[A++]=255&w>>y)}if(y>=i||255&w<<8-y)throw new SyntaxError("Unexpected end of data");return d},O_=(c,r,i)=>{const n=r[r.length-1]==="=",o=(1<i;)d-=i,h+=r[o&y>>d];if(d&&(h+=r[o&y<mo({prefix:r,name:c,encode(o){return O_(o,n,i)},decode(o){return C_(o,n,i,c)}}),R_=mo({prefix:"\0",name:"identity",encode:c=>x_(c),decode:c=>E_(c)});var T_=Object.freeze({__proto__:null,identity:R_});const N_=Vt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var L_=Object.freeze({__proto__:null,base2:N_});const D_=Vt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var F_=Object.freeze({__proto__:null,base8:D_});const $_=Ws({prefix:"9",name:"base10",alphabet:"0123456789"});var j_=Object.freeze({__proto__:null,base10:$_});const M_=Vt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),U_=Vt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var q_=Object.freeze({__proto__:null,base16:M_,base16upper:U_});const z_=Vt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),k_=Vt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),H_=Vt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),B_=Vt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),V_=Vt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),K_=Vt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),G_=Vt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),W_=Vt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),J_=Vt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var Y_=Object.freeze({__proto__:null,base32:z_,base32upper:k_,base32pad:H_,base32padupper:B_,base32hex:V_,base32hexupper:K_,base32hexpad:G_,base32hexpadupper:W_,base32z:J_});const X_=Ws({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Z_=Ws({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Q_=Object.freeze({__proto__:null,base36:X_,base36upper:Z_});const ew=Ws({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),tw=Ws({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var rw=Object.freeze({__proto__:null,base58btc:ew,base58flickr:tw});const iw=Vt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),sw=Vt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),nw=Vt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),ow=Vt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var aw=Object.freeze({__proto__:null,base64:iw,base64pad:sw,base64url:nw,base64urlpad:ow});const mf=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),cw=mf.reduce((c,r,i)=>(c[i]=r,c),[]),uw=mf.reduce((c,r,i)=>(c[r.codePointAt(0)]=i,c),[]);function hw(c){return c.reduce((r,i)=>(r+=cw[i],r),"")}function lw(c){const r=[];for(const i of c){const n=uw[i.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${i}`);r.push(n)}return new Uint8Array(r)}const fw=mo({prefix:"🚀",name:"base256emoji",encode:hw,decode:lw});var pw=Object.freeze({__proto__:null,base256emoji:fw}),dw=_f,sl=128,gw=127,vw=~gw,yw=Math.pow(2,31);function _f(c,r,i){r=r||[],i=i||0;for(var n=i;c>=yw;)r[i++]=c&255|sl,c/=128;for(;c&vw;)r[i++]=c&255|sl,c>>>=7;return r[i]=c|0,_f.bytes=i-n+1,r}var mw=cc,_w=128,nl=127;function cc(c,n){var i=0,n=n||0,o=0,h=n,d,y=c.length;do{if(h>=y)throw cc.bytes=0,new RangeError("Could not decode varint");d=c[h++],i+=o<28?(d&nl)<=_w);return cc.bytes=h-n,i}var ww=Math.pow(2,7),bw=Math.pow(2,14),Ew=Math.pow(2,21),xw=Math.pow(2,28),Iw=Math.pow(2,35),Sw=Math.pow(2,42),Pw=Math.pow(2,49),Aw=Math.pow(2,56),Cw=Math.pow(2,63),Ow=function(c){return c(wf.encode(c,r,i),r),al=c=>wf.encodingLength(c),uc=(c,r)=>{const i=r.byteLength,n=al(c),o=n+al(i),h=new Uint8Array(o+i);return ol(c,h,0),ol(i,h,n),h.set(r,o),new Tw(c,i,r,h)};class Tw{constructor(r,i,n,o){this.code=r,this.size=i,this.digest=n,this.bytes=o}}const bf=({name:c,code:r,encode:i})=>new Nw(c,r,i);class Nw{constructor(r,i,n){this.name=r,this.code=i,this.encode=n}digest(r){if(r instanceof Uint8Array){const i=this.encode(r);return i instanceof Uint8Array?uc(this.code,i):i.then(n=>uc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const Ef=c=>async r=>new Uint8Array(await crypto.subtle.digest(c,r)),Lw=bf({name:"sha2-256",code:18,encode:Ef("SHA-256")}),Dw=bf({name:"sha2-512",code:19,encode:Ef("SHA-512")});var Fw=Object.freeze({__proto__:null,sha256:Lw,sha512:Dw});const xf=0,$w="identity",If=vf,jw=c=>uc(xf,If(c)),Mw={code:xf,name:$w,encode:If,digest:jw};var Uw=Object.freeze({__proto__:null,identity:Mw});new TextEncoder,new TextDecoder;const cl={...T_,...L_,...F_,...j_,...q_,...Y_,...Q_,...rw,...aw,...pw};({...Fw,...Uw});function Sf(c){return globalThis.Buffer!=null?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):c}function qw(c=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Sf(globalThis.Buffer.allocUnsafe(c)):new Uint8Array(c)}function Pf(c,r,i,n){return{name:c,prefix:r,encoder:{name:c,prefix:r,encode:i},decoder:{decode:n}}}const ul=Pf("utf8","u",c=>"u"+new TextDecoder("utf8").decode(c),c=>new TextEncoder().encode(c.substring(1))),Xa=Pf("ascii","a",c=>{let r="a";for(let i=0;i{c=c.substring(1);const r=qw(c.length);for(let i=0;i{if(!this.initialized){const n=await this.getKeyChain();typeof n<"u"&&(this.keychain=n),this.initialized=!0}},this.has=n=>(this.isInitialized(),this.keychain.has(n)),this.set=async(n,o)=>{this.isInitialized(),this.keychain.set(n,o),await this.persist()},this.get=n=>{this.isInitialized();const o=this.keychain.get(n);if(typeof o>"u"){const{message:h}=Q("NO_MATCHING_KEY",`${this.name}: ${n}`);throw new Error(h)}return o},this.del=async n=>{this.isInitialized(),this.keychain.delete(n),await this.persist()},this.core=r,this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(r){await this.core.storage.setItem(this.storageKey,Hl(r))}async getKeyChain(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?Bl(r):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class mb{constructor(r,i,n){this.core=r,this.logger=i,this.name=Kw,this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=o=>(this.isInitialized(),this.keychain.has(o)),this.getClientId=async()=>{this.isInitialized();const o=await this.getClientSeed(),h=Yh(o);return cf(h.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=_1();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const h=await this.getClientSeed(),d=Yh(h),y=oc();return await Jm(y,o,Gw,d)},this.generateSharedKey=(o,h,d)=>{this.isInitialized();const y=this.getPrivateKey(o),w=w1(y,h);return this.setSymKey(w,d)},this.setSymKey=async(o,h)=>{this.isInitialized();const d=h||b1(o);return await this.keychain.set(d,o),d},this.deleteKeyPair=async o=>{this.isInitialized(),await this.keychain.del(o)},this.deleteSymKey=async o=>{this.isInitialized(),await this.keychain.del(o)},this.encode=async(o,h,d)=>{this.isInitialized();const y=E1(d),w=Ks(h);if(Oh(y)){const J=y.senderPublicKey,G=y.receiverPublicKey;o=await this.generateSharedKey(J,G)}const A=this.getSymKey(o),{type:F,senderPublicKey:K}=y;return x1({type:F,symKey:A,message:w,senderPublicKey:K})},this.decode=async(o,h,d)=>{this.isInitialized();const y=I1(h,d);if(Oh(y)){const F=y.receiverPublicKey,K=y.senderPublicKey;o=await this.generateSharedKey(F,K)}const w=this.getSymKey(o),A=S1({symKey:w,encoded:h});return _c(A)},this.getPayloadType=o=>{const h=Rh(o);return P1(h.type)},this.getPayloadSenderPublicKey=o=>{const h=Rh(o);return h.senderPublicKey?lo(h.senderPublicKey,A1):void 0},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.keychain=n||new yb(this.core,this.logger)}get context(){return Re.getLoggerContext(this.logger)}async setPrivateKey(r,i){return await this.keychain.set(r,i),r}getPrivateKey(r){return this.keychain.get(r)}async getClientSeed(){let r="";try{r=this.keychain.get(hl)}catch{r=oc(),await this.keychain.set(hl,r)}return kw(r,"base16")}getSymKey(r){return this.keychain.get(r)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class _b extends Sm{constructor(r,i){super(r,i),this.logger=r,this.core=i,this.messages=new Map,this.name=Yw,this.version=Xw,this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{if(!this.initialized){this.logger.trace("Initialized");try{const n=await this.getRelayerMessages();typeof n<"u"&&(this.messages=n),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(n){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(n)}finally{this.initialized=!0}}},this.set=async(n,o)=>{this.isInitialized();const h=ls(o);let d=this.messages.get(n);return typeof d>"u"&&(d={}),typeof d[h]<"u"||(d[h]=o,this.messages.set(n,d),await this.persist()),h},this.get=n=>{this.isInitialized();let o=this.messages.get(n);return typeof o>"u"&&(o={}),o},this.has=(n,o)=>{this.isInitialized();const h=this.get(n),d=ls(o);return typeof h[d]<"u"},this.del=async n=>{this.isInitialized(),this.messages.delete(n),await this.persist()},this.logger=Re.generateChildLogger(r,this.name),this.core=i}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(r){await this.core.storage.setItem(this.storageKey,Hl(r))}async getRelayerMessages(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?Bl(r):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class wb extends Pm{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.events=new vr.EventEmitter,this.name=Qw,this.queue=new Map,this.publishTimeout=ne.toMiliseconds(ne.TEN_SECONDS),this.queueTimeout=ne.toMiliseconds(ne.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(n,o,h)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:h}});try{const d=(h==null?void 0:h.ttl)||Zw,y=ac(h),w=(h==null?void 0:h.prompt)||!1,A=(h==null?void 0:h.tag)||0,F=(h==null?void 0:h.id)||Ec().toString(),K={topic:n,message:o,opts:{ttl:d,relay:y,prompt:w,tag:A,id:F}},J=setTimeout(()=>this.queue.set(F,K),this.queueTimeout);try{await await ao(this.rpcPublish(n,o,d,y,w,A,F),this.publishTimeout),clearTimeout(J),this.relayer.events.emit(mt.publish,K)}catch{this.logger.debug("Publishing Payload stalled"),this.needsTransportRestart=!0;return}this.logger.debug("Successfully Published Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:n,message:o,opts:h}})}catch(d){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(d),d}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.relayer=r,this.logger=Re.generateChildLogger(i,this.name),this.registerEventListeners()}get context(){return Re.getLoggerContext(this.logger)}rpcPublish(r,i,n,o,h,d,y){var w,A,F,K;const J={method:io(o.protocol).publish,params:{topic:r,message:i,ttl:n,prompt:h,tag:d},id:y};return _i((w=J.params)==null?void 0:w.prompt)&&((A=J.params)==null||delete A.prompt),_i((F=J.params)==null?void 0:F.tag)&&((K=J.params)==null||delete K.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:J}),this.relayer.request(J)}onPublish(r){this.queue.delete(r)}checkQueue(){this.queue.forEach(async r=>{const{topic:i,message:n,opts:o}=r;await this.publish(i,n,o)})}registerEventListeners(){this.relayer.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(mt.connection_stalled);return}this.checkQueue()}),this.relayer.on(mt.message_ack,r=>{this.onPublish(r.id.toString())})}}class bb{constructor(){this.map=new Map,this.set=(r,i)=>{const n=this.get(r);this.exists(r,i)||this.map.set(r,[...n,i])},this.get=r=>this.map.get(r)||[],this.exists=(r,i)=>this.get(r).includes(i),this.delete=(r,i)=>{if(typeof i>"u"){this.map.delete(r);return}if(!this.map.has(r))return;const n=this.get(r);if(!this.exists(r,i))return;const o=n.filter(h=>h!==i);if(!o.length){this.map.delete(r);return}this.map.set(r,o)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var Eb=Object.defineProperty,xb=Object.defineProperties,Ib=Object.getOwnPropertyDescriptors,pl=Object.getOwnPropertySymbols,Sb=Object.prototype.hasOwnProperty,Pb=Object.prototype.propertyIsEnumerable,dl=(c,r,i)=>r in c?Eb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,zs=(c,r)=>{for(var i in r||(r={}))Sb.call(r,i)&&dl(c,i,r[i]);if(pl)for(var i of pl(r))Pb.call(r,i)&&dl(c,i,r[i]);return c},Qa=(c,r)=>xb(c,Ib(r));class Ab extends Om{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.subscriptions=new Map,this.topicMap=new bb,this.events=new vr.EventEmitter,this.name=cb,this.version=ub,this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=wi,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restart(),this.registerEventListeners(),this.onEnable(),this.clientId=await this.relayer.core.crypto.getClientId())},this.subscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}});try{const h=ac(o),d={topic:n,relay:h};this.pending.set(n,d);const y=await this.rpcSubscribe(n,h);return this.onSubscribe(y,d),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:n,opts:o}}),y}catch(h){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(h),h}},this.unsubscribe=async(n,o)=>{await this.restartToComplete(),this.isInitialized(),typeof(o==null?void 0:o.id)<"u"?await this.unsubscribeById(n,o.id,o):await this.unsubscribeByTopic(n,o)},this.isSubscribed=async n=>this.topics.includes(n)?!0:await new Promise((o,h)=>{const d=new ne.Watch;d.start(this.pendingSubscriptionWatchLabel);const y=setInterval(()=>{!this.pending.has(n)&&this.topics.includes(n)&&(clearInterval(y),d.stop(this.pendingSubscriptionWatchLabel),o(!0)),d.elapsed(this.pendingSubscriptionWatchLabel)>=hb&&(clearInterval(y),d.stop(this.pendingSubscriptionWatchLabel),h(new Error("Subscription resolution timeout")))},this.pollingInterval)}).catch(()=>!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=r,this.logger=Re.generateChildLogger(i,this.name),this.clientId=""}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(r,i){let n=!1;try{n=this.getSubscription(r).topic===i}catch{}return n}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(r,i){const n=this.topicMap.get(r);await Promise.all(n.map(async o=>await this.unsubscribeById(r,o,i)))}async unsubscribeById(r,i,n){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:n}});try{const o=ac(n);await this.rpcUnsubscribe(r,i,o);const h=tr("USER_DISCONNECTED",`${this.name}, ${r}`);await this.onUnsubscribe(r,i,h),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:r,id:i,opts:n}})}catch(o){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(o),o}}async rpcSubscribe(r,i){const n={method:io(i.protocol).subscribe,params:{topic:r}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await ao(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}return ls(r+this.clientId)}async rpcBatchSubscribe(r){if(!r.length)return;const i=r[0].relay,n={method:io(i.protocol).batchSubscribe,params:{topics:r.map(o=>o.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{return await await ao(this.relayer.request(n),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(mt.connection_stalled)}}rpcUnsubscribe(r,i,n){const o={method:io(n.protocol).unsubscribe,params:{topic:r,id:i}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:o}),this.relayer.request(o)}onSubscribe(r,i){this.setSubscription(r,Qa(zs({},i),{id:r})),this.pending.delete(i.topic)}onBatchSubscribe(r){r.length&&r.forEach(i=>{this.setSubscription(i.id,zs({},i)),this.pending.delete(i.topic)})}async onUnsubscribe(r,i,n){this.events.removeAllListeners(i),this.hasSubscription(i,r)&&this.deleteSubscription(i,n),await this.relayer.messages.del(r)}async setRelayerSubscriptions(r){await this.relayer.core.storage.setItem(this.storageKey,r)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(r,i){this.subscriptions.has(r)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:r,subscription:i}),this.addSubscription(r,i))}addSubscription(r,i){this.subscriptions.set(r,zs({},i)),this.topicMap.set(i.topic,r),this.events.emit(Vr.created,i)}getSubscription(r){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:r});const i=this.subscriptions.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(n)}return i}deleteSubscription(r,i){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:r,reason:i});const n=this.getSubscription(r);this.subscriptions.delete(r),this.topicMap.delete(n.topic,r),this.events.emit(Vr.deleted,Qa(zs({},n),{reason:i}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Vr.sync)}async reset(){if(this.cached.length){const r=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let i=0;i"u"||!r.length)return;if(this.subscriptions.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(r){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(r)}}async batchSubscribe(r){if(!r.length)return;const i=await this.rpcBatchSubscribe(r);ps(i)&&this.onBatchSubscribe(i.map((n,o)=>Qa(zs({},r[o]),{id:n})))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const r=[];this.pending.forEach(i=>{r.push(i)}),await this.batchSubscribe(r)}registerEventListeners(){this.relayer.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,async()=>{await this.checkPending()}),this.relayer.on(mt.connect,async()=>{await this.onConnect()}),this.relayer.on(mt.disconnect,()=>{this.onDisconnect()}),this.events.on(Vr.created,async r=>{const i=Vr.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()}),this.events.on(Vr.deleted,async r=>{const i=Vr.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),await this.persist()})}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}async restartToComplete(){this.restartInProgress&&await new Promise(r=>{const i=setInterval(()=>{this.restartInProgress||(clearInterval(i),r())},this.pollingInterval)})}}var Cb=Object.defineProperty,gl=Object.getOwnPropertySymbols,Ob=Object.prototype.hasOwnProperty,Rb=Object.prototype.propertyIsEnumerable,vl=(c,r,i)=>r in c?Cb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Tb=(c,r)=>{for(var i in r||(r={}))Ob.call(r,i)&&vl(c,i,r[i]);if(gl)for(var i of gl(r))Rb.call(r,i)&&vl(c,i,r[i]);return c};class Nb extends Am{constructor(r){super(r),this.protocol="wc",this.version=2,this.events=new vr.EventEmitter,this.name=tb,this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=async i=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(i)}catch(n){throw this.logger.debug("Failed to Publish Request"),this.logger.error(n),n}},this.core=r.core,this.logger=typeof r.logger<"u"&&typeof r.logger!="string"?Re.generateChildLogger(r.logger,this.name):Re.pino(Re.getDefaultLoggerOptions({level:r.logger||eb})),this.messages=new _b(this.logger,r.core),this.subscriber=new Ab(this,this.logger),this.publisher=new wb(this,this.logger),this.relayUrl=(r==null?void 0:r.relayUrl)||Of,this.projectId=r.projectId,this.provider={}}async init(){this.logger.trace("Initialized"),await this.createProvider(),await Promise.all([this.messages.init(),this.subscriber.init()]);try{await this.transportOpen()}catch{this.logger.warn(`Connection via ${this.relayUrl} failed, attempting to connect via failover domain ${ll}...`),await this.restartTransport(ll)}this.registerEventListeners(),this.initialized=!0,setTimeout(async()=>{this.subscriber.topics.length===0&&(this.logger.info("No topics subscribed to after init, closing transport"),await this.transportClose(),this.transportExplicitlyClosed=!1)},nb)}get context(){return Re.getLoggerContext(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(r,i,n){this.isInitialized(),await this.publisher.publish(r,i,n),await this.recordMessageEvent({topic:r,message:i,publishedAt:Date.now()})}async subscribe(r,i){var n;this.isInitialized();let o=((n=this.subscriber.topicMap.get(r))==null?void 0:n[0])||"";return o||(await Promise.all([new Promise(h=>{this.subscriber.once(Vr.created,d=>{d.topic===r&&h()})}),new Promise(async h=>{o=await this.subscriber.subscribe(r,i),h()})]),o)}async unsubscribe(r,i){this.isInitialized(),await this.subscriber.unsubscribe(r,i)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(mt.transport_closed))}async transportOpen(r){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=r||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise(i=>{this.initialized||i(),this.subscriber.once(Vr.resubscribed,()=>{i()})}),await Promise.race([new Promise(async(i,n)=>{await ao(this.provider.connect(),5e3,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(o=>n(o)).then(()=>i()).finally(()=>this.removeListener(mt.transport_closed,this.rejectTransportOpen))}),new Promise(i=>this.once(mt.transport_closed,this.rejectTransportOpen))])])}catch(i){this.logger.error(i);const n=i;if(!this.isConnectionStalled(n.message))throw i;this.events.emit(mt.transport_closed)}finally{this.reconnecting=!1}}}async restartTransport(r){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=r||this.relayUrl,this.connected&&await Promise.all([new Promise(i=>{this.provider.once(Us.disconnect,()=>{i()})}),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(r){return this.staleConnectionErrors.some(i=>r.includes(i))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const r=await this.core.crypto.signJWT(this.relayUrl);this.provider=new Ei(new v_(C1({sdkVersion:sb,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:r,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(r){const{topic:i,message:n}=r;await this.messages.set(i,n)}async shouldIgnoreMessageEvent(r){const{topic:i,message:n}=r;return await this.subscriber.isSubscribed(i)?this.messages.has(i,n):!0}async onProviderPayload(r){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:r}),Ic(r)){if(!r.method.endsWith(rb))return;const i=r.params,{topic:n,message:o,publishedAt:h}=i.data,d={topic:n,message:o,publishedAt:h};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(Tb({type:"event",event:i.id},d)),this.events.emit(i.id,d),await this.acknowledgePayload(r),await this.onMessageEvent(d)}else yo(r)&&this.events.emit(mt.message_ack,r)}async onMessageEvent(r){await this.shouldIgnoreMessageEvent(r)||(this.events.emit(mt.message,r),await this.recordMessageEvent(r))}async acknowledgePayload(r){const i=xc(r.id,!0);await this.provider.connection.send(i)}registerProviderListeners(){this.provider.on(Us.payload,r=>this.onProviderPayload(r)),this.provider.on(Us.connect,()=>{this.events.emit(mt.connect)}),this.provider.on(Us.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Us.error,r=>{this.logger.error(r),this.events.emit(mt.error,r)})}registerEventListeners(){this.events.on(mt.connection_stalled,async()=>{await this.restartTransport()})}onProviderDisconnect(){this.events.emit(mt.disconnect),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout(async()=>{await this.restartTransport()},ne.toMiliseconds(ib))}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise(r=>{const i=setInterval(()=>{this.connected&&(clearInterval(i),r())},this.connectionStatusPollingInterval)});await this.restartTransport()}}}var Lb=Object.defineProperty,yl=Object.getOwnPropertySymbols,Db=Object.prototype.hasOwnProperty,Fb=Object.prototype.propertyIsEnumerable,ml=(c,r,i)=>r in c?Lb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,_l=(c,r)=>{for(var i in r||(r={}))Db.call(r,i)&&ml(c,i,r[i]);if(yl)for(var i of yl(r))Fb.call(r,i)&&ml(c,i,r[i]);return c};class _o extends Cm{constructor(r,i,n,o=wi,h=void 0){super(r,i,n,o),this.core=r,this.logger=i,this.name=n,this.map=new Map,this.version=ob,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(d=>{this.getKey&&d!==null&&!_i(d)?this.map.set(this.getKey(d),d):y1(d)?this.map.set(d.id,d):m1(d)&&this.map.set(d.topic,d)}),this.cached=[],this.initialized=!0)},this.set=async(d,y)=>{this.isInitialized(),this.map.has(d)?await this.update(d,y):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:d,value:y}),this.map.set(d,y),await this.persist())},this.get=d=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:d}),this.getData(d)),this.getAll=d=>(this.isInitialized(),d?this.values.filter(y=>Object.keys(d).every(w=>m_(y[w],d[w]))):this.values),this.update=async(d,y)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:d,update:y});const w=_l(_l({},this.getData(d)),y);this.map.set(d,w),await this.persist()},this.delete=async(d,y)=>{this.isInitialized(),this.map.has(d)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:d,reason:y}),this.map.delete(d),await this.persist())},this.logger=Re.generateChildLogger(i,this.name),this.storagePrefix=o,this.getKey=h}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}async setDataStore(r){await this.core.storage.setItem(this.storageKey,r)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(r){const i=this.map.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(n),new Error(n)}return i}async persist(){await this.setDataStore(this.values)}async restore(){try{const r=await this.getDataStore();if(typeof r>"u"||!r.length)return;if(this.map.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(r){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(r)}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class $b{constructor(r,i){this.core=r,this.logger=i,this.name=lb,this.version=fb,this.events=new mc,this.initialized=!1,this.storagePrefix=wi,this.ignoredPayloadTypes=[ql],this.registeredMethods=[],this.init=async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))},this.register=({methods:n})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...n])]},this.create=async()=>{this.isInitialized();const n=oc(),o=await this.core.crypto.setSymKey(n),h=Fr(ne.FIVE_MINUTES),d={protocol:Cf},y={topic:o,expiry:h,relay:d,active:!1},w=O1({protocol:this.core.protocol,version:this.core.version,topic:o,symKey:n,relay:d});return await this.pairings.set(o,y),await this.core.relayer.subscribe(o),this.core.expirer.set(o,h),{topic:o,uri:w}},this.pair=async n=>{this.isInitialized(),this.isValidPair(n);const{topic:o,symKey:h,relay:d}=R1(n.uri);if(this.pairings.keys.includes(o))throw new Error(`Pairing already exists: ${o}`);if(this.core.crypto.hasKeys(o))throw new Error(`Keychain already exists: ${o}`);const y=Fr(ne.FIVE_MINUTES),w={topic:o,relay:d,expiry:y,active:!1};return await this.pairings.set(o,w),await this.core.crypto.setSymKey(h,o),await this.core.relayer.subscribe(o,{relay:d}),this.core.expirer.set(o,y),n.activatePairing&&await this.activate({topic:o}),w},this.activate=async({topic:n})=>{this.isInitialized();const o=Fr(ne.THIRTY_DAYS);await this.pairings.update(n,{active:!0,expiry:o}),this.core.expirer.set(n,o)},this.ping=async n=>{this.isInitialized(),await this.isValidPing(n);const{topic:o}=n;if(this.pairings.keys.includes(o)){const h=await this.sendRequest(o,"wc_pairingPing",{}),{done:d,resolve:y,reject:w}=cs();this.events.once(Ft("pairing_ping",h),({error:A})=>{A?w(A):y()}),await d()}},this.updateExpiry=async({topic:n,expiry:o})=>{this.isInitialized(),await this.pairings.update(n,{expiry:o})},this.updateMetadata=async({topic:n,metadata:o})=>{this.isInitialized(),await this.pairings.update(n,{peerMetadata:o})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async n=>{this.isInitialized(),await this.isValidDisconnect(n);const{topic:o}=n;this.pairings.keys.includes(o)&&(await this.sendRequest(o,"wc_pairingDelete",tr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,h)=>{const d=go(o,h),y=await this.core.crypto.encode(n,d),w=qs[o].req;return this.core.history.set(n,d),this.core.relayer.publish(n,y,w),d.id},this.sendResult=async(n,o,h)=>{const d=xc(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=qs[w.request.method].res;await this.core.relayer.publish(o,y,A),await this.core.history.resolve(d)},this.sendError=async(n,o,h)=>{const d=vo(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=qs[w.request.method]?qs[w.request.method].res:qs.unregistered_method.res;await this.core.relayer.publish(o,y,A),await this.core.history.resolve(d)},this.deletePairing=async(n,o)=>{await this.core.relayer.unsubscribe(n),await Promise.all([this.pairings.delete(n,tr("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(n),o?Promise.resolve():this.core.expirer.del(n)])},this.cleanup=async()=>{const n=this.pairings.getAll().filter(o=>mi(o.expiry));await Promise.all(n.map(o=>this.deletePairing(o.topic)))},this.onRelayEventRequest=n=>{const{topic:o,payload:h}=n,d=h.method;if(this.pairings.keys.includes(o))switch(d){case"wc_pairingPing":return this.onPairingPingRequest(o,h);case"wc_pairingDelete":return this.onPairingDeleteRequest(o,h);default:return this.onUnknownRpcMethodRequest(o,h)}},this.onRelayEventResponse=async n=>{const{topic:o,payload:h}=n,d=(await this.core.history.get(o,h.id)).request.method;if(this.pairings.keys.includes(o))switch(d){case"wc_pairingPing":return this.onPairingPingResponse(o,h);default:return this.onUnknownRpcMethodResponse(d)}},this.onPairingPingRequest=async(n,o)=>{const{id:h}=o;try{this.isValidPing({topic:n}),await this.sendResult(h,n,!0),this.events.emit("pairing_ping",{id:h,topic:n})}catch(d){await this.sendError(h,n,d),this.logger.error(d)}},this.onPairingPingResponse=(n,o)=>{const{id:h}=o;setTimeout(()=>{oi(o)?this.events.emit(Ft("pairing_ping",h),{}):$r(o)&&this.events.emit(Ft("pairing_ping",h),{error:o.error})},500)},this.onPairingDeleteRequest=async(n,o)=>{const{id:h}=o;try{this.isValidDisconnect({topic:n}),await this.deletePairing(n),this.events.emit("pairing_delete",{id:h,topic:n})}catch(d){await this.sendError(h,n,d),this.logger.error(d)}},this.onUnknownRpcMethodRequest=async(n,o)=>{const{id:h,method:d}=o;try{if(this.registeredMethods.includes(d))return;const y=tr("WC_METHOD_UNSUPPORTED",d);await this.sendError(h,n,y),this.logger.error(y)}catch(y){await this.sendError(h,n,y),this.logger.error(y)}},this.onUnknownRpcMethodResponse=n=>{this.registeredMethods.includes(n)||this.logger.error(tr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!cr(n)){const{message:o}=Q("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!T1(n.uri)){const{message:o}=Q("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!cr(n)){const{message:h}=Q("MISSING_OR_INVALID",`ping() params: ${n}`);throw new Error(h)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidDisconnect=async n=>{if(!cr(n)){const{message:h}=Q("MISSING_OR_INVALID",`disconnect() params: ${n}`);throw new Error(h)}const{topic:o}=n;await this.isValidPairingTopic(o)},this.isValidPairingTopic=async n=>{if(!us(n,!1)){const{message:o}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${n}`);throw new Error(o)}if(!this.pairings.keys.includes(n)){const{message:o}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${n}`);throw new Error(o)}if(mi(this.pairings.get(n).expiry)){await this.deletePairing(n);const{message:o}=Q("EXPIRED",`pairing topic: ${n}`);throw new Error(o)}},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.pairings=new _o(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Re.getLoggerContext(this.logger)}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}registerRelayerEvents(){this.core.relayer.on(mt.message,async r=>{const{topic:i,message:n}=r;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(n)))return;const o=await this.core.crypto.decode(i,n);Ic(o)?(this.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):yo(o)&&(await this.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.core.history.delete(i,o.id))})}registerExpirerEvents(){this.core.expirer.on(Ar.expired,async r=>{const{topic:i}=zl(r.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit("pairing_expire",{topic:i}))})}}class jb extends Im{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.records=new Map,this.events=new vr.EventEmitter,this.name=pb,this.version=db,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.records.set(n.id,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(n,o,h)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:n,request:o,chainId:h}),this.records.has(o.id))return;const d={id:o.id,topic:n,request:{method:o.method,params:o.params||null},chainId:h,expiry:Fr(ne.THIRTY_DAYS)};this.records.set(d.id,d),this.events.emit(Br.created,d)},this.resolve=async n=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:n}),!this.records.has(n.id))return;const o=await this.getRecord(n.id);typeof o.response>"u"&&(o.response=$r(n)?{error:n.error}:{result:n.result},this.records.set(o.id,o),this.events.emit(Br.updated,o))},this.get=async(n,o)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:n,id:o}),await this.getRecord(o)),this.delete=(n,o)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:o}),this.values.forEach(h=>{if(h.topic===n){if(typeof o<"u"&&h.id!==o)return;this.records.delete(h.id),this.events.emit(Br.deleted,h)}})},this.exists=async(n,o)=>(this.isInitialized(),this.records.has(o)?(await this.getRecord(o)).topic===n:!1),this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const r=[];return this.values.forEach(i=>{if(typeof i.response<"u")return;const n={topic:i.topic,request:go(i.request.method,i.request.params,i.id),chainId:i.chainId};return r.push(n)}),r}async setJsonRpcRecords(r){await this.core.storage.setItem(this.storageKey,r)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(r){this.isInitialized();const i=this.records.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw new Error(n)}return i}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(Br.sync)}async restore(){try{const r=await this.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(this.records.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(r){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(r)}}registerEventListeners(){this.events.on(Br.created,r=>{const i=Br.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(Br.updated,r=>{const i=Br.updated;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.events.on(Br.deleted,r=>{const i=Br.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,record:r}),this.persist()}),this.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>{this.cleanup()})}cleanup(){try{this.records.forEach(r=>{ne.toMiliseconds(r.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${r.id}`),this.delete(r.topic,r.id))})}catch(r){this.logger.warn(r)}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class Mb extends Rm{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.expirations=new Map,this.events=new vr.EventEmitter,this.name=gb,this.version=vb,this.cached=[],this.initialized=!1,this.storagePrefix=wi,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(n=>this.expirations.set(n.target,n)),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=n=>{try{const o=this.formatTarget(n);return typeof this.getExpiration(o)<"u"}catch{return!1}},this.set=(n,o)=>{this.isInitialized();const h=this.formatTarget(n),d={target:h,expiry:o};this.expirations.set(h,d),this.checkExpiry(h,d),this.events.emit(Ar.created,{target:h,expiration:d})},this.get=n=>{this.isInitialized();const o=this.formatTarget(n);return this.getExpiration(o)},this.del=n=>{if(this.isInitialized(),this.has(n)){const o=this.formatTarget(n),h=this.getExpiration(o);this.expirations.delete(o),this.events.emit(Ar.deleted,{target:o,expiration:h})}},this.on=(n,o)=>{this.events.on(n,o)},this.once=(n,o)=>{this.events.once(n,o)},this.off=(n,o)=>{this.events.off(n,o)},this.removeListener=(n,o)=>{this.events.removeListener(n,o)},this.logger=Re.generateChildLogger(i,this.name)}get context(){return Re.getLoggerContext(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(r){if(typeof r=="string")return N1(r);if(typeof r=="number")return L1(r);const{message:i}=Q("UNKNOWN_TYPE",`Target type: ${typeof r}`);throw new Error(i)}async setExpirations(r){await this.core.storage.setItem(this.storageKey,r)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Ar.sync)}async restore(){try{const r=await this.getExpirations();if(typeof r>"u"||!r.length)return;if(this.expirations.size){const{message:i}=Q("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(i),new Error(i)}this.cached=r,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(r){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(r)}}getExpiration(r){const i=this.expirations.get(r);if(!i){const{message:n}=Q("NO_MATCHING_KEY",`${this.name}: ${r}`);throw this.logger.error(n),new Error(n)}return i}checkExpiry(r,i){const{expiry:n}=i;ne.toMiliseconds(n)-Date.now()<=0&&this.expire(r,i)}expire(r,i){this.expirations.delete(r),this.events.emit(Ar.expired,{target:r,expiration:i})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((r,i)=>this.checkExpiry(i,r))}registerEventListeners(){this.core.heartbeat.on(ds.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on(Ar.created,r=>{const i=Ar.created;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(Ar.expired,r=>{const i=Ar.expired;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()}),this.events.on(Ar.deleted,r=>{const i=Ar.deleted;this.logger.info(`Emitting ${i}`),this.logger.debug({type:"event",event:i,data:r}),this.persist()})}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}}class Ub extends Tm{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.name=Za,this.initialized=!1,this.init=async n=>{D1()||!kl()||(this.verifyUrl=(n==null?void 0:n.verifyUrl)||fl,await this.createIframe())},this.register=async n=>{var o;if(this.initialized||await this.init(),!!this.iframe)try{(o=this.iframe.contentWindow)==null||o.postMessage(n.attestationId,this.verifyUrl),this.logger.info(`postMessage sent: ${n.attestationId} ${this.verifyUrl}`)}catch{}},this.resolve=async n=>{var o;if(this.isDevEnv)return"";this.logger.info(`resolving attestation: ${n.attestationId}`);const h=this.startAbortTimer(ne.FIVE_SECONDS),d=await fetch(`${this.verifyUrl}/attestation/${n.attestationId}`,{signal:this.abortController.signal});return clearTimeout(h),d.status===200?(o=await d.json())==null?void 0:o.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise((n,o)=>{if(document.getElementById(Za))return n();const h=document.createElement("iframe");h.setAttribute("id",Za),h.setAttribute("src",`${this.verifyUrl}/${this.projectId}`),h.style.display="none",h.addEventListener("load",()=>{this.initialized=!0,n()}),h.addEventListener("error",d=>{o(d)}),document.body.append(h),this.iframe=h}),new Promise(n=>{setTimeout(()=>n("iframe load timeout"),ne.toMiliseconds(ne.ONE_SECOND/2))})])}catch(n){this.logger.error(`Verify iframe failed to load: ${this.verifyUrl}`),this.logger.error(n)}},this.logger=Re.generateChildLogger(i,this.name),this.verifyUrl=fl,this.abortController=new AbortController,this.isDevEnv=F1()&&{}.IS_VITEST}get context(){return Re.getLoggerContext(this.logger)}startAbortTimer(r){return setTimeout(()=>this.abortController.abort(),ne.toMiliseconds(r))}}var qb=Object.defineProperty,wl=Object.getOwnPropertySymbols,zb=Object.prototype.hasOwnProperty,kb=Object.prototype.propertyIsEnumerable,bl=(c,r,i)=>r in c?qb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,El=(c,r)=>{for(var i in r||(r={}))zb.call(r,i)&&bl(c,i,r[i]);if(wl)for(var i of wl(r))kb.call(r,i)&&bl(c,i,r[i]);return c};class Pc extends xm{constructor(r){super(r),this.protocol=Af,this.version=Hw,this.name=Sc,this.events=new vr.EventEmitter,this.initialized=!1,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.projectId=r==null?void 0:r.projectId,this.relayUrl=(r==null?void 0:r.relayUrl)||Of;const i=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||Bw.logger}));this.logger=Re.generateChildLogger(i,this.name),this.heartbeat=new ds.HeartBeat,this.crypto=new mb(this,this.logger,r==null?void 0:r.keychain),this.history=new jb(this,this.logger),this.expirer=new Mb(this,this.logger),this.storage=r!=null&&r.storage?r.storage:new dm(El(El({},Vw),r==null?void 0:r.storageOptions)),this.relayer=new Nb({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new $b(this,this.logger),this.verify=new Ub(this.projectId||"",this.logger)}static async init(r){const i=new Pc(r);await i.initialize();const n=await i.crypto.getClientId();return await i.storage.setItem(ab,n),i}get context(){return Re.getLoggerContext(this.logger)}async start(){this.initialized||await this.initialize()}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.initialized=!0,this.logger.info("Core Initialization Success")}catch(r){throw this.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),this.logger.error(r.message),r}}}const Hb=Pc,Rf="wc",Tf=2,Nf="client",Ac=`${Rf}@${Tf}:${Nf}:`,ec={name:Nf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Bb="WALLETCONNECT_DEEPLINK_CHOICE",Vb="proposal",Lf="Proposal expired",Kb="session",eo=ne.SEVEN_DAYS,Gb="engine",ks={wc_sessionPropose:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1104},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1106},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:ne.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:ne.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:ne.ONE_DAY,prompt:!1,tag:1112},res:{ttl:ne.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:ne.THIRTY_SECONDS,prompt:!1,tag:1115}}},tc={min:ne.FIVE_MINUTES,max:ne.SEVEN_DAYS},Wb="request",Jb=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Yb=Object.defineProperty,Xb=Object.defineProperties,Zb=Object.getOwnPropertyDescriptors,xl=Object.getOwnPropertySymbols,Qb=Object.prototype.hasOwnProperty,eE=Object.prototype.propertyIsEnumerable,Il=(c,r,i)=>r in c?Yb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Pr=(c,r)=>{for(var i in r||(r={}))Qb.call(r,i)&&Il(c,i,r[i]);if(xl)for(var i of xl(r))eE.call(r,i)&&Il(c,i,r[i]);return c},rc=(c,r)=>Xb(c,Zb(r));class tE extends Lm{constructor(r){super(r),this.name=Gb,this.events=new mc,this.initialized=!1,this.ignoredPayloadTypes=[ql],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(ks)}),this.initialized=!0)},this.connect=async i=>{this.isInitialized();const n=rc(Pr({},i),{requiredNamespaces:i.requiredNamespaces||{},optionalNamespaces:i.optionalNamespaces||{}});await this.isValidConnect(n);const{pairingTopic:o,requiredNamespaces:h,optionalNamespaces:d,sessionProperties:y,relays:w}=n;let A=o,F,K=!1;if(A&&(K=this.client.core.pairing.pairings.get(A).active),!A||!K){const{topic:pe,uri:he}=await this.client.core.pairing.create();A=pe,F=he}const J=await this.client.core.crypto.generateKeyPair(),G=Pr({requiredNamespaces:h,optionalNamespaces:d,relays:w??[{protocol:Cf}],proposer:{publicKey:J,metadata:this.client.metadata}},y&&{sessionProperties:y}),{reject:j,resolve:V,done:ie}=cs(ne.FIVE_MINUTES,Lf);if(this.events.once(Ft("session_connect"),async({error:pe,session:he})=>{if(pe)j(pe);else if(he){he.self.publicKey=J;const le=rc(Pr({},he),{requiredNamespaces:he.requiredNamespaces,optionalNamespaces:he.optionalNamespaces});await this.client.session.set(he.topic,le),await this.setExpiry(he.topic,he.expiry),A&&await this.client.core.pairing.updateMetadata({topic:A,metadata:he.peer.metadata}),V(le)}}),!A){const{message:pe}=Q("NO_MATCHING_KEY",`connect() pairing topic: ${A}`);throw new Error(pe)}const Ee=await this.sendRequest(A,"wc_sessionPropose",G),ge=Fr(ne.FIVE_MINUTES);return await this.setProposal(Ee,Pr({id:Ee,expiry:ge},G)),{uri:F,approval:ie}},this.pair=async i=>(this.isInitialized(),await this.client.core.pairing.pair(i)),this.approve=async i=>{this.isInitialized(),await this.isValidApprove(i);const{id:n,relayProtocol:o,namespaces:h,sessionProperties:d}=i,y=this.client.proposal.get(n);let{pairingTopic:w,proposer:A,requiredNamespaces:F,optionalNamespaces:K}=y;w=w||"",so(F)||(F=j1(h,"approve()"));const J=await this.client.core.crypto.generateKeyPair(),G=A.publicKey,j=await this.client.core.crypto.generateSharedKey(J,G);w&&n&&(await this.client.core.pairing.updateMetadata({topic:w,metadata:A.metadata}),await this.sendResult(n,w,{relay:{protocol:o??"irn"},responderPublicKey:J}),await this.client.proposal.delete(n,tr("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:w}));const V=Pr({relay:{protocol:o??"irn"},namespaces:h,requiredNamespaces:F,optionalNamespaces:K,pairingTopic:w,controller:{publicKey:J,metadata:this.client.metadata},expiry:Fr(eo)},d&&{sessionProperties:d});await this.client.core.relayer.subscribe(j),await this.sendRequest(j,"wc_sessionSettle",V);const ie=rc(Pr({},V),{topic:j,pairingTopic:w,acknowledged:!1,self:V.controller,peer:{publicKey:A.publicKey,metadata:A.metadata},controller:J});return await this.client.session.set(j,ie),await this.setExpiry(j,Fr(eo)),{topic:j,acknowledged:()=>new Promise(Ee=>setTimeout(()=>Ee(this.client.session.get(j)),500))}},this.reject=async i=>{this.isInitialized(),await this.isValidReject(i);const{id:n,reason:o}=i,{pairingTopic:h}=this.client.proposal.get(n);h&&(await this.sendError(n,h,o),await this.client.proposal.delete(n,tr("USER_DISCONNECTED")))},this.update=async i=>{this.isInitialized(),await this.isValidUpdate(i);const{topic:n,namespaces:o}=i,h=await this.sendRequest(n,"wc_sessionUpdate",{namespaces:o}),{done:d,resolve:y,reject:w}=cs();return this.events.once(Ft("session_update",h),({error:A})=>{A?w(A):y()}),await this.client.session.update(n,{namespaces:o}),{acknowledged:d}},this.extend=async i=>{this.isInitialized(),await this.isValidExtend(i);const{topic:n}=i,o=await this.sendRequest(n,"wc_sessionExtend",{}),{done:h,resolve:d,reject:y}=cs();return this.events.once(Ft("session_extend",o),({error:w})=>{w?y(w):d()}),await this.setExpiry(n,Fr(eo)),{acknowledged:h}},this.request=async i=>{this.isInitialized(),await this.isValidRequest(i);const{chainId:n,request:o,topic:h,expiry:d}=i,y=await this.sendRequest(h,"wc_sessionRequest",{request:o,chainId:n},d),{done:w,resolve:A,reject:F}=cs(d);this.events.once(Ft("session_request",y),({error:J,result:G})=>{J?F(J):A(G)}),this.client.events.emit("session_request_sent",{topic:h,request:o,chainId:n,id:y});const K=await this.client.core.storage.getItem(Bb);return M1({id:y,topic:h,wcDeepLink:K}),await w()},this.respond=async i=>{this.isInitialized(),await this.isValidRespond(i);const{topic:n,response:o}=i,{id:h}=o;oi(o)?await this.sendResult(h,n,o.result):$r(o)&&await this.sendError(h,n,o.error),this.deletePendingSessionRequest(i.response.id,{message:"fulfilled",code:0})},this.ping=async i=>{this.isInitialized(),await this.isValidPing(i);const{topic:n}=i;if(this.client.session.keys.includes(n)){const o=await this.sendRequest(n,"wc_sessionPing",{}),{done:h,resolve:d,reject:y}=cs();this.events.once(Ft("session_ping",o),({error:w})=>{w?y(w):d()}),await h()}else this.client.core.pairing.pairings.keys.includes(n)&&await this.client.core.pairing.ping({topic:n})},this.emit=async i=>{this.isInitialized(),await this.isValidEmit(i);const{topic:n,event:o,chainId:h}=i;await this.sendRequest(n,"wc_sessionEvent",{event:o,chainId:h})},this.disconnect=async i=>{this.isInitialized(),await this.isValidDisconnect(i);const{topic:n}=i;if(this.client.session.keys.includes(n)){const o=Ec().toString();let h;const d=y=>{(y==null?void 0:y.id.toString())===o&&(this.client.core.relayer.events.removeListener(mt.message_ack,d),h())};await Promise.all([new Promise(y=>{h=y,this.client.core.relayer.on(mt.message_ack,d)}),this.sendRequest(n,"wc_sessionDelete",tr("USER_DISCONNECTED"),void 0,o)]),await this.deleteSession(n)}else await this.client.core.pairing.disconnect({topic:n})},this.find=i=>(this.isInitialized(),this.client.session.getAll().filter(n=>U1(n,i))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async i=>{if(i.pairingTopic)try{const n=this.client.core.pairing.pairings.get(i.pairingTopic),o=this.client.core.pairing.pairings.getAll().filter(h=>{var d,y;return((d=h.peerMetadata)==null?void 0:d.url)&&((y=h.peerMetadata)==null?void 0:y.url)===i.peer.metadata.url&&h.topic&&h.topic!==n.topic});if(o.length===0)return;this.client.logger.info(`Cleaning up ${o.length} duplicate pairing(s)`),await Promise.all(o.map(h=>this.client.core.pairing.disconnect({topic:h.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(n){this.client.logger.error(n)}},this.deleteSession=async(i,n)=>{const{self:o}=this.client.session.get(i);await this.client.core.relayer.unsubscribe(i),this.client.session.delete(i,tr("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(o.publicKey)&&await this.client.core.crypto.deleteKeyPair(o.publicKey),this.client.core.crypto.keychain.has(i)&&await this.client.core.crypto.deleteSymKey(i),n||this.client.core.expirer.del(i)},this.deleteProposal=async(i,n)=>{await Promise.all([this.client.proposal.delete(i,tr("USER_DISCONNECTED")),n?Promise.resolve():this.client.core.expirer.del(i)])},this.deletePendingSessionRequest=async(i,n,o=!1)=>{await Promise.all([this.client.pendingRequest.delete(i,n),o?Promise.resolve():this.client.core.expirer.del(i)])},this.setExpiry=async(i,n)=>{this.client.session.keys.includes(i)&&await this.client.session.update(i,{expiry:n}),this.client.core.expirer.set(i,n)},this.setProposal=async(i,n)=>{await this.client.proposal.set(i,n),this.client.core.expirer.set(i,n.expiry)},this.setPendingSessionRequest=async i=>{const n=ks.wc_sessionRequest.req.ttl,{id:o,topic:h,params:d}=i;await this.client.pendingRequest.set(o,{id:o,topic:h,params:d}),n&&this.client.core.expirer.set(o,Fr(n))},this.sendRequest=async(i,n,o,h,d)=>{const y=go(n,o);if(kl()&&Jb.includes(n)){const F=ls(JSON.stringify(y));await this.client.core.verify.register({attestationId:F})}const w=await this.client.core.crypto.encode(i,y),A=ks[n].req;return h&&(A.ttl=h),d&&(A.id=d),this.client.core.history.set(i,y),this.client.core.relayer.publish(i,w,A),y.id},this.sendResult=async(i,n,o)=>{const h=xc(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=ks[y.request.method].res;this.client.core.relayer.publish(n,d,w),await this.client.core.history.resolve(h)},this.sendError=async(i,n,o)=>{const h=vo(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=ks[y.request.method].res;this.client.core.relayer.publish(n,d,w),await this.client.core.history.resolve(h)},this.cleanup=async()=>{const i=[],n=[];this.client.session.getAll().forEach(o=>{mi(o.expiry)&&i.push(o.topic)}),this.client.proposal.getAll().forEach(o=>{mi(o.expiry)&&n.push(o.id)}),await Promise.all([...i.map(o=>this.deleteSession(o)),...n.map(o=>this.deleteProposal(o))])},this.onRelayEventRequest=i=>{const{topic:n,payload:o}=i,h=o.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeRequest(n,o);case"wc_sessionSettle":return this.onSessionSettleRequest(n,o);case"wc_sessionUpdate":return this.onSessionUpdateRequest(n,o);case"wc_sessionExtend":return this.onSessionExtendRequest(n,o);case"wc_sessionPing":return this.onSessionPingRequest(n,o);case"wc_sessionDelete":return this.onSessionDeleteRequest(n,o);case"wc_sessionRequest":return this.onSessionRequest(n,o);case"wc_sessionEvent":return this.onSessionEventRequest(n,o);default:return this.client.logger.info(`Unsupported request method ${h}`)}},this.onRelayEventResponse=async i=>{const{topic:n,payload:o}=i,h=(await this.client.core.history.get(n,o.id)).request.method;switch(h){case"wc_sessionPropose":return this.onSessionProposeResponse(n,o);case"wc_sessionSettle":return this.onSessionSettleResponse(n,o);case"wc_sessionUpdate":return this.onSessionUpdateResponse(n,o);case"wc_sessionExtend":return this.onSessionExtendResponse(n,o);case"wc_sessionPing":return this.onSessionPingResponse(n,o);case"wc_sessionRequest":return this.onSessionRequestResponse(n,o);default:return this.client.logger.info(`Unsupported response method ${h}`)}},this.onRelayEventUnknownPayload=i=>{const{topic:n}=i,{message:o}=Q("MISSING_OR_INVALID",`Decoded payload on topic ${n} is not identifiable as a JSON-RPC request or a response.`);throw new Error(o)},this.onSessionProposeRequest=async(i,n)=>{const{params:o,id:h}=n;try{this.isValidConnect(Pr({},n.params));const d=Fr(ne.FIVE_MINUTES),y=Pr({id:h,pairingTopic:i,expiry:d},o);await this.setProposal(h,y);const w=ls(JSON.stringify(n)),A=await this.getVerifyContext(w,y.proposer.metadata);this.client.events.emit("session_proposal",{id:h,params:y,verifyContext:A})}catch(d){await this.sendError(h,i,d),this.client.logger.error(d)}},this.onSessionProposeResponse=async(i,n)=>{const{id:o}=n;if(oi(n)){const{result:h}=n;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:h});const d=this.client.proposal.get(o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:d});const y=d.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:y});const w=h.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:w});const A=await this.client.core.crypto.generateSharedKey(y,w);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:A});const F=await this.client.core.relayer.subscribe(A);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:F}),await this.client.core.pairing.activate({topic:i})}else $r(n)&&(await this.client.proposal.delete(o,tr("USER_DISCONNECTED")),this.events.emit(Ft("session_connect"),{error:n.error}))},this.onSessionSettleRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidSessionSettleRequest(h);const{relay:d,controller:y,expiry:w,namespaces:A,requiredNamespaces:F,optionalNamespaces:K,sessionProperties:J,pairingTopic:G}=n.params,j=Pr({topic:i,relay:d,expiry:w,namespaces:A,acknowledged:!0,pairingTopic:G,requiredNamespaces:F,optionalNamespaces:K,controller:y.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:y.publicKey,metadata:y.metadata}},J&&{sessionProperties:J});await this.sendResult(n.id,i,!0),this.events.emit(Ft("session_connect"),{session:j}),this.cleanupDuplicatePairings(j)}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.onSessionSettleResponse=async(i,n)=>{const{id:o}=n;oi(n)?(await this.client.session.update(i,{acknowledged:!0}),this.events.emit(Ft("session_approve",o),{})):$r(n)&&(await this.client.session.delete(i,tr("USER_DISCONNECTED")),this.events.emit(Ft("session_approve",o),{error:n.error}))},this.onSessionUpdateRequest=async(i,n)=>{const{params:o,id:h}=n;try{this.isValidUpdate(Pr({topic:i},o)),await this.client.session.update(i,{namespaces:o.namespaces}),await this.sendResult(h,i,!0),this.client.events.emit("session_update",{id:h,topic:i,params:o})}catch(d){await this.sendError(h,i,d),this.client.logger.error(d)}},this.onSessionUpdateResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_update",o),{}):$r(n)&&this.events.emit(Ft("session_update",o),{error:n.error})},this.onSessionExtendRequest=async(i,n)=>{const{id:o}=n;try{this.isValidExtend({topic:i}),await this.setExpiry(i,Fr(eo)),await this.sendResult(o,i,!0),this.client.events.emit("session_extend",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionExtendResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_extend",o),{}):$r(n)&&this.events.emit(Ft("session_extend",o),{error:n.error})},this.onSessionPingRequest=async(i,n)=>{const{id:o}=n;try{this.isValidPing({topic:i}),await this.sendResult(o,i,!0),this.client.events.emit("session_ping",{id:o,topic:i})}catch(h){await this.sendError(o,i,h),this.client.logger.error(h)}},this.onSessionPingResponse=(i,n)=>{const{id:o}=n;setTimeout(()=>{oi(n)?this.events.emit(Ft("session_ping",o),{}):$r(n)&&this.events.emit(Ft("session_ping",o),{error:n.error})},500)},this.onSessionDeleteRequest=async(i,n)=>{const{id:o}=n;try{this.isValidDisconnect({topic:i,reason:n.params}),await Promise.all([new Promise(h=>{this.client.core.relayer.once(mt.publish,async()=>{h(await this.deleteSession(i))})}),this.sendResult(o,i,!0)]),this.client.events.emit("session_delete",{id:o,topic:i})}catch(h){this.client.logger.error(h)}},this.onSessionRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidRequest(Pr({topic:i},h)),await this.setPendingSessionRequest({id:o,topic:i,params:h});const d=ls(JSON.stringify(n)),y=this.client.session.get(i),w=await this.getVerifyContext(d,y.peer.metadata);this.client.events.emit("session_request",{id:o,topic:i,params:h,verifyContext:w})}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.onSessionRequestResponse=(i,n)=>{const{id:o}=n;oi(n)?this.events.emit(Ft("session_request",o),{result:n.result}):$r(n)&&this.events.emit(Ft("session_request",o),{error:n.error})},this.onSessionEventRequest=async(i,n)=>{const{id:o,params:h}=n;try{this.isValidEmit(Pr({topic:i},h)),this.client.events.emit("session_event",{id:o,topic:i,params:h})}catch(d){await this.sendError(o,i,d),this.client.logger.error(d)}},this.isValidConnect=async i=>{if(!cr(i)){const{message:w}=Q("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(i)}`);throw new Error(w)}const{pairingTopic:n,requiredNamespaces:o,optionalNamespaces:h,sessionProperties:d,relays:y}=i;if(_i(n)||await this.isValidPairingTopic(n),!q1(y,!0)){const{message:w}=Q("MISSING_OR_INVALID",`connect() relays: ${y}`);throw new Error(w)}!_i(o)&&so(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!_i(h)&&so(h)!==0&&this.validateNamespaces(h,"optionalNamespaces"),_i(d)||this.validateSessionProps(d,"sessionProperties")},this.validateNamespaces=(i,n)=>{const o=z1(i,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async i=>{if(!cr(i))throw new Error(Q("MISSING_OR_INVALID",`approve() params: ${i}`).message);const{id:n,namespaces:o,relayProtocol:h,sessionProperties:d}=i;await this.isValidProposalId(n);const y=this.client.proposal.get(n),w=Ba(o,"approve()");if(w)throw new Error(w.message);const A=Th(y.requiredNamespaces,o,"approve()");if(A)throw new Error(A.message);if(!us(h,!0)){const{message:F}=Q("MISSING_OR_INVALID",`approve() relayProtocol: ${h}`);throw new Error(F)}_i(d)||this.validateSessionProps(d,"sessionProperties")},this.isValidReject=async i=>{if(!cr(i)){const{message:h}=Q("MISSING_OR_INVALID",`reject() params: ${i}`);throw new Error(h)}const{id:n,reason:o}=i;if(await this.isValidProposalId(n),!k1(o)){const{message:h}=Q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidSessionSettleRequest=i=>{if(!cr(i)){const{message:A}=Q("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${i}`);throw new Error(A)}const{relay:n,controller:o,namespaces:h,expiry:d}=i;if(!H1(n)){const{message:A}=Q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(A)}const y=B1(o,"onSessionSettleRequest()");if(y)throw new Error(y.message);const w=Ba(h,"onSessionSettleRequest()");if(w)throw new Error(w.message);if(mi(d)){const{message:A}=Q("EXPIRED","onSessionSettleRequest()");throw new Error(A)}},this.isValidUpdate=async i=>{if(!cr(i)){const{message:w}=Q("MISSING_OR_INVALID",`update() params: ${i}`);throw new Error(w)}const{topic:n,namespaces:o}=i;await this.isValidSessionTopic(n);const h=this.client.session.get(n),d=Ba(o,"update()");if(d)throw new Error(d.message);const y=Th(h.requiredNamespaces,o,"update()");if(y)throw new Error(y.message)},this.isValidExtend=async i=>{if(!cr(i)){const{message:o}=Q("MISSING_OR_INVALID",`extend() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionTopic(n)},this.isValidRequest=async i=>{if(!cr(i)){const{message:w}=Q("MISSING_OR_INVALID",`request() params: ${i}`);throw new Error(w)}const{topic:n,request:o,chainId:h,expiry:d}=i;await this.isValidSessionTopic(n);const{namespaces:y}=this.client.session.get(n);if(!Nh(y,h)){const{message:w}=Q("MISSING_OR_INVALID",`request() chainId: ${h}`);throw new Error(w)}if(!V1(o)){const{message:w}=Q("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(w)}if(!K1(y,h,o.method)){const{message:w}=Q("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(w)}if(d&&!G1(d,tc)){const{message:w}=Q("MISSING_OR_INVALID",`request() expiry: ${d}. Expiry must be a number (in seconds) between ${tc.min} and ${tc.max}`);throw new Error(w)}},this.isValidRespond=async i=>{if(!cr(i)){const{message:h}=Q("MISSING_OR_INVALID",`respond() params: ${i}`);throw new Error(h)}const{topic:n,response:o}=i;if(await this.isValidSessionTopic(n),!W1(o)){const{message:h}=Q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidPing=async i=>{if(!cr(i)){const{message:o}=Q("MISSING_OR_INVALID",`ping() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionOrPairingTopic(n)},this.isValidEmit=async i=>{if(!cr(i)){const{message:y}=Q("MISSING_OR_INVALID",`emit() params: ${i}`);throw new Error(y)}const{topic:n,event:o,chainId:h}=i;await this.isValidSessionTopic(n);const{namespaces:d}=this.client.session.get(n);if(!Nh(d,h)){const{message:y}=Q("MISSING_OR_INVALID",`emit() chainId: ${h}`);throw new Error(y)}if(!J1(o)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}if(!Y1(d,h,o.name)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}},this.isValidDisconnect=async i=>{if(!cr(i)){const{message:o}=Q("MISSING_OR_INVALID",`disconnect() params: ${i}`);throw new Error(o)}const{topic:n}=i;await this.isValidSessionOrPairingTopic(n)},this.getVerifyContext=async(i,n)=>{const o={verified:{verifyUrl:n.verifyUrl||"",validation:"UNKNOWN",origin:n.url||""}};try{const h=await this.client.core.verify.resolve({attestationId:i,verifyUrl:n.verifyUrl});h&&(o.verified.origin=h,o.verified.validation=h===n.url?"VALID":"INVALID")}catch(h){this.client.logger.error(h)}return this.client.logger.info(`Verify context: ${JSON.stringify(o)}`),o},this.validateSessionProps=(i,n)=>{Object.values(i).forEach(o=>{if(!us(o,!1)){const{message:h}=Q("MISSING_OR_INVALID",`${n} must be in Record format. Received: ${JSON.stringify(o)}`);throw new Error(h)}})}}isInitialized(){if(!this.initialized){const{message:r}=Q("NOT_INITIALIZED",this.name);throw new Error(r)}}registerRelayerEvents(){this.client.core.relayer.on(mt.message,async r=>{const{topic:i,message:n}=r;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(n)))return;const o=await this.client.core.crypto.decode(i,n);Ic(o)?(this.client.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):yo(o)?(await this.client.core.history.resolve(o),await this.onRelayEventResponse({topic:i,payload:o}),this.client.core.history.delete(i,o.id)):this.onRelayEventUnknownPayload({topic:i,payload:o})})}registerExpirerEvents(){this.client.core.expirer.on(Ar.expired,async r=>{const{topic:i,id:n}=zl(r.target);if(n&&this.client.pendingRequest.keys.includes(n))return await this.deletePendingSessionRequest(n,Q("EXPIRED"),!0);i?this.client.session.keys.includes(i)&&(await this.deleteSession(i,!0),this.client.events.emit("session_expire",{topic:i})):n&&(await this.deleteProposal(n,!0),this.client.events.emit("proposal_expire",{id:n}))})}isValidPairingTopic(r){if(!us(r,!1)){const{message:i}=Q("MISSING_OR_INVALID",`pairing topic should be a string: ${r}`);throw new Error(i)}if(!this.client.core.pairing.pairings.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`pairing topic doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.core.pairing.pairings.get(r).expiry)){const{message:i}=Q("EXPIRED",`pairing topic: ${r}`);throw new Error(i)}}async isValidSessionTopic(r){if(!us(r,!1)){const{message:i}=Q("MISSING_OR_INVALID",`session topic should be a string: ${r}`);throw new Error(i)}if(!this.client.session.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`session topic doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.session.get(r).expiry)){await this.deleteSession(r);const{message:i}=Q("EXPIRED",`session topic: ${r}`);throw new Error(i)}}async isValidSessionOrPairingTopic(r){if(this.client.session.keys.includes(r))await this.isValidSessionTopic(r);else if(this.client.core.pairing.pairings.keys.includes(r))this.isValidPairingTopic(r);else if(us(r,!1)){const{message:i}=Q("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${r}`);throw new Error(i)}else{const{message:i}=Q("MISSING_OR_INVALID",`session or pairing topic should be a string: ${r}`);throw new Error(i)}}async isValidProposalId(r){if(!X1(r)){const{message:i}=Q("MISSING_OR_INVALID",`proposal id should be a number: ${r}`);throw new Error(i)}if(!this.client.proposal.keys.includes(r)){const{message:i}=Q("NO_MATCHING_KEY",`proposal id doesn't exist: ${r}`);throw new Error(i)}if(mi(this.client.proposal.get(r).expiry)){await this.deleteProposal(r);const{message:i}=Q("EXPIRED",`proposal id: ${r}`);throw new Error(i)}}}class rE extends _o{constructor(r,i){super(r,i,Vb,Ac),this.core=r,this.logger=i}}class iE extends _o{constructor(r,i){super(r,i,Kb,Ac),this.core=r,this.logger=i}}class sE extends _o{constructor(r,i){super(r,i,Wb,Ac,n=>n.id),this.core=r,this.logger=i}}let nE=class Df extends Nm{constructor(r){super(r),this.protocol=Rf,this.version=Tf,this.name=ec.name,this.events=new vr.EventEmitter,this.on=(n,o)=>this.events.on(n,o),this.once=(n,o)=>this.events.once(n,o),this.off=(n,o)=>this.events.off(n,o),this.removeListener=(n,o)=>this.events.removeListener(n,o),this.removeAllListeners=n=>this.events.removeAllListeners(n),this.connect=async n=>{try{return await this.engine.connect(n)}catch(o){throw this.logger.error(o.message),o}},this.pair=async n=>{try{return await this.engine.pair(n)}catch(o){throw this.logger.error(o.message),o}},this.approve=async n=>{try{return await this.engine.approve(n)}catch(o){throw this.logger.error(o.message),o}},this.reject=async n=>{try{return await this.engine.reject(n)}catch(o){throw this.logger.error(o.message),o}},this.update=async n=>{try{return await this.engine.update(n)}catch(o){throw this.logger.error(o.message),o}},this.extend=async n=>{try{return await this.engine.extend(n)}catch(o){throw this.logger.error(o.message),o}},this.request=async n=>{try{return await this.engine.request(n)}catch(o){throw this.logger.error(o.message),o}},this.respond=async n=>{try{return await this.engine.respond(n)}catch(o){throw this.logger.error(o.message),o}},this.ping=async n=>{try{return await this.engine.ping(n)}catch(o){throw this.logger.error(o.message),o}},this.emit=async n=>{try{return await this.engine.emit(n)}catch(o){throw this.logger.error(o.message),o}},this.disconnect=async n=>{try{return await this.engine.disconnect(n)}catch(o){throw this.logger.error(o.message),o}},this.find=n=>{try{return this.engine.find(n)}catch(o){throw this.logger.error(o.message),o}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(n){throw this.logger.error(n.message),n}},this.name=(r==null?void 0:r.name)||ec.name,this.metadata=(r==null?void 0:r.metadata)||$1();const i=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||ec.logger}));this.core=(r==null?void 0:r.core)||new Hb(r),this.logger=Re.generateChildLogger(i,this.name),this.session=new iE(this.core,this.logger),this.proposal=new rE(this.core,this.logger),this.pendingRequest=new sE(this.core,this.logger),this.engine=new tE(this)}static async init(r){const i=new Df(r);return await i.initialize(),i}get context(){return Re.getLoggerContext(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.engine.init(),this.core.verify.init({verifyUrl:this.metadata.verifyUrl}),this.logger.info("SignClient Initialization Success")}catch(r){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(r.message),r}}};var hc={exports:{}};(function(c,r){var i=typeof self<"u"?self:ur,n=function(){function h(){this.fetch=!1,this.DOMException=i.DOMException}return h.prototype=i,new h}();(function(h){(function(d){var y={searchParams:"URLSearchParams"in h,iterable:"Symbol"in h&&"iterator"in Symbol,blob:"FileReader"in h&&"Blob"in h&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in h,arrayBuffer:"ArrayBuffer"in h};function w(v){return v&&DataView.prototype.isPrototypeOf(v)}if(y.arrayBuffer)var A=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],F=ArrayBuffer.isView||function(v){return v&&A.indexOf(Object.prototype.toString.call(v))>-1};function K(v){if(typeof v!="string"&&(v=String(v)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(v))throw new TypeError("Invalid character in header field name");return v.toLowerCase()}function J(v){return typeof v!="string"&&(v=String(v)),v}function G(v){var E={next:function(){var X=v.shift();return{done:X===void 0,value:X}}};return y.iterable&&(E[Symbol.iterator]=function(){return E}),E}function j(v){this.map={},v instanceof j?v.forEach(function(E,X){this.append(X,E)},this):Array.isArray(v)?v.forEach(function(E){this.append(E[0],E[1])},this):v&&Object.getOwnPropertyNames(v).forEach(function(E){this.append(E,v[E])},this)}j.prototype.append=function(v,E){v=K(v),E=J(E);var X=this.map[v];this.map[v]=X?X+", "+E:E},j.prototype.delete=function(v){delete this.map[K(v)]},j.prototype.get=function(v){return v=K(v),this.has(v)?this.map[v]:null},j.prototype.has=function(v){return this.map.hasOwnProperty(K(v))},j.prototype.set=function(v,E){this.map[K(v)]=J(E)},j.prototype.forEach=function(v,E){for(var X in this.map)this.map.hasOwnProperty(X)&&v.call(E,this.map[X],X,this)},j.prototype.keys=function(){var v=[];return this.forEach(function(E,X){v.push(X)}),G(v)},j.prototype.values=function(){var v=[];return this.forEach(function(E){v.push(E)}),G(v)},j.prototype.entries=function(){var v=[];return this.forEach(function(E,X){v.push([X,E])}),G(v)},y.iterable&&(j.prototype[Symbol.iterator]=j.prototype.entries);function V(v){if(v.bodyUsed)return Promise.reject(new TypeError("Already read"));v.bodyUsed=!0}function ie(v){return new Promise(function(E,X){v.onload=function(){E(v.result)},v.onerror=function(){X(v.error)}})}function Ee(v){var E=new FileReader,X=ie(E);return E.readAsArrayBuffer(v),X}function ge(v){var E=new FileReader,X=ie(E);return E.readAsText(v),X}function pe(v){for(var E=new Uint8Array(v),X=new Array(E.length),ce=0;ce-1?E:v}function B(v,E){E=E||{};var X=E.body;if(v instanceof B){if(v.bodyUsed)throw new TypeError("Already read");this.url=v.url,this.credentials=v.credentials,E.headers||(this.headers=new j(v.headers)),this.method=v.method,this.mode=v.mode,this.signal=v.signal,!X&&v._bodyInit!=null&&(X=v._bodyInit,v.bodyUsed=!0)}else this.url=String(v);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new j(E.headers)),this.method=M(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(X)}B.prototype.clone=function(){return new B(this,{body:this._bodyInit})};function ve(v){var E=new FormData;return v.trim().split("&").forEach(function(X){if(X){var ce=X.split("="),k=ce.shift().replace(/\+/g," "),U=ce.join("=").replace(/\+/g," ");E.append(decodeURIComponent(k),decodeURIComponent(U))}}),E}function re(v){var E=new j,X=v.replace(/\r?\n[\t ]+/g," ");return X.split(/\r?\n/).forEach(function(ce){var k=ce.split(":"),U=k.shift().trim();if(U){var z=k.join(":").trim();E.append(U,z)}}),E}le.call(B.prototype);function ue(v,E){E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in E?E.statusText:"OK",this.headers=new j(E.headers),this.url=E.url||"",this._initBody(v)}le.call(ue.prototype),ue.prototype.clone=function(){return new ue(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new j(this.headers),url:this.url})},ue.error=function(){var v=new ue(null,{status:0,statusText:""});return v.type="error",v};var Te=[301,302,303,307,308];ue.redirect=function(v,E){if(Te.indexOf(E)===-1)throw new RangeError("Invalid status code");return new ue(null,{status:E,headers:{location:v}})},d.DOMException=h.DOMException;try{new d.DOMException}catch{d.DOMException=function(E,X){this.message=E,this.name=X;var ce=Error(E);this.stack=ce.stack},d.DOMException.prototype=Object.create(Error.prototype),d.DOMException.prototype.constructor=d.DOMException}function qe(v,E){return new Promise(function(X,ce){var k=new B(v,E);if(k.signal&&k.signal.aborted)return ce(new d.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function z(){U.abort()}U.onload=function(){var H={status:U.status,statusText:U.statusText,headers:re(U.getAllResponseHeaders()||"")};H.url="responseURL"in U?U.responseURL:H.headers.get("X-Request-URL");var Ye="response"in U?U.response:U.responseText;X(new ue(Ye,H))},U.onerror=function(){ce(new TypeError("Network request failed"))},U.ontimeout=function(){ce(new TypeError("Network request failed"))},U.onabort=function(){ce(new d.DOMException("Aborted","AbortError"))},U.open(k.method,k.url,!0),k.credentials==="include"?U.withCredentials=!0:k.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&y.blob&&(U.responseType="blob"),k.headers.forEach(function(H,Ye){U.setRequestHeader(Ye,H)}),k.signal&&(k.signal.addEventListener("abort",z),U.onreadystatechange=function(){U.readyState===4&&k.signal.removeEventListener("abort",z)}),U.send(typeof k._bodyInit>"u"?null:k._bodyInit)})}return qe.polyfill=!0,h.fetch||(h.fetch=qe,h.Headers=j,h.Request=B,h.Response=ue),d.Headers=j,d.Request=B,d.Response=ue,d.fetch=qe,Object.defineProperty(d,"__esModule",{value:!0}),d})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;r=o.fetch,r.default=o.fetch,r.fetch=o.fetch,r.Headers=o.Headers,r.Request=o.Request,r.Response=o.Response,c.exports=r})(hc,hc.exports);var oE=hc.exports;const Sl=gc(oE),aE={Accept:"application/json","Content-Type":"application/json"},cE="POST",Pl={headers:aE,method:cE},Al=10;class zi{constructor(r,i=!1){if(this.url=r,this.disableProviderPing=i,this.events=new vr.EventEmitter,this.isAvailable=!1,this.registering=!1,!el(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);this.url=r,this.disableProviderPing=i}get connected(){return this.isAvailable}get connecting(){return this.registering}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}off(r,i){this.events.off(r,i)}removeListener(r,i){this.events.removeListener(r,i)}async open(r=this.url){await this.register(r)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(r,i){this.isAvailable||await this.register();try{const n=Ks(r),h=await(await Sl(this.url,Object.assign(Object.assign({},Pl),{body:n}))).json();this.onPayload({data:h})}catch(n){this.onError(r.id,n)}}async register(r=this.url){if(!el(r))throw new Error(`Provided URL is not compatible with HTTP connection: ${r}`);if(this.registering){const i=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=i||this.events.listenerCount("open")>=i)&&this.events.setMaxListeners(i+1),new Promise((n,o)=>{this.events.once("register_error",h=>{this.resetMaxListeners(),o(h)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));n()})})}this.url=r,this.registering=!0;try{if(!this.disableProviderPing){const i=Ks({id:1,jsonrpc:"2.0",method:"test",params:[]});await Sl(r,Object.assign(Object.assign({},Pl),{body:i}))}this.onOpen()}catch(i){const n=this.parseError(i);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(r){if(typeof r.data>"u")return;const i=typeof r.data=="string"?_c(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=vo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return lf(r,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Al&&this.events.setMaxListeners(Al)}}const Cl="error",uE="wss://relay.walletconnect.com",hE="wc",lE="universal_provider",Ol=`${hE}@2:${lE}:`,fE="https://rpc.walletconnect.com/v1",xi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var Hs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},lc={exports:{}};/** -* @license -* Lodash -* Copyright OpenJS Foundation and other contributors -* Released under MIT license -* Based on Underscore.js 1.8.3 -* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -*/(function(c,r){(function(){var i,n="4.17.21",o=200,h="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",y="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",A=500,F="__lodash_placeholder__",K=1,J=2,G=4,j=1,V=2,ie=1,Ee=2,ge=4,pe=8,he=16,le=32,T=64,M=128,B=256,ve=512,re=30,ue="...",Te=800,qe=16,v=1,E=2,X=3,ce=1/0,k=9007199254740991,U=17976931348623157e292,z=0/0,H=4294967295,Ye=H-1,Be=H>>>1,jr=[["ary",M],["bind",ie],["bindKey",Ee],["curry",pe],["curryRight",he],["flip",ve],["partial",le],["partialRight",T],["rearg",B]],xe="[object Arguments]",St="[object Array]",R="[object AsyncFunction]",O="[object Boolean]",P="[object Date]",u="[object DOMException]",b="[object Error]",ee="[object Function]",fe="[object GeneratorFunction]",we="[object Map]",Ne="[object Number]",De="[object Null]",Pe="[object Object]",Pt="[object Promise]",_t="[object Proxy]",ot="[object RegExp]",$e="[object Set]",Ze="[object String]",Qe="[object Symbol]",at="[object Undefined]",ze="[object WeakMap]",et="[object WeakSet]",Le="[object ArrayBuffer]",Ve="[object DataView]",ht="[object Float32Array]",Me="[object Float64Array]",At="[object Int8Array]",$t="[object Int16Array]",kt="[object Int32Array]",Ht="[object Uint8Array]",Ut="[object Uint8ClampedArray]",Wt="[object Uint16Array]",rr="[object Uint32Array]",Mr=/\b__p \+= '';/g,Jt=/\b(__p \+=) '' \+/g,Kr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ai=/&(?:amp|lt|gt|quot|#39);/g,Ii=/[&<>"']/g,lt=RegExp(ai.source),it=RegExp(Ii.source),ft=/<%-([\s\S]+?)%>/g,pt=/<%([\s\S]+?)%>/g,ct=/<%=([\s\S]+?)%>/g,st=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ct=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(dt.source),gt=/^\s+/,wt=/\s/,vt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xe=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,Nt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wo=/[()=,{}\[\]\/\s]/,bo=/\\(\\)?/g,Eo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yr=/\w*$/,xo=/^[-+]0x[0-9a-f]+$/i,Io=/^0b[01]+$/i,So=/^\[object .+?Constructor\]$/,Po=/^0o[0-7]+$/i,Ao=/^(?:0|[1-9]\d*)$/,Gr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ki=/($^)/,Co=/['\n\r\u2028\u2029\\]/g,Hi="\\ud800-\\udfff",Oo="\\u0300-\\u036f",Ro="\\ufe20-\\ufe2f",Bi="\\u20d0-\\u20ff",Js=Oo+Ro+Bi,Ys="\\u2700-\\u27bf",Or="a-z\\xdf-\\xf6\\xf8-\\xff",To="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lo="\\u2000-\\u206f",Do=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xs="A-Z\\xc0-\\xd6\\xd8-\\xde",Zs="\\ufe0e\\ufe0f",Si=To+No+Lo+Do,gs="['’]",Pi="["+Hi+"]",vs="["+Si+"]",Ai="["+Js+"]",Qs="\\d+",Fo="["+Ys+"]",en="["+Or+"]",tn="[^"+Hi+Si+Qs+Ys+Or+Xs+"]",Vi="\\ud83c[\\udffb-\\udfff]",$o="(?:"+Ai+"|"+Vi+")",rn="[^"+Hi+"]",Ki="(?:\\ud83c[\\udde6-\\uddff]){2}",ci="[\\ud800-\\udbff][\\udc00-\\udfff]",hr="["+Xs+"]",sn="\\u200d",nn="(?:"+en+"|"+tn+")",Ur="(?:"+hr+"|"+tn+")",on="(?:"+gs+"(?:d|ll|m|re|s|t|ve))?",an="(?:"+gs+"(?:D|LL|M|RE|S|T|VE))?",cn=$o+"?",un="["+Zs+"]?",jo="(?:"+sn+"(?:"+[rn,Ki,ci].join("|")+")"+un+cn+")*",Wr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ln=un+cn+jo,Gi="(?:"+[Fo,Ki,ci].join("|")+")"+ln,Mo="(?:"+[rn+Ai+"?",Ai,Ki,ci,Pi].join("|")+")",ys=RegExp(gs,"g"),Uo=RegExp(Ai,"g"),Wi=RegExp(Vi+"(?="+Vi+")|"+Mo+ln,"g"),fn=RegExp([hr+"?"+en+"+"+on+"(?="+[vs,hr,"$"].join("|")+")",Ur+"+"+an+"(?="+[vs,hr+nn,"$"].join("|")+")",hr+"?"+nn+"+"+on,hr+"+"+an,hn,Wr,Qs,Gi].join("|"),"g"),pn=RegExp("["+sn+Hi+Js+Zs+"]"),Ci=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],qo=-1,Ke={};Ke[ht]=Ke[Me]=Ke[At]=Ke[$t]=Ke[kt]=Ke[Ht]=Ke[Ut]=Ke[Wt]=Ke[rr]=!0,Ke[xe]=Ke[St]=Ke[Le]=Ke[O]=Ke[Ve]=Ke[P]=Ke[b]=Ke[ee]=Ke[we]=Ke[Ne]=Ke[Pe]=Ke[ot]=Ke[$e]=Ke[Ze]=Ke[ze]=!1;var ke={};ke[xe]=ke[St]=ke[Le]=ke[Ve]=ke[O]=ke[P]=ke[ht]=ke[Me]=ke[At]=ke[$t]=ke[kt]=ke[we]=ke[Ne]=ke[Pe]=ke[ot]=ke[$e]=ke[Ze]=ke[Qe]=ke[Ht]=ke[Ut]=ke[Wt]=ke[rr]=!0,ke[b]=ke[ee]=ke[ze]=!1;var g={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},x={"&":"&","<":"<",">":">",'"':""","'":"'"},$={"&":"&","<":"<",">":">",""":'"',"'":"'"},Y={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ge=parseFloat,ye=parseInt,tt=typeof Hs=="object"&&Hs&&Hs.Object===Object&&Hs,Lt=typeof self=="object"&&self&&self.Object===Object&&self,Ce=tt||Lt||Function("return this")(),We=r&&!r.nodeType&&r,bt=We&&!0&&c&&!c.nodeType&&c,ir=bt&&bt.exports===We,Dt=ir&&tt.process,rt=function(){try{var I=bt&&bt.require&&bt.require("util").types;return I||Dt&&Dt.binding&&Dt.binding("util")}catch{}}(),Yt=rt&&rt.isArrayBuffer,Rr=rt&&rt.isDate,mr=rt&&rt.isMap,qr=rt&&rt.isRegExp,ms=rt&&rt.isSet,Oi=rt&&rt.isTypedArray;function qt(I,N,C){switch(C.length){case 0:return I.call(N);case 1:return I.call(N,C[0]);case 2:return I.call(N,C[0],C[1]);case 3:return I.call(N,C[0],C[1],C[2])}return I.apply(N,C)}function jf(I,N,C,Z){for(var de=-1,Fe=I==null?0:I.length;++de-1}function zo(I,N,C){for(var Z=-1,de=I==null?0:I.length;++Z-1;);return C}function jc(I,N){for(var C=I.length;C--&&Ji(N,I[C],0)>-1;);return C}function Kf(I,N){for(var C=I.length,Z=0;C--;)I[C]===N&&++Z;return Z}var Gf=Vo(g),Wf=Vo(x);function Jf(I){return"\\"+Y[I]}function Yf(I,N){return I==null?i:I[N]}function Yi(I){return pn.test(I)}function Xf(I){return Ci.test(I)}function Zf(I){for(var N,C=[];!(N=I.next()).done;)C.push(N.value);return C}function Jo(I){var N=-1,C=Array(I.size);return I.forEach(function(Z,de){C[++N]=[de,Z]}),C}function Mc(I,N){return function(C){return I(N(C))}}function li(I,N){for(var C=-1,Z=I.length,de=0,Fe=[];++C-1}function Up(e,t){var s=this.__data__,a=Nn(s,e);return a<0?(++this.size,s.push([e,t])):s[a][1]=t,this}Jr.prototype.clear=Fp,Jr.prototype.delete=$p,Jr.prototype.get=jp,Jr.prototype.has=Mp,Jr.prototype.set=Up;function Yr(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function Er(e,t,s,a,l,p){var m,_=t&K,S=t&J,L=t&G;if(s&&(m=l?s(e,a,l,p):s(e)),m!==i)return m;if(!ut(e))return e;var D=me(e);if(D){if(m=Hd(e),!_)return sr(e,m)}else{var q=Gt(e),W=q==ee||q==fe;if(yi(e))return wu(e,_);if(q==Pe||q==xe||W&&!l){if(m=S||W?{}:Uu(e),!_)return S?Nd(e,td(m,e)):Td(e,Yc(m,e))}else{if(!ke[q])return l?e:{};m=Bd(e,q,_)}}p||(p=new Nr);var te=p.get(e);if(te)return te;p.set(e,m),dh(e)?e.forEach(function(ae){m.add(Er(ae,t,s,ae,e,p))}):fh(e)&&e.forEach(function(ae,Se){m.set(Se,Er(ae,t,s,Se,e,p))});var oe=L?S?ba:wa:S?or:zt,be=D?i:oe(e);return _r(be||e,function(ae,Se){be&&(Se=ae,ae=e[Se]),Ss(m,Se,Er(ae,t,s,Se,e,p))}),m}function rd(e){var t=zt(e);return function(s){return Xc(s,e,t)}}function Xc(e,t,s){var a=s.length;if(e==null)return!a;for(e=Je(e);a--;){var l=s[a],p=t[l],m=e[l];if(m===i&&!(l in e)||!p(m))return!1}return!0}function Zc(e,t,s){if(typeof e!="function")throw new wr(d);return Ns(function(){e.apply(i,s)},t)}function Ps(e,t,s,a){var l=-1,p=gn,m=!0,_=e.length,S=[],L=t.length;if(!_)return S;s&&(t=nt(t,lr(s))),a?(p=zo,m=!1):t.length>=o&&(p=_s,m=!1,t=new Ni(t));e:for(;++l<_;){var D=e[l],q=s==null?D:s(D);if(D=a||D!==0?D:0,m&&q===q){for(var W=L;W--;)if(t[W]===q)continue e;S.push(D)}else p(t,q,a)||S.push(D)}return S}var pi=Su(zr),Qc=Su(ia,!0);function id(e,t){var s=!0;return pi(e,function(a,l,p){return s=!!t(a,l,p),s}),s}function Ln(e,t,s){for(var a=-1,l=e.length;++al?0:l+s),a=a===i||a>l?l:_e(a),a<0&&(a+=l),a=s>a?0:vh(a);s0&&s(_)?t>1?Bt(_,t-1,s,a,l):hi(l,_):a||(l[l.length]=_)}return l}var ra=Pu(),tu=Pu(!0);function zr(e,t){return e&&ra(e,t,zt)}function ia(e,t){return e&&tu(e,t,zt)}function Dn(e,t){return ui(t,function(s){return ti(e[s])})}function Di(e,t){t=gi(t,e);for(var s=0,a=t.length;e!=null&&st}function nd(e,t){return e!=null&&Ue.call(e,t)}function od(e,t){return e!=null&&t in Je(e)}function ad(e,t,s){return e>=Kt(t,s)&&e=120&&D.length>=120)?new Ni(m&&D):i}D=e[0];var q=-1,W=_[0];e:for(;++q-1;)_!==e&&Sn.call(_,S,1),Sn.call(e,S,1);return e}function fu(e,t){for(var s=e?t.length:0,a=s-1;s--;){var l=t[s];if(s==a||l!==p){var p=l;ei(l)?Sn.call(e,l,1):pa(e,l)}}return e}function ha(e,t){return e+Cn(Kc()*(t-e+1))}function wd(e,t,s,a){for(var l=-1,p=Mt(An((t-e)/(s||1)),0),m=C(p);p--;)m[a?p:++l]=e,e+=s;return m}function la(e,t){var s="";if(!e||t<1||t>k)return s;do t%2&&(s+=e),t=Cn(t/2),t&&(e+=e);while(t);return s}function Ie(e,t){return Ca(ku(e,t,ar),e+"")}function bd(e){return Jc(as(e))}function Ed(e,t){var s=as(e);return Vn(s,Li(t,0,s.length))}function Os(e,t,s,a){if(!ut(e))return e;t=gi(t,e);for(var l=-1,p=t.length,m=p-1,_=e;_!=null&&++ll?0:l+t),s=s>l?l:s,s<0&&(s+=l),l=t>s?0:s-t>>>0,t>>>=0;for(var p=C(l);++a>>1,m=e[p];m!==null&&!pr(m)&&(s?m<=t:m=o){var L=t?null:$d(e);if(L)return yn(L);m=!1,l=_s,S=new Ni}else S=t?[]:_;e:for(;++a=a?e:xr(e,t,s)}var _u=pp||function(e){return Ce.clearTimeout(e)};function wu(e,t){if(t)return e.slice();var s=e.length,a=zc?zc(s):new e.constructor(s);return e.copy(a),a}function ya(e){var t=new e.constructor(e.byteLength);return new xn(t).set(new xn(e)),t}function Ad(e,t){var s=t?ya(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Cd(e){var t=new e.constructor(e.source,yr.exec(e));return t.lastIndex=e.lastIndex,t}function Od(e){return Is?Je(Is.call(e)):{}}function bu(e,t){var s=t?ya(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function Eu(e,t){if(e!==t){var s=e!==i,a=e===null,l=e===e,p=pr(e),m=t!==i,_=t===null,S=t===t,L=pr(t);if(!_&&!L&&!p&&e>t||p&&m&&S&&!_&&!L||a&&m&&S||!s&&S||!l)return 1;if(!a&&!p&&!L&&e=_)return S;var L=s[a];return S*(L=="desc"?-1:1)}}return e.index-t.index}function xu(e,t,s,a){for(var l=-1,p=e.length,m=s.length,_=-1,S=t.length,L=Mt(p-m,0),D=C(S+L),q=!a;++_1?s[l-1]:i,m=l>2?s[2]:i;for(p=e.length>3&&typeof p=="function"?(l--,p):i,m&&Zt(s[0],s[1],m)&&(p=l<3?i:p,l=1),t=Je(t);++a-1?l[p?t[m]:m]:i}}function Ou(e){return Qr(function(t){var s=t.length,a=s,l=br.prototype.thru;for(e&&t.reverse();a--;){var p=t[a];if(typeof p!="function")throw new wr(d);if(l&&!m&&Hn(p)=="wrapper")var m=new br([],!0)}for(a=m?a:s;++a1&&Oe.reverse(),D&&S_))return!1;var L=p.get(e),D=p.get(t);if(L&&D)return L==t&&D==e;var q=-1,W=!0,te=s&V?new Ni:i;for(p.set(e,t),p.set(t,e);++q<_;){var oe=e[q],be=t[q];if(a)var ae=m?a(be,oe,q,t,e,p):a(oe,be,q,e,t,p);if(ae!==i){if(ae)continue;W=!1;break}if(te){if(!Ho(t,function(Se,Oe){if(!_s(te,Oe)&&(oe===Se||l(oe,Se,s,a,p)))return te.push(Oe)})){W=!1;break}}else if(!(oe===be||l(oe,be,s,a,p))){W=!1;break}}return p.delete(e),p.delete(t),W}function Md(e,t,s,a,l,p,m){switch(s){case Ve:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Le:return!(e.byteLength!=t.byteLength||!p(new xn(e),new xn(t)));case O:case P:case Ne:return Lr(+e,+t);case b:return e.name==t.name&&e.message==t.message;case ot:case Ze:return e==t+"";case we:var _=Jo;case $e:var S=a&j;if(_||(_=yn),e.size!=t.size&&!S)return!1;var L=m.get(e);if(L)return L==t;a|=V,m.set(e,t);var D=$u(_(e),_(t),a,l,p,m);return m.delete(e),D;case Qe:if(Is)return Is.call(e)==Is.call(t)}return!1}function Ud(e,t,s,a,l,p){var m=s&j,_=wa(e),S=_.length,L=wa(t),D=L.length;if(S!=D&&!m)return!1;for(var q=S;q--;){var W=_[q];if(!(m?W in t:Ue.call(t,W)))return!1}var te=p.get(e),oe=p.get(t);if(te&&oe)return te==t&&oe==e;var be=!0;p.set(e,t),p.set(t,e);for(var ae=m;++q1?"& ":"")+t[a],t=t.join(s>2?", ":" "),e.replace(vt,`{ -/* [wrapped with `+t+`] */ -`)}function Kd(e){return me(e)||ji(e)||!!(Bc&&e&&e[Bc])}function ei(e,t){var s=typeof e;return t=t??k,!!t&&(s=="number"||s!="symbol"&&Ao.test(e))&&e>-1&&e%1==0&&e0){if(++t>=Te)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Vn(e,t){var s=-1,a=e.length,l=a-1;for(t=t===i?a:t;++s1?e[t-1]:i;return s=typeof s=="function"?(e.pop(),s):i,eh(e,s)});function th(e){var t=f(e);return t.__chain__=!0,t}function iv(e,t){return t(e),e}function Kn(e,t){return t(e)}var sv=Qr(function(e){var t=e.length,s=t?e[0]:0,a=this.__wrapped__,l=function(p){return ta(p,e)};return t>1||this.__actions__.length||!(a instanceof Ae)||!ei(s)?this.thru(l):(a=a.slice(s,+s+(t?1:0)),a.__actions__.push({func:Kn,args:[l],thisArg:i}),new br(a,this.__chain__).thru(function(p){return t&&!p.length&&p.push(i),p}))});function nv(){return th(this)}function ov(){return new br(this.value(),this.__chain__)}function av(){this.__values__===i&&(this.__values__=gh(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function cv(){return this}function uv(e){for(var t,s=this;s instanceof Tn;){var a=Wu(s);a.__index__=0,a.__values__=i,t?l.__wrapped__=a:t=a;var l=a;s=s.__wrapped__}return l.__wrapped__=e,t}function hv(){var e=this.__wrapped__;if(e instanceof Ae){var t=e;return this.__actions__.length&&(t=new Ae(this)),t=t.reverse(),t.__actions__.push({func:Kn,args:[Oa],thisArg:i}),new br(t,this.__chain__)}return this.thru(Oa)}function lv(){return yu(this.__wrapped__,this.__actions__)}var fv=Mn(function(e,t,s){Ue.call(e,s)?++e[s]:Xr(e,s,1)});function pv(e,t,s){var a=me(e)?Rc:id;return s&&Zt(e,t,s)&&(t=i),a(e,se(t,3))}function dv(e,t){var s=me(e)?ui:eu;return s(e,se(t,3))}var gv=Cu(Ju),vv=Cu(Yu);function yv(e,t){return Bt(Gn(e,t),1)}function mv(e,t){return Bt(Gn(e,t),ce)}function _v(e,t,s){return s=s===i?1:_e(s),Bt(Gn(e,t),s)}function rh(e,t){var s=me(e)?_r:pi;return s(e,se(t,3))}function ih(e,t){var s=me(e)?Mf:Qc;return s(e,se(t,3))}var wv=Mn(function(e,t,s){Ue.call(e,s)?e[s].push(t):Xr(e,s,[t])});function bv(e,t,s,a){e=nr(e)?e:as(e),s=s&&!a?_e(s):0;var l=e.length;return s<0&&(s=Mt(l+s,0)),Zn(e)?s<=l&&e.indexOf(t,s)>-1:!!l&&Ji(e,t,s)>-1}var Ev=Ie(function(e,t,s){var a=-1,l=typeof t=="function",p=nr(e)?C(e.length):[];return pi(e,function(m){p[++a]=l?qt(t,m,s):As(m,t,s)}),p}),xv=Mn(function(e,t,s){Xr(e,s,t)});function Gn(e,t){var s=me(e)?nt:ou;return s(e,se(t,3))}function Iv(e,t,s,a){return e==null?[]:(me(t)||(t=t==null?[]:[t]),s=a?i:s,me(s)||(s=s==null?[]:[s]),hu(e,t,s))}var Sv=Mn(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Pv(e,t,s){var a=me(e)?ko:Dc,l=arguments.length<3;return a(e,se(t,4),s,l,pi)}function Av(e,t,s){var a=me(e)?Uf:Dc,l=arguments.length<3;return a(e,se(t,4),s,l,Qc)}function Cv(e,t){var s=me(e)?ui:eu;return s(e,Yn(se(t,3)))}function Ov(e){var t=me(e)?Jc:bd;return t(e)}function Rv(e,t,s){(s?Zt(e,t,s):t===i)?t=1:t=_e(t);var a=me(e)?Zp:Ed;return a(e,t)}function Tv(e){var t=me(e)?Qp:Id;return t(e)}function Nv(e){if(e==null)return 0;if(nr(e))return Zn(e)?Xi(e):e.length;var t=Gt(e);return t==we||t==$e?e.size:aa(e).length}function Lv(e,t,s){var a=me(e)?Ho:Sd;return s&&Zt(e,t,s)&&(t=i),a(e,se(t,3))}var Dv=Ie(function(e,t){if(e==null)return[];var s=t.length;return s>1&&Zt(e,t[0],t[1])?t=[]:s>2&&Zt(t[0],t[1],t[2])&&(t=[t[0]]),hu(e,Bt(t,1),[])}),Wn=dp||function(){return Ce.Date.now()};function Fv(e,t){if(typeof t!="function")throw new wr(d);return e=_e(e),function(){if(--e<1)return t.apply(this,arguments)}}function sh(e,t,s){return t=s?i:t,t=e&&t==null?e.length:t,Zr(e,M,i,i,i,i,t)}function nh(e,t){var s;if(typeof t!="function")throw new wr(d);return e=_e(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=i),s}}var Ta=Ie(function(e,t,s){var a=ie;if(s.length){var l=li(s,ns(Ta));a|=le}return Zr(e,a,t,s,l)}),oh=Ie(function(e,t,s){var a=ie|Ee;if(s.length){var l=li(s,ns(oh));a|=le}return Zr(t,a,e,s,l)});function ah(e,t,s){t=s?i:t;var a=Zr(e,pe,i,i,i,i,i,t);return a.placeholder=ah.placeholder,a}function ch(e,t,s){t=s?i:t;var a=Zr(e,he,i,i,i,i,i,t);return a.placeholder=ch.placeholder,a}function uh(e,t,s){var a,l,p,m,_,S,L=0,D=!1,q=!1,W=!0;if(typeof e!="function")throw new wr(d);t=Sr(t)||0,ut(s)&&(D=!!s.leading,q="maxWait"in s,p=q?Mt(Sr(s.maxWait)||0,t):p,W="trailing"in s?!!s.trailing:W);function te(xt){var Dr=a,ii=l;return a=l=i,L=xt,m=e.apply(ii,Dr),m}function oe(xt){return L=xt,_=Ns(Se,t),D?te(xt):m}function be(xt){var Dr=xt-S,ii=xt-L,Ch=t-Dr;return q?Kt(Ch,p-ii):Ch}function ae(xt){var Dr=xt-S,ii=xt-L;return S===i||Dr>=t||Dr<0||q&&ii>=p}function Se(){var xt=Wn();if(ae(xt))return Oe(xt);_=Ns(Se,be(xt))}function Oe(xt){return _=i,W&&a?te(xt):(a=l=i,m)}function dr(){_!==i&&_u(_),L=0,a=S=l=_=i}function Qt(){return _===i?m:Oe(Wn())}function gr(){var xt=Wn(),Dr=ae(xt);if(a=arguments,l=this,S=xt,Dr){if(_===i)return oe(S);if(q)return _u(_),_=Ns(Se,t),te(S)}return _===i&&(_=Ns(Se,t)),m}return gr.cancel=dr,gr.flush=Qt,gr}var $v=Ie(function(e,t){return Zc(e,1,t)}),jv=Ie(function(e,t,s){return Zc(e,Sr(t)||0,s)});function Mv(e){return Zr(e,ve)}function Jn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new wr(d);var s=function(){var a=arguments,l=t?t.apply(this,a):a[0],p=s.cache;if(p.has(l))return p.get(l);var m=e.apply(this,a);return s.cache=p.set(l,m)||p,m};return s.cache=new(Jn.Cache||Yr),s}Jn.Cache=Yr;function Yn(e){if(typeof e!="function")throw new wr(d);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Uv(e){return nh(2,e)}var qv=Pd(function(e,t){t=t.length==1&&me(t[0])?nt(t[0],lr(se())):nt(Bt(t,1),lr(se()));var s=t.length;return Ie(function(a){for(var l=-1,p=Kt(a.length,s);++l=t}),ji=iu(function(){return arguments}())?iu:function(e){return yt(e)&&Ue.call(e,"callee")&&!Hc.call(e,"callee")},me=C.isArray,ty=Yt?lr(Yt):ud;function nr(e){return e!=null&&Xn(e.length)&&!ti(e)}function Et(e){return yt(e)&&nr(e)}function ry(e){return e===!0||e===!1||yt(e)&&Xt(e)==O}var yi=vp||Ha,iy=Rr?lr(Rr):hd;function sy(e){return yt(e)&&e.nodeType===1&&!Ls(e)}function ny(e){if(e==null)return!0;if(nr(e)&&(me(e)||typeof e=="string"||typeof e.splice=="function"||yi(e)||os(e)||ji(e)))return!e.length;var t=Gt(e);if(t==we||t==$e)return!e.size;if(Ts(e))return!aa(e).length;for(var s in e)if(Ue.call(e,s))return!1;return!0}function oy(e,t){return Cs(e,t)}function ay(e,t,s){s=typeof s=="function"?s:i;var a=s?s(e,t):i;return a===i?Cs(e,t,i,s):!!a}function La(e){if(!yt(e))return!1;var t=Xt(e);return t==b||t==u||typeof e.message=="string"&&typeof e.name=="string"&&!Ls(e)}function cy(e){return typeof e=="number"&&Vc(e)}function ti(e){if(!ut(e))return!1;var t=Xt(e);return t==ee||t==fe||t==R||t==_t}function lh(e){return typeof e=="number"&&e==_e(e)}function Xn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=k}function ut(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function yt(e){return e!=null&&typeof e=="object"}var fh=mr?lr(mr):fd;function uy(e,t){return e===t||oa(e,t,xa(t))}function hy(e,t,s){return s=typeof s=="function"?s:i,oa(e,t,xa(t),s)}function ly(e){return ph(e)&&e!=+e}function fy(e){if(Jd(e))throw new de(h);return su(e)}function py(e){return e===null}function dy(e){return e==null}function ph(e){return typeof e=="number"||yt(e)&&Xt(e)==Ne}function Ls(e){if(!yt(e)||Xt(e)!=Pe)return!1;var t=In(e);if(t===null)return!0;var s=Ue.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&wn.call(s)==hp}var Da=qr?lr(qr):pd;function gy(e){return lh(e)&&e>=-k&&e<=k}var dh=ms?lr(ms):dd;function Zn(e){return typeof e=="string"||!me(e)&&yt(e)&&Xt(e)==Ze}function pr(e){return typeof e=="symbol"||yt(e)&&Xt(e)==Qe}var os=Oi?lr(Oi):gd;function vy(e){return e===i}function yy(e){return yt(e)&&Gt(e)==ze}function my(e){return yt(e)&&Xt(e)==et}var _y=kn(ca),wy=kn(function(e,t){return e<=t});function gh(e){if(!e)return[];if(nr(e))return Zn(e)?Tr(e):sr(e);if(ws&&e[ws])return Zf(e[ws]());var t=Gt(e),s=t==we?Jo:t==$e?yn:as;return s(e)}function ri(e){if(!e)return e===0?e:0;if(e=Sr(e),e===ce||e===-ce){var t=e<0?-1:1;return t*U}return e===e?e:0}function _e(e){var t=ri(e),s=t%1;return t===t?s?t-s:t:0}function vh(e){return e?Li(_e(e),0,H):0}function Sr(e){if(typeof e=="number")return e;if(pr(e))return z;if(ut(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ut(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Fc(e);var s=Io.test(e);return s||Po.test(e)?ye(e.slice(2),s?2:8):xo.test(e)?z:+e}function yh(e){return kr(e,or(e))}function by(e){return e?Li(_e(e),-k,k):e===0?e:0}function je(e){return e==null?"":fr(e)}var Ey=is(function(e,t){if(Ts(t)||nr(t)){kr(t,zt(t),e);return}for(var s in t)Ue.call(t,s)&&Ss(e,s,t[s])}),mh=is(function(e,t){kr(t,or(t),e)}),Qn=is(function(e,t,s,a){kr(t,or(t),e,a)}),xy=is(function(e,t,s,a){kr(t,zt(t),e,a)}),Iy=Qr(ta);function Sy(e,t){var s=rs(e);return t==null?s:Yc(s,t)}var Py=Ie(function(e,t){e=Je(e);var s=-1,a=t.length,l=a>2?t[2]:i;for(l&&Zt(t[0],t[1],l)&&(a=1);++s1),p}),kr(e,ba(e),s),a&&(s=Er(s,K|J|G,jd));for(var l=t.length;l--;)pa(s,t[l]);return s});function By(e,t){return wh(e,Yn(se(t)))}var Vy=Qr(function(e,t){return e==null?{}:md(e,t)});function wh(e,t){if(e==null)return{};var s=nt(ba(e),function(a){return[a]});return t=se(t),lu(e,s,function(a,l){return t(a,l[0])})}function Ky(e,t,s){t=gi(t,e);var a=-1,l=t.length;for(l||(l=1,e=i);++at){var a=e;e=t,t=a}if(s||e%1||t%1){var l=Kc();return Kt(e+l*(t-e+Ge("1e-"+((l+"").length-1))),t)}return ha(e,t)}var i0=ss(function(e,t,s){return t=t.toLowerCase(),e+(s?xh(t):t)});function xh(e){return ja(je(e).toLowerCase())}function Ih(e){return e=je(e),e&&e.replace(Gr,Gf).replace(Uo,"")}function s0(e,t,s){e=je(e),t=fr(t);var a=e.length;s=s===i?a:Li(_e(s),0,a);var l=s;return s-=t.length,s>=0&&e.slice(s,l)==t}function n0(e){return e=je(e),e&&it.test(e)?e.replace(Ii,Wf):e}function o0(e){return e=je(e),e&&Rt.test(e)?e.replace(dt,"\\$&"):e}var a0=ss(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),c0=ss(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),u0=Au("toLowerCase");function h0(e,t,s){e=je(e),t=_e(t);var a=t?Xi(e):0;if(!t||a>=t)return e;var l=(t-a)/2;return zn(Cn(l),s)+e+zn(An(l),s)}function l0(e,t,s){e=je(e),t=_e(t);var a=t?Xi(e):0;return t&&a>>0,s?(e=je(e),e&&(typeof t=="string"||t!=null&&!Da(t))&&(t=fr(t),!t&&Yi(e))?vi(Tr(e),0,s):e.split(t,s)):[]}var m0=ss(function(e,t,s){return e+(s?" ":"")+ja(t)});function _0(e,t,s){return e=je(e),s=s==null?0:Li(_e(s),0,e.length),t=fr(t),e.slice(s,s+t.length)==t}function w0(e,t,s){var a=f.templateSettings;s&&Zt(e,t,s)&&(t=i),e=je(e),t=Qn({},t,a,Du);var l=Qn({},t.imports,a.imports,Du),p=zt(l),m=Wo(l,p),_,S,L=0,D=t.interpolate||ki,q="__p += '",W=Yo((t.escape||ki).source+"|"+D.source+"|"+(D===ct?Eo:ki).source+"|"+(t.evaluate||ki).source+"|$","g"),te="//# sourceURL="+(Ue.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qo+"]")+` -`;e.replace(W,function(ae,Se,Oe,dr,Qt,gr){return Oe||(Oe=dr),q+=e.slice(L,gr).replace(Co,Jf),Se&&(_=!0,q+=`' + -__e(`+Se+`) + -'`),Qt&&(S=!0,q+=`'; -`+Qt+`; -__p += '`),Oe&&(q+=`' + -((__t = (`+Oe+`)) == null ? '' : __t) + -'`),L=gr+ae.length,ae}),q+=`'; -`;var oe=Ue.call(t,"variable")&&t.variable;if(!oe)q=`with (obj) { -`+q+` -} -`;else if(wo.test(oe))throw new de(y);q=(S?q.replace(Mr,""):q).replace(Jt,"$1").replace(Kr,"$1;"),q="function("+(oe||"obj")+`) { -`+(oe?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(S?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+q+`return __p -}`;var be=Ph(function(){return Fe(p,te+"return "+q).apply(i,m)});if(be.source=q,La(be))throw be;return be}function b0(e){return je(e).toLowerCase()}function E0(e){return je(e).toUpperCase()}function x0(e,t,s){if(e=je(e),e&&(s||t===i))return Fc(e);if(!e||!(t=fr(t)))return e;var a=Tr(e),l=Tr(t),p=$c(a,l),m=jc(a,l)+1;return vi(a,p,m).join("")}function I0(e,t,s){if(e=je(e),e&&(s||t===i))return e.slice(0,Uc(e)+1);if(!e||!(t=fr(t)))return e;var a=Tr(e),l=jc(a,Tr(t))+1;return vi(a,0,l).join("")}function S0(e,t,s){if(e=je(e),e&&(s||t===i))return e.replace(gt,"");if(!e||!(t=fr(t)))return e;var a=Tr(e),l=$c(a,Tr(t));return vi(a,l).join("")}function P0(e,t){var s=re,a=ue;if(ut(t)){var l="separator"in t?t.separator:l;s="length"in t?_e(t.length):s,a="omission"in t?fr(t.omission):a}e=je(e);var p=e.length;if(Yi(e)){var m=Tr(e);p=m.length}if(s>=p)return e;var _=s-Xi(a);if(_<1)return a;var S=m?vi(m,0,_).join(""):e.slice(0,_);if(l===i)return S+a;if(m&&(_+=S.length-_),Da(l)){if(e.slice(_).search(l)){var L,D=S;for(l.global||(l=Yo(l.source,je(yr.exec(l))+"g")),l.lastIndex=0;L=l.exec(D);)var q=L.index;S=S.slice(0,q===i?_:q)}}else if(e.indexOf(fr(l),_)!=_){var W=S.lastIndexOf(l);W>-1&&(S=S.slice(0,W))}return S+a}function A0(e){return e=je(e),e&<.test(e)?e.replace(ai,rp):e}var C0=ss(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),ja=Au("toUpperCase");function Sh(e,t,s){return e=je(e),t=s?i:t,t===i?Xf(e)?np(e):kf(e):e.match(t)||[]}var Ph=Ie(function(e,t){try{return qt(e,i,t)}catch(s){return La(s)?s:new de(s)}}),O0=Qr(function(e,t){return _r(t,function(s){s=Hr(s),Xr(e,s,Ta(e[s],e))}),e});function R0(e){var t=e==null?0:e.length,s=se();return e=t?nt(e,function(a){if(typeof a[1]!="function")throw new wr(d);return[s(a[0]),a[1]]}):[],Ie(function(a){for(var l=-1;++lk)return[];var s=H,a=Kt(e,H);t=se(t),e-=H;for(var l=Go(a,t);++s0||t<0)?new Ae(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==i&&(t=_e(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},Ae.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ae.prototype.toArray=function(){return this.take(H)},zr(Ae.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),l=f[a?"take"+(t=="last"?"Right":""):t],p=a||/^find/.test(t);l&&(f.prototype[t]=function(){var m=this.__wrapped__,_=a?[1]:arguments,S=m instanceof Ae,L=_[0],D=S||me(m),q=function(Se){var Oe=l.apply(f,hi([Se],_));return a&&W?Oe[0]:Oe};D&&s&&typeof L=="function"&&L.length!=1&&(S=D=!1);var W=this.__chain__,te=!!this.__actions__.length,oe=p&&!W,be=S&&!te;if(!p&&D){m=be?m:new Ae(this);var ae=e.apply(m,_);return ae.__actions__.push({func:Kn,args:[q],thisArg:i}),new br(ae,W)}return oe&&be?e.apply(this,_):(ae=this.thru(q),oe?a?ae.value()[0]:ae.value():ae)})}),_r(["pop","push","shift","sort","splice","unshift"],function(e){var t=mn[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(a&&!this.__chain__){var p=this.value();return t.apply(me(p)?p:[],l)}return this[s](function(m){return t.apply(me(m)?m:[],l)})}}),zr(Ae.prototype,function(e,t){var s=f[t];if(s){var a=s.name+"";Ue.call(ts,a)||(ts[a]=[]),ts[a].push({name:t,func:s})}}),ts[Un(i,Ee).name]=[{name:"wrapper",func:i}],Ae.prototype.clone=Ap,Ae.prototype.reverse=Cp,Ae.prototype.value=Op,f.prototype.at=sv,f.prototype.chain=nv,f.prototype.commit=ov,f.prototype.next=av,f.prototype.plant=uv,f.prototype.reverse=hv,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=lv,f.prototype.first=f.prototype.head,ws&&(f.prototype[ws]=cv),f},Zi=op();bt?((bt.exports=Zi)._=Zi,We._=Zi):Ce._=Zi}).call(Hs)})(lc,lc.exports);var pE=Object.defineProperty,dE=Object.defineProperties,gE=Object.getOwnPropertyDescriptors,Rl=Object.getOwnPropertySymbols,vE=Object.prototype.hasOwnProperty,yE=Object.prototype.propertyIsEnumerable,Tl=(c,r,i)=>r in c?pE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,to=(c,r)=>{for(var i in r||(r={}))vE.call(r,i)&&Tl(c,i,r[i]);if(Rl)for(var i of Rl(r))yE.call(r,i)&&Tl(c,i,r[i]);return c},mE=(c,r)=>dE(c,gE(r));function Cr(c,r,i){let n;const o=fc(c);return r.rpcMap&&(n=r.rpcMap[o]),n||(n=`${fE}?chainId=eip155:${o}&projectId=${i}`),n}function fc(c){return c.includes("eip155")?Number(c.split(":")[1]):Number(c)}function Ff(c){return c.map(r=>`${r.split(":")[0]}:${r.split(":")[1]}`)}function _E(c,r){const i=Object.keys(r.namespaces).filter(o=>o.includes(c));if(!i.length)return[];const n=[];return i.forEach(o=>{const h=r.namespaces[o].accounts;n.push(...h)}),n}function wE(c={},r={}){const i=Nl(c),n=Nl(r);return lc.exports.merge(i,n)}function Nl(c){var r,i,n,o;const h={};if(!so(c))return h;for(const[d,y]of Object.entries(c)){const w=Vl(d)?[d]:y.chains,A=y.methods||[],F=y.events||[],K=y.rpcMap||{},J=no(d);h[J]=mE(to(to({},h[J]),y),{chains:Va(w,(r=h[J])==null?void 0:r.chains),methods:Va(A,(i=h[J])==null?void 0:i.methods),events:Va(F,(n=h[J])==null?void 0:n.events),rpcMap:to(to({},K),(o=h[J])==null?void 0:o.rpcMap)})}return h}function bE(c){return c.includes(":")?c.split(":")[2]:c}function EE(c){const r={};for(const[i,n]of Object.entries(c)){const o=n.methods||[],h=n.events||[],d=n.accounts||[],y=Vl(i)?[i]:n.chains?n.chains:Ff(n.accounts);r[i]={chains:y,methods:o,events:h,accounts:d}}return r}const $f={},It=c=>$f[c],ic=(c,r)=>{$f[c]=r};class xE{constructor(r){this.name="polkadot",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2])||[]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class IE{constructor(r){this.name="eip155",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(r){switch(r.request.method){case"eth_requestAccounts":return this.getAccounts();case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(r);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(r.request.method)?await this.client.request(r):this.getHttpProvider().request(r.request)}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}setDefaultChain(r,i){const n=fc(r);if(!this.httpProviders[n]){const o=i||Cr(`${this.name}:${n}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${n}`);this.setHttpProvider(n,o)}this.chainId=n,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${n}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}createHttpProvider(r,i){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;const o=fc(i);r[o]=this.createHttpProvider(o,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}getHttpProvider(){const r=this.chainId,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}async handleSwitchChain(r){var i,n;let o=r.request.params?(i=r.request.params[0])==null?void 0:i.chainId:"0x0";o=o.startsWith("0x")?o:`0x${o}`;const h=parseInt(o,16);if(this.isChainApproved(h))this.setDefaultChain(`${h}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:r.topic,request:{method:r.request.method,params:[{chainId:o}]},chainId:(n=this.namespace.chains)==null?void 0:n[0]}),this.setDefaultChain(`${h}`);else throw new Error(`Failed to switch to chain 'eip155:${h}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(r){return this.namespace.chains.includes(`${this.name}:${r}`)}}class SE{constructor(r){this.name="solana",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class PE{constructor(r){this.name="cosmos",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class AE{constructor(r){this.name="cip34",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(this.chainId=r,!this.httpProviders[r]){const n=i||this.getCardanoRPCUrl(r);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{const n=this.getCardanoRPCUrl(i);r[i]=this.createHttpProvider(i,n)}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}getCardanoRPCUrl(r){const i=this.namespace.rpcMap;if(i)return i[r]}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||this.getCardanoRPCUrl(r);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class CE{constructor(r){this.name="elrond",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}class OE{constructor(r){this.name="multiversx",this.namespace=r.namespace,this.events=It("events"),this.client=It("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(r){this.namespace=Object.assign(this.namespace,r)}requestAccounts(){return this.getAccounts()}request(r){return this.namespace.methods.includes(r.request.method)?this.client.request(r):this.getHttpProvider().request(r.request)}setDefaultChain(r,i){if(!this.httpProviders[r]){const n=i||Cr(`${this.name}:${r}`,this.namespace,this.client.core.projectId);if(!n)throw new Error(`No RPC url provided for chainId: ${r}`);this.setHttpProvider(r,n)}this.chainId=r,this.events.emit(xi.DEFAULT_CHAIN_CHANGED,`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const r=this.namespace.chains[0];if(!r)throw new Error("ChainId not found");return r.split(":")[1]}getAccounts(){const r=this.namespace.accounts;return r?[...new Set(r.filter(i=>i.split(":")[1]===this.chainId.toString()).map(i=>i.split(":")[2]))]:[]}createHttpProviders(){const r={};return this.namespace.chains.forEach(i=>{var n;r[i]=this.createHttpProvider(i,(n=this.namespace.rpcMap)==null?void 0:n[i])}),r}getHttpProvider(){const r=`${this.name}:${this.chainId}`,i=this.httpProviders[r];if(typeof i>"u")throw new Error(`JSON-RPC provider for ${r} not found`);return i}setHttpProvider(r,i){const n=this.createHttpProvider(r,i);n&&(this.httpProviders[r]=n)}createHttpProvider(r,i){const n=i||Cr(r,this.namespace,this.client.core.projectId);return typeof n>"u"?void 0:new Ei(new zi(n,It("disableProviderPing")))}}var RE=Object.defineProperty,TE=Object.defineProperties,NE=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,LE=Object.prototype.hasOwnProperty,DE=Object.prototype.propertyIsEnumerable,Dl=(c,r,i)=>r in c?RE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,ro=(c,r)=>{for(var i in r||(r={}))LE.call(r,i)&&Dl(c,i,r[i]);if(Ll)for(var i of Ll(r))DE.call(r,i)&&Dl(c,i,r[i]);return c},sc=(c,r)=>TE(c,NE(r));class Cc{constructor(r){this.events=new mc,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=r,this.logger=typeof(r==null?void 0:r.logger)<"u"&&typeof(r==null?void 0:r.logger)!="string"?r.logger:Re.pino(Re.getDefaultLoggerOptions({level:(r==null?void 0:r.logger)||Cl})),this.disableProviderPing=(r==null?void 0:r.disableProviderPing)||!1}static async init(r){const i=new Cc(r);return await i.initialize(),i}async request(r,i){const[n,o]=this.validateChain(i);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(n).request({request:ro({},r),chainId:`${n}:${o}`,topic:this.session.topic})}sendAsync(r,i,n){this.request(r,n).then(o=>i(null,o)).catch(o=>i(o,void 0))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var r;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:(r=this.session)==null?void 0:r.topic,reason:tr("USER_DISCONNECTED")}),await this.cleanup()}async connect(r){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(r),await this.cleanupPendingPairings(),!r.skipPairing)return await this.pair(r.pairingTopic)}on(r,i){this.events.on(r,i)}once(r,i){this.events.once(r,i)}removeListener(r,i){this.events.removeListener(r,i)}off(r,i){this.events.off(r,i)}get isWalletConnect(){return!0}async pair(r){this.shouldAbortPairingAttempt=!1;let i=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(i>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:n,approval:o}=await this.client.connect({pairingTopic:r,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});n&&(this.uri=n,this.events.emit("display_uri",n)),await o().then(h=>{this.session=h,this.namespaces||(this.namespaces=EE(h.namespaces),this.persist("namespaces",this.namespaces))}).catch(h=>{if(h.message!==Lf)throw h;i++})}while(!this.session);return this.onConnect(),this.session}setDefaultChain(r,i){try{if(!this.session)return;const[n,o]=this.validateChain(r);this.getProvider(n).setDefaultChain(o,i)}catch(n){if(!/Please call connect/.test(n.message))throw n}}async cleanupPendingPairings(r={}){this.logger.info("Cleaning up inactive pairings...");const i=this.client.pairing.getAll();if(ps(i)){for(const n of i)r.deletePairings?this.client.core.expirer.set(n.topic,0):await this.client.core.relayer.subscriber.unsubscribe(n.topic);this.logger.info(`Inactive pairings cleared: ${i.length}`)}}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}async checkStorage(){if(this.namespaces=await this.getFromStore("namespaces"),this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.client.session.length){const r=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[r]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await nE.init({logger:this.providerOpts.logger||Cl,relayUrl:this.providerOpts.relayUrl||uE,projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,name:this.providerOpts.name}),this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");const r=[...new Set(Object.keys(this.session.namespaces).map(i=>no(i)))];ic("client",this.client),ic("events",this.events),ic("disableProviderPing",this.disableProviderPing),r.forEach(i=>{if(!this.session)return;const n=_E(i,this.session),o=Ff(n),h=wE(this.namespaces,this.optionalNamespaces),d=sc(ro({},h[i]),{accounts:n,chains:o});switch(i){case"eip155":this.rpcProviders[i]=new IE({namespace:d});break;case"solana":this.rpcProviders[i]=new SE({namespace:d});break;case"cosmos":this.rpcProviders[i]=new PE({namespace:d});break;case"polkadot":this.rpcProviders[i]=new xE({namespace:d});break;case"cip34":this.rpcProviders[i]=new AE({namespace:d});break;case"elrond":this.rpcProviders[i]=new CE({namespace:d});break;case"multiversx":this.rpcProviders[i]=new OE({namespace:d});break}})}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",r=>{this.events.emit("session_ping",r)}),this.client.on("session_event",r=>{const{params:i}=r,{event:n}=i;if(n.name==="accountsChanged"){const o=n.data;o&&ps(o)&&this.events.emit("accountsChanged",o.map(bE))}else n.name==="chainChanged"?this.onChainChanged(i.chainId):this.events.emit(n.name,n.data);this.events.emit("session_event",r)}),this.client.on("session_update",({topic:r,params:i})=>{var n;const{namespaces:o}=i,h=(n=this.client)==null?void 0:n.session.get(r);this.session=sc(ro({},h),{namespaces:o}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:i})}),this.client.on("session_delete",async r=>{await this.cleanup(),this.events.emit("session_delete",r),this.events.emit("disconnect",sc(ro({},tr("USER_DISCONNECTED")),{data:r.topic}))}),this.on(xi.DEFAULT_CHAIN_CHANGED,r=>{this.onChainChanged(r,!0)})}getProvider(r){if(!this.rpcProviders[r])throw new Error(`Provider not found: ${r}`);return this.rpcProviders[r]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(r=>{var i;this.getProvider(r).updateNamespace((i=this.session)==null?void 0:i.namespaces[r])})}setNamespaces(r){const{namespaces:i,optionalNamespaces:n,sessionProperties:o}=r;i&&Object.keys(i).length&&(this.namespaces=i),n&&Object.keys(n).length&&(this.optionalNamespaces=n),this.sessionProperties=o,this.persist("namespaces",i),this.persist("optionalNamespaces",n)}validateChain(r){const[i,n]=(r==null?void 0:r.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[i,n];if(i&&!Object.keys(this.namespaces||{}).map(d=>no(d)).includes(i))throw new Error(`Namespace '${i}' is not configured. Please call connect() first with namespace config.`);if(i&&n)return[i,n];const o=no(Object.keys(this.namespaces)[0]),h=this.rpcProviders[o].getDefaultChain();return[o,h]}async requestAccounts(){const[r]=this.validateChain();return await this.getProvider(r).requestAccounts()}onChainChanged(r,i=!1){var n;if(!this.namespaces)return;const[o,h]=this.validateChain(r);i||this.getProvider(o).setDefaultChain(h),((n=this.namespaces[o])!=null?n:this.namespaces[`${o}:${h}`]).defaultChain=h,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",h)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.session=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,this.persist("namespaces",void 0),this.persist("optionalNamespaces",void 0),this.persist("sessionProperties",void 0),await this.cleanupPendingPairings({deletePairings:!0})}persist(r,i){this.client.core.storage.setItem(`${Ol}/${r}`,i)}async getFromStore(r){return await this.client.core.storage.getItem(`${Ol}/${r}`)}}const FE=Cc,$E="wc",jE="ethereum_provider",ME=`${$E}@2:${jE}:`,UE="https://rpc.walletconnect.com/v1/",pc=["eth_sendTransaction","personal_sign"],qE=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],dc=["chainChanged","accountsChanged"],zE=["message","disconnect","connect"];var kE=Object.defineProperty,HE=Object.defineProperties,BE=Object.getOwnPropertyDescriptors,Fl=Object.getOwnPropertySymbols,VE=Object.prototype.hasOwnProperty,KE=Object.prototype.propertyIsEnumerable,$l=(c,r,i)=>r in c?kE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Bs=(c,r)=>{for(var i in r||(r={}))VE.call(r,i)&&$l(c,i,r[i]);if(Fl)for(var i of Fl(r))KE.call(r,i)&&$l(c,i,r[i]);return c},jl=(c,r)=>HE(c,BE(r));function ho(c){return Number(c[0].split(":")[1])}function nc(c){return`0x${c.toString(16)}`}function GE(c){const{chains:r,optionalChains:i,methods:n,optionalMethods:o,events:h,optionalEvents:d,rpcMap:y}=c;if(!ps(r))throw new Error("Invalid chains");const w={chains:r,methods:n||pc,events:h||dc,rpcMap:Bs({},r.length?{[ho(r)]:y[ho(r)]}:{})},A=h==null?void 0:h.filter(G=>!dc.includes(G)),F=n==null?void 0:n.filter(G=>!pc.includes(G));if(!i&&!d&&!o&&!(A!=null&&A.length)&&!(F!=null&&F.length))return{required:r.length?w:void 0};const K=(A==null?void 0:A.length)&&(F==null?void 0:F.length)||!i,J={chains:[...new Set(K?w.chains.concat(i||[]):i)],methods:[...new Set(w.methods.concat(o!=null&&o.length?o:qE))],events:[...new Set(w.events.concat(d||zE))],rpcMap:y};return{required:r.length?w:void 0,optional:i.length?J:void 0}}class Oc{constructor(){this.events=new vr.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=ME,this.on=(r,i)=>(this.events.on(r,i),this),this.once=(r,i)=>(this.events.once(r,i),this),this.removeListener=(r,i)=>(this.events.removeListener(r,i),this),this.off=(r,i)=>(this.events.off(r,i),this),this.parseAccount=r=>this.isCompatibleChainId(r)?this.parseAccountId(r).address:r,this.signer={},this.rpc={}}static async init(r){const i=new Oc;return await i.initialize(r),i}async request(r){return await this.signer.request(r,this.formatChainId(this.chainId))}sendAsync(r,i){this.signer.sendAsync(r,i,this.formatChainId(this.chainId))}get connected(){return this.signer.client?this.signer.client.core.relayer.connected:!1}get connecting(){return this.signer.client?this.signer.client.core.relayer.connecting:!1}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(r){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(r);const{required:i,optional:n}=GE(this.rpc);try{const o=await new Promise(async(d,y)=>{var w;this.rpc.showQrModal&&((w=this.modal)==null||w.subscribeModal(A=>{!A.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),y(new Error("Connection request reset. Please try again.")))})),await this.signer.connect(jl(Bs({namespaces:Bs({},i&&{[this.namespace]:i})},n&&{optionalNamespaces:{[this.namespace]:n}}),{pairingTopic:r==null?void 0:r.pairingTopic})).then(A=>{d(A)}).catch(A=>{y(new Error(A.message))})});if(!o)return;this.setChainIds(this.rpc.chains);const h=Z1(o.namespaces,[this.namespace]);this.setAccounts(h),this.events.emit("connect",{chainId:nc(this.chainId)})}catch(o){throw this.signer.logger.error(o),o}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",r=>{const{params:i}=r,{event:n}=i;n.name==="accountsChanged"?(this.accounts=this.parseAccounts(n.data),this.events.emit("accountsChanged",this.accounts)):n.name==="chainChanged"?this.setChainId(this.formatChainId(n.data)):this.events.emit(n.name,n.data),this.events.emit("session_event",r)}),this.signer.on("chainChanged",r=>{const i=parseInt(r);this.chainId=i,this.events.emit("chainChanged",nc(this.chainId)),this.persist()}),this.signer.on("session_update",r=>{this.events.emit("session_update",r)}),this.signer.on("session_delete",r=>{this.reset(),this.events.emit("session_delete",r),this.events.emit("disconnect",jl(Bs({},tr("USER_DISCONNECTED")),{data:r.topic,name:"USER_DISCONNECTED"}))}),this.signer.on("display_uri",r=>{var i,n;this.rpc.showQrModal&&((i=this.modal)==null||i.closeModal(),(n=this.modal)==null||n.openModal({uri:r})),this.events.emit("display_uri",r)})}switchEthereumChain(r){this.request({method:"wallet_switchEthereumChain",params:[{chainId:r.toString(16)}]})}isCompatibleChainId(r){return typeof r=="string"?r.startsWith(`${this.namespace}:`):!1}formatChainId(r){return`${this.namespace}:${r}`}parseChainId(r){return Number(r.split(":")[1])}setChainIds(r){const i=r.filter(n=>this.isCompatibleChainId(n)).map(n=>this.parseChainId(n));i.length&&(this.chainId=i[0],this.events.emit("chainChanged",nc(this.chainId)),this.persist())}setChainId(r){if(this.isCompatibleChainId(r)){const i=this.parseChainId(r);this.chainId=i,this.switchEthereumChain(i)}}parseAccountId(r){const[i,n,o]=r.split(":");return{chainId:`${i}:${n}`,address:o}}setAccounts(r){this.accounts=r.filter(i=>this.parseChainId(this.parseAccountId(i).chainId)===this.chainId).map(i=>this.parseAccountId(i).address),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(r){var i,n;const o=(i=r==null?void 0:r.chains)!=null?i:[],h=(n=r==null?void 0:r.optionalChains)!=null?n:[],d=o.concat(h);if(!d.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const y=o.length?(r==null?void 0:r.methods)||pc:[],w=o.length?(r==null?void 0:r.events)||dc:[],A=(r==null?void 0:r.optionalMethods)||[],F=(r==null?void 0:r.optionalEvents)||[],K=(r==null?void 0:r.rpcMap)||this.buildRpcMap(d,r.projectId),J=(r==null?void 0:r.qrModalOptions)||void 0;return{chains:o==null?void 0:o.map(G=>this.formatChainId(G)),optionalChains:h.map(G=>this.formatChainId(G)),methods:y,events:w,optionalMethods:A,optionalEvents:F,rpcMap:K,showQrModal:!!(r!=null&&r.showQrModal),qrModalOptions:J,projectId:r.projectId,metadata:r.metadata}}buildRpcMap(r,i){const n={};return r.forEach(o=>{n[o]=this.getRpcUrl(o,i)}),n}async initialize(r){if(this.rpc=this.getRpcConfig(r),this.chainId=this.rpc.chains.length?ho(this.rpc.chains):ho(this.rpc.optionalChains),this.signer=await FE.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:r.disableProviderPing,relayUrl:r.relayUrl,storageOptions:r.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let i;try{const{WalletConnectModal:n}=await Q1(()=>import("./index-4f807a19.js").then(o=>o.a),["./index-4f807a19.js","./index-dddcbded.js","./index-6c7fade5.css"],import.meta.url);i=n}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(i)try{this.modal=new i(Bs({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(n){throw this.signer.logger.error(n),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(r){if(!r)return;const{chains:i,optionalChains:n,rpcMap:o}=r;i&&ps(i)&&(this.rpc.chains=i.map(h=>this.formatChainId(h)),i.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)})),n&&ps(n)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=n==null?void 0:n.map(h=>this.formatChainId(h)),n.forEach(h=>{this.rpc.rpcMap[h]=(o==null?void 0:o[h])||this.getRpcUrl(h)}))}getRpcUrl(r,i){var n;return((n=this.rpc.rpcMap)==null?void 0:n[r])||`${UE}?chainId=eip155:${r}&projectId=${i||this.rpc.projectId}`}async loadPersistedSession(){if(!this.session)return;const r=await this.signer.client.core.storage.getItem(`${this.STORAGE_KEY}/chainId`),i=this.session.namespaces[`${this.namespace}:${r}`]?this.session.namespaces[`${this.namespace}:${r}`]:this.session.namespaces[this.namespace];this.setChainIds(r?[this.formatChainId(r)]:i==null?void 0:i.accounts),this.setAccounts(i==null?void 0:i.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem(`${this.STORAGE_KEY}/chainId`,this.chainId)}parseAccounts(r){return typeof r=="string"||r instanceof String?[this.parseAccount(r)]:r.map(i=>this.parseAccount(i))}}const ix=Oc;export{ix as EthereumProvider,zE as OPTIONAL_EVENTS,qE as OPTIONAL_METHODS,dc as REQUIRED_EVENTS,pc as REQUIRED_METHODS,Oc as default}; diff --git a/index.html b/index.html index c773fc05..dd95b7c8 100644 --- a/index.html +++ b/index.html @@ -24,8 +24,8 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence Kit Demo - - + +