From 09acff9b57d04b3e3b271d14d4c9505bf32e6fad Mon Sep 17 00:00:00 2001 From: SamueleA Date: Tue, 26 Sep 2023 21:48:31 +0000 Subject: [PATCH] Build: (de6cd23) fix networks showing as mainnet --- assets/{ccip-6ef1b21e.js => ccip-f0ac5289.js} | 2 +- .../{index-d001aca1.js => index-123c87d4.js} | 4 +- .../{index-3dd70933.js => index-7f02df05.js} | 2 +- .../{index-3c24af3d.js => index-aa62d2a2.js} | 244 +++++++++--------- ...ex.es-5f20ba08.js => index.es-d71ec09d.js} | 4 +- index.html | 2 +- 6 files changed, 129 insertions(+), 129 deletions(-) rename assets/{ccip-6ef1b21e.js => ccip-f0ac5289.js} (97%) rename assets/{index-d001aca1.js => index-123c87d4.js} (99%) rename assets/{index-3dd70933.js => index-7f02df05.js} (99%) rename assets/{index-3c24af3d.js => index-aa62d2a2.js} (57%) rename assets/{index.es-5f20ba08.js => index.es-d71ec09d.js} (99%) diff --git a/assets/ccip-6ef1b21e.js b/assets/ccip-f0ac5289.js similarity index 97% rename from assets/ccip-6ef1b21e.js rename to assets/ccip-f0ac5289.js index 5a8caa2d..af72eee0 100644 --- a/assets/ccip-6ef1b21e.js +++ b/assets/ccip-f0ac5289.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-3c24af3d.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-aa62d2a2.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"?Boolean(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(Boolean(i.enableAuthMode)),j.setIsCustomMobile(Boolean((c=i.mobileWallets)==null?void 0:c.length)),j.setIsCustomDesktop(Boolean((l=i.desktopWallets)==null?void 0: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-3dd70933.js"),["./index-3dd70933.js","./index-3c24af3d.js","./index-fddf5a6e.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"?Boolean(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(Boolean(i.enableAuthMode)),j.setIsCustomMobile(Boolean((c=i.mobileWallets)==null?void 0:c.length)),j.setIsCustomDesktop(Boolean((l=i.desktopWallets)==null?void 0: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-7f02df05.js"),["./index-7f02df05.js","./index-aa62d2a2.js","./index-fddf5a6e.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-3dd70933.js b/assets/index-7f02df05.js similarity index 99% rename from assets/index-3dd70933.js rename to assets/index-7f02df05.js index 68ed865c..d96d3a7e 100644 --- a/assets/index-3dd70933.js +++ b/assets/index-7f02df05.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-d001aca1.js";import"./index-3c24af3d.js";function Uo(e,t){e.indexOf(t)===-1&&e.push(t)}const no=(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 io=(e,t,r)=>-r*e+r*t+e,so=()=>{},it=e=>e,wr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function ao(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=wr(0,t,n);e.push(io(r,1,o))}}function Ho(e){const t=[0];return ao(t,e-1),t}function zo(e,t=Ho(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&ao(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&Boolean(e.createAnimation),Ot=e=>typeof e=="function",Fo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},co=(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=co(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:co(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 no(0,1,o/e)},_r={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 Or(e){if(Ot(e))return e;if(lo(e))return Ht(...e);if(_r[e])return _r[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 ho{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:Or(n),this.updateDuration(o);const d=zo(r,l,Et(n)?n.map(Or):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 uo(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"},kr={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},tn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:kr,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:kr},Zt=new Map,vr=e=>`--motion-${e}`,me=["x","y","z"];Xo.forEach(e=>{Jo.forEach(t=>{me.push(e+t),Zt.set(vr(e+t),tn[e])})});const en=(e,t)=>me.indexOf(e)-me.indexOf(t),rn=new Set(me),mo=e=>rn.has(e),on=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=uo(e);Uo(r,t),e.style.transform=nn(r)},nn=e=>e.sort(en).reduce(sn,"").trim(),sn=(e,t)=>`${e} ${t}(var(${vr(t)}))`,ar=e=>e.startsWith("--"),Ir=new Set;function an(e){if(!Ir.has(e)){Ir.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),Tr={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:()=>Boolean(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 Tr)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Tr[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:lo(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]),mo(e)?vr(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 go(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=uo(e),y=mo(t);let v=Ct.waapi();y&&on(e,t);const w=lr(t),k=Qo(f.values,w),I=Zt.get(w);return go(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:Pr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[w]:T,offset:g,easing:Et(h)?h.map(Z=>Pr(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(so),$||(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(),fo=(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(so)),e.finished;case"stop":return()=>{e.animations.forEach(n=>go(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"currentTime":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 io=(e,t,r)=>-r*e+r*t+e,so=()=>{},it=e=>e,wr=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function ao(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const o=wr(0,t,n);e.push(io(r,1,o))}}function Ho(e){const t=[0];return ao(t,e-1),t}function zo(e,t=Ho(e.length),r=it){const n=e.length,o=n-t.length;return o>0&&ao(t,o),i=>{let s=0;for(;sArray.isArray(e)&&he(e[0]),sr=e=>typeof e=="object"&&Boolean(e.createAnimation),Ot=e=>typeof e=="function",Fo=e=>typeof e=="string",zt={ms:e=>e*1e3,s:e=>e/1e3},co=(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=co(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:co(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 no(0,1,o/e)},_r={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 Or(e){if(Ot(e))return e;if(lo(e))return Ht(...e);if(_r[e])return _r[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 ho{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:Or(n),this.updateDuration(o);const d=zo(r,l,Et(n)?n.map(Or):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 uo(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"},kr={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},tn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:kr,scale:{syntax:"",initialValue:1,toDefaultUnit:it},skew:kr},Zt=new Map,vr=e=>`--motion-${e}`,me=["x","y","z"];Xo.forEach(e=>{Jo.forEach(t=>{me.push(e+t),Zt.set(vr(e+t),tn[e])})});const en=(e,t)=>me.indexOf(e)-me.indexOf(t),rn=new Set(me),mo=e=>rn.has(e),on=(e,t)=>{ue[t]&&(t=ue[t]);const{transforms:r}=uo(e);Uo(r,t),e.style.transform=nn(r)},nn=e=>e.sort(en).reduce(sn,"").trim(),sn=(e,t)=>`${e} ${t}(var(${vr(t)}))`,ar=e=>e.startsWith("--"),Ir=new Set;function an(e){if(!Ir.has(e)){Ir.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),Tr={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:()=>Boolean(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 Tr)Ct[e]=()=>(Ae[e]===void 0&&(Ae[e]=Tr[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:lo(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]),mo(e)?vr(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 go(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=uo(e),y=mo(t);let v=Ct.waapi();y&&on(e,t);const w=lr(t),k=Qo(f.values,w),I=Zt.get(w);return go(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:Pr(h,l),direction:p,iterations:b+1,fill:"both"};a=e.animate({[w]:T,offset:g,easing:Et(h)?h.map(Z=>Pr(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(so),$||(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(),fo=(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(so)),e.finished;case"stop":return()=>{e.animations.forEach(n=>go(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"currentTime":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[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var Wr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $N(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tZ(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){if(this instanceof n){var s=[null];s.push.apply(s,arguments);var i=Function.bind.apply(e,s);return new i}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Tv={},rZ={get exports(){return Tv},set exports(t){Tv=t}},w2={},m={},nZ={get exports(){return m},set exports(t){m=t}},Ze={};/** +function eZ(t,e){for(var r=0;rn[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();var Wr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $N(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tZ(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){if(this instanceof n){var s=[null];s.push.apply(s,arguments);var i=Function.bind.apply(e,s);return new i}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Rv={},rZ={get exports(){return Rv},set exports(t){Rv=t}},x2={},m={},nZ={get exports(){return m},set exports(t){m=t}},Ze={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function eZ(t,e){for(var r=0;r>>1,A=_[D];if(0>>1;Ds(O,B))qs(z,O)?(_[D]=z,_[q]=B,D=q):(_[D]=O,_[G]=B,D=G);else if(qs(z,B))_[D]=z,_[q]=B,D=q;else break e}}return I}function s(_,I){var B=_.sortIndex-I.sortIndex;return B!==0?B:_.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,v=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(_){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=_)n(c),I.sortIndex=I.expirationTime,e(l,I);else break;I=r(c)}}function E(_){if(y=!1,w(_),!v)if(r(l)!==null)v=!0,R(k);else{var I=r(c);I!==null&&M(E,I.startTime-_)}}function k(_,I){v=!1,y&&(y=!1,p(T),T=-1),h=!0;var B=d;try{for(w(I),u=r(l);u!==null&&(!(u.expirationTime>I)||_&&!U());){var D=u.callback;if(typeof D=="function"){u.callback=null,d=u.priorityLevel;var A=D(u.expirationTime<=I);I=t.unstable_now(),typeof A=="function"?u.callback=A:u===r(l)&&n(l),w(I)}else n(l);u=r(l)}if(u!==null)var L=!0;else{var G=r(c);G!==null&&M(E,G.startTime-I),L=!1}return L}finally{u=null,d=B,h=!1}}var $=!1,C=null,T=-1,j=5,F=-1;function U(){return!(t.unstable_now()-F_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(_){switch(d){case 1:case 2:case 3:var I=3;break;default:I=d}var B=d;d=I;try{return _()}finally{d=B}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,I){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var B=d;d=_;try{return I()}finally{d=B}},t.unstable_scheduleCallback=function(_,I,B){var D=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0D?(_.sortIndex=B,e(c,_),r(l)===null&&_===r(c)&&(y?(p(T),T=-1):y=!0,M(E,B-D))):(_.sortIndex=A,e(l,_),v||h||(v=!0,R(k))),_},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(_){var I=d;return function(){var B=d;d=I;try{return _.apply(this,arguments)}finally{d=B}}}})(DN);(function(t){t.exports=DN})(AZ);/** + */(function(t){function e(_,I){var F=_.length;_.push(I);e:for(;0>>1,A=_[D];if(0>>1;Ds(O,F))qs(z,O)?(_[D]=z,_[q]=F,D=q):(_[D]=O,_[G]=F,D=G);else if(qs(z,F))_[D]=z,_[q]=F,D=q;else break e}}return I}function s(_,I){var F=_.sortIndex-I.sortIndex;return F!==0?F:_.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],f=1,u=null,d=3,h=!1,v=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(_){for(var I=r(c);I!==null;){if(I.callback===null)n(c);else if(I.startTime<=_)n(c),I.sortIndex=I.expirationTime,e(l,I);else break;I=r(c)}}function E(_){if(y=!1,w(_),!v)if(r(l)!==null)v=!0,R(k);else{var I=r(c);I!==null&&M(E,I.startTime-_)}}function k(_,I){v=!1,y&&(y=!1,b(T),T=-1),h=!0;var F=d;try{for(w(I),u=r(l);u!==null&&(!(u.expirationTime>I)||_&&!U());){var D=u.callback;if(typeof D=="function"){u.callback=null,d=u.priorityLevel;var A=D(u.expirationTime<=I);I=t.unstable_now(),typeof A=="function"?u.callback=A:u===r(l)&&n(l),w(I)}else n(l);u=r(l)}if(u!==null)var j=!0;else{var G=r(c);G!==null&&M(E,G.startTime-I),j=!1}return j}finally{u=null,d=F,h=!1}}var $=!1,x=null,T=-1,B=5,L=-1;function U(){return!(t.unstable_now()-L_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<_?Math.floor(1e3/_):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(_){switch(d){case 1:case 2:case 3:var I=3;break;default:I=d}var F=d;d=I;try{return _()}finally{d=F}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(_,I){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var F=d;d=_;try{return I()}finally{d=F}},t.unstable_scheduleCallback=function(_,I,F){var D=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0D?(_.sortIndex=F,e(c,_),r(l)===null&&_===r(c)&&(y?(b(T),T=-1):y=!0,M(E,F-D))):(_.sortIndex=A,e(l,_),v||h||(v=!0,R(k))),_},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(_){var I=d;return function(){var F=d;d=I;try{return _.apply(this,arguments)}finally{d=F}}}})(DN);(function(t){t.exports=DN})(AZ);/** * @license React * react-dom.production.min.js * @@ -30,24 +30,14 @@ function eZ(t,e){for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),F5=Object.prototype.hasOwnProperty,_Z=/^[: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]*$/,yP={},mP={};function PZ(t){return F5.call(mP,t)?!0:F5.call(yP,t)?!1:_Z.test(t)?mP[t]=!0:(yP[t]=!0,!1)}function TZ(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 RZ(t,e,r,n){if(e===null||typeof e>"u"||TZ(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 Kn(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var un={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){un[t]=new Kn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];un[e]=new Kn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){un[t]=new Kn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){un[t]=new Kn(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){un[t]=new Kn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){un[t]=new Kn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){un[t]=new Kn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){un[t]=new Kn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){un[t]=new Kn(t,5,!1,t.toLowerCase(),null,!1,!1)});var e8=/[\-:]([a-z])/g;function t8(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(e8,t8);un[e]=new Kn(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(e8,t8);un[e]=new Kn(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(e8,t8);un[e]=new Kn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){un[t]=new Kn(t,1,!1,t.toLowerCase(),null,!1,!1)});un.xlinkHref=new Kn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){un[t]=new Kn(t,1,!1,t.toLowerCase(),null,!0,!0)});function r8(t,e,r,n){var s=un.hasOwnProperty(e)?un[e]:null;(s!==null?s.type!==0:n||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),B5=Object.prototype.hasOwnProperty,_Z=/^[: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]*$/,mP={},pP={};function PZ(t){return B5.call(pP,t)?!0:B5.call(mP,t)?!1:_Z.test(t)?pP[t]=!0:(mP[t]=!0,!1)}function TZ(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 RZ(t,e,r,n){if(e===null||typeof e>"u"||TZ(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 Qn(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var un={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){un[t]=new Qn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];un[e]=new Qn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){un[t]=new Qn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){un[t]=new Qn(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){un[t]=new Qn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){un[t]=new Qn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){un[t]=new Qn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){un[t]=new Qn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){un[t]=new Qn(t,5,!1,t.toLowerCase(),null,!1,!1)});var r8=/[\-:]([a-z])/g;function n8(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(r8,n8);un[e]=new Qn(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(r8,n8);un[e]=new Qn(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(r8,n8);un[e]=new Qn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){un[t]=new Qn(t,1,!1,t.toLowerCase(),null,!1,!1)});un.xlinkHref=new Qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){un[t]=new Qn(t,1,!1,t.toLowerCase(),null,!0,!0)});function s8(t,e,r,n){var s=un.hasOwnProperty(e)?un[e]:null;(s!==null?s.type!==0:n||!(2a||s[o]!==i[a]){var l=` -`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{uC=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?P1(t):""}function IZ(t){switch(t.tag){case 5:return P1(t.type);case 16:return P1("Lazy");case 13:return P1("Suspense");case 19:return P1("SuspenseList");case 0:case 2:case 15:return t=dC(t.type,!1),t;case 11:return t=dC(t.type.render,!1),t;case 1:return t=dC(t.type,!0),t;default:return""}}function V5(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 Pu:return"Fragment";case _u:return"Portal";case B5:return"Profiler";case n8:return"StrictMode";case U5:return"Suspense";case z5:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case FN:return(t.displayName||"Context")+".Consumer";case jN:return(t._context.displayName||"Context")+".Provider";case s8:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case i8:return e=t.displayName||null,e!==null?e:V5(t.type)||"Memo";case Za:e=t._payload,t=t._init;try{return V5(t(e))}catch{}}return null}function OZ(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 V5(e);case 8:return e===n8?"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 Ml(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function UN(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function MZ(t){var e=UN(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 s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.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 Q0(t){t._valueTracker||(t._valueTracker=MZ(t))}function zN(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=UN(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function ig(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 q5(t,e){var r=e.checked;return dr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function gP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Ml(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 VN(t,e){e=e.checked,e!=null&&r8(t,"checked",e,!1)}function W5(t,e){VN(t,e);var r=Ml(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")?H5(t,e.type,r):e.hasOwnProperty("defaultValue")&&H5(t,e.type,Ml(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function bP(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 H5(t,e,r){(e!=="number"||ig(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var T1=Array.isArray;function ed(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=Y0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Iv(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var F1={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},DZ=["Webkit","ms","Moz","O"];Object.keys(F1).forEach(function(t){DZ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),F1[e]=F1[t]})});function GN(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||F1.hasOwnProperty(t)&&F1[t]?(""+e).trim():e+"px"}function KN(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=GN(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var NZ=dr({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 Q5(t,e){if(e){if(NZ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(le(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(le(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(le(61))}if(e.style!=null&&typeof e.style!="object")throw Error(le(62))}}function Y5(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 J5=null;function o8(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var X5=null,td=null,rd=null;function CP(t){if(t=s0(t)){if(typeof X5!="function")throw Error(le(280));var e=t.stateNode;e&&(e=k2(e),X5(t.stateNode,t.type,e))}}function QN(t){td?rd?rd.push(t):rd=[t]:td=t}function YN(){if(td){var t=td,e=rd;if(rd=td=null,CP(t),e)for(t=0;t>>=0,t===0?32:31-(GZ(t)/KZ|0)|0}var J0=64,X0=4194304;function R1(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 cg(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=R1(a):(i&=o,i!==0&&(n=R1(i)))}else o=r&~s,o!==0?n=R1(o):i!==0&&(n=R1(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&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 r0(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Ii(e),t[e]=r}function XZ(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=U1),RP=String.fromCharCode(32),IP=!1;function mL(t,e){switch(t){case"keyup":return $ee.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Tu=!1;function _ee(t,e){switch(t){case"compositionend":return pL(e);case"keypress":return e.which!==32?null:(IP=!0,RP);case"textInput":return t=e.data,t===RP&&IP?null:t;default:return null}}function Pee(t,e){if(Tu)return t==="compositionend"||!v8&&mL(t,e)?(t=vL(),up=u8=cl=null,Tu=!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=NP(r)}}function xL(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?xL(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function CL(){for(var t=window,e=ig();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=ig(t.document)}return e}function y8(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 jee(t){var e=CL(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&xL(r.ownerDocument.documentElement,r)){if(n!==null&&y8(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 s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=LP(r,i);var o=LP(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>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,Ru=null,s6=null,V1=null,i6=!1;function jP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;i6||Ru==null||Ru!==ig(n)||(n=Ru,"selectionStart"in n&&y8(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}),V1&&jv(V1,n)||(V1=n,n=dg(s6,"onSelect"),0Mu||(t.current=u6[Mu],u6[Mu]=null,Mu--)}function bt(t,e){Mu++,u6[Mu]=t.current,t.current=e}var Dl={},An=rc(Dl),ss=rc(!1),df=Dl;function kd(t,e){var r=t.type.contextTypes;if(!r)return Dl;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function is(t){return t=t.childContextTypes,t!=null}function vg(){Wt(ss),Wt(An)}function WP(t,e,r){if(An.current!==Dl)throw Error(le(168));bt(An,e),bt(ss,r)}function RL(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(le(108,OZ(t)||"Unknown",s));return dr({},r,n)}function yg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Dl,df=An.current,bt(An,t),bt(ss,ss.current),!0}function HP(t,e,r){var n=t.stateNode;if(!n)throw Error(le(169));r?(t=RL(t,e,df),n.__reactInternalMemoizedMergedChildContext=t,Wt(ss),Wt(An),bt(An,t)):Wt(ss),bt(ss,r)}var Ko=null,$2=!1,$C=!1;function IL(t){Ko===null?Ko=[t]:Ko.push(t)}function Yee(t){$2=!0,IL(t)}function nc(){if(!$C&&Ko!==null){$C=!0;var t=0,e=ft;try{var r=Ko;for(ft=1;t>=o,s-=o,Zo=1<<32-Ii(e)+s|r<T?(j=C,C=null):j=C.sibling;var F=d(p,C,w[T],E);if(F===null){C===null&&(C=j);break}t&&C&&F.alternate===null&&e(p,C),g=i(F,g,T),$===null?k=F:$.sibling=F,$=F,C=j}if(T===w.length)return r(p,C),tr&&Tc(p,T),k;if(C===null){for(;TT?(j=C,C=null):j=C.sibling;var U=d(p,C,F.value,E);if(U===null){C===null&&(C=j);break}t&&C&&U.alternate===null&&e(p,C),g=i(U,g,T),$===null?k=U:$.sibling=U,$=U,C=j}if(F.done)return r(p,C),tr&&Tc(p,T),k;if(C===null){for(;!F.done;T++,F=w.next())F=u(p,F.value,E),F!==null&&(g=i(F,g,T),$===null?k=F:$.sibling=F,$=F);return tr&&Tc(p,T),k}for(C=n(p,C);!F.done;T++,F=w.next())F=h(C,p,T,F.value,E),F!==null&&(t&&F.alternate!==null&&C.delete(F.key===null?T:F.key),g=i(F,g,T),$===null?k=F:$.sibling=F,$=F);return t&&C.forEach(function(V){return e(p,V)}),tr&&Tc(p,T),k}function b(p,g,w,E){if(typeof w=="object"&&w!==null&&w.type===Pu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case K0:e:{for(var k=w.key,$=g;$!==null;){if($.key===k){if(k=w.type,k===Pu){if($.tag===7){r(p,$.sibling),g=s($,w.props.children),g.return=p,p=g;break e}}else if($.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Za&&ZP(k)===$.type){r(p,$.sibling),g=s($,w.props),g.ref=s1(p,$,w),g.return=p,p=g;break e}r(p,$);break}else e(p,$);$=$.sibling}w.type===Pu?(g=tf(w.props.children,p.mode,E,w.key),g.return=p,p=g):(E=bp(w.type,w.key,w.props,null,p.mode,E),E.ref=s1(p,g,w),E.return=p,p=E)}return o(p);case _u:e:{for($=w.key;g!==null;){if(g.key===$)if(g.tag===4&&g.stateNode.containerInfo===w.containerInfo&&g.stateNode.implementation===w.implementation){r(p,g.sibling),g=s(g,w.children||[]),g.return=p,p=g;break e}else{r(p,g);break}else e(p,g);g=g.sibling}g=MC(w,p.mode,E),g.return=p,p=g}return o(p);case Za:return $=w._init,b(p,g,$(w._payload),E)}if(T1(w))return v(p,g,w,E);if(Zh(w))return y(p,g,w,E);im(p,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,g!==null&&g.tag===6?(r(p,g.sibling),g=s(g,w),g.return=p,p=g):(r(p,g),g=OC(w,p.mode,E),g.return=p,p=g),o(p)):r(p,g)}return b}var Ad=BL(!0),UL=BL(!1),i0={},wo=rc(i0),zv=rc(i0),Vv=rc(i0);function Gc(t){if(t===i0)throw Error(le(174));return t}function S8(t,e){switch(bt(Vv,e),bt(zv,t),bt(wo,i0),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:K5(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=K5(e,t)}Wt(wo),bt(wo,e)}function _d(){Wt(wo),Wt(zv),Wt(Vv)}function zL(t){Gc(Vv.current);var e=Gc(wo.current),r=K5(e,t.type);e!==r&&(bt(zv,t),bt(wo,r))}function k8(t){zv.current===t&&(Wt(wo),Wt(zv))}var or=rc(0);function xg(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 AC=[];function $8(){for(var t=0;tr?r:4,t(!0);var n=_C.transition;_C.transition={};try{t(!1),e()}finally{ft=r,_C.transition=n}}function sj(){return ei().memoizedState}function ete(t,e,r){var n=Sl(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ij(t))oj(e,r);else if(r=NL(t,e,r,n),r!==null){var s=Bn();Oi(r,t,n,s),aj(r,e,n)}}function tte(t,e,r){var n=Sl(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ij(t))oj(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Fi(a,o)){var l=e.interleaved;l===null?(s.next=s,C8(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=NL(t,e,s,n),r!==null&&(s=Bn(),Oi(r,t,n,s),aj(r,e,n))}}function ij(t){var e=t.alternate;return t===ur||e!==null&&e===ur}function oj(t,e){q1=Cg=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function aj(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,l8(t,r)}}var Eg={readContext:Zs,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useInsertionEffect:vn,useLayoutEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useMutableSource:vn,useSyncExternalStore:vn,useId:vn,unstable_isNewReconciler:!1},rte={readContext:Zs,useCallback:function(t,e){return to().memoizedState=[t,e===void 0?null:e],t},useContext:Zs,useEffect:tT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,yp(4194308,4,ZL.bind(null,e,t),r)},useLayoutEffect:function(t,e){return yp(4194308,4,t,e)},useInsertionEffect:function(t,e){return yp(4,2,t,e)},useMemo:function(t,e){var r=to();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=to();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=ete.bind(null,ur,t),[n.memoizedState,t]},useRef:function(t){var e=to();return t={current:t},e.memoizedState=t},useState:eT,useDebugValue:R8,useDeferredValue:function(t){return to().memoizedState=t},useTransition:function(){var t=eT(!1),e=t[0];return t=Zee.bind(null,t[1]),to().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ur,s=to();if(tr){if(r===void 0)throw Error(le(407));r=r()}else{if(r=e(),Zr===null)throw Error(le(349));vf&30||WL(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,tT(GL.bind(null,n,i,t),[t]),n.flags|=2048,Hv(9,HL.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=to(),e=Zr.identifierPrefix;if(tr){var r=ea,n=Zo;r=(n&~(1<<32-Ii(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=qv++,0")&&(l=l.replace("",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{dC=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?T1(t):""}function IZ(t){switch(t.tag){case 5:return T1(t.type);case 16:return T1("Lazy");case 13:return T1("Suspense");case 19:return T1("SuspenseList");case 0:case 2:case 15:return t=hC(t.type,!1),t;case 11:return t=hC(t.type.render,!1),t;case 1:return t=hC(t.type,!0),t;default:return""}}function q5(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 Tu:return"Fragment";case Pu:return"Portal";case U5:return"Profiler";case i8:return"StrictMode";case z5:return"Suspense";case V5:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case FN:return(t.displayName||"Context")+".Consumer";case jN:return(t._context.displayName||"Context")+".Provider";case o8:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case a8:return e=t.displayName||null,e!==null?e:q5(t.type)||"Memo";case el:e=t._payload,t=t._init;try{return q5(t(e))}catch{}}return null}function OZ(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 q5(e);case 8:return e===i8?"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 Dl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function UN(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function MZ(t){var e=UN(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 s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.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 Y0(t){t._valueTracker||(t._valueTracker=MZ(t))}function zN(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=UN(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function og(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 W5(t,e){var r=e.checked;return dr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function bP(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=Dl(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 VN(t,e){e=e.checked,e!=null&&s8(t,"checked",e,!1)}function H5(t,e){VN(t,e);var r=Dl(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")?G5(t,e.type,r):e.hasOwnProperty("defaultValue")&&G5(t,e.type,Dl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function wP(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 G5(t,e,r){(e!=="number"||og(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var R1=Array.isArray;function td(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=J0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ov(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var B1={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},DZ=["Webkit","ms","Moz","O"];Object.keys(B1).forEach(function(t){DZ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),B1[e]=B1[t]})});function GN(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||B1.hasOwnProperty(t)&&B1[t]?(""+e).trim():e+"px"}function KN(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=GN(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var NZ=dr({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 Y5(t,e){if(e){if(NZ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(le(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(le(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(le(61))}if(e.style!=null&&typeof e.style!="object")throw Error(le(62))}}function J5(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 X5=null;function l8(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Z5=null,rd=null,nd=null;function EP(t){if(t=i0(t)){if(typeof Z5!="function")throw Error(le(280));var e=t.stateNode;e&&(e=$2(e),Z5(t.stateNode,t.type,e))}}function QN(t){rd?nd?nd.push(t):nd=[t]:rd=t}function YN(){if(rd){var t=rd,e=nd;if(nd=rd=null,EP(t),e)for(t=0;t>>=0,t===0?32:31-(GZ(t)/KZ|0)|0}var X0=64,Z0=4194304;function I1(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 fg(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=I1(a):(i&=o,i!==0&&(n=I1(i)))}else o=r&~s,o!==0?n=I1(o):i!==0&&(n=I1(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&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 n0(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Oi(e),t[e]=r}function XZ(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=z1),IP=String.fromCharCode(32),OP=!1;function mL(t,e){switch(t){case"keyup":return $ee.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pL(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ru=!1;function _ee(t,e){switch(t){case"compositionend":return pL(e);case"keypress":return e.which!==32?null:(OP=!0,IP);case"textInput":return t=e.data,t===IP&&OP?null:t;default:return null}}function Pee(t,e){if(Ru)return t==="compositionend"||!m8&&mL(t,e)?(t=vL(),dp=h8=fl=null,Ru=!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=LP(r)}}function xL(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?xL(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function CL(){for(var t=window,e=og();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=og(t.document)}return e}function p8(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 jee(t){var e=CL(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&xL(r.ownerDocument.documentElement,r)){if(n!==null&&p8(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 s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=jP(r,i);var o=jP(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>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,Iu=null,i6=null,q1=null,o6=!1;function FP(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;o6||Iu==null||Iu!==og(n)||(n=Iu,"selectionStart"in n&&p8(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}),q1&&Fv(q1,n)||(q1=n,n=hg(i6,"onSelect"),0Du||(t.current=d6[Du],d6[Du]=null,Du--)}function bt(t,e){Du++,d6[Du]=t.current,t.current=e}var Nl={},_n=nc(Nl),is=nc(!1),hf=Nl;function $d(t,e){var r=t.type.contextTypes;if(!r)return Nl;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function os(t){return t=t.childContextTypes,t!=null}function yg(){Wt(is),Wt(_n)}function HP(t,e,r){if(_n.current!==Nl)throw Error(le(168));bt(_n,e),bt(is,r)}function RL(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(le(108,OZ(t)||"Unknown",s));return dr({},r,n)}function mg(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Nl,hf=_n.current,bt(_n,t),bt(is,is.current),!0}function GP(t,e,r){var n=t.stateNode;if(!n)throw Error(le(169));r?(t=RL(t,e,hf),n.__reactInternalMemoizedMergedChildContext=t,Wt(is),Wt(_n),bt(_n,t)):Wt(is),bt(is,r)}var Qo=null,A2=!1,AC=!1;function IL(t){Qo===null?Qo=[t]:Qo.push(t)}function Yee(t){A2=!0,IL(t)}function sc(){if(!AC&&Qo!==null){AC=!0;var t=0,e=ft;try{var r=Qo;for(ft=1;t>=o,s-=o,ea=1<<32-Oi(e)+s|r<T?(B=x,x=null):B=x.sibling;var L=d(b,x,w[T],E);if(L===null){x===null&&(x=B);break}t&&x&&L.alternate===null&&e(b,x),p=i(L,p,T),$===null?k=L:$.sibling=L,$=L,x=B}if(T===w.length)return r(b,x),tr&&Rc(b,T),k;if(x===null){for(;TT?(B=x,x=null):B=x.sibling;var U=d(b,x,L.value,E);if(U===null){x===null&&(x=B);break}t&&x&&U.alternate===null&&e(b,x),p=i(U,p,T),$===null?k=U:$.sibling=U,$=U,x=B}if(L.done)return r(b,x),tr&&Rc(b,T),k;if(x===null){for(;!L.done;T++,L=w.next())L=u(b,L.value,E),L!==null&&(p=i(L,p,T),$===null?k=L:$.sibling=L,$=L);return tr&&Rc(b,T),k}for(x=n(b,x);!L.done;T++,L=w.next())L=h(x,b,T,L.value,E),L!==null&&(t&&L.alternate!==null&&x.delete(L.key===null?T:L.key),p=i(L,p,T),$===null?k=L:$.sibling=L,$=L);return t&&x.forEach(function(V){return e(b,V)}),tr&&Rc(b,T),k}function g(b,p,w,E){if(typeof w=="object"&&w!==null&&w.type===Tu&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Q0:e:{for(var k=w.key,$=p;$!==null;){if($.key===k){if(k=w.type,k===Tu){if($.tag===7){r(b,$.sibling),p=s($,w.props.children),p.return=b,b=p;break e}}else if($.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===el&&eT(k)===$.type){r(b,$.sibling),p=s($,w.props),p.ref=i1(b,$,w),p.return=b,b=p;break e}r(b,$);break}else e(b,$);$=$.sibling}w.type===Tu?(p=rf(w.props.children,b.mode,E,w.key),p.return=b,b=p):(E=wp(w.type,w.key,w.props,null,b.mode,E),E.ref=i1(b,p,w),E.return=b,b=E)}return o(b);case Pu:e:{for($=w.key;p!==null;){if(p.key===$)if(p.tag===4&&p.stateNode.containerInfo===w.containerInfo&&p.stateNode.implementation===w.implementation){r(b,p.sibling),p=s(p,w.children||[]),p.return=b,b=p;break e}else{r(b,p);break}else e(b,p);p=p.sibling}p=DC(w,b.mode,E),p.return=b,b=p}return o(b);case el:return $=w._init,g(b,p,$(w._payload),E)}if(R1(w))return v(b,p,w,E);if(e1(w))return y(b,p,w,E);om(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,p!==null&&p.tag===6?(r(b,p.sibling),p=s(p,w),p.return=b,b=p):(r(b,p),p=MC(w,b.mode,E),p.return=b,b=p),o(b)):r(b,p)}return g}var _d=BL(!0),UL=BL(!1),o0={},xo=nc(o0),Vv=nc(o0),qv=nc(o0);function Kc(t){if(t===o0)throw Error(le(174));return t}function $8(t,e){switch(bt(qv,e),bt(Vv,t),bt(xo,o0),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Q5(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Q5(e,t)}Wt(xo),bt(xo,e)}function Pd(){Wt(xo),Wt(Vv),Wt(qv)}function zL(t){Kc(qv.current);var e=Kc(xo.current),r=Q5(e,t.type);e!==r&&(bt(Vv,t),bt(xo,r))}function A8(t){Vv.current===t&&(Wt(xo),Wt(Vv))}var or=nc(0);function Cg(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 _C=[];function _8(){for(var t=0;t<_C.length;t++)_C[t]._workInProgressVersionPrimary=null;_C.length=0}var yp=_a.ReactCurrentDispatcher,PC=_a.ReactCurrentBatchConfig,yf=0,ur=null,Vr=null,Jr=null,Eg=!1,W1=!1,Wv=0,Xee=0;function yn(){throw Error(le(321))}function P8(t,e){if(e===null)return!1;for(var r=0;rr?r:4,t(!0);var n=PC.transition;PC.transition={};try{t(!1),e()}finally{ft=r,PC.transition=n}}function sj(){return ti().memoizedState}function ete(t,e,r){var n=kl(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ij(t))oj(e,r);else if(r=NL(t,e,r,n),r!==null){var s=Un();Mi(r,t,n,s),aj(r,e,n)}}function tte(t,e,r){var n=kl(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ij(t))oj(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,Bi(a,o)){var l=e.interleaved;l===null?(s.next=s,S8(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=NL(t,e,s,n),r!==null&&(s=Un(),Mi(r,t,n,s),aj(r,e,n))}}function ij(t){var e=t.alternate;return t===ur||e!==null&&e===ur}function oj(t,e){W1=Eg=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function aj(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,f8(t,r)}}var Sg={readContext:ei,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},rte={readContext:ei,useCallback:function(t,e){return ro().memoizedState=[t,e===void 0?null:e],t},useContext:ei,useEffect:rT,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,mp(4194308,4,ZL.bind(null,e,t),r)},useLayoutEffect:function(t,e){return mp(4194308,4,t,e)},useInsertionEffect:function(t,e){return mp(4,2,t,e)},useMemo:function(t,e){var r=ro();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ro();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=ete.bind(null,ur,t),[n.memoizedState,t]},useRef:function(t){var e=ro();return t={current:t},e.memoizedState=t},useState:tT,useDebugValue:O8,useDeferredValue:function(t){return ro().memoizedState=t},useTransition:function(){var t=tT(!1),e=t[0];return t=Zee.bind(null,t[1]),ro().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=ur,s=ro();if(tr){if(r===void 0)throw Error(le(407));r=r()}else{if(r=e(),Zr===null)throw Error(le(349));yf&30||WL(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,rT(GL.bind(null,n,i,t),[t]),n.flags|=2048,Gv(9,HL.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=ro(),e=Zr.identifierPrefix;if(tr){var r=ta,n=ea;r=(n&~(1<<32-Oi(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Wv++,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[fo]=e,t[Uv]=n,mj(t,e,!1,!1),e.stateNode=t;e:{switch(o=Y5(r,n),r){case"dialog":Ut("cancel",t),Ut("close",t),s=n;break;case"iframe":case"object":case"embed":Ut("load",t),s=n;break;case"video":case"audio":for(s=0;sTd&&(e.flags|=128,n=!0,i1(i,!1),e.lanes=4194304)}else{if(!n)if(t=xg(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),i1(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!tr)return yn(e),null}else 2*$r()-i.renderingStartTime>Td&&r!==1073741824&&(e.flags|=128,n=!0,i1(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=$r(),e.sibling=null,r=or.current,bt(or,n?r&1|2:r&1),e):(yn(e),null);case 22:case 23:return L8(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?ps&1073741824&&(yn(e),e.subtreeFlags&6&&(e.flags|=8192)):yn(e),null;case 24:return null;case 25:return null}throw Error(le(156,e.tag))}function fte(t,e){switch(p8(e),e.tag){case 1:return is(e.type)&&vg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return _d(),Wt(ss),Wt(An),$8(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return k8(e),null;case 13:if(Wt(or),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(le(340));$d()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Wt(or),null;case 4:return _d(),null;case 10:return x8(e.type._context),null;case 22:case 23:return L8(),null;case 24:return null;default:return null}}var am=!1,bn=!1,ute=typeof WeakSet=="function"?WeakSet:Set,de=null;function ju(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){pr(t,e,n)}else r.current=null}function E6(t,e,r){try{r()}catch(n){pr(t,e,n)}}var fT=!1;function dte(t,e){if(o6=fg,t=CL(),y8(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 s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,d=null;t:for(;;){for(var h;u!==r||s!==0&&u.nodeType!==3||(a=o+s),u!==i||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++c===s&&(a=o),d===i&&++f===n&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(a6={focusedElem:t,selectionRange:r},fg=!1,de=e;de!==null;)if(e=de,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,de=t;else for(;de!==null;){e=de;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,b=v.memoizedState,p=e.stateNode,g=p.getSnapshotBeforeUpdate(e.elementType===e.type?y:Ei(e.type,y),b);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(E){pr(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,de=t;break}de=e.return}return v=fT,fT=!1,v}function W1(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&E6(e,r,i)}s=s.next}while(s!==n)}}function P2(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 S6(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 bj(t){var e=t.alternate;e!==null&&(t.alternate=null,bj(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[fo],delete e[Uv],delete e[f6],delete e[Kee],delete e[Qee])),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 wj(t){return t.tag===5||t.tag===3||t.tag===4}function uT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wj(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 k6(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=hg));else if(n!==4&&(t=t.child,t!==null))for(k6(t,e,r),t=t.sibling;t!==null;)k6(t,e,r),t=t.sibling}function $6(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($6(t,e,r),t=t.sibling;t!==null;)$6(t,e,r),t=t.sibling}var an=null,ki=!1;function Va(t,e,r){for(r=r.child;r!==null;)xj(t,e,r),r=r.sibling}function xj(t,e,r){if(bo&&typeof bo.onCommitFiberUnmount=="function")try{bo.onCommitFiberUnmount(x2,r)}catch{}switch(r.tag){case 5:bn||ju(r,e);case 6:var n=an,s=ki;an=null,Va(t,e,r),an=n,ki=s,an!==null&&(ki?(t=an,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):an.removeChild(r.stateNode));break;case 18:an!==null&&(ki?(t=an,r=r.stateNode,t.nodeType===8?kC(t.parentNode,r):t.nodeType===1&&kC(t,r),Nv(t)):kC(an,r.stateNode));break;case 4:n=an,s=ki,an=r.stateNode.containerInfo,ki=!0,Va(t,e,r),an=n,ki=s;break;case 0:case 11:case 14:case 15:if(!bn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&E6(r,e,o),s=s.next}while(s!==n)}Va(t,e,r);break;case 1:if(!bn&&(ju(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){pr(r,e,a)}Va(t,e,r);break;case 21:Va(t,e,r);break;case 22:r.mode&1?(bn=(n=bn)||r.memoizedState!==null,Va(t,e,r),bn=n):Va(t,e,r);break;default:Va(t,e,r)}}function dT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new ute),e.forEach(function(n){var s=xte.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function hi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=$r()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vte(n/1960))-n,10t?16:t,fl===null)var n=!1;else{if(t=fl,fl=null,$g=0,ot&6)throw Error(le(331));var s=ot;for(ot|=4,de=t.current;de!==null;){var i=de,o=i.child;if(de.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l$r()-D8?ef(t,0):M8|=r),os(t,e)}function Pj(t,e){e===0&&(t.mode&1?(e=X0,X0<<=1,!(X0&130023424)&&(X0=4194304)):e=1);var r=Bn();t=ua(t,e),t!==null&&(r0(t,e,r),os(t,r))}function wte(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Pj(t,r)}function xte(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(le(314))}n!==null&&n.delete(e),Pj(t,r)}var Tj;Tj=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ss.current)ts=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return ts=!1,lte(t,e,r);ts=!!(t.flags&131072)}else ts=!1,tr&&e.flags&1048576&&OL(e,pg,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;mp(t,e),t=e.pendingProps;var s=kd(e,An.current);sd(e,r),s=_8(null,e,n,t,s,r);var i=P8();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,is(n)?(i=!0,yg(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,E8(e),s.updater=A2,e.stateNode=s,s._reactInternals=e,m6(e,n,t,r),e=b6(null,e,n,!0,i,r)):(e.tag=0,tr&&i&&m8(e),Dn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(mp(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=Ete(n),t=Ei(n,t),s){case 0:e=g6(null,e,n,t,r);break e;case 1:e=aT(null,e,n,t,r);break e;case 11:e=iT(null,e,n,t,r);break e;case 14:e=oT(null,e,n,Ei(n.type,t),r);break e}throw Error(le(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ei(n,s),g6(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ei(n,s),aT(t,e,n,s,r);case 3:e:{if(hj(e),t===null)throw Error(le(387));n=e.pendingProps,i=e.memoizedState,s=i.element,LL(t,e),wg(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Pd(Error(le(423)),e),e=lT(t,e,n,r,s);break e}else if(n!==s){s=Pd(Error(le(424)),e),e=lT(t,e,n,r,s);break e}else for(Es=xl(e.stateNode.containerInfo.firstChild),$s=e,tr=!0,$i=null,r=UL(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if($d(),n===s){e=da(t,e,r);break e}Dn(t,e,n,r)}e=e.child}return e;case 5:return zL(e),t===null&&h6(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,l6(n,s)?o=null:i!==null&&l6(n,i)&&(e.flags|=32),dj(t,e),Dn(t,e,o,r),e.child;case 6:return t===null&&h6(e),null;case 13:return vj(t,e,r);case 4:return S8(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Ad(e,null,n,r):Dn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ei(n,s),iT(t,e,n,s,r);case 7:return Dn(t,e,e.pendingProps,r),e.child;case 8:return Dn(t,e,e.pendingProps.children,r),e.child;case 12:return Dn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,bt(gg,n._currentValue),n._currentValue=o,i!==null)if(Fi(i.value,o)){if(i.children===s.children&&!ss.current){e=da(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ra(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),v6(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(le(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),v6(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Dn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,sd(e,r),s=Zs(s),n=n(s),e.flags|=1,Dn(t,e,n,r),e.child;case 14:return n=e.type,s=Ei(n,e.pendingProps),s=Ei(n.type,s),oT(t,e,n,s,r);case 15:return fj(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Ei(n,s),mp(t,e),e.tag=1,is(n)?(t=!0,yg(e)):t=!1,sd(e,r),FL(e,n,s),m6(e,n,s,r),b6(null,e,n,!0,t,r);case 19:return yj(t,e,r);case 22:return uj(t,e,r)}throw Error(le(156,e.tag))};function Rj(t,e){return nL(t,e)}function Cte(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 Ks(t,e,r,n){return new Cte(t,e,r,n)}function F8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ete(t){if(typeof t=="function")return F8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===s8)return 11;if(t===i8)return 14}return 2}function kl(t,e){var r=t.alternate;return r===null?(r=Ks(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 bp(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")F8(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Pu:return tf(r.children,s,i,e);case n8:o=8,s|=8;break;case B5:return t=Ks(12,r,e,s|2),t.elementType=B5,t.lanes=i,t;case U5:return t=Ks(13,r,e,s),t.elementType=U5,t.lanes=i,t;case z5:return t=Ks(19,r,e,s),t.elementType=z5,t.lanes=i,t;case BN:return R2(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jN:o=10;break e;case FN:o=9;break e;case s8:o=11;break e;case i8:o=14;break e;case Za:o=16,n=null;break e}throw Error(le(130,t==null?t:typeof t,""))}return e=Ks(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function tf(t,e,r,n){return t=Ks(7,t,n,e),t.lanes=r,t}function R2(t,e,r,n){return t=Ks(22,t,n,e),t.elementType=BN,t.lanes=r,t.stateNode={isHidden:!1},t}function OC(t,e,r){return t=Ks(6,t,null,e),t.lanes=r,t}function MC(t,e,r){return e=Ks(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ste(t,e,r,n,s){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=vC(0),this.expirationTimes=vC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vC(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function B8(t,e,r,n,s,i,o,a,l){return t=new Ste(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Ks(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},E8(i),t}function kte(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=Os})($Z);const q8=$N(Kr);var wT=Kr;L5.createRoot=wT.createRoot,L5.hydrateRoot=wT.hydrateRoot;var R6={},Tte={get exports(){return R6},set exports(t){R6=t}};const Rte={},Ite=Object.freeze(Object.defineProperty({__proto__:null,default:Rte},Symbol.toStringTag,{value:"Module"})),Dj=tZ(Ite);(function(t){(function(e,r){function n(N,x){if(!N)throw new Error(x||"Assertion failed")}function s(N,x){N.super_=x;var S=function(){};S.prototype=x.prototype,N.prototype=new S,N.prototype.constructor=N}function i(N,x,S){if(i.isBN(N))return N;this.negative=0,this.words=null,this.length=0,this.red=null,N!==null&&((x==="le"||x==="be")&&(S=x,x=10),this._init(N||0,x||10,S||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=Dj.Buffer}catch{}i.isBN=function(x){return x instanceof i?!0:x!==null&&typeof x=="object"&&x.constructor.wordSize===i.wordSize&&Array.isArray(x.words)},i.max=function(x,S){return x.cmp(S)>0?x:S},i.min=function(x,S){return x.cmp(S)<0?x:S},i.prototype._init=function(x,S,R){if(typeof x=="number")return this._initNumber(x,S,R);if(typeof x=="object")return this._initArray(x,S,R);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),x=x.toString().replace(/\s+/g,"");var M=0;x[0]==="-"&&(M++,this.negative=1),M=0;M-=3)I=x[M]|x[M-1]<<8|x[M-2]<<16,this.words[_]|=I<>>26-B&67108863,B+=24,B>=26&&(B-=26,_++);else if(R==="le")for(M=0,_=0;M>>26-B&67108863,B+=24,B>=26&&(B-=26,_++);return this._strip()};function a(N,x){var S=N.charCodeAt(x);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+N)}function l(N,x,S){var R=a(N,S);return S-1>=x&&(R|=a(N,S-1)<<4),R}i.prototype._parseHex=function(x,S,R){this.length=Math.ceil((x.length-S)/6),this.words=new Array(this.length);for(var M=0;M=S;M-=2)B=l(x,S,M)<<_,this.words[I]|=B&67108863,_>=18?(_-=18,I+=1,this.words[I]|=B>>>26):_+=8;else{var D=x.length-S;for(M=D%2===0?S+1:S;M=18?(_-=18,I+=1,this.words[I]|=B>>>26):_+=8}this._strip()};function c(N,x,S,R){for(var M=0,_=0,I=Math.min(N.length,S),B=x;B=49?_=D-49+10:D>=17?_=D-17+10:_=D,n(D>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(x,S){x=x||10,S=S|0||1;var R;if(x===16||x==="hex"){R="";for(var M=0,_=0,I=0;I>>24-M&16777215,M+=2,M>=26&&(M-=26,I--),_!==0||I!==this.length-1?R=d[6-D.length]+D+R:R=D+R}for(_!==0&&(R=_.toString(16)+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}if(x===(x|0)&&x>=2&&x<=36){var A=h[x],L=v[x];R="";var G=this.clone();for(G.negative=0;!G.isZero();){var O=G.modrn(L).toString(x);G=G.idivn(L),G.isZero()?R=O+R:R=d[A-O.length]+O+R}for(this.isZero()&&(R="0"+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var x=this.words[0];return this.length===2?x+=this.words[1]*67108864:this.length===3&&this.words[2]===1?x+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-x:x},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(x,S){return this.toArrayLike(o,x,S)}),i.prototype.toArray=function(x,S){return this.toArrayLike(Array,x,S)};var y=function(x,S){return x.allocUnsafe?x.allocUnsafe(S):new x(S)};i.prototype.toArrayLike=function(x,S,R){this._strip();var M=this.byteLength(),_=R||Math.max(1,M);n(M<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0");var I=y(x,_),B=S==="le"?"LE":"BE";return this["_toArrayLike"+B](I,M),I},i.prototype._toArrayLikeLE=function(x,S){for(var R=0,M=0,_=0,I=0;_>8&255),R>16&255),I===6?(R>24&255),M=0,I=0):(M=B>>>24,I+=2)}if(R=0&&(x[R--]=B>>8&255),R>=0&&(x[R--]=B>>16&255),I===6?(R>=0&&(x[R--]=B>>24&255),M=0,I=0):(M=B>>>24,I+=2)}if(R>=0)for(x[R--]=M;R>=0;)x[R--]=0},Math.clz32?i.prototype._countBits=function(x){return 32-Math.clz32(x)}:i.prototype._countBits=function(x){var S=x,R=0;return S>=4096&&(R+=13,S>>>=13),S>=64&&(R+=7,S>>>=7),S>=8&&(R+=4,S>>>=4),S>=2&&(R+=2,S>>>=2),R+S},i.prototype._zeroBits=function(x){if(x===0)return 26;var S=x,R=0;return S&8191||(R+=13,S>>>=13),S&127||(R+=7,S>>>=7),S&15||(R+=4,S>>>=4),S&3||(R+=2,S>>>=2),S&1||R++,R},i.prototype.bitLength=function(){var x=this.words[this.length-1],S=this._countBits(x);return(this.length-1)*26+S};function b(N){for(var x=new Array(N.bitLength()),S=0;S>>M&1}return x}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var x=0,S=0;Sx.length?this.clone().ior(x):x.clone().ior(this)},i.prototype.uor=function(x){return this.length>x.length?this.clone().iuor(x):x.clone().iuor(this)},i.prototype.iuand=function(x){var S;this.length>x.length?S=x:S=this;for(var R=0;Rx.length?this.clone().iand(x):x.clone().iand(this)},i.prototype.uand=function(x){return this.length>x.length?this.clone().iuand(x):x.clone().iuand(this)},i.prototype.iuxor=function(x){var S,R;this.length>x.length?(S=this,R=x):(S=x,R=this);for(var M=0;Mx.length?this.clone().ixor(x):x.clone().ixor(this)},i.prototype.uxor=function(x){return this.length>x.length?this.clone().iuxor(x):x.clone().iuxor(this)},i.prototype.inotn=function(x){n(typeof x=="number"&&x>=0);var S=Math.ceil(x/26)|0,R=x%26;this._expand(S),R>0&&S--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-R),this._strip()},i.prototype.notn=function(x){return this.clone().inotn(x)},i.prototype.setn=function(x,S){n(typeof x=="number"&&x>=0);var R=x/26|0,M=x%26;return this._expand(R+1),S?this.words[R]=this.words[R]|1<x.length?(R=this,M=x):(R=x,M=this);for(var _=0,I=0;I>>26;for(;_!==0&&I>>26;if(this.length=R.length,_!==0)this.words[this.length]=_,this.length++;else if(R!==this)for(;Ix.length?this.clone().iadd(x):x.clone().iadd(this)},i.prototype.isub=function(x){if(x.negative!==0){x.negative=0;var S=this.iadd(x);return x.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(x),this.negative=1,this._normSign();var R=this.cmp(x);if(R===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,_;R>0?(M=this,_=x):(M=x,_=this);for(var I=0,B=0;B<_.length;B++)S=(M.words[B]|0)-(_.words[B]|0)+I,I=S>>26,this.words[B]=S&67108863;for(;I!==0&&B>26,this.words[B]=S&67108863;if(I===0&&B>>26,G=D&67108863,O=Math.min(A,x.length-1),q=Math.max(0,A-N.length+1);q<=O;q++){var z=A-q|0;M=N.words[z]|0,_=x.words[q]|0,I=M*_+G,L+=I/67108864|0,G=I&67108863}S.words[A]=G|0,D=L|0}return D!==0?S.words[A]=D|0:S.length--,S._strip()}var g=function(x,S,R){var M=x.words,_=S.words,I=R.words,B=0,D,A,L,G=M[0]|0,O=G&8191,q=G>>>13,z=M[1]|0,H=z&8191,X=z>>>13,Q=M[2]|0,K=Q&8191,J=Q>>>13,ae=M[3]|0,ie=ae&8191,ue=ae>>>13,st=M[4]|0,ke=st&8191,Ae=st>>>13,at=M[5]|0,me=at&8191,Re=at>>>13,Qt=M[6]|0,Ie=Qt&8191,Oe=Qt>>>13,Yt=M[7]|0,Me=Yt&8191,De=Yt>>>13,Jt=M[8]|0,Ne=Jt&8191,Le=Jt>>>13,Xt=M[9]|0,je=Xt&8191,Fe=Xt>>>13,Zt=_[0]|0,Be=Zt&8191,Ct=Zt>>>13,yc=_[1]|0,Et=yc&8191,St=yc>>>13,mc=_[2]|0,kt=mc&8191,$t=mc>>>13,pc=_[3]|0,At=pc&8191,_t=pc>>>13,gc=_[4]|0,Pt=gc&8191,Tt=gc>>>13,bc=_[5]|0,Rt=bc&8191,It=bc>>>13,wc=_[6]|0,Ot=wc&8191,Mt=wc>>>13,xc=_[7]|0,Dt=xc&8191,Nt=xc>>>13,Cc=_[8]|0,Lt=Cc&8191,jt=Cc>>>13,Ec=_[9]|0,Ft=Ec&8191,Bt=Ec>>>13;R.negative=x.negative^S.negative,R.length=19,D=Math.imul(O,Be),A=Math.imul(O,Ct),A=A+Math.imul(q,Be)|0,L=Math.imul(q,Ct);var ja=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(ja>>>26)|0,ja&=67108863,D=Math.imul(H,Be),A=Math.imul(H,Ct),A=A+Math.imul(X,Be)|0,L=Math.imul(X,Ct),D=D+Math.imul(O,Et)|0,A=A+Math.imul(O,St)|0,A=A+Math.imul(q,Et)|0,L=L+Math.imul(q,St)|0;var Fa=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,D=Math.imul(K,Be),A=Math.imul(K,Ct),A=A+Math.imul(J,Be)|0,L=Math.imul(J,Ct),D=D+Math.imul(H,Et)|0,A=A+Math.imul(H,St)|0,A=A+Math.imul(X,Et)|0,L=L+Math.imul(X,St)|0,D=D+Math.imul(O,kt)|0,A=A+Math.imul(O,$t)|0,A=A+Math.imul(q,kt)|0,L=L+Math.imul(q,$t)|0;var Ba=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,D=Math.imul(ie,Be),A=Math.imul(ie,Ct),A=A+Math.imul(ue,Be)|0,L=Math.imul(ue,Ct),D=D+Math.imul(K,Et)|0,A=A+Math.imul(K,St)|0,A=A+Math.imul(J,Et)|0,L=L+Math.imul(J,St)|0,D=D+Math.imul(H,kt)|0,A=A+Math.imul(H,$t)|0,A=A+Math.imul(X,kt)|0,L=L+Math.imul(X,$t)|0,D=D+Math.imul(O,At)|0,A=A+Math.imul(O,_t)|0,A=A+Math.imul(q,At)|0,L=L+Math.imul(q,_t)|0;var Ua=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,D=Math.imul(ke,Be),A=Math.imul(ke,Ct),A=A+Math.imul(Ae,Be)|0,L=Math.imul(Ae,Ct),D=D+Math.imul(ie,Et)|0,A=A+Math.imul(ie,St)|0,A=A+Math.imul(ue,Et)|0,L=L+Math.imul(ue,St)|0,D=D+Math.imul(K,kt)|0,A=A+Math.imul(K,$t)|0,A=A+Math.imul(J,kt)|0,L=L+Math.imul(J,$t)|0,D=D+Math.imul(H,At)|0,A=A+Math.imul(H,_t)|0,A=A+Math.imul(X,At)|0,L=L+Math.imul(X,_t)|0,D=D+Math.imul(O,Pt)|0,A=A+Math.imul(O,Tt)|0,A=A+Math.imul(q,Pt)|0,L=L+Math.imul(q,Tt)|0;var za=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(za>>>26)|0,za&=67108863,D=Math.imul(me,Be),A=Math.imul(me,Ct),A=A+Math.imul(Re,Be)|0,L=Math.imul(Re,Ct),D=D+Math.imul(ke,Et)|0,A=A+Math.imul(ke,St)|0,A=A+Math.imul(Ae,Et)|0,L=L+Math.imul(Ae,St)|0,D=D+Math.imul(ie,kt)|0,A=A+Math.imul(ie,$t)|0,A=A+Math.imul(ue,kt)|0,L=L+Math.imul(ue,$t)|0,D=D+Math.imul(K,At)|0,A=A+Math.imul(K,_t)|0,A=A+Math.imul(J,At)|0,L=L+Math.imul(J,_t)|0,D=D+Math.imul(H,Pt)|0,A=A+Math.imul(H,Tt)|0,A=A+Math.imul(X,Pt)|0,L=L+Math.imul(X,Tt)|0,D=D+Math.imul(O,Rt)|0,A=A+Math.imul(O,It)|0,A=A+Math.imul(q,Rt)|0,L=L+Math.imul(q,It)|0;var Qx=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Qx>>>26)|0,Qx&=67108863,D=Math.imul(Ie,Be),A=Math.imul(Ie,Ct),A=A+Math.imul(Oe,Be)|0,L=Math.imul(Oe,Ct),D=D+Math.imul(me,Et)|0,A=A+Math.imul(me,St)|0,A=A+Math.imul(Re,Et)|0,L=L+Math.imul(Re,St)|0,D=D+Math.imul(ke,kt)|0,A=A+Math.imul(ke,$t)|0,A=A+Math.imul(Ae,kt)|0,L=L+Math.imul(Ae,$t)|0,D=D+Math.imul(ie,At)|0,A=A+Math.imul(ie,_t)|0,A=A+Math.imul(ue,At)|0,L=L+Math.imul(ue,_t)|0,D=D+Math.imul(K,Pt)|0,A=A+Math.imul(K,Tt)|0,A=A+Math.imul(J,Pt)|0,L=L+Math.imul(J,Tt)|0,D=D+Math.imul(H,Rt)|0,A=A+Math.imul(H,It)|0,A=A+Math.imul(X,Rt)|0,L=L+Math.imul(X,It)|0,D=D+Math.imul(O,Ot)|0,A=A+Math.imul(O,Mt)|0,A=A+Math.imul(q,Ot)|0,L=L+Math.imul(q,Mt)|0;var Yx=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Yx>>>26)|0,Yx&=67108863,D=Math.imul(Me,Be),A=Math.imul(Me,Ct),A=A+Math.imul(De,Be)|0,L=Math.imul(De,Ct),D=D+Math.imul(Ie,Et)|0,A=A+Math.imul(Ie,St)|0,A=A+Math.imul(Oe,Et)|0,L=L+Math.imul(Oe,St)|0,D=D+Math.imul(me,kt)|0,A=A+Math.imul(me,$t)|0,A=A+Math.imul(Re,kt)|0,L=L+Math.imul(Re,$t)|0,D=D+Math.imul(ke,At)|0,A=A+Math.imul(ke,_t)|0,A=A+Math.imul(Ae,At)|0,L=L+Math.imul(Ae,_t)|0,D=D+Math.imul(ie,Pt)|0,A=A+Math.imul(ie,Tt)|0,A=A+Math.imul(ue,Pt)|0,L=L+Math.imul(ue,Tt)|0,D=D+Math.imul(K,Rt)|0,A=A+Math.imul(K,It)|0,A=A+Math.imul(J,Rt)|0,L=L+Math.imul(J,It)|0,D=D+Math.imul(H,Ot)|0,A=A+Math.imul(H,Mt)|0,A=A+Math.imul(X,Ot)|0,L=L+Math.imul(X,Mt)|0,D=D+Math.imul(O,Dt)|0,A=A+Math.imul(O,Nt)|0,A=A+Math.imul(q,Dt)|0,L=L+Math.imul(q,Nt)|0;var Jx=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Jx>>>26)|0,Jx&=67108863,D=Math.imul(Ne,Be),A=Math.imul(Ne,Ct),A=A+Math.imul(Le,Be)|0,L=Math.imul(Le,Ct),D=D+Math.imul(Me,Et)|0,A=A+Math.imul(Me,St)|0,A=A+Math.imul(De,Et)|0,L=L+Math.imul(De,St)|0,D=D+Math.imul(Ie,kt)|0,A=A+Math.imul(Ie,$t)|0,A=A+Math.imul(Oe,kt)|0,L=L+Math.imul(Oe,$t)|0,D=D+Math.imul(me,At)|0,A=A+Math.imul(me,_t)|0,A=A+Math.imul(Re,At)|0,L=L+Math.imul(Re,_t)|0,D=D+Math.imul(ke,Pt)|0,A=A+Math.imul(ke,Tt)|0,A=A+Math.imul(Ae,Pt)|0,L=L+Math.imul(Ae,Tt)|0,D=D+Math.imul(ie,Rt)|0,A=A+Math.imul(ie,It)|0,A=A+Math.imul(ue,Rt)|0,L=L+Math.imul(ue,It)|0,D=D+Math.imul(K,Ot)|0,A=A+Math.imul(K,Mt)|0,A=A+Math.imul(J,Ot)|0,L=L+Math.imul(J,Mt)|0,D=D+Math.imul(H,Dt)|0,A=A+Math.imul(H,Nt)|0,A=A+Math.imul(X,Dt)|0,L=L+Math.imul(X,Nt)|0,D=D+Math.imul(O,Lt)|0,A=A+Math.imul(O,jt)|0,A=A+Math.imul(q,Lt)|0,L=L+Math.imul(q,jt)|0;var Xx=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Xx>>>26)|0,Xx&=67108863,D=Math.imul(je,Be),A=Math.imul(je,Ct),A=A+Math.imul(Fe,Be)|0,L=Math.imul(Fe,Ct),D=D+Math.imul(Ne,Et)|0,A=A+Math.imul(Ne,St)|0,A=A+Math.imul(Le,Et)|0,L=L+Math.imul(Le,St)|0,D=D+Math.imul(Me,kt)|0,A=A+Math.imul(Me,$t)|0,A=A+Math.imul(De,kt)|0,L=L+Math.imul(De,$t)|0,D=D+Math.imul(Ie,At)|0,A=A+Math.imul(Ie,_t)|0,A=A+Math.imul(Oe,At)|0,L=L+Math.imul(Oe,_t)|0,D=D+Math.imul(me,Pt)|0,A=A+Math.imul(me,Tt)|0,A=A+Math.imul(Re,Pt)|0,L=L+Math.imul(Re,Tt)|0,D=D+Math.imul(ke,Rt)|0,A=A+Math.imul(ke,It)|0,A=A+Math.imul(Ae,Rt)|0,L=L+Math.imul(Ae,It)|0,D=D+Math.imul(ie,Ot)|0,A=A+Math.imul(ie,Mt)|0,A=A+Math.imul(ue,Ot)|0,L=L+Math.imul(ue,Mt)|0,D=D+Math.imul(K,Dt)|0,A=A+Math.imul(K,Nt)|0,A=A+Math.imul(J,Dt)|0,L=L+Math.imul(J,Nt)|0,D=D+Math.imul(H,Lt)|0,A=A+Math.imul(H,jt)|0,A=A+Math.imul(X,Lt)|0,L=L+Math.imul(X,jt)|0,D=D+Math.imul(O,Ft)|0,A=A+Math.imul(O,Bt)|0,A=A+Math.imul(q,Ft)|0,L=L+Math.imul(q,Bt)|0;var Zx=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(Zx>>>26)|0,Zx&=67108863,D=Math.imul(je,Et),A=Math.imul(je,St),A=A+Math.imul(Fe,Et)|0,L=Math.imul(Fe,St),D=D+Math.imul(Ne,kt)|0,A=A+Math.imul(Ne,$t)|0,A=A+Math.imul(Le,kt)|0,L=L+Math.imul(Le,$t)|0,D=D+Math.imul(Me,At)|0,A=A+Math.imul(Me,_t)|0,A=A+Math.imul(De,At)|0,L=L+Math.imul(De,_t)|0,D=D+Math.imul(Ie,Pt)|0,A=A+Math.imul(Ie,Tt)|0,A=A+Math.imul(Oe,Pt)|0,L=L+Math.imul(Oe,Tt)|0,D=D+Math.imul(me,Rt)|0,A=A+Math.imul(me,It)|0,A=A+Math.imul(Re,Rt)|0,L=L+Math.imul(Re,It)|0,D=D+Math.imul(ke,Ot)|0,A=A+Math.imul(ke,Mt)|0,A=A+Math.imul(Ae,Ot)|0,L=L+Math.imul(Ae,Mt)|0,D=D+Math.imul(ie,Dt)|0,A=A+Math.imul(ie,Nt)|0,A=A+Math.imul(ue,Dt)|0,L=L+Math.imul(ue,Nt)|0,D=D+Math.imul(K,Lt)|0,A=A+Math.imul(K,jt)|0,A=A+Math.imul(J,Lt)|0,L=L+Math.imul(J,jt)|0,D=D+Math.imul(H,Ft)|0,A=A+Math.imul(H,Bt)|0,A=A+Math.imul(X,Ft)|0,L=L+Math.imul(X,Bt)|0;var eC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(eC>>>26)|0,eC&=67108863,D=Math.imul(je,kt),A=Math.imul(je,$t),A=A+Math.imul(Fe,kt)|0,L=Math.imul(Fe,$t),D=D+Math.imul(Ne,At)|0,A=A+Math.imul(Ne,_t)|0,A=A+Math.imul(Le,At)|0,L=L+Math.imul(Le,_t)|0,D=D+Math.imul(Me,Pt)|0,A=A+Math.imul(Me,Tt)|0,A=A+Math.imul(De,Pt)|0,L=L+Math.imul(De,Tt)|0,D=D+Math.imul(Ie,Rt)|0,A=A+Math.imul(Ie,It)|0,A=A+Math.imul(Oe,Rt)|0,L=L+Math.imul(Oe,It)|0,D=D+Math.imul(me,Ot)|0,A=A+Math.imul(me,Mt)|0,A=A+Math.imul(Re,Ot)|0,L=L+Math.imul(Re,Mt)|0,D=D+Math.imul(ke,Dt)|0,A=A+Math.imul(ke,Nt)|0,A=A+Math.imul(Ae,Dt)|0,L=L+Math.imul(Ae,Nt)|0,D=D+Math.imul(ie,Lt)|0,A=A+Math.imul(ie,jt)|0,A=A+Math.imul(ue,Lt)|0,L=L+Math.imul(ue,jt)|0,D=D+Math.imul(K,Ft)|0,A=A+Math.imul(K,Bt)|0,A=A+Math.imul(J,Ft)|0,L=L+Math.imul(J,Bt)|0;var tC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(tC>>>26)|0,tC&=67108863,D=Math.imul(je,At),A=Math.imul(je,_t),A=A+Math.imul(Fe,At)|0,L=Math.imul(Fe,_t),D=D+Math.imul(Ne,Pt)|0,A=A+Math.imul(Ne,Tt)|0,A=A+Math.imul(Le,Pt)|0,L=L+Math.imul(Le,Tt)|0,D=D+Math.imul(Me,Rt)|0,A=A+Math.imul(Me,It)|0,A=A+Math.imul(De,Rt)|0,L=L+Math.imul(De,It)|0,D=D+Math.imul(Ie,Ot)|0,A=A+Math.imul(Ie,Mt)|0,A=A+Math.imul(Oe,Ot)|0,L=L+Math.imul(Oe,Mt)|0,D=D+Math.imul(me,Dt)|0,A=A+Math.imul(me,Nt)|0,A=A+Math.imul(Re,Dt)|0,L=L+Math.imul(Re,Nt)|0,D=D+Math.imul(ke,Lt)|0,A=A+Math.imul(ke,jt)|0,A=A+Math.imul(Ae,Lt)|0,L=L+Math.imul(Ae,jt)|0,D=D+Math.imul(ie,Ft)|0,A=A+Math.imul(ie,Bt)|0,A=A+Math.imul(ue,Ft)|0,L=L+Math.imul(ue,Bt)|0;var rC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(rC>>>26)|0,rC&=67108863,D=Math.imul(je,Pt),A=Math.imul(je,Tt),A=A+Math.imul(Fe,Pt)|0,L=Math.imul(Fe,Tt),D=D+Math.imul(Ne,Rt)|0,A=A+Math.imul(Ne,It)|0,A=A+Math.imul(Le,Rt)|0,L=L+Math.imul(Le,It)|0,D=D+Math.imul(Me,Ot)|0,A=A+Math.imul(Me,Mt)|0,A=A+Math.imul(De,Ot)|0,L=L+Math.imul(De,Mt)|0,D=D+Math.imul(Ie,Dt)|0,A=A+Math.imul(Ie,Nt)|0,A=A+Math.imul(Oe,Dt)|0,L=L+Math.imul(Oe,Nt)|0,D=D+Math.imul(me,Lt)|0,A=A+Math.imul(me,jt)|0,A=A+Math.imul(Re,Lt)|0,L=L+Math.imul(Re,jt)|0,D=D+Math.imul(ke,Ft)|0,A=A+Math.imul(ke,Bt)|0,A=A+Math.imul(Ae,Ft)|0,L=L+Math.imul(Ae,Bt)|0;var nC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(nC>>>26)|0,nC&=67108863,D=Math.imul(je,Rt),A=Math.imul(je,It),A=A+Math.imul(Fe,Rt)|0,L=Math.imul(Fe,It),D=D+Math.imul(Ne,Ot)|0,A=A+Math.imul(Ne,Mt)|0,A=A+Math.imul(Le,Ot)|0,L=L+Math.imul(Le,Mt)|0,D=D+Math.imul(Me,Dt)|0,A=A+Math.imul(Me,Nt)|0,A=A+Math.imul(De,Dt)|0,L=L+Math.imul(De,Nt)|0,D=D+Math.imul(Ie,Lt)|0,A=A+Math.imul(Ie,jt)|0,A=A+Math.imul(Oe,Lt)|0,L=L+Math.imul(Oe,jt)|0,D=D+Math.imul(me,Ft)|0,A=A+Math.imul(me,Bt)|0,A=A+Math.imul(Re,Ft)|0,L=L+Math.imul(Re,Bt)|0;var sC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(sC>>>26)|0,sC&=67108863,D=Math.imul(je,Ot),A=Math.imul(je,Mt),A=A+Math.imul(Fe,Ot)|0,L=Math.imul(Fe,Mt),D=D+Math.imul(Ne,Dt)|0,A=A+Math.imul(Ne,Nt)|0,A=A+Math.imul(Le,Dt)|0,L=L+Math.imul(Le,Nt)|0,D=D+Math.imul(Me,Lt)|0,A=A+Math.imul(Me,jt)|0,A=A+Math.imul(De,Lt)|0,L=L+Math.imul(De,jt)|0,D=D+Math.imul(Ie,Ft)|0,A=A+Math.imul(Ie,Bt)|0,A=A+Math.imul(Oe,Ft)|0,L=L+Math.imul(Oe,Bt)|0;var iC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(iC>>>26)|0,iC&=67108863,D=Math.imul(je,Dt),A=Math.imul(je,Nt),A=A+Math.imul(Fe,Dt)|0,L=Math.imul(Fe,Nt),D=D+Math.imul(Ne,Lt)|0,A=A+Math.imul(Ne,jt)|0,A=A+Math.imul(Le,Lt)|0,L=L+Math.imul(Le,jt)|0,D=D+Math.imul(Me,Ft)|0,A=A+Math.imul(Me,Bt)|0,A=A+Math.imul(De,Ft)|0,L=L+Math.imul(De,Bt)|0;var oC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(oC>>>26)|0,oC&=67108863,D=Math.imul(je,Lt),A=Math.imul(je,jt),A=A+Math.imul(Fe,Lt)|0,L=Math.imul(Fe,jt),D=D+Math.imul(Ne,Ft)|0,A=A+Math.imul(Ne,Bt)|0,A=A+Math.imul(Le,Ft)|0,L=L+Math.imul(Le,Bt)|0;var aC=(B+D|0)+((A&8191)<<13)|0;B=(L+(A>>>13)|0)+(aC>>>26)|0,aC&=67108863,D=Math.imul(je,Ft),A=Math.imul(je,Bt),A=A+Math.imul(Fe,Ft)|0,L=Math.imul(Fe,Bt);var lC=(B+D|0)+((A&8191)<<13)|0;return B=(L+(A>>>13)|0)+(lC>>>26)|0,lC&=67108863,I[0]=ja,I[1]=Fa,I[2]=Ba,I[3]=Ua,I[4]=za,I[5]=Qx,I[6]=Yx,I[7]=Jx,I[8]=Xx,I[9]=Zx,I[10]=eC,I[11]=tC,I[12]=rC,I[13]=nC,I[14]=sC,I[15]=iC,I[16]=oC,I[17]=aC,I[18]=lC,B!==0&&(I[19]=B,R.length++),R};Math.imul||(g=p);function w(N,x,S){S.negative=x.negative^N.negative,S.length=N.length+x.length;for(var R=0,M=0,_=0;_>>26)|0,M+=I>>>26,I&=67108863}S.words[_]=B,R=I,I=M}return R!==0?S.words[_]=R:S.length--,S._strip()}function E(N,x,S){return w(N,x,S)}i.prototype.mulTo=function(x,S){var R,M=this.length+x.length;return this.length===10&&x.length===10?R=g(this,x,S):M<63?R=p(this,x,S):M<1024?R=w(this,x,S):R=E(this,x,S),R},i.prototype.mul=function(x){var S=new i(null);return S.words=new Array(this.length+x.length),this.mulTo(x,S)},i.prototype.mulf=function(x){var S=new i(null);return S.words=new Array(this.length+x.length),E(this,x,S)},i.prototype.imul=function(x){return this.clone().mulTo(x,this)},i.prototype.imuln=function(x){var S=x<0;S&&(x=-x),n(typeof x=="number"),n(x<67108864);for(var R=0,M=0;M>=26,R+=_/67108864|0,R+=I>>>26,this.words[M]=I&67108863}return R!==0&&(this.words[M]=R,this.length++),S?this.ineg():this},i.prototype.muln=function(x){return this.clone().imuln(x)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(x){var S=b(x);if(S.length===0)return new i(1);for(var R=this,M=0;M=0);var S=x%26,R=(x-S)/26,M=67108863>>>26-S<<26-S,_;if(S!==0){var I=0;for(_=0;_>>26-S}I&&(this.words[_]=I,this.length++)}if(R!==0){for(_=this.length-1;_>=0;_--)this.words[_+R]=this.words[_];for(_=0;_=0);var M;S?M=(S-S%26)/26:M=0;var _=x%26,I=Math.min((x-_)/26,this.length),B=67108863^67108863>>>_<<_,D=R;if(M-=I,M=Math.max(0,M),D){for(var A=0;AI)for(this.length-=I,A=0;A=0&&(L!==0||A>=M);A--){var G=this.words[A]|0;this.words[A]=L<<26-_|G>>>_,L=G&B}return D&&L!==0&&(D.words[D.length++]=L),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(x,S,R){return n(this.negative===0),this.iushrn(x,S,R)},i.prototype.shln=function(x){return this.clone().ishln(x)},i.prototype.ushln=function(x){return this.clone().iushln(x)},i.prototype.shrn=function(x){return this.clone().ishrn(x)},i.prototype.ushrn=function(x){return this.clone().iushrn(x)},i.prototype.testn=function(x){n(typeof x=="number"&&x>=0);var S=x%26,R=(x-S)/26,M=1<=0);var S=x%26,R=(x-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=R)return this;if(S!==0&&R++,this.length=Math.min(R,this.length),S!==0){var M=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(x){if(n(typeof x=="number"),n(x<67108864),x<0)return this.iaddn(-x);if(this.negative!==0)return this.negative=0,this.iaddn(x),this.negative=1,this;if(this.words[0]-=x,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[_+R]=I&67108863}for(;_>26,this.words[_+R]=I&67108863;if(B===0)return this._strip();for(n(B===-1),B=0,_=0;_>26,this.words[_]=I&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(x,S){var R=this.length-x.length,M=this.clone(),_=x,I=_.words[_.length-1]|0,B=this._countBits(I);R=26-B,R!==0&&(_=_.ushln(R),M.iushln(R),I=_.words[_.length-1]|0);var D=M.length-_.length,A;if(S!=="mod"){A=new i(null),A.length=D+1,A.words=new Array(A.length);for(var L=0;L=0;O--){var q=(M.words[_.length+O]|0)*67108864+(M.words[_.length+O-1]|0);for(q=Math.min(q/I|0,67108863),M._ishlnsubmul(_,q,O);M.negative!==0;)q--,M.negative=0,M._ishlnsubmul(_,1,O),M.isZero()||(M.negative^=1);A&&(A.words[O]=q)}return A&&A._strip(),M._strip(),S!=="div"&&R!==0&&M.iushrn(R),{div:A||null,mod:M}},i.prototype.divmod=function(x,S,R){if(n(!x.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,_,I;return this.negative!==0&&x.negative===0?(I=this.neg().divmod(x,S),S!=="mod"&&(M=I.div.neg()),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.iadd(x)),{div:M,mod:_}):this.negative===0&&x.negative!==0?(I=this.divmod(x.neg(),S),S!=="mod"&&(M=I.div.neg()),{div:M,mod:I.mod}):this.negative&x.negative?(I=this.neg().divmod(x.neg(),S),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.isub(x)),{div:I.div,mod:_}):x.length>this.length||this.cmp(x)<0?{div:new i(0),mod:this}:x.length===1?S==="div"?{div:this.divn(x.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(x.words[0]))}:{div:this.divn(x.words[0]),mod:new i(this.modrn(x.words[0]))}:this._wordDiv(x,S)},i.prototype.div=function(x){return this.divmod(x,"div",!1).div},i.prototype.mod=function(x){return this.divmod(x,"mod",!1).mod},i.prototype.umod=function(x){return this.divmod(x,"mod",!0).mod},i.prototype.divRound=function(x){var S=this.divmod(x);if(S.mod.isZero())return S.div;var R=S.div.negative!==0?S.mod.isub(x):S.mod,M=x.ushrn(1),_=x.andln(1),I=R.cmp(M);return I<0||_===1&&I===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(x){var S=x<0;S&&(x=-x),n(x<=67108863);for(var R=(1<<26)%x,M=0,_=this.length-1;_>=0;_--)M=(R*M+(this.words[_]|0))%x;return S?-M:M},i.prototype.modn=function(x){return this.modrn(x)},i.prototype.idivn=function(x){var S=x<0;S&&(x=-x),n(x<=67108863);for(var R=0,M=this.length-1;M>=0;M--){var _=(this.words[M]|0)+R*67108864;this.words[M]=_/x|0,R=_%x}return this._strip(),S?this.ineg():this},i.prototype.divn=function(x){return this.clone().idivn(x)},i.prototype.egcd=function(x){n(x.negative===0),n(!x.isZero());var S=this,R=x.clone();S.negative!==0?S=S.umod(x):S=S.clone();for(var M=new i(1),_=new i(0),I=new i(0),B=new i(1),D=0;S.isEven()&&R.isEven();)S.iushrn(1),R.iushrn(1),++D;for(var A=R.clone(),L=S.clone();!S.isZero();){for(var G=0,O=1;!(S.words[0]&O)&&G<26;++G,O<<=1);if(G>0)for(S.iushrn(G);G-- >0;)(M.isOdd()||_.isOdd())&&(M.iadd(A),_.isub(L)),M.iushrn(1),_.iushrn(1);for(var q=0,z=1;!(R.words[0]&z)&&q<26;++q,z<<=1);if(q>0)for(R.iushrn(q);q-- >0;)(I.isOdd()||B.isOdd())&&(I.iadd(A),B.isub(L)),I.iushrn(1),B.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(I),_.isub(B)):(R.isub(S),I.isub(M),B.isub(_))}return{a:I,b:B,gcd:R.iushln(D)}},i.prototype._invmp=function(x){n(x.negative===0),n(!x.isZero());var S=this,R=x.clone();S.negative!==0?S=S.umod(x):S=S.clone();for(var M=new i(1),_=new i(0),I=R.clone();S.cmpn(1)>0&&R.cmpn(1)>0;){for(var B=0,D=1;!(S.words[0]&D)&&B<26;++B,D<<=1);if(B>0)for(S.iushrn(B);B-- >0;)M.isOdd()&&M.iadd(I),M.iushrn(1);for(var A=0,L=1;!(R.words[0]&L)&&A<26;++A,L<<=1);if(A>0)for(R.iushrn(A);A-- >0;)_.isOdd()&&_.iadd(I),_.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(_)):(R.isub(S),_.isub(M))}var G;return S.cmpn(1)===0?G=M:G=_,G.cmpn(0)<0&&G.iadd(x),G},i.prototype.gcd=function(x){if(this.isZero())return x.abs();if(x.isZero())return this.abs();var S=this.clone(),R=x.clone();S.negative=0,R.negative=0;for(var M=0;S.isEven()&&R.isEven();M++)S.iushrn(1),R.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;R.isEven();)R.iushrn(1);var _=S.cmp(R);if(_<0){var I=S;S=R,R=I}else if(_===0||R.cmpn(1)===0)break;S.isub(R)}while(!0);return R.iushln(M)},i.prototype.invm=function(x){return this.egcd(x).a.umod(x)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(x){return this.words[0]&x},i.prototype.bincn=function(x){n(typeof x=="number");var S=x%26,R=(x-S)/26,M=1<>>26,B&=67108863,this.words[I]=B}return _!==0&&(this.words[I]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(x){var S=x<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var R;if(this.length>1)R=1;else{S&&(x=-x),n(x<=67108863,"Number is too big");var M=this.words[0]|0;R=M===x?0:Mx.length)return 1;if(this.length=0;R--){var M=this.words[R]|0,_=x.words[R]|0;if(M!==_){M<_?S=-1:M>_&&(S=1);break}}return S},i.prototype.gtn=function(x){return this.cmpn(x)===1},i.prototype.gt=function(x){return this.cmp(x)===1},i.prototype.gten=function(x){return this.cmpn(x)>=0},i.prototype.gte=function(x){return this.cmp(x)>=0},i.prototype.ltn=function(x){return this.cmpn(x)===-1},i.prototype.lt=function(x){return this.cmp(x)===-1},i.prototype.lten=function(x){return this.cmpn(x)<=0},i.prototype.lte=function(x){return this.cmp(x)<=0},i.prototype.eqn=function(x){return this.cmpn(x)===0},i.prototype.eq=function(x){return this.cmp(x)===0},i.red=function(x){return new U(x)},i.prototype.toRed=function(x){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),x.convertTo(this)._forceRed(x)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(x){return this.red=x,this},i.prototype.forceRed=function(x){return n(!this.red,"Already a number in reduction context"),this._forceRed(x)},i.prototype.redAdd=function(x){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,x)},i.prototype.redIAdd=function(x){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,x)},i.prototype.redSub=function(x){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,x)},i.prototype.redISub=function(x){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,x)},i.prototype.redShl=function(x){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,x)},i.prototype.redMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.mul(this,x)},i.prototype.redIMul=function(x){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,x),this.red.imul(this,x)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(x){return n(this.red&&!x.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,x)};var k={k256:null,p224:null,p192:null,p25519:null};function $(N,x){this.name=N,this.p=new i(x,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var x=new i(null);return x.words=new Array(Math.ceil(this.n/13)),x},$.prototype.ireduce=function(x){var S=x,R;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),R=S.bitLength();while(R>this.n);var M=R0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},$.prototype.split=function(x,S){x.iushrn(this.n,0,S)},$.prototype.imulK=function(x){return x.imul(this.k)};function C(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(C,$),C.prototype.split=function(x,S){for(var R=4194303,M=Math.min(x.length,9),_=0;_>>22,I=B}I>>>=22,x.words[_-10]=I,I===0&&x.length>10?x.length-=10:x.length-=9},C.prototype.imulK=function(x){x.words[x.length]=0,x.words[x.length+1]=0,x.length+=2;for(var S=0,R=0;R>>=26,x.words[R]=_,S=M}return S!==0&&(x.words[x.length++]=S),x},i._prime=function(x){if(k[x])return k[x];var S;if(x==="k256")S=new C;else if(x==="p224")S=new T;else if(x==="p192")S=new j;else if(x==="p25519")S=new F;else throw new Error("Unknown prime "+x);return k[x]=S,S};function U(N){if(typeof N=="string"){var x=i._prime(N);this.m=x.p,this.prime=x}else n(N.gtn(1),"modulus must be greater than 1"),this.m=N,this.prime=null}U.prototype._verify1=function(x){n(x.negative===0,"red works only with positives"),n(x.red,"red works only with red numbers")},U.prototype._verify2=function(x,S){n((x.negative|S.negative)===0,"red works only with positives"),n(x.red&&x.red===S.red,"red works only with red numbers")},U.prototype.imod=function(x){return this.prime?this.prime.ireduce(x)._forceRed(this):(f(x,x.umod(this.m)._forceRed(this)),x)},U.prototype.neg=function(x){return x.isZero()?x.clone():this.m.sub(x)._forceRed(this)},U.prototype.add=function(x,S){this._verify2(x,S);var R=x.add(S);return R.cmp(this.m)>=0&&R.isub(this.m),R._forceRed(this)},U.prototype.iadd=function(x,S){this._verify2(x,S);var R=x.iadd(S);return R.cmp(this.m)>=0&&R.isub(this.m),R},U.prototype.sub=function(x,S){this._verify2(x,S);var R=x.sub(S);return R.cmpn(0)<0&&R.iadd(this.m),R._forceRed(this)},U.prototype.isub=function(x,S){this._verify2(x,S);var R=x.isub(S);return R.cmpn(0)<0&&R.iadd(this.m),R},U.prototype.shl=function(x,S){return this._verify1(x),this.imod(x.ushln(S))},U.prototype.imul=function(x,S){return this._verify2(x,S),this.imod(x.imul(S))},U.prototype.mul=function(x,S){return this._verify2(x,S),this.imod(x.mul(S))},U.prototype.isqr=function(x){return this.imul(x,x.clone())},U.prototype.sqr=function(x){return this.mul(x,x)},U.prototype.sqrt=function(x){if(x.isZero())return x.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var R=this.m.add(new i(1)).iushrn(2);return this.pow(x,R)}for(var M=this.m.subn(1),_=0;!M.isZero()&&M.andln(1)===0;)_++,M.iushrn(1);n(!M.isZero());var I=new i(1).toRed(this),B=I.redNeg(),D=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new i(2*A*A).toRed(this);this.pow(A,D).cmp(B)!==0;)A.redIAdd(B);for(var L=this.pow(A,M),G=this.pow(x,M.addn(1).iushrn(1)),O=this.pow(x,M),q=_;O.cmp(I)!==0;){for(var z=O,H=0;z.cmp(I)!==0;H++)z=z.redSqr();n(H=0;_--){for(var L=S.words[_],G=A-1;G>=0;G--){var O=L>>G&1;if(I!==M[0]&&(I=this.sqr(I)),O===0&&B===0){D=0;continue}B<<=1,B|=O,D++,!(D!==R&&(_!==0||G!==0))&&(I=this.mul(I,M[B]),D=0,B=0)}A=26}return I},U.prototype.convertTo=function(x){var S=x.umod(this.m);return S===x?S.clone():S},U.prototype.convertFrom=function(x){var S=x.clone();return S.red=null,S},i.mont=function(x){return new V(x)};function V(N){U.call(this,N),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}s(V,U),V.prototype.convertTo=function(x){return this.imod(x.ushln(this.shift))},V.prototype.convertFrom=function(x){var S=this.imod(x.mul(this.rinv));return S.red=null,S},V.prototype.imul=function(x,S){if(x.isZero()||S.isZero())return x.words[0]=0,x.length=1,x;var R=x.imul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.mul=function(x,S){if(x.isZero()||S.isZero())return new i(0)._forceRed(this);var R=x.mul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.invm=function(x){var S=this.imod(x._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(t,Wr)})(Tte);const Te=R6,Ote="logger/5.7.0";let xT=!1,CT=!1;const wp={debug:1,default:2,info:2,warning:3,error:4,off:5};let ET=wp.default,DC=null;function Mte(){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 ST=Mte();var I6;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(I6||(I6={}));var Si;(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"})(Si||(Si={}));const kT="0123456789abcdef";let ee=class jr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();wp[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ET>wp[n])&&console.log.apply(console,r)}debug(...e){this._log(jr.levels.DEBUG,e)}info(...e){this._log(jr.levels.INFO,e)}warn(...e){this._log(jr.levels.WARNING,e)}makeError(e,r,n){if(CT)return this.makeError("censored error",r,{});r||(r=jr.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=kT[c[u]&15];s.push(l+"=Uint8Array(0x"+f+")")}else s.push(l+"="+JSON.stringify(c))}catch{s.push(l+"="+JSON.stringify(n[l].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let o="";switch(r){case Si.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Si.CALL_EXCEPTION:case Si.INSUFFICIENT_FUNDS:case Si.MISSING_NEW:case Si.NONCE_EXPIRED:case Si.REPLACEMENT_UNDERPRICED:case Si.TRANSACTION_REPLACED:case Si.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,jr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){ST&&this.throwError("platform missing String.prototype.normalize",jr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ST})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,jr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,jr.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,jr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",jr.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",jr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",jr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return DC||(DC=new jr(Ote)),DC}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),xT){if(!e)return;this.globalLogger().throwError("error censorship permanent",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}CT=!!e,xT=!!r}static setLogLevel(e){const r=wp[e.toLowerCase()];if(r==null){jr.globalLogger().warn("invalid log level - "+e);return}ET=r}static from(e){return new jr(e)}};ee.errors=Si;ee.levels=I6;const Dte="bytes/5.7.0",mr=new ee(Dte);function Nj(t){return!!t.toHexString}function od(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return od(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ha(t){return ze(t)&&!(t.length%2)||_a(t)}function $T(t){return typeof t=="number"&&t==t&&t%1===0}function _a(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!$T(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"){mr.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),od(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Nj(t)&&(t=t.toHexString()),ze(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":mr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sne(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),od(n)}function xo(t){let e=ne(t);if(e.length===0)return e;let r=0;for(;re&&mr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),od(r)}function ze(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const NC="0123456789abcdef";function te(t,e){if(e||(e={}),typeof t=="number"){mr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=NC[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),Nj(t))return t.toHexString();if(ze(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":mr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(_a(t)){let r="0x";for(let n=0;n>4]+NC[s&15]}return r}return mr.throwArgumentError("invalid hexlify value","value",t)}function Po(t){if(typeof t!="string")t=te(t);else if(!ze(t)||t.length%2)return null;return(t.length-2)/2}function kr(t,e,r){return typeof t!="string"?t=te(t):(!ze(t)||t.length%2)&&mr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Ln(t){let e="0x";return t.forEach(r=>{e+=te(r).substring(2)}),e}function Nl(t){const e=Lj(te(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function Lj(t){typeof t!="string"&&(t=te(t)),ze(t)||mr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&mr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function Lf(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ha(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]):mr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:mr.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 s=K1(ne(e._vs),32);e._vs=te(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&mr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const o=te(s);e.s==null?e.s=o:e.s!==o&&mr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?mr.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 s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&mr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!ze(e.r)?mr.throwArgumentError("signature missing or invalid r","signature",t):e.r=ht(e.r,32),e.s==null||!ze(e.s)?mr.throwArgumentError("signature missing or invalid s","signature",t):e.s=ht(e.s,32);const r=ne(e.s);r[0]>=128&&mr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=te(r);e._vs&&(ze(e._vs)||mr.throwArgumentError("signature invalid _vs","signature",t),e._vs=ht(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&mr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Nte(t){return t=Lf(t),te(Ht([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const jj="bignumber/5.7.0";var Kv=Te.BN;const Vo=new ee(jj),LC={},AT=9007199254740991;function Lte(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||_a(t))}let _T=!1;class Z{constructor(e,r){e!==LC&&Vo.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 Yn(Je(this).fromTwos(e))}toTwos(e){return Yn(Je(this).toTwos(e))}abs(){return this._hex[0]==="-"?Z.from(this._hex.substring(1)):this}add(e){return Yn(Je(this).add(Je(e)))}sub(e){return Yn(Je(this).sub(Je(e)))}div(e){return Z.from(e).isZero()&&Bs("division-by-zero","div"),Yn(Je(this).div(Je(e)))}mul(e){return Yn(Je(this).mul(Je(e)))}mod(e){const r=Je(e);return r.isNeg()&&Bs("division-by-zero","mod"),Yn(Je(this).umod(r))}pow(e){const r=Je(e);return r.isNeg()&&Bs("negative-power","pow"),Yn(Je(this).pow(r))}and(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Bs("unbound-bitwise-result","and"),Yn(Je(this).and(r))}or(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Bs("unbound-bitwise-result","or"),Yn(Je(this).or(r))}xor(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Bs("unbound-bitwise-result","xor"),Yn(Je(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Bs("negative-width","mask"),Yn(Je(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Bs("negative-width","shl"),Yn(Je(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Bs("negative-width","shr"),Yn(Je(this).shrn(e))}eq(e){return Je(this).eq(Je(e))}lt(e){return Je(this).lt(Je(e))}lte(e){return Je(this).lte(Je(e))}gt(e){return Je(this).gt(Je(e))}gte(e){return Je(this).gte(Je(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Je(this).isZero()}toNumber(){try{return Je(this).toNumber()}catch{Bs("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Vo.throwError("this platform does not support BigInt",ee.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?_T||(_T=!0,Vo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Vo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ee.errors.UNEXPECTED_ARGUMENT,{}):Vo.throwError("BigNumber.toString does not accept parameters",ee.errors.UNEXPECTED_ARGUMENT,{})),Je(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Z)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Z(LC,Qv(e)):e.match(/^-?[0-9]+$/)?new Z(LC,Qv(new Kv(e))):Vo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Bs("underflow","BigNumber.from",e),(e>=AT||e<=-AT)&&Bs("overflow","BigNumber.from",e),Z.from(String(e));const r=e;if(typeof r=="bigint")return Z.from(r.toString());if(_a(r))return Z.from(te(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Z.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(ze(n)||n[0]==="-"&&ze(n.substring(1))))return Z.from(n)}return Vo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Qv(t){if(typeof t!="string")return Qv(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Vo.throwArgumentError("invalid hex","value",t),t=Qv(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 Yn(t){return Z.from(Qv(t))}function Je(t){const e=Z.from(t).toHexString();return e[0]==="-"?new Kv("-"+e.substring(3),16):new Kv(e.substring(2),16)}function Bs(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Vo.throwError(t,ee.errors.NUMERIC_FAULT,n)}function jte(t){return new Kv(t,36).toString(16)}function Fte(t){return new Kv(t,16).toString(36)}const jn=new ee(jj),Q1={},Fj=Z.from(0),Bj=Z.from(-1);function Uj(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),jn.throwError(t,ee.errors.NUMERIC_FAULT,s)}let Y1="0";for(;Y1.length<256;)Y1+=Y1;function W8(t){if(typeof t!="number")try{t=Z.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Y1.substring(0,t):jn.throwArgumentError("invalid decimal size","decimals",t)}function xp(t,e){e==null&&(e=0);const r=W8(e);t=Z.from(t);const n=t.lt(Fj);n&&(t=t.mul(Bj));let s=t.mod(r).toString();for(;s.length2&&jn.throwArgumentError("too many decimal points","value",t);let i=s[0],o=s[1];for(i||(i="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&Uj("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&jn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&jn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&jn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new ad(Q1,r,n,s)}}class on{constructor(e,r,n,s){e!==Q1&&jn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&jn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=eo(this._value,this.format.decimals),n=eo(e._value,e.format.decimals);return on.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=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(PT.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(PT.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)&&jn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=on.from("1"+Y1.substring(0,e),this.format),s=Bte.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).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&&jn.throwArgumentError("invalid byte width","width",e);const r=Z.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ht(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return on.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!Lte(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),on.fromString(xp(e,r),ad.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=ad.from(r),s=eo(e,n.decimals);!n.signed&&s.lt(Fj)&&Uj("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=ht(i,n.width/8));const o=xp(s,n.decimals);return new on(Q1,i,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=ad.from(r);if(ne(e).length>n.width/8)throw new Error("overflow");let s=Z.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),o=xp(s,n.decimals);return new on(Q1,i,o,n)}static from(e,r){if(typeof e=="string")return on.fromString(e,r);if(_a(e))return on.fromBytes(e,r);try{return on.fromValue(e,0,r)}catch(n){if(n.code!==ee.errors.INVALID_ARGUMENT)throw n}return jn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const PT=on.from(1),Bte=on.from("0.5"),Ute="properties/5.7.0";var zte=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Pg=new ee(Ute);function oe(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Pi(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 mt(t){return zte(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function H8(t,e){(!t||typeof t!="object")&&Pg.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||Pg.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Gt(t){const e={};for(const r in t)e[r]=t[r];return e}const Vte={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function zj(t){if(t==null||Vte[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;rAs(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&oe(e,r,As(n))}return e}return Pg.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function As(t){return qte(t)}class o0{constructor(e){for(const r in e)this[r]=As(e[r])}}const a0="abi/5.7.0",tt=new ee(a0),pf={};let TT={calldata:!0,memory:!0,storage:!0},Wte={calldata:!0,memory:!0};function fm(t,e){if(t==="bytes"||t==="string"){if(TT[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Wte[e])return!0;return(TT[e]||e==="payable")&&tt.throwArgumentError("invalid modifier","name",e),!1}function Hte(t,e){let r=t;function n(a){tt.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function s(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let i={type:"",name:"",state:{allowType:!0}},o=i;for(let a=0;aJSON.parse(s.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!==it.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===it.full?", ":",")+")"):r+=this.type,e!==it.sighash&&(this.indexed===!0&&(r+=" indexed"),e===it.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?qr.fromString(e,r):qr.fromObject(e)}static fromObject(e){return qr.isParamType(e)?e:new qr(pf,{name:e.name||null,type:xu(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(qr.fromObject):null})}static fromString(e,r){function n(s){return qr.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(Hte(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function Yv(t,e){return Qte(t).map(r=>qr.fromString(r,e))}class mo{constructor(e,r){e!==pf&&tt.throwError("use a static from method",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Cp(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return mo.isFragment(e)?e:typeof e=="string"?mo.fromString(e):mo.fromObject(e)}static fromObject(e){if(mo.isFragment(e))return e;switch(e.type){case"function":return _i.fromObject(e);case"event":return uo.fromObject(e);case"constructor":return Ai.fromObject(e);case"error":return Jo.fromObject(e);case"fallback":case"receive":return null}return tt.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"?uo.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?_i.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?Ai.fromString(e.trim()):e.split(" ")[0]==="error"?Jo.fromString(e.substring(5).trim()):tt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class uo extends mo{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.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!==it.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",e!==it.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?uo.fromString(e):uo.fromObject(e)}static fromObject(e){if(uo.isEventFragment(e))return e;e.type!=="event"&&tt.throwArgumentError("invalid event object","value",e);const r={name:Jv(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(qr.fromObject):[],type:"event"};return new uo(pf,r)}static fromString(e){let r=e.match(Xv);r||tt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:tt.warn("unknown modifier: "+s)}}),uo.fromObject({name:r[1].trim(),anonymous:n,inputs:Yv(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function Vj(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&tt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||tt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Z.from(r[1]),r[0]):t}function qj(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 Wj(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&&tt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&tt.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"&&tt.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&&tt.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"&&tt.throwArgumentError("unable to determine stateMutability","value",t),e}class Ai extends mo{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.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===it.sighash&&tt.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===it.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?Ai.fromString(e):Ai.fromObject(e)}static fromObject(e){if(Ai.isConstructorFragment(e))return e;e.type!=="constructor"&&tt.throwArgumentError("invalid constructor object","value",e);let r=Wj(e);r.constant&&tt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new Ai(pf,n)}static fromString(e){let r={type:"constructor"};e=Vj(e,r);let n=e.match(Xv);return(!n||n[1].trim()!=="constructor")&&tt.throwArgumentError("invalid constructor string","value",e),r.inputs=Yv(n[2].trim(),!1),qj(n[3].trim(),r),Ai.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class _i extends Ai{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.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!==it.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",e!==it.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"?_i.fromString(e):_i.fromObject(e)}static fromObject(e){if(_i.isFunctionFragment(e))return e;e.type!=="function"&&tt.throwArgumentError("invalid function object","value",e);let r=Wj(e);const n={type:e.type,name:Jv(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(qr.fromObject):[],outputs:e.outputs?e.outputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new _i(pf,n)}static fromString(e){let r={type:"function"};e=Vj(e,r);let n=e.split(" returns ");n.length>2&&tt.throwArgumentError("invalid function string","value",e);let s=n[0].match(Xv);if(s||tt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&Jv(r.name),r.inputs=Yv(s[2],!1),qj(s[3].trim(),r),n.length>1){let i=n[1].match(Xv);(i[1].trim()!=""||i[3].trim()!="")&&tt.throwArgumentError("unexpected tokens","value",e),r.outputs=Yv(i[2],!1)}else r.outputs=[];return _i.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function RT(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&tt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Jo extends mo{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==it.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Jo.fromString(e):Jo.fromObject(e)}static fromObject(e){if(Jo.isErrorFragment(e))return e;e.type!=="error"&&tt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:Jv(e.name),inputs:e.inputs?e.inputs.map(qr.fromObject):[]};return RT(new Jo(pf,r))}static fromString(e){let r={type:"error"},n=e.match(Xv);return n||tt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&Jv(r.name),r.inputs=Yv(n[2],!1),RT(Jo.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function xu(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Kte=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Jv(t){return(!t||!t.match(Kte))&&tt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Xv=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Qte(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&G8.throwError("value out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ht([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 Tg{constructor(e,r,n,s){oe(this,"_data",ne(e)),oe(this,"wordSize",r||32),oe(this,"_coerceFunc",n),oe(this,"allowLoose",s),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):Tg.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:G8.throwError("data out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new Tg(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 Z.from(this.readBytes(this.wordSize))}}var M6={},Yte={get exports(){return M6},set exports(t){M6=t}};/** - * [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",s=n?window:{};s.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",o=!s.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?s=Wr:i&&(s=self);var a=!s.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],h=[6,1536,393216,100663296],v=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],p=[128,256],g=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return Object.prototype.toString.call(O)==="[object Array]"}),l&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var E=function(O,q,z){return function(H){return new A(O,q,O).update(H)[z]()}},k=function(O,q,z){return function(H,X){return new A(O,q,X).update(H)[z]()}},$=function(O,q,z){return function(H,X,Q,K){return x["cshake"+O].update(H,X,Q,K)[z]()}},C=function(O,q,z){return function(H,X,Q,K){return x["kmac"+O].update(H,X,Q,K)[z]()}},T=function(O,q,z,H){for(var X=0;X>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var H=0;H<50;++H)this.s[H]=0}A.prototype.update=function(O){if(this.finalized)throw new Error(r);var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}for(var H=this.blocks,X=this.byteCount,Q=O.length,K=this.blockCount,J=0,ae=this.s,ie,ue;J>2]|=O[J]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(H[ie>>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)<=X){for(this.start=ie-X,this.block=H[K],ie=0;ie>8,z=O&255;z>0;)X.unshift(z),O=O>>8,z=O&255,++H;return q?X.push(H):X.unshift(H),this.update(X),X.length},A.prototype.encodeString=function(O){var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}var H=0,X=O.length;if(q)H=X;else for(var Q=0;Q=57344?H+=3:(K=65536+((K&1023)<<10|O.charCodeAt(++Q)&1023),H+=4)}return H+=this.encode(H*8),this.update(O),H},A.prototype.bytepad=function(O,q){for(var z=this.encode(q),H=0;H>2]|=this.padding[q&3],this.lastByteIndex===this.byteCount)for(O[0]=O[z],q=1;q>4&15]+c[J&15]+c[J>>12&15]+c[J>>8&15]+c[J>>20&15]+c[J>>16&15]+c[J>>28&15]+c[J>>24&15];Q%O===0&&(G(q),X=0)}return H&&(J=q[X],K+=c[J>>4&15]+c[J&15],H>1&&(K+=c[J>>12&15]+c[J>>8&15]),H>2&&(K+=c[J>>20&15]+c[J>>16&15])),K},A.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,q=this.s,z=this.outputBlocks,H=this.extraBytes,X=0,Q=0,K=this.outputBits>>3,J;H?J=new ArrayBuffer(z+1<<2):J=new ArrayBuffer(K);for(var ae=new Uint32Array(J);Q>8&255,K[J+2]=ae>>16&255,K[J+3]=ae>>24&255;Q%O===0&&G(q)}return H&&(J=Q<<2,ae=q[X],K[J]=ae&255,H>1&&(K[J+1]=ae>>8&255),H>2&&(K[J+2]=ae>>16&255)),K};function L(O,q,z){A.call(this,O,q,z)}L.prototype=new A,L.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var G=function(O){var q,z,H,X,Q,K,J,ae,ie,ue,st,ke,Ae,at,me,Re,Qt,Ie,Oe,Yt,Me,De,Jt,Ne,Le,Xt,je,Fe,Zt,Be,Ct,yc,Et,St,mc,kt,$t,pc,At,_t,gc,Pt,Tt,bc,Rt,It,wc,Ot,Mt,xc,Dt,Nt,Cc,Lt,jt,Ec,Ft,Bt,ja,Fa,Ba,Ua,za;for(H=0;H<48;H+=2)X=O[0]^O[10]^O[20]^O[30]^O[40],Q=O[1]^O[11]^O[21]^O[31]^O[41],K=O[2]^O[12]^O[22]^O[32]^O[42],J=O[3]^O[13]^O[23]^O[33]^O[43],ae=O[4]^O[14]^O[24]^O[34]^O[44],ie=O[5]^O[15]^O[25]^O[35]^O[45],ue=O[6]^O[16]^O[26]^O[36]^O[46],st=O[7]^O[17]^O[27]^O[37]^O[47],ke=O[8]^O[18]^O[28]^O[38]^O[48],Ae=O[9]^O[19]^O[29]^O[39]^O[49],q=ke^(K<<1|J>>>31),z=Ae^(J<<1|K>>>31),O[0]^=q,O[1]^=z,O[10]^=q,O[11]^=z,O[20]^=q,O[21]^=z,O[30]^=q,O[31]^=z,O[40]^=q,O[41]^=z,q=X^(ae<<1|ie>>>31),z=Q^(ie<<1|ae>>>31),O[2]^=q,O[3]^=z,O[12]^=q,O[13]^=z,O[22]^=q,O[23]^=z,O[32]^=q,O[33]^=z,O[42]^=q,O[43]^=z,q=K^(ue<<1|st>>>31),z=J^(st<<1|ue>>>31),O[4]^=q,O[5]^=z,O[14]^=q,O[15]^=z,O[24]^=q,O[25]^=z,O[34]^=q,O[35]^=z,O[44]^=q,O[45]^=z,q=ae^(ke<<1|Ae>>>31),z=ie^(Ae<<1|ke>>>31),O[6]^=q,O[7]^=z,O[16]^=q,O[17]^=z,O[26]^=q,O[27]^=z,O[36]^=q,O[37]^=z,O[46]^=q,O[47]^=z,q=ue^(X<<1|Q>>>31),z=st^(Q<<1|X>>>31),O[8]^=q,O[9]^=z,O[18]^=q,O[19]^=z,O[28]^=q,O[29]^=z,O[38]^=q,O[39]^=z,O[48]^=q,O[49]^=z,at=O[0],me=O[1],It=O[11]<<4|O[10]>>>28,wc=O[10]<<4|O[11]>>>28,Fe=O[20]<<3|O[21]>>>29,Zt=O[21]<<3|O[20]>>>29,Fa=O[31]<<9|O[30]>>>23,Ba=O[30]<<9|O[31]>>>23,Pt=O[40]<<18|O[41]>>>14,Tt=O[41]<<18|O[40]>>>14,St=O[2]<<1|O[3]>>>31,mc=O[3]<<1|O[2]>>>31,Re=O[13]<<12|O[12]>>>20,Qt=O[12]<<12|O[13]>>>20,Ot=O[22]<<10|O[23]>>>22,Mt=O[23]<<10|O[22]>>>22,Be=O[33]<<13|O[32]>>>19,Ct=O[32]<<13|O[33]>>>19,Ua=O[42]<<2|O[43]>>>30,za=O[43]<<2|O[42]>>>30,Lt=O[5]<<30|O[4]>>>2,jt=O[4]<<30|O[5]>>>2,kt=O[14]<<6|O[15]>>>26,$t=O[15]<<6|O[14]>>>26,Ie=O[25]<<11|O[24]>>>21,Oe=O[24]<<11|O[25]>>>21,xc=O[34]<<15|O[35]>>>17,Dt=O[35]<<15|O[34]>>>17,yc=O[45]<<29|O[44]>>>3,Et=O[44]<<29|O[45]>>>3,Ne=O[6]<<28|O[7]>>>4,Le=O[7]<<28|O[6]>>>4,Ec=O[17]<<23|O[16]>>>9,Ft=O[16]<<23|O[17]>>>9,pc=O[26]<<25|O[27]>>>7,At=O[27]<<25|O[26]>>>7,Yt=O[36]<<21|O[37]>>>11,Me=O[37]<<21|O[36]>>>11,Nt=O[47]<<24|O[46]>>>8,Cc=O[46]<<24|O[47]>>>8,bc=O[8]<<27|O[9]>>>5,Rt=O[9]<<27|O[8]>>>5,Xt=O[18]<<20|O[19]>>>12,je=O[19]<<20|O[18]>>>12,Bt=O[29]<<7|O[28]>>>25,ja=O[28]<<7|O[29]>>>25,_t=O[38]<<8|O[39]>>>24,gc=O[39]<<8|O[38]>>>24,De=O[48]<<14|O[49]>>>18,Jt=O[49]<<14|O[48]>>>18,O[0]=at^~Re&Ie,O[1]=me^~Qt&Oe,O[10]=Ne^~Xt&Fe,O[11]=Le^~je&Zt,O[20]=St^~kt&pc,O[21]=mc^~$t&At,O[30]=bc^~It&Ot,O[31]=Rt^~wc&Mt,O[40]=Lt^~Ec&Bt,O[41]=jt^~Ft&ja,O[2]=Re^~Ie&Yt,O[3]=Qt^~Oe&Me,O[12]=Xt^~Fe&Be,O[13]=je^~Zt&Ct,O[22]=kt^~pc&_t,O[23]=$t^~At&gc,O[32]=It^~Ot&xc,O[33]=wc^~Mt&Dt,O[42]=Ec^~Bt&Fa,O[43]=Ft^~ja&Ba,O[4]=Ie^~Yt&De,O[5]=Oe^~Me&Jt,O[14]=Fe^~Be&yc,O[15]=Zt^~Ct&Et,O[24]=pc^~_t&Pt,O[25]=At^~gc&Tt,O[34]=Ot^~xc&Nt,O[35]=Mt^~Dt&Cc,O[44]=Bt^~Fa&Ua,O[45]=ja^~Ba&za,O[6]=Yt^~De&at,O[7]=Me^~Jt&me,O[16]=Be^~yc&Ne,O[17]=Ct^~Et&Le,O[26]=_t^~Pt&St,O[27]=gc^~Tt&mc,O[36]=xc^~Nt&bc,O[37]=Dt^~Cc&Rt,O[46]=Fa^~Ua&Lt,O[47]=Ba^~za&jt,O[8]=De^~at&Re,O[9]=Jt^~me&Qt,O[18]=yc^~Ne&Xt,O[19]=Et^~Le&je,O[28]=Pt^~St&kt,O[29]=Tt^~mc&$t,O[38]=Nt^~bc&It,O[39]=Cc^~Rt&wc,O[48]=Ua^~Lt&Ec,O[49]=za^~jt&Ft,O[0]^=y[H],O[1]^=y[H+1]};if(a)t.exports=x;else for(R=0;R>=8;return e}function OT(t,e,r){let n=0;for(let s=0;se+1+n&&io.throwError("child data too short",ee.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function Kj(t,e){if(t.length===0&&io.throwError("data too short",ee.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&io.throwError("data short segment too short",ee.errors.BUFFER_OVERRUN,{});const n=OT(t,e+1,r);return e+1+r+n>t.length&&io.throwError("data long segment too short",ee.errors.BUFFER_OVERRUN,{}),MT(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&io.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{}),MT(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&io.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const n=OT(t,e+1,r);e+1+r+n>t.length&&io.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const s=te(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&io.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 N2(t){const e=ne(t),r=Kj(e,0);return r.consumed!==e.length&&io.throwArgumentError("invalid rlp data","data",t),r.result}const Zte=Object.freeze(Object.defineProperty({__proto__:null,decode:N2,encode:gf},Symbol.toStringTag,{value:"Module"})),ere="address/5.7.0",ul=new ee(ere);function DT(t){ze(t,20)||ul.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=ne(Ue(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const tre=9007199254740991;function rre(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const K8={};for(let t=0;t<10;t++)K8[String(t)]=String(t);for(let t=0;t<26;t++)K8[String.fromCharCode(65+t)]=String(10+t);const NT=Math.floor(rre(tre));function Qj(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>K8[n]).join("");for(;e.length>=NT;){let n=e.substring(0,NT);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 Ye(t){let e=null;if(typeof t!="string"&&ul.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=DT(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&ul.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)!==Qj(t)&&ul.throwArgumentError("bad icap checksum","address",t),e=jte(t.substring(4));e.length<40;)e="0"+e;e=DT("0x"+e)}else ul.throwArgumentError("invalid address","address",t);return e}function Yj(t){try{return Ye(t),!0}catch{}return!1}function nre(t){let e=Fte(Ye(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Qj("XE00"+e)+e}function Q8(t){let e=null;try{e=Ye(t.from)}catch{ul.throwArgumentError("missing from address","transaction",t)}const r=xo(ne(Z.from(t.nonce).toHexString()));return Ye(kr(Ue(gf([e,r])),12))}function sre(t,e,r){return Po(e)!==32&&ul.throwArgumentError("salt must be 32 bytes","salt",e),Po(r)!==32&&ul.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ye(kr(Ue(Ht(["0xff",Ye(t),e,r])),12))}class ire extends Pa{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Ye(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Ye(ht(e.readValue().toHexString(),20))}}class ore extends Pa{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 Bu=new ee(a0);function Jj(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||Bu.throwError("cannot encode object for signature with missing names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Bu.throwError("cannot encode object for signature with duplicate names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Bu.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Bu.throwArgumentError("types/value length mismatch","tuple",r);let s=new O6(t.wordSize),i=new O6(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=i.length;l.encode(i,f);let d=s.writeUpdatableValue();o.push(h=>{d(h+u)})}else l.encode(s,f)}),o.forEach(l=>{l(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function Xj(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=i.decode(l)}catch(c){if(c.code===ee.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(a.code===ee.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}o!=null&&r.push(o)});const s=e.reduce((i,o)=>{const a=o.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});e.forEach((i,o)=>{let a=i.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let i=0;i{throw o}})}return Object.freeze(r)}class are extends Pa{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&Bu.throwError("insufficient data length",ee.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;o++)i++;return i}return t===Zn.OVERRUN?r.length-e-1:0}function pre(t,e,r,n,s){return t===Zn.OVERLONG?(n.push(s),0):(n.push(65533),nF(t,e,r))}const sF=Object.freeze({error:mre,ignore:nF,replace:pre});function Y8(t,e){e==null&&(e=sF.error),t=ne(t);const r=[];let n=0;for(;n>7)){r.push(s);continue}let i=null,o=null;if((s&224)===192)i=1,o=127;else if((s&240)===224)i=2,o=2047;else if((s&248)===240)i=3,o=65535;else{(s&192)===128?n+=e(Zn.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Zn.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(Zn.OVERRUN,n-1,t,r);continue}let a=s&(1<<8-i-1)-1;for(let l=0;l1114111){n+=e(Zn.OUT_OF_RANGE,n-1-i,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(Zn.UTF16_SURROGATE,n-1-i,t,r,a);continue}if(a<=o){n+=e(Zn.OVERLONG,n-1-i,t,r,a);continue}r.push(a)}}return r}function xt(t,e=va.current){e!=va.current&&(rF.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((s&1023)<<10)+(i&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(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return ne(r)}function jC(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function gre(t,e){return'"'+Y8(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?jC(r):(r-=65536,jC((r>>10&1023)+55296)+jC((r&1023)+56320))}).join("")+'"'}function D6(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ta(t,e){return D6(Y8(t,e))}function Ig(t,e=va.current){return Y8(xt(t,e))}function bre(t){const e=xt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return te(Ht([e,Rg]).slice(0,32))}function wre(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 Ta(e.slice(0,r))}function xre(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function iF(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 s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function X8(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const Cre=iF("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"),Ere="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),Sre=[{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}],kre=J8("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"),$re=J8("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"),Are=J8("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",xre),_re=iF("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 Pre(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function Tre(t){return!!X8(t,Cre)}function Rre(t){let e=X8(t,Sre);if(e)return[t+e.s];let r=kre[t];if(r)return r;let n=$re[t];if(n)return[t+n[0]];let s=Are[t];return s||null}function Ire(t){return!!X8(t,_re)}function Ore(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=Ig(t);e=Pre(e.map(n=>{if(Ere.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=Rre(n);return s||[n]})),e=Ig(D6(e),va.NFKC),e.forEach(n=>{if(Ire(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(Tre(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=D6(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class Mre extends Zj{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,xt(r))}decode(e){return Ta(super.decode(e))}}class um extends Pa{constructor(e,r){let n=!1;const s=[];e.forEach(o=>{o.dynamic&&(n=!0),s.push(o.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return Jj(e,this.coders,r)}decode(e){return e.coerce(this.name,Xj(e,this.coders))}}const dm=new ee(a0),Dre=new RegExp(/^bytes([0-9]*)$/),Nre=new RegExp(/^(u?int)([0-9]*)$/);class Z8{constructor(e){oe(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new ire(e.name);case"bool":return new lre(e.name);case"string":return new Mre(e.name);case"bytes":return new cre(e.name);case"array":return new are(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new um((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new ure(e.name)}let r=e.type.match(Nre);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&dm.throwArgumentError("invalid "+r[1]+" bit length","param",e),new vre(n/8,r[1]==="int",e.name)}if(r=e.type.match(Dre),r){let n=parseInt(r[1]);return(n===0||n>32)&&dm.throwArgumentError("invalid bytes length","param",e),new fre(n,e.name)}return dm.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Tg(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new O6(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(qr.from(s)));return new um(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&dm.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(qr.from(o))),s=new um(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>this._getCoder(qr.from(o)));return new um(s,"_").decode(this._getReader(ne(r),n))}}const Hn=new Z8;function dl(t){return Ue(xt(t))}const oF="hash/5.7.0";function e$(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?s(a,o-1):r.push(a)})};return s(t,e),r}function jre(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),h=d>>>1,v=h>>1,y=d-1;let b=0;for(let k=0;k1;){let F=$+C>>>1;k>>1|f(),T=T<<1^h,j=(j^h)<<1|h|1;g=T,w=1+j-T}let E=n-4;return p.map(k=>{switch(k-E){case 3:return E+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return E+256+(t[a++]<<8|t[a++]);case 1:return E+t[a++];default:return k-1}})}function Bre(t){let e=0;return()=>t[e++]}function Ure(t){return Bre(Fre(t))}function zre(t){return t&1?~t>>1:t>>1}function Vre(t,e){let r=Array(t);for(let n=0;ne[o]):r}function Wre(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Gre(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Kre(r,t))}return jre(aF(e))}function Hre(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function lF(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[o].push(i));return n}function Gre(t,e){let r=1+e(),n=e(),s=Hre(e),i=lF(s.length,1+t,e);return aF(i.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(s[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(h=>h+d)]})}))}function Kre(t,e){let r=1+e();return lF(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Qre(t){let e=Og(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let c=Og(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let s=t(),i=s%3;s=s/3|0;let o=!!(s&1);s>>=1;let a=s==1,l=s==2;return{branches:n,valid:i,fe0f:o,save:a,check:l}}}function Yre(){return Ure(e$("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 L2=Yre(),Jre=new Set(Og(L2)),Xre=new Set(Og(L2)),Zre=Wre(L2),ene=Qre(L2),jT=45,FT=95;function cF(t){return Ig(t)}function tne(t){return t.filter(e=>e!=65039)}function fF(t){for(let e of t.split(".")){let r=cF(e);try{for(let n=r.lastIndexOf(FT)-1;n>=0;n--)if(r[n]!==FT)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===jT&&r[3]===jT)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function rne(t){return fF(nne(t,tne))}function nne(t,e){let r=cF(t).reverse(),n=[];for(;r.length;){let s=ine(r);if(s){n.push(...e(s));continue}let i=r.pop();if(Jre.has(i)){n.push(i);continue}if(Xre.has(i))continue;let o=Zre[i];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return fF(sne(String.fromCodePoint(...n)))}function sne(t){return t.normalize("NFC")}function ine(t,e){var r;let n=ene,s,i,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=l;else if(n.check&&l===i)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(s=o.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return s}const one=new ee(oF),uF=new Uint8Array(32);uF.fill(0);function BT(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function r$(t){const e=xt(rne(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(BT(e.slice(n))),r}function ane(t){try{return r$(t).length!==0}catch{}return!1}function J1(t){typeof t!="string"&&one.throwArgumentError("invalid ENS name; not a string","name",t);let e=uF;const r=r$(t);for(;r.length;)e=Ue(Ht([e,Ue(r.pop())]));return te(e)}function dF(t){return te(Ht(r$(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 lne=`Ethereum Signed Message: -`;function n$(t){return typeof t=="string"&&(t=xt(t)),Ue(Ht([xt(lne),xt(String(t.length)),t]))}var cne=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ir=new ee(oF),hF=new Uint8Array(32);hF.fill(0);const fne=Z.from(-1),vF=Z.from(0),yF=Z.from(1),une=Z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function dne(t){const e=ne(t),r=e.length%32;return r?Ln([e,hF.slice(r)]):te(e)}const hne=ht(yF.toHexString(),32),vne=ht(vF.toHexString(),32),UT={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},FC=["name","version","chainId","verifyingContract","salt"];function zT(t){return function(e){return typeof e!="string"&&ir.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const yne={name:zT("name"),version:zT("version"),chainId:function(t){try{return Z.from(t).toString()}catch{}return ir.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ye(t).toLowerCase()}catch{}return ir.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 ir.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function BC(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))&&ir.throwArgumentError("invalid numeric width","type",t);const s=une.mask(r?n-1:n),i=r?s.add(yF).mul(fne):vF;return function(o){const a=Z.from(o);return(a.lt(i)||a.gt(s))&&ir.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),ht(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))&&ir.throwArgumentError("invalid bytes width","type",t),function(n){return ne(n).length!==r&&ir.throwArgumentError(`invalid length for ${t}`,"value",n),dne(n)}}}switch(t){case"address":return function(e){return ht(Ye(e),32)};case"bool":return function(e){return e?hne:vne};case"bytes":return function(e){return Ue(e)};case"string":return function(e){return dl(e)}}return null}function VT(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Yr{constructor(e){oe(this,"types",Object.freeze(As(e))),oe(this,"_encoderCache",{}),oe(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],s[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&ir.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!BC(f)&&(n[f]||ir.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const i=Object.keys(n).filter(a=>n[a].length===0);i.length===0?ir.throwArgumentError("missing primary type","types",e):i.length>1&&ir.throwArgumentError(`ambiguous primary types or unused types: ${i.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),oe(this,"primaryType",i[0]);function o(a,l){l[a]&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{s[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in s){const l=Object.keys(s[a]);l.sort(),this._types[a]=VT(a,e[a])+l.map(c=>VT(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=BC(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(i);return this._types[s]&&(l=l.map(Ue)),Ue(Ln(l))}}const n=this.types[e];if(n){const s=dl(this._types[e]);return i=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(i[a]);return this._types[l]?Ue(c):c});return o.unshift(s),Ln(o)}}return ir.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||ir.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ue(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(BC(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const o=s[1],a=parseInt(s[3]);return a>=0&&r.length!==a&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const i=this.types[e];return i?i.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):ir.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Yr(e)}static getPrimaryType(e){return Yr.from(e).primaryType}static hashStruct(e,r,n){return Yr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=UT[n];s||ir.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>FC.indexOf(n.name)-FC.indexOf(s.name)),Yr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return Ln(["0x1901",Yr.hashDomain(e),Yr.from(r).hash(n)])}static hash(e,r,n){return Ue(Yr.encode(e,r,n))}static resolveNames(e,r,n,s){return cne(this,void 0,void 0,function*(){e=Gt(e);const i={};e.verifyingContract&&!ze(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Yr.from(r);o.visit(n,(a,l)=>(a==="address"&&!ze(l,20)&&(i[l]="0x"),l));for(const a in i)i[a]=yield s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&i[l]?i[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Yr.hashDomain(e);const s={},i=[];FC.forEach(l=>{const c=e[l];c!=null&&(s[l]=yne[l](c),i.push({name:l,type:UT[l]}))});const o=Yr.from(r),a=Gt(r);return a.EIP712Domain?ir.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return te(ne(c));if(l.match(/^u?int/))return Z.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&ir.throwArgumentError("invalid string","value",c),c}return ir.throwArgumentError("unsupported type","type",l)})}}}const nr=new ee(a0);class mF extends o0{}class pF extends o0{}class mne extends o0{}class Mg extends o0{static isIndexed(e){return!!(e&&e._isIndexed)}}const pne={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function qT(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class en{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,oe(this,"fragments",r.map(n=>mo.from(n)).filter(n=>n!=null)),oe(this,"_abiCoder",Pi(new.target,"getAbiCoder")()),oe(this,"functions",{}),oe(this,"errors",{}),oe(this,"events",{}),oe(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){nr.warn("duplicate definition - constructor");return}oe(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){nr.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||oe(this,"deploy",Ai.from({payable:!1,type:"constructor"})),oe(this,"_isInterface",!0)}format(e){e||(e=it.full),e===it.sighash&&nr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===it.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Hn}static getAddress(e){return Ye(e)}static getSighash(e){return kr(dl(e.format()),0,4)}static getEventTopic(e){return dl(e.format())}getFunction(e){if(ze(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];nr.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching function","name",n):s.length>1&&nr.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[_i.fromString(e).format()];return r||nr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(ze(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];nr.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching event","name",n):s.length>1&&nr.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[uo.fromString(e).format()];return r||nr.throwArgumentError("no matching event","signature",e),r}getError(e){if(ze(e)){const n=Pi(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}nr.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching error","name",n):s.length>1&&nr.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[_i.fromString(e).format()];return r||nr.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 Pi(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Pi(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)&&nr.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(Ht([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)&&nr.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(Ht([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ne(r),s=null,i="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=te(n.slice(0,4)),f=pne[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(s=o[0]),a==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return nr.throwError("call revert exception"+i,ee.errors.CALL_EXCEPTION,{method:e.format(),data:te(r),errorArgs:o,errorName:a,errorSignature:l,reason:s})}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&&nr.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 s=(i,o)=>i.type==="string"?dl(o):i.type==="bytes"?Ue(te(o)):(i.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),i.type.match(/^u?int/)&&(o=Z.from(o).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[o]),ht(te(o),32));for(r.forEach((i,o)=>{let a=e.inputs[o];if(!a.indexed){i!=null&&nr.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?nr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(l=>s(a,l))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&nr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(dl(l));else if(o.type==="bytes")n.push(Ue(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else s.push(o),i.push(l)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!ze(n[0],32)||n[0].toLowerCase()!==d)&&nr.throwError("fragment/topic mismatch",ee.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let s=[],i=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(qr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(i.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(s,Ht(n)):null,l=this._abiCoder.decode(i,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)c[h]=new Mg({_isIndexed:!0,hash:null});else if(o[h])c[h]=new Mg({_isIndexed:!0,hash:a[u++]});else try{c[h]=a[u++]}catch(v){c[h]=v}else try{c[h]=l[f++]}catch(v){c[h]=v}if(d.name&&c[d.name]==null){const v=c[h];v instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw qT(`property ${JSON.stringify(d.name)}`,v)}}):c[d.name]=v}});for(let d=0;d{throw qT(`index ${d}`,h)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new pF({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Z.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new mF({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 mne({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 gne="abstract-provider/5.7.0";var bne=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const wne=new ee(gne);class xne extends o0{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class sc{constructor(){wne.checkAbstract(new.target,sc),oe(this,"_isProvider",!0)}getFeeData(){return bne(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield mt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=Z.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,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 Cne="abstract-signer/5.7.0";var vi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Us=new ee(Cne),Ene=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Sne=[ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED];let bf=class gF{constructor(){Us.checkAbstract(new.target,gF),oe(this,"_isSigner",!0)}getBalance(e){return vi(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return vi(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return vi(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield mt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return vi(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield mt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return vi(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 vi(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return vi(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return vi(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return vi(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)Ene.indexOf(n)===-1&&Us.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Gt(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()&&Us.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return vi(this,void 0,void 0,function*(){const r=yield mt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>vi(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&Us.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?Us.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&Us.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 s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&Us.throwError("network does not support EIP-1559",ee.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):Us.throwError("failed to get consistent fee data",ee.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(Sne.indexOf(s.code)>=0)throw s;return Us.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&Us.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield mt(r)})}_checkProvider(e){this.provider||Us.throwError("missing provider",ee.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class s$ extends bf{constructor(e,r){super(),oe(this,"address",e),oe(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{Us.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 s$(this.address,e)}}var Nn={},et={},l0=bF;function bF(t,e){if(!t)throw new Error(e||"Assertion failed")}bF.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var N6={},WT={get exports(){return N6},set exports(t){N6=t}};typeof Object.create=="function"?WT.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:WT.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 kne=l0,$ne=N6;et.inherits=$ne;function Ane(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function _ne(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),s=0;s>6|192,r[n++]=i&63|128):Ane(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}et.htonl=wF;function Tne(t,e){for(var r="",n=0;n>>0}return i}et.join32=Rne;function Ine(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}et.split32=Ine;function One(t,e){return t>>>e|t<<32-e}et.rotr32=One;function Mne(t,e){return t<>>32-e}et.rotl32=Mne;function Dne(t,e){return t+e>>>0}et.sum32=Dne;function Nne(t,e,r){return t+e+r>>>0}et.sum32_3=Nne;function Lne(t,e,r,n){return t+e+r+n>>>0}et.sum32_4=Lne;function jne(t,e,r,n,s){return t+e+r+n+s>>>0}et.sum32_5=jne;function Fne(t,e,r,n){var s=t[e],i=t[e+1],o=n+i>>>0,a=(o>>0,t[e+1]=o}et.sum64=Fne;function Bne(t,e,r,n){var s=e+n>>>0,i=(s>>0}et.sum64_hi=Bne;function Une(t,e,r,n){var s=e+n;return s>>>0}et.sum64_lo=Une;function zne(t,e,r,n,s,i,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}et.sum64_4_hi=zne;function Vne(t,e,r,n,s,i,o,a){var l=e+n+i+a;return l>>>0}et.sum64_4_lo=Vne;function qne(t,e,r,n,s,i,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}et.sum64_5_hi=qne;function Wne(t,e,r,n,s,i,o,a,l,c){var f=e+n+i+a+c;return f>>>0}et.sum64_5_lo=Wne;function Hne(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}et.rotr64_hi=Hne;function Gne(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.rotr64_lo=Gne;function Kne(t,e,r){return t>>>r}et.shr64_hi=Kne;function Qne(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.shr64_lo=Qne;var vh={},HT=et,Yne=l0;function j2(){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}vh.BlockHash=j2;j2.prototype.update=function(e,r){if(e=HT.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=HT.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,o=8;o>>3}Lo.g0_256=tse;function rse(t){return Co(t,17)^Co(t,19)^t>>>10}Lo.g1_256=rse;var Rd=et,nse=vh,sse=Lo,UC=Rd.rotl32,a1=Rd.sum32,ise=Rd.sum32_5,ose=sse.ft_1,$F=nse.BlockHash,ase=[1518500249,1859775393,2400959708,3395469782];function To(){if(!(this instanceof To))return new To;$F.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Rd.inherits(To,$F);var lse=To;To.blockSize=512;To.outSize=160;To.hmacStrength=80;To.padLength=64;To.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),Qse(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function s(o){return o.length===1?"0"+o:o}r.zero2=s;function i(o){for(var a="",l=0;l(d>>1)-1?y=(d>>1)-b:y=b,h.isubn(y)):y=0,u[v]=y,h.iushrn(1)}return u}r.getNAF=n;function s(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,h;l.cmpn(-u)>0||c.cmpn(-d)>0;){var v=l.andln(3)+u&3,y=c.andln(3)+d&3;v===3&&(v=-1),y===3&&(y=-1);var b;v&1?(h=l.andln(7)+u&7,(h===3||h===5)&&y===2?b=-v:b=v):b=0,f[0].push(b);var p;y&1?(h=c.andln(7)+d&7,(h===3||h===5)&&v===2?p=-y:p=y):p=0,f[1].push(p),2*u===b+1&&(u=1-u),2*d===p+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=s;function i(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=i;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Te(l,"hex","le")}r.intFromLE=a}),Dg=Ds.getNAF,Xse=Ds.getJSF,Ng=Ds.assert;function ic(t,e){this.type=t,this.p=new Te(e.p,16),this.red=e.prime?Te.red(e.prime):Te.mont(this.p),this.zero=new Te(0).toRed(this.red),this.one=new Te(1).toRed(this.red),this.two=new Te(2).toRed(this.red),this.n=e.n&&new Te(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 jf=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){Ng(e.precomputed);var n=e._getDoubles(),s=Dg(r,1,this._bitLength),i=(1<=a;c--)l=(l<<1)+s[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];Ng(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(i[f-1>>1]):a=a.mixedAdd(i[-f-1>>1].neg()):f>0?a=a.add(i[f-1>>1]):a=a.add(i[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};ic.prototype._wnafMulAdd=function(e,r,n,s,i){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var v=f-1,y=f;if(o[v]!==1||o[y]!==1){l[v]=Dg(n[v],o[v],this._bitLength),l[y]=Dg(n[y],o[y],this._bitLength),c=Math.max(l[v].length,c),c=Math.max(l[y].length,c);continue}var b=[r[v],null,null,r[y]];r[v].y.cmp(r[y].y)===0?(b[1]=r[v].add(r[y]),b[2]=r[v].toJ().mixedAdd(r[y].neg())):r[v].y.cmp(r[y].y.redNeg())===0?(b[1]=r[v].toJ().mixedAdd(r[y]),b[2]=r[v].add(r[y].neg())):(b[1]=r[v].toJ().mixedAdd(r[y]),b[2]=r[v].toJ().mixedAdd(r[y].neg()));var p=[-3,-1,-5,-7,0,7,5,1,3],g=Xse(n[v],n[y]);for(c=Math.max(g[0].length,c),l[v]=new Array(c),l[y]=new Array(c),u=0;u=0;f--){for(var C=0;f>=0;){var T=!0;for(u=0;u=0&&C++,k=k.dblp(C),f<0)break;for(u=0;u0?d=a[u][j-1>>1]:j<0&&(d=a[u][-j-1>>1].neg()),d.type==="affine"?k=k.mixedAdd(d):k=k.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};li.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(h=c,v=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),v=v.neg()),[{a:u,b:d},{a:h,b:v}]};ci.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),l=o.mul(s.a),c=i.mul(n.b),f=o.mul(s.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};ci.prototype.pointFromX=function(e,r){e=new Te(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};ci.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};ci.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""};rn.prototype.isInfinity=function(){return this.inf};rn.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),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};rn.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(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};rn.prototype.getX=function(){return this.x.fromRed()};rn.prototype.getY=function(){return this.y.fromRed()};rn.prototype.mul=function(e){return e=new Te(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)};rn.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};rn.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};rn.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)};rn.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,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};rn.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 dn(t,e,r,n){jf.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Te(0)):(this.x=new Te(e,16),this.y=new Te(r,16),this.z=new Te(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}o$(dn,jf.BasePoint);ci.prototype.jpoint=function(e,r,n){return new dn(this,e,r,n)};dn.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),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};dn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};dn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=s.redSub(i),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=s.redMul(f),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),v=c.redMul(d.redISub(h)).redISub(o.redMul(u)),y=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(h,v,y)};dn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(s),l=i.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),h=l.redMul(u.redISub(d)).redISub(i.redMul(f)),v=this.z.redMul(a);return this.curve.jpoint(d,h,v)};dn.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(i),this.x.cmp(n)===0)return!0}};dn.prototype.inspect=function(){return this.isInfinity()?"":""};dn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ep=ph(function(t,e){var r=e;r.base=jf,r.short=eie,r.mont=null,r.edwards=null}),Sp=ph(function(t,e){var r=e,n=Ds.assert;function s(a){a.type==="short"?this.curve=new Ep.short(a):a.type==="edwards"?this.curve=new Ep.edwards(a):this.curve=new Ep.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=s;function i(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new s(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}i("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:Nn.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:Nn.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:Nn.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:Nn.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"]}),i("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:Nn.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Nn.sha256,gRed:!1,g:["9"]}),i("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:Nn.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}i("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:Nn.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Ll(t){if(!(this instanceof Ll))return new Ll(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=Ti.toArray(t.entropy,t.entropyEnc||"hex"),r=Ti.toArray(t.nonce,t.nonceEnc||"hex"),n=Ti.toArray(t.pers,t.persEnc||"hex");i$(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var jF=Ll;Ll.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ll.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=Ti.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var tie=Ds.assert;function F2(t,e){if(t instanceof F2)return t;this._importDER(t,e)||(tie(t.r&&t.s,"Signature without r or s"),this.r=new Te(t.r,16),this.s=new Te(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var B2=F2;function rie(){this.place=0}function qC(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 s=0,i=0,o=e.place;i>>=0;return s<=127?!1:(e.place=o,s)}function YT(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)}F2.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=YT(r),n=YT(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];WC(s,r.length),s=s.concat(r),s.push(2),WC(s,n.length);var i=s.concat(n),o=[48];return WC(o,i.length),o=o.concat(i),Ds.encode(o,e)};var nie=function(){throw new Error("unsupported")},FF=Ds.assert;function ti(t){if(!(this instanceof ti))return new ti(t);typeof t=="string"&&(FF(Object.prototype.hasOwnProperty.call(Sp,t),"Unknown curve "+t),t=Sp[t]),t instanceof Sp.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 sie=ti;ti.prototype.keyPair=function(e){return new a$(this,e)};ti.prototype.keyFromPrivate=function(e,r){return a$.fromPrivate(this,e,r)};ti.prototype.keyFromPublic=function(e,r){return a$.fromPublic(this,e,r)};ti.prototype.genKeyPair=function(e){e||(e={});for(var r=new jF({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||nie(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new Te(2));;){var i=new Te(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};ti.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};ti.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Te(e,16));for(var i=this.n.byteLength(),o=r.getPrivate().toArray("be",i),a=e.toArray("be",i),l=new jF({hash:this.hash,entropy:o,nonce:a,pers:s.pers,persEnc:s.persEnc||"utf8"}),c=this.n.sub(new Te(1)),f=0;;f++){var u=s.k?s.k(f):new Te(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),v=h.umod(this.n);if(v.cmpn(0)!==0){var y=u.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var b=(d.getY().isOdd()?1:0)|(h.cmp(v)!==0?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new B2({r:v,s:y,recoveryParam:b})}}}}}};ti.prototype.verify=function(e,r,n,s){e=this._truncateToN(new Te(e,16)),n=this.keyFromPublic(n,s),r=new B2(r,"hex");var i=r.r,o=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(i).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(i)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(i)===0)};ti.prototype.recoverPubKey=function(t,e,r,n){FF((3&r)===r,"The recovery param is more than two bits"),e=new B2(e,n);var s=this.n,i=new Te(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(s),u=s.sub(i).mul(f).umod(s),d=a.mul(f).umod(s);return this.g.mulAdd(u,o,d)};ti.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new B2(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var iie=ph(function(t,e){var r=e;r.version="6.5.4",r.utils=Ds,r.rand=function(){throw new Error("unsupported")},r.curve=Ep,r.curves=Sp,r.ec=sie,r.eddsa=null}),oie=iie.ec;const aie="signing-key/5.7.0",B6=new ee(aie);let HC=null;function oo(){return HC||(HC=new oie("secp256k1")),HC}class Lg{constructor(e){oe(this,"curve","secp256k1"),oe(this,"privateKey",te(e)),Po(this.privateKey)!==32&&B6.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=oo().keyFromPrivate(ne(this.privateKey));oe(this,"publicKey","0x"+r.getPublic(!1,"hex")),oe(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),oe(this,"_isSigningKey",!0)}_addPoint(e){const r=oo().keyFromPublic(ne(this.publicKey)),n=oo().keyFromPublic(ne(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=oo().keyFromPrivate(ne(this.privateKey)),n=ne(e);n.length!==32&&B6.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return Lf({recoveryParam:s.recoveryParam,r:ht("0x"+s.r.toString(16),32),s:ht("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=oo().keyFromPrivate(ne(this.privateKey)),n=oo().keyFromPublic(ne(l$(e)));return ht("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function BF(t,e){const r=Lf(e),n={r:ne(r.r),s:ne(r.s)};return"0x"+oo().recoverPubKey(ne(t),n,r.recoveryParam).encode("hex",!1)}function l$(t,e){const r=ne(t);if(r.length===32){const n=new Lg(r);return e?"0x"+oo().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?te(r):"0x"+oo().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+oo().keyFromPublic(r).getPublic(!0,"hex"):te(r)}return B6.throwArgumentError("invalid public or private key","key","[REDACTED]")}const lie="transactions/5.7.0",xn=new ee(lie);var U6;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(U6||(U6={}));function c$(t){return t==="0x"?null:Ye(t)}function wn(t){return t==="0x"?rr:Z.from(t)}const cie=[{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"}],fie={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function f$(t){const e=l$(t);return Ye(kr(Ue(kr(e,1)),12))}function xf(t,e){return f$(BF(ne(t),e))}function gs(t,e){const r=xo(Z.from(t).toHexString());return r.length>32&&xn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function GC(t,e){return{address:Ye(t),storageKeys:(e||[]).map((r,n)=>(Po(r)!==32&&xn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Ff(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&xn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),GC(r[0],r[1])):GC(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return GC(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function UF(t){return Ff(t).map(e=>[e.address,e.storageKeys])}function zF(t,e){if(t.gasPrice!=null){const n=Z.from(t.gasPrice),s=Z.from(t.maxFeePerGas||0);n.eq(s)||xn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[gs(t.chainId||0,"chainId"),gs(t.nonce||0,"nonce"),gs(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),gs(t.maxFeePerGas||0,"maxFeePerGas"),gs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",gs(t.value||0,"value"),t.data||"0x",UF(t.accessList||[])];if(e){const n=Lf(e);r.push(gs(n.recoveryParam,"recoveryParam")),r.push(xo(n.r)),r.push(xo(n.s))}return Ln(["0x02",gf(r)])}function VF(t,e){const r=[gs(t.chainId||0,"chainId"),gs(t.nonce||0,"nonce"),gs(t.gasPrice||0,"gasPrice"),gs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",gs(t.value||0,"value"),t.data||"0x",UF(t.accessList||[])];if(e){const n=Lf(e);r.push(gs(n.recoveryParam,"recoveryParam")),r.push(xo(n.r)),r.push(xo(n.s))}return Ln(["0x01",gf(r)])}function uie(t,e){H8(t,fie);const r=[];cie.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=ne(te(a,l)),o.length&&a.length!==o.length&&a.length>0&&xn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=xo(a),a.length>o.maxLength&&xn.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"&&xn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!ha(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 gf(r);const s=Lf(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&xn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&xn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(te(i)),r.push(xo(ne(s.r))),r.push(xo(ne(s.s))),gf(r)}function die(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&xn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),uie(t,e);switch(t.type){case 1:return VF(t,e);case 2:return zF(t,e)}return xn.throwError(`unsupported transaction type: ${t.type}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function qF(t,e,r){try{const n=wn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{xn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ht(e[1],32),t.s=ht(e[2],32);try{const n=Ue(r(t));t.from=xf(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function hie(t){const e=N2(t.slice(1));e.length!==9&&e.length!==12&&xn.throwArgumentError("invalid component count for transaction type: 2","payload",te(t));const r=wn(e[2]),n=wn(e[3]),s={type:2,chainId:wn(e[0]).toNumber(),nonce:wn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:wn(e[4]),to:c$(e[5]),value:wn(e[6]),data:e[7],accessList:Ff(e[8])};return e.length===9||(s.hash=Ue(t),qF(s,e.slice(9),zF)),s}function vie(t){const e=N2(t.slice(1));e.length!==8&&e.length!==11&&xn.throwArgumentError("invalid component count for transaction type: 1","payload",te(t));const r={type:1,chainId:wn(e[0]).toNumber(),nonce:wn(e[1]).toNumber(),gasPrice:wn(e[2]),gasLimit:wn(e[3]),to:c$(e[4]),value:wn(e[5]),data:e[6],accessList:Ff(e[7])};return e.length===8||(r.hash=Ue(t),qF(r,e.slice(8),VF)),r}function yie(t){const e=N2(t);e.length!==9&&e.length!==6&&xn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:wn(e[0]).toNumber(),gasPrice:wn(e[1]),gasLimit:wn(e[2]),to:c$(e[3]),value:wn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Z.from(e[6]).toNumber()}catch{return r}if(r.r=ht(e[7],32),r.s=ht(e[8],32),Z.from(r.r).isZero()&&Z.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 s=e.slice(0,6);r.chainId!==0&&(s.push(te(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Ue(gf(s));try{r.from=xf(i,{r:te(r.r),s:te(r.s),recoveryParam:n})}catch{}r.hash=Ue(t)}return r.type=null,r}function WF(t){const e=ne(t);if(e[0]>127)return yie(e);switch(e[0]){case 1:return vie(e);case 2:return hie(e)}return xn.throwError(`unsupported transaction type: ${e[0]}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const mie="contracts/5.7.0";var Cf=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Sr=new ee(mie);function jg(t,e){return Cf(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Sr.throwArgumentError("invalid address or ENS name","name",r);try{return Ye(r)}catch{}t||Sr.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&&Sr.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function kp(t,e,r){return Cf(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>kp(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield jg(t,e):r.type==="tuple"?yield kp(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>kp(t,n,r.arrayChildren))):Promise.reject(Sr.makeError("invalid value for array",ee.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function U2(t,e,r){return Cf(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Gt(r.pop())),Sr.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=mt({override:jg(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Cf(this,void 0,void 0,function*(){return Ye(c.signer)!==c.override&&Sr.throwError("Contract with a Signer cannot override from",ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=jg(t.provider,n.from));const s=yield mt({args:kp(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:mt(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),o={data:i,to:s.address},a=s.overrides;if(a.nonce!=null&&(o.nonce=Z.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=Z.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=Z.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=Z.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=Z.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Ff(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=ne(i);for(let u=0;un[c]!=null);return l.length&&Sr.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function pie(t,e){return function(...r){return U2(t,e,r)}}function gie(t,e){const r=t.signer||t.provider;return function(...n){return Cf(this,void 0,void 0,function*(){r||Sr.throwError("estimate require a provider or signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield U2(t,e,n);return yield r.estimateGas(s)})}}function bie(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let o=As(i),a=null;try{a=t.interface.parseLog(i)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(s.blockHash),o.getTransaction=()=>t.provider.getTransaction(s.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(s),o}),s))}function HF(t,e,r){const n=t.signer||t.provider;return function(...s){return Cf(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const l=Gt(s.pop());l.blockTag!=null&&(i=yield l.blockTag),delete l.blockTag,s.push(l)}t.deployTransaction!=null&&(yield t._deployed(i));const o=yield U2(t,e,s),a=yield n.call(o,i);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===ee.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=s,l.transaction=o),l}})}}function wie(t,e){return function(...r){return Cf(this,void 0,void 0,function*(){t.signer||Sr.throwError("sending a transaction requires a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield U2(t,e,r),s=yield t.signer.sendTransaction(n);return bie(t,s),s})}}function JT(t,e,r){return e.constant?HF(t,e,r):wie(t,e)}function GF(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 Zv{constructor(e,r){oe(this,"tag",e),oe(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 s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class xie extends Zv{constructor(){super("error",null)}}class XT extends Zv{constructor(e,r,n,s){const i={address:e};let o=r.getEventTopic(n);s?(o!==s[0]&&Sr.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[o],super(GF(i),i),oe(this,"address",e),oe(this,"interface",r),oe(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=Hj(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class ZT extends Zv{constructor(e,r){super("*",{address:e}),oe(this,"address",e),oe(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,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class Cie{constructor(e,r,n){oe(this,"interface",Pi(new.target,"getInterface")(r)),n==null?(oe(this,"provider",null),oe(this,"signer",null)):bf.isSigner(n)?(oe(this,"provider",n.provider||null),oe(this,"signer",n)):sc.isProvider(n)?(oe(this,"provider",n),oe(this,"signer",null)):Sr.throwArgumentError("invalid signer or provider","signerOrProvider",n),oe(this,"callStatic",{}),oe(this,"estimateGas",{}),oe(this,"functions",{}),oe(this,"populateTransaction",{}),oe(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];oe(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?oe(this.filters,a,this.filters[l[0]]):Sr.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(oe(this,"_runningEvents",{}),oe(this,"_wrappedEmits",{}),e==null&&Sr.throwArgumentError("invalid contract address or ENS name","addressOrName",e),oe(this,"address",e),this.provider)oe(this,"resolvedAddress",jg(this.provider,e));else try{oe(this,"resolvedAddress",Promise.resolve(Ye(e)))}catch{Sr.throwError("provider is required to use ENS name as contract address",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const s={},i={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(i[o]){Sr.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}i[o]=!0;{const l=a.name;s[`%${l}`]||(s[`%${l}`]=[]),s[`%${l}`].push(o)}this[o]==null&&oe(this,o,JT(this,a,!0)),this.functions[o]==null&&oe(this.functions,o,JT(this,a,!1)),this.callStatic[o]==null&&oe(this.callStatic,o,HF(this,a,!0)),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,pie(this,a)),this.estimateGas[o]==null&&oe(this.estimateGas,o,gie(this,a))}),Object.keys(s).forEach(o=>{const a=s[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&oe(this,o,this[l])}catch{}this.functions[o]==null&&oe(this.functions,o,this.functions[l]),this.callStatic[o]==null&&oe(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&oe(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return Q8(e)}static getInterface(e){return en.isInterface(e)?e:new en(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"&&Sr.throwError("contract not deployed",ee.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Sr.throwError("sending a transactions require a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Gt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Sr.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 s$(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&oe(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return Mg.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 xie);if(e==="event")return this._normalizeRunningEvent(new Zv("event",null));if(e==="*")return this._normalizeRunningEvent(new ZT(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new XT(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 s=this.interface.getEvent(n);return this._normalizeRunningEvent(new XT(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new Zv(GF(r),r))}return this._normalizeRunningEvent(new ZT(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 s=As(r);return s.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||Sr.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 s=i=>{let o=this._wrapEvent(e,i,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]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=Gt(s.filter);return typeof r=="string"&&ze(r,32)?(n!=null&&Sr.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(o=>o.map(a=>this._wrapEvent(s,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),s=n.run(r)>0;return this._checkRunningEvents(n),s}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(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}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 gh extends Cie{}class KF{constructor(e){oe(this,"alphabet",e),oe(this,"base",e.length),oe(this,"_alphabetMap",{}),oe(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}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(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=ne(ey(s,t,l));i||(i=d.length,f=new Uint8Array(i),o=Math.ceil(n/i),c=n-(o-1)*i),f.set(d);for(let y=1;y=256)throw new Error("Depth too large!");return r7(Ht([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",te(this.depth),this.parentFingerprint,ht(te(this.index),4),this.chainCode,this.privateKey!=null?Ht(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new qo(iu,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&~Cu));const n=new Uint8Array(37);if(e&Cu){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 u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const s=ne(ey(Dd.sha512,this.chainCode,n)),i=s.slice(0,32),o=s.slice(32);let a=null,l=null;this.privateKey?a=vm(Z.from(i).add(this.privateKey).mod(Iie)):l=new Lg(te(i))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new qo(iu,a,l,this.fingerprint,vm(o),e,this.depth+1,c)}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 s=0;s=Cu)throw new Error("invalid path index - "+i);n=n._derive(Cu+o)}else if(i.match(/^[0-9]+$/)){const o=parseInt(i);if(o>=Cu)throw new Error("invalid path index - "+i);n=n._derive(o)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=ne(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=ne(ey(Dd.sha512,Oie,n));return new qo(iu,vm(s.slice(0,32)),null,"0x00000000",vm(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=u$(n),e=ZF(d$(e,n),n),qo._fromSeed(XF(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return qo._fromSeed(e,null)}static fromExtendedKey(e){const r=Md.decode(e);(r.length!==82||r7(r.slice(0,78))!==e)&&ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=te(r.slice(5,9)),i=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 qo(iu,null,te(a),s,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new qo(iu,te(a.slice(1)),null,s,o,i,n,null)}return ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function XF(t,e){e||(e="");const r=xt("mnemonic"+e,va.NFKD);return $ie(xt(t,va.NFKD),r,2048,64,"sha512")}function d$(t,e){e=u$(e),ty.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 s=0;for(let c=0;c>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=JF(o);if((ne(pa(n.slice(0,i/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return te(n.slice(0,i/8))}function ZF(t,e){if(e=u$(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]&Mie(8-n)),n+=3);const s=t.length/4,i=ne(pa(t))[0]&JF(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}function Nie(t,e){try{return d$(t,e),!0}catch{}return!1}function Lie(t){return(typeof t!="number"||t<0||t>=Cu||t%1)&&ty.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const jie="random/5.7.0",z6=new ee(jie);function Fie(){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 n7=Fie();let $p=n7.crypto||n7.msCrypto;(!$p||!$p.getRandomValues)&&(z6.warn("WARNING: Missing strong random number source"),$p={getRandomValues:function(t){return z6.throwError("no secure random source avaialble",ee.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function z2(t){(t<=0||t>1024||t%1||t!=t)&&z6.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return $p.getRandomValues(e),ne(e)}function eB(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 Bie(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function Uie(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 zie(t){if(Bie(t))try{return Ye(JSON.parse(t).ethaddr)}catch{return null}if(Uie(t))try{return Ye(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function tB(t,e){return xf(n$(t),e)}function Vie(t,e,r,n){return xf(Yr.hash(t,e,r),n)}const qie="networks/5.7.1",s7=new ee(qie);function Wie(t){return t&&typeof t.renetwork=="function"}function Qo(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return Qo(r)},e}function Fg(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return Fg(t,n)},r}const i7={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Qo("homestead")},o7={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Qo("ropsten")},a7={chainId:63,name:"classicMordor",_defaultProvider:Fg("https://www.ethercluster.com/mordor","classicMordor")},ym={unspecified:{chainId:0,name:"unspecified"},homestead:i7,mainnet:i7,morden:{chainId:2,name:"morden"},ropsten:o7,testnet:o7,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Qo("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Qo("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Qo("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Qo("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:Fg("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:a7,classicTestnet:a7,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Fg("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Qo("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Qo("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 Hie(t){if(t==null)return null;if(typeof t=="number"){for(const n in ym){const s=ym[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=ym[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=ym[t.name];if(!e)return typeof t.chainId!="number"&&s7.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&s7.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(Wie(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 Gie="web/5.7.1";var Kie=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function Qie(t,e){return Kie(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),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((o,a)=>{i[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{i[o.toLowerCase()]=n.headers.get(o)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ne(new Uint8Array(s))}})}var Yie=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const wi=new ee(Gie);function l7(t){return new Promise(e=>{setTimeout(e,t)})}function Wa(t,e){if(t==null)return null;if(typeof t=="string")return t;if(ha(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Ta(t)}catch{}return te(t)}return t}function Jie(t){return xt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function rB(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;wi.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;wi.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&wi.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const p in t.headers)a[p.toLowerCase()]={key:p,value:String(t.headers[p])},["if-none-match","if-modified-since"].indexOf(p.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&wi.throwError("basic authentication requires a secure https url",ee.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const p=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+t$(xt(p))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=Gt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(d):null;if(h)try{const p={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?e$(h[3]):Jie(h[3])};let g=p.body;return r&&(g=r(p.body,p)),Promise.resolve(g)}catch(p){wi.throwError("processing response error",ee.errors.SERVER_ERROR,{body:Wa(h[1],h[2]),error:p,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.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 v={};Object.keys(a).forEach(p=>{const g=a[p];v[g.key]=g.value}),c.headers=v;const y=function(){let p=null;return{promise:new Promise(function(E,k){u&&(p=setTimeout(()=>{p!=null&&(p=null,k(wi.makeError("timeout",ee.errors.TIMEOUT,{requestBody:Wa(c.body,v["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){p!=null&&(clearTimeout(p),p=null)}}}(),b=function(){return Yie(this,void 0,void 0,function*(){for(let p=0;p=300)&&(y.cancel(),wi.throwError("bad response",ee.errors.SERVER_ERROR,{status:g.statusCode,headers:g.headers,body:Wa(w,g.headers?g.headers["content-type"]:null),requestBody:Wa(c.body,v["content-type"]),requestMethod:c.method,url:l})),r)try{const E=yield r(w,g);return y.cancel(),E}catch(E){if(E.throttleRetry&&p{let a=null;if(i!=null)try{a=JSON.parse(Ta(i))}catch(l){wi.throwError("invalid JSON",ee.errors.SERVER_ERROR,{body:i,error:l})}return r&&(a=r(a,o)),a},s=null;if(e!=null){s=xt(e);const i=typeof t=="string"?{url:t}:Gt(t);i.headers?Object.keys(i.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(i.headers=Gt(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return rB(t,s,n)}function hl(t,e){return e||(e={}),e=Gt(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 s=null,i=!1;const o=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!i){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var Bg="qpzry9x8gf2tvdw0s3jn54khce6mua7l",V6={};for(var mm=0;mm>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 nB(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=ld(e)^n>>5}for(e=ld(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=nB(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5)throw new Error("Non 5-bit word");n=ld(n)^o,s+=Bg.charAt(o)}for(i=0;i<6;++i)n=ld(n);for(n^=1,i=0;i<6;++i){var a=n>>(5-i)*5&31;s+=Bg.charAt(a)}return s}function sB(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 s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),o=t.slice(s+1);if(o.length<6)return"Data too short";var a=nB(i);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:i,words:l}}function Zie(){var t=sB.apply(null,arguments);if(typeof t=="object")return t}function eoe(t){var e=sB.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function V2(t,e,r,n){for(var s=0,i=0,o=(1<=r;)i-=r,a.push(s>>i&o);if(n)i>0&&a.push(s<=e)return"Excess padding";if(s<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:ve.allowNull(this.accessList.bind(this),null),blockHash:ve.allowNull(o,null),blockNumber:ve.allowNull(l,null),transactionIndex:ve.allowNull(l,null),confirmations:ve.allowNull(l,null),from:r,gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),gasLimit:n,to:ve.allowNull(r,null),value:n,nonce:l,data:i,r:ve.allowNull(this.uint256),s:ve.allowNull(this.uint256),v:ve.allowNull(l),creates:ve.allowNull(r,null),raw:ve.allowNull(i)},e.transactionRequest={from:ve.allowNull(r),nonce:ve.allowNull(l),gasLimit:ve.allowNull(n),gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),to:ve.allowNull(r),value:ve.allowNull(n),data:ve.allowNull(f),type:ve.allowNull(l),accessList:ve.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ve.arrayOf(o),data:i,logIndex:l,blockHash:o},e.receipt={to:ve.allowNull(this.address,null),from:ve.allowNull(this.address,null),contractAddress:ve.allowNull(r,null),transactionIndex:l,root:ve.allowNull(a),gasUsed:n,logsBloom:ve.allowNull(i),blockHash:o,transactionHash:o,logs:ve.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ve.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ve.allowNull(n),status:ve.allowNull(l),type:c},e.block={hash:ve.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ve.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ve.allowNull(r),extraData:i,transactions:ve.allowNull(ve.arrayOf(o)),baseFeePerGas:ve.allowNull(n)},e.blockWithTransactions=Gt(e.block),e.blockWithTransactions.transactions=ve.allowNull(ve.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ve.allowNull(s,void 0),toBlock:ve.allowNull(s,void 0),blockHash:ve.allowNull(o,void 0),address:ve.allowNull(r,void 0),topics:ve.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ve.allowNull(l),blockHash:ve.allowNull(o),transactionIndex:l,removed:ve.allowNull(this.boolean.bind(this)),address:r,data:ve.allowFalsish(i,"0x"),topics:ve.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Ff(e||[])}number(e){return e==="0x"?0:Z.from(e).toNumber()}type(e){return e==="0x"||e==null?0:Z.from(e).toNumber()}bigNumber(e){return Z.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),ze(e))?e.toLowerCase():c1.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 Ye(e)}callAddress(e){if(!ze(e,32))return null;const r=Ye(kr(e,12));return r===Cr?null:r}contractAddress(e){return Q8(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"||ze(e))return Nl(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Po(n)!==32?c1.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=Z.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!ze(e))throw new Error("invalid uint256");return ht(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=ve.check(r,e);return s._difficulty=n==null?null:Z.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ve.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&Z.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=ve.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ze(n)&&(n=Z.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),ze(n)&&(n=Z.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 WF(e)}receiptLog(e){return ve.check(this.formats.receiptLog,e)}receipt(e){const r=ve.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=Z.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&c1.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):c1.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&c1.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 ve.check(this.formats.filter,e)}filterLog(e){return ve.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}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(s){n.push(e(s))}),n}}}function ioe(t){return t&&typeof t.isCommunityResource=="function"}function f7(t){return ioe(t)&&t.isCommunityResource()}var Pe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ge=new ee(bh),ooe=10;function u7(t){return t==null?"null":(Po(t)!==32&&Ge.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function d7(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(s=>{r[u7(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return u7(e)}).join("&")}function aoe(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 ou(t){if(typeof t=="string"){if(t=t.toLowerCase(),Po(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+d7(t);if(xne.isForkEvent(t))throw Ge.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+d7(t.topics||[])}throw new Error("invalid event - "+t)}function f1(){return new Date().getTime()}function h7(t){return new Promise(e=>{setTimeout(e,t)})}const loe=["block","network","pending","poll"];let coe=class{constructor(e,r,n){oe(this,"tag",e),oe(this,"listener",r),oe(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=aoe(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||loe.indexOf(this.tag)>=0}};const foe={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 QC(t){return ht(Z.from(t).toHexString(),32)}function v7(t){return Md.encode(Ht([t,kr(pa(pa(t)),0,4)]))}const iB=new RegExp("^(ipfs)://(.*)$","i"),y7=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),iB,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Ap(t,e){try{return Ta(ry(t,e))}catch{}return null}function ry(t,e){if(t==="0x")return null;const r=Z.from(kr(t,e,e+32)).toNumber(),n=Z.from(kr(t,r,r+32)).toNumber();return kr(t,r+32,r+32+n)}function YC(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ge.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function m7(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 uoe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function oB(t){const e=[];let r=0;for(let n=0;nZ.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 Pe(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:Ln([e,J1(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=Ln(["0x9061b923",oB([dF(this.name),n.data])]));try{let i=yield this.provider.call(n);return ne(i).length%32===4&&Ge.throwError("resolver threw error",ee.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=ry(i,0)),i}catch(i){if(i.code===ee.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return Pe(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?ry(n,0):null})}_getAddress(e,r){const n=foe[String(e)];if(n==null&&Ge.throwError(`unsupported coin type: ${e}`,ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=ne(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return v7(Ht([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return v7(Ht([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let o=s[0];if(o===0?i!==20&&i!==32&&(o=-1):o=-1,o>=0&&s.length===2+i&&i>=1&&i<=75){const a=c7.toWords(s.slice(2));return a.unshift(o),c7.encode(n.prefix,a)}}return null}getAddress(e){return Pe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const s=yield this._fetch("0x3b3b57de");return s==="0x"||s===Rg?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===ee.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",QC(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ge.throwError("invalid or unsupported coin data",ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Pe(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[l])}return Ge.throwError("invalid or unsupported content hash data",ee.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Pe(this,void 0,void 0,function*(){let r=xt(e);r=Ht([QC(64),QC(r.length),r]),r.length%32!==0&&(r=Ht([r,ht("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",te(r));return n==null||n==="0x"?null:Ta(n)})}}let JC=null,doe=1;class q2 extends sc{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),oe(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=Pi(new.target,"getNetwork")(e);r?(oe(this,"_network",r),this.emit("network",r,null)):Ge.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Pe(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||Ge.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:oe(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return hl(()=>this._ready().then(e=>e,e=>{if(!(e.code===ee.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return JC==null&&(JC=new ve),JC}static getNetwork(e){return Hie(e??"homestead")}ccipReadFetch(e,r,n){return Pe(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:i,sender:s}),u=yield f0({url:c,errorPassThrough:!0},f,(h,v)=>(h.status=v.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ge.throwError(`response not found during CCIP fetch: ${d}`,ee.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return Ge.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ee.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Pe(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const s=this._internalBlockNumber;try{const i=yield s;if(f1()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=f1(),n=mt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const o=f1();return s=Z.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Pe(this,void 0,void 0,function*(){const e=doe++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);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)Ge.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ge.makeError("network block skew detected",ee.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let o=this.getTransactionReceipt(i).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+i]=a.blockNumber,this.emit(i,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const o=i.toBlock-this._maxFilterBlockRange;o>i.fromBlock&&(i.fromBlock=o),i.fromBlock<0&&(i.fromBlock=0);const a=this.getLogs(i).then(l=>{s._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(i,c)})}).catch(l=>{this.emit("error",l),s._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Pe(this,void 0,void 0,function*(){return Ge.throwError("provider does not support network detection",ee.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Pe(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 h7(0),this._network;const n=Ge.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=f1();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 Pe(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,s){return Pe(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),s){let d=s.startBlock,h=null;const v=y=>Pe(this,void 0,void 0,function*(){c||(yield h7(1e3),this.getTransactionCount(s.from).then(b=>Pe(this,void 0,void 0,function*(){if(!c){if(b<=s.nonce)d=y;else{{const p=yield this.getTransaction(e);if(p&&p.blockNumber!=null)return}for(h==null&&(h=d-3,h{c||this.once("block",v)}))});if(c)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(Ge.makeError("timeout exceeded",ee.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Pe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Z.from(e)}catch(r){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return Z.from(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return Z.from(s).toNumber()}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return te(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Nl(o))}),i=yield this.perform("getStorageAt",s);try{return te(i)}catch(o){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Po(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&Ge.throwError("Transaction hash mismatch from Provider.sendTransaction.",ee.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,o)=>Pe(this,void 0,void 0,function*(){i==null&&(i=1),o==null&&(o=0);let a;i!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,i,o,a);return l==null&&i===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ge.throwError("transaction failed",ee.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),s}sendTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>te(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return Pe(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Z.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?te(i):null))}),this.formatter.transactionRequest(yield mt(n))})}_getFilter(e){return Pe(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 mt(r))})}_call(e,r,n){return Pe(this,void 0,void 0,function*(){n>=ooe&&Ge.throwError("CCIP read exceeded maximum redirections",ee.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Po(i)%32===4)try{const o=kr(i,4),a=kr(o,0,32);Z.from(a).eq(s)||Ge.throwError("CCIP Read sender did not match",ee.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const l=[],c=Z.from(kr(o,32,64)).toNumber(),f=Z.from(kr(o,c,c+32)).toNumber(),u=kr(o,c+32);for(let p=0;pPe(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return hl(()=>Pe(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 s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return this._wrapTransaction(s)}),{oncePoll:this})})}getTransactionReceipt(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return hl(()=>Pe(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 s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return s}),{oncePoll:this})})}getLogs(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield mt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),ve.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Pe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Pe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ge.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 Pe(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 s=new q6(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Pe(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ge.throwError("network does not support ENS",ee.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+J1(e).substring(2)});return this.formatter.callAddress(s)}catch{}return null})}resolveName(e){return Pe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ze(e))throw n}typeof e!="string"&&Ge.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Pe(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 s=Ap(yield this.call({to:n,data:"0x691f3431"+J1(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return Pe(this,void 0,void 0,function*(){let r=null;if(ze(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(i,"getAvatar");if(!o)return null;r=new q6(this,o,i);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=Ap(yield this.call({to:o,data:"0x691f3431"+J1(i).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 Ge.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 s=new coe(ou(e),r,n);return this._events.push(s),this._startEvent(s),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,s=[],i=ou(e);return this._events=this._events.filter(o=>o.tag!==i?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(s.push(o),!1):!0)),s.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=ou(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=ou(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 s=!1,i=ou(e);return this._events=this._events.filter(o=>o.tag!==i||o.listener!=r||s?!0:(s=!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=ou(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Wo=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Tr=new ee(bh),hoe=["call","estimateGas"];function Z1(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=ze(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=Z1(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return Z1(JSON.parse(t),e)}catch{}return null}function aB(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=Z1(e,!0);if(i)return i.data;Tr.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 i=Z1(e.body,!1);i==null&&(i=Z1(e,!1)),i&&Tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===ee.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Tr.throwError("insufficient funds for intrinsic transaction cost",ee.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&Tr.throwError("nonce has already been used",ee.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Tr.throwError("replacement fee too low",ee.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&Tr.throwError("legacy pre-eip-155 transactions not supported",ee.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),hoe.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Tr.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 p7(t){return new Promise(function(e){setTimeout(e,t)})}function voe(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 u1(t){return t&&t.toLowerCase()}const W6={};class lB extends bf{constructor(e,r,n){if(super(),e!==W6)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");oe(this,"provider",r),n==null&&(n=0),typeof n=="string"?(oe(this,"_address",this.provider.formatter.address(n)),oe(this,"_index",null)):typeof n=="number"?(oe(this,"_index",n),oe(this,"_address",null)):Tr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Tr.throwError("cannot alter JSON-RPC Signer connection",ee.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new yoe(W6,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&&Tr.throwError("unknown account #"+this._index,ee.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Gt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Wo(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&Tr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),mt({tx:mt(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&Tr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected transaction",ee.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),aB("sendTransaction",o,i)))})}signTransaction(e){return Tr.throwError("signing transactions is unsupported",ee.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Wo(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 hl(()=>Wo(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Wo(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[te(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Wo(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),te(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Wo(this,void 0,void 0,function*(){const s=yield Yr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Yr.getPayload(s.domain,r,s.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),o}})}unlock(e){return Wo(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class yoe extends lB{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 moe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let ga=class extends q2{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(o=>{s(o)},o=>{i(o)})},0)})),super(n),e||(e=Pi(this.constructor,"defaultUrl")()),typeof e=="string"?oe(this,"connection",Object.freeze({url:e})):oe(this,"connection",Object.freeze(Gt(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 Wo(this,void 0,void 0,function*(){yield p7(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=Pi(this.constructor,"getNetwork");try{return r(Z.from(e).toNumber())}catch(n){return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new lB(W6,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:As(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=f0(this.connection,JSON.stringify(n),voe).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 s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[u1(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[u1(r.address),r.blockTag]];case"getCode":return["eth_getCode",[u1(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[u1(r.address),ht(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",[Pi(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Pi(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=u1(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Wo(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&Z.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Gt(r),r.transaction=Gt(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Tr.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return aB(e,s,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 s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return i.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return p7(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Gt(moe);if(r)for(const i in r)r[i]&&(n[i]=!0);H8(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const o=Nl(Z.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=o}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=te(e[i]))}),e.accessList&&(s.accessList=Ff(e.accessList)),s}};var poe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const goe=new ee(bh);class Ug extends ga{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return poe(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||goe.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(oe(this,"_network",r),this.emit("network",r,null))),r})}}var zg=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const jc=new ee(bh);function pm(){return new Date().getTime()}function g7(t){let e=null;for(let r=0;re?null:(n+s)/2}function Uu(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(Z.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>Uu(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=Uu(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let boe=1;function w7(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const s=o=>(n=n.then(o),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const woe=[ee.errors.CALL_EXCEPTION,ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED,ee.errors.UNPREDICTABLE_GAS_LIMIT],xoe=["address","args","errorArgs","errorSignature","method","transaction"];function gm(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 Coe(t,e){return function(r){const n={};r.forEach(i=>{const o=t(i.result);n[o]||(n[o]={count:0,result:i.result}),n[o].count++});const s=Object.keys(n);for(let i=0;i=e)return o.result}}}function Eoe(t,e,r){let n=Uu;switch(e){case"getBlockNumber":return function(s){const i=s.map(a=>a.result);let o=b7(s.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),i.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(o=>o.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return b7(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=Gt(s),s.confirmations=-1,Uu(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=Gt(s),s.transactions=s.transactions.map(i=>(i=Gt(i),i.confirmations=-1,i)),Uu(s))}:n=function(s){return s==null?null:Uu(s)};break;default:throw new Error("unknown method: "+e)}return Coe(n,t.quorum)}function d1(t,e){return zg(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:hl(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function Soe(t,e,r,n){return zg(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ze(n.blockTag)&&(s=yield d1(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ze(n.blockTag)&&(s=yield d1(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ze(n.blockTag)&&(s=yield d1(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ze(n.blockTag)&&(s=yield d1(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&ze(i.fromBlock)||i.toBlock&&ze(i.toBlock))&&(s=yield d1(t,e)),s.getLogs(i)}}return jc.throwError("unknown method error",ee.errors.UNKNOWN_ERROR,{method:r,params:n})})}class koe extends q2{constructor(e,r){e.length===0&&jc.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(sc.isProvider(o)){const f=f7(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:f,priority:1})}const l=Gt(o);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=f7(o)?2e3:750),l.weight==null&&(l.weight=1);const c=l.weight;return(c%1||c>512||c<1)&&jc.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,c),Object.freeze(l)}),s=n.reduce((o,a)=>o+a.weight,0);r==null?r=s/2:r>s&&jc.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=g7(n.map(o=>o.provider.network));i==null&&(i=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(i),oe(this,"providerConfigs",Object.freeze(n)),oe(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return zg(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return g7(e)})}perform(e,r){return zg(this,void 0,void 0,function*(){if(e==="sendTransaction"){const l=yield Promise.all(this.providerConfigs.map(c=>c.provider.sendTransaction(r.signedTransaction).then(f=>f.hash,f=>f)));for(let c=0;cl.priority-c.priority);const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const l=pm();let c=s.filter(h=>h.runner&&l-h.starth+v.weight,0);for(;c{h.staller=null}),h.runner=Soe(h,i,e,r).then(y=>{h.done=!0,h.result=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:gm(h,pm()),request:{method:e,params:As(r)},provider:this})},y=>{h.done=!0,h.error=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:gm(h,pm()),request:{method:e,params:As(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:gm(h,null),request:{method:e,params:As(r)},provider:this}),c+=h.weight}const f=[];s.forEach(h=>{h.done||!h.runner||(f.push(h.runner),h.staller&&f.push(h.staller.getPromise()))}),f.length&&(yield Promise.race(f));const u=s.filter(h=>h.done&&h.error==null);if(u.length>=this.quorum){const h=n(u);if(h!==void 0)return s.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),h;a||(yield w7(100).getPromise()),a=!1}const d=s.reduce((h,v)=>{if(!v.done||v.error==null)return h;const y=v.error.code;return woe.indexOf(y)>=0&&(h[y]||(h[y]={error:v.error,weight:0}),h[y].weight+=v.weight),h},{});if(Object.keys(d).forEach(h=>{const v=d[h];if(v.weight{p.staller&&p.staller.cancel(),p.cancelled=!0});const y=v.error,b={};xoe.forEach(p=>{y[p]!=null&&(b[p]=y[p])}),jc.throwError(y.reason||y.message,h,b)}),s.filter(h=>!h.done).length===0)break}return s.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),jc.throwError("failed to meet quorum",ee.errors.SERVER_ERROR,{method:e,params:r,results:s.map(l=>gm(l)),provider:this})})}}const x7=new ee(bh);let $oe=1;function C7(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:$oe++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:As(i),provider:this}),e(i,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:i,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function Aoe(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:As(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class cB extends ga{constructor(e,r){e==null&&x7.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=Aoe(e)):e.sendAsync?s=C7(e,e.sendAsync.bind(e)):e.send?s=C7(e,e.send.bind(e)):x7.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),oe(this,"jsonRpcFetchFunc",s),oe(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const _oe="solidity/5.7.0",Poe=new RegExp("^bytes([0-9]+)$"),Toe=new RegExp("^(u?int)([0-9]*)$"),Roe=new RegExp("^(.*)\\[([0-9]*)\\]$"),Ioe="0000000000000000000000000000000000000000000000000000000000000000",Eu=new ee(_oe);function fB(t,e,r){switch(t){case"address":return r?K1(e,32):ne(e);case"string":return xt(e);case"bytes":return ne(e);case"bool":return e=e?"0x01":"0x00",r?K1(e,32):ne(e)}let n=t.match(Toe);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&Eu.throwArgumentError("invalid number type","type",t),r&&(s=256),e=Z.from(e).toTwos(s),K1(e,s/8)}if(n=t.match(Poe),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&Eu.throwArgumentError("invalid bytes type","type",t),ne(e).byteLength!==s&&Eu.throwArgumentError(`invalid value for ${t}`,"value",e),r?ne((e+Ioe).substring(0,66)):e}if(n=t.match(Roe),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&Eu.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(fB(s,a,!0))}),Ht(o)}return Eu.throwArgumentError("invalid type","type",t)}function He(t,e){t.length!=e.length&&Eu.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(fB(n,e[s]))}),te(Ht(r))}function na(t,e){return Ue(He(t,e))}function Ooe(t,e){return pa(He(t,e))}const Moe="units/5.7.0",uB=new ee(Moe),dB=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Doe(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&uB.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 s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+s}function _r(t,e){if(typeof e=="string"){const r=dB.indexOf(e);r!==-1&&(e=3*r)}return xp(t,e??18)}function Nd(t,e){if(typeof t!="string"&&uB.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=dB.indexOf(e);r!==-1&&(e=3*r)}return eo(t,e??18)}function Noe(t){return _r(t,18)}function Loe(t){return Nd(t,18)}const joe=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:Z8,ConstructorFragment:Ai,ErrorFragment:Jo,EventFragment:uo,FormatTypes:it,Fragment:mo,FunctionFragment:_i,HDNode:qo,Indexed:Mg,Interface:en,LogDescription:mF,Logger:ee,ParamType:qr,RLP:Zte,SigningKey:Lg,get SupportedAlgorithm(){return Dd},TransactionDescription:pF,get TransactionTypes(){return U6},get UnicodeNormalizationForm(){return va},Utf8ErrorFuncs:sF,get Utf8ErrorReason(){return Zn},_TypedDataEncoder:Yr,_fetchData:rB,_toEscapedUtf8String:gre,accessListify:Ff,arrayify:ne,base58:Md,base64:Lre,checkProperties:H8,checkResultErrors:Hj,commify:Doe,computeAddress:f$,computeHmac:ey,computePublicKey:l$,concat:Ht,deepCopy:As,defaultAbiCoder:Hn,defaultPath:Die,defineReadOnly:oe,dnsEncode:dF,entropyToMnemonic:ZF,fetchJson:f0,formatBytes32String:bre,formatEther:Noe,formatUnits:_r,getAccountPath:Lie,getAddress:Ye,getContractAddress:Q8,getCreate2Address:sre,getIcapAddress:nre,getJsonWalletAddress:zie,getStatic:Pi,hashMessage:n$,hexConcat:Ln,hexDataLength:Po,hexDataSlice:kr,hexStripZeros:Lj,hexValue:Nl,hexZeroPad:ht,hexlify:te,id:dl,isAddress:Yj,isBytes:_a,isBytesLike:ha,isHexString:ze,isValidMnemonic:Nie,isValidName:ane,joinSignature:Nte,keccak256:Ue,mnemonicToEntropy:d$,mnemonicToSeed:XF,namehash:J1,nameprep:Ore,parseBytes32String:wre,parseEther:Loe,parseTransaction:WF,parseUnits:Nd,poll:hl,randomBytes:z2,recoverAddress:xf,recoverPublicKey:BF,resolveProperties:mt,ripemd160:QF,serializeTransaction:die,sha256:pa,sha512:kie,shallowCopy:Gt,shuffled:eB,solidityKeccak256:na,solidityPack:He,soliditySha256:Ooe,splitSignature:Lf,stripZeros:xo,toUtf8Bytes:xt,toUtf8CodePoints:Ig,toUtf8String:Ta,verifyMessage:tB,verifyTypedData:Vie,zeroPad:K1},Symbol.toStringTag,{value:"Module"})),h$=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),W2=m.createContext({});function Foe(){return m.useContext(W2).visualElement}const u0=m.createContext(null),H2=typeof document<"u",Vg=H2?m.useLayoutEffect:m.useEffect,hB=m.createContext({strict:!1});function Boe(t,e,r,n){const s=Foe(),i=m.useContext(hB),o=m.useContext(u0),a=m.useContext(h$).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return Vg(()=>{c&&c.render()}),(window.HandoffAppearAnimations?Vg:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function zu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Uoe(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):zu(r)&&(r.current=n))},[e])}function ny(t){return typeof t=="string"||Array.isArray(t)}function G2(t){return typeof t=="object"&&typeof t.start=="function"}const zoe=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function K2(t){return G2(t.animate)||zoe.some(e=>ny(t[e]))}function vB(t){return Boolean(K2(t)||t.variants)}function Voe(t,e){if(K2(t)){const{initial:r,animate:n}=t;return{initial:r===!1||ny(r)?r:void 0,animate:ny(n)?n:void 0}}return t.inherit!==!1?e:{}}function qoe(t){const{initial:e,animate:r}=Voe(t,m.useContext(W2));return m.useMemo(()=>({initial:e,animate:r}),[E7(e),E7(r)])}function E7(t){return Array.isArray(t)?t.join(" "):t}const Bo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),sy={measureLayout:Bo(["layout","layoutId","drag"]),animation:Bo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Bo(["exit"]),drag:Bo(["drag","dragControls"]),focus:Bo(["whileFocus"]),hover:Bo(["whileHover","onHoverStart","onHoverEnd"]),tap:Bo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Bo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Bo(["whileInView","onViewportEnter","onViewportLeave"])};function Woe(t){for(const e in t)e==="projectionNodeConstructor"?sy.projectionNodeConstructor=t[e]:sy[e].Component=t[e]}function Q2(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const ev={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Hoe=1;function Goe(){return Q2(()=>{if(ev.hasEverUpdated)return Hoe++})}const v$=m.createContext({});let Koe=class extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}};const yB=m.createContext({}),Qoe=Symbol.for("motionComponentSymbol");function Yoe({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&Woe(t);function o(l,c){const f={...m.useContext(h$),...l,layoutId:Joe(l)},{isStatic:u}=f;let d=null;const h=qoe(l),v=u?void 0:Goe(),y=s(l,u);if(!u&&H2){h.visualElement=Boe(i,y,f,e);const b=m.useContext(hB).strict,p=m.useContext(yB);h.visualElement&&(d=h.visualElement.loadFeatures(f,b,t,v,r||sy.projectionNodeConstructor,p))}return m.createElement(Koe,{visualElement:h.visualElement,props:f},d,m.createElement(W2.Provider,{value:h},n(i,l,v,Uoe(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Qoe]=i,a}function Joe({layoutId:t}){const e=m.useContext(v$).id;return e&&t!==void 0?e+"-"+t:t}function Xoe(t){function e(n,s={}){return Yoe(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const Zoe=["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 y$(t){return typeof t!="string"||t.includes("-")?!1:!!(Zoe.indexOf(t)>-1||/[A-Z]/.test(t))}const qg={};function eae(t){Object.assign(qg,t)}const Wg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wh=new Set(Wg);function mB(t,{layout:e,layoutId:r}){return wh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!qg[t]||t==="opacity")}const fs=t=>!!(t!=null&&t.getVelocity),tae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rae=(t,e)=>Wg.indexOf(t)-Wg.indexOf(e);function nae({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(rae);for(const a of e)o+=`${tae[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function pB(t){return t.startsWith("--")}const sae=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ld=(t,e,r)=>Math.min(Math.max(r,t),e),Bf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},tv={...Bf,transform:t=>Ld(0,1,t)},bm={...Bf,default:1},rv=t=>Math.round(t*1e5)/1e5,iy=/(-)?([\d]*\.?[\d])+/g,H6=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,iae=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function d0(t){return typeof t=="string"}const h0=t=>({test:e=>d0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ha=h0("deg"),ko=h0("%"),Ce=h0("px"),oae=h0("vh"),aae=h0("vw"),S7={...ko,parse:t=>ko.parse(t)/100,transform:t=>ko.transform(t*100)},k7={...Bf,transform:Math.round},gB={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,size:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,rotate:Ha,rotateX:Ha,rotateY:Ha,rotateZ:Ha,scale:bm,scaleX:bm,scaleY:bm,scaleZ:bm,skew:Ha,skewX:Ha,skewY:Ha,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:tv,originX:S7,originY:S7,originZ:Ce,zIndex:k7,fillOpacity:tv,strokeOpacity:tv,numOctaves:k7};function m$(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(pB(d)){i[d]=h;continue}const v=gB[d],y=sae(h,v);if(wh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=nae(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const p$=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function bB(t,e,r){for(const n in e)!fs(e[n])&&!mB(n,r)&&(t[n]=e[n])}function lae({transformTemplate:t},e,r){return m.useMemo(()=>{const n=p$();return m$(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function cae(t,e,r){const n=t.style||{},s={};return bB(s,n,t),Object.assign(s,lae(t,e,r)),t.transformValues?t.transformValues(s):s}function fae(t,e,r){const n={},s=cae(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const uae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],dae=["whileTap","onTap","onTapStart","onTapCancel"],hae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],vae=["whileInView","onViewportEnter","onViewportLeave","viewport"],yae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","layoutScroll","layoutRoot","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd",...vae,...dae,...uae,...hae]);function Hg(t){return yae.has(t)}let wB=t=>!Hg(t);function mae(t){t&&(wB=e=>e.startsWith("on")?!Hg(e):t(e))}try{mae(require("@emotion/is-prop-valid").default)}catch{}function pae(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(wB(s)||r===!0&&Hg(s)||!e&&!Hg(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function $7(t,e,r){return typeof t=="string"?t:Ce.transform(e+r*t)}function gae(t,e,r){const n=$7(e,t.x,t.width),s=$7(r,t.y,t.height);return`${n} ${s}`}const bae={offset:"stroke-dashoffset",array:"stroke-dasharray"},wae={offset:"strokeDashoffset",array:"strokeDasharray"};function xae(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?bae:wae;t[i.offset]=Ce.transform(-n);const o=Ce.transform(e),a=Ce.transform(r);t[i.array]=`${o} ${a}`}function g$(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(m$(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=gae(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&xae(d,i,o,a,!1)}const xB=()=>({...p$(),attrs:{}}),b$=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Cae(t,e,r,n){const s=m.useMemo(()=>{const i=xB();return g$(i,e,{enableHardwareAcceleration:!1},b$(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};bB(i,t.style,t),s.style={...i,...s.style}}return s}function Eae(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(y$(r)?Cae:fae)(n,o,a,r),u={...pae(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>fs(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const w$=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function CB(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const EB=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 SB(t,e,r,n){CB(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(EB.has(s)?s:w$(s),e.attrs[s])}function x$(t,e){const{style:r}=t,n={};for(const s in r)(fs(r[s])||e.style&&fs(e.style[s])||mB(s,t))&&(n[s]=r[s]);return n}function kB(t,e){const r=x$(t,e);for(const n in t)if(fs(t[n])||fs(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function C$(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Gg=t=>Array.isArray(t),Sae=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),kae=t=>Gg(t)?t[t.length-1]||0:t;function _p(t){const e=fs(t)?t.get():t;return Sae(e)?e.toValue():e}function $ae({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:Aae(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const $B=t=>(e,r)=>{const n=m.useContext(W2),s=m.useContext(u0),i=()=>$ae(t,e,n,s);return r?i():Q2(i)};function Aae(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=_p(i[d]);let{initial:o,animate:a}=t;const l=K2(t),c=vB(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!G2(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=C$(t,h);if(!v)return;const{transitionEnd:y,transition:b,...p}=v;for(const g in p){let w=p[g];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[g]=w)}for(const g in y)s[g]=y[g]}),s}const _ae={useVisualState:$B({scrapeMotionValuesFromProps:kB,createRenderState:xB,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}}g$(r,n,{enableHardwareAcceleration:!1},b$(e.tagName),t.transformTemplate),SB(e,r)}})},Pae={useVisualState:$B({scrapeMotionValuesFromProps:x$,createRenderState:p$})};function Tae(t,{forwardMotionProps:e=!1},r,n,s){return{...y$(t)?_ae:Pae,preloadedFeatures:r,useRender:Eae(e),createVisualElement:n,projectionNodeConstructor:s,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 Y2(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function G6(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return Y2(s,e,r,n)},[t,e,r,n])}function Rae({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(pt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(pt.Focus,!1)},[r]);G6(e,"focus",t?n:void 0),G6(e,"blur",t?s:void 0)}const AB=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function E$(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const _B=t=>e=>AB(e)&&t(e,E$(e));function cd(t,e,r,n){return Y2(t,e,_B(r),n)}function Kg(t,e,r,n){return G6(t,e,r&&_B(r),n)}function PB(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const A7=PB("dragHorizontal"),_7=PB("dragVertical");function TB(t){let e=!1;if(t==="y")e=_7();else if(t==="x")e=A7();else{const r=A7(),n=_7();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function RB(){const t=TB(!0);return t?(t(),!1):!0}function P7(t,e,r,n){return(s,i)=>{s.type==="touch"||RB()||(r&&t.animationState&&t.animationState.setActive(pt.Hover,e),n&&n(s,i))}}function Iae({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Kg(n,"pointerenter",m.useMemo(()=>t||r?P7(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Kg(n,"pointerleave",m.useMemo(()=>e||r?P7(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const IB=(t,e)=>e?t===e?!0:IB(t,e.parentElement):!1;function S$(t){return m.useEffect(()=>()=>t(),[])}const Oae=(t,e)=>r=>e(t(r)),J2=(...t)=>t.reduce(Oae);function Mae({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!1),!RB()}function d(y,b){var p,g,w,E;u()&&(IB(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,b):(g=(p=s.getProps()).onTapCancel)===null||g===void 0||g.call(p,y,b))}function h(y,b){var p,g;u()&&((g=(p=s.getProps()).onTapCancel)===null||g===void 0||g.call(p,y,b))}const v=m.useCallback((y,b)=>{var p;if(f(),a.current)return;a.current=!0,l.current=J2(cd(window,"pointerup",d,c),cd(window,"pointercancel",h,c));const g=s.getProps();g.whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!0),(p=g.onTapStart)===null||p===void 0||p.call(g,y,b)},[Boolean(e),s]);Kg(s,"pointerdown",o?v:void 0,c),S$(f)}const K6=new WeakMap,XC=new WeakMap,Dae=t=>{const e=K6.get(t.target);e&&e(t)},Nae=t=>{t.forEach(Dae)};function Lae({root:t,...e}){const r=t||document;XC.has(r)||XC.set(r,{});const n=XC.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(Nae,{root:t,...e})),n[s]}function jae(t,e,r){const n=Lae(e);return K6.set(t,r),n.observe(t),()=>{K6.delete(t),n.unobserve(t)}}function Fae({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?zae:Uae)(o,i.current,t,s)}const Bae={some:0,all:1};function Uae(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:Bae[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(pt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return jae(r.current,a,l)},[t,n,s,i])}function zae(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(pt.InView,!0)})},[t])}const vl=t=>e=>(t(e),null),Vae={inView:vl(Fae),tap:vl(Mae),focus:vl(Rae),hover:vl(Iae)};function OB(){const t=m.useContext(u0);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function MB(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),Wae=t=>/^0[^.\s]+$/.test(t),sa={delta:0,timestamp:0},DB=1/60*1e3,Hae=typeof performance<"u"?()=>performance.now():()=>Date.now(),NB=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Hae()),DB);function Gae(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=Gae(()=>oy=!0),t),{}),Un=v0.reduce((t,e)=>{const r=X2[e];return t[e]=(n,s=!1,i=!1)=>(oy||Yae(),r.schedule(n,s,i)),t},{}),jl=v0.reduce((t,e)=>(t[e]=X2[e].cancel,t),{}),ZC=v0.reduce((t,e)=>(t[e]=()=>X2[e].process(sa),t),{}),Qae=t=>X2[t].process(sa),LB=t=>{oy=!1,sa.delta=Q6?DB:Math.max(Math.min(t-sa.timestamp,Kae),1),sa.timestamp=t,Y6=!0,v0.forEach(Qae),Y6=!1,oy&&(Q6=!1,NB(LB))},Yae=()=>{oy=!0,Q6=!0,Y6||NB(LB)};function k$(t,e){t.indexOf(e)===-1&&t.push(e)}function $$(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}let A$=class{constructor(){this.subscriptions=[]}add(e){return k$(this.subscriptions,e),()=>$$(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));let Xae=class{constructor(e,r={}){this.version="8.5.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sa;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Un.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Un.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=Jae(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new A$);const n=this.events[e].add(r);return e==="change"?()=>{n(),Un.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?_$(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 jd(t,e){return new Xae(t,e)}const P$=(t,e)=>r=>Boolean(d0(r)&&iae.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),jB=(t,e,r)=>n=>{if(!d0(n))return n;const[s,i,o,a]=n.match(iy);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Zae=t=>Ld(0,255,t),eE={...Bf,transform:t=>Math.round(Zae(t))},Kc={test:P$("rgb","red"),parse:jB("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+eE.transform(t)+", "+eE.transform(e)+", "+eE.transform(r)+", "+rv(tv.transform(n))+")"};function ele(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const J6={test:P$("#"),parse:ele,transform:Kc.transform},Vu={test:P$("hsl","hue"),parse:jB("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+ko.transform(rv(e))+", "+ko.transform(rv(r))+", "+rv(tv.transform(n))+")"},On={test:t=>Kc.test(t)||J6.test(t)||Vu.test(t),parse:t=>Kc.test(t)?Kc.parse(t):Vu.test(t)?Vu.parse(t):J6.parse(t),transform:t=>d0(t)?t:t.hasOwnProperty("red")?Kc.transform(t):Vu.transform(t)},FB="${c}",BB="${n}";function tle(t){var e,r;return isNaN(t)&&d0(t)&&(((e=t.match(iy))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(H6))===null||r===void 0?void 0:r.length)||0)>0}function Qg(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(H6);s&&(r=s.length,t=t.replace(H6,FB),e.push(...s.map(On.parse)));const i=t.match(iy);return i&&(n=i.length,t=t.replace(iy,BB),e.push(...i.map(Bf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function UB(t){return Qg(t).values}function zB(t){const{values:e,numColors:r,tokenised:n}=Qg(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function nle(t){const e=UB(t);return zB(t)(e.map(rle))}const Fl={test:tle,parse:UB,createTransformer:zB,getAnimatableNone:nle},sle=new Set(["brightness","contrast","saturate","opacity"]);function ile(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(iy)||[];if(!n)return t;const s=r.replace(n,"");let i=sle.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const ole=/([a-z-]*)\(.*?\)/g,X6={...Fl,getAnimatableNone:t=>{const e=t.match(ole);return e?e.map(ile).join(" "):t}},ale={...gB,color:On,backgroundColor:On,outlineColor:On,fill:On,stroke:On,borderColor:On,borderTopColor:On,borderRightColor:On,borderBottomColor:On,borderLeftColor:On,filter:X6,WebkitFilter:X6},T$=t=>ale[t];function R$(t,e){var r;let n=T$(t);return n!==X6&&(n=Fl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const VB=t=>e=>e.test(t),lle={test:t=>t==="auto",parse:t=>t},qB=[Bf,Ce,ko,Ha,aae,oae,lle],h1=t=>qB.find(VB(t)),cle=[...qB,On,Fl],fle=t=>cle.find(VB(t));function ule(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function dle(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function Z2(t,e,r){const n=t.getProps();return C$(n,e,r!==void 0?r:n.custom,ule(t),dle(t))}function hle(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,jd(r))}function vle(t,e){const r=Z2(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=kae(i[o]);hle(t,o,a)}}function yle(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,wle={current:!1},I$=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,O$=t=>e=>1-t(1-e),M$=t=>t*t,xle=O$(M$),D$=I$(M$),wr=(t,e,r)=>-r*t+r*e+t;function tE(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 Cle({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=tE(l,a,t+1/3),i=tE(l,a,t),o=tE(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const rE=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},Ele=[J6,Kc,Vu],Sle=t=>Ele.find(e=>e.test(t));function T7(t){const e=Sle(t);let r=e.parse(t);return e===Vu&&(r=Cle(r)),r}const HB=(t,e)=>{const r=T7(t),n=T7(e),s={...r};return i=>(s.red=rE(r.red,n.red,i),s.green=rE(r.green,n.green,i),s.blue=rE(r.blue,n.blue,i),s.alpha=wr(r.alpha,n.alpha,i),Kc.transform(s))};function GB(t,e){return typeof t=="number"?r=>wr(t,e,r):On.test(t)?HB(t,e):QB(t,e)}const KB=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>GB(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=GB(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},QB=(t,e)=>{const r=Fl.createTransformer(e),n=Qg(t),s=Qg(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?J2(KB(n.values,s.values),r):o=>`${o>0?e:t}`},Jg=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},R7=(t,e)=>r=>wr(t,e,r);function $le(t){return typeof t=="number"?R7:typeof t=="string"?On.test(t)?HB:QB:Array.isArray(t)?KB:typeof t=="object"?kle:R7}function Ale(t,e,r){const n=[],s=r||$le(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=Ale(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Ld(t[0],t[i-1],c)):l}const N$=t=>t,JB=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,_le=1e-7,Ple=12;function Tle(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=JB(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>_le&&++aTle(i,0,1,t,r);return i=>i===0||i===1?i:JB(s(i),e,n)}const ZB=t=>1-Math.sin(Math.acos(t)),L$=O$(ZB),Rle=I$(L$),eU=XB(.33,1.53,.69,.99),j$=O$(eU),Ile=I$(j$),Ole=t=>(t*=2)<1?.5*j$(t):.5*(2-Math.pow(2,-10*(t-1))),Mle={linear:N$,easeIn:M$,easeInOut:D$,easeOut:xle,circIn:ZB,circInOut:Rle,circOut:L$,backIn:j$,backInOut:Ile,backOut:eU,anticipate:Ole},I7=t=>{if(Array.isArray(t)){Bl(t.length===4);const[e,r,n,s]=t;return XB(e,r,n,s)}else if(typeof t=="string")return Mle[t];return t},Dle=t=>Array.isArray(t)&&typeof t[0]!="number";function Nle(t,e){return t.map(()=>e||D$).splice(0,t.length-1)}function Lle(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function jle(t,e){return t.map(r=>r*e)}function Z6({keyframes:t,ease:e=D$,times:r,duration:n=300}){t=[...t];const s=Dle(e)?e.map(I7):I7(e),i={done:!1,value:t[0]},o=jle(r&&r.length===t.length?r:Lle(t),n);function a(){return YB(o,t,{ease:Array.isArray(s)?s:Nle(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const nE=.001,Fle=.01,O7=10,Ble=.05,Ule=1;function zle({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;WB(t<=O7*1e3);let o=1-e;o=Ld(Ble,Ule,o),t=Ld(Fle,O7,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=e3(c,o),v=Math.exp(-u);return nE-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=e3(Math.pow(c,2),o);return(-s(c)+nE>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-nE+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=qle(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const Vle=12;function qle(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function Gle(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!M7(t,Hle)&&M7(t,Wle)){const r=zle(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Kle=5;function tU({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=Gle(n);let h=Qle,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function b(){const p=i-s,g=Math.sqrt(a/c)/1e3,w=Math.abs(p)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=e3(g,y);h=k=>{const $=Math.exp(-y*g*k);return i-$*((v+y*g*p)/E*Math.sin(E*k)+p*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-g*E)*(p+(v+g*p)*E);else{const E=g*Math.sqrt(y*y-1);h=k=>{const $=Math.exp(-y*g*k),C=Math.min(E*k,300);return i-$*((v+y*g*p)*Math.sinh(C)+E*p*Math.cosh(C))/E}}}return b(),{next:p=>{const g=h(p);if(d)o.done=p>=u;else{let w=v;if(p!==0)if(y<1){const $=Math.max(0,p-Kle);w=_$(g-h($),p-$)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-g)<=e;o.done=E&&k}return o.value=o.done?i:g,o},flipTarget:()=>{v=-v,[s,i]=[i,s],b()}}}tU.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Qle=t=>0;function Yle({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const Jle={decay:Yle,keyframes:Z6,tween:Z6,spring:tU};function rU(t,e,r=0){return t-e-r}function Xle(t,e=0,r=0,n=!0){return n?rU(e+-t,e,r):e-(t-e)+r}function Zle(t,e,r,n){return n?t>=e+r:t<=-r}const ece=t=>{const e=({delta:r})=>t(r);return{start:()=>Un.update(e,!0),stop:()=>jl.update(e)}};function Xg({duration:t,driver:e=ece,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,b;const p=r;let g,w=0,E=t,k=!1,$=!0,C;const T=Jle[o.length>2?"keyframes":h]||Z6,j=o[0],F=o[o.length-1];let U={done:!1,value:j};!((b=(y=T).needsInterpolation)===null||b===void 0)&&b.call(y,j,F)&&(C=YB([0,100],[j,F],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?($=w%2===0,r=Xle(r,E,i,$)):(r=rU(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function x(){g&&g.stop(),f&&f()}function S(M){$||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),C&&(U.value=C(U.value)),k=$?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),g&&g.stop()},set currentTime(M){r=p,S(M)},sample:M=>{r=p;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const B=M-I;S(Math.min(B,_)),I+=_}return U}}}function tce(t){return!t||Array.isArray(t)||typeof t=="string"&&nU[t]}const O1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,nU={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:O1([0,.65,.55,1]),circOut:O1([.55,0,1,.45]),backIn:O1([.31,.01,.66,-.59]),backOut:O1([.33,1.53,.69,.99])};function rce(t){if(t)return Array.isArray(t)?O1(t):nU[t]}function nce(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:rce(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const D7={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},sE={},sU={};for(const t in D7)sU[t]=()=>(sE[t]===void 0&&(sE[t]=D7[t]()),sE[t]);function sce(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const ice=new Set(["opacity"]),wm=10;function oce(t,e,{onUpdate:r,onComplete:n,...s}){if(!(sU.waapi()&&ice.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!tce(s.ease)){if(s.repeat===1/0)return;const u=Xg({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=wm;o=h,a=v-wm,c="linear"}const f=nce(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(sce(o,s)),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=Xg({...s,autoplay:!1});t.setWithVelocity(d.sample(u-wm).value,d.sample(u).value,wm)}Un.update(()=>f.cancel())}}}function iU(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(jl.read(n),t(i-e))};return Un.read(n,!0),()=>jl.read(n)}function ace({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:iU(s,-e)}:s()}function lce({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function b(E){return r!==void 0&&En}function p(E){return r===void 0?n:n===void 0||Math.abs(r-E){var $;u==null||u(k),($=E.onUpdate)===null||$===void 0||$.call(E,k)},onComplete:d,onStop:h})}function w(E){g({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(b(v))w({velocity:e,keyframes:[v,p(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=p(E),$=k===r?-1:1;let C,T;const j=F=>{C=T,T=F,e=_$(F-C,sa.delta),($===1&&F>k||$===-1&&Fy==null?void 0:y.stop()}}const Sc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),xm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),iE=()=>({type:"keyframes",ease:"linear",duration:.3}),cce={type:"keyframes",duration:.8},N7={x:Sc,y:Sc,z:Sc,rotate:Sc,rotateX:Sc,rotateY:Sc,rotateZ:Sc,scaleX:xm,scaleY:xm,scale:xm,opacity:iE,backgroundColor:iE,color:iE,default:xm},fce=(t,{keyframes:e})=>e.length>2?cce:(N7[t]||N7.default)(e[1]),t3=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Fl.test(e)&&!e.startsWith("url("));function uce({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function L7(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function j7(t){return typeof t=="number"?0:R$("",t)}function oU(t,e){return t[e]||t.default||t}function dce(t,e,r,n){const s=t3(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=R$(e,r):L7(i)&&typeof r=="string"?i=j7(r):!Array.isArray(r)&&L7(r)&&typeof i=="string"&&(r=j7(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const F$=(t,e,r,n={})=>s=>{const i=oU(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Pp(o);const l=dce(e,t,r,i),c=l[0],f=l[l.length-1],u=t3(t,c),d=t3(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:b=>{e.set(b),i.onUpdate&&i.onUpdate(b)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||wle.current||i.type===!1)return ace(h);if(i.type==="inertia")return lce(h);uce(i)||(h={...h,...fce(t,h)}),h.duration&&(h.duration=Pp(h.duration)),h.repeatDelay&&(h.repeatDelay=Pp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const b=oce(e,t,h);if(b)return b}return Xg(h)};function hce(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>r3(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=r3(t,e,r);else{const s=typeof e=="function"?Z2(t,e,r.custom):e;n=aU(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function r3(t,e,r={}){var n;const s=Z2(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>aU(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return vce(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function aU(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&mce(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const p=t.getProps()[ble];p&&(y.elapsed=window.HandoffAppearAnimations(p,d,h,Un))}let b=h.start(F$(d,h,v,t.shouldReduceMotion&&wh.has(d)?{type:!1}:y));Yg(c)&&(c.add(d),b=b.then(()=>c.remove(d))),f.push(b)}return Promise.all(f).then(()=>{a&&vle(t,a)})}function vce(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(yce).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(r3(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function yce(t,e){return t.sortNodePosition(e)}function mce({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const B$=[pt.Animate,pt.InView,pt.Focus,pt.Hover,pt.Tap,pt.Drag,pt.Exit],pce=[...B$].reverse(),gce=B$.length;function bce(t){return e=>Promise.all(e.map(({animation:r,options:n})=>hce(t,r,n)))}function wce(t){let e=bce(t);const r=Cce();let n=!0;const s=(l,c)=>{const f=Z2(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let p=0;py&&k;const F=Array.isArray(E)?E:[E];let U=F.reduce(s,{});$===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},x=S=>{j=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Gg(R)&&Gg(M)?!MB(R,M)||T?x(S):w.protectedKeys[S]=!0:R!==void 0?x(S):h.add(S):R!==void 0&&h.has(S)?x(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(j=!1),j&&!C&&d.push(...F.map(S=>({animation:S,options:{type:g,...l}})))}if(h.size){const p={};h.forEach(g=>{const w=t.getBaseTarget(g);w!==void 0&&(p[g]=w)}),d.push({animation:p})}let b=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),n=!1,b?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function xce(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!MB(e,t):!1}function kc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cce(){return{[pt.Animate]:kc(!0),[pt.InView]:kc(),[pt.Hover]:kc(),[pt.Tap]:kc(),[pt.Drag]:kc(),[pt.Focus]:kc(),[pt.Exit]:kc()}}const Ece={animation:vl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=wce(t)),G2(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:vl(t=>{const{custom:e,visualElement:r}=t,[n,s]=OB(),i=m.useContext(u0);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(pt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},F7=(t,e)=>Math.abs(t-e);function Sce(t,e){const r=F7(t.x,e.x),n=F7(t.y,e.y);return Math.sqrt(r**2+n**2)}let lU=class{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 c=aE(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=Sce(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=sa;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=oE(f,this.transformPagePoint),Un.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=aE(c.type==="pointercancel"?this.lastMoveEventInfo:oE(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!AB(e))return;this.handlers=r,this.transformPagePoint=n;const s=E$(e),i=oE(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=sa;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,aE(i,this.history)),this.removeListeners=J2(cd(window,"pointermove",this.handlePointerMove),cd(window,"pointerup",this.handlePointerUp),cd(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),jl.update(this.updatePoint)}};function oE(t,e){return e?{point:e(t.point)}:t}function B7(t,e){return{x:t.x-e.x,y:t.y-e.y}}function aE({point:t},e){return{point:t,delta:B7(t,cU(e)),offset:B7(t,kce(e)),velocity:$ce(e,.1)}}function kce(t){return t[0]}function cU(t){return t[t.length-1]}function $ce(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=cU(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Pp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Rs(t){return t.max-t.min}function n3(t,e=0,r=.01){return Math.abs(t-e)<=r}function U7(t,e,r,n=.5){t.origin=n,t.originPoint=wr(e.min,e.max,t.origin),t.scale=Rs(r)/Rs(e),(n3(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=wr(r.min,r.max,t.origin)-t.originPoint,(n3(t.translate)||isNaN(t.translate))&&(t.translate=0)}function nv(t,e,r,n){U7(t.x,e.x,r.x,n==null?void 0:n.originX),U7(t.y,e.y,r.y,n==null?void 0:n.originY)}function z7(t,e,r){t.min=r.min+e.min,t.max=t.min+Rs(e)}function Ace(t,e,r){z7(t.x,e.x,r.x),z7(t.y,e.y,r.y)}function V7(t,e,r){t.min=e.min-r.min,t.max=t.min+Rs(e)}function sv(t,e,r){V7(t.x,e.x,r.x),V7(t.y,e.y,r.y)}function _ce(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?wr(r,t,n.max):Math.min(t,r)),t}function q7(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 Pce(t,{top:e,left:r,bottom:n,right:s}){return{x:q7(t.x,r,s),y:q7(t.y,e,n)}}function W7(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Jg(e.min,e.max-n,t.min):n>s&&(r=Jg(t.min,t.max-s,e.min)),Ld(0,1,r)}function Ice(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 s3=.35;function Oce(t=s3){return t===!1?t=0:t===!0&&(t=s3),{x:H7(t,"left","right"),y:H7(t,"top","bottom")}}function H7(t,e,r){return{min:G7(t,e),max:G7(t,r)}}function G7(t,e){return typeof t=="number"?t:t[e]||0}const K7=()=>({translate:0,scale:1,origin:0,originPoint:0}),iv=()=>({x:K7(),y:K7()}),Q7=()=>({min:0,max:0}),Fr=()=>({x:Q7(),y:Q7()});function ro(t){return[t("x"),t("y")]}function fU({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function Mce({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Dce(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 lE(t){return t===void 0||t===1}function i3({scale:t,scaleX:e,scaleY:r}){return!lE(t)||!lE(e)||!lE(r)}function Ic(t){return i3(t)||uU(t)||t.z||t.rotate||t.rotateX||t.rotateY}function uU(t){return Y7(t.x)||Y7(t.y)}function Y7(t){return t&&t!=="0%"}function Zg(t,e,r){const n=t-r,s=e*n;return r+s}function J7(t,e,r,n,s){return s!==void 0&&(t=Zg(t,s,n)),Zg(t,r,n)+e}function o3(t,e=0,r=1,n,s){t.min=J7(t.min,e,r,n,s),t.max=J7(t.max,e,r,n,s)}function dU(t,{x:e,y:r}){o3(t.x,e.translate,e.scale,e.originPoint),o3(t.y,r.translate,r.scale,r.originPoint)}function Nce(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function tl(t,e){t.min=t.min+e,t.max=t.max+e}function Z7(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=wr(t.min,t.max,i);o3(t,e[r],e[n],o,e.scale)}const Lce=["x","scaleX","originX"],jce=["y","scaleY","originY"];function qu(t,e){Z7(t.x,e,Lce),Z7(t.y,e,jce)}function hU(t,e){return fU(Dce(t.getBoundingClientRect(),e))}function Fce(t,e,r){const n=hU(t,r),{scroll:s}=e;return s&&(tl(n.x,s.offset.x),tl(n.y,s.offset.y)),n}const Bce=new WeakMap;let Uce=class{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=Fr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(E$(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=TB(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ro(h=>{var v,y;let b=this.getAxisMotionValue(h).get()||0;if(ko.test(b)){const p=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];p&&(b=Rs(p)*(parseFloat(b)/100))}this.originPoint[h]=b}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(pt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=zce(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new lU(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(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:s}=this.getProps();if(!n||!Cm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=_ce(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&zu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=Pce(n.layoutBox,e):this.constraints=!1,this.elastic=Oce(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&ro(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=Ice(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!zu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Fce(n,s.root,this.visualElement.getTransformPagePoint());let o=Tce(s.layout.layoutBox,i);if(r){const a=r(Mce(o));this.hasMutatedConstraints=!!a,a&&(o=fU(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=ro(f=>{if(!Cm(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(F$(e,n,0,r))}stopAnimation(){ro(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){ro(r=>{const{drag:n}=this.getProps();if(!Cm(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-wr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!zu(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ro(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=Rce({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),ro(a=>{if(!Cm(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(wr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Bce.set(this.visualElement,this);const r=this.visualElement.current,n=cd(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();zu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=Y2(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(ro(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=s3,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}};function Cm(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function zce(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function Vce(t){const{dragControls:e,visualElement:r}=t,n=Q2(()=>new Uce(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function qce({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(h$),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new lU(f,l,{transformPagePoint:a})}Kg(s,"pointerdown",i&&c),S$(()=>o.current&&o.current.end())}const Wce={pan:vl(qce),drag:vl(Vce)};function a3(t){return typeof t=="string"&&t.startsWith("var(--")}const vU=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Hce(t){const e=vU.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function l3(t,e,r=1){const[n,s]=Hce(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():a3(s)?l3(s,e,r+1):s}function Gce(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!a3(i))return;const o=l3(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!a3(i))continue;const o=l3(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const Kce=new Set(["width","height","top","left","right","bottom","x","y"]),yU=t=>Kce.has(t),Qce=t=>Object.keys(t).some(yU),e9=t=>t===Bf||t===Ce;var t9;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(t9||(t9={}));const r9=(t,e)=>parseFloat(t.split(", ")[e]),n9=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return r9(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?r9(i[1],t):0}},Yce=new Set(["x","y","z"]),Jce=Wg.filter(t=>!Yce.has(t));function Xce(t){const e=[];return Jce.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 s9={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:n9(4,13),y:n9(5,14)},Zce=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=s9[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=s9[c](l,i)}),t},efe=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(yU);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=h1(f);const d=e[l];let h;if(Gg(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=h1(f);for(let b=y;b=0?window.pageYOffset:null,c=Zce(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),H2&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function tfe(t,e,r,n){return Qce(e)?efe(t,e,r,n):{target:e,transitionEnd:n}}const rfe=(t,e,r,n)=>{const s=Gce(t,e,n);return e=s.target,n=s.transitionEnd,tfe(t,e,r,n)},c3={current:null},mU={current:!1};function nfe(){if(mU.current=!0,!!H2)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>c3.current=t.matches;t.addListener(e),e()}else c3.current=!1}function sfe(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(fs(i))t.addValue(s,i),Yg(n)&&n.add(s);else if(fs(o))t.addValue(s,jd(i,{owner:t})),Yg(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,jd(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const pU=Object.keys(sy),ife=pU.length,i9=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ofe=class{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){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=()=>Un.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;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=i,this.isControllingVariants=K2(r),this.isVariantNode=vB(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&fs(u)&&(u.set(o[f],!1),Yg(l)&&l.add(f))}}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,s)=>this.bindToMotionValue(s,n)),mU.current||nfe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:c3.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(),jl.update(this.notifyUpdate),jl.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=wh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Un.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fr()}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=jd(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,s=typeof n=="string"||typeof n=="object"?(r=C$(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!fs(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new A$),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}};const gU=["initial",...B$],afe=gU.length;let bU=class extends ofe{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:s},i){let o=ple(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){yle(this,n,o);const a=rfe(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}};function lfe(t){return window.getComputedStyle(t)}let cfe=class extends bU{readValueFromInstance(e,r){if(wh.has(r)){const n=T$(r);return n&&n.default||0}else{const n=lfe(e),s=(pB(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return hU(e,r)}build(e,r,n,s){m$(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return x$(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fs(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){CB(e,r,n,s)}},ffe=class extends bU{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return wh.has(r)?((n=T$(r))===null||n===void 0?void 0:n.default)||0:(r=EB.has(r)?r:w$(r),e.getAttribute(r))}measureInstanceViewportBox(){return Fr()}scrapeMotionValuesFromProps(e,r){return kB(e,r)}build(e,r,n,s){g$(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){SB(e,r,n,s)}mount(e){this.isSVGTag=b$(e.tagName),super.mount(e)}};const ufe=(t,e)=>y$(t)?new ffe(e,{enableHardwareAcceleration:!1}):new cfe(e,{enableHardwareAcceleration:!0});function o9(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const v1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ce.test(t))t=parseFloat(t);else return t;const r=o9(t,e.target.x),n=o9(t,e.target.y);return`${r}% ${n}%`}},a9="_$css",dfe={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(vU,h=>(i.push(h),a9)));const o=Fl.parse(t);if(o.length>5)return n;const a=Fl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=wr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(a9,()=>{const v=i[h];return h++,v})}return d}};let hfe=class extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;eae(yfe),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ev.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Un.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}};function vfe(t){const[e,r]=OB(),n=m.useContext(v$);return P.createElement(hfe,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(yB),isPresent:e,safeToRemove:r})}const yfe={borderRadius:{...v1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:v1,borderTopRightRadius:v1,borderBottomLeftRadius:v1,borderBottomRightRadius:v1,boxShadow:dfe},mfe={measureLayout:vfe};function pfe(t,e,r={}){const n=fs(t)?t:jd(t);return n.start(F$("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const wU=["TopLeft","TopRight","BottomLeft","BottomRight"],gfe=wU.length,l9=t=>typeof t=="string"?parseFloat(t):t,c9=t=>typeof t=="number"||Ce.test(t);function bfe(t,e,r,n,s,i){s?(t.opacity=wr(0,r.opacity!==void 0?r.opacity:1,wfe(n)),t.opacityExit=wr(e.opacity!==void 0?e.opacity:1,0,xfe(n))):i&&(t.opacity=wr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Jg(t,e,n))}function u9(t,e){t.min=e.min,t.max=e.max}function mi(t,e){u9(t.x,e.x),u9(t.y,e.y)}function d9(t,e,r,n,s){return t-=e,t=Zg(t,1/r,n),s!==void 0&&(t=Zg(t,1/s,n)),t}function Cfe(t,e=0,r=1,n=.5,s,i=t,o=t){if(ko.test(e)&&(e=parseFloat(e),e=wr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=wr(i.min,i.max,n);t===i&&(a-=e),t.min=d9(t.min,e,r,a,s),t.max=d9(t.max,e,r,a,s)}function h9(t,e,[r,n,s],i,o){Cfe(t,e[r],e[n],e[s],e.scale,i,o)}const Efe=["x","scaleX","originX"],Sfe=["y","scaleY","originY"];function v9(t,e,r,n){h9(t.x,e,Efe,r==null?void 0:r.x,n==null?void 0:n.x),h9(t.y,e,Sfe,r==null?void 0:r.y,n==null?void 0:n.y)}function y9(t){return t.translate===0&&t.scale===1}function CU(t){return y9(t.x)&&y9(t.y)}function EU(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 m9(t){return Rs(t.x)/Rs(t.y)}let kfe=class{constructor(){this.members=[]}add(e){k$(this.members,e),e.scheduleRender()}remove(e){if($$(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function p9(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}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 $fe=(t,e)=>t.depth-e.depth;let Afe=class{constructor(){this.children=[],this.isDirty=!1}add(e){k$(this.children,e),this.isDirty=!0}remove(e){$$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($fe),this.isDirty=!1,this.children.forEach(e)}};const g9=["","X","Y","Z"],b9=1e3;let _fe=0;function SU({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=_fe++,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(Rfe),this.nodes.forEach(Mfe),this.nodes.forEach(Dfe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=iU(h,250),ev.hasAnimatedSinceResize&&(ev.hasAnimatedSinceResize=!1,this.nodes.forEach(x9))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var b,p,g,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(p=(b=this.options.transition)!==null&&b!==void 0?b:u.getDefaultTransition())!==null&&p!==void 0?p:Bfe,{onLayoutAnimationStart:$,onLayoutAnimationComplete:C}=u.getProps(),T=!this.targetLayout||!EU(this.targetLayout,y)||v,j=!h&&v;if(this.options.layoutRoot||!((g=this.resumeFrom)===null||g===void 0)&&g.instance||j||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,j);const F={...oU(k,"layout"),onPlay:$,onComplete:C};(u.shouldReduceMotion||this.options.layoutRoot)&&(F.delay=0,F.type=!1),this.startAnimation(F)}else!h&&this.animationProgress===0&&x9(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}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,jl.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(Nfe),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.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 l=0;l{var w;const E=g/1e3;C9(h.x,o.x,E),C9(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(sv(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),jfe(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,bfe(d,u,this.latestValues,E,p,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(jl.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Un.update(()=>{ev.hasAnimatedSinceResize=!0,this.currentAnimation=pfe(0,b9,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.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,b9),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&kU(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Fr();const u=Rs(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Rs(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}mi(a,l),qu(a,f),nv(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new kfe),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,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:l}={}){const c=this.getStack();c&&c.promote(this,l),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:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(w9),this.root.sharedNodes.clear()}}}function Pfe(t){t.updateLayout()}function Tfe(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?ro(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Rs(v);v.min=i[h].min,v.max=v.min+y}):kU(a,s.layoutBox,i)&&ro(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Rs(i[h]);v.max=v.min+y});const c=iv();nv(c,i,s.layoutBox);const f=iv();l?nv(f,t.applyTransform(o,!0),s.measuredBox):nv(f,i,s.layoutBox);const u=!CU(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const b=Fr();sv(b,s.layoutBox,v.layoutBox);const p=Fr();sv(p,i,y.layoutBox),EU(b,p)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function Rfe(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Ife(t){t.clearSnapshot()}function w9(t){t.clearMeasurements()}function Ofe(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function x9(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function Mfe(t){t.resolveTargetDelta()}function Dfe(t){t.calcProjection()}function Nfe(t){t.resetRotation()}function Lfe(t){t.removeLeadSnapshot()}function C9(t,e,r){t.translate=wr(e.translate,0,r),t.scale=wr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function E9(t,e,r,n){t.min=wr(e.min,r.min,n),t.max=wr(e.max,r.max,n)}function jfe(t,e,r,n){E9(t.x,e.x,r.x,n),E9(t.y,e.y,r.y,n)}function Ffe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Bfe={duration:.45,ease:[.4,0,.1,1]};function Ufe(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function S9(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function zfe(t){S9(t.x),S9(t.y)}function kU(t,e,r){return t==="position"||t==="preserve-aspect"&&!n3(m9(e),m9(r),.2)}const Vfe=SU({attachResizeListener:(t,e)=>Y2(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cE={current:void 0},qfe=SU({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!cE.current){const t=new Vfe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),cE.current=t}return cE.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),Wfe={...Ece,...Vae,...Wce,...mfe},ay=Xoe((t,e)=>Tae(t,e,Wfe,ufe,qfe));function $U(){const t=m.useRef(!1);return Vg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Hfe(){const t=$U(),[e,r]=m.useState(0),n=m.useCallback(()=>{t.current&&r(e+1)},[e]);return[m.useCallback(()=>Un.postRender(n),[n]),e]}class Gfe extends m.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 Kfe({children:t,isPresent:e}){const r=m.useId(),n=m.useRef(null),s=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:l}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` +`+i.stack}return{value:t,source:e,stack:s,digest:null}}function IC(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function g6(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var ite=typeof WeakMap=="function"?WeakMap:Map;function lj(t,e,r){r=na(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){$g||($g=!0,_6=n),g6(t,e)},r}function cj(t,e,r){r=na(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){g6(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){g6(t,e),typeof n!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function nT(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new ite;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=bte.bind(null,t,e,r),e.then(t,t))}function sT(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 iT(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,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=na(-1,1),e.tag=2,El(r,e,1))),r.lanes|=1),t)}var ote=_a.ReactCurrentOwner,rs=!1;function Nn(t,e,r,n){e.child=t===null?UL(e,null,r,n):_d(e,t.child,r,n)}function oT(t,e,r,n,s){r=r.render;var i=e.ref;return id(e,s),n=T8(t,e,r,n,i,s),r=R8(),t!==null&&!rs?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ha(t,e,s)):(tr&&r&&g8(e),e.flags|=1,Nn(t,e,n,s),e.child)}function aT(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!U8(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,fj(t,e,i,n,s)):(t=wp(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Fv,r(o,n)&&t.ref===e.ref)return ha(t,e,s)}return e.flags|=1,t=$l(i,n),t.ref=e.ref,t.return=e,e.child=t}function fj(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(Fv(i,n)&&t.ref===e.ref)if(rs=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(rs=!0);else return e.lanes=t.lanes,ha(t,e,s)}return b6(t,e,r,n,s)}function uj(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},bt(Bu,gs),gs|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,bt(Bu,gs),gs|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,bt(Bu,gs),gs|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,bt(Bu,gs),gs|=n;return Nn(t,e,s,r),e.child}function dj(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function b6(t,e,r,n,s){var i=os(r)?hf:_n.current;return i=$d(e,i),id(e,s),r=T8(t,e,r,n,i,s),n=R8(),t!==null&&!rs?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,ha(t,e,s)):(tr&&n&&g8(e),e.flags|=1,Nn(t,e,r,s),e.child)}function lT(t,e,r,n,s){if(os(r)){var i=!0;mg(e)}else i=!1;if(id(e,s),e.stateNode===null)pp(t,e),FL(e,r,n),p6(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=ei(c):(c=os(r)?hf:_n.current,c=$d(e,c));var f=r.getDerivedStateFromProps,u=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function";u||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&ZP(e,o,n,c),tl=!1;var d=e.memoizedState;o.state=d,xg(e,n,o,s),l=e.memoizedState,a!==n||d!==l||is.current||tl?(typeof f=="function"&&(m6(e,r,f,n),l=e.memoizedState),(a=tl||XP(e,r,a,n,d,l,c))?(u||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=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,LL(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Si(e.type,a),o.props=c,u=e.pendingProps,d=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=ei(l):(l=os(r)?hf:_n.current,l=$d(e,l));var h=r.getDerivedStateFromProps;(f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==u||d!==l)&&ZP(e,o,n,l),tl=!1,d=e.memoizedState,o.state=d,xg(e,n,o,s);var v=e.memoizedState;a!==u||d!==v||is.current||tl?(typeof h=="function"&&(m6(e,r,h,n),v=e.memoizedState),(c=tl||XP(e,r,c,n,d,v,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,v,l)),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=v),o.props=n,o.state=v,o.context=l,n=c):(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 w6(t,e,r,n,i,s)}function w6(t,e,r,n,s,i){dj(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&GP(e,r,!1),ha(t,e,i);n=e.stateNode,ote.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=_d(e,t.child,null,i),e.child=_d(e,null,a,i)):Nn(t,e,a,i),e.memoizedState=n.state,s&&GP(e,r,!0),e.child}function hj(t){var e=t.stateNode;e.pendingContext?HP(t,e.pendingContext,e.pendingContext!==e.context):e.context&&HP(t,e.context,!1),$8(t,e.containerInfo)}function cT(t,e,r,n,s){return Ad(),w8(s),e.flags|=256,Nn(t,e,r,n),e.child}var x6={dehydrated:null,treeContext:null,retryLane:0};function C6(t){return{baseLanes:t,cachePool:null,transitions:null}}function vj(t,e,r){var n=e.pendingProps,s=or.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),bt(or,s&1),t===null)return v6(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,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=I2(o,n,0,null),t=rf(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=C6(r),e.memoizedState=x6,t):M8(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return ate(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=$l(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=$l(a,i):(i=rf(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?C6(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=x6,n}return i=t.child,t=i.sibling,n=$l(i,{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 M8(t,e){return e=I2({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function am(t,e,r,n){return n!==null&&w8(n),_d(e,t.child,null,r),t=M8(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ate(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=IC(Error(le(422))),am(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=I2({mode:"visible",children:n.children},s,0,null),i=rf(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&_d(e,t.child,null,o),e.child.memoizedState=C6(o),e.memoizedState=x6,i);if(!(e.mode&1))return am(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(le(419)),n=IC(i,n,void 0),am(t,e,o,n)}if(a=(o&t.childLanes)!==0,rs||a){if(n=Zr,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,da(t,s),Mi(n,t,s,-1))}return B8(),n=IC(Error(le(421))),am(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=wte.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Ss=Cl(s.nextSibling),As=e,tr=!0,Ai=null,t!==null&&(Gs[Ks++]=ea,Gs[Ks++]=ta,Gs[Ks++]=vf,ea=t.id,ta=t.overflow,vf=e),e=M8(e,n.children),e.flags|=4096,e)}function fT(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),y6(t.return,e,r)}function OC(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function yj(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(Nn(t,e,n.children,r),n=or.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&&fT(t,r,e);else if(t.tag===19)fT(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(bt(or,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&Cg(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),OC(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Cg(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}OC(e,!0,r,null,i);break;case"together":OC(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function pp(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ha(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),mf|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(le(153));if(e.child!==null){for(t=e.child,r=$l(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=$l(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function lte(t,e,r){switch(e.tag){case 3:hj(e),Ad();break;case 5:zL(e);break;case 1:os(e.type)&&mg(e);break;case 4:$8(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;bt(bg,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(bt(or,or.current&1),e.flags|=128,null):r&e.child.childLanes?vj(t,e,r):(bt(or,or.current&1),t=ha(t,e,r),t!==null?t.sibling:null);bt(or,or.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return yj(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),bt(or,or.current),n)break;return null;case 22:case 23:return e.lanes=0,uj(t,e,r)}return ha(t,e,r)}var mj,E6,pj,gj;mj=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}};E6=function(){};pj=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,Kc(xo.current);var i=null;switch(r){case"input":s=W5(t,s),n=W5(t,n),i=[];break;case"select":s=dr({},s,{value:void 0}),n=dr({},n,{value:void 0}),i=[];break;case"textarea":s=K5(t,s),n=K5(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=vg)}Y5(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Iv.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Iv.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ut("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};gj=function(t,e,r,n){r!==n&&(e.flags|=4)};function o1(t,e){if(!tr)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 mn(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function cte(t,e,r){var n=e.pendingProps;switch(b8(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mn(e),null;case 1:return os(e.type)&&yg(),mn(e),null;case 3:return n=e.stateNode,Pd(),Wt(is),Wt(_n),_8(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(im(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ai!==null&&(R6(Ai),Ai=null))),E6(t,e),mn(e),null;case 5:A8(e);var s=Kc(qv.current);if(r=e.type,t!==null&&e.stateNode!=null)pj(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(le(166));return mn(e),null}if(t=Kc(xo.current),im(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[uo]=e,n[zv]=i,t=(e.mode&1)!==0,r){case"dialog":Ut("cancel",n),Ut("close",n);break;case"iframe":case"object":case"embed":Ut("load",n);break;case"video":case"audio":for(s=0;s<\/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[uo]=e,t[zv]=n,mj(t,e,!1,!1),e.stateNode=t;e:{switch(o=J5(r,n),r){case"dialog":Ut("cancel",t),Ut("close",t),s=n;break;case"iframe":case"object":case"embed":Ut("load",t),s=n;break;case"video":case"audio":for(s=0;sRd&&(e.flags|=128,n=!0,o1(i,!1),e.lanes=4194304)}else{if(!n)if(t=Cg(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),o1(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!tr)return mn(e),null}else 2*kr()-i.renderingStartTime>Rd&&r!==1073741824&&(e.flags|=128,n=!0,o1(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=kr(),e.sibling=null,r=or.current,bt(or,n?r&1|2:r&1),e):(mn(e),null);case 22:case 23:return F8(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?gs&1073741824&&(mn(e),e.subtreeFlags&6&&(e.flags|=8192)):mn(e),null;case 24:return null;case 25:return null}throw Error(le(156,e.tag))}function fte(t,e){switch(b8(e),e.tag){case 1:return os(e.type)&&yg(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Pd(),Wt(is),Wt(_n),_8(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return A8(e),null;case 13:if(Wt(or),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(le(340));Ad()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Wt(or),null;case 4:return Pd(),null;case 10:return E8(e.type._context),null;case 22:case 23:return F8(),null;case 24:return null;default:return null}}var lm=!1,wn=!1,ute=typeof WeakSet=="function"?WeakSet:Set,de=null;function Fu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){pr(t,e,n)}else r.current=null}function S6(t,e,r){try{r()}catch(n){pr(t,e,n)}}var uT=!1;function dte(t,e){if(a6=ug,t=CL(),p8(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 s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,f=0,u=t,d=null;t:for(;;){for(var h;u!==r||s!==0&&u.nodeType!==3||(a=o+s),u!==i||n!==0&&u.nodeType!==3||(l=o+n),u.nodeType===3&&(o+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===t)break t;if(d===r&&++c===s&&(a=o),d===i&&++f===n&&(l=o),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(l6={focusedElem:t,selectionRange:r},ug=!1,de=e;de!==null;)if(e=de,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,de=t;else for(;de!==null;){e=de;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,g=v.memoizedState,b=e.stateNode,p=b.getSnapshotBeforeUpdate(e.elementType===e.type?y:Si(e.type,y),g);b.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(E){pr(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,de=t;break}de=e.return}return v=uT,uT=!1,v}function H1(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&S6(e,r,i)}s=s.next}while(s!==n)}}function T2(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 k6(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 bj(t){var e=t.alternate;e!==null&&(t.alternate=null,bj(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[uo],delete e[zv],delete e[u6],delete e[Kee],delete e[Qee])),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 wj(t){return t.tag===5||t.tag===3||t.tag===4}function dT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wj(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 $6(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=vg));else if(n!==4&&(t=t.child,t!==null))for($6(t,e,r),t=t.sibling;t!==null;)$6(t,e,r),t=t.sibling}function A6(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(A6(t,e,r),t=t.sibling;t!==null;)A6(t,e,r),t=t.sibling}var an=null,$i=!1;function qa(t,e,r){for(r=r.child;r!==null;)xj(t,e,r),r=r.sibling}function xj(t,e,r){if(wo&&typeof wo.onCommitFiberUnmount=="function")try{wo.onCommitFiberUnmount(C2,r)}catch{}switch(r.tag){case 5:wn||Fu(r,e);case 6:var n=an,s=$i;an=null,qa(t,e,r),an=n,$i=s,an!==null&&($i?(t=an,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):an.removeChild(r.stateNode));break;case 18:an!==null&&($i?(t=an,r=r.stateNode,t.nodeType===8?$C(t.parentNode,r):t.nodeType===1&&$C(t,r),Lv(t)):$C(an,r.stateNode));break;case 4:n=an,s=$i,an=r.stateNode.containerInfo,$i=!0,qa(t,e,r),an=n,$i=s;break;case 0:case 11:case 14:case 15:if(!wn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&S6(r,e,o),s=s.next}while(s!==n)}qa(t,e,r);break;case 1:if(!wn&&(Fu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){pr(r,e,a)}qa(t,e,r);break;case 21:qa(t,e,r);break;case 22:r.mode&1?(wn=(n=wn)||r.memoizedState!==null,qa(t,e,r),wn=n):qa(t,e,r);break;default:qa(t,e,r)}}function hT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new ute),e.forEach(function(n){var s=xte.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function vi(t,e){var r=e.deletions;if(r!==null)for(var n=0;ns&&(s=o),n&=~i}if(n=s,n=kr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vte(n/1960))-n,10t?16:t,ul===null)var n=!1;else{if(t=ul,ul=null,Ag=0,ot&6)throw Error(le(331));var s=ot;for(ot|=4,de=t.current;de!==null;){var i=de,o=i.child;if(de.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lkr()-L8?tf(t,0):N8|=r),as(t,e)}function Pj(t,e){e===0&&(t.mode&1?(e=Z0,Z0<<=1,!(Z0&130023424)&&(Z0=4194304)):e=1);var r=Un();t=da(t,e),t!==null&&(n0(t,e,r),as(t,r))}function wte(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Pj(t,r)}function xte(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(le(314))}n!==null&&n.delete(e),Pj(t,r)}var Tj;Tj=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||is.current)rs=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return rs=!1,lte(t,e,r);rs=!!(t.flags&131072)}else rs=!1,tr&&e.flags&1048576&&OL(e,gg,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;pp(t,e),t=e.pendingProps;var s=$d(e,_n.current);id(e,r),s=T8(null,e,n,t,s,r);var i=R8();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,os(n)?(i=!0,mg(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,k8(e),s.updater=_2,e.stateNode=s,s._reactInternals=e,p6(e,n,t,r),e=w6(null,e,n,!0,i,r)):(e.tag=0,tr&&i&&g8(e),Nn(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(pp(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=Ete(n),t=Si(n,t),s){case 0:e=b6(null,e,n,t,r);break e;case 1:e=lT(null,e,n,t,r);break e;case 11:e=oT(null,e,n,t,r);break e;case 14:e=aT(null,e,n,Si(n.type,t),r);break e}throw Error(le(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),b6(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),lT(t,e,n,s,r);case 3:e:{if(hj(e),t===null)throw Error(le(387));n=e.pendingProps,i=e.memoizedState,s=i.element,LL(t,e),xg(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=Td(Error(le(423)),e),e=cT(t,e,n,r,s);break e}else if(n!==s){s=Td(Error(le(424)),e),e=cT(t,e,n,r,s);break e}else for(Ss=Cl(e.stateNode.containerInfo.firstChild),As=e,tr=!0,Ai=null,r=UL(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ad(),n===s){e=ha(t,e,r);break e}Nn(t,e,n,r)}e=e.child}return e;case 5:return zL(e),t===null&&v6(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,c6(n,s)?o=null:i!==null&&c6(n,i)&&(e.flags|=32),dj(t,e),Nn(t,e,o,r),e.child;case 6:return t===null&&v6(e),null;case 13:return vj(t,e,r);case 4:return $8(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=_d(e,null,n,r):Nn(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),oT(t,e,n,s,r);case 7:return Nn(t,e,e.pendingProps,r),e.child;case 8:return Nn(t,e,e.pendingProps.children,r),e.child;case 12:return Nn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,bt(bg,n._currentValue),n._currentValue=o,i!==null)if(Bi(i.value,o)){if(i.children===s.children&&!is.current){e=ha(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=na(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),y6(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(le(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),y6(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Nn(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,id(e,r),s=ei(s),n=n(s),e.flags|=1,Nn(t,e,n,r),e.child;case 14:return n=e.type,s=Si(n,e.pendingProps),s=Si(n.type,s),aT(t,e,n,s,r);case 15:return fj(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Si(n,s),pp(t,e),e.tag=1,os(n)?(t=!0,mg(e)):t=!1,id(e,r),FL(e,n,s),p6(e,n,s,r),w6(null,e,n,!0,t,r);case 19:return yj(t,e,r);case 22:return uj(t,e,r)}throw Error(le(156,e.tag))};function Rj(t,e){return nL(t,e)}function Cte(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 Qs(t,e,r,n){return new Cte(t,e,r,n)}function U8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ete(t){if(typeof t=="function")return U8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===o8)return 11;if(t===a8)return 14}return 2}function $l(t,e){var r=t.alternate;return r===null?(r=Qs(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 wp(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")U8(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Tu:return rf(r.children,s,i,e);case i8:o=8,s|=8;break;case U5:return t=Qs(12,r,e,s|2),t.elementType=U5,t.lanes=i,t;case z5:return t=Qs(13,r,e,s),t.elementType=z5,t.lanes=i,t;case V5:return t=Qs(19,r,e,s),t.elementType=V5,t.lanes=i,t;case BN:return I2(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jN:o=10;break e;case FN:o=9;break e;case o8:o=11;break e;case a8:o=14;break e;case el:o=16,n=null;break e}throw Error(le(130,t==null?t:typeof t,""))}return e=Qs(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function rf(t,e,r,n){return t=Qs(7,t,n,e),t.lanes=r,t}function I2(t,e,r,n){return t=Qs(22,t,n,e),t.elementType=BN,t.lanes=r,t.stateNode={isHidden:!1},t}function MC(t,e,r){return t=Qs(6,t,null,e),t.lanes=r,t}function DC(t,e,r){return e=Qs(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Ste(t,e,r,n,s){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=yC(0),this.expirationTimes=yC(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yC(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function z8(t,e,r,n,s,i,o,a,l){return t=new Ste(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Qs(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},k8(i),t}function kte(t,e,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}e(),t.exports=Ms})($Z);const H8=$N(Kr);var xT=Kr;j5.createRoot=xT.createRoot,j5.hydrateRoot=xT.hydrateRoot;const G8=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),L2=m.createContext({});function Tte(){return m.useContext(L2).visualElement}const a0=m.createContext(null),j2=typeof document<"u",Tg=j2?m.useLayoutEffect:m.useEffect,Dj=m.createContext({strict:!1});function Rte(t,e,r,n){const s=Tte(),i=m.useContext(Dj),o=m.useContext(a0),a=m.useContext(G8).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return Tg(()=>{c&&c.render()}),(window.HandoffAppearAnimations?Tg:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Uu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ite(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Uu(r)&&(r.current=n))},[e])}function Qv(t){return typeof t=="string"||Array.isArray(t)}function F2(t){return typeof t=="object"&&typeof t.start=="function"}const Ote=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function B2(t){return F2(t.animate)||Ote.some(e=>Qv(t[e]))}function Nj(t){return Boolean(B2(t)||t.variants)}function Mte(t,e){if(B2(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Qv(r)?r:void 0,animate:Qv(n)?n:void 0}}return t.inherit!==!1?e:{}}function Dte(t){const{initial:e,animate:r}=Mte(t,m.useContext(L2));return m.useMemo(()=>({initial:e,animate:r}),[CT(e),CT(r)])}function CT(t){return Array.isArray(t)?t.join(" "):t}const Uo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Yv={measureLayout:Uo(["layout","layoutId","drag"]),animation:Uo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Uo(["exit"]),drag:Uo(["drag","dragControls"]),focus:Uo(["whileFocus"]),hover:Uo(["whileHover","onHoverStart","onHoverEnd"]),tap:Uo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Uo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Uo(["whileInView","onViewportEnter","onViewportLeave"])};function Nte(t){for(const e in t)e==="projectionNodeConstructor"?Yv.projectionNodeConstructor=t[e]:Yv[e].Component=t[e]}function U2(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const Q1={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Lte=1;function jte(){return U2(()=>{if(Q1.hasEverUpdated)return Lte++})}const K8=m.createContext({});let Fte=class extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}};const Lj=m.createContext({}),Bte=Symbol.for("motionComponentSymbol");function Ute({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&Nte(t);function o(l,c){const f={...m.useContext(G8),...l,layoutId:zte(l)},{isStatic:u}=f;let d=null;const h=Dte(l),v=u?void 0:jte(),y=s(l,u);if(!u&&j2){h.visualElement=Rte(i,y,f,e);const g=m.useContext(Dj).strict,b=m.useContext(Lj);h.visualElement&&(d=h.visualElement.loadFeatures(f,g,t,v,r||Yv.projectionNodeConstructor,b))}return m.createElement(Fte,{visualElement:h.visualElement,props:f},d,m.createElement(L2.Provider,{value:h},n(i,l,v,Ite(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Bte]=i,a}function zte({layoutId:t}){const e=m.useContext(K8).id;return e&&t!==void 0?e+"-"+t:t}function Vte(t){function e(n,s={}){return Ute(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const qte=["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 Q8(t){return typeof t!="string"||t.includes("-")?!1:!!(qte.indexOf(t)>-1||/[A-Z]/.test(t))}const Rg={};function Wte(t){Object.assign(Rg,t)}const Ig=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yh=new Set(Ig);function jj(t,{layout:e,layoutId:r}){return yh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Rg[t]||t==="opacity")}const fs=t=>!!(t!=null&&t.getVelocity),Hte={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gte=(t,e)=>Ig.indexOf(t)-Ig.indexOf(e);function Kte({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Gte);for(const a of e)o+=`${Hte[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function Fj(t){return t.startsWith("--")}const Qte=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Id=(t,e,r)=>Math.min(Math.max(r,t),e),jf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Y1={...jf,transform:t=>Id(0,1,t)},um={...jf,default:1},J1=t=>Math.round(t*1e5)/1e5,Jv=/(-)?([\d]*\.?[\d])+/g,I6=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Yte=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function l0(t){return typeof t=="string"}const c0=t=>({test:e=>l0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ga=c0("deg"),Co=c0("%"),Ce=c0("px"),Jte=c0("vh"),Xte=c0("vw"),ET={...Co,parse:t=>Co.parse(t)/100,transform:t=>Co.transform(t*100)},ST={...jf,transform:Math.round},Bj={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,size:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,rotate:Ga,rotateX:Ga,rotateY:Ga,rotateZ:Ga,scale:um,scaleX:um,scaleY:um,scaleZ:um,skew:Ga,skewX:Ga,skewY:Ga,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:Y1,originX:ET,originY:ET,originZ:Ce,zIndex:ST,fillOpacity:Y1,strokeOpacity:Y1,numOctaves:ST};function Y8(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(Fj(d)){i[d]=h;continue}const v=Bj[d],y=Qte(h,v);if(yh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Kte(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const J8=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function Uj(t,e,r){for(const n in e)!fs(e[n])&&!jj(n,r)&&(t[n]=e[n])}function Zte({transformTemplate:t},e,r){return m.useMemo(()=>{const n=J8();return Y8(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function ere(t,e,r){const n=t.style||{},s={};return Uj(s,n,t),Object.assign(s,Zte(t,e,r)),t.transformValues?t.transformValues(s):s}function tre(t,e,r){const n={},s=ere(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const rre=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],nre=["whileTap","onTap","onTapStart","onTapCancel"],sre=["onPan","onPanStart","onPanSessionStart","onPanEnd"],ire=["whileInView","onViewportEnter","onViewportLeave","viewport"],ore=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","layoutScroll","layoutRoot","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd",...ire,...nre,...rre,...sre]);function Og(t){return ore.has(t)}let zj=t=>!Og(t);function are(t){t&&(zj=e=>e.startsWith("on")?!Og(e):t(e))}try{are(require("@emotion/is-prop-valid").default)}catch{}function lre(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(zj(s)||r===!0&&Og(s)||!e&&!Og(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function kT(t,e,r){return typeof t=="string"?t:Ce.transform(e+r*t)}function cre(t,e,r){const n=kT(e,t.x,t.width),s=kT(r,t.y,t.height);return`${n} ${s}`}const fre={offset:"stroke-dashoffset",array:"stroke-dasharray"},ure={offset:"strokeDashoffset",array:"strokeDasharray"};function dre(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?fre:ure;t[i.offset]=Ce.transform(-n);const o=Ce.transform(e),a=Ce.transform(r);t[i.array]=`${o} ${a}`}function X8(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(Y8(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=cre(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&dre(d,i,o,a,!1)}const Vj=()=>({...J8(),attrs:{}}),Z8=t=>typeof t=="string"&&t.toLowerCase()==="svg";function hre(t,e,r,n){const s=m.useMemo(()=>{const i=Vj();return X8(i,e,{enableHardwareAcceleration:!1},Z8(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};Uj(i,t.style,t),s.style={...i,...s.style}}return s}function vre(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(Q8(r)?hre:tre)(n,o,a,r),u={...lre(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>fs(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const e$=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function qj(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const Wj=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 Hj(t,e,r,n){qj(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(Wj.has(s)?s:e$(s),e.attrs[s])}function t$(t,e){const{style:r}=t,n={};for(const s in r)(fs(r[s])||e.style&&fs(e.style[s])||jj(s,t))&&(n[s]=r[s]);return n}function Gj(t,e){const r=t$(t,e);for(const n in t)if(fs(t[n])||fs(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function r$(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Mg=t=>Array.isArray(t),yre=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),mre=t=>Mg(t)?t[t.length-1]||0:t;function xp(t){const e=fs(t)?t.get():t;return yre(e)?e.toValue():e}function pre({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:gre(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const Kj=t=>(e,r)=>{const n=m.useContext(L2),s=m.useContext(a0),i=()=>pre(t,e,n,s);return r?i():U2(i)};function gre(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=xp(i[d]);let{initial:o,animate:a}=t;const l=B2(t),c=Nj(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!F2(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=r$(t,h);if(!v)return;const{transitionEnd:y,transition:g,...b}=v;for(const p in b){let w=b[p];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[p]=w)}for(const p in y)s[p]=y[p]}),s}const bre={useVisualState:Kj({scrapeMotionValuesFromProps:Gj,createRenderState:Vj,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}}X8(r,n,{enableHardwareAcceleration:!1},Z8(e.tagName),t.transformTemplate),Hj(e,r)}})},wre={useVisualState:Kj({scrapeMotionValuesFromProps:t$,createRenderState:J8})};function xre(t,{forwardMotionProps:e=!1},r,n,s){return{...Q8(t)?bre:wre,preloadedFeatures:r,useRender:vre(e),createVisualElement:n,projectionNodeConstructor:s,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 z2(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function O6(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return z2(s,e,r,n)},[t,e,r,n])}function Cre({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(pt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(pt.Focus,!1)},[r]);O6(e,"focus",t?n:void 0),O6(e,"blur",t?s:void 0)}const Qj=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function n$(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Yj=t=>e=>Qj(e)&&t(e,n$(e));function ad(t,e,r,n){return z2(t,e,Yj(r),n)}function Dg(t,e,r,n){return O6(t,e,r&&Yj(r),n)}function Jj(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const $T=Jj("dragHorizontal"),AT=Jj("dragVertical");function Xj(t){let e=!1;if(t==="y")e=AT();else if(t==="x")e=$T();else{const r=$T(),n=AT();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function Zj(){const t=Xj(!0);return t?(t(),!1):!0}function _T(t,e,r,n){return(s,i)=>{s.type==="touch"||Zj()||(r&&t.animationState&&t.animationState.setActive(pt.Hover,e),n&&n(s,i))}}function Ere({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Dg(n,"pointerenter",m.useMemo(()=>t||r?_T(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Dg(n,"pointerleave",m.useMemo(()=>e||r?_T(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const eF=(t,e)=>e?t===e?!0:eF(t,e.parentElement):!1;function s$(t){return m.useEffect(()=>()=>t(),[])}const Sre=(t,e)=>r=>e(t(r)),V2=(...t)=>t.reduce(Sre);function kre({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!1),!Zj()}function d(y,g){var b,p,w,E;u()&&(eF(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,g):(p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}function h(y,g){var b,p;u()&&((p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}const v=m.useCallback((y,g)=>{var b;if(f(),a.current)return;a.current=!0,l.current=V2(ad(window,"pointerup",d,c),ad(window,"pointercancel",h,c));const p=s.getProps();p.whileTap&&s.animationState&&s.animationState.setActive(pt.Tap,!0),(b=p.onTapStart)===null||b===void 0||b.call(p,y,g)},[Boolean(e),s]);Dg(s,"pointerdown",o?v:void 0,c),s$(f)}const M6=new WeakMap,NC=new WeakMap,$re=t=>{const e=M6.get(t.target);e&&e(t)},Are=t=>{t.forEach($re)};function _re({root:t,...e}){const r=t||document;NC.has(r)||NC.set(r,{});const n=NC.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(Are,{root:t,...e})),n[s]}function Pre(t,e,r){const n=_re(e);return M6.set(t,r),n.observe(t),()=>{M6.delete(t),n.unobserve(t)}}function Tre({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?Ore:Ire)(o,i.current,t,s)}const Rre={some:0,all:1};function Ire(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:Rre[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(pt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return Pre(r.current,a,l)},[t,n,s,i])}function Ore(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(pt.InView,!0)})},[t])}const dl=t=>e=>(t(e),null),Mre={inView:dl(Tre),tap:dl(kre),focus:dl(Cre),hover:dl(Ere)};function tF(){const t=m.useContext(a0);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function rF(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),Nre=t=>/^0[^.\s]+$/.test(t),sa={delta:0,timestamp:0},nF=1/60*1e3,Lre=typeof performance<"u"?()=>performance.now():()=>Date.now(),sF=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(Lre()),nF);function jre(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=jre(()=>Xv=!0),t),{}),zn=f0.reduce((t,e)=>{const r=q2[e];return t[e]=(n,s=!1,i=!1)=>(Xv||Ure(),r.schedule(n,s,i)),t},{}),Ll=f0.reduce((t,e)=>(t[e]=q2[e].cancel,t),{}),LC=f0.reduce((t,e)=>(t[e]=()=>q2[e].process(sa),t),{}),Bre=t=>q2[t].process(sa),iF=t=>{Xv=!1,sa.delta=D6?nF:Math.max(Math.min(t-sa.timestamp,Fre),1),sa.timestamp=t,N6=!0,f0.forEach(Bre),N6=!1,Xv&&(D6=!1,sF(iF))},Ure=()=>{Xv=!0,D6=!0,N6||sF(iF)};function i$(t,e){t.indexOf(e)===-1&&t.push(e)}function o$(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}let a$=class{constructor(){this.subscriptions=[]}add(e){return i$(this.subscriptions,e),()=>o$(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));let Vre=class{constructor(e,r={}){this.version="8.5.2",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sa;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,zn.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>zn.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=zre(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new a$);const n=this.events[e].add(r);return e==="change"?()=>{n(),zn.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?l$(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 Od(t,e){return new Vre(t,e)}const c$=(t,e)=>r=>Boolean(l0(r)&&Yte.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),oF=(t,e,r)=>n=>{if(!l0(n))return n;const[s,i,o,a]=n.match(Jv);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},qre=t=>Id(0,255,t),jC={...jf,transform:t=>Math.round(qre(t))},Qc={test:c$("rgb","red"),parse:oF("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+jC.transform(t)+", "+jC.transform(e)+", "+jC.transform(r)+", "+J1(Y1.transform(n))+")"};function Wre(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const L6={test:c$("#"),parse:Wre,transform:Qc.transform},zu={test:c$("hsl","hue"),parse:oF("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Co.transform(J1(e))+", "+Co.transform(J1(r))+", "+J1(Y1.transform(n))+")"},Mn={test:t=>Qc.test(t)||L6.test(t)||zu.test(t),parse:t=>Qc.test(t)?Qc.parse(t):zu.test(t)?zu.parse(t):L6.parse(t),transform:t=>l0(t)?t:t.hasOwnProperty("red")?Qc.transform(t):zu.transform(t)},aF="${c}",lF="${n}";function Hre(t){var e,r;return isNaN(t)&&l0(t)&&(((e=t.match(Jv))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(I6))===null||r===void 0?void 0:r.length)||0)>0}function Ng(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(I6);s&&(r=s.length,t=t.replace(I6,aF),e.push(...s.map(Mn.parse)));const i=t.match(Jv);return i&&(n=i.length,t=t.replace(Jv,lF),e.push(...i.map(jf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function cF(t){return Ng(t).values}function fF(t){const{values:e,numColors:r,tokenised:n}=Ng(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function Kre(t){const e=cF(t);return fF(t)(e.map(Gre))}const jl={test:Hre,parse:cF,createTransformer:fF,getAnimatableNone:Kre},Qre=new Set(["brightness","contrast","saturate","opacity"]);function Yre(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Jv)||[];if(!n)return t;const s=r.replace(n,"");let i=Qre.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const Jre=/([a-z-]*)\(.*?\)/g,j6={...jl,getAnimatableNone:t=>{const e=t.match(Jre);return e?e.map(Yre).join(" "):t}},Xre={...Bj,color:Mn,backgroundColor:Mn,outlineColor:Mn,fill:Mn,stroke:Mn,borderColor:Mn,borderTopColor:Mn,borderRightColor:Mn,borderBottomColor:Mn,borderLeftColor:Mn,filter:j6,WebkitFilter:j6},f$=t=>Xre[t];function u$(t,e){var r;let n=f$(t);return n!==j6&&(n=jl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const uF=t=>e=>e.test(t),Zre={test:t=>t==="auto",parse:t=>t},dF=[jf,Ce,Co,Ga,Xte,Jte,Zre],l1=t=>dF.find(uF(t)),ene=[...dF,Mn,jl],tne=t=>ene.find(uF(t));function rne(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function nne(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function W2(t,e,r){const n=t.getProps();return r$(n,e,r!==void 0?r:n.custom,rne(t),nne(t))}function sne(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,Od(r))}function ine(t,e){const r=W2(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=mre(i[o]);sne(t,o,a)}}function one(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,une={current:!1},d$=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,h$=t=>e=>1-t(1-e),v$=t=>t*t,dne=h$(v$),y$=d$(v$),wr=(t,e,r)=>-r*t+r*e+t;function FC(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 hne({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=FC(l,a,t+1/3),i=FC(l,a,t),o=FC(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const BC=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},vne=[L6,Qc,zu],yne=t=>vne.find(e=>e.test(t));function PT(t){const e=yne(t);let r=e.parse(t);return e===zu&&(r=hne(r)),r}const vF=(t,e)=>{const r=PT(t),n=PT(e),s={...r};return i=>(s.red=BC(r.red,n.red,i),s.green=BC(r.green,n.green,i),s.blue=BC(r.blue,n.blue,i),s.alpha=wr(r.alpha,n.alpha,i),Qc.transform(s))};function yF(t,e){return typeof t=="number"?r=>wr(t,e,r):Mn.test(t)?vF(t,e):pF(t,e)}const mF=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>yF(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=yF(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},pF=(t,e)=>{const r=jl.createTransformer(e),n=Ng(t),s=Ng(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?V2(mF(n.values,s.values),r):o=>`${o>0?e:t}`},jg=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},TT=(t,e)=>r=>wr(t,e,r);function pne(t){return typeof t=="number"?TT:typeof t=="string"?Mn.test(t)?vF:pF:Array.isArray(t)?mF:typeof t=="object"?mne:TT}function gne(t,e,r){const n=[],s=r||pne(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=gne(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Id(t[0],t[i-1],c)):l}const m$=t=>t,bF=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,bne=1e-7,wne=12;function xne(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=bF(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>bne&&++axne(i,0,1,t,r);return i=>i===0||i===1?i:bF(s(i),e,n)}const xF=t=>1-Math.sin(Math.acos(t)),p$=h$(xF),Cne=d$(p$),CF=wF(.33,1.53,.69,.99),g$=h$(CF),Ene=d$(g$),Sne=t=>(t*=2)<1?.5*g$(t):.5*(2-Math.pow(2,-10*(t-1))),kne={linear:m$,easeIn:v$,easeInOut:y$,easeOut:dne,circIn:xF,circInOut:Cne,circOut:p$,backIn:g$,backInOut:Ene,backOut:CF,anticipate:Sne},RT=t=>{if(Array.isArray(t)){Fl(t.length===4);const[e,r,n,s]=t;return wF(e,r,n,s)}else if(typeof t=="string")return kne[t];return t},$ne=t=>Array.isArray(t)&&typeof t[0]!="number";function Ane(t,e){return t.map(()=>e||y$).splice(0,t.length-1)}function _ne(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function Pne(t,e){return t.map(r=>r*e)}function F6({keyframes:t,ease:e=y$,times:r,duration:n=300}){t=[...t];const s=$ne(e)?e.map(RT):RT(e),i={done:!1,value:t[0]},o=Pne(r&&r.length===t.length?r:_ne(t),n);function a(){return gF(o,t,{ease:Array.isArray(s)?s:Ane(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const UC=.001,Tne=.01,IT=10,Rne=.05,Ine=1;function One({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hF(t<=IT*1e3);let o=1-e;o=Id(Rne,Ine,o),t=Id(Tne,IT,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=B6(c,o),v=Math.exp(-u);return UC-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=B6(Math.pow(c,2),o);return(-s(c)+UC>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-UC+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=Dne(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const Mne=12;function Dne(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function jne(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!OT(t,Lne)&&OT(t,Nne)){const r=One(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const Fne=5;function EF({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=jne(n);let h=Bne,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function g(){const b=i-s,p=Math.sqrt(a/c)/1e3,w=Math.abs(b)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=B6(p,y);h=k=>{const $=Math.exp(-y*p*k);return i-$*((v+y*p*b)/E*Math.sin(E*k)+b*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-p*E)*(b+(v+p*b)*E);else{const E=p*Math.sqrt(y*y-1);h=k=>{const $=Math.exp(-y*p*k),x=Math.min(E*k,300);return i-$*((v+y*p*b)*Math.sinh(x)+E*b*Math.cosh(x))/E}}}return g(),{next:b=>{const p=h(b);if(d)o.done=b>=u;else{let w=v;if(b!==0)if(y<1){const $=Math.max(0,b-Fne);w=l$(p-h($),b-$)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-p)<=e;o.done=E&&k}return o.value=o.done?i:p,o},flipTarget:()=>{v=-v,[s,i]=[i,s],g()}}}EF.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const Bne=t=>0;function Une({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const zne={decay:Une,keyframes:F6,tween:F6,spring:EF};function SF(t,e,r=0){return t-e-r}function Vne(t,e=0,r=0,n=!0){return n?SF(e+-t,e,r):e-(t-e)+r}function qne(t,e,r,n){return n?t>=e+r:t<=-r}const Wne=t=>{const e=({delta:r})=>t(r);return{start:()=>zn.update(e,!0),stop:()=>Ll.update(e)}};function Fg({duration:t,driver:e=Wne,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,g;const b=r;let p,w=0,E=t,k=!1,$=!0,x;const T=zne[o.length>2?"keyframes":h]||F6,B=o[0],L=o[o.length-1];let U={done:!1,value:B};!((g=(y=T).needsInterpolation)===null||g===void 0)&&g.call(y,B,L)&&(x=gF([0,100],[B,L],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?($=w%2===0,r=Vne(r,E,i,$)):(r=SF(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function C(){p&&p.stop(),f&&f()}function S(M){$||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),x&&(U.value=x(U.value)),k=$?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),p&&p.stop()},set currentTime(M){r=b,S(M)},sample:M=>{r=b;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const F=M-I;S(Math.min(F,_)),I+=_}return U}}}function Hne(t){return!t||Array.isArray(t)||typeof t=="string"&&kF[t]}const M1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,kF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:M1([0,.65,.55,1]),circOut:M1([.55,0,1,.45]),backIn:M1([.31,.01,.66,-.59]),backOut:M1([.33,1.53,.69,.99])};function Gne(t){if(t)return Array.isArray(t)?M1(t):kF[t]}function Kne(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:Gne(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const MT={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},zC={},$F={};for(const t in MT)$F[t]=()=>(zC[t]===void 0&&(zC[t]=MT[t]()),zC[t]);function Qne(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const Yne=new Set(["opacity"]),dm=10;function Jne(t,e,{onUpdate:r,onComplete:n,...s}){if(!($F.waapi()&&Yne.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!Hne(s.ease)){if(s.repeat===1/0)return;const u=Fg({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=dm;o=h,a=v-dm,c="linear"}const f=Kne(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(Qne(o,s)),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=Fg({...s,autoplay:!1});t.setWithVelocity(d.sample(u-dm).value,d.sample(u).value,dm)}zn.update(()=>f.cancel())}}}function AF(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ll.read(n),t(i-e))};return zn.read(n,!0),()=>Ll.read(n)}function Xne({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:AF(s,-e)}:s()}function Zne({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function g(E){return r!==void 0&&En}function b(E){return r===void 0?n:n===void 0||Math.abs(r-E){var $;u==null||u(k),($=E.onUpdate)===null||$===void 0||$.call(E,k)},onComplete:d,onStop:h})}function w(E){p({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(g(v))w({velocity:e,keyframes:[v,b(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=b(E),$=k===r?-1:1;let x,T;const B=L=>{x=T,T=L,e=l$(L-x,sa.delta),($===1&&L>k||$===-1&&Ly==null?void 0:y.stop()}}const kc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),hm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),VC=()=>({type:"keyframes",ease:"linear",duration:.3}),ese={type:"keyframes",duration:.8},DT={x:kc,y:kc,z:kc,rotate:kc,rotateX:kc,rotateY:kc,rotateZ:kc,scaleX:hm,scaleY:hm,scale:hm,opacity:VC,backgroundColor:VC,color:VC,default:hm},tse=(t,{keyframes:e})=>e.length>2?ese:(DT[t]||DT.default)(e[1]),U6=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&jl.test(e)&&!e.startsWith("url("));function rse({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function NT(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function LT(t){return typeof t=="number"?0:u$("",t)}function _F(t,e){return t[e]||t.default||t}function nse(t,e,r,n){const s=U6(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=u$(e,r):NT(i)&&typeof r=="string"?i=LT(r):!Array.isArray(r)&&NT(r)&&typeof i=="string"&&(r=LT(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const b$=(t,e,r,n={})=>s=>{const i=_F(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Cp(o);const l=nse(e,t,r,i),c=l[0],f=l[l.length-1],u=U6(t,c),d=U6(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:g=>{e.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||une.current||i.type===!1)return Xne(h);if(i.type==="inertia")return Zne(h);rse(i)||(h={...h,...tse(t,h)}),h.duration&&(h.duration=Cp(h.duration)),h.repeatDelay&&(h.repeatDelay=Cp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const g=Jne(e,t,h);if(g)return g}return Fg(h)};function sse(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>z6(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=z6(t,e,r);else{const s=typeof e=="function"?W2(t,e,r.custom):e;n=PF(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function z6(t,e,r={}){var n;const s=W2(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>PF(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return ise(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function PF(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&ase(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=t.getProps()[fne];b&&(y.elapsed=window.HandoffAppearAnimations(b,d,h,zn))}let g=h.start(b$(d,h,v,t.shouldReduceMotion&&yh.has(d)?{type:!1}:y));Lg(c)&&(c.add(d),g=g.then(()=>c.remove(d))),f.push(g)}return Promise.all(f).then(()=>{a&&ine(t,a)})}function ise(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(ose).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(z6(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function ose(t,e){return t.sortNodePosition(e)}function ase({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const w$=[pt.Animate,pt.InView,pt.Focus,pt.Hover,pt.Tap,pt.Drag,pt.Exit],lse=[...w$].reverse(),cse=w$.length;function fse(t){return e=>Promise.all(e.map(({animation:r,options:n})=>sse(t,r,n)))}function use(t){let e=fse(t);const r=hse();let n=!0;const s=(l,c)=>{const f=W2(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let b=0;by&&k;const L=Array.isArray(E)?E:[E];let U=L.reduce(s,{});$===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},C=S=>{B=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Mg(R)&&Mg(M)?!rF(R,M)||T?C(S):w.protectedKeys[S]=!0:R!==void 0?C(S):h.add(S):R!==void 0&&h.has(S)?C(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(B=!1),B&&!x&&d.push(...L.map(S=>({animation:S,options:{type:p,...l}})))}if(h.size){const b={};h.forEach(p=>{const w=t.getBaseTarget(p);w!==void 0&&(b[p]=w)}),d.push({animation:b})}let g=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function dse(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!rF(e,t):!1}function $c(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hse(){return{[pt.Animate]:$c(!0),[pt.InView]:$c(),[pt.Hover]:$c(),[pt.Tap]:$c(),[pt.Drag]:$c(),[pt.Focus]:$c(),[pt.Exit]:$c()}}const vse={animation:dl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=use(t)),F2(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:dl(t=>{const{custom:e,visualElement:r}=t,[n,s]=tF(),i=m.useContext(a0);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(pt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},jT=(t,e)=>Math.abs(t-e);function yse(t,e){const r=jT(t.x,e.x),n=jT(t.y,e.y);return Math.sqrt(r**2+n**2)}let TF=class{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 c=WC(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=yse(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=sa;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=qC(f,this.transformPagePoint),zn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=WC(c.type==="pointercancel"?this.lastMoveEventInfo:qC(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!Qj(e))return;this.handlers=r,this.transformPagePoint=n;const s=n$(e),i=qC(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=sa;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,WC(i,this.history)),this.removeListeners=V2(ad(window,"pointermove",this.handlePointerMove),ad(window,"pointerup",this.handlePointerUp),ad(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ll.update(this.updatePoint)}};function qC(t,e){return e?{point:e(t.point)}:t}function FT(t,e){return{x:t.x-e.x,y:t.y-e.y}}function WC({point:t},e){return{point:t,delta:FT(t,RF(e)),offset:FT(t,mse(e)),velocity:pse(e,.1)}}function mse(t){return t[0]}function RF(t){return t[t.length-1]}function pse(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=RF(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Cp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Is(t){return t.max-t.min}function V6(t,e=0,r=.01){return Math.abs(t-e)<=r}function BT(t,e,r,n=.5){t.origin=n,t.originPoint=wr(e.min,e.max,t.origin),t.scale=Is(r)/Is(e),(V6(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=wr(r.min,r.max,t.origin)-t.originPoint,(V6(t.translate)||isNaN(t.translate))&&(t.translate=0)}function X1(t,e,r,n){BT(t.x,e.x,r.x,n==null?void 0:n.originX),BT(t.y,e.y,r.y,n==null?void 0:n.originY)}function UT(t,e,r){t.min=r.min+e.min,t.max=t.min+Is(e)}function gse(t,e,r){UT(t.x,e.x,r.x),UT(t.y,e.y,r.y)}function zT(t,e,r){t.min=e.min-r.min,t.max=t.min+Is(e)}function Z1(t,e,r){zT(t.x,e.x,r.x),zT(t.y,e.y,r.y)}function bse(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?wr(r,t,n.max):Math.min(t,r)),t}function VT(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 wse(t,{top:e,left:r,bottom:n,right:s}){return{x:VT(t.x,r,s),y:VT(t.y,e,n)}}function qT(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=jg(e.min,e.max-n,t.min):n>s&&(r=jg(t.min,t.max-s,e.min)),Id(0,1,r)}function Ese(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 q6=.35;function Sse(t=q6){return t===!1?t=0:t===!0&&(t=q6),{x:WT(t,"left","right"),y:WT(t,"top","bottom")}}function WT(t,e,r){return{min:HT(t,e),max:HT(t,r)}}function HT(t,e){return typeof t=="number"?t:t[e]||0}const GT=()=>({translate:0,scale:1,origin:0,originPoint:0}),ev=()=>({x:GT(),y:GT()}),KT=()=>({min:0,max:0}),Fr=()=>({x:KT(),y:KT()});function no(t){return[t("x"),t("y")]}function IF({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function kse({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function $se(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 HC(t){return t===void 0||t===1}function W6({scale:t,scaleX:e,scaleY:r}){return!HC(t)||!HC(e)||!HC(r)}function Oc(t){return W6(t)||OF(t)||t.z||t.rotate||t.rotateX||t.rotateY}function OF(t){return QT(t.x)||QT(t.y)}function QT(t){return t&&t!=="0%"}function Bg(t,e,r){const n=t-r,s=e*n;return r+s}function YT(t,e,r,n,s){return s!==void 0&&(t=Bg(t,s,n)),Bg(t,r,n)+e}function H6(t,e=0,r=1,n,s){t.min=YT(t.min,e,r,n,s),t.max=YT(t.max,e,r,n,s)}function MF(t,{x:e,y:r}){H6(t.x,e.translate,e.scale,e.originPoint),H6(t.y,r.translate,r.scale,r.originPoint)}function Ase(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function rl(t,e){t.min=t.min+e,t.max=t.max+e}function XT(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=wr(t.min,t.max,i);H6(t,e[r],e[n],o,e.scale)}const _se=["x","scaleX","originX"],Pse=["y","scaleY","originY"];function Vu(t,e){XT(t.x,e,_se),XT(t.y,e,Pse)}function DF(t,e){return IF($se(t.getBoundingClientRect(),e))}function Tse(t,e,r){const n=DF(t,r),{scroll:s}=e;return s&&(rl(n.x,s.offset.x),rl(n.y,s.offset.y)),n}const Rse=new WeakMap;let Ise=class{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=Fr(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(n$(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xj(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),no(h=>{var v,y;let g=this.getAxisMotionValue(h).get()||0;if(Co.test(g)){const b=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];b&&(g=Is(b)*(parseFloat(g)/100))}this.originPoint[h]=g}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(pt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=Ose(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new TF(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(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:s}=this.getProps();if(!n||!vm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=bse(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Uu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=wse(n.layoutBox,e):this.constraints=!1,this.elastic=Sse(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&no(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=Ese(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Uu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Tse(n,s.root,this.visualElement.getTransformPagePoint());let o=xse(s.layout.layoutBox,i);if(r){const a=r(kse(o));this.hasMutatedConstraints=!!a,a&&(o=IF(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=no(f=>{if(!vm(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(b$(e,n,0,r))}stopAnimation(){no(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){no(r=>{const{drag:n}=this.getProps();if(!vm(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-wr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Uu(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};no(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=Cse({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),no(a=>{if(!vm(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(wr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;Rse.set(this.visualElement,this);const r=this.visualElement.current,n=ad(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Uu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=z2(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(no(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=q6,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}};function vm(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function Ose(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function Mse(t){const{dragControls:e,visualElement:r}=t,n=U2(()=>new Ise(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function Dse({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(G8),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new TF(f,l,{transformPagePoint:a})}Dg(s,"pointerdown",i&&c),s$(()=>o.current&&o.current.end())}const Nse={pan:dl(Dse),drag:dl(Mse)};function G6(t){return typeof t=="string"&&t.startsWith("var(--")}const NF=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Lse(t){const e=NF.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function K6(t,e,r=1){const[n,s]=Lse(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():G6(s)?K6(s,e,r+1):s}function jse(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!G6(i))return;const o=K6(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!G6(i))continue;const o=K6(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const Fse=new Set(["width","height","top","left","right","bottom","x","y"]),LF=t=>Fse.has(t),Bse=t=>Object.keys(t).some(LF),ZT=t=>t===jf||t===Ce;var e7;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(e7||(e7={}));const t7=(t,e)=>parseFloat(t.split(", ")[e]),r7=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return t7(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?t7(i[1],t):0}},Use=new Set(["x","y","z"]),zse=Ig.filter(t=>!Use.has(t));function Vse(t){const e=[];return zse.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 n7={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:r7(4,13),y:r7(5,14)},qse=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=n7[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=n7[c](l,i)}),t},Wse=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(LF);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=l1(f);const d=e[l];let h;if(Mg(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=l1(f);for(let g=y;g=0?window.pageYOffset:null,c=qse(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),j2&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function Hse(t,e,r,n){return Bse(e)?Wse(t,e,r,n):{target:e,transitionEnd:n}}const Gse=(t,e,r,n)=>{const s=jse(t,e,n);return e=s.target,n=s.transitionEnd,Hse(t,e,r,n)},Q6={current:null},jF={current:!1};function Kse(){if(jF.current=!0,!!j2)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Q6.current=t.matches;t.addListener(e),e()}else Q6.current=!1}function Qse(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(fs(i))t.addValue(s,i),Lg(n)&&n.add(s);else if(fs(o))t.addValue(s,Od(i,{owner:t})),Lg(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,Od(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const FF=Object.keys(Yv),Yse=FF.length,s7=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Jse=class{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){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=()=>zn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;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=i,this.isControllingVariants=B2(r),this.isVariantNode=Nj(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&fs(u)&&(u.set(o[f],!1),Lg(l)&&l.add(f))}}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,s)=>this.bindToMotionValue(s,n)),jF.current||Kse(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Q6.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(),Ll.update(this.notifyUpdate),Ll.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=yh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&zn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fr()}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=Od(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,s=typeof n=="string"||typeof n=="object"?(r=r$(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!fs(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new a$),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}};const BF=["initial",...w$],Xse=BF.length;let UF=class extends Jse{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:s},i){let o=lne(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){one(this,n,o);const a=Gse(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}};function Zse(t){return window.getComputedStyle(t)}let eie=class extends UF{readValueFromInstance(e,r){if(yh.has(r)){const n=f$(r);return n&&n.default||0}else{const n=Zse(e),s=(Fj(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return DF(e,r)}build(e,r,n,s){Y8(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return t$(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;fs(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){qj(e,r,n,s)}},tie=class extends UF{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return yh.has(r)?((n=f$(r))===null||n===void 0?void 0:n.default)||0:(r=Wj.has(r)?r:e$(r),e.getAttribute(r))}measureInstanceViewportBox(){return Fr()}scrapeMotionValuesFromProps(e,r){return Gj(e,r)}build(e,r,n,s){X8(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){Hj(e,r,n,s)}mount(e){this.isSVGTag=Z8(e.tagName),super.mount(e)}};const rie=(t,e)=>Q8(t)?new tie(e,{enableHardwareAcceleration:!1}):new eie(e,{enableHardwareAcceleration:!0});function i7(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const c1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ce.test(t))t=parseFloat(t);else return t;const r=i7(t,e.target.x),n=i7(t,e.target.y);return`${r}% ${n}%`}},o7="_$css",nie={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(NF,h=>(i.push(h),o7)));const o=jl.parse(t);if(o.length>5)return n;const a=jl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=wr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(o7,()=>{const v=i[h];return h++,v})}return d}};let sie=class extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Wte(oie),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Q1.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||zn.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}};function iie(t){const[e,r]=tF(),n=m.useContext(K8);return P.createElement(sie,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(Lj),isPresent:e,safeToRemove:r})}const oie={borderRadius:{...c1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:c1,borderTopRightRadius:c1,borderBottomLeftRadius:c1,borderBottomRightRadius:c1,boxShadow:nie},aie={measureLayout:iie};function lie(t,e,r={}){const n=fs(t)?t:Od(t);return n.start(b$("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const zF=["TopLeft","TopRight","BottomLeft","BottomRight"],cie=zF.length,a7=t=>typeof t=="string"?parseFloat(t):t,l7=t=>typeof t=="number"||Ce.test(t);function fie(t,e,r,n,s,i){s?(t.opacity=wr(0,r.opacity!==void 0?r.opacity:1,uie(n)),t.opacityExit=wr(e.opacity!==void 0?e.opacity:1,0,die(n))):i&&(t.opacity=wr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(jg(t,e,n))}function f7(t,e){t.min=e.min,t.max=e.max}function yi(t,e){f7(t.x,e.x),f7(t.y,e.y)}function u7(t,e,r,n,s){return t-=e,t=Bg(t,1/r,n),s!==void 0&&(t=Bg(t,1/s,n)),t}function hie(t,e=0,r=1,n=.5,s,i=t,o=t){if(Co.test(e)&&(e=parseFloat(e),e=wr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=wr(i.min,i.max,n);t===i&&(a-=e),t.min=u7(t.min,e,r,a,s),t.max=u7(t.max,e,r,a,s)}function d7(t,e,[r,n,s],i,o){hie(t,e[r],e[n],e[s],e.scale,i,o)}const vie=["x","scaleX","originX"],yie=["y","scaleY","originY"];function h7(t,e,r,n){d7(t.x,e,vie,r==null?void 0:r.x,n==null?void 0:n.x),d7(t.y,e,yie,r==null?void 0:r.y,n==null?void 0:n.y)}function v7(t){return t.translate===0&&t.scale===1}function qF(t){return v7(t.x)&&v7(t.y)}function WF(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 y7(t){return Is(t.x)/Is(t.y)}let mie=class{constructor(){this.members=[]}add(e){i$(this.members,e),e.scheduleRender()}remove(e){if(o$(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function m7(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}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 pie=(t,e)=>t.depth-e.depth;let gie=class{constructor(){this.children=[],this.isDirty=!1}add(e){i$(this.children,e),this.isDirty=!0}remove(e){o$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(pie),this.isDirty=!1,this.children.forEach(e)}};const p7=["","X","Y","Z"],g7=1e3;let bie=0;function HF({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=bie++,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(Cie),this.nodes.forEach(kie),this.nodes.forEach($ie)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=AF(h,250),Q1.hasAnimatedSinceResize&&(Q1.hasAnimatedSinceResize=!1,this.nodes.forEach(w7))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var g,b,p,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(b=(g=this.options.transition)!==null&&g!==void 0?g:u.getDefaultTransition())!==null&&b!==void 0?b:Rie,{onLayoutAnimationStart:$,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!WF(this.targetLayout,y)||v,B=!h&&v;if(this.options.layoutRoot||!((p=this.resumeFrom)===null||p===void 0)&&p.instance||B||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const L={..._F(k,"layout"),onPlay:$,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!h&&this.animationProgress===0&&w7(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}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,Ll.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(Aie),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.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 l=0;l{var w;const E=p/1e3;x7(h.x,o.x,E),x7(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(Z1(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pie(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,fie(d,u,this.latestValues,E,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ll.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zn.update(()=>{Q1.hasAnimatedSinceResize=!0,this.currentAnimation=lie(0,g7,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.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,g7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&GF(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Fr();const u=Is(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Is(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}yi(a,l),Vu(a,f),X1(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new mie),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,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:l}={}){const c=this.getStack();c&&c.promote(this,l),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:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(b7),this.root.sharedNodes.clear()}}}function wie(t){t.updateLayout()}function xie(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(v);v.min=i[h].min,v.max=v.min+y}):GF(a,s.layoutBox,i)&&no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(i[h]);v.max=v.min+y});const c=ev();X1(c,i,s.layoutBox);const f=ev();l?X1(f,t.applyTransform(o,!0),s.measuredBox):X1(f,i,s.layoutBox);const u=!qF(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const g=Fr();Z1(g,s.layoutBox,v.layoutBox);const b=Fr();Z1(b,i,y.layoutBox),WF(g,b)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=g,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function Cie(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function Eie(t){t.clearSnapshot()}function b7(t){t.clearMeasurements()}function Sie(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function w7(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function kie(t){t.resolveTargetDelta()}function $ie(t){t.calcProjection()}function Aie(t){t.resetRotation()}function _ie(t){t.removeLeadSnapshot()}function x7(t,e,r){t.translate=wr(e.translate,0,r),t.scale=wr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function C7(t,e,r,n){t.min=wr(e.min,r.min,n),t.max=wr(e.max,r.max,n)}function Pie(t,e,r,n){C7(t.x,e.x,r.x,n),C7(t.y,e.y,r.y,n)}function Tie(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Rie={duration:.45,ease:[.4,0,.1,1]};function Iie(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function E7(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function Oie(t){E7(t.x),E7(t.y)}function GF(t,e,r){return t==="position"||t==="preserve-aspect"&&!V6(y7(e),y7(r),.2)}const Mie=HF({attachResizeListener:(t,e)=>z2(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),GC={current:void 0},Die=HF({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!GC.current){const t=new Mie(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),GC.current=t}return GC.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),Nie={...vse,...Mre,...Nse,...aie},Zv=Vte((t,e)=>xre(t,e,Nie,rie,Die));function KF(){const t=m.useRef(!1);return Tg(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Lie(){const t=KF(),[e,r]=m.useState(0),n=m.useCallback(()=>{t.current&&r(e+1)},[e]);return[m.useCallback(()=>zn.postRender(n),[n]),e]}class jie extends m.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 Fie({children:t,isPresent:e}){const r=m.useId(),n=m.useRef(null),s=m.useRef({width:0,height:0,top:0,left:0});return m.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:l}=s.current;if(e||!n.current||!i||!o)return;n.current.dataset.motionPopId=r;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${i}px !important; @@ -55,7 +45,7 @@ Error generating stack: `+i.message+` top: ${a}px !important; left: ${l}px !important; } - `),()=>{document.head.removeChild(c)}},[e]),m.createElement(Gfe,{isPresent:e,childRef:n,sizeRef:s},m.cloneElement(t,{ref:n}))}const fE=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=Q2(Qfe),l=m.useId(),c=m.useMemo(()=>({id:l,initial:e,isPresent:r,custom:s,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),i?void 0:[r]);return m.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),m.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=m.createElement(Kfe,{isPresent:r},t)),m.createElement(u0.Provider,{value:c},t)};function Qfe(){return new Map}const Su=t=>t.key||"";function Yfe(t,e){t.forEach(r=>{const n=Su(r);e.set(n,r)})}function Jfe(t){const e=[];return m.Children.forEach(t,r=>{m.isValidElement(r)&&e.push(r)}),e}const ew=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=Hfe();const l=m.useContext(v$).forceRender;l&&(a=l);const c=$U(),f=Jfe(t);let u=f;const d=new Set,h=m.useRef(u),v=m.useRef(new Map).current,y=m.useRef(!0);if(Vg(()=>{y.current=!1,Yfe(f,v),h.current=u}),S$(()=>{y.current=!0,v.clear(),d.clear()}),y.current)return m.createElement(m.Fragment,null,u.map(w=>m.createElement(fE,{key:Su(w),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},w)));u=[...u];const b=h.current.map(Su),p=f.map(Su),g=b.length;for(let w=0;w{if(p.indexOf(w)!==-1)return;const E=v.get(w);if(!E)return;const k=b.indexOf(w),$=()=>{v.delete(w),d.delete(w);const C=h.current.findIndex(T=>T.key===w);if(h.current.splice(C,1),!d.size){if(h.current=f,c.current===!1)return;a(),n&&n()}};u.splice(k,0,m.createElement(fE,{key:Su(E),isPresent:!1,onExitComplete:$,custom:e,presenceAffectsLayout:i,mode:o},E))}),u=u.map(w=>{const E=w.key;return d.has(E)?w:m.createElement(fE,{key:Su(w),isPresent:!0,presenceAffectsLayout:i,mode:o},w)}),m.createElement(m.Fragment,null,d.size?u:u.map(w=>m.cloneElement(w)))};var ho=function(){return ho=Object.assign||function(e){for(var r,n=1,s=arguments.length;nfunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=uE({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var b of y.mappings)f[b]=v,u[b]==null&&delete u[b]}}var p=d?uE(uE({},f),u):l,g=function(){var $=p[w],C=s[w];try{if(C.mappings)return"continue";if(typeof $=="string"||typeof $=="number")c.push(C.values[$].defaultClass);else if(Array.isArray($))for(var T=0;T<$.length;T++){var j=$[T];if(j!=null){var F=C.responsiveArray[T];c.push(C.values[j].conditions[F])}}else for(var U in $){var V=$[U];V!=null&&c.push(C.values[V].conditions[U])}}catch(N){throw N}};for(var w in p)var E=g();return t(c.join(" "))};return Object.assign(a,{properties:new Set(i)})},sue=t=>t,iue=function(){return nue(sue)(...arguments)},_U=iue({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 oue=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],f3=t=>(t.display||(t.display=Object.keys(t).some(e=>oue.includes(e))?"flex":void 0),_U(t));f3.properties=_U.properties;function PU(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:s,...i}=t,o={},a={};for(const c in i)f3.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=f3({...o,...n});return m.createElement(r,{className:Ns(l,s),...a,ref:e})});var TU={exports:{}},y1={};/** + `),()=>{document.head.removeChild(c)}},[e]),m.createElement(jie,{isPresent:e,childRef:n,sizeRef:s},m.cloneElement(t,{ref:n}))}const KC=({children:t,initial:e,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=U2(Bie),l=m.useId(),c=m.useMemo(()=>({id:l,initial:e,isPresent:r,custom:s,onExitComplete:f=>{a.set(f,!0);for(const u of a.values())if(!u)return;n&&n()},register:f=>(a.set(f,!1),()=>a.delete(f))}),i?void 0:[r]);return m.useMemo(()=>{a.forEach((f,u)=>a.set(u,!1))},[r]),m.useEffect(()=>{!r&&!a.size&&n&&n()},[r]),o==="popLayout"&&(t=m.createElement(Fie,{isPresent:r},t)),m.createElement(a0.Provider,{value:c},t)};function Bie(){return new Map}const Cu=t=>t.key||"";function Uie(t,e){t.forEach(r=>{const n=Cu(r);e.set(n,r)})}function zie(t){const e=[];return m.Children.forEach(t,r=>{m.isValidElement(r)&&e.push(r)}),e}const H2=({children:t,custom:e,initial:r=!0,onExitComplete:n,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{s&&(o="wait");let[a]=Lie();const l=m.useContext(K8).forceRender;l&&(a=l);const c=KF(),f=zie(t);let u=f;const d=new Set,h=m.useRef(u),v=m.useRef(new Map).current,y=m.useRef(!0);if(Tg(()=>{y.current=!1,Uie(f,v),h.current=u}),s$(()=>{y.current=!0,v.clear(),d.clear()}),y.current)return m.createElement(m.Fragment,null,u.map(w=>m.createElement(KC,{key:Cu(w),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:i,mode:o},w)));u=[...u];const g=h.current.map(Cu),b=f.map(Cu),p=g.length;for(let w=0;w{if(b.indexOf(w)!==-1)return;const E=v.get(w);if(!E)return;const k=g.indexOf(w),$=()=>{v.delete(w),d.delete(w);const x=h.current.findIndex(T=>T.key===w);if(h.current.splice(x,1),!d.size){if(h.current=f,c.current===!1)return;a(),n&&n()}};u.splice(k,0,m.createElement(KC,{key:Cu(E),isPresent:!1,onExitComplete:$,custom:e,presenceAffectsLayout:i,mode:o},E))}),u=u.map(w=>{const E=w.key;return d.has(E)?w:m.createElement(KC,{key:Cu(w),isPresent:!0,presenceAffectsLayout:i,mode:o},w)}),m.createElement(m.Fragment,null,d.size?u:u.map(w=>m.cloneElement(w)))};var ho=function(){return ho=Object.assign||function(e){for(var r,n=1,s=arguments.length;nfunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=QC({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var g of y.mappings)f[g]=v,u[g]==null&&delete u[g]}}var b=d?QC(QC({},f),u):l,p=function(){var $=b[w],x=s[w];try{if(x.mappings)return"continue";if(typeof $=="string"||typeof $=="number")c.push(x.values[$].defaultClass);else if(Array.isArray($))for(var T=0;T<$.length;T++){var B=$[T];if(B!=null){var L=x.responsiveArray[T];c.push(x.values[B].conditions[L])}}else for(var U in $){var V=$[U];V!=null&&c.push(x.values[V].conditions[U])}}catch(N){throw N}};for(var w in b)var E=p();return t(c.join(" "))};return Object.assign(a,{properties:new Set(i)})},Qie=t=>t,Yie=function(){return Kie(Qie)(...arguments)},YF=Yie({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 Jie=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],Y6=t=>(t.display||(t.display=Object.keys(t).some(e=>Jie.includes(e))?"flex":void 0),YF(t));Y6.properties=YF.properties;function JF(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:s,...i}=t,o={},a={};for(const c in i)Y6.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=Y6({...o,...n});return m.createElement(r,{className:Ns(l,s),...a,ref:e})});var XF={exports:{}},f1={};/** * @license React * react-jsx-runtime.production.min.js * @@ -63,8 +53,8 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var A9;function aue(){if(A9)return y1;A9=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return y1.Fragment=r,y1.jsx=o,y1.jsxs=o,y1}TU.exports=aue();var Y=TU.exports;function lue(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 cue(t){var e=lue(t,"string");return typeof e=="symbol"?e:String(e)}function fue(t,e,r){return e=cue(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _9(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function P9(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},hr=t=>{var e=r=>{var n=t.defaultClassName,s=P9(P9({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)uue(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return T9(t.variantClassNames,r=>T9(r,n=>n.split(" ")[0]))}},e};hr({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 ly=t=>{const{color:e="backgroundMuted",marginY:r="4",...n}=t;return Y.jsx(W,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var due=hr({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=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=Zfe[n];return Y.jsx(W,{as:r,className:Ns(s,due({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var hue=hr({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 nt=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:b="button",...p}=t,g=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return Y.jsx(W,{as:r,className:Ns(s,hue({activeOutline:n,disabled:i||l,hasLeftIcon:g,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:b,width:v,...p,children:E?Y.jsx(f,{size:k}):Y.jsxs(W,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[Y.jsxs(W,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:k}),Y.jsx(re,{children:c})]}),u&&Y.jsx(u,{size:k})]})})});var vue=hr({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 Oo=m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(W,{className:Ns(r,vue({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>yue(r,e))}function Kt(...t){return m.useCallback(RU(...t),t)}function _n(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,b=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:b},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,mue(s,...e)]}function mue(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Se(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function ri(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Ul({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=pue({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=ri(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function pue({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=ri(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function tw(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ni=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function rw(t){const[e,r]=m.useState(void 0);return ni(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.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 gue(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const oc=t=>{const{present:e,children:r}=t,n=bue(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Kt(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};oc.displayName="Presence";function bue(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=gue(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=Em(n.current);i.current=a==="mounted"?c:"none"},[a]),ni(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=Em(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ni(()=>{if(e){const c=u=>{const h=Em(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=Em(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Em(t){return(t==null?void 0:t.animationName)||"none"}function Fd(){return Fd=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(xue);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(u3,he({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(u3,he({},n,{ref:e}),r)});Bd.displayName="Slot";const u3=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...Cue(n,r.props),ref:e?RU(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});u3.displayName="SlotClone";const wue=({children:t})=>m.createElement(m.Fragment,null,t);function xue(t){return m.isValidElement(t)&&t.type===wue}function Cue(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const Eue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rt=Eue.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Bd:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,Fd({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function U$(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const IU="Checkbox",[Sue,Dqe]=_n(IU),[kue,$ue]=Sue(IU),Aue=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[b=!1,p]=Ul({prop:s,defaultProp:i,onChange:c}),g=m.useRef(b);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>p(g.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,p]),m.createElement(kue,{scope:r,state:b,disabled:a},m.createElement(rt.button,he({type:"button",role:"checkbox","aria-checked":rf(b)?"mixed":b,"aria-required":o,"data-state":OU(b),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Se(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Se(t.onClick,w=>{p(E=>rf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(Tue,{control:u,bubbles:!v.current,name:n,value:l,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),_ue="CheckboxIndicator",Pue=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=$ue(_ue,r);return m.createElement(oc,{present:n||rf(i.state)||i.state===!0},m.createElement(rt.span,he({"data-state":OU(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),Tue=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=tw(r),a=rw(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=rf(r),u.call(l,rf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:rf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function rf(t){return t==="indeterminate"}function OU(t){return rf(t)?"indeterminate":t?"checked":"unchecked"}const Rue=Aue,Iue=Pue;var Oue=hr({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 Uf=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?Y.jsxs(W,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(re,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&Y.jsx(re,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return Y.jsxs(W,{as:"label",className:Oue({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var vr=hr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const Mue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Due=({size:t="sm",...e})=>Y.jsx(W,{as:Mue,className:vr({size:t}),...e}),Nue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),d3=({size:t="sm",...e})=>Y.jsx(W,{as:Nue,className:vr({size:t}),...e}),Lue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),xh=({size:t="sm",...e})=>Y.jsx(W,{as:Lue,className:vr({size:t}),...e}),jue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),MU=({size:t="sm",...e})=>Y.jsx(W,{as:jue,className:vr({size:t}),...e}),Fue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),nw=({size:t="sm",...e})=>Y.jsx(W,{as:Fue,className:vr({size:t}),...e}),Bue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Mi=({size:t="sm",...e})=>Y.jsx(W,{as:Bue,className:vr({size:t}),...e}),Uue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),zf=({size:t="sm",...e})=>Y.jsx(W,{as:Uue,className:vr({size:t}),...e}),zue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),sw=({size:t="sm",...e})=>Y.jsx(W,{as:zue,className:vr({size:t}),...e}),Vue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),que=({size:t="sm",...e})=>Y.jsx(W,{as:Vue,className:vr({size:t}),...e}),Wue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Hue=({size:t="sm",...e})=>Y.jsx(W,{as:Wue,className:vr({size:t}),...e}),Gue=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.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"}),Y.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"})]}),Kue=({size:t="sm",...e})=>Y.jsx(W,{as:Gue,className:vr({size:t}),...e}),Que=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Yue=({size:t="sm",...e})=>Y.jsx(W,{as:Que,className:vr({size:t}),...e}),Jue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Xue=({size:t="sm",...e})=>Y.jsx(W,{as:Jue,className:vr({size:t}),...e}),Zue=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.899 5.261a1 1 0 0 1 1 1v.729H2.102v2.055h15.797v4.694a1 1 0 0 1-1 1H3.102a1 1 0 0 1-1-1V6.261a1 1 0 0 1 1-1h13.797Zm-7.13 7.284h7v1h-7v-1Z",clipRule:"evenodd"})}),ede=({size:t="sm",...e})=>Y.jsx(W,{as:Zue,className:vr({size:t}),...e}),tde=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),rde=({size:t="sm",...e})=>Y.jsx(W,{as:tde,className:vr({size:t}),...e}),nde=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),iw=({size:t="sm",...e})=>Y.jsx(W,{as:nde,className:vr({size:t}),...e}),sde=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),ow=({size:t="sm",...e})=>Y.jsx(W,{as:sde,className:vr({size:t}),...e}),ide=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),DU=({size:t="sm",...e})=>Y.jsx(W,{as:ide,className:vr({size:t}),...e}),ode=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.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"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),ade=({size:t="sm",...e})=>Y.jsx(W,{as:ode,className:vr({size:t}),...e}),lde=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),NU=({size:t="sm",...e})=>Y.jsx(W,{as:lde,className:vr({size:t}),...e}),cde=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),fde=({size:t="sm",...e})=>Y.jsx(W,{as:cde,className:vr({size:t}),...e}),ude=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.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"}),Y.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"})]}),dde=({size:t="sm",...e})=>Y.jsx(W,{as:ude,className:vr({size:t}),...e}),hde=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),LU=({size:t="sm",...e})=>Y.jsx(W,{as:hde,className:vr({size:t}),...e});var vde=hr({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:[]}),yde=hr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const mde=({size:t="sm"})=>Y.jsx(Iue,{className:yde({size:t}),children:Y.jsx(xh,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(Uf,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(Rue,{className:vde({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:Y.jsx(mde,{})})})});P.createContext(null);const pde=Zk["useId".toString()]||(()=>{});let gde=0;function $l(t){const[e,r]=m.useState(pde());return ni(()=>{t||r(n=>n??String(gde++))},[t]),t||(e?`radix-${e}`:"")}const jU="Collapsible",[bde,Nqe]=_n(jU);bde(jU);function aw(t){const e=t+"CollectionProvider",[r,n]=_n(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,b=P.useRef(null),p=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:p,collectionRef:b},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:b}=h,p=i(a,y),g=Kt(v,p.collectionRef);return P.createElement(Bd,{ref:g},b)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:b,...p}=h,g=P.useRef(null),w=Kt(v,g),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(g,{ref:g,...p}),()=>void E.itemMap.delete(g))),P.createElement(Bd,{[f]:"",ref:w},b)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const p=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>p.indexOf(E.ref.current)-p.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const wde=m.createContext(void 0);function lw(t){const e=m.useContext(wde);return t||e||"ltr"}function xde(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const h3="dismissableLayer.update",Cde="dismissableLayer.pointerDownOutside",Ede="dismissableLayer.focusOutside";let R9;const Sde=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),z$=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(Sde),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Kt(e,T=>d(T)),b=Array.from(f.layers),[p]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(p),w=u?b.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=g,$=kde(T=>{const j=T.target,F=[...f.branches].some(U=>U.contains(j));!k||F||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),C=$de(T=>{const j=T.target;[...f.branches].some(U=>U.contains(j))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return xde(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(R9=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),I9(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=R9)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),I9())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(h3,T),()=>document.removeEventListener(h3,T)},[]),m.createElement(rt.div,he({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Se(t.onFocusCapture,C.onFocusCapture),onBlurCapture:Se(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Se(t.onPointerDownCapture,$.onPointerDownCapture)}))});function kde(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){FU(Cde,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function $de(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&FU(Ede,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function I9(){const t=new CustomEvent(h3);document.dispatchEvent(t)}function FU(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?U$(s,i):s.dispatchEvent(i)}const Ade=z$;let dE=0;function BU(){m.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:O9()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:O9()),dE++,()=>{dE===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),dE--}},[])}function O9(){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 hE="focusScope.autoFocusOnMount",vE="focusScope.autoFocusOnUnmount",M9={bubbles:!1,cancelable:!0},UU=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=ri(s),f=ri(i),u=m.useRef(null),d=Kt(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ga(u.current,{select:!0})},b=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ga(u.current,{select:!0}))},p=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ga(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const g=new MutationObserver(p);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),g.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){N9.add(h);const y=document.activeElement;if(!a.contains(y)){const p=new CustomEvent(hE,M9);a.addEventListener(hE,c),a.dispatchEvent(p),p.defaultPrevented||(_de(Ode(zU(a)),{select:!0}),document.activeElement===y&&Ga(a))}return()=>{a.removeEventListener(hE,c),setTimeout(()=>{const p=new CustomEvent(vE,M9);a.addEventListener(vE,f),a.dispatchEvent(p),p.defaultPrevented||Ga(y??document.body,{select:!0}),a.removeEventListener(vE,f),N9.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,p=document.activeElement;if(b&&p){const g=y.currentTarget,[w,E]=Pde(g);w&&E?!y.shiftKey&&p===E?(y.preventDefault(),r&&Ga(w,{select:!0})):y.shiftKey&&p===w&&(y.preventDefault(),r&&Ga(E,{select:!0})):p===g&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(rt.div,he({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function _de(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ga(n,{select:e}),document.activeElement!==r)return}function Pde(t){const e=zU(t),r=D9(e,t),n=D9(e.reverse(),t);return[r,n]}function zU(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function D9(t,e){for(const r of t)if(!Tde(r,{upTo:e}))return r}function Tde(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 Rde(t){return t instanceof HTMLInputElement&&"select"in t}function Ga(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Rde(t)&&e&&t.select()}}const N9=Ide();function Ide(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=L9(t,e),t.unshift(e)},remove(e){var r;t=L9(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function L9(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Ode(t){return t.filter(e=>e.tagName!=="A")}function Ch(t){return t.split("-")[1]}function V$(t){return t==="y"?"height":"width"}function ia(t){return t.split("-")[0]}function Vf(t){return["top","bottom"].includes(ia(t))?"x":"y"}function j9(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Vf(e),l=V$(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ia(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Ch(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const Mde=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=j9(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=VU(n),u={x:s,y:i},d=Vf(o),h=V$(d),v=await l.getDimensions(r),y=d==="y",b=y?"top":"left",p=y?"bottom":"right",g=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=k?k[g]:0;$&&await(l.isElement==null?void 0:l.isElement(k))||($=c.floating[g]||a.floating[h]);const C=w/2-E/2,T=f[b],j=$-v[h]-f[p],F=$/2-v[h]/2+C,U=y3(T,F,j),V=Ch(o)!=null&&F!=U&&a.reference[h]/2-(Ft.concat(e,e+"-start",e+"-end"),[]);const Dde={left:"right",right:"left",bottom:"top",top:"bottom"};function tb(t){return t.replace(/left|right|bottom|top/g,e=>Dde[e])}function Nde(t,e,r){r===void 0&&(r=!1);const n=Ch(t),s=Vf(t),i=V$(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=tb(o)),{main:o,cross:tb(o)}}const Lde={start:"end",end:"start"};function yE(t){return t.replace(/start|end/g,e=>Lde[e])}const jde=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,b=ia(n),p=ia(o)===o,g=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(p||!v?[tb(o)]:function(U){const V=tb(U);return[yE(U),V,yE(V)]}(o));u||h==="none"||w.push(...function(U,V,N,x){const S=Ch(U);let R=function(M,_,I){const B=["left","right"],D=["right","left"],A=["top","bottom"],L=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:B:_?B:D;case"left":case"right":return _?A:L;default:return[]}}(ia(U),N==="start",x);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(yE)))),R}(o,v,h,g));const E=[o,...w],k=await cy(e,y),$=[];let C=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&$.push(k[b]),f){const{main:U,cross:V}=Nde(n,i,g);$.push(k[U],k[V])}if(C=[...C,{placement:n,overflows:$}],!$.every(U=>U<=0)){var T,j;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:C},reset:{placement:V}};let N=(j=C.filter(x=>x.overflows[0]<=0).sort((x,S)=>x.overflows[1]-S.overflows[1])[0])==null?void 0:j.placement;if(!N)switch(d){case"bestFit":{var F;const x=(F=C.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:F[0];x&&(N=x);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function B9(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function U9(t){return qU.some(e=>t[e]>=0)}const Fde=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=B9(await cy(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:U9(i)}}}case"escaped":{const i=B9(await cy(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:U9(i)}}}default:return{}}}}},Bde=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ia(a),d=Ch(a),h=Vf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,b=typeof o=="function"?o(i):o;let{mainAxis:p,crossAxis:g,alignmentAxis:w}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return d&&typeof w=="number"&&(g=d==="end"?-1*w:w),h?{x:g*y,y:p*v}:{x:p*v,y:g*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function WU(t){return t==="x"?"y":"x"}const Ude=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:p,y:g}=b;return{x:p,y:g}}},...l}=t,c={x:r,y:n},f=await cy(e,l),u=Vf(ia(s)),d=WU(u);let h=c[u],v=c[d];if(i){const b=u==="y"?"bottom":"right";h=y3(h+f[u==="y"?"top":"left"],h,h-f[b])}if(o){const b=d==="y"?"bottom":"right";v=y3(v+f[d==="y"?"top":"left"],v,v-f[b])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},zde=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Vf(s),d=WU(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+b.mainAxis,k=i.reference[u]+i.reference[w]-b.mainAxis;hk&&(h=k)}if(c){var p,g;const w=u==="y"?"width":"height",E=["top","left"].includes(ia(s)),k=i.reference[d]-i.floating[w]+(E&&((p=o.offset)==null?void 0:p[d])||0)+(E?0:b.crossAxis),$=i.reference[d]+i.reference[w]+(E?0:((g=o.offset)==null?void 0:g[d])||0)-(E?b.crossAxis:0);v$&&(v=$)}return{[u]:h,[d]:v}}}},Vde=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await cy(e,a),c=ia(r),f=Ch(r),u=Vf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const b=h-l[v],p=d-l[y],g=!e.middlewareData.shift;let w=b,E=p;if(u){const $=d-l.left-l.right;E=f||g?v3(p,$):$}else{const $=h-l.top-l.bottom;w=f||g?v3(b,$):$}if(g&&!f){const $=Oc(l.left,0),C=Oc(l.right,0),T=Oc(l.top,0),j=Oc(l.bottom,0);u?E=d-2*($!==0||C!==0?$+C:Oc(l.left,l.right)):w=h-2*(T!==0||j!==0?T+j:Oc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Ys(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Di(t){return Ys(t).getComputedStyle(t)}function HU(t){return t instanceof Ys(t).Node}function zl(t){return HU(t)?(t.nodeName||"").toLowerCase():""}function Ui(t){return t instanceof Ys(t).HTMLElement}function Ss(t){return t instanceof Ys(t).Element}function z9(t){return typeof ShadowRoot>"u"?!1:t instanceof Ys(t).ShadowRoot||t instanceof ShadowRoot}function fy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Di(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function qde(t){return["table","td","th"].includes(zl(t))}function m3(t){const e=q$(),r=Di(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function q$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function cw(t){return["html","body","#document"].includes(zl(t))}const V9=Math.min,ov=Math.max,rb=Math.round;function GU(t){const e=Di(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Ui(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=rb(r)!==i||rb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function KU(t){return Ss(t)?t:t.contextElement}const QU={x:1,y:1};function fd(t){const e=KU(t);if(!Ui(e))return QU;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=GU(e);let o=(i?rb(r.width):r.width)/n,a=(i?rb(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const q9={x:0,y:0};function YU(t,e,r){var n,s;if(e===void 0&&(e=!0),!q$())return q9;const i=t?Ys(t):window;return!r||e&&r!==i?q9:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function Ef(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=KU(t);let o=QU;e&&(n?Ss(n)&&(o=fd(n)):o=fd(t));const a=YU(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Ys(i),h=n&&Ss(n)?Ys(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=fd(v),b=v.getBoundingClientRect(),p=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(p.paddingLeft))*y.x,b.y+=(v.clientTop+parseFloat(p.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=b.x,c+=b.y,v=Ys(v).frameElement}}return eb({width:f,height:u,x:l,y:c})}function Al(t){return((HU(t)?t.ownerDocument:t.document)||window.document).documentElement}function fw(t){return Ss(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function JU(t){return Ef(Al(t)).left+fw(t).scrollLeft}function Ud(t){if(zl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||z9(t)&&t.host||Al(t);return z9(e)?e.host:e}function XU(t){const e=Ud(t);return cw(e)?e.ownerDocument.body:Ui(e)&&fy(e)?e:XU(e)}function av(t,e){var r;e===void 0&&(e=[]);const n=XU(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Ys(n);return s?e.concat(i,i.visualViewport||[],fy(n)?n:[]):e.concat(n,av(n))}function W9(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Ys(s),a=Al(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=q$();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=Al(s),o=fw(s),a=s.ownerDocument.body,l=ov(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=ov(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+JU(s);const u=-o.scrollTop;return Di(a).direction==="rtl"&&(f+=ov(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(Al(t));else if(Ss(e))n=function(s,i){const o=Ef(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Ui(s)?fd(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=YU(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return eb(n)}function ZU(t,e){const r=Ud(t);return!(r===e||!Ss(r)||cw(r))&&(Di(r).position==="fixed"||ZU(r,e))}function H9(t,e){return Ui(t)&&Di(t).position!=="fixed"?e?e(t):t.offsetParent:null}function G9(t,e){const r=Ys(t);if(!Ui(t))return r;let n=H9(t,e);for(;n&&qde(n)&&Di(n).position==="static";)n=H9(n,e);return n&&(zl(n)==="html"||zl(n)==="body"&&Di(n).position==="static"&&!m3(n))?r:n||function(s){let i=Ud(s);for(;Ui(i)&&!cw(i);){if(m3(i))return i;i=Ud(i)}return null}(t)||r}function Wde(t,e,r){const n=Ui(e),s=Al(e),i=r==="fixed",o=Ef(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((zl(e)!=="body"||fy(s))&&(a=fw(e)),Ui(e)){const c=Ef(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=JU(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const Hde={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=av(c).filter(b=>Ss(b)&&zl(b)!=="body"),h=null;const v=Di(c).position==="fixed";let y=v?Ud(c):c;for(;Ss(y)&&!cw(y);){const b=Di(y),p=m3(y);p||b.position!=="fixed"||(h=null),(v?!p&&!h:!p&&b.position==="static"&&h&&["absolute","fixed"].includes(h.position)||fy(y)&&!p&&ZU(c,y))?d=d.filter(g=>g!==y):h=b,y=Ud(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=W9(e,f,s);return c.top=ov(u.top,c.top),c.right=V9(u.right,c.right),c.bottom=V9(u.bottom,c.bottom),c.left=ov(u.left,c.left),c},W9(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Ui(r),i=Al(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((zl(r)!=="body"||fy(i))&&(o=fw(r)),Ui(r))){const c=Ef(r);a=fd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:Ss,getDimensions:function(t){return GU(t)},getOffsetParent:G9,getDocumentElement:Al,getScale:fd,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||G9,i=this.getDimensions;return{reference:Wde(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Di(t).direction==="rtl"};function Gde(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...Ss(t)?av(t):t.contextElement?av(t.contextElement):[],...av(e)]:[];l.forEach(d=>{const h=!Ss(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),Ss(t)&&!a&&f.observe(t),Ss(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?Ef(t):null;return a&&function d(){const h=Ef(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const Kde=(t,e,r)=>{const n=new Map,s={platform:Hde,...r},i={...s.platform,_c:n};return Mde(t,e,{...s,platform:i})},Qde=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?F9({element:e.current,padding:r}).fn(s):{}:e?F9({element:e,padding:r}).fn(s):{}}}};var Tp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function nb(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,s;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(!nb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!nb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ez(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function K9(t,e){const r=ez(t);return Math.round(e*r)/r}function Q9(t){const e=m.useRef(t);return Tp(()=>{e.current=t}),e}function Yde(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);nb(d,n)||h(n);const[v,y]=m.useState(null),[b,p]=m.useState(null),g=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==C.current&&(C.current=R,p(R))},[p]),E=i||v,k=o||b,$=m.useRef(null),C=m.useRef(null),T=m.useRef(f),j=Q9(l),F=Q9(s),U=m.useCallback(()=>{if(!$.current||!C.current)return;const R={placement:e,strategy:r,middleware:d};F.current&&(R.platform=F.current),Kde($.current,C.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!nb(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,F]);Tp(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Tp(()=>(V.current=!0,()=>{V.current=!1}),[]),Tp(()=>{if(E&&($.current=E),k&&(C.current=k),E&&k){if(j.current)return j.current(E,k,U);U()}},[E,k,U,j]);const N=m.useMemo(()=>({reference:$,floating:C,setReference:g,setFloating:w}),[g,w]),x=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!x.floating)return R;const M=K9(x.floating,f.x),_=K9(x.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...ez(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,x.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:x,floatingStyles:S}),[f,U,N,x,S])}const tz="Popper",[rz,Eh]=_n(tz),[Jde,nz]=rz(tz),Xde=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(Jde,{scope:e,anchor:n,onAnchorChange:s},r)},Zde="PopperAnchor",ehe=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=nz(Zde,r),o=m.useRef(null),a=Kt(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(rt.div,he({},s,{ref:a}))}),sz="PopperContent",[the,Lqe]=rz(sz),rhe=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:b=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,C=nz(sz,f),[T,j]=m.useState(null),F=Kt(e,ie=>j(ie)),[U,V]=m.useState(null),N=rw(U),x=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(b)?b:[b],I=_.length>0,B={padding:M,boundary:_.filter(nhe),altBoundary:I},{refs:D,floatingStyles:A,placement:L,isPositioned:G,middlewareData:O}=Yde({strategy:"fixed",placement:R,whileElementsMounted:Gde,elements:{reference:C.anchor},middleware:[Bde({mainAxis:d+S,alignmentAxis:v}),E&&Ude({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?zde():void 0,...B}),E&&jde({...B}),Vde({...B,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&Qde({element:U,padding:y}),she({arrowWidth:x,arrowHeight:S}),w&&Fde({strategy:"referenceHidden"})]}),[q,z]=iz(L),H=ri(k);ni(()=>{G&&(H==null||H())},[G,H]);const X=(s=O.arrow)===null||s===void 0?void 0:s.x,Q=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[J,ae]=m.useState();return ni(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(the,{scope:f,placedSide:q,onArrowChange:V,arrowX:X,arrowY:Q,shouldHideArrow:K},m.createElement(rt.div,he({"data-side":q,"data-align":z},$,{ref:F,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function nhe(t){return t!==null}const she=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=iz(a),b={start:"0%",center:"50%",end:"100%"}[y],p=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,g=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?b:`${p}px`,E=`${-h}px`):v==="top"?(w=u?b:`${p}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?b:`${g}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?b:`${g}px`),{data:{x:w,y:E}}}});function iz(t){const[e,r="center"]=t.split("-");return[e,r]}const ihe=Xde,ohe=ehe,ahe=rhe,oz=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?q8.createPortal(m.createElement(rt.div,he({},s,{ref:e})),n):null}),mE="rovingFocusGroup.onEntryFocus",lhe={bubbles:!1,cancelable:!0},W$="RovingFocusGroup",[p3,az,che]=aw(W$),[fhe,Sh]=_n(W$,[che]),[uhe,dhe]=fhe(W$),hhe=m.forwardRef((t,e)=>m.createElement(p3.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(p3.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(vhe,Fd({},t,{ref:e}))))),vhe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Kt(e,u),h=lw(i),[v=null,y]=Ul({prop:o,defaultProp:a,onChange:l}),[b,p]=m.useState(!1),g=ri(c),w=az(r),E=m.useRef(!1),[k,$]=m.useState(0);return m.useEffect(()=>{const C=u.current;if(C)return C.addEventListener(mE,g),()=>C.removeEventListener(mE,g)},[g]),m.createElement(uhe,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(C=>y(C),[y]),onItemShiftTab:m.useCallback(()=>p(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(C=>C+1),[]),onFocusableItemRemove:m.useCallback(()=>$(C=>C-1),[])},m.createElement(rt.div,Fd({tabIndex:b||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Se(t.onMouseDown,()=>{E.current=!0}),onFocus:Se(t.onFocus,C=>{const T=!E.current;if(C.target===C.currentTarget&&T&&!b){const j=new CustomEvent(mE,lhe);if(C.currentTarget.dispatchEvent(j),!j.defaultPrevented){const F=w().filter(S=>S.focusable),U=F.find(S=>S.active),V=F.find(S=>S.id===v),x=[U,V,...F].filter(Boolean).map(S=>S.ref.current);lz(x)}}E.current=!1}),onBlur:Se(t.onBlur,()=>p(!1))})))}),yhe="RovingFocusGroupItem",mhe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=$l(),l=i||a,c=dhe(yhe,r),f=c.currentTabStopId===l,u=az(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(p3.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(rt.span,Fd({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Se(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Se(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=bhe(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let p=u().filter(g=>g.focusable).map(g=>g.ref.current);if(y==="last")p.reverse();else if(y==="prev"||y==="next"){y==="prev"&&p.reverse();const g=p.indexOf(v.currentTarget);p=c.loop?whe(p,g+1):p.slice(g+1)}setTimeout(()=>lz(p))}})})))}),phe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ghe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function bhe(t,e,r){const n=ghe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return phe[n]}function lz(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function whe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const cz=hhe,H$=mhe;var xhe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},au=new WeakMap,Sm=new WeakMap,km={},pE=0,fz=function(t){return t&&(t.host||fz(t.parentNode))},Che=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=fz(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},Ehe=function(t,e,r,n){var s=Che(e,Array.isArray(t)?t:[t]);km[r]||(km[r]=new WeakMap);var i=km[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(au.get(d)||0)+1,b=(i.get(d)||0)+1;au.set(d,y),i.set(d,b),o.push(d),y===1&&v&&Sm.set(d,!0),b===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),pE++,function(){o.forEach(function(u){var d=au.get(u)-1,h=i.get(u)-1;au.set(u,d),i.set(u,h),d||(Sm.has(u)||u.removeAttribute(n),Sm.delete(u)),h||u.removeAttribute(r)}),pE--,pE||(au=new WeakMap,au=new WeakMap,Sm=new WeakMap,km={})}},uz=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||xhe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),Ehe(n,s,r,"aria-hidden")):function(){return null}},vo=function(){return vo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return Bhe;var e=Uhe(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])}},Vhe=yz(),qhe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(khe,` { + */var $7;function Xie(){if($7)return f1;$7=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return f1.Fragment=r,f1.jsx=o,f1.jsxs=o,f1}XF.exports=Xie();var Y=XF.exports;function Zie(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 eoe(t){var e=Zie(t,"string");return typeof e=="symbol"?e:String(e)}function toe(t,e,r){return e=eoe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function A7(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function _7(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},hr=t=>{var e=r=>{var n=t.defaultClassName,s=_7(_7({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)roe(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return P7(t.variantClassNames,r=>P7(r,n=>n.split(" ")[0]))}},e};hr({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 ey=t=>{const{color:e="backgroundMuted",marginY:r="4",...n}=t;return Y.jsx(W,{as:"hr",marginY:r,background:e,height:"px",borderWidth:"none",...n})};var noe=hr({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=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=qie[n];return Y.jsx(W,{as:r,className:Ns(s,noe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var soe=hr({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 nt=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:g="button",...b}=t,p=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return Y.jsx(W,{as:r,className:Ns(s,soe({activeOutline:n,disabled:i||l,hasLeftIcon:p,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:g,width:v,...b,children:E?Y.jsx(f,{size:k}):Y.jsxs(W,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[Y.jsxs(W,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&Y.jsx(f,{size:k}),Y.jsx(re,{children:c})]}),u&&Y.jsx(u,{size:k})]})})});var ioe=hr({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 To=m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return Y.jsx(W,{className:Ns(r,ioe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>ooe(r,e))}function Kt(...t){return m.useCallback(ZF(...t),t)}function Pn(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,aoe(s,...e)]}function aoe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Se(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function ri(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Bl({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=loe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=ri(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function loe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=ri(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function G2(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ni=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function K2(t){const[e,r]=m.useState(void 0);return ni(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.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 coe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const ic=t=>{const{present:e,children:r}=t,n=foe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Kt(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};ic.displayName="Presence";function foe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=coe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=ym(n.current);i.current=a==="mounted"?c:"none"},[a]),ni(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=ym(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ni(()=>{if(e){const c=u=>{const h=ym(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=ym(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function ym(t){return(t==null?void 0:t.animationName)||"none"}function Md(){return Md=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(doe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(J6,he({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(J6,he({},n,{ref:e}),r)});Dd.displayName="Slot";const J6=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...hoe(n,r.props),ref:e?ZF(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});J6.displayName="SlotClone";const uoe=({children:t})=>m.createElement(m.Fragment,null,t);function doe(t){return m.isValidElement(t)&&t.type===uoe}function hoe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const voe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rt=voe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Dd:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,Md({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function x$(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eB="Checkbox",[yoe,Mqe]=Pn(eB),[moe,poe]=yoe(eB),goe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=Bl({prop:s,defaultProp:i,onChange:c}),p=m.useRef(g);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>b(p.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,b]),m.createElement(moe,{scope:r,state:g,disabled:a},m.createElement(rt.button,he({type:"button",role:"checkbox","aria-checked":nf(g)?"mixed":g,"aria-required":o,"data-state":tB(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Se(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Se(t.onClick,w=>{b(E=>nf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(xoe,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),boe="CheckboxIndicator",woe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=poe(boe,r);return m.createElement(ic,{present:n||nf(i.state)||i.state===!0},m.createElement(rt.span,he({"data-state":tB(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),xoe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=nf(r),u.call(l,nf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:nf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function nf(t){return t==="indeterminate"}function tB(t){return nf(t)?"indeterminate":t?"checked":"unchecked"}const Coe=goe,Eoe=woe;var Soe=hr({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 Ff=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?Y.jsxs(W,{flexDirection:"column",gap:"0.5",children:[r&&Y.jsx(re,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&Y.jsx(re,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return Y.jsxs(W,{as:"label",className:Soe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var vr=hr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const koe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),$oe=({size:t="sm",...e})=>Y.jsx(W,{as:koe,className:vr({size:t}),...e}),Aoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),X6=({size:t="sm",...e})=>Y.jsx(W,{as:Aoe,className:vr({size:t}),...e}),_oe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),mh=({size:t="sm",...e})=>Y.jsx(W,{as:_oe,className:vr({size:t}),...e}),Poe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),rB=({size:t="sm",...e})=>Y.jsx(W,{as:Poe,className:vr({size:t}),...e}),Toe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Q2=({size:t="sm",...e})=>Y.jsx(W,{as:Toe,className:vr({size:t}),...e}),Roe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Di=({size:t="sm",...e})=>Y.jsx(W,{as:Roe,className:vr({size:t}),...e}),Ioe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Bf=({size:t="sm",...e})=>Y.jsx(W,{as:Ioe,className:vr({size:t}),...e}),Ooe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Y2=({size:t="sm",...e})=>Y.jsx(W,{as:Ooe,className:vr({size:t}),...e}),Moe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Doe=({size:t="sm",...e})=>Y.jsx(W,{as:Moe,className:vr({size:t}),...e}),Noe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Loe=({size:t="sm",...e})=>Y.jsx(W,{as:Noe,className:vr({size:t}),...e}),joe=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.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"}),Y.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"})]}),Foe=({size:t="sm",...e})=>Y.jsx(W,{as:joe,className:vr({size:t}),...e}),Boe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Uoe=({size:t="sm",...e})=>Y.jsx(W,{as:Boe,className:vr({size:t}),...e}),zoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Voe=({size:t="sm",...e})=>Y.jsx(W,{as:zoe,className:vr({size:t}),...e}),qoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.899 5.261a1 1 0 0 1 1 1v.729H2.102v2.055h15.797v4.694a1 1 0 0 1-1 1H3.102a1 1 0 0 1-1-1V6.261a1 1 0 0 1 1-1h13.797Zm-7.13 7.284h7v1h-7v-1Z",clipRule:"evenodd"})}),Woe=({size:t="sm",...e})=>Y.jsx(W,{as:qoe,className:vr({size:t}),...e}),Hoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),Goe=({size:t="sm",...e})=>Y.jsx(W,{as:Hoe,className:vr({size:t}),...e}),Koe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),J2=({size:t="sm",...e})=>Y.jsx(W,{as:Koe,className:vr({size:t}),...e}),Qoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),X2=({size:t="sm",...e})=>Y.jsx(W,{as:Qoe,className:vr({size:t}),...e}),Yoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),nB=({size:t="sm",...e})=>Y.jsx(W,{as:Yoe,className:vr({size:t}),...e}),Joe=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.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"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.25,d:"M11 3h5v5"}),Y.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m16 3-8 8"})]}),Xoe=({size:t="sm",...e})=>Y.jsx(W,{as:Joe,className:vr({size:t}),...e}),Zoe=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),sB=({size:t="sm",...e})=>Y.jsx(W,{as:Zoe,className:vr({size:t}),...e}),eae=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.539 10.75H4.298v-1.5h12.24v1.5Z",clipRule:"evenodd"})}),tae=({size:t="sm",...e})=>Y.jsx(W,{as:eae,className:vr({size:t}),...e}),rae=t=>Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:[Y.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"}),Y.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"})]}),nae=({size:t="sm",...e})=>Y.jsx(W,{as:rae,className:vr({size:t}),...e}),sae=t=>Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:Y.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"})}),iB=({size:t="sm",...e})=>Y.jsx(W,{as:sae,className:vr({size:t}),...e});var iae=hr({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:[]}),oae=hr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const aae=({size:t="sm"})=>Y.jsx(Eoe,{className:oae({size:t}),children:Y.jsx(mh,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return Y.jsx(Ff,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:Y.jsx(Coe,{className:iae({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:Y.jsx(aae,{})})})});P.createContext(null);const lae=t8["useId".toString()]||(()=>{});let cae=0;function Al(t){const[e,r]=m.useState(lae());return ni(()=>{t||r(n=>n??String(cae++))},[t]),t||(e?`radix-${e}`:"")}const oB="Collapsible",[fae,Dqe]=Pn(oB);fae(oB);function Z2(t){const e=t+"CollectionProvider",[r,n]=Pn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,g=P.useRef(null),b=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:b,collectionRef:g},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:g}=h,b=i(a,y),p=Kt(v,b.collectionRef);return P.createElement(Dd,{ref:p},g)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:g,...b}=h,p=P.useRef(null),w=Kt(v,p),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(p,{ref:p,...b}),()=>void E.itemMap.delete(p))),P.createElement(Dd,{[f]:"",ref:w},g)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const uae=m.createContext(void 0);function ew(t){const e=m.useContext(uae);return t||e||"ltr"}function dae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Z6="dismissableLayer.update",hae="dismissableLayer.pointerDownOutside",vae="dismissableLayer.focusOutside";let T7;const yae=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),C$=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(yae),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Kt(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,$=mae(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=pae(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return dae(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(T7=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),R7(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=T7)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),R7())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(Z6,T),()=>document.removeEventListener(Z6,T)},[]),m.createElement(rt.div,he({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Se(t.onFocusCapture,x.onFocusCapture),onBlurCapture:Se(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Se(t.onPointerDownCapture,$.onPointerDownCapture)}))});function mae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){aB(hae,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function pae(t,e=globalThis==null?void 0:globalThis.document){const r=ri(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&aB(vae,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function R7(){const t=new CustomEvent(Z6);document.dispatchEvent(t)}function aB(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?x$(s,i):s.dispatchEvent(i)}const gae=C$;let YC=0;function lB(){m.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:I7()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:I7()),YC++,()=>{YC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),YC--}},[])}function I7(){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 JC="focusScope.autoFocusOnMount",XC="focusScope.autoFocusOnUnmount",O7={bubbles:!1,cancelable:!0},cB=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=ri(s),f=ri(i),u=m.useRef(null),d=Kt(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ka(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ka(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ka(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){D7.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(JC,O7);a.addEventListener(JC,c),a.dispatchEvent(b),b.defaultPrevented||(bae(Sae(fB(a)),{select:!0}),document.activeElement===y&&Ka(a))}return()=>{a.removeEventListener(JC,c),setTimeout(()=>{const b=new CustomEvent(XC,O7);a.addEventListener(XC,f),a.dispatchEvent(b),b.defaultPrevented||Ka(y??document.body,{select:!0}),a.removeEventListener(XC,f),D7.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=wae(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ka(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ka(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(rt.div,he({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function bae(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ka(n,{select:e}),document.activeElement!==r)return}function wae(t){const e=fB(t),r=M7(e,t),n=M7(e.reverse(),t);return[r,n]}function fB(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function M7(t,e){for(const r of t)if(!xae(r,{upTo:e}))return r}function xae(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 Cae(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&&Cae(t)&&e&&t.select()}}const D7=Eae();function Eae(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=N7(t,e),t.unshift(e)},remove(e){var r;t=N7(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function N7(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Sae(t){return t.filter(e=>e.tagName!=="A")}function ph(t){return t.split("-")[1]}function E$(t){return t==="y"?"height":"width"}function ia(t){return t.split("-")[0]}function Uf(t){return["top","bottom"].includes(ia(t))?"x":"y"}function L7(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Uf(e),l=E$(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ia(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(ph(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const kae=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=L7(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=uB(n),u={x:s,y:i},d=Uf(o),h=E$(d),v=await l.getDimensions(r),y=d==="y",g=y?"top":"left",b=y?"bottom":"right",p=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=k?k[p]:0;$&&await(l.isElement==null?void 0:l.isElement(k))||($=c.floating[p]||a.floating[h]);const x=w/2-E/2,T=f[g],B=$-v[h]-f[b],L=$/2-v[h]/2+x,U=t3(T,L,B),V=ph(o)!=null&&L!=U&&a.reference[h]/2-(Lt.concat(e,e+"-start",e+"-end"),[]);const $ae={left:"right",right:"left",bottom:"top",top:"bottom"};function zg(t){return t.replace(/left|right|bottom|top/g,e=>$ae[e])}function Aae(t,e,r){r===void 0&&(r=!1);const n=ph(t),s=Uf(t),i=E$(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=zg(o)),{main:o,cross:zg(o)}}const _ae={start:"end",end:"start"};function ZC(t){return t.replace(/start|end/g,e=>_ae[e])}const Pae=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,g=ia(n),b=ia(o)===o,p=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(b||!v?[zg(o)]:function(U){const V=zg(U);return[ZC(U),V,ZC(V)]}(o));u||h==="none"||w.push(...function(U,V,N,C){const S=ph(U);let R=function(M,_,I){const F=["left","right"],D=["right","left"],A=["top","bottom"],j=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:F:_?F:D;case"left":case"right":return _?A:j;default:return[]}}(ia(U),N==="start",C);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(ZC)))),R}(o,v,h,p));const E=[o,...w],k=await ty(e,y),$=[];let x=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&$.push(k[g]),f){const{main:U,cross:V}=Aae(n,i,p);$.push(k[U],k[V])}if(x=[...x,{placement:n,overflows:$}],!$.every(U=>U<=0)){var T,B;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:x},reset:{placement:V}};let N=(B=x.filter(C=>C.overflows[0]<=0).sort((C,S)=>C.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(d){case"bestFit":{var L;const C=(L=x.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];C&&(N=C);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function F7(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function B7(t){return dB.some(e=>t[e]>=0)}const Tae=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=F7(await ty(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:B7(i)}}}case"escaped":{const i=F7(await ty(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:B7(i)}}}default:return{}}}}},Rae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ia(a),d=ph(a),h=Uf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,g=typeof o=="function"?o(i):o;let{mainAxis:b,crossAxis:p,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof w=="number"&&(p=d==="end"?-1*w:w),h?{x:p*y,y:b*v}:{x:b*v,y:p*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function hB(t){return t==="x"?"y":"x"}const Iae=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=t,c={x:r,y:n},f=await ty(e,l),u=Uf(ia(s)),d=hB(u);let h=c[u],v=c[d];if(i){const g=u==="y"?"bottom":"right";h=t3(h+f[u==="y"?"top":"left"],h,h-f[g])}if(o){const g=d==="y"?"bottom":"right";v=t3(v+f[d==="y"?"top":"left"],v,v-f[g])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},Oae=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Uf(s),d=hB(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+g.mainAxis,k=i.reference[u]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=u==="y"?"width":"height",E=["top","left"].includes(ia(s)),k=i.reference[d]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:g.crossAxis),$=i.reference[d]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[d])||0)-(E?g.crossAxis:0);v$&&(v=$)}return{[u]:h,[d]:v}}}},Mae=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await ty(e,a),c=ia(r),f=ph(r),u=Uf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const $=d-l.left-l.right;E=f||p?e3(b,$):$}else{const $=h-l.top-l.bottom;w=f||p?e3(g,$):$}if(p&&!f){const $=Mc(l.left,0),x=Mc(l.right,0),T=Mc(l.top,0),B=Mc(l.bottom,0);u?E=d-2*($!==0||x!==0?$+x:Mc(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Mc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Js(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ni(t){return Js(t).getComputedStyle(t)}function vB(t){return t instanceof Js(t).Node}function Ul(t){return vB(t)?(t.nodeName||"").toLowerCase():""}function Ui(t){return t instanceof Js(t).HTMLElement}function ks(t){return t instanceof Js(t).Element}function U7(t){return typeof ShadowRoot>"u"?!1:t instanceof Js(t).ShadowRoot||t instanceof ShadowRoot}function ry(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Ni(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function Dae(t){return["table","td","th"].includes(Ul(t))}function r3(t){const e=S$(),r=Ni(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function S$(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function tw(t){return["html","body","#document"].includes(Ul(t))}const z7=Math.min,tv=Math.max,Vg=Math.round;function yB(t){const e=Ni(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Ui(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Vg(r)!==i||Vg(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function mB(t){return ks(t)?t:t.contextElement}const pB={x:1,y:1};function ld(t){const e=mB(t);if(!Ui(e))return pB;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=yB(e);let o=(i?Vg(r.width):r.width)/n,a=(i?Vg(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const V7={x:0,y:0};function gB(t,e,r){var n,s;if(e===void 0&&(e=!0),!S$())return V7;const i=t?Js(t):window;return!r||e&&r!==i?V7:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function gf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=mB(t);let o=pB;e&&(n?ks(n)&&(o=ld(n)):o=ld(t));const a=gB(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Js(i),h=n&&ks(n)?Js(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=ld(v),g=v.getBoundingClientRect(),b=getComputedStyle(v);g.x+=(v.clientLeft+parseFloat(b.paddingLeft))*y.x,g.y+=(v.clientTop+parseFloat(b.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g.x,c+=g.y,v=Js(v).frameElement}}return Ug({width:f,height:u,x:l,y:c})}function _l(t){return((vB(t)?t.ownerDocument:t.document)||window.document).documentElement}function rw(t){return ks(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function bB(t){return gf(_l(t)).left+rw(t).scrollLeft}function Nd(t){if(Ul(t)==="html")return t;const e=t.assignedSlot||t.parentNode||U7(t)&&t.host||_l(t);return U7(e)?e.host:e}function wB(t){const e=Nd(t);return tw(e)?e.ownerDocument.body:Ui(e)&&ry(e)?e:wB(e)}function rv(t,e){var r;e===void 0&&(e=[]);const n=wB(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Js(n);return s?e.concat(i,i.visualViewport||[],ry(n)?n:[]):e.concat(n,rv(n))}function q7(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Js(s),a=_l(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=S$();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=_l(s),o=rw(s),a=s.ownerDocument.body,l=tv(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=tv(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+bB(s);const u=-o.scrollTop;return Ni(a).direction==="rtl"&&(f+=tv(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(_l(t));else if(ks(e))n=function(s,i){const o=gf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Ui(s)?ld(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=gB(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Ug(n)}function xB(t,e){const r=Nd(t);return!(r===e||!ks(r)||tw(r))&&(Ni(r).position==="fixed"||xB(r,e))}function W7(t,e){return Ui(t)&&Ni(t).position!=="fixed"?e?e(t):t.offsetParent:null}function H7(t,e){const r=Js(t);if(!Ui(t))return r;let n=W7(t,e);for(;n&&Dae(n)&&Ni(n).position==="static";)n=W7(n,e);return n&&(Ul(n)==="html"||Ul(n)==="body"&&Ni(n).position==="static"&&!r3(n))?r:n||function(s){let i=Nd(s);for(;Ui(i)&&!tw(i);){if(r3(i))return i;i=Nd(i)}return null}(t)||r}function Nae(t,e,r){const n=Ui(e),s=_l(e),i=r==="fixed",o=gf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Ul(e)!=="body"||ry(s))&&(a=rw(e)),Ui(e)){const c=gf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=bB(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const Lae={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=rv(c).filter(g=>ks(g)&&Ul(g)!=="body"),h=null;const v=Ni(c).position==="fixed";let y=v?Nd(c):c;for(;ks(y)&&!tw(y);){const g=Ni(y),b=r3(y);b||g.position!=="fixed"||(h=null),(v?!b&&!h:!b&&g.position==="static"&&h&&["absolute","fixed"].includes(h.position)||ry(y)&&!b&&xB(c,y))?d=d.filter(p=>p!==y):h=g,y=Nd(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=q7(e,f,s);return c.top=tv(u.top,c.top),c.right=z7(u.right,c.right),c.bottom=z7(u.bottom,c.bottom),c.left=tv(u.left,c.left),c},q7(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Ui(r),i=_l(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Ul(r)!=="body"||ry(i))&&(o=rw(r)),Ui(r))){const c=gf(r);a=ld(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:ks,getDimensions:function(t){return yB(t)},getOffsetParent:H7,getDocumentElement:_l,getScale:ld,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||H7,i=this.getDimensions;return{reference:Nae(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Ni(t).direction==="rtl"};function jae(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...ks(t)?rv(t):t.contextElement?rv(t.contextElement):[],...rv(e)]:[];l.forEach(d=>{const h=!ks(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),ks(t)&&!a&&f.observe(t),ks(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?gf(t):null;return a&&function d(){const h=gf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const Fae=(t,e,r)=>{const n=new Map,s={platform:Lae,...r},i={...s.platform,_c:n};return kae(t,e,{...s,platform:i})},Bae=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?j7({element:e.current,padding:r}).fn(s):{}:e?j7({element:e,padding:r}).fn(s):{}}}};var Ep=typeof document<"u"?m.useLayoutEffect:m.useEffect;function qg(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,s;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(!qg(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!qg(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function CB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function G7(t,e){const r=CB(t);return Math.round(e*r)/r}function K7(t){const e=m.useRef(t);return Ep(()=>{e.current=t}),e}function Uae(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);qg(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,$=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=K7(l),L=K7(s),U=m.useCallback(()=>{if(!$.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),Fae($.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!qg(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);Ep(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Ep(()=>(V.current=!0,()=>{V.current=!1}),[]),Ep(()=>{if(E&&($.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:$,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=G7(C.floating,f.x),_=G7(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...CB(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}const EB="Popper",[SB,gh]=Pn(EB),[zae,kB]=SB(EB),Vae=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(zae,{scope:e,anchor:n,onAnchorChange:s},r)},qae="PopperAnchor",Wae=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=kB(qae,r),o=m.useRef(null),a=Kt(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(rt.div,he({},s,{ref:a}))}),$B="PopperContent",[Hae,Nqe]=SB($B),Gae=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,x=kB($B,f),[T,B]=m.useState(null),L=Kt(e,ie=>B(ie)),[U,V]=m.useState(null),N=K2(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(Kae),altBoundary:I},{refs:D,floatingStyles:A,placement:j,isPositioned:G,middlewareData:O}=Uae({strategy:"fixed",placement:R,whileElementsMounted:jae,elements:{reference:x.anchor},middleware:[Rae({mainAxis:d+S,alignmentAxis:v}),E&&Iae({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Oae():void 0,...F}),E&&Pae({...F}),Mae({...F,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&Bae({element:U,padding:y}),Qae({arrowWidth:C,arrowHeight:S}),w&&Tae({strategy:"referenceHidden"})]}),[q,z]=AB(j),H=ri(k);ni(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ni(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(Hae,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(rt.div,he({"data-side":q,"data-align":z},$,{ref:L,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function Kae(t){return t!==null}const Qae=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=AB(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function AB(t){const[e,r="center"]=t.split("-");return[e,r]}const Yae=Vae,Jae=Wae,Xae=Gae,_B=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(rt.div,he({},s,{ref:e})),n):null}),eE="rovingFocusGroup.onEntryFocus",Zae={bubbles:!1,cancelable:!0},k$="RovingFocusGroup",[n3,PB,ele]=Z2(k$),[tle,bh]=Pn(k$,[ele]),[rle,nle]=tle(k$),sle=m.forwardRef((t,e)=>m.createElement(n3.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(n3.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(ile,Md({},t,{ref:e}))))),ile=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Kt(e,u),h=ew(i),[v=null,y]=Bl({prop:o,defaultProp:a,onChange:l}),[g,b]=m.useState(!1),p=ri(c),w=PB(r),E=m.useRef(!1),[k,$]=m.useState(0);return m.useEffect(()=>{const x=u.current;if(x)return x.addEventListener(eE,p),()=>x.removeEventListener(eE,p)},[p]),m.createElement(rle,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(x=>y(x),[y]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(x=>x+1),[]),onFocusableItemRemove:m.useCallback(()=>$(x=>x-1),[])},m.createElement(rt.div,Md({tabIndex:g||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Se(t.onMouseDown,()=>{E.current=!0}),onFocus:Se(t.onFocus,x=>{const T=!E.current;if(x.target===x.currentTarget&&T&&!g){const B=new CustomEvent(eE,Zae);if(x.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=w().filter(S=>S.focusable),U=L.find(S=>S.active),V=L.find(S=>S.id===v),C=[U,V,...L].filter(Boolean).map(S=>S.ref.current);TB(C)}}E.current=!1}),onBlur:Se(t.onBlur,()=>b(!1))})))}),ole="RovingFocusGroupItem",ale=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Al(),l=i||a,c=nle(ole,r),f=c.currentTabStopId===l,u=PB(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(n3.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(rt.span,Md({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Se(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Se(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Se(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=fle(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let b=u().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const p=b.indexOf(v.currentTarget);b=c.loop?ule(b,p+1):b.slice(p+1)}setTimeout(()=>TB(b))}})})))}),lle={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cle(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function fle(t,e,r){const n=cle(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return lle[n]}function TB(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function ule(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const RB=sle,$$=ale;var dle=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ou=new WeakMap,mm=new WeakMap,pm={},tE=0,IB=function(t){return t&&(t.host||IB(t.parentNode))},hle=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=IB(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},vle=function(t,e,r,n){var s=hle(e,Array.isArray(t)?t:[t]);pm[r]||(pm[r]=new WeakMap);var i=pm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(ou.get(d)||0)+1,g=(i.get(d)||0)+1;ou.set(d,y),i.set(d,g),o.push(d),y===1&&v&&mm.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),tE++,function(){o.forEach(function(u){var d=ou.get(u)-1,h=i.get(u)-1;ou.set(u,d),i.set(u,h),d||(mm.has(u)||u.removeAttribute(n),mm.delete(u)),h||u.removeAttribute(r)}),tE--,tE||(ou=new WeakMap,ou=new WeakMap,mm=new WeakMap,pm={})}},OB=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||dle(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),vle(n,s,r,"aria-hidden")):function(){return null}},vo=function(){return vo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return Rle;var e=Ile(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])}},Mle=LB(),Dle=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(mle,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -81,34 +71,34 @@ Error generating stack: `+i.message+` `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(Rp,` { + .`).concat(Sp,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(Ip,` { + .`).concat(kp,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(Rp," .").concat(Rp,` { + .`).concat(Sp," .").concat(Sp,` { right: 0 `).concat(n,`; } - .`).concat(Ip," .").concat(Ip,` { + .`).concat(kp," .").concat(kp,` { margin-right: 0 `).concat(n,`; } body { - `).concat($he,": ").concat(a,`px; + `).concat(ple,": ").concat(a,`px; } -`)},Whe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return zhe(s)},[s]);return m.createElement(Vhe,{styles:qhe(i,!e,s,r?"":"!important")})},g3=!1;if(typeof window<"u")try{var $m=Object.defineProperty({},"passive",{get:function(){return g3=!0,!0}});window.addEventListener("test",$m,$m),window.removeEventListener("test",$m,$m)}catch{g3=!1}var lu=g3?{passive:!1}:!1,Hhe=function(t){return t.tagName==="TEXTAREA"},mz=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Hhe(t)&&r[e]==="visible")},Ghe=function(t){return mz(t,"overflowY")},Khe=function(t){return mz(t,"overflowX")},Y9=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=pz(t,r);if(n){var s=gz(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Qhe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Yhe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},pz=function(t,e){return t==="v"?Ghe(e):Khe(e)},gz=function(t,e){return t==="v"?Qhe(e):Yhe(e)},Jhe=function(t,e){return t==="h"&&e==="rtl"?-1:1},Xhe=function(t,e,r,n,s){var i=Jhe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=gz(t,a),v=h[0],y=h[1],b=h[2],p=y-b-i*v;(v||p)&&pz(t,a)&&(u+=p,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},Am=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},J9=function(t){return[t.deltaX,t.deltaY]},X9=function(t){return t&&"current"in t?t.current:t},Zhe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e1e=function(t){return` +`)},Nle=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return Ole(s)},[s]);return m.createElement(Mle,{styles:Dle(i,!e,s,r?"":"!important")})},s3=!1;if(typeof window<"u")try{var gm=Object.defineProperty({},"passive",{get:function(){return s3=!0,!0}});window.addEventListener("test",gm,gm),window.removeEventListener("test",gm,gm)}catch{s3=!1}var au=s3?{passive:!1}:!1,Lle=function(t){return t.tagName==="TEXTAREA"},jB=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!Lle(t)&&r[e]==="visible")},jle=function(t){return jB(t,"overflowY")},Fle=function(t){return jB(t,"overflowX")},Q7=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=FB(t,r);if(n){var s=BB(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Ble=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},Ule=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},FB=function(t,e){return t==="v"?jle(e):Fle(e)},BB=function(t,e){return t==="v"?Ble(e):Ule(e)},zle=function(t,e){return t==="h"&&e==="rtl"?-1:1},Vle=function(t,e,r,n,s){var i=zle(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=BB(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&FB(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},bm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Y7=function(t){return[t.deltaX,t.deltaY]},J7=function(t){return t&&"current"in t?t.current:t},qle=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Wle=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},t1e=0,cu=[];function r1e(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(t1e++)[0],i=m.useState(function(){return yz()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=She([t.lockRef.current],(t.shards||[]).map(X9),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,b){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var p=Am(y),g=r.current,w="deltaX"in y?y.deltaX:g[0]-p[0],E="deltaY"in y?y.deltaY:g[1]-p[1],k,$=y.target,C=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&C==="h"&&$.type==="range")return!1;var T=Y9(C,$);if(!T)return!0;if(T?k=C:(k=C==="v"?"h":"v",T=Y9(C,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var j=n.current||k;return Xhe(j,b,y,j==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var b=y;if(!(!cu.length||cu[cu.length-1]!==i)){var p="deltaY"in b?J9(b):Am(b),g=e.current.filter(function(k){return k.name===b.type&&k.target===b.target&&Zhe(k.delta,p)})[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var w=(o.current.shards||[]).map(X9).filter(Boolean).filter(function(k){return k.contains(b.target)}),E=w.length>0?a(b,w[0]):!o.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),c=m.useCallback(function(y,b,p,g){var w={name:y,delta:b,target:p,should:g};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=Am(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,J9(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,Am(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return cu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,lu),document.addEventListener("touchmove",l,lu),document.addEventListener("touchstart",f,lu),function(){cu=cu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,lu),document.removeEventListener("touchmove",l,lu),document.removeEventListener("touchstart",f,lu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:e1e(s)}):null,h?m.createElement(Whe,{gapMode:"margin"}):null)}const n1e=Ohe(vz,r1e);var bz=m.forwardRef(function(t,e){return m.createElement(uw,vo({},t,{ref:e,sideCar:n1e}))});bz.classNames=uw.classNames;const wz=bz,s1e=["Enter"," "],dw="Menu",[i1e,jqe,o1e]=aw(dw),[qf,xz]=_n(dw,[o1e,Eh,Sh]);Eh();const a1e=Sh();qf(dw);const[Fqe,l1e]=qf(dw),c1e="MenuPortal";qf(c1e,{forceMount:void 0});const f1e="MenuContent",[Bqe,Cz]=qf(f1e),b3="MenuItem",Z9="menu.itemSelect",Ez=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=l1e(b3,t.__scopeMenu),a=Cz(b3,t.__scopeMenu),l=Kt(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(Z9,{bubbles:!0,cancelable:!0});u.addEventListener(Z9,h=>n==null?void 0:n(h),{once:!0}),U$(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(u1e,he({},s,{ref:l,disabled:r,onClick:Se(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Se(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Se(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||s1e.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),u1e=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=Cz(b3,r),a=a1e(r),l=m.useRef(null),c=Kt(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(i1e.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement(H$,he({asChild:!0},a,{focusable:!n}),m.createElement(rt.div,he({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Se(t.onPointerMove,eR(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Se(t.onPointerLeave,eR(v=>o.onItemLeave(v))),onFocus:Se(t.onFocus,()=>u(!0)),onBlur:Se(t.onBlur,()=>u(!1))}))))}),d1e=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(kz,{scope:t.__scopeMenu,checked:r},m.createElement(Ez,he({role:"menuitemcheckbox","aria-checked":sb(r)?"mixed":r},s,{ref:e,"data-state":G$(r),onSelect:Se(s.onSelect,()=>n==null?void 0:n(sb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),h1e="MenuRadioGroup",[Uqe,v1e]=qf(h1e,{value:void 0,onValueChange:()=>{}}),y1e="MenuRadioItem",m1e=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=v1e(y1e,t.__scopeMenu),i=r===s.value;return m.createElement(kz,{scope:t.__scopeMenu,checked:i},m.createElement(Ez,he({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":G$(i),onSelect:Se(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),Sz="MenuItemIndicator",[kz,p1e]=qf(Sz,{checked:!1}),g1e=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=p1e(Sz,r);return m.createElement(oc,{present:n||sb(i.checked)||i.checked===!0},m.createElement(rt.span,he({},s,{ref:e,"data-state":G$(i.checked)})))}),b1e="MenuSub";qf(b1e);function sb(t){return t==="indeterminate"}function G$(t){return sb(t)?"indeterminate":t?"checked":"unchecked"}function eR(t){return e=>e.pointerType==="mouse"?t(e):void 0}const w1e=d1e,x1e=m1e,C1e=g1e,$z="DropdownMenu",[E1e,zqe]=_n($z,[xz]),K$=xz();E1e($z);const S1e=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=K$(r);return m.createElement(w1e,he({},s,n,{ref:e}))}),k1e=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=K$(r);return m.createElement(x1e,he({},s,n,{ref:e}))}),$1e=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=K$(r);return m.createElement(C1e,he({},s,n,{ref:e}))}),A1e=S1e,_1e=k1e,Az=$1e;var _z="_1k2mbvi5",Pz="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const P1e=({children:t})=>Y.jsx(Az,{className:_z,children:t});m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(A1e,{className:Ns(Pz,t),...r,ref:n,children:[Y.jsx(P1e,{children:Y.jsx(xh,{size:"xs"})}),Y.jsx(re,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(_1e,{className:Ns(Pz,t),...r,ref:n,children:[Y.jsx(Az,{className:_z,children:Y.jsx(re,{children:"•"})}),Y.jsx(re,{variant:"small",children:e})]}));const ba=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return Y.jsx(nt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),T1e=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var R1e="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",I1e="_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",O1e=hr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const M1e={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=T1e(h,e),[y,b]=m.useState(null),p=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],$=k.name,C=k.size/1e3;b({name:$,size:C,extension:$.split(".").pop()??""}),c==null||c(k)},g=u.map(w=>M1e[w]).join(",");return Y.jsx(Uf,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:Ns(I1e,O1e({borderRadius:r})),children:[y?Y.jsxs(W,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[Y.jsx(re,{children:y.name}),Y.jsxs(re,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):Y.jsx(re,{children:f}),Y.jsx(W,{accept:g,as:"input",className:R1e,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:p,ref:v,type:"file",...d}),y&&Y.jsx(ba,{cursor:"pointer",icon:zf,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),b(null)},zIndex:"10"})]})})})});var D1e=hr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const w3=1e3,ud=64,wE=ud/2,xE=(t,e=w3)=>t%e/(w3/ud),Mc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},N1e=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:Mc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},L1e=(t,e)=>{const r=[];for(let n=0;n{const i=ud/10+xE(n.r,w3*1.5/(s+1));return{...N1e(n.a,n.b,n.c),x:xE(n.x),y:xE(n.y),r:i}})},y0=m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=L1e(r,s);return Y.jsxs(W,{as:"svg",className:Ns(e,D1e({size:n})),viewBox:`0 0 ${ud} ${ud}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:wE,cy:wE,r:wE})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:ud/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),fr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return Y.jsx(W,{as:ay.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},Tz="Dialog",[Rz,Vqe]=_n(Tz),[j1e,ac]=Rz(Tz),F1e=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=m.useRef(null),l=m.useRef(null),[c=!1,f]=Ul({prop:n,defaultProp:s,onChange:i});return m.createElement(j1e,{scope:e,triggerRef:a,contentRef:l,contentId:$l(),titleId:$l(),descriptionId:$l(),open:c,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(u=>!u),[f]),modal:o},r)},Iz="DialogPortal",[B1e,Oz]=Rz(Iz,{forceMount:void 0}),U1e=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=ac(Iz,e);return m.createElement(B1e,{scope:e,forceMount:r},m.Children.map(n,o=>m.createElement(oc,{present:r||i.open},m.createElement(oz,{asChild:!0,container:s},o))))},x3="DialogOverlay",z1e=m.forwardRef((t,e)=>{const r=Oz(x3,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=ac(x3,t.__scopeDialog);return i.modal?m.createElement(oc,{present:n||i.open},m.createElement(V1e,he({},s,{ref:e}))):null}),V1e=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=ac(x3,r);return m.createElement(wz,{as:Bd,allowPinchZoom:!0,shards:[s.contentRef]},m.createElement(rt.div,he({"data-state":Dz(s.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),uy="DialogContent",q1e=m.forwardRef((t,e)=>{const r=Oz(uy,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=ac(uy,t.__scopeDialog);return m.createElement(oc,{present:n||i.open},i.modal?m.createElement(W1e,he({},s,{ref:e})):m.createElement(H1e,he({},s,{ref:e})))}),W1e=m.forwardRef((t,e)=>{const r=ac(uy,t.__scopeDialog),n=m.useRef(null),s=Kt(e,r.contentRef,n);return m.useEffect(()=>{const i=n.current;if(i)return uz(i)},[]),m.createElement(Mz,he({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Se(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Se(t.onFocusOutside,i=>i.preventDefault())}))}),H1e=m.forwardRef((t,e)=>{const r=ac(uy,t.__scopeDialog),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(Mz,he({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),Mz=m.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=ac(uy,r),l=m.useRef(null),c=Kt(e,l);return BU(),m.createElement(m.Fragment,null,m.createElement(UU,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(z$,he({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Dz(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),G1e="DialogClose",K1e=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=ac(G1e,r);return m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,()=>s.onOpenChange(!1))}))});function Dz(t){return t?"open":"closed"}const Q1e=F1e,Y1e=U1e,J1e=z1e,X1e=q1e,Z1e=K1e;var eve=hr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),tve=hr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const Nz=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return Y.jsx(W,{className:eve({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:Y.jsx(W,{className:tve({direction:n}),background:"backgroundPrimary",...s,children:e})})};var rve="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",nve=hr({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"]]}),sve="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",ive="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const Q$=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t;return Y.jsx(Q1e,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(Y1e,{forceMount:!0,children:Y.jsxs(W,{className:ive,children:[Y.jsx(W,{as:J1e,asChild:!0,background:r,className:sve,forceMount:!0,children:Y.jsx(ay.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(X1e,{asChild:!0,className:nve({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:u=>{i?o==null||o():u.preventDefault()},onInteractOutside:u=>{i||u.preventDefault()},children:Y.jsxs(ay.div,{initial:s?!1:{y:"100%",opacity:l==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(Nz,{children:n}):n,i&&Y.jsx(Z1e,{asChild:!0,children:Y.jsx(ba,{icon:zf,backdropFilter:"blur",size:"xs",className:rve,"aria-label":"Close"})})]},"modal-content")})]})})})};var ove=hr({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:[]}),ave="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",lve=hr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const lc=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...b}=t;return Y.jsx(Uf,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{className:Ns(ave,lve({borderRadius:s})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:ove({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...b}),u&&Y.jsx(u,{size:"sm"}),h]})})})}),cve=RegExp("^\\d*(?:\\\\[.])?\\d*$");function fve(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Lz=m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||cve.test(fve(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return Y.jsx(lc,{name:r,onChange:a,onBlur:l,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})});hr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const jz="Progress",hw=100,[uve,qqe]=_n(jz),[dve,Wqe]=uve(jz),hve=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=vve,...o}=t,a=C3(s)?s:hw,l=Fz(n,a)?n:null,c=ib(l)?i(l,a):void 0;return m.createElement(dve,{scope:r,value:l,max:a},m.createElement(rt.div,he({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":ib(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":yve(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});hve.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!C3(n)?new Error(mve(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=C3(t.max)?t.max:hw;return n!=null&&!Fz(n,i)?new Error(pve(s,r)):null}};function vve(t,e){return`${Math.round(t/e*100)}%`}function yve(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function ib(t){return typeof t=="number"}function C3(t){return ib(t)&&!isNaN(t)&&t>0}function Fz(t,e){return ib(t)&&!isNaN(t)&&t<=e&&t>=0}function mve(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${hw}\`.`}function pve(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},Hle=0,lu=[];function Gle(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(Hle++)[0],i=m.useState(function(){return LB()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=yle([t.lockRef.current],(t.shards||[]).map(J7),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=bm(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,$=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&$.type==="range")return!1;var T=Q7(x,$);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=Q7(x,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return Vle(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!lu.length||lu[lu.length-1]!==i)){var b="deltaY"in g?Y7(g):bm(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&qle(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(J7).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=bm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,Y7(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,bm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return lu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,au),document.addEventListener("touchmove",l,au),document.addEventListener("touchstart",f,au),function(){lu=lu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,au),document.removeEventListener("touchmove",l,au),document.removeEventListener("touchstart",f,au)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:Wle(s)}):null,h?m.createElement(Nle,{gapMode:"margin"}):null)}const Kle=Sle(NB,Gle);var UB=m.forwardRef(function(t,e){return m.createElement(nw,vo({},t,{ref:e,sideCar:Kle}))});UB.classNames=nw.classNames;const zB=UB,Qle=["Enter"," "],sw="Menu",[Yle,Lqe,Jle]=Z2(sw),[zf,VB]=Pn(sw,[Jle,gh,bh]);gh();const Xle=bh();zf(sw);const[jqe,Zle]=zf(sw),ece="MenuPortal";zf(ece,{forceMount:void 0});const tce="MenuContent",[Fqe,qB]=zf(tce),i3="MenuItem",X7="menu.itemSelect",WB=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=Zle(i3,t.__scopeMenu),a=qB(i3,t.__scopeMenu),l=Kt(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(X7,{bubbles:!0,cancelable:!0});u.addEventListener(X7,h=>n==null?void 0:n(h),{once:!0}),x$(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(rce,he({},s,{ref:l,disabled:r,onClick:Se(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Se(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Se(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||Qle.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),rce=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=qB(i3,r),a=Xle(r),l=m.useRef(null),c=Kt(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(Yle.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement($$,he({asChild:!0},a,{focusable:!n}),m.createElement(rt.div,he({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Se(t.onPointerMove,Z7(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Se(t.onPointerLeave,Z7(v=>o.onItemLeave(v))),onFocus:Se(t.onFocus,()=>u(!0)),onBlur:Se(t.onBlur,()=>u(!1))}))))}),nce=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(GB,{scope:t.__scopeMenu,checked:r},m.createElement(WB,he({role:"menuitemcheckbox","aria-checked":Wg(r)?"mixed":r},s,{ref:e,"data-state":A$(r),onSelect:Se(s.onSelect,()=>n==null?void 0:n(Wg(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),sce="MenuRadioGroup",[Bqe,ice]=zf(sce,{value:void 0,onValueChange:()=>{}}),oce="MenuRadioItem",ace=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=ice(oce,t.__scopeMenu),i=r===s.value;return m.createElement(GB,{scope:t.__scopeMenu,checked:i},m.createElement(WB,he({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":A$(i),onSelect:Se(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),HB="MenuItemIndicator",[GB,lce]=zf(HB,{checked:!1}),cce=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=lce(HB,r);return m.createElement(ic,{present:n||Wg(i.checked)||i.checked===!0},m.createElement(rt.span,he({},s,{ref:e,"data-state":A$(i.checked)})))}),fce="MenuSub";zf(fce);function Wg(t){return t==="indeterminate"}function A$(t){return Wg(t)?"indeterminate":t?"checked":"unchecked"}function Z7(t){return e=>e.pointerType==="mouse"?t(e):void 0}const uce=nce,dce=ace,hce=cce,KB="DropdownMenu",[vce,Uqe]=Pn(KB,[VB]),_$=VB();vce(KB);const yce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(uce,he({},s,n,{ref:e}))}),mce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(dce,he({},s,n,{ref:e}))}),pce=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=_$(r);return m.createElement(hce,he({},s,n,{ref:e}))}),gce=yce,bce=mce,QB=pce;var YB="_1k2mbvi5",JB="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const wce=({children:t})=>Y.jsx(QB,{className:YB,children:t});m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(gce,{className:Ns(JB,t),...r,ref:n,children:[Y.jsx(wce,{children:Y.jsx(mh,{size:"xs"})}),Y.jsx(re,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>Y.jsxs(bce,{className:Ns(JB,t),...r,ref:n,children:[Y.jsx(QB,{className:YB,children:Y.jsx(re,{children:"•"})}),Y.jsx(re,{variant:"small",children:e})]}));const va=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return Y.jsx(nt,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),xce=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var Cce="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",Ece="_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",Sce=hr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const kce={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=xce(h,e),[y,g]=m.useState(null),b=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],$=k.name,x=k.size/1e3;g({name:$,size:x,extension:$.split(".").pop()??""}),c==null||c(k)},p=u.map(w=>kce[w]).join(",");return Y.jsx(Ff,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:Ns(Ece,Sce({borderRadius:r})),children:[y?Y.jsxs(W,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[Y.jsx(re,{children:y.name}),Y.jsxs(re,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):Y.jsx(re,{children:f}),Y.jsx(W,{accept:p,as:"input",className:Cce,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:b,ref:v,type:"file",...d}),y&&Y.jsx(va,{cursor:"pointer",icon:Bf,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),g(null)},zIndex:"10"})]})})})});var $ce=hr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const o3=1e3,cd=64,sE=cd/2,iE=(t,e=o3)=>t%e/(o3/cd),Dc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},Ace=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:Dc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},_ce=(t,e)=>{const r=[];for(let n=0;n{const i=cd/10+iE(n.r,o3*1.5/(s+1));return{...Ace(n.a,n.b,n.c),x:iE(n.x),y:iE(n.y),r:i}})},u0=m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=_ce(r,s);return Y.jsxs(W,{as:"svg",className:Ns(e,$ce({size:n})),viewBox:`0 0 ${cd} ${cd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[Y.jsxs("defs",{children:[Y.jsx("clipPath",{id:"circle-clip",children:Y.jsx("circle",{cx:sE,cy:sE,r:sE})}),Y.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[Y.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Y.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),Y.jsx("feGaussianBlur",{stdDeviation:cd/10,result:"effect1_foregroundBlur"})]}),Y.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[Y.jsx("stop",{offset:"0",stopColor:o[0].c}),Y.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.a}),Y.jsx("stop",{offset:"1",stopColor:a.b})]}),Y.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[Y.jsx("stop",{offset:"0",stopColor:a.c}),Y.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),Y.jsxs("g",{clipPath:"url(#circle-clip)",children:[Y.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),Y.jsx("g",{filter:"url(#blur)",children:o.map(a=>Y.jsxs(m.Fragment,{children:[Y.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),Y.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})}),fr=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return Y.jsx(W,{as:Zv.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},XB="Dialog",[ZB,zqe]=Pn(XB),[Pce,oc]=ZB(XB),Tce=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=m.useRef(null),l=m.useRef(null),[c=!1,f]=Bl({prop:n,defaultProp:s,onChange:i});return m.createElement(Pce,{scope:e,triggerRef:a,contentRef:l,contentId:Al(),titleId:Al(),descriptionId:Al(),open:c,onOpenChange:f,onOpenToggle:m.useCallback(()=>f(u=>!u),[f]),modal:o},r)},eU="DialogPortal",[Rce,tU]=ZB(eU,{forceMount:void 0}),Ice=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=oc(eU,e);return m.createElement(Rce,{scope:e,forceMount:r},m.Children.map(n,o=>m.createElement(ic,{present:r||i.open},m.createElement(_B,{asChild:!0,container:s},o))))},a3="DialogOverlay",Oce=m.forwardRef((t,e)=>{const r=tU(a3,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=oc(a3,t.__scopeDialog);return i.modal?m.createElement(ic,{present:n||i.open},m.createElement(Mce,he({},s,{ref:e}))):null}),Mce=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=oc(a3,r);return m.createElement(zB,{as:Dd,allowPinchZoom:!0,shards:[s.contentRef]},m.createElement(rt.div,he({"data-state":nU(s.open)},n,{ref:e,style:{pointerEvents:"auto",...n.style}})))}),ny="DialogContent",Dce=m.forwardRef((t,e)=>{const r=tU(ny,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=oc(ny,t.__scopeDialog);return m.createElement(ic,{present:n||i.open},i.modal?m.createElement(Nce,he({},s,{ref:e})):m.createElement(Lce,he({},s,{ref:e})))}),Nce=m.forwardRef((t,e)=>{const r=oc(ny,t.__scopeDialog),n=m.useRef(null),s=Kt(e,r.contentRef,n);return m.useEffect(()=>{const i=n.current;if(i)return OB(i)},[]),m.createElement(rU,he({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)===null||o===void 0||o.focus()}),onPointerDownOutside:Se(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Se(t.onFocusOutside,i=>i.preventDefault())}))}),Lce=m.forwardRef((t,e)=>{const r=oc(ny,t.__scopeDialog),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(rU,he({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),rU=m.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=oc(ny,r),l=m.useRef(null),c=Kt(e,l);return lB(),m.createElement(m.Fragment,null,m.createElement(cB,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(C$,he({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":nU(a.open)},o,{ref:c,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),jce="DialogClose",Fce=m.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=oc(jce,r);return m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,()=>s.onOpenChange(!1))}))});function nU(t){return t?"open":"closed"}const Bce=Tce,Uce=Ice,zce=Oce,Vce=Dce,qce=Fce;var Wce=hr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]}),Hce=hr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});const sU=t=>{const{children:e,shadows:r=!0,direction:n="vertical",contentProps:s,...i}=t;return Y.jsx(W,{className:Wce({direction:n,shadows:r}),position:"relative",width:"full",height:"full",...i,children:Y.jsx(W,{className:Hce({direction:n}),background:"backgroundPrimary",...s,children:e})})};var Gce="fyvr110o fyvr112o fyvr114o fyvr116o fyvr11ho fyvr1qo fyvr1ko fyvr11ni",Kce=hr({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"]]}),Qce="fyvr11hs fyvr1ko fyvr1oo fyvr1qo fyvr1mo",Yce="fyvr11jg fyvr11ko fyvr11h0 fyvr11hs fyvr11ni fyvr1ko fyvr1oo fyvr1qo fyvr1mo";const P$=t=>{const{autoHeight:e=!1,backdropColor:r="backgroundBackdrop",children:n,disableAnimation:s=!1,isDismissible:i=!0,onClose:o,scroll:a=!0,size:l="lg",overlayProps:c,contentProps:f}=t;return Y.jsx(Bce,{modal:!0,defaultOpen:!0,onOpenChange:o,children:Y.jsx(Uce,{forceMount:!0,children:Y.jsxs(W,{className:Yce,children:[Y.jsx(W,{as:zce,asChild:!0,background:r,className:Qce,forceMount:!0,children:Y.jsx(Zv.div,{initial:s?!1:{opacity:0},animate:s?!1:{opacity:1},exit:s?void 0:{opacity:0},transition:{type:"tween",ease:"linear"},...c},"modal-overlay")}),Y.jsx(Vce,{asChild:!0,className:Kce({autoHeight:e,size:l}),forceMount:!0,onEscapeKeyDown:u=>{i?o==null||o():u.preventDefault()},onInteractOutside:u=>{i||u.preventDefault()},children:Y.jsxs(Zv.div,{initial:s?!1:{y:"100%",opacity:l==="sm"?0:1},animate:s?!1:{y:0,opacity:1},exit:s?void 0:{y:"100%",opacity:l==="sm"?0:1},transition:{type:"tween",ease:"easeOut"},...f,children:[a?Y.jsx(sU,{children:n}):n,i&&Y.jsx(qce,{asChild:!0,children:Y.jsx(va,{icon:Bf,backdropFilter:"blur",size:"xs",className:Gce,"aria-label":"Close"})})]},"modal-content")})]})})})};var Jce=hr({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:[]}),Xce="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",Zce=hr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ac=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...g}=t;return Y.jsx(Ff,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:Y.jsx(W,{width:"full",children:Y.jsxs(W,{className:Ns(Xce,Zce({borderRadius:s})),children:[f&&Y.jsx(f,{size:"sm"}),Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Jce({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...g}),u&&Y.jsx(u,{size:"sm"}),h]})})})}),efe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function tfe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const iU=m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||efe.test(tfe(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return Y.jsx(ac,{name:r,onChange:a,onBlur:l,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})});hr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const oU="Progress",iw=100,[rfe,Vqe]=Pn(oU),[nfe,qqe]=rfe(oU),sfe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=ife,...o}=t,a=l3(s)?s:iw,l=aU(n,a)?n:null,c=Hg(l)?i(l,a):void 0;return m.createElement(nfe,{scope:r,value:l,max:a},m.createElement(rt.div,he({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Hg(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":ofe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});sfe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!l3(n)?new Error(afe(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=l3(t.max)?t.max:iw;return n!=null&&!aU(n,i)?new Error(lfe(s,r)):null}};function ife(t,e){return`${Math.round(t/e*100)}%`}function ofe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Hg(t){return typeof t=="number"}function l3(t){return Hg(t)&&!isNaN(t)&&t>0}function aU(t,e){return Hg(t)&&!isNaN(t)&&t<=e&&t>=0}function afe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${iw}\`.`}function lfe(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 ${hw} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${iw} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const Bz="Radio",[gve,Uz]=_n(Bz),[bve,wve]=gve(Bz),xve=m.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Kt(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(bve,{scope:r,checked:s,disabled:o},m.createElement(rt.button,he({type:"button",role:"radio","aria-checked":s,"data-state":zz(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Se(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(Sve,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),Cve="RadioIndicator",Eve=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=wve(Cve,r);return m.createElement(oc,{present:n||i.checked},m.createElement(rt.span,he({"data-state":zz(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),Sve=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=tw(r),a=rw(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function zz(t){return t?"checked":"unchecked"}const kve=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vz="RadioGroup",[$ve,Hqe]=_n(Vz,[Sh,Uz]),qz=Sh(),Wz=Uz(),[Ave,_ve]=$ve(Vz),Pve=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=qz(r),v=lw(c),[y,b]=Ul({prop:i,defaultProp:s,onChange:u});return m.createElement(Ave,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:b},m.createElement(cz,he({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(rt.div,he({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),Tve="RadioGroupItem",Rve=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=_ve(Tve,r),o=i.disabled||n,a=qz(r),l=Wz(r),c=m.useRef(null),f=Kt(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{kve.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement(H$,he({asChild:!0},a,{focusable:!o,active:u}),m.createElement(xve,he({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Se(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Se(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),Ive=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=Wz(r);return m.createElement(Eve,he({},s,n,{ref:e}))}),Ove=Pve,Mve=Rve,Dve=Ive;var Nve=hr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),Lve=hr({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 jve=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return Y.jsx(W,{alignItems:"center",children:Y.jsx(Uf,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(Mve,{className:Lve({size:n}),value:s,id:e,disabled:i,children:Y.jsx(Dve,{className:Nve({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return Y.jsx(Ove,{disabled:n,name:i,ref:e,...l,children:Y.jsx(W,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(jve,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function tR(t,[e,r]){return Math.min(r,Math.max(e,t))}const Hz=m.forwardRef((t,e)=>m.createElement(rt.span,he({},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}}))),Fve=[" ","Enter","ArrowUp","ArrowDown"],Bve=[" ","Enter"],vw="Select",[yw,Y$,Uve]=aw(vw),[kh,Gqe]=_n(vw,[Uve,Eh]),J$=Eh(),[zve,Wf]=kh(vw),[Vve,qve]=kh(vw),Wve=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=J$(e),[y,b]=m.useState(null),[p,g]=m.useState(null),[w,E]=m.useState(!1),k=lw(c),[$=!1,C]=Ul({prop:n,defaultProp:s,onChange:i}),[T,j]=Ul({prop:o,defaultProp:a,onChange:l}),F=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),x=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(ihe,v,m.createElement(zve,{required:h,scope:e,trigger:y,onTriggerChange:b,valueNode:p,onValueNodeChange:g,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:$l(),value:T,onValueChange:j,open:$,onOpenChange:C,dir:k,triggerPointerDownPosRef:F,disabled:d},m.createElement(yw.Provider,{scope:e},m.createElement(Vve,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(Kz,{key:x,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>j(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},Hve="SelectTrigger",Gve=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=J$(r),o=Wf(Hve,r),a=o.disabled||n,l=Kt(e,o.onTriggerChange),c=Y$(r),[f,u,d]=Qz(v=>{const y=c().filter(g=>!g.disabled),b=y.find(g=>g.value===o.value),p=Yz(y,v,b);p!==void 0&&o.onValueChange(p.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(ohe,he({asChild:!0},i),m.createElement(rt.button,he({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":o.value===void 0?"":void 0},s,{ref:l,onClick:Se(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Se(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Se(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&Fve.includes(v.key)&&(h(),v.preventDefault())})})))}),Kve="SelectValue",Qve=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Wf(Kve,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Kt(e,l.onValueNodeChange);return ni(()=>{c(f)},[c,f]),m.createElement(rt.span,he({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),Yve=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(rt.span,he({"aria-hidden":!0},s,{ref:e}),n||"▼")}),zd="SelectContent",Jve=m.forwardRef((t,e)=>{const r=Wf(zd,t.__scopeSelect),[n,s]=m.useState();if(ni(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(Gz,{scope:t.__scopeSelect},m.createElement(yw.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(Xve,he({},t,{ref:e}))}),Ho=10,[Gz,mw]=kh(zd),Xve=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:b,...p}=t,g=Wf(zd,r),[w,E]=m.useState(null),[k,$]=m.useState(null),C=Kt(e,z=>E(z)),[T,j]=m.useState(null),[F,U]=m.useState(null),V=Y$(r),[N,x]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return uz(w)},[w]),BU();const R=m.useCallback(z=>{const[H,...X]=V().map(J=>J.ref.current),[Q]=X.slice(-1),K=document.activeElement;for(const J of z)if(J===K||(J==null||J.scrollIntoView({block:"nearest"}),J===H&&k&&(k.scrollTop=0),J===Q&&k&&(k.scrollTop=k.scrollHeight),J==null||J.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=g;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=Q=>{var K,J,ae,ie;z={x:Math.abs(Math.round(Q.pageX)-((K=(J=I.current)===null||J===void 0?void 0:J.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(Q.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},X=Q=>{z.x<=10&&z.y<=10?Q.preventDefault():w.contains(Q.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",X,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[B,D]=Qz(z=>{const H=V().filter(K=>!K.disabled),X=H.find(K=>K.ref.current===document.activeElement),Q=Yz(H,z,X);Q&&setTimeout(()=>Q.ref.current.focus())}),A=m.useCallback((z,H,X)=>{const Q=!S.current&&!X;(g.value!==void 0&&g.value===H||Q)&&(j(z),Q&&(S.current=!0))},[g.value]),L=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,X)=>{const Q=!S.current&&!X;(g.value!==void 0&&g.value===H||Q)&&U(z)},[g.value]),O=n==="popper"?rR:Zve,q=O===rR?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:b}:{};return m.createElement(Gz,{scope:r,content:w,viewport:k,onViewportChange:$,itemRefCallback:A,selectedItem:T,onItemLeave:L,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:F,position:n,isPositioned:N,searchRef:B},m.createElement(wz,{as:Bd,allowPinchZoom:!0},m.createElement(UU,{asChild:!0,trapped:g.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Se(s,z=>{var H;(H=g.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(z$,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>g.onOpenChange(!1)},m.createElement(O,he({role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:z=>z.preventDefault()},p,q,{onPlaced:()=>x(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:Se(p.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Q=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,J=Q.indexOf(K);Q=Q.slice(J+1)}setTimeout(()=>R(Q)),z.preventDefault()}})}))))))}),Zve=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Wf(zd,r),o=mw(zd,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Kt(e,C=>f(C)),d=Y$(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:p,focusSelectedItem:g}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&b&&p){const C=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),F=p.getBoundingClientRect();if(i.dir!=="rtl"){const K=F.left-T.left,J=j.left-K,ae=C.left-J,ie=C.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Ho,ke=tR(J,[Ho,st-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-F.right,J=window.innerWidth-j.right-K,ae=window.innerWidth-C.right-J,ie=C.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Ho,ke=tR(J,[Ho,st-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-Ho*2,N=y.scrollHeight,x=window.getComputedStyle(c),S=parseInt(x.borderTopWidth,10),R=parseInt(x.paddingTop,10),M=parseInt(x.borderBottomWidth,10),_=parseInt(x.paddingBottom,10),I=S+R+N+_+M,B=Math.min(b.offsetHeight*5,I),D=window.getComputedStyle(y),A=parseInt(D.paddingTop,10),L=parseInt(D.paddingBottom,10),G=C.top+C.height/2-Ho,O=V-G,q=b.offsetHeight/2,z=b.offsetTop+q,H=S+R+z,X=I-H;if(H<=G){const K=b===U[U.length-1].ref.current;a.style.bottom="0px";const J=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?L:0)+J+M),ie=H+ae;a.style.height=ie+"px"}else{const K=b===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?A:0)+q)+X;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${Ho}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,b,p,i.dir,n]);ni(()=>w(),[w]);const[E,k]=m.useState();ni(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const $=m.useCallback(C=>{C&&v.current===!0&&(w(),g==null||g(),v.current=!1)},[w,g]);return m.createElement(eye,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:$},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(rt.div,he({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),rR=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ho,...i}=t,o=J$(r);return m.createElement(ahe,he({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}}))}),[eye,tye]=kh(zd,{}),nR="SelectViewport",rye=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=mw(nR,r),i=tye(nR,r),o=Kt(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.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}"}}),m.createElement(yw.Slot,{scope:r},m.createElement(rt.div,he({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Se(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Ho*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),b=Math.max(v,y);if(b0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),nye="SelectGroup",[sye,Kqe]=kh(nye),iye=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=$l();return m.createElement(sye,{scope:r,id:s},m.createElement(rt.div,he({role:"group","aria-labelledby":s},n,{ref:e})))}),E3="SelectItem",[oye,aye]=kh(E3),lye=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Wf(E3,r),l=mw(E3,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Kt(e,p=>{var g;return(g=l.itemRefCallback)===null||g===void 0?void 0:g.call(l,p,n,s)}),y=$l(),b=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(oye,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(p=>{u(g=>{var w;return g||((w=p==null?void 0:p.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(yw.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(rt.div,he({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Se(o.onFocus,()=>h(!0)),onBlur:Se(o.onBlur,()=>h(!1)),onPointerUp:Se(o.onPointerUp,b),onPointerMove:Se(o.onPointerMove,p=>{if(s){var g;(g=l.onItemLeave)===null||g===void 0||g.call(l)}else p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(o.onPointerLeave,p=>{if(p.currentTarget===document.activeElement){var g;(g=l.onItemLeave)===null||g===void 0||g.call(l)}}),onKeyDown:Se(o.onKeyDown,p=>{var g;((g=l.searchRef)===null||g===void 0?void 0:g.current)!==""&&p.key===" "||(Bve.includes(p.key)&&b(),p.key===" "&&p.preventDefault())})}))))}),_m="SelectItemText",cye=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Wf(_m,r),a=mw(_m,r),l=aye(_m,r),c=qve(_m,r),[f,u]=m.useState(null),d=Kt(e,p=>u(p),l.onItemTextChange,p=>{var g;return(g=a.itemTextRefCallback)===null||g===void 0?void 0:g.call(a,p,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=c;return ni(()=>(y(v),()=>b(v)),[y,b,v]),m.createElement(m.Fragment,null,m.createElement(rt.span,he({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),Kz=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Kt(e,s),o=tw(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(Hz,{asChild:!0},m.createElement("select",he({},n,{ref:i,defaultValue:r})))});Kz.displayName="BubbleSelect";function Qz(t){const e=ri(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function Yz(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=fye(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function fye(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const uye=Wve,dye=Gve,hye=Qve,vye=Yve,yye=Jve,mye=rye,pye=iye,gye=lye,bye=cye;var wye="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",xye="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",Cye="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",Eye=hr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const Sye=m.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(gye,{className:Ns(xye,e),...r,ref:n,children:Y.jsx(bye,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(Uf,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(uye,{disabled:n,name:l,...u,children:[Y.jsxs(dye,{id:s??l,className:Ns(Cye,Eye({borderRadius:r})),ref:e,children:[Y.jsx(hye,{placeholder:f}),Y.jsx(W,{as:vye,display:"inline-flex",children:Y.jsx(MU,{})})]}),Y.jsx(yye,{className:wye,children:Y.jsx(mye,{children:Y.jsx(pye,{children:c.map(({value:d,label:h,...v})=>Y.jsx(Sye,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?Y.jsx(ba,{icon:zf,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(lc,{ref:e,name:i,leftIcon:iw,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var kye=hr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const X$=m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(W,{className:kye({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>Y.jsx(W,{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 Jz="Switch",[$ye,Qqe]=_n(Jz),[Aye,_ye]=$ye(Jz),Pye=m.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,g=>d(g)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[b=!1,p]=Ul({prop:s,defaultProp:i,onChange:c});return m.createElement(Aye,{scope:r,checked:b,disabled:a},m.createElement(rt.button,he({type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":Xz(b),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onClick:Se(t.onClick,g=>{p(w=>!w),y&&(v.current=g.isPropagationStopped(),v.current||g.stopPropagation())})})),y&&m.createElement(Iye,{control:u,bubbles:!v.current,name:n,value:l,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),Tye="SwitchThumb",Rye=m.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=_ye(Tye,r);return m.createElement(rt.span,he({"data-state":Xz(s.checked),"data-disabled":s.disabled?"":void 0},n,{ref:e}))}),Iye=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=tw(r),a=rw(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Xz(t){return t?"checked":"unchecked"}const Oye=Pye,Mye=Rye;var Dye="_1lp2u8e1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11qb fyvr11hw fyvr12uz",Nye="_1lp2u8e3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11nz";const sR=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return Y.jsx(Uf,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:Y.jsx(Oye,{className:Dye,disabled:e,...a,children:Y.jsx(W,{position:"relative",width:"full",height:"full",children:Y.jsx(Mye,{className:Nye})})})})};hr({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 Zz="Tabs",[Lye,Yqe]=_n(Zz,[Sh]),eV=Sh(),[jye,Z$]=Lye(Zz),Fye=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,f=lw(a),[u,d]=Ul({prop:n,onChange:s,defaultProp:i});return m.createElement(jye,{scope:r,baseId:$l(),value:u,onValueChange:d,orientation:o,dir:f,activationMode:l},m.createElement(rt.div,he({dir:f,"data-orientation":o},c,{ref:e})))}),Bye="TabsList",Uye=m.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=Z$(Bye,r),o=eV(r);return m.createElement(cz,he({asChild:!0},o,{orientation:i.orientation,dir:i.dir,loop:n}),m.createElement(rt.div,he({role:"tablist","aria-orientation":i.orientation},s,{ref:e})))}),zye="TabsTrigger",Vye=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=Z$(zye,r),a=eV(r),l=tV(o.baseId,n),c=rV(o.baseId,n),f=n===o.value;return m.createElement(H$,he({asChild:!0},a,{focusable:!s,active:f}),m.createElement(rt.button,he({type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l},i,{ref:e,onMouseDown:Se(t.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?o.onValueChange(n):u.preventDefault()}),onKeyDown:Se(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&o.onValueChange(n)}),onFocus:Se(t.onFocus,()=>{const u=o.activationMode!=="manual";!f&&!s&&u&&o.onValueChange(n)})})))}),qye="TabsContent",Wye=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=Z$(qye,r),l=tV(a.baseId,n),c=rV(a.baseId,n),f=n===a.value,u=m.useRef(f);return m.useEffect(()=>{const d=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(d)},[]),m.createElement(oc,{present:s||f},({present:d})=>m.createElement(rt.div,he({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0}}),d&&i))});function tV(t,e){return`${t}-trigger-${e}`}function rV(t,e){return`${t}-content-${e}`}const Hye=Fye,Gye=Uye,Kye=Vye;var Qye="_10c8o0n1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11pt fyvr14o",Yye="_10c8o0n5 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11rh fyvr12vz",Jye="_10c8o0n3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wh fyvr12wb fyvr128 fyvr15o fyvr12uz fyvr11hw fyvr11ob fyvr11n2 fyvr12sb";const Xye=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,s=e.findIndex(i=>i.value===r);return Y.jsxs(Gye,{className:Qye,style:{outline:void 0},children:[Y.jsx(W,{display:"flex",position:"absolute",inset:"2",height:"8",children:Y.jsx("div",{className:Yye,style:{width:`${n}%`,transform:`translateX(${s*100}%)`}})}),e.map(i=>Y.jsx(Kye,{className:Jye,value:i.value,children:Y.jsx(re,{variant:"normal",fontWeight:"bold",children:i.label})},i.value))]})},Zye=Hye,iR=Wye;var e0e="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return Y.jsxs(W,{className:e0e,ref:e,background:"buttonGlass",...s,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(re,{children:n})]})});const t0e="ToastProvider",[r0e,Jqe,n0e]=aw("Toast"),[nV,Xqe]=_n("Toast",[n0e]),[Zqe,sV]=nV(t0e),oR="toast.viewportPause",aR="toast.viewportResume",pw="Toast",s0e="toast.swipeStart",i0e="toast.swipeMove",o0e="toast.swipeCancel",a0e="toast.swipeEnd",[l0e,c0e]=nV(pw,{onClose(){}}),f0e=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=sV(pw,r),[b,p]=m.useState(null),g=Kt(e,x=>p(x)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,$=m.useRef(0),C=m.useRef(k),T=m.useRef(0),{onToastAdd:j,onToastRemove:F}=y,U=ri(()=>{var x;(b==null?void 0:b.contains(document.activeElement))&&((x=y.viewport)===null||x===void 0||x.focus()),o()}),V=m.useCallback(x=>{!x||x===1/0||(window.clearTimeout(T.current),$.current=new Date().getTime(),T.current=window.setTimeout(U,x))},[U]);m.useEffect(()=>{const x=y.viewport;if(x){const S=()=>{V(C.current),c==null||c()},R=()=>{const M=new Date().getTime()-$.current;C.current=C.current-M,window.clearTimeout(T.current),l==null||l()};return x.addEventListener(oR,R),x.addEventListener(aR,S),()=>{x.removeEventListener(oR,R),x.removeEventListener(aR,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(j(),()=>F()),[j,F]);const N=m.useMemo(()=>b?oV(b):null,[b]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(u0e,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(l0e,{scope:r,onClose:U},Kr.createPortal(m.createElement(r0e.ItemSlot,{scope:r},m.createElement(Ade,{asChild:!0,onEscapeKeyDown:Se(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(rt.li,he({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Se(t.onKeyDown,x=>{x.key==="Escape"&&(a==null||a(x.nativeEvent),x.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Se(t.onPointerDown,x=>{x.button===0&&(w.current={x:x.clientX,y:x.clientY})}),onPointerMove:Se(t.onPointerMove,x=>{if(!w.current)return;const S=x.clientX-w.current.x,R=x.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=_?I(0,S):0,D=_?0:I(0,R),A=x.pointerType==="touch"?10:2,L={x:B,y:D},G={originalEvent:x,delta:L};M?(E.current=L,Pm(i0e,u,G,{discrete:!1})):lR(L,y.swipeDirection,A)?(E.current=L,Pm(s0e,f,G,{discrete:!1}),x.target.setPointerCapture(x.pointerId)):(Math.abs(S)>A||Math.abs(R)>A)&&(w.current=null)}),onPointerUp:Se(t.onPointerUp,x=>{const S=E.current,R=x.target;if(R.hasPointerCapture(x.pointerId)&&R.releasePointerCapture(x.pointerId),E.current=null,w.current=null,S){const M=x.currentTarget,_={originalEvent:x,delta:S};lR(S,y.swipeDirection,y.swipeThreshold)?Pm(a0e,h,_,{discrete:!0}):Pm(o0e,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});f0e.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${pw}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const u0e=t=>{const{__scopeToast:e,children:r,...n}=t,s=sV(pw,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return m0e(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(oz,{asChild:!0},m.createElement(Hz,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},d0e="ToastAction",h0e=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(iV,{altText:r,asChild:!0},m.createElement(y0e,he({},n,{ref:e}))):null});h0e.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${d0e}\``)}};const v0e="ToastClose",y0e=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=c0e(v0e,r);return m.createElement(iV,{asChild:!0},m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,s.onClose)})))}),iV=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(rt.div,he({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function oV(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),p0e(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...oV(n))}}),e}function Pm(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?U$(s,i):s.dispatchEvent(i)}const lR=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function m0e(t=()=>{}){const e=ri(t);ni(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function p0e(t){return t.nodeType===t.ELEMENT_NODE}hr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var g0e="_15pztn2",b0e="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return Y.jsx(Uf,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Ns(b0e,d&&g0e),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});const S3=["dark","light"],w0e="dark",x0e="data-theme",aV="@sequence.theme",C0e=()=>{const t=localStorage.getItem(aV);return S3.includes(t)?t:w0e},E0e=m.createContext(null),gw=t=>{const[e,r]=m.useState(t.theme||C0e());m.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),m.useEffect(()=>{t.theme&&S3.includes(t.theme)&&r(t.theme)},[t.theme]),m.useEffect(()=>{const s=document.querySelector(":root");s&&s.setAttribute(x0e,e)},[e]);const n=m.useMemo(()=>({theme:e,setTheme:s=>{S3.includes(s)&&(localStorage.setItem(aV,s),r(s))}}),[e]);return Y.jsx(E0e.Provider,{value:n,children:t.children})};var S0e="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",k0e="bnrrebe",$0e=hr({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:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return Y.jsx(W,{className:Ns(r,$0e({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?Y.jsx(fr,{className:k0e,disableAnimation:n,src:i}):Y.jsx(re,{className:S0e,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[bw,eWe]=_n("Tooltip",[Eh]);Eh();const A0e="TooltipProvider";bw(A0e);const lV="Tooltip";bw(lV);const _0e="TooltipPortal";bw(_0e,{forceMount:void 0});bw(lV,{isInside:!1});const P0e=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${k9.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${k9.lg}px)`);if(!t.startsWith("@media")){const l=r.get(t);if(!l||l==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=l}const n=t.replace(/^@media( ?)/m,""),s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1}=e,[o,a]=m.useState(()=>s?window.matchMedia(n).matches:i);return m.useEffect(()=>{let l=!0;if(!s)return;const c=window.matchMedia(n),f=()=>{l&&a(c.matches)};return f(),c.addListener(f),()=>{l=!1,c.removeListener(f)}},[n,s]),o};function T0e({storage:t,key:e="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:s=JSON.parse,retry:i}){if(t){const o=a=>{try{t.setItem(e,n(a));return}catch(l){return l}};return{persistClient:R0e(a=>{let l=a,c=o(l),f=0;for(;c&&l;)f++,l=i==null?void 0:i({persistedClient:l,error:c,errorCount:f}),l&&(c=o(l))},r),restoreClient:()=>{const a=t.getItem(e);if(a)return s(a)},removeClient:()=>{t.removeItem(e)}}}return{persistClient:cR,restoreClient:()=>{},removeClient:cR}}function R0e(t,e=100){let r=null,n;return function(...s){n=s,r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}}function cR(){}let $h=class{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 dy=typeof window>"u"||"Deno"in window;function Vs(){}function I0e(t,e){return typeof t=="function"?t(e):t}function k3(t){return typeof t=="number"&&t>=0&&t!==1/0}function cV(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Tm(t,e,r){return m0(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function fV(t,e,r){return m0(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function rl(t,e,r){return m0(t)?[{...e,queryKey:t},r]:[t||{},e]}function fR(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(m0(o)){if(n){if(e.queryHash!==e4(o,e.options))return!1}else if(!ob(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function uR(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(m0(i)){if(!e.options.mutationKey)return!1;if(r){if(Qc(e.options.mutationKey)!==Qc(i))return!1}else if(!ob(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function e4(t,e){return((e==null?void 0:e.queryKeyHashFn)||Qc)(t)}function Qc(t){return JSON.stringify(t,(e,r)=>$3(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function ob(t,e){return uV(t,e)}function uV(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!uV(t[r],e[r])):!1}function dV(t,e){if(t===e)return t;const r=dR(t)&&dR(e);if(r||$3(t)&&$3(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!hR(r)||!r.hasOwnProperty("isPrototypeOf"))}function hR(t){return Object.prototype.toString.call(t)==="[object Object]"}function m0(t){return Array.isArray(t)}function hV(t){return new Promise(e=>{setTimeout(e,t)})}function vR(t){hV(0).then(t)}function O0e(){if(typeof AbortController=="function")return new AbortController}function A3(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?dV(t,e):e}let M0e=class extends $h{constructor(){super(),this.setup=e=>{if(!dy&&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 lb=new M0e,yR=["online","offline"];let D0e=class extends $h{constructor(){super(),this.setup=e=>{if(!dy&&window.addEventListener){const r=()=>e();return yR.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{yR.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 cb=new D0e;function N0e(t){return Math.min(1e3*2**t,3e4)}function ww(t){return(t??"online")==="online"?cb.isOnline():!0}let vV=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Op(t){return t instanceof vV}function yV(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((b,p)=>{i=b,o=p}),l=b=>{n||(h(new vV(b)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!lb.isFocused()||t.networkMode!=="always"&&!cb.isOnline(),d=b=>{n||(n=!0,t.onSuccess==null||t.onSuccess(b),s==null||s(),i(b))},h=b=>{n||(n=!0,t.onError==null||t.onError(b),s==null||s(),o(b))},v=()=>new Promise(b=>{s=p=>{const g=n||!u();return g&&b(p),g},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let b;try{b=t.fn()}catch(p){b=Promise.reject(p)}Promise.resolve(b).then(d).catch(p=>{var g,w;if(n)return;const E=(g=t.retry)!=null?g:3,k=(w=t.retryDelay)!=null?w:N0e,$=typeof k=="function"?k(r,p):k,C=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(p):y()})})};return ww(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const t4=console;function L0e(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):vR(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&vR(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const br=L0e();let mV=class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),k3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(dy?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}},j0e=class extends mV{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||t4,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||F0e(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=A3(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(Vs).catch(Vs):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||!cV(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,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const o=O0e(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if(Op(h)&&h.silent||this.dispatch({type:"error",error:h}),!Op(h)){var v,y,b,p;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(b=(p=this.cache.config).onSettled)==null||b.call(p,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=yV({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,b,p;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(b=(p=this.cache.config).onSettled)==null||b.call(p,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;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:(s=e.meta)!=null?s:null,fetchStatus:ww(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Op(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),br.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}};function F0e(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"}}let B0e=class extends $h{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:e4(i,r);let a=this.get(o);return a||(a=new j0e({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),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(){br.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=rl(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>fR(n,s))}findAll(e,r){const[n]=rl(e,r);return Object.keys(n).length>0?this.queries.filter(s=>fR(n,s)):this.queries}notify(e){br.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){br.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){br.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}},U0e=class extends mV{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||t4,this.observers=[],this.state=e.state||pV(),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 C;return this.retryer=yV({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,j)=>{this.dispatch({type:"failed",failureCount:T,error:j})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const C=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,C,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,C,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,C,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var y,b,p,g,w,E,k,$;throw await((y=(b=this.mutationCache.config).onError)==null?void 0:y.call(b,C,this.state.variables,this.state.context,this)),await((p=(g=this.options).onError)==null?void 0:p.call(g,C,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,C,this.state.variables,this.state.context,this)),await((k=($=this.options).onSettled)==null?void 0:k.call($,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}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:!ww(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),br.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}};function pV(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}let z0e=class extends $h{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new U0e({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(s),s}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(){br.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=>uR(e,r))}findAll(e){return this.mutations.filter(r=>uR(e,r))}notify(e){br.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 br.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(Vs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function V0e(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const b=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var C;if((C=t.signal)!=null&&C.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},p=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),g=($,C,T,j)=>(v=j?[C,...v]:[...v,C],j?[T,...$]:[...$,T]),w=($,C,T,j)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!C&&$.length)return Promise.resolve($);const F={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};b(F);const U=p(F);return Promise.resolve(U).then(N=>g($,T,N,j))};let E;if(!d.length)E=w([]);else if(f){const $=typeof c<"u",C=$?c:mR(t.options,d);E=w(d,$,C)}else if(u){const $=typeof c<"u",C=$?c:q0e(t.options,d);E=w(d,$,C,!0)}else{v=[];const $=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],$,h[0]):Promise.resolve(g([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=$?h[T]:mR(t.options,j);return w(j,$,U)}return Promise.resolve(g(j,h[T],d[T]))})}return E.then($=>({pages:$,pageParams:v}))}}}}function mR(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function q0e(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}let W0e=class{constructor(e={}){this.queryCache=e.queryCache||new B0e,this.mutationCache=e.mutationCache||new z0e,this.logger=e.logger||t4,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=lb.subscribe(()=>{lb.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=cb.subscribe(()=>{cb.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]=rl(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 s=Tm(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=I0e(r,i);if(typeof o>"u")return;const a=Tm(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return br.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=rl(e,r),s=this.queryCache;br.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=rl(e,r,n),o=this.queryCache,a={type:"active",...s};return br.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=rl(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=br.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Vs).catch(Vs)}invalidateQueries(e,r,n){const[s,i]=rl(e,r,n);return br.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=rl(e,r,n),o=br.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Vs);return i!=null&&i.throwOnError||(a=a.catch(Vs)),a}fetchQuery(e,r,n){const s=Tm(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Vs).catch(Vs)}fetchInfiniteQuery(e,r,n){const s=Tm(e,r,n);return s.behavior=V0e(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Vs).catch(Vs)}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(s=>Qc(e)===Qc(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>ob(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>Qc(e)===Qc(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>ob(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=e4(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()}},H0e=class extends $h{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),pR(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _3(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,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),ab(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 i=this.hasListeners();i&&gR(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||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 K0e(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(Vs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),dy||this.currentResult.isStale||!k3(this.options.staleTime))return;const r=cV(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,!(dy||this.options.enabled===!1||!k3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||lb.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,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:b}=u,p=!1,g=!1,w;if(r._optimisticResults){const T=this.hasListeners(),j=!T&&pR(e,r),F=T&&gR(e,n,r,s);(j||F)&&(y=ww(e.options.networkMode)?"fetching":"paused",d||(b="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&b!=="error")w=f.data,d=f.dataUpdatedAt,b=f.status,p=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=A3(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&b==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(j){this.selectError=j}typeof T<"u"&&(b="success",w=A3(i==null?void 0:i.data,T,r),g=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),b="error");const E=y==="fetching",k=b==="loading",$=b==="error";return{status:b,fetchStatus:y,isLoading:k,isSuccess:b==="success",isError:$,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:$&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:g,isPreviousData:p,isRefetchError:$&&u.dataUpdatedAt!==0,isStale:r4(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,ab(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{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 l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const f=c;return this.currentResult[f]!==r[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...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"&&!Op(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){br.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}};function G0e(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function pR(t,e){return G0e(t,e)||t.state.dataUpdatedAt>0&&_3(t,e,e.refetchOnMount)}function _3(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&r4(t,e)}return!1}function gR(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&r4(t,r)}function r4(t,e){return t.isStaleByTime(e.staleTime)}function K0e(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!ab(t.getCurrentResult(),e)}let Q0e=class extends $h{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),ab(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:pV(),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){br.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,s,i;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(s=(i=this.mutateOptions).onSettled)==null||s.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,l,c;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)})})}};function Y0e(t){return{mutationKey:t.options.mutationKey,state:t.state}}function J0e(t){return{state:t.state,queryKey:t.queryKey,queryHash:t.queryHash}}function X0e(t){return t.state.isPaused}function Z0e(t){return t.state.status==="success"}function eme(t,e={}){const r=[],n=[];if(e.dehydrateMutations!==!1){const s=e.shouldDehydrateMutation||X0e;t.getMutationCache().getAll().forEach(i=>{s(i)&&r.push(Y0e(i))})}if(e.dehydrateQueries!==!1){const s=e.shouldDehydrateQuery||Z0e;t.getQueryCache().getAll().forEach(i=>{s(i)&&n.push(J0e(i))})}return{mutations:r,queries:n}}function tme(t,e,r){if(typeof e!="object"||e===null)return;const n=t.getMutationCache(),s=t.getQueryCache(),i=e.mutations||[],o=e.queries||[];i.forEach(a=>{var l;n.build(t,{...r==null||(l=r.defaultOptions)==null?void 0:l.mutations,mutationKey:a.mutationKey},a.state)}),o.forEach(a=>{var l;const c=s.get(a.queryHash),f={...a.state,fetchStatus:"idle"};if(c){c.state.dataUpdatedAt{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Kt(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(ffe,{scope:r,checked:s,disabled:o},m.createElement(rt.button,he({type:"button",role:"radio","aria-checked":s,"data-state":fU(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Se(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(yfe,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),hfe="RadioIndicator",vfe=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=ufe(hfe,r);return m.createElement(ic,{present:n||i.checked},m.createElement(rt.span,he({"data-state":fU(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),yfe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fU(t){return t?"checked":"unchecked"}const mfe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],uU="RadioGroup",[pfe,Wqe]=Pn(uU,[bh,cU]),dU=bh(),hU=cU(),[gfe,bfe]=pfe(uU),wfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=dU(r),v=ew(c),[y,g]=Bl({prop:i,defaultProp:s,onChange:u});return m.createElement(gfe,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g},m.createElement(RB,he({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(rt.div,he({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),xfe="RadioGroupItem",Cfe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=bfe(xfe,r),o=i.disabled||n,a=dU(r),l=hU(r),c=m.useRef(null),f=Kt(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{mfe.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement($$,he({asChild:!0},a,{focusable:!o,active:u}),m.createElement(dfe,he({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Se(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Se(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),Efe=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=hU(r);return m.createElement(vfe,he({},s,n,{ref:e}))}),Sfe=wfe,kfe=Cfe,$fe=Efe;var Afe=hr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),_fe=hr({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 Pfe=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return Y.jsx(W,{alignItems:"center",children:Y.jsx(Ff,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:Y.jsx(kfe,{className:_fe({size:n}),value:s,id:e,disabled:i,children:Y.jsx($fe,{className:Afe({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return Y.jsx(Sfe,{disabled:n,name:i,ref:e,...l,children:Y.jsx(W,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>Y.jsx(Pfe,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function e9(t,[e,r]){return Math.min(r,Math.max(e,t))}const vU=m.forwardRef((t,e)=>m.createElement(rt.span,he({},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}}))),Tfe=[" ","Enter","ArrowUp","ArrowDown"],Rfe=[" ","Enter"],ow="Select",[aw,T$,Ife]=Z2(ow),[wh,Hqe]=Pn(ow,[Ife,gh]),R$=gh(),[Ofe,Vf]=wh(ow),[Mfe,Dfe]=wh(ow),Nfe=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=R$(e),[y,g]=m.useState(null),[b,p]=m.useState(null),[w,E]=m.useState(!1),k=ew(c),[$=!1,x]=Bl({prop:n,defaultProp:s,onChange:i}),[T,B]=Bl({prop:o,defaultProp:a,onChange:l}),L=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),C=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(Yae,v,m.createElement(Ofe,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:b,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:Al(),value:T,onValueChange:B,open:$,onOpenChange:x,dir:k,triggerPointerDownPosRef:L,disabled:d},m.createElement(aw.Provider,{scope:e},m.createElement(Mfe,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(mU,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>B(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},Lfe="SelectTrigger",jfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=R$(r),o=Vf(Lfe,r),a=o.disabled||n,l=Kt(e,o.onTriggerChange),c=T$(r),[f,u,d]=pU(v=>{const y=c().filter(p=>!p.disabled),g=y.find(p=>p.value===o.value),b=gU(y,v,g);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(Jae,he({asChild:!0},i),m.createElement(rt.button,he({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":o.value===void 0?"":void 0},s,{ref:l,onClick:Se(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Se(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Se(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&Tfe.includes(v.key)&&(h(),v.preventDefault())})})))}),Ffe="SelectValue",Bfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Vf(Ffe,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Kt(e,l.onValueNodeChange);return ni(()=>{c(f)},[c,f]),m.createElement(rt.span,he({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),Ufe=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(rt.span,he({"aria-hidden":!0},s,{ref:e}),n||"▼")}),Ld="SelectContent",zfe=m.forwardRef((t,e)=>{const r=Vf(Ld,t.__scopeSelect),[n,s]=m.useState();if(ni(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(yU,{scope:t.__scopeSelect},m.createElement(aw.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(Vfe,he({},t,{ref:e}))}),qo=10,[yU,lw]=wh(Ld),Vfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g,...b}=t,p=Vf(Ld,r),[w,E]=m.useState(null),[k,$]=m.useState(null),x=Kt(e,z=>E(z)),[T,B]=m.useState(null),[L,U]=m.useState(null),V=T$(r),[N,C]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return OB(w)},[w]),lB();const R=m.useCallback(z=>{const[H,...J]=V().map(Q=>Q.ref.current),[X]=J.slice(-1),K=document.activeElement;for(const Q of z)if(Q===K||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===H&&k&&(k.scrollTop=0),Q===X&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=p;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=X=>{var K,Q,ae,ie;z={x:Math.abs(Math.round(X.pageX)-((K=(Q=I.current)===null||Q===void 0?void 0:Q.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(X.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},J=X=>{z.x<=10&&z.y<=10?X.preventDefault():w.contains(X.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[F,D]=pU(z=>{const H=V().filter(K=>!K.disabled),J=H.find(K=>K.ref.current===document.activeElement),X=gU(H,z,J);X&&setTimeout(()=>X.ref.current.focus())}),A=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&(B(z),X&&(S.current=!0))},[p.value]),j=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&U(z)},[p.value]),O=n==="popper"?t9:qfe,q=O===t9?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g}:{};return m.createElement(yU,{scope:r,content:w,viewport:k,onViewportChange:$,itemRefCallback:A,selectedItem:T,onItemLeave:j,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:L,position:n,isPositioned:N,searchRef:F},m.createElement(zB,{as:Dd,allowPinchZoom:!0},m.createElement(cB,{asChild:!0,trapped:p.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Se(s,z=>{var H;(H=p.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(C$,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>p.onOpenChange(!1)},m.createElement(O,he({role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:z=>z.preventDefault()},b,q,{onPlaced:()=>C(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Se(b.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let X=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,Q=X.indexOf(K);X=X.slice(Q+1)}setTimeout(()=>R(X)),z.preventDefault()}})}))))))}),qfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Vf(Ld,r),o=lw(Ld,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Kt(e,x=>f(x)),d=T$(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:b,focusSelectedItem:p}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&g&&b){const x=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=b.getBoundingClientRect();if(i.dir!=="rtl"){const K=L.left-T.left,Q=B.left-K,ae=x.left-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-qo,ke=e9(Q,[qo,st-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-L.right,Q=window.innerWidth-B.right-K,ae=window.innerWidth-x.right-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-qo,ke=e9(Q,[qo,st-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-qo*2,N=y.scrollHeight,C=window.getComputedStyle(c),S=parseInt(C.borderTopWidth,10),R=parseInt(C.paddingTop,10),M=parseInt(C.borderBottomWidth,10),_=parseInt(C.paddingBottom,10),I=S+R+N+_+M,F=Math.min(g.offsetHeight*5,I),D=window.getComputedStyle(y),A=parseInt(D.paddingTop,10),j=parseInt(D.paddingBottom,10),G=x.top+x.height/2-qo,O=V-G,q=g.offsetHeight/2,z=g.offsetTop+q,H=S+R+z,J=I-H;if(H<=G){const K=g===U[U.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?j:0)+Q+M),ie=H+ae;a.style.height=ie+"px"}else{const K=g===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?A:0)+q)+J;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${qo}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,g,b,i.dir,n]);ni(()=>w(),[w]);const[E,k]=m.useState();ni(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const $=m.useCallback(x=>{x&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return m.createElement(Wfe,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:$},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(rt.div,he({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),t9=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=qo,...i}=t,o=R$(r);return m.createElement(Xae,he({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}}))}),[Wfe,Hfe]=wh(Ld,{}),r9="SelectViewport",Gfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=lw(r9,r),i=Hfe(r9,r),o=Kt(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.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}"}}),m.createElement(aw.Slot,{scope:r},m.createElement(rt.div,he({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Se(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-qo*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(v,y);if(g0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),Kfe="SelectGroup",[Qfe,Gqe]=wh(Kfe),Yfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Al();return m.createElement(Qfe,{scope:r,id:s},m.createElement(rt.div,he({role:"group","aria-labelledby":s},n,{ref:e})))}),c3="SelectItem",[Jfe,Xfe]=wh(c3),Zfe=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Vf(c3,r),l=lw(c3,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Kt(e,b=>{var p;return(p=l.itemRefCallback)===null||p===void 0?void 0:p.call(l,b,n,s)}),y=Al(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(Jfe,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(b=>{u(p=>{var w;return p||((w=b==null?void 0:b.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(aw.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(rt.div,he({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Se(o.onFocus,()=>h(!0)),onBlur:Se(o.onBlur,()=>h(!1)),onPointerUp:Se(o.onPointerUp,g),onPointerMove:Se(o.onPointerMove,b=>{if(s){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}}),onKeyDown:Se(o.onKeyDown,b=>{var p;((p=l.searchRef)===null||p===void 0?void 0:p.current)!==""&&b.key===" "||(Rfe.includes(b.key)&&g(),b.key===" "&&b.preventDefault())})}))))}),wm="SelectItemText",eue=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Vf(wm,r),a=lw(wm,r),l=Xfe(wm,r),c=Dfe(wm,r),[f,u]=m.useState(null),d=Kt(e,b=>u(b),l.onItemTextChange,b=>{var p;return(p=a.itemTextRefCallback)===null||p===void 0?void 0:p.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=c;return ni(()=>(y(v),()=>g(v)),[y,g,v]),m.createElement(m.Fragment,null,m.createElement(rt.span,he({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),mU=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Kt(e,s),o=G2(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(vU,{asChild:!0},m.createElement("select",he({},n,{ref:i,defaultValue:r})))});mU.displayName="BubbleSelect";function pU(t){const e=ri(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function gU(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=tue(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function tue(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const rue=Nfe,nue=jfe,sue=Bfe,iue=Ufe,oue=zfe,aue=Gfe,lue=Yfe,cue=Zfe,fue=eue;var uue="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",due="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",hue="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",vue=hr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const yue=m.forwardRef(({children:t,className:e,...r},n)=>Y.jsx(cue,{className:Ns(due,e),...r,ref:n,children:Y.jsx(fue,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return Y.jsx(Ff,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:Y.jsxs(rue,{disabled:n,name:l,...u,children:[Y.jsxs(nue,{id:s??l,className:Ns(hue,vue({borderRadius:r})),ref:e,children:[Y.jsx(sue,{placeholder:f}),Y.jsx(W,{as:iue,display:"inline-flex",children:Y.jsx(rB,{})})]}),Y.jsx(oue,{className:uue,children:Y.jsx(aue,{children:Y.jsx(lue,{children:c.map(({value:d,label:h,...v})=>Y.jsx(yue,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?Y.jsx(va,{icon:Bf,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return Y.jsx(ac,{ref:e,name:i,leftIcon:J2,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var mue=hr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});const I$=m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return Y.jsx(W,{className:mue({size:r}),color:"text50",ref:e,...n,children:Y.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[Y.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),Y.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>Y.jsx(W,{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 bU="Switch",[pue,Kqe]=Pn(bU),[gue,bue]=pue(bU),wue=m.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Kt(e,p=>d(p)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=Bl({prop:s,defaultProp:i,onChange:c});return m.createElement(gue,{scope:r,checked:g,disabled:a},m.createElement(rt.button,he({type:"button",role:"switch","aria-checked":g,"aria-required":o,"data-state":wU(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onClick:Se(t.onClick,p=>{b(w=>!w),y&&(v.current=p.isPropagationStopped(),v.current||p.stopPropagation())})})),y&&m.createElement(Eue,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),xue="SwitchThumb",Cue=m.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=bue(xue,r);return m.createElement(rt.span,he({"data-state":wU(s.checked),"data-disabled":s.disabled?"":void 0},n,{ref:e}))}),Eue=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=G2(r),a=K2(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",he({type:"checkbox","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function wU(t){return t?"checked":"unchecked"}const Sue=wue,kue=Cue;var $ue="_1lp2u8e1 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr1ss fyvr1uo fyvr1wk fyvr1yg fyvr11qb fyvr11hw fyvr12uz",Aue="_1lp2u8e3 fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ho fyvr1ko fyvr1oo fyvr1k fyvr140 fyvr11nz";const n9=t=>{const{disabled:e,label:r,labelLocation:n="left",description:s,id:i,name:o,...a}=t;return Y.jsx(Ff,{disabled:e,display:"flex",id:i??o,label:r,labelLocation:n,description:s,whiteSpace:"nowrap",children:Y.jsx(Sue,{className:$ue,disabled:e,...a,children:Y.jsx(W,{position:"relative",width:"full",height:"full",children:Y.jsx(kue,{className:Aue})})})})};hr({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 xU="Tabs",[_ue,Qqe]=Pn(xU,[bh]),CU=bh(),[Pue,O$]=_ue(xU),Tue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,f=ew(a),[u,d]=Bl({prop:n,onChange:s,defaultProp:i});return m.createElement(Pue,{scope:r,baseId:Al(),value:u,onValueChange:d,orientation:o,dir:f,activationMode:l},m.createElement(rt.div,he({dir:f,"data-orientation":o},c,{ref:e})))}),Rue="TabsList",Iue=m.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=O$(Rue,r),o=CU(r);return m.createElement(RB,he({asChild:!0},o,{orientation:i.orientation,dir:i.dir,loop:n}),m.createElement(rt.div,he({role:"tablist","aria-orientation":i.orientation},s,{ref:e})))}),Oue="TabsTrigger",Mue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=O$(Oue,r),a=CU(r),l=EU(o.baseId,n),c=SU(o.baseId,n),f=n===o.value;return m.createElement($$,he({asChild:!0},a,{focusable:!s,active:f}),m.createElement(rt.button,he({type:"button",role:"tab","aria-selected":f,"aria-controls":c,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l},i,{ref:e,onMouseDown:Se(t.onMouseDown,u=>{!s&&u.button===0&&u.ctrlKey===!1?o.onValueChange(n):u.preventDefault()}),onKeyDown:Se(t.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&o.onValueChange(n)}),onFocus:Se(t.onFocus,()=>{const u=o.activationMode!=="manual";!f&&!s&&u&&o.onValueChange(n)})})))}),Due="TabsContent",Nue=m.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=O$(Due,r),l=EU(a.baseId,n),c=SU(a.baseId,n),f=n===a.value,u=m.useRef(f);return m.useEffect(()=>{const d=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(d)},[]),m.createElement(ic,{present:s||f},({present:d})=>m.createElement(rt.div,he({"data-state":f?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!d,id:c,tabIndex:0},o,{ref:e,style:{...t.style,animationDuration:u.current?"0s":void 0}}),d&&i))});function EU(t,e){return`${t}-trigger-${e}`}function SU(t,e){return`${t}-content-${e}`}const Lue=Tue,jue=Iue,Fue=Mue;var Bue="_10c8o0n1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr11h0 fyvr11hw fyvr128 fyvr11pt fyvr14o",Uue="_10c8o0n5 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ho fyvr1ko fyvr1oo fyvr14c fyvr11rh fyvr12vz",zue="_10c8o0n3 fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr12wh fyvr12wb fyvr128 fyvr15o fyvr12uz fyvr11hw fyvr11ob fyvr11n2 fyvr12sb";const Vue=t=>{const{tabs:e,value:r}=t;if(!e.length)return null;const n=100/e.length,s=e.findIndex(i=>i.value===r);return Y.jsxs(jue,{className:Bue,style:{outline:void 0},children:[Y.jsx(W,{display:"flex",position:"absolute",inset:"2",height:"8",children:Y.jsx("div",{className:Uue,style:{width:`${n}%`,transform:`translateX(${s*100}%)`}})}),e.map(i=>Y.jsx(Fue,{className:zue,value:i.value,children:Y.jsx(re,{variant:"normal",fontWeight:"bold",children:i.label})},i.value))]})},que=Lue,s9=Nue;var Wue="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return Y.jsxs(W,{className:Wue,ref:e,background:"buttonGlass",...s,children:[r&&Y.jsx(r,{size:"xs"}),Y.jsx(re,{children:n})]})});const Hue="ToastProvider",[Gue,Yqe,Kue]=Z2("Toast"),[kU,Jqe]=Pn("Toast",[Kue]),[Xqe,$U]=kU(Hue),i9="toast.viewportPause",o9="toast.viewportResume",cw="Toast",Que="toast.swipeStart",Yue="toast.swipeMove",Jue="toast.swipeCancel",Xue="toast.swipeEnd",[Zue,ede]=kU(cw,{onClose(){}}),tde=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=$U(cw,r),[g,b]=m.useState(null),p=Kt(e,C=>b(C)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,$=m.useRef(0),x=m.useRef(k),T=m.useRef(0),{onToastAdd:B,onToastRemove:L}=y,U=ri(()=>{var C;(g==null?void 0:g.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),V=m.useCallback(C=>{!C||C===1/0||(window.clearTimeout(T.current),$.current=new Date().getTime(),T.current=window.setTimeout(U,C))},[U]);m.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{V(x.current),c==null||c()},R=()=>{const M=new Date().getTime()-$.current;x.current=x.current-M,window.clearTimeout(T.current),l==null||l()};return C.addEventListener(i9,R),C.addEventListener(o9,S),()=>{C.removeEventListener(i9,R),C.removeEventListener(o9,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(B(),()=>L()),[B,L]);const N=m.useMemo(()=>g?_U(g):null,[g]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(rde,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(Zue,{scope:r,onClose:U},Kr.createPortal(m.createElement(Gue.ItemSlot,{scope:r},m.createElement(gae,{asChild:!0,onEscapeKeyDown:Se(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(rt.li,he({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Se(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Se(t.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Se(t.onPointerMove,C=>{if(!w.current)return;const S=C.clientX-w.current.x,R=C.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=_?I(0,S):0,D=_?0:I(0,R),A=C.pointerType==="touch"?10:2,j={x:F,y:D},G={originalEvent:C,delta:j};M?(E.current=j,xm(Yue,u,G,{discrete:!1})):a9(j,y.swipeDirection,A)?(E.current=j,xm(Que,f,G,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>A||Math.abs(R)>A)&&(w.current=null)}),onPointerUp:Se(t.onPointerUp,C=>{const S=E.current,R=C.target;if(R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),E.current=null,w.current=null,S){const M=C.currentTarget,_={originalEvent:C,delta:S};a9(S,y.swipeDirection,y.swipeThreshold)?xm(Xue,h,_,{discrete:!0}):xm(Jue,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});tde.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${cw}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const rde=t=>{const{__scopeToast:e,children:r,...n}=t,s=$U(cw,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return ade(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(_B,{asChild:!0},m.createElement(vU,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},nde="ToastAction",sde=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(AU,{altText:r,asChild:!0},m.createElement(ode,he({},n,{ref:e}))):null});sde.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${nde}\``)}};const ide="ToastClose",ode=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=ede(ide,r);return m.createElement(AU,{asChild:!0},m.createElement(rt.button,he({type:"button"},n,{ref:e,onClick:Se(t.onClick,s.onClose)})))}),AU=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(rt.div,he({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function _U(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),lde(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(..._U(n))}}),e}function xm(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?x$(s,i):s.dispatchEvent(i)}const a9=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function ade(t=()=>{}){const e=ri(t);ni(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function lde(t){return t.nodeType===t.ELEMENT_NODE}hr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var cde="_15pztn2",fde="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return Y.jsx(Ff,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:Y.jsx(W,{as:r,autoComplete:n,spellCheck:"false",className:Ns(fde,d&&cde),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});const f3=["dark","light"],ude="dark",dde="data-theme",PU="@sequence.theme",hde=()=>{const t=localStorage.getItem(PU);return f3.includes(t)?t:ude},vde=m.createContext(null),fw=t=>{const[e,r]=m.useState(t.theme||hde());m.useEffect(()=>{/Mac/.test(window.navigator.userAgent)&&window.document.documentElement.classList.add("is-apple")},[]),m.useEffect(()=>{t.theme&&f3.includes(t.theme)&&r(t.theme)},[t.theme]),m.useEffect(()=>{const s=document.querySelector(":root");s&&s.setAttribute(dde,e)},[e]);const n=m.useMemo(()=>({theme:e,setTheme:s=>{f3.includes(s)&&(localStorage.setItem(PU,s),r(s))}}),[e]);return Y.jsx(vde.Provider,{value:n,children:t.children})};var yde="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",mde="bnrrebe",pde=hr({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:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return Y.jsx(W,{className:Ns(r,pde({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?Y.jsx(fr,{className:mde,disableAnimation:n,src:i}):Y.jsx(re,{className:yde,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[uw,Zqe]=Pn("Tooltip",[gh]);gh();const gde="TooltipProvider";uw(gde);const TU="Tooltip";uw(TU);const bde="TooltipPortal";uw(bde,{forceMount:void 0});uw(TU,{isInside:!1});const wde=(t,e={})=>{const r=new Map().set("isMobile",`@media screen and (max-width: ${S7.lg-1}px)`).set("isDesktop",`@media screen and (min-width: ${S7.lg}px)`);if(!t.startsWith("@media")){const l=r.get(t);if(!l||l==="")throw new Error(`useMediaQuery failed to get breakpoint from theme for: ${t}`);t=l}const n=t.replace(/^@media( ?)/m,""),s=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:i=!1}=e,[o,a]=m.useState(()=>s?window.matchMedia(n).matches:i);return m.useEffect(()=>{let l=!0;if(!s)return;const c=window.matchMedia(n),f=()=>{l&&a(c.matches)};return f(),c.addListener(f),()=>{l=!1,c.removeListener(f)}},[n,s]),o};function xde({storage:t,key:e="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:s=JSON.parse,retry:i}){if(t){const o=a=>{try{t.setItem(e,n(a));return}catch(l){return l}};return{persistClient:Cde(a=>{let l=a,c=o(l),f=0;for(;c&&l;)f++,l=i==null?void 0:i({persistedClient:l,error:c,errorCount:f}),l&&(c=o(l))},r),restoreClient:()=>{const a=t.getItem(e);if(a)return s(a)},removeClient:()=>{t.removeItem(e)}}}return{persistClient:l9,restoreClient:()=>{},removeClient:l9}}function Cde(t,e=100){let r=null,n;return function(...s){n=s,r===null&&(r=setTimeout(()=>{t(...n),r=null},e))}}function l9(){}let xh=class{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 sy=typeof window>"u"||"Deno"in window;function qs(){}function Ede(t,e){return typeof t=="function"?t(e):t}function u3(t){return typeof t=="number"&&t>=0&&t!==1/0}function RU(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Cm(t,e,r){return d0(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function IU(t,e,r){return d0(t)?typeof e=="function"?{...r,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:typeof t=="function"?{...e,mutationFn:t}:{...t}}function nl(t,e,r){return d0(t)?[{...e,queryKey:t},r]:[t||{},e]}function c9(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(d0(o)){if(n){if(e.queryHash!==M$(o,e.options))return!1}else if(!Gg(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function f9(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(d0(i)){if(!e.options.mutationKey)return!1;if(r){if(Yc(e.options.mutationKey)!==Yc(i))return!1}else if(!Gg(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function M$(t,e){return((e==null?void 0:e.queryKeyHashFn)||Yc)(t)}function Yc(t){return JSON.stringify(t,(e,r)=>d3(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Gg(t,e){return OU(t,e)}function OU(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!OU(t[r],e[r])):!1}function MU(t,e){if(t===e)return t;const r=u9(t)&&u9(e);if(r||d3(t)&&d3(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!d9(r)||!r.hasOwnProperty("isPrototypeOf"))}function d9(t){return Object.prototype.toString.call(t)==="[object Object]"}function d0(t){return Array.isArray(t)}function DU(t){return new Promise(e=>{setTimeout(e,t)})}function h9(t){DU(0).then(t)}function Sde(){if(typeof AbortController=="function")return new AbortController}function h3(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?MU(t,e):e}let kde=class extends xh{constructor(){super(),this.setup=e=>{if(!sy&&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 Qg=new kde,v9=["online","offline"];let $de=class extends xh{constructor(){super(),this.setup=e=>{if(!sy&&window.addEventListener){const r=()=>e();return v9.forEach(n=>{window.addEventListener(n,r,!1)}),()=>{v9.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 Yg=new $de;function Ade(t){return Math.min(1e3*2**t,3e4)}function dw(t){return(t??"online")==="online"?Yg.isOnline():!0}let NU=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $p(t){return t instanceof NU}function LU(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((g,b)=>{i=g,o=b}),l=g=>{n||(h(new NU(g)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!Qg.isFocused()||t.networkMode!=="always"&&!Yg.isOnline(),d=g=>{n||(n=!0,t.onSuccess==null||t.onSuccess(g),s==null||s(),i(g))},h=g=>{n||(n=!0,t.onError==null||t.onError(g),s==null||s(),o(g))},v=()=>new Promise(g=>{s=b=>{const p=n||!u();return p&&g(b),p},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let g;try{g=t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var p,w;if(n)return;const E=(p=t.retry)!=null?p:3,k=(w=t.retryDelay)!=null?w:Ade,$=typeof k=="function"?k(r,b):k,x=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(b):y()})})};return dw(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const D$=console;function _de(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):h9(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&h9(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const br=_de();let jU=class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u3(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(sy?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}},Pde=class extends jU{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||D$,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Tde(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=h3(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(qs).catch(qs):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||!RU(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,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const o=Sde(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if($p(h)&&h.silent||this.dispatch({type:"error",error:h}),!$p(h)){var v,y,g,b;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=LU({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,g,b;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;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:(s=e.meta)!=null?s:null,fetchStatus:dw(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return $p(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),br.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}};function Tde(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"}}let Rde=class extends xh{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:M$(i,r);let a=this.get(o);return a||(a=new Pde({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),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(){br.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=nl(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>c9(n,s))}findAll(e,r){const[n]=nl(e,r);return Object.keys(n).length>0?this.queries.filter(s=>c9(n,s)):this.queries}notify(e){br.batch(()=>{this.listeners.forEach(({listener:r})=>{r(e)})})}onFocus(){br.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){br.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}},Ide=class extends jU{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||D$,this.observers=[],this.state=e.state||FU(),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 x;return this.retryer=LU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,B)=>{this.dispatch({type:"failed",failureCount:T,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(x=this.options.retry)!=null?x:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const x=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,x,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,x,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,x,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,x,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:x}),x}catch(x){try{var y,g,b,p,w,E,k,$;throw await((y=(g=this.mutationCache.config).onError)==null?void 0:y.call(g,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onError)==null?void 0:b.call(p,x,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,x,this.state.variables,this.state.context,this)),await((k=($=this.options).onSettled)==null?void 0:k.call($,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}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:!dw(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),br.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}};function FU(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}let Ode=class extends xh{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new Ide({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(s),s}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(){br.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=>f9(e,r))}findAll(e){return this.mutations.filter(r=>f9(e,r))}notify(e){br.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 br.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(qs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}};function Mde(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const g=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var x;if((x=t.signal)!=null&&x.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),p=($,x,T,B)=>(v=B?[x,...v]:[...v,x],B?[T,...$]:[...$,T]),w=($,x,T,B)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!x&&$.length)return Promise.resolve($);const L={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};g(L);const U=b(L);return Promise.resolve(U).then(N=>p($,T,N,B))};let E;if(!d.length)E=w([]);else if(f){const $=typeof c<"u",x=$?c:y9(t.options,d);E=w(d,$,x)}else if(u){const $=typeof c<"u",x=$?c:Dde(t.options,d);E=w(d,$,x,!0)}else{v=[];const $=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],$,h[0]):Promise.resolve(p([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=$?h[T]:y9(t.options,B);return w(B,$,U)}return Promise.resolve(p(B,h[T],d[T]))})}return E.then($=>({pages:$,pageParams:v}))}}}}function y9(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function Dde(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}let Nde=class{constructor(e={}){this.queryCache=e.queryCache||new Rde,this.mutationCache=e.mutationCache||new Ode,this.logger=e.logger||D$,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Qg.subscribe(()=>{Qg.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Yg.subscribe(()=>{Yg.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]=nl(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 s=Cm(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=Ede(r,i);if(typeof o>"u")return;const a=Cm(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return br.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=nl(e,r),s=this.queryCache;br.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=nl(e,r,n),o=this.queryCache,a={type:"active",...s};return br.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=nl(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=br.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(qs).catch(qs)}invalidateQueries(e,r,n){const[s,i]=nl(e,r,n);return br.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=nl(e,r,n),o=br.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(qs);return i!=null&&i.throwOnError||(a=a.catch(qs)),a}fetchQuery(e,r,n){const s=Cm(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(qs).catch(qs)}fetchInfiniteQuery(e,r,n){const s=Cm(e,r,n);return s.behavior=Mde(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(qs).catch(qs)}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(s=>Yc(e)===Yc(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>Gg(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>Yc(e)===Yc(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>Gg(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=M$(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()}},Lde=class extends xh{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),m9(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return v3(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return v3(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,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Kg(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 i=this.hasListeners();i&&p9(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||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 Fde(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(qs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),sy||this.currentResult.isStale||!u3(this.options.staleTime))return;const r=RU(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,!(sy||this.options.enabled===!1||!u3(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Qg.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,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:g}=u,b=!1,p=!1,w;if(r._optimisticResults){const T=this.hasListeners(),B=!T&&m9(e,r),L=T&&p9(e,n,r,s);(B||L)&&(y=dw(e.options.networkMode)?"fetching":"paused",d||(g="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&g!=="error")w=f.data,d=f.dataUpdatedAt,g=f.status,b=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=h3(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(B){this.selectError=B}typeof T<"u"&&(g="success",w=h3(i==null?void 0:i.data,T,r),p=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),g="error");const E=y==="fetching",k=g==="loading",$=g==="error";return{status:g,fetchStatus:y,isLoading:k,isSuccess:g==="success",isError:$,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:$&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:b,isRefetchError:$&&u.dataUpdatedAt!==0,isStale:N$(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,Kg(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{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 l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const f=c;return this.currentResult[f]!==r[f]&&l.has(f)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...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"&&!$p(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){br.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}};function jde(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function m9(t,e){return jde(t,e)||t.state.dataUpdatedAt>0&&v3(t,e,e.refetchOnMount)}function v3(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&N$(t,e)}return!1}function p9(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&N$(t,r)}function N$(t,e){return t.isStaleByTime(e.staleTime)}function Fde(t,e,r){return r.keepPreviousData?!1:r.placeholderData!==void 0?e.isPlaceholderData:!Kg(t.getCurrentResult(),e)}let Bde=class extends xh{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),Kg(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:FU(),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){br.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var r,n,s,i;(r=(n=this.mutateOptions).onSuccess)==null||r.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(s=(i=this.mutateOptions).onSettled)==null||s.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var o,a,l,c;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:f})=>{f(this.currentResult)})})}};function Ude(t){return{mutationKey:t.options.mutationKey,state:t.state}}function zde(t){return{state:t.state,queryKey:t.queryKey,queryHash:t.queryHash}}function Vde(t){return t.state.isPaused}function qde(t){return t.state.status==="success"}function Wde(t,e={}){const r=[],n=[];if(e.dehydrateMutations!==!1){const s=e.shouldDehydrateMutation||Vde;t.getMutationCache().getAll().forEach(i=>{s(i)&&r.push(Ude(i))})}if(e.dehydrateQueries!==!1){const s=e.shouldDehydrateQuery||qde;t.getQueryCache().getAll().forEach(i=>{s(i)&&n.push(zde(i))})}return{mutations:r,queries:n}}function Hde(t,e,r){if(typeof e!="object"||e===null)return;const n=t.getMutationCache(),s=t.getQueryCache(),i=e.mutations||[],o=e.queries||[];i.forEach(a=>{var l;n.build(t,{...r==null||(l=r.defaultOptions)==null?void 0:l.mutations,mutationKey:a.mutationKey},a.state)}),o.forEach(a=>{var l;const c=s.get(a.queryHash),f={...a.state,fetchStatus:"idle"};if(c){c.state.dataUpdatedAt"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fme:cme;gV.useSyncExternalStore=qd.useSyncExternalStore!==void 0?qd.useSyncExternalStore:ume;(function(t){t.exports=gV})(rme);const dme=Vd.useSyncExternalStore,bR=m.createContext(void 0),bV=m.createContext(!1);function wV(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=bR),window.ReactQueryClientContext):bR)}const n4=({context:t}={})=>{const e=m.useContext(wV(t,m.useContext(bV)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},hme=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=wV(r,n);return m.createElement(bV.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},xV=m.createContext(!1),vme=()=>m.useContext(xV);xV.Provider;function yme(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const mme=m.createContext(yme()),pme=()=>m.useContext(mme);function gme(t,e){return typeof t=="function"?t(...e):!!t}function bme(t,e,r){const n=fV(t,e,r),s=n4({context:n.context}),[i]=m.useState(()=>new Q0e(s,n));m.useEffect(()=>{i.setOptions(n)},[i,n]);const o=dme(m.useCallback(l=>i.subscribe(br.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=m.useCallback((l,c)=>{i.mutate(l,c).catch(wme)},[i]);if(o.error&&gme(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function wme(){}const xme=["added","removed","updated"];function wR(t){return xme.includes(t)}async function Cme({queryClient:t,persister:e,maxAge:r=1e3*60*60*24,buster:n="",hydrateOptions:s}){try{const i=await e.restoreClient();if(i)if(i.timestamp){const o=Date.now()-i.timestamp>r,a=i.buster!==n;o||a?e.removeClient():tme(t,i.clientState,s)}else e.removeClient()}catch{e.removeClient()}}async function xR({queryClient:t,persister:e,buster:r="",dehydrateOptions:n}){const s={buster:r,timestamp:Date.now(),clientState:eme(t,n)};await e.persistClient(s)}function Eme(t){const e=t.queryClient.getQueryCache().subscribe(n=>{wR(n.type)&&xR(t)}),r=t.queryClient.getMutationCache().subscribe(n=>{wR(n.type)&&xR(t)});return()=>{e(),r()}}function Sme(t){let e=!1,r;const n=()=>{e=!0,r==null||r()},s=Cme(t).then(()=>{e||(r=Eme(t))});return[n,s]}var P3={},kme={get exports(){return P3},set exports(t){P3=t}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,u,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new s(f,u||l,d),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],f,u;if(this._eventsCount===0)return c;for(u in f=this._events)e.call(f,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},a.prototype.listeners=function(c){var f=r?r+c:c,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,v=new Array(h);dt,xw=t=>t,_me=()=>`viem@${$me}`;class fe extends Error{constructor(e,r={}){var i;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:_me()});const n=r.cause instanceof fe?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,s=r.cause instanceof fe&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://viem.sh${s}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` -`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return CV(this,e)}}function CV(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?CV(t.cause,e):e?null:t}class T3 extends fe{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 Pme extends fe{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 Tme extends fe{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 EV extends fe{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function SV({chain:t,currentChainId:e}){if(!t)throw new Tme;if(e!==t.id)throw new Pme({chain:t,currentChainId:e})}function kV(t,e={}){const{fees:r=t.fees,formatters:n=t.formatters,serializers:s=t.serializers}=e;return{...t,fees:r,formatters:n,serializers:s}}function Ah({blockNumber:t,chain:e,contract:r}){var s;const n=(s=e==null?void 0:e.contracts)==null?void 0:s[r];if(!n)throw new T3({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new T3({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class Rme extends fe{constructor({max:e,min:r,signed:n,size:s,value:i}){super(`Number "${i}" is not in safe ${s?`${s*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 Ime extends fe{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 Ome extends fe{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 Gr(t){return Mo(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function dd(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let s=0;sr*2)throw new AV({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function Mme(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new AV({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;se.toString(16).padStart(2,"0"));function Ra(t,e={}){return typeof t=="number"||typeof t=="bigint"?We(t,e):typeof t=="string"?s4(t,e):typeof t=="boolean"?_V(t,e):hy(t,e)}function _V(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(cc(r,{size:e.size}),_h(r,{size:e.size})):r}function hy(t,e={}){let r="";for(let s=0;si||se)throw new Ome({givenSize:Gr(t),maxSize:e})}function Cw(t,e={}){const{signed:r}=e;e.size&&cc(t,{size:e.size});const n=BigInt(t);if(!r)return n;const s=(t.length-2)/2,i=(1n<typeof n=="string"?n:TV(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 zi(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 zme={"0x0":"reverted","0x1":"success"};function Vme(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=>zi(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?zn(t.transactionIndex):null,status:t.status?zme[t.status]:null,type:t.type?PV[t.type]||t.type:null}}const qme={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function Ew(t){return{...t,gas:typeof t.gas<"u"?We(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?We(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?We(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?We(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?We(t.nonce):void 0,type:typeof t.type<"u"?qme[t.type]:void 0,value:typeof t.value<"u"?We(t.value):void 0}}class vy extends fe{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Wme={gwei:9,wei:18},Hme={ether:-9,wei:9};function IV(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[s,i]=[r.slice(0,r.length-e),r.slice(r.length-e)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`}function as(t,e="wei"){return IV(t,Hme[e])}class Wu extends fe{constructor({cause:e,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.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(Wu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Wu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class fb extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${as(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(fb,"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 R3 extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${as(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(R3,"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 I3 extends fe{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(I3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class O3 extends fe{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(O3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class M3 extends fe{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(M3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class D3 extends fe{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(D3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class N3 extends fe{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(N3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class L3 extends fe{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(L3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class j3 extends fe{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(j3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class ub extends fe{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${as(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${as(n)} gwei`:""}).`].join(` -`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(ub,"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 Sw extends fe{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 Gme=/^0x[a-fA-F0-9]{40}$/;function Wd(t){return Gme.test(t)}function wa(t){return typeof t[0]=="string"?o4(t):Kme(t)}function Kme(t){let e=0;for(const s of t)e+=s.length;const r=new Uint8Array(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return r}function o4(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function a4(t,e="wei"){return IV(t,Wme[e])}function p0(t){const e=Object.entries(t).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=e.reduce((n,[s])=>Math.max(n,s.length),0);return e.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(` -`)}class Qme extends fe{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 Yme extends fe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",p0(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 Jme extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=p0({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${a4(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${as(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${as(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${as(c)} gwei`,nonce:f});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 OV extends fe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){let o="Transaction";n&&i!==void 0&&(o=`Transaction at block time "${n}" at index "${i}"`),e&&i!==void 0&&(o=`Transaction at block hash "${e}" at index "${i}"`),r&&i!==void 0&&(o=`Transaction at block number "${r}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class MV extends fe{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 Xme extends fe{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 Zme(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 Yme({transaction:t})}const epe=kV({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}),tpe=kV({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}}});var rpe=Object.defineProperty,npe=(t,e,r)=>e in t?rpe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ar=(t,e,r)=>(npe(t,typeof e!="symbol"?e+"":e,r),r),l4=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},er=(t,e,r)=>(l4(t,e,"read from private field"),r?r.call(t):e.get(t)),ms=(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)},kw=(t,e,r,n)=>(l4(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Qr=(t,e,r)=>(l4(t,e,"access private method"),r),c4=class extends P3{constructor({chains:t=[tpe,epe],options:e}){super(),ar(this,"chains"),ar(this,"options"),ar(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}},spe=class extends Error{constructor({chainId:t,connectorId:e}){super(`Chain "${t}" not configured for connector "${e}".`),ar(this,"name","ChainNotConfiguredForConnectorError")}},nl=class extends Error{constructor(){super(...arguments),ar(this,"name","ConnectorNotFoundError"),ar(this,"message","Connector not found")}};function CR(t){return typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}function fc(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new ppe(t.type);return`${t.name}(${$w(t.inputs,{includeName:e})})`}function $w(t,{includeName:e=!1}={}){return t?t.map(r=>ipe(r,{includeName:e})).join(e?", ":","):""}function ipe(t,{includeName:e}){return t.type.startsWith("tuple")?`(${$w(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class ope extends fe{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 ER extends fe{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 f4 extends fe{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` -`),{metaMessages:[`Params: (${$w(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 Aw extends fe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class ape extends fe{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 lpe extends fe{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Gr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class cpe extends fe{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 DV extends fe{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 fpe extends fe{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 upe extends fe{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 SR extends fe{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 db extends fe{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 dpe extends fe{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 hpe extends fe{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 kf extends fe{constructor({abiItem:e,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(` -`),{metaMessages:[`Params: (${$w(n,{includeName:!0})})`,`Data: ${r} (${s} 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=s}}class Ph extends fe{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${fc(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 vpe extends fe{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 ype extends fe{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 mpe extends fe{constructor(e){super([`Value "${e}" is not a valid array.`].join(` -`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class ppe extends fe{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 gpe extends fe{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const bpe=/((function|event)\s)?(.*)(\((.*)\))/;function NV(t){const e=t.match(bpe),r=(e==null?void 0:e[2])||void 0,n=e==null?void 0:e[3],s=(e==null?void 0:e[5])||void 0;return{type:r,name:n,params:s}}function wpe(t){return NV(t).name}function xpe(t){const e=NV(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 kR(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function LV(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 $R(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 Cpe(t,e){LV(t);const r=e.outputLen;if(t.length>AR&Rm)}:{h:Number(t>>AR&Rm)|0,l:Number(t&Rm)|0}}function Spe(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;st<>>32-r,$pe=(t,e,r)=>e<>>32-r,Ape=(t,e,r)=>e<>>64-r,_pe=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ppe=t=>t instanceof Uint8Array,Tpe=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),Rpe=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Rpe)throw new Error("Non little-endian hardware is not supported");function Ipe(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function jV(t){if(typeof t=="string"&&(t=Ipe(t)),!Ppe(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class Ope{clone(){return this._cloneInto()}}function Mpe(t){const e=n=>t().update(jV(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[FV,BV,UV]=[[],[],[]],Dpe=BigInt(0),m1=BigInt(1),Npe=BigInt(2),Lpe=BigInt(7),jpe=BigInt(256),Fpe=BigInt(113);for(let t=0,e=m1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],FV.push(2*(5*n+r)),BV.push((t+1)*(t+2)/2%64);let s=Dpe;for(let i=0;i<7;i++)e=(e<>Lpe)*Fpe)%jpe,e&Npe&&(s^=m1<<(m1<r>32?Ape(t,e,r):kpe(t,e,r),PR=(t,e,r)=>r>32?_pe(t,e,r):$pe(t,e,r);function zpe(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,l=(o+2)%10,c=r[l],f=r[l+1],u=_R(c,f,1)^r[a],d=PR(c,f,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=u,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=BV[o],l=_R(s,i,a),c=PR(s,i,a),f=FV[o];s=t[f],i=t[f+1],t[f]=l,t[f+1]=c}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]^=Bpe[n],t[1]^=Upe[n]}r.fill(0)}class u4 extends Ope{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,kR(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Tpe(this.state)}keccak(){zpe(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){$R(this);const{blockLen:r,state:n}=this;e=jV(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=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 kR(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Cpe(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:s,rounds:i,enableXOF:o}=this;return e||(e=new u4(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const Vpe=(t,e,r)=>Mpe(()=>new u4(e,t,r)),qpe=Vpe(1,136,256/8);function rs(t,e){const r=e||"hex",n=qpe(Mo(t,{strict:!1})?Sf(t):t);return r==="bytes"?n:Ra(n)}const zV=t=>rs(Sf(t));function VV(t){const e=wpe(t),r=xpe(t)||[];return zV(`${e}(${r.map(({type:n})=>n).join(",")})`)}function qV(t){return zV(fc(t))}const d4=t=>typeof t=="string"?VV(t):qV(t);function Ar(t,e,r,{strict:n}={}){return Mo(t,{strict:!1})?Hpe(t,e,r,{strict:n}):Wpe(t,e,r,{strict:n})}function WV(t,e){if(typeof e=="number"&&e>0&&e>Gr(t)-1)throw new $V({offset:e,position:"start",size:Gr(t)})}function HV(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Gr(t)!==r-e)throw new $V({offset:r,position:"end",size:Gr(t)})}function Wpe(t,e,r,{strict:n}={}){WV(t,e);const s=t.slice(e,r);return n&&HV(s,e,r),s}function Hpe(t,e,r,{strict:n}={}){WV(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&HV(s,e,r),s}function g0(t,e){if(t.length!==e.length)throw new cpe({expectedLength:t.length,givenLength:e.length});const r=Gpe({params:t,values:e}),n=v4(r);return n.length===0?"0x":n}function Gpe({params:t,values:e}){const r=[];for(let n=0;n0?wa([a,o]):a}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:wa(i.map(({encoded:o})=>o))}}function Ype(t,{param:e}){const[,r]=e.type.split("bytes"),n=Gr(t);if(!r){let s=t;return n%32!==0&&(s=_l(s,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:wa([_l(We(n,{size:32})),s])}}if(n!==parseInt(r))throw new lpe({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:_l(t,{dir:"right"})}}function Jpe(t){return{dynamic:!1,encoded:_l(_V(t))}}function Xpe(t,{signed:e}){return{dynamic:!1,encoded:We(t,{size:32,signed:e})}}function Zpe(t){const e=s4(t),r=Math.ceil(Gr(e)/32),n=[];for(let s=0;ss))}}function _w(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const y4=t=>Ar(typeof t=="string"?VV(t):qV(t),0,4);function b0({abi:t,args:e=[],name:r}){const n=Mo(r,{strict:!1}),s=t.filter(i=>n?i.type==="function"?y4(i)===r:i.type==="event"?d4(i)===r:!1:"name"in i&&i.name===r);if(s.length!==0){if(s.length===1)return s[0];for(const i of s){if(!("inputs"in i))continue;if(!e||e.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==e.length)continue;if(e.every((a,l)=>{const c="inputs"in i&&i.inputs[l];return c?F3(a,c):!1}))return i}return s[0]}}function F3(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Wd(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((s,i)=>F3(Object.values(t)[i],s)):/^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(s=>F3(s,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function w0({abi:t,eventName:e,args:r}){var a;let n=t[0];if(e&&(n=b0({abi:t,args:r,name:e}),!n))throw new SR(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new SR(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const s=fc(n),i=d4(s);let o=[];if(r&&"inputs"in n){const l=(a=n.inputs)==null?void 0:a.filter(f=>"indexed"in f&&f.indexed),c=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];c.length>0&&(o=(l==null?void 0:l.map((f,u)=>Array.isArray(c[u])?c[u].map((d,h)=>TR({param:f,value:c[u][h]})):c[u]?TR({param:f,value:c[u]}):null))??[])}return[i,...o]}function TR({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return rs(Sf(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new gpe(t.type);return g0([t],[e])}function Pw(t,{method:e}){var n,s;const r={};return t.transport.type==="fallback"&&((s=(n=t.transport).onResponse)==null||s.call(n,({method:i,response:o,status:a,transport:l})=>{a==="success"&&e===i&&(r[o]=l.request)})),i=>r[i]||t.request}async function GV(t,{address:e,abi:r,args:n,eventName:s,fromBlock:i,strict:o,toBlock:a}){const l=Pw(t,{method:"eth_newFilter"}),c=s?w0({abi:r,args:n,eventName:s}):void 0,f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,topics:c}]});return{abi:r,args:n,eventName:s,id:f,request:l(f),strict:o,type:"event"}}function fi(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function uc({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=b0({abi:t,args:e,name:r}),!n))throw new db(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new db(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const s=fc(n),i=y4(s),o="inputs"in n&&n.inputs?g0(n.inputs,e??[]):void 0;return o4([i,o??"0x"])}const KV={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."},tge={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},rge={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function m4(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=rs(oa(r),"bytes"),s=(e?r.substring(`${e}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(n[i>>1]&15)>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());return`0x${s.join("")}`}function Pl(t,e){if(!Wd(t))throw new vy({address:t});return m4(t,e)}function Tw(t,e){if(e==="0x"&&t.length>0)throw new Aw;if(Gr(e)&&Gr(e)<32)throw new f4({data:e,params:t,size:Gr(e)});return nge({data:e,params:t})}function nge({data:t,params:e}){const r=[];let n=0;for(let s=0;s=Gr(t))throw new f4({data:t,params:e,size:Gr(t)});const i=e[s],{consumed:o,value:a}=hd({data:t,param:i,position:n});r.push(a),n+=o}return r}function hd({data:t,param:e,position:r}){const n=_w(e.type);if(n){const[i,o]=n;return ige(t,{length:i,param:{...e,type:o},position:r})}if(e.type==="tuple")return fge(t,{param:e,position:r});if(e.type==="string")return cge(t,{position:r});if(e.type.startsWith("bytes"))return age(t,{param:e,position:r});const s=Ar(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return lge(s,{param:e});if(e.type==="address")return sge(s);if(e.type==="bool")return oge(s);throw new ype(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function sge(t){return{consumed:32,value:m4(Ar(t,-20))}}function ige(t,{param:e,length:r,position:n}){if(!r){const o=zn(Ar(t,n,n+32,{strict:!0})),a=zn(Ar(t,o,o+32,{strict:!0}));let l=0;const c=[];for(let f=0;f48?Cw(t,{signed:r}):zn(t,{signed:r})}}function cge(t,{position:e}){const r=zn(Ar(t,e,e+32,{strict:!0})),n=zn(Ar(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:Ume(dd(Ar(t,r+32,r+32+n,{strict:!0})))}}function fge(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),s=n?[]:{};let i=0;if(hb(e)){const o=zn(Ar(t,r,r+32,{strict:!0}));for(let a=0;ai.type==="error"&&r===y4(fc(i)));if(!s)throw new DV(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Tw(s.inputs,Ar(e,4)):void 0,errorName:s.name}}const Vn=(t,e,r)=>JSON.stringify(t,(n,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof e=="function"?e(n,i):i},r);function QV({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((s,i)=>`${n&&s.name?`${s.name}: `:""}${typeof e[i]=="object"?Vn(e[i]):e[i]}`).join(", ")})`}class YV extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=r?fi(r):void 0,v=p0({from:h==null?void 0:h.address,to:u,value:typeof d<"u"&&`${a4(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${as(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${as(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${as(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].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 dge extends fe{constructor(e,{abi:r,args:n,contractAddress:s,docsPath:i,functionName:o,sender:a}){const l=b0({abi:r,args:n,name:o}),c=l?QV({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?fc(l,{includeName:!0}):void 0,u=p0({address:s&&Ame(s),function:f,args:c&&c!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${c}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",u].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=s,this.functionName=o,this.sender=a}}class B3 extends fe{constructor({abi:e,data:r,functionName:n,message:s}){let i,o,a,l;if(r&&r!=="0x")try{o=uge({abi:e,data:r});const{abiItem:f,errorName:u,args:d}=o;if(u==="Error")l=d[0];else if(u==="Panic"){const[h]=d;l=KV[h]}else{const h=f?fc(f,{includeName:!0}):void 0,v=f&&d?QV({abiItem:f,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",v&&v!=="()"?` ${[...Array((u==null?void 0:u.length)??0).keys()].map(()=>" ").join("")}${v}`:""]}}catch(f){i=f}else s&&(l=s);let c;i instanceof DV&&(c=i.signature,a=[`Unable to decode signature "${c}" 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=${c}.`]),super(l&&l!=="execution reverted"||c?[`The contract function "${n}" reverted with the following ${c?"signature":"reason"}:`,l||c].join(` -`):`The contract function "${n}" reverted.`,{cause:i,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=l,this.signature=c}}class hge extends fe{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 p4 extends fe{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 lv extends fe{constructor({body:e,details:r,headers:n,status:s,url:i}){super("HTTP request failed.",{details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${xw(i)}`,e&&`Request body: ${Vn(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=s,this.url=i}}class vge extends fe{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${xw(n)}`,`Request body: ${Vn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class g4 extends fe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${xw(n)}`,`Request body: ${Vn(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 U3 extends fe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${xw(r)}`,`Request body: ${Vn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const yge=-1;class hs extends fe{constructor(e,{code:r,docsPath:n,metaMessages:s,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:s||(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 g4?e.code:r??yge}}class Th extends hs{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 yy extends hs{constructor(e){super(e,{code:yy.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(yy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class my extends hs{constructor(e){super(e,{code:my.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(my,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class py extends hs{constructor(e){super(e,{code:py.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(py,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class gy extends hs{constructor(e){super(e,{code:gy.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(gy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Hd extends hs{constructor(e){super(e,{code:Hd.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(Hd,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class $f extends hs{constructor(e){super(e,{code:$f.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($f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class by extends hs{constructor(e){super(e,{code:by.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(by,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Vl extends hs{constructor(e){super(e,{code:Vl.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(Vl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class wy extends hs{constructor(e){super(e,{code:wy.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(wy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class xy extends hs{constructor(e){super(e,{code:xy.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(xy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Cy extends hs{constructor(e){super(e,{code:Cy.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(Cy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Ey extends hs{constructor(e){super(e,{code:Ey.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(Ey,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class En extends Th{constructor(e){super(e,{code:En.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(En,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class Sy extends Th{constructor(e){super(e,{code:Sy.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(Sy,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class ky extends Th{constructor(e){super(e,{code:ky.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(ky,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class $y extends Th{constructor(e){super(e,{code:$y.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty($y,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class Ay extends Th{constructor(e){super(e,{code:Ay.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(Ay,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class ql extends Th{constructor(e){super(e,{code:ql.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(ql,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class mge extends hs{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const pge=3;function _y(t,{abi:e,address:r,args:n,docsPath:s,functionName:i,sender:o}){const{code:a,data:l,message:c,shortMessage:f}=t instanceof p4?t:t instanceof fe?t.walk(d=>"data"in d)||t.walk():{};let u=t;return t instanceof Aw?u=new hge({functionName:i}):[pge,Hd.code].includes(a)&&(l||c||f)&&(u=new B3({abi:e,data:typeof l=="object"?l.data:l,functionName:i,message:f??c})),new dge(u,{abi:e,args:n,contractAddress:r,docsPath:s,functionName:i,sender:o})}class Rh extends fe{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 gge extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=p0({from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${a4(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${as(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${as(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${as(c)} gwei`,nonce:f});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 b4(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(s=>s.code===Wu.code);return n instanceof fe?new Wu({cause:t,message:n.details}):Wu.nodeMessage.test(r)?new Wu({cause:t,message:t.details}):fb.nodeMessage.test(r)?new fb({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):R3.nodeMessage.test(r)?new R3({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):I3.nodeMessage.test(r)?new I3({cause:t,nonce:e==null?void 0:e.nonce}):O3.nodeMessage.test(r)?new O3({cause:t,nonce:e==null?void 0:e.nonce}):M3.nodeMessage.test(r)?new M3({cause:t,nonce:e==null?void 0:e.nonce}):D3.nodeMessage.test(r)?new D3({cause:t}):N3.nodeMessage.test(r)?new N3({cause:t,gas:e==null?void 0:e.gas}):L3.nodeMessage.test(r)?new L3({cause:t,gas:e==null?void 0:e.gas}):j3.nodeMessage.test(r)?new j3({cause:t}):ub.nodeMessage.test(r)?new ub({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new Sw({cause:t})}function bge(t,{docsPath:e,...r}){let n=b4(t,r);return n instanceof Sw&&(n=t),new gge(n,{docsPath:e,...r})}function w4(t,{format:e}){return e?Object.keys(e({})).reduce((n,s)=>(t!=null&&t.hasOwnProperty(s)&&(n[s]=t[s]),n),{}):{}}function x0(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:s,to:i}=t,o=e?fi(e):void 0;if(o&&!Wd(o.address))throw new vy({address:o.address});if(i&&!Wd(i))throw new vy({address:i});if(typeof r<"u"&&(typeof n<"u"||typeof s<"u"))throw new Qme;if(n&&n>2n**256n-1n)throw new fb({maxFeePerGas:n});if(s&&n&&s>n)throw new ub({maxFeePerGas:n,maxPriorityFeePerGas:s})}class wge extends fe{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class x4 extends fe{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class xge extends fe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${as(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class Cge extends fe{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 Wl(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:s}={}){var f,u,d;const i=n??"latest",o=s??!1,a=r!==void 0?We(r):void 0;let l=null;if(e?l=await t.request({method:"eth_getBlockByHash",params:[e,o]}):l=await t.request({method:"eth_getBlockByNumber",params:[a||i,o]}),!l)throw new Cge({blockHash:e,blockNumber:r});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.block)==null?void 0:d.format)||RV)(l)}async function C4(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function Ege(t,e){return JV(t,e)}async function JV(t,e){var i,o,a;const{block:r,chain:n=t.chain,request:s}=e||{};if(typeof((i=n==null?void 0:n.fees)==null?void 0:i.defaultPriorityFee)=="function"){const l=r||await Wl(t);return n.fees.defaultPriorityFee({block:l,client:t,request:s})}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 l=await t.request({method:"eth_maxPriorityFeePerGas"});return Cw(l)}catch{const[l,c]=await Promise.all([r?Promise.resolve(r):Wl(t),C4(t)]);if(typeof l.baseFeePerGas!="bigint")throw new x4;const f=c-l.baseFeePerGas;return f<0n?0n:f}}async function Sge(t,e){return z3(t,e)}async function z3(t,e){var d;const{block:r,chain:n=t.chain,request:s,type:i="eip1559"}=e||{},o=await(async()=>{var h,v;return typeof((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:s}):((v=n==null?void 0:n.fees)==null?void 0:v.baseFeeMultiplier)??1.2})();if(o<1)throw new wge;const l=10**o.toString().split(".")[1].length,c=h=>h*BigInt(o*l)/BigInt(l),f=r||await Wl(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:c,request:s,type:i});if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new x4;const h=s!=null&&s.maxPriorityFeePerGas?s.maxPriorityFeePerGas:await JV(t,{block:f,chain:n,request:s}),v=c(f.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??v+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??c(await C4(t))}}async function XV(t,{address:e,blockTag:r="latest",blockNumber:n}){const s=await t.request({method:"eth_getTransactionCount",params:[e,n?We(n):r]});return zn(s)}async function Rw(t,e){const{account:r=t.account,chain:n,gas:s,nonce:i,type:o}=e;if(!r)throw new Rh;const a=fi(r),l=await Wl(t,{blockTag:"latest"}),c={...e,from:a.address};if(typeof i>"u"&&(c.nonce=await XV(t,{address:a.address,blockTag:"pending"})),typeof o>"u")try{c.type=Zme(c)}catch{c.type=typeof l.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(c.type==="eip1559"){const{maxFeePerGas:f,maxPriorityFeePerGas:u}=await z3(t,{block:l,chain:n,request:c});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(c.gas=await E4(t,{...c,account:{address:a.address,type:"json-rpc"}})),x0(c),c}async function E4(t,e){var s,i,o;const r=e.account??t.account;if(!r)throw new Rh({docsPath:"/docs/actions/public/estimateGas"});const n=fi(r);try{const{accessList:a,blockNumber:l,blockTag:c,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:b,value:p,...g}=n.type==="local"?await Rw(t,e):e,E=(l?We(l):void 0)||c;x0(e);const k=((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionRequest)==null?void 0:o.format)||Ew,$=k({...w4(g,{format:k}),from:n.address,accessList:a,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:b,value:p}),C=await t.request({method:"eth_estimateGas",params:E?[$,E]:[$]});return BigInt(C)}catch(a){throw bge(a,{...e,account:n,chain:t.chain})}}async function kge(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=uc({abi:e,args:n,functionName:s});try{return await E4(t,{data:o,to:r,...i})}catch(a){const l=i.account?fi(i.account):void 0;throw _y(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:l==null?void 0:l.address})}}const EE="/docs/contract/decodeFunctionResult";function Ih({abi:t,args:e,functionName:r,data:n}){let s=t[0];if(r&&(s=b0({abi:t,args:e,name:r}),!s))throw new db(r,{docsPath:EE});if(s.type!=="function")throw new db(void 0,{docsPath:EE});if(!s.outputs)throw new dpe(s.name,{docsPath:EE});const i=Tw(s.outputs,n);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const $ge="modulepreload",Age=function(t,e){return new URL(t,e).href},RR={},ZV=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=Age(i,n),i in RR)return;RR[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let f=s.length-1;f>=0;f--){const u=s[f];if(u.href===i&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":$ge,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,u)=>{c.addEventListener("load",f),c.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},V3=[{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"}],eq=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],tq=[...eq,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],_ge=[...eq,{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"}]}],IR=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],OR=[{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"}]}],Pge=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],Tge="0x82ad56cb";function Rge(t,{docsPath:e,...r}){let n=b4(t,r);return n instanceof Sw&&(n=t),new YV(n,{docsPath:e,...r})}const SE=new Map;function S4({fn:t,id:e,shouldSplitBatch:r,wait:n=0}){const s=async()=>{const c=a();i();const f=c.map(({args:u})=>u);f.length!==0&&t(f).then(u=>{c.forEach(({pendingPromise:d},h)=>{var v;return(v=d.resolve)==null?void 0:v.call(d,[u[h],u])})}).catch(u=>{c.forEach(({pendingPromise:d})=>{var h;return(h=d.reject)==null?void 0:h.call(d,u)})})},i=()=>SE.delete(e),o=()=>a().map(({args:c})=>c),a=()=>SE.get(e)||[],l=c=>SE.set(e,[...a(),c]);return{flush:i,async schedule(c){const f={},u=new Promise((v,y)=>{f.resolve=v,f.reject=y});return(r==null?void 0:r([...o(),c]))&&s(),a().length>0?(l({args:c,pendingPromise:f}),u):(l({args:c,pendingPromise:f}),setTimeout(s,n),u)}}}async function Iw(t,e){var p,g,w,E;const{account:r=t.account,batch:n=Boolean((p=t.batch)==null?void 0:p.multicall),blockNumber:s,blockTag:i="latest",accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v,...y}=e,b=r?fi(r):void 0;try{x0(e);const $=(s?We(s):void 0)||i,C=((E=(w=(g=t.chain)==null?void 0:g.formatters)==null?void 0:w.transactionRequest)==null?void 0:E.format)||Ew,T=C({...w4(y,{format:C}),from:b==null?void 0:b.address,accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v});if(n&&Ige({request:T}))try{return await Oge(t,{...T,blockNumber:s,blockTag:i})}catch(F){if(!(F instanceof EV)&&!(F instanceof T3))throw F}const j=await t.request({method:"eth_call",params:$?[T,$]:[T]});return j==="0x"?{data:void 0}:{data:j}}catch(k){const $=Mge(k),{offchainLookup:C,offchainLookupSignature:T}=await ZV(()=>import("./ccip-6ef1b21e.js"),[],import.meta.url);if(($==null?void 0:$.slice(0,10))===T&&h)return{data:await C(t,{data:$,to:h})};throw Rge(k,{...e,account:b,chain:t.chain})}}function Ige({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(Tge)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function Oge(t,e){var y;const{batchSize:r=1024,wait:n=0}=typeof((y=t.batch)==null?void 0:y.multicall)=="object"?t.batch.multicall:{},{blockNumber:s,blockTag:i="latest",data:o,multicallAddress:a,to:l}=e;let c=a;if(!c){if(!t.chain)throw new EV;c=Ah({blockNumber:s,chain:t.chain,contract:"multicall3"})}const u=(s?We(s):void 0)||i,{schedule:d}=S4({id:`${t.uid}.${u}`,wait:n,shouldSplitBatch(b){return b.reduce((g,{data:w})=>g+(w.length-2),0)>r*2},fn:async b=>{const p=b.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),g=uc({abi:V3,args:[p],functionName:"aggregate3"}),w=await t.request({method:"eth_call",params:[{data:g,to:c},u]});return Ih({abi:V3,args:[p],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:h,success:v}]=await d({data:o,to:l});if(!v)throw new p4({data:h});return h==="0x"?{data:void 0}:{data:h}}function Mge(t){if(!(t instanceof fe))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function Hl(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=uc({abi:e,args:n,functionName:s});try{const{data:a}=await Iw(t,{data:o,to:r,...i});return Ih({abi:e,args:n,functionName:s,data:a||"0x"})}catch(a){throw _y(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:s})}}async function Dge(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=o.account?fi(o.account):void 0,l=uc({abi:e,args:n,functionName:i});try{const{data:c}=await Iw(t,{batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:r,...o});return{result:Ih({abi:e,args:n,functionName:i,data:c||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}}}catch(c){throw _y(c,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:a==null?void 0:a.address})}}const kE=new Map,MR=new Map;let Nge=0;function Oh(t,e,r){const n=++Nge,s=()=>kE.get(t)||[],i=()=>{const f=s();kE.set(t,f.filter(u=>u.id!==n))},o=()=>{const f=MR.get(t);s().length===1&&f&&f(),i()},a=s();if(kE.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const l={};for(const f in e)l[f]=(...u)=>{const d=s();d.length!==0&&d.forEach(h=>{var v,y;return(y=(v=h.fns)[f])==null?void 0:y.call(v,...u)})};const c=r(l);return typeof c=="function"&&MR.set(t,c),o}async function vb(t){return new Promise(e=>setTimeout(e,t))}function C0(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let s=!0;const i=()=>s=!1;return(async()=>{let a;e&&(a=await t({unpoll:i}));const l=await(r==null?void 0:r(a))??n;await vb(l);const c=async()=>{s&&(await t({unpoll:i}),await vb(n),c())};c()})(),i}const DR="/docs/contract/decodeEventLog";function E0({abi:t,data:e,strict:r,topics:n}){const s=r??!0,[i,...o]=n;if(!i)throw new fpe({docsPath:DR});const a=t.find(v=>v.type==="event"&&i===d4(fc(v)));if(!(a&&"name"in a)||a.type!=="event")throw new upe(i,{docsPath:DR});const{name:l,inputs:c}=a,f=c==null?void 0:c.some(v=>!("name"in v&&v.name));let u=f?[]:{};const d=c.filter(v=>"indexed"in v&&v.indexed);if(o.length>0)for(let v=0;v!("indexed"in v&&v.indexed));if(h.length>0){if(e&&e!=="0x")try{const v=Tw(h,e);if(v)if(f)u=[...u,...v];else for(let y=0;y0?u:void 0}}function Lge({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(Tw([t],e)||[])[0]}const jge=new Map,Fge=new Map;function Bge(t){const e=(s,i)=>({clear:()=>i.delete(s),get:()=>i.get(s),set:o=>i.set(s,o)}),r=e(t,jge),n=e(t,Fge);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Uge(t,{cacheKey:e,cacheTime:r=1/0}){const n=Bge(e),s=n.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()`blockNumber.${t}`;async function S0(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await Uge(()=>t.request({method:"eth_blockNumber"}),{cacheKey:zge(t.uid),cacheTime:r??e});return BigInt(n)}async function Ow(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(s=>{var i;if(typeof s=="string")return s;try{const{eventName:o,args:a}="abi"in e&&e.abi?E0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return zi(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof kf||o instanceof Ph){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return zi(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function k4(t,{address:e,blockHash:r,fromBlock:n,toBlock:s,event:i,events:o,args:a,strict:l}={}){const c=l??!1,f=o??(i?[i]:void 0);let u=[];f&&(u=[f.flatMap(h=>w0({abi:[h],eventName:h.name,args:a}))],i&&(u=u[0]));let d;return r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,fromBlock:typeof n=="bigint"?We(n):n,toBlock:typeof s=="bigint"?We(s):s}]}),d.map(h=>{var v;try{const{eventName:y,args:b}=f?E0({abi:f,data:h.data,topics:h.topics,strict:c}):{eventName:void 0,args:void 0};return zi(h,{args:b,eventName:y})}catch(y){let b,p;if(y instanceof kf||y instanceof Ph){if(c)return;b=y.abiItem.name,p=(v=y.abiItem.inputs)==null?void 0:v.some(g=>!("name"in g&&g.name))}return zi(h,{args:p?[]:{},eventName:b})}}).filter(Boolean)}async function Mw(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function Vge(t,{abi:e,address:r,args:n,batch:s=!0,eventName:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){return(typeof l<"u"?l:t.transport.type!=="webSocket")?(()=>{const v=Vn(["watchContractEvent",r,n,s,t.uid,i,c]),y=f??!1;return Oh(v,{onLogs:a,onError:o},b=>{let p,g,w=!1;const E=C0(async()=>{var k;if(!w){try{g=await GV(t,{abi:e,address:r,args:n,eventName:i,strict:y})}catch{}w=!0;return}try{let $;if(g)$=await Ow(t,{filter:g});else{const C=await S0(t);p&&p!==C?$=await k4(t,{address:r,args:n,fromBlock:p+1n,toBlock:C,event:b0({abi:e,name:i})}):$=[],p=C}if($.length===0)return;s?b.onLogs($):$.forEach(C=>b.onLogs([C]))}catch($){g&&$ instanceof $f&&(w=!1),(k=b.onError)==null||k.call(b,$)}},{emitOnBegin:!0,interval:c});return async()=>{g&&await Mw(t,{filter:g}),E()}})})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const b=i?w0({abi:e,eventName:i,args:n}):[],{unsubscribe:p}=await t.transport.subscribe({params:["logs",{address:r,topics:b}],onData(g){var E;if(!v)return;const w=g.result;try{const{eventName:k,args:$}=E0({abi:e,data:w.data,topics:w.topics,strict:f}),C=zi(w,{args:$,eventName:k});a([C])}catch(k){let $,C;if(k instanceof kf||k instanceof Ph){if(f)return;$=k.abiItem.name,C=(E=k.abiItem.inputs)==null?void 0:E.some(j=>!("name"in j&&j.name))}const T=zi(w,{args:C?[]:{},eventName:$});a([T])}},onError(g){o==null||o(g)}});y=p,v||y()}catch(b){o==null||o(b)}})(),y})()}function qge(t,{docsPath:e,...r}){let n=b4(t,r);return n instanceof Sw&&(n=t),new Jme(n,{docsPath:e,...r})}async function Py(t){const e=await t.request({method:"eth_chainId"});return zn(e)}async function $4(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function A4(t,e){var y,b,p;const{account:r=t.account,chain:n=t.chain,accessList:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h}=e;if(!r)throw new Rh({docsPath:"/docs/actions/wallet/sendTransaction"});const v=fi(r);try{x0(e);let g;if(n!==null&&(g=await Py(t),SV({currentChainId:g,chain:n})),v.type==="local"){const k=await Rw(t,{account:v,accessList:s,chain:n,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h});g||(g=await Py(t));const $=(y=n==null?void 0:n.serializers)==null?void 0:y.transaction,C=await v.signTransaction({...k,chainId:g},{serializer:$});return await $4(t,{serializedTransaction:C})}const w=((p=(b=n==null?void 0:n.formatters)==null?void 0:b.transactionRequest)==null?void 0:p.format)||Ew,E=w({...w4(h,{format:w}),accessList:s,data:i,from:v.address,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d});return await t.request({method:"eth_sendTransaction",params:[E]})}catch(g){throw qge(g,{...e,account:v,chain:e.chain||void 0})}}async function Wge(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=uc({abi:e,args:n,functionName:i});return await A4(t,{data:`${a}${s?s.replace("0x",""):""}`,to:r,...o})}async function Hge(t,{chain:e}){const{id:r,name:n,nativeCurrency:s,rpcUrls:i,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:We(r),chainName:n,nativeCurrency:s,rpcUrls:i.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]})}const q3=256;let Im=q3,Om;function Gge(t=11){if(!Om||Im+t>q3*2){Om="",Im=0;for(let e=0;e{const p=b(y);for(const w in h)delete p[w];const g={...y,...p};return Object.assign(g,{extend:v(g)})}}return Object.assign(h,{extend:v(h)})}function nq(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,i)=>{const o=async({count:a=0}={})=>{const l=async({error:c})=>{const f=typeof e=="function"?e({count:a,error:c}):e;f&&await vb(f),o({count:a+1})};try{const c=await t();s(c)}catch(c){if(a"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof lv&&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 Kge(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>nq(async()=>{try{return await t(n)}catch(s){const i=s;switch(i.code){case yy.code:throw new yy(i);case my.code:throw new my(i);case py.code:throw new py(i);case gy.code:throw new gy(i);case Hd.code:throw new Hd(i);case $f.code:throw new $f(i);case by.code:throw new by(i);case Vl.code:throw new Vl(i);case wy.code:throw new wy(i);case xy.code:throw new xy(i);case Cy.code:throw new Cy(i);case Ey.code:throw new Ey(i);case En.code:throw new En(i);case Sy.code:throw new Sy(i);case ky.code:throw new ky(i);case $y.code:throw new $y(i);case Ay.code:throw new Ay(i);case ql.code:throw new ql(i);case 5e3:throw new En(i);default:throw s instanceof fe?s:new mge(i)}}},{delay:({count:s,error:i})=>{var o;if(i&&i instanceof lv){const a=(o=i==null?void 0:i.headers)==null?void 0:o.get("Retry-After");if(a!=null&&a.match(/\d/))return parseInt(a)*1e3}return~~(1<!sq(s)})}function Dw({key:t,name:e,request:r,retryCount:n=3,retryDelay:s=150,timeout:i,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:s,timeout:i,type:o},request:Kge(r,{retryCount:n,retryDelay:s}),value:a}}function _4(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:s}=e;return({retryCount:i})=>Dw({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??i,retryDelay:s,type:"custom"})}function NR(t,e={}){const{key:r="fallback",name:n="Fallback",rank:s=!1,retryCount:i,retryDelay:o}=e;return({chain:a,pollingInterval:l=4e3,timeout:c})=>{let f=t,u=()=>{};const d=Dw({key:r,name:n,async request({method:h,params:v}){const y=async(b=0)=>{const p=f[b]({chain:a,retryCount:0,timeout:c});try{const g=await p.request({method:h,params:v});return u({method:h,params:v,response:g,transport:p,status:"success"}),g}catch(g){if(u({error:g,method:h,params:v,transport:p,status:"error"}),sq(g)||b===f.length-1)throw g;return y(b+1)}};return y()},retryCount:i,retryDelay:o,type:"fallback"},{onResponse:h=>u=h,transports:f.map(h=>h({chain:a,retryCount:0}))});if(s){const h=typeof s=="object"?s:{};Qge({chain:a,interval:h.interval??l,onTransports:v=>f=v,sampleCount:h.sampleCount,timeout:h.timeout,transports:f,weights:h.weights})}return d}}function Qge({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:s=1e3,transports:i,weights:o={}}){const{stability:a=.7,latency:l=.3}=o,c=[],f=async()=>{const u=await Promise.all(i.map(async v=>{const y=v({chain:t,retryCount:0,timeout:s}),b=Date.now();let p,g;try{await y.request({method:"net_listening"}),g=1}catch{g=0}finally{p=Date.now()}return{latency:p-b,success:g}}));c.push(u),c.length>n&&c.shift();const d=Math.max(...c.map(v=>Math.max(...v.map(({latency:y})=>y)))),h=i.map((v,y)=>{const b=c.map(k=>k[y].latency),g=1-b.reduce((k,$)=>k+$,0)/b.length/d,w=c.map(k=>k[y].success),E=w.reduce((k,$)=>k+$,0)/w.length;return E===0?[0,y]:[l*g+a*E,y]}).sort((v,y)=>y[0]-v[0]);r(h.map(([,v])=>i[v])),await vb(e),f()};f()}class iq extends fe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var ku=null;typeof WebSocket<"u"?ku=WebSocket:typeof MozWebSocket<"u"?ku=MozWebSocket:typeof global<"u"?ku=global.WebSocket||global.MozWebSocket:typeof window<"u"?ku=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(ku=self.WebSocket||self.MozWebSocket);const LR=ku;function oq(t,{errorInstance:e,timeout:r,signal:n}){return new Promise((s,i)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():i(e)},r)),s(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&i(e),i(a)}finally{clearTimeout(o)}})()})}let W3=0;async function Yge(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var a;const{headers:s,method:i,signal:o}=r;try{const l=await oq(async({signal:f})=>await fetch(t,{...r,body:Array.isArray(e)?Vn(e.map(d=>({jsonrpc:"2.0",id:d.id??W3++,...d}))):Vn({jsonrpc:"2.0",id:e.id??W3++,...e}),headers:{...s,"Content-Type":"application/json"},method:i||"POST",signal:o||(n>0?f:void 0)}),{errorInstance:new U3({body:e,url:t}),timeout:n,signal:!0});let c;if((a=l.headers.get("Content-Type"))!=null&&a.startsWith("application/json")?c=await l.json():c=await l.text(),!l.ok)throw new lv({body:e,details:Vn(c.error)||l.statusText,headers:l.headers,status:l.status,url:t});return c}catch(l){throw l instanceof lv||l instanceof U3?l:new lv({body:e,details:l.message,url:t})}}const $E=new Map;async function AE(t){let e=$E.get(t);if(e)return e;const{schedule:r}=S4({id:t,fn:async()=>{const i=new LR(t),o=new Map,a=new Map,l=({data:f})=>{const u=JSON.parse(f),d=u.method==="eth_subscription",h=d?u.params.subscription:u.id,v=d?a:o,y=v.get(h);y&&y({data:f}),d||v.delete(h)},c=()=>{$E.delete(t),i.removeEventListener("close",c),i.removeEventListener("message",l)};return i.addEventListener("close",c),i.addEventListener("message",l),i.readyState===LR.CONNECTING&&await new Promise((f,u)=>{i&&(i.onopen=f,i.onerror=u)}),e=Object.assign(i,{requests:o,subscriptions:a}),$E.set(t,e),[e]}}),[n,[s]]=await r();return s}function Jge(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new vge({body:e,url:t.url,details:"Socket is closed."});const n=W3++,s=({data:i})=>{var a;const o=JSON.parse(i);typeof o.id=="number"&&n!==o.id||(r==null||r(o),e.method==="eth_subscribe"&&typeof o.result=="string"&&t.subscriptions.set(o.result,s),e.method==="eth_unsubscribe"&&t.subscriptions.delete((a=e.params)==null?void 0:a[0]))};return t.requests.set(n,s),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Xge(t,{body:e,timeout:r=1e4}){return oq(()=>new Promise(n=>vd.webSocket(t,{body:e,onResponse:n})),{errorInstance:new U3({body:e,url:t.url}),timeout:r})}const vd={http:Yge,webSocket:Jge,webSocketAsync:Xge};function Zge(t,e={}){const{batch:r,fetchOptions:n,key:s="http",name:i="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:l,timeout:c})=>{const{batchSize:f=1e3,wait:u=0}=typeof r=="object"?r:{},d=e.retryCount??l,h=c??e.timeout??1e4,v=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!v)throw new iq;return Dw({key:s,name:i,async request({method:y,params:b}){const p={method:y,params:b},{schedule:g}=S4({id:`${t}`,wait:u,shouldSplitBatch($){return $.length>f},fn:$=>vd.http(v,{body:$,fetchOptions:n,timeout:h})}),w=async $=>r?g($):[await vd.http(v,{body:$,fetchOptions:n,timeout:h})],[{error:E,result:k}]=await w(p);if(E)throw new g4({body:p,error:E,url:v});return k},retryCount:d,retryDelay:o,timeout:h,type:"http"},{url:t})}}function P4(t,e){var n,s,i;if(!(t instanceof fe))return!1;const r=t.walk(o=>o instanceof B3);return r instanceof B3?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ResolverWildcardNotSupported"||(i=r.reason)!=null&&i.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===KV[50]):!1}function aq(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 Mp(t){let e=new Uint8Array(32).fill(0);if(!t)return hy(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const s=aq(r[n]),i=s?Sf(s):rs(oa(r[n]),"bytes");e=rs(wa([e,i]),"bytes")}return hy(e)}function ebe(t){return`[${t.slice(2)}]`}function tbe(t){const e=new Uint8Array(32).fill(0);return t?aq(t)||rs(oa(t)):hy(e)}function Nw(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(oa(e).byteLength+2);let n=0;const s=e.split(".");for(let i=0;i255&&(o=oa(ebe(tbe(s[i])))),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 rbe(t,{blockNumber:e,blockTag:r,coinType:n,name:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ah({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=uc({abi:OR,functionName:"addr",...n!=null?{args:[Mp(s),BigInt(n)]}:{args:[Mp(s)]}}),l=await Hl(t,{address:o,abi:tq,functionName:"resolve",args:[Ra(Nw(s)),a],blockNumber:e,blockTag:r});if(l[0]==="0x")return null;const c=Ih({abi:OR,args:n!=null?[Mp(s),BigInt(n)]:void 0,functionName:"addr",data:l[0]});return c==="0x"||dd(c)==="0x00"?null:c}catch(a){if(P4(a,"resolve"))return null;throw a}}class nbe extends fe{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 p1 extends fe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class T4 extends fe{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 sbe extends fe{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 ibe=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,obe=/^(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\-.]+))?(?\/.*)?$/,abe=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,lbe=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function cbe(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 jR(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function lq({uri:t,gatewayUrls:e}){const r=abe.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=jR(e==null?void 0:e.ipfs,"https://ipfs.io"),s=jR(e==null?void 0:e.arweave,"https://arweave.net"),i=t.match(ibe),{protocol:o,subpath:a,target:l,subtarget:c=""}=(i==null?void 0:i.groups)||{},f=o==="ipns:/"||a==="ipns/",u=o==="ipfs:/"||a==="ipfs/"||obe.test(t);if(t.startsWith("http")&&!f&&!u){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((f||u)&&l)return{uri:`${n}/${f?"ipns":"ipfs"}/${l}${c}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&l)return{uri:`${s}/${l}${c||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(lbe,"");if(d.startsWith("s.json());return await R4({gatewayUrls:t,uri:cq(r)})}catch{throw new T4({uri:e})}}async function R4({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=lq({uri:e,gatewayUrls:t});if(n||await cbe(r))return r;throw new T4({uri:e})}function ube(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=e.split("/"),[i,o]=r.split(":"),[a,l]=n.split(":");if(!i||i.toLowerCase()!=="eip155")throw new p1({reason:"Only EIP-155 supported"});if(!o)throw new p1({reason:"Chain ID not found"});if(!l)throw new p1({reason:"Contract address not found"});if(!s)throw new p1({reason:"Token ID not found"});if(!a)throw new p1({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:l,tokenID:s}}async function dbe(t,{nft:e}){if(e.namespace==="erc721")return Hl(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 Hl(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 sbe({namespace:e.namespace})}async function hbe(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?vbe(t,{gatewayUrls:e,record:r}):R4({uri:r,gatewayUrls:e})}async function vbe(t,{gatewayUrls:e,record:r}){const n=ube(r),s=await dbe(t,{nft:n}),{uri:i,isOnChain:o,isEncoded:a}=lq({uri:s,gatewayUrls:e});if(o&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const c=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(c);return R4({uri:cq(f),gatewayUrls:e})}let l=n.tokenID;return n.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),fbe({gatewayUrls:e,uri:i.replace(/(?:0x)?{id}/,l)})}async function fq(t,{blockNumber:e,blockTag:r,name:n,key:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ah({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=await Hl(t,{address:o,abi:tq,functionName:"resolve",args:[Ra(Nw(n)),uc({abi:IR,functionName:"text",args:[Mp(n),s]})],blockNumber:e,blockTag:r});if(a[0]==="0x")return null;const l=Ih({abi:IR,functionName:"text",data:a[0]});return l===""?null:l}catch(a){if(P4(a,"resolve"))return null;throw a}}async function ybe(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:s,universalResolverAddress:i}){const o=await fq(t,{blockNumber:e,blockTag:r,key:"avatar",name:s,universalResolverAddress:i});if(!o)return null;try{return await hbe(t,{record:o,gatewayUrls:n})}catch{return null}}async function mbe(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ah({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const o=`${e.toLowerCase().substring(2)}.addr.reverse`;try{return(await Hl(t,{address:i,abi:_ge,functionName:"reverse",args:[Ra(Nw(o))],blockNumber:r,blockTag:n}))[0]}catch(a){if(P4(a,"reverse"))return null;throw a}}async function pbe(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ah({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await Hl(t,{address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Ra(Nw(n))],blockNumber:e,blockTag:r});return o}async function gbe(t){const e=Pw(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function uq(t,{address:e,args:r,event:n,events:s,fromBlock:i,strict:o,toBlock:a}={}){const l=s??(n?[n]:void 0),c=Pw(t,{method:"eth_newFilter"});let f=[];l&&(f=[l.flatMap(d=>w0({abi:[d],eventName:d.name,args:r}))],n&&(f=f[0]));const u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,...f.length?{topics:f}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:i,id:u,request:c(u),strict:o,toBlock:a,type:"event"}}async function dq(t){const e=Pw(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function bbe(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r?We(r):void 0,i=await t.request({method:"eth_getBalance",params:[e,s||n]});return BigInt(i)}async function wbe(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?We(r):void 0;let i;return e?i=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):i=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]}),zn(i)}async function xbe(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?We(r):void 0,i=await t.request({method:"eth_getCode",params:[e,s||n]});if(i!=="0x")return i}function Cbe(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 Ebe(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const i=r?We(r):void 0,o=await t.request({method:"eth_feeHistory",params:[We(e),i||n,s]});return Cbe(o)}async function Sbe(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>{var i;try{const{eventName:o,args:a}="abi"in e&&e.abi?E0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return zi(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof kf||o instanceof Ph){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return zi(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function kbe(t,{address:e,blockNumber:r,blockTag:n="latest",slot:s}){const i=r!==void 0?We(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,s,i||n]})}async function I4(t,{blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){var f,u,d;const o=n||"latest",a=r!==void 0?We(r):void 0;let l=null;if(s?l=await t.request({method:"eth_getTransactionByHash",params:[s]}):e?l=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,We(i)]}):(a||o)&&(l=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,We(i)]})),!l)throw new OV({blockHash:e,blockNumber:r,blockTag:o,hash:s,index:i});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.transaction)==null?void 0:d.format)||TV)(l)}async function $be(t,{hash:e,transactionReceipt:r}){const[n,s]=await Promise.all([S0(t),e?I4(t,{hash:e}):void 0]),i=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return i?n-i+1n:0n}async function H3(t,{hash:e}){var s,i,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new MV({hash:e});return(((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionReceipt)==null?void 0:o.format)||Vme)(r)}async function Abe(t,e){var y;const{allowFailure:r=!0,batchSize:n,blockNumber:s,blockTag:i,contracts:o,multicallAddress:a}=e,l=n??(typeof((y=t.batch)==null?void 0:y.multicall)=="object"&&t.batch.multicall.batchSize||1024);let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");c=Ah({blockNumber:s,chain:t.chain,contract:"multicall3"})}const f=[[]];let u=0,d=0;for(let b=0;b0&&d>l&&f[u].length>0&&(u++,d=(k.length-2)/2,f[u]=[]),f[u]=[...f[u],{allowFailure:!0,callData:k,target:g}]}catch(k){const $=_y(k,{abi:p,address:g,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!r)throw $;f[u]=[...f[u],{allowFailure:!0,callData:"0x",target:g}]}}const h=await Promise.allSettled(f.map(b=>Hl(t,{abi:V3,address:c,args:[b],blockNumber:s,blockTag:i,functionName:"aggregate3"}))),v=[];for(let b=0;b"u"?{}:t,i={EIP712Domain:gq({domain:s}),...n};pq({domain:s,message:e,primaryType:r,types:i});const o=["0x1901"];return s&&o.push(Rbe({domain:s,types:i})),r!=="EIP712Domain"&&o.push(hq({data:e,primaryType:r,types:i})),rs(wa(o))}function Rbe({domain:t,types:e}){return hq({data:t,primaryType:"EIP712Domain",types:e})}function hq({data:t,primaryType:e,types:r}){const n=vq({data:t,primaryType:e,types:r});return rs(n)}function vq({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],s=[Ibe({primaryType:e,types:r})];for(const i of r[e]){const[o,a]=mq({types:r,name:i.name,type:i.type,value:t[i.name]});n.push(o),s.push(a)}return g0(n,s)}function Ibe({primaryType:t,types:e}){const r=Ra(Obe({primaryType:t,types:e}));return rs(r)}function Obe({primaryType:t,types:e}){let r="";const n=yq({primaryType:t,types:e});n.delete(t);const s=[t,...Array.from(n).sort()];for(const i of s)r+=`${i}(${e[i].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function yq({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||e[s]===void 0)return r;r.add(s);for(const i of e[s])yq({primaryType:i.type,types:e},r);return r}function mq({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},rs(vq({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},rs(n)];if(r==="string")return[{type:"bytes32"},rs(Ra(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),i=n.map(o=>mq({name:e,type:s,types:t,value:o}));return[{type:"bytes32"},rs(g0(i.map(([o])=>o),i.map(([,o])=>o)))]}return[{type:r},n]}function pq({domain:t,message:e,primaryType:r,types:n}){const s=n,i=(o,a)=>{for(const l of o){const{name:c,type:f}=l,u=f,d=a[c],h=u.match(Pbe);if(h&&(typeof d=="number"||typeof d=="bigint")){const[b,p,g]=h;We(d,{signed:p==="int",size:parseInt(g)/8})}if(u==="address"&&typeof d=="string"&&!Wd(d))throw new vy({address:d});const v=u.match(_be);if(v){const[b,p]=v;if(p&&Gr(d)!==parseInt(p))throw new hpe({expectedSize:parseInt(p),givenSize:Gr(d)})}const y=s[u];y&&i(y,d)}};if(s.EIP712Domain&&t&&i(s.EIP712Domain,t),r!=="EIP712Domain"){const o=s[r];i(o,e)}}function gq({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 _E="/docs/contract/encodeDeployData";function bq({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new ope({docsPath:_E});if(!("inputs"in n))throw new ER({docsPath:_E});if(!n.inputs||n.inputs.length===0)throw new ER({docsPath:_E});const s=g0(n.inputs,e);return o4([r,s])}function Mbe(t,e){const r=(()=>typeof t=="string"?oa(t):t.raw instanceof Uint8Array?t.raw:Sf(t.raw))(),n=oa(`Ethereum Signed Message: -${r.length}`);return rs(wa([n,r]),e)}const Dbe="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);BigInt(1);BigInt(2);function Nbe(t,e){if(t.length!==e.length)return!1;for(let r=0;r{const u=Vn(["watchBlockNumber",t.uid,e,r,o]);return Oh(u,{onBlockNumber:n,onError:s},d=>C0(async()=>{var h;try{const v=await S0(t,{cacheTime:0});if(l){if(v===l)return;if(v-l>1&&r)for(let y=l+1n;yl)&&(d.onBlockNumber(v,l),l=v)}catch(v){(h=d.onError)==null||h.call(d,v)}},{emitOnBegin:e,interval:o}))})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(v){var b;if(!u)return;const y=Cw((b=v.result)==null?void 0:b.number);n(y,l),l=y},onError(v){s==null||s(v)}});d=h,u||d()}catch(h){s==null||s(h)}})(),d})()}async function Bbe(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:s=t.pollingInterval,timeout:i}){const o=Vn(["waitForTransactionReceipt",t.uid,r]);let a,l,c,f=!1;return new Promise((u,d)=>{i&&setTimeout(()=>d(new Xme({hash:r})),i);const h=Oh(o,{onReplaced:n,resolve:u,reject:d},v=>{const y=xq(t,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:s,async onBlockNumber(b){if(f)return;let p=b;const g=w=>{y(),w(),h()};try{if(c){if(p-c.blockNumber+1nv.resolve(c));return}if(a||(f=!0,await nq(async()=>{a=await I4(t,{hash:r}),a.blockNumber&&(p=a.blockNumber)},{delay:({count:w})=>~~(1<0&&p-c.blockNumber+1nv.resolve(c))}catch(w){if(a&&(w instanceof OV||w instanceof MV))try{l=a;const k=(await Wl(t,{blockNumber:p,includeTransactions:!0})).transactions.find(({from:C,nonce:T})=>C===l.from&&T===l.nonce);if(!k||(c=await H3(t,{hash:k.hash}),p-c.blockNumber+1n{var C;(C=v.onReplaced)==null||C.call(v,{reason:$,replacedTransaction:l,transaction:k,transactionReceipt:c}),v.resolve(c)})}catch(E){g(()=>v.reject(E))}else g(()=>v.reject(w))}}})})})}function Ube(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:i,includeTransactions:o,poll:a,pollingInterval:l=t.pollingInterval}){const c=typeof a<"u"?a:t.transport.type!=="webSocket",f=o??!1;let u;return c?(()=>{const v=Vn(["watchBlocks",t.uid,r,n,f,l]);return Oh(v,{onBlock:s,onError:i},y=>C0(async()=>{var b;try{const p=await Wl(t,{blockTag:e,includeTransactions:f});if(p.number&&(u!=null&&u.number)){if(p.number===u.number)return;if(p.number-u.number>1&&r)for(let g=(u==null?void 0:u.number)+1n;gu.number)&&(y.onBlock(p,u),u=p)}catch(p){(b=y.onError)==null||b.call(y,p)}},{emitOnBegin:n,interval:l}))})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const{unsubscribe:b}=await t.transport.subscribe({params:["newHeads"],onData(p){var E,k,$;if(!v)return;const w=((($=(k=(E=t.chain)==null?void 0:E.formatters)==null?void 0:k.block)==null?void 0:$.format)||RV)(p.result);s(w,u),u=w},onError(p){i==null||i(p)}});y=b,v||y()}catch(b){i==null||i(b)}})(),y})()}function zbe(t,{address:e,args:r,batch:n=!0,event:s,events:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){const u=typeof l<"u"?l:t.transport.type!=="webSocket",d=f??!1;return u?(()=>{const y=Vn(["watchEvent",e,r,n,t.uid,s,c]);return Oh(y,{onLogs:a,onError:o},b=>{let p,g,w=!1;const E=C0(async()=>{var k;if(!w){try{g=await uq(t,{address:e,args:r,event:s,events:i,strict:d})}catch{}w=!0;return}try{let $;if(g)$=await Ow(t,{filter:g});else{const C=await S0(t);p&&p!==C?$=await k4(t,{address:e,args:r,event:s,events:i,fromBlock:p+1n,toBlock:C}):$=[],p=C}if($.length===0)return;n?b.onLogs($):$.forEach(C=>b.onLogs([C]))}catch($){g&&$ instanceof $f&&(w=!1),(k=b.onError)==null||k.call(b,$)}},{emitOnBegin:!0,interval:c});return async()=>{g&&await Mw(t,{filter:g}),E()}})})():(()=>{let y=!0,b=()=>y=!1;return(async()=>{try{const p=i??(s?[s]:void 0);let g=[];p&&(g=[p.flatMap(E=>w0({abi:[E],eventName:E.name,args:r}))],s&&(g=g[0]));const{unsubscribe:w}=await t.transport.subscribe({params:["logs",{address:e,topics:g}],onData(E){var $;if(!y)return;const k=E.result;try{const{eventName:C,args:T}=E0({abi:p,data:k.data,topics:k.topics,strict:d}),j=zi(k,{args:T,eventName:C});a([j])}catch(C){let T,j;if(C instanceof kf||C instanceof Ph){if(f)return;T=C.abiItem.name,j=($=C.abiItem.inputs)==null?void 0:$.some(U=>!("name"in U&&U.name))}const F=zi(k,{args:j?[]:{},eventName:T});a([F])}},onError(E){o==null||o(E)}});b=w,y||b()}catch(p){o==null||o(p)}})(),b})()}function Vbe(t,{batch:e=!0,onError:r,onTransactions:n,poll:s,pollingInterval:i=t.pollingInterval}){return(typeof s<"u"?s:t.transport.type!=="webSocket")?(()=>{const c=Vn(["watchPendingTransactions",t.uid,e,i]);return Oh(c,{onTransactions:n,onError:r},f=>{let u;const d=C0(async()=>{var h;try{if(!u)try{u=await dq(t);return}catch(y){throw d(),y}const v=await Ow(t,{filter:u});if(v.length===0)return;e?f.onTransactions(v):v.forEach(y=>f.onTransactions([y]))}catch(v){(h=f.onError)==null||h.call(f,v)}},{emitOnBegin:!0,interval:i});return async()=>{u&&await Mw(t,{filter:u}),d()}})})():(()=>{let c=!0,f=()=>c=!1;return(async()=>{try{const{unsubscribe:u}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!c)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});f=u,c||f()}catch(u){r==null||r(u)}})(),f})()}function qbe(t){return{call:e=>Iw(t,e),createBlockFilter:()=>gbe(t),createContractEventFilter:e=>GV(t,e),createEventFilter:e=>uq(t,e),createPendingTransactionFilter:()=>dq(t),estimateContractGas:e=>kge(t,e),estimateGas:e=>E4(t,e),getBalance:e=>bbe(t,e),getBlock:e=>Wl(t,e),getBlockNumber:e=>S0(t,e),getBlockTransactionCount:e=>wbe(t,e),getBytecode:e=>xbe(t,e),getChainId:()=>Py(t),getEnsAddress:e=>rbe(t,e),getEnsAvatar:e=>ybe(t,e),getEnsName:e=>mbe(t,e),getEnsResolver:e=>pbe(t,e),getEnsText:e=>fq(t,e),getFeeHistory:e=>Ebe(t,e),estimateFeesPerGas:e=>Sge(t,e),getFilterChanges:e=>Ow(t,e),getFilterLogs:e=>Sbe(t,e),getGasPrice:()=>C4(t),getLogs:e=>k4(t,e),estimateMaxPriorityFeePerGas:e=>Ege(t,e),getStorageAt:e=>kbe(t,e),getTransaction:e=>I4(t,e),getTransactionConfirmations:e=>$be(t,e),getTransactionCount:e=>XV(t,e),getTransactionReceipt:e=>H3(t,e),multicall:e=>Abe(t,e),prepareTransactionRequest:e=>Rw(t,e),readContract:e=>Hl(t,e),sendRawTransaction:e=>$4(t,e),simulateContract:e=>Dge(t,e),verifyMessage:e=>jbe(t,e),verifyTypedData:e=>Fbe(t,e),uninstallFilter:e=>Mw(t,e),waitForTransactionReceipt:e=>Bbe(t,e),watchBlocks:e=>Ube(t,e),watchBlockNumber:e=>xq(t,e),watchContractEvent:e=>Vge(t,e),watchEvent:e=>zbe(t,e),watchPendingTransactions:e=>Vbe(t,e)}}function FR(t){const{key:e="public",name:r="Public Client"}=t;return rq({...t,key:e,name:r,type:"publicClient"}).extend(qbe)}function Wbe(t,{abi:e,args:r,bytecode:n,...s}){const i=bq({abi:e,args:r,bytecode:n});return A4(t,{...s,data:i})}async function Hbe(t){return(await t.request({method:"eth_accounts"})).map(r=>m4(r))}async function Gbe(t){return await t.request({method:"wallet_getPermissions"})}async function Kbe(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>Pl(r))}async function Qbe(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function Ybe(t,{account:e=t.account,message:r}){if(!e)throw new Rh({docsPath:"/docs/actions/wallet/signMessage"});const n=fi(e);if(n.type==="local")return n.signMessage({message:r});const s=(()=>typeof r=="string"?s4(r):r.raw instanceof Uint8Array?Ra(r.raw):r.raw)();return t.request({method:"personal_sign",params:[s,n.address]})}async function Jbe(t,e){var c,f,u,d;const{account:r=t.account,chain:n=t.chain,...s}=e;if(!r)throw new Rh({docsPath:"/docs/actions/wallet/signTransaction"});const i=fi(r);x0({account:i,...e});const o=await Py(t);n!==null&&SV({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((c=t.chain)==null?void 0:c.formatters),l=((f=a==null?void 0:a.transactionRequest)==null?void 0:f.format)||Ew;return i.type==="local"?i.signTransaction({chainId:o,...s},{serializer:(d=(u=t.chain)==null?void 0:u.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...l(s),chainId:We(o),from:i.address}]})}async function Xbe(t,{account:e=t.account,domain:r,message:n,primaryType:s,types:i}){if(!e)throw new Rh({docsPath:"/docs/actions/wallet/signTypedData"});const o=fi(e),a={EIP712Domain:gq({domain:r}),...i};if(pq({domain:r,message:n,primaryType:s,types:a}),o.type==="local")return o.signTypedData({domain:r,primaryType:s,types:a,message:n});const l=Vn({domain:r??{},primaryType:s,types:a,message:n},(c,f)=>Mo(f)?f.toLowerCase():f);return t.request({method:"eth_signTypedData_v4",params:[o.address,l]})}async function Zbe(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:We(e)}]})}async function e2e(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function t2e(t){return{addChain:e=>Hge(t,e),deployContract:e=>Wbe(t,e),getAddresses:()=>Hbe(t),getChainId:()=>Py(t),getPermissions:()=>Gbe(t),prepareTransactionRequest:e=>Rw(t,e),requestAddresses:()=>Kbe(t),requestPermissions:e=>Qbe(t,e),sendRawTransaction:e=>$4(t,e),sendTransaction:e=>A4(t,e),signMessage:e=>Ybe(t,e),signTransaction:e=>Jbe(t,e),signTypedData:e=>Xbe(t,e),switchChain:e=>Zbe(t,e),watchAsset:e=>e2e(t,e),writeContract:e=>Wge(t,e)}}function O4(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return rq({...t,key:e,name:r,transport:i=>n({...i,retryCount:0}),type:"walletClient"}).extend(t2e)}function r2e(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:s}=e;return({chain:i,retryCount:o,timeout:a})=>{var u;const l=e.retryCount??o,c=a??e.timeout??1e4,f=t||((u=i==null?void 0:i.rpcUrls.default.webSocket)==null?void 0:u[0]);if(!f)throw new iq;return Dw({key:r,name:n,async request({method:d,params:h}){const v={method:d,params:h},y=await AE(f),{error:b,result:p}=await vd.webSocketAsync(y,{body:v,timeout:c});if(b)throw new g4({body:v,error:b,url:f});return p},retryCount:l,retryDelay:s,timeout:c,type:"webSocket"},{getSocket(){return AE(f)},async subscribe({params:d,onData:h,onError:v}){const y=await AE(f),{result:b}=await new Promise((p,g)=>vd.webSocket(y,{body:{method:"eth_subscribe",params:d},onResponse(w){if(w.error){g(w.error),v==null||v(w.error);return}if(typeof w.id=="number"){p(w);return}w.method==="eth_subscription"&&h(w.params)}}));return{subscriptionId:b,async unsubscribe(){return new Promise(p=>vd.webSocket(y,{body:{method:"eth_unsubscribe",params:[b]},onResponse:p}))}}}})}}function n2e(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 s=1;for(const o of t.providers){let a=e(o);a||(a=`Unknown Wallet #${s}`,s+=1),n.add(a)}const i=[...n];return i.length?i:i[0]??"Injected"}return e(t)??"Injected"}var Dp,Cq=class extends c4{constructor({chains:t,options:e}={}){const r={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers[0]:s},...e};super({chains:t,options:r}),ar(this,"id","injected"),ar(this,"name"),ar(this,"ready"),ms(this,Dp,void 0),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ar(this,"onAccountsChanged",s=>{s.length===0?this.emit("disconnect"):this.emit("change",{account:Pl(s[0])})}),ar(this,"onChainChanged",s=>{const i=CR(s),o=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:o}})}),ar(this,"onDisconnect",async s=>{var i;s.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((i=this.storage)==null||i.removeItem(this.shimDisconnectKey)))});const n=r.getProvider();if(typeof r.name=="string")this.name=r.name;else if(n){const s=n2e(n);r.name?this.name=r.name(s):typeof s=="string"?this.name=s:this.name=s[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:t}={}){var e;try{const r=await this.getProvider();if(!r)throw new nl;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"}),s=Pl(n[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return t&&i!==t&&(i=(await this.switchChain(t)).id,o=this.isChainUnsupported(i)),this.options.shimDisconnect&&((e=this.storage)==null||e.setItem(this.shimDisconnectKey,!0)),{account:s,chain:{id:i,unsupported:o}}}catch(r){throw this.isUserRejectedRequestError(r)?new En(r):r.code===-32002?new Vl(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 nl;const e=await t.request({method:"eth_accounts"});return Pl(e[0])}async getChainId(){const t=await this.getProvider();if(!t)throw new nl;return t.request({method:"eth_chainId"}).then(CR)}async getProvider(){const t=this.options.getProvider();return t&&kw(this,Dp,t),er(this,Dp)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return O4({account:r,chain:n,transport:_4(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 nl;return!!await this.getAccount()}catch{return!1}}async switchChain(t){var n,s,i;const e=await this.getProvider();if(!e)throw new nl;const r=We(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(l=>l.id===t);if(!a)throw new spe({chainId:t,connectorId:this.id});if(o.code===4902||((s=(n=o==null?void 0:o.data)==null?void 0:n.originalError)==null?void 0:s.code)===4902)try{if(await e.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((i=a.rpcUrls.public)==null?void 0:i.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),await this.getChainId()!==t)throw new En(new Error("User rejected switch after adding network."));return a}catch(l){throw new En(l)}throw this.isUserRejectedRequestError(o)?new En(o):new ql(o)}}async watchAsset({address:t,decimals:e=18,image:r,symbol:n}){const s=await this.getProvider();if(!s)throw new nl;return s.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:e,image:r,symbol:n}}})}isUserRejectedRequestError(t){return t.code===4001}};Dp=new WeakMap;var M4=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},PE=(t,e,r)=>(M4(t,e,"read from private field"),r?r.call(t):e.get(t)),TE=(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)},Mm=(t,e,r,n)=>(M4(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),s2e=(t,e,r)=>(M4(t,e,"access private method"),r);const i2e=t=>(e,r,n)=>{const s=n.subscribe;return n.subscribe=(o,a,l)=>{let c=o;if(a){const f=(l==null?void 0:l.equalityFn)||Object.is;let u=o(n.getState());c=d=>{const h=o(d);if(!f(u,h)){const v=u;a(u=h,v)}},l!=null&&l.fireImmediately&&a(u,u)}return s(c)},t(e,r,n)},o2e=i2e;function a2e(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const o=l=>l===null?null:JSON.parse(l,e==null?void 0:e.reviver),a=(i=r.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,e==null?void 0:e.replacer)),removeItem:s=>r.removeItem(s)}}const Ty=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Ty(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Ty(n)(r)}}}},l2e=(t,e)=>(r,n,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:b=>b,version:0,merge:(b,p)=>({...p,...b}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return t((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...b)},n,s);const f=Ty(i.serialize),u=()=>{const b=i.partialize({...n()});let p;const g=f({state:b,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{p=w});if(p)throw p;return g},d=s.setState;s.setState=(b,p)=>{d(b,p),u()};const h=t((...b)=>{r(...b),u()},n,s);let v;const y=()=>{var b;if(!c)return;o=!1,a.forEach(g=>g(n()));const p=((b=i.onRehydrateStorage)==null?void 0:b.call(i,n()))||void 0;return Ty(c.getItem.bind(c))(i.name).then(g=>{if(g)return i.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var w;return v=i.merge(g,(w=n())!=null?w:h),r(v,!0),u()}).then(()=>{p==null||p(v,void 0),o=!0,l.forEach(g=>g(v))}).catch(g=>{p==null||p(void 0,g)})};return s.persist={setOptions:b=>{i={...i,...b},b.getStorage&&(c=b.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:b=>(a.add(b),()=>{a.delete(b)}),onFinishHydration:b=>(l.add(b),()=>{l.delete(b)})},y(),v||h},c2e=(t,e)=>(r,n,s)=>{let i={storage:a2e(()=>localStorage),partialize:y=>y,version:0,merge:(y,b)=>({...b,...y}),...e},o=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,s);const f=()=>{const y=i.partialize({...n()});return c.setItem(i.name,{state:y,version:i.version})},u=s.setState;s.setState=(y,b)=>{u(y,b),f()};const d=t((...y)=>{r(...y),f()},n,s);let h;const v=()=>{var y,b;if(!c)return;o=!1,a.forEach(g=>{var w;return g((w=n())!=null?w:d)});const p=((b=i.onRehydrateStorage)==null?void 0:b.call(i,(y=n())!=null?y:d))||void 0;return Ty(c.getItem.bind(c))(i.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==i.version){if(i.migrate)return i.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var w;return h=i.merge(g,(w=n())!=null?w:d),r(h,!0),f()}).then(()=>{p==null||p(h,void 0),h=n(),o=!0,l.forEach(g=>g(h))}).catch(g=>{p==null||p(void 0,g)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},i.skipHydration||v(),h||d},f2e=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?l2e(t,e):c2e(t,e),u2e=f2e,BR=t=>{let e;const r=new Set,n=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const u=e;e=c??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,u))}},s=()=>e,a={setState:n,getState:s,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{r.clear()}};return e=t(n,s,a),a},d2e=t=>t?BR(t):BR;function D4(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,s]of t)if(!Object.is(s,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;ny===u.id)||(l=[...l,v.chain]),c[u.id]=[...c[u.id]||[],...v.rpcUrls.http],v.rpcUrls.webSocket&&(f[u.id]=[...f[u.id]||[],...v.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${u.name}". + */var Fd=m;function Kde(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Qde=typeof Object.is=="function"?Object.is:Kde,Yde=Fd.useState,Jde=Fd.useEffect,Xde=Fd.useLayoutEffect,Zde=Fd.useDebugValue;function ehe(t,e){var r=e(),n=Yde({inst:{value:r,getSnapshot:e}}),s=n[0].inst,i=n[1];return Xde(function(){s.value=r,s.getSnapshot=e,oE(s)&&i({inst:s})},[t,r,e]),Jde(function(){return oE(s)&&i({inst:s}),t(function(){oE(s)&&i({inst:s})})},[t]),Zde(r),r}function oE(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Qde(t,r)}catch{return!0}}function the(t,e){return e()}var rhe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?the:ehe;BU.useSyncExternalStore=Fd.useSyncExternalStore!==void 0?Fd.useSyncExternalStore:rhe;(function(t){t.exports=BU})(Gde);const nhe=jd.useSyncExternalStore,g9=m.createContext(void 0),UU=m.createContext(!1);function zU(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=g9),window.ReactQueryClientContext):g9)}const L$=({context:t}={})=>{const e=m.useContext(zU(t,m.useContext(UU)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},she=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=zU(r,n);return m.createElement(UU.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},VU=m.createContext(!1),ihe=()=>m.useContext(VU);VU.Provider;function ohe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const ahe=m.createContext(ohe()),lhe=()=>m.useContext(ahe);function che(t,e){return typeof t=="function"?t(...e):!!t}function fhe(t,e,r){const n=IU(t,e,r),s=L$({context:n.context}),[i]=m.useState(()=>new Bde(s,n));m.useEffect(()=>{i.setOptions(n)},[i,n]);const o=nhe(m.useCallback(l=>i.subscribe(br.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=m.useCallback((l,c)=>{i.mutate(l,c).catch(uhe)},[i]);if(o.error&&che(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function uhe(){}const dhe=["added","removed","updated"];function b9(t){return dhe.includes(t)}async function hhe({queryClient:t,persister:e,maxAge:r=1e3*60*60*24,buster:n="",hydrateOptions:s}){try{const i=await e.restoreClient();if(i)if(i.timestamp){const o=Date.now()-i.timestamp>r,a=i.buster!==n;o||a?e.removeClient():Hde(t,i.clientState,s)}else e.removeClient()}catch{e.removeClient()}}async function w9({queryClient:t,persister:e,buster:r="",dehydrateOptions:n}){const s={buster:r,timestamp:Date.now(),clientState:Wde(t,n)};await e.persistClient(s)}function vhe(t){const e=t.queryClient.getQueryCache().subscribe(n=>{b9(n.type)&&w9(t)}),r=t.queryClient.getMutationCache().subscribe(n=>{b9(n.type)&&w9(t)});return()=>{e(),r()}}function yhe(t){let e=!1,r;const n=()=>{e=!0,r==null||r()},s=hhe(t).then(()=>{e||(r=vhe(t))});return[n,s]}var y3={},mhe={get exports(){return y3},set exports(t){y3=t}};(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,u,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new s(f,u||l,d),v=r?r+c:c;return l._events[v]?l._events[v].fn?l._events[v]=[l._events[v],h]:l._events[v].push(h):(l._events[v]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function a(){this._events=new n,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],f,u;if(this._eventsCount===0)return c;for(u in f=this._events)e.call(f,u)&&c.push(r?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},a.prototype.listeners=function(c){var f=r?r+c:c,u=this._events[f];if(!u)return[];if(u.fn)return[u.fn];for(var d=0,h=u.length,v=new Array(h);dt,hw=t=>t,bhe=()=>`viem@${phe}`;class fe extends Error{constructor(e,r={}){var i;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:bhe()});const n=r.cause instanceof fe?r.cause.details:(i=r.cause)!=null&&i.message?r.cause.message:r.details,s=r.cause instanceof fe&&r.cause.docsPath||r.docsPath;this.message=[e||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...s?[`Docs: https://viem.sh${s}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(` +`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=s,this.metaMessages=r.metaMessages,this.shortMessage=e}walk(e){return qU(this,e)}}function qU(t,e){return e!=null&&e(t)?t:t&&typeof t=="object"&&"cause"in t?qU(t.cause,e):e?null:t}class m3 extends fe{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 whe extends fe{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 xhe extends fe{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 WU extends fe{constructor(){super("No chain was provided to the Client."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ClientChainNotConfiguredError"})}}function HU({chain:t,currentChainId:e}){if(!t)throw new xhe;if(e!==t.id)throw new whe({chain:t,currentChainId:e})}function GU(t,e={}){const{fees:r=t.fees,formatters:n=t.formatters,serializers:s=t.serializers}=e;return{...t,fees:r,formatters:n,serializers:s}}function Ch({blockNumber:t,chain:e,contract:r}){var s;const n=(s=e==null?void 0:e.contracts)==null?void 0:s[r];if(!n)throw new m3({chain:e,contract:{name:r}});if(t&&n.blockCreated&&n.blockCreated>t)throw new m3({blockNumber:t,chain:e,contract:{name:r,blockCreated:n.blockCreated}});return n.address}class Che extends fe{constructor({max:e,min:r,signed:n,size:s,value:i}){super(`Number "${i}" is not in safe ${s?`${s*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 Ehe extends fe{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 She extends fe{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 Ro(t,{strict:e=!0}={}){return!t||typeof t!="string"?!1:e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}function Gr(t){return Ro(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}function fd(t,{dir:e="left"}={}){let r=typeof t=="string"?t.replace("0x",""):t,n=0;for(let s=0;sr*2)throw new QU({size:Math.ceil(n.length/2),targetSize:r,type:"hex"});return`0x${n[e==="right"?"padEnd":"padStart"](r*2,"0")}`}function khe(t,{dir:e,size:r=32}={}){if(r===null)return t;if(t.length>r)throw new QU({size:t.length,targetSize:r,type:"bytes"});const n=new Uint8Array(r);for(let s=0;se.toString(16).padStart(2,"0"));function Pa(t,e={}){return typeof t=="number"||typeof t=="bigint"?We(t,e):typeof t=="string"?j$(t,e):typeof t=="boolean"?YU(t,e):iy(t,e)}function YU(t,e={}){const r=`0x${Number(t)}`;return typeof e.size=="number"?(lc(r,{size:e.size}),Eh(r,{size:e.size})):r}function iy(t,e={}){let r="";for(let s=0;si||se)throw new She({givenSize:Gr(t),maxSize:e})}function vw(t,e={}){const{signed:r}=e;e.size&&lc(t,{size:e.size});const n=BigInt(t);if(!r)return n;const s=(t.length-2)/2,i=(1n<typeof n=="string"?n:XU(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 zi(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 Ohe={"0x0":"reverted","0x1":"success"};function Mhe(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=>zi(e)):null,to:t.to?t.to:null,transactionIndex:t.transactionIndex?Vn(t.transactionIndex):null,status:t.status?Ohe[t.status]:null,type:t.type?JU[t.type]||t.type:null}}const Dhe={legacy:"0x0",eip2930:"0x1",eip1559:"0x2"};function yw(t){return{...t,gas:typeof t.gas<"u"?We(t.gas):void 0,gasPrice:typeof t.gasPrice<"u"?We(t.gasPrice):void 0,maxFeePerGas:typeof t.maxFeePerGas<"u"?We(t.maxFeePerGas):void 0,maxPriorityFeePerGas:typeof t.maxPriorityFeePerGas<"u"?We(t.maxPriorityFeePerGas):void 0,nonce:typeof t.nonce<"u"?We(t.nonce):void 0,type:typeof t.type<"u"?Dhe[t.type]:void 0,value:typeof t.value<"u"?We(t.value):void 0}}class oy extends fe{constructor({address:e}){super(`Address "${e}" is invalid.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAddressError"})}}const Nhe={gwei:9,wei:18},Lhe={ether:-9,wei:9};function ez(t,e){let r=t.toString();const n=r.startsWith("-");n&&(r=r.slice(1)),r=r.padStart(e,"0");let[s,i]=[r.slice(0,r.length-e),r.slice(r.length-e)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${s||"0"}${i?`.${i}`:""}`}function ls(t,e="wei"){return ez(t,Lhe[e])}class qu extends fe{constructor({cause:e,message:r}={}){var s;const n=(s=r==null?void 0:r.replace("execution reverted: ",""))==null?void 0:s.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(qu,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(qu,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class Jg extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ls(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(Jg,"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 p3 extends fe{constructor({cause:e,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${ls(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(p3,"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 g3 extends fe{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(g3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class b3 extends fe{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(b3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class w3 extends fe{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(w3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class x3 extends fe{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(x3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds/});class C3 extends fe{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(C3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class E3 extends fe{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(E3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class S3 extends fe{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(S3,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class Xg extends fe{constructor({cause:e,maxPriorityFeePerGas:r,maxFeePerGas:n}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${ls(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${ls(n)} gwei`:""}).`].join(` +`),{cause:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TipAboveFeeCapError"})}}Object.defineProperty(Xg,"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 mw extends fe{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 jhe=/^0x[a-fA-F0-9]{40}$/;function Bd(t){return jhe.test(t)}function ya(t){return typeof t[0]=="string"?B$(t):Fhe(t)}function Fhe(t){let e=0;for(const s of t)e+=s.length;const r=new Uint8Array(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return r}function B$(t){return`0x${t.reduce((e,r)=>e+r.replace("0x",""),"")}`}function U$(t,e="wei"){return ez(t,Nhe[e])}function h0(t){const e=Object.entries(t).map(([n,s])=>s===void 0||s===!1?null:[n,s]).filter(Boolean),r=e.reduce((n,[s])=>Math.max(n,s.length),0);return e.map(([n,s])=>` ${`${n}:`.padEnd(r+1)} ${s}`).join(` +`)}class Bhe extends fe{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 Uhe extends fe{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",h0(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 zhe extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=h0({chain:s&&`${s==null?void 0:s.name} (id: ${s==null?void 0:s.id})`,from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});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 tz extends fe{constructor({blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){let o="Transaction";n&&i!==void 0&&(o=`Transaction at block time "${n}" at index "${i}"`),e&&i!==void 0&&(o=`Transaction at block hash "${e}" at index "${i}"`),r&&i!==void 0&&(o=`Transaction at block number "${r}" at index "${i}"`),s&&(o=`Transaction with hash "${s}"`),super(`${o} could not be found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionNotFoundError"})}}class rz extends fe{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 Vhe extends fe{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 qhe(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 Uhe({transaction:t})}const Whe=GU({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}),Hhe=GU({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}}});var Ghe=Object.defineProperty,Khe=(t,e,r)=>e in t?Ghe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ar=(t,e,r)=>(Khe(t,typeof e!="symbol"?e+"":e,r),r),z$=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},er=(t,e,r)=>(z$(t,e,"read from private field"),r?r.call(t):e.get(t)),ps=(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)},pw=(t,e,r,n)=>(z$(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Qr=(t,e,r)=>(z$(t,e,"access private method"),r),V$=class extends y3{constructor({chains:t=[Hhe,Whe],options:e}){super(),ar(this,"chains"),ar(this,"options"),ar(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}},Qhe=class extends Error{constructor({chainId:t,connectorId:e}){super(`Chain "${t}" not configured for connector "${e}".`),ar(this,"name","ChainNotConfiguredForConnectorError")}},sl=class extends Error{constructor(){super(...arguments),ar(this,"name","ConnectorNotFoundError"),ar(this,"message","Connector not found")}};function x9(t){return typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t}function cc(t,{includeName:e=!1}={}){if(t.type!=="function"&&t.type!=="event"&&t.type!=="error")throw new l1e(t.type);return`${t.name}(${gw(t.inputs,{includeName:e})})`}function gw(t,{includeName:e=!1}={}){return t?t.map(r=>Yhe(r,{includeName:e})).join(e?", ":","):""}function Yhe(t,{includeName:e}){return t.type.startsWith("tuple")?`(${gw(t.components,{includeName:e})})${t.type.slice(5)}`:t.type+(e&&t.name?` ${t.name}`:"")}class Jhe extends fe{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 C9 extends fe{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 q$ extends fe{constructor({data:e,params:r,size:n}){super([`Data size of ${n} bytes is too small for given parameters.`].join(` +`),{metaMessages:[`Params: (${gw(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 bw extends fe{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiDecodingZeroDataError"})}}class Xhe extends fe{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 Zhe extends fe{constructor({expectedSize:e,value:r}){super(`Size of bytes "${r}" (bytes${Gr(r)}) does not match expected size (bytes${e}).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiEncodingBytesSizeMismatchError"})}}class e1e extends fe{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 nz extends fe{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 t1e extends fe{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 r1e extends fe{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 E9 extends fe{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 Zg extends fe{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 n1e extends fe{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 s1e extends fe{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 wf extends fe{constructor({abiItem:e,data:r,params:n,size:s}){super([`Data size of ${s} bytes is too small for non-indexed event parameters.`].join(` +`),{metaMessages:[`Params: (${gw(n,{includeName:!0})})`,`Data: ${r} (${s} 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=s}}class Sh extends fe{constructor({abiItem:e,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${cc(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 i1e extends fe{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 o1e extends fe{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 a1e extends fe{constructor(e){super([`Value "${e}" is not a valid array.`].join(` +`)),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidArrayError"})}}class l1e extends fe{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 c1e extends fe{constructor(e){super(`Filter type "${e}" is not supported.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"FilterTypeNotSupportedError"})}}const f1e=/((function|event)\s)?(.*)(\((.*)\))/;function sz(t){const e=t.match(f1e),r=(e==null?void 0:e[2])||void 0,n=e==null?void 0:e[3],s=(e==null?void 0:e[5])||void 0;return{type:r,name:n,params:s}}function u1e(t){return sz(t).name}function d1e(t){const e=sz(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 S9(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function iz(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 k9(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 h1e(t,e){iz(t);const r=e.outputLen;if(t.length>$9&Em)}:{h:Number(t>>$9&Em)|0,l:Number(t&Em)|0}}function y1e(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;st<>>32-r,p1e=(t,e,r)=>e<>>32-r,g1e=(t,e,r)=>e<>>64-r,b1e=(t,e,r)=>t<>>64-r;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const w1e=t=>t instanceof Uint8Array,x1e=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),C1e=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!C1e)throw new Error("Non little-endian hardware is not supported");function E1e(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function oz(t){if(typeof t=="string"&&(t=E1e(t)),!w1e(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}class S1e{clone(){return this._cloneInto()}}function k1e(t){const e=n=>t().update(oz(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}const[az,lz,cz]=[[],[],[]],$1e=BigInt(0),u1=BigInt(1),A1e=BigInt(2),_1e=BigInt(7),P1e=BigInt(256),T1e=BigInt(113);for(let t=0,e=u1,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],az.push(2*(5*n+r)),lz.push((t+1)*(t+2)/2%64);let s=$1e;for(let i=0;i<7;i++)e=(e<>_1e)*T1e)%P1e,e&A1e&&(s^=u1<<(u1<r>32?g1e(t,e,r):m1e(t,e,r),_9=(t,e,r)=>r>32?b1e(t,e,r):p1e(t,e,r);function O1e(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,l=(o+2)%10,c=r[l],f=r[l+1],u=A9(c,f,1)^r[a],d=_9(c,f,1)^r[a+1];for(let h=0;h<50;h+=10)t[o+h]^=u,t[o+h+1]^=d}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=lz[o],l=A9(s,i,a),c=_9(s,i,a),f=az[o];s=t[f],i=t[f+1],t[f]=l,t[f+1]=c}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]^=R1e[n],t[1]^=I1e[n]}r.fill(0)}class W$ extends S1e{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,S9(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=x1e(this.state)}keccak(){O1e(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){k9(this);const{blockLen:r,state:n}=this;e=oz(e);const s=e.length;for(let i=0;i=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=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 S9(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(h1e(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:s,rounds:i,enableXOF:o}=this;return e||(e=new W$(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}}const M1e=(t,e,r)=>k1e(()=>new W$(e,t,r)),D1e=M1e(1,136,256/8);function ns(t,e){const r=e||"hex",n=D1e(Ro(t,{strict:!1})?bf(t):t);return r==="bytes"?n:Pa(n)}const fz=t=>ns(bf(t));function uz(t){const e=u1e(t),r=d1e(t)||[];return fz(`${e}(${r.map(({type:n})=>n).join(",")})`)}function dz(t){return fz(cc(t))}const H$=t=>typeof t=="string"?uz(t):dz(t);function $r(t,e,r,{strict:n}={}){return Ro(t,{strict:!1})?L1e(t,e,r,{strict:n}):N1e(t,e,r,{strict:n})}function hz(t,e){if(typeof e=="number"&&e>0&&e>Gr(t)-1)throw new KU({offset:e,position:"start",size:Gr(t)})}function vz(t,e,r){if(typeof e=="number"&&typeof r=="number"&&Gr(t)!==r-e)throw new KU({offset:r,position:"end",size:Gr(t)})}function N1e(t,e,r,{strict:n}={}){hz(t,e);const s=t.slice(e,r);return n&&vz(s,e,r),s}function L1e(t,e,r,{strict:n}={}){hz(t,e);const s=`0x${t.replace("0x","").slice((e??0)*2,(r??t.length)*2)}`;return n&&vz(s,e,r),s}function v0(t,e){if(t.length!==e.length)throw new e1e({expectedLength:t.length,givenLength:e.length});const r=j1e({params:t,values:e}),n=K$(r);return n.length===0?"0x":n}function j1e({params:t,values:e}){const r=[];for(let n=0;n0?ya([a,o]):a}}if(s)return{dynamic:!0,encoded:o}}return{dynamic:!1,encoded:ya(i.map(({encoded:o})=>o))}}function U1e(t,{param:e}){const[,r]=e.type.split("bytes"),n=Gr(t);if(!r){let s=t;return n%32!==0&&(s=Pl(s,{dir:"right",size:Math.ceil((t.length-2)/2/32)*32})),{dynamic:!0,encoded:ya([Pl(We(n,{size:32})),s])}}if(n!==parseInt(r))throw new Zhe({expectedSize:parseInt(r),value:t});return{dynamic:!1,encoded:Pl(t,{dir:"right"})}}function z1e(t){return{dynamic:!1,encoded:Pl(YU(t))}}function V1e(t,{signed:e}){return{dynamic:!1,encoded:We(t,{size:32,signed:e})}}function q1e(t){const e=j$(t),r=Math.ceil(Gr(e)/32),n=[];for(let s=0;ss))}}function ww(t){const e=t.match(/^(.*)\[(\d+)?\]$/);return e?[e[2]?Number(e[2]):null,e[1]]:void 0}const Q$=t=>$r(typeof t=="string"?uz(t):dz(t),0,4);function y0({abi:t,args:e=[],name:r}){const n=Ro(r,{strict:!1}),s=t.filter(i=>n?i.type==="function"?Q$(i)===r:i.type==="event"?H$(i)===r:!1:"name"in i&&i.name===r);if(s.length!==0){if(s.length===1)return s[0];for(const i of s){if(!("inputs"in i))continue;if(!e||e.length===0){if(!i.inputs||i.inputs.length===0)return i;continue}if(!i.inputs||i.inputs.length===0||i.inputs.length!==e.length)continue;if(e.every((a,l)=>{const c="inputs"in i&&i.inputs[l];return c?k3(a,c):!1}))return i}return s[0]}}function k3(t,e){const r=typeof t,n=e.type;switch(n){case"address":return Bd(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((s,i)=>k3(Object.values(t)[i],s)):/^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(s=>k3(s,{...e,type:n.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function m0({abi:t,eventName:e,args:r}){var a;let n=t[0];if(e&&(n=y0({abi:t,args:r,name:e}),!n))throw new E9(e,{docsPath:"/docs/contract/encodeEventTopics"});if(n.type!=="event")throw new E9(void 0,{docsPath:"/docs/contract/encodeEventTopics"});const s=cc(n),i=H$(s);let o=[];if(r&&"inputs"in n){const l=(a=n.inputs)==null?void 0:a.filter(f=>"indexed"in f&&f.indexed),c=Array.isArray(r)?r:Object.values(r).length>0?(l==null?void 0:l.map(f=>r[f.name]))??[]:[];c.length>0&&(o=(l==null?void 0:l.map((f,u)=>Array.isArray(c[u])?c[u].map((d,h)=>P9({param:f,value:c[u][h]})):c[u]?P9({param:f,value:c[u]}):null))??[])}return[i,...o]}function P9({param:t,value:e}){if(t.type==="string"||t.type==="bytes")return ns(bf(e));if(t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/))throw new c1e(t.type);return v0([t],[e])}function xw(t,{method:e}){var n,s;const r={};return t.transport.type==="fallback"&&((s=(n=t.transport).onResponse)==null||s.call(n,({method:i,response:o,status:a,transport:l})=>{a==="success"&&e===i&&(r[o]=l.request)})),i=>r[i]||t.request}async function yz(t,{address:e,abi:r,args:n,eventName:s,fromBlock:i,strict:o,toBlock:a}){const l=xw(t,{method:"eth_newFilter"}),c=s?m0({abi:r,args:n,eventName:s}):void 0,f=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,topics:c}]});return{abi:r,args:n,eventName:s,id:f,request:l(f),strict:o,type:"event"}}function ci(t){return typeof t=="string"?{address:t,type:"json-rpc"}:t}function fc({abi:t,args:e,functionName:r}){let n=t[0];if(r&&(n=y0({abi:t,args:e,name:r}),!n))throw new Zg(r,{docsPath:"/docs/contract/encodeFunctionData"});if(n.type!=="function")throw new Zg(void 0,{docsPath:"/docs/contract/encodeFunctionData"});const s=cc(n),i=Q$(s),o="inputs"in n&&n.inputs?v0(n.inputs,e??[]):void 0;return B$([i,o??"0x"])}const mz={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."},H1e={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},G1e={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function Y$(t,e){const r=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),n=ns(oa(r),"bytes"),s=(e?r.substring(`${e}0x`.length):r).split("");for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(n[i>>1]&15)>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());return`0x${s.join("")}`}function Tl(t,e){if(!Bd(t))throw new oy({address:t});return Y$(t,e)}function Cw(t,e){if(e==="0x"&&t.length>0)throw new bw;if(Gr(e)&&Gr(e)<32)throw new q$({data:e,params:t,size:Gr(e)});return K1e({data:e,params:t})}function K1e({data:t,params:e}){const r=[];let n=0;for(let s=0;s=Gr(t))throw new q$({data:t,params:e,size:Gr(t)});const i=e[s],{consumed:o,value:a}=ud({data:t,param:i,position:n});r.push(a),n+=o}return r}function ud({data:t,param:e,position:r}){const n=ww(e.type);if(n){const[i,o]=n;return Y1e(t,{length:i,param:{...e,type:o},position:r})}if(e.type==="tuple")return tve(t,{param:e,position:r});if(e.type==="string")return eve(t,{position:r});if(e.type.startsWith("bytes"))return X1e(t,{param:e,position:r});const s=$r(t,r,r+32,{strict:!0});if(e.type.startsWith("uint")||e.type.startsWith("int"))return Z1e(s,{param:e});if(e.type==="address")return Q1e(s);if(e.type==="bool")return J1e(s);throw new o1e(e.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function Q1e(t){return{consumed:32,value:Y$($r(t,-20))}}function Y1e(t,{param:e,length:r,position:n}){if(!r){const o=Vn($r(t,n,n+32,{strict:!0})),a=Vn($r(t,o,o+32,{strict:!0}));let l=0;const c=[];for(let f=0;f48?vw(t,{signed:r}):Vn(t,{signed:r})}}function eve(t,{position:e}){const r=Vn($r(t,e,e+32,{strict:!0})),n=Vn($r(t,r,r+32,{strict:!0}));return n===0?{consumed:32,value:""}:{consumed:32,value:Ihe(fd($r(t,r+32,r+32+n,{strict:!0})))}}function tve(t,{param:e,position:r}){const n=e.components.length===0||e.components.some(({name:o})=>!o),s=n?[]:{};let i=0;if(eb(e)){const o=Vn($r(t,r,r+32,{strict:!0}));for(let a=0;ai.type==="error"&&r===Q$(cc(i)));if(!s)throw new nz(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Cw(s.inputs,$r(e,4)):void 0,errorName:s.name}}const qn=(t,e,r)=>JSON.stringify(t,(n,s)=>{const i=typeof s=="bigint"?s.toString():s;return typeof e=="function"?e(n,i):i},r);function pz({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((s,i)=>`${n&&s.name?`${s.name}: `:""}${typeof e[i]=="object"?qn(e[i]):e[i]}`).join(", ")})`}class gz extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=r?ci(r):void 0,v=h0({from:h==null?void 0:h.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].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 nve extends fe{constructor(e,{abi:r,args:n,contractAddress:s,docsPath:i,functionName:o,sender:a}){const l=y0({abi:r,args:n,name:o}),c=l?pz({abiItem:l,args:n,includeFunctionName:!1,includeName:!1}):void 0,f=l?cc(l,{includeName:!0}):void 0,u=h0({address:s&&ghe(s),function:f,args:c&&c!=="()"&&`${[...Array((o==null?void 0:o.length)??0).keys()].map(()=>" ").join("")}${c}`,sender:a});super(e.shortMessage||`An unknown error occurred while executing the contract function "${o}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Contract Call:",u].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=s,this.functionName=o,this.sender=a}}class $3 extends fe{constructor({abi:e,data:r,functionName:n,message:s}){let i,o,a,l;if(r&&r!=="0x")try{o=rve({abi:e,data:r});const{abiItem:f,errorName:u,args:d}=o;if(u==="Error")l=d[0];else if(u==="Panic"){const[h]=d;l=mz[h]}else{const h=f?cc(f,{includeName:!0}):void 0,v=f&&d?pz({abiItem:f,args:d,includeFunctionName:!1,includeName:!1}):void 0;a=[h?`Error: ${h}`:"",v&&v!=="()"?` ${[...Array((u==null?void 0:u.length)??0).keys()].map(()=>" ").join("")}${v}`:""]}}catch(f){i=f}else s&&(l=s);let c;i instanceof nz&&(c=i.signature,a=[`Unable to decode signature "${c}" 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=${c}.`]),super(l&&l!=="execution reverted"||c?[`The contract function "${n}" reverted with the following ${c?"signature":"reason"}:`,l||c].join(` +`):`The contract function "${n}" reverted.`,{cause:i,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=l,this.signature=c}}class sve extends fe{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 J$ extends fe{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 nv extends fe{constructor({body:e,details:r,headers:n,status:s,url:i}){super("HTTP request failed.",{details:r,metaMessages:[s&&`Status: ${s}`,`URL: ${hw(i)}`,e&&`Request body: ${qn(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=s,this.url=i}}class ive extends fe{constructor({body:e,details:r,url:n}){super("WebSocket request failed.",{details:r,metaMessages:[`URL: ${hw(n)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WebSocketRequestError"})}}class X$ extends fe{constructor({body:e,error:r,url:n}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${hw(n)}`,`Request body: ${qn(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 A3 extends fe{constructor({body:e,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${hw(r)}`,`Request body: ${qn(e)}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TimeoutError"})}}const ove=-1;class vs extends fe{constructor(e,{code:r,docsPath:n,metaMessages:s,shortMessage:i}){super(i,{cause:e,docsPath:n,metaMessages:s||(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 X$?e.code:r??ove}}class kh extends vs{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 ay extends vs{constructor(e){super(e,{code:ay.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(ay,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class ly extends vs{constructor(e){super(e,{code:ly.code,shortMessage:"JSON is not a valid request object."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidRequestRpcError"})}}Object.defineProperty(ly,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class cy extends vs{constructor(e){super(e,{code:cy.code,shortMessage:"The method does not exist / is not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotFoundRpcError"})}}Object.defineProperty(cy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class fy extends vs{constructor(e){super(e,{code:fy.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(fy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ud extends vs{constructor(e){super(e,{code:Ud.code,shortMessage:"An internal error was received."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InternalRpcError"})}}Object.defineProperty(Ud,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class xf extends vs{constructor(e){super(e,{code:xf.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(xf,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class uy extends vs{constructor(e){super(e,{code:uy.code,shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(uy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class zl extends vs{constructor(e){super(e,{code:zl.code,shortMessage:"Requested resource not available."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceUnavailableRpcError"})}}Object.defineProperty(zl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class dy extends vs{constructor(e){super(e,{code:dy.code,shortMessage:"Transaction creation failed."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"TransactionRejectedRpcError"})}}Object.defineProperty(dy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class hy extends vs{constructor(e){super(e,{code:hy.code,shortMessage:"Method is not implemented."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MethodNotSupportedRpcError"})}}Object.defineProperty(hy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class vy extends vs{constructor(e){super(e,{code:vy.code,shortMessage:"Request exceeds defined limit."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"LimitExceededRpcError"})}}Object.defineProperty(vy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class yy extends vs{constructor(e){super(e,{code:yy.code,shortMessage:"Version of JSON-RPC protocol is not supported."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"JsonRpcVersionUnsupportedError"})}}Object.defineProperty(yy,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Sn extends kh{constructor(e){super(e,{code:Sn.code,shortMessage:"User rejected the request."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UserRejectedRequestError"})}}Object.defineProperty(Sn,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class my extends kh{constructor(e){super(e,{code:my.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(my,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class py extends kh{constructor(e){super(e,{code:py.code,shortMessage:"The Provider does not support the requested method."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnsupportedProviderMethodError"})}}Object.defineProperty(py,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class gy extends kh{constructor(e){super(e,{code:gy.code,shortMessage:"The Provider is disconnected from all chains."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderDisconnectedError"})}}Object.defineProperty(gy,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class by extends kh{constructor(e){super(e,{code:by.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(by,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class Vl extends kh{constructor(e){super(e,{code:Vl.code,shortMessage:"An error occurred when attempting to switch chain."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainError"})}}Object.defineProperty(Vl,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class ave extends vs{constructor(e){super(e,{shortMessage:"An unknown RPC error occurred."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownRpcError"})}}const lve=3;function wy(t,{abi:e,address:r,args:n,docsPath:s,functionName:i,sender:o}){const{code:a,data:l,message:c,shortMessage:f}=t instanceof J$?t:t instanceof fe?t.walk(d=>"data"in d)||t.walk():{};let u=t;return t instanceof bw?u=new sve({functionName:i}):[lve,Ud.code].includes(a)&&(l||c||f)&&(u=new $3({abi:e,data:typeof l=="object"?l.data:l,functionName:i,message:f??c})),new nve(u,{abi:e,args:n,contractAddress:r,docsPath:s,functionName:i,sender:o})}class $h extends fe{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 cve extends fe{constructor(e,{account:r,docsPath:n,chain:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d}){const h=h0({from:r==null?void 0:r.address,to:u,value:typeof d<"u"&&`${U$(d)} ${(s==null?void 0:s.nativeCurrency.symbol)||"ETH"}`,data:i,gas:o,gasPrice:typeof a<"u"&&`${ls(a)} gwei`,maxFeePerGas:typeof l<"u"&&`${ls(l)} gwei`,maxPriorityFeePerGas:typeof c<"u"&&`${ls(c)} gwei`,nonce:f});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 Z$(t,e){const r=(t.details||"").toLowerCase(),n=t.walk(s=>s.code===qu.code);return n instanceof fe?new qu({cause:t,message:n.details}):qu.nodeMessage.test(r)?new qu({cause:t,message:t.details}):Jg.nodeMessage.test(r)?new Jg({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):p3.nodeMessage.test(r)?new p3({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas}):g3.nodeMessage.test(r)?new g3({cause:t,nonce:e==null?void 0:e.nonce}):b3.nodeMessage.test(r)?new b3({cause:t,nonce:e==null?void 0:e.nonce}):w3.nodeMessage.test(r)?new w3({cause:t,nonce:e==null?void 0:e.nonce}):x3.nodeMessage.test(r)?new x3({cause:t}):C3.nodeMessage.test(r)?new C3({cause:t,gas:e==null?void 0:e.gas}):E3.nodeMessage.test(r)?new E3({cause:t,gas:e==null?void 0:e.gas}):S3.nodeMessage.test(r)?new S3({cause:t}):Xg.nodeMessage.test(r)?new Xg({cause:t,maxFeePerGas:e==null?void 0:e.maxFeePerGas,maxPriorityFeePerGas:e==null?void 0:e.maxPriorityFeePerGas}):new mw({cause:t})}function fve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new cve(n,{docsPath:e,...r})}function e4(t,{format:e}){return e?Object.keys(e({})).reduce((n,s)=>(t!=null&&t.hasOwnProperty(s)&&(n[s]=t[s]),n),{}):{}}function p0(t){const{account:e,gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:s,to:i}=t,o=e?ci(e):void 0;if(o&&!Bd(o.address))throw new oy({address:o.address});if(i&&!Bd(i))throw new oy({address:i});if(typeof r<"u"&&(typeof n<"u"||typeof s<"u"))throw new Bhe;if(n&&n>2n**256n-1n)throw new Jg({maxFeePerGas:n});if(s&&n&&s>n)throw new Xg({maxFeePerGas:n,maxPriorityFeePerGas:s})}class uve extends fe{constructor(){super("`baseFeeMultiplier` must be greater than 1."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseFeeScalarError"})}}class t4 extends fe{constructor(){super("Chain does not support EIP-1559 fees."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Eip1559FeesNotSupportedError"})}}class dve extends fe{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${ls(e)} gwei).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"MaxFeePerGasTooLowError"})}}class hve extends fe{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 ql(t,{blockHash:e,blockNumber:r,blockTag:n,includeTransactions:s}={}){var f,u,d;const i=n??"latest",o=s??!1,a=r!==void 0?We(r):void 0;let l=null;if(e?l=await t.request({method:"eth_getBlockByHash",params:[e,o]}):l=await t.request({method:"eth_getBlockByNumber",params:[a||i,o]}),!l)throw new hve({blockHash:e,blockNumber:r});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.block)==null?void 0:d.format)||ZU)(l)}async function r4(t){const e=await t.request({method:"eth_gasPrice"});return BigInt(e)}async function vve(t,e){return bz(t,e)}async function bz(t,e){var i,o,a;const{block:r,chain:n=t.chain,request:s}=e||{};if(typeof((i=n==null?void 0:n.fees)==null?void 0:i.defaultPriorityFee)=="function"){const l=r||await ql(t);return n.fees.defaultPriorityFee({block:l,client:t,request:s})}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 l=await t.request({method:"eth_maxPriorityFeePerGas"});return vw(l)}catch{const[l,c]=await Promise.all([r?Promise.resolve(r):ql(t),r4(t)]);if(typeof l.baseFeePerGas!="bigint")throw new t4;const f=c-l.baseFeePerGas;return f<0n?0n:f}}async function yve(t,e){return _3(t,e)}async function _3(t,e){var d;const{block:r,chain:n=t.chain,request:s,type:i="eip1559"}=e||{},o=await(async()=>{var h,v;return typeof((h=n==null?void 0:n.fees)==null?void 0:h.baseFeeMultiplier)=="function"?n.fees.baseFeeMultiplier({block:r,client:t,request:s}):((v=n==null?void 0:n.fees)==null?void 0:v.baseFeeMultiplier)??1.2})();if(o<1)throw new uve;const l=10**o.toString().split(".")[1].length,c=h=>h*BigInt(o*l)/BigInt(l),f=r||await ql(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:c,request:s,type:i});if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new t4;const h=s!=null&&s.maxPriorityFeePerGas?s.maxPriorityFeePerGas:await bz(t,{block:f,chain:n,request:s}),v=c(f.baseFeePerGas);return{maxFeePerGas:(s==null?void 0:s.maxFeePerGas)??v+h,maxPriorityFeePerGas:h}}return{gasPrice:(s==null?void 0:s.gasPrice)??c(await r4(t))}}async function wz(t,{address:e,blockTag:r="latest",blockNumber:n}){const s=await t.request({method:"eth_getTransactionCount",params:[e,n?We(n):r]});return Vn(s)}async function Ew(t,e){const{account:r=t.account,chain:n,gas:s,nonce:i,type:o}=e;if(!r)throw new $h;const a=ci(r),l=await ql(t,{blockTag:"latest"}),c={...e,from:a.address};if(typeof i>"u"&&(c.nonce=await wz(t,{address:a.address,blockTag:"pending"})),typeof o>"u")try{c.type=qhe(c)}catch{c.type=typeof l.baseFeePerGas=="bigint"?"eip1559":"legacy"}if(c.type==="eip1559"){const{maxFeePerGas:f,maxPriorityFeePerGas:u}=await _3(t,{block:l,chain:n,request:c});if(typeof e.maxPriorityFeePerGas>"u"&&e.maxFeePerGas&&e.maxFeePerGas"u"&&(c.gas=await n4(t,{...c,account:{address:a.address,type:"json-rpc"}})),p0(c),c}async function n4(t,e){var s,i,o;const r=e.account??t.account;if(!r)throw new $h({docsPath:"/docs/actions/public/estimateGas"});const n=ci(r);try{const{accessList:a,blockNumber:l,blockTag:c,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:g,value:b,...p}=n.type==="local"?await Ew(t,e):e,E=(l?We(l):void 0)||c;p0(e);const k=((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionRequest)==null?void 0:o.format)||yw,$=k({...e4(p,{format:k}),from:n.address,accessList:a,data:f,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:v,nonce:y,to:g,value:b}),x=await t.request({method:"eth_estimateGas",params:E?[$,E]:[$]});return BigInt(x)}catch(a){throw fve(a,{...e,account:n,chain:t.chain})}}async function mve(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=fc({abi:e,args:n,functionName:s});try{return await n4(t,{data:o,to:r,...i})}catch(a){const l=i.account?ci(i.account):void 0;throw wy(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:l==null?void 0:l.address})}}const aE="/docs/contract/decodeFunctionResult";function Ah({abi:t,args:e,functionName:r,data:n}){let s=t[0];if(r&&(s=y0({abi:t,args:e,name:r}),!s))throw new Zg(r,{docsPath:aE});if(s.type!=="function")throw new Zg(void 0,{docsPath:aE});if(!s.outputs)throw new n1e(s.name,{docsPath:aE});const i=Cw(s.outputs,n);if(i&&i.length>1)return i;if(i&&i.length===1)return i[0]}const pve="modulepreload",gve=function(t,e){return new URL(t,e).href},T9={},xz=function(e,r,n){if(!r||r.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=gve(i,n),i in T9)return;T9[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!n)for(let f=s.length-1;f>=0;f--){const u=s[f];if(u.href===i&&(!o||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":pve,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,u)=>{c.addEventListener("load",f),c.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>e())},P3=[{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"}],Cz=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"}],Ez=[...Cz,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],bve=[...Cz,{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"}]}],R9=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],I9=[{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"}]}],wve=[{inputs:[{internalType:"address",name:"_signer",type:"address"},{internalType:"bytes32",name:"_hash",type:"bytes32"},{internalType:"bytes",name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"}],xve="0x82ad56cb";function Cve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new gz(n,{docsPath:e,...r})}const lE=new Map;function s4({fn:t,id:e,shouldSplitBatch:r,wait:n=0}){const s=async()=>{const c=a();i();const f=c.map(({args:u})=>u);f.length!==0&&t(f).then(u=>{c.forEach(({pendingPromise:d},h)=>{var v;return(v=d.resolve)==null?void 0:v.call(d,[u[h],u])})}).catch(u=>{c.forEach(({pendingPromise:d})=>{var h;return(h=d.reject)==null?void 0:h.call(d,u)})})},i=()=>lE.delete(e),o=()=>a().map(({args:c})=>c),a=()=>lE.get(e)||[],l=c=>lE.set(e,[...a(),c]);return{flush:i,async schedule(c){const f={},u=new Promise((v,y)=>{f.resolve=v,f.reject=y});return(r==null?void 0:r([...o(),c]))&&s(),a().length>0?(l({args:c,pendingPromise:f}),u):(l({args:c,pendingPromise:f}),setTimeout(s,n),u)}}}async function Sw(t,e){var b,p,w,E;const{account:r=t.account,batch:n=Boolean((b=t.batch)==null?void 0:b.multicall),blockNumber:s,blockTag:i="latest",accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v,...y}=e,g=r?ci(r):void 0;try{p0(e);const $=(s?We(s):void 0)||i,x=((E=(w=(p=t.chain)==null?void 0:p.formatters)==null?void 0:w.transactionRequest)==null?void 0:E.format)||yw,T=x({...e4(y,{format:x}),from:g==null?void 0:g.address,accessList:o,data:a,gas:l,gasPrice:c,maxFeePerGas:f,maxPriorityFeePerGas:u,nonce:d,to:h,value:v});if(n&&Eve({request:T}))try{return await Sve(t,{...T,blockNumber:s,blockTag:i})}catch(L){if(!(L instanceof WU)&&!(L instanceof m3))throw L}const B=await t.request({method:"eth_call",params:$?[T,$]:[T]});return B==="0x"?{data:void 0}:{data:B}}catch(k){const $=kve(k),{offchainLookup:x,offchainLookupSignature:T}=await xz(()=>import("./ccip-f0ac5289.js"),[],import.meta.url);if(($==null?void 0:$.slice(0,10))===T&&h)return{data:await x(t,{data:$,to:h})};throw Cve(k,{...e,account:g,chain:t.chain})}}function Eve({request:t}){const{data:e,to:r,...n}=t;return!(!e||e.startsWith(xve)||!r||Object.values(n).filter(s=>typeof s<"u").length>0)}async function Sve(t,e){var y;const{batchSize:r=1024,wait:n=0}=typeof((y=t.batch)==null?void 0:y.multicall)=="object"?t.batch.multicall:{},{blockNumber:s,blockTag:i="latest",data:o,multicallAddress:a,to:l}=e;let c=a;if(!c){if(!t.chain)throw new WU;c=Ch({blockNumber:s,chain:t.chain,contract:"multicall3"})}const u=(s?We(s):void 0)||i,{schedule:d}=s4({id:`${t.uid}.${u}`,wait:n,shouldSplitBatch(g){return g.reduce((p,{data:w})=>p+(w.length-2),0)>r*2},fn:async g=>{const b=g.map(E=>({allowFailure:!0,callData:E.data,target:E.to})),p=fc({abi:P3,args:[b],functionName:"aggregate3"}),w=await t.request({method:"eth_call",params:[{data:p,to:c},u]});return Ah({abi:P3,args:[b],functionName:"aggregate3",data:w||"0x"})}}),[{returnData:h,success:v}]=await d({data:o,to:l});if(!v)throw new J$({data:h});return h==="0x"?{data:void 0}:{data:h}}function kve(t){if(!(t instanceof fe))return;const e=t.walk();return typeof e.data=="object"?e.data.data:e.data}async function Wl(t,{abi:e,address:r,args:n,functionName:s,...i}){const o=fc({abi:e,args:n,functionName:s});try{const{data:a}=await Sw(t,{data:o,to:r,...i});return Ah({abi:e,args:n,functionName:s,data:a||"0x"})}catch(a){throw wy(a,{abi:e,address:r,args:n,docsPath:"/docs/contract/readContract",functionName:s})}}async function $ve(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=o.account?ci(o.account):void 0,l=fc({abi:e,args:n,functionName:i});try{const{data:c}=await Sw(t,{batch:!1,data:`${l}${s?s.replace("0x",""):""}`,to:r,...o});return{result:Ah({abi:e,args:n,functionName:i,data:c||"0x"}),request:{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}}}catch(c){throw wy(c,{abi:e,address:r,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:a==null?void 0:a.address})}}const cE=new Map,O9=new Map;let Ave=0;function _h(t,e,r){const n=++Ave,s=()=>cE.get(t)||[],i=()=>{const f=s();cE.set(t,f.filter(u=>u.id!==n))},o=()=>{const f=O9.get(t);s().length===1&&f&&f(),i()},a=s();if(cE.set(t,[...a,{id:n,fns:e}]),a&&a.length>0)return o;const l={};for(const f in e)l[f]=(...u)=>{const d=s();d.length!==0&&d.forEach(h=>{var v,y;return(y=(v=h.fns)[f])==null?void 0:y.call(v,...u)})};const c=r(l);return typeof c=="function"&&O9.set(t,c),o}async function tb(t){return new Promise(e=>setTimeout(e,t))}function g0(t,{emitOnBegin:e,initialWaitTime:r,interval:n}){let s=!0;const i=()=>s=!1;return(async()=>{let a;e&&(a=await t({unpoll:i}));const l=await(r==null?void 0:r(a))??n;await tb(l);const c=async()=>{s&&(await t({unpoll:i}),await tb(n),c())};c()})(),i}const M9="/docs/contract/decodeEventLog";function b0({abi:t,data:e,strict:r,topics:n}){const s=r??!0,[i,...o]=n;if(!i)throw new t1e({docsPath:M9});const a=t.find(v=>v.type==="event"&&i===H$(cc(v)));if(!(a&&"name"in a)||a.type!=="event")throw new r1e(i,{docsPath:M9});const{name:l,inputs:c}=a,f=c==null?void 0:c.some(v=>!("name"in v&&v.name));let u=f?[]:{};const d=c.filter(v=>"indexed"in v&&v.indexed);if(o.length>0)for(let v=0;v!("indexed"in v&&v.indexed));if(h.length>0){if(e&&e!=="0x")try{const v=Cw(h,e);if(v)if(f)u=[...u,...v];else for(let y=0;y0?u:void 0}}function _ve({param:t,value:e}){return t.type==="string"||t.type==="bytes"||t.type==="tuple"||t.type.match(/^(.*)\[(\d+)?\]$/)?e:(Cw([t],e)||[])[0]}const Pve=new Map,Tve=new Map;function Rve(t){const e=(s,i)=>({clear:()=>i.delete(s),get:()=>i.get(s),set:o=>i.set(s,o)}),r=e(t,Pve),n=e(t,Tve);return{clear:()=>{r.clear(),n.clear()},promise:r,response:n}}async function Ive(t,{cacheKey:e,cacheTime:r=1/0}){const n=Rve(e),s=n.response.get();if(s&&r>0&&new Date().getTime()-s.created.getTime()`blockNumber.${t}`;async function w0(t,{cacheTime:e=t.cacheTime,maxAge:r}={}){const n=await Ive(()=>t.request({method:"eth_blockNumber"}),{cacheKey:Ove(t.uid),cacheTime:r??e});return BigInt(n)}async function kw(t,{filter:e}){const r="strict"in e&&e.strict;return(await e.request({method:"eth_getFilterChanges",params:[e.id]})).map(s=>{var i;if(typeof s=="string")return s;try{const{eventName:o,args:a}="abi"in e&&e.abi?b0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return zi(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof wf||o instanceof Sh){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return zi(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function i4(t,{address:e,blockHash:r,fromBlock:n,toBlock:s,event:i,events:o,args:a,strict:l}={}){const c=l??!1,f=o??(i?[i]:void 0);let u=[];f&&(u=[f.flatMap(h=>m0({abi:[h],eventName:h.name,args:a}))],i&&(u=u[0]));let d;return r?d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,blockHash:r}]}):d=await t.request({method:"eth_getLogs",params:[{address:e,topics:u,fromBlock:typeof n=="bigint"?We(n):n,toBlock:typeof s=="bigint"?We(s):s}]}),d.map(h=>{var v;try{const{eventName:y,args:g}=f?b0({abi:f,data:h.data,topics:h.topics,strict:c}):{eventName:void 0,args:void 0};return zi(h,{args:g,eventName:y})}catch(y){let g,b;if(y instanceof wf||y instanceof Sh){if(c)return;g=y.abiItem.name,b=(v=y.abiItem.inputs)==null?void 0:v.some(p=>!("name"in p&&p.name))}return zi(h,{args:b?[]:{},eventName:g})}}).filter(Boolean)}async function $w(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}function Mve(t,{abi:e,address:r,args:n,batch:s=!0,eventName:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){return(typeof l<"u"?l:t.transport.type!=="webSocket")?(()=>{const v=qn(["watchContractEvent",r,n,s,t.uid,i,c]),y=f??!1;return _h(v,{onLogs:a,onError:o},g=>{let b,p,w=!1;const E=g0(async()=>{var k;if(!w){try{p=await yz(t,{abi:e,address:r,args:n,eventName:i,strict:y})}catch{}w=!0;return}try{let $;if(p)$=await kw(t,{filter:p});else{const x=await w0(t);b&&b!==x?$=await i4(t,{address:r,args:n,fromBlock:b+1n,toBlock:x,event:y0({abi:e,name:i})}):$=[],b=x}if($.length===0)return;s?g.onLogs($):$.forEach(x=>g.onLogs([x]))}catch($){p&&$ instanceof xf&&(w=!1),(k=g.onError)==null||k.call(g,$)}},{emitOnBegin:!0,interval:c});return async()=>{p&&await $w(t,{filter:p}),E()}})})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const g=i?m0({abi:e,eventName:i,args:n}):[],{unsubscribe:b}=await t.transport.subscribe({params:["logs",{address:r,topics:g}],onData(p){var E;if(!v)return;const w=p.result;try{const{eventName:k,args:$}=b0({abi:e,data:w.data,topics:w.topics,strict:f}),x=zi(w,{args:$,eventName:k});a([x])}catch(k){let $,x;if(k instanceof wf||k instanceof Sh){if(f)return;$=k.abiItem.name,x=(E=k.abiItem.inputs)==null?void 0:E.some(B=>!("name"in B&&B.name))}const T=zi(w,{args:x?[]:{},eventName:$});a([T])}},onError(p){o==null||o(p)}});y=b,v||y()}catch(g){o==null||o(g)}})(),y})()}function Dve(t,{docsPath:e,...r}){let n=Z$(t,r);return n instanceof mw&&(n=t),new zhe(n,{docsPath:e,...r})}async function xy(t){const e=await t.request({method:"eth_chainId"});return Vn(e)}async function o4(t,{serializedTransaction:e}){return t.request({method:"eth_sendRawTransaction",params:[e]})}async function a4(t,e){var y,g,b;const{account:r=t.account,chain:n=t.chain,accessList:s,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h}=e;if(!r)throw new $h({docsPath:"/docs/actions/wallet/sendTransaction"});const v=ci(r);try{p0(e);let p;if(n!==null&&(p=await xy(t),HU({currentChainId:p,chain:n})),v.type==="local"){const k=await Ew(t,{account:v,accessList:s,chain:n,data:i,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d,...h});p||(p=await xy(t));const $=(y=n==null?void 0:n.serializers)==null?void 0:y.transaction,x=await v.signTransaction({...k,chainId:p},{serializer:$});return await o4(t,{serializedTransaction:x})}const w=((b=(g=n==null?void 0:n.formatters)==null?void 0:g.transactionRequest)==null?void 0:b.format)||yw,E=w({...e4(h,{format:w}),accessList:s,data:i,from:v.address,gas:o,gasPrice:a,maxFeePerGas:l,maxPriorityFeePerGas:c,nonce:f,to:u,value:d});return await t.request({method:"eth_sendTransaction",params:[E]})}catch(p){throw Dve(p,{...e,account:v,chain:e.chain||void 0})}}async function Nve(t,{abi:e,address:r,args:n,dataSuffix:s,functionName:i,...o}){const a=fc({abi:e,args:n,functionName:i});return await a4(t,{data:`${a}${s?s.replace("0x",""):""}`,to:r,...o})}async function Lve(t,{chain:e}){const{id:r,name:n,nativeCurrency:s,rpcUrls:i,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:We(r),chainName:n,nativeCurrency:s,rpcUrls:i.default.http,blockExplorerUrls:o?Object.values(o).map(({url:a})=>a):void 0}]})}const T3=256;let Sm=T3,km;function jve(t=11){if(!km||Sm+t>T3*2){km="",Sm=0;for(let e=0;e{const b=g(y);for(const w in h)delete b[w];const p={...y,...b};return Object.assign(p,{extend:v(p)})}}return Object.assign(h,{extend:v(h)})}function kz(t,{delay:e=100,retryCount:r=2,shouldRetry:n=()=>!0}={}){return new Promise((s,i)=>{const o=async({count:a=0}={})=>{const l=async({error:c})=>{const f=typeof e=="function"?e({count:a,error:c}):e;f&&await tb(f),o({count:a+1})};try{const c=await t();s(c)}catch(c){if(a"code"in t?t.code!==-1&&t.code!==-32004&&t.code!==-32005&&t.code!==-32042&&t.code!==-32603:t instanceof nv&&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 Fve(t,{retryDelay:e=150,retryCount:r=3}={}){return async n=>kz(async()=>{try{return await t(n)}catch(s){const i=s;switch(i.code){case ay.code:throw new ay(i);case ly.code:throw new ly(i);case cy.code:throw new cy(i);case fy.code:throw new fy(i);case Ud.code:throw new Ud(i);case xf.code:throw new xf(i);case uy.code:throw new uy(i);case zl.code:throw new zl(i);case dy.code:throw new dy(i);case hy.code:throw new hy(i);case vy.code:throw new vy(i);case yy.code:throw new yy(i);case Sn.code:throw new Sn(i);case my.code:throw new my(i);case py.code:throw new py(i);case gy.code:throw new gy(i);case by.code:throw new by(i);case Vl.code:throw new Vl(i);case 5e3:throw new Sn(i);default:throw s instanceof fe?s:new ave(i)}}},{delay:({count:s,error:i})=>{var o;if(i&&i instanceof nv){const a=(o=i==null?void 0:i.headers)==null?void 0:o.get("Retry-After");if(a!=null&&a.match(/\d/))return parseInt(a)*1e3}return~~(1<!$z(s)})}function Aw({key:t,name:e,request:r,retryCount:n=3,retryDelay:s=150,timeout:i,type:o},a){return{config:{key:t,name:e,request:r,retryCount:n,retryDelay:s,timeout:i,type:o},request:Fve(r,{retryCount:n,retryDelay:s}),value:a}}function l4(t,e={}){const{key:r="custom",name:n="Custom Provider",retryDelay:s}=e;return({retryCount:i})=>Aw({key:r,name:n,request:t.request.bind(t),retryCount:e.retryCount??i,retryDelay:s,type:"custom"})}function D9(t,e={}){const{key:r="fallback",name:n="Fallback",rank:s=!1,retryCount:i,retryDelay:o}=e;return({chain:a,pollingInterval:l=4e3,timeout:c})=>{let f=t,u=()=>{};const d=Aw({key:r,name:n,async request({method:h,params:v}){const y=async(g=0)=>{const b=f[g]({chain:a,retryCount:0,timeout:c});try{const p=await b.request({method:h,params:v});return u({method:h,params:v,response:p,transport:b,status:"success"}),p}catch(p){if(u({error:p,method:h,params:v,transport:b,status:"error"}),$z(p)||g===f.length-1)throw p;return y(g+1)}};return y()},retryCount:i,retryDelay:o,type:"fallback"},{onResponse:h=>u=h,transports:f.map(h=>h({chain:a,retryCount:0}))});if(s){const h=typeof s=="object"?s:{};Bve({chain:a,interval:h.interval??l,onTransports:v=>f=v,sampleCount:h.sampleCount,timeout:h.timeout,transports:f,weights:h.weights})}return d}}function Bve({chain:t,interval:e=4e3,onTransports:r,sampleCount:n=10,timeout:s=1e3,transports:i,weights:o={}}){const{stability:a=.7,latency:l=.3}=o,c=[],f=async()=>{const u=await Promise.all(i.map(async v=>{const y=v({chain:t,retryCount:0,timeout:s}),g=Date.now();let b,p;try{await y.request({method:"net_listening"}),p=1}catch{p=0}finally{b=Date.now()}return{latency:b-g,success:p}}));c.push(u),c.length>n&&c.shift();const d=Math.max(...c.map(v=>Math.max(...v.map(({latency:y})=>y)))),h=i.map((v,y)=>{const g=c.map(k=>k[y].latency),p=1-g.reduce((k,$)=>k+$,0)/g.length/d,w=c.map(k=>k[y].success),E=w.reduce((k,$)=>k+$,0)/w.length;return E===0?[0,y]:[l*p+a*E,y]}).sort((v,y)=>y[0]-v[0]);r(h.map(([,v])=>i[v])),await tb(e),f()};f()}class Az extends fe{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro"})}}var Eu=null;typeof WebSocket<"u"?Eu=WebSocket:typeof MozWebSocket<"u"?Eu=MozWebSocket:typeof global<"u"?Eu=global.WebSocket||global.MozWebSocket:typeof window<"u"?Eu=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(Eu=self.WebSocket||self.MozWebSocket);const N9=Eu;function _z(t,{errorInstance:e,timeout:r,signal:n}){return new Promise((s,i)=>{(async()=>{let o;try{const a=new AbortController;r>0&&(o=setTimeout(()=>{n?a.abort():i(e)},r)),s(await t({signal:a==null?void 0:a.signal}))}catch(a){a.name==="AbortError"&&i(e),i(a)}finally{clearTimeout(o)}})()})}let R3=0;async function Uve(t,{body:e,fetchOptions:r={},timeout:n=1e4}){var a;const{headers:s,method:i,signal:o}=r;try{const l=await _z(async({signal:f})=>await fetch(t,{...r,body:Array.isArray(e)?qn(e.map(d=>({jsonrpc:"2.0",id:d.id??R3++,...d}))):qn({jsonrpc:"2.0",id:e.id??R3++,...e}),headers:{...s,"Content-Type":"application/json"},method:i||"POST",signal:o||(n>0?f:void 0)}),{errorInstance:new A3({body:e,url:t}),timeout:n,signal:!0});let c;if((a=l.headers.get("Content-Type"))!=null&&a.startsWith("application/json")?c=await l.json():c=await l.text(),!l.ok)throw new nv({body:e,details:qn(c.error)||l.statusText,headers:l.headers,status:l.status,url:t});return c}catch(l){throw l instanceof nv||l instanceof A3?l:new nv({body:e,details:l.message,url:t})}}const fE=new Map;async function uE(t){let e=fE.get(t);if(e)return e;const{schedule:r}=s4({id:t,fn:async()=>{const i=new N9(t),o=new Map,a=new Map,l=({data:f})=>{const u=JSON.parse(f),d=u.method==="eth_subscription",h=d?u.params.subscription:u.id,v=d?a:o,y=v.get(h);y&&y({data:f}),d||v.delete(h)},c=()=>{fE.delete(t),i.removeEventListener("close",c),i.removeEventListener("message",l)};return i.addEventListener("close",c),i.addEventListener("message",l),i.readyState===N9.CONNECTING&&await new Promise((f,u)=>{i&&(i.onopen=f,i.onerror=u)}),e=Object.assign(i,{requests:o,subscriptions:a}),fE.set(t,e),[e]}}),[n,[s]]=await r();return s}function zve(t,{body:e,onResponse:r}){if(t.readyState===t.CLOSED||t.readyState===t.CLOSING)throw new ive({body:e,url:t.url,details:"Socket is closed."});const n=R3++,s=({data:i})=>{var a;const o=JSON.parse(i);typeof o.id=="number"&&n!==o.id||(r==null||r(o),e.method==="eth_subscribe"&&typeof o.result=="string"&&t.subscriptions.set(o.result,s),e.method==="eth_unsubscribe"&&t.subscriptions.delete((a=e.params)==null?void 0:a[0]))};return t.requests.set(n,s),t.send(JSON.stringify({jsonrpc:"2.0",...e,id:n})),t}async function Vve(t,{body:e,timeout:r=1e4}){return _z(()=>new Promise(n=>dd.webSocket(t,{body:e,onResponse:n})),{errorInstance:new A3({body:e,url:t.url}),timeout:r})}const dd={http:Uve,webSocket:zve,webSocketAsync:Vve};function qve(t,e={}){const{batch:r,fetchOptions:n,key:s="http",name:i="HTTP JSON-RPC",retryDelay:o}=e;return({chain:a,retryCount:l,timeout:c})=>{const{batchSize:f=1e3,wait:u=0}=typeof r=="object"?r:{},d=e.retryCount??l,h=c??e.timeout??1e4,v=t||(a==null?void 0:a.rpcUrls.default.http[0]);if(!v)throw new Az;return Aw({key:s,name:i,async request({method:y,params:g}){const b={method:y,params:g},{schedule:p}=s4({id:`${t}`,wait:u,shouldSplitBatch($){return $.length>f},fn:$=>dd.http(v,{body:$,fetchOptions:n,timeout:h})}),w=async $=>r?p($):[await dd.http(v,{body:$,fetchOptions:n,timeout:h})],[{error:E,result:k}]=await w(b);if(E)throw new X$({body:b,error:E,url:v});return k},retryCount:d,retryDelay:o,timeout:h,type:"http"},{url:t})}}function c4(t,e){var n,s,i;if(!(t instanceof fe))return!1;const r=t.walk(o=>o instanceof $3);return r instanceof $3?!!(((n=r.data)==null?void 0:n.errorName)==="ResolverNotFound"||((s=r.data)==null?void 0:s.errorName)==="ResolverWildcardNotSupported"||(i=r.reason)!=null&&i.includes("Wildcard on non-extended resolvers is not supported")||e==="reverse"&&r.reason===mz[50]):!1}function Pz(t){if(t.length!==66||t.indexOf("[")!==0||t.indexOf("]")!==65)return null;const e=`0x${t.slice(1,65)}`;return Ro(e)?e:null}function Ap(t){let e=new Uint8Array(32).fill(0);if(!t)return iy(e);const r=t.split(".");for(let n=r.length-1;n>=0;n-=1){const s=Pz(r[n]),i=s?bf(s):ns(oa(r[n]),"bytes");e=ns(ya([e,i]),"bytes")}return iy(e)}function Wve(t){return`[${t.slice(2)}]`}function Hve(t){const e=new Uint8Array(32).fill(0);return t?Pz(t)||ns(oa(t)):iy(e)}function _w(t){const e=t.replace(/^\.|\.$/gm,"");if(e.length===0)return new Uint8Array(1);const r=new Uint8Array(oa(e).byteLength+2);let n=0;const s=e.split(".");for(let i=0;i255&&(o=oa(Wve(Hve(s[i])))),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 Gve(t,{blockNumber:e,blockTag:r,coinType:n,name:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=fc({abi:I9,functionName:"addr",...n!=null?{args:[Ap(s),BigInt(n)]}:{args:[Ap(s)]}}),l=await Wl(t,{address:o,abi:Ez,functionName:"resolve",args:[Pa(_w(s)),a],blockNumber:e,blockTag:r});if(l[0]==="0x")return null;const c=Ah({abi:I9,args:n!=null?[Ap(s),BigInt(n)]:void 0,functionName:"addr",data:l[0]});return c==="0x"||fd(c)==="0x00"?null:c}catch(a){if(c4(a,"resolve"))return null;throw a}}class Kve extends fe{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 d1 extends fe{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"EnsAvatarInvalidNftUriError"})}}class f4 extends fe{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 Qve extends fe{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 Yve=/(?https?:\/\/[^\/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,Jve=/^(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\-.]+))?(?\/.*)?$/,Xve=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,Zve=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function eye(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 L9(t,e){return t?t.endsWith("/")?t.slice(0,-1):t:e}function Tz({uri:t,gatewayUrls:e}){const r=Xve.test(t);if(r)return{uri:t,isOnChain:!0,isEncoded:r};const n=L9(e==null?void 0:e.ipfs,"https://ipfs.io"),s=L9(e==null?void 0:e.arweave,"https://arweave.net"),i=t.match(Yve),{protocol:o,subpath:a,target:l,subtarget:c=""}=(i==null?void 0:i.groups)||{},f=o==="ipns:/"||a==="ipns/",u=o==="ipfs:/"||a==="ipfs/"||Jve.test(t);if(t.startsWith("http")&&!f&&!u){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((f||u)&&l)return{uri:`${n}/${f?"ipns":"ipfs"}/${l}${c}`,isOnChain:!1,isEncoded:!1};if(o==="ar:/"&&l)return{uri:`${s}/${l}${c||""}`,isOnChain:!1,isEncoded:!1};let d=t.replace(Zve,"");if(d.startsWith("s.json());return await u4({gatewayUrls:t,uri:Rz(r)})}catch{throw new f4({uri:e})}}async function u4({gatewayUrls:t,uri:e}){const{uri:r,isOnChain:n}=Tz({uri:e,gatewayUrls:t});if(n||await eye(r))return r;throw new f4({uri:e})}function rye(t){let e=t;e.startsWith("did:nft:")&&(e=e.replace("did:nft:","").replace(/_/g,"/"));const[r,n,s]=e.split("/"),[i,o]=r.split(":"),[a,l]=n.split(":");if(!i||i.toLowerCase()!=="eip155")throw new d1({reason:"Only EIP-155 supported"});if(!o)throw new d1({reason:"Chain ID not found"});if(!l)throw new d1({reason:"Contract address not found"});if(!s)throw new d1({reason:"Token ID not found"});if(!a)throw new d1({reason:"ERC namespace not found"});return{chainID:parseInt(o),namespace:a.toLowerCase(),contractAddress:l,tokenID:s}}async function nye(t,{nft:e}){if(e.namespace==="erc721")return Wl(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 Wl(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 Qve({namespace:e.namespace})}async function sye(t,{gatewayUrls:e,record:r}){return/eip155:/i.test(r)?iye(t,{gatewayUrls:e,record:r}):u4({uri:r,gatewayUrls:e})}async function iye(t,{gatewayUrls:e,record:r}){const n=rye(r),s=await nye(t,{nft:n}),{uri:i,isOnChain:o,isEncoded:a}=Tz({uri:s,gatewayUrls:e});if(o&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){const c=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(c);return u4({uri:Rz(f),gatewayUrls:e})}let l=n.tokenID;return n.namespace==="erc1155"&&(l=l.replace("0x","").padStart(64,"0")),tye({gatewayUrls:e,uri:i.replace(/(?:0x)?{id}/,l)})}async function Iz(t,{blockNumber:e,blockTag:r,name:n,key:s,universalResolverAddress:i}){let o=i;if(!o){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");o=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}try{const a=await Wl(t,{address:o,abi:Ez,functionName:"resolve",args:[Pa(_w(n)),fc({abi:R9,functionName:"text",args:[Ap(n),s]})],blockNumber:e,blockTag:r});if(a[0]==="0x")return null;const l=Ah({abi:R9,functionName:"text",data:a[0]});return l===""?null:l}catch(a){if(c4(a,"resolve"))return null;throw a}}async function oye(t,{blockNumber:e,blockTag:r,gatewayUrls:n,name:s,universalResolverAddress:i}){const o=await Iz(t,{blockNumber:e,blockTag:r,key:"avatar",name:s,universalResolverAddress:i});if(!o)return null;try{return await sye(t,{record:o,gatewayUrls:n})}catch{return null}}async function aye(t,{address:e,blockNumber:r,blockTag:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ch({blockNumber:r,chain:t.chain,contract:"ensUniversalResolver"})}const o=`${e.toLowerCase().substring(2)}.addr.reverse`;try{return(await Wl(t,{address:i,abi:bve,functionName:"reverse",args:[Pa(_w(o))],blockNumber:r,blockTag:n}))[0]}catch(a){if(c4(a,"reverse"))return null;throw a}}async function lye(t,{blockNumber:e,blockTag:r,name:n,universalResolverAddress:s}){let i=s;if(!i){if(!t.chain)throw new Error("client chain not configured. universalResolverAddress is required.");i=Ch({blockNumber:e,chain:t.chain,contract:"ensUniversalResolver"})}const[o]=await Wl(t,{address:i,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[Pa(_w(n))],blockNumber:e,blockTag:r});return o}async function cye(t){const e=xw(t,{method:"eth_newBlockFilter"}),r=await t.request({method:"eth_newBlockFilter"});return{id:r,request:e(r),type:"block"}}async function Oz(t,{address:e,args:r,event:n,events:s,fromBlock:i,strict:o,toBlock:a}={}){const l=s??(n?[n]:void 0),c=xw(t,{method:"eth_newFilter"});let f=[];l&&(f=[l.flatMap(d=>m0({abi:[d],eventName:d.name,args:r}))],n&&(f=f[0]));const u=await t.request({method:"eth_newFilter",params:[{address:e,fromBlock:typeof i=="bigint"?We(i):i,toBlock:typeof a=="bigint"?We(a):a,...f.length?{topics:f}:{}}]});return{abi:l,args:r,eventName:n?n.name:void 0,fromBlock:i,id:u,request:c(u),strict:o,toBlock:a,type:"event"}}async function Mz(t){const e=xw(t,{method:"eth_newPendingTransactionFilter"}),r=await t.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:e(r),type:"transaction"}}async function fye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r?We(r):void 0,i=await t.request({method:"eth_getBalance",params:[e,s||n]});return BigInt(i)}async function uye(t,{blockHash:e,blockNumber:r,blockTag:n="latest"}={}){const s=r!==void 0?We(r):void 0;let i;return e?i=await t.request({method:"eth_getBlockTransactionCountByHash",params:[e]}):i=await t.request({method:"eth_getBlockTransactionCountByNumber",params:[s||n]}),Vn(i)}async function dye(t,{address:e,blockNumber:r,blockTag:n="latest"}){const s=r!==void 0?We(r):void 0,i=await t.request({method:"eth_getCode",params:[e,s||n]});if(i!=="0x")return i}function hye(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 vye(t,{blockCount:e,blockNumber:r,blockTag:n="latest",rewardPercentiles:s}){const i=r?We(r):void 0,o=await t.request({method:"eth_feeHistory",params:[We(e),i||n,s]});return hye(o)}async function yye(t,{filter:e}){const r=e.strict??!1;return(await e.request({method:"eth_getFilterLogs",params:[e.id]})).map(s=>{var i;try{const{eventName:o,args:a}="abi"in e&&e.abi?b0({abi:e.abi,data:s.data,topics:s.topics,strict:r}):{eventName:void 0,args:void 0};return zi(s,{args:a,eventName:o})}catch(o){let a,l;if(o instanceof wf||o instanceof Sh){if("strict"in e&&e.strict)return;a=o.abiItem.name,l=(i=o.abiItem.inputs)==null?void 0:i.some(c=>!("name"in c&&c.name))}return zi(s,{args:l?[]:{},eventName:a})}}).filter(Boolean)}async function mye(t,{address:e,blockNumber:r,blockTag:n="latest",slot:s}){const i=r!==void 0?We(r):void 0;return await t.request({method:"eth_getStorageAt",params:[e,s,i||n]})}async function d4(t,{blockHash:e,blockNumber:r,blockTag:n,hash:s,index:i}){var f,u,d;const o=n||"latest",a=r!==void 0?We(r):void 0;let l=null;if(s?l=await t.request({method:"eth_getTransactionByHash",params:[s]}):e?l=await t.request({method:"eth_getTransactionByBlockHashAndIndex",params:[e,We(i)]}):(a||o)&&(l=await t.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[a||o,We(i)]})),!l)throw new tz({blockHash:e,blockNumber:r,blockTag:o,hash:s,index:i});return(((d=(u=(f=t.chain)==null?void 0:f.formatters)==null?void 0:u.transaction)==null?void 0:d.format)||XU)(l)}async function pye(t,{hash:e,transactionReceipt:r}){const[n,s]=await Promise.all([w0(t),e?d4(t,{hash:e}):void 0]),i=(r==null?void 0:r.blockNumber)||(s==null?void 0:s.blockNumber);return i?n-i+1n:0n}async function I3(t,{hash:e}){var s,i,o;const r=await t.request({method:"eth_getTransactionReceipt",params:[e]});if(!r)throw new rz({hash:e});return(((o=(i=(s=t.chain)==null?void 0:s.formatters)==null?void 0:i.transactionReceipt)==null?void 0:o.format)||Mhe)(r)}async function gye(t,e){var y;const{allowFailure:r=!0,batchSize:n,blockNumber:s,blockTag:i,contracts:o,multicallAddress:a}=e,l=n??(typeof((y=t.batch)==null?void 0:y.multicall)=="object"&&t.batch.multicall.batchSize||1024);let c=a;if(!c){if(!t.chain)throw new Error("client chain not configured. multicallAddress is required.");c=Ch({blockNumber:s,chain:t.chain,contract:"multicall3"})}const f=[[]];let u=0,d=0;for(let g=0;g0&&d>l&&f[u].length>0&&(u++,d=(k.length-2)/2,f[u]=[]),f[u]=[...f[u],{allowFailure:!0,callData:k,target:p}]}catch(k){const $=wy(k,{abi:b,address:p,args:w,docsPath:"/docs/contract/multicall",functionName:E});if(!r)throw $;f[u]=[...f[u],{allowFailure:!0,callData:"0x",target:p}]}}const h=await Promise.allSettled(f.map(g=>Wl(t,{abi:P3,address:c,args:[g],blockNumber:s,blockTag:i,functionName:"aggregate3"}))),v=[];for(let g=0;g"u"?{}:t,i={EIP712Domain:Bz({domain:s}),...n};Fz({domain:s,message:e,primaryType:r,types:i});const o=["0x1901"];return s&&o.push(Cye({domain:s,types:i})),r!=="EIP712Domain"&&o.push(Dz({data:e,primaryType:r,types:i})),ns(ya(o))}function Cye({domain:t,types:e}){return Dz({data:t,primaryType:"EIP712Domain",types:e})}function Dz({data:t,primaryType:e,types:r}){const n=Nz({data:t,primaryType:e,types:r});return ns(n)}function Nz({data:t,primaryType:e,types:r}){const n=[{type:"bytes32"}],s=[Eye({primaryType:e,types:r})];for(const i of r[e]){const[o,a]=jz({types:r,name:i.name,type:i.type,value:t[i.name]});n.push(o),s.push(a)}return v0(n,s)}function Eye({primaryType:t,types:e}){const r=Pa(Sye({primaryType:t,types:e}));return ns(r)}function Sye({primaryType:t,types:e}){let r="";const n=Lz({primaryType:t,types:e});n.delete(t);const s=[t,...Array.from(n).sort()];for(const i of s)r+=`${i}(${e[i].map(({name:o,type:a})=>`${a} ${o}`).join(",")})`;return r}function Lz({primaryType:t,types:e},r=new Set){const n=t.match(/^\w*/u),s=n==null?void 0:n[0];if(r.has(s)||e[s]===void 0)return r;r.add(s);for(const i of e[s])Lz({primaryType:i.type,types:e},r);return r}function jz({types:t,name:e,type:r,value:n}){if(t[r]!==void 0)return[{type:"bytes32"},ns(Nz({data:n,primaryType:r,types:t}))];if(r==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},ns(n)];if(r==="string")return[{type:"bytes32"},ns(Pa(n))];if(r.lastIndexOf("]")===r.length-1){const s=r.slice(0,r.lastIndexOf("[")),i=n.map(o=>jz({name:e,type:s,types:t,value:o}));return[{type:"bytes32"},ns(v0(i.map(([o])=>o),i.map(([,o])=>o)))]}return[{type:r},n]}function Fz({domain:t,message:e,primaryType:r,types:n}){const s=n,i=(o,a)=>{for(const l of o){const{name:c,type:f}=l,u=f,d=a[c],h=u.match(wye);if(h&&(typeof d=="number"||typeof d=="bigint")){const[g,b,p]=h;We(d,{signed:b==="int",size:parseInt(p)/8})}if(u==="address"&&typeof d=="string"&&!Bd(d))throw new oy({address:d});const v=u.match(bye);if(v){const[g,b]=v;if(b&&Gr(d)!==parseInt(b))throw new s1e({expectedSize:parseInt(b),givenSize:Gr(d)})}const y=s[u];y&&i(y,d)}};if(s.EIP712Domain&&t&&i(s.EIP712Domain,t),r!=="EIP712Domain"){const o=s[r];i(o,e)}}function Bz({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 dE="/docs/contract/encodeDeployData";function Uz({abi:t,args:e,bytecode:r}){if(!e||e.length===0)return r;const n=t.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new Jhe({docsPath:dE});if(!("inputs"in n))throw new C9({docsPath:dE});if(!n.inputs||n.inputs.length===0)throw new C9({docsPath:dE});const s=v0(n.inputs,e);return B$([r,s])}function kye(t,e){const r=(()=>typeof t=="string"?oa(t):t.raw instanceof Uint8Array?t.raw:bf(t.raw))(),n=oa(`Ethereum Signed Message: +${r.length}`);return ns(ya([n,r]),e)}const $ye="0x60806040523480156200001157600080fd5b50604051620007003803806200070083398101604081905262000034916200056f565b6000620000438484846200004f565b9050806000526001601ff35b600080846001600160a01b0316803b806020016040519081016040528181526000908060200190933c90507f6492649264926492649264926492649264926492649264926492649264926492620000a68462000451565b036200021f57600060608085806020019051810190620000c79190620005ce565b8651929550909350915060000362000192576000836001600160a01b031683604051620000f5919062000643565b6000604051808303816000865af19150503d806000811462000134576040519150601f19603f3d011682016040523d82523d6000602084013e62000139565b606091505b5050905080620001905760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b505b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90620001c4908b90869060040162000661565b602060405180830381865afa158015620001e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020891906200069d565b6001600160e01b031916149450505050506200044a565b805115620002b157604051630b135d3f60e11b808252906001600160a01b03871690631626ba7e9062000259908890889060040162000661565b602060405180830381865afa15801562000277573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029d91906200069d565b6001600160e01b031916149150506200044a565b8251604114620003195760405162461bcd60e51b815260206004820152603a6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e677468000000000000606482015260840162000187565b620003236200046b565b506020830151604080850151855186939260009185919081106200034b576200034b620006c9565b016020015160f81c9050601b81148015906200036b57508060ff16601c14155b15620003cf5760405162461bcd60e51b815260206004820152603b6024820152600080516020620006e083398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c75650000000000606482015260840162000187565b6040805160008152602081018083528a905260ff83169181019190915260608101849052608081018390526001600160a01b038a169060019060a0016020604051602081039080840390855afa1580156200042e573d6000803e3d6000fd5b505050602060405103516001600160a01b031614955050505050505b9392505050565b60006020825110156200046357600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b03811681146200049f57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004d5578181015183820152602001620004bb565b50506000910152565b600082601f830112620004f057600080fd5b81516001600160401b03808211156200050d576200050d620004a2565b604051601f8301601f19908116603f01168101908282118183101715620005385762000538620004a2565b816040528381528660208588010111156200055257600080fd5b62000565846020830160208901620004b8565b9695505050505050565b6000806000606084860312156200058557600080fd5b8351620005928162000489565b6020850151604086015191945092506001600160401b03811115620005b657600080fd5b620005c486828701620004de565b9150509250925092565b600080600060608486031215620005e457600080fd5b8351620005f18162000489565b60208501519093506001600160401b03808211156200060f57600080fd5b6200061d87838801620004de565b935060408601519150808211156200063457600080fd5b50620005c486828701620004de565b6000825162000657818460208701620004b8565b9190910192915050565b828152604060208201526000825180604084015262000688816060850160208701620004b8565b601f01601f1916919091016060019392505050565b600060208284031215620006b057600080fd5b81516001600160e01b0319811681146200044a57600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572";/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */BigInt(0);BigInt(1);BigInt(2);function Aye(t,e){if(t.length!==e.length)return!1;for(let r=0;r{const u=qn(["watchBlockNumber",t.uid,e,r,o]);return _h(u,{onBlockNumber:n,onError:s},d=>g0(async()=>{var h;try{const v=await w0(t,{cacheTime:0});if(l){if(v===l)return;if(v-l>1&&r)for(let y=l+1n;yl)&&(d.onBlockNumber(v,l),l=v)}catch(v){(h=d.onError)==null||h.call(d,v)}},{emitOnBegin:e,interval:o}))})():(()=>{let u=!0,d=()=>u=!1;return(async()=>{try{const{unsubscribe:h}=await t.transport.subscribe({params:["newHeads"],onData(v){var g;if(!u)return;const y=vw((g=v.result)==null?void 0:g.number);n(y,l),l=y},onError(v){s==null||s(v)}});d=h,u||d()}catch(h){s==null||s(h)}})(),d})()}async function Rye(t,{confirmations:e=1,hash:r,onReplaced:n,pollingInterval:s=t.pollingInterval,timeout:i}){const o=qn(["waitForTransactionReceipt",t.uid,r]);let a,l,c,f=!1;return new Promise((u,d)=>{i&&setTimeout(()=>d(new Vhe({hash:r})),i);const h=_h(o,{onReplaced:n,resolve:u,reject:d},v=>{const y=Vz(t,{emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:s,async onBlockNumber(g){if(f)return;let b=g;const p=w=>{y(),w(),h()};try{if(c){if(b-c.blockNumber+1nv.resolve(c));return}if(a||(f=!0,await kz(async()=>{a=await d4(t,{hash:r}),a.blockNumber&&(b=a.blockNumber)},{delay:({count:w})=>~~(1<0&&b-c.blockNumber+1nv.resolve(c))}catch(w){if(a&&(w instanceof tz||w instanceof rz))try{l=a;const k=(await ql(t,{blockNumber:b,includeTransactions:!0})).transactions.find(({from:x,nonce:T})=>x===l.from&&T===l.nonce);if(!k||(c=await I3(t,{hash:k.hash}),b-c.blockNumber+1n{var x;(x=v.onReplaced)==null||x.call(v,{reason:$,replacedTransaction:l,transaction:k,transactionReceipt:c}),v.resolve(c)})}catch(E){p(()=>v.reject(E))}else p(()=>v.reject(w))}}})})})}function Iye(t,{blockTag:e="latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:s,onError:i,includeTransactions:o,poll:a,pollingInterval:l=t.pollingInterval}){const c=typeof a<"u"?a:t.transport.type!=="webSocket",f=o??!1;let u;return c?(()=>{const v=qn(["watchBlocks",t.uid,r,n,f,l]);return _h(v,{onBlock:s,onError:i},y=>g0(async()=>{var g;try{const b=await ql(t,{blockTag:e,includeTransactions:f});if(b.number&&(u!=null&&u.number)){if(b.number===u.number)return;if(b.number-u.number>1&&r)for(let p=(u==null?void 0:u.number)+1n;pu.number)&&(y.onBlock(b,u),u=b)}catch(b){(g=y.onError)==null||g.call(y,b)}},{emitOnBegin:n,interval:l}))})():(()=>{let v=!0,y=()=>v=!1;return(async()=>{try{const{unsubscribe:g}=await t.transport.subscribe({params:["newHeads"],onData(b){var E,k,$;if(!v)return;const w=((($=(k=(E=t.chain)==null?void 0:E.formatters)==null?void 0:k.block)==null?void 0:$.format)||ZU)(b.result);s(w,u),u=w},onError(b){i==null||i(b)}});y=g,v||y()}catch(g){i==null||i(g)}})(),y})()}function Oye(t,{address:e,args:r,batch:n=!0,event:s,events:i,onError:o,onLogs:a,poll:l,pollingInterval:c=t.pollingInterval,strict:f}){const u=typeof l<"u"?l:t.transport.type!=="webSocket",d=f??!1;return u?(()=>{const y=qn(["watchEvent",e,r,n,t.uid,s,c]);return _h(y,{onLogs:a,onError:o},g=>{let b,p,w=!1;const E=g0(async()=>{var k;if(!w){try{p=await Oz(t,{address:e,args:r,event:s,events:i,strict:d})}catch{}w=!0;return}try{let $;if(p)$=await kw(t,{filter:p});else{const x=await w0(t);b&&b!==x?$=await i4(t,{address:e,args:r,event:s,events:i,fromBlock:b+1n,toBlock:x}):$=[],b=x}if($.length===0)return;n?g.onLogs($):$.forEach(x=>g.onLogs([x]))}catch($){p&&$ instanceof xf&&(w=!1),(k=g.onError)==null||k.call(g,$)}},{emitOnBegin:!0,interval:c});return async()=>{p&&await $w(t,{filter:p}),E()}})})():(()=>{let y=!0,g=()=>y=!1;return(async()=>{try{const b=i??(s?[s]:void 0);let p=[];b&&(p=[b.flatMap(E=>m0({abi:[E],eventName:E.name,args:r}))],s&&(p=p[0]));const{unsubscribe:w}=await t.transport.subscribe({params:["logs",{address:e,topics:p}],onData(E){var $;if(!y)return;const k=E.result;try{const{eventName:x,args:T}=b0({abi:b,data:k.data,topics:k.topics,strict:d}),B=zi(k,{args:T,eventName:x});a([B])}catch(x){let T,B;if(x instanceof wf||x instanceof Sh){if(f)return;T=x.abiItem.name,B=($=x.abiItem.inputs)==null?void 0:$.some(U=>!("name"in U&&U.name))}const L=zi(k,{args:B?[]:{},eventName:T});a([L])}},onError(E){o==null||o(E)}});g=w,y||g()}catch(b){o==null||o(b)}})(),g})()}function Mye(t,{batch:e=!0,onError:r,onTransactions:n,poll:s,pollingInterval:i=t.pollingInterval}){return(typeof s<"u"?s:t.transport.type!=="webSocket")?(()=>{const c=qn(["watchPendingTransactions",t.uid,e,i]);return _h(c,{onTransactions:n,onError:r},f=>{let u;const d=g0(async()=>{var h;try{if(!u)try{u=await Mz(t);return}catch(y){throw d(),y}const v=await kw(t,{filter:u});if(v.length===0)return;e?f.onTransactions(v):v.forEach(y=>f.onTransactions([y]))}catch(v){(h=f.onError)==null||h.call(f,v)}},{emitOnBegin:!0,interval:i});return async()=>{u&&await $w(t,{filter:u}),d()}})})():(()=>{let c=!0,f=()=>c=!1;return(async()=>{try{const{unsubscribe:u}=await t.transport.subscribe({params:["newPendingTransactions"],onData(d){if(!c)return;const h=d.result;n([h])},onError(d){r==null||r(d)}});f=u,c||f()}catch(u){r==null||r(u)}})(),f})()}function Dye(t){return{call:e=>Sw(t,e),createBlockFilter:()=>cye(t),createContractEventFilter:e=>yz(t,e),createEventFilter:e=>Oz(t,e),createPendingTransactionFilter:()=>Mz(t),estimateContractGas:e=>mve(t,e),estimateGas:e=>n4(t,e),getBalance:e=>fye(t,e),getBlock:e=>ql(t,e),getBlockNumber:e=>w0(t,e),getBlockTransactionCount:e=>uye(t,e),getBytecode:e=>dye(t,e),getChainId:()=>xy(t),getEnsAddress:e=>Gve(t,e),getEnsAvatar:e=>oye(t,e),getEnsName:e=>aye(t,e),getEnsResolver:e=>lye(t,e),getEnsText:e=>Iz(t,e),getFeeHistory:e=>vye(t,e),estimateFeesPerGas:e=>yve(t,e),getFilterChanges:e=>kw(t,e),getFilterLogs:e=>yye(t,e),getGasPrice:()=>r4(t),getLogs:e=>i4(t,e),estimateMaxPriorityFeePerGas:e=>vve(t,e),getStorageAt:e=>mye(t,e),getTransaction:e=>d4(t,e),getTransactionConfirmations:e=>pye(t,e),getTransactionCount:e=>wz(t,e),getTransactionReceipt:e=>I3(t,e),multicall:e=>gye(t,e),prepareTransactionRequest:e=>Ew(t,e),readContract:e=>Wl(t,e),sendRawTransaction:e=>o4(t,e),simulateContract:e=>$ve(t,e),verifyMessage:e=>Pye(t,e),verifyTypedData:e=>Tye(t,e),uninstallFilter:e=>$w(t,e),waitForTransactionReceipt:e=>Rye(t,e),watchBlocks:e=>Iye(t,e),watchBlockNumber:e=>Vz(t,e),watchContractEvent:e=>Mve(t,e),watchEvent:e=>Oye(t,e),watchPendingTransactions:e=>Mye(t,e)}}function j9(t){const{key:e="public",name:r="Public Client"}=t;return Sz({...t,key:e,name:r,type:"publicClient"}).extend(Dye)}function Nye(t,{abi:e,args:r,bytecode:n,...s}){const i=Uz({abi:e,args:r,bytecode:n});return a4(t,{...s,data:i})}async function Lye(t){return(await t.request({method:"eth_accounts"})).map(r=>Y$(r))}async function jye(t){return await t.request({method:"wallet_getPermissions"})}async function Fye(t){return(await t.request({method:"eth_requestAccounts"})).map(r=>Tl(r))}async function Bye(t,e){return t.request({method:"wallet_requestPermissions",params:[e]})}async function Uye(t,{account:e=t.account,message:r}){if(!e)throw new $h({docsPath:"/docs/actions/wallet/signMessage"});const n=ci(e);if(n.type==="local")return n.signMessage({message:r});const s=(()=>typeof r=="string"?j$(r):r.raw instanceof Uint8Array?Pa(r.raw):r.raw)();return t.request({method:"personal_sign",params:[s,n.address]})}async function zye(t,e){var c,f,u,d;const{account:r=t.account,chain:n=t.chain,...s}=e;if(!r)throw new $h({docsPath:"/docs/actions/wallet/signTransaction"});const i=ci(r);p0({account:i,...e});const o=await xy(t);n!==null&&HU({currentChainId:o,chain:n});const a=(n==null?void 0:n.formatters)||((c=t.chain)==null?void 0:c.formatters),l=((f=a==null?void 0:a.transactionRequest)==null?void 0:f.format)||yw;return i.type==="local"?i.signTransaction({chainId:o,...s},{serializer:(d=(u=t.chain)==null?void 0:u.serializers)==null?void 0:d.transaction}):await t.request({method:"eth_signTransaction",params:[{...l(s),chainId:We(o),from:i.address}]})}async function Vye(t,{account:e=t.account,domain:r,message:n,primaryType:s,types:i}){if(!e)throw new $h({docsPath:"/docs/actions/wallet/signTypedData"});const o=ci(e),a={EIP712Domain:Bz({domain:r}),...i};if(Fz({domain:r,message:n,primaryType:s,types:a}),o.type==="local")return o.signTypedData({domain:r,primaryType:s,types:a,message:n});const l=qn({domain:r??{},primaryType:s,types:a,message:n},(c,f)=>Ro(f)?f.toLowerCase():f);return t.request({method:"eth_signTypedData_v4",params:[o.address,l]})}async function qye(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:We(e)}]})}async function Wye(t,e){return await t.request({method:"wallet_watchAsset",params:e})}function Hye(t){return{addChain:e=>Lve(t,e),deployContract:e=>Nye(t,e),getAddresses:()=>Lye(t),getChainId:()=>xy(t),getPermissions:()=>jye(t),prepareTransactionRequest:e=>Ew(t,e),requestAddresses:()=>Fye(t),requestPermissions:e=>Bye(t,e),sendRawTransaction:e=>o4(t,e),sendTransaction:e=>a4(t,e),signMessage:e=>Uye(t,e),signTransaction:e=>zye(t,e),signTypedData:e=>Vye(t,e),switchChain:e=>qye(t,e),watchAsset:e=>Wye(t,e),writeContract:e=>Nve(t,e)}}function h4(t){const{key:e="wallet",name:r="Wallet Client",transport:n}=t;return Sz({...t,key:e,name:r,transport:i=>n({...i,retryCount:0}),type:"walletClient"}).extend(Hye)}function Gye(t,e={}){const{key:r="webSocket",name:n="WebSocket JSON-RPC",retryDelay:s}=e;return({chain:i,retryCount:o,timeout:a})=>{var u;const l=e.retryCount??o,c=a??e.timeout??1e4,f=t||((u=i==null?void 0:i.rpcUrls.default.webSocket)==null?void 0:u[0]);if(!f)throw new Az;return Aw({key:r,name:n,async request({method:d,params:h}){const v={method:d,params:h},y=await uE(f),{error:g,result:b}=await dd.webSocketAsync(y,{body:v,timeout:c});if(g)throw new X$({body:v,error:g,url:f});return b},retryCount:l,retryDelay:s,timeout:c,type:"webSocket"},{getSocket(){return uE(f)},async subscribe({params:d,onData:h,onError:v}){const y=await uE(f),{result:g}=await new Promise((b,p)=>dd.webSocket(y,{body:{method:"eth_subscribe",params:d},onResponse(w){if(w.error){p(w.error),v==null||v(w.error);return}if(typeof w.id=="number"){b(w);return}w.method==="eth_subscription"&&h(w.params)}}));return{subscriptionId:g,async unsubscribe(){return new Promise(b=>dd.webSocket(y,{body:{method:"eth_unsubscribe",params:[g]},onResponse:b}))}}}})}}function Kye(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 s=1;for(const o of t.providers){let a=e(o);a||(a=`Unknown Wallet #${s}`,s+=1),n.add(a)}const i=[...n];return i.length?i:i[0]??"Injected"}return e(t)??"Injected"}var _p,qz=class extends V${constructor({chains:t,options:e}={}){const r={shimDisconnect:!0,getProvider(){if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers[0]:s},...e};super({chains:t,options:r}),ar(this,"id","injected"),ar(this,"name"),ar(this,"ready"),ps(this,_p,void 0),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ar(this,"onAccountsChanged",s=>{s.length===0?this.emit("disconnect"):this.emit("change",{account:Tl(s[0])})}),ar(this,"onChainChanged",s=>{const i=x9(s),o=this.isChainUnsupported(i);this.emit("change",{chain:{id:i,unsupported:o}})}),ar(this,"onDisconnect",async s=>{var i;s.code===1013&&await this.getProvider()&&await this.getAccount()||(this.emit("disconnect"),this.options.shimDisconnect&&((i=this.storage)==null||i.removeItem(this.shimDisconnectKey)))});const n=r.getProvider();if(typeof r.name=="string")this.name=r.name;else if(n){const s=Kye(n);r.name?this.name=r.name(s):typeof s=="string"?this.name=s:this.name=s[0]}else this.name="Injected";this.ready=!!n}async connect({chainId:t}={}){var e;try{const r=await this.getProvider();if(!r)throw new sl;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"}),s=Tl(n[0]);let i=await this.getChainId(),o=this.isChainUnsupported(i);return t&&i!==t&&(i=(await this.switchChain(t)).id,o=this.isChainUnsupported(i)),this.options.shimDisconnect&&((e=this.storage)==null||e.setItem(this.shimDisconnectKey,!0)),{account:s,chain:{id:i,unsupported:o}}}catch(r){throw this.isUserRejectedRequestError(r)?new Sn(r):r.code===-32002?new zl(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 sl;const e=await t.request({method:"eth_accounts"});return Tl(e[0])}async getChainId(){const t=await this.getProvider();if(!t)throw new sl;return t.request({method:"eth_chainId"}).then(x9)}async getProvider(){const t=this.options.getProvider();return t&&pw(this,_p,t),er(this,_p)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider(),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return h4({account:r,chain:n,transport:l4(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 sl;return!!await this.getAccount()}catch{return!1}}async switchChain(t){var n,s,i;const e=await this.getProvider();if(!e)throw new sl;const r=We(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(l=>l.id===t);if(!a)throw new Qhe({chainId:t,connectorId:this.id});if(o.code===4902||((s=(n=o==null?void 0:o.data)==null?void 0:n.originalError)==null?void 0:s.code)===4902)try{if(await e.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:a.name,nativeCurrency:a.nativeCurrency,rpcUrls:[((i=a.rpcUrls.public)==null?void 0:i.http[0])??""],blockExplorerUrls:this.getBlockExplorerUrls(a)}]}),await this.getChainId()!==t)throw new Sn(new Error("User rejected switch after adding network."));return a}catch(l){throw new Sn(l)}throw this.isUserRejectedRequestError(o)?new Sn(o):new Vl(o)}}async watchAsset({address:t,decimals:e=18,image:r,symbol:n}){const s=await this.getProvider();if(!s)throw new sl;return s.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:t,decimals:e,image:r,symbol:n}}})}isUserRejectedRequestError(t){return t.code===4001}};_p=new WeakMap;var v4=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},hE=(t,e,r)=>(v4(t,e,"read from private field"),r?r.call(t):e.get(t)),vE=(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)},$m=(t,e,r,n)=>(v4(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),Qye=(t,e,r)=>(v4(t,e,"access private method"),r);const Yye=t=>(e,r,n)=>{const s=n.subscribe;return n.subscribe=(o,a,l)=>{let c=o;if(a){const f=(l==null?void 0:l.equalityFn)||Object.is;let u=o(n.getState());c=d=>{const h=o(d);if(!f(u,h)){const v=u;a(u=h,v)}},l!=null&&l.fireImmediately&&a(u,u)}return s(c)},t(e,r,n)},Jye=Yye;function Xye(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var i;const o=l=>l===null?null:JSON.parse(l,e==null?void 0:e.reviver),a=(i=r.getItem(s))!=null?i:null;return a instanceof Promise?a.then(o):o(a)},setItem:(s,i)=>r.setItem(s,JSON.stringify(i,e==null?void 0:e.replacer)),removeItem:s=>r.removeItem(s)}}const Cy=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Cy(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Cy(n)(r)}}}},Zye=(t,e)=>(r,n,s)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},o=!1;const a=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...g)},n,s);const f=Cy(i.serialize),u=()=>{const g=i.partialize({...n()});let b;const p=f({state:g,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{b=w});if(b)throw b;return p},d=s.setState;s.setState=(g,b)=>{d(g,b),u()};const h=t((...g)=>{r(...g),u()},n,s);let v;const y=()=>{var g;if(!c)return;o=!1,a.forEach(p=>p(n()));const b=((g=i.onRehydrateStorage)==null?void 0:g.call(i,n()))||void 0;return Cy(c.getItem.bind(c))(i.name).then(p=>{if(p)return i.deserialize(p)}).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var w;return v=i.merge(p,(w=n())!=null?w:h),r(v,!0),u()}).then(()=>{b==null||b(v,void 0),o=!0,l.forEach(p=>p(v))}).catch(p=>{b==null||b(void 0,p)})};return s.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},y(),v||h},e0e=(t,e)=>(r,n,s)=>{let i={storage:Xye(()=>localStorage),partialize:y=>y,version:0,merge:(y,g)=>({...g,...y}),...e},o=!1;const a=new Set,l=new Set;let c=i.storage;if(!c)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,s);const f=()=>{const y=i.partialize({...n()});return c.setItem(i.name,{state:y,version:i.version})},u=s.setState;s.setState=(y,g)=>{u(y,g),f()};const d=t((...y)=>{r(...y),f()},n,s);let h;const v=()=>{var y,g;if(!c)return;o=!1,a.forEach(p=>{var w;return p((w=n())!=null?w:d)});const b=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(y=n())!=null?y:d))||void 0;return Cy(c.getItem.bind(c))(i.name).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==i.version){if(i.migrate)return i.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var w;return h=i.merge(p,(w=n())!=null?w:d),r(h,!0),f()}).then(()=>{b==null||b(h,void 0),h=n(),o=!0,l.forEach(p=>p(h))}).catch(p=>{b==null||b(void 0,p)})};return s.persist={setOptions:y=>{i={...i,...y},y.storage&&(c=y.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>o,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},i.skipHydration||v(),h||d},t0e=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?Zye(t,e):e0e(t,e),r0e=t0e,F9=t=>{let e;const r=new Set,n=(l,c)=>{const f=typeof l=="function"?l(e):l;if(!Object.is(f,e)){const u=e;e=c??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,u))}},s=()=>e,a={setState:n,getState:s,subscribe:l=>(r.add(l),()=>r.delete(l)),destroy:()=>{r.clear()}};return e=t(n,s,a),a},n0e=t=>t?F9(t):F9;function y4(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,s]of t)if(!Object.is(s,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;ny===u.id)||(l=[...l,v.chain]),c[u.id]=[...c[u.id]||[],...v.rpcUrls.http],v.rpcUrls.webSocket&&(f[u.id]=[...f[u.id]||[],...v.rpcUrls.webSocket]))}if(!d)throw new Error([`Could not find valid provider configuration for chain "${u.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:l,publicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=c[d.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${d.id}"`);const v=FR({batch:r,chain:d,transport:NR(h.map(y=>Zge(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})},webSocketPublicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=f[d.id];if(!h||!h[0])return;const v=FR({batch:r,chain:d,transport:NR(h.map(y=>r2e(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})}}}var v2e=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},y2e=class extends Error{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function G3(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(!G3(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 s=Object.keys(t);if(r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(i&&!G3(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}var K3=(t,{find:e,replace:r})=>t&&e(t)?r(t):typeof t!="object"?t:Array.isArray(t)?t.map(n=>K3(n,{find:e,replace:r})):t instanceof Object?Object.entries(t).reduce((n,[s,i])=>({...n,[s]:K3(i,{find:e,replace:r})}),{}):t;function m2e(t){const e=JSON.parse(t);return K3(e,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function UR(t,e){return t.slice(0,e).join(".")||"."}function zR(t,e){const{length:r}=t;for(let n=0;n{const o=typeof i=="bigint"?`#bigint.${i.toString()}`:i;return(e==null?void 0:e(s,o))||o},n),r??void 0)}var Eq={getItem:t=>"",setItem:(t,e)=>null,removeItem:t=>null};function Sq({deserialize:t=m2e,key:e="wagmi",serialize:r=g2e,storage:n}){return{...n,getItem:(s,i=null)=>{const o=n.getItem(`${e}.${s}`);try{return o?t(o):i}catch(a){return console.warn(a),i}},setItem:(s,i)=>{if(i===null)n.removeItem(`${e}.${s}`);else try{n.setItem(`${e}.${s}`,r(i))}catch(o){console.error(o)}},removeItem:s=>n.removeItem(`${e}.${s}`)}}var VR="store",$u,M1,Q3,kq,b2e=class{constructor({autoConnect:e=!1,connectors:r=[new Cq],publicClient:n,storage:s=Sq({storage:typeof window<"u"?window.localStorage:Eq}),logger:i={warn:console.warn},webSocketPublicClient:o}){var f,u;TE(this,Q3),this.publicClients=new Map,this.webSocketPublicClients=new Map,TE(this,$u,void 0),TE(this,M1,void 0),this.args={autoConnect:e,connectors:r,logger:i,publicClient:n,storage:s,webSocketPublicClient:o};let a="disconnected",l;if(e)try{const d=s.getItem(VR),h=(f=d==null?void 0:d.state)==null?void 0:f.data;a=h!=null&&h.account?"reconnecting":"connecting",l=(u=h==null?void 0:h.chain)==null?void 0:u.id}catch{}const c=typeof r=="function"?r():r;c.forEach(d=>d.setStorage(s)),this.store=d2e(o2e(u2e(()=>({connectors:c,publicClient:this.getPublicClient({chainId:l}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})}),{name:VR,storage:s,partialize:d=>{var h,v;return{...e&&{data:{account:(h=d==null?void 0:d.data)==null?void 0:h.account,chain:(v=d==null?void 0:d.data)==null?void 0:v.chain}},chains:d==null?void 0:d.chains}},version:2}))),this.storage=s,Mm(this,M1,s==null?void 0:s.getItem("wallet")),s2e(this,Q3,kq).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)),Mm(this,$u,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(PE(this,$u))return;Mm(this,$u,!0),this.setState(n=>{var s;return{...n,status:(s=n.data)!=null&&s.account?"reconnecting":"connecting"}});const e=PE(this,M1)?[...this.connectors].sort(n=>n.id===PE(this,M1)?-1:1):this.connectors;let r=!1;for(const n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;const i=await n.connect();this.setState(o=>({...o,connector:n,chains:n==null?void 0:n.chains,data:i,status:"connected"})),r=!0;break}return r||this.setState(n=>({...n,data:void 0,status:"disconnected"})),Mm(this,$u,!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,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(i=>({...i,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,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(i=>({...i,webSocketPublicClient:this.getWebSocketPublicClient({chainId:r})}))}setLastUsedConnector(e=null){var r;(r=this.storage)==null||r.setItem("wallet",e)}};$u=new WeakMap;M1=new WeakMap;Q3=new WeakSet;kq=function(){const t=a=>{this.setState(l=>({...l,data:{...l.data,...a}}))},e=()=>{this.clearState()},r=a=>{this.setState(l=>({...l,error:a}))};this.store.subscribe(({connector:a})=>a,(a,l)=>{var c,f,u,d,h,v;(c=l==null?void 0:l.off)==null||c.call(l,"change",t),(f=l==null?void 0:l.off)==null||f.call(l,"disconnect",e),(u=l==null?void 0:l.off)==null||u.call(l,"error",r),a&&((d=a.on)==null||d.call(a,"change",t),(h=a.on)==null||h.call(a,"disconnect",e),(v=a.on)==null||v.call(a,"error",r))});const{publicClient:n,webSocketPublicClient:s}=this.args;(typeof n=="function"||typeof s=="function")&&this.store.subscribe(({data:a})=>{var l;return(l=a==null?void 0:a.chain)==null?void 0:l.id},a=>{this.setState(l=>({...l,publicClient:this.getPublicClient({chainId:a}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:a})}))})};var Y3;function w2e(t){const e=new b2e(t);return Y3=e,e}function si(){if(!Y3)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return Y3}async function x2e({chainId:t,connector:e}){const r=si(),n=r.connector;if(n&&e.id===n.id)throw new v2e;try{r.setState(i=>({...i,status:"connecting"}));const s=await e.connect({chainId:t});return r.setLastUsedConnector(e.id),r.setState(i=>({...i,connector:e,chains:e==null?void 0:e.chains,data:s,status:"connected"})),r.storage.setItem("connected",!0),{...s,connector:e}}catch(s){throw r.setState(i=>({...i,status:i.connector?"connected":"disconnected"})),s}}async function C2e(){const t=si();t.connector&&await t.connector.disconnect(),t.clearState(),t.storage.removeItem("connected")}function J3({chainId:t}={}){const e=si();return t&&e.getPublicClient({chainId:t})||e.publicClient}async function $q({chainId:t}={}){var n,s;return await((s=(n=si().connector)==null?void 0:n.getWalletClient)==null?void 0:s.call(n,{chainId:t}))||null}function E2e(t,e){const r=si(),n=async()=>e(J3(t));return r.subscribe(({publicClient:i})=>i,n)}function S2e({chainId:t},e){const r=si(),n=async({chainId:i})=>{if(t&&i&&t!==i)return;const o=await $q({chainId:t});return si().connector?e(o):e(null)};return r.subscribe(({data:i,connector:o})=>{var a;return{account:i==null?void 0:i.account,chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,connector:o}},n,{equalityFn:D4})}function Aq(){const{data:t,connector:e,status:r}=si();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 _q(){var s,i,o,a;const t=si(),e=(i=(s=t.data)==null?void 0:s.chain)==null?void 0:i.id,r=t.chains??[],n=[...((o=t.publicClient)==null?void 0:o.chains)||[],...r].find(l=>l.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 k2e({chainId:t}){const{connector:e}=si();if(!e)throw new nl;if(!e.switchChain)throw new y2e({connector:e});return e.switchChain(t)}function $2e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Aq());return r.subscribe(({data:i,connector:o,status:a})=>e({address:i==null?void 0:i.account,connector:o,status:a}),n,{equalityFn:D4})}function A2e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(_q());return r.subscribe(({data:i,chains:o})=>{var a;return e({chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,chains:o})},n,{equalityFn:D4})}var _2e={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}}},P2e={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}}},yb={},T2e={get exports(){return yb},set exports(t){yb=t}},Pq={};/** +`))}return{chains:l,publicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=c[d.id];if(!h||!h[0])throw new Error(`No providers configured for chain "${d.id}"`);const v=j9({batch:r,chain:d,transport:D9(h.map(y=>qve(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})},webSocketPublicClient:({chainId:u})=>{const d=l.find(y=>y.id===u)??t[0],h=f[d.id];if(!h||!h[0])return;const v=j9({batch:r,chain:d,transport:D9(h.map(y=>Gye(y,{timeout:a})),{rank:s,retryCount:i,retryDelay:o}),pollingInterval:n});return Object.assign(v,{chains:l})}}}var i0e=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},o0e=class extends Error{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),this.name="SwitchChainNotSupportedError"}};function O3(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(!O3(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 s=Object.keys(t);if(r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(i&&!O3(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}var M3=(t,{find:e,replace:r})=>t&&e(t)?r(t):typeof t!="object"?t:Array.isArray(t)?t.map(n=>M3(n,{find:e,replace:r})):t instanceof Object?Object.entries(t).reduce((n,[s,i])=>({...n,[s]:M3(i,{find:e,replace:r})}),{}):t;function a0e(t){const e=JSON.parse(t);return M3(e,{find:n=>typeof n=="string"&&n.startsWith("#bigint."),replace:n=>BigInt(n.replace("#bigint.",""))})}function B9(t,e){return t.slice(0,e).join(".")||"."}function U9(t,e){const{length:r}=t;for(let n=0;n{const o=typeof i=="bigint"?`#bigint.${i.toString()}`:i;return(e==null?void 0:e(s,o))||o},n),r??void 0)}var Wz={getItem:t=>"",setItem:(t,e)=>null,removeItem:t=>null};function Hz({deserialize:t=a0e,key:e="wagmi",serialize:r=c0e,storage:n}){return{...n,getItem:(s,i=null)=>{const o=n.getItem(`${e}.${s}`);try{return o?t(o):i}catch(a){return console.warn(a),i}},setItem:(s,i)=>{if(i===null)n.removeItem(`${e}.${s}`);else try{n.setItem(`${e}.${s}`,r(i))}catch(o){console.error(o)}},removeItem:s=>n.removeItem(`${e}.${s}`)}}var z9="store",Su,D1,D3,Gz,f0e=class{constructor({autoConnect:e=!1,connectors:r=[new qz],publicClient:n,storage:s=Hz({storage:typeof window<"u"?window.localStorage:Wz}),logger:i={warn:console.warn},webSocketPublicClient:o}){var f,u;vE(this,D3),this.publicClients=new Map,this.webSocketPublicClients=new Map,vE(this,Su,void 0),vE(this,D1,void 0),this.args={autoConnect:e,connectors:r,logger:i,publicClient:n,storage:s,webSocketPublicClient:o};let a="disconnected",l;if(e)try{const d=s.getItem(z9),h=(f=d==null?void 0:d.state)==null?void 0:f.data;a=h!=null&&h.account?"reconnecting":"connecting",l=(u=h==null?void 0:h.chain)==null?void 0:u.id}catch{}const c=typeof r=="function"?r():r;c.forEach(d=>d.setStorage(s)),this.store=n0e(Jye(r0e(()=>({connectors:c,publicClient:this.getPublicClient({chainId:l}),status:a,webSocketPublicClient:this.getWebSocketPublicClient({chainId:l})}),{name:z9,storage:s,partialize:d=>{var h,v;return{...e&&{data:{account:(h=d==null?void 0:d.data)==null?void 0:h.account,chain:(v=d==null?void 0:d.data)==null?void 0:v.chain}},chains:d==null?void 0:d.chains}},version:2}))),this.storage=s,$m(this,D1,s==null?void 0:s.getItem("wallet")),Qye(this,D3,Gz).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)),$m(this,Su,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(hE(this,Su))return;$m(this,Su,!0),this.setState(n=>{var s;return{...n,status:(s=n.data)!=null&&s.account?"reconnecting":"connecting"}});const e=hE(this,D1)?[...this.connectors].sort(n=>n.id===hE(this,D1)?-1:1):this.connectors;let r=!1;for(const n of e){if(!n.ready||!n.isAuthorized||!await n.isAuthorized())continue;const i=await n.connect();this.setState(o=>({...o,connector:n,chains:n==null?void 0:n.chains,data:i,status:"connected"})),r=!0;break}return r||this.setState(n=>({...n,data:void 0,status:"disconnected"})),$m(this,Su,!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,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,publicClient:e},this.publicClients.clear(),this.setState(i=>({...i,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,s;const r=(s=(n=this.data)==null?void 0:n.chain)==null?void 0:s.id;this.args={...this.args,webSocketPublicClient:e},this.webSocketPublicClients.clear(),this.setState(i=>({...i,webSocketPublicClient:this.getWebSocketPublicClient({chainId:r})}))}setLastUsedConnector(e=null){var r;(r=this.storage)==null||r.setItem("wallet",e)}};Su=new WeakMap;D1=new WeakMap;D3=new WeakSet;Gz=function(){const t=a=>{this.setState(l=>({...l,data:{...l.data,...a}}))},e=()=>{this.clearState()},r=a=>{this.setState(l=>({...l,error:a}))};this.store.subscribe(({connector:a})=>a,(a,l)=>{var c,f,u,d,h,v;(c=l==null?void 0:l.off)==null||c.call(l,"change",t),(f=l==null?void 0:l.off)==null||f.call(l,"disconnect",e),(u=l==null?void 0:l.off)==null||u.call(l,"error",r),a&&((d=a.on)==null||d.call(a,"change",t),(h=a.on)==null||h.call(a,"disconnect",e),(v=a.on)==null||v.call(a,"error",r))});const{publicClient:n,webSocketPublicClient:s}=this.args;(typeof n=="function"||typeof s=="function")&&this.store.subscribe(({data:a})=>{var l;return(l=a==null?void 0:a.chain)==null?void 0:l.id},a=>{this.setState(l=>({...l,publicClient:this.getPublicClient({chainId:a}),webSocketPublicClient:this.getWebSocketPublicClient({chainId:a})}))})};var N3;function u0e(t){const e=new f0e(t);return N3=e,e}function si(){if(!N3)throw new Error("No wagmi config found. Ensure you have set up a config: https://wagmi.sh/react/config");return N3}async function d0e({chainId:t,connector:e}){const r=si(),n=r.connector;if(n&&e.id===n.id)throw new i0e;try{r.setState(i=>({...i,status:"connecting"}));const s=await e.connect({chainId:t});return r.setLastUsedConnector(e.id),r.setState(i=>({...i,connector:e,chains:e==null?void 0:e.chains,data:s,status:"connected"})),r.storage.setItem("connected",!0),{...s,connector:e}}catch(s){throw r.setState(i=>({...i,status:i.connector?"connected":"disconnected"})),s}}async function h0e(){const t=si();t.connector&&await t.connector.disconnect(),t.clearState(),t.storage.removeItem("connected")}function L3({chainId:t}={}){const e=si();return t&&e.getPublicClient({chainId:t})||e.publicClient}async function Kz({chainId:t}={}){var n,s;return await((s=(n=si().connector)==null?void 0:n.getWalletClient)==null?void 0:s.call(n,{chainId:t}))||null}function v0e(t,e){const r=si(),n=async()=>e(L3(t));return r.subscribe(({publicClient:i})=>i,n)}function y0e({chainId:t},e){const r=si(),n=async({chainId:i})=>{if(t&&i&&t!==i)return;const o=await Kz({chainId:t});return si().connector?e(o):e(null)};return r.subscribe(({data:i,connector:o})=>{var a;return{account:i==null?void 0:i.account,chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,connector:o}},n,{equalityFn:y4})}function Qz(){const{data:t,connector:e,status:r}=si();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 Yz(){var s,i,o,a;const t=si(),e=(i=(s=t.data)==null?void 0:s.chain)==null?void 0:i.id,r=t.chains??[],n=[...((o=t.publicClient)==null?void 0:o.chains)||[],...r].find(l=>l.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 m0e({chainId:t}){const{connector:e}=si();if(!e)throw new sl;if(!e.switchChain)throw new o0e({connector:e});return e.switchChain(t)}function p0e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Qz());return r.subscribe(({data:i,connector:o,status:a})=>e({address:i==null?void 0:i.account,connector:o,status:a}),n,{equalityFn:y4})}function g0e(t,{selector:e=r=>r}={}){const r=si(),n=()=>t(Yz());return r.subscribe(({data:i,chains:o})=>{var a;return e({chainId:(a=i==null?void 0:i.chain)==null?void 0:a.id,chains:o})},n,{equalityFn:y4})}var b0e={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}}},w0e={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}}},rb={},x0e={get exports(){return rb},set exports(t){rb=t}},Jz={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -154,32 +144,42 @@ ${r.length}`);return rs(wa([n,r]),e)}const Dbe="0x608060405234801562000011576000 * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Lw=m,R2e=Vd;function I2e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var O2e=typeof Object.is=="function"?Object.is:I2e,M2e=R2e.useSyncExternalStore,D2e=Lw.useRef,N2e=Lw.useEffect,L2e=Lw.useMemo,j2e=Lw.useDebugValue;Pq.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var i=D2e(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=L2e(function(){function l(h){if(!c){if(c=!0,f=h,h=n(h),s!==void 0&&o.hasValue){var v=o.value;if(s(v,h))return u=v}return u=h}if(v=u,O2e(f,h))return v;var y=n(h);return s!==void 0&&s(v,y)?v:(f=h,u=y)}var c=!1,f,u,d=r===void 0?null:r;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,r,n,s]);var a=M2e(t,i[0],i[1]);return N2e(function(){o.hasValue=!0,o.value=a},[a]),j2e(a),a};(function(t){t.exports=Pq})(T2e);function F2e({queryClient:t=new W0e({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:e=Sq({storage:typeof window<"u"&&window.localStorage?window.localStorage:Eq}),persister:r=typeof window<"u"?T0e({key:"cache",storage:e,serialize:s=>s,deserialize:s=>s}):void 0,...n}){const s=w2e({...n,storage:e});return r&&Sme({queryClient:t,persister:r,dehydrateOptions:{shouldDehydrateQuery:i=>i.cacheTime!==0&&i.queryKey[0].persist!==!1}}),Object.assign(s,{queryClient:t})}var Tq=m.createContext(void 0),jw=m.createContext(void 0);function B2e({children:t,config:e}){return m.createElement(Tq.Provider,{children:m.createElement(hme,{children:t,client:e.queryClient,context:jw}),value:e})}function Fw(){const t=m.useContext(Tq);if(!t)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` -`));return t}var U2e=Vd.useSyncExternalStore;function z2e(t){return Array.isArray(t)}function V2e(t){if(!qR(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!qR(r)||!r.hasOwnProperty("isPrototypeOf"))}function qR(t){return Object.prototype.toString.call(t)==="[object Object]"}function q2e(t,e,r){return z2e(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function W2e(t){return JSON.stringify(t,(e,r)=>V2e(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):typeof r=="bigint"?r.toString():r)}function H2e(t,e){return typeof t=="function"?t(...e):!!t}function G2e(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 K2e(t,e){const r=n4({context:t.context}),n=vme(),s=pme(),i=r.defaultQueryOptions({...t,queryKeyHashFn:W2e});i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=br.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=br.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=br.batchCalls(i.onSettled)),i.suspense&&typeof i.staleTime!="number"&&(i.staleTime=1e3),(i.suspense||i.useErrorBoundary)&&(s.isReset()||(i.retryOnMount=!1));const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(U2e(m.useCallback(u=>n?()=>{}:o.subscribe(br.batchCalls(u)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{s.clearReset()},[s]),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),i.suspense&&a.isLoading&&a.isFetching&&!n)throw o.fetchOptimistic(i).then(({data:u})=>{var d,h;(d=i.onSuccess)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,u,null)}).catch(u=>{var d,h;s.clearReset(),(d=i.onError)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,void 0,u)});if(a.isError&&!s.isReset()&&!a.isFetching&&H2e(i.useErrorBoundary,[a.error,o.getCurrentQuery()]))throw a.error;const l=a.status==="loading"&&a.fetchStatus==="idle"?"idle":a.status,c=l==="idle",f=l==="loading"&&a.fetchStatus==="fetching";return{...a,defaultedOptions:i,isIdle:c,isLoading:f,observer:o,status:l}}function N4(t,e,r){const n=fV(t,e,r);return bme({context:jw,...n})}function Q2e(t,e,r){const n=q2e(t,e,r),s=K2e({context:jw,...n},H0e),i={data:s.data,error:s.error,fetchStatus:s.fetchStatus,isError:s.isError,isFetched:s.isFetched,isFetchedAfterMount:s.isFetchedAfterMount,isFetching:s.isFetching,isIdle:s.isIdle,isLoading:s.isLoading,isRefetching:s.isRefetching,isSuccess:s.isSuccess,refetch:s.refetch,status:s.status,internal:{dataUpdatedAt:s.dataUpdatedAt,errorUpdatedAt:s.errorUpdatedAt,failureCount:s.failureCount,isFetchedAfterMount:s.isFetchedAfterMount,isLoadingError:s.isLoadingError,isPaused:s.isPaused,isPlaceholderData:s.isPlaceholderData,isPreviousData:s.isPreviousData,isRefetchError:s.isRefetchError,isStale:s.isStale,remove:s.remove}};return s.defaultedOptions.notifyOnChangeProps?i:G2e(i,s.observer)}var Y2e=()=>n4({context:jw});function Rq({chainId:t}={}){return yb.useSyncExternalStoreWithSelector(e=>E2e({chainId:t},e),()=>J3({chainId:t}),()=>J3({chainId:t}),e=>e,(e,r)=>e.uid===r.uid)}function RE({chainId:t}){return[{entity:"walletClient",chainId:t,persist:!1}]}function J2e({queryKey:[{chainId:t}]}){return $q({chainId:t})}function L4({chainId:t,suspense:e,onError:r,onSettled:n,onSuccess:s}={}){const{connector:i}=Pn(),o=j4({chainId:t}),a=Q2e(RE({chainId:o}),J2e,{cacheTime:0,enabled:Boolean(i),staleTime:1/0,suspense:e,onError:r,onSettled:n,onSuccess:s}),l=Y2e();return m.useEffect(()=>S2e({chainId:o},f=>{f?l.invalidateQueries(RE({chainId:o})):l.removeQueries(RE({chainId:o}))}),[l,o]),a}function j4({chainId:t}={}){return Rq({chainId:t}).chain.id}function X2e(){const[,t]=m.useReducer(e=>e+1,0);return t}var IE=t=>typeof t=="object"&&!Array.isArray(t);function Iq(t,e,r=e,n=G3){const s=m.useRef([]),i=yb.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(IE(o)&&IE(a)&&s.current.length){for(const l of s.current)if(!n(o[l],a[l]))return!1;return!0}return n(o,a)});if(IE(i)){const o={...i};return Object.defineProperties(o,Object.entries(o).reduce((a,[l,c])=>({...a,[l]:{configurable:!1,enumerable:!0,get:()=>(s.current.includes(l)||s.current.push(l),c)}}),{})),o}return i}function Pn({onConnect:t,onDisconnect:e}={}){const r=Fw(),n=m.useCallback(a=>$2e(a),[r]),s=Iq(n,Aq),i=m.useRef(),o=i.current;return m.useEffect(()=>{(o==null?void 0:o.status)!=="connected"&&s.status==="connected"&&(t==null||t({address:s.address,connector:s.connector,isReconnected:(o==null?void 0:o.status)==="reconnecting"||(o==null?void 0:o.status)===void 0})),(o==null?void 0:o.status)==="connected"&&s.status==="disconnected"&&(e==null||e()),i.current=s},[t,e,o,s]),s}var Z2e=t=>[{entity:"connect",...t}],ewe=t=>{const{connector:e,chainId:r}=t;if(!e)throw new Error("connector is required");return x2e({connector:e,chainId:r})};function Oq({chainId:t,connector:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){const o=Fw(),{data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,mutate:h,mutateAsync:v,reset:y,status:b,variables:p}=N4(Z2e({connector:e,chainId:t}),ewe,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),g=m.useCallback(E=>h({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,h]),w=m.useCallback(E=>v({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,v]);return{connect:g,connectAsync:w,connectors:o.connectors,data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,pendingConnector:p==null?void 0:p.connector,reset:y,status:b,variables:p}}var twe=[{entity:"disconnect"}],rwe=()=>C2e();function Mq({onError:t,onMutate:e,onSettled:r,onSuccess:n}={}){const{error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,mutate:c,mutateAsync:f,reset:u,status:d}=N4(twe,rwe,{...t?{onError(h,v,y){t(h,y)}}:{},onMutate:e,...r?{onSettled(h,v,y,b){r(v,b)}}:{},...n?{onSuccess(h,v,y){n(y)}}:{}});return{disconnect:c,disconnectAsync:f,error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,reset:u,status:d}}function F4(){const t=Fw(),e=m.useCallback(r=>A2e(r),[t]);return Iq(e,_q)}var nwe=t=>[{entity:"switchNetwork",...t}],swe=t=>{const{chainId:e}=t;if(!e)throw new Error("chainId is required");return k2e({chainId:e})};function Dq({chainId:t,throwForSwitchChainNotSupported:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){var T;const o=Fw(),a=X2e(),{data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,mutate:v,mutateAsync:y,reset:b,status:p,variables:g}=N4(nwe({chainId:t}),swe,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),w=m.useCallback(j=>v({chainId:j??t}),[t,v]),E=m.useCallback(j=>y({chainId:j??t}),[t,y]);m.useEffect(()=>o.subscribe(({chains:F,connector:U})=>({chains:F,connector:U}),a),[o,a]);let k,$;const C=!!((T=o.connector)!=null&&T.switchChain);return(e||C)&&(k=w,$=E),{chains:o.chains??[],data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,pendingChainId:g==null?void 0:g.chainId,reset:b,status:p,switchNetwork:k,switchNetworkAsync:$,variables:g}}const iwe=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var owe=Object.freeze({__proto__:null,abi:iwe});const awe=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],lwe={isValidSignatureBytes32:"0x1626ba7e"};var cwe=Object.freeze({__proto__:null,abi:awe,returns:lwe});const fwe=[{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 uwe=Object.freeze({__proto__:null,abi:fwe});const dwe=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var hwe=Object.freeze({__proto__:null,abi:dwe});const vwe=[{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 ywe=Object.freeze({__proto__:null,abi:vwe});const mwe=[{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 pwe=Object.freeze({__proto__:null,abi:mwe});const gwe=[{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 bwe=Object.freeze({__proto__:null,abi:gwe});const wwe=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var xwe=Object.freeze({__proto__:null,abi:wwe});const $n={erc6492:uwe,erc5719:owe,erc1271:cwe,factory:hwe,mainModule:ywe,mainModuleUpgradable:pwe,sequenceUtils:bwe,requireFreshSigner:xwe},Cwe=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:$n},Symbol.toStringTag,{value:"Module"}));function mb(){return mb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),be({},n)).then(s=>we(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),be({},n)).then(s=>we(s).then(i=>({data:i.data}))),this.getAuthToken=(n,s)=>this.fetch(this.url("GetAuthToken"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,s)=>this.fetch(this.url("SendPasswordlessLink"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.friendList=(n,s)=>this.fetch(this.url("FriendList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,s)=>this.fetch(this.url("GetFriendByAddress"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,s)=>this.fetch(this.url("SearchFriends"),be(n,s)).then(i=>we(i).then(o=>({friends:o.friends}))),this.addFriend=(n,s)=>this.fetch(this.url("AddFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,s)=>this.fetch(this.url("UpdateFriendNickname"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,s)=>this.fetch(this.url("RemoveFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.contractCall=(n,s)=>this.fetch(this.url("ContractCall"),be(n,s)).then(i=>we(i).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,s)=>this.fetch(this.url("DecodeContractCall"),be(n,s)).then(i=>we(i).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,s)=>this.fetch(this.url("LookupContractCallSelectors"),be(n,s)).then(i=>we(i).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,s)=>this.fetch(this.url("UserStorageFetch"),be(n,s)).then(i=>we(i).then(o=>({object:o.object}))),this.userStorageSave=(n,s)=>this.fetch(this.url("UserStorageSave"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,s)=>this.fetch(this.url("UserStorageDelete"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,s)=>this.fetch(this.url("UserStorageFetchAll"),be(n,s)).then(i=>we(i).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,s)=>this.fetch(this.url("GetMoonpayLink"),be(n,s)).then(i=>we(i).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),be({},n)).then(s=>we(s).then(i=>({token:i.token}))),this.isUsingGoogleMail=(n,s)=>this.fetch(this.url("IsUsingGoogleMail"),be(n,s)).then(i=>we(i).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,s)=>this.fetch(this.url("ResolveENSAddress"),be(n,s)).then(i=>we(i).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,s)=>this.fetch(this.url("IsValidSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,s)=>this.fetch(this.url("IsValidMessageSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,s)=>this.fetch(this.url("IsValidTypedDataSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,s)=>this.fetch(this.url("IsValidETHAuthProof"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,s)=>this.fetch(this.url("GetCoinPrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,s)=>this.fetch(this.url("GetCollectiblePrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,s)=>this.fetch(this.url("GetExchangeRate"),be(n,s)).then(i=>we(i).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,s)=>this.fetch(this.url("MemoryStore"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.memoryLoad=(n,s)=>this.fetch(this.url("MemoryLoad"),be(n,s)).then(i=>we(i).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),be({},n)).then(s=>we(s).then(i=>({payCards:i.payCards}))),this.savePayCard=(n,s)=>this.fetch(this.url("SavePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,s)=>this.fetch(this.url("UpdatePayCardCVC"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.deletePayCard=(n,s)=>this.fetch(this.url("DeletePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,s)=>this.fetch(this.url("SmartRampQuote"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,s)=>this.fetch(this.url("SmartRampPurchase"),be(n,s)).then(i=>we(i).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,s)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),be(n,s)).then(i=>we(i).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,s)=>this.fetch(this.url("SmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,s)=>this.fetch(this.url("SmartRampOrdersList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,s)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),be(n,s)).then(i=>we(i).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,s)=>this.fetch(this.url("AdminSmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),be(n,s)).then(i=>we(i).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),be(n,s)).then(i=>we(i).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),be({},n)).then(s=>we(s).then(i=>({inviteInfo:i.inviteInfo}))),this.isValidAccessCode=(n,s)=>this.fetch(this.url("IsValidAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,s)=>this.fetch(this.url("InternalClaimAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.walletRecover=(n,s)=>this.fetch(this.url("WalletRecover"),be(n,s)).then(i=>we(i).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,s)=>this.fetch(this.url("BlockNumberAtTime"),be(n,s)).then(i=>we(i).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,s)=>this.fetch(this.url("PaperSessionSecret"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,s)=>this.fetch(this.url("PaperSessionSecret2"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const be=(t={},e={})=>({method:"POST",headers:mb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),we=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}),WR=typeof global=="object"?global.fetch:window.fetch;class yd extends Nq{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,WR),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=mb({},s.headers,i),WR(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const Pwe=Object.freeze(Object.defineProperty({__proto__:null,API:Nq,SequenceAPIClient:yd,SmartRampOrderStatus:$we,SmartRampTxnStatus:Awe,SortOrder:_we,WebRPCSchemaHash:kwe,WebRPCSchemaVersion:Swe,WebRPCVersion:Ewe},Symbol.toStringTag,{value:"Module"})),Lq="3.7.5",Twe=Lq,Rwe=typeof atob=="function",Iwe=typeof btoa=="function",Mh=typeof Buffer=="function",HR=typeof TextDecoder=="function"?new TextDecoder:void 0,GR=typeof TextEncoder=="function"?new TextEncoder:void 0,Owe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",D1=Array.prototype.slice.call(Owe),Dm=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(D1),Mwe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ln=String.fromCharCode.bind(String),KR=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),jq=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Fq=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Bq=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=D1[e>>18&63]+D1[e>>12&63]+D1[e>>6&63]+D1[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},B4=Iwe?t=>btoa(t):Mh?t=>Buffer.from(t,"binary").toString("base64"):Bq,X3=Mh?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?jq(X3(t)):X3(t),Dwe=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?ln(192|e>>>6)+ln(128|e&63):ln(224|e>>>12&15)+ln(128|e>>>6&63)+ln(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return ln(240|e>>>18&7)+ln(128|e>>>12&63)+ln(128|e>>>6&63)+ln(128|e&63)}},Nwe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Uq=t=>t.replace(Nwe,Dwe),QR=Mh?t=>Buffer.from(t,"utf8").toString("base64"):GR?t=>X3(GR.encode(t)):t=>B4(Uq(t)),md=(t,e=!1)=>e?jq(QR(t)):QR(t),YR=t=>md(t,!0),Lwe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jwe=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 ln((r>>>10)+55296)+ln((r&1023)+56320);case 3:return ln((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return ln((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},zq=t=>t.replace(Lwe,jwe),Vq=t=>{if(t=t.replace(/\s+/g,""),!Mwe.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?ln(e>>16&255,e>>8&255):ln(e>>16&255,e>>8&255,e&255);return r},U4=Rwe?t=>atob(Fq(t)):Mh?t=>Buffer.from(t,"base64").toString("binary"):Vq,qq=Mh?t=>KR(Buffer.from(t,"base64")):t=>KR(U4(t).split("").map(e=>e.charCodeAt(0))),Wq=t=>qq(Hq(t)),Fwe=Mh?t=>Buffer.from(t,"base64").toString("utf8"):HR?t=>HR.decode(qq(t)):t=>zq(U4(t)),Hq=t=>Fq(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),Z3=t=>Fwe(Hq(t)),Bwe=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)},Gq=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Kq=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,Gq(r));t("fromBase64",function(){return Z3(this)}),t("toBase64",function(e){return md(this,e)}),t("toBase64URI",function(){return md(this,!0)}),t("toBase64URL",function(){return md(this,!0)}),t("toUint8Array",function(){return Wq(this)})},Qq=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,Gq(r));t("toBase64",function(e){return Np(this,e)}),t("toBase64URI",function(){return Np(this,!0)}),t("toBase64URL",function(){return Np(this,!0)})},Uwe=()=>{Kq(),Qq()},Af={version:Lq,VERSION:Twe,atob:U4,atobPolyfill:Vq,btoa:B4,btoaPolyfill:Bq,fromBase64:Z3,toBase64:md,encode:md,encodeURI:YR,encodeURL:YR,utob:Uq,btou:zq,decode:Z3,isValid:Bwe,fromUint8Array:Np,toUint8Array:Wq,extendString:Kq,extendUint8Array:Qq,extendBuiltins:Uwe};var eS=function(){return eS=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),Vwe=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}},qwe=function(t,e,r){return Fc(void 0,void 0,void 0,function(){var n,s;return Bc(this,function(i){return n=r.messageDigest(),s=tB(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},Wwe=function(t,e,r){return Fc(void 0,void 0,void 0,function(){var n,s,i,o,a;return Bc(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=l.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new gh(r.address,i,t),[4,o.isValidSignature(n,ne(r.signature))];case 2:return a=l.sent(),a===Hwe?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},Hwe="0x1626ba7e",Yq="1",tS="eth",Gwe={name:"ETHAuth",version:Yq},Ry=function(){function t(){for(var e=[],r=0;r0&&(l+="."+s.extra),[2,l]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),Fc(n,void 0,void 0,function(){var o,a,l,c,f,u,d,h,v,y;return Bc(this,function(b){switch(b.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==tS)throw new Error("ethauth: not an ethauth proof");return d=Af.decode(c),h=JSON.parse(d),v=new Bw({address:l,claims:h,signature:f,extra:u}),[4,this.validateProof(v,i)];case 1:if(y=b.sent(),!y)throw new Error("ethauth: proof is invalid");return[2,v]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),Fc(n,void 0,void 0,function(){var o,a;return Bc(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return Fc(n,void 0,void 0,function(){var i,l,o,a,l;return Bc(this,function(c){switch(c.label){case 0:i=[],l=0,c.label=1;case 1:if(!(lAf.encode(t,!0),z4=t=>Af.encode(JSON.stringify(t),!0),Qwe=t=>{if(t!=null)return Af.decode(t)},V4=t=>{if(t!=null)return JSON.parse(Af.decode(t))};function Jq(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||_a(t))}const q4=t=>ne(Ue(typeof t=="string"?xt(t):t)),Xq=(t,e,r)=>He(["string","uint256","address","bytes32"],["",e,t,r]),rS=(t,e,r)=>Ue(Xq(t,e,r)),Zq=()=>typeof window>"u"&&typeof process=="object",Ywe=()=>!Zq(),eW=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(Af.decode(e[1]))};function pb(){return pb=Object.assign?Object.assign.bind():function(t){for(var e=1;exe.configure(t),Iy=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let Xwe=class{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,Zwe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function Zwe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function W4(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function exe(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function txe(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const H4=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),rW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},nW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},sW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},rxe=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),iW=t=>{const e=pb({},t.types);return delete e.EIP712Domain,Yr.hash(t.domain,e,t.message)},Uw=t=>ne(iW(t)),{defineReadOnly:nxe,getStatic:sxe,resolveProperties:ixe,checkProperties:oxe,shallowCopy:axe,deepCopy:lxe}=joe,cxe=t=>t.replace(/([^:]\/)\/+/g,"$1"),fxe=Object.freeze(Object.defineProperty({__proto__:null,Logger:tW,PromiseCache:Xwe,base64Decode:Qwe,base64DecodeObject:V4,base64Encode:Kwe,base64EncodeObject:z4,checkProperties:oxe,configureLogger:Jwe,deepCopy:lxe,defineReadOnly:nxe,encodeMessageDigest:q4,encodeTypedDataDigest:Uw,encodeTypedDataHash:iW,getDefaultConnectionInfo:Iy,getRandomInt:H4,getStatic:sxe,isBigNumberish:Jq,isBrowser:Ywe,isNode:Zq,jwtDecodeClaims:eW,logger:xe,packMessageData:Xq,promisify:W4,queryStringFromObject:exe,queryStringToObject:txe,resolveProperties:ixe,sanitizeAlphanumeric:nW,sanitizeHost:sW,sanitizeNumberString:rW,shallowCopy:axe,sleep:rxe,subDigestOf:rS,urlClean:cxe},Symbol.toStringTag,{value:"Module"}));function sr(){return sr=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:Z.from(t).toNumber(),dxe=t=>{if(t)return oW(t)},aW=(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 s=n.map(c=>c.chainId).sort(),i=s.filter((c,f)=>s.indexOf(c)!==f);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(aW(t,!0,e),t),hxe=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},vxe=(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)}},cW=t=>lW(fW(t)),Ni=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Z.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(Z.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},yxe=(t,e)=>t?t.name===e||t.chainId===e:!1,mxe=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},zw=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",Vw=t=>zw("https://${network}-indexer.sequence.app",{network:t}),uW=t=>zw("https://${network}-relayer.sequence.app",{network:t}),dW=t=>zw("https://nodes.sequence.app/${network}",{network:t});function G4(t){return Ni(Gd,t)}function hW(t){return Z.isBigNumber(t)?t:Jq(t)?Z.from(t):Z.from(t.chainId)}const Dr=t=>{const e=dW(t);return{rpcUrl:e,relayer:{url:uW(t),provider:{url:e}},indexerUrl:Vw(t)}},Gd=cW([sr({},zt[ce.POLYGON],Dr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),sr({},zt[ce.MAINNET],Dr("mainnet")),sr({},zt[ce.BSC],Dr("bsc")),sr({},zt[ce.AVALANCHE],Dr("avalanche")),sr({},zt[ce.ARBITRUM],Dr("arbitrum")),sr({},zt[ce.ARBITRUM_NOVA],Dr("arbitrum-nova")),sr({},zt[ce.OPTIMISM],Dr("optimism")),sr({},zt[ce.POLYGON_ZKEVM],Dr("polygon-zkevm")),sr({},zt[ce.GNOSIS],Dr("gnosis")),sr({},zt[ce.RINKEBY],Dr("rinkeby"),{disabled:!0}),sr({},zt[ce.GOERLI],Dr("goerli")),sr({},zt[ce.SEPOLIA],Dr("sepolia")),sr({},zt[ce.POLYGON_MUMBAI],Dr("mumbai")),sr({},zt[ce.BSC_TESTNET],Dr("bsc-testnet")),sr({},zt[ce.ARBITRUM_GOERLI],Dr("arbitrum-goerli")),sr({},zt[ce.BASE],Dr("base")),sr({},zt[ce.BASE_GOERLI],Dr("base-goerli")),sr({},zt[ce.HOMEVERSE_TESTNET],Dr("homeverse-testnet")),sr({},zt[ce.AVALANCHE_TESTNET],Dr("avalanche-testnet")),sr({},zt[ce.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),sr({},zt[ce.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Kd="2.0";class K4{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=vW(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(s){r(s,void 0)}}}const vW=(t,e)=>{if(t.length===0)return e;const r=s=>s.sendAsyncMiddleware?s.sendAsyncMiddleware:s;let n;n=r(t[t.length-1])(e);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return n};function yW(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 mW(t){return t!==void 0&&t.sendAsync!==void 0}let pxe=0;class gb{constructor(e,r){this.sendAsync=(n,s,i)=>{this.send(n.method,n.params,i||this.defaultChainId).then(o=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{s(o,void 0)})},this.defaultChainId=r,yW(e)?this.send=e.send.bind(e):mW(e)?this.send=(n,s,i)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Kd,id:++pxe,method:n,params:s},(l,c)=>{l?a(l):o(c?c.result:void 0)},i||this.defaultChainId)}):this.send=e,this.request=(n,s)=>this.send(n.method,n.params,s)}}class gxe{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(s=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:s})}).catch(s=>{n(s,void 0)})},this.send=this.sendAsync,this.provider=e}}class bxe{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=nS(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=nS(this.isAllowedFunc)}}const nS=t=>e=>(r,n,s)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,s)};class Q4{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,s,i)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,i||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){s(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}s(o,a)},i||this.defaultChainId)},this.cacheKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+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 pW{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:te(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){s(void 0,{jsonrpc:"2.0",id:o,result:[Ye(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){s(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,s,i)},this.options=e}}const gW=t=>(e,r,n)=>{t(e,(s,i)=>{if(!s&&i&&i.error)throw typeof i.error=="string"?new Error(i.error):new Error(i.error.message);r(s,i)},n)},bW=t=>(e,r,n)=>{const s=n?` chainId:${n}`:"";xe.info(`[provider request]${s} id:${e.id} method:${e.method} params:`,e.params),t(e,(i,o)=>{i?xe.warn(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"error:",i):xe.info(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(i,o)},n)},wxe=t=>e=>(r,n,s)=>{const i=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${i}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:te(i)});return}e(r,n,s)},wW=["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 xxe{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{if(wW.includes(n.method)){this.provider.sendAsync(n,s,i);return}r(n,s,i)},this.provider=e}}class Cxe{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...wW],this.sendAsyncMiddleware=r=>(n,s)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(i=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:i})}).catch(i=>s(i));return}xe.debug("[public-provider] sending request to signer window",n.method),r(n,s)},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 ga(e))}}class xW{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,s)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,s);return}const i=this.requestKey(r.method,r.params||[],s);if(!this.inflight[i])this.inflight[i]=[];else{this.inflight[i].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let s="";return n?s=`${n}:${e}:`:s=`:${e}:`,!r||r.length===0?s+"[]":s+JSON.stringify(r)},this.inflight={}}}class Exe extends ga{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return f0(this.connection,JSON.stringify(c),Sxe).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,s=r==null?void 0:r.middlewares,i=r==null?void 0:r.blockCache;this._chainId=n;const o=new K4(s??[new pW({chainId:n}),new xW,new Q4({defaultChainId:n,blockCache:i})],new gb(this.fetch,n));this._sender=new gb(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=zt[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:s}}else{const r=await this.send("eth_chainId",[]);return this._chainId=Z.from(r).toNumber(),this.getNetwork()}}}function Sxe(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 kxe=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:bxe,CachedProvider:Q4,ChainId:ce,EagerProvider:pW,JsonRpcExternalProvider:gxe,JsonRpcProvider:Exe,JsonRpcRouter:K4,JsonRpcSender:gb,JsonRpcVersion:Kd,NetworkType:ut,PublicProvider:Cxe,SigningProvider:xxe,SingleflightMiddleware:xW,allNetworks:Gd,allowProviderMiddleware:nS,checkNetworkConfig:yxe,createJsonRpcMiddlewareStack:vW,ensureUniqueNetworks:hxe,ensureValidNetworks:lW,exceptionProviderMiddleware:gW,findNetworkConfig:Ni,findSupportedNetwork:G4,getChainId:oW,indexerURL:Vw,isJsonRpcHandler:mW,isJsonRpcProvider:yW,isNetworkConfig:uxe,isValidNetworkConfig:aW,loggingProviderMiddleware:bW,maybeChainId:dxe,networkProviderMiddleware:wxe,networks:zt,networksIndex:mxe,nodesURL:dW,relayerURL:uW,sortNetworks:fW,stringTemplate:zw,toChainIdNumber:hW,updateNetworkConfig:vxe,validateAndSortNetworks:cW},Symbol.toStringTag,{value:"Module"}));function Sn(){return Sn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(J4(s))return He(["uint8","uint8","address"],[nf.Address,s.weight,s.address]);if(s.isDynamic){const i=ne(s.signature);return He(["uint8","uint8","address","uint16","bytes"],[nf.DynamicSignature,s.weight,s.address,i.length,i])}return He(["uint8","uint8","bytes"],[nf.EOASignature,s.weight,s.signature])});return He(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function AW(t,e,r){const n=k0(e),s=await Promise.all(t.signers.map(async i=>{if(J4(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!Y4(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:$0(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function cv(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=Z.from(0);const i=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=ne(l.signature);return s=s.add(a.weight),l.isDynamic||c.length!==66?Sn({},a,{isDynamic:!0,signature:l.signature,address:a.address}):Sn({},a,{isDynamic:!1,signature:l.signature})});return{encoded:X4({version:1,threshold:t.threshold,signers:i}),weight:s}}const Z4={decode:t=>$W(t),encode:t=>X4(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>AW(t,e,r),encodeSigners:(t,e,r,n)=>cv(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Z4.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 Mxe=Object.freeze({__proto__:null,SignaturePartType:nf,isAddressMember:J4,isUnrecoveredSignatureMember:SW,isUnrecoveredSignature:kW,decodeSignature:$W,encodeSignature:X4,recoverSignature:AW,encodeSigners:cv,SignatureCoder:Z4});const eA={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Ue(Hn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),He(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>Z.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:Z.from(e.weight).toNumber()})),fromSimple:t=>{if(!rr.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 s=new en([...$n.mainModule.abi,...$n.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[eA.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:Z.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:Z.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:Z.from(n.weight),address:n.address}));return{version:e.version,threshold:Z.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!rr.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,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[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=cv(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>Z.from(i).sub(o).toNumber())){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=cv(t,r,[]);if(a.gte(t.threshold))return o}return cv(t,r,[]).encoded}};var Dxe=Object.freeze({__proto__:null,ConfigCoder:eA});const _W=1,PW={version:_W,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Xo=Object.freeze({__proto__:null,config:Dxe,signature:Mxe,version:_W,DeployedWalletContext:PW});const tA="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function TW(t){return Ue(RW(t))}function RW(t){return He(["bytes32","bytes32"],[tA,t])}function IW(t){const e=ne(t);if(e.length===64&&te(e.slice(0,32))===tA)return te(e.slice(32,64))}function Nxe(t){return IW(t)!==void 0}var Lxe=Object.freeze({__proto__:null,SetImageHashPrefix:tA,hashSetImageHash:TW,messageSetImageHash:RW,decodeMessageSetImageHash:IW,isMessageSetImageHash:Nxe});let Xr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),gr=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 bb=66;function _f(t){return t.left!==void 0&&t.right!==void 0}function Dh(t){return t.tree!==void 0}function A0(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function wb(t){let e=ne(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case gr.Signature:{const i=e[0],o=te(e.slice(1,bb+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(bb+1)}break;case gr.Address:{const i=e[0],o=Ye(te(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case gr.DynamicSignature:{const i=e[0],o=Ye(te(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=te(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case gr.Node:{const i=te(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case gr.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=wb(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case gr.Subdigest:{const i=te(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case gr.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=wb(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${te(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class OW extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function sf(t,e,r){if(_f(t)){const[n,s]=await Promise.all([sf(t.left,e,r),sf(t.right,e,r)]);return{left:n,right:s}}if(Dh(t))return{weight:t.weight,threshold:t.threshold,tree:await sf(t.tree,e,r)};if(A0(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await Y4(t.address,e,t.signature,r))throw new OW(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:$0(e,t.signature),signature:t.signature,subdigest:e};return t}const pn={concat:(t,e)=>He(["bytes","bytes"],[t,e]),node:t=>He(["uint8","bytes32"],[gr.Node,t]),branch:t=>{const e=ne(t);return He(["uint8","uint24","bytes"],[gr.Branch,e.length,e])},nested:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","uint16","uint24","bytes"],[gr.Nested,t,e,n.length,n])},subdigest:t=>He(["uint8","bytes32"],[gr.Subdigest,t]),signature:(t,e)=>He(["uint8","uint8","bytes"],[gr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","address","uint24","bytes"],[gr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>He(["uint8","uint8","address"],[gr.Address,t,e])};function fv(t,e,r,n,s={}){const i=uv(t.tree,e,r,s);return Z.from(n).isZero()?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:Z.from(t.threshold).gt(255)?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:He(["uint8","uint8","uint32","bytes"],[Xr.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function uv(t,e,r,n={}){const s=!n.disableTrim;if(Vi(t)){const i=uv(t.left,e,r),o=uv(t.right,e,r),a=qn(t.left),l=qn(t.right);return s&&i.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:pn.node(bs(t)),weight:rr}:s&&o.weight.eq(0)&&!l?{encoded:pn.concat(i.encoded,pn.node(bs(t.right))),weight:i.weight}:s&&i.weight.eq(0)&&!a?{encoded:pn.concat(pn.node(bs(t.left)),pn.branch(o.encoded)),weight:o.weight}:{encoded:pn.concat(i.encoded,pn.branch(o.encoded)),weight:i.weight.add(o.weight)}}if(Oa(t)){const i=uv(t.tree,e,r);return s&&i.weight.eq(0)?{encoded:pn.node(bs(t)),weight:rr}:{encoded:pn.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(Ma(t))return{encoded:pn.node(bs(t)),weight:rr};if(Ia(t)){const i=r.includes(t.subdigest);return{encoded:pn.node(bs(t)),weight:i?tF:rr}}if(qn(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:pn.dynamicSignature(t.weight,t.address,a),weight:Z.from(t.weight)}:{encoded:pn.signature(t.weight,a),weight:Z.from(t.weight)}}else return{encoded:pn.address(t.weight,t.address),weight:rr};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function rA(t){return sA(t)?rA(t.suffix[t.suffix.length-1]):t.config}function nA(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function _0(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(nA)}function MW(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function sA(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(MW)}function qw(t){const e=ne(t),r=e[0];switch(r){case Xr.Legacy:return{version:2,type:Xr.Legacy,decoded:Lp(e)};case Xr.Dynamic:return{version:2,type:Xr.Dynamic,decoded:Lp(e.slice(1))};case Xr.NoChainIdDynamic:return{version:2,type:Xr.NoChainIdDynamic,decoded:Lp(e.slice(1))};case Xr.Chained:return DW(e);default:throw new Error(`Invalid signature type: ${r}`)}}function Lp(t){const e=ne(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=wb(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function DW(t){const e=ne(t),r=e[0];if(r!==Xr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sne(Rl(i))),s=He(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return He(["uint8","bytes"],[Xr.Chained,s])}function Rl(t){if(ha(t))return te(t);if(_0(t)||sA(t))return Ww(Rl(t),(t.suffix||[]).map(Rl));const e=nA(t)?t.decoded:t.config;switch(t.type){case Xr.Legacy:if(Z.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return sS(e);case Xr.NoChainIdDynamic:case Xr.Dynamic:return He(["uint8","bytes"],[t.type,sS(e)]);case Xr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function sS(t){return He(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,dv(t.tree)])}function dv(t){if(Vi(t)||_f(t)){const e=ne(dv(t.right)),r=ne(dv(t.left));return Vi(t.right)||_f(t.right)?He(["bytes","uint8","uint24","bytes"],[r,gr.Branch,e.length,e]):He(["bytes","bytes"],[r,e])}if(Oa(t)||Dh(t)){const e=ne(dv(t.tree));return He(["uint8","uint8","uint16","uint24","bytes"],[gr.Nested,t.weight,t.threshold,e.length,e])}if(A0(t)||qn(t)&&t.signature!==void 0){const e=ne(t.signature);if(t.isDynamic||e.length!==bb){if(!t.address)throw new Error("Dynamic signature leaf must have address");return He(["uint8","uint8","address","uint24","bytes"],[gr.DynamicSignature,t.weight,t.address,e.length,e])}else return He(["uint8","uint8","bytes"],[gr.Signature,t.weight,e])}if(qn(t))return He(["uint8","uint8","address"],[gr.Address,t.weight,t.address]);if(Ma(t))return He(["uint8","bytes32"],[gr.Node,t.nodeHash]);if(Ia(t))return He(["uint8","bytes32"],[gr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function hv(t){return Vi(t)?[...hv(t.left),...hv(t.right)]:Oa(t)?hv(t.tree):qn(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function vv(t){return _f(t)?[...vv(t.left),...vv(t.right)]:Dh(t)?vv(t.tree):A0(t)?[t.signature]:[]}function jp(t){return _f(t)?[...jp(t.left),...jp(t.right)]:Dh(t)?jp(t.tree):Ia(t)?[t.subdigest]:[]}async function xb(t){const e=typeof t=="string"?qw(t):t;if(_0(e)){const n=await Promise.all([xb(Sn({},e,{suffix:void 0})),...e.suffix.map(s=>xb(s))]);return Ww(n[0],n.slice(1))}const{trimmed:r}=await yv(e.decoded.tree);return Rl(Sn({},e,{decoded:Sn({},e.decoded,{tree:r})}))}async function yv(t,e=!0){if(_f(t)){const[r,n]=await Promise.all([yv(t.left),yv(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await sf(t,Rg,void 0);return{weight:0,trimmed:{nodeHash:bs(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Dh(t)){const r=await yv(t.tree);if(r.weight===0)try{const n=await sf(t,Rg,void 0);return{weight:0,trimmed:{nodeHash:bs(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return Ma(t)&&FW(t.nodeHash)?{weight:0,trimmed:Sn({},jW(t.nodeHash))}:A0(t)||qn(t)&&t.signature!==void 0?{weight:Z.from(t.weight).toNumber(),trimmed:t}:!e&&Ia(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Hw={decode:t=>qw(t),encode:t=>Rl(t),trim:t=>xb(t),supportsNoChainId:!0,recover:(t,e,r)=>iA(t,e,r),encodeSigners:(t,e,r,n)=>fv(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Hw.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=ha(t)?t:Rl(t),s=r.map(i=>ha(i)?i:Rl(i));return Ww(n,s)},hashSetImageHash:function(t){return TW(t)},signaturesOf(t){return hv(t.tree)},signaturesOfDecoded:function(t){return vv(t.decoded.tree)}};var jxe=Object.freeze({__proto__:null,SignatureType:Xr,SignaturePartType:gr,SignaturePartTypeLength:bb,isUnrecoveredNode:_f,isUnrecoveredNestedLeaf:Dh,isUnrecoveredSignatureLeaf:A0,decodeSignatureTree:wb,InvalidSignatureLeafError:OW,recoverTopology:sf,partEncoder:pn,encodeSigners:fv,encodeTree:uv,deepestConfigOfSignature:rA,isUnrecoveredSignature:nA,isUnrecoveredChainedSignature:_0,isSignature:MW,isChainedSignature:sA,decodeSignature:qw,decodeSignatureBody:Lp,decodeChainedSignature:DW,setImageHashStruct:NW,recoverSignature:iA,encodeChain:Ww,encodeSignature:Rl,encodeSignatureBody:sS,encodeSignatureTree:dv,signaturesOf:hv,signaturesOfDecoded:vv,subdigestsOfDecoded:jp,trimSignature:xb,trimUnrecoveredTree:yv,SignatureCoder:Hw});function qn(t){return t.address!==void 0&&t.weight!==void 0}function Ia(t){return t.subdigest!==void 0&&t.address===void 0}function mv(t){return Vi(t)?JSON.stringify({left:mv(t.left),right:mv(t.right)}):Oa(t)?JSON.stringify({weight:Z.from(t.weight).toString(),threshold:Z.from(t.threshold).toString(),tree:mv(t.tree)}):qn(t)?JSON.stringify({address:t.address,weight:Z.from(t.weight).toString()}):JSON.stringify(t)}function pv(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:pv(e.left),right:pv(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:Z.from(e.weight),threshold:Z.from(e.threshold),tree:pv(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:Z.from(e.weight)}:e}function Oa(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function Ma(t){return t.nodeHash!==void 0}function oA(t){return qn(t)||Ia(t)||Oa(t)||Ma(t)}function Vi(t){return t.left!==void 0&&t.right!==void 0}function Fxe(t){return Vi(t)||oA(t)}function LW(t){return He(["uint96","address"],[t.weight,t.address])}function jW(t){const e=ne(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=Z.from(e.slice(0,12)),n=Ye(te(e.slice(12)));return{weight:r,address:n}}function FW(t){const e=ne(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function bs(t){if(qn(t))return LW(t);if(Ia(t))return na(["string","bytes32"],[`Sequence static digest: -`,t.subdigest]);if(Oa(t)){const e=bs(t.tree);return na(["string","bytes32","uint256","uint256"],[`Sequence nested config: -`,e,t.threshold,t.weight])}return Ma(t)?t.nodeHash:na(["bytes32","bytes32"],[bs(t.left),bs(t.right)])}function Bxe(t){const e=[];let r=t;for(;!oA(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function Uxe(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function aA(t){return na(["bytes32","uint256"],[na(["bytes32","uint256"],[bs(t.tree),t.threshold]),t.checkpoint])}function BW(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function pd(t){return qn(t)||Ia(t)?[t]:Oa(t)?[{threshold:t.threshold,weight:t.weight,members:pd(t.tree)}]:Ma(t)?[]:[...pd(t.left),...pd(t.right)]}function iS(t){return Ma(t)?!0:Vi(t)?iS(t.left)||iS(t.right):!1}function zxe(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:pd(t.tree)}}const UW=(t,e)=>t.map(r=>BW(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function lA(t){if(t.length===0)throw new Error("Empty members array");return UW(t,lA).reduce((r,n)=>({left:r,right:n}))}function cA(t){if(t.length===0)throw new Error("Empty members array");const e=UW(t,cA);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function fA(t){return t.length>8?cA(t):lA(t)}function zW(t,e=fA){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Cb(t,e){return Ia(t)?t.subdigest===e:Vi(t)?Cb(t.left,e)||Cb(t.right,e):!1}function oS(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();Oa(n)?e.push(n.tree):Vi(n)?(e.push(n.left),e.push(n.right)):qn(n)&&r.add({address:n.address,weight:Z.from(n.weight).toNumber()})}return Array.from(r)}function Eb(t){return Vi(t)?Eb(t.left)&&Eb(t.right):!Ma(t)}const Gw={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>aA(t),hasSubdigest:(t,e)=>Cb(t.tree,e),checkpointOf:t=>Z.from(t.checkpoint),signersOf:t=>oS(t.tree),fromSimple:t=>zW({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>Eb(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new en($n.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[Gw.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new en($n.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=i.decodeFunctionData(i.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(!rr.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(!rr.eq((n=(s=t.transactions[0])==null?void 0:s.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:Z.from(t.threshold).toString(),checkpoint:Z.from(t.checkpoint).toString(),tree:mv(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:Z.from(e.threshold),checkpoint:Z.from(e.checkpoint),tree:pv(e.tree)}},editConfig:function(t,e){var r,n;const s=pd(t.tree);if(e.add)for(const i of e.add)s.find(o=>qn(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>qn(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:fA(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=fv(t,r,[],0);if(a.gte(t.threshold))return o}const n=oS(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=fv(t,r,[],0);if(a.gte(t.threshold))return o}return fv(t,r,[],0).encoded}};var Vxe=Object.freeze({__proto__:null,isSignerLeaf:qn,isSubdigestLeaf:Ia,topologyToJSON:mv,topologyFromJSON:pv,isNestedLeaf:Oa,isNodeLeaf:Ma,isLeaf:oA,isNode:Vi,isTopology:Fxe,encodeSignerLeaf:LW,decodeSignerLeaf:jW,isEncodedSignerLeaf:FW,hashNode:bs,leftFace:Bxe,isWalletConfig:Uxe,imageHash:aA,isSimpleNestedMember:BW,topologyToMembers:pd,hasUnknownNodes:iS,toSimpleWalletConfig:zxe,legacyTopologyBuilder:lA,merkleTopologyBuilder:cA,optimized2SignersTopologyBuilder:fA,toWalletConfig:zW,hasSubdigest:Cb,signersOf:oS,isComplete:Eb,ConfigCoder:Gw}),qxe=Object.freeze({__proto__:null});const Wxe={config:Gw,signature:Hw},VW=2,qW={version:VW,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Qe=Object.freeze({__proto__:null,config:Vxe,signature:jxe,context:qxe,chained:Lxe,coders:Wxe,version:VW,DeployedWalletContext:qW});function aS(t,e){const r=Ue(He(["bytes","bytes32"],[t.walletCreationCode,ht(t.mainModule,32)])),n=Ue(He(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ye(kr(n,12))}async function Hxe(t,e,r,n,s,i){return(await Promise.all(rH.map(async a=>{try{const l=a.signature.SignatureCoder.decode(te(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),f=a.config.ConfigCoder.imageHashOf(c.config);if(aS(i[a.version],f).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return aS(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function Gxe(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 Kxe(t){const e=Object.keys(t).length;return t[e]}const Qxe={1:PW,2:qW};var Yxe=Object.freeze({__proto__:null,addressOf:aS,isValidCounterfactual:Hxe,isValidVersionedContext:Gxe,latestContext:Kxe,defaultContexts:Qxe});const Kw=`tuple( + */var Pw=m,C0e=jd;function E0e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var S0e=typeof Object.is=="function"?Object.is:E0e,k0e=C0e.useSyncExternalStore,$0e=Pw.useRef,A0e=Pw.useEffect,_0e=Pw.useMemo,P0e=Pw.useDebugValue;Jz.useSyncExternalStoreWithSelector=function(t,e,r,n,s){var i=$0e(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=_0e(function(){function l(h){if(!c){if(c=!0,f=h,h=n(h),s!==void 0&&o.hasValue){var v=o.value;if(s(v,h))return u=v}return u=h}if(v=u,S0e(f,h))return v;var y=n(h);return s!==void 0&&s(v,y)?v:(f=h,u=y)}var c=!1,f,u,d=r===void 0?null:r;return[function(){return l(e())},d===null?void 0:function(){return l(d())}]},[e,r,n,s]);var a=k0e(t,i[0],i[1]);return A0e(function(){o.hasValue=!0,o.value=a},[a]),P0e(a),a};(function(t){t.exports=Jz})(x0e);function T0e({queryClient:t=new Nde({defaultOptions:{queries:{cacheTime:1e3*60*60*24,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:e=Hz({storage:typeof window<"u"&&window.localStorage?window.localStorage:Wz}),persister:r=typeof window<"u"?xde({key:"cache",storage:e,serialize:s=>s,deserialize:s=>s}):void 0,...n}){const s=u0e({...n,storage:e});return r&&yhe({queryClient:t,persister:r,dehydrateOptions:{shouldDehydrateQuery:i=>i.cacheTime!==0&&i.queryKey[0].persist!==!1}}),Object.assign(s,{queryClient:t})}var Xz=m.createContext(void 0),Tw=m.createContext(void 0);function R0e({children:t,config:e}){return m.createElement(Xz.Provider,{children:m.createElement(she,{children:t,client:e.queryClient,context:Tw}),value:e})}function Rw(){const t=m.useContext(Xz);if(!t)throw new Error(["`useConfig` must be used within `WagmiConfig`.\n","Read more: https://wagmi.sh/react/WagmiConfig"].join(` +`));return t}var I0e=jd.useSyncExternalStore;function O0e(t){return Array.isArray(t)}function M0e(t){if(!V9(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const r=e.prototype;return!(!V9(r)||!r.hasOwnProperty("isPrototypeOf"))}function V9(t){return Object.prototype.toString.call(t)==="[object Object]"}function D0e(t,e,r){return O0e(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function N0e(t){return JSON.stringify(t,(e,r)=>M0e(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):typeof r=="bigint"?r.toString():r)}function L0e(t,e){return typeof t=="function"?t(...e):!!t}function j0e(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 F0e(t,e){const r=L$({context:t.context}),n=ihe(),s=lhe(),i=r.defaultQueryOptions({...t,queryKeyHashFn:N0e});i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=br.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=br.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=br.batchCalls(i.onSettled)),i.suspense&&typeof i.staleTime!="number"&&(i.staleTime=1e3),(i.suspense||i.useErrorBoundary)&&(s.isReset()||(i.retryOnMount=!1));const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(I0e(m.useCallback(u=>n?()=>{}:o.subscribe(br.batchCalls(u)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{s.clearReset()},[s]),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),i.suspense&&a.isLoading&&a.isFetching&&!n)throw o.fetchOptimistic(i).then(({data:u})=>{var d,h;(d=i.onSuccess)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,u,null)}).catch(u=>{var d,h;s.clearReset(),(d=i.onError)==null||d.call(i,u),(h=i.onSettled)==null||h.call(i,void 0,u)});if(a.isError&&!s.isReset()&&!a.isFetching&&L0e(i.useErrorBoundary,[a.error,o.getCurrentQuery()]))throw a.error;const l=a.status==="loading"&&a.fetchStatus==="idle"?"idle":a.status,c=l==="idle",f=l==="loading"&&a.fetchStatus==="fetching";return{...a,defaultedOptions:i,isIdle:c,isLoading:f,observer:o,status:l}}function m4(t,e,r){const n=IU(t,e,r);return fhe({context:Tw,...n})}function B0e(t,e,r){const n=D0e(t,e,r),s=F0e({context:Tw,...n},Lde),i={data:s.data,error:s.error,fetchStatus:s.fetchStatus,isError:s.isError,isFetched:s.isFetched,isFetchedAfterMount:s.isFetchedAfterMount,isFetching:s.isFetching,isIdle:s.isIdle,isLoading:s.isLoading,isRefetching:s.isRefetching,isSuccess:s.isSuccess,refetch:s.refetch,status:s.status,internal:{dataUpdatedAt:s.dataUpdatedAt,errorUpdatedAt:s.errorUpdatedAt,failureCount:s.failureCount,isFetchedAfterMount:s.isFetchedAfterMount,isLoadingError:s.isLoadingError,isPaused:s.isPaused,isPlaceholderData:s.isPlaceholderData,isPreviousData:s.isPreviousData,isRefetchError:s.isRefetchError,isStale:s.isStale,remove:s.remove}};return s.defaultedOptions.notifyOnChangeProps?i:j0e(i,s.observer)}var U0e=()=>L$({context:Tw});function Zz({chainId:t}={}){return rb.useSyncExternalStoreWithSelector(e=>v0e({chainId:t},e),()=>L3({chainId:t}),()=>L3({chainId:t}),e=>e,(e,r)=>e.uid===r.uid)}function yE({chainId:t}){return[{entity:"walletClient",chainId:t,persist:!1}]}function z0e({queryKey:[{chainId:t}]}){return Kz({chainId:t})}function p4({chainId:t,suspense:e,onError:r,onSettled:n,onSuccess:s}={}){const{connector:i}=Tn(),o=g4({chainId:t}),a=B0e(yE({chainId:o}),z0e,{cacheTime:0,enabled:Boolean(i),staleTime:1/0,suspense:e,onError:r,onSettled:n,onSuccess:s}),l=U0e();return m.useEffect(()=>y0e({chainId:o},f=>{f?l.invalidateQueries(yE({chainId:o})):l.removeQueries(yE({chainId:o}))}),[l,o]),a}function g4({chainId:t}={}){return Zz({chainId:t}).chain.id}function V0e(){const[,t]=m.useReducer(e=>e+1,0);return t}var mE=t=>typeof t=="object"&&!Array.isArray(t);function eV(t,e,r=e,n=O3){const s=m.useRef([]),i=rb.useSyncExternalStoreWithSelector(t,e,r,o=>o,(o,a)=>{if(mE(o)&&mE(a)&&s.current.length){for(const l of s.current)if(!n(o[l],a[l]))return!1;return!0}return n(o,a)});if(mE(i)){const o={...i};return Object.defineProperties(o,Object.entries(o).reduce((a,[l,c])=>({...a,[l]:{configurable:!1,enumerable:!0,get:()=>(s.current.includes(l)||s.current.push(l),c)}}),{})),o}return i}function Tn({onConnect:t,onDisconnect:e}={}){const r=Rw(),n=m.useCallback(a=>p0e(a),[r]),s=eV(n,Qz),i=m.useRef(),o=i.current;return m.useEffect(()=>{(o==null?void 0:o.status)!=="connected"&&s.status==="connected"&&(t==null||t({address:s.address,connector:s.connector,isReconnected:(o==null?void 0:o.status)==="reconnecting"||(o==null?void 0:o.status)===void 0})),(o==null?void 0:o.status)==="connected"&&s.status==="disconnected"&&(e==null||e()),i.current=s},[t,e,o,s]),s}var q0e=t=>[{entity:"connect",...t}],W0e=t=>{const{connector:e,chainId:r}=t;if(!e)throw new Error("connector is required");return d0e({connector:e,chainId:r})};function tV({chainId:t,connector:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){const o=Rw(),{data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,mutate:h,mutateAsync:v,reset:y,status:g,variables:b}=m4(q0e({connector:e,chainId:t}),W0e,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),p=m.useCallback(E=>h({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,h]),w=m.useCallback(E=>v({chainId:(E==null?void 0:E.chainId)??t,connector:(E==null?void 0:E.connector)??e}),[t,e,v]);return{connect:p,connectAsync:w,connectors:o.connectors,data:a,error:l,isError:c,isIdle:f,isLoading:u,isSuccess:d,pendingConnector:b==null?void 0:b.connector,reset:y,status:g,variables:b}}var H0e=[{entity:"disconnect"}],G0e=()=>h0e();function rV({onError:t,onMutate:e,onSettled:r,onSuccess:n}={}){const{error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,mutate:c,mutateAsync:f,reset:u,status:d}=m4(H0e,G0e,{...t?{onError(h,v,y){t(h,y)}}:{},onMutate:e,...r?{onSettled(h,v,y,g){r(v,g)}}:{},...n?{onSuccess(h,v,y){n(y)}}:{}});return{disconnect:c,disconnectAsync:f,error:s,isError:i,isIdle:o,isLoading:a,isSuccess:l,reset:u,status:d}}function dn(){const t=Rw(),e=m.useCallback(r=>g0e(r),[t]);return eV(e,Yz)}var K0e=t=>[{entity:"switchNetwork",...t}],Q0e=t=>{const{chainId:e}=t;if(!e)throw new Error("chainId is required");return m0e({chainId:e})};function nV({chainId:t,throwForSwitchChainNotSupported:e,onError:r,onMutate:n,onSettled:s,onSuccess:i}={}){var T;const o=Rw(),a=V0e(),{data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,mutate:v,mutateAsync:y,reset:g,status:b,variables:p}=m4(K0e({chainId:t}),Q0e,{onError:r,onMutate:n,onSettled:s,onSuccess:i}),w=m.useCallback(B=>v({chainId:B??t}),[t,v]),E=m.useCallback(B=>y({chainId:B??t}),[t,y]);m.useEffect(()=>o.subscribe(({chains:L,connector:U})=>({chains:L,connector:U}),a),[o,a]);let k,$;const x=!!((T=o.connector)!=null&&T.switchChain);return(e||x)&&(k=w,$=E),{chains:o.chains??[],data:l,error:c,isError:f,isIdle:u,isLoading:d,isSuccess:h,pendingChainId:p==null?void 0:p.chainId,reset:g,status:b,switchNetwork:k,switchNetworkAsync:$,variables:p}}const Y0e=[{inputs:[{internalType:"bytes32",type:"bytes32"}],name:"getAlternativeSignature",outputs:[{internalType:"string",type:"string"}],stateMutability:"view",type:"function"}];var J0e=Object.freeze({__proto__:null,abi:Y0e});const X0e=[{type:"function",name:"isValidSignature",constant:!0,inputs:[{type:"bytes32"},{type:"bytes"}],outputs:[{type:"bytes4"}],payable:!1,stateMutability:"view"}],Z0e={isValidSignatureBytes32:"0x1626ba7e"};var eme=Object.freeze({__proto__:null,abi:X0e,returns:Z0e});const tme=[{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 rme=Object.freeze({__proto__:null,abi:tme});const nme=[{type:"function",name:"deploy",constant:!1,inputs:[{type:"address"},{type:"bytes32"}],outputs:[],payable:!0,stateMutability:"payable"}];var sme=Object.freeze({__proto__:null,abi:nme});const ime=[{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 ome=Object.freeze({__proto__:null,abi:ime});const ame=[{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 lme=Object.freeze({__proto__:null,abi:ame});const cme=[{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 fme=Object.freeze({__proto__:null,abi:cme});const ume=[{inputs:[{internalType:"address",name:"",type:"address"}],name:"requireFreshSigner",outputs:[],stateMutability:"nonpayable",type:"function"}];var dme=Object.freeze({__proto__:null,abi:ume});const $n={erc6492:rme,erc5719:J0e,erc1271:eme,factory:sme,mainModule:ome,mainModuleUpgradable:lme,sequenceUtils:fme,requireFreshSigner:dme},hme=Object.freeze(Object.defineProperty({__proto__:null,walletContracts:$n},Symbol.toStringTag,{value:"Module"}));function nb(){return nb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),be({},n)).then(s=>we(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),be({},n)).then(s=>we(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),be({},n)).then(s=>we(s).then(i=>({data:i.data}))),this.getAuthToken=(n,s)=>this.fetch(this.url("GetAuthToken"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,jwtToken:o.jwtToken,address:o.address,user:o.user}))),this.sendPasswordlessLink=(n,s)=>this.fetch(this.url("SendPasswordlessLink"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.friendList=(n,s)=>this.fetch(this.url("FriendList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,friends:o.friends}))),this.getFriendByAddress=(n,s)=>this.fetch(this.url("GetFriendByAddress"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.searchFriends=(n,s)=>this.fetch(this.url("SearchFriends"),be(n,s)).then(i=>we(i).then(o=>({friends:o.friends}))),this.addFriend=(n,s)=>this.fetch(this.url("AddFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.updateFriendNickname=(n,s)=>this.fetch(this.url("UpdateFriendNickname"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,friend:o.friend}))),this.removeFriend=(n,s)=>this.fetch(this.url("RemoveFriend"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.contractCall=(n,s)=>this.fetch(this.url("ContractCall"),be(n,s)).then(i=>we(i).then(o=>({returns:o.returns}))),this.decodeContractCall=(n,s)=>this.fetch(this.url("DecodeContractCall"),be(n,s)).then(i=>we(i).then(o=>({call:o.call}))),this.lookupContractCallSelectors=(n,s)=>this.fetch(this.url("LookupContractCallSelectors"),be(n,s)).then(i=>we(i).then(o=>({signatures:o.signatures}))),this.userStorageFetch=(n,s)=>this.fetch(this.url("UserStorageFetch"),be(n,s)).then(i=>we(i).then(o=>({object:o.object}))),this.userStorageSave=(n,s)=>this.fetch(this.url("UserStorageSave"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageDelete=(n,s)=>this.fetch(this.url("UserStorageDelete"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.userStorageFetchAll=(n,s)=>this.fetch(this.url("UserStorageFetchAll"),be(n,s)).then(i=>we(i).then(o=>({objects:o.objects}))),this.getMoonpayLink=(n,s)=>this.fetch(this.url("GetMoonpayLink"),be(n,s)).then(i=>we(i).then(o=>({signedUrl:o.signedUrl}))),this.getSardineClientToken=n=>this.fetch(this.url("GetSardineClientToken"),be({},n)).then(s=>we(s).then(i=>({token:i.token}))),this.isUsingGoogleMail=(n,s)=>this.fetch(this.url("IsUsingGoogleMail"),be(n,s)).then(i=>we(i).then(o=>({yes:o.yes}))),this.resolveENSAddress=(n,s)=>this.fetch(this.url("ResolveENSAddress"),be(n,s)).then(i=>we(i).then(o=>({address:o.address,ok:o.ok}))),this.isValidSignature=(n,s)=>this.fetch(this.url("IsValidSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidMessageSignature=(n,s)=>this.fetch(this.url("IsValidMessageSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidTypedDataSignature=(n,s)=>this.fetch(this.url("IsValidTypedDataSignature"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.isValidETHAuthProof=(n,s)=>this.fetch(this.url("IsValidETHAuthProof"),be(n,s)).then(i=>we(i).then(o=>({isValid:o.isValid}))),this.getCoinPrices=(n,s)=>this.fetch(this.url("GetCoinPrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getCollectiblePrices=(n,s)=>this.fetch(this.url("GetCollectiblePrices"),be(n,s)).then(i=>we(i).then(o=>({tokenPrices:o.tokenPrices}))),this.getExchangeRate=(n,s)=>this.fetch(this.url("GetExchangeRate"),be(n,s)).then(i=>we(i).then(o=>({exchangeRate:o.exchangeRate}))),this.memoryStore=(n,s)=>this.fetch(this.url("MemoryStore"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.memoryLoad=(n,s)=>this.fetch(this.url("MemoryLoad"),be(n,s)).then(i=>we(i).then(o=>({value:o.value}))),this.listPayCardsOnFile=n=>this.fetch(this.url("ListPayCardsOnFile"),be({},n)).then(s=>we(s).then(i=>({payCards:i.payCards}))),this.savePayCard=(n,s)=>this.fetch(this.url("SavePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok,payCard:o.payCard}))),this.updatePayCardCVC=(n,s)=>this.fetch(this.url("UpdatePayCardCVC"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.deletePayCard=(n,s)=>this.fetch(this.url("DeletePayCard"),be(n,s)).then(i=>we(i).then(o=>({ok:o.ok}))),this.smartRampQuote=(n,s)=>this.fetch(this.url("SmartRampQuote"),be(n,s)).then(i=>we(i).then(o=>({status:o.status,quoteDetails:o.quoteDetails}))),this.smartRampPurchase=(n,s)=>this.fetch(this.url("SmartRampPurchase"),be(n,s)).then(i=>we(i).then(o=>({processing:o.processing,receipt:o.receipt}))),this.smartRampWaitOrderConfirmation=(n,s)=>this.fetch(this.url("SmartRampWaitOrderConfirmation"),be(n,s)).then(i=>we(i).then(o=>({done:o.done,receipt:o.receipt}))),this.smartRampGetOrder=(n,s)=>this.fetch(this.url("SmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.smartRampCheckCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampCheckCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({cardAuth:o.cardAuth}))),this.smartRampOrdersList=(n,s)=>this.fetch(this.url("SmartRampOrdersList"),be(n,s)).then(i=>we(i).then(o=>({page:o.page,orders:o.orders}))),this.smartRampGetOrderTxnHash=(n,s)=>this.fetch(this.url("SmartRampGetOrderTxnHash"),be(n,s)).then(i=>we(i).then(o=>({txnHash:o.txnHash,txnSuccessful:o.txnSuccessful}))),this.smartRampSubmitCardAuthorization=(n,s)=>this.fetch(this.url("SmartRampSubmitCardAuthorization"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.adminSmartRampGetOrder=(n,s)=>this.fetch(this.url("AdminSmartRampGetOrder"),be(n,s)).then(i=>we(i).then(o=>({order:o.order}))),this.adminSmartRampListCompletedOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListCompletedOrders"),be(n,s)).then(i=>we(i).then(o=>({orders:o.orders}))),this.adminSmartRampListPendingOrders=(n,s)=>this.fetch(this.url("AdminSmartRampListPendingOrders"),be(n,s)).then(i=>we(i).then(o=>({pendingOrders:o.pendingOrders}))),this.getInviteInfo=n=>this.fetch(this.url("GetInviteInfo"),be({},n)).then(s=>we(s).then(i=>({inviteInfo:i.inviteInfo}))),this.isValidAccessCode=(n,s)=>this.fetch(this.url("IsValidAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.internalClaimAccessCode=(n,s)=>this.fetch(this.url("InternalClaimAccessCode"),be(n,s)).then(i=>we(i).then(o=>({status:o.status}))),this.walletRecover=(n,s)=>this.fetch(this.url("WalletRecover"),be(n,s)).then(i=>we(i).then(o=>({encryptedWallet:o.encryptedWallet}))),this.blockNumberAtTime=(n,s)=>this.fetch(this.url("BlockNumberAtTime"),be(n,s)).then(i=>we(i).then(o=>({blocks:o.blocks}))),this.paperSessionSecret=(n,s)=>this.fetch(this.url("PaperSessionSecret"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.paperSessionSecret2=(n,s)=>this.fetch(this.url("PaperSessionSecret2"),be(n,s)).then(i=>we(i).then(o=>({secret:o.secret}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const be=(t={},e={})=>({method:"POST",headers:nb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),we=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}),q9=typeof global=="object"?global.fetch:window.fetch;class hd extends sV{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,q9),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=nb({},s.headers,i),q9(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const wme=Object.freeze(Object.defineProperty({__proto__:null,API:sV,SequenceAPIClient:hd,SmartRampOrderStatus:pme,SmartRampTxnStatus:gme,SortOrder:bme,WebRPCSchemaHash:mme,WebRPCSchemaVersion:yme,WebRPCVersion:vme},Symbol.toStringTag,{value:"Module"}));var j3={},xme={get exports(){return j3},set exports(t){j3=t}};const Cme={},Eme=Object.freeze(Object.defineProperty({__proto__:null,default:Cme},Symbol.toStringTag,{value:"Module"})),iV=tZ(Eme);(function(t){(function(e,r){function n(N,C){if(!N)throw new Error(C||"Assertion failed")}function s(N,C){N.super_=C;var S=function(){};S.prototype=C.prototype,N.prototype=new S,N.prototype.constructor=N}function i(N,C,S){if(i.isBN(N))return N;this.negative=0,this.words=null,this.length=0,this.red=null,N!==null&&((C==="le"||C==="be")&&(S=C,C=10),this._init(N||0,C||10,S||"be"))}typeof e=="object"?e.exports=i:r.BN=i,i.BN=i,i.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=iV.Buffer}catch{}i.isBN=function(C){return C instanceof i?!0:C!==null&&typeof C=="object"&&C.constructor.wordSize===i.wordSize&&Array.isArray(C.words)},i.max=function(C,S){return C.cmp(S)>0?C:S},i.min=function(C,S){return C.cmp(S)<0?C:S},i.prototype._init=function(C,S,R){if(typeof C=="number")return this._initNumber(C,S,R);if(typeof C=="object")return this._initArray(C,S,R);S==="hex"&&(S=16),n(S===(S|0)&&S>=2&&S<=36),C=C.toString().replace(/\s+/g,"");var M=0;C[0]==="-"&&(M++,this.negative=1),M=0;M-=3)I=C[M]|C[M-1]<<8|C[M-2]<<16,this.words[_]|=I<>>26-F&67108863,F+=24,F>=26&&(F-=26,_++);else if(R==="le")for(M=0,_=0;M>>26-F&67108863,F+=24,F>=26&&(F-=26,_++);return this._strip()};function a(N,C){var S=N.charCodeAt(C);if(S>=48&&S<=57)return S-48;if(S>=65&&S<=70)return S-55;if(S>=97&&S<=102)return S-87;n(!1,"Invalid character in "+N)}function l(N,C,S){var R=a(N,S);return S-1>=C&&(R|=a(N,S-1)<<4),R}i.prototype._parseHex=function(C,S,R){this.length=Math.ceil((C.length-S)/6),this.words=new Array(this.length);for(var M=0;M=S;M-=2)F=l(C,S,M)<<_,this.words[I]|=F&67108863,_>=18?(_-=18,I+=1,this.words[I]|=F>>>26):_+=8;else{var D=C.length-S;for(M=D%2===0?S+1:S;M=18?(_-=18,I+=1,this.words[I]|=F>>>26):_+=8}this._strip()};function c(N,C,S,R){for(var M=0,_=0,I=Math.min(N.length,S),F=C;F=49?_=D-49+10:D>=17?_=D-17+10:_=D,n(D>=0&&_1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch{i.prototype.inspect=u}else i.prototype.inspect=u;function u(){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],v=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(C,S){C=C||10,S=S|0||1;var R;if(C===16||C==="hex"){R="";for(var M=0,_=0,I=0;I>>24-M&16777215,M+=2,M>=26&&(M-=26,I--),_!==0||I!==this.length-1?R=d[6-D.length]+D+R:R=D+R}for(_!==0&&(R=_.toString(16)+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}if(C===(C|0)&&C>=2&&C<=36){var A=h[C],j=v[C];R="";var G=this.clone();for(G.negative=0;!G.isZero();){var O=G.modrn(j).toString(C);G=G.idivn(j),G.isZero()?R=O+R:R=d[A-O.length]+O+R}for(this.isZero()&&(R="0"+R);R.length%S!==0;)R="0"+R;return this.negative!==0&&(R="-"+R),R}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var C=this.words[0];return this.length===2?C+=this.words[1]*67108864:this.length===3&&this.words[2]===1?C+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-C:C},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(C,S){return this.toArrayLike(o,C,S)}),i.prototype.toArray=function(C,S){return this.toArrayLike(Array,C,S)};var y=function(C,S){return C.allocUnsafe?C.allocUnsafe(S):new C(S)};i.prototype.toArrayLike=function(C,S,R){this._strip();var M=this.byteLength(),_=R||Math.max(1,M);n(M<=_,"byte array longer than desired length"),n(_>0,"Requested array length <= 0");var I=y(C,_),F=S==="le"?"LE":"BE";return this["_toArrayLike"+F](I,M),I},i.prototype._toArrayLikeLE=function(C,S){for(var R=0,M=0,_=0,I=0;_>8&255),R>16&255),I===6?(R>24&255),M=0,I=0):(M=F>>>24,I+=2)}if(R=0&&(C[R--]=F>>8&255),R>=0&&(C[R--]=F>>16&255),I===6?(R>=0&&(C[R--]=F>>24&255),M=0,I=0):(M=F>>>24,I+=2)}if(R>=0)for(C[R--]=M;R>=0;)C[R--]=0},Math.clz32?i.prototype._countBits=function(C){return 32-Math.clz32(C)}:i.prototype._countBits=function(C){var S=C,R=0;return S>=4096&&(R+=13,S>>>=13),S>=64&&(R+=7,S>>>=7),S>=8&&(R+=4,S>>>=4),S>=2&&(R+=2,S>>>=2),R+S},i.prototype._zeroBits=function(C){if(C===0)return 26;var S=C,R=0;return S&8191||(R+=13,S>>>=13),S&127||(R+=7,S>>>=7),S&15||(R+=4,S>>>=4),S&3||(R+=2,S>>>=2),S&1||R++,R},i.prototype.bitLength=function(){var C=this.words[this.length-1],S=this._countBits(C);return(this.length-1)*26+S};function g(N){for(var C=new Array(N.bitLength()),S=0;S>>M&1}return C}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var C=0,S=0;SC.length?this.clone().ior(C):C.clone().ior(this)},i.prototype.uor=function(C){return this.length>C.length?this.clone().iuor(C):C.clone().iuor(this)},i.prototype.iuand=function(C){var S;this.length>C.length?S=C:S=this;for(var R=0;RC.length?this.clone().iand(C):C.clone().iand(this)},i.prototype.uand=function(C){return this.length>C.length?this.clone().iuand(C):C.clone().iuand(this)},i.prototype.iuxor=function(C){var S,R;this.length>C.length?(S=this,R=C):(S=C,R=this);for(var M=0;MC.length?this.clone().ixor(C):C.clone().ixor(this)},i.prototype.uxor=function(C){return this.length>C.length?this.clone().iuxor(C):C.clone().iuxor(this)},i.prototype.inotn=function(C){n(typeof C=="number"&&C>=0);var S=Math.ceil(C/26)|0,R=C%26;this._expand(S),R>0&&S--;for(var M=0;M0&&(this.words[M]=~this.words[M]&67108863>>26-R),this._strip()},i.prototype.notn=function(C){return this.clone().inotn(C)},i.prototype.setn=function(C,S){n(typeof C=="number"&&C>=0);var R=C/26|0,M=C%26;return this._expand(R+1),S?this.words[R]=this.words[R]|1<C.length?(R=this,M=C):(R=C,M=this);for(var _=0,I=0;I>>26;for(;_!==0&&I>>26;if(this.length=R.length,_!==0)this.words[this.length]=_,this.length++;else if(R!==this)for(;IC.length?this.clone().iadd(C):C.clone().iadd(this)},i.prototype.isub=function(C){if(C.negative!==0){C.negative=0;var S=this.iadd(C);return C.negative=1,S._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(C),this.negative=1,this._normSign();var R=this.cmp(C);if(R===0)return this.negative=0,this.length=1,this.words[0]=0,this;var M,_;R>0?(M=this,_=C):(M=C,_=this);for(var I=0,F=0;F<_.length;F++)S=(M.words[F]|0)-(_.words[F]|0)+I,I=S>>26,this.words[F]=S&67108863;for(;I!==0&&F>26,this.words[F]=S&67108863;if(I===0&&F>>26,G=D&67108863,O=Math.min(A,C.length-1),q=Math.max(0,A-N.length+1);q<=O;q++){var z=A-q|0;M=N.words[z]|0,_=C.words[q]|0,I=M*_+G,j+=I/67108864|0,G=I&67108863}S.words[A]=G|0,D=j|0}return D!==0?S.words[A]=D|0:S.length--,S._strip()}var p=function(C,S,R){var M=C.words,_=S.words,I=R.words,F=0,D,A,j,G=M[0]|0,O=G&8191,q=G>>>13,z=M[1]|0,H=z&8191,J=z>>>13,X=M[2]|0,K=X&8191,Q=X>>>13,ae=M[3]|0,ie=ae&8191,ue=ae>>>13,st=M[4]|0,ke=st&8191,Ae=st>>>13,at=M[5]|0,me=at&8191,Re=at>>>13,Qt=M[6]|0,Ie=Qt&8191,Oe=Qt>>>13,Yt=M[7]|0,Me=Yt&8191,De=Yt>>>13,Jt=M[8]|0,Ne=Jt&8191,Le=Jt>>>13,Xt=M[9]|0,je=Xt&8191,Fe=Xt>>>13,Zt=_[0]|0,Be=Zt&8191,Ct=Zt>>>13,mc=_[1]|0,Et=mc&8191,St=mc>>>13,pc=_[2]|0,kt=pc&8191,$t=pc>>>13,gc=_[3]|0,At=gc&8191,_t=gc>>>13,bc=_[4]|0,Pt=bc&8191,Tt=bc>>>13,wc=_[5]|0,Rt=wc&8191,It=wc>>>13,xc=_[6]|0,Ot=xc&8191,Mt=xc>>>13,Cc=_[7]|0,Dt=Cc&8191,Nt=Cc>>>13,Ec=_[8]|0,Lt=Ec&8191,jt=Ec>>>13,Sc=_[9]|0,Ft=Sc&8191,Bt=Sc>>>13;R.negative=C.negative^S.negative,R.length=19,D=Math.imul(O,Be),A=Math.imul(O,Ct),A=A+Math.imul(q,Be)|0,j=Math.imul(q,Ct);var Fa=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,D=Math.imul(H,Be),A=Math.imul(H,Ct),A=A+Math.imul(J,Be)|0,j=Math.imul(J,Ct),D=D+Math.imul(O,Et)|0,A=A+Math.imul(O,St)|0,A=A+Math.imul(q,Et)|0,j=j+Math.imul(q,St)|0;var Ba=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Ba>>>26)|0,Ba&=67108863,D=Math.imul(K,Be),A=Math.imul(K,Ct),A=A+Math.imul(Q,Be)|0,j=Math.imul(Q,Ct),D=D+Math.imul(H,Et)|0,A=A+Math.imul(H,St)|0,A=A+Math.imul(J,Et)|0,j=j+Math.imul(J,St)|0,D=D+Math.imul(O,kt)|0,A=A+Math.imul(O,$t)|0,A=A+Math.imul(q,kt)|0,j=j+Math.imul(q,$t)|0;var Ua=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Ua>>>26)|0,Ua&=67108863,D=Math.imul(ie,Be),A=Math.imul(ie,Ct),A=A+Math.imul(ue,Be)|0,j=Math.imul(ue,Ct),D=D+Math.imul(K,Et)|0,A=A+Math.imul(K,St)|0,A=A+Math.imul(Q,Et)|0,j=j+Math.imul(Q,St)|0,D=D+Math.imul(H,kt)|0,A=A+Math.imul(H,$t)|0,A=A+Math.imul(J,kt)|0,j=j+Math.imul(J,$t)|0,D=D+Math.imul(O,At)|0,A=A+Math.imul(O,_t)|0,A=A+Math.imul(q,At)|0,j=j+Math.imul(q,_t)|0;var za=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(za>>>26)|0,za&=67108863,D=Math.imul(ke,Be),A=Math.imul(ke,Ct),A=A+Math.imul(Ae,Be)|0,j=Math.imul(Ae,Ct),D=D+Math.imul(ie,Et)|0,A=A+Math.imul(ie,St)|0,A=A+Math.imul(ue,Et)|0,j=j+Math.imul(ue,St)|0,D=D+Math.imul(K,kt)|0,A=A+Math.imul(K,$t)|0,A=A+Math.imul(Q,kt)|0,j=j+Math.imul(Q,$t)|0,D=D+Math.imul(H,At)|0,A=A+Math.imul(H,_t)|0,A=A+Math.imul(J,At)|0,j=j+Math.imul(J,_t)|0,D=D+Math.imul(O,Pt)|0,A=A+Math.imul(O,Tt)|0,A=A+Math.imul(q,Pt)|0,j=j+Math.imul(q,Tt)|0;var Va=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Va>>>26)|0,Va&=67108863,D=Math.imul(me,Be),A=Math.imul(me,Ct),A=A+Math.imul(Re,Be)|0,j=Math.imul(Re,Ct),D=D+Math.imul(ke,Et)|0,A=A+Math.imul(ke,St)|0,A=A+Math.imul(Ae,Et)|0,j=j+Math.imul(Ae,St)|0,D=D+Math.imul(ie,kt)|0,A=A+Math.imul(ie,$t)|0,A=A+Math.imul(ue,kt)|0,j=j+Math.imul(ue,$t)|0,D=D+Math.imul(K,At)|0,A=A+Math.imul(K,_t)|0,A=A+Math.imul(Q,At)|0,j=j+Math.imul(Q,_t)|0,D=D+Math.imul(H,Pt)|0,A=A+Math.imul(H,Tt)|0,A=A+Math.imul(J,Pt)|0,j=j+Math.imul(J,Tt)|0,D=D+Math.imul(O,Rt)|0,A=A+Math.imul(O,It)|0,A=A+Math.imul(q,Rt)|0,j=j+Math.imul(q,It)|0;var Yx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Yx>>>26)|0,Yx&=67108863,D=Math.imul(Ie,Be),A=Math.imul(Ie,Ct),A=A+Math.imul(Oe,Be)|0,j=Math.imul(Oe,Ct),D=D+Math.imul(me,Et)|0,A=A+Math.imul(me,St)|0,A=A+Math.imul(Re,Et)|0,j=j+Math.imul(Re,St)|0,D=D+Math.imul(ke,kt)|0,A=A+Math.imul(ke,$t)|0,A=A+Math.imul(Ae,kt)|0,j=j+Math.imul(Ae,$t)|0,D=D+Math.imul(ie,At)|0,A=A+Math.imul(ie,_t)|0,A=A+Math.imul(ue,At)|0,j=j+Math.imul(ue,_t)|0,D=D+Math.imul(K,Pt)|0,A=A+Math.imul(K,Tt)|0,A=A+Math.imul(Q,Pt)|0,j=j+Math.imul(Q,Tt)|0,D=D+Math.imul(H,Rt)|0,A=A+Math.imul(H,It)|0,A=A+Math.imul(J,Rt)|0,j=j+Math.imul(J,It)|0,D=D+Math.imul(O,Ot)|0,A=A+Math.imul(O,Mt)|0,A=A+Math.imul(q,Ot)|0,j=j+Math.imul(q,Mt)|0;var Jx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Jx>>>26)|0,Jx&=67108863,D=Math.imul(Me,Be),A=Math.imul(Me,Ct),A=A+Math.imul(De,Be)|0,j=Math.imul(De,Ct),D=D+Math.imul(Ie,Et)|0,A=A+Math.imul(Ie,St)|0,A=A+Math.imul(Oe,Et)|0,j=j+Math.imul(Oe,St)|0,D=D+Math.imul(me,kt)|0,A=A+Math.imul(me,$t)|0,A=A+Math.imul(Re,kt)|0,j=j+Math.imul(Re,$t)|0,D=D+Math.imul(ke,At)|0,A=A+Math.imul(ke,_t)|0,A=A+Math.imul(Ae,At)|0,j=j+Math.imul(Ae,_t)|0,D=D+Math.imul(ie,Pt)|0,A=A+Math.imul(ie,Tt)|0,A=A+Math.imul(ue,Pt)|0,j=j+Math.imul(ue,Tt)|0,D=D+Math.imul(K,Rt)|0,A=A+Math.imul(K,It)|0,A=A+Math.imul(Q,Rt)|0,j=j+Math.imul(Q,It)|0,D=D+Math.imul(H,Ot)|0,A=A+Math.imul(H,Mt)|0,A=A+Math.imul(J,Ot)|0,j=j+Math.imul(J,Mt)|0,D=D+Math.imul(O,Dt)|0,A=A+Math.imul(O,Nt)|0,A=A+Math.imul(q,Dt)|0,j=j+Math.imul(q,Nt)|0;var Xx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Xx>>>26)|0,Xx&=67108863,D=Math.imul(Ne,Be),A=Math.imul(Ne,Ct),A=A+Math.imul(Le,Be)|0,j=Math.imul(Le,Ct),D=D+Math.imul(Me,Et)|0,A=A+Math.imul(Me,St)|0,A=A+Math.imul(De,Et)|0,j=j+Math.imul(De,St)|0,D=D+Math.imul(Ie,kt)|0,A=A+Math.imul(Ie,$t)|0,A=A+Math.imul(Oe,kt)|0,j=j+Math.imul(Oe,$t)|0,D=D+Math.imul(me,At)|0,A=A+Math.imul(me,_t)|0,A=A+Math.imul(Re,At)|0,j=j+Math.imul(Re,_t)|0,D=D+Math.imul(ke,Pt)|0,A=A+Math.imul(ke,Tt)|0,A=A+Math.imul(Ae,Pt)|0,j=j+Math.imul(Ae,Tt)|0,D=D+Math.imul(ie,Rt)|0,A=A+Math.imul(ie,It)|0,A=A+Math.imul(ue,Rt)|0,j=j+Math.imul(ue,It)|0,D=D+Math.imul(K,Ot)|0,A=A+Math.imul(K,Mt)|0,A=A+Math.imul(Q,Ot)|0,j=j+Math.imul(Q,Mt)|0,D=D+Math.imul(H,Dt)|0,A=A+Math.imul(H,Nt)|0,A=A+Math.imul(J,Dt)|0,j=j+Math.imul(J,Nt)|0,D=D+Math.imul(O,Lt)|0,A=A+Math.imul(O,jt)|0,A=A+Math.imul(q,Lt)|0,j=j+Math.imul(q,jt)|0;var Zx=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(Zx>>>26)|0,Zx&=67108863,D=Math.imul(je,Be),A=Math.imul(je,Ct),A=A+Math.imul(Fe,Be)|0,j=Math.imul(Fe,Ct),D=D+Math.imul(Ne,Et)|0,A=A+Math.imul(Ne,St)|0,A=A+Math.imul(Le,Et)|0,j=j+Math.imul(Le,St)|0,D=D+Math.imul(Me,kt)|0,A=A+Math.imul(Me,$t)|0,A=A+Math.imul(De,kt)|0,j=j+Math.imul(De,$t)|0,D=D+Math.imul(Ie,At)|0,A=A+Math.imul(Ie,_t)|0,A=A+Math.imul(Oe,At)|0,j=j+Math.imul(Oe,_t)|0,D=D+Math.imul(me,Pt)|0,A=A+Math.imul(me,Tt)|0,A=A+Math.imul(Re,Pt)|0,j=j+Math.imul(Re,Tt)|0,D=D+Math.imul(ke,Rt)|0,A=A+Math.imul(ke,It)|0,A=A+Math.imul(Ae,Rt)|0,j=j+Math.imul(Ae,It)|0,D=D+Math.imul(ie,Ot)|0,A=A+Math.imul(ie,Mt)|0,A=A+Math.imul(ue,Ot)|0,j=j+Math.imul(ue,Mt)|0,D=D+Math.imul(K,Dt)|0,A=A+Math.imul(K,Nt)|0,A=A+Math.imul(Q,Dt)|0,j=j+Math.imul(Q,Nt)|0,D=D+Math.imul(H,Lt)|0,A=A+Math.imul(H,jt)|0,A=A+Math.imul(J,Lt)|0,j=j+Math.imul(J,jt)|0,D=D+Math.imul(O,Ft)|0,A=A+Math.imul(O,Bt)|0,A=A+Math.imul(q,Ft)|0,j=j+Math.imul(q,Bt)|0;var eC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(eC>>>26)|0,eC&=67108863,D=Math.imul(je,Et),A=Math.imul(je,St),A=A+Math.imul(Fe,Et)|0,j=Math.imul(Fe,St),D=D+Math.imul(Ne,kt)|0,A=A+Math.imul(Ne,$t)|0,A=A+Math.imul(Le,kt)|0,j=j+Math.imul(Le,$t)|0,D=D+Math.imul(Me,At)|0,A=A+Math.imul(Me,_t)|0,A=A+Math.imul(De,At)|0,j=j+Math.imul(De,_t)|0,D=D+Math.imul(Ie,Pt)|0,A=A+Math.imul(Ie,Tt)|0,A=A+Math.imul(Oe,Pt)|0,j=j+Math.imul(Oe,Tt)|0,D=D+Math.imul(me,Rt)|0,A=A+Math.imul(me,It)|0,A=A+Math.imul(Re,Rt)|0,j=j+Math.imul(Re,It)|0,D=D+Math.imul(ke,Ot)|0,A=A+Math.imul(ke,Mt)|0,A=A+Math.imul(Ae,Ot)|0,j=j+Math.imul(Ae,Mt)|0,D=D+Math.imul(ie,Dt)|0,A=A+Math.imul(ie,Nt)|0,A=A+Math.imul(ue,Dt)|0,j=j+Math.imul(ue,Nt)|0,D=D+Math.imul(K,Lt)|0,A=A+Math.imul(K,jt)|0,A=A+Math.imul(Q,Lt)|0,j=j+Math.imul(Q,jt)|0,D=D+Math.imul(H,Ft)|0,A=A+Math.imul(H,Bt)|0,A=A+Math.imul(J,Ft)|0,j=j+Math.imul(J,Bt)|0;var tC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(tC>>>26)|0,tC&=67108863,D=Math.imul(je,kt),A=Math.imul(je,$t),A=A+Math.imul(Fe,kt)|0,j=Math.imul(Fe,$t),D=D+Math.imul(Ne,At)|0,A=A+Math.imul(Ne,_t)|0,A=A+Math.imul(Le,At)|0,j=j+Math.imul(Le,_t)|0,D=D+Math.imul(Me,Pt)|0,A=A+Math.imul(Me,Tt)|0,A=A+Math.imul(De,Pt)|0,j=j+Math.imul(De,Tt)|0,D=D+Math.imul(Ie,Rt)|0,A=A+Math.imul(Ie,It)|0,A=A+Math.imul(Oe,Rt)|0,j=j+Math.imul(Oe,It)|0,D=D+Math.imul(me,Ot)|0,A=A+Math.imul(me,Mt)|0,A=A+Math.imul(Re,Ot)|0,j=j+Math.imul(Re,Mt)|0,D=D+Math.imul(ke,Dt)|0,A=A+Math.imul(ke,Nt)|0,A=A+Math.imul(Ae,Dt)|0,j=j+Math.imul(Ae,Nt)|0,D=D+Math.imul(ie,Lt)|0,A=A+Math.imul(ie,jt)|0,A=A+Math.imul(ue,Lt)|0,j=j+Math.imul(ue,jt)|0,D=D+Math.imul(K,Ft)|0,A=A+Math.imul(K,Bt)|0,A=A+Math.imul(Q,Ft)|0,j=j+Math.imul(Q,Bt)|0;var rC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(rC>>>26)|0,rC&=67108863,D=Math.imul(je,At),A=Math.imul(je,_t),A=A+Math.imul(Fe,At)|0,j=Math.imul(Fe,_t),D=D+Math.imul(Ne,Pt)|0,A=A+Math.imul(Ne,Tt)|0,A=A+Math.imul(Le,Pt)|0,j=j+Math.imul(Le,Tt)|0,D=D+Math.imul(Me,Rt)|0,A=A+Math.imul(Me,It)|0,A=A+Math.imul(De,Rt)|0,j=j+Math.imul(De,It)|0,D=D+Math.imul(Ie,Ot)|0,A=A+Math.imul(Ie,Mt)|0,A=A+Math.imul(Oe,Ot)|0,j=j+Math.imul(Oe,Mt)|0,D=D+Math.imul(me,Dt)|0,A=A+Math.imul(me,Nt)|0,A=A+Math.imul(Re,Dt)|0,j=j+Math.imul(Re,Nt)|0,D=D+Math.imul(ke,Lt)|0,A=A+Math.imul(ke,jt)|0,A=A+Math.imul(Ae,Lt)|0,j=j+Math.imul(Ae,jt)|0,D=D+Math.imul(ie,Ft)|0,A=A+Math.imul(ie,Bt)|0,A=A+Math.imul(ue,Ft)|0,j=j+Math.imul(ue,Bt)|0;var nC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(nC>>>26)|0,nC&=67108863,D=Math.imul(je,Pt),A=Math.imul(je,Tt),A=A+Math.imul(Fe,Pt)|0,j=Math.imul(Fe,Tt),D=D+Math.imul(Ne,Rt)|0,A=A+Math.imul(Ne,It)|0,A=A+Math.imul(Le,Rt)|0,j=j+Math.imul(Le,It)|0,D=D+Math.imul(Me,Ot)|0,A=A+Math.imul(Me,Mt)|0,A=A+Math.imul(De,Ot)|0,j=j+Math.imul(De,Mt)|0,D=D+Math.imul(Ie,Dt)|0,A=A+Math.imul(Ie,Nt)|0,A=A+Math.imul(Oe,Dt)|0,j=j+Math.imul(Oe,Nt)|0,D=D+Math.imul(me,Lt)|0,A=A+Math.imul(me,jt)|0,A=A+Math.imul(Re,Lt)|0,j=j+Math.imul(Re,jt)|0,D=D+Math.imul(ke,Ft)|0,A=A+Math.imul(ke,Bt)|0,A=A+Math.imul(Ae,Ft)|0,j=j+Math.imul(Ae,Bt)|0;var sC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(sC>>>26)|0,sC&=67108863,D=Math.imul(je,Rt),A=Math.imul(je,It),A=A+Math.imul(Fe,Rt)|0,j=Math.imul(Fe,It),D=D+Math.imul(Ne,Ot)|0,A=A+Math.imul(Ne,Mt)|0,A=A+Math.imul(Le,Ot)|0,j=j+Math.imul(Le,Mt)|0,D=D+Math.imul(Me,Dt)|0,A=A+Math.imul(Me,Nt)|0,A=A+Math.imul(De,Dt)|0,j=j+Math.imul(De,Nt)|0,D=D+Math.imul(Ie,Lt)|0,A=A+Math.imul(Ie,jt)|0,A=A+Math.imul(Oe,Lt)|0,j=j+Math.imul(Oe,jt)|0,D=D+Math.imul(me,Ft)|0,A=A+Math.imul(me,Bt)|0,A=A+Math.imul(Re,Ft)|0,j=j+Math.imul(Re,Bt)|0;var iC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(iC>>>26)|0,iC&=67108863,D=Math.imul(je,Ot),A=Math.imul(je,Mt),A=A+Math.imul(Fe,Ot)|0,j=Math.imul(Fe,Mt),D=D+Math.imul(Ne,Dt)|0,A=A+Math.imul(Ne,Nt)|0,A=A+Math.imul(Le,Dt)|0,j=j+Math.imul(Le,Nt)|0,D=D+Math.imul(Me,Lt)|0,A=A+Math.imul(Me,jt)|0,A=A+Math.imul(De,Lt)|0,j=j+Math.imul(De,jt)|0,D=D+Math.imul(Ie,Ft)|0,A=A+Math.imul(Ie,Bt)|0,A=A+Math.imul(Oe,Ft)|0,j=j+Math.imul(Oe,Bt)|0;var oC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(oC>>>26)|0,oC&=67108863,D=Math.imul(je,Dt),A=Math.imul(je,Nt),A=A+Math.imul(Fe,Dt)|0,j=Math.imul(Fe,Nt),D=D+Math.imul(Ne,Lt)|0,A=A+Math.imul(Ne,jt)|0,A=A+Math.imul(Le,Lt)|0,j=j+Math.imul(Le,jt)|0,D=D+Math.imul(Me,Ft)|0,A=A+Math.imul(Me,Bt)|0,A=A+Math.imul(De,Ft)|0,j=j+Math.imul(De,Bt)|0;var aC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(aC>>>26)|0,aC&=67108863,D=Math.imul(je,Lt),A=Math.imul(je,jt),A=A+Math.imul(Fe,Lt)|0,j=Math.imul(Fe,jt),D=D+Math.imul(Ne,Ft)|0,A=A+Math.imul(Ne,Bt)|0,A=A+Math.imul(Le,Ft)|0,j=j+Math.imul(Le,Bt)|0;var lC=(F+D|0)+((A&8191)<<13)|0;F=(j+(A>>>13)|0)+(lC>>>26)|0,lC&=67108863,D=Math.imul(je,Ft),A=Math.imul(je,Bt),A=A+Math.imul(Fe,Ft)|0,j=Math.imul(Fe,Bt);var cC=(F+D|0)+((A&8191)<<13)|0;return F=(j+(A>>>13)|0)+(cC>>>26)|0,cC&=67108863,I[0]=Fa,I[1]=Ba,I[2]=Ua,I[3]=za,I[4]=Va,I[5]=Yx,I[6]=Jx,I[7]=Xx,I[8]=Zx,I[9]=eC,I[10]=tC,I[11]=rC,I[12]=nC,I[13]=sC,I[14]=iC,I[15]=oC,I[16]=aC,I[17]=lC,I[18]=cC,F!==0&&(I[19]=F,R.length++),R};Math.imul||(p=b);function w(N,C,S){S.negative=C.negative^N.negative,S.length=N.length+C.length;for(var R=0,M=0,_=0;_>>26)|0,M+=I>>>26,I&=67108863}S.words[_]=F,R=I,I=M}return R!==0?S.words[_]=R:S.length--,S._strip()}function E(N,C,S){return w(N,C,S)}i.prototype.mulTo=function(C,S){var R,M=this.length+C.length;return this.length===10&&C.length===10?R=p(this,C,S):M<63?R=b(this,C,S):M<1024?R=w(this,C,S):R=E(this,C,S),R},i.prototype.mul=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),this.mulTo(C,S)},i.prototype.mulf=function(C){var S=new i(null);return S.words=new Array(this.length+C.length),E(this,C,S)},i.prototype.imul=function(C){return this.clone().mulTo(C,this)},i.prototype.imuln=function(C){var S=C<0;S&&(C=-C),n(typeof C=="number"),n(C<67108864);for(var R=0,M=0;M>=26,R+=_/67108864|0,R+=I>>>26,this.words[M]=I&67108863}return R!==0&&(this.words[M]=R,this.length++),S?this.ineg():this},i.prototype.muln=function(C){return this.clone().imuln(C)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(C){var S=g(C);if(S.length===0)return new i(1);for(var R=this,M=0;M=0);var S=C%26,R=(C-S)/26,M=67108863>>>26-S<<26-S,_;if(S!==0){var I=0;for(_=0;_>>26-S}I&&(this.words[_]=I,this.length++)}if(R!==0){for(_=this.length-1;_>=0;_--)this.words[_+R]=this.words[_];for(_=0;_=0);var M;S?M=(S-S%26)/26:M=0;var _=C%26,I=Math.min((C-_)/26,this.length),F=67108863^67108863>>>_<<_,D=R;if(M-=I,M=Math.max(0,M),D){for(var A=0;AI)for(this.length-=I,A=0;A=0&&(j!==0||A>=M);A--){var G=this.words[A]|0;this.words[A]=j<<26-_|G>>>_,j=G&F}return D&&j!==0&&(D.words[D.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(C,S,R){return n(this.negative===0),this.iushrn(C,S,R)},i.prototype.shln=function(C){return this.clone().ishln(C)},i.prototype.ushln=function(C){return this.clone().iushln(C)},i.prototype.shrn=function(C){return this.clone().ishrn(C)},i.prototype.ushrn=function(C){return this.clone().iushrn(C)},i.prototype.testn=function(C){n(typeof C=="number"&&C>=0);var S=C%26,R=(C-S)/26,M=1<=0);var S=C%26,R=(C-S)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=R)return this;if(S!==0&&R++,this.length=Math.min(R,this.length),S!==0){var M=67108863^67108863>>>S<=67108864;S++)this.words[S]-=67108864,S===this.length-1?this.words[S+1]=1:this.words[S+1]++;return this.length=Math.max(this.length,S+1),this},i.prototype.isubn=function(C){if(n(typeof C=="number"),n(C<67108864),C<0)return this.iaddn(-C);if(this.negative!==0)return this.negative=0,this.iaddn(C),this.negative=1,this;if(this.words[0]-=C,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var S=0;S>26)-(D/67108864|0),this.words[_+R]=I&67108863}for(;_>26,this.words[_+R]=I&67108863;if(F===0)return this._strip();for(n(F===-1),F=0,_=0;_>26,this.words[_]=I&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(C,S){var R=this.length-C.length,M=this.clone(),_=C,I=_.words[_.length-1]|0,F=this._countBits(I);R=26-F,R!==0&&(_=_.ushln(R),M.iushln(R),I=_.words[_.length-1]|0);var D=M.length-_.length,A;if(S!=="mod"){A=new i(null),A.length=D+1,A.words=new Array(A.length);for(var j=0;j=0;O--){var q=(M.words[_.length+O]|0)*67108864+(M.words[_.length+O-1]|0);for(q=Math.min(q/I|0,67108863),M._ishlnsubmul(_,q,O);M.negative!==0;)q--,M.negative=0,M._ishlnsubmul(_,1,O),M.isZero()||(M.negative^=1);A&&(A.words[O]=q)}return A&&A._strip(),M._strip(),S!=="div"&&R!==0&&M.iushrn(R),{div:A||null,mod:M}},i.prototype.divmod=function(C,S,R){if(n(!C.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var M,_,I;return this.negative!==0&&C.negative===0?(I=this.neg().divmod(C,S),S!=="mod"&&(M=I.div.neg()),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.iadd(C)),{div:M,mod:_}):this.negative===0&&C.negative!==0?(I=this.divmod(C.neg(),S),S!=="mod"&&(M=I.div.neg()),{div:M,mod:I.mod}):this.negative&C.negative?(I=this.neg().divmod(C.neg(),S),S!=="div"&&(_=I.mod.neg(),R&&_.negative!==0&&_.isub(C)),{div:I.div,mod:_}):C.length>this.length||this.cmp(C)<0?{div:new i(0),mod:this}:C.length===1?S==="div"?{div:this.divn(C.words[0]),mod:null}:S==="mod"?{div:null,mod:new i(this.modrn(C.words[0]))}:{div:this.divn(C.words[0]),mod:new i(this.modrn(C.words[0]))}:this._wordDiv(C,S)},i.prototype.div=function(C){return this.divmod(C,"div",!1).div},i.prototype.mod=function(C){return this.divmod(C,"mod",!1).mod},i.prototype.umod=function(C){return this.divmod(C,"mod",!0).mod},i.prototype.divRound=function(C){var S=this.divmod(C);if(S.mod.isZero())return S.div;var R=S.div.negative!==0?S.mod.isub(C):S.mod,M=C.ushrn(1),_=C.andln(1),I=R.cmp(M);return I<0||_===1&&I===0?S.div:S.div.negative!==0?S.div.isubn(1):S.div.iaddn(1)},i.prototype.modrn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var R=(1<<26)%C,M=0,_=this.length-1;_>=0;_--)M=(R*M+(this.words[_]|0))%C;return S?-M:M},i.prototype.modn=function(C){return this.modrn(C)},i.prototype.idivn=function(C){var S=C<0;S&&(C=-C),n(C<=67108863);for(var R=0,M=this.length-1;M>=0;M--){var _=(this.words[M]|0)+R*67108864;this.words[M]=_/C|0,R=_%C}return this._strip(),S?this.ineg():this},i.prototype.divn=function(C){return this.clone().idivn(C)},i.prototype.egcd=function(C){n(C.negative===0),n(!C.isZero());var S=this,R=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var M=new i(1),_=new i(0),I=new i(0),F=new i(1),D=0;S.isEven()&&R.isEven();)S.iushrn(1),R.iushrn(1),++D;for(var A=R.clone(),j=S.clone();!S.isZero();){for(var G=0,O=1;!(S.words[0]&O)&&G<26;++G,O<<=1);if(G>0)for(S.iushrn(G);G-- >0;)(M.isOdd()||_.isOdd())&&(M.iadd(A),_.isub(j)),M.iushrn(1),_.iushrn(1);for(var q=0,z=1;!(R.words[0]&z)&&q<26;++q,z<<=1);if(q>0)for(R.iushrn(q);q-- >0;)(I.isOdd()||F.isOdd())&&(I.iadd(A),F.isub(j)),I.iushrn(1),F.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(I),_.isub(F)):(R.isub(S),I.isub(M),F.isub(_))}return{a:I,b:F,gcd:R.iushln(D)}},i.prototype._invmp=function(C){n(C.negative===0),n(!C.isZero());var S=this,R=C.clone();S.negative!==0?S=S.umod(C):S=S.clone();for(var M=new i(1),_=new i(0),I=R.clone();S.cmpn(1)>0&&R.cmpn(1)>0;){for(var F=0,D=1;!(S.words[0]&D)&&F<26;++F,D<<=1);if(F>0)for(S.iushrn(F);F-- >0;)M.isOdd()&&M.iadd(I),M.iushrn(1);for(var A=0,j=1;!(R.words[0]&j)&&A<26;++A,j<<=1);if(A>0)for(R.iushrn(A);A-- >0;)_.isOdd()&&_.iadd(I),_.iushrn(1);S.cmp(R)>=0?(S.isub(R),M.isub(_)):(R.isub(S),_.isub(M))}var G;return S.cmpn(1)===0?G=M:G=_,G.cmpn(0)<0&&G.iadd(C),G},i.prototype.gcd=function(C){if(this.isZero())return C.abs();if(C.isZero())return this.abs();var S=this.clone(),R=C.clone();S.negative=0,R.negative=0;for(var M=0;S.isEven()&&R.isEven();M++)S.iushrn(1),R.iushrn(1);do{for(;S.isEven();)S.iushrn(1);for(;R.isEven();)R.iushrn(1);var _=S.cmp(R);if(_<0){var I=S;S=R,R=I}else if(_===0||R.cmpn(1)===0)break;S.isub(R)}while(!0);return R.iushln(M)},i.prototype.invm=function(C){return this.egcd(C).a.umod(C)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(C){return this.words[0]&C},i.prototype.bincn=function(C){n(typeof C=="number");var S=C%26,R=(C-S)/26,M=1<>>26,F&=67108863,this.words[I]=F}return _!==0&&(this.words[I]=_,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(C){var S=C<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;this._strip();var R;if(this.length>1)R=1;else{S&&(C=-C),n(C<=67108863,"Number is too big");var M=this.words[0]|0;R=M===C?0:MC.length)return 1;if(this.length=0;R--){var M=this.words[R]|0,_=C.words[R]|0;if(M!==_){M<_?S=-1:M>_&&(S=1);break}}return S},i.prototype.gtn=function(C){return this.cmpn(C)===1},i.prototype.gt=function(C){return this.cmp(C)===1},i.prototype.gten=function(C){return this.cmpn(C)>=0},i.prototype.gte=function(C){return this.cmp(C)>=0},i.prototype.ltn=function(C){return this.cmpn(C)===-1},i.prototype.lt=function(C){return this.cmp(C)===-1},i.prototype.lten=function(C){return this.cmpn(C)<=0},i.prototype.lte=function(C){return this.cmp(C)<=0},i.prototype.eqn=function(C){return this.cmpn(C)===0},i.prototype.eq=function(C){return this.cmp(C)===0},i.red=function(C){return new U(C)},i.prototype.toRed=function(C){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),C.convertTo(this)._forceRed(C)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(C){return this.red=C,this},i.prototype.forceRed=function(C){return n(!this.red,"Already a number in reduction context"),this._forceRed(C)},i.prototype.redAdd=function(C){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,C)},i.prototype.redIAdd=function(C){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,C)},i.prototype.redSub=function(C){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,C)},i.prototype.redISub=function(C){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,C)},i.prototype.redShl=function(C){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,C)},i.prototype.redMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.mul(this,C)},i.prototype.redIMul=function(C){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,C),this.red.imul(this,C)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(C){return n(this.red&&!C.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,C)};var k={k256:null,p224:null,p192:null,p25519:null};function $(N,C){this.name=N,this.p=new i(C,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var C=new i(null);return C.words=new Array(Math.ceil(this.n/13)),C},$.prototype.ireduce=function(C){var S=C,R;do this.split(S,this.tmp),S=this.imulK(S),S=S.iadd(this.tmp),R=S.bitLength();while(R>this.n);var M=R0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},$.prototype.split=function(C,S){C.iushrn(this.n,0,S)},$.prototype.imulK=function(C){return C.imul(this.k)};function x(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(x,$),x.prototype.split=function(C,S){for(var R=4194303,M=Math.min(C.length,9),_=0;_>>22,I=F}I>>>=22,C.words[_-10]=I,I===0&&C.length>10?C.length-=10:C.length-=9},x.prototype.imulK=function(C){C.words[C.length]=0,C.words[C.length+1]=0,C.length+=2;for(var S=0,R=0;R>>=26,C.words[R]=_,S=M}return S!==0&&(C.words[C.length++]=S),C},i._prime=function(C){if(k[C])return k[C];var S;if(C==="k256")S=new x;else if(C==="p224")S=new T;else if(C==="p192")S=new B;else if(C==="p25519")S=new L;else throw new Error("Unknown prime "+C);return k[C]=S,S};function U(N){if(typeof N=="string"){var C=i._prime(N);this.m=C.p,this.prime=C}else n(N.gtn(1),"modulus must be greater than 1"),this.m=N,this.prime=null}U.prototype._verify1=function(C){n(C.negative===0,"red works only with positives"),n(C.red,"red works only with red numbers")},U.prototype._verify2=function(C,S){n((C.negative|S.negative)===0,"red works only with positives"),n(C.red&&C.red===S.red,"red works only with red numbers")},U.prototype.imod=function(C){return this.prime?this.prime.ireduce(C)._forceRed(this):(f(C,C.umod(this.m)._forceRed(this)),C)},U.prototype.neg=function(C){return C.isZero()?C.clone():this.m.sub(C)._forceRed(this)},U.prototype.add=function(C,S){this._verify2(C,S);var R=C.add(S);return R.cmp(this.m)>=0&&R.isub(this.m),R._forceRed(this)},U.prototype.iadd=function(C,S){this._verify2(C,S);var R=C.iadd(S);return R.cmp(this.m)>=0&&R.isub(this.m),R},U.prototype.sub=function(C,S){this._verify2(C,S);var R=C.sub(S);return R.cmpn(0)<0&&R.iadd(this.m),R._forceRed(this)},U.prototype.isub=function(C,S){this._verify2(C,S);var R=C.isub(S);return R.cmpn(0)<0&&R.iadd(this.m),R},U.prototype.shl=function(C,S){return this._verify1(C),this.imod(C.ushln(S))},U.prototype.imul=function(C,S){return this._verify2(C,S),this.imod(C.imul(S))},U.prototype.mul=function(C,S){return this._verify2(C,S),this.imod(C.mul(S))},U.prototype.isqr=function(C){return this.imul(C,C.clone())},U.prototype.sqr=function(C){return this.mul(C,C)},U.prototype.sqrt=function(C){if(C.isZero())return C.clone();var S=this.m.andln(3);if(n(S%2===1),S===3){var R=this.m.add(new i(1)).iushrn(2);return this.pow(C,R)}for(var M=this.m.subn(1),_=0;!M.isZero()&&M.andln(1)===0;)_++,M.iushrn(1);n(!M.isZero());var I=new i(1).toRed(this),F=I.redNeg(),D=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new i(2*A*A).toRed(this);this.pow(A,D).cmp(F)!==0;)A.redIAdd(F);for(var j=this.pow(A,M),G=this.pow(C,M.addn(1).iushrn(1)),O=this.pow(C,M),q=_;O.cmp(I)!==0;){for(var z=O,H=0;z.cmp(I)!==0;H++)z=z.redSqr();n(H=0;_--){for(var j=S.words[_],G=A-1;G>=0;G--){var O=j>>G&1;if(I!==M[0]&&(I=this.sqr(I)),O===0&&F===0){D=0;continue}F<<=1,F|=O,D++,!(D!==R&&(_!==0||G!==0))&&(I=this.mul(I,M[F]),D=0,F=0)}A=26}return I},U.prototype.convertTo=function(C){var S=C.umod(this.m);return S===C?S.clone():S},U.prototype.convertFrom=function(C){var S=C.clone();return S.red=null,S},i.mont=function(C){return new V(C)};function V(N){U.call(this,N),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(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)}s(V,U),V.prototype.convertTo=function(C){return this.imod(C.ushln(this.shift))},V.prototype.convertFrom=function(C){var S=this.imod(C.mul(this.rinv));return S.red=null,S},V.prototype.imul=function(C,S){if(C.isZero()||S.isZero())return C.words[0]=0,C.length=1,C;var R=C.imul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.mul=function(C,S){if(C.isZero()||S.isZero())return new i(0)._forceRed(this);var R=C.mul(S),M=R.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),_=R.isub(M).iushrn(this.shift),I=_;return _.cmp(this.m)>=0?I=_.isub(this.m):_.cmpn(0)<0&&(I=_.iadd(this.m)),I._forceRed(this)},V.prototype.invm=function(C){var S=this.imod(C._invmp(this.m).mul(this.r2));return S._forceRed(this)}})(t,Wr)})(xme);const Te=j3,Sme="logger/5.7.0";let W9=!1,H9=!1;const Pp={debug:1,default:2,info:2,warning:3,error:4,off:5};let G9=Pp.default,pE=null;function kme(){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 K9=kme();var F3;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(F3||(F3={}));var ki;(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"})(ki||(ki={}));const Q9="0123456789abcdef";let ee=class jr{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,r){const n=e.toLowerCase();Pp[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(G9>Pp[n])&&console.log.apply(console,r)}debug(...e){this._log(jr.levels.DEBUG,e)}info(...e){this._log(jr.levels.INFO,e)}warn(...e){this._log(jr.levels.WARNING,e)}makeError(e,r,n){if(H9)return this.makeError("censored error",r,{});r||(r=jr.errors.UNKNOWN_ERROR),n||(n={});const s=[];Object.keys(n).forEach(l=>{const c=n[l];try{if(c instanceof Uint8Array){let f="";for(let u=0;u>4],f+=Q9[c[u]&15];s.push(l+"=Uint8Array(0x"+f+")")}else s.push(l+"="+JSON.stringify(c))}catch{s.push(l+"="+JSON.stringify(n[l].toString()))}}),s.push(`code=${r}`),s.push(`version=${this.version}`);const i=e;let o="";switch(r){case ki.NUMERIC_FAULT:{o="NUMERIC_FAULT";const l=e;switch(l){case"overflow":case"underflow":case"division-by-zero":o+="-"+l;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case ki.CALL_EXCEPTION:case ki.INSUFFICIENT_FUNDS:case ki.MISSING_NEW:case ki.NONCE_EXPIRED:case ki.REPLACEMENT_UNDERPRICED:case ki.TRANSACTION_REPLACED:case ki.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");const a=new Error(e);return a.reason=i,a.code=r,Object.keys(n).forEach(function(l){a[l]=n[l]}),a}throwError(e,r,n){throw this.makeError(e,r,n)}throwArgumentError(e,r,n){return this.throwError(e,jr.errors.INVALID_ARGUMENT,{argument:r,value:n})}assert(e,r,n,s){e||this.throwError(r,n,s)}assertArgument(e,r,n,s){e||this.throwArgumentError(r,n,s)}checkNormalize(e){K9&&this.throwError("platform missing String.prototype.normalize",jr.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:K9})}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,jr.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,jr.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,jr.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",jr.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",jr.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",jr.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return pE||(pE=new jr(Sme)),pE}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),W9){if(!e)return;this.globalLogger().throwError("error censorship permanent",jr.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}H9=!!e,W9=!!r}static setLogLevel(e){const r=Pp[e.toLowerCase()];if(r==null){jr.globalLogger().warn("invalid log level - "+e);return}G9=r}static from(e){return new jr(e)}};ee.errors=ki;ee.levels=F3;const $me="bytes/5.7.0",mr=new ee($me);function oV(t){return!!t.toHexString}function vd(t){return t.slice||(t.slice=function(){const e=Array.prototype.slice.call(arguments);return vd(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function ma(t){return ze(t)&&!(t.length%2)||Ta(t)}function Y9(t){return typeof t=="number"&&t==t&&t%1===0}function Ta(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Y9(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"){mr.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),vd(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),oV(t)&&(t=t.toHexString()),ze(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":mr.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let s=0;sne(s)),r=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);return e.reduce((s,i)=>(n.set(i,s),s+i.length),0),vd(n)}function Eo(t){let e=ne(t);if(e.length===0)return e;let r=0;for(;re&&mr.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(e);return r.set(t,e-t.length),vd(r)}function ze(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}const gE="0123456789abcdef";function te(t,e){if(e||(e={}),typeof t=="number"){mr.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=gE[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),oV(t))return t.toHexString();if(ze(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":mr.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(Ta(t)){let r="0x";for(let n=0;n>4]+gE[s&15]}return r}return mr.throwArgumentError("invalid hexlify value","value",t)}function Io(t){if(typeof t!="string")t=te(t);else if(!ze(t)||t.length%2)return null;return(t.length-2)/2}function Sr(t,e,r){return typeof t!="string"?t=te(t):(!ze(t)||t.length%2)&&mr.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function jn(t){let e="0x";return t.forEach(r=>{e+=te(r).substring(2)}),e}function Hl(t){const e=aV(te(t,{hexPad:"left"}));return e==="0x"?"0x0":e}function aV(t){typeof t!="string"&&(t=te(t)),ze(t)||mr.throwArgumentError("invalid hex string","value",t),t=t.substring(2);let e=0;for(;e2*e+2&&mr.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}function qf(t){const e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ma(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]):mr.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:mr.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 s=sv(ne(e._vs),32);e._vs=te(s);const i=s[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&mr.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),s[0]&=127;const o=te(s);e.s==null?e.s=o:e.s!==o&&mr.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?mr.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 s=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==s&&mr.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!ze(e.r)?mr.throwArgumentError("signature missing or invalid r","signature",t):e.r=ht(e.r,32),e.s==null||!ze(e.s)?mr.throwArgumentError("signature missing or invalid s","signature",t):e.s=ht(e.s,32);const r=ne(e.s);r[0]>=128&&mr.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(r[0]|=128);const n=te(r);e._vs&&(ze(e._vs)||mr.throwArgumentError("signature invalid _vs","signature",t),e._vs=ht(e._vs,32)),e._vs==null?e._vs=n:e._vs!==n&&mr.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Ame(t){return t=qf(t),te(Ht([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}const lV="bignumber/5.7.0";var Ey=Te.BN;const Wo=new ee(lV),bE={},J9=9007199254740991;function _me(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||Ta(t))}let X9=!1;class Z{constructor(e,r){e!==bE&&Wo.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 Jn(Je(this).fromTwos(e))}toTwos(e){return Jn(Je(this).toTwos(e))}abs(){return this._hex[0]==="-"?Z.from(this._hex.substring(1)):this}add(e){return Jn(Je(this).add(Je(e)))}sub(e){return Jn(Je(this).sub(Je(e)))}div(e){return Z.from(e).isZero()&&Us("division-by-zero","div"),Jn(Je(this).div(Je(e)))}mul(e){return Jn(Je(this).mul(Je(e)))}mod(e){const r=Je(e);return r.isNeg()&&Us("division-by-zero","mod"),Jn(Je(this).umod(r))}pow(e){const r=Je(e);return r.isNeg()&&Us("negative-power","pow"),Jn(Je(this).pow(r))}and(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","and"),Jn(Je(this).and(r))}or(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","or"),Jn(Je(this).or(r))}xor(e){const r=Je(e);return(this.isNegative()||r.isNeg())&&Us("unbound-bitwise-result","xor"),Jn(Je(this).xor(r))}mask(e){return(this.isNegative()||e<0)&&Us("negative-width","mask"),Jn(Je(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&Us("negative-width","shl"),Jn(Je(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&Us("negative-width","shr"),Jn(Je(this).shrn(e))}eq(e){return Je(this).eq(Je(e))}lt(e){return Je(this).lt(Je(e))}lte(e){return Je(this).lte(Je(e))}gt(e){return Je(this).gt(Je(e))}gte(e){return Je(this).gte(Je(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Je(this).isZero()}toNumber(){try{return Je(this).toNumber()}catch{Us("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch{}return Wo.throwError("this platform does not support BigInt",ee.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?X9||(X9=!0,Wo.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Wo.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ee.errors.UNEXPECTED_ARGUMENT,{}):Wo.throwError("BigNumber.toString does not accept parameters",ee.errors.UNEXPECTED_ARGUMENT,{})),Je(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof Z)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new Z(bE,Sy(e)):e.match(/^-?[0-9]+$/)?new Z(bE,Sy(new Ey(e))):Wo.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Us("underflow","BigNumber.from",e),(e>=J9||e<=-J9)&&Us("overflow","BigNumber.from",e),Z.from(String(e));const r=e;if(typeof r=="bigint")return Z.from(r.toString());if(Ta(r))return Z.from(te(r));if(r)if(r.toHexString){const n=r.toHexString();if(typeof n=="string")return Z.from(n)}else{let n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&(ze(n)||n[0]==="-"&&ze(n.substring(1))))return Z.from(n)}return Wo.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}}function Sy(t){if(typeof t!="string")return Sy(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Wo.throwArgumentError("invalid hex","value",t),t=Sy(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 Jn(t){return Z.from(Sy(t))}function Je(t){const e=Z.from(t).toHexString();return e[0]==="-"?new Ey("-"+e.substring(3),16):new Ey(e.substring(2),16)}function Us(t,e,r){const n={fault:t,operation:e};return r!=null&&(n.value=r),Wo.throwError(t,ee.errors.NUMERIC_FAULT,n)}function Pme(t){return new Ey(t,36).toString(16)}function Tme(t){return new Ey(t,16).toString(36)}const Fn=new ee(lV),iv={},cV=Z.from(0),fV=Z.from(-1);function uV(t,e,r,n){const s={fault:e,operation:r};return n!==void 0&&(s.value=n),Fn.throwError(t,ee.errors.NUMERIC_FAULT,s)}let ov="0";for(;ov.length<256;)ov+=ov;function b4(t){if(typeof t!="number")try{t=Z.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+ov.substring(0,t):Fn.throwArgumentError("invalid decimal size","decimals",t)}function Tp(t,e){e==null&&(e=0);const r=b4(e);t=Z.from(t);const n=t.lt(cV);n&&(t=t.mul(fV));let s=t.mod(r).toString();for(;s.length2&&Fn.throwArgumentError("too many decimal points","value",t);let i=s[0],o=s[1];for(i||(i="0"),o||(o="0");o[o.length-1]==="0";)o=o.substring(0,o.length-1);for(o.length>r.length-1&&uV("fractional component exceeds decimals","underflow","parseFixed"),o===""&&(o="0");o.lengthe[o]==null?l:(typeof e[o]!==a&&Fn.throwArgumentError("invalid fixed format ("+o+" not "+a+")","format."+o,e[o]),e[o]);r=i("signed","boolean",r),n=i("width","number",n),s=i("decimals","number",s)}return n%8&&Fn.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),s>80&&Fn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",s),new yd(iv,r,n,s)}}class on{constructor(e,r,n,s){e!==iv&&Fn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",ee.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=s,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&Fn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.add(n),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.sub(n),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const r=to(this._value,this.format.decimals),n=to(e._value,e.format.decimals);return on.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=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Z9.toFormat(r.format))),r}ceiling(){const e=this.toString().split(".");e.length===1&&e.push("0");let r=on.from(e[0],this.format);const n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Z9.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)&&Fn.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;const n=on.from("1"+ov.substring(0,e),this.format),s=Rme.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(s).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&&Fn.throwArgumentError("invalid byte width","width",e);const r=Z.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return ht(r,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return on.fromString(this._value,e)}static fromValue(e,r,n){return n==null&&r!=null&&!_me(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),on.fromString(Tp(e,r),yd.from(n))}static fromString(e,r){r==null&&(r="fixed");const n=yd.from(r),s=to(e,n.decimals);!n.signed&&s.lt(cV)&&uV("unsigned value cannot be negative","overflow","value",e);let i=null;n.signed?i=s.toTwos(n.width).toHexString():(i=s.toHexString(),i=ht(i,n.width/8));const o=Tp(s,n.decimals);return new on(iv,i,o,n)}static fromBytes(e,r){r==null&&(r="fixed");const n=yd.from(r);if(ne(e).length>n.width/8)throw new Error("overflow");let s=Z.from(e);n.signed&&(s=s.fromTwos(n.width));const i=s.toTwos((n.signed?0:1)+n.width).toHexString(),o=Tp(s,n.decimals);return new on(iv,i,o,n)}static from(e,r){if(typeof e=="string")return on.fromString(e,r);if(Ta(e))return on.fromBytes(e,r);try{return on.fromValue(e,0,r)}catch(n){if(n.code!==ee.errors.INVALID_ARGUMENT)throw n}return Fn.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}const Z9=on.from(1),Rme=on.from("0.5"),Ime="properties/5.7.0";var Ome=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const sb=new ee(Ime);function oe(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}function Ti(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 mt(t){return Ome(this,void 0,void 0,function*(){const e=Object.keys(t).map(n=>{const s=t[n];return Promise.resolve(s).then(i=>({key:n,value:i}))});return(yield Promise.all(e)).reduce((n,s)=>(n[s.key]=s.value,n),{})})}function w4(t,e){(!t||typeof t!="object")&&sb.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(r=>{e[r]||sb.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}function Gt(t){const e={};for(const r in t)e[r]=t[r];return e}const Mme={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function dV(t){if(t==null||Mme[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;r_s(e)));if(typeof t=="object"){const e={};for(const r in t){const n=t[r];n!==void 0&&oe(e,r,_s(n))}return e}return sb.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function _s(t){return Dme(t)}class x0{constructor(e){for(const r in e)this[r]=_s(e[r])}}const C0="abi/5.7.0",tt=new ee(C0),Cf={};let eR={calldata:!0,memory:!0,storage:!0},Nme={calldata:!0,memory:!0};function Am(t,e){if(t==="bytes"||t==="string"){if(eR[e])return!0}else if(t==="address"){if(e==="payable")return!0}else if((t.indexOf("[")>=0||t==="tuple")&&Nme[e])return!0;return(eR[e]||e==="payable")&&tt.throwArgumentError("invalid modifier","name",e),!1}function Lme(t,e){let r=t;function n(a){tt.throwArgumentError(`unexpected character at position ${a}`,"param",t)}t=t.replace(/\s/g," ");function s(a){let l={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(l.indexed=!1),l}let i={type:"",name:"",state:{allowType:!0}},o=i;for(let a=0;aJSON.parse(s.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!==it.sighash&&(r+=this.type),r+="("+this.components.map(n=>n.format(e)).join(e===it.full?", ":",")+")"):r+=this.type,e!==it.sighash&&(this.indexed===!0&&(r+=" indexed"),e===it.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?qr.fromString(e,r):qr.fromObject(e)}static fromObject(e){return qr.isParamType(e)?e:new qr(Cf,{name:e.name||null,type:ku(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(qr.fromObject):null})}static fromString(e,r){function n(s){return qr.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return n(Lme(e,!!r))}static isParamType(e){return!!(e!=null&&e._isParamType)}}function ky(t,e){return Bme(t).map(r=>qr.fromString(r,e))}class po{constructor(e,r){e!==Cf&&tt.throwError("use a static from method",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Rp(this,r),this._isFragment=!0,Object.freeze(this)}static from(e){return po.isFragment(e)?e:typeof e=="string"?po.fromString(e):po.fromObject(e)}static fromObject(e){if(po.isFragment(e))return e;switch(e.type){case"function":return Pi.fromObject(e);case"event":return yo.fromObject(e);case"constructor":return _i.fromObject(e);case"error":return Xo.fromObject(e);case"fallback":case"receive":return null}return tt.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"?yo.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?Pi.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?_i.fromString(e.trim()):e.split(" ")[0]==="error"?Xo.fromString(e.substring(5).trim()):tt.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class yo extends po{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.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!==it.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",e!==it.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?yo.fromString(e):yo.fromObject(e)}static fromObject(e){if(yo.isEventFragment(e))return e;e.type!=="event"&&tt.throwArgumentError("invalid event object","value",e);const r={name:$y(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(qr.fromObject):[],type:"event"};return new yo(Cf,r)}static fromString(e){let r=e.match(Ay);r||tt.throwArgumentError("invalid event string","value",e);let n=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":n=!0;break;case"":break;default:tt.warn("unknown modifier: "+s)}}),yo.fromObject({name:r[1].trim(),anonymous:n,inputs:ky(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}}function hV(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&tt.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||tt.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Z.from(r[1]),r[0]):t}function vV(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 yV(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&&tt.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&tt.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"&&tt.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&&tt.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"&&tt.throwArgumentError("unable to determine stateMutability","value",t),e}class _i extends po{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.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===it.sighash&&tt.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===it.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?_i.fromString(e):_i.fromObject(e)}static fromObject(e){if(_i.isConstructorFragment(e))return e;e.type!=="constructor"&&tt.throwArgumentError("invalid constructor object","value",e);let r=yV(e);r.constant&&tt.throwArgumentError("constructor cannot be constant","value",e);const n={name:null,type:e.type,inputs:e.inputs?e.inputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new _i(Cf,n)}static fromString(e){let r={type:"constructor"};e=hV(e,r);let n=e.match(Ay);return(!n||n[1].trim()!=="constructor")&&tt.throwArgumentError("invalid constructor string","value",e),r.inputs=ky(n[2].trim(),!1),vV(n[3].trim(),r),_i.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}}class Pi extends _i{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.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!==it.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",e!==it.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"?Pi.fromString(e):Pi.fromObject(e)}static fromObject(e){if(Pi.isFunctionFragment(e))return e;e.type!=="function"&&tt.throwArgumentError("invalid function object","value",e);let r=yV(e);const n={type:e.type,name:$y(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(qr.fromObject):[],outputs:e.outputs?e.outputs.map(qr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Z.from(e.gas):null};return new Pi(Cf,n)}static fromString(e){let r={type:"function"};e=hV(e,r);let n=e.split(" returns ");n.length>2&&tt.throwArgumentError("invalid function string","value",e);let s=n[0].match(Ay);if(s||tt.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&$y(r.name),r.inputs=ky(s[2],!1),vV(s[3].trim(),r),n.length>1){let i=n[1].match(Ay);(i[1].trim()!=""||i[3].trim()!="")&&tt.throwArgumentError("unexpected tokens","value",e),r.outputs=ky(i[2],!1)}else r.outputs=[];return Pi.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}}function tR(t){const e=t.format();return(e==="Error(string)"||e==="Panic(uint256)")&&tt.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class Xo extends po{format(e){if(e||(e=it.sighash),it[e]||tt.throwArgumentError("invalid format type","format",e),e===it.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let r="";return e!==it.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(n=>n.format(e)).join(e===it.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?Xo.fromString(e):Xo.fromObject(e)}static fromObject(e){if(Xo.isErrorFragment(e))return e;e.type!=="error"&&tt.throwArgumentError("invalid error object","value",e);const r={type:e.type,name:$y(e.name),inputs:e.inputs?e.inputs.map(qr.fromObject):[]};return tR(new Xo(Cf,r))}static fromString(e){let r={type:"error"},n=e.match(Ay);return n||tt.throwArgumentError("invalid error signature","value",e),r.name=n[1].trim(),r.name&&$y(r.name),r.inputs=ky(n[2],!1),tR(Xo.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}}function ku(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const Fme=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function $y(t){return(!t||!t.match(Fme))&&tt.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const Ay=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function Bme(t){t=t.trim();let e=[],r="",n=0;for(let s=0;sthis.wordSize&&x4.throwError("value out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=Ht([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 ib{constructor(e,r,n,s){oe(this,"_data",ne(e)),oe(this,"wordSize",r||32),oe(this,"_coerceFunc",n),oe(this,"allowLoose",s),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):ib.coerce(e,r)}_peekBytes(e,r,n){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&n&&this._offset+r<=this._data.length?s=r:x4.throwError("data out-of-bounds",ee.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new ib(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 Z.from(this.readBytes(this.wordSize))}}var U3={},Ume={get exports(){return U3},set exports(t){U3=t}};/** + * [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",s=n?window:{};s.JS_SHA3_NO_WINDOW&&(n=!1);var i=!n&&typeof self=="object",o=!s.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;o?s=Wr:i&&(s=self);var a=!s.JS_SHA3_NO_COMMON_JS&&!0&&t.exports,l=!s.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",c="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],u=[4,1024,262144,67108864],d=[1,256,65536,16777216],h=[6,1536,393216,100663296],v=[0,8,16,24],y=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],b=[128,256],p=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};(s.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return Object.prototype.toString.call(O)==="[object Array]"}),l&&(s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return typeof O=="object"&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var E=function(O,q,z){return function(H){return new A(O,q,O).update(H)[z]()}},k=function(O,q,z){return function(H,J){return new A(O,q,J).update(H)[z]()}},$=function(O,q,z){return function(H,J,X,K){return C["cshake"+O].update(H,J,X,K)[z]()}},x=function(O,q,z){return function(H,J,X,K){return C["kmac"+O].update(H,J,X,K)[z]()}},T=function(O,q,z,H){for(var J=0;J>5,this.byteCount=this.blockCount<<2,this.outputBlocks=z>>5,this.extraBytes=(z&31)>>3;for(var H=0;H<50;++H)this.s[H]=0}A.prototype.update=function(O){if(this.finalized)throw new Error(r);var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}for(var H=this.blocks,J=this.byteCount,X=O.length,K=this.blockCount,Q=0,ae=this.s,ie,ue;Q>2]|=O[Q]<>2]|=ue<>2]|=(192|ue>>6)<>2]|=(128|ue&63)<=57344?(H[ie>>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)<=J){for(this.start=ie-J,this.block=H[K],ie=0;ie>8,z=O&255;z>0;)J.unshift(z),O=O>>8,z=O&255,++H;return q?J.push(H):J.unshift(H),this.update(J),J.length},A.prototype.encodeString=function(O){var q,z=typeof O;if(z!=="string"){if(z==="object"){if(O===null)throw new Error(e);if(l&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!l||!ArrayBuffer.isView(O)))throw new Error(e)}else throw new Error(e);q=!0}var H=0,J=O.length;if(q)H=J;else for(var X=0;X=57344?H+=3:(K=65536+((K&1023)<<10|O.charCodeAt(++X)&1023),H+=4)}return H+=this.encode(H*8),this.update(O),H},A.prototype.bytepad=function(O,q){for(var z=this.encode(q),H=0;H>2]|=this.padding[q&3],this.lastByteIndex===this.byteCount)for(O[0]=O[z],q=1;q>4&15]+c[Q&15]+c[Q>>12&15]+c[Q>>8&15]+c[Q>>20&15]+c[Q>>16&15]+c[Q>>28&15]+c[Q>>24&15];X%O===0&&(G(q),J=0)}return H&&(Q=q[J],K+=c[Q>>4&15]+c[Q&15],H>1&&(K+=c[Q>>12&15]+c[Q>>8&15]),H>2&&(K+=c[Q>>20&15]+c[Q>>16&15])),K},A.prototype.arrayBuffer=function(){this.finalize();var O=this.blockCount,q=this.s,z=this.outputBlocks,H=this.extraBytes,J=0,X=0,K=this.outputBits>>3,Q;H?Q=new ArrayBuffer(z+1<<2):Q=new ArrayBuffer(K);for(var ae=new Uint32Array(Q);X>8&255,K[Q+2]=ae>>16&255,K[Q+3]=ae>>24&255;X%O===0&&G(q)}return H&&(Q=X<<2,ae=q[J],K[Q]=ae&255,H>1&&(K[Q+1]=ae>>8&255),H>2&&(K[Q+2]=ae>>16&255)),K};function j(O,q,z){A.call(this,O,q,z)}j.prototype=new A,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var G=function(O){var q,z,H,J,X,K,Q,ae,ie,ue,st,ke,Ae,at,me,Re,Qt,Ie,Oe,Yt,Me,De,Jt,Ne,Le,Xt,je,Fe,Zt,Be,Ct,mc,Et,St,pc,kt,$t,gc,At,_t,bc,Pt,Tt,wc,Rt,It,xc,Ot,Mt,Cc,Dt,Nt,Ec,Lt,jt,Sc,Ft,Bt,Fa,Ba,Ua,za,Va;for(H=0;H<48;H+=2)J=O[0]^O[10]^O[20]^O[30]^O[40],X=O[1]^O[11]^O[21]^O[31]^O[41],K=O[2]^O[12]^O[22]^O[32]^O[42],Q=O[3]^O[13]^O[23]^O[33]^O[43],ae=O[4]^O[14]^O[24]^O[34]^O[44],ie=O[5]^O[15]^O[25]^O[35]^O[45],ue=O[6]^O[16]^O[26]^O[36]^O[46],st=O[7]^O[17]^O[27]^O[37]^O[47],ke=O[8]^O[18]^O[28]^O[38]^O[48],Ae=O[9]^O[19]^O[29]^O[39]^O[49],q=ke^(K<<1|Q>>>31),z=Ae^(Q<<1|K>>>31),O[0]^=q,O[1]^=z,O[10]^=q,O[11]^=z,O[20]^=q,O[21]^=z,O[30]^=q,O[31]^=z,O[40]^=q,O[41]^=z,q=J^(ae<<1|ie>>>31),z=X^(ie<<1|ae>>>31),O[2]^=q,O[3]^=z,O[12]^=q,O[13]^=z,O[22]^=q,O[23]^=z,O[32]^=q,O[33]^=z,O[42]^=q,O[43]^=z,q=K^(ue<<1|st>>>31),z=Q^(st<<1|ue>>>31),O[4]^=q,O[5]^=z,O[14]^=q,O[15]^=z,O[24]^=q,O[25]^=z,O[34]^=q,O[35]^=z,O[44]^=q,O[45]^=z,q=ae^(ke<<1|Ae>>>31),z=ie^(Ae<<1|ke>>>31),O[6]^=q,O[7]^=z,O[16]^=q,O[17]^=z,O[26]^=q,O[27]^=z,O[36]^=q,O[37]^=z,O[46]^=q,O[47]^=z,q=ue^(J<<1|X>>>31),z=st^(X<<1|J>>>31),O[8]^=q,O[9]^=z,O[18]^=q,O[19]^=z,O[28]^=q,O[29]^=z,O[38]^=q,O[39]^=z,O[48]^=q,O[49]^=z,at=O[0],me=O[1],It=O[11]<<4|O[10]>>>28,xc=O[10]<<4|O[11]>>>28,Fe=O[20]<<3|O[21]>>>29,Zt=O[21]<<3|O[20]>>>29,Ba=O[31]<<9|O[30]>>>23,Ua=O[30]<<9|O[31]>>>23,Pt=O[40]<<18|O[41]>>>14,Tt=O[41]<<18|O[40]>>>14,St=O[2]<<1|O[3]>>>31,pc=O[3]<<1|O[2]>>>31,Re=O[13]<<12|O[12]>>>20,Qt=O[12]<<12|O[13]>>>20,Ot=O[22]<<10|O[23]>>>22,Mt=O[23]<<10|O[22]>>>22,Be=O[33]<<13|O[32]>>>19,Ct=O[32]<<13|O[33]>>>19,za=O[42]<<2|O[43]>>>30,Va=O[43]<<2|O[42]>>>30,Lt=O[5]<<30|O[4]>>>2,jt=O[4]<<30|O[5]>>>2,kt=O[14]<<6|O[15]>>>26,$t=O[15]<<6|O[14]>>>26,Ie=O[25]<<11|O[24]>>>21,Oe=O[24]<<11|O[25]>>>21,Cc=O[34]<<15|O[35]>>>17,Dt=O[35]<<15|O[34]>>>17,mc=O[45]<<29|O[44]>>>3,Et=O[44]<<29|O[45]>>>3,Ne=O[6]<<28|O[7]>>>4,Le=O[7]<<28|O[6]>>>4,Sc=O[17]<<23|O[16]>>>9,Ft=O[16]<<23|O[17]>>>9,gc=O[26]<<25|O[27]>>>7,At=O[27]<<25|O[26]>>>7,Yt=O[36]<<21|O[37]>>>11,Me=O[37]<<21|O[36]>>>11,Nt=O[47]<<24|O[46]>>>8,Ec=O[46]<<24|O[47]>>>8,wc=O[8]<<27|O[9]>>>5,Rt=O[9]<<27|O[8]>>>5,Xt=O[18]<<20|O[19]>>>12,je=O[19]<<20|O[18]>>>12,Bt=O[29]<<7|O[28]>>>25,Fa=O[28]<<7|O[29]>>>25,_t=O[38]<<8|O[39]>>>24,bc=O[39]<<8|O[38]>>>24,De=O[48]<<14|O[49]>>>18,Jt=O[49]<<14|O[48]>>>18,O[0]=at^~Re&Ie,O[1]=me^~Qt&Oe,O[10]=Ne^~Xt&Fe,O[11]=Le^~je&Zt,O[20]=St^~kt&gc,O[21]=pc^~$t&At,O[30]=wc^~It&Ot,O[31]=Rt^~xc&Mt,O[40]=Lt^~Sc&Bt,O[41]=jt^~Ft&Fa,O[2]=Re^~Ie&Yt,O[3]=Qt^~Oe&Me,O[12]=Xt^~Fe&Be,O[13]=je^~Zt&Ct,O[22]=kt^~gc&_t,O[23]=$t^~At&bc,O[32]=It^~Ot&Cc,O[33]=xc^~Mt&Dt,O[42]=Sc^~Bt&Ba,O[43]=Ft^~Fa&Ua,O[4]=Ie^~Yt&De,O[5]=Oe^~Me&Jt,O[14]=Fe^~Be&mc,O[15]=Zt^~Ct&Et,O[24]=gc^~_t&Pt,O[25]=At^~bc&Tt,O[34]=Ot^~Cc&Nt,O[35]=Mt^~Dt&Ec,O[44]=Bt^~Ba&za,O[45]=Fa^~Ua&Va,O[6]=Yt^~De&at,O[7]=Me^~Jt&me,O[16]=Be^~mc&Ne,O[17]=Ct^~Et&Le,O[26]=_t^~Pt&St,O[27]=bc^~Tt&pc,O[36]=Cc^~Nt&wc,O[37]=Dt^~Ec&Rt,O[46]=Ba^~za&Lt,O[47]=Ua^~Va&jt,O[8]=De^~at&Re,O[9]=Jt^~me&Qt,O[18]=mc^~Ne&Xt,O[19]=Et^~Le&je,O[28]=Pt^~St&kt,O[29]=Tt^~pc&$t,O[38]=Nt^~wc&It,O[39]=Ec^~Rt&xc,O[48]=za^~Lt&Sc,O[49]=Va^~jt&Ft,O[0]^=y[H],O[1]^=y[H+1]};if(a)t.exports=C;else for(R=0;R>=8;return e}function nR(t,e,r){let n=0;for(let s=0;se+1+n&&oo.throwError("child data too short",ee.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function gV(t,e){if(t.length===0&&oo.throwError("data too short",ee.errors.BUFFER_OVERRUN,{}),t[e]>=248){const r=t[e]-247;e+1+r>t.length&&oo.throwError("data short segment too short",ee.errors.BUFFER_OVERRUN,{});const n=nR(t,e+1,r);return e+1+r+n>t.length&&oo.throwError("data long segment too short",ee.errors.BUFFER_OVERRUN,{}),sR(t,e,e+1+r,r+n)}else if(t[e]>=192){const r=t[e]-192;return e+1+r>t.length&&oo.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{}),sR(t,e,e+1,r)}else if(t[e]>=184){const r=t[e]-183;e+1+r>t.length&&oo.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const n=nR(t,e+1,r);e+1+r+n>t.length&&oo.throwError("data array too short",ee.errors.BUFFER_OVERRUN,{});const s=te(t.slice(e+1+r,e+1+r+n));return{consumed:1+r+n,result:s}}else if(t[e]>=128){const r=t[e]-128;e+1+r>t.length&&oo.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 Iw(t){const e=ne(t),r=gV(e,0);return r.consumed!==e.length&&oo.throwArgumentError("invalid rlp data","data",t),r.result}const qme=Object.freeze(Object.defineProperty({__proto__:null,decode:Iw,encode:Ef},Symbol.toStringTag,{value:"Module"})),Wme="address/5.7.0",hl=new ee(Wme);function iR(t){ze(t,20)||hl.throwArgumentError("invalid address","address",t),t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=ne(Ue(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const Hme=9007199254740991;function Gme(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}const C4={};for(let t=0;t<10;t++)C4[String(t)]=String(t);for(let t=0;t<26;t++)C4[String.fromCharCode(65+t)]=String(10+t);const oR=Math.floor(Gme(Hme));function bV(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>C4[n]).join("");for(;e.length>=oR;){let n=e.substring(0,oR);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 Ye(t){let e=null;if(typeof t!="string"&&hl.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=iR(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&hl.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)!==bV(t)&&hl.throwArgumentError("bad icap checksum","address",t),e=Pme(t.substring(4));e.length<40;)e="0"+e;e=iR("0x"+e)}else hl.throwArgumentError("invalid address","address",t);return e}function wV(t){try{return Ye(t),!0}catch{}return!1}function Kme(t){let e=Tme(Ye(t).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+bV("XE00"+e)+e}function E4(t){let e=null;try{e=Ye(t.from)}catch{hl.throwArgumentError("missing from address","transaction",t)}const r=Eo(ne(Z.from(t.nonce).toHexString()));return Ye(Sr(Ue(Ef([e,r])),12))}function Qme(t,e,r){return Io(e)!==32&&hl.throwArgumentError("salt must be 32 bytes","salt",e),Io(r)!==32&&hl.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),Ye(Sr(Ue(Ht(["0xff",Ye(t),e,r])),12))}class Yme extends Ra{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Ye(r)}catch(n){this._throwError(n.message,r)}return e.writeValue(r)}decode(e){return Ye(ht(e.readValue().toHexString(),20))}}class Jme extends Ra{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 Wu=new ee(C0);function xV(t,e,r){let n=null;if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let l={};n=e.map(c=>{const f=c.localName;return f||Wu.throwError("cannot encode object for signature with missing names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]&&Wu.throwError("cannot encode object for signature with duplicate names",ee.errors.INVALID_ARGUMENT,{argument:"values",coder:c,value:r}),l[f]=!0,r[f]})}else Wu.throwArgumentError("invalid tuple value","tuple",r);e.length!==n.length&&Wu.throwArgumentError("types/value length mismatch","tuple",r);let s=new B3(t.wordSize),i=new B3(t.wordSize),o=[];e.forEach((l,c)=>{let f=n[c];if(l.dynamic){let u=i.length;l.encode(i,f);let d=s.writeUpdatableValue();o.push(h=>{d(h+u)})}else l.encode(s,f)}),o.forEach(l=>{l(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function CV(t,e){let r=[],n=t.subReader(0);e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readValue(),l=n.subReader(a.toNumber());try{o=i.decode(l)}catch(c){if(c.code===ee.errors.BUFFER_OVERRUN)throw c;o=c,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(a.code===ee.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}o!=null&&r.push(o)});const s=e.reduce((i,o)=>{const a=o.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});e.forEach((i,o)=>{let a=i.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;const l=r[o];l instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw l}}):r[a]=l});for(let i=0;i{throw o}})}return Object.freeze(r)}class Xme extends Ra{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),this.coder=e,this.length=r}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;ne._data.length&&Wu.throwError("insufficient data length",ee.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let n=[];for(let s=0;s>6===2;o++)i++;return i}return t===es.OVERRUN?r.length-e-1:0}function lpe(t,e,r,n,s){return t===es.OVERLONG?(n.push(s),0):(n.push(65533),AV(t,e,r))}const _V=Object.freeze({error:ape,ignore:AV,replace:lpe});function S4(t,e){e==null&&(e=_V.error),t=ne(t);const r=[];let n=0;for(;n>7)){r.push(s);continue}let i=null,o=null;if((s&224)===192)i=1,o=127;else if((s&240)===224)i=2,o=2047;else if((s&248)===240)i=3,o=65535;else{(s&192)===128?n+=e(es.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(es.BAD_PREFIX,n-1,t,r);continue}if(n-1+i>=t.length){n+=e(es.OVERRUN,n-1,t,r);continue}let a=s&(1<<8-i-1)-1;for(let l=0;l1114111){n+=e(es.OUT_OF_RANGE,n-1-i,t,r,a);continue}if(a>=55296&&a<=57343){n+=e(es.UTF16_SURROGATE,n-1-i,t,r,a);continue}if(a<=o){n+=e(es.OVERLONG,n-1-i,t,r,a);continue}r.push(a)}}return r}function xt(t,e=pa.current){e!=pa.current&&($V.checkNormalize(),t=t.normalize(e));let r=[];for(let n=0;n>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);if(n>=t.length||(i&64512)!==56320)throw new Error("invalid utf-8 string");const o=65536+((s&1023)<<10)+(i&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(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return ne(r)}function wE(t){const e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function cpe(t,e){return'"'+S4(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?wE(r):(r-=65536,wE((r>>10&1023)+55296)+wE((r&1023)+56320))}).join("")+'"'}function z3(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Ia(t,e){return z3(S4(t,e))}function ab(t,e=pa.current){return S4(xt(t,e))}function fpe(t){const e=xt(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return te(Ht([e,ob]).slice(0,32))}function upe(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 Ia(e.slice(0,r))}function dpe(t){if(t.length%4!==0)throw new Error("bad data");let e=[];for(let r=0;r{let i=s.split(":");r+=parseInt(i[0],16),n[r]=e(i[1])}),n}function PV(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 s=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:s,h:e}})}function $4(t,e){let r=0;for(let n=0;n=r&&t<=r+s.h&&(t-r)%(s.d||1)===0){if(s.e&&s.e.indexOf(t-r)!==-1)continue;return s}}return null}const hpe=PV("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"),vpe="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(t=>parseInt(t,16)),ype=[{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}],mpe=k4("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"),ppe=k4("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"),gpe=k4("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",dpe),bpe=PV("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 wpe(t){return t.reduce((e,r)=>(r.forEach(n=>{e.push(n)}),e),[])}function xpe(t){return!!$4(t,hpe)}function Cpe(t){let e=$4(t,ype);if(e)return[t+e.s];let r=mpe[t];if(r)return r;let n=ppe[t];if(n)return[t+n[0]];let s=gpe[t];return s||null}function Epe(t){return!!$4(t,bpe)}function Spe(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();let e=ab(t);e=wpe(e.map(n=>{if(vpe.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];let s=Cpe(n);return s||[n]})),e=ab(z3(e),pa.NFKC),e.forEach(n=>{if(Epe(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(n=>{if(xpe(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=z3(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}class kpe extends EV{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,xt(r))}decode(e){return Ia(super.decode(e))}}class _m extends Ra{constructor(e,r){let n=!1;const s=[];e.forEach(o=>{o.dynamic&&(n=!0),s.push(o.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),this.coders=e}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){return xV(e,this.coders,r)}decode(e){return e.coerce(this.name,CV(e,this.coders))}}const Pm=new ee(C0),$pe=new RegExp(/^bytes([0-9]*)$/),Ape=new RegExp(/^(u?int)([0-9]*)$/);class A4{constructor(e){oe(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Yme(e.name);case"bool":return new Zme(e.name);case"string":return new kpe(e.name);case"bytes":return new epe(e.name);case"array":return new Xme(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _m((e.components||[]).map(n=>this._getCoder(n)),e.name);case"":return new rpe(e.name)}let r=e.type.match(Ape);if(r){let n=parseInt(r[2]||"256");return(n===0||n>256||n%8!==0)&&Pm.throwArgumentError("invalid "+r[1]+" bit length","param",e),new ipe(n/8,r[1]==="int",e.name)}if(r=e.type.match($pe),r){let n=parseInt(r[1]);return(n===0||n>32)&&Pm.throwArgumentError("invalid bytes length","param",e),new tpe(n,e.name)}return Pm.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new ib(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new B3(this._getWordSize())}getDefaultValue(e){const r=e.map(s=>this._getCoder(qr.from(s)));return new _m(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Pm.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(qr.from(o))),s=new _m(n,"_"),i=this._getWriter();return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(o=>this._getCoder(qr.from(o)));return new _m(s,"_").decode(this._getReader(ne(r),n))}}const Gn=new A4;function vl(t){return Ue(xt(t))}const TV="hash/5.7.0";function _4(t){t=atob(t);const e=[];for(let r=0;r0&&Array.isArray(a)?s(a,o-1):r.push(a)})};return s(t,e),r}function Ppe(t){const e={};for(let r=0;r>--l&1}const u=31,d=Math.pow(2,u),h=d>>>1,v=h>>1,y=d-1;let g=0;for(let k=0;k1;){let L=$+x>>>1;k>>1|f(),T=T<<1^h,B=(B^h)<<1|h|1;p=T,w=1+B-T}let E=n-4;return b.map(k=>{switch(k-E){case 3:return E+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return E+256+(t[a++]<<8|t[a++]);case 1:return E+t[a++];default:return k-1}})}function Rpe(t){let e=0;return()=>t[e++]}function Ipe(t){return Rpe(Tpe(t))}function Ope(t){return t&1?~t>>1:t>>1}function Mpe(t,e){let r=Array(t);for(let n=0;ne[o]):r}function Npe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(jpe(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Fpe(r,t))}return Ppe(RV(e))}function Lpe(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(r)}return e}function IV(t,e,r){let n=Array(t).fill(void 0).map(()=>[]);for(let s=0;sn[o].push(i));return n}function jpe(t,e){let r=1+e(),n=e(),s=Lpe(e),i=IV(s.length,1+t,e);return RV(i.map((o,a)=>{const l=o[0],c=o.slice(1);return Array(s[a]).fill(void 0).map((f,u)=>{let d=u*n;return[l+u*r,c.map(h=>h+d)]})}))}function Fpe(t,e){let r=1+e();return IV(r,1+t,e).map(s=>[s[0],s.slice(1)])}function Bpe(t){let e=lb(t).sort((n,s)=>n-s);return r();function r(){let n=[];for(;;){let c=lb(t,e);if(c.length==0)break;n.push({set:new Set(c),node:r()})}n.sort((c,f)=>f.set.size-c.set.size);let s=t(),i=s%3;s=s/3|0;let o=!!(s&1);s>>=1;let a=s==1,l=s==2;return{branches:n,valid:i,fe0f:o,save:a,check:l}}}function Upe(){return Ipe(_4("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 Ow=Upe(),zpe=new Set(lb(Ow)),Vpe=new Set(lb(Ow)),qpe=Npe(Ow),Wpe=Bpe(Ow),lR=45,cR=95;function OV(t){return ab(t)}function Hpe(t){return t.filter(e=>e!=65039)}function MV(t){for(let e of t.split(".")){let r=OV(e);try{for(let n=r.lastIndexOf(cR)-1;n>=0;n--)if(r[n]!==cR)throw new Error("underscore only allowed at start");if(r.length>=4&&r.every(n=>n<128)&&r[2]===lR&&r[3]===lR)throw new Error("invalid label extension")}catch(n){throw new Error(`Invalid label "${e}": ${n.message}`)}}return t}function Gpe(t){return MV(Kpe(t,Hpe))}function Kpe(t,e){let r=OV(t).reverse(),n=[];for(;r.length;){let s=Ype(r);if(s){n.push(...e(s));continue}let i=r.pop();if(zpe.has(i)){n.push(i);continue}if(Vpe.has(i))continue;let o=qpe[i];if(o){n.push(...o);continue}throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return MV(Qpe(String.fromCodePoint(...n)))}function Qpe(t){return t.normalize("NFC")}function Ype(t,e){var r;let n=Wpe,s,i,o=[],a=t.length;for(e&&(e.length=0);a;){let l=t[--a];if(n=(r=n.branches.find(c=>c.set.has(l)))===null||r===void 0?void 0:r.node,!n)break;if(n.save)i=l;else if(n.check&&l===i)break;o.push(l),n.fe0f&&(o.push(65039),a>0&&t[a-1]==65039&&a--),n.valid&&(s=o.slice(),n.valid==2&&s.splice(1,1),e&&e.push(...t.slice(a).reverse()),t.length=a)}return s}const Jpe=new ee(TV),DV=new Uint8Array(32);DV.fill(0);function fR(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function T4(t){const e=xt(Gpe(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s=e.length)throw new Error("invalid ENS name; empty component");return r.push(fR(e.slice(n))),r}function Xpe(t){try{return T4(t).length!==0}catch{}return!1}function av(t){typeof t!="string"&&Jpe.throwArgumentError("invalid ENS name; not a string","name",t);let e=DV;const r=T4(t);for(;r.length;)e=Ue(Ht([e,Ue(r.pop())]));return te(e)}function NV(t){return te(Ht(T4(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 Zpe=`Ethereum Signed Message: +`;function R4(t){return typeof t=="string"&&(t=xt(t)),Ue(Ht([xt(Zpe),xt(String(t.length)),t]))}var ege=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const ir=new ee(TV),LV=new Uint8Array(32);LV.fill(0);const tge=Z.from(-1),jV=Z.from(0),FV=Z.from(1),rge=Z.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function nge(t){const e=ne(t),r=e.length%32;return r?jn([e,LV.slice(r)]):te(e)}const sge=ht(FV.toHexString(),32),ige=ht(jV.toHexString(),32),uR={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},xE=["name","version","chainId","verifyingContract","salt"];function dR(t){return function(e){return typeof e!="string"&&ir.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const oge={name:dR("name"),version:dR("version"),chainId:function(t){try{return Z.from(t).toString()}catch{}return ir.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return Ye(t).toLowerCase()}catch{}return ir.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 ir.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function CE(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))&&ir.throwArgumentError("invalid numeric width","type",t);const s=rge.mask(r?n-1:n),i=r?s.add(FV).mul(tge):jV;return function(o){const a=Z.from(o);return(a.lt(i)||a.gt(s))&&ir.throwArgumentError(`value out-of-bounds for ${t}`,"value",o),ht(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))&&ir.throwArgumentError("invalid bytes width","type",t),function(n){return ne(n).length!==r&&ir.throwArgumentError(`invalid length for ${t}`,"value",n),nge(n)}}}switch(t){case"address":return function(e){return ht(Ye(e),32)};case"bool":return function(e){return e?sge:ige};case"bytes":return function(e){return Ue(e)};case"string":return function(e){return vl(e)}}return null}function hR(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}class Yr{constructor(e){oe(this,"types",Object.freeze(_s(e))),oe(this,"_encoderCache",{}),oe(this,"_types",{});const r={},n={},s={};Object.keys(e).forEach(a=>{r[a]={},n[a]=[],s[a]={}});for(const a in e){const l={};e[a].forEach(c=>{l[c.name]&&ir.throwArgumentError(`duplicate variable name ${JSON.stringify(c.name)} in ${JSON.stringify(a)}`,"types",e),l[c.name]=!0;const f=c.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===a&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!CE(f)&&(n[f]||ir.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),n[f].push(a),r[a][f]=!0)})}const i=Object.keys(n).filter(a=>n[a].length===0);i.length===0?ir.throwArgumentError("missing primary type","types",e):i.length>1&&ir.throwArgumentError(`ambiguous primary types or unused types: ${i.map(a=>JSON.stringify(a)).join(", ")}`,"types",e),oe(this,"primaryType",i[0]);function o(a,l){l[a]&&ir.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),l[a]=!0,Object.keys(r[a]).forEach(c=>{n[c]&&(o(c,l),Object.keys(l).forEach(f=>{s[f][c]=!0}))}),delete l[a]}o(this.primaryType,{});for(const a in s){const l=Object.keys(s[a]);l.sort(),this._types[a]=hR(a,e[a])+l.map(c=>hR(c,e[c])).join("")}}getEncoder(e){let r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r}_getEncoder(e){{const s=CE(e);if(s)return s}const r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const s=r[1],i=this.getEncoder(s),o=parseInt(r[3]);return a=>{o>=0&&a.length!==o&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",a);let l=a.map(i);return this._types[s]&&(l=l.map(Ue)),Ue(jn(l))}}const n=this.types[e];if(n){const s=vl(this._types[e]);return i=>{const o=n.map(({name:a,type:l})=>{const c=this.getEncoder(l)(i[a]);return this._types[l]?Ue(c):c});return o.unshift(s),jn(o)}}return ir.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const r=this._types[e];return r||ir.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return Ue(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(CE(e))return n(e,r);const s=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(s){const o=s[1],a=parseInt(s[3]);return a>=0&&r.length!==a&&ir.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(l=>this._visit(o,l,n))}const i=this.types[e];return i?i.reduce((o,{name:a,type:l})=>(o[a]=this._visit(l,r[a],n),o),{}):ir.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new Yr(e)}static getPrimaryType(e){return Yr.from(e).primaryType}static hashStruct(e,r,n){return Yr.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){const s=uR[n];s||ir.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>xE.indexOf(n.name)-xE.indexOf(s.name)),Yr.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return jn(["0x1901",Yr.hashDomain(e),Yr.from(r).hash(n)])}static hash(e,r,n){return Ue(Yr.encode(e,r,n))}static resolveNames(e,r,n,s){return ege(this,void 0,void 0,function*(){e=Gt(e);const i={};e.verifyingContract&&!ze(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Yr.from(r);o.visit(n,(a,l)=>(a==="address"&&!ze(l,20)&&(i[l]="0x"),l));for(const a in i)i[a]=yield s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,l)=>a==="address"&&i[l]?i[l]:l),{domain:e,value:n}})}static getPayload(e,r,n){Yr.hashDomain(e);const s={},i=[];xE.forEach(l=>{const c=e[l];c!=null&&(s[l]=oge[l](c),i.push({name:l,type:uR[l]}))});const o=Yr.from(r),a=Gt(r);return a.EIP712Domain?ir.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(l,c)=>{if(l.match(/^bytes(\d*)/))return te(ne(c));if(l.match(/^u?int/))return Z.from(c).toString();switch(l){case"address":return c.toLowerCase();case"bool":return!!c;case"string":return typeof c!="string"&&ir.throwArgumentError("invalid string","value",c),c}return ir.throwArgumentError("unsupported type","type",l)})}}}const nr=new ee(C0);class BV extends x0{}class UV extends x0{}class age extends x0{}class cb extends x0{static isIndexed(e){return!!(e&&e._isIndexed)}}const lge={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function vR(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}class en{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,oe(this,"fragments",r.map(n=>po.from(n)).filter(n=>n!=null)),oe(this,"_abiCoder",Ti(new.target,"getAbiCoder")()),oe(this,"functions",{}),oe(this,"errors",{}),oe(this,"events",{}),oe(this,"structs",{}),this.fragments.forEach(n=>{let s=null;switch(n.type){case"constructor":if(this.deploy){nr.warn("duplicate definition - constructor");return}oe(this,"deploy",n);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let i=n.format();if(s[i]){nr.warn("duplicate definition - "+i);return}s[i]=n}),this.deploy||oe(this,"deploy",_i.from({payable:!1,type:"constructor"})),oe(this,"_isInterface",!0)}format(e){e||(e=it.full),e===it.sighash&&nr.throwArgumentError("interface does not support formatting sighash","format",e);const r=this.fragments.map(n=>n.format(e));return e===it.json?JSON.stringify(r.map(n=>JSON.parse(n))):r}static getAbiCoder(){return Gn}static getAddress(e){return Ye(e)}static getSighash(e){return Sr(vl(e.format()),0,4)}static getEventTopic(e){return vl(e.format())}getFunction(e){if(ze(e)){for(const n in this.functions)if(e===this.getSighash(n))return this.functions[n];nr.throwArgumentError("no matching function","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.functions).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching function","name",n):s.length>1&&nr.throwArgumentError("multiple matching functions","name",n),this.functions[s[0]]}const r=this.functions[Pi.fromString(e).format()];return r||nr.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(ze(e)){const n=e.toLowerCase();for(const s in this.events)if(n===this.getEventTopic(s))return this.events[s];nr.throwArgumentError("no matching event","topichash",n)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.events).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching event","name",n):s.length>1&&nr.throwArgumentError("multiple matching events","name",n),this.events[s[0]]}const r=this.events[yo.fromString(e).format()];return r||nr.throwArgumentError("no matching event","signature",e),r}getError(e){if(ze(e)){const n=Ti(this.constructor,"getSighash");for(const s in this.errors){const i=this.errors[s];if(e===n(i))return this.errors[s]}nr.throwArgumentError("no matching error","sighash",e)}if(e.indexOf("(")===-1){const n=e.trim(),s=Object.keys(this.errors).filter(i=>i.split("(")[0]===n);return s.length===0?nr.throwArgumentError("no matching error","name",n):s.length>1&&nr.throwArgumentError("multiple matching errors","name",n),this.errors[s[0]]}const r=this.errors[Pi.fromString(e).format()];return r||nr.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 Ti(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),Ti(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)&&nr.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(Ht([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)&&nr.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(Ht([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let n=ne(r),s=null,i="",o=null,a=null,l=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch{}break;case 4:{const c=te(n.slice(0,4)),f=lge[c];if(f)o=this._abiCoder.decode(f.inputs,n.slice(4)),a=f.name,l=f.signature,f.reason&&(s=o[0]),a==="Error"?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const u=this.getError(c);o=this._abiCoder.decode(u.inputs,n.slice(4)),a=u.name,l=u.format()}catch{}break}}return nr.throwError("call revert exception"+i,ee.errors.CALL_EXCEPTION,{method:e.format(),data:te(r),errorArgs:o,errorName:a,errorSignature:l,reason:s})}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&&nr.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 s=(i,o)=>i.type==="string"?vl(o):i.type==="bytes"?Ue(te(o)):(i.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),i.type.match(/^u?int/)&&(o=Z.from(o).toHexString()),i.type==="address"&&this._abiCoder.encode(["address"],[o]),ht(te(o),32));for(r.forEach((i,o)=>{let a=e.inputs[o];if(!a.indexed){i!=null&&nr.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?nr.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(l=>s(a,l))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));const n=[],s=[],i=[];return e.anonymous||n.push(this.getEventTopic(e)),r.length!==e.inputs.length&&nr.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const l=r[a];if(o.indexed)if(o.type==="string")n.push(vl(l));else if(o.type==="bytes")n.push(Ue(l));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this._abiCoder.encode([o.type],[l]))}else s.push(o),i.push(l)}),{data:this._abiCoder.encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"&&(e=this.getEvent(e)),n!=null&&!e.anonymous){let d=this.getEventTopic(e);(!ze(n[0],32)||n[0].toLowerCase()!==d)&&nr.throwError("fragment/topic mismatch",ee.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:n[0]}),n=n.slice(1)}let s=[],i=[],o=[];e.inputs.forEach((d,h)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(qr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(i.push(d),o.push(!1))});let a=n!=null?this._abiCoder.decode(s,Ht(n)):null,l=this._abiCoder.decode(i,r,!0),c=[],f=0,u=0;e.inputs.forEach((d,h)=>{if(d.indexed)if(a==null)c[h]=new cb({_isIndexed:!0,hash:null});else if(o[h])c[h]=new cb({_isIndexed:!0,hash:a[u++]});else try{c[h]=a[u++]}catch(v){c[h]=v}else try{c[h]=l[f++]}catch(v){c[h]=v}if(d.name&&c[d.name]==null){const v=c[h];v instanceof Error?Object.defineProperty(c,d.name,{enumerable:!0,get:()=>{throw vR(`property ${JSON.stringify(d.name)}`,v)}}):c[d.name]=v}});for(let d=0;d{throw vR(`index ${d}`,h)}})}return Object.freeze(c)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new UV({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Z.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new BV({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 age({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 cge="abstract-provider/5.7.0";var fge=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const uge=new ee(cge);class dge extends x0{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class uc{constructor(){uge.checkAbstract(new.target,uc),oe(this,"_isProvider",!0)}getFeeData(){return fge(this,void 0,void 0,function*(){const{block:e,gasPrice:r}=yield mt({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(o=>null)});let n=null,s=null,i=null;return e&&e.baseFeePerGas&&(n=e.baseFeePerGas,i=Z.from("1500000000"),s=e.baseFeePerGas.mul(2).add(i)),{lastBaseFeePerGas:n,maxFeePerGas:s,maxPriorityFeePerGas:i,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 hge="abstract-signer/5.7.0";var mi=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const zs=new ee(hge),vge=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],yge=[ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED];let Sf=class zV{constructor(){zs.checkAbstract(new.target,zV),oe(this,"_isSigner",!0)}getBalance(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return mi(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const r=yield mt(this.checkTransaction(e));return yield this.provider.estimateGas(r)})}call(e,r){return mi(this,void 0,void 0,function*(){this._checkProvider("call");const n=yield mt(this.checkTransaction(e));return yield this.provider.call(n,r)})}sendTransaction(e){return mi(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 mi(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return mi(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return mi(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(const n in e)vge.indexOf(n)===-1&&zs.throwArgumentError("invalid transaction key: "+n,"transaction",e);const r=Gt(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()&&zs.throwArgumentError("from address mismatch","transaction",e),n[0])),r}populateTransaction(e){return mi(this,void 0,void 0,function*(){const r=yield mt(this.checkTransaction(e));r.to!=null&&(r.to=Promise.resolve(r.to).then(s=>mi(this,void 0,void 0,function*(){if(s==null)return null;const i=yield this.resolveName(s);return i==null&&zs.throwArgumentError("provided ENS name resolves to null","tx.to",s),i})),r.to.catch(s=>{}));const n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||n)?zs.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&zs.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 s=yield this.getFeeData();if(r.type==null)if(s.maxFeePerGas!=null&&s.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const i=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=i,r.maxPriorityFeePerGas=i}else r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas);else s.gasPrice!=null?(n&&zs.throwError("network does not support EIP-1559",ee.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=s.gasPrice),r.type=0):zs.throwError("failed to get consistent fee data",ee.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=s.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=s.maxPriorityFeePerGas))}return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(s=>{if(yge.indexOf(s.code)>=0)throw s;return zs.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{error:s,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(s=>(s[1]!==0&&s[0]!==s[1]&&zs.throwArgumentError("chainId address mismatch","transaction",e),s[0])),yield mt(r)})}_checkProvider(e){this.provider||zs.throwError("missing provider",ee.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}};class I4 extends Sf{constructor(e,r){super(),oe(this,"address",e),oe(this,"provider",r||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,r){return Promise.resolve().then(()=>{zs.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 I4(this.address,e)}}var Ln={},et={},E0=VV;function VV(t,e){if(!t)throw new Error(e||"Assertion failed")}VV.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var V3={},yR={get exports(){return V3},set exports(t){V3=t}};typeof Object.create=="function"?yR.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:yR.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 mge=E0,pge=V3;et.inherits=pge;function gge(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function bge(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),s=0;s>6|192,r[n++]=i&63|128):gge(t,s)?(i=65536+((i&1023)<<10)+(t.charCodeAt(++s)&1023),r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128)}else for(s=0;s>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}et.htonl=qV;function xge(t,e){for(var r="",n=0;n>>0}return i}et.join32=Cge;function Ege(t,e){for(var r=new Array(t.length*4),n=0,s=0;n>>24,r[s+1]=i>>>16&255,r[s+2]=i>>>8&255,r[s+3]=i&255):(r[s+3]=i>>>24,r[s+2]=i>>>16&255,r[s+1]=i>>>8&255,r[s]=i&255)}return r}et.split32=Ege;function Sge(t,e){return t>>>e|t<<32-e}et.rotr32=Sge;function kge(t,e){return t<>>32-e}et.rotl32=kge;function $ge(t,e){return t+e>>>0}et.sum32=$ge;function Age(t,e,r){return t+e+r>>>0}et.sum32_3=Age;function _ge(t,e,r,n){return t+e+r+n>>>0}et.sum32_4=_ge;function Pge(t,e,r,n,s){return t+e+r+n+s>>>0}et.sum32_5=Pge;function Tge(t,e,r,n){var s=t[e],i=t[e+1],o=n+i>>>0,a=(o>>0,t[e+1]=o}et.sum64=Tge;function Rge(t,e,r,n){var s=e+n>>>0,i=(s>>0}et.sum64_hi=Rge;function Ige(t,e,r,n){var s=e+n;return s>>>0}et.sum64_lo=Ige;function Oge(t,e,r,n,s,i,o,a){var l=0,c=e;c=c+n>>>0,l+=c>>0,l+=c>>0,l+=c>>0}et.sum64_4_hi=Oge;function Mge(t,e,r,n,s,i,o,a){var l=e+n+i+a;return l>>>0}et.sum64_4_lo=Mge;function Dge(t,e,r,n,s,i,o,a,l,c){var f=0,u=e;u=u+n>>>0,f+=u>>0,f+=u>>0,f+=u>>0,f+=u>>0}et.sum64_5_hi=Dge;function Nge(t,e,r,n,s,i,o,a,l,c){var f=e+n+i+a+c;return f>>>0}et.sum64_5_lo=Nge;function Lge(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}et.rotr64_hi=Lge;function jge(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.rotr64_lo=jge;function Fge(t,e,r){return t>>>r}et.shr64_hi=Fge;function Bge(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}et.shr64_lo=Bge;var Ph={},mR=et,Uge=E0;function Mw(){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}Ph.BlockHash=Mw;Mw.prototype.update=function(e,r){if(e=mR.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=mR.join32(e,0,e.length-n,this.endian);for(var s=0;s>>24&255,s[i++]=e>>>16&255,s[i++]=e>>>8&255,s[i++]=e&255}else for(s[i++]=e&255,s[i++]=e>>>8&255,s[i++]=e>>>16&255,s[i++]=e>>>24&255,s[i++]=0,s[i++]=0,s[i++]=0,s[i++]=0,o=8;o>>3}jo.g0_256=Hge;function Gge(t){return So(t,17)^So(t,19)^t>>>10}jo.g1_256=Gge;var zd=et,Kge=Ph,Qge=jo,EE=zd.rotl32,h1=zd.sum32,Yge=zd.sum32_5,Jge=Qge.ft_1,YV=Kge.BlockHash,Xge=[1518500249,1859775393,2400959708,3395469782];function Oo(){if(!(this instanceof Oo))return new Oo;YV.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}zd.inherits(Oo,YV);var Zge=Oo;Oo.blockSize=512;Oo.outSize=160;Oo.hmacStrength=80;Oo.padLength=64;Oo.prototype._update=function(e,r){for(var n=this.W,s=0;s<16;s++)n[s]=e[r+s];for(;sthis.blockSize&&(e=new this.Hash().update(e).digest()),Bbe(e.length<=this.blockSize);for(var r=e.length;r>8,d=f&255;u?l.push(u,d):l.push(d)}return l}r.toArray=n;function s(o){return o.length===1?"0"+o:o}r.zero2=s;function i(o){for(var a="",l=0;l(d>>1)-1?y=(d>>1)-g:y=g,h.isubn(y)):y=0,u[v]=y,h.iushrn(1)}return u}r.getNAF=n;function s(l,c){var f=[[],[]];l=l.clone(),c=c.clone();for(var u=0,d=0,h;l.cmpn(-u)>0||c.cmpn(-d)>0;){var v=l.andln(3)+u&3,y=c.andln(3)+d&3;v===3&&(v=-1),y===3&&(y=-1);var g;v&1?(h=l.andln(7)+u&7,(h===3||h===5)&&y===2?g=-v:g=v):g=0,f[0].push(g);var b;y&1?(h=c.andln(7)+d&7,(h===3||h===5)&&v===2?b=-y:b=y):b=0,f[1].push(b),2*u===g+1&&(u=1-u),2*d===b+1&&(d=1-d),l.iushrn(1),c.iushrn(1)}return f}r.getJSF=s;function i(l,c,f){var u="_"+c;l.prototype[c]=function(){return this[u]!==void 0?this[u]:this[u]=f.call(this)}}r.cachedProperty=i;function o(l){return typeof l=="string"?r.toArray(l,"hex"):l}r.parseBytes=o;function a(l){return new Te(l,"hex","le")}r.intFromLE=a}),fb=Ls.getNAF,Vbe=Ls.getJSF,ub=Ls.assert;function dc(t,e){this.type=t,this.p=new Te(e.p,16),this.red=e.prime?Te.red(e.prime):Te.mont(this.p),this.zero=new Te(0).toRed(this.red),this.one=new Te(1).toRed(this.red),this.two=new Te(2).toRed(this.red),this.n=e.n&&new Te(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 Wf=dc;dc.prototype.point=function(){throw new Error("Not implemented")};dc.prototype.validate=function(){throw new Error("Not implemented")};dc.prototype._fixedNafMul=function(e,r){ub(e.precomputed);var n=e._getDoubles(),s=fb(r,1,this._bitLength),i=(1<=a;c--)l=(l<<1)+s[c];o.push(l)}for(var f=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;l--){for(var c=0;l>=0&&o[l]===0;l--)c++;if(l>=0&&c++,a=a.dblp(c),l<0)break;var f=o[l];ub(f!==0),e.type==="affine"?f>0?a=a.mixedAdd(i[f-1>>1]):a=a.mixedAdd(i[-f-1>>1].neg()):f>0?a=a.add(i[f-1>>1]):a=a.add(i[-f-1>>1].neg())}return e.type==="affine"?a.toP():a};dc.prototype._wnafMulAdd=function(e,r,n,s,i){var o=this._wnafT1,a=this._wnafT2,l=this._wnafT3,c=0,f,u,d;for(f=0;f=1;f-=2){var v=f-1,y=f;if(o[v]!==1||o[y]!==1){l[v]=fb(n[v],o[v],this._bitLength),l[y]=fb(n[y],o[y],this._bitLength),c=Math.max(l[v].length,c),c=Math.max(l[y].length,c);continue}var g=[r[v],null,null,r[y]];r[v].y.cmp(r[y].y)===0?(g[1]=r[v].add(r[y]),g[2]=r[v].toJ().mixedAdd(r[y].neg())):r[v].y.cmp(r[y].y.redNeg())===0?(g[1]=r[v].toJ().mixedAdd(r[y]),g[2]=r[v].add(r[y].neg())):(g[1]=r[v].toJ().mixedAdd(r[y]),g[2]=r[v].toJ().mixedAdd(r[y].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],p=Vbe(n[v],n[y]);for(c=Math.max(p[0].length,c),l[v]=new Array(c),l[y]=new Array(c),u=0;u=0;f--){for(var x=0;f>=0;){var T=!0;for(u=0;u=0&&x++,k=k.dblp(x),f<0)break;for(u=0;u0?d=a[u][B-1>>1]:B<0&&(d=a[u][-B-1>>1].neg()),d.type==="affine"?k=k.mixedAdd(d):k=k.add(d))}}for(f=0;f=Math.ceil((e.bitLength()+1)/r.step):!1};fi.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],s=this,i=0;i=0&&(h=c,v=f),u.negative&&(u=u.neg(),d=d.neg()),h.negative&&(h=h.neg(),v=v.neg()),[{a:u,b:d},{a:h,b:v}]};ui.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],s=r[1],i=s.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),l=o.mul(s.a),c=i.mul(n.b),f=o.mul(s.b),u=e.sub(a).sub(l),d=c.add(f).neg();return{k1:u,k2:d}};ui.prototype.pointFromX=function(e,r){e=new Te(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=n.redSqrt();if(s.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var i=s.fromRed().isOdd();return(r&&!i||!r&&i)&&(s=s.redNeg()),this.point(e,s)};ui.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,s=this.a.redMul(r),i=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return n.redSqr().redISub(i).cmpn(0)===0};ui.prototype._endoWnafMulAdd=function(e,r,n){for(var s=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""};rn.prototype.isInfinity=function(){return this.inf};rn.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),s=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,s)};rn.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(),s=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(s),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)};rn.prototype.getX=function(){return this.x.fromRed()};rn.prototype.getY=function(){return this.y.fromRed()};rn.prototype.mul=function(e){return e=new Te(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)};rn.prototype.mulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i):this.curve._wnafMulAdd(1,s,i,2)};rn.prototype.jmulAdd=function(e,r,n){var s=[this,r],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(s,i,!0):this.curve._wnafMulAdd(1,s,i,2,!0)};rn.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)};rn.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,s=function(i){return i.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(s)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(s)}}}return r};rn.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 hn(t,e,r,n){Wf.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Te(0)):(this.x=new Te(e,16),this.y=new Te(r,16),this.z=new Te(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}M4(hn,Wf.BasePoint);ui.prototype.jpoint=function(e,r,n){return new hn(this,e,r,n)};hn.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),s=this.y.redMul(r).redMul(e);return this.curve.point(n,s)};hn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};hn.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),s=this.x.redMul(r),i=e.x.redMul(n),o=this.y.redMul(r.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),l=s.redSub(i),c=o.redSub(a);if(l.cmpn(0)===0)return c.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var f=l.redSqr(),u=f.redMul(l),d=s.redMul(f),h=c.redSqr().redIAdd(u).redISub(d).redISub(d),v=c.redMul(d.redISub(h)).redISub(o.redMul(u)),y=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(h,v,y)};hn.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,s=e.x.redMul(r),i=this.y,o=e.y.redMul(r).redMul(this.z),a=n.redSub(s),l=i.redSub(o);if(a.cmpn(0)===0)return l.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=n.redMul(c),d=l.redSqr().redIAdd(f).redISub(u).redISub(u),h=l.redMul(u.redISub(d)).redISub(i.redMul(f)),v=this.z.redMul(a);return this.curve.jpoint(d,h,v)};hn.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(i),this.x.cmp(n)===0)return!0}};hn.prototype.inspect=function(){return this.isInfinity()?"":""};hn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ip=Ih(function(t,e){var r=e;r.base=Wf,r.short=Wbe,r.mont=null,r.edwards=null}),Op=Ih(function(t,e){var r=e,n=Ls.assert;function s(a){a.type==="short"?this.curve=new Ip.short(a):a.type==="edwards"?this.curve=new Ip.edwards(a):this.curve=new Ip.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=s;function i(a,l){Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:function(){var c=new s(l);return Object.defineProperty(r,a,{configurable:!0,enumerable:!0,value:c}),c}})}i("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:Ln.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:Ln.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:Ln.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:Ln.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"]}),i("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:Ln.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ln.sha256,gRed:!1,g:["9"]}),i("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:Ln.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var o;try{o=null.crash()}catch{o=void 0}i("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:Ln.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",o]})});function Gl(t){if(!(this instanceof Gl))return new Gl(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=Ri.toArray(t.entropy,t.entropyEnc||"hex"),r=Ri.toArray(t.nonce,t.nonceEnc||"hex"),n=Ri.toArray(t.pers,t.persEnc||"hex");O4(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}var lq=Gl;Gl.prototype._init=function(e,r,n){var s=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Gl.prototype.generate=function(e,r,n,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=n,n=r,r=null),n&&(n=Ri.toArray(n,s||"hex"),this._update(n));for(var i=[];i.length"};var Hbe=Ls.assert;function Dw(t,e){if(t instanceof Dw)return t;this._importDER(t,e)||(Hbe(t.r&&t.s,"Signature without r or s"),this.r=new Te(t.r,16),this.s=new Te(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Nw=Dw;function Gbe(){this.place=0}function $E(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 s=0,i=0,o=e.place;i>>=0;return s<=127?!1:(e.place=o,s)}function wR(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)}Dw.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=wR(r),n=wR(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var s=[2];AE(s,r.length),s=s.concat(r),s.push(2),AE(s,n.length);var i=s.concat(n),o=[48];return AE(o,i.length),o=o.concat(i),Ls.encode(o,e)};var Kbe=function(){throw new Error("unsupported")},cq=Ls.assert;function ii(t){if(!(this instanceof ii))return new ii(t);typeof t=="string"&&(cq(Object.prototype.hasOwnProperty.call(Op,t),"Unknown curve "+t),t=Op[t]),t instanceof Op.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 Qbe=ii;ii.prototype.keyPair=function(e){return new D4(this,e)};ii.prototype.keyFromPrivate=function(e,r){return D4.fromPrivate(this,e,r)};ii.prototype.keyFromPublic=function(e,r){return D4.fromPublic(this,e,r)};ii.prototype.genKeyPair=function(e){e||(e={});for(var r=new lq({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Kbe(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),s=this.n.sub(new Te(2));;){var i=new Te(r.generate(n));if(!(i.cmp(s)>0))return i.iaddn(1),this.keyFromPrivate(i)}};ii.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};ii.prototype.sign=function(e,r,n,s){typeof n=="object"&&(s=n,n=null),s||(s={}),r=this.keyFromPrivate(r,n),e=this._truncateToN(new Te(e,16));for(var i=this.n.byteLength(),o=r.getPrivate().toArray("be",i),a=e.toArray("be",i),l=new lq({hash:this.hash,entropy:o,nonce:a,pers:s.pers,persEnc:s.persEnc||"utf8"}),c=this.n.sub(new Te(1)),f=0;;f++){var u=s.k?s.k(f):new Te(l.generate(this.n.byteLength()));if(u=this._truncateToN(u,!0),!(u.cmpn(1)<=0||u.cmp(c)>=0)){var d=this.g.mul(u);if(!d.isInfinity()){var h=d.getX(),v=h.umod(this.n);if(v.cmpn(0)!==0){var y=u.invm(this.n).mul(v.mul(r.getPrivate()).iadd(e));if(y=y.umod(this.n),y.cmpn(0)!==0){var g=(d.getY().isOdd()?1:0)|(h.cmp(v)!==0?2:0);return s.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new Nw({r:v,s:y,recoveryParam:g})}}}}}};ii.prototype.verify=function(e,r,n,s){e=this._truncateToN(new Te(e,16)),n=this.keyFromPublic(n,s),r=new Nw(r,"hex");var i=r.r,o=r.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0||o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a=o.invm(this.n),l=a.mul(e).umod(this.n),c=a.mul(i).umod(this.n),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.eqXToP(i)):(f=this.g.mulAdd(l,n.getPublic(),c),f.isInfinity()?!1:f.getX().umod(this.n).cmp(i)===0)};ii.prototype.recoverPubKey=function(t,e,r,n){cq((3&r)===r,"The recovery param is more than two bits"),e=new Nw(e,n);var s=this.n,i=new Te(t),o=e.r,a=e.s,l=r&1,c=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");c?o=this.curve.pointFromX(o.add(this.curve.n),l):o=this.curve.pointFromX(o,l);var f=e.r.invm(s),u=s.sub(i).mul(f).umod(s),d=a.mul(f).umod(s);return this.g.mulAdd(u,o,d)};ii.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new Nw(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var i;try{i=this.recoverPubKey(t,e,s)}catch{continue}if(i.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var Ybe=Ih(function(t,e){var r=e;r.version="6.5.4",r.utils=Ls,r.rand=function(){throw new Error("unsupported")},r.curve=Ip,r.curves=Op,r.ec=Qbe,r.eddsa=null}),Jbe=Ybe.ec;const Xbe="signing-key/5.7.0",G3=new ee(Xbe);let _E=null;function ao(){return _E||(_E=new Jbe("secp256k1")),_E}class db{constructor(e){oe(this,"curve","secp256k1"),oe(this,"privateKey",te(e)),Io(this.privateKey)!==32&&G3.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const r=ao().keyFromPrivate(ne(this.privateKey));oe(this,"publicKey","0x"+r.getPublic(!1,"hex")),oe(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),oe(this,"_isSigningKey",!0)}_addPoint(e){const r=ao().keyFromPublic(ne(this.publicKey)),n=ao().keyFromPublic(ne(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")}signDigest(e){const r=ao().keyFromPrivate(ne(this.privateKey)),n=ne(e);n.length!==32&&G3.throwArgumentError("bad digest length","digest",e);const s=r.sign(n,{canonical:!0});return qf({recoveryParam:s.recoveryParam,r:ht("0x"+s.r.toString(16),32),s:ht("0x"+s.s.toString(16),32)})}computeSharedSecret(e){const r=ao().keyFromPrivate(ne(this.privateKey)),n=ao().keyFromPublic(ne(N4(e)));return ht("0x"+r.derive(n.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function fq(t,e){const r=qf(e),n={r:ne(r.r),s:ne(r.s)};return"0x"+ao().recoverPubKey(ne(t),n,r.recoveryParam).encode("hex",!1)}function N4(t,e){const r=ne(t);if(r.length===32){const n=new db(r);return e?"0x"+ao().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?te(r):"0x"+ao().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+ao().keyFromPublic(r).getPublic(!0,"hex"):te(r)}return G3.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Zbe="transactions/5.7.0",Cn=new ee(Zbe);var K3;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(K3||(K3={}));function L4(t){return t==="0x"?null:Ye(t)}function xn(t){return t==="0x"?rr:Z.from(t)}const e2e=[{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"}],t2e={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function j4(t){const e=N4(t);return Ye(Sr(Ue(Sr(e,1)),12))}function $f(t,e){return j4(fq(ne(t),e))}function bs(t,e){const r=Eo(Z.from(t).toHexString());return r.length>32&&Cn.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function PE(t,e){return{address:Ye(t),storageKeys:(e||[]).map((r,n)=>(Io(r)!==32&&Cn.throwArgumentError("invalid access list storageKey",`accessList[${t}:${n}]`,r),r.toLowerCase()))}}function Hf(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(r.length>2&&Cn.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${n}]`,r),PE(r[0],r[1])):PE(r.address,r.storageKeys));const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return PE(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function uq(t){return Hf(t).map(e=>[e.address,e.storageKeys])}function dq(t,e){if(t.gasPrice!=null){const n=Z.from(t.gasPrice),s=Z.from(t.maxFeePerGas||0);n.eq(s)||Cn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:s})}const r=[bs(t.chainId||0,"chainId"),bs(t.nonce||0,"nonce"),bs(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),bs(t.maxFeePerGas||0,"maxFeePerGas"),bs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",bs(t.value||0,"value"),t.data||"0x",uq(t.accessList||[])];if(e){const n=qf(e);r.push(bs(n.recoveryParam,"recoveryParam")),r.push(Eo(n.r)),r.push(Eo(n.s))}return jn(["0x02",Ef(r)])}function hq(t,e){const r=[bs(t.chainId||0,"chainId"),bs(t.nonce||0,"nonce"),bs(t.gasPrice||0,"gasPrice"),bs(t.gasLimit||0,"gasLimit"),t.to!=null?Ye(t.to):"0x",bs(t.value||0,"value"),t.data||"0x",uq(t.accessList||[])];if(e){const n=qf(e);r.push(bs(n.recoveryParam,"recoveryParam")),r.push(Eo(n.r)),r.push(Eo(n.s))}return jn(["0x01",Ef(r)])}function r2e(t,e){w4(t,t2e);const r=[];e2e.forEach(function(o){let a=t[o.name]||[];const l={};o.numeric&&(l.hexPad="left"),a=ne(te(a,l)),o.length&&a.length!==o.length&&a.length>0&&Cn.throwArgumentError("invalid length for "+o.name,"transaction:"+o.name,a),o.maxLength&&(a=Eo(a),a.length>o.maxLength&&Cn.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"&&Cn.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!ma(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 Ef(r);const s=qf(e);let i=27+s.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),i+=n*2+8,s.v>28&&s.v!==i&&Cn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):s.v!==i&&Cn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push(te(i)),r.push(Eo(ne(s.r))),r.push(Eo(ne(s.s))),Ef(r)}function n2e(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&Cn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),r2e(t,e);switch(t.type){case 1:return hq(t,e);case 2:return dq(t,e)}return Cn.throwError(`unsupported transaction type: ${t.type}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}function vq(t,e,r){try{const n=xn(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{Cn.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=ht(e[1],32),t.s=ht(e[2],32);try{const n=Ue(r(t));t.from=$f(n,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function s2e(t){const e=Iw(t.slice(1));e.length!==9&&e.length!==12&&Cn.throwArgumentError("invalid component count for transaction type: 2","payload",te(t));const r=xn(e[2]),n=xn(e[3]),s={type:2,chainId:xn(e[0]).toNumber(),nonce:xn(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:xn(e[4]),to:L4(e[5]),value:xn(e[6]),data:e[7],accessList:Hf(e[8])};return e.length===9||(s.hash=Ue(t),vq(s,e.slice(9),dq)),s}function i2e(t){const e=Iw(t.slice(1));e.length!==8&&e.length!==11&&Cn.throwArgumentError("invalid component count for transaction type: 1","payload",te(t));const r={type:1,chainId:xn(e[0]).toNumber(),nonce:xn(e[1]).toNumber(),gasPrice:xn(e[2]),gasLimit:xn(e[3]),to:L4(e[4]),value:xn(e[5]),data:e[6],accessList:Hf(e[7])};return e.length===8||(r.hash=Ue(t),vq(r,e.slice(8),hq)),r}function o2e(t){const e=Iw(t);e.length!==9&&e.length!==6&&Cn.throwArgumentError("invalid raw transaction","rawTransaction",t);const r={nonce:xn(e[0]).toNumber(),gasPrice:xn(e[1]),gasLimit:xn(e[2]),to:L4(e[3]),value:xn(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Z.from(e[6]).toNumber()}catch{return r}if(r.r=ht(e[7],32),r.s=ht(e[8],32),Z.from(r.r).isZero()&&Z.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 s=e.slice(0,6);r.chainId!==0&&(s.push(te(r.chainId)),s.push("0x"),s.push("0x"),n-=r.chainId*2+8);const i=Ue(Ef(s));try{r.from=$f(i,{r:te(r.r),s:te(r.s),recoveryParam:n})}catch{}r.hash=Ue(t)}return r.type=null,r}function yq(t){const e=ne(t);if(e[0]>127)return o2e(e);switch(e[0]){case 1:return i2e(e);case 2:return s2e(e)}return Cn.throwError(`unsupported transaction type: ${e[0]}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}const a2e="contracts/5.7.0";var Af=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Er=new ee(a2e);function hb(t,e){return Af(this,void 0,void 0,function*(){const r=yield e;typeof r!="string"&&Er.throwArgumentError("invalid address or ENS name","name",r);try{return Ye(r)}catch{}t||Er.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&&Er.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function Mp(t,e,r){return Af(this,void 0,void 0,function*(){return Array.isArray(r)?yield Promise.all(r.map((n,s)=>Mp(t,Array.isArray(e)?e[s]:e[n.name],n))):r.type==="address"?yield hb(t,e):r.type==="tuple"?yield Mp(t,e,r.components):r.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(n=>Mp(t,n,r.arrayChildren))):Promise.reject(Er.makeError("invalid value for array",ee.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Lw(t,e,r){return Af(this,void 0,void 0,function*(){let n={};r.length===e.inputs.length+1&&typeof r[r.length-1]=="object"&&(n=Gt(r.pop())),Er.checkArgumentCount(r.length,e.inputs.length,"passed to contract"),t.signer?n.from?n.from=mt({override:hb(t.signer,n.from),signer:t.signer.getAddress()}).then(c=>Af(this,void 0,void 0,function*(){return Ye(c.signer)!==c.override&&Er.throwError("Contract with a Signer cannot override from",ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),c.override})):n.from=t.signer.getAddress():n.from&&(n.from=hb(t.provider,n.from));const s=yield mt({args:Mp(t.signer||t.provider,r,e.inputs),address:t.resolvedAddress,overrides:mt(n)||{}}),i=t.interface.encodeFunctionData(e,s.args),o={data:i,to:s.address},a=s.overrides;if(a.nonce!=null&&(o.nonce=Z.from(a.nonce).toNumber()),a.gasLimit!=null&&(o.gasLimit=Z.from(a.gasLimit)),a.gasPrice!=null&&(o.gasPrice=Z.from(a.gasPrice)),a.maxFeePerGas!=null&&(o.maxFeePerGas=Z.from(a.maxFeePerGas)),a.maxPriorityFeePerGas!=null&&(o.maxPriorityFeePerGas=Z.from(a.maxPriorityFeePerGas)),a.from!=null&&(o.from=a.from),a.type!=null&&(o.type=a.type),a.accessList!=null&&(o.accessList=Hf(a.accessList)),o.gasLimit==null&&e.gas!=null){let c=21e3;const f=ne(i);for(let u=0;un[c]!=null);return l.length&&Er.throwError(`cannot override ${l.map(c=>JSON.stringify(c)).join(",")}`,ee.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),o})}function l2e(t,e){return function(...r){return Lw(t,e,r)}}function c2e(t,e){const r=t.signer||t.provider;return function(...n){return Af(this,void 0,void 0,function*(){r||Er.throwError("estimate require a provider or signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const s=yield Lw(t,e,n);return yield r.estimateGas(s)})}}function f2e(t,e){const r=e.wait.bind(e);e.wait=n=>r(n).then(s=>(s.events=s.logs.map(i=>{let o=_s(i),a=null;try{a=t.interface.parseLog(i)}catch{}return a&&(o.args=a.args,o.decode=(l,c)=>t.interface.decodeEventLog(a.eventFragment,l,c),o.event=a.name,o.eventSignature=a.signature),o.removeListener=()=>t.provider,o.getBlock=()=>t.provider.getBlock(s.blockHash),o.getTransaction=()=>t.provider.getTransaction(s.transactionHash),o.getTransactionReceipt=()=>Promise.resolve(s),o}),s))}function mq(t,e,r){const n=t.signer||t.provider;return function(...s){return Af(this,void 0,void 0,function*(){let i;if(s.length===e.inputs.length+1&&typeof s[s.length-1]=="object"){const l=Gt(s.pop());l.blockTag!=null&&(i=yield l.blockTag),delete l.blockTag,s.push(l)}t.deployTransaction!=null&&(yield t._deployed(i));const o=yield Lw(t,e,s),a=yield n.call(o,i);try{let l=t.interface.decodeFunctionResult(e,a);return r&&e.outputs.length===1&&(l=l[0]),l}catch(l){throw l.code===ee.errors.CALL_EXCEPTION&&(l.address=t.address,l.args=s,l.transaction=o),l}})}}function u2e(t,e){return function(...r){return Af(this,void 0,void 0,function*(){t.signer||Er.throwError("sending a transaction requires a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),t.deployTransaction!=null&&(yield t._deployed());const n=yield Lw(t,e,r),s=yield t.signer.sendTransaction(n);return f2e(t,s),s})}}function xR(t,e,r){return e.constant?mq(t,e,r):u2e(t,e)}function pq(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 _y{constructor(e,r){oe(this,"tag",e),oe(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 s=e.slice();return setTimeout(()=>{n.listener.apply(this,s)},0),!n.once}),r}prepareEvent(e){}getEmit(e){return[e]}}class d2e extends _y{constructor(){super("error",null)}}class CR extends _y{constructor(e,r,n,s){const i={address:e};let o=r.getEventTopic(n);s?(o!==s[0]&&Er.throwArgumentError("topic mismatch","topics",s),i.topics=s.slice()):i.topics=[o],super(pq(i),i),oe(this,"address",e),oe(this,"interface",r),oe(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=mV(e.args);if(r.length)throw r[0].error;const n=(e.args||[]).slice();return n.push(e),n}}class ER extends _y{constructor(e,r){super("*",{address:e}),oe(this,"address",e),oe(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,s)=>this.interface.decodeEventLog(r.eventFragment,n,s),e.args=r.args}catch{}}}class h2e{constructor(e,r,n){oe(this,"interface",Ti(new.target,"getInterface")(r)),n==null?(oe(this,"provider",null),oe(this,"signer",null)):Sf.isSigner(n)?(oe(this,"provider",n.provider||null),oe(this,"signer",n)):uc.isProvider(n)?(oe(this,"provider",n),oe(this,"signer",null)):Er.throwArgumentError("invalid signer or provider","signerOrProvider",n),oe(this,"callStatic",{}),oe(this,"estimateGas",{}),oe(this,"functions",{}),oe(this,"populateTransaction",{}),oe(this,"filters",{});{const o={};Object.keys(this.interface.events).forEach(a=>{const l=this.interface.events[a];oe(this.filters,a,(...c)=>({address:this.address,topics:this.interface.encodeFilterTopics(l,c)})),o[l.name]||(o[l.name]=[]),o[l.name].push(a)}),Object.keys(o).forEach(a=>{const l=o[a];l.length===1?oe(this.filters,a,this.filters[l[0]]):Er.warn(`Duplicate definition of ${a} (${l.join(", ")})`)})}if(oe(this,"_runningEvents",{}),oe(this,"_wrappedEmits",{}),e==null&&Er.throwArgumentError("invalid contract address or ENS name","addressOrName",e),oe(this,"address",e),this.provider)oe(this,"resolvedAddress",hb(this.provider,e));else try{oe(this,"resolvedAddress",Promise.resolve(Ye(e)))}catch{Er.throwError("provider is required to use ENS name as contract address",ee.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(o=>{});const s={},i={};Object.keys(this.interface.functions).forEach(o=>{const a=this.interface.functions[o];if(i[o]){Er.warn(`Duplicate ABI entry for ${JSON.stringify(o)}`);return}i[o]=!0;{const l=a.name;s[`%${l}`]||(s[`%${l}`]=[]),s[`%${l}`].push(o)}this[o]==null&&oe(this,o,xR(this,a,!0)),this.functions[o]==null&&oe(this.functions,o,xR(this,a,!1)),this.callStatic[o]==null&&oe(this.callStatic,o,mq(this,a,!0)),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,l2e(this,a)),this.estimateGas[o]==null&&oe(this.estimateGas,o,c2e(this,a))}),Object.keys(s).forEach(o=>{const a=s[o];if(a.length>1)return;o=o.substring(1);const l=a[0];try{this[o]==null&&oe(this,o,this[l])}catch{}this.functions[o]==null&&oe(this.functions,o,this.functions[l]),this.callStatic[o]==null&&oe(this.callStatic,o,this.callStatic[l]),this.populateTransaction[o]==null&&oe(this.populateTransaction,o,this.populateTransaction[l]),this.estimateGas[o]==null&&oe(this.estimateGas,o,this.estimateGas[l])})}static getContractAddress(e){return E4(e)}static getInterface(e){return en.isInterface(e)?e:new en(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"&&Er.throwError("contract not deployed",ee.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Er.throwError("sending a transactions require a signer",ee.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=Gt(e||{});return["from","to"].forEach(function(n){r[n]!=null&&Er.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 I4(e,this.provider));const r=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&oe(r,"deployTransaction",this.deployTransaction),r}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return cb.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 d2e);if(e==="event")return this._normalizeRunningEvent(new _y("event",null));if(e==="*")return this._normalizeRunningEvent(new ER(this.address,this.interface));const r=this.interface.getEvent(e);return this._normalizeRunningEvent(new CR(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 s=this.interface.getEvent(n);return this._normalizeRunningEvent(new CR(this.address,this.interface,s,e.topics))}catch{}const r={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new _y(pq(r),r))}return this._normalizeRunningEvent(new ER(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 s=_s(r);return s.removeListener=()=>{n&&(e.removeListener(n),this._checkRunningEvents(e))},s.getBlock=()=>this.provider.getBlock(r.blockHash),s.getTransaction=()=>this.provider.getTransaction(r.transactionHash),s.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),e.prepareEvent(s),s}_addEventListener(e,r,n){if(this.provider||Er.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 s=i=>{let o=this._wrapEvent(e,i,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]=s,e.filter!=null&&this.provider.on(e.filter,s)}}queryFilter(e,r,n){const s=this._getRunningEvent(e),i=Gt(s.filter);return typeof r=="string"&&ze(r,32)?(n!=null&&Er.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),i.blockHash=r):(i.fromBlock=r??0,i.toBlock=n??"latest"),this.provider.getLogs(i).then(o=>o.map(a=>this._wrapEvent(s,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),s=n.run(r)>0;return this._checkRunningEvents(n),s}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(s=>{r.push(s)});return r}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(e==null){for(const n in this._runningEvents){const s=this._runningEvents[n];s.removeAllListeners(),this._checkRunningEvents(s)}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 Oh extends h2e{}class gq{constructor(e){oe(this,"alphabet",e),oe(this,"base",e.length),oe(this,"_alphabetMap",{}),oe(this,"_leader",e.charAt(0));for(let r=0;r0;)n.push(o%this.base),o=o/this.base|0}let s="";for(let i=0;r[i]===0&&i=0;--i)s+=this.alphabet[n[i]];return s}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(;i>0;)r.push(i&255),i>>=8}for(let n=0;e[n]===this._leader&&n>24&255,l[e.length+1]=u>>16&255,l[e.length+2]=u>>8&255,l[e.length+3]=u&255;let d=ne(Py(s,t,l));i||(i=d.length,f=new Uint8Array(i),o=Math.ceil(n/i),c=n-(o-1)*i),f.set(d);for(let y=1;y=256)throw new Error("Depth too large!");return $R(Ht([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",te(this.depth),this.parentFingerprint,ht(te(this.index),4),this.chainCode,this.privateKey!=null?Ht(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Ho(cu,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 u=24;u>=0;u-=8)n[33+(u>>3)]=e>>24-u&255;const s=ne(Py(Hd.sha512,this.chainCode,n)),i=s.slice(0,32),o=s.slice(32);let a=null,l=null;this.privateKey?a=Rm(Z.from(i).add(this.privateKey).mod(E2e)):l=new db(te(i))._addPoint(this.publicKey);let c=r;const f=this.mnemonic;return f&&(c=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new Ho(cu,a,l,this.fingerprint,Rm(o),e,this.depth+1,c)}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 s=0;s=$u)throw new Error("invalid path index - "+i);n=n._derive($u+o)}else if(i.match(/^[0-9]+$/)){const o=parseInt(i);if(o>=$u)throw new Error("invalid path index - "+i);n=n._derive(o)}else throw new Error("invalid path component - "+i)}return n}static _fromSeed(e,r){const n=ne(e);if(n.length<16||n.length>64)throw new Error("invalid seed");const s=ne(Py(Hd.sha512,S2e,n));return new Ho(cu,Rm(s.slice(0,32)),null,"0x00000000",Rm(s.slice(32)),0,0,r)}static fromMnemonic(e,r,n){return n=F4(n),e=Eq(B4(e,n),n),Ho._fromSeed(Cq(e,r),{phrase:e,path:"m",locale:n.locale})}static fromSeed(e){return Ho._fromSeed(e,null)}static fromExtendedKey(e){const r=Wd.decode(e);(r.length!==82||$R(r.slice(0,78))!==e)&&Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const n=r[4],s=te(r.slice(5,9)),i=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 Ho(cu,null,te(a),s,o,i,n,null);case"0x0488ade4":case"0x04358394 ":if(a[0]!==0)break;return new Ho(cu,te(a.slice(1)),null,s,o,i,n,null)}return Ty.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function Cq(t,e){e||(e="");const r=xt("mnemonic"+e,pa.NFKD);return p2e(xt(t,pa.NFKD),r,2048,64,"sha512")}function B4(t,e){e=F4(e),Ty.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 s=0;for(let c=0;c>3]|=1<<7-s%8),s++}const i=32*r.length/3,o=r.length/3,a=xq(o);if((ne(wa(n.slice(0,i/8)))[0]&a)!==(n[n.length-1]&a))throw new Error("invalid checksum");return te(n.slice(0,i/8))}function Eq(t,e){if(e=F4(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]&k2e(8-n)),n+=3);const s=t.length/4,i=ne(wa(t))[0]&xq(s);return r[r.length-1]<<=s,r[r.length-1]|=i>>8-s,e.join(r.map(o=>e.getWord(o)))}function A2e(t,e){try{return B4(t,e),!0}catch{}return!1}function _2e(t){return(typeof t!="number"||t<0||t>=$u||t%1)&&Ty.throwArgumentError("invalid account index","index",t),`m/44'/60'/${t}'/0/0`}const P2e="random/5.7.0",Q3=new ee(P2e);function T2e(){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 AR=T2e();let Dp=AR.crypto||AR.msCrypto;(!Dp||!Dp.getRandomValues)&&(Q3.warn("WARNING: Missing strong random number source"),Dp={getRandomValues:function(t){return Q3.throwError("no secure random source avaialble",ee.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function jw(t){(t<=0||t>1024||t%1||t!=t)&&Q3.throwArgumentError("invalid length","length",t);const e=new Uint8Array(t);return Dp.getRandomValues(e),ne(e)}function Sq(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 R2e(t){let e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}function I2e(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 O2e(t){if(R2e(t))try{return Ye(JSON.parse(t).ethaddr)}catch{return null}if(I2e(t))try{return Ye(JSON.parse(t).address)}catch{return null}return null}globalThis&&globalThis.__awaiter;function kq(t,e){return $f(R4(t),e)}function M2e(t,e,r,n){return $f(Yr.hash(t,e,r),n)}const D2e="networks/5.7.1",_R=new ee(D2e);function N2e(t){return t&&typeof t.renetwork=="function"}function Yo(t){const e=function(r,n){n==null&&(n={});const s=[];if(r.InfuraProvider&&n.infura!=="-")try{s.push(new r.InfuraProvider(t,n.infura))}catch{}if(r.EtherscanProvider&&n.etherscan!=="-")try{s.push(new r.EtherscanProvider(t,n.etherscan))}catch{}if(r.AlchemyProvider&&n.alchemy!=="-")try{s.push(new r.AlchemyProvider(t,n.alchemy))}catch{}if(r.PocketProvider&&n.pocket!=="-"){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new r.PocketProvider(t,n.pocket);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}}if(r.CloudflareProvider&&n.cloudflare!=="-")try{s.push(new r.CloudflareProvider(t))}catch{}if(r.AnkrProvider&&n.ankr!=="-")try{const i=["ropsten"],o=new r.AnkrProvider(t,n.ankr);o.network&&i.indexOf(o.network.name)===-1&&s.push(o)}catch{}if(s.length===0)return null;if(r.FallbackProvider){let i=1;return n.quorum!=null?i=n.quorum:t==="homestead"&&(i=2),new r.FallbackProvider(s,i)}return s[0]};return e.renetwork=function(r){return Yo(r)},e}function vb(t,e){const r=function(n,s){return n.JsonRpcProvider?new n.JsonRpcProvider(t,e):null};return r.renetwork=function(n){return vb(t,n)},r}const PR={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:Yo("homestead")},TR={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:Yo("ropsten")},RR={chainId:63,name:"classicMordor",_defaultProvider:vb("https://www.ethercluster.com/mordor","classicMordor")},Im={unspecified:{chainId:0,name:"unspecified"},homestead:PR,mainnet:PR,morden:{chainId:2,name:"morden"},ropsten:TR,testnet:TR,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:Yo("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:Yo("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:Yo("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:Yo("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:vb("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:RR,classicTestnet:RR,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:vb("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:Yo("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:Yo("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 L2e(t){if(t==null)return null;if(typeof t=="number"){for(const n in Im){const s=Im[n];if(s.chainId===t)return{name:s.name,chainId:s.chainId,ensAddress:s.ensAddress||null,_defaultProvider:s._defaultProvider||null}}return{chainId:t,name:"unknown"}}if(typeof t=="string"){const n=Im[t];return n==null?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}const e=Im[t.name];if(!e)return typeof t.chainId!="number"&&_R.throwArgumentError("invalid network chainId","network",t),t;t.chainId!==0&&t.chainId!==e.chainId&&_R.throwArgumentError("network chainId mismatch","network",t);let r=t._defaultProvider||null;return r==null&&e._defaultProvider&&(N2e(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 j2e="web/5.7.1";var F2e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};function B2e(t,e){return F2e(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),s=yield n.arrayBuffer(),i={};return n.headers.forEach?n.headers.forEach((o,a)=>{i[a.toLowerCase()]=o}):n.headers.keys().forEach(o=>{i[o.toLowerCase()]=n.headers.get(o)}),{headers:i,statusCode:n.status,statusMessage:n.statusText,body:ne(new Uint8Array(s))}})}var U2e=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const xi=new ee(j2e);function IR(t){return new Promise(e=>{setTimeout(e,t)})}function Ha(t,e){if(t==null)return null;if(typeof t=="string")return t;if(ma(t)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Ia(t)}catch{}return te(t)}return t}function z2e(t){return xt(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function $q(t,e,r){const n=typeof t=="object"&&t.throttleLimit!=null?t.throttleLimit:12;xi.assertArgument(n>0&&n%1===0,"invalid connection throttle limit","connection.throttleLimit",n);const s=typeof t=="object"?t.throttleCallback:null,i=typeof t=="object"&&typeof t.throttleSlotInterval=="number"?t.throttleSlotInterval:100;xi.assertArgument(i>0&&i%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",i);const o=typeof t=="object"?!!t.errorPassThrough:!1,a={};let l=null;const c={method:"GET"};let f=!1,u=2*60*1e3;if(typeof t=="string")l=t;else if(typeof t=="object"){if((t==null||t.url==null)&&xi.throwArgumentError("missing URL","connection.url",t),l=t.url,typeof t.timeout=="number"&&t.timeout>0&&(u=t.timeout),t.headers)for(const b in t.headers)a[b.toLowerCase()]={key:b,value:String(t.headers[b])},["if-none-match","if-modified-since"].indexOf(b.toLowerCase())>=0&&(f=!0);if(c.allowGzip=!!t.allowGzip,t.user!=null&&t.password!=null){l.substring(0,6)!=="https:"&&t.allowInsecureAuthentication!==!0&&xi.throwError("basic authentication requires a secure https url",ee.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:t.user,password:"[REDACTED]"});const b=t.user+":"+t.password;a.authorization={key:"Authorization",value:"Basic "+P4(xt(b))}}t.skipFetchSetup!=null&&(c.skipFetchSetup=!!t.skipFetchSetup),t.fetchOptions!=null&&(c.fetchOptions=Gt(t.fetchOptions))}const d=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),h=l?l.match(d):null;if(h)try{const b={statusCode:200,statusMessage:"OK",headers:{"content-type":h[1]||"text/plain"},body:h[2]?_4(h[3]):z2e(h[3])};let p=b.body;return r&&(p=r(b.body,b)),Promise.resolve(p)}catch(b){xi.throwError("processing response error",ee.errors.SERVER_ERROR,{body:Ha(h[1],h[2]),error:b,requestBody:null,requestMethod:"GET",url:l})}e&&(c.method="POST",c.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 v={};Object.keys(a).forEach(b=>{const p=a[b];v[p.key]=p.value}),c.headers=v;const y=function(){let b=null;return{promise:new Promise(function(E,k){u&&(b=setTimeout(()=>{b!=null&&(b=null,k(xi.makeError("timeout",ee.errors.TIMEOUT,{requestBody:Ha(c.body,v["content-type"]),requestMethod:c.method,timeout:u,url:l})))},u))}),cancel:function(){b!=null&&(clearTimeout(b),b=null)}}}(),g=function(){return U2e(this,void 0,void 0,function*(){for(let b=0;b=300)&&(y.cancel(),xi.throwError("bad response",ee.errors.SERVER_ERROR,{status:p.statusCode,headers:p.headers,body:Ha(w,p.headers?p.headers["content-type"]:null),requestBody:Ha(c.body,v["content-type"]),requestMethod:c.method,url:l})),r)try{const E=yield r(w,p);return y.cancel(),E}catch(E){if(E.throttleRetry&&b{let a=null;if(i!=null)try{a=JSON.parse(Ia(i))}catch(l){xi.throwError("invalid JSON",ee.errors.SERVER_ERROR,{body:i,error:l})}return r&&(a=r(a,o)),a},s=null;if(e!=null){s=xt(e);const i=typeof t=="string"?{url:t}:Gt(t);i.headers?Object.keys(i.headers).filter(a=>a.toLowerCase()==="content-type").length!==0||(i.headers=Gt(i.headers),i.headers["content-type"]="application/json"):i.headers={"content-type":"application/json"},t=i}return $q(t,s,n)}function yl(t,e){return e||(e={}),e=Gt(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 s=null,i=!1;const o=()=>i?!1:(i=!0,s&&clearTimeout(s),!0);e.timeout&&(s=setTimeout(()=>{o()&&n(new Error("timeout"))},e.timeout));const a=e.retryLimit;let l=0;function c(){return t().then(function(f){if(f!==void 0)o()&&r(f);else if(e.oncePoll)e.oncePoll.once("poll",c);else if(e.onceBlock)e.onceBlock.once("block",c);else if(!i){if(l++,l>a){o()&&n(new Error("retry limit reached"));return}let u=e.interval*parseInt(String(Math.random()*Math.pow(2,l)));ue.ceiling&&(u=e.ceiling),setTimeout(c,u)}return null},function(f){o()&&n(f)})}c()})}var yb="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Y3={};for(var Om=0;Om>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 Aq(t){for(var e=1,r=0;r126)return"Invalid prefix ("+t+")";e=md(e)^n>>5}for(e=md(e),r=0;rr)throw new TypeError("Exceeds length limit");t=t.toLowerCase();var n=Aq(t);if(typeof n=="string")throw new Error(n);for(var s=t+"1",i=0;i>5)throw new Error("Non 5-bit word");n=md(n)^o,s+=yb.charAt(o)}for(i=0;i<6;++i)n=md(n);for(n^=1,i=0;i<6;++i){var a=n>>(5-i)*5&31;s+=yb.charAt(a)}return s}function _q(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 s=t.lastIndexOf("1");if(s===-1)return"No separator character for "+t;if(s===0)return"Missing prefix for "+t;var i=t.slice(0,s),o=t.slice(s+1);if(o.length<6)return"Data too short";var a=Aq(i);if(typeof a=="string")return a;for(var l=[],c=0;c=o.length)&&l.push(u)}return a!==1?"Invalid checksum for "+t:{prefix:i,words:l}}function q2e(){var t=_q.apply(null,arguments);if(typeof t=="object")return t}function W2e(t){var e=_q.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Fw(t,e,r,n){for(var s=0,i=0,o=(1<=r;)i-=r,a.push(s>>i&o);if(n)i>0&&a.push(s<=e)return"Excess padding";if(s<this.data(u,!0);return e.transaction={hash:o,type:c,accessList:ve.allowNull(this.accessList.bind(this),null),blockHash:ve.allowNull(o,null),blockNumber:ve.allowNull(l,null),transactionIndex:ve.allowNull(l,null),confirmations:ve.allowNull(l,null),from:r,gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),gasLimit:n,to:ve.allowNull(r,null),value:n,nonce:l,data:i,r:ve.allowNull(this.uint256),s:ve.allowNull(this.uint256),v:ve.allowNull(l),creates:ve.allowNull(r,null),raw:ve.allowNull(i)},e.transactionRequest={from:ve.allowNull(r),nonce:ve.allowNull(l),gasLimit:ve.allowNull(n),gasPrice:ve.allowNull(n),maxPriorityFeePerGas:ve.allowNull(n),maxFeePerGas:ve.allowNull(n),to:ve.allowNull(r),value:ve.allowNull(n),data:ve.allowNull(f),type:ve.allowNull(l),accessList:ve.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:l,blockNumber:l,transactionHash:o,address:r,topics:ve.arrayOf(o),data:i,logIndex:l,blockHash:o},e.receipt={to:ve.allowNull(this.address,null),from:ve.allowNull(this.address,null),contractAddress:ve.allowNull(r,null),transactionIndex:l,root:ve.allowNull(a),gasUsed:n,logsBloom:ve.allowNull(i),blockHash:o,transactionHash:o,logs:ve.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:ve.allowNull(l,null),cumulativeGasUsed:n,effectiveGasPrice:ve.allowNull(n),status:ve.allowNull(l),type:c},e.block={hash:ve.allowNull(o),parentHash:o,number:l,timestamp:l,nonce:ve.allowNull(a),difficulty:this.difficulty.bind(this),gasLimit:n,gasUsed:n,miner:ve.allowNull(r),extraData:i,transactions:ve.allowNull(ve.arrayOf(o)),baseFeePerGas:ve.allowNull(n)},e.blockWithTransactions=Gt(e.block),e.blockWithTransactions.transactions=ve.allowNull(ve.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ve.allowNull(s,void 0),toBlock:ve.allowNull(s,void 0),blockHash:ve.allowNull(o,void 0),address:ve.allowNull(r,void 0),topics:ve.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ve.allowNull(l),blockHash:ve.allowNull(o),transactionIndex:l,removed:ve.allowNull(this.boolean.bind(this)),address:r,data:ve.allowFalsish(i,"0x"),topics:ve.arrayOf(o),transactionHash:o,logIndex:l},e}accessList(e){return Hf(e||[])}number(e){return e==="0x"?0:Z.from(e).toNumber()}type(e){return e==="0x"||e==null?0:Z.from(e).toNumber()}bigNumber(e){return Z.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),ze(e))?e.toLowerCase():y1.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 Ye(e)}callAddress(e){if(!ze(e,32))return null;const r=Ye(Sr(e,12));return r===Ar?null:r}contractAddress(e){return E4(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"||ze(e))return Hl(e);throw new Error("invalid blockTag")}hash(e,r){const n=this.hex(e,r);return Io(n)!==32?y1.throwArgumentError("invalid hash","value",e):n}difficulty(e){if(e==null)return null;const r=Z.from(e);try{return r.toNumber()}catch{}return null}uint256(e){if(!ze(e))throw new Error("invalid uint256");return ht(e,32)}_block(e,r){e.author!=null&&e.miner==null&&(e.miner=e.author);const n=e._difficulty!=null?e._difficulty:e.difficulty,s=ve.check(r,e);return s._difficulty=n==null?null:Z.from(n),s}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ve.check(this.formats.transactionRequest,e)}transactionResponse(e){e.gas!=null&&e.gasLimit==null&&(e.gasLimit=e.gas),e.to&&Z.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=ve.check(this.formats.transaction,e);if(e.chainId!=null){let n=e.chainId;ze(n)&&(n=Z.from(n).toNumber()),r.chainId=n}else{let n=e.networkId;n==null&&r.v==null&&(n=e.chainId),ze(n)&&(n=Z.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 yq(e)}receiptLog(e){return ve.check(this.formats.receiptLog,e)}receipt(e){const r=ve.check(this.formats.receipt,e);if(r.root!=null)if(r.root.length<=4){const n=Z.from(r.root).toNumber();n===0||n===1?(r.status!=null&&r.status!==n&&y1.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):y1.throwArgumentError("invalid alt-root-status","value.root",r.root)}else r.root.length!==66&&y1.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 ve.check(this.formats.filter,e)}filterLog(e){return ve.check(this.formats.filterLog,e)}static check(e,r){const n={};for(const s in e)try{const i=e[s](r[s]);i!==void 0&&(n[s]=i)}catch(i){throw i.checkKey=s,i.checkValue=r[s],i}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(s){n.push(e(s))}),n}}}function Y2e(t){return t&&typeof t.isCommunityResource=="function"}function MR(t){return Y2e(t)&&t.isCommunityResource()}var Pe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Ge=new ee(Mh),J2e=10;function DR(t){return t==null?"null":(Io(t)!==32&&Ge.throwArgumentError("invalid topic","topic",t),t.toLowerCase())}function NR(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(s=>{r[DR(s)]=!0});const n=Object.keys(r);return n.sort(),n.join("|")}else return DR(e)}).join("&")}function X2e(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 fu(t){if(typeof t=="string"){if(t=t.toLowerCase(),Io(t)===32)return"tx:"+t;if(t.indexOf(":")===-1)return t}else{if(Array.isArray(t))return"filter:*:"+NR(t);if(dge.isForkEvent(t))throw Ge.warn("not implemented"),new Error("not implemented");if(t&&typeof t=="object")return"filter:"+(t.address||"*")+":"+NR(t.topics||[])}throw new Error("invalid event - "+t)}function m1(){return new Date().getTime()}function LR(t){return new Promise(e=>{setTimeout(e,t)})}const Z2e=["block","network","pending","poll"];let ewe=class{constructor(e,r,n){oe(this,"tag",e),oe(this,"listener",r),oe(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=X2e(e[2]),s={};return n.length>0&&(s.topics=n),r&&r!=="*"&&(s.address=r),s}pollable(){return this.tag.indexOf(":")>=0||Z2e.indexOf(this.tag)>=0}};const twe={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 RE(t){return ht(Z.from(t).toHexString(),32)}function jR(t){return Wd.encode(Ht([t,Sr(wa(wa(t)),0,4)]))}const Pq=new RegExp("^(ipfs)://(.*)$","i"),FR=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Pq,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Np(t,e){try{return Ia(Ry(t,e))}catch{}return null}function Ry(t,e){if(t==="0x")return null;const r=Z.from(Sr(t,e,e+32)).toNumber(),n=Z.from(Sr(t,r,r+32)).toNumber();return Sr(t,r+32,r+32+n)}function IE(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):Ge.throwArgumentError("unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}function BR(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 rwe(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}function Tq(t){const e=[];let r=0;for(let n=0;nZ.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 Pe(this,void 0,void 0,function*(){const n={to:this.address,ccipReadEnabled:!0,data:jn([e,av(this.name),r||"0x"])};let s=!1;(yield this.supportsWildcard())&&(s=!0,n.data=jn(["0x9061b923",Tq([NV(this.name),n.data])]));try{let i=yield this.provider.call(n);return ne(i).length%32===4&&Ge.throwError("resolver threw error",ee.errors.CALL_EXCEPTION,{transaction:n,data:i}),s&&(i=Ry(i,0)),i}catch(i){if(i.code===ee.errors.CALL_EXCEPTION)return null;throw i}})}_fetchBytes(e,r){return Pe(this,void 0,void 0,function*(){const n=yield this._fetch(e,r);return n!=null?Ry(n,0):null})}_getAddress(e,r){const n=twe[String(e)];if(n==null&&Ge.throwError(`unsupported coin type: ${e}`,ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),n.ilk==="eth")return this.provider.formatter.address(r);const s=ne(r);if(n.p2pkh!=null){const i=r.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return jR(Ht([[n.p2pkh],"0x"+i[2]]))}}if(n.p2sh!=null){const i=r.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){const o=parseInt(i[1],16);if(i[2].length===o*2&&o>=1&&o<=75)return jR(Ht([[n.p2sh],"0x"+i[2]]))}}if(n.prefix!=null){const i=s[1];let o=s[0];if(o===0?i!==20&&i!==32&&(o=-1):o=-1,o>=0&&s.length===2+i&&i>=1&&i<=75){const a=OR.toWords(s.slice(2));return a.unshift(o),OR.encode(n.prefix,a)}}return null}getAddress(e){return Pe(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{const s=yield this._fetch("0x3b3b57de");return s==="0x"||s===ob?null:this.provider.formatter.callAddress(s)}catch(s){if(s.code===ee.errors.CALL_EXCEPTION)return null;throw s}const r=yield this._fetchBytes("0xf1cb7e06",RE(e));if(r==null||r==="0x")return null;const n=this._getAddress(e,r);return n==null&&Ge.throwError("invalid or unsupported coin data",ee.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:r}),n})}getAvatar(){return Pe(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[l])}return Ge.throwError("invalid or unsupported content hash data",ee.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return Pe(this,void 0,void 0,function*(){let r=xt(e);r=Ht([RE(64),RE(r.length),r]),r.length%32!==0&&(r=Ht([r,ht("0x",32-e.length%32)]));const n=yield this._fetchBytes("0x59d1d43c",te(r));return n==null||n==="0x"?null:Ia(n)})}}let OE=null,nwe=1;class Bw extends uc{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),oe(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=Ti(new.target,"getNetwork")(e);r?(oe(this,"_network",r),this.emit("network",r,null)):Ge.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return Pe(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||Ge.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(this.anyNetwork?this._network=e:oe(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return yl(()=>this._ready().then(e=>e,e=>{if(!(e.code===ee.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return OE==null&&(OE=new ve),OE}static getNetwork(e){return L2e(e??"homestead")}ccipReadFetch(e,r,n){return Pe(this,void 0,void 0,function*(){if(this.disableCcipRead||n.length===0)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a=0?null:JSON.stringify({data:i,sender:s}),u=yield k0({url:c,errorPassThrough:!0},f,(h,v)=>(h.status=v.statusCode,h));if(u.data)return u.data;const d=u.message||"unknown error";if(u.status>=400&&u.status<500)return Ge.throwError(`response not found during CCIP fetch: ${d}`,ee.errors.SERVER_ERROR,{url:l,errorMessage:d});o.push(d)}return Ge.throwError(`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,ee.errors.SERVER_ERROR,{urls:n,errorMessages:o})})}_getInternalBlockNumber(e){return Pe(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const s=this._internalBlockNumber;try{const i=yield s;if(m1()-i.respTime<=e)return i.blockNumber;break}catch{if(this._internalBlockNumber===s)break}}const r=m1(),n=mt({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(s=>null,s=>s)}).then(({blockNumber:s,networkError:i})=>{if(i)throw this._internalBlockNumber===n&&(this._internalBlockNumber=null),i;const o=m1();return s=Z.from(s).toNumber(),s{this._internalBlockNumber===n&&(this._internalBlockNumber=null)}),(yield n).blockNumber})}poll(){return Pe(this,void 0,void 0,function*(){const e=nwe++,r=[];let n=null;try{n=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(s){this.emit("error",s);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)Ge.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${n})`),this.emit("error",Ge.makeError("network block skew detected",ee.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(let s=this._emitted.block+1;s<=n;s++)this.emit("block",s);this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach(s=>{if(s==="block")return;const i=this._emitted[s];i!=="pending"&&n-i>12&&delete this._emitted[s]})),this._lastBlockNumber===-2&&(this._lastBlockNumber=n-1),this._events.forEach(s=>{switch(s.type){case"tx":{const i=s.hash;let o=this.getTransactionReceipt(i).then(a=>(!a||a.blockNumber==null||(this._emitted["t:"+i]=a.blockNumber,this.emit(i,a)),null)).catch(a=>{this.emit("error",a)});r.push(o);break}case"filter":{if(!s._inflight){s._inflight=!0,s._lastBlockNumber===-2&&(s._lastBlockNumber=n-1);const i=s.filter;i.fromBlock=s._lastBlockNumber+1,i.toBlock=n;const o=i.toBlock-this._maxFilterBlockRange;o>i.fromBlock&&(i.fromBlock=o),i.fromBlock<0&&(i.fromBlock=0);const a=this.getLogs(i).then(l=>{s._inflight=!1,l.length!==0&&l.forEach(c=>{c.blockNumber>s._lastBlockNumber&&(s._lastBlockNumber=c.blockNumber),this._emitted["b:"+c.blockHash]=c.blockNumber,this._emitted["t:"+c.transactionHash]=c.blockNumber,this.emit(i,c)})}).catch(l=>{this.emit("error",l),s._inflight=!1});r.push(a)}break}}}),this._lastBlockNumber=n,Promise.all(r).then(()=>{this.emit("didPoll",e)}).catch(s=>{this.emit("error",s)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return Pe(this,void 0,void 0,function*(){return Ge.throwError("provider does not support network detection",ee.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return Pe(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 LR(0),this._network;const n=Ge.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=m1();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 Pe(this,void 0,void 0,function*(){return this._waitForTransaction(e,r??1,n||0,null)})}_waitForTransaction(e,r,n,s){return Pe(this,void 0,void 0,function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=r?i:new Promise((o,a)=>{const l=[];let c=!1;const f=function(){return c?!0:(c=!0,l.forEach(d=>{d()}),!1)},u=d=>{d.confirmations{this.removeListener(e,u)}),s){let d=s.startBlock,h=null;const v=y=>Pe(this,void 0,void 0,function*(){c||(yield LR(1e3),this.getTransactionCount(s.from).then(g=>Pe(this,void 0,void 0,function*(){if(!c){if(g<=s.nonce)d=y;else{{const b=yield this.getTransaction(e);if(b&&b.blockNumber!=null)return}for(h==null&&(h=d-3,h{c||this.once("block",v)}))});if(c)return;this.once("block",v),l.push(()=>{this.removeListener("block",v)})}if(typeof n=="number"&&n>0){const d=setTimeout(()=>{f()||a(Ge.makeError("timeout exceeded",ee.errors.TIMEOUT,{timeout:n}))},n);d.unref&&d.unref(),l.push(()=>{clearTimeout(d)})}})})}getBlockNumber(){return Pe(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return Z.from(e)}catch(r){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:r})}})}getBalance(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getBalance",n);try{return Z.from(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getBalance",params:n,result:s,error:i})}})}getTransactionCount(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getTransactionCount",n);try{return Z.from(s).toNumber()}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:s,error:i})}})}getCode(e,r){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const n=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(r)}),s=yield this.perform("getCode",n);try{return te(s)}catch(i){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getCode",params:n,result:s,error:i})}})}getStorageAt(e,r,n){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const s=yield mt({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(r).then(o=>Hl(o))}),i=yield this.perform("getStorageAt",s);try{return te(i)}catch(o){return Ge.throwError("bad result from backend",ee.errors.SERVER_ERROR,{method:"getStorageAt",params:s,result:i,error:o})}})}_wrapTransaction(e,r,n){if(r!=null&&Io(r)!==32)throw new Error("invalid response - sendTransaction");const s=e;return r!=null&&e.hash!==r&&Ge.throwError("Transaction hash mismatch from Provider.sendTransaction.",ee.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:r}),s.wait=(i,o)=>Pe(this,void 0,void 0,function*(){i==null&&(i=1),o==null&&(o=0);let a;i!==0&&n!=null&&(a={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n});const l=yield this._waitForTransaction(e.hash,i,o,a);return l==null&&i===0?null:(this._emitted["t:"+e.hash]=l.blockNumber,l.status===0&&Ge.throwError("transaction failed",ee.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),s}sendTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield Promise.resolve(e).then(i=>te(i)),n=this.formatter.transaction(e);n.confirmations==null&&(n.confirmations=0);const s=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const i=yield this.perform("sendTransaction",{signedTransaction:r});return this._wrapTransaction(n,i,s)}catch(i){throw i.transaction=n,i.transactionHash=n.hash,i}})}_getTransactionRequest(e){return Pe(this,void 0,void 0,function*(){const r=yield e,n={};return["from","to"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?this._getAddress(i):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?Z.from(i):null))}),["type"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i??null))}),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach(s=>{r[s]!=null&&(n[s]=Promise.resolve(r[s]).then(i=>i?te(i):null))}),this.formatter.transactionRequest(yield mt(n))})}_getFilter(e){return Pe(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 mt(r))})}_call(e,r,n){return Pe(this,void 0,void 0,function*(){n>=J2e&&Ge.throwError("CCIP read exceeded maximum redirections",ee.errors.SERVER_ERROR,{redirects:n,transaction:e});const s=e.to,i=yield this.perform("call",{transaction:e,blockTag:r});if(n>=0&&r==="latest"&&s!=null&&i.substring(0,10)==="0x556f1830"&&Io(i)%32===4)try{const o=Sr(i,4),a=Sr(o,0,32);Z.from(a).eq(s)||Ge.throwError("CCIP Read sender did not match",ee.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const l=[],c=Z.from(Sr(o,32,64)).toNumber(),f=Z.from(Sr(o,c,c+32)).toNumber(),u=Sr(o,c+32);for(let b=0;bPe(this,void 0,void 0,function*(){const i=yield this.perform("getBlock",s);if(i==null)return s.blockHash!=null&&this._emitted["b:"+s.blockHash]==null||s.blockTag!=null&&n>this._emitted.block?null:void 0;if(r){let o=null;for(let l=0;lthis._wrapTransaction(l)),a}return this.formatter.block(i)}),{oncePoll:this})})}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return yl(()=>Pe(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 s=this.formatter.transactionResponse(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return this._wrapTransaction(s)}),{oncePoll:this})})}getTransactionReceipt(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;const r={transactionHash:this.formatter.hash(e,!0)};return yl(()=>Pe(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 s=this.formatter.receipt(n);if(s.blockNumber==null)s.confirmations=0;else if(s.confirmations==null){let o=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-s.blockNumber+1;o<=0&&(o=1),s.confirmations=o}return s}),{oncePoll:this})})}getLogs(e){return Pe(this,void 0,void 0,function*(){yield this.getNetwork();const r=yield mt({filter:this._getFilter(e)}),n=yield this.perform("getLogs",r);return n.forEach(s=>{s.removed==null&&(s.removed=!1)}),ve.arrayOf(this.formatter.filterLog.bind(this.formatter))(n)})}getEtherPrice(){return Pe(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return Pe(this,void 0,void 0,function*(){if(e=yield e,typeof e=="number"&&e<0){e%1&&Ge.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 Pe(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 s=new J3(this,n,e);return r!==e&&!(yield s.supportsWildcard())?null:s}r=r.split(".").slice(1).join(".")}})}_getResolver(e,r){return Pe(this,void 0,void 0,function*(){r==null&&(r="ENS");const n=yield this.getNetwork();n.ensAddress||Ge.throwError("network does not support ENS",ee.errors.UNSUPPORTED_OPERATION,{operation:r,network:n.name});try{const s=yield this.call({to:n.ensAddress,data:"0x0178b8bf"+av(e).substring(2)});return this.formatter.callAddress(s)}catch{}return null})}resolveName(e){return Pe(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(n){if(ze(e))throw n}typeof e!="string"&&Ge.throwArgumentError("invalid ENS name","name",e);const r=yield this.getResolver(e);return r?yield r.getAddress():null})}lookupAddress(e){return Pe(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 s=Np(yield this.call({to:n,data:"0x691f3431"+av(r).substring(2)}),0);return(yield this.resolveName(s))!=e?null:s})}getAvatar(e){return Pe(this,void 0,void 0,function*(){let r=null;if(ze(e)){const i=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",o=yield this._getResolver(i,"getAvatar");if(!o)return null;r=new J3(this,o,i);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=Np(yield this.call({to:o,data:"0x691f3431"+av(i).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 Ge.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 s=new ewe(fu(e),r,n);return this._events.push(s),this._startEvent(s),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,s=[],i=fu(e);return this._events=this._events.filter(o=>o.tag!==i?!0:(setTimeout(()=>{o.listener.apply(this,r)},0),n=!0,o.once?(s.push(o),!1):!0)),s.forEach(o=>{this._stopEvent(o)}),n}listenerCount(e){if(!e)return this._events.length;let r=fu(e);return this._events.filter(n=>n.tag===r).length}listeners(e){if(e==null)return this._events.map(n=>n.listener);let r=fu(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 s=!1,i=fu(e);return this._events=this._events.filter(o=>o.tag!==i||o.listener!=r||s?!0:(s=!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=fu(e);this._events=this._events.filter(s=>s.tag!==n?!0:(r.push(s),!1))}return r.forEach(n=>{this._stopEvent(n)}),this}}var Go=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Tr=new ee(Mh),swe=["call","estimateGas"];function cv(t,e){if(t==null)return null;if(typeof t.message=="string"&&t.message.match("reverted")){const r=ze(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=cv(t[r],e);if(n)return n}return null}if(typeof t=="string")try{return cv(JSON.parse(t),e)}catch{}return null}function Rq(t,e,r){const n=r.transaction||r.signedTransaction;if(t==="call"){const i=cv(e,!0);if(i)return i.data;Tr.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 i=cv(e.body,!1);i==null&&(i=cv(e,!1)),i&&Tr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",ee.errors.UNPREDICTABLE_GAS_LIMIT,{reason:i.message,method:t,transaction:n,error:e})}let s=e.message;throw e.code===ee.errors.SERVER_ERROR&&e.error&&typeof e.error.message=="string"?s=e.error.message:typeof e.body=="string"?s=e.body:typeof e.responseText=="string"&&(s=e.responseText),s=(s||"").toLowerCase(),s.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&Tr.throwError("insufficient funds for intrinsic transaction cost",ee.errors.INSUFFICIENT_FUNDS,{error:e,method:t,transaction:n}),s.match(/nonce (is )?too low/i)&&Tr.throwError("nonce has already been used",ee.errors.NONCE_EXPIRED,{error:e,method:t,transaction:n}),s.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&Tr.throwError("replacement fee too low",ee.errors.REPLACEMENT_UNDERPRICED,{error:e,method:t,transaction:n}),s.match(/only replay-protected/i)&&Tr.throwError("legacy pre-eip-155 transactions not supported",ee.errors.UNSUPPORTED_OPERATION,{error:e,method:t,transaction:n}),swe.indexOf(t)>=0&&s.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&Tr.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 UR(t){return new Promise(function(e){setTimeout(e,t)})}function iwe(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 p1(t){return t&&t.toLowerCase()}const X3={};class Iq extends Sf{constructor(e,r,n){if(super(),e!==X3)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");oe(this,"provider",r),n==null&&(n=0),typeof n=="string"?(oe(this,"_address",this.provider.formatter.address(n)),oe(this,"_index",null)):typeof n=="number"?(oe(this,"_index",n),oe(this,"_address",null)):Tr.throwArgumentError("invalid address or index","addressOrIndex",n)}connect(e){return Tr.throwError("cannot alter JSON-RPC Signer connection",ee.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new owe(X3,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&&Tr.throwError("unknown account #"+this._index,ee.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Gt(e);const r=this.getAddress().then(n=>(n&&(n=n.toLowerCase()),n));if(e.gasLimit==null){const n=Gt(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(n=>Go(this,void 0,void 0,function*(){if(n==null)return null;const s=yield this.provider.resolveName(n);return s==null&&Tr.throwArgumentError("provided ENS name resolves to null","tx.to",n),s}))),mt({tx:mt(e),sender:r}).then(({tx:n,sender:s})=>{n.from!=null?n.from.toLowerCase()!==s&&Tr.throwArgumentError("from address mismatch","transaction",e):n.from=s;const i=this.provider.constructor.hexlifyTransaction(n,{from:!0});return this.provider.send("eth_sendTransaction",[i]).then(o=>o,o=>(typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected transaction",ee.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),Rq("sendTransaction",o,i)))})}signTransaction(e){return Tr.throwError("signing transactions is unsupported",ee.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Go(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 yl(()=>Go(this,void 0,void 0,function*(){const s=yield this.provider.getTransaction(n);if(s!==null)return this.provider._wrapTransaction(s,n,r)}),{oncePoll:this.provider})}catch(s){throw s.transactionHash=n,s}})}signMessage(e){return Go(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("personal_sign",[te(r),n.toLowerCase()])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),s}})}_legacySignMessage(e){return Go(this,void 0,void 0,function*(){const r=typeof e=="string"?xt(e):e,n=yield this.getAddress();try{return yield this.provider.send("eth_sign",[n.toLowerCase(),te(r)])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),s}})}_signTypedData(e,r,n){return Go(this,void 0,void 0,function*(){const s=yield Yr.resolveNames(e,r,n,o=>this.provider.resolveName(o)),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Yr.getPayload(s.domain,r,s.value))])}catch(o){throw typeof o.message=="string"&&o.message.match(/user denied/i)&&Tr.throwError("user rejected signing",ee.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:s.domain,types:r,value:s.value}}),o}})}unlock(e){return Go(this,void 0,void 0,function*(){const r=this.provider,n=yield this.getAddress();return r.send("personal_unlockAccount",[n.toLowerCase(),e,null])})}}class owe extends Iq{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 awe={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let xa=class extends Bw{constructor(e,r){let n=r;n==null&&(n=new Promise((s,i)=>{setTimeout(()=>{this.detectNetwork().then(o=>{s(o)},o=>{i(o)})},0)})),super(n),e||(e=Ti(this.constructor,"defaultUrl")()),typeof e=="string"?oe(this,"connection",Object.freeze({url:e})):oe(this,"connection",Object.freeze(Gt(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 Go(this,void 0,void 0,function*(){yield UR(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=Ti(this.constructor,"getNetwork");try{return r(Z.from(e).toNumber())}catch(n){return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:n})}}return Tr.throwError("could not detect network",ee.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Iq(X3,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:_s(n),provider:this});const s=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(s&&this._cache[e])return this._cache[e];const i=k0(this.connection,JSON.stringify(n),iwe).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 s&&(this._cache[e]=i,setTimeout(()=>{this._cache[e]=null},0)),i}prepareRequest(e,r){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[p1(r.address),r.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[p1(r.address),r.blockTag]];case"getCode":return["eth_getCode",[p1(r.address),r.blockTag]];case"getStorageAt":return["eth_getStorageAt",[p1(r.address),ht(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",[Ti(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0}),r.blockTag]];case"estimateGas":return["eth_estimateGas",[Ti(this.constructor,"hexlifyTransaction")(r.transaction,{from:!0})]];case"getLogs":return r.filter&&r.filter.address!=null&&(r.filter.address=p1(r.filter.address)),["eth_getLogs",[r.filter]]}return null}perform(e,r){return Go(this,void 0,void 0,function*(){if(e==="call"||e==="estimateGas"){const s=r.transaction;if(s&&s.type!=null&&Z.from(s.type).isZero()&&s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null){const i=yield this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(r=Gt(r),r.transaction=Gt(s),delete r.transaction.type)}}const n=this.prepareRequest(e,r);n==null&&Tr.throwError(e+" not implemented",ee.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(n[0],n[1])}catch(s){return Rq(e,s,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 s(){e.send("eth_getFilterChanges",[n]).then(function(i){if(e._pendingFilter!=r)return null;let o=Promise.resolve();return i.forEach(function(a){e._emitted["t:"+a.toLowerCase()]="pending",o=o.then(function(){return e.getTransaction(a).then(function(l){return e.emit("pending",l),null})})}),o.then(function(){return UR(1e3)})}).then(function(){if(e._pendingFilter!=r){e.send("eth_uninstallFilter",[n]);return}return setTimeout(function(){s()},0),null}).catch(i=>{})}return s(),n}).catch(n=>{})}_stopEvent(e){e.tag==="pending"&&this.listenerCount("pending")===0&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,r){const n=Gt(awe);if(r)for(const i in r)r[i]&&(n[i]=!0);w4(e,n);const s={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(i){if(e[i]==null)return;const o=Hl(Z.from(e[i]));i==="gasLimit"&&(i="gas"),s[i]=o}),["from","to","data"].forEach(function(i){e[i]!=null&&(s[i]=te(e[i]))}),e.accessList&&(s.accessList=Hf(e.accessList)),s}};var lwe=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const cwe=new ee(Mh);class mb extends xa{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return lwe(this,void 0,void 0,function*(){let r=this.network;return r==null&&(r=yield e.detectNetwork.call(this),r||cwe.throwError("no network detected",ee.errors.UNKNOWN_ERROR,{}),this._network==null&&(oe(this,"_network",r),this.emit("network",r,null))),r})}}var pb=globalThis&&globalThis.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(f){try{c(n.next(f))}catch(u){o(u)}}function l(f){try{c(n.throw(f))}catch(u){o(u)}}function c(f){f.done?i(f.value):s(f.value).then(a,l)}c((n=n.apply(t,e||[])).next())})};const Fc=new ee(Mh);function Mm(){return new Date().getTime()}function zR(t){let e=null;for(let r=0;re?null:(n+s)/2}function Hu(t){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return JSON.stringify(t);if(typeof t=="string")return t;if(Z.isBigNumber(t))return t.toString();if(Array.isArray(t))return JSON.stringify(t.map(e=>Hu(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=Hu(n),JSON.stringify(r)+":"+n}).join(",")+"}"}throw new Error("unknown value type: "+typeof t)}let fwe=1;function qR(t){let e=null,r=null,n=new Promise(o=>{e=function(){r&&(clearTimeout(r),r=null),o()},r=setTimeout(e,t)});const s=o=>(n=n.then(o),n);function i(){return n}return{cancel:e,getPromise:i,wait:s}}const uwe=[ee.errors.CALL_EXCEPTION,ee.errors.INSUFFICIENT_FUNDS,ee.errors.NONCE_EXPIRED,ee.errors.REPLACEMENT_UNDERPRICED,ee.errors.UNPREDICTABLE_GAS_LIMIT],dwe=["address","args","errorArgs","errorSignature","method","transaction"];function Dm(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 hwe(t,e){return function(r){const n={};r.forEach(i=>{const o=t(i.result);n[o]||(n[o]={count:0,result:i.result}),n[o].count++});const s=Object.keys(n);for(let i=0;i=e)return o.result}}}function vwe(t,e,r){let n=Hu;switch(e){case"getBlockNumber":return function(s){const i=s.map(a=>a.result);let o=VR(s.map(a=>a.result),2);if(o!=null)return o=Math.ceil(o),i.indexOf(o+1)>=0&&o++,o>=t._highestBlockNumber&&(t._highestBlockNumber=o),t._highestBlockNumber};case"getGasPrice":return function(s){const i=s.map(o=>o.result);return i.sort(),i[Math.floor(i.length/2)]};case"getEtherPrice":return function(s){return VR(s.map(i=>i.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(s){return s==null?null:(s=Gt(s),s.confirmations=-1,Hu(s))};break;case"getBlock":r.includeTransactions?n=function(s){return s==null?null:(s=Gt(s),s.transactions=s.transactions.map(i=>(i=Gt(i),i.confirmations=-1,i)),Hu(s))}:n=function(s){return s==null?null:Hu(s)};break;default:throw new Error("unknown method: "+e)}return hwe(n,t.quorum)}function g1(t,e){return pb(this,void 0,void 0,function*(){const r=t.provider;return r.blockNumber!=null&&r.blockNumber>=e||e===-1?r:yl(()=>new Promise((n,s)=>{setTimeout(function(){return r.blockNumber>=e?n(r):t.cancelled?n(null):n(void 0)},0)}),{oncePoll:r})})}function ywe(t,e,r,n){return pb(this,void 0,void 0,function*(){let s=t.provider;switch(r){case"getBlockNumber":case"getGasPrice":return s[r]();case"getEtherPrice":if(s.getEtherPrice)return s.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),s[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&ze(n.blockTag)&&(s=yield g1(t,e)),r==="call"&&n.blockTag?s[r](n.transaction,n.blockTag):s[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return s[r](n.transactionHash);case"getLogs":{let i=n.filter;return(i.fromBlock&&ze(i.fromBlock)||i.toBlock&&ze(i.toBlock))&&(s=yield g1(t,e)),s.getLogs(i)}}return Fc.throwError("unknown method error",ee.errors.UNKNOWN_ERROR,{method:r,params:n})})}class mwe extends Bw{constructor(e,r){e.length===0&&Fc.throwArgumentError("missing providers","providers",e);const n=e.map((o,a)=>{if(uc.isProvider(o)){const f=MR(o)?2e3:750;return Object.freeze({provider:o,weight:1,stallTimeout:f,priority:1})}const l=Gt(o);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=MR(o)?2e3:750),l.weight==null&&(l.weight=1);const c=l.weight;return(c%1||c>512||c<1)&&Fc.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${a}].weight`,c),Object.freeze(l)}),s=n.reduce((o,a)=>o+a.weight,0);r==null?r=s/2:r>s&&Fc.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);let i=zR(n.map(o=>o.provider.network));i==null&&(i=new Promise((o,a)=>{setTimeout(()=>{this.detectNetwork().then(o,a)},0)})),super(i),oe(this,"providerConfigs",Object.freeze(n)),oe(this,"quorum",r),this._highestBlockNumber=-1}detectNetwork(){return pb(this,void 0,void 0,function*(){const e=yield Promise.all(this.providerConfigs.map(r=>r.provider.getNetwork()));return zR(e)})}perform(e,r){return pb(this,void 0,void 0,function*(){if(e==="sendTransaction"){const l=yield Promise.all(this.providerConfigs.map(c=>c.provider.sendTransaction(r.signedTransaction).then(f=>f.hash,f=>f)));for(let c=0;cl.priority-c.priority);const i=this._highestBlockNumber;let o=0,a=!0;for(;;){const l=Mm();let c=s.filter(h=>h.runner&&l-h.starth+v.weight,0);for(;c{h.staller=null}),h.runner=ywe(h,i,e,r).then(y=>{h.done=!0,h.result=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,Mm()),request:{method:e,params:_s(r)},provider:this})},y=>{h.done=!0,h.error=y,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,Mm()),request:{method:e,params:_s(r)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Dm(h,null),request:{method:e,params:_s(r)},provider:this}),c+=h.weight}const f=[];s.forEach(h=>{h.done||!h.runner||(f.push(h.runner),h.staller&&f.push(h.staller.getPromise()))}),f.length&&(yield Promise.race(f));const u=s.filter(h=>h.done&&h.error==null);if(u.length>=this.quorum){const h=n(u);if(h!==void 0)return s.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),h;a||(yield qR(100).getPromise()),a=!1}const d=s.reduce((h,v)=>{if(!v.done||v.error==null)return h;const y=v.error.code;return uwe.indexOf(y)>=0&&(h[y]||(h[y]={error:v.error,weight:0}),h[y].weight+=v.weight),h},{});if(Object.keys(d).forEach(h=>{const v=d[h];if(v.weight{b.staller&&b.staller.cancel(),b.cancelled=!0});const y=v.error,g={};dwe.forEach(b=>{y[b]!=null&&(g[b]=y[b])}),Fc.throwError(y.reason||y.message,h,g)}),s.filter(h=>!h.done).length===0)break}return s.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Fc.throwError("failed to meet quorum",ee.errors.SERVER_ERROR,{method:e,params:r,results:s.map(l=>Dm(l)),provider:this})})}}const WR=new ee(Mh);let pwe=1;function HR(t,e){const r="Web3LegacyFetcher";return function(n,s){const i={method:n,params:s,id:pwe++,jsonrpc:"2.0"};return new Promise((o,a)=>{this.emit("debug",{action:"request",fetcher:r,request:_s(i),provider:this}),e(i,(l,c)=>{if(l)return this.emit("debug",{action:"response",fetcher:r,error:l,request:i,provider:this}),a(l);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:c,provider:this}),c.error){const f=new Error(c.error.message);return f.code=c.error.code,f.data=c.error.data,a(f)}o(c.result)})})}}function gwe(t){return function(e,r){r==null&&(r=[]);const n={method:e,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:_s(n),provider:this}),t.request(n).then(s=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:s,provider:this}),s),s=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:s,provider:this}),s})}}class Oq extends xa{constructor(e,r){e==null&&WR.throwArgumentError("missing provider","provider",e);let n=null,s=null,i=null;typeof e=="function"?(n="unknown:",s=e):(n=e.host||e.path||"",!n&&e.isMetaMask&&(n="metamask"),i=e,e.request?(n===""&&(n="eip-1193:"),s=gwe(e)):e.sendAsync?s=HR(e,e.sendAsync.bind(e)):e.send?s=HR(e,e.send.bind(e)):WR.throwArgumentError("unsupported provider","provider",e),n||(n="unknown:")),super(n,r),oe(this,"jsonRpcFetchFunc",s),oe(this,"provider",i)}send(e,r){return this.jsonRpcFetchFunc(e,r)}}const bwe="solidity/5.7.0",wwe=new RegExp("^bytes([0-9]+)$"),xwe=new RegExp("^(u?int)([0-9]*)$"),Cwe=new RegExp("^(.*)\\[([0-9]*)\\]$"),Ewe="0000000000000000000000000000000000000000000000000000000000000000",Au=new ee(bwe);function Mq(t,e,r){switch(t){case"address":return r?sv(e,32):ne(e);case"string":return xt(e);case"bytes":return ne(e);case"bool":return e=e?"0x01":"0x00",r?sv(e,32):ne(e)}let n=t.match(xwe);if(n){let s=parseInt(n[2]||"256");return(n[2]&&String(s)!==n[2]||s%8!==0||s===0||s>256)&&Au.throwArgumentError("invalid number type","type",t),r&&(s=256),e=Z.from(e).toTwos(s),sv(e,s/8)}if(n=t.match(wwe),n){const s=parseInt(n[1]);return(String(s)!==n[1]||s===0||s>32)&&Au.throwArgumentError("invalid bytes type","type",t),ne(e).byteLength!==s&&Au.throwArgumentError(`invalid value for ${t}`,"value",e),r?ne((e+Ewe).substring(0,66)):e}if(n=t.match(Cwe),n&&Array.isArray(e)){const s=n[1];parseInt(n[2]||String(e.length))!=e.length&&Au.throwArgumentError(`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(Mq(s,a,!0))}),Ht(o)}return Au.throwArgumentError("invalid type","type",t)}function He(t,e){t.length!=e.length&&Au.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(Mq(n,e[s]))}),te(Ht(r))}function aa(t,e){return Ue(He(t,e))}function Swe(t,e){return wa(He(t,e))}const kwe="units/5.7.0",Dq=new ee(kwe),Nq=["wei","kwei","mwei","gwei","szabo","finney","ether"];function $we(t){const e=String(t).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||t==="."||t==="-.")&&Dq.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 s="";for(e.length===2&&(s="."+(e[1]||"0"));s.length>2&&s[s.length-1]==="0";)s=s.substring(0,s.length-1);const i=[];for(;r.length;)if(r.length<=3){i.unshift(r);break}else{const o=r.length-3;i.unshift(r.substring(o)),r=r.substring(0,o)}return n+i.join(",")+s}function _r(t,e){if(typeof e=="string"){const r=Nq.indexOf(e);r!==-1&&(e=3*r)}return Tp(t,e??18)}function Gd(t,e){if(typeof t!="string"&&Dq.throwArgumentError("value must be a string","value",t),typeof e=="string"){const r=Nq.indexOf(e);r!==-1&&(e=3*r)}return to(t,e??18)}function Awe(t){return _r(t,18)}function _we(t){return Gd(t,18)}const Pwe=Object.freeze(Object.defineProperty({__proto__:null,AbiCoder:A4,ConstructorFragment:_i,ErrorFragment:Xo,EventFragment:yo,FormatTypes:it,Fragment:po,FunctionFragment:Pi,HDNode:Ho,Indexed:cb,Interface:en,LogDescription:BV,Logger:ee,ParamType:qr,RLP:qme,SigningKey:db,get SupportedAlgorithm(){return Hd},TransactionDescription:UV,get TransactionTypes(){return K3},get UnicodeNormalizationForm(){return pa},Utf8ErrorFuncs:_V,get Utf8ErrorReason(){return es},_TypedDataEncoder:Yr,_fetchData:$q,_toEscapedUtf8String:cpe,accessListify:Hf,arrayify:ne,base58:Wd,base64:_pe,checkProperties:w4,checkResultErrors:mV,commify:$we,computeAddress:j4,computeHmac:Py,computePublicKey:N4,concat:Ht,deepCopy:_s,defaultAbiCoder:Gn,defaultPath:$2e,defineReadOnly:oe,dnsEncode:NV,entropyToMnemonic:Eq,fetchJson:k0,formatBytes32String:fpe,formatEther:Awe,formatUnits:_r,getAccountPath:_2e,getAddress:Ye,getContractAddress:E4,getCreate2Address:Qme,getIcapAddress:Kme,getJsonWalletAddress:O2e,getStatic:Ti,hashMessage:R4,hexConcat:jn,hexDataLength:Io,hexDataSlice:Sr,hexStripZeros:aV,hexValue:Hl,hexZeroPad:ht,hexlify:te,id:vl,isAddress:wV,isBytes:Ta,isBytesLike:ma,isHexString:ze,isValidMnemonic:A2e,isValidName:Xpe,joinSignature:Ame,keccak256:Ue,mnemonicToEntropy:B4,mnemonicToSeed:Cq,namehash:av,nameprep:Spe,parseBytes32String:upe,parseEther:_we,parseTransaction:yq,parseUnits:Gd,poll:yl,randomBytes:jw,recoverAddress:$f,recoverPublicKey:fq,resolveProperties:mt,ripemd160:bq,serializeTransaction:n2e,sha256:wa,sha512:m2e,shallowCopy:Gt,shuffled:Sq,solidityKeccak256:aa,solidityPack:He,soliditySha256:Swe,splitSignature:qf,stripZeros:Eo,toUtf8Bytes:xt,toUtf8CodePoints:ab,toUtf8String:Ia,verifyMessage:kq,verifyTypedData:M2e,zeroPad:sv},Symbol.toStringTag,{value:"Module"})),Lq="3.7.5",Twe=Lq,Rwe=typeof atob=="function",Iwe=typeof btoa=="function",Dh=typeof Buffer=="function",GR=typeof TextDecoder=="function"?new TextDecoder:void 0,KR=typeof TextEncoder=="function"?new TextEncoder:void 0,Owe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",N1=Array.prototype.slice.call(Owe),Nm=(t=>{let e={};return t.forEach((r,n)=>e[r]=n),e})(N1),Mwe=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ln=String.fromCharCode.bind(String),QR=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),jq=t=>t.replace(/=/g,"").replace(/[+\/]/g,e=>e=="+"?"-":"_"),Fq=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),Bq=t=>{let e,r,n,s,i="";const o=t.length%3;for(let a=0;a255||(n=t.charCodeAt(a++))>255||(s=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|s,i+=N1[e>>18&63]+N1[e>>12&63]+N1[e>>6&63]+N1[e&63]}return o?i.slice(0,o-3)+"===".substring(o):i},U4=Iwe?t=>btoa(t):Dh?t=>Buffer.from(t,"binary").toString("base64"):Bq,Z3=Dh?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let n=0,s=t.length;ne?jq(Z3(t)):Z3(t),Dwe=t=>{if(t.length<2){var e=t.charCodeAt(0);return e<128?t:e<2048?ln(192|e>>>6)+ln(128|e&63):ln(224|e>>>12&15)+ln(128|e>>>6&63)+ln(128|e&63)}else{var e=65536+(t.charCodeAt(0)-55296)*1024+(t.charCodeAt(1)-56320);return ln(240|e>>>18&7)+ln(128|e>>>12&63)+ln(128|e>>>6&63)+ln(128|e&63)}},Nwe=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Uq=t=>t.replace(Nwe,Dwe),YR=Dh?t=>Buffer.from(t,"utf8").toString("base64"):KR?t=>Z3(KR.encode(t)):t=>U4(Uq(t)),pd=(t,e=!1)=>e?jq(YR(t)):YR(t),JR=t=>pd(t,!0),Lwe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,jwe=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 ln((r>>>10)+55296)+ln((r&1023)+56320);case 3:return ln((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return ln((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},zq=t=>t.replace(Lwe,jwe),Vq=t=>{if(t=t.replace(/\s+/g,""),!Mwe.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(t.length&3));let e,r="",n,s;for(let i=0;i>16&255):s===64?ln(e>>16&255,e>>8&255):ln(e>>16&255,e>>8&255,e&255);return r},z4=Rwe?t=>atob(Fq(t)):Dh?t=>Buffer.from(t,"base64").toString("binary"):Vq,qq=Dh?t=>QR(Buffer.from(t,"base64")):t=>QR(z4(t).split("").map(e=>e.charCodeAt(0))),Wq=t=>qq(Hq(t)),Fwe=Dh?t=>Buffer.from(t,"base64").toString("utf8"):GR?t=>GR.decode(qq(t)):t=>zq(z4(t)),Hq=t=>Fq(t.replace(/[-_]/g,e=>e=="-"?"+":"/")),eS=t=>Fwe(Hq(t)),Bwe=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)},Gq=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),Kq=function(){const t=(e,r)=>Object.defineProperty(String.prototype,e,Gq(r));t("fromBase64",function(){return eS(this)}),t("toBase64",function(e){return pd(this,e)}),t("toBase64URI",function(){return pd(this,!0)}),t("toBase64URL",function(){return pd(this,!0)}),t("toUint8Array",function(){return Wq(this)})},Qq=function(){const t=(e,r)=>Object.defineProperty(Uint8Array.prototype,e,Gq(r));t("toBase64",function(e){return Lp(this,e)}),t("toBase64URI",function(){return Lp(this,!0)}),t("toBase64URL",function(){return Lp(this,!0)})},Uwe=()=>{Kq(),Qq()},_f={version:Lq,VERSION:Twe,atob:z4,atobPolyfill:Vq,btoa:U4,btoaPolyfill:Bq,fromBase64:eS,toBase64:pd,encode:pd,encodeURI:JR,encodeURL:JR,utob:Uq,btou:zq,decode:eS,isValid:Bwe,fromUint8Array:Lp,toUint8Array:Wq,extendString:Kq,extendUint8Array:Qq,extendBuiltins:Uwe};var tS=function(){return tS=Object.assign||function(e){for(var r,n=1,s=arguments.length;n0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]0&&(s.types.Claims.push({name:"app",type:"string"}),s.message.app=this.claims.app),this.claims.iat&&this.claims.iat>0&&(s.types.Claims.push({name:"iat",type:"int64"}),s.message.iat=this.claims.iat),this.claims.exp&&this.claims.exp>0&&(s.types.Claims.push({name:"exp",type:"int64"}),s.message.exp=this.claims.exp),this.claims.n&&this.claims.n>0&&(s.types.Claims.push({name:"n",type:"uint64"}),s.message.n=this.claims.n),this.claims.typ&&this.claims.typ.length>0&&(s.types.Claims.push({name:"typ",type:"string"}),s.message.typ=this.claims.typ),this.claims.ogn&&this.claims.ogn.length>0&&(s.types.Claims.push({name:"ogn",type:"string"}),s.message.ogn=this.claims.ogn),this.claims.v&&this.claims.v.length>0&&(s.types.Claims.push({name:"v",type:"string"}),s.message.v=this.claims.v),s},t}(),Vwe=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}},qwe=function(t,e,r){return Bc(void 0,void 0,void 0,function(){var n,s;return Uc(this,function(i){return n=r.messageDigest(),s=kq(n,r.signature),s.slice(0,2)==="0x"&&s.length===42&&s.toLowerCase()===r.address.toLowerCase()?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]})})},Wwe=function(t,e,r){return Bc(void 0,void 0,void 0,function(){var n,s,i,o,a;return Uc(this,function(l){switch(l.label){case 0:return!t||t===void 0?[2,{isValid:!1}]:(n=r.messageDigest(),[4,t.getCode(r.address)]);case 1:if(s=l.sent(),s==="0x"||s.length<=2)throw new Error("ValidateContractAccountProof failed. unable to fetch wallet contract code");return i=["function isValidSignature(bytes32, bytes) public view returns (bytes4)"],o=new Oh(r.address,i,t),[4,o.isValidSignature(n,ne(r.signature))];case 2:return a=l.sent(),a===Hwe?[2,{isValid:!0,address:r.address}]:[2,{isValid:!1}]}})})},Hwe="0x1626ba7e",Yq="1",rS="eth",Gwe={name:"ETHAuth",version:Yq},Iy=function(){function t(){for(var e=[],r=0;r0&&(l+="."+s.extra),[2,l]}})})},this.decodeProof=function(s,i){return i===void 0&&(i=!1),Bc(n,void 0,void 0,function(){var o,a,l,c,f,u,d,h,v,y;return Uc(this,function(g){switch(g.label){case 0:if(o=s.split("."),o.length<4||o.length>5)throw new Error("ethauth: invalid proof string");if(a=o[0],l=o[1],c=o[2],f=o[3],u=o[4],a!==rS)throw new Error("ethauth: not an ethauth proof");return d=_f.decode(c),h=JSON.parse(d),v=new Uw({address:l,claims:h,signature:f,extra:u}),[4,this.validateProof(v,i)];case 1:if(y=g.sent(),!y)throw new Error("ethauth: proof is invalid");return[2,v]}})})},this.validateProof=function(s,i){return i===void 0&&(i=!1),Bc(n,void 0,void 0,function(){var o,a;return Uc(this,function(l){switch(l.label){case 0:if(o=this.validateProofClaims(s),o.err)throw new Error("ethauth: proof claims are invalid ".concat(o.err));return i===!0?[3,2]:[4,this.validateProofSignature(s)];case 1:if(a=l.sent(),a!==!0)throw new Error("ethauth: proof signature is invalid");l.label=2;case 2:return[2,!0]}})})},this.validateProofSignature=function(s){return Bc(n,void 0,void 0,function(){var i,l,o,a,l;return Uc(this,function(c){switch(c.label){case 0:i=[],l=0,c.label=1;case 1:if(!(l_f.encode(t,!0),V4=t=>_f.encode(JSON.stringify(t),!0),Qwe=t=>{if(t!=null)return _f.decode(t)},q4=t=>{if(t!=null)return JSON.parse(_f.decode(t))};function Jq(t){return t!=null&&(Z.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||ze(t)||typeof t=="bigint"||Ta(t))}const W4=t=>ne(Ue(typeof t=="string"?xt(t):t)),Xq=(t,e,r)=>He(["string","uint256","address","bytes32"],["",e,t,r]),nS=(t,e,r)=>Ue(Xq(t,e,r)),Zq=()=>typeof window>"u"&&typeof process=="object",Ywe=()=>!Zq(),eW=t=>{const e=t.split(".");if(e.length!==3)throw new Error("invalid jwt");return JSON.parse(_f.decode(e[1]))};function gb(){return gb=Object.assign?Object.assign.bind():function(t){for(var e=1;exe.configure(t),Oy=t=>({url:t,skipFetchSetup:!0,fetchOptions:{mode:"cors",cache:"force-cache",credentials:"same-origin",redirect:"follow",referrer:"client"}});let Xwe=class{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,Zwe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}};function Zwe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function H4(t,e){return function(...r){const n=Array.prototype.slice.call(r);return new Promise(async(s,i)=>{try{n.push((o,a)=>o?i(o):s(a)),await t.apply(e,n)}catch(o){i(o)}})}}function exe(t,e){const r=encodeURIComponent(t),n=encodeURIComponent(JSON.stringify(e));return`${r}=${n}`}function txe(t){const e=t.split("&"),r={};for(const n of e){const s=n.split("=");r[decodeURIComponent(s[0])]=JSON.parse(decodeURIComponent(s[1]))}return r}const G4=(t=0,e=Number.MAX_SAFE_INTEGER)=>(t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t),rW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\d.]+/);return e&&e.length>0?e[0].trim():""},nW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\s\d]+/);return e&&e.length>0?e[0].trim():""},sW=t=>{if(!t||typeof t!="string")return"";const e=t.match(/[\w\d.\-:\/]+/);return e&&e.length>0?e[0].trim():""},rxe=t=>new Promise(e=>{const r=setTimeout(()=>{clearTimeout(r),e()},t)}),iW=t=>{const e=gb({},t.types);return delete e.EIP712Domain,Yr.hash(t.domain,e,t.message)},zw=t=>ne(iW(t)),{defineReadOnly:nxe,getStatic:sxe,resolveProperties:ixe,checkProperties:oxe,shallowCopy:axe,deepCopy:lxe}=Pwe,cxe=t=>t.replace(/([^:]\/)\/+/g,"$1"),fxe=Object.freeze(Object.defineProperty({__proto__:null,Logger:tW,PromiseCache:Xwe,base64Decode:Qwe,base64DecodeObject:q4,base64Encode:Kwe,base64EncodeObject:V4,checkProperties:oxe,configureLogger:Jwe,deepCopy:lxe,defineReadOnly:nxe,encodeMessageDigest:W4,encodeTypedDataDigest:zw,encodeTypedDataHash:iW,getDefaultConnectionInfo:Oy,getRandomInt:G4,getStatic:sxe,isBigNumberish:Jq,isBrowser:Ywe,isNode:Zq,jwtDecodeClaims:eW,logger:xe,packMessageData:Xq,promisify:H4,queryStringFromObject:exe,queryStringToObject:txe,resolveProperties:ixe,sanitizeAlphanumeric:nW,sanitizeHost:sW,sanitizeNumberString:rW,shallowCopy:axe,sleep:rxe,subDigestOf:nS,urlClean:cxe},Symbol.toStringTag,{value:"Module"}));function sr(){return sr=Object.assign?Object.assign.bind():function(t){for(var e=1;etypeof t=="number"?t:t.chainId?t.chainId:Z.from(t).toNumber(),dxe=t=>{if(t)return oW(t)},aW=(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 s=n.map(c=>c.chainId).sort(),i=s.filter((c,f)=>s.indexOf(c)!==f);if(i.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${i}`);return!1}n.forEach(c=>c.name=c.name.toLowerCase());const o=n.map(c=>c.name).sort(),a=o.filter((c,f)=>o.indexOf(c)!==f);if(a.length>0){if(e)throw new Error(`invalid network config: duplicate network names ${a}`);return!1}let l=!1;for(let c=0;c(aW(t,!0,e),t),hxe=(t,e=!0)=>{const r=t.map(s=>s.chainId).sort(),n=r.filter((s,i)=>r.indexOf(s)!==i);if(n.length>0){if(e)throw new Error(`invalid network config: duplicate chainIds ${n}`);return!1}return!0},vxe=(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)}},cW=t=>lW(fW(t)),Li=(t,e)=>{if(typeof e=="string")if(e.startsWith("0x")){const r=Z.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(Z.isBigNumber(e)){const r=e.toNumber();return t.find(n=>n.chainId===r)}else return}},yxe=(t,e)=>t?t.name===e||t.chainId===e:!1,mxe=t=>{const e={};for(let r=0;r{if(!t)return[];const e=t.sort((n,s)=>n.chainId===s.chainId?0:n.chainIdn.isDefaultChain);return r>0&&e.splice(0,0,e.splice(r,1)[0]),e},Vw=(t,e)=>typeof t=="string"?(e=e||{},t.replace(/\$\{\s*([$#@\-\d\w]+)\s*\}/gim,function(r,n){let s=e[n];return typeof s=="function"?s=s():s==null?s="":typeof s=="object"||typeof s=="symbol"?s=s.toString():s=s.valueOf(),s})):"",qw=t=>Vw("https://${network}-indexer.sequence.app",{network:t}),uW=t=>Vw("https://${network}-relayer.sequence.app",{network:t}),dW=t=>Vw("https://nodes.sequence.app/${network}",{network:t});function K4(t){return Li(Kd,t)}function hW(t){return Z.isBigNumber(t)?t:Jq(t)?Z.from(t):Z.from(t.chainId)}const Dr=t=>{const e=dW(t);return{rpcUrl:e,relayer:{url:uW(t),provider:{url:e}},indexerUrl:qw(t)}},Kd=cW([sr({},zt[ce.POLYGON],Dr("polygon"),{isDefaultChain:!0,isAuthChain:!0}),sr({},zt[ce.MAINNET],Dr("mainnet")),sr({},zt[ce.BSC],Dr("bsc")),sr({},zt[ce.AVALANCHE],Dr("avalanche")),sr({},zt[ce.ARBITRUM],Dr("arbitrum")),sr({},zt[ce.ARBITRUM_NOVA],Dr("arbitrum-nova")),sr({},zt[ce.OPTIMISM],Dr("optimism")),sr({},zt[ce.POLYGON_ZKEVM],Dr("polygon-zkevm")),sr({},zt[ce.GNOSIS],Dr("gnosis")),sr({},zt[ce.RINKEBY],Dr("rinkeby"),{disabled:!0}),sr({},zt[ce.GOERLI],Dr("goerli")),sr({},zt[ce.SEPOLIA],Dr("sepolia")),sr({},zt[ce.POLYGON_MUMBAI],Dr("mumbai")),sr({},zt[ce.BSC_TESTNET],Dr("bsc-testnet")),sr({},zt[ce.ARBITRUM_GOERLI],Dr("arbitrum-goerli")),sr({},zt[ce.BASE],Dr("base")),sr({},zt[ce.BASE_GOERLI],Dr("base-goerli")),sr({},zt[ce.HOMEVERSE_TESTNET],Dr("homeverse-testnet")),sr({},zt[ce.AVALANCHE_TESTNET],Dr("avalanche-testnet")),sr({},zt[ce.HARDHAT],{rpcUrl:"http://localhost:8545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:8545"}}}),sr({},zt[ce.HARDHAT_2],{rpcUrl:"http://localhost:9545",relayer:{url:"http://localhost:3000",provider:{url:"http://localhost:9545"}}})]),Qd="2.0";class Q4{constructor(e,r){this.sender=r,e&&this.setMiddleware(e)}setMiddleware(e){this.handler=vW(e,this.sender.sendAsync)}sendAsync(e,r,n){try{this.handler(e,r,n)}catch(s){r(s,void 0)}}}const vW=(t,e)=>{if(t.length===0)return e;const r=s=>s.sendAsyncMiddleware?s.sendAsyncMiddleware:s;let n;n=r(t[t.length-1])(e);for(let s=t.length-2;s>=0;s--)n=r(t[s])(n);return n};function yW(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 mW(t){return t!==void 0&&t.sendAsync!==void 0}let pxe=0;class bb{constructor(e,r){this.sendAsync=(n,s,i)=>{this.send(n.method,n.params,i||this.defaultChainId).then(o=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:o})}).catch(o=>{s(o,void 0)})},this.defaultChainId=r,yW(e)?this.send=e.send.bind(e):mW(e)?this.send=(n,s,i)=>new Promise((o,a)=>{e.sendAsync({jsonrpc:Qd,id:++pxe,method:n,params:s},(l,c)=>{l?a(l):o(c?c.result:void 0)},i||this.defaultChainId)}):this.send=e,this.request=(n,s)=>this.send(n.method,n.params,s)}}class gxe{constructor(e){this.sendAsync=(r,n)=>{this.provider.send(r.method,r.params).then(s=>{n(void 0,{jsonrpc:"2.0",id:r.id,result:s})}).catch(s=>{n(s,void 0)})},this.send=this.sendAsync,this.provider=e}}class bxe{constructor(e){e?this.isAllowedFunc=e:this.isAllowedFunc=r=>!0,this.sendAsyncMiddleware=sS(this.isAllowedFunc)}setIsAllowedFunc(e){this.isAllowedFunc=e,this.sendAsyncMiddleware=sS(this.isAllowedFunc)}}const sS=t=>e=>(r,n,s)=>{if(!t(r))throw new Error("allowProvider middleware precondition is unmet.");e(r,n,s)};class Y4{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,s,i)=>{if(this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method)){const o=this.cacheKey(n.method,n.params,i||this.defaultChainId),a=this.getCacheValue(o);if(a&&a!==""){s(void 0,{jsonrpc:"2.0",id:n.id,result:a});return}}r(n,(o,a,l)=>{if((this.cachableJsonRpcMethods.includes(n.method)||this.cachableJsonRpcMethodsByBlock.includes(n.method))&&a&&a.result&&this.shouldCacheResponse(n,a)){const c=this.cacheKey(n.method,n.params,l||this.defaultChainId);this.cachableJsonRpcMethods.includes(n.method)?this.setCacheValue(c,a.result):this.setCacheByBlockValue(c,a.result)}s(o,a)},i||this.defaultChainId)},this.cacheKey=(r,n,s)=>{let i="";return s?i=`${s}:${r}:`:i=`:${r}:`,!n||n.length===0?i+"[]":i+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 pW{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{const{id:o,method:a}=n;switch(a){case"net_version":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:`${this.options.chainId}`});return}break;case"eth_chainId":if(this.options.chainId){s(void 0,{jsonrpc:"2.0",id:o,result:te(this.options.chainId)});return}break;case"eth_accounts":if(this.options.accountAddress){s(void 0,{jsonrpc:"2.0",id:o,result:[Ye(this.options.accountAddress)]});return}break;case"sequence_getWalletContext":if(this.options.walletContext){s(void 0,{jsonrpc:"2.0",id:o,result:this.options.walletContext});return}break}r(n,s,i)},this.options=e}}const gW=t=>(e,r,n)=>{t(e,(s,i)=>{if(!s&&i&&i.error)throw typeof i.error=="string"?new Error(i.error):new Error(i.error.message);r(s,i)},n)},bW=t=>(e,r,n)=>{const s=n?` chainId:${n}`:"";xe.info(`[provider request]${s} id:${e.id} method:${e.method} params:`,e.params),t(e,(i,o)=>{i?xe.warn(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"error:",i):xe.info(`[provider response]${s} id:${e.id} method:${e.method} params:`,e.params,"response:",o),r(i,o)},n)},wxe=t=>e=>(r,n,s)=>{const i=t(r),{id:o,method:a}=r;switch(a){case"net_version":n(void 0,{jsonrpc:"2.0",id:o,result:`${i}`});return;case"eth_chainId":n(void 0,{jsonrpc:"2.0",id:o,result:te(i)});return}e(r,n,s)},wW=["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 xxe{constructor(e){this.sendAsyncMiddleware=r=>(n,s,i)=>{if(wW.includes(n.method)){this.provider.sendAsync(n,s,i);return}r(n,s,i)},this.provider=e}}class Cxe{constructor(e){this.privateJsonRpcMethods=["net_version","eth_chainId","eth_accounts",...wW],this.sendAsyncMiddleware=r=>(n,s)=>{if(this.provider&&!this.privateJsonRpcMethods.includes(n.method)){this.provider.send(n.method,n.params).then(i=>{s(void 0,{jsonrpc:"2.0",id:n.id,result:i})}).catch(i=>s(i));return}xe.debug("[public-provider] sending request to signer window",n.method),r(n,s)},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 xa(e))}}class xW{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,s)=>{if(!this.singleflightJsonRpcMethods.includes(r.method)){e(r,n,s);return}const i=this.requestKey(r.method,r.params||[],s);if(!this.inflight[i])this.inflight[i]=[];else{this.inflight[i].push({id:r.id,callback:n});return}e(r,(o,a,l)=>{n(o,a);for(let c=0;c{let s="";return n?s=`${n}:${e}:`:s=`:${e}:`,!r||r.length===0?s+"[]":s+JSON.stringify(r)},this.inflight={}}}class Exe extends xa{constructor(e,r){super(e,r==null?void 0:r.chainId),this.send=(a,l)=>this._sender.send(a,l),this.fetch=(a,l)=>{const c={method:a,params:l,id:this._nextId++,jsonrpc:"2.0"};return k0(this.connection,JSON.stringify(c),Sxe).then(u=>u,u=>{throw u})};const n=r==null?void 0:r.chainId,s=r==null?void 0:r.middlewares,i=r==null?void 0:r.blockCache;this._chainId=n;const o=new Q4(s??[new pW({chainId:n}),new xW,new Y4({defaultChainId:n,blockCache:i})],new bb(this.fetch,n));this._sender=new bb(o,n)}async getNetwork(){const e=this._chainId;if(e){const r=zt[e],n=(r==null?void 0:r.name)||"",s=r==null?void 0:r.ensAddress;return{name:n,chainId:e,ensAddress:s}}else{const r=await this.send("eth_chainId",[]);return this._chainId=Z.from(r).toNumber(),this.getNetwork()}}}function Sxe(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 kxe=Object.freeze(Object.defineProperty({__proto__:null,AllowProvider:bxe,CachedProvider:Y4,ChainId:ce,EagerProvider:pW,JsonRpcExternalProvider:gxe,JsonRpcProvider:Exe,JsonRpcRouter:Q4,JsonRpcSender:bb,JsonRpcVersion:Qd,NetworkType:ut,PublicProvider:Cxe,SigningProvider:xxe,SingleflightMiddleware:xW,allNetworks:Kd,allowProviderMiddleware:sS,checkNetworkConfig:yxe,createJsonRpcMiddlewareStack:vW,ensureUniqueNetworks:hxe,ensureValidNetworks:lW,exceptionProviderMiddleware:gW,findNetworkConfig:Li,findSupportedNetwork:K4,getChainId:oW,indexerURL:qw,isJsonRpcHandler:mW,isJsonRpcProvider:yW,isNetworkConfig:uxe,isValidNetworkConfig:aW,loggingProviderMiddleware:bW,maybeChainId:dxe,networkProviderMiddleware:wxe,networks:zt,networksIndex:mxe,nodesURL:dW,relayerURL:uW,sortNetworks:fW,stringTemplate:Vw,toChainIdNumber:hW,updateNetworkConfig:vxe,validateAndSortNetworks:cW},Symbol.toStringTag,{value:"Module"}));function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{if(X4(s))return He(["uint8","uint8","address"],[sf.Address,s.weight,s.address]);if(s.isDynamic){const i=ne(s.signature);return He(["uint8","uint8","address","uint16","bytes"],[sf.DynamicSignature,s.weight,s.address,i.length,i])}return He(["uint8","uint8","bytes"],[sf.EOASignature,s.weight,s.signature])});return He(["uint16",...new Array(n.length).fill("bytes")],[r,...n])}async function AW(t,e,r){const n=$0(e),s=await Promise.all(t.signers.map(async i=>{if(X4(i))return i;if(i.isDynamic){if(!i.address)throw new Error("Dynamic signature part must have address");if(!J4(i.address,n,i.signature,r))throw new Error(`Invalid dynamic signature part ${i.address}`);return{address:i.address,weight:i.weight,signature:i.signature}}else return{address:A0(n,i.signature),weight:i.weight,signature:i.signature}}));return{version:1,payload:e,subdigest:n,config:{version:1,threshold:t.threshold,signers:s}}}function fv(t,e,r,n){if(r.length!==0)throw new Error("Explicit subdigests not supported on v1");let s=Z.from(0);const i=t.signers.map(a=>{if(!e.has(a.address))return a;const l=e.get(a.address),c=ne(l.signature);return s=s.add(a.weight),l.isDynamic||c.length!==66?kn({},a,{isDynamic:!0,signature:l.signature,address:a.address}):kn({},a,{isDynamic:!1,signature:l.signature})});return{encoded:Z4({version:1,threshold:t.threshold,signers:i}),weight:s}}const eA={decode:t=>$W(t),encode:t=>Z4(t),trim:async t=>t,supportsNoChainId:!0,recover:(t,e,r)=>AW(t,e,r),encodeSigners:(t,e,r,n)=>fv(t,e,r),hasEnoughSigningPower:(t,e)=>{const{weight:r}=eA.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 Mxe=Object.freeze({__proto__:null,SignaturePartType:sf,isAddressMember:X4,isUnrecoveredSignatureMember:SW,isUnrecoveredSignature:kW,decodeSignature:$W,encodeSignature:Z4,recoverSignature:AW,encodeSigners:fv,SignatureCoder:eA});const tA={isWalletConfig:t=>t.version===1&&t.threshold!==void 0&&t.signers!==void 0,imageHashOf:t=>t.signers.reduce((e,r)=>Ue(Gn.encode(["bytes32","uint8","address"],[e,r.weight,r.address])),He(["uint256"],[t.threshold])),hasSubdigest:(t,e)=>!1,isComplete:t=>!0,checkpointOf:t=>Z.from(0),signersOf:t=>t.signers.map(e=>({address:e.address,weight:Z.from(e.weight).toNumber()})),fromSimple:t=>{if(!rr.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 s=new en([...$n.mainModule.abi,...$n.mainModuleUpgradable.abi]),i=[];return(!n||n==="first")&&i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImplementation"),[r.mainModuleUpgradable]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),i.push({to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[tA.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}),{entrypoint:t,transactions:i}},decodeTransaction:function(t){throw new Error("Function not implemented.")}},toJSON:function(t){const e=t.signers.map(r=>({weight:Z.from(r.weight).toString(),address:r.address}));return JSON.stringify({version:t.version,threshold:Z.from(t.threshold).toString(),signers:e})},fromJSON:function(t){const e=JSON.parse(t),r=e.signers.map(n=>({weight:Z.from(n.weight),address:n.address}));return{version:e.version,threshold:Z.from(e.threshold),signers:r}},editConfig:function(t,e){var r;const n=t.signers.slice();if(e.checkpoint&&!rr.eq(e.checkpoint))throw new Error("v1 wallet config does not support checkpoint");if(e.add)for(const s of e.add)n.find(i=>i.address===s.address)||n.push({weight:s.weight,address:s.address});if(e.remove)for(const s of e.remove){const i=n.findIndex(o=>o.address===s);i>=0&&n.splice(i,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[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=fv(t,r,[]);if(a.gte(t.threshold))return o}const n=t.signers;for(const{address:s}of n.sort(({weight:i},{weight:o})=>Z.from(i).sub(o).toNumber())){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=fv(t,r,[]);if(a.gte(t.threshold))return o}return fv(t,r,[]).encoded}};var Dxe=Object.freeze({__proto__:null,ConfigCoder:tA});const _W=1,PW={version:_W,factory:"0xf9D09D634Fb818b05149329C1dcCFAeA53639d96",guestModule:"0x02390F3E6E5FD1C6786CB78FD3027C117a9955A7",mainModule:"0xd01F11855bCcb95f88D7A48492F66410d4637313",mainModuleUpgradable:"0x7EFE6cE415956c5f80C6530cC6cc81b4808F6118",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Zo=Object.freeze({__proto__:null,config:Dxe,signature:Mxe,version:_W,DeployedWalletContext:PW});const rA="0x8713a7c4465f6fbee2b6e9d6646d1d9f83fec929edfc4baf661f3c865bdd04d1";function TW(t){return Ue(RW(t))}function RW(t){return He(["bytes32","bytes32"],[rA,t])}function IW(t){const e=ne(t);if(e.length===64&&te(e.slice(0,32))===rA)return te(e.slice(32,64))}function Nxe(t){return IW(t)!==void 0}var Lxe=Object.freeze({__proto__:null,SetImageHashPrefix:rA,hashSetImageHash:TW,messageSetImageHash:RW,decodeMessageSetImageHash:IW,isMessageSetImageHash:Nxe});let Xr=function(t){return t[t.Legacy=0]="Legacy",t[t.Dynamic=1]="Dynamic",t[t.NoChainIdDynamic=2]="NoChainIdDynamic",t[t.Chained=3]="Chained",t}({}),gr=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 wb=66;function Pf(t){return t.left!==void 0&&t.right!==void 0}function Nh(t){return t.tree!==void 0}function _0(t){return t.unrecovered&&t.signature!==void 0&&t.isDynamic!==void 0}function xb(t){let e=ne(t),r;const n=(s,i)=>s?s.right?{left:s,right:i}:{left:s.left,right:i}:{left:i};for(;e.length>0;){const s=e[0];switch(e=e.slice(1),s){case gr.Signature:{const i=e[0],o=te(e.slice(1,wb+1));r=n(r,{signature:o,weight:i,unrecovered:!0,isDynamic:!1}),e=e.slice(wb+1)}break;case gr.Address:{const i=e[0],o=Ye(te(e.slice(1,21)));r=n(r,{address:o,weight:i}),e=e.slice(21)}break;case gr.DynamicSignature:{const i=e[0],o=Ye(te(e.slice(1,21))),a=e[21]<<16|e[22]<<8|e[23],l=te(e.slice(24,24+a));r=n(r,{address:o,signature:l,weight:i,unrecovered:!0,isDynamic:!0}),e=e.slice(24+a)}break;case gr.Node:{const i=te(e.slice(0,32));r=n(r,{nodeHash:i}),e=e.slice(32)}break;case gr.Branch:{const i=e[0]<<16|e[1]<<8|e[2],o=xb(e.slice(3,3+i));r=n(r,o),e=e.slice(3+i)}break;case gr.Subdigest:{const i=te(e.slice(0,32));r=n(r,{subdigest:i}),e=e.slice(32)}break;case gr.Nested:{const i=e[0],o=e[1]<<8|e[2],a=e[3]<<16|e[4]<<8|e[5],l=xb(e.slice(6,6+a));r=n(r,{weight:i,threshold:o,tree:l}),e=e.slice(6+a)}break;default:throw new Error(`Unknown signature part type: ${s}: ${te(e)}`)}}if(!r)throw new Error("Empty signature tree");return r.right?r:r.left}class OW extends Error{constructor(e){super(`Invalid signature leaf: ${JSON.stringify(e)}`),this.leaf=e}}async function of(t,e,r){if(Pf(t)){const[n,s]=await Promise.all([of(t.left,e,r),of(t.right,e,r)]);return{left:n,right:s}}if(Nh(t))return{weight:t.weight,threshold:t.threshold,tree:await of(t.tree,e,r)};if(_0(t))if(t.isDynamic){if(!t.address)throw new Error("Dynamic signature leaf without address");if(!await J4(t.address,e,t.signature,r))throw new OW(t);return{weight:t.weight,address:t.address,signature:t.signature,subdigest:e}}else return{weight:t.weight,address:A0(e,t.signature),signature:t.signature,subdigest:e};return t}const gn={concat:(t,e)=>He(["bytes","bytes"],[t,e]),node:t=>He(["uint8","bytes32"],[gr.Node,t]),branch:t=>{const e=ne(t);return He(["uint8","uint24","bytes"],[gr.Branch,e.length,e])},nested:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","uint16","uint24","bytes"],[gr.Nested,t,e,n.length,n])},subdigest:t=>He(["uint8","bytes32"],[gr.Subdigest,t]),signature:(t,e)=>He(["uint8","uint8","bytes"],[gr.Signature,t,e]),dynamicSignature:(t,e,r)=>{const n=ne(r);return He(["uint8","uint8","address","uint24","bytes"],[gr.DynamicSignature,t,e,n.length,n])},address:(t,e)=>He(["uint8","uint8","address"],[gr.Address,t,e])};function uv(t,e,r,n,s={}){const i=dv(t.tree,e,r,s);return Z.from(n).isZero()?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.NoChainIdDynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:Z.from(t.threshold).gt(255)?{encoded:He(["uint8","uint16","uint32","bytes"],[Xr.Dynamic,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}:{encoded:He(["uint8","uint8","uint32","bytes"],[Xr.Legacy,t.threshold,t.checkpoint,i.encoded]),weight:i.weight}}function dv(t,e,r,n={}){const s=!n.disableTrim;if(qi(t)){const i=dv(t.left,e,r),o=dv(t.right,e,r),a=Wn(t.left),l=Wn(t.right);return s&&i.weight.eq(0)&&o.weight.eq(0)&&!a&&!l?{encoded:gn.node(ws(t)),weight:rr}:s&&o.weight.eq(0)&&!l?{encoded:gn.concat(i.encoded,gn.node(ws(t.right))),weight:i.weight}:s&&i.weight.eq(0)&&!a?{encoded:gn.concat(gn.node(ws(t.left)),gn.branch(o.encoded)),weight:o.weight}:{encoded:gn.concat(i.encoded,gn.branch(o.encoded)),weight:i.weight.add(o.weight)}}if(Ma(t)){const i=dv(t.tree,e,r);return s&&i.weight.eq(0)?{encoded:gn.node(ws(t)),weight:rr}:{encoded:gn.nested(t.weight,t.threshold,i.encoded),weight:i.weight}}if(Da(t))return{encoded:gn.node(ws(t)),weight:rr};if(Oa(t)){const i=r.includes(t.subdigest);return{encoded:gn.node(ws(t)),weight:i?kV:rr}}if(Wn(t))if(e.has(t.address)){const o=e.get(t.address),a=o.signature;return n.forceDynamicEncoding||o.isDynamic?{encoded:gn.dynamicSignature(t.weight,t.address,a),weight:Z.from(t.weight)}:{encoded:gn.signature(t.weight,a),weight:Z.from(t.weight)}}else return{encoded:gn.address(t.weight,t.address),weight:rr};throw new Error(`Invalid topology - unknown error: ${JSON.stringify(t)}`)}function nA(t){return iA(t)?nA(t.suffix[t.suffix.length-1]):t.config}function sA(t){return t.type!==void 0&&t.decoded!==void 0&&t.version!==void 0&&t.version===2}function P0(t){return t.suffix!==void 0&&Array.isArray(t.suffix)&&t.suffix.every(sA)}function MW(t){return t.type!==void 0&&t.config!==void 0&&t.digest!==void 0&&t.version!==void 0&&t.version===2}function iA(t){return t.chain!==void 0&&Array.isArray(t.chain)&&t.chain.every(MW)}function Ww(t){const e=ne(t),r=e[0];switch(r){case Xr.Legacy:return{version:2,type:Xr.Legacy,decoded:jp(e)};case Xr.Dynamic:return{version:2,type:Xr.Dynamic,decoded:jp(e.slice(1))};case Xr.NoChainIdDynamic:return{version:2,type:Xr.NoChainIdDynamic,decoded:jp(e.slice(1))};case Xr.Chained:return DW(e);default:throw new Error(`Invalid signature type: ${r}`)}}function jp(t){const e=ne(t),r=e[0]<<8|e[1],n=e[2]<<24|e[3]<<16|e[4]<<8|e[5],s=xb(e.slice(6));return{threshold:r,checkpoint:n,tree:s}}function DW(t){const e=ne(t),r=e[0];if(r!==Xr.Chained)throw new Error(`Expected chained signature type: ${r}`);const n=[];let s=1;for(;sne(Il(i))),s=He(n.map(()=>["uint24","bytes"]).flat(),n.map(i=>[i.length,i]).flat());return He(["uint8","bytes"],[Xr.Chained,s])}function Il(t){if(ma(t))return te(t);if(P0(t)||iA(t))return Hw(Il(t),(t.suffix||[]).map(Il));const e=sA(t)?t.decoded:t.config;switch(t.type){case Xr.Legacy:if(Z.from(e.threshold).gt(255))throw new Error(`Legacy signature threshold is too large: ${e.threshold} (max 255)`);return iS(e);case Xr.NoChainIdDynamic:case Xr.Dynamic:return He(["uint8","bytes"],[t.type,iS(e)]);case Xr.Chained:throw new Error("Unreachable code: Chained signature should be handled above");default:throw new Error(`Invalid signature type: ${t.type}`)}}function iS(t){return He(["uint16","uint32","bytes"],[t.threshold,t.checkpoint,hv(t.tree)])}function hv(t){if(qi(t)||Pf(t)){const e=ne(hv(t.right)),r=ne(hv(t.left));return qi(t.right)||Pf(t.right)?He(["bytes","uint8","uint24","bytes"],[r,gr.Branch,e.length,e]):He(["bytes","bytes"],[r,e])}if(Ma(t)||Nh(t)){const e=ne(hv(t.tree));return He(["uint8","uint8","uint16","uint24","bytes"],[gr.Nested,t.weight,t.threshold,e.length,e])}if(_0(t)||Wn(t)&&t.signature!==void 0){const e=ne(t.signature);if(t.isDynamic||e.length!==wb){if(!t.address)throw new Error("Dynamic signature leaf must have address");return He(["uint8","uint8","address","uint24","bytes"],[gr.DynamicSignature,t.weight,t.address,e.length,e])}else return He(["uint8","uint8","bytes"],[gr.Signature,t.weight,e])}if(Wn(t))return He(["uint8","uint8","address"],[gr.Address,t.weight,t.address]);if(Da(t))return He(["uint8","bytes32"],[gr.Node,t.nodeHash]);if(Oa(t))return He(["uint8","bytes32"],[gr.Subdigest,t.subdigest]);throw new Error(`Unknown signature tree type: ${t}`)}function vv(t){return qi(t)?[...vv(t.left),...vv(t.right)]:Ma(t)?vv(t.tree):Wn(t)&&t.signature?[{address:t.address,signature:t.signature}]:[]}function yv(t){return Pf(t)?[...yv(t.left),...yv(t.right)]:Nh(t)?yv(t.tree):_0(t)?[t.signature]:[]}function Fp(t){return Pf(t)?[...Fp(t.left),...Fp(t.right)]:Nh(t)?Fp(t.tree):Oa(t)?[t.subdigest]:[]}async function Cb(t){const e=typeof t=="string"?Ww(t):t;if(P0(e)){const n=await Promise.all([Cb(kn({},e,{suffix:void 0})),...e.suffix.map(s=>Cb(s))]);return Hw(n[0],n.slice(1))}const{trimmed:r}=await mv(e.decoded.tree);return Il(kn({},e,{decoded:kn({},e.decoded,{tree:r})}))}async function mv(t,e=!0){if(Pf(t)){const[r,n]=await Promise.all([mv(t.left),mv(t.right)]);if(r.weight===0&&n.weight===0)try{const s=await of(t,ob,void 0);return{weight:0,trimmed:{nodeHash:ws(s)}}}catch{}else return{weight:r.weight+n.weight,trimmed:{left:r.trimmed,right:n.trimmed}}}if(Nh(t)){const r=await mv(t.tree);if(r.weight===0)try{const n=await of(t,ob,void 0);return{weight:0,trimmed:{nodeHash:ws(n)}}}catch{}return{weight:r.weight,trimmed:{weight:t.weight,threshold:t.threshold,tree:r.trimmed}}}return Da(t)&&FW(t.nodeHash)?{weight:0,trimmed:kn({},jW(t.nodeHash))}:_0(t)||Wn(t)&&t.signature!==void 0?{weight:Z.from(t.weight).toNumber(),trimmed:t}:!e&&Oa(t)?{weight:1/0,trimmed:t}:{weight:0,trimmed:t}}const Gw={decode:t=>Ww(t),encode:t=>Il(t),trim:t=>Cb(t),supportsNoChainId:!0,recover:(t,e,r)=>oA(t,e,r),encodeSigners:(t,e,r,n)=>uv(t,e,r,n),hasEnoughSigningPower:(t,e)=>{const{weight:r}=Gw.encodeSigners(t,e,[],0);return r.gte(t.threshold)},chainSignatures:(t,e)=>{const r=e.reverse(),n=ma(t)?t:Il(t),s=r.map(i=>ma(i)?i:Il(i));return Hw(n,s)},hashSetImageHash:function(t){return TW(t)},signaturesOf(t){return vv(t.tree)},signaturesOfDecoded:function(t){return yv(t.decoded.tree)}};var jxe=Object.freeze({__proto__:null,SignatureType:Xr,SignaturePartType:gr,SignaturePartTypeLength:wb,isUnrecoveredNode:Pf,isUnrecoveredNestedLeaf:Nh,isUnrecoveredSignatureLeaf:_0,decodeSignatureTree:xb,InvalidSignatureLeafError:OW,recoverTopology:of,partEncoder:gn,encodeSigners:uv,encodeTree:dv,deepestConfigOfSignature:nA,isUnrecoveredSignature:sA,isUnrecoveredChainedSignature:P0,isSignature:MW,isChainedSignature:iA,decodeSignature:Ww,decodeSignatureBody:jp,decodeChainedSignature:DW,setImageHashStruct:NW,recoverSignature:oA,encodeChain:Hw,encodeSignature:Il,encodeSignatureBody:iS,encodeSignatureTree:hv,signaturesOf:vv,signaturesOfDecoded:yv,subdigestsOfDecoded:Fp,trimSignature:Cb,trimUnrecoveredTree:mv,SignatureCoder:Gw});function Wn(t){return t.address!==void 0&&t.weight!==void 0}function Oa(t){return t.subdigest!==void 0&&t.address===void 0}function pv(t){return qi(t)?JSON.stringify({left:pv(t.left),right:pv(t.right)}):Ma(t)?JSON.stringify({weight:Z.from(t.weight).toString(),threshold:Z.from(t.threshold).toString(),tree:pv(t.tree)}):Wn(t)?JSON.stringify({address:t.address,weight:Z.from(t.weight).toString()}):JSON.stringify(t)}function gv(t){const e=typeof t=="string"?JSON.parse(t):t;return e.left!==void 0&&e.right!==void 0?{left:gv(e.left),right:gv(e.right)}:e.weight!==void 0&&e.threshold!==void 0&&e.tree!==void 0?{weight:Z.from(e.weight),threshold:Z.from(e.threshold),tree:gv(e.tree)}:e.address!==void 0&&e.weight!==void 0?{address:e.address,weight:Z.from(e.weight)}:e}function Ma(t){return t.tree!==void 0&&t.weight!==void 0&&t.threshold!==void 0}function Da(t){return t.nodeHash!==void 0}function aA(t){return Wn(t)||Oa(t)||Ma(t)||Da(t)}function qi(t){return t.left!==void 0&&t.right!==void 0}function Fxe(t){return qi(t)||aA(t)}function LW(t){return He(["uint96","address"],[t.weight,t.address])}function jW(t){const e=ne(t);if(e.length!==32)throw new Error("Invalid encoded string length");const r=Z.from(e.slice(0,12)),n=Ye(te(e.slice(12)));return{weight:r,address:n}}function FW(t){const e=ne(t);return e.length!==32?!1:e.slice(0,11).every(n=>n===0)}function ws(t){if(Wn(t))return LW(t);if(Oa(t))return aa(["string","bytes32"],[`Sequence static digest: +`,t.subdigest]);if(Ma(t)){const e=ws(t.tree);return aa(["string","bytes32","uint256","uint256"],[`Sequence nested config: +`,e,t.threshold,t.weight])}return Da(t)?t.nodeHash:aa(["bytes32","bytes32"],[ws(t.left),ws(t.right)])}function Bxe(t){const e=[];let r=t;for(;!aA(r);)e.unshift(r.right),r=r.left;return e.unshift(r),e}function Uxe(t){return t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&t.version!==void 0&&t.version===2}function lA(t){return aa(["bytes32","uint256"],[aa(["bytes32","uint256"],[ws(t.tree),t.threshold]),t.checkpoint])}function BW(t){return t.threshold!==void 0&&t.weight!==void 0&&t.members!==void 0}function gd(t){return Wn(t)||Oa(t)?[t]:Ma(t)?[{threshold:t.threshold,weight:t.weight,members:gd(t.tree)}]:Da(t)?[]:[...gd(t.left),...gd(t.right)]}function oS(t){return Da(t)?!0:qi(t)?oS(t.left)||oS(t.right):!1}function zxe(t){return{threshold:t.threshold,checkpoint:t.checkpoint,members:gd(t.tree)}}const UW=(t,e)=>t.map(r=>BW(r)?{tree:e(r.members),threshold:r.threshold,weight:r.weight}:r);function cA(t){if(t.length===0)throw new Error("Empty members array");return UW(t,cA).reduce((r,n)=>({left:r,right:n}))}function fA(t){if(t.length===0)throw new Error("Empty members array");const e=UW(t,fA);for(let r=e.length;r>1;r=r/2)for(let n=0;n=r?e[n]=e[s]:e[n]={left:e[s],right:e[i]}}return e[0]}function uA(t){return t.length>8?fA(t):cA(t)}function zW(t,e=uA){return{version:2,threshold:t.threshold,checkpoint:t.checkpoint,tree:e(t.members)}}function Eb(t,e){return Oa(t)?t.subdigest===e:qi(t)?Eb(t.left,e)||Eb(t.right,e):!1}function aS(t){const e=[t],r=new Set;for(;e.length>0;){const n=e.pop();Ma(n)?e.push(n.tree):qi(n)?(e.push(n.left),e.push(n.right)):Wn(n)&&r.add({address:n.address,weight:Z.from(n.weight).toNumber()})}return Array.from(r)}function Sb(t){return qi(t)?Sb(t.left)&&Sb(t.right):!Da(t)}const Kw={isWalletConfig:t=>t.version===2&&t.threshold!==void 0&&t.tree!==void 0,imageHashOf:t=>lA(t),hasSubdigest:(t,e)=>Eb(t.tree,e),checkpointOf:t=>Z.from(t.checkpoint),signersOf:t=>aS(t.tree),fromSimple:t=>zW({threshold:t.threshold,checkpoint:t.checkpoint,members:t.signers.map(e=>({address:e.address,weight:e.weight}))}),isComplete:t=>Sb(t.tree),update:{isKindUsed:!0,buildTransaction:(t,e,r,n)=>{const s=new en($n.mainModuleUpgradable.abi);return{entrypoint:t,transactions:[{to:t,data:s.encodeFunctionData(s.getFunction("updateImageHash"),[Kw.imageHashOf(e)]),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}},decodeTransaction:function(t){var e,r,n,s;const i=new en($n.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=i.decodeFunctionData(i.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(!rr.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(!rr.eq((n=(s=t.transactions[0])==null?void 0:s.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:Z.from(t.threshold).toString(),checkpoint:Z.from(t.checkpoint).toString(),tree:pv(t.tree)})},fromJSON:function(t){const e=JSON.parse(t);return{version:e.version,threshold:Z.from(e.threshold),checkpoint:Z.from(e.checkpoint),tree:gv(e.tree)}},editConfig:function(t,e){var r,n;const s=gd(t.tree);if(e.add)for(const i of e.add)s.find(o=>Wn(o)&&o.address===i.address)||s.push({address:i.address,weight:i.weight});if(e.remove)for(const i of e.remove){const o=s.findIndex(a=>Wn(a)&&a.address===i);o>=0&&s.splice(o,1)}return{version:t.version,threshold:(r=e.threshold)!=null?r:t.threshold,checkpoint:(n=e.checkpoint)!=null?n:t.checkpoint,tree:uA(s)}},buildStubSignature:function(t,e){const r=new Map;for(const[s,i]of e.entries()){r.set(s,{signature:i,isDynamic:!0});const{encoded:o,weight:a}=uv(t,r,[],0);if(a.gte(t.threshold))return o}const n=aS(t.tree);for(const{address:s}of n.sort(({weight:i},{weight:o})=>i-o)){const i="0x4e82f02f388a12b5f9d29eaf2452dd040c0ee5804b4e504b4dd64e396c6c781f2c7624195acba242dd825bfd25a290912e3c230841fd55c9a734c4de8d9899451b02";r.set(s,{signature:i,isDynamic:!1});const{encoded:o,weight:a}=uv(t,r,[],0);if(a.gte(t.threshold))return o}return uv(t,r,[],0).encoded}};var Vxe=Object.freeze({__proto__:null,isSignerLeaf:Wn,isSubdigestLeaf:Oa,topologyToJSON:pv,topologyFromJSON:gv,isNestedLeaf:Ma,isNodeLeaf:Da,isLeaf:aA,isNode:qi,isTopology:Fxe,encodeSignerLeaf:LW,decodeSignerLeaf:jW,isEncodedSignerLeaf:FW,hashNode:ws,leftFace:Bxe,isWalletConfig:Uxe,imageHash:lA,isSimpleNestedMember:BW,topologyToMembers:gd,hasUnknownNodes:oS,toSimpleWalletConfig:zxe,legacyTopologyBuilder:cA,merkleTopologyBuilder:fA,optimized2SignersTopologyBuilder:uA,toWalletConfig:zW,hasSubdigest:Eb,signersOf:aS,isComplete:Sb,ConfigCoder:Kw}),qxe=Object.freeze({__proto__:null});const Wxe={config:Kw,signature:Gw},VW=2,qW={version:VW,factory:"0xFaA5c0b14d1bED5C888Ca655B9a8A5911F78eF4A",guestModule:"0xfea230Ee243f88BC698dD8f1aE93F8301B6cdfaE",mainModule:"0xfBf8f1A5E00034762D928f46d438B947f5d4065d",mainModuleUpgradable:"0x4222dcA3974E39A8b41c411FeDDE9b09Ae14b911",walletCreationCode:"0x603a600e3d39601a805130553df3363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"};var Qe=Object.freeze({__proto__:null,config:Vxe,signature:jxe,context:qxe,chained:Lxe,coders:Wxe,version:VW,DeployedWalletContext:qW});function lS(t,e){const r=Ue(He(["bytes","bytes32"],[t.walletCreationCode,ht(t.mainModule,32)])),n=Ue(He(["bytes1","address","bytes32","bytes32"],["0xff",t.factory,e,r]));return Ye(Sr(n,12))}async function Hxe(t,e,r,n,s,i){return(await Promise.all(rH.map(async a=>{try{const l=a.signature.SignatureCoder.decode(te(r)),c=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),f=a.config.ConfigCoder.imageHashOf(c.config);if(lS(i[a.version],f).toLowerCase()===t.toLowerCase())return!0;const d=await a.signature.SignatureCoder.recover(l,{address:t,digest:te(e),chainId:n},s),h=a.config.ConfigCoder.imageHashOf(d.config);return lS(i[a.version],h).toLowerCase()===t.toLowerCase()}catch{}return!1}))).some(a=>a)}function Gxe(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 Kxe(t){const e=Object.keys(t).length;return t[e]}const Qxe={1:PW,2:qW};var Yxe=Object.freeze({__proto__:null,addressOf:lS,isValidCounterfactual:Hxe,isValidVersionedContext:Gxe,latestContext:Kxe,defaultContexts:Qxe});const Qw=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`;function Jxe(t,e,r,n){return Sn({},t,{chainId:r,intent:{id:n,wallet:e}})}function Xxe(t){return Ue(Hn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Zxe(t){const e=Hn.decode(["uint256",Kw],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function WW(t,e){return Hn.encode(["uint256",Kw],[t,Oy(e)])}function HW(t,e){return Ue(WW(t,e))}function eCe(t,e,r,n){return k0({address:t,chainId:e,digest:HW(r,n)})}function tCe(t,e,r){return k0({address:t,chainId:e,digest:Ue(Hn.encode(["string",Kw],["guest:",Oy(r)]))})}function GW(t,e){return e.map(r=>uA(t,r))}function uA(t,e){if(e.to)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 en($n.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 Qw(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function KW(t){return t.every(Qw)}function Oy(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:rr,target:(r=e.to)!=null?r:Cr,value:e.value!==void 0?e.value:rr,data:e.data!==void 0?e.data:[]}})}function rCe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function nCe(t,e){const r=Z.from(t),n=Z.from(e),s=eF.pow(Z.from(96));if(!n.div(s).eq(rr))throw new Error("Space already encoded");return n.add(r.mul(s))}function sCe(t){const e=Z.from(t),r=eF.pow(Z.from(96));return[e.div(r),e.mod(r)]}function iCe(t,e){return Array.isArray(e)?KW(e)?e:GW(t,e).map(n=>n.transaction):Qw(e)?[e]:[uA(t,e).transaction]}function QW(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&&Qw(r),!0)}function YW(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&QW(t)}function oCe(t){const e=new en($n.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),YW(t)?[Oy(t.transactions),t.nonce,t.signature]:[Oy(t.transactions),0,[]])}const JW="0x61c2926c",XW=`tuple( +)[]`;function Jxe(t,e,r,n){return kn({},t,{chainId:r,intent:{id:n,wallet:e}})}function Xxe(t){return Ue(Gn.encode(["address","uint256","bytes32"],[t.intent.wallet,t.chainId,t.intent.id]))}function Zxe(t){const e=Gn.decode(["uint256",Qw],t);if(e.length!==2||!e[0]||!e[1])throw new Error("Invalid meta transaction data");return[e[0],e[1]]}function WW(t,e){return Gn.encode(["uint256",Qw],[t,My(e)])}function HW(t,e){return Ue(WW(t,e))}function eCe(t,e,r,n){return $0({address:t,chainId:e,digest:HW(r,n)})}function tCe(t,e,r){return $0({address:t,chainId:e,digest:Ue(Gn.encode(["string",Qw],["guest:",My(r)]))})}function GW(t,e){return e.map(r=>dA(t,r))}function dA(t,e){if(e.to)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 en($n.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 Yw(t){return t.delegateCall!==void 0||t.revertOnError!==void 0}function KW(t){return t.every(Yw)}function My(t){return t.map(e=>{var r;return{delegateCall:e.delegateCall===!0,revertOnError:e.revertOnError===!0,gasLimit:e.gasLimit!==void 0?e.gasLimit:rr,target:(r=e.to)!=null?r:Ar,value:e.value!==void 0?e.value:rr,data:e.data!==void 0?e.data:[]}})}function rCe(t){return t.map(e=>({delegateCall:e.delegateCall,revertOnError:e.revertOnError,gasLimit:e.gasLimit,to:e.target,value:e.value,data:e.data}))}function nCe(t,e){const r=Z.from(t),n=Z.from(e),s=SV.pow(Z.from(96));if(!n.div(s).eq(rr))throw new Error("Space already encoded");return n.add(r.mul(s))}function sCe(t){const e=Z.from(t),r=SV.pow(Z.from(96));return[e.div(r),e.mod(r)]}function iCe(t,e){return Array.isArray(e)?KW(e)?e:GW(t,e).map(n=>n.transaction):Yw(e)?[e]:[dA(t,e).transaction]}function QW(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&&Yw(r),!0)}function YW(t){return t!==void 0&&t.signature!==void 0&&t.signature!==""&&QW(t)}function oCe(t){const e=new en($n.mainModule.abi);return e.encodeFunctionData(e.getFunction("execute"),YW(t)?[My(t.transactions),t.nonce,t.signature]:[My(t.transactions),0,[]])}const JW="0x61c2926c",XW=`tuple( bool delegateCall, bool revertOnError, uint256 gasLimit, address target, uint256 value, bytes data -)[]`,lS=(t,e)=>{const r=[],n=new en($n.mainModule.abi);for(const s of e){const i=ne(s.data||"0x");if(s.to===t&&te(i.slice(0,4))===JW){const o=i.slice(4),a=Hn.decode([XW],o)[0];r.push(...lS(s.to,a.map(l=>Sn({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=lS(t,o.map(l=>Sn({},l,{to:l.target})));r.push(...a)}catch{r.push(s)}}return r};var aCe=Object.freeze({__proto__:null,MetaTransactionsType:Kw,intendTransactionBundle:Jxe,intendedTransactionID:Xxe,unpackMetaTransactionsData:Zxe,packMetaTransactionsData:WW,digestOfTransactions:HW,subdigestOfTransactions:eCe,subdigestOfGuestModuleTransactions:tCe,toSequenceTransactions:GW,toSequenceTransaction:uA,isSequenceTransaction:Qw,hasSequenceTransactions:KW,sequenceTxAbiEncode:Oy,fromTxAbiEncode:rCe,encodeNonce:nCe,decodeNonce:sCe,fromTransactionish:iCe,isTransactionBundle:QW,isSignedTransactionBundle:YW,encodeBundleExecData:oCe,selfExecuteSelector:JW,selfExecuteAbi:XW,unwind:lS});const ZW="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",lCe="0x6492649264926492649264926492649264926492649264926492649264926492";async function eH(t,e,r,n){return await t.call({data:Ht([ZW,new Z8().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var cCe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ZW,EIP_6492_SUFFIX:lCe,validateEIP6492Offchain:eH});class fCe{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new gh(e,[...$n.mainModuleUpgradable.abi,...$n.mainModule.abi,...$n.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>ne(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Hn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(s=>ne(s));if(n.length===20)return Ye(te(n));if(n.length===32)return Hn.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 eH(this.provider,e,r,n)}}var uCe=Object.freeze({__proto__:null,OnChainReader:fCe});function dCe(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ye=Object.freeze({__proto__:null,config:$xe,signature:Axe,context:Yxe,signer:Oxe,EIP1271:Txe,transaction:aCe,reader:uCe,EIP6492:cCe,isWalletSignRequestMetadata:dCe});const cS=[{config:eA,signature:Z4},{config:Gw,signature:Hw}];function tH(t){const e=t-1;if(e<0||e>=cS.length)throw new Error(`No coder for version: ${t}`);return cS[e]}function hCe(t){return tH(t)}var Fn=Object.freeze({__proto__:null,ALL_CODERS:cS,coderFor:tH,genericCoderFor:hCe});const rH=[Xo,Qe],vCe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:rH,commons:ye,universal:Fn,v1:Xo,v2:Qe},Symbol.toStringTag,{value:"Module"}));function yCe(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:s,chainId:i}=e;let o=n,a=s;const l=Object.values(this.contexts),c=[];for(let f=1;fne(i).length===0))return JR;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:Z.from(s).toNumber(),gasLimit:Z.from(s).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 i=await new gh(e,$n.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ye.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let d=0;for(;!o;){try{return await f()}catch(h){if(d++,s!==void 0&&d>=s)throw xe.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,h),h;xe.warn(`attempt #${d} failed${u?`: ${u}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=i.fromBlockLog;if(f<0&&(f=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,f-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-i.deltaBlocksLog)} to ${d}`);f=d;const y=(await Promise.all(h.map(b=>a(()=>i.provider.getTransactionReceipt(b.transactionHash),`unable to get receipt for transaction ${b.transactionHash}`)))).find(b=>b.logs.find(p=>p.topics.length===0&&p.data.replace("0x","")===u||p.topics.length===1&&p.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&p.data.length>=64&&p.data.replace("0x","").startsWith(u)));if(y)return Pf({receipt:y},await a(()=>i.provider.getTransaction(y.transactionHash),`unable to get transaction ${y.transactionHash}`));o||await new Promise(b=>setTimeout(b,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function CCe(t){return t.signer!==void 0&&bf.isSigner(t.signer)}class ECe extends aH{constructor(e){if(super(bf.isSigner(e)?{provider:e.provider}:Pf({},e,{provider:e.signer.provider})),this.signer=bf.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){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&&xe.warn("LocalRelayer doesn't accept fee quotes");const s=ye.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(Pf({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}const SCe="v1",kCe="v0.4.0",$Ce="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let yl=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}({}),ACe=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}({}),_Ce=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),PCe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class lH{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Nr({},n)).then(s=>Lr(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Nr({},n)).then(s=>Lr(s).then(i=>({data:i.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Nr({},n)).then(s=>Lr(s).then(i=>({chainID:i.chainID}))),this.sendMetaTxn=(n,s)=>this.fetch(this.url("SendMetaTxn"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,s)=>this.fetch(this.url("GetMetaTxnNonce"),Nr(n,s)).then(i=>Lr(i).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,s)=>this.fetch(this.url("GetMetaTxnReceipt"),Nr(n,s)).then(i=>Lr(i).then(o=>({receipt:o.receipt}))),this.simulate=(n,s)=>this.fetch(this.url("Simulate"),Nr(n,s)).then(i=>Lr(i).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,s)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Nr(n,s)).then(i=>Lr(i).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Nr({},n)).then(s=>Lr(s).then(i=>({isFeeRequired:i.isFeeRequired,tokens:i.tokens}))),this.feeOptions=(n,s)=>this.fetch(this.url("FeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,s)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options}))),this.sentTransactions=(n,s)=>this.fetch(this.url("SentTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,s)=>this.fetch(this.url("PendingTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,s)=>this.fetch(this.url("ListGasSponsors"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,s)=>this.fetch(this.url("AddGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,s)=>this.fetch(this.url("UpdateGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,s)=>this.fetch(this.url("ReportGasSponsorUsage"),Nr(n,s)).then(i=>Lr(i).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Nr=(t={},e={})=>({method:"POST",headers:Pf({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Lr=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 Qd=Object.freeze({__proto__:null,WebRPCVersion:SCe,WebRPCSchemaVersion:kCe,WebRPCSchemaHash:$Ce,ETHTxnStatus:yl,TransferType:ACe,FeeTokenType:_Ce,SortOrder:PCe,Relayer:lH});const TCe=[yl.DROPPED,yl.SUCCEEDED,yl.PARTIALLY_FAILED,yl.FAILED],RCe=[yl.DROPPED,yl.PARTIALLY_FAILED,yl.FAILED];function ICe(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&sc.isProvider(t.provider)}const OCe=typeof global=="object"?global.fetch:window.fetch;class cH{constructor(e){this.service=new lH(e.url,OCe),this.provider=sc.isProvider(e.provider)?e.provider:new Ug(Iy(e.provider.url))}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e)),xe.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&TCe.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=Hn.encode([ye.transaction.MetaTransactionsType],[ye.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(l=>l.symbol).join(", ");xe.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw xe.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:ye.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return xe.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return xe.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:te(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){xe.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?Z.from(r).toHexString():void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=Z.from(s.nonce),[o,a]=ye.transaction.decodeNonce(i);return xe.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0){var s=this;xe.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let i;if(r!==void 0&&(typeof r._quote=="string"?i=r._quote:xe.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw xe.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ye.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:i});if(xe.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var d;if(!s.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await s.wait(e.intent.id),v=(d=h.receipt)==null?void 0:d.transactionHash;if(!v)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,h),s.provider.waitForTransaction(v,u)};return l.wait=c,l}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||RCe.includes(a.status))throw new MCe(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:Z.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return i.provider.waitForTransaction(l.transactionHash,c)}}}}class MCe{constructor(e){this.receipt=e}}function fH(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 DCe=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:ECe,ProviderRelayer:aH,ProviderRelayerDefaults:oH,RpcRelayer:cH,RpcRelayerProto:Qd,isLocalRelayerOptions:CCe,isProviderRelayerOptions:xCe,isRelayer:fH,isRpcRelayerOptions:ICe,proto:Qd},Symbol.toStringTag,{value:"Module"}));function uH(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class dH{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,s){return s.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var NCe=Object.freeze({__proto__:null,isSapientSigner:uH,SignerWrapper:dH});function hH(t){return t.rejected}function dA(t){return t.signature!==void 0}function vH(t){return!hH(t)&&!dA(t)}const yH="Initial";class Yw{constructor(e,r=Yw.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${te(z2(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>uH(r)?r:new dH(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(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(s){const{message:i,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:i,signers:{}};let f=o??{};const u=y=>{f=y,r.notifyObservers(n,c,f)},d=()=>{try{r.notifyObservers(n,c,f);const y=Object.entries(c.signers).filter(([b,p])=>vH(p));if(a&&a(c,u)||y.length===0){c.ended=!0,s(c),r.notifyObservers(n,c,f);return}}catch(y){console.error("Error while notifying observers",y)}};let h=r.signers;if(l){const y=await Promise.all(r.signers.map(async function(b){return b.getAddress()}));h=r.signers.filter((b,p)=>l.includes(y[p]))}const v=await Promise.allSettled(h.map(async function(y){const b=await y.getAddress();return c.signers[b]={situation:yH},y.requestSignature(n,i,o??{},{onSignature:p=>{const g=y.suffix();c.signers[b]={signature:p,suffix:g},d()},onRejection:p=>{c.signers[b]={rejected:!0,error:p},d()},onStatus:p=>{c.signers[b]={situation:p},d()}})}));for(let y=0;ymt(e))):mt(t)}const ZR=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(dA(n)){const s=ne(n.suffix),i=He(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class My extends bf{constructor(e){if(rr.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=ye.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new My(Uc({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ye.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){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(ye.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return My.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(Uc({},e,{chainId:this.chainId,intent:{id:te(z2(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new en($n.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 signDigest(e,r){const n=rS(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 s=Uc({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),i=ne(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:i,metadata:s,callback:(l,c)=>{const f=ZR(l),u=Uc({},s,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=ZR(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Ue(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=Z.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 ye.transaction.encodeNonce(r,n)}async signTransactions(e,r){const n=await XR(e),s=ye.transaction.fromTransactionish(this.address,n);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const i=await this.fetchNonceOrSpace(r),o=ye.transaction.digestOfTransactions(i,s),a=await this.signDigest(o,{transactions:s});return{intent:{id:rS(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:i,signature:a}}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 s=await this.signTransactions(e,r),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,n)}async fillGasLimits(e){const r=await XR(e),n=ye.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?Z.from(o.gasLimit).toNumber():i[a].gasLimit;return Uc({},o,i[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function zc(){return zc=Object.assign?Object.assign.bind():function(t){for(var e=1;ejCe(t[e])):!1}function BCe(t){if(!t)return[];const e=Z.from(t.value);switch(t.token.type){case Qd.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Qd.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 en([{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 UCe{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 s of r)if(s.token.type===Qd.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(Z.from(s.value)))return s}else if(s.token.contractAddress&&s.token.type===Qd.FeeTokenType.ERC20_TOKEN&&(await new gh(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(Z.from(s.value)))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e){var r,n,s,i,o;const a=FCe(e)?await mt(e):e,l=await this.account.prepareTransactions({txs:a,chainId:this.chainId,stubSignatureOverrides:(r=(n=this.options)==null?void 0:n.stubSignatureOverrides)!=null?r:new Map}),f=await((s=(i=this.options)==null?void 0:i.selectFee)!=null?s:this.defaultSelectFee.bind(this))(a,l.feeOptions),u=[...l.transactions,...BCe(f)];return this.account.sendTransaction(u,this.chainId,l.feeQuote,void 0,void 0,(o=this.options)!=null&&o.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(Z.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 zCe{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return rr}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class ta{constructor(e){this.address=Ye(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.migrations=e.migrations||hS.DefaultMigrations,this.migrator=new dS.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new UCe(this,e,r)}static async new(e){var r;const s=new dS.Migrator(e.tracker,(r=e.migrations)!=null?r:hS.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),l=e.contexts[s.version],c=ye.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new ta({address:c,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=Z.from(e),n=this.networks.find(s=>r.eq(s.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 Ug(Iy(r.rpcUrl),{name:"",chainId:Z.from(e).toNumber()})}reader(e){return rr.eq(e)?new zCe:new ye.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 fH(r.relayer)?r.relayer:new cH(r.relayer)}setOrchestrator(e){this.orchestrator=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=Fn.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=rr.eq(e);return new My({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(k=>{if(!k)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return k}),o=i.then(k=>nH.counterfactualVersion(this.address,k.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const $=await n.reader(e).implementation(n.address);if(!$)throw new Error(`Implementation not found for wallet ${n.address}`);const C=Object.values(n.contexts);for(let T=0;T0?y[y.length-1].nextImageHash:d,p=await this.tracker.configOfImageHash({imageHash:b});if(!p)throw new Error(`Config not found for imageHash ${b}`);const g=await s,w=await i,E=Fn.coderFor(h).config.checkpointOf(p);return{original:zc({},w,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:g},fullyMigrated:h===this.version,signedMigrations:v,version:h,presignedConfigurations:y,imageHash:b,config:p,checkpoint:E,canOnchainValidate:f===this.version&&g}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);if(n.transactions.length===0)return e;const s={entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]};return r.onChain.deployed||(s.intent.id=ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,s.chainId,s.transactions)),s}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(e));const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitness(){const e=Ue(xt(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore"){const i=rr.eq(r)?this.networks[0].chainId:r,o=await this.status(i);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),c=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(s){case"ignore":return c;case"eip6492":return this.buildEIP6492Signature(await c,o,r)}return c}buildEIP6492Signature(e,r,n){const s=this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=Hn.encode(["address","bytes","bytes"],[s.entrypoint,ye.transaction.encodeBundleExecData(s),e]);return He(["bytes","bytes32"],[i,ye.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,zc({},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),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=My.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:ye.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const s=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:i}=this.contextFor(e.version);return{entrypoint:i,transactions:n,chainId:r,intent:{id:s,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 s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(zc({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Ue(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const a=await this.walletForStatus(r,i).signTransactions(e,(s==null?void 0:s.nonceSpace)&&{space:s==null?void 0:s.nonceSpace});return zc({},a,{signature:await this.decorateSignature(a.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=Fn.coderFor(i.version).config,l=a.imageHashOf(i),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);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(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i){const o=s||await this.status(e.chainId);this.mustBeFullyMigrated(o);const a=this.decorateTransactions(e,o);return i==null||i(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,s){const i=s||await this.status(r),o=this.walletForStatus(r,i),a=await this.predecorateTransactions(e,i,r),l=ye.transaction.fromTransactionish(this.address,a),c=o.coders.config.buildStubSignature(o.config,n),f=te(z2(32)),u={chainId:r,intent:{id:f,wallet:this.address},signature:c,transactions:l,entrypoint:this.address,nonce:0},d=this.decorateTransactions(u,i),h=ye.transaction.encodeBundleExecData(d),v=await this.relayer(r).getFeeOptionsRaw(d.entrypoint,h);return zc({},v,{decorated:d})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r),i=ye.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),l=s?e:await this.predecorateTransactions(e,a,r),c=await this.signTransactions(l,r,void 0,o);return this.sendSignedTransactions(c,r,n,void 0,i)}async signTypedData(e,r,n,s,i="ignore"){const o=Uw({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>Fn.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Fn.genericCoderFor(f.version).config.signersOf(f).forEach(h=>{const v=r.find(y=>y.address===h.address&&y.network===s);if(v&&c&&v.flaggedForRemoval){v.flaggedForRemoval=!1;return}v||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!c})})}))})),r}}function VCe(t){return t instanceof ta}const qCe=Object.freeze(Object.defineProperty({__proto__:null,Account:ta,isAccount:VCe},Symbol.toStringTag,{value:"Module"}));function Sb(){return Sb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),vs({},n)).then(s=>ys(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),vs({},n)).then(s=>ys(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),vs({},n)).then(s=>ys(s).then(i=>({status:i.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),vs({},n)).then(s=>ys(s).then(i=>({chainID:i.chainID}))),this.getEtherBalance=(n,s)=>this.fetch(this.url("GetEtherBalance"),vs(n,s)).then(i=>ys(i).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,s)=>this.fetch(this.url("GetTokenBalances"),vs(n,s)).then(i=>ys(i).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,s)=>this.fetch(this.url("GetTokenSupplies"),vs(n,s)).then(i=>ys(i).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,s)=>this.fetch(this.url("GetTokenSuppliesMap"),vs(n,s)).then(i=>ys(i).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,s)=>this.fetch(this.url("GetBalanceUpdates"),vs(n,s)).then(i=>ys(i).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,s)=>this.fetch(this.url("GetTransactionHistory"),vs(n,s)).then(i=>ys(i).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,s)=>this.fetch(this.url("SyncBalance"),vs(n,s)).then(i=>ys(i).then(o=>({}))),this.fetchTransactionReceipt=(n,s)=>this.fetch(this.url("FetchTransactionReceipt"),vs(n,s)).then(i=>ys(i).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),vs(n,s)).then(i=>ys(i).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const vs=(t={},e={})=>({method:"POST",headers:Sb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ys=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});let ZCe=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const eI=typeof global=="object"?global.fetch:window.fetch;class Jw extends mH{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,eI),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=Sb({},s.headers,i),eI(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const eEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:hA,EventLogDataType:QCe,EventLogType:KCe,Indexer:mH,SequenceIndexerClient:Jw,SequenceIndexerServices:ZCe,SortOrder:XCe,TransactionStatus:YCe,TransactionType:JCe,TxnTransferType:Ci,WebRPCSchemaHash:GCe,WebRPCSchemaVersion:HCe,WebRPCVersion:WCe},Symbol.toStringTag,{value:"Module"}));function vS(){return vS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),nn({},n)).then(s=>sn(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.getTokenMetadata=(n,s)=>this.fetch(this.url("GetTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,s)=>this.fetch(this.url("RefreshTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,s)=>this.fetch(this.url("GetTokenMetadataBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,s)=>this.fetch(this.url("SearchTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,s)=>this.fetch(this.url("SearchTokenIDs"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,s)=>this.fetch(this.url("TokenCollectionFilters"),nn(n,s)).then(i=>sn(i).then(o=>({filters:o.filters}))),this.getContractInfo=(n,s)=>this.fetch(this.url("GetContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,s)=>this.fetch(this.url("GetContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,s)=>this.fetch(this.url("SearchContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,s)=>this.fetch(this.url("SearchContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,s)=>this.fetch(this.url("SearchMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,s)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),nn(n,s)).then(i=>sn(i).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPrices"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const nn=(t={},e={})=>({method:"POST",headers:vS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),sn=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}),lEe=typeof global=="object"?global.fetch:window.fetch;class Xw extends pH{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,lEe)}}const cEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:sEe,Metadata:pH,PropertyType:iEe,SequenceMetadataClient:Xw,SortOrder:aEe,SwapType:oEe,WebRPCSchemaHash:nEe,WebRPCSchemaVersion:rEe,WebRPCVersion:tEe},Symbol.toStringTag,{value:"Module"}));function fEe(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function uEe(t){return t.startsWith("ipfs://")}class dEe{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(ye.signer.canRecover(n)){const l=ye.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ye.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await vEe(hEe(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=te(await(s||new yEe).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 gH(t,e,r,a,s,i+1)}class yEe{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>uEe(n)?fEe(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()},this.gateway=e}}const mEe=(t,e)=>e.some(r=>t instanceof r);let tI,rI;function pEe(){return tI||(tI=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function gEe(){return rI||(rI=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bH=new WeakMap,yS=new WeakMap,wH=new WeakMap,OE=new WeakMap,vA=new WeakMap;function bEe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Il(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&bH.set(r,t)}).catch(()=>{}),vA.set(e,t),e}function wEe(t){if(yS.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});yS.set(t,e)}let mS={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return yS.get(t);if(e==="objectStoreNames")return t.objectStoreNames||wH.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Il(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 xEe(t){mS=t(mS)}function CEe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(ME(this),e,...r);return wH.set(n,e.sort?e.sort():[e]),Il(n)}:gEe().includes(t)?function(...e){return t.apply(ME(this),e),Il(bH.get(this))}:function(...e){return Il(t.apply(ME(this),e))}}function EEe(t){return typeof t=="function"?CEe(t):(t instanceof IDBTransaction&&wEe(t),mEe(t,pEe())?new Proxy(t,mS):t)}function Il(t){if(t instanceof IDBRequest)return bEe(t);if(OE.has(t))return OE.get(t);const e=EEe(t);return e!==t&&(OE.set(t,e),vA.set(e,t)),e}const ME=t=>vA.get(t);function SEe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Il(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Il(o.result),l.oldVersion,l.newVersion,Il(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),s&&l.addEventListener("versionchange",c=>s(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const kEe=["get","getKey","getAll","getAllKeys","count"],$Ee=["put","add","delete","clear"],DE=new Map;function nI(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(DE.get(e))return DE.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=$Ee.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||kEe.includes(r)))return;const i=async function(o,...a){const l=this.transaction(o,s?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),s&&l.done]))[0]};return DE.set(e,i),i}xEe(t=>({...t,get:(e,r,n)=>nI(e,r)||t.get(e,r,n),has:(e,r)=>!!nI(e,r)||t.has(e,r)}));class AEe{}var _Ee=Object.freeze({__proto__:null,ConfigTracker:AEe});class PEe{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),In(e,"? "),In(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),In(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),In(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),In(e,"? "),In(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),In(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),In(e,"? "),In(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),In(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),In(e,"? "),In(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),In({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),In(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),In({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function In(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 TEe=Object.freeze({__proto__:null,DebugConfigTracker:PEe});function Gl(){return Gl=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 s,i;return Promise.resolve(((s=this.migrations[e])==null||(i=s[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(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:s,toImageHash:i}),Promise.resolve())}}function gd(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]=Z.from(n):Array.isArray(n)?e[r]=n.map(s=>gd(s)):typeof n=="object"&&n!==null?e[r]=gd(n):e[r]=n}return e}class REe{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(i=>gd(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>gd(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>gd(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,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,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await SEe(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),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 CH(t){return t.left!==void 0&&t.right!==void 0}function EH(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function pS(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var IEe=Object.freeze({__proto__:null,isPlainNode:CH,isPlainNested:EH,isPlainV2Config:pS,MemoryTrackerStore:xH,recreateBigNumbers:gd,IndexedDBStore:REe});class SH{constructor(e,r=new xH,n=!1){var s=this;this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(CH(o)){const[a,l]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:l}}return EH(o)?{weight:Z.from(o.weight),threshold:Z.from(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(Qe.config.isNodeLeaf(i))return;const o=Qe.config.hashNode(i);if(Qe.config.isNode(i)){const a=s.saveTopology(i.left),l=s.saveTopology(i.right),c=s.store.saveV2Node(o,{left:Qe.config.hashNode(i.left),right:Qe.config.hashNode(i.right)});await Promise.all([a,l,c]);return}if(Qe.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),l=s.store.saveV2Node(o,{weight:Z.from(i.weight).toString(),threshold:Z.from(i.threshold).toString(),tree:Qe.config.hashNode(i.tree)});await Promise.all([a,l]);return}if(Qe.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(Qe.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(Xo.config.ConfigCoder.isWalletConfig(o)){const a=Xo.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(Qe.config.ConfigCoder.isWalletConfig(o)){const a=Qe.config.ConfigCoder.imageHashOf(o);if(Qe.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!pS(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(pS(a)){const l={version:2,threshold:Z.from(a.threshold),checkpoint:Z.from(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,l=Fn.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(c=>{const f=ye.context.addressOf(c,l);return s.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=ye.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=Qe.signature.SignatureCoder.decode(i.signature),a=Fn.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),l=Qe.chained.messageSetImageHash(a),c=Ue(l),f={message:l,address:i.wallet,chainId:0,digest:c},u=s.savePayload({payload:f}),d=s.saveWalletConfig({config:i.nextConfig}),h=await Qe.signature.SignatureCoder.recover(o,f,s.provider),v=Qe.signature.signaturesOf(h.config.tree);await Promise.all([u,d,s.saveWalletConfig({config:h.config}),...v.map(y=>s.store.saveSignatureOfSubdigest(y.address,h.subdigest,y.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:l}=i,c=await s.configOfImageHash({imageHash:a});if(!c||!Qe.config.ConfigCoder.isWalletConfig(c))return[];const f=Qe.config.signersOf(c.tree).map(w=>w.address),u=await Promise.all(f.map(w=>s.store.loadSubdigestsOfSigner(w))),d=[...new Set(u.flat())],v=(await Promise.all([...new Set(d)].map(async function(w){return Gl({},await s.payloadOfSubdigest({subdigest:w}),{subdigest:w})}))).filter(w=>(w==null?void 0:w.message)&&(w==null?void 0:w.address)&&w.address===o).map(w=>({payload:w,nextImageHash:Qe.chained.decodeMessageSetImageHash(w.message)})).filter(w=>w==null?void 0:w.nextImageHash);let y;const p=(await Promise.all(v.map(async function({nextImageHash:w,payload:E}){const k=await s.configOfImageHash({imageHash:w});if(!k||!Qe.config.isWalletConfig(k))return;const $=Z.from(k.checkpoint);return{nextConfig:k,nextCheckpoint:$,nextImageHash:w,payload:E}}))).filter(w=>w!==void 0).filter(w=>w.nextCheckpoint.gt(c.checkpoint)).sort((w,E)=>w.nextCheckpoint.gt(E.nextCheckpoint)?l?1:-1:l?-1:1);for(const w of p){const{nextConfig:E,nextCheckpoint:k,nextImageHash:$,payload:C}=w;if(y){const F=y.checkpoint;if(l){if(k.gte(F))continue}else if(k.lte(F))continue}const T=new Map((await Promise.all(f.map(async function(F){const U=await s.store.loadSignatureOfSubdigest(F,C.subdigest);if(!U)return[F,void 0];const V=te(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(F,C.subdigest,U):U),N=ye.signer.tryRecoverSigner(C.subdigest,V)!==F;return[F,{isDynamic:N,signature:V}]}))).filter(F=>Boolean(F[1])));if(T.size===0)continue;const j=Qe.signature.SignatureCoder.encodeSigners(c,T,[],0);j.weight.lt(c.threshold)||(y={nextImageHash:$,checkpoint:Z.from(E.checkpoint),signature:j.encoded})}if(!y)return[];const g=await s.loadPresignedConfiguration({wallet:o,fromImageHash:y.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:y.nextImageHash,signature:y.signature},...g]},this.saveWitnesses=async function(i){const o={digest:i.digest,address:i.wallet,chainId:i.chainId},a=ye.signature.subdigestOf(o);await Promise.all([s.savePayload({payload:o}),...i.signatures.filter(l=>ye.signer.canRecover(l)).map(l=>{const c=ye.signer.recoverSigner(a,l);return s.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(c=>s.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(h=>h.wallet===f))continue;const u=ye.signature.subdigestOf(c),d=await s.store.loadSignatureOfSubdigest(i.signer,u);d&&l.push({wallet:f,proof:{digest:c.digest,chainId:Z.from(c.chainId),signature:te(d)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new dEe(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!Qe.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=iH.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Qe.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=ye.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=Ue(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ye.signature.subdigestOf(c),u=this.savePayload({payload:c}),d=this.saveWalletConfig({config:r.toConfig}),h=Xo.signature.SignatureCoder.decode(r.tx.signature),v=await Xo.signature.SignatureCoder.recover(h,c,this.provider),y=Xo.signature.SignatureCoder.signaturesOf(v.config);await Promise.all([u,d,this.saveWalletConfig({config:v.config}),this.store.saveMigrationsSubdigest(e,s,s+1,f,i),...y.map(b=>this.store.saveSignatureOfSubdigest(b.address,v.subdigest,b.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Fn.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:d}=f,h=await i.payloadOfSubdigest({subdigest:u});if(!h||!h.message||!Z.from(s).eq(h.chainId))return;const v=l.config.signersOf(o).map(w=>w.address),y=new Map((await Promise.all(v.map(async function(w){const E=await i.store.loadSignatureOfSubdigest(w,u);if(!E)return[w,void 0];const k=te(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(w,u,E):E),$=ye.signer.tryRecoverSigner(u,k)!==w;return[w,{isDynamic:$,signature:k}]}))).filter(w=>Boolean(w[1]))),b=l.signature.encodeSigners(o,y,[],s);if(!b||b.weightf.filter(u=>u!==void 0)))[0]}}var OEe=Object.freeze({__proto__:null,LocalConfigTracker:SH});let NE=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class MEe{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),pi({},n)).then(s=>gi(s).then(i=>({}))),this.config=(n,s)=>this.fetch(this.url("Config"),pi(n,s)).then(i=>gi(i).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,s)=>this.fetch(this.url("Wallets"),pi(n,s)).then(i=>gi(i).then(o=>({wallets:o.wallets}))),this.deployHash=(n,s)=>this.fetch(this.url("DeployHash"),pi(n,s)).then(i=>gi(i).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,s)=>this.fetch(this.url("ConfigUpdates"),pi(n,s)).then(i=>gi(i).then(o=>({updates:o.updates}))),this.migrations=(n,s)=>this.fetch(this.url("Migrations"),pi(n,s)).then(i=>gi(i).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,s)=>this.fetch(this.url("SaveConfig"),pi(n,s)).then(i=>gi(i).then(o=>({}))),this.saveWallet=(n,s)=>this.fetch(this.url("SaveWallet"),pi(n,s)).then(i=>gi(i).then(o=>({}))),this.saveSignature=(n,s)=>this.fetch(this.url("SaveSignature"),pi(n,s)).then(i=>gi(i).then(o=>({}))),this.saveSignerSignatures=(n,s)=>this.fetch(this.url("SaveSignerSignatures"),pi(n,s)).then(i=>gi(i).then(o=>({}))),this.saveMigration=(n,s)=>this.fetch(this.url("SaveMigration"),pi(n,s)).then(i=>gi(i).then(o=>({}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const pi=(t={},e={})=>({method:"POST",headers:Gl({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),gi=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 DEe{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new MEe(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:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(LE(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Fn.genericCoderFor(r.version).config.imageHashOf(r),s=Qe.signature.setImageHashStruct(n),i=Ue(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:Nm(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ye.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:Hu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return NEe(r,n)}catch(r){if(LE(r))return;throw r}}async saveWalletConfig(e){const r=Nm(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(LE(r))return;throw r}}async saveCounterfactualWallet(e){const r=Nm(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:s,chainID:i,type:o,signature:a}])=>{switch(o){case NE.EIP712:a+=te(ye.signer.SigType.EIP712).slice(2);break;case NE.EthSign:a+=te(ye.signer.SigType.ETH_SIGN).slice(2);break;case NE.EIP1271:a+=te(ye.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:Z.from(i)}}})}async getMigration(e,r,n,s){var i=this;const o=Hu(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const d=a[u];if(d){const h=Object.keys(d).map(Number).sort((v,y)=>y-v);for(const v of h)for(const[y,b]of Object.entries(d[v]))try{const p=await i.configOfImageHash({imageHash:y});if(p)return{fromVersion:n,toVersion:v,toConfig:p,tx:{entrypoint:b.executor,transactions:b.transactions,nonce:b.nonce,signature:b.signature,chainId:u,intent:{id:ye.transaction.subdigestOfTransactions(e,u,b.nonce,b.transactions),wallet:e}}}}catch(p){console.error(p)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Nm(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(LEe),nonce:Hu(r.tx.nonce),signature:r.tx.signature,chainID:Hu(r.tx.chainId)})}}function Nm(t){switch(t.version){case 1:if(Xo.config.ConfigCoder.isWalletConfig(t))return{threshold:Yc(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Yc(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Qe.config.ConfigCoder.isWalletConfig(t))return{threshold:Yc(t.threshold),checkpoint:Yc(t.checkpoint),tree:Fp(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Fp(t){return Qe.config.isNode(t)?{left:Fp(t.left),right:Fp(t.right)}:Qe.config.isSignerLeaf(t)?{weight:Yc(t.weight),address:t.address}:Qe.config.isNestedLeaf(t)?{weight:Yc(t.weight),threshold:Yc(t.threshold),tree:Fp(t.tree)}:Qe.config.isNodeLeaf(t)?{node:t.nodeHash}:Gl({},t)}function NEe(t,e){switch(t){case 1:return Gl({},e,{version:t});case 2:return Gl({},e,{version:t,tree:Bp(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Bp(t){switch(typeof t){case"object":const e=Gl({},t);return e.left!==void 0&&(e.left=Bp(e.left)),e.right!==void 0&&(e.right=Bp(e.right)),e.tree!==void 0&&(e.tree=Bp(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 LEe(t){return{to:t.to,value:t.value!==void 0?Hu(t.value):void 0,data:t.data!==void 0?te(t.data):void 0,gasLimit:t.gasLimit!==void 0?Hu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Yc(t){return Z.from(t).toNumber()}function Hu(t){return Z.from(t).toString()}function LE(t){return typeof t=="object"&&t.status===404}var jEe=Object.freeze({__proto__:null,RemoteConfigTracker:DEe});function gS(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function N1(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class FEe{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await gS(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Fn.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 s=new SH(void 0),i=await N1(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.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 gS(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(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 N1(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=i.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},i.set(f,u)),u.signatures.push(c)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await N1(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),i=(await N1(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Fn.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!i)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return i.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class BEe{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 s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return s||[]}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 s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);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 sI{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,UEe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function UEe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function zEe(t){return t instanceof kH}class kH{constructor(e,r=50,n=!1){this.cache=new sI,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new sI}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),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)}}var yA=Object.freeze({__proto__:null,debug:TEe,local:OEe,remote:jEe,stores:IEe,raceUntil:gS,allSafe:N1,MultipleTracker:FEe,CachedTracker:BEe,isDedupedTracker:zEe,DedupedTracker:kH});const VEe=Object.freeze(Object.defineProperty({__proto__:null,tracker:_Ee,trackers:yA},Symbol.toStringTag,{value:"Module"})),$H=60*60*24*7,qEe=60;class iI{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:$H,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 s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new yd(n,s)}(),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 c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"fulfilled",value:void 0})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Ry,n=Z.from(this.settings.sequenceApiChainId),s=Ni(this.account.networks,n);if(!s)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new Ug(Iy(s.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 yd(r,n)}return this.apiClient}getMetadataClient(){return this.metadataClient||(this.metadataClient=new Xw(this.settings.sequenceMetadataUrl)),this.metadataClient}async getIndexerClient(e){const r=Ni(this.account.networks,e);if(!r)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(r.chainId))if(r.indexer)this.indexerClients.set(r.chainId,r.indexer);else if(r.indexerUrl)this.indexerClients.set(r.chainId,new Jw(r.indexerUrl));else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(r.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const AH=async(t,e,r)=>{const n=Ye(await t.getAddress());if(!n||n===""||n==="0x")throw _H;const s=new Bw;if(s.address=n,!r||!r.app||r.app==="")throw new mA("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):$H);const i=s.messageTypedData(),o=hW(e);s.signature=await(t instanceof ta?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const l=await new Ry().encodeProof(s,!0);return{typedData:i,proofString:l}};class mA extends Error{constructor(e){super(e),this.name="AuthError"}}const _H=new mA("auth error: account address is empty");function Vc(){return Vc=Object.assign?Object.assign.bind():function(t){for(var e=1;eT.wallet));let $;if(k){if($=new ta({address:k,tracker:p,networks:b,contexts:y,orchestrator:v}),c&&c.length>0){let T=await $.status(w);if(T.original.version!==T.version||$.version!==T.version){const{migratedAllChains:U,failedChains:V}=await $.isMigratedAllChains();if(V.some(N=>bS.includes(N)))throw Error(`Failed to fetch account status on ${V.join(", ")}`);if(!U){if(h&&!await h($))throw Error("Migration cancelled, cannot open session");const{failedChains:N}=await $.signAllMigrations(d||(S=>S));if(N.some(S=>bS.includes(S)))throw Error(`Failed to sign migrations on ${N.join(", ")}`);yA.isDedupedTracker(p)&&p.invalidateCache();let x;if([x,T]=await Promise.all([$.isMigratedAllChains().then(S=>S.migratedAllChains),$.status(w)]),!x)throw Error("Failed to migrate account")}}T.onChain.version!==T.version&&await $.doBootstrap(w,void 0,T);const j=T.config,F=$.coders.config.editConfig(j,{add:c,threshold:l});if($.coders.config.imageHashOf(j)!==$.coders.config.imageHashOf(F)){const U=$.coders.config.editConfig(F,{checkpoint:$.coders.config.checkpointOf(j).add(1)});await $.updateConfig(U)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if($=await ta.new({config:{threshold:l,checkpoint:0,signers:c},tracker:p,contexts:y,orchestrator:v,networks:b}),await $.publishWitness(),!(await p.walletsOfSigner({signer:a,noCache:!0})).some(j=>j.wallet===$.address))throw Error("Account not found on tracker")}let C;return g&&(C=new iI($,g),C.auth()),new gv(b,y,$,C)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=Vc({},Up,n);let u;if(PH(r)){const v=r.config.address||ye.context.addressOf(a[1],Xo.config.ConfigCoder.imageHashOf(Vc({},r.config,{version:1})));if(u=new ta({address:v,tracker:c,networks:l,contexts:a,orchestrator:o}),!await u.isMigratedAllChains().then(y=>y.migratedAllChains)){if(i&&!await i(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(s),!await u.isMigratedAllChains().then(y=>y.migratedAllChains))throw Error("Failed to migrate account")}}else if(TH(r))u=new ta({address:r.address,tracker:c,networks:l,contexts:a,orchestrator:o});else throw Error("Invalid dump format");let d;if(f){var h;d=new iI(u,f,r.jwt&&{jwt:{token:Promise.resolve(r.jwt.token),expiration:(h=r.jwt.expiration)!=null?h:eW(r.jwt.token).exp},metadata:r.metadata})}return new gv(l,a,u,d)}}const WEe=(t,e,r)=>async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},HEe=Object.freeze(Object.defineProperty({__proto__:null,AuthError:mA,CRITICAL_CHAINS:bS,ErrAccountIsRequired:_H,Session:gv,SessionSettingsDefault:Up,ValidateSequenceWalletProof:WEe,isSessionDumpV1:PH,isSessionDumpV2:TH,signAuthorization:AH},Symbol.toStringTag,{value:"Module"}));function wS(){return wS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),fu({},n)).then(s=>uu(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),fu({},n)).then(s=>uu(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),fu({},n)).then(s=>uu(s).then(i=>({status:i.status}))),this.getSignerConfig=(n,s)=>this.fetch(this.url("GetSignerConfig"),fu(n,s)).then(i=>uu(i).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,s)=>this.fetch(this.url("Sign"),fu(n,s)).then(i=>uu(i).then(o=>({sig:o.sig}))),this.signWith=(n,s)=>this.fetch(this.url("SignWith"),fu(n,s)).then(i=>uu(i).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const fu=(t={},e={})=>({method:"POST",headers:wS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),uu=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}),YEe=typeof global=="object"?global.fetch:window.fetch;class JEe{constructor(e,r,n=!1,s){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.onError=s,this.guard=new RH(r,YEe)}async getAddress(){return this.address}async requestSignature(e,r,n,s){return ye.isWalletSignRequestMetadata(n)?this.requests.set(e,s):s.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!ye.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,s){return Hn.encode(["address","uint256","bytes","bytes"],[e,s,r,n])}keyOfRequest(e,r,n,s){return na(["address","uint256","bytes","bytes"],[e,s,r,n])}async evaluateRequest(e,r,n,s){var i;const o=Fn.genericCoderFor(s.config.version),{encoded:a}=o.signature.encodeSigners(s.config,(i=s.parts)!=null?i:new Map,[],s.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,s.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const d=await this.guard.signWith({signer:this.address,request:{msg:te(r),auxData:this.packMsgAndSig(s.address,s.digest,a,s.chainId),chainId:Z.from(s.chainId).toNumber()}});ne(d.sig).length!==0&&(this.requests.get(e).onSignature(d.sig),this.requests.delete(e))}catch(f){var c;(c=this.onError)==null||c.call(this,f)}}suffix(){return this.appendSuffix?[3]:[]}}const XEe=Object.freeze(Object.defineProperty({__proto__:null,Guard:RH,GuardSigner:JEe,WebRPCSchemaHash:QEe,WebRPCSchemaVersion:KEe,WebRPCVersion:GEe},Symbol.toStringTag,{value:"Module"}));function kb(){return kb=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,s,i)=>{if(this.batchableJsonRpcMethods.find(o=>o===s.method)){this.queue.push({request:s,callback:i,next:n}),this.options.verbose&&console.log("Scheduling call",s.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",s.method),n(s,i)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0)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.scheduleExecution();const s=a[0].next;let i;var[a,l]=oI(a,h=>{try{if(h.next!==s)return!1;switch(h.request.method){case Ur.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Ur.ethGetBalance:case Ur.ethGetCode:const v=e5e(h.request.params[1]);if(i===void 0&&(i=v),!t5e(v,i))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0))return;let o=a.map(h=>{try{switch(h.request.method){case Ur.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 Ur.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 Ur.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,l]=oI(a,(h,v)=>o[v]!==void 0);if(o=o.filter(h=>h),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let c;try{c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const f=H4(),u=await ZEe(W4(s)({id:f,jsonrpc:Kd,method:Ur.ethCall,params:[{to:r.options.contract,value:0,data:c},Z.isBigNumber(i)?i.toNumber():i]}),h=>({jsonrpc:Kd,id:f,result:void 0,error:h}));if(u.error)return r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,v)=>{if(!d[0][v])r.forward(h);else switch(h.request.method){case Ur.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][v]});break;case Ur.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Hn.decode(["bytes"],d[1][v])[0]});break;case Ur.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Hn.decode(["uint256"],d[1][v])[0]});break}})},this.options=e?kb({},Js.DefaultOptions,e):Js.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&&Js.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Js.DefaultOptions=kb({},r5e);const IH=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class n5e extends q2{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(s){const i=n.provider;if(i.getResolver){const o=await i.getResolver(await s);return o?new q6(n,o.address,o.name):null}return i.getResolver(await s)},this.next=async function(s,i){try{switch(s.method){case Ur.ethCall:n.callback(s,i,await n.provider.call(s.params[0],s.params[1]));break;case Ur.ethGetCode:n.callback(s,i,await n.provider.getCode(s.params[0],s.params[1]));break;case Ur.ethGetBalance:n.callback(s,i,await n.provider.getBalance(s.params[0],s.params[1]));break}}catch(o){n.callback(s,i,void 0,o)}},this.provider=e,this.multicall=Js.isMulticall(r)?r:new Js(r),IH.forEach(s=>{e[s]!==void 0&&(this[s]=(...i)=>e[s](...i))})}callback(e,r,n,s){r(s,{jsonrpc:Kd,id:e.id,result:n,error:s})}async call(e,r){return this.rpcCall(Ur.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Ur.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Ur.ethGetBalance,e,r)}async rpcCall(e,...r){const n=H4();return(await W4(this.multicall.handle)(this.next,{jsonrpc:Kd,id:n,method:e,params:r})).result}}class s5e{constructor(e,r){if(this.provider=e,this.multicall=Js.isMulticall(r)?r:new Js(r),e.send){const n=async function(i,o){e.send(i,o)};this.send=(s,i)=>{this.multicall.handle(n,s,i)}}if(e.sendAsync){const n=async function(i,o){e.sendAsync(i,o)};this.sendAsync=(s,i)=>{this.multicall.handle(n,s,i)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const i5e=t=>e=>{const r=Js.isMulticall(t)?t:new Js(t);return(n,s)=>r.handle(e,n,s)};var o5e=Object.freeze({__proto__:null,ProxyMethods:IH,MulticallProvider:n5e,MulticallExternalProvider:s5e,multicallMiddleware:i5e});const a5e=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Js,providers:o5e},Symbol.toStringTag,{value:"Module"}));var Yd={},l5e={get exports(){return Yd},set exports(t){Yd=t}};/*! +)[]`,cS=(t,e)=>{const r=[],n=new en($n.mainModule.abi);for(const s of e){const i=ne(s.data||"0x");if(s.to===t&&te(i.slice(0,4))===JW){const o=i.slice(4),a=Gn.decode([XW],o)[0];r.push(...cS(s.to,a.map(l=>kn({},l,{to:l.target}))))}else try{const o=n.decodeFunctionData("execute",i)[0],a=cS(t,o.map(l=>kn({},l,{to:l.target})));r.push(...a)}catch{r.push(s)}}return r};var aCe=Object.freeze({__proto__:null,MetaTransactionsType:Qw,intendTransactionBundle:Jxe,intendedTransactionID:Xxe,unpackMetaTransactionsData:Zxe,packMetaTransactionsData:WW,digestOfTransactions:HW,subdigestOfTransactions:eCe,subdigestOfGuestModuleTransactions:tCe,toSequenceTransactions:GW,toSequenceTransaction:dA,isSequenceTransaction:Yw,hasSequenceTransactions:KW,sequenceTxAbiEncode:My,fromTxAbiEncode:rCe,encodeNonce:nCe,decodeNonce:sCe,fromTransactionish:iCe,isTransactionBundle:QW,isSignedTransactionBundle:YW,encodeBundleExecData:oCe,selfExecuteSelector:JW,selfExecuteAbi:XW,unwind:cS});const ZW="0x608060405234801561001057600080fd5b5060405161124a38038061124a83398101604081905261002f91610124565b600060405161003d906100dd565b604051809103906000f080158015610059573d6000803e3d6000fd5b5090506000816001600160a01b0316638f0684308686866040518463ffffffff1660e01b815260040161008e939291906101fb565b6020604051808303816000875af11580156100ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100d19190610244565b9050806000526001601ff35b610fdc8061026e83390190565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561011b578181015183820152602001610103565b50506000910152565b60008060006060848603121561013957600080fd5b83516001600160a01b038116811461015057600080fd5b6020850151604086015191945092506001600160401b038082111561017457600080fd5b818601915086601f83011261018857600080fd5b81518181111561019a5761019a6100ea565b604051601f8201601f19908116603f011681019083821181831017156101c2576101c26100ea565b816040528281528960208487010111156101db57600080fd5b6101ec836020830160208801610100565b80955050505050509250925092565b60018060a01b0384168152826020820152606060408201526000825180606084015261022e816080850160208701610100565b601f01601f191691909101608001949350505050565b60006020828403121561025657600080fd5b8151801515811461026657600080fd5b939250505056fe608060405234801561001057600080fd5b50610fbc806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c806376be4cea1161005057806376be4cea146100a65780638f068430146100b957806398ef1ed8146100cc57600080fd5b80631c6453271461006c5780633d787b6314610093575b600080fd5b61007f61007a366004610ad4565b6100df565b604051901515815260200160405180910390f35b61007f6100a1366004610ad4565b61023d565b61007f6100b4366004610b3e565b61031e565b61007f6100c7366004610ad4565b6108e1565b61007f6100da366004610ad4565b61096e565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061012890889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610181575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261017e91810190610c45565b60015b610232573d8080156101af576040519150601f19603f3d011682016040523d82523d6000602084013e6101b4565b606091505b508051600181900361022757816000815181106101d3576101d3610c69565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149250610235915050565b600092505050610235565b90505b949350505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906102879088908890889088906001908990600401610bc3565b6020604051808303816000875af19250505080156102e0575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526102dd91810190610c45565b60015b610232573d80801561030e576040519150601f19603f3d011682016040523d82523d6000602084013e610313565b606091505b506000915050610235565b600073ffffffffffffffffffffffffffffffffffffffff87163b6060827f64926492649264926492649264926492649264926492649264926492649264928888610369602082610c98565b610375928b9290610cd8565b61037e91610d02565b1490508015610484576000606089828a610399602082610c98565b926103a693929190610cd8565b8101906103b39190610e18565b955090925090508415806103c45750865b1561047d576000808373ffffffffffffffffffffffffffffffffffffffff16836040516103f19190610eb2565b6000604051808303816000865af19150503d806000811461042e576040519150601f19603f3d011682016040523d82523d6000602084013e610433565b606091505b50915091508161047a57806040517f9d0d6e2d0000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b60405180910390fd5b50505b50506104be565b87878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294505050505b80806104ca5750600083115b156106bb576040517f1626ba7e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b1690631626ba7e90610523908c908690600401610f2b565b602060405180830381865afa92505050801561057a575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261057791810190610f44565b60015b61060f573d8080156105a8576040519150601f19603f3d011682016040523d82523d6000602084013e6105ad565b606091505b50851580156105bc5750600084115b156105db576105d08b8b8b8b8b600161031e565b9450505050506108d7565b806040517f6f2a95990000000000000000000000000000000000000000000000000000000081526004016104719190610f18565b7fffffffff0000000000000000000000000000000000000000000000000000000081167f1626ba7e000000000000000000000000000000000000000000000000000000001480158161065f575086155b801561066b5750600085115b1561068b5761067f8c8c8c8c8c600161031e565b955050505050506108d7565b841580156106965750825b80156106a0575087155b156106af57806000526001601ffd5b94506108d79350505050565b6041871461074b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f5369676e617475726556616c696461746f72237265636f7665725369676e657260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610471565b600061075a6020828a8c610cd8565b61076391610d02565b90506000610775604060208b8d610cd8565b61077e91610d02565b905060008a8a604081811061079557610795610c69565b919091013560f81c915050601b81148015906107b557508060ff16601c14155b15610842576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5369676e617475726556616c696461746f723a20696e76616c6964207369676e60448201527f617475726520762076616c7565000000000000000000000000000000000000006064820152608401610471565b6040805160008152602081018083528e905260ff831691810191909152606081018490526080810183905273ffffffffffffffffffffffffffffffffffffffff8e169060019060a0016020604051602081039080840390855afa1580156108ad573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff161496505050505050505b9695505050505050565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea9061092b9088908890889088906001908990600401610bc3565b6020604051808303816000875af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102329190610c45565b6040517f76be4cea00000000000000000000000000000000000000000000000000000000815260009030906376be4cea906109b790889088908890889088908190600401610bc3565b6020604051808303816000875af1925050508015610a10575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a0d91810190610c45565b60015b610232573d808015610a3e576040519150601f19603f3d011682016040523d82523d6000602084013e610a43565b606091505b5080516001819003610a6257816000815181106101d3576101d3610c69565b8082fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610a8857600080fd5b50565b60008083601f840112610a9d57600080fd5b50813567ffffffffffffffff811115610ab557600080fd5b602083019150836020828501011115610acd57600080fd5b9250929050565b60008060008060608587031215610aea57600080fd5b8435610af581610a66565b935060208501359250604085013567ffffffffffffffff811115610b1857600080fd5b610b2487828801610a8b565b95989497509550505050565b8015158114610a8857600080fd5b60008060008060008060a08789031215610b5757600080fd5b8635610b6281610a66565b955060208701359450604087013567ffffffffffffffff811115610b8557600080fd5b610b9189828a01610a8b565b9095509350506060870135610ba581610b30565b91506080870135610bb581610b30565b809150509295509295509295565b73ffffffffffffffffffffffffffffffffffffffff8716815285602082015260a060408201528360a0820152838560c0830137600060c085830181019190915292151560608201529015156080820152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016909101019392505050565b600060208284031215610c5757600080fd5b8151610c6281610b30565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81810381811115610cd2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b60008085851115610ce857600080fd5b83861115610cf557600080fd5b5050820193919092039150565b80356020831015610cd2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112610d7e57600080fd5b813567ffffffffffffffff80821115610d9957610d99610d3e565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715610ddf57610ddf610d3e565b81604052838152866020858801011115610df857600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e2d57600080fd5b8335610e3881610a66565b9250602084013567ffffffffffffffff80821115610e5557600080fd5b610e6187838801610d6d565b93506040860135915080821115610e7757600080fd5b50610e8486828701610d6d565b9150509250925092565b60005b83811015610ea9578181015183820152602001610e91565b50506000910152565b60008251610ec4818460208701610e8e565b9190910192915050565b60008151808452610ee6816020860160208601610e8e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610c626020830184610ece565b8281526040602082015260006102356040830184610ece565b600060208284031215610f5657600080fd5b81517fffffffff0000000000000000000000000000000000000000000000000000000081168114610c6257600080fdfea26469706673582212201a72aed4b15ffb05b6502997a9bb655992e06590bd26b336dfbb153d7ff6f34b64736f6c63430008120033",lCe="0x6492649264926492649264926492649264926492649264926492649264926492";async function eH(t,e,r,n){return await t.call({data:Ht([ZW,new A4().encode(["address","bytes32","bytes"],[e,r,n])])})==="0x01"}var cCe=Object.freeze({__proto__:null,EIP_6492_OFFCHAIN_DEPLOY_CODE:ZW,EIP_6492_SUFFIX:lCe,validateEIP6492Offchain:eH});class fCe{constructor(e){this.isDeployedCache=new Set,this.provider=e}module(e){return new Oh(e,[...$n.mainModuleUpgradable.abi,...$n.mainModule.abi,...$n.erc1271.abi],this.provider)}async isDeployed(e){if(this.isDeployedCache.has(e))return!0;const n=(await this.provider.getCode(e).then(s=>ne(s))).length!==0;return n&&this.isDeployedCache.add(e),n}async implementation(e){const r=Gn.encode(["address"],[e]),n=await this.provider.getStorageAt(e,r).then(s=>ne(s));if(n.length===20)return Ye(te(n));if(n.length===32)return Gn.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 eH(this.provider,e,r,n)}}var uCe=Object.freeze({__proto__:null,OnChainReader:fCe});function dCe(t){return t&&t.address&&t.digest&&t.chainId!==void 0&&t.config}var ye=Object.freeze({__proto__:null,config:$xe,signature:Axe,context:Yxe,signer:Oxe,EIP1271:Txe,transaction:aCe,reader:uCe,EIP6492:cCe,isWalletSignRequestMetadata:dCe});const fS=[{config:tA,signature:eA},{config:Kw,signature:Gw}];function tH(t){const e=t-1;if(e<0||e>=fS.length)throw new Error(`No coder for version: ${t}`);return fS[e]}function hCe(t){return tH(t)}var Bn=Object.freeze({__proto__:null,ALL_CODERS:fS,coderFor:tH,genericCoderFor:hCe});const rH=[Zo,Qe],vCe=Object.freeze(Object.defineProperty({__proto__:null,allVersions:rH,commons:ye,universal:Bn,v1:Zo,v2:Qe},Symbol.toStringTag,{value:"Module"}));function yCe(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:s,chainId:i}=e;let o=n,a=s;const l=Object.values(this.contexts),c=[];for(let f=1;fne(i).length===0))return XR;if(!n.provider)throw new Error("signer.provider is not set, but is required");return n.provider.estimateGas({from:e,to:s.to,data:s.data,value:s.value})}))).map(s=>({executed:!0,succeeded:!0,gasUsed:Z.from(s).toNumber(),gasLimit:Z.from(s).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 i=await new Oh(e,$n.mainModule.abi,this.provider).readNonce(r,{blockTag:n});return ye.transaction.encodeNonce(r,i)}async wait(e,r,n=this.waitPollRate,s=5){var i=this;typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e));let o=!1;const a=async function(f,u){let d=0;for(;!o;){try{return await f()}catch(h){if(d++,s!==void 0&&d>=s)throw xe.error(`giving up after ${d} failed attempts${u?`: ${u}`:""}`,h),h;xe.warn(`attempt #${d} failed${u?`: ${u}`:""}`,h)}n>0&&await new Promise(h=>setTimeout(h,n))}throw new Error(`timed out after ${d} failed attempts${u?`: ${u}`:""}`)},l=async function(){let f=i.fromBlockLog;if(f<0&&(f=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number")+f),typeof e!="string")throw new Error("impossible");const u=e.replace("0x","");for(;!o;){const d=await a(()=>i.provider.getBlockNumber(),"unable to get latest block number"),h=await a(()=>i.provider.getLogs({fromBlock:Math.max(0,f-i.deltaBlocksLog),toBlock:d,topics:["0x1f180c27086c7a39ea2a7b25239d1ab92348f07ca7bb59d1438fcf527568f881"]}),`unable to get NonceChange logs for blocks ${Math.max(0,f-i.deltaBlocksLog)} to ${d}`);f=d;const y=(await Promise.all(h.map(g=>a(()=>i.provider.getTransactionReceipt(g.transactionHash),`unable to get receipt for transaction ${g.transactionHash}`)))).find(g=>g.logs.find(b=>b.topics.length===0&&b.data.replace("0x","")===u||b.topics.length===1&&b.topics[0]==="0x3dbd1590ea96dd3253a91f24e64e3a502e1225d602a5731357bc12643070ccd7"&&b.data.length>=64&&b.data.replace("0x","").startsWith(u)));if(y)return Tf({receipt:y},await a(()=>i.provider.getTransaction(y.transactionHash),`unable to get transaction ${y.transactionHash}`));o||await new Promise(g=>setTimeout(g,n))}throw new Error(`Timeout waiting for transaction receipt ${e}`)};return r!==void 0?Promise.race([l(),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):l()}}function CCe(t){return t.signer!==void 0&&Sf.isSigner(t.signer)}class ECe extends aH{constructor(e){if(super(Sf.isSigner(e)?{provider:e.provider}:Tf({},e,{provider:e.signer.provider})),this.signer=Sf.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){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&&xe.warn("LocalRelayer doesn't accept fee quotes");const s=ye.transaction.encodeBundleExecData(e),i=this.signer.sendTransaction(Tf({to:e.entrypoint,data:s},this.txnOptions,{gasLimit:9e6}));if(n){const o=await i;return o.receipt=await o.wait(),o}else return i}}const SCe="v1",kCe="v0.4.0",$Ce="752f4f4274ca80d2fd974b5b44ed8245dfe40554";let ml=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}({}),ACe=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}({}),_Ce=function(t){return t.UNKNOWN="UNKNOWN",t.ERC20_TOKEN="ERC20_TOKEN",t.ERC1155_TOKEN="ERC1155_TOKEN",t}({}),PCe=function(t){return t.DESC="DESC",t.ASC="ASC",t}({});class lH{constructor(e,r){this.path="/rpc/Relayer/",this.ping=n=>this.fetch(this.url("Ping"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),Nr({},n)).then(s=>Lr(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),Nr({},n)).then(s=>Lr(s).then(i=>({status:i.status}))),this.getSequenceContext=n=>this.fetch(this.url("GetSequenceContext"),Nr({},n)).then(s=>Lr(s).then(i=>({data:i.data}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),Nr({},n)).then(s=>Lr(s).then(i=>({chainID:i.chainID}))),this.sendMetaTxn=(n,s)=>this.fetch(this.url("SendMetaTxn"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,txnHash:o.txnHash}))),this.getMetaTxnNonce=(n,s)=>this.fetch(this.url("GetMetaTxnNonce"),Nr(n,s)).then(i=>Lr(i).then(o=>({nonce:o.nonce}))),this.getMetaTxnReceipt=(n,s)=>this.fetch(this.url("GetMetaTxnReceipt"),Nr(n,s)).then(i=>Lr(i).then(o=>({receipt:o.receipt}))),this.simulate=(n,s)=>this.fetch(this.url("Simulate"),Nr(n,s)).then(i=>Lr(i).then(o=>({results:o.results}))),this.updateMetaTxnGasLimits=(n,s)=>this.fetch(this.url("UpdateMetaTxnGasLimits"),Nr(n,s)).then(i=>Lr(i).then(o=>({payload:o.payload}))),this.feeTokens=n=>this.fetch(this.url("FeeTokens"),Nr({},n)).then(s=>Lr(s).then(i=>({isFeeRequired:i.isFeeRequired,tokens:i.tokens}))),this.feeOptions=(n,s)=>this.fetch(this.url("FeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options,quote:o.quote}))),this.getMetaTxnNetworkFeeOptions=(n,s)=>this.fetch(this.url("GetMetaTxnNetworkFeeOptions"),Nr(n,s)).then(i=>Lr(i).then(o=>({options:o.options}))),this.sentTransactions=(n,s)=>this.fetch(this.url("SentTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.pendingTransactions=(n,s)=>this.fetch(this.url("PendingTransactions"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,transactions:o.transactions}))),this.listGasSponsors=(n,s)=>this.fetch(this.url("ListGasSponsors"),Nr(n,s)).then(i=>Lr(i).then(o=>({page:o.page,gasSponsors:o.gasSponsors}))),this.addGasSponsor=(n,s)=>this.fetch(this.url("AddGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.updateGasSponsor=(n,s)=>this.fetch(this.url("UpdateGasSponsor"),Nr(n,s)).then(i=>Lr(i).then(o=>({status:o.status,gasSponsor:o.gasSponsor}))),this.reportGasSponsorUsage=(n,s)=>this.fetch(this.url("ReportGasSponsorUsage"),Nr(n,s)).then(i=>Lr(i).then(o=>({gasSponsorUsage:o.gasSponsorUsage}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const Nr=(t={},e={})=>({method:"POST",headers:Tf({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),Lr=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 Yd=Object.freeze({__proto__:null,WebRPCVersion:SCe,WebRPCSchemaVersion:kCe,WebRPCSchemaHash:$Ce,ETHTxnStatus:ml,TransferType:ACe,FeeTokenType:_Ce,SortOrder:PCe,Relayer:lH});const TCe=[ml.DROPPED,ml.SUCCEEDED,ml.PARTIALLY_FAILED,ml.FAILED],RCe=[ml.DROPPED,ml.PARTIALLY_FAILED,ml.FAILED];function ICe(t){return t.url!==void 0&&typeof t.url=="string"&&t.provider!==void 0&&uc.isProvider(t.provider)}const OCe=typeof global=="object"?global.fetch:window.fetch;class cH{constructor(e){this.service=new lH(e.url,OCe),this.provider=uc.isProvider(e.provider)?e.provider:new mb(Oy(e.provider.url))}async waitReceipt(e,r=1e3,n=5,s){typeof e!="string"&&(e=ye.transaction.intendedTransactionID(e)),xe.info(`[rpc-relayer/waitReceipt] waiting for ${e}`);let i=0;for(;s===void 0||!s();){try{const{receipt:o}=await this.service.getMetaTxnReceipt({metaTxID:e});if(o&&o.txnReceipt&&o.txnReceipt!=="null"&&TCe.includes(o.status))return{receipt:o}}catch(o){if(i++,i===n)throw o}(s===void 0||!s())&&await new Promise(o=>setTimeout(o,r))}throw new Error(`Cancelled waiting for transaction receipt ${e}`)}async simulate(e,...r){const s=Gn.encode([ye.transaction.MetaTransactionsType],[ye.transaction.sequenceTxAbiEncode(r)]);return(await this.service.simulate({wallet:e,transactions:s})).results}async getFeeOptions(e,...r){const n=await this.service.feeTokens();if(n.isFeeRequired){const s=n.tokens.map(l=>l.symbol).join(", ");xe.info(`[rpc-relayer/getFeeOptions] relayer fees are required, accepted tokens are ${s}`);const i=await this.getNonce(e);if(!this.provider)throw xe.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:ye.transaction.encodeBundleExecData({entrypoint:e,transactions:r,nonce:i})});return xe.info(`[rpc-relayer/getFeeOptions] got refund options ${JSON.stringify(o)}`),{options:o,quote:{_tag:"FeeQuote",_quote:a}}}else return xe.info("[rpc-relayer/getFeeOptions] relayer fees are not required"),{options:[]}}async getFeeOptionsRaw(e,r){const{options:n,quote:s}=await this.service.feeOptions({wallet:e,to:e,data:te(r)});return{options:n,quote:{_tag:"FeeQuote",_quote:s}}}async gasRefundOptions(e,...r){const{options:n}=await this.getFeeOptions(e,...r);return n}async getNonce(e,r){xe.info(`[rpc-relayer/getNonce] get nonce for wallet ${e} space: ${r}`);const n=r!==void 0?Z.from(r).toHexString():void 0,s=await this.service.getMetaTxnNonce({walletContractAddress:e,space:n}),i=Z.from(s.nonce),[o,a]=ye.transaction.decodeNonce(i);return xe.info(`[rpc-relayer/getNonce] got next nonce for wallet ${e} ${a} space: ${o}`),i}async relay(e,r,n=!0){var s=this;xe.info(`[rpc-relayer/relay] relaying signed meta-transactions ${JSON.stringify(e)} with quote ${JSON.stringify(r)}`);let i;if(r!==void 0&&(typeof r._quote=="string"?i=r._quote:xe.warn("[rpc-relayer/relay] ignoring invalid fee quote")),!this.provider)throw xe.warn("[rpc-relayer/relay] provider not set, failed relay"),new Error("provider is not set");const o=ye.transaction.encodeBundleExecData(e),a=await this.service.sendMetaTxn({call:{walletAddress:e.intent.wallet,contract:e.entrypoint,input:o},quote:i});if(xe.info(`[rpc-relayer/relay] got relay result ${JSON.stringify(a)}`),n)return this.wait(e.intent.id);{const l={hash:e.intent.id,confirmations:0,from:e.intent.wallet,wait:f=>Promise.reject(new Error("impossible"))},c=async function(u){var d;if(!s.provider)throw new Error("cannot wait for receipt, relayer has no provider set");const h=await s.wait(e.intent.id),v=(d=h.receipt)==null?void 0:d.transactionHash;if(!v)throw new Error("cannot wait for receipt, unknown native transaction hash");return Object.assign(l,h),s.provider.waitForTransaction(v,u)};return l.wait=c,l}}async wait(e,r,n=1e3,s=5){var i=this;let o=!1;const{receipt:a}=await(r!==void 0?Promise.race([this.waitReceipt(e,n,s,()=>o),new Promise((c,f)=>setTimeout(()=>{o=!0,f(`Timeout waiting for transaction receipt ${e}`)},r))]):this.waitReceipt(e,n,s));if(!a.txnReceipt||RCe.includes(a.status))throw new MCe(a);const l=JSON.parse(a.txnReceipt);return{blockHash:l.blockHash,blockNumber:Z.from(l.blockNumber).toNumber(),confirmations:1,from:typeof e=="string"?void 0:e.intent.wallet,hash:l.transactionHash,raw:a.txnReceipt,receipt:l,wait:async function(c){return i.provider.waitForTransaction(l.transactionHash,c)}}}}class MCe{constructor(e){this.receipt=e}}function fH(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 DCe=Object.freeze(Object.defineProperty({__proto__:null,LocalRelayer:ECe,ProviderRelayer:aH,ProviderRelayerDefaults:oH,RpcRelayer:cH,RpcRelayerProto:Yd,isLocalRelayerOptions:CCe,isProviderRelayerOptions:xCe,isRelayer:fH,isRpcRelayerOptions:ICe,proto:Yd},Symbol.toStringTag,{value:"Module"}));function uH(t){return t.requestSignature!==void 0&&t.notifyStatusChange!==void 0}class dH{constructor(e,r=!0){this.signer=e,this.eoa=r}getAddress(){return this.signer.getAddress()}async requestSignature(e,r,n,s){return s.onSignature(await this.signer.signMessage(r)),!0}notifyStatusChange(e,r,n){}suffix(){return[2]}}var NCe=Object.freeze({__proto__:null,isSapientSigner:uH,SignerWrapper:dH});function hH(t){return t.rejected}function hA(t){return t.signature!==void 0}function vH(t){return!hH(t)&&!hA(t)}const yH="Initial";class Jw{constructor(e,r=Jw.randomTag()){this.observers=[],this.signers=[],this.count=0,this.tag=r,this.setSigners(e)}static randomTag(){return`default-${te(jw(8)).slice(2)}`}pullId(){return`${this.tag}-${this.count++}`}setSigners(e){this.signers=e.map(r=>uH(r)?r:new dH(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(s){return s.notifyStatusChange(e,r,n)}),...this.observers.map(async function(s){return s(r,n)})])}signMessage(e){var r=this;const n=this.pullId();return new Promise(async function(s){const{message:i,metadata:o,callback:a,candidates:l}=e,c={ended:!1,message:i,signers:{}};let f=o??{};const u=y=>{f=y,r.notifyObservers(n,c,f)},d=()=>{try{r.notifyObservers(n,c,f);const y=Object.entries(c.signers).filter(([g,b])=>vH(b));if(a&&a(c,u)||y.length===0){c.ended=!0,s(c),r.notifyObservers(n,c,f);return}}catch(y){console.error("Error while notifying observers",y)}};let h=r.signers;if(l){const y=await Promise.all(r.signers.map(async function(g){return g.getAddress()}));h=r.signers.filter((g,b)=>l.includes(y[b]))}const v=await Promise.allSettled(h.map(async function(y){const g=await y.getAddress();return c.signers[g]={situation:yH},y.requestSignature(n,i,o??{},{onSignature:b=>{const p=y.suffix();c.signers[g]={signature:b,suffix:p},d()},onRejection:b=>{c.signers[g]={rejected:!0,error:b},d()},onStatus:b=>{c.signers[g]={situation:b},d()}})}));for(let y=0;ymt(e))):mt(t)}const eI=t=>{const e=new Map;for(const r of Object.keys(t.signers)){const n=t.signers[r];if(hA(n)){const s=ne(n.suffix),i=He(["bytes","bytes"],[n.signature,s]);e.set(r,{signature:i,isDynamic:s.length!==1||s[0]!==2})}}return e};class Dy extends Sf{constructor(e){if(rr.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=ye.context.addressOf(e.context,e.coders.config.imageHashOf(e.config));return new Dy(zc({},e,{address:r}))}reader(){if(this._reader)return this._reader;if(!this.provider)throw new Error("Wallet status provider requires a provider");return new ye.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){if(await this.reader().isDeployed(this.address))return e;const r=this.buildDeployTransaction();return{entrypoint:this.context.guestModule,chainId:this.chainId,intent:e.intent,transactions:[...r.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]}}buildDeployTransaction(){const e=this.coders.config.imageHashOf(this.config);if(ye.context.addressOf(this.context,e)!==this.address)throw new Error(`First address of config ${e} doesn't match wallet address ${this.address}`);return Dy.buildDeployTransaction(this.context,e)}deploy(){const e=this.buildDeployTransaction();if(!this.relayer)throw new Error("Wallet deploy requires a relayer");return this.relayer.relay(zc({},e,{chainId:this.chainId,intent:{id:te(jw(32)),wallet:this.address}}))}static buildDeployTransaction(e,r){const n=new en($n.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 signDigest(e,r){const n=nS(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 s=zc({digest:e,chainId:this.chainId,address:this.address,config:this.config},r),i=ne(n),o=await this.orchestrator.signMessage({candidates:this.coders.config.signersOf(this.config).map(l=>l.address),message:i,metadata:s,callback:(l,c)=>{const f=eI(l),u=zc({},s,{parts:f});return c(u),this.coders.signature.hasEnoughSigningPower(this.config,f)}}),a=eI(o);return this.coders.signature.encodeSigners(this.config,a,[],this.chainId).encoded}signMessage(e){return this.signDigest(Ue(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=Z.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 ye.transaction.encodeNonce(r,n)}async signTransactions(e,r){const n=await ZR(e),s=ye.transaction.fromTransactionish(this.address,n);s.length===0&&s.push({to:this.address,data:"0x",value:0,gasLimit:0,delegateCall:!1,revertOnError:!0});const i=await this.fetchNonceOrSpace(r),o=ye.transaction.digestOfTransactions(i,s),a=await this.signDigest(o,{transactions:s});return{intent:{id:nS(this.address,this.chainId,o),wallet:this.address},chainId:this.chainId,transactions:s,entrypoint:this.address,nonce:i,signature:a}}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 s=await this.signTransactions(e,r),i=await this.decorateTransactions(s);return this.sendSignedTransaction(i,n)}async fillGasLimits(e){const r=await ZR(e),n=ye.transaction.fromTransactionish(this.address,r),s=this.relayer;if(!s)throw new Error("Wallet fillGasLimits requires a relayer");const i=await s.simulate(this.address,...n);return n.map((o,a)=>{const l=o.gasLimit?Z.from(o.gasLimit).toNumber():i[a].gasLimit;return zc({},o,i[a],{gasLimit:l})})}connect(e,r){return this.provider=e,this.relayer=r,this}signTransaction(e){throw new Error("Method not implemented.")}}function Vc(){return Vc=Object.assign?Object.assign.bind():function(t){for(var e=1;ejCe(t[e])):!1}function BCe(t){if(!t)return[];const e=Z.from(t.value);switch(t.token.type){case Yd.FeeTokenType.UNKNOWN:return[{delegateCall:!1,revertOnError:!0,gasLimit:t.gasLimit,to:t.to,value:e.toHexString(),data:[]}];case Yd.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 en([{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 UCe{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 s of r)if(s.token.type===Yd.FeeTokenType.UNKNOWN){if((await this.getBalance()).gte(Z.from(s.value)))return s}else if(s.token.contractAddress&&s.token.type===Yd.FeeTokenType.ERC20_TOKEN&&(await new Oh(s.token.contractAddress,n,this.provider).balanceOf(this.account.address)).gte(Z.from(s.value)))return s;throw new Error("No fee option available - not enough balance")}async sendTransaction(e){var r,n,s,i,o;const a=FCe(e)?await mt(e):e,l=await this.account.prepareTransactions({txs:a,chainId:this.chainId,stubSignatureOverrides:(r=(n=this.options)==null?void 0:n.stubSignatureOverrides)!=null?r:new Map}),f=await((s=(i=this.options)==null?void 0:i.selectFee)!=null?s:this.defaultSelectFee.bind(this))(a,l.feeOptions),u=[...l.transactions,...BCe(f)];return this.account.sendTransaction(u,this.chainId,l.feeQuote,void 0,void 0,(o=this.options)!=null&&o.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(Z.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 zCe{async isDeployed(e){return!1}async implementation(e){}async imageHash(e){}async nonce(e,r){return rr}async isValidSignature(e,r,n){throw new Error("Method not supported.")}}class ra{constructor(e){this.address=Ye(e.address),this.contexts=e.contexts,this.tracker=e.tracker,this.networks=e.networks,this.orchestrator=e.orchestrator,this.migrations=e.migrations||vS.DefaultMigrations,this.migrator=new hS.Migrator(e.tracker,this.migrations,this.contexts)}getSigner(e,r){return new UCe(this,e,r)}static async new(e){var r;const s=new hS.Migrator(e.tracker,(r=e.migrations)!=null?r:vS.DefaultMigrations,e.contexts).lastMigration(),i=s.configCoder,o=i.fromSimple(e.config),a=i.imageHashOf(o),l=e.contexts[s.version],c=ye.context.addressOf(l,a);return await e.tracker.saveCounterfactualWallet({config:o,context:Object.values(e.contexts)}),new ra({address:c,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=Z.from(e),n=this.networks.find(s=>r.eq(s.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 mb(Oy(r.rpcUrl),{name:"",chainId:Z.from(e).toNumber()})}reader(e){return rr.eq(e)?new zCe:new ye.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 fH(r.relayer)?r.relayer:new cH(r.relayer)}setOrchestrator(e){this.orchestrator=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=Bn.coderFor(r.version);return this.walletFor(e,this.contextFor(r.version),r.config,n)}walletFor(e,r,n,s){const i=rr.eq(e);return new Dy({config:n,context:r,chainId:e,coders:s,relayer:i?void 0:this.relayer(e),address:this.address,orchestrator:this.orchestrator,reader:this.reader(e)})}async status(e,r=!1){var n=this;const s=this.reader(e).isDeployed(this.address),i=this.tracker.imageHashOfCounterfactualWallet({wallet:this.address}).then(k=>{if(!k)throw new Error(`Counterfactual imageHash not found for wallet ${this.address}`);return k}),o=i.then(k=>nH.counterfactualVersion(this.address,k.imageHash,Object.values(this.contexts))),a=async function(){if(!await s)return o;const $=await n.reader(e).implementation(n.address);if(!$)throw new Error(`Implementation not found for wallet ${n.address}`);const x=Object.values(n.contexts);for(let T=0;T0?y[y.length-1].nextImageHash:d,b=await this.tracker.configOfImageHash({imageHash:g});if(!b)throw new Error(`Config not found for imageHash ${g}`);const p=await s,w=await i,E=Bn.coderFor(h).config.checkpointOf(b);return{original:Vc({},w,{version:await o}),onChain:{imageHash:u,config:await c,version:f,deployed:p},fullyMigrated:h===this.version,signedMigrations:v,version:h,presignedConfigurations:y,imageHash:g,config:b,checkpoint:E,canOnchainValidate:f===this.version&&p}}mustBeFullyMigrated(e){if(!e.fullyMigrated)throw new Error(`Wallet ${this.address} is not fully migrated`)}async predecorateTransactions(e,r,n){if(r.onChain.imageHash!==r.imageHash){const i=await this.walletForStatus(n,r).buildUpdateConfigurationTransaction(r.config);return[Array.isArray(e)?e:[e],i.transactions].flat()}return e}decorateTransactions(e,r){const n=this.buildBootstrapTransactions(r,e.chainId);if(n.transactions.length===0)return e;const s={entrypoint:n.entrypoint,chainId:e.chainId,intent:e.intent,transactions:[...n.transactions,{to:e.entrypoint,data:ye.transaction.encodeBundleExecData(e),gasLimit:0,delegateCall:!1,revertOnError:!0,value:0}]};return r.onChain.deployed||(s.intent.id=ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,s.chainId,s.transactions)),s}decorateSignature(e,r){if(!r.presignedConfigurations||r.presignedConfigurations.length===0)return new Promise(o=>o(e));const n=this.coders.signature,s=r.presignedConfigurations.map(o=>o.signature),i=n.chainSignatures(e,s);return n.trim(i)}async publishWitness(){const e=Ue(xt(`This is a Sequence account woo! ${Date.now()}`)),r=await this.signDigest(e,0,!1),n=this.coders.signature.decode(r),s=this.coders.signature.signaturesOfDecoded(n);return this.tracker.saveWitnesses({wallet:this.address,digest:e,chainId:0,signatures:s})}async signDigest(e,r,n=!0,s="ignore"){const i=rr.eq(r)?this.networks[0].chainId:r,o=await this.status(i);if(this.mustBeFullyMigrated(o),!o.canOnchainValidate&&s==="throw")throw new Error("Wallet cannot validate onchain");const l=await this.walletForStatus(r,o).signDigest(e),c=n?this.decorateSignature(l,o):l;if(!o.canOnchainValidate)switch(s){case"ignore":return c;case"eip6492":return this.buildEIP6492Signature(await c,o,r)}return c}buildEIP6492Signature(e,r,n){const s=this.buildBootstrapTransactions(r,n);if(s.transactions.length===0)throw new Error("Cannot build EIP-6492 signature without bootstrap transactions");const i=Gn.encode(["address","bytes","bytes"],[s.entrypoint,ye.transaction.encodeBundleExecData(s),e]);return He(["bytes","bytes32"],[i,ye.EIP6492.EIP_6492_SUFFIX])}async editConfig(e){const r=await this.status(0).then(s=>s.config),n=this.coders.config.editConfig(r,Vc({},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),s=await this.signDigest(n,0,!1);await this.tracker.savePresignedConfiguration({wallet:this.address,nextConfig:e,signature:s});const i=await this.tracker.configOfImageHash({imageHash:r,noCache:!0});if(!i||this.coders.config.imageHashOf(i)!==r)throw Error(`Reverse lookup failed for imageHash ${r}`)}buildBootstrapTransactions(e,r){const n=[];if(!e.onChain.deployed){const o=Dy.buildDeployTransaction(e.original.context,e.original.imageHash);n.push(...o.transactions)}n.push(...e.signedMigrations.map(o=>({to:o.tx.entrypoint,data:ye.transaction.encodeBundleExecData(o.tx),value:0,gasLimit:0,revertOnError:!0,delegateCall:!1})));const s=e.signedMigrations.length>0?e.signedMigrations[0].tx.intent.id:ye.transaction.subdigestOfGuestModuleTransactions(this.contexts[this.version].guestModule,r,n),{guestModule:i}=this.contextFor(e.version);return{entrypoint:i,transactions:n,chainId:r,intent:{id:s,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 s=await this.bootstrapTransactions(e,n);return this.relayer(e).relay(Vc({},s,{chainId:e}),r)}signMessage(e,r,n="ignore"){return this.signDigest(Ue(e),r,!0,n)}async signTransactions(e,r,n,s){const i=n||await this.status(r);this.mustBeFullyMigrated(i);const a=await this.walletForStatus(r,i).signTransactions(e,(s==null?void 0:s.nonceSpace)&&{space:s==null?void 0:s.nonceSpace});return Vc({},a,{signature:await this.decorateSignature(a.signature,i)})}async signMigrations(e,r){const n=await this.status(e);if(n.fullyMigrated)return!1;const s=this.walletForStatus(e,n),i=r(s.config),o=await this.migrator.signNextMigration(this.address,n.version,s,i);if(!o)return!1;await this.tracker.saveWalletConfig({config:i});const a=Bn.coderFor(i.version).config,l=a.imageHashOf(i),c=await this.tracker.configOfImageHash({imageHash:l,noCache:!0});if(!c||a.imageHashOf(c)!==l)throw Error(`Reverse lookup failed for imageHash ${l}`);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(i){try{return await e.status(i.chainId)}catch(o){return r.push(i.chainId),console.warn(`Failed to get status for chain ${i.chainId}`,o),{fullyMigrated:!0}}}))).every(i=>i.fullyMigrated),failedChains:r}}async sendSignedTransactions(e,r,n,s,i){const o=s||await this.status(e.chainId);this.mustBeFullyMigrated(o);const a=this.decorateTransactions(e,o);return i==null||i(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,s){const i=s||await this.status(r),o=this.walletForStatus(r,i),a=await this.predecorateTransactions(e,i,r),l=ye.transaction.fromTransactionish(this.address,a),c=o.coders.config.buildStubSignature(o.config,n),f=te(jw(32)),u={chainId:r,intent:{id:f,wallet:this.address},signature:c,transactions:l,entrypoint:this.address,nonce:0},d=this.decorateTransactions(u,i),h=ye.transaction.encodeBundleExecData(d),v=await this.relayer(r).getFeeOptionsRaw(d.entrypoint,h);return Vc({},v,{decorated:d})}async prepareTransactions(e){const r=await this.status(e.chainId),n=await this.fillGasLimits(e.txs,e.chainId,r),s=await this.gasRefundQuotes(n,e.chainId,e.stubSignatureOverrides,r),i=ye.transaction.unwind(this.address,s.decorated.transactions);return{transactions:n,flatDecorated:i,feeOptions:s.options,feeQuote:s.quote}}async sendTransaction(e,r,n,s=!1,i,o){const a=await this.status(r),l=s?e:await this.predecorateTransactions(e,a,r),c=await this.signTransactions(l,r,void 0,o);return this.sendSignedTransactions(c,r,n,void 0,i)}async signTypedData(e,r,n,s,i="ignore"){const o=zw({domain:e,types:r,message:n});return this.signDigest(o,s,!0,i)}async getAllSigners(){var e=this;const r=[];return await Promise.all(this.networks.map(async function(n){const s=n.chainId,i=await e.status(s,!0),o=[i.onChain.imageHash,...i.onChain.version!==i.version?i.signedMigrations.map(a=>Bn.coderFor(a.toVersion).config.imageHashOf(a.toConfig)):[],...i.presignedConfigurations.map(a=>a.nextImageHash)];return Promise.all(o.map(async function(a,l){const c=l===o.length-1,f=await e.tracker.configOfImageHash({imageHash:a});if(!f){console.warn(`AllSigners may be incomplete, config not found for imageHash ${a}`);return}Bn.genericCoderFor(f.version).config.signersOf(f).forEach(h=>{const v=r.find(y=>y.address===h.address&&y.network===s);if(v&&c&&v.flaggedForRemoval){v.flaggedForRemoval=!1;return}v||r.push({address:h.address,weight:h.weight,network:s,flaggedForRemoval:!c})})}))})),r}}function VCe(t){return t instanceof ra}const qCe=Object.freeze(Object.defineProperty({__proto__:null,Account:ra,isAccount:VCe},Symbol.toStringTag,{value:"Module"}));function kb(){return kb=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),ys({},n)).then(s=>ms(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),ys({},n)).then(s=>ms(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),ys({},n)).then(s=>ms(s).then(i=>({status:i.status}))),this.getChainID=n=>this.fetch(this.url("GetChainID"),ys({},n)).then(s=>ms(s).then(i=>({chainID:i.chainID}))),this.getEtherBalance=(n,s)=>this.fetch(this.url("GetEtherBalance"),ys(n,s)).then(i=>ms(i).then(o=>({balance:o.balance}))),this.getTokenBalances=(n,s)=>this.fetch(this.url("GetTokenBalances"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,balances:o.balances}))),this.getTokenSupplies=(n,s)=>this.fetch(this.url("GetTokenSupplies"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,contractType:o.contractType,tokenIDs:o.tokenIDs}))),this.getTokenSuppliesMap=(n,s)=>this.fetch(this.url("GetTokenSuppliesMap"),ys(n,s)).then(i=>ms(i).then(o=>({supplies:o.supplies}))),this.getBalanceUpdates=(n,s)=>this.fetch(this.url("GetBalanceUpdates"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,balances:o.balances}))),this.getTransactionHistory=(n,s)=>this.fetch(this.url("GetTransactionHistory"),ys(n,s)).then(i=>ms(i).then(o=>({page:o.page,transactions:o.transactions}))),this.syncBalance=(n,s)=>this.fetch(this.url("SyncBalance"),ys(n,s)).then(i=>ms(i).then(o=>({}))),this.fetchTransactionReceipt=(n,s)=>this.fetch(this.url("FetchTransactionReceipt"),ys(n,s)).then(i=>ms(i).then(o=>({receipt:o.receipt}))),this.fetchTransactionReceiptWithFilter=(n,s)=>this.fetch(this.url("FetchTransactionReceiptWithFilter"),ys(n,s)).then(i=>ms(i).then(o=>({receipt:o.receipt}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const ys=(t={},e={})=>({method:"POST",headers:kb({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),ms=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});let ZCe=function(t){return t.MAINNET="https://mainnet-indexer.sequence.app",t.POLYGON="https://polygon-indexer.sequence.app",t.POLYGON_MUMBAI="https://mumbai-indexer.sequence.app",t.POLYGON_ZKEVM="https://polygon-zkevm-indexer.sequence.app",t.ARBITRUM="https://arbitrum-indexer.sequence.app",t.ARBITRUM_NOVA="https://arbitrum-nova-indexer.sequence.app",t.OPTIMISM="https://optimism-indexer.sequence.app",t.AVALANCHE="https://avalanche-indexer.sequence.app",t.GNOSIS="https://gnosis-indexer.sequence.app",t.BSC="https://bsc-indexer.sequence.app",t.BSC_TESTNET="https://bsc-testnet-indexer.sequence.app",t.GOERLI="https://goerli-indexer.sequence.app",t}({});const tI=typeof global=="object"?global.fetch:window.fetch;class Xw extends mH{constructor(e,r){super(e.endsWith("/")?e.slice(0,-1):e,tI),this._fetch=(n,s)=>{const i={};return this.jwtAuth&&this.jwtAuth.length>0&&(i.Authorization=`BEARER ${this.jwtAuth}`),s.headers=kb({},s.headers,i),tI(n,s)},this.jwtAuth=r,this.fetch=this._fetch}}const eEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:vA,EventLogDataType:QCe,EventLogType:KCe,Indexer:mH,SequenceIndexerClient:Xw,SequenceIndexerServices:ZCe,SortOrder:XCe,TransactionStatus:YCe,TransactionType:JCe,TxnTransferType:Ei,WebRPCSchemaHash:GCe,WebRPCSchemaVersion:HCe,WebRPCVersion:WCe},Symbol.toStringTag,{value:"Module"}));function yS(){return yS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),nn({},n)).then(s=>sn(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),nn({},n)).then(s=>sn(s).then(i=>({status:i.status}))),this.getTokenMetadata=(n,s)=>this.fetch(this.url("GetTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata}))),this.refreshTokenMetadata=(n,s)=>this.fetch(this.url("RefreshTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({status:o.status}))),this.getTokenMetadataBatch=(n,s)=>this.fetch(this.url("GetTokenMetadataBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractTokenMetadata:o.contractTokenMetadata}))),this.searchTokenMetadata=(n,s)=>this.fetch(this.url("SearchTokenMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenMetadata:o.tokenMetadata}))),this.searchTokenIDs=(n,s)=>this.fetch(this.url("SearchTokenIDs"),nn(n,s)).then(i=>sn(i).then(o=>({page:o.page,tokenIds:o.tokenIds}))),this.tokenCollectionFilters=(n,s)=>this.fetch(this.url("TokenCollectionFilters"),nn(n,s)).then(i=>sn(i).then(o=>({filters:o.filters}))),this.getContractInfo=(n,s)=>this.fetch(this.url("GetContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfo:o.contractInfo}))),this.getContractInfoBatch=(n,s)=>this.fetch(this.url("GetContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoMap:o.contractInfoMap}))),this.searchContractInfo=(n,s)=>this.fetch(this.url("SearchContractInfo"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoList:o.contractInfoList}))),this.searchContractInfoBatch=(n,s)=>this.fetch(this.url("SearchContractInfoBatch"),nn(n,s)).then(i=>sn(i).then(o=>({contractInfoByChain:o.contractInfoByChain}))),this.searchMetadata=(n,s)=>this.fetch(this.url("SearchMetadata"),nn(n,s)).then(i=>sn(i).then(o=>({tokenMetadata:o.tokenMetadata,contractInfo:o.contractInfo}))),this.getNiftyswapTokenQuantity=(n,s)=>this.fetch(this.url("GetNiftyswapTokenQuantity"),nn(n,s)).then(i=>sn(i).then(o=>({quantity:o.quantity}))),this.getNiftyswapUnitPrices=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPrices"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.getNiftyswapUnitPricesWithQuantities=(n,s)=>this.fetch(this.url("GetNiftyswapUnitPricesWithQuantities"),nn(n,s)).then(i=>sn(i).then(o=>({prices:o.prices}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const nn=(t={},e={})=>({method:"POST",headers:yS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),sn=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}),lEe=typeof global=="object"?global.fetch:window.fetch;class Zw extends pH{constructor(e="https://metadata.sequence.app"){super(e.endsWith("/")?e.slice(0,-1):e,lEe)}}const cEe=Object.freeze(Object.defineProperty({__proto__:null,ContractType:sEe,Metadata:pH,PropertyType:iEe,SequenceMetadataClient:Zw,SortOrder:aEe,SwapType:oEe,WebRPCSchemaHash:nEe,WebRPCSchemaVersion:rEe,WebRPCVersion:tEe},Symbol.toStringTag,{value:"Module"}));function fEe(t,e){const r=t.replace("ipfs://ipfs/","").replace("ipfs://","");return t.startsWith("ipfs://")?`${e}${r}`:t}function uEe(t){return t.startsWith("ipfs://")}class dEe{constructor(e,r,n=1e3){this.pending=new Map,this.provider=e,this.solver=r,this.window=n}async runByEIP5719(e,r,n){const s=`${e}-${r}-${n}`,i=Date.now();if(this.pending.has(s)&&i-this.pending.get(s).timestamp10)throw new Error("EIP5719 - Too many tries");if(ye.signer.canRecover(n)){const l=ye.signer.recoverSigner(r,n);if(l&&l.toLowerCase()===t.toLowerCase())return n}try{if(await ye.signer.isValidSignature(t,r,n,e))return n}catch{}const o=await vEe(hEe(t,e).getAlternativeSignature(r));if(!o||o==="")throw new Error("EIP5719 - Invalid signature and no alternative signature");const a=te(await(s||new yEe).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 gH(t,e,r,a,s,i+1)}class yEe{constructor(e="https://cloudflare-ipfs.com/ipfs/"){var r=this;this.uri=n=>uEe(n)?fEe(n,this.gateway):n,this.resolve=async function(n){const s=r.uri(n),i=await fetch(s);if(!i.ok)throw new Error(`URISolverIPFS - Failed to fetch ${s}`);return await i.text()},this.gateway=e}}const mEe=(t,e)=>e.some(r=>t instanceof r);let rI,nI;function pEe(){return rI||(rI=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function gEe(){return nI||(nI=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const bH=new WeakMap,mS=new WeakMap,wH=new WeakMap,ME=new WeakMap,yA=new WeakMap;function bEe(t){const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("success",i),t.removeEventListener("error",o)},i=()=>{r(Ol(t.result)),s()},o=()=>{n(t.error),s()};t.addEventListener("success",i),t.addEventListener("error",o)});return e.then(r=>{r instanceof IDBCursor&&bH.set(r,t)}).catch(()=>{}),yA.set(e,t),e}function wEe(t){if(mS.has(t))return;const e=new Promise((r,n)=>{const s=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",o),t.removeEventListener("abort",o)},i=()=>{r(),s()},o=()=>{n(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",i),t.addEventListener("error",o),t.addEventListener("abort",o)});mS.set(t,e)}let pS={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return mS.get(t);if(e==="objectStoreNames")return t.objectStoreNames||wH.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return Ol(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 xEe(t){pS=t(pS)}function CEe(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...r){const n=t.call(DE(this),e,...r);return wH.set(n,e.sort?e.sort():[e]),Ol(n)}:gEe().includes(t)?function(...e){return t.apply(DE(this),e),Ol(bH.get(this))}:function(...e){return Ol(t.apply(DE(this),e))}}function EEe(t){return typeof t=="function"?CEe(t):(t instanceof IDBTransaction&&wEe(t),mEe(t,pEe())?new Proxy(t,pS):t)}function Ol(t){if(t instanceof IDBRequest)return bEe(t);if(ME.has(t))return ME.get(t);const e=EEe(t);return e!==t&&(ME.set(t,e),yA.set(e,t)),e}const DE=t=>yA.get(t);function SEe(t,e,{blocked:r,upgrade:n,blocking:s,terminated:i}={}){const o=indexedDB.open(t,e),a=Ol(o);return n&&o.addEventListener("upgradeneeded",l=>{n(Ol(o.result),l.oldVersion,l.newVersion,Ol(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),a.then(l=>{i&&l.addEventListener("close",()=>i()),s&&l.addEventListener("versionchange",c=>s(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const kEe=["get","getKey","getAll","getAllKeys","count"],$Ee=["put","add","delete","clear"],NE=new Map;function sI(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(NE.get(e))return NE.get(e);const r=e.replace(/FromIndex$/,""),n=e!==r,s=$Ee.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(s||kEe.includes(r)))return;const i=async function(o,...a){const l=this.transaction(o,s?"readwrite":"readonly");let c=l.store;return n&&(c=c.index(a.shift())),(await Promise.all([c[r](...a),s&&l.done]))[0]};return NE.set(e,i),i}xEe(t=>({...t,get:(e,r,n)=>sI(e,r)||t.get(e,r,n),has:(e,r)=>!!sI(e,r)||t.has(e,r)}));class AEe{}var _Ee=Object.freeze({__proto__:null,ConfigTracker:AEe});class PEe{constructor(e){this.tracker=e}async loadPresignedConfiguration(e){return console.debug("? loadPresignedConfiguration"),On(e,"? "),On(await this.tracker.loadPresignedConfiguration(e),"! ")}savePresignedConfiguration(e){return console.debug("? savePresignedConfiguration"),On(e,"? "),this.tracker.savePresignedConfiguration(e)}saveWitnesses(e){return console.debug("? saveWitnesses"),On(e,"? "),this.tracker.saveWitnesses(e)}async configOfImageHash(e){return console.debug("? configOfImageHash"),On(e,"? "),On(await this.tracker.configOfImageHash(e),"! ")}saveWalletConfig(e){return console.debug("? saveWalletConfig"),On(e,"? "),this.tracker.saveWalletConfig(e)}async imageHashOfCounterfactualWallet(e){return console.debug("? imageHashOfCounterfactualWallet"),On(e,"? "),On(await this.tracker.imageHashOfCounterfactualWallet(e),"! ")}saveCounterfactualWallet(e){return console.debug("? saveCounterfactualWallet"),On(e,"? "),this.tracker.saveCounterfactualWallet(e)}async walletsOfSigner(e){return console.debug("? walletsOfSigner"),On(e,"? "),On(await this.tracker.walletsOfSigner(e),"! ")}async getMigration(e,r,n,s){return console.debug("? getMigration"),On({address:e,fromImageHash:r,fromVersion:n,chainId:s},"? "),On(await this.tracker.getMigration(e,r,n,s),"! ")}saveMigration(e,r,n){return console.debug("? saveMigration"),On({address:e,signed:r,contexts:n},"? "),this.tracker.saveMigration(e,r,n)}}function On(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 TEe=Object.freeze({__proto__:null,DebugConfigTracker:PEe});function Kl(){return Kl=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 s,i;return Promise.resolve(((s=this.migrations[e])==null||(i=s[r])==null?void 0:i[n])||[])},this.saveMigrationsSubdigest=(e,r,n,s,i)=>(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:s,toImageHash:i}),Promise.resolve())}}function bd(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]=Z.from(n):Array.isArray(n)?e[r]=n.map(s=>bd(s)):typeof n=="object"&&n!==null?e[r]=bd(n):e[r]=n}return e}class REe{constructor(e){var r=this;this.loadConfig=async function(n){return(await r.getDb()).get("configs",n).then(i=>bd(i))},this.saveConfig=async function(n,s){await(await r.getDb()).put("configs",s,n)},this.loadV2Node=async function(n){return(await r.getDb()).get("v2Nodes",n).then(i=>bd(i))},this.saveV2Node=async function(n,s){await(await r.getDb()).put("v2Nodes",s,n)},this.loadCounterfactualWallet=async function(n){return(await r.getDb()).get("counterfactualWallets",n)},this.saveCounterfactualWallet=async function(n,s,i){await(await r.getDb()).put("counterfactualWallets",{imageHash:s,context:i},n)},this.loadPayloadOfSubdigest=async function(n){return(await r.getDb()).get("payloads",n).then(i=>bd(i))},this.savePayloadOfSubdigest=async function(n,s){await(await r.getDb()).put("payloads",s,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,s){const o=await(await r.getDb()).get("signatures",[s,n].join("-"));return o==null?void 0:o.signature},this.saveSignatureOfSubdigest=async function(n,s,i){await(await r.getDb()).put("signatures",{signature:i,signer:n},[s,n].join("-"))},this.loadMigrationsSubdigest=async function(n,s,i){return(await(await r.getDb()).getAllFromIndex("migrations","jump",IDBKeyRange.only([n,s,i]))).map(l=>({subdigest:l.subdigest,toImageHash:l.toImageHash}))},this.saveMigrationsSubdigest=async function(n,s,i,o,a){await(await r.getDb()).put("migrations",{wallet:n,fromVersion:s,toVersion:i,subdigest:o,toImageHash:a},o)},this.dbName=e}async getDb(){if(this._lazyDb)return this._lazyDb;const e=this.dbName;return this._lazyDb=await SEe(e,1,{upgrade(r,n,s,i){console.log(`upgrading ${e} from ${n} to ${s} - ${i}`),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 CH(t){return t.left!==void 0&&t.right!==void 0}function EH(t){return t.weight!==void 0&&t.threshold!==void 0&&t.tree!==void 0}function gS(t){return t.version===2&&t.threshold!==void 0&&t.checkpoint!==void 0&&t.tree!==void 0&&typeof t.tree=="string"}var IEe=Object.freeze({__proto__:null,isPlainNode:CH,isPlainNested:EH,isPlainV2Config:gS,MemoryTrackerStore:xH,recreateBigNumbers:bd,IndexedDBStore:REe});class SH{constructor(e,r=new xH,n=!1){var s=this;this.loadTopology=async function(i){const o=await s.store.loadV2Node(i);if(!o)return{nodeHash:i};if(CH(o)){const[a,l]=await Promise.all([s.loadTopology(o.left),s.loadTopology(o.right)]);return{left:a,right:l}}return EH(o)?{weight:Z.from(o.weight),threshold:Z.from(o.threshold),tree:await s.loadTopology(o.tree)}:o},this.saveTopology=async function(i){if(Qe.config.isNodeLeaf(i))return;const o=Qe.config.hashNode(i);if(Qe.config.isNode(i)){const a=s.saveTopology(i.left),l=s.saveTopology(i.right),c=s.store.saveV2Node(o,{left:Qe.config.hashNode(i.left),right:Qe.config.hashNode(i.right)});await Promise.all([a,l,c]);return}if(Qe.config.isNestedLeaf(i)){const a=s.saveTopology(i.tree),l=s.store.saveV2Node(o,{weight:Z.from(i.weight).toString(),threshold:Z.from(i.threshold).toString(),tree:Qe.config.hashNode(i.tree)});await Promise.all([a,l]);return}if(Qe.config.isSignerLeaf(i))return s.store.saveV2Node(o,{address:i.address,weight:i.weight});if(Qe.config.isSubdigestLeaf(i))return s.store.saveV2Node(o,{subdigest:i.subdigest});throw new Error(`Unknown topology type: ${i}`)},this.saveWalletConfig=async function(i){const{config:o}=i;if(Zo.config.ConfigCoder.isWalletConfig(o)){const a=Zo.config.ConfigCoder.imageHashOf(o);return s.store.saveConfig(a,o)}if(Qe.config.ConfigCoder.isWalletConfig(o)){const a=Qe.config.ConfigCoder.imageHashOf(o);if(Qe.config.isComplete(o.tree))return s.store.saveConfig(a,o)}},this.configOfImageHashCache={},this.configOfImageHash=async function(i){const{imageHash:o}=i;if(s.configOfImageHashCache[i.imageHash])return s.configOfImageHashCache[i.imageHash];const a=await s.store.loadConfig(o);if(a){if(a.version===1||a.version===2&&!gS(a))return s.configOfImageHashCache[i.imageHash]=a,a;if(gS(a)){const l={version:2,threshold:Z.from(a.threshold),checkpoint:Z.from(a.checkpoint),tree:await s.loadTopology(a.tree)};return s.configOfImageHashCache[i.imageHash]=l,l}throw new Error(`Unknown config type: ${a}`)}},this.saveCounterfactualWallet=async function(i){const{config:o,context:a}=i,l=Bn.genericCoderFor(o.version).config.imageHashOf(o);await Promise.all([s.saveWalletConfig({config:o}),...a.map(c=>{const f=ye.context.addressOf(c,l);return s.store.saveCounterfactualWallet(f,l,c)})])},this.imageHashOfCounterfactualWallet=async function(i){const{wallet:o}=i,a=await s.store.loadCounterfactualWallet(o);if(a)return{imageHash:a.imageHash,context:a.context}},this.savePayload=async function(i){const{payload:o}=i,a=ye.signature.subdigestOf(o);await s.store.savePayloadOfSubdigest(a,o)},this.payloadOfSubdigestCache={},this.payloadOfSubdigest=async function(i){if(s.payloadOfSubdigestCache[i.subdigest])return s.payloadOfSubdigestCache[i.subdigest];const{subdigest:o}=i,a=await s.store.loadPayloadOfSubdigest(o);return a&&(s.payloadOfSubdigestCache[o]=a),a},this.savePresignedConfiguration=async function(i){const o=Qe.signature.SignatureCoder.decode(i.signature),a=Bn.genericCoderFor(i.nextConfig.version).config.imageHashOf(i.nextConfig),l=Qe.chained.messageSetImageHash(a),c=Ue(l),f={message:l,address:i.wallet,chainId:0,digest:c},u=s.savePayload({payload:f}),d=s.saveWalletConfig({config:i.nextConfig}),h=await Qe.signature.SignatureCoder.recover(o,f,s.provider),v=Qe.signature.signaturesOf(h.config.tree);await Promise.all([u,d,s.saveWalletConfig({config:h.config}),...v.map(y=>s.store.saveSignatureOfSubdigest(y.address,h.subdigest,y.signature))])},this.loadPresignedConfiguration=async function(i){const{wallet:o,fromImageHash:a,longestPath:l}=i,c=await s.configOfImageHash({imageHash:a});if(!c||!Qe.config.ConfigCoder.isWalletConfig(c))return[];const f=Qe.config.signersOf(c.tree).map(w=>w.address),u=await Promise.all(f.map(w=>s.store.loadSubdigestsOfSigner(w))),d=[...new Set(u.flat())],v=(await Promise.all([...new Set(d)].map(async function(w){return Kl({},await s.payloadOfSubdigest({subdigest:w}),{subdigest:w})}))).filter(w=>(w==null?void 0:w.message)&&(w==null?void 0:w.address)&&w.address===o).map(w=>({payload:w,nextImageHash:Qe.chained.decodeMessageSetImageHash(w.message)})).filter(w=>w==null?void 0:w.nextImageHash);let y;const b=(await Promise.all(v.map(async function({nextImageHash:w,payload:E}){const k=await s.configOfImageHash({imageHash:w});if(!k||!Qe.config.isWalletConfig(k))return;const $=Z.from(k.checkpoint);return{nextConfig:k,nextCheckpoint:$,nextImageHash:w,payload:E}}))).filter(w=>w!==void 0).filter(w=>w.nextCheckpoint.gt(c.checkpoint)).sort((w,E)=>w.nextCheckpoint.gt(E.nextCheckpoint)?l?1:-1:l?-1:1);for(const w of b){const{nextConfig:E,nextCheckpoint:k,nextImageHash:$,payload:x}=w;if(y){const L=y.checkpoint;if(l){if(k.gte(L))continue}else if(k.lte(L))continue}const T=new Map((await Promise.all(f.map(async function(L){const U=await s.store.loadSignatureOfSubdigest(L,x.subdigest);if(!U)return[L,void 0];const V=te(s.useEIP5719?await s.cachedEIP5719.runByEIP5719(L,x.subdigest,U):U),N=ye.signer.tryRecoverSigner(x.subdigest,V)!==L;return[L,{isDynamic:N,signature:V}]}))).filter(L=>Boolean(L[1])));if(T.size===0)continue;const B=Qe.signature.SignatureCoder.encodeSigners(c,T,[],0);B.weight.lt(c.threshold)||(y={nextImageHash:$,checkpoint:Z.from(E.checkpoint),signature:B.encoded})}if(!y)return[];const p=await s.loadPresignedConfiguration({wallet:o,fromImageHash:y.nextImageHash,longestPath:l});return[{wallet:o,nextImageHash:y.nextImageHash,signature:y.signature},...p]},this.saveWitnesses=async function(i){const o={digest:i.digest,address:i.wallet,chainId:i.chainId},a=ye.signature.subdigestOf(o);await Promise.all([s.savePayload({payload:o}),...i.signatures.filter(l=>ye.signer.canRecover(l)).map(l=>{const c=ye.signer.recoverSigner(a,l);return s.store.saveSignatureOfSubdigest(c,a,l)})])},this.walletsOfSigner=async function(i){const o=await s.store.loadSubdigestsOfSigner(i.signer),a=await Promise.all(o.map(c=>s.payloadOfSubdigest({subdigest:c}))).then(c=>c.filter(f=>f!==void 0)),l=[];for(const c of a){const f=c.address;if(l.find(h=>h.wallet===f))continue;const u=ye.signature.subdigestOf(c),d=await s.store.loadSignatureOfSubdigest(i.signer,u);d&&l.push({wallet:f,proof:{digest:c.digest,chainId:Z.from(c.chainId),signature:te(d)}})}return l},this.provider=e,this.store=r,this.useEIP5719=n,this.cachedEIP5719=new dEe(e)}async saveMigration(e,r,n){const s=r.fromVersion;if(s!==1)throw new Error("Migration not supported");if(!Qe.config.isWalletConfig(r.toConfig))throw new Error("Invalid to config");const{newImageHash:i,address:o}=iH.v1v2.decodeTransaction(r.tx,n);if(o!==e)throw new Error("Invalid migration transaction - address");if(Qe.config.ConfigCoder.imageHashOf(r.toConfig)!=i)throw new Error("Invalid migration transaction - config");const a=ye.transaction.packMetaTransactionsData(r.tx.nonce,r.tx.transactions),l=Ue(a),c={chainId:r.tx.chainId,message:a,address:e,digest:l},f=ye.signature.subdigestOf(c),u=this.savePayload({payload:c}),d=this.saveWalletConfig({config:r.toConfig}),h=Zo.signature.SignatureCoder.decode(r.tx.signature),v=await Zo.signature.SignatureCoder.recover(h,c,this.provider),y=Zo.signature.SignatureCoder.signaturesOf(v.config);await Promise.all([u,d,this.saveWalletConfig({config:v.config}),this.store.saveMigrationsSubdigest(e,s,s+1,f,i),...y.map(g=>this.store.saveSignatureOfSubdigest(g.address,v.subdigest,g.signature))])}async getMigration(e,r,n,s){var i=this;const[o,a]=await Promise.all([this.configOfImageHash({imageHash:r}),this.store.loadMigrationsSubdigest(e,n,n+1)]),l=Bn.coderFor(n);return!o||!l.config.isWalletConfig(o)?void 0:(await Promise.all(a.map(async function(f){const{subdigest:u,toImageHash:d}=f,h=await i.payloadOfSubdigest({subdigest:u});if(!h||!h.message||!Z.from(s).eq(h.chainId))return;const v=l.config.signersOf(o).map(w=>w.address),y=new Map((await Promise.all(v.map(async function(w){const E=await i.store.loadSignatureOfSubdigest(w,u);if(!E)return[w,void 0];const k=te(i.useEIP5719?await i.cachedEIP5719.runByEIP5719(w,u,E):E),$=ye.signer.tryRecoverSigner(u,k)!==w;return[w,{isDynamic:$,signature:k}]}))).filter(w=>Boolean(w[1]))),g=l.signature.encodeSigners(o,y,[],s);if(!g||g.weightf.filter(u=>u!==void 0)))[0]}}var OEe=Object.freeze({__proto__:null,LocalConfigTracker:SH});let LE=function(t){return t.EIP712="EIP712",t.EthSign="EthSign",t.EIP1271="EIP1271",t}({});class MEe{constructor(e,r){this.path="/rpc/Sessions/",this.ping=n=>this.fetch(this.url("Ping"),gi({},n)).then(s=>bi(s).then(i=>({}))),this.config=(n,s)=>this.fetch(this.url("Config"),gi(n,s)).then(i=>bi(i).then(o=>({version:o.version,config:o.config}))),this.wallets=(n,s)=>this.fetch(this.url("Wallets"),gi(n,s)).then(i=>bi(i).then(o=>({wallets:o.wallets}))),this.deployHash=(n,s)=>this.fetch(this.url("DeployHash"),gi(n,s)).then(i=>bi(i).then(o=>({deployHash:o.deployHash,context:o.context}))),this.configUpdates=(n,s)=>this.fetch(this.url("ConfigUpdates"),gi(n,s)).then(i=>bi(i).then(o=>({updates:o.updates}))),this.migrations=(n,s)=>this.fetch(this.url("Migrations"),gi(n,s)).then(i=>bi(i).then(o=>({migrations:o.migrations}))),this.saveConfig=(n,s)=>this.fetch(this.url("SaveConfig"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveWallet=(n,s)=>this.fetch(this.url("SaveWallet"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveSignature=(n,s)=>this.fetch(this.url("SaveSignature"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveSignerSignatures=(n,s)=>this.fetch(this.url("SaveSignerSignatures"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.saveMigration=(n,s)=>this.fetch(this.url("SaveMigration"),gi(n,s)).then(i=>bi(i).then(o=>({}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const gi=(t={},e={})=>({method:"POST",headers:Kl({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),bi=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 DEe{constructor(e,r=!0){this.onlyRecoverable=r,this.sessions=new MEe(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:s})=>({wallet:e.wallet,nextImageHash:n,signature:s}))}catch(r){if(jE(r))return[];throw r}}async savePresignedConfiguration(e){const r=e.nextConfig,n=Bn.genericCoderFor(r.version).config.imageHashOf(r),s=Qe.signature.setImageHashStruct(n),i=Ue(s);await this.sessions.saveSignature({wallet:e.wallet,digest:i,chainID:"0",signature:e.signature,toConfig:Lm(r)})}async saveWitnesses(e){let r=e.signatures;this.onlyRecoverable&&(r=r.filter(n=>ye.signer.canRecover(n))),await this.sessions.saveSignerSignatures({wallet:e.wallet,digest:e.digest,chainID:Gu(e.chainId),signatures:r})}async configOfImageHash(e){try{const{version:r,config:n}=await this.sessions.config(e);return NEe(r,n)}catch(r){if(jE(r))return;throw r}}async saveWalletConfig(e){const r=Lm(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(jE(r))return;throw r}}async saveCounterfactualWallet(e){const r=Lm(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:s,chainID:i,type:o,signature:a}])=>{switch(o){case LE.EIP712:a+=te(ye.signer.SigType.EIP712).slice(2);break;case LE.EthSign:a+=te(ye.signer.SigType.ETH_SIGN).slice(2);break;case LE.EIP1271:a+=te(ye.signer.SigType.WALLET_BYTES32).slice(2);break}return{wallet:n,proof:{digest:s,signature:a,chainId:Z.from(i)}}})}async getMigration(e,r,n,s){var i=this;const o=Gu(s),{migrations:a}=await this.sessions.migrations({wallet:e,fromVersion:n,fromImageHash:r,chainID:o}),l=async function(u){const d=a[u];if(d){const h=Object.keys(d).map(Number).sort((v,y)=>y-v);for(const v of h)for(const[y,g]of Object.entries(d[v]))try{const b=await i.configOfImageHash({imageHash:y});if(b)return{fromVersion:n,toVersion:v,toConfig:b,tx:{entrypoint:g.executor,transactions:g.transactions,nonce:g.nonce,signature:g.signature,chainId:u,intent:{id:ye.transaction.subdigestOfTransactions(e,u,g.nonce,g.transactions),wallet:e}}}}catch(b){console.error(b)}}},c=await l(o);if(c)return c;for(const f in a)if(f!==o){const u=await l(f);if(u)return u}}async saveMigration(e,r,n){await this.sessions.saveMigration({wallet:e,fromVersion:r.fromVersion,toVersion:r.toVersion,toConfig:Lm(r.toConfig),executor:r.tx.entrypoint,transactions:r.tx.transactions.map(LEe),nonce:Gu(r.tx.nonce),signature:r.tx.signature,chainID:Gu(r.tx.chainId)})}}function Lm(t){switch(t.version){case 1:if(Zo.config.ConfigCoder.isWalletConfig(t))return{threshold:Jc(t.threshold),signers:t.signers.map(({weight:e,address:r})=>({weight:Jc(e),address:r}))};throw new Error(`not a v${t.version} config: ${t}`);case 2:if(Qe.config.ConfigCoder.isWalletConfig(t))return{threshold:Jc(t.threshold),checkpoint:Jc(t.checkpoint),tree:Bp(t.tree)};throw new Error(`not a v${t.version} config: ${t}`);default:throw new Error(`unknown version ${t.version}`)}}function Bp(t){return Qe.config.isNode(t)?{left:Bp(t.left),right:Bp(t.right)}:Qe.config.isSignerLeaf(t)?{weight:Jc(t.weight),address:t.address}:Qe.config.isNestedLeaf(t)?{weight:Jc(t.weight),threshold:Jc(t.threshold),tree:Bp(t.tree)}:Qe.config.isNodeLeaf(t)?{node:t.nodeHash}:Kl({},t)}function NEe(t,e){switch(t){case 1:return Kl({},e,{version:t});case 2:return Kl({},e,{version:t,tree:Up(e.tree)});default:throw new Error(`unknown version ${t}`)}}function Up(t){switch(typeof t){case"object":const e=Kl({},t);return e.left!==void 0&&(e.left=Up(e.left)),e.right!==void 0&&(e.right=Up(e.right)),e.tree!==void 0&&(e.tree=Up(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 LEe(t){return{to:t.to,value:t.value!==void 0?Gu(t.value):void 0,data:t.data!==void 0?te(t.data):void 0,gasLimit:t.gasLimit!==void 0?Gu(t.gasLimit):void 0,delegateCall:t.delegateCall,revertOnError:t.revertOnError}}function Jc(t){return Z.from(t).toNumber()}function Gu(t){return Z.from(t).toString()}function jE(t){return typeof t=="object"&&t.status===404}var jEe=Object.freeze({__proto__:null,RemoteConfigTracker:DEe});function bS(t,e,r){return new Promise(n=>{let s=0;t.forEach(i=>i.then(o=>{r(o)?n(o):(s++,s===t.length&&n(e))}).catch(()=>{s++,s===t.length&&n(e)}))})}async function L1(t,e){return Promise.all(t.map(r=>r.catch(()=>e)))}class FEe{constructor(e){this.trackers=e}async configOfImageHash(e){const r=this.trackers.map(async function(a,l){return{res:await a.configOfImageHash(e),i:l}}),n=await bS(r,void 0,a=>(a==null?void 0:a.res)===void 0?!1:Bn.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 s=new SH(void 0),i=await L1(r,void 0);for(const a of i)a!=null&&a.res&&await s.saveWalletConfig({config:a.res});const o=await s.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 bS(this.trackers.map(n=>n.imageHashOfCounterfactualWallet(e)),void 0,n=>Boolean(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 L1(this.trackers.map(o=>o.walletsOfSigner(e)),[]).then(o=>o.flat()),n={};for(const o of r)n[o.wallet]=o.proof;const s=Object.keys(n).map(o=>({wallet:o,proof:n[o]})),i=new Map;return s.forEach(({wallet:o,proof:{digest:a,chainId:l,signature:c}})=>{const f=`${o}-${a}-${l}`;let u=i.get(f);u||(u={wallet:o,digest:a,chainId:l,signatures:[]},i.set(f,u)),u.signatures.push(c)}),i.forEach(o=>this.saveWitnesses(o)),s}async saveWitnesses(e){await Promise.all(this.trackers.map(r=>r.saveWitnesses(e)))}async loadPresignedConfiguration(e){var r=this;const n=await L1(this.trackers.map(l=>l.loadPresignedConfiguration(e)),[]),i=(await L1(n.map(async function(l){const c=l[l.length-1],f=await r.configOfImageHash({imageHash:c.nextImageHash});if(f)return{checkpoint:Bn.genericCoderFor(f.version).config.checkpointOf(f),result:l}}),void 0)).reduce((l,c)=>c&&(!l||c.checkpoint.gt(l.checkpoint))?c:l);if(!i)return[];const o=new Map,a=l=>(o.has(l)||o.set(l,this.configOfImageHash({imageHash:l})),o.get(l));return i.result.forEach(async function(l){const c=await a(l.nextImageHash);c&&r.savePresignedConfiguration({wallet:e.wallet,nextConfig:c,signature:l.signature})}),i.result}async savePresignedConfiguration(e){await Promise.all(this.trackers.map(r=>r.savePresignedConfiguration(e)))}async getMigration(e,r,n,s){return(await Promise.all(this.trackers.map(o=>o.getMigration(e,r,n,s)))).find(o=>!!o)}async saveMigration(e,r,n){await Promise.all(this.trackers.map(s=>s.saveMigration(e,r,n)))}}class BEe{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 s;const[i,o]=await Promise.all(n);if(i.length>0&&o.length>0&&i[i.length-1].nextImageHash===o[o.length-1].nextImageHash)s=e.longestPath===!0?i.length>o.length?i:o:i.lengthu&&(!f||u.checkpoint.gt(f.checkpoint))?u:f))==null?void 0:l.result)!=null?a:[]}return s||[]}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 s of r)for(const i of s)n.set(i.wallet,i);return Array.from(n.values())}async saveWitnesses(e){await Promise.all([this.tracker.saveWitnesses(e),this.cache.saveWitnesses(e)])}async getMigration(e,r,n,s){const i=await this.cache.getMigration(e,r,n,s);if(i)return i;const o=await this.tracker.getMigration(e,r,n,s);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 iI{constructor(){this.cache=new Map}do(e,r,n,...s){e=`${e}:${Ue(xt(JSON.stringify(s,UEe)))}`;let i=this.cache.get(e);if(i&&i.expiration&&new Date>=i.expiration&&(i=void 0,this.cache.delete(e)),!i){const o={promise:n(...s)};r!==void 0&&(o.promise=o.promise.then(a=>(o.expiration=new Date(Date.now()+r),a))),i=o,this.cache.set(e,i)}return i.promise}}function UEe(t,e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).sort()):e}function zEe(t){return t instanceof kH}class kH{constructor(e,r=50,n=!1){this.cache=new iI,this.tracker=e,this.window=r,this.verbose=n}invalidateCache(){this.cache=new iI}configOfImageHash(e){return this.cache.do("configOfImageHash",this.window,r=>this.tracker.configOfImageHash(r),e)}getMigration(e,r,n,s){return this.cache.do("getMigration",this.window,(...i)=>this.tracker.getMigration(...i),e,r,n,s)}saveMigration(e,r,n){return this.cache.do("saveMigration",void 0,(...s)=>this.tracker.saveMigration(...s),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)}}var mA=Object.freeze({__proto__:null,debug:TEe,local:OEe,remote:jEe,stores:IEe,raceUntil:bS,allSafe:L1,MultipleTracker:FEe,CachedTracker:BEe,isDedupedTracker:zEe,DedupedTracker:kH});const VEe=Object.freeze(Object.defineProperty({__proto__:null,tracker:_Ee,trackers:mA},Symbol.toStringTag,{value:"Module"})),$H=60*60*24*7,qEe=60;class oI{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:$H,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 s;for(let i=1;;i++)try{s=(await r.getJWT(!0)).token;break}catch(o){if(i===e)throw console.error(`couldn't authenticate after ${e} attempts`,o),o}return new hd(n,s)}(),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 c=this.status.jwt,f=await c.token;if(this.now(){throw this.status.jwt=void 0,c}),expiration:o};return this.status.jwt=a,a.token.then(()=>{this.onAuthCallbacks.forEach(c=>{try{c({status:"fulfilled",value:void 0})}catch{}})}).catch(c=>{this.onAuthCallbacks.forEach(f=>{try{f({status:"rejected",reason:c})}catch{}})}),{token:await a.token,expiration:o}}getProofStringKey(){return`${this.account.address} - ${this.settings.metadata.name}`}async isProofStringValid(e){try{const r=new Iy,n=Z.from(this.settings.sequenceApiChainId),s=Li(this.account.networks,n);if(!s)throw Error("No network found");return r.chainId=n.toNumber(),r.provider=new mb(Oy(s.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 hd(r,n)}return this.apiClient}getMetadataClient(){return this.metadataClient||(this.metadataClient=new Zw(this.settings.sequenceMetadataUrl)),this.metadataClient}async getIndexerClient(e){const r=Li(this.account.networks,e);if(!r)throw Error(`No network for chain ${e}`);if(!this.indexerClients.has(r.chainId))if(r.indexer)this.indexerClients.set(r.chainId,r.indexer);else if(r.indexerUrl)this.indexerClients.set(r.chainId,new Xw(r.indexerUrl));else throw Error(`No indexer url for chain ${e}`);return this.indexerClients.get(r.chainId)}getProofString(e){if(this.proofStrings.has(e)){const l=this.proofStrings.get(e);if(this.now()(r.signature=l,n.encodeProof(r,!0))).catch(l=>{throw this.proofStrings.delete(e),l}),expiration:o};return this.proofStrings.set(e,a),a}}const AH=async(t,e,r)=>{const n=Ye(await t.getAddress());if(!n||n===""||n==="0x")throw _H;const s=new Uw;if(s.address=n,!r||!r.app||r.app==="")throw new pA("authorization options requires app to be set");s.claims.app=r.app,s.claims.ogn=r.origin,s.setExpiryIn(r.expiry?Math.max(r.expiry,200):$H);const i=s.messageTypedData(),o=hW(e);s.signature=await(t instanceof ra?t.signTypedData(i.domain,i.types,i.message,o,"eip6492"):t.signTypedData(i.domain,i.types,i.message,o));const l=await new Iy().encodeProof(s,!0);return{typedData:i,proofString:l}};class pA extends Error{constructor(e){super(e),this.name="AuthError"}}const _H=new pA("auth error: account address is empty");function qc(){return qc=Object.assign?Object.assign.bind():function(t){for(var e=1;eT.wallet));let $;if(k){if($=new ra({address:k,tracker:b,networks:g,contexts:y,orchestrator:v}),c&&c.length>0){let T=await $.status(w);if(T.original.version!==T.version||$.version!==T.version){const{migratedAllChains:U,failedChains:V}=await $.isMigratedAllChains();if(V.some(N=>wS.includes(N)))throw Error(`Failed to fetch account status on ${V.join(", ")}`);if(!U){if(h&&!await h($))throw Error("Migration cancelled, cannot open session");const{failedChains:N}=await $.signAllMigrations(d||(S=>S));if(N.some(S=>wS.includes(S)))throw Error(`Failed to sign migrations on ${N.join(", ")}`);mA.isDedupedTracker(b)&&b.invalidateCache();let C;if([C,T]=await Promise.all([$.isMigratedAllChains().then(S=>S.migratedAllChains),$.status(w)]),!C)throw Error("Failed to migrate account")}}T.onChain.version!==T.version&&await $.doBootstrap(w,void 0,T);const B=T.config,L=$.coders.config.editConfig(B,{add:c,threshold:l});if($.coders.config.imageHashOf(B)!==$.coders.config.imageHashOf(L)){const U=$.coders.config.editConfig(L,{checkpoint:$.coders.config.checkpointOf(B).add(1)});await $.updateConfig(U)}}}else{if(!c||c.length===0)throw Error("Cannot create new account without signers");if(!l)throw Error("Cannot create new account without threshold");if($=await ra.new({config:{threshold:l,checkpoint:0,signers:c},tracker:b,contexts:y,orchestrator:v,networks:g}),await $.publishWitness(),!(await b.walletsOfSigner({signer:a,noCache:!0})).some(B=>B.wallet===$.address))throw Error("Account not found on tracker")}let x;return p&&(x=new oI($,p),x.auth()),new bv(g,y,$,x)}static async load(e){const{dump:r,settings:n,editConfigOnMigration:s,onMigration:i,orchestrator:o}=e,{contexts:a,networks:l,tracker:c,services:f}=qc({},zp,n);let u;if(PH(r)){const v=r.config.address||ye.context.addressOf(a[1],Zo.config.ConfigCoder.imageHashOf(qc({},r.config,{version:1})));if(u=new ra({address:v,tracker:c,networks:l,contexts:a,orchestrator:o}),!await u.isMigratedAllChains().then(y=>y.migratedAllChains)){if(i&&!await i(u))throw Error("Migration cancelled, cannot open session");if(console.log("Migrating account..."),await u.signAllMigrations(s),!await u.isMigratedAllChains().then(y=>y.migratedAllChains))throw Error("Failed to migrate account")}}else if(TH(r))u=new ra({address:r.address,tracker:c,networks:l,contexts:a,orchestrator:o});else throw Error("Invalid dump format");let d;if(f){var h;d=new oI(u,f,r.jwt&&{jwt:{token:Promise.resolve(r.jwt.token),expiration:(h=r.jwt.expiration)!=null?h:eW(r.jwt.token).exp},metadata:r.metadata})}return new bv(l,a,u,d)}}const WEe=(t,e,r)=>async(n,s,i)=>{const o=i.messageDigest();return{isValid:await t(s).isValidSignature(i.address,o,i.signature)}},HEe=Object.freeze(Object.defineProperty({__proto__:null,AuthError:pA,CRITICAL_CHAINS:wS,ErrAccountIsRequired:_H,Session:bv,SessionSettingsDefault:zp,ValidateSequenceWalletProof:WEe,isSessionDumpV1:PH,isSessionDumpV2:TH,signAuthorization:AH},Symbol.toStringTag,{value:"Module"}));function xS(){return xS=Object.assign?Object.assign.bind():function(t){for(var e=1;ethis.fetch(this.url("Ping"),uu({},n)).then(s=>du(s).then(i=>({status:i.status}))),this.version=n=>this.fetch(this.url("Version"),uu({},n)).then(s=>du(s).then(i=>({version:i.version}))),this.runtimeStatus=n=>this.fetch(this.url("RuntimeStatus"),uu({},n)).then(s=>du(s).then(i=>({status:i.status}))),this.getSignerConfig=(n,s)=>this.fetch(this.url("GetSignerConfig"),uu(n,s)).then(i=>du(i).then(o=>({signerConfig:o.signerConfig}))),this.sign=(n,s)=>this.fetch(this.url("Sign"),uu(n,s)).then(i=>du(i).then(o=>({sig:o.sig}))),this.signWith=(n,s)=>this.fetch(this.url("SignWith"),uu(n,s)).then(i=>du(i).then(o=>({sig:o.sig}))),this.hostname=e,this.fetch=(n,s)=>r(n,s)}url(e){return this.hostname+this.path+e}}const uu=(t={},e={})=>({method:"POST",headers:xS({},e,{"Content-Type":"application/json"}),body:JSON.stringify(t||{})}),du=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}),YEe=typeof global=="object"?global.fetch:window.fetch;class JEe{constructor(e,r,n=!1,s){this.requests=new Map,this.address=e,this.url=r,this.appendSuffix=n,this.onError=s,this.guard=new RH(r,YEe)}async getAddress(){return this.address}async requestSignature(e,r,n,s){return ye.isWalletSignRequestMetadata(n)?this.requests.set(e,s):s.onRejection("Expected Sequence-like metadata"),!0}notifyStatusChange(e,r,n){if(this.requests.has(e)){if(!ye.isWalletSignRequestMetadata(n)){this.requests.get(e).onRejection("Expected Sequence-like metadata (status update)");return}this.evaluateRequest(e,r.message,r,n)}}packMsgAndSig(e,r,n,s){return Gn.encode(["address","uint256","bytes","bytes"],[e,s,r,n])}keyOfRequest(e,r,n,s){return aa(["address","uint256","bytes","bytes"],[e,s,r,n])}async evaluateRequest(e,r,n,s){var i;const o=Bn.genericCoderFor(s.config.version),{encoded:a}=o.signature.encodeSigners(s.config,(i=s.parts)!=null?i:new Map,[],s.chainId);try{var l;const f=this.keyOfRequest(this.address,r,a,s.chainId);if(((l=this.requests.get(e))==null?void 0:l.lastAttempt)===f)return;this.requests.get(e).lastAttempt=f;const d=await this.guard.signWith({signer:this.address,request:{msg:te(r),auxData:this.packMsgAndSig(s.address,s.digest,a,s.chainId),chainId:Z.from(s.chainId).toNumber()}});ne(d.sig).length!==0&&(this.requests.get(e).onSignature(d.sig),this.requests.delete(e))}catch(f){var c;(c=this.onError)==null||c.call(this,f)}}suffix(){return this.appendSuffix?[3]:[]}}const XEe=Object.freeze(Object.defineProperty({__proto__:null,Guard:RH,GuardSigner:JEe,WebRPCSchemaHash:QEe,WebRPCSchemaVersion:KEe,WebRPCVersion:GEe},Symbol.toStringTag,{value:"Module"}));function $b(){return $b=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,s,i)=>{if(this.batchableJsonRpcMethods.find(o=>o===s.method)){this.queue.push({request:s,callback:i,next:n}),this.options.verbose&&console.log("Scheduling call",s.method),this.scheduleExecution();return}return this.options.verbose&&console.log("Forwarded call",s.method),n(s,i)},this.run=async function(){r.options.verbose&&console.log("Processing multicall");const n=Math.min(r.options.batchSize,r.queue.length);if(n===0)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.scheduleExecution();const s=a[0].next;let i;var[a,l]=aI(a,h=>{try{if(h.next!==s)return!1;switch(h.request.method){case Ur.ethCall:if(h.request.params[0].from||h.request.params[0].gasPrice||h.request.params[0].value)return!1;case Ur.ethGetBalance:case Ur.ethGetCode:const v=e5e(h.request.params[1]);if(i===void 0&&(i=v),!t5e(v,i))return!1}return!0}catch{return!1}});if(l.length!==0&&(r.options.verbose&&console.log("Forwarding incompatible calls",l.length),r.forward(l),a.length===0))return;let o=a.map(h=>{try{switch(h.request.method){case Ur.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 Ur.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 Ur.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,l]=aI(a,(h,v)=>o[v]!==void 0);if(o=o.filter(h=>h),l.length!==0&&(r.options.verbose&&console.log("Forwarding calls on error",l.length),r.forward(l),a.length===0))return;let c;try{c=r.multicallInterface.encodeFunctionData(r.multicallInterface.getFunction("multiCall"),[o])}catch{r.forward(a);return}const f=G4(),u=await ZEe(H4(s)({id:f,jsonrpc:Qd,method:Ur.ethCall,params:[{to:r.options.contract,value:0,data:c},Z.isBigNumber(i)?i.toNumber():i]}),h=>({jsonrpc:Qd,id:f,result:void 0,error:h}));if(u.error)return r.forward(a);let d;try{d=r.multicallInterface.decodeFunctionResult(r.multicallInterface.getFunction("multiCall"),u.result)}catch{r.forward(a);return}r.options.verbose&&console.log("Got response for",a.length),a.forEach((h,v)=>{if(!d[0][v])r.forward(h);else switch(h.request.method){case Ur.ethCall:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:d[1][v]});break;case Ur.ethGetCode:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Gn.decode(["bytes"],d[1][v])[0]});break;case Ur.ethGetBalance:h.callback(void 0,{jsonrpc:h.request.jsonrpc,id:h.request.id,result:Gn.decode(["uint256"],d[1][v])[0]});break}})},this.options=e?$b({},Xs.DefaultOptions,e):Xs.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&&Xs.isMulticallOptions(e.options)}static isMulticallOptions(e){return e!==void 0&&e.batchSize!==void 0&&e.timeWindow!==void 0&&e.contract!==void 0}}Xs.DefaultOptions=$b({},r5e);const IH=["getNetwork","getBlockNumber","getGasPrice","getTransactionCount","getStorageAt","sendTransaction","estimateGas","getBlock","getTransaction","getTransactionReceipt","getLogs","emit","litenerCount","addListener","removeListener","waitForTransaction","detectNetwork","getBlockWithTransactions"];class n5e extends Bw{constructor(e,r){var n;super(e.getNetwork()),n=this,this.listenerCount=this.provider.listenerCount,this.getResolver=async function(s){const i=n.provider;if(i.getResolver){const o=await i.getResolver(await s);return o?new J3(n,o.address,o.name):null}return i.getResolver(await s)},this.next=async function(s,i){try{switch(s.method){case Ur.ethCall:n.callback(s,i,await n.provider.call(s.params[0],s.params[1]));break;case Ur.ethGetCode:n.callback(s,i,await n.provider.getCode(s.params[0],s.params[1]));break;case Ur.ethGetBalance:n.callback(s,i,await n.provider.getBalance(s.params[0],s.params[1]));break}}catch(o){n.callback(s,i,void 0,o)}},this.provider=e,this.multicall=Xs.isMulticall(r)?r:new Xs(r),IH.forEach(s=>{e[s]!==void 0&&(this[s]=(...i)=>e[s](...i))})}callback(e,r,n,s){r(s,{jsonrpc:Qd,id:e.id,result:n,error:s})}async call(e,r){return this.rpcCall(Ur.ethCall,e,r)}async getCode(e,r){return this.rpcCall(Ur.ethGetCode,e,r)}async getBalance(e,r){return this.rpcCall(Ur.ethGetBalance,e,r)}async rpcCall(e,...r){const n=G4();return(await H4(this.multicall.handle)(this.next,{jsonrpc:Qd,id:n,method:e,params:r})).result}}class s5e{constructor(e,r){if(this.provider=e,this.multicall=Xs.isMulticall(r)?r:new Xs(r),e.send){const n=async function(i,o){e.send(i,o)};this.send=(s,i)=>{this.multicall.handle(n,s,i)}}if(e.sendAsync){const n=async function(i,o){e.sendAsync(i,o)};this.sendAsync=(s,i)=>{this.multicall.handle(n,s,i)}}}get isMetaMask(){return this.provider.isMetaMask}get isStatus(){return this.provider.isStatus}}const i5e=t=>e=>{const r=Xs.isMulticall(t)?t:new Xs(t);return(n,s)=>r.handle(e,n,s)};var o5e=Object.freeze({__proto__:null,ProxyMethods:IH,MulticallProvider:n5e,MulticallExternalProvider:s5e,multicallMiddleware:i5e});const a5e=Object.freeze(Object.defineProperty({__proto__:null,Multicall:Xs,providers:o5e},Symbol.toStringTag,{value:"Module"}));var Jd={},l5e={get exports(){return Jd},set exports(t){Jd=t}};/*! * EventEmitter2 * https://github.com/hij1nx/EventEmitter2 * * Copyright (c) 2013 hij1nx * Licensed under the MIT license. - */(function(t,e){(function(r){var n=Object.hasOwnProperty,s=Array.isArray?Array.isArray:function(I){return Object.prototype.toString.call(I)==="[object Array]"},i=10,o=typeof process=="object"&&typeof process.nextTick=="function",a=typeof Symbol=="function",l=typeof Reflect=="object",c=typeof setImmediate=="function",f=c?setImmediate:setTimeout,u=a?l&&typeof Reflect.ownKeys=="function"?Reflect.ownKeys:function(_){var I=Object.getOwnPropertyNames(_);return I.push.apply(I,Object.getOwnPropertySymbols(_)),I}:Object.keys;function d(){this._events={},this._conf&&h.call(this,this._conf)}function h(_){_&&(this._conf=_,_.delimiter&&(this.delimiter=_.delimiter),_.maxListeners!==r&&(this._maxListeners=_.maxListeners),_.wildcard&&(this.wildcard=_.wildcard),_.newListener&&(this._newListener=_.newListener),_.removeListener&&(this._removeListener=_.removeListener),_.verboseMemoryLeak&&(this.verboseMemoryLeak=_.verboseMemoryLeak),_.ignoreErrors&&(this.ignoreErrors=_.ignoreErrors),this.wildcard&&(this.listenerTree={}))}function v(_,I){var B="(node) warning: possible EventEmitter memory leak detected. "+_+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(B+=" Event name: "+I+"."),typeof process<"u"&&process.emitWarning){var D=new Error(B);D.name="MaxListenersExceededWarning",D.emitter=this,D.count=_,process.emitWarning(D)}else console.error(B),console.trace&&console.trace()}var y=function(_,I,B){var D=arguments.length;switch(D){case 0:return[];case 1:return[_];case 2:return[_,I];case 3:return[_,I,B];default:for(var A=new Array(D);D--;)A[D]=arguments[D];return A}};function b(_,I){for(var B={},D,A=_.length,L=I?I.length:0,G=0;G0;)_=L[q],G.call(O,_,B[_]);this._listeners={},this._listenersCount=0,z()}}});function g(_,I,B,D){var A=Object.assign({},I);if(!_)return A;if(typeof _!="object")throw TypeError("options must be an object");var L=Object.keys(_),G=L.length,O,q,z;function H(Q){throw Error('Invalid "'+O+'" option value'+(Q?". Reason: "+Q:""))}for(var X=0;X0;)if(O===_[q])return L;G(I)}}var k=E(["function"]),$=E(["object","function"]);function C(_,I,B){var D,A,L=0,G,O=new _(function(q,z,H){B=g(B,{timeout:0,overload:!1},{timeout:function(J,ae){return J*=1,(typeof J!="number"||J<0||!Number.isFinite(J))&&ae("timeout must be a positive number"),J}}),D=!B.overload&&typeof _.prototype.cancel=="function"&&typeof H=="function";function X(){A&&(A=null),L&&(clearTimeout(L),L=0)}var Q=function(J){X(),q(J)},K=function(J){X(),z(J)};D?I(Q,K,H):(A=[function(J){K(J||Error("canceled"))}],I(Q,K,function(J){if(G)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof J!="function")throw TypeError("onCancel callback must be a function");A.push(J)}),G=!0),B.timeout>0&&(L=setTimeout(function(){var J=Error("timeout");J.code="ETIMEDOUT",L=0,O.cancel(J),z(J)},B.timeout))});return D||(O.cancel=function(q){if(A){for(var z=A.length,H=1;H0;)K=Ae[O],K!=="_listeners"&&(at=j(_,I,B[K],D+1,A),at&&(Q?Q.push.apply(Q,at):Q=at));return Q}else if(st==="**"){for(ue=D+1===A||D+2===A&&ke==="*",ue&&B._listeners&&(Q=j(_,I,B,A,A)),Ae=u(B),O=Ae.length;O-- >0;)K=Ae[O],K!=="_listeners"&&(K==="*"||K==="**"?(B[K]._listeners&&!ue&&(at=j(_,I,B[K],A,A),at&&(Q?Q.push.apply(Q,at):Q=at)),at=j(_,I,B[K],D,A)):K===ke?at=j(_,I,B[K],D+2,A):at=j(_,I,B[K],D,A),at&&(Q?Q.push.apply(Q,at):Q=at));return Q}else B[st]&&(Q=j(_,I,B[st],D+1,A));if(J=B["*"],J&&j(_,I,J,D+1,A),ae=B["**"],ae)if(D0;)K=Ae[O],K!=="_listeners"&&(K===ke?j(_,I,ae[K],D+2,A):K===st?j(_,I,ae[K],D+1,A):(ie={},ie[K]=ae[K],j(_,I,{"**":ie},D+1,A)));else ae._listeners?j(_,I,ae,A,A):ae["*"]&&ae["*"]._listeners&&j(_,I,ae["*"],A,A);return Q}function F(_,I,B){var D=0,A=0,L,G=this.delimiter,O=G.length,q;if(typeof _=="string")if((L=_.indexOf(G))!==-1){q=new Array(5);do q[D++]=_.slice(A,L),A=L+O;while((L=_.indexOf(G,A))!==-1);q[D++]=_.slice(A)}else q=[_],D=1;else q=_,D=_.length;if(D>1){for(L=0;L+10&&z._listeners.length>this._maxListeners&&(z._listeners.warned=!0,v.call(this,z._listeners.length,H))):z._listeners=I,!0;return!0}function U(_,I,B,D){for(var A=u(_),L=A.length,G,O,q,z=_._listeners,H;L-- >0;)O=A[L],G=_[O],O==="_listeners"?q=B:q=B?B.concat(O):[O],H=D||typeof O=="symbol",z&&I.push(H?q:q.join(this.delimiter)),typeof G=="object"&&U.call(this,G,I,q,H);return I}function V(_){for(var I=u(_),B=I.length,D,A,L;B-- >0;)A=I[B],D=_[A],D&&(L=!0,A!=="_listeners"&&!V(D)&&delete _[A]);return L}function N(_,I,B){this.emitter=_,this.event=I,this.listener=B}N.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function x(_,I,B){if(B===!0)A=!0;else if(B===!1)D=!0;else{if(!B||typeof B!="object")throw TypeError("options should be an object or true");var D=B.async,A=B.promisify,L=B.nextTick,G=B.objectify}if(D||L||A){var O=I,q=I._origin||I;if(L&&!o)throw Error("process.nextTick is not supported");A===r&&(A=I.constructor.name==="AsyncFunction"),I=function(){var z=arguments,H=this,X=this.event;return A?L?Promise.resolve():new Promise(function(Q){f(Q)}).then(function(){return H.event=X,O.apply(H,z)}):(L?process.nextTick:f)(function(){H.event=X,O.apply(H,z)})},I._async=!0,I._origin=q}return[I,G?new N(this,_,I):this]}function S(_){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,_)}S.EventEmitter2=S,S.prototype.listenTo=function(_,I,B){if(typeof _!="object")throw TypeError("target musts be an object");var D=this;B=g(B,{on:r,off:r,reducers:r},{on:k,off:k,reducers:$});function A(L){if(typeof L!="object")throw TypeError("events must be an object");var G=B.reducers,O=T.call(D,_),q;O===-1?q=new p(D,_,B):q=D._observers[O];for(var z=u(L),H=z.length,X,Q=typeof G=="function",K=0;K0;)A=B[D],(!_||A._target===_)&&(A.unsubscribe(I),L=!0);return L},S.prototype.delimiter=".",S.prototype.setMaxListeners=function(_){_!==r&&(this._maxListeners=_,this._conf||(this._conf={}),this._conf.maxListeners=_)},S.prototype.getMaxListeners=function(){return this._maxListeners},S.prototype.event="",S.prototype.once=function(_,I,B){return this._once(_,I,!1,B)},S.prototype.prependOnceListener=function(_,I,B){return this._once(_,I,!0,B)},S.prototype._once=function(_,I,B,D){return this._many(_,1,I,B,D)},S.prototype.many=function(_,I,B,D){return this._many(_,I,B,!1,D)},S.prototype.prependMany=function(_,I,B,D){return this._many(_,I,B,!0,D)},S.prototype._many=function(_,I,B,D,A){var L=this;if(typeof B!="function")throw new Error("many only accepts instances of Function");function G(){return--I===0&&L.off(_,G),B.apply(this,arguments)}return G._origin=B,this._on(_,G,D,A)},S.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var _=arguments[0],I,B=this.wildcard,D,A,L,G,O;if(_==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(B&&(I=_,_!=="newListener"&&_!=="removeListener"&&typeof _=="object")){if(A=_.length,a){for(L=0;L3)for(D=new Array(q-1),G=1;G3)for(A=new Array(z-1),O=1;O0&&this._events[_].length>this._maxListeners&&(this._events[_].warned=!0,v.call(this,this._events[_].length,_))):this._events[_]=I,A)},S.prototype.off=function(_,I){if(typeof I!="function")throw new Error("removeListener only takes instances of Function");var B,D=[];if(this.wildcard){var A=typeof _=="string"?_.split(this.delimiter):_.slice();if(D=j.call(this,null,A,this.listenerTree,0),!D)return this}else{if(!this._events[_])return this;B=this._events[_],D.push({_listeners:B})}for(var L=0;L0){for(D=this._all,I=0,B=D.length;I0;)D=I[B[L]],typeof D=="function"?A.push(D):A.push.apply(A,D);return A}else{if(this.wildcard){if(G=this.listenerTree,!G)return[];var O=[],q=typeof _=="string"?_.split(this.delimiter):_.slice();return j.call(this,O,q,G,0),O}return I?(D=I[_],D?typeof D=="function"?[D]:D:[]):[]}},S.prototype.eventNames=function(_){var I=this._events;return this.wildcard?U.call(this,this.listenerTree,[],null,_):I?u(I):[]},S.prototype.listenerCount=function(_){return this.listeners(_).length},S.prototype.hasListeners=function(_){if(this.wildcard){var I=[],B=typeof _=="string"?_.split(this.delimiter):_.slice();return j.call(this,I,B,this.listenerTree,0),I.length>0}var D=this._events,A=this._all;return!!(A&&A.length||D&&(_===r?u(D).length:D[_]))},S.prototype.listenersAny=function(){return this._all?this._all:[]},S.prototype.waitFor=function(_,I){var B=this,D=typeof I;return D==="number"?I={timeout:I}:D==="function"&&(I={filter:I}),I=g(I,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:k,Promise:w}),C(I.Promise,function(A,L,G){function O(){var q=I.filter;if(!(q&&!q.apply(B,arguments)))if(B.off(_,O),I.handleError){var z=arguments[0];z?L(z):A(y.apply(null,arguments).slice(1))}else A(y.apply(null,arguments))}G(function(){B.off(_,O)}),B._on(_,O,!1)},{timeout:I.timeout,overload:I.overload})};function R(_,I,B){B=g(B,{Promise,timeout:0,overload:!1},{Promise:w});var D=B.Promise;return C(D,function(A,L,G){var O;if(typeof _.addEventListener=="function"){O=function(){A(y.apply(null,arguments))},G(function(){_.removeEventListener(I,O)}),_.addEventListener(I,O,{once:!0});return}var q=function(){z&&_.removeListener("error",z),A(y.apply(null,arguments))},z;I!=="error"&&(z=function(H){_.removeListener(I,q),L(H)},_.once("error",z)),G(function(){z&&_.removeListener("error",z),_.removeListener(I,q)}),_.once(I,q)},{timeout:B.timeout,overload:B.overload})}var M=S.prototype;Object.defineProperties(S,{defaultMaxListeners:{get:function(){return M._maxListeners},set:function(_){if(typeof _!="number"||_<0||Number.isNaN(_))throw TypeError("n must be a non-negative number");M._maxListeners=_},enumerable:!0},once:{value:R,writable:!0,configurable:!0}}),Object.defineProperties(M,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return S}):t.exports=S})()})(l5e);function ns(){return ns=Object.assign?Object.assign.bind():function(t){for(var e=1;e++c5e;class T0{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Yd.EventEmitter2,this.sendAsync=async function(r,n,s){e.state===qs.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},s);try{e.isOpened()||await e.waitUntilOpened();const i=await e.sendMessageRequest({idx:NH(),type:Xe.MESSAGE,data:r,chainId:s});n(void 0,i.data)}catch(i){n(i)}},this.sendMessageRequest=async function(r){return new Promise((n,s)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&s(new Error("message idx not set"));const i=(a,l)=>{if(a)s(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?s(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,i),e.isOpened()?e.sendMessage(r):(xe.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=pA){let n=!1;return Promise.race([new Promise((s,i)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=qs.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),i(new Error("opening wallet timed out"))},r)}),new Promise(s=>{if(e.isOpened()){var i;n=!0,s((i=e.openPayload)==null?void 0:i.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,s(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(s=>{if(e.connectPayload){s(e.connectPayload);return}e.events.once("connect",i=>{e.connectPayload=i,s(i)})}),n=new Promise((s,i)=>{e.events.once("close",o=>{i(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=qs.CLOSED,this._registered=!1,this._init=qt.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===qs.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===Xe.INIT){xe.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){xe.error("invalid init nonce");return}this._init=qt.OK,this.sendMessage({idx:-1,type:Xe.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==qt.OK)return;xe.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Xe.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){xe.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw xe.error(l),this.close(),l}this.state=qs.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(c){r.sendMessage(c)});return}if(e.type===Xe.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===Xe.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ye(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===Xe.CHAIN_CHANGED){this.events.emit("chainChanged",e.data);return}if(e.type===Xe.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Xe.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Xe.CLOSE&&this.state!==qs.CLOSED&&this.close(e.data),e.type===Xe.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Xe.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data),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!==qs.CLOSED&&(this.state=qs.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,xe.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(ns({},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 f5e(t){return u5e.some(e=>e.predicate(t))}const u5e=[{name:"Decentraland Exception",predicate:h5e},{name:"0x v3 Exception",predicate:v5e}],d5e=/^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 h5e(t){try{const e=Ta(t);return d5e.test(e)}catch{return!1}}function v5e(t){const e=new en(y5e);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const y5e=[{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"}],zp=xt(`Ethereum Signed Message: -`),LH=t=>_a(t)||ze(t)?ne(t):xt(t),Zw=t=>{const e=LH(t);return f5e(e)?e:Ht([zp,xt(String(e.length)),e])},m5e=t=>{if(JSON.stringify(t.slice(0,zp.length))!==JSON.stringify(zp))return t;const e=t.slice(zp.length),r=String(e.length).length;let n,s;try{s=Number(Ta(e.slice(0,r)))}catch{s=Number(te(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},Jd=async(t,e,r,n)=>new ye.reader.OnChainReader(n).isValidSignature(t,e,r),jH=async(t,e,r,n)=>{const s=Zw(e),i=q4(s);return Jd(t,i,r,n)},FH=(t,e,r,n)=>Jd(t,Uw(e),r,n),$b=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",BH=()=>!!navigator.userAgent.match(/UnitySequence/i),UH=t=>t.onChain.deployed&&t.fullyMigrated;class zH{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 Dy{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!Dy.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.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 Ab(){return Dy.isAvailable()?new Dy:new zH}async function VH(t){return Array.isArray(t)?Promise.all(t.map(e=>mt(e))):mt(t)}const aI="@sequence.transportSession";class R0{constructor(e){var r=this;this.sendAsync=async function(n,s,i){throw new Error("abstract method")},this.handleMessage=async function(n){const s=n;if(r._init!==qt.OK){if(s.type===Xe.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case Xe.OPEN:{if(r._init!==qt.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case Xe.CLOSE:return r._init!==qt.OK,void 0;case Xe.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:xe.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=rW(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=G4(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!$b()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=sW(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=nW(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.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(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){xe.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!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=>{Ab().setItem(aI,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=Ab().getItem(aI);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=qt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",n=>{this.registered&&this.notifyDisconnect(n)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(te(n.find(s=>s.isDefaultChain).chainId)))}),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:s,error:i}=e;this.sendMessage({idx:-1,type:Xe.OPEN,data:{chainId:r,sessionId:n,session:s,error:i}})}notifyClose(e){this.sendMessage({idx:-1,type:Xe.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Xe.CONNECT,data:e})}notifyDisconnect(e){this.sendMessage({idx:-1,type:Xe.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Xe.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:Xe.CHAIN_CHANGED,data:e})}notifyNetworks(e){this.sendMessage({idx:-1,type:Xe.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Xe.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===qt.OK)return xe.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Xe.INIT)return xe.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(xe.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(xe.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===qt.OK){e();return}if(this._init!==qt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{xe.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},pA/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=qt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Xe.INIT,data:{nonce:this._initNonce}}),this._init=qt.SENT_NONCE})}}class p5e{constructor(){const e=new xS,r=new xS;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class xS{constructor(){this.events=new Yd.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 qH extends T0{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,s)=>{if(this.state===qs.CLOSED){this.state=qs.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:Xe.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i}})}},this.state=qs.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=qt.OK}closeWallet(){this.sendMessage({idx:-1,type:Xe.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class g5e extends R0{constructor(e,r){super(e),this.port=r,this._init=qt.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 WH(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=(...s)=>{n.logfromjs(`${t}: ${jE(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${jE(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${jE(s)}`)},window.logsOverriddenForUnreal=!0}}function jE(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let du;class HH extends T0{constructor(e){super(),this.register=()=>{var r;WH("dapp"),du&&(du.unregister(),du=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),du=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),du===this&&(du=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,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new P0;r&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",z4(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.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 s=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",s),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(s)}}class b5e extends R0{constructor(e){super(e),this.onMessageFromUnreal=r=>{xe.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new P0(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:V4(n.get("intent"))}},this._init=qt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;WH("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){xe.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;xe.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;xe.error(l),this.notifyClose({message:l}),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!==Xe.INIT&&this._init!==qt.OK){xe.error("impossible state, should not be calling postMessage until inited");return}const s=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(s)}}const gA="sequence-extension-message-handler";class w5e extends R0{constructor(e,r){super(e),this.runtime=r,this._init=qt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:gA})}sendMessage(e){xe.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class GH extends T0{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===gA&&(this._init=qt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class x5e extends Yd.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;xe.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case Xe.MESSAGE:if(i)this.emit(Xe.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case Xe.DISCONNECT:case Xe.ACCOUNTS_CHANGED:case Xe.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((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(l,c)=>{if(l)i(l);else if(c)s(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(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 hu;class KH extends T0{constructor(e){super(),this.register=()=>{hu&&(hu.unregister(),hu=this),window.addEventListener("message",this.onWindowEvent),hu=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(),hu===this&&(hu=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const i=new URL(this.walletURL.href),o=new P0;r&&r!==""&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!$b()&&!BH()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",z4(n))),s&&o.set("net",`${s}`);let a,l;$b()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;i.search=o.toString(),this.walletWindow=window.open(i.href,"sequence.app",c)},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){xe.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 C5e extends R0{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 s;try{s=JSON.parse(n.data)}catch{return}if(xe.debug("RECEIVED MESSAGE",s),r._init!==qt.OK&&r.isValidInitAck(s)&&(r.appOrigin=n.origin),r._init===qt.OK&&(!r.appOrigin||r.appOrigin.length<8)){xe.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(s)},this.getWindowTransportSession=n=>{const s=new P0(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:V4(s.get("intent"))}},this._init=qt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:s}=new URL(e||window.location.href);let i=this.getWindowTransportSession(s);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){xe.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(i).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}`;xe.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}, due to: ${a}`;xe.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Xe.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==qt.OK){xe.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):xe.error("unable to postMessage as parentOrigin is invalid")}}function QH(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 ex{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(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendAsync=async function(n,s,i){if(r.provider){r.provider.sendAsync(n,s,i);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,s,i;const o=new ex;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new KH(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new qH(e.proxyTransport.appPort);o.add(a)}if((s=e.extensionTransport)!=null&&s.enabled){const a=new GH(e.extensionTransport.runtime);o.add(a)}if((i=e.unrealTransport)!=null&&i.enabled&&e.windowTransport&&e.walletAppURL){const a=new HH(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;nk5e(t,s))}function k5e(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data&&ne(e.data).length>=4)throw new Error("self calls are forbidden");if(e.delegateCall)throw new Error("delegate calls are forbidden")}const $5e=1e4;class A5e{constructor(e,r,n){var s=this;this.signerReadyCallbacks=[],this.events=new Yd.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(i){if(!i&&!s._connectOptions)throw new Error("prompter connect options are empty");if(!s.prompter)return s.connect(i);const o=await s.prompter.promptConnect(i||s._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.sendAsync=async function(i,o,a){const l={jsonrpc:"2.0",id:i.id,result:null};await s.getAccount();try{var c;if((!s.account||s.account===null)&&!_5e.includes(i.method))throw DH;const f=s.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(c=s.account)==null?void 0:c.providerFor(a??s.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const d=u instanceof ga?u:void 0;switch(i.method){case"net_version":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("net_version",[]);l.result=h;break}case"eth_chainId":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("eth_chainId",[]);l.result=h;break}case"eth_accounts":{const h=f.address;l.result=[h];break}case"eth_getBalance":{const[h,v]=i.params,y=await u.getBalance(h,v);l.result=y.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let h;switch(i.method){case"sequence_sign":case"personal_sign":{const[p,g]=i.params;h=p;break}case"eth_sign":{const[p,g]=i.params;h=g;break}}let v="";const y=Zw(h),b=i.method==="sequence_sign";if(s.prompter===null?v=await f.signMessage(y,a??s.defaultChainId(),b?"eip6492":"ignore"):v=await s.prompter.promptSignMessage({chainId:a,message:y,eip6492:b},s.connectOptions),v&&v.length>0)l.result=v;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[h,v]=i.params;let y;if(typeof v=="string")try{y=JSON.parse(v)}catch(g){console.warn("walletRequestHandler: error parsing typedData",g)}else y=v;if(!y||!y.domain||!y.types||!y.message)throw new Error("invalid typedData object");let b="";const p=i.method==="sequence_signTypedData_v4";if(s.prompter===null?b=await f.signTypedData(y.domain,y.types,y.message,a??s.defaultChainId(),p?"eip6492":"ignore"):b=await s.prompter.promptSignMessage({chainId:a,typedData:y,eip6492:p},s.connectOptions),b&&b.length>0)l.result=b;else throw new Error("declined by user");break}case"eth_sendTransaction":{const h=S5e(i.params[0]).map(y=>("gas"in y&&y.gasLimit===void 0&&(y.gasLimit=y.gas,delete y.gas),y));lI(f.address,h);let v="";if(s.prompter===null?v=(await f.sendTransaction(h,a??s.defaultChainId())).hash:v=await s.prompter.promptSendTransaction(h,a,s.connectOptions),v)l.result=v;else throw new Error("declined by user");break}case"eth_signTransaction":{const[h]=i.params;if(Ye(h.from)!==f.address)throw new Error("sender address does not match wallet");lI(f.address,h),s.prompter===null?l.result=await f.signTransactions(h,a??s.defaultChainId()):l.result=await s.prompter.promptSignTransaction(h,a,s.connectOptions);break}case"eth_sendRawTransaction":{if(ye.transaction.isSignedTransactionBundle(i.params[0])){const h=Z.from(i.params[0].chainId).toNumber(),v=await f.relayer(h).relay(i.params[0]);l.result=v.hash}else{const h=await u.sendTransaction(i.params[0]);l.result=h.hash}break}case"eth_getTransactionCount":{const h=Ye(i.params[0]),v=i.params[1],y=await u.getTransactionCount(h,v);l.result=Z.from(y).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(i.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(i.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(i.params[0]);break}case"eth_call":{const[h,v]=i.params;l.result=await u.call(h,v);break}case"eth_getCode":{const[h,v]=i.params;l.result=await u.getCode(h,v);break}case"eth_estimateGas":{const[h]=i.params;l.result=await u.estimateGas(h);break}case"eth_gasPrice":{const h=await u.getGasPrice();l.result=h.toHexString();break}case"wallet_switchEthereumChain":{const[h]=i.params;if(!h.chainId||h.chainId.length===0)throw new Error("invalid chainId");const v=Z.from(h.chainId);s.setDefaultChainId(v.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=f.contexts;break}case"sequence_getWalletConfig":{const[h]=i.params;h?l.result=[(await f.status(h)).onChain.config]:l.result=await Promise.all(f.networks.map(async function(v){return(await f.status(v.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[h]=i.params;h?l.result=[cI(h,await f.status(h))]:l.result=await Promise.all(f.networks.map(async function(v){const y=await f.status(v.chainId);return cI(v.chainId,y)}));break}case"sequence_getNetworks":{l.result=await s.getNetworks(!0);break}case"sequence_isSequence":{l.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[h]=i.params;if(!h)throw new Error("invalid request, method argument defaultChainId cannot be empty");s.setDefaultChainId(h),l.result=await s.getNetworks(!0);break}default:{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send(i.method,i.params);l.result=h}}}catch(f){xe.error(f),l.result=null,l.error=ns({},new Error(f),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.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:s}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var i;l=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=$5e){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 s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:ce.MAINNET,i=G4(s).chainId,o={connected:!0,chainId:Nl(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry};try{o.proof=await AH(this.account,i,a)}catch(l){return xe.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=await this.walletSession(i),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,s)=>{const i=ns({},e,{data:s});r(i)},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=ns({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(xe.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(s=>ns({},s,{provider:void 0,relayer:void 0}))};if(e){const s=Ni(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.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 s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect")}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",te(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){xe.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;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(s);if(i(o))return!0;if(await e.promptConfirmWalletDeploy(s,this.connectOptions)){const l=await r.status(s);return i(l)?!0:(xe.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function cI(t,e){return{context:e.original.context,config:e.onChain.config,address:ye.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 _5e=["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 Nh{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(!Lh.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Nh(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new bA(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||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await VH(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await hl(async function(){const a=await o.getTransaction(i);return a?o._wrapTransaction(a,i):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=i,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 bA extends Nh{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 P5e{constructor(e){if(this.signer=e,bA.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,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return Jd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=Zw(r),a=q4(o);return Jd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,Uw(r),n,s)}}class Lh extends q2{constructor(e,r,n=Gd){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(s=>{this.emit("connect",s)}),e.onDisconnect(s=>{this.emit("disconnect",s)}),e.onDefaultChainIdChanged(s=>{this.emit("chainChanged",s)}),e.onAccountsChanged(s=>{this.emit("accountsChanged",s)}),this.signer=new Nh(this.client,this),this.utils=new P5e(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(ns({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Ni(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 JH(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 Nl(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=YH(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 s=await this._getSubprovider(),i=(n=s.prepareRequest(e,r))!=null?n:[e,r];return s.send(i[0],i[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=Ni(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.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,s){return(await this._getSubprovider(s==null?void 0:s.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 Yj(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}}Lh.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function YH(t){return typeof t=="object"?YH(t.chainId):Z.from(t).toNumber()}class JH extends Lh{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=Ni(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 T5e={name:"@0xsequence/provider",version:"1.2.1",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 of{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(of.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(of.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(of.SESSION_LOCALSTORE_KEY)}}of.SESSION_LOCALSTORE_KEY="@sequence.session";class af{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(af.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(af.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(af.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}af.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class wA{constructor(e,r,n){var s;if(this.callbacks={},QH(e))this.transport=ex.new(e);else if(OH(e))this.transport=e;else throw new Error("Invalid transport");const i=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 of(r),this.defaultChainId=new af(r,i),this.transport.on("accountsChanged",o=>{var a;o.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(a=this.callbacks.accountsChanged)==null||a.forEach(l=>l(o))}),this.transport.on("connect",o=>{var a;const l=Nl(this.getChainId());(a=this.callbacks.connect)==null||a.forEach(c=>c(ns({},o,{chainId:l})))}),this.transport.on("disconnect",o=>{var a;(a=this.callbacks.disconnect)==null||a.forEach(l=>l(o))}),this.transport.on("networks",o=>{var a;(a=this.callbacks.networks)==null||a.forEach(l=>l(o))}),this.transport.on("walletContext",o=>{var a;(a=this.callbacks.walletContext)==null||a.forEach(l=>l(o))}),this.transport.on("open",o=>{var a;(a=this.callbacks.open)==null||a.forEach(l=>l(o))}),this.transport.on("close",()=>{var o;(o=this.callbacks.close)==null||o.forEach(a=>a())}),this.defaultChainId.onDefaultChainIdChanged(o=>{var a;const l=Nl(o);(a=this.callbacks.chainChanged)==null||a.forEach(c=>c(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)}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&&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:ns({},e,{networkId:this.getChainId(),clientVersion:T5e.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=Z.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,s)=>{this.transport.sendAsync(e,(i,o)=>{i?s(i):o===void 0?s(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?s(o.error):typeof o=="object"&&o.result?n(o.result):s(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),s=Yr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),s]},(r==null?void 0:r.chainId)||e.domain.chainId&&Z.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],s=E5e(n);return this.send({method:"eth_sendTransaction",params:[s]},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 CS={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let po;const XH=t=>{var e,r,n;if(po)return po;const s=ns({},CS,t,{transports:ns({},CS.transports,t==null?void 0:t.transports)}),i={},o=(e=(r=s.networks)==null?void 0:r.filter(d=>{d.rpcUrl!==void 0&&d.chainId!==void 0&&Gd.find(h=>h.chainId===d.chainId)}))!=null?e:[],a=Gd.map(d=>{var h;const v=(h=s.networks)==null?void 0:h.find(y=>y.chainId===d.chainId);return v?ns({},d,v):d}).concat(o),l=d=>{if(!i[d]){var h;const v=(h=a.find(p=>p.chainId===d))==null?void 0:h.rpcUrl;if(!v)throw new Error(`no rpcUrl found for chainId: ${d}`);const y=new ga(v),b=new K4([bW,gW,new Q4],new gb(y));i[d]=new cB(b,d)}return i[d]},c=s.defaultNetwork?(n=Ni(a,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!c&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||Ab(),u=new wA(s.transports,f,{defaultChainId:c,defaultEIP6492:s.defaultEIP6492});return po=new Lh(u,l),po},ZH=()=>{po&&(po.client.closeWallet(),po.client.transport.unregister(),po=void 0)},eG=()=>{if(!po)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return po},R5e=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:x5e,BaseProviderTransport:T0,BaseWalletTransport:R0,CHANNEL_ID:gA,DefaultChainIdTracker:af,DefaultProviderConfig:CS,ErrSignedInRequired:DH,EventType:Xe,ExtensionMessageHandler:w5e,ExtensionMessageProvider:GH,InitState:qt,LocalStorage:Dy,MemoryItemStore:zH,MuxMessageProvider:ex,OpenState:qs,PROVIDER_OPEN_TIMEOUT:pA,ProviderError:MH,ProxyMessageChannel:p5e,ProxyMessageChannelPort:xS,ProxyMessageHandler:g5e,ProxyMessageProvider:qH,SequenceClient:wA,SequenceClientSession:of,SequenceProvider:Lh,SequenceSigner:Nh,SingleNetworkSequenceProvider:JH,SingleNetworkSequenceSigner:bA,UnrealMessageHandler:b5e,UnrealMessageProvider:HH,WalletRequestHandler:A5e,WindowMessageHandler:C5e,WindowMessageProvider:KH,WindowSessionParams:P0,getWallet:eG,initWallet:XH,isBrowserExtension:$b,isMuxTransportTemplate:QH,isProviderTransport:OH,isUnityPlugin:BH,isValidMessageSignature:jH,isValidSignature:Jd,isValidTypedDataSignature:FH,isWalletUpToDate:UH,messageToBytes:LH,nextMessageIdx:NH,prefixEIP191Message:Zw,resolveArrayProperties:VH,trimEIP191Prefix:m5e,unregisterWallet:ZH,useBestStore:Ab},Symbol.toStringTag,{value:"Module"}));function Tn(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 s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var I5e=Tn({__proto__:null},[Cwe]),O5e=Tn({__proto__:null},[Pwe]),M5e=Tn({__proto__:null},[HEe]),D5e=Tn({__proto__:null},[XEe]),N5e=Tn({__proto__:null},[eEe]),L5e=Tn({__proto__:null},[cEe]),j5e=Tn({__proto__:null},[a5e]),F5e=Tn({__proto__:null},[kxe]),B5e=Tn({__proto__:null},[R5e]),U5e=Tn({__proto__:null},[DCe]);const z5e=ye.transaction;var V5e=Object.freeze({__proto__:null,transactions:z5e}),q5e=Tn({__proto__:null,isValidSignature:Jd,isValidMessageSignature:jH,isValidTypedDataSignature:FH,isWalletUpToDate:UH},[fxe]),W5e=Tn({__proto__:null},[vCe]),H5e=Tn({__proto__:null},[LCe]),G5e=Tn({__proto__:null},[VEe]),K5e=Tn({__proto__:null},[wCe]),Q5e=Tn({__proto__:null},[qCe]),tG=Object.freeze({__proto__:null,abi:I5e,api:O5e,auth:M5e,guard:D5e,indexer:N5e,metadata:L5e,multicall:j5e,network:F5e,provider:B5e,relayer:U5e,transactions:V5e,utils:q5e,core:W5e,signhub:H5e,sessions:G5e,migration:K5e,account:Q5e,initWallet:XH,getWallet:eG,unregisterWallet:ZH,SequenceProvider:Lh,SequenceClient:wA,SequenceSigner:Nh}),Vp,Y5e=class extends Cq{constructor({chains:t,options:e}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(i){if(i!=null&&i.isMetaMask&&!(i.isBraveWallet&&!i._events&&!i._state)&&!i.isApexWallet&&!i.isAvalanche&&!i.isBitKeep&&!i.isBlockWallet&&!i.isMathWallet&&!(i.isOkxWallet||i.isOKExWallet)&&!(i.isOneInchIOSWallet||i.isOneInchAndroidWallet)&&!i.isOpera&&!i.isPortal&&!i.isRabby&&!i.isDefiant&&!i.isTokenPocket&&!i.isTokenary&&!i.isZerion)return i}if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers.find(n):n(s)},...e};super({chains:t,options:r}),ar(this,"id","metaMask"),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ms(this,Vp,void 0),kw(this,Vp,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:t}={}){var e,r,n,s;try{const i=await this.getProvider();if(!i)throw new nl;i.on&&(i.on("accountsChanged",this.onAccountsChanged),i.on("chainChanged",this.onChainChanged),i.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if(er(this,Vp)&&((e=this.options)!=null&&e.shimDisconnect)&&!((r=this.storage)!=null&&r.getItem(this.shimDisconnectKey))&&(o=await this.getAccount().catch(()=>null),!!o))try{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(f){if(this.isUserRejectedRequestError(f))throw new En(f);if(f.code===new Vl(f).code)throw f}if(!o){const c=await i.request({method:"eth_requestAccounts"});o=Pl(c[0])}let a=await this.getChainId(),l=this.isChainUnsupported(a);return t&&a!==t&&(a=(await this.switchChain(t)).id,l=this.isChainUnsupported(a)),(n=this.options)!=null&&n.shimDisconnect&&((s=this.storage)==null||s.setItem(this.shimDisconnectKey,!0)),{account:o,chain:{id:a,unsupported:l},provider:i}}catch(i){throw this.isUserRejectedRequestError(i)?new En(i):i.code===-32002?new Vl(i):i}}};Vp=new WeakMap;var xA={},tx={},qe={},rG={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,l){var c=a>>>16&65535,f=a&65535,u=l>>>16&65535,d=l&65535;return f*d+(c*d+f*u<<16>>>0)|0}t.mul=Math.imul||e;function r(a,l){return a+l|0}t.add=r;function n(a,l){return a-l|0}t.sub=n;function s(a,l){return a<>>32-l}t.rotl=s;function i(a,l){return a<<32-l|a>>>l}t.rotr=i;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}})(rG);Object.defineProperty(qe,"__esModule",{value:!0});var nG=rG;function J5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}qe.readInt16BE=J5e;function X5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}qe.readUint16BE=X5e;function Z5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}qe.readInt16LE=Z5e;function e6e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}qe.readUint16LE=e6e;function sG(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}qe.writeUint16BE=sG;qe.writeInt16BE=sG;function iG(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}qe.writeUint16LE=iG;qe.writeInt16LE=iG;function ES(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}qe.readInt32BE=ES;function SS(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}qe.readUint32BE=SS;function kS(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}qe.readInt32LE=kS;function $S(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}qe.readUint32LE=$S;function _b(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}qe.writeUint32BE=_b;qe.writeInt32BE=_b;function Pb(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}qe.writeUint32LE=Pb;qe.writeInt32LE=Pb;function t6e(t,e){e===void 0&&(e=0);var r=ES(t,e),n=ES(t,e+4);return r*4294967296+n-(n>>31)*4294967296}qe.readInt64BE=t6e;function r6e(t,e){e===void 0&&(e=0);var r=SS(t,e),n=SS(t,e+4);return r*4294967296+n}qe.readUint64BE=r6e;function n6e(t,e){e===void 0&&(e=0);var r=kS(t,e),n=kS(t,e+4);return n*4294967296+r-(r>>31)*4294967296}qe.readInt64LE=n6e;function s6e(t,e){e===void 0&&(e=0);var r=$S(t,e),n=$S(t,e+4);return n*4294967296+r}qe.readUint64LE=s6e;function oG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),_b(t/4294967296>>>0,e,r),_b(t>>>0,e,r+4),e}qe.writeUint64BE=oG;qe.writeInt64BE=oG;function aG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Pb(t>>>0,e,r),Pb(t/4294967296>>>0,e,r+4),e}qe.writeUint64LE=aG;qe.writeInt64LE=aG;function i6e(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,s=1,i=t/8+r-1;i>=r;i--)n+=e[i]*s,s*=256;return n}qe.readUintBE=i6e;function o6e(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,s=1,i=r;i=n;i--)r[i]=e/s&255,s*=256;return r}qe.writeUintBE=a6e;function l6e(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(!nG.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,i=n;i>>32-16|S<<16,U=U+S|0,C^=U,C=C>>>32-12|C<<12,E=E+T|0,R^=E,R=R>>>32-16|R<<16,V=V+R|0,T^=V,T=T>>>32-12|T<<12,k=k+j|0,M^=k,M=M>>>32-16|M<<16,N=N+M|0,j^=N,j=j>>>32-12|j<<12,$=$+F|0,_^=$,_=_>>>32-16|_<<16,x=x+_|0,F^=x,F=F>>>32-12|F<<12,k=k+j|0,M^=k,M=M>>>32-8|M<<8,N=N+M|0,j^=N,j=j>>>32-7|j<<7,$=$+F|0,_^=$,_=_>>>32-8|_<<8,x=x+_|0,F^=x,F=F>>>32-7|F<<7,E=E+T|0,R^=E,R=R>>>32-8|R<<8,V=V+R|0,T^=V,T=T>>>32-7|T<<7,w=w+C|0,S^=w,S=S>>>32-8|S<<8,U=U+S|0,C^=U,C=C>>>32-7|C<<7,w=w+T|0,_^=w,_=_>>>32-16|_<<16,N=N+_|0,T^=N,T=T>>>32-12|T<<12,E=E+j|0,S^=E,S=S>>>32-16|S<<16,x=x+S|0,j^=x,j=j>>>32-12|j<<12,k=k+F|0,R^=k,R=R>>>32-16|R<<16,U=U+R|0,F^=U,F=F>>>32-12|F<<12,$=$+C|0,M^=$,M=M>>>32-16|M<<16,V=V+M|0,C^=V,C=C>>>32-12|C<<12,k=k+F|0,R^=k,R=R>>>32-8|R<<8,U=U+R|0,F^=U,F=F>>>32-7|F<<7,$=$+C|0,M^=$,M=M>>>32-8|M<<8,V=V+M|0,C^=V,C=C>>>32-7|C<<7,E=E+j|0,S^=E,S=S>>>32-8|S<<8,x=x+S|0,j^=x,j=j>>>32-7|j<<7,w=w+T|0,_^=w,_=_>>>32-8|_<<8,N=N+_|0,T^=N,T=T>>>32-7|T<<7;mn.writeUint32LE(w+n|0,t,0),mn.writeUint32LE(E+s|0,t,4),mn.writeUint32LE(k+i|0,t,8),mn.writeUint32LE($+o|0,t,12),mn.writeUint32LE(C+a|0,t,16),mn.writeUint32LE(T+l|0,t,20),mn.writeUint32LE(j+c|0,t,24),mn.writeUint32LE(F+f|0,t,28),mn.writeUint32LE(U+u|0,t,32),mn.writeUint32LE(V+d|0,t,36),mn.writeUint32LE(N+h|0,t,40),mn.writeUint32LE(x+v|0,t,44),mn.writeUint32LE(S+y|0,t,48),mn.writeUint32LE(R+b|0,t,52),mn.writeUint32LE(M+p|0,t,56),mn.writeUint32LE(_+g|0,t,60)}function lG(t,e,r,n,s){if(s===void 0&&(s=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 cG={},dc={};Object.defineProperty(dc,"__esModule",{value:!0});function C6e(t,e,r){return~(t-1)&e|t-1&r}dc.select=C6e;function E6e(t,e){return(t|0)-(e|0)-1>>>31&1}dc.lessOrEqual=E6e;function fG(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}dc.compare=fG;function S6e(t,e){return t.length===0||e.length===0?!1:fG(t,e)!==0}dc.equal=S6e;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=dc,r=Hi;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 l=a[0]|a[1]<<8;this._r[0]=l&8191;var c=a[2]|a[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var f=a[4]|a[5]<<8;this._r[2]=(c>>>10|f<<6)&7939;var u=a[6]|a[7]<<8;this._r[3]=(f>>>7|u<<9)&8191;var d=a[8]|a[9]<<8;this._r[4]=(u>>>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 v=a[12]|a[13]<<8;this._r[7]=(h>>>11|v<<5)&8065;var y=a[14]|a[15]<<8;this._r[8]=(v>>>8|y<<8)&8191,this._r[9]=y>>>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,l,c){for(var f=this._fin?0:2048,u=this._h[0],d=this._h[1],h=this._h[2],v=this._h[3],y=this._h[4],b=this._h[5],p=this._h[6],g=this._h[7],w=this._h[8],E=this._h[9],k=this._r[0],$=this._r[1],C=this._r[2],T=this._r[3],j=this._r[4],F=this._r[5],U=this._r[6],V=this._r[7],N=this._r[8],x=this._r[9];c>=16;){var S=a[l+0]|a[l+1]<<8;u+=S&8191;var R=a[l+2]|a[l+3]<<8;d+=(S>>>13|R<<3)&8191;var M=a[l+4]|a[l+5]<<8;h+=(R>>>10|M<<6)&8191;var _=a[l+6]|a[l+7]<<8;v+=(M>>>7|_<<9)&8191;var I=a[l+8]|a[l+9]<<8;y+=(_>>>4|I<<12)&8191,b+=I>>>1&8191;var B=a[l+10]|a[l+11]<<8;p+=(I>>>14|B<<2)&8191;var D=a[l+12]|a[l+13]<<8;g+=(B>>>11|D<<5)&8191;var A=a[l+14]|a[l+15]<<8;w+=(D>>>8|A<<8)&8191,E+=A>>>5|f;var L=0,G=L;G+=u*k,G+=d*(5*x),G+=h*(5*N),G+=v*(5*V),G+=y*(5*U),L=G>>>13,G&=8191,G+=b*(5*F),G+=p*(5*j),G+=g*(5*T),G+=w*(5*C),G+=E*(5*$),L+=G>>>13,G&=8191;var O=L;O+=u*$,O+=d*k,O+=h*(5*x),O+=v*(5*N),O+=y*(5*V),L=O>>>13,O&=8191,O+=b*(5*U),O+=p*(5*F),O+=g*(5*j),O+=w*(5*T),O+=E*(5*C),L+=O>>>13,O&=8191;var q=L;q+=u*C,q+=d*$,q+=h*k,q+=v*(5*x),q+=y*(5*N),L=q>>>13,q&=8191,q+=b*(5*V),q+=p*(5*U),q+=g*(5*F),q+=w*(5*j),q+=E*(5*T),L+=q>>>13,q&=8191;var z=L;z+=u*T,z+=d*C,z+=h*$,z+=v*k,z+=y*(5*x),L=z>>>13,z&=8191,z+=b*(5*N),z+=p*(5*V),z+=g*(5*U),z+=w*(5*F),z+=E*(5*j),L+=z>>>13,z&=8191;var H=L;H+=u*j,H+=d*T,H+=h*C,H+=v*$,H+=y*k,L=H>>>13,H&=8191,H+=b*(5*x),H+=p*(5*N),H+=g*(5*V),H+=w*(5*U),H+=E*(5*F),L+=H>>>13,H&=8191;var X=L;X+=u*F,X+=d*j,X+=h*T,X+=v*C,X+=y*$,L=X>>>13,X&=8191,X+=b*k,X+=p*(5*x),X+=g*(5*N),X+=w*(5*V),X+=E*(5*U),L+=X>>>13,X&=8191;var Q=L;Q+=u*U,Q+=d*F,Q+=h*j,Q+=v*T,Q+=y*C,L=Q>>>13,Q&=8191,Q+=b*$,Q+=p*k,Q+=g*(5*x),Q+=w*(5*N),Q+=E*(5*V),L+=Q>>>13,Q&=8191;var K=L;K+=u*V,K+=d*U,K+=h*F,K+=v*j,K+=y*T,L=K>>>13,K&=8191,K+=b*C,K+=p*$,K+=g*k,K+=w*(5*x),K+=E*(5*N),L+=K>>>13,K&=8191;var J=L;J+=u*N,J+=d*V,J+=h*U,J+=v*F,J+=y*j,L=J>>>13,J&=8191,J+=b*T,J+=p*C,J+=g*$,J+=w*k,J+=E*(5*x),L+=J>>>13,J&=8191;var ae=L;ae+=u*x,ae+=d*N,ae+=h*V,ae+=v*U,ae+=y*F,L=ae>>>13,ae&=8191,ae+=b*j,ae+=p*T,ae+=g*C,ae+=w*$,ae+=E*k,L+=ae>>>13,ae&=8191,L=(L<<2)+L|0,L=L+G|0,G=L&8191,L=L>>>13,O+=L,u=G,d=O,h=q,v=z,y=H,b=X,p=Q,g=K,w=J,E=ae,l+=16,c-=16}this._h[0]=u,this._h[1]=d,this._h[2]=h,this._h[3]=v,this._h[4]=y,this._h[5]=b,this._h[6]=p,this._h[7]=g,this._h[8]=w,this._h[9]=E},o.prototype.finish=function(a,l){l===void 0&&(l=0);var c=new Uint16Array(10),f,u,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(f=this._h[1]>>>13,this._h[1]&=8191,h=2;h<10;h++)this._h[h]+=f,f=this._h[h]>>>13,this._h[h]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,c[0]=this._h[0]+5,f=c[0]>>>13,c[0]&=8191,h=1;h<10;h++)c[h]=this._h[h]+f,f=c[h]>>>13,c[h]&=8191;for(c[9]-=1<<13,u=(f^1)-1,h=0;h<10;h++)c[h]&=u;for(u=~u,h=0;h<10;h++)this._h[h]=this._h[h]&u|c[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[l+0]=this._h[0]>>>0,a[l+1]=this._h[0]>>>8,a[l+2]=this._h[1]>>>0,a[l+3]=this._h[1]>>>8,a[l+4]=this._h[2]>>>0,a[l+5]=this._h[2]>>>8,a[l+6]=this._h[3]>>>0,a[l+7]=this._h[3]>>>8,a[l+8]=this._h[4]>>>0,a[l+9]=this._h[4]>>>8,a[l+10]=this._h[5]>>>0,a[l+11]=this._h[5]>>>8,a[l+12]=this._h[6]>>>0,a[l+13]=this._h[6]>>>8,a[l+14]=this._h[7]>>>0,a[l+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var l=0,c=a.length,f;if(this._leftover){f=16-this._leftover,f>c&&(f=c);for(var u=0;u=16&&(f=c-c%16,this._blocks(a,l,f),l+=f,c-=f),c){for(var u=0;u16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var h=new Uint8Array(16);h.set(c,h.length-c.length);var v=new Uint8Array(32);e.stream(this._key,h,v,4);var y=f.length+this.tagLength,b;if(d){if(d.length!==y)throw new Error("ChaCha20Poly1305: incorrect destination length");b=d}else b=new Uint8Array(y);return e.streamXOR(this._key,h,f,b,4),this._authenticate(b.subarray(b.length-this.tagLength,b.length),v,b.subarray(0,b.length-this.tagLength),u),n.wipe(h),b},l.prototype.open=function(c,f,u,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length0&&h.update(o.subarray(d.length%16))),h.update(u),u.length%16>0&&h.update(o.subarray(u.length%16));var v=new Uint8Array(8);d&&s.writeUint64LE(d.length,v),h.update(v),s.writeUint64LE(u.length,v),h.update(v);for(var y=h.digest(),b=0;bthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var s=0;s1&&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=f.length,v=256-256%h;for(;c>0;){const y=s(Math.ceil(c*256/v),u);for(let b=0;b0;b++){const p=y[b];p0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[f++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(f=i(this._temp,this._state,l,f,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[f++],c--;return this},a.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,f=this._bufferLength,u=c/536870912|0,d=c<<3,h=c%64<56?64:128;this._buffer[f]=128;for(var v=f+1;v0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},a}();t.SHA256=n;var s=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 i(a,l,c,f,u){for(;u>=64;){for(var d=l[0],h=l[1],v=l[2],y=l[3],b=l[4],p=l[5],g=l[6],w=l[7],E=0;E<16;E++){var k=f+E*4;a[E]=e.readUint32BE(c,k)}for(var E=16;E<64;E++){var $=a[E-2],C=($>>>17|$<<32-17)^($>>>19|$<<32-19)^$>>>10;$=a[E-15];var T=($>>>7|$<<32-7)^($>>>18|$<<32-18)^$>>>3;a[E]=(C+a[E-7]|0)+(T+a[E-16]|0)}for(var E=0;E<64;E++){var C=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&p^~b&g)|0)+(w+(s[E]+a[E]|0)|0)|0,T=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&h^d&v^h&v)|0;w=g,g=p,p=b,b=y+C|0,y=v,v=h,h=d,d=C+T|0}l[0]+=d,l[1]+=h,l[2]+=v,l[3]+=y,l[4]+=b,l[5]+=p,l[6]+=g,l[7]+=w,f+=64,u-=64}return f}function o(a){var l=new n;l.update(a);var c=l.digest();return l.clean(),c}t.hash=o})(ox);var EA={};(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=rx,r=Hi;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(E){const k=new Float64Array(16);if(E)for(let $=0;$>16&1),$[F-1]&=65535;$[15]=C[15]-32767-($[14]>>16&1);const j=$[15]>>16&1;$[14]&=65535,a(C,$,1-j)}for(let T=0;T<16;T++)E[2*T]=C[T]&255,E[2*T+1]=C[T]>>8}function c(E,k){for(let $=0;$<16;$++)E[$]=k[2*$]+(k[2*$+1]<<8);E[15]&=32767}function f(E,k,$){for(let C=0;C<16;C++)E[C]=k[C]+$[C]}function u(E,k,$){for(let C=0;C<16;C++)E[C]=k[C]-$[C]}function d(E,k,$){let C,T,j=0,F=0,U=0,V=0,N=0,x=0,S=0,R=0,M=0,_=0,I=0,B=0,D=0,A=0,L=0,G=0,O=0,q=0,z=0,H=0,X=0,Q=0,K=0,J=0,ae=0,ie=0,ue=0,st=0,ke=0,Ae=0,at=0,me=$[0],Re=$[1],Qt=$[2],Ie=$[3],Oe=$[4],Yt=$[5],Me=$[6],De=$[7],Jt=$[8],Ne=$[9],Le=$[10],Xt=$[11],je=$[12],Fe=$[13],Zt=$[14],Be=$[15];C=k[0],j+=C*me,F+=C*Re,U+=C*Qt,V+=C*Ie,N+=C*Oe,x+=C*Yt,S+=C*Me,R+=C*De,M+=C*Jt,_+=C*Ne,I+=C*Le,B+=C*Xt,D+=C*je,A+=C*Fe,L+=C*Zt,G+=C*Be,C=k[1],F+=C*me,U+=C*Re,V+=C*Qt,N+=C*Ie,x+=C*Oe,S+=C*Yt,R+=C*Me,M+=C*De,_+=C*Jt,I+=C*Ne,B+=C*Le,D+=C*Xt,A+=C*je,L+=C*Fe,G+=C*Zt,O+=C*Be,C=k[2],U+=C*me,V+=C*Re,N+=C*Qt,x+=C*Ie,S+=C*Oe,R+=C*Yt,M+=C*Me,_+=C*De,I+=C*Jt,B+=C*Ne,D+=C*Le,A+=C*Xt,L+=C*je,G+=C*Fe,O+=C*Zt,q+=C*Be,C=k[3],V+=C*me,N+=C*Re,x+=C*Qt,S+=C*Ie,R+=C*Oe,M+=C*Yt,_+=C*Me,I+=C*De,B+=C*Jt,D+=C*Ne,A+=C*Le,L+=C*Xt,G+=C*je,O+=C*Fe,q+=C*Zt,z+=C*Be,C=k[4],N+=C*me,x+=C*Re,S+=C*Qt,R+=C*Ie,M+=C*Oe,_+=C*Yt,I+=C*Me,B+=C*De,D+=C*Jt,A+=C*Ne,L+=C*Le,G+=C*Xt,O+=C*je,q+=C*Fe,z+=C*Zt,H+=C*Be,C=k[5],x+=C*me,S+=C*Re,R+=C*Qt,M+=C*Ie,_+=C*Oe,I+=C*Yt,B+=C*Me,D+=C*De,A+=C*Jt,L+=C*Ne,G+=C*Le,O+=C*Xt,q+=C*je,z+=C*Fe,H+=C*Zt,X+=C*Be,C=k[6],S+=C*me,R+=C*Re,M+=C*Qt,_+=C*Ie,I+=C*Oe,B+=C*Yt,D+=C*Me,A+=C*De,L+=C*Jt,G+=C*Ne,O+=C*Le,q+=C*Xt,z+=C*je,H+=C*Fe,X+=C*Zt,Q+=C*Be,C=k[7],R+=C*me,M+=C*Re,_+=C*Qt,I+=C*Ie,B+=C*Oe,D+=C*Yt,A+=C*Me,L+=C*De,G+=C*Jt,O+=C*Ne,q+=C*Le,z+=C*Xt,H+=C*je,X+=C*Fe,Q+=C*Zt,K+=C*Be,C=k[8],M+=C*me,_+=C*Re,I+=C*Qt,B+=C*Ie,D+=C*Oe,A+=C*Yt,L+=C*Me,G+=C*De,O+=C*Jt,q+=C*Ne,z+=C*Le,H+=C*Xt,X+=C*je,Q+=C*Fe,K+=C*Zt,J+=C*Be,C=k[9],_+=C*me,I+=C*Re,B+=C*Qt,D+=C*Ie,A+=C*Oe,L+=C*Yt,G+=C*Me,O+=C*De,q+=C*Jt,z+=C*Ne,H+=C*Le,X+=C*Xt,Q+=C*je,K+=C*Fe,J+=C*Zt,ae+=C*Be,C=k[10],I+=C*me,B+=C*Re,D+=C*Qt,A+=C*Ie,L+=C*Oe,G+=C*Yt,O+=C*Me,q+=C*De,z+=C*Jt,H+=C*Ne,X+=C*Le,Q+=C*Xt,K+=C*je,J+=C*Fe,ae+=C*Zt,ie+=C*Be,C=k[11],B+=C*me,D+=C*Re,A+=C*Qt,L+=C*Ie,G+=C*Oe,O+=C*Yt,q+=C*Me,z+=C*De,H+=C*Jt,X+=C*Ne,Q+=C*Le,K+=C*Xt,J+=C*je,ae+=C*Fe,ie+=C*Zt,ue+=C*Be,C=k[12],D+=C*me,A+=C*Re,L+=C*Qt,G+=C*Ie,O+=C*Oe,q+=C*Yt,z+=C*Me,H+=C*De,X+=C*Jt,Q+=C*Ne,K+=C*Le,J+=C*Xt,ae+=C*je,ie+=C*Fe,ue+=C*Zt,st+=C*Be,C=k[13],A+=C*me,L+=C*Re,G+=C*Qt,O+=C*Ie,q+=C*Oe,z+=C*Yt,H+=C*Me,X+=C*De,Q+=C*Jt,K+=C*Ne,J+=C*Le,ae+=C*Xt,ie+=C*je,ue+=C*Fe,st+=C*Zt,ke+=C*Be,C=k[14],L+=C*me,G+=C*Re,O+=C*Qt,q+=C*Ie,z+=C*Oe,H+=C*Yt,X+=C*Me,Q+=C*De,K+=C*Jt,J+=C*Ne,ae+=C*Le,ie+=C*Xt,ue+=C*je,st+=C*Fe,ke+=C*Zt,Ae+=C*Be,C=k[15],G+=C*me,O+=C*Re,q+=C*Qt,z+=C*Ie,H+=C*Oe,X+=C*Yt,Q+=C*Me,K+=C*De,J+=C*Jt,ae+=C*Ne,ie+=C*Le,ue+=C*Xt,st+=C*je,ke+=C*Fe,Ae+=C*Zt,at+=C*Be,j+=38*O,F+=38*q,U+=38*z,V+=38*H,N+=38*X,x+=38*Q,S+=38*K,R+=38*J,M+=38*ae,_+=38*ie,I+=38*ue,B+=38*st,D+=38*ke,A+=38*Ae,L+=38*at,T=1,C=j+T+65535,T=Math.floor(C/65536),j=C-T*65536,C=F+T+65535,T=Math.floor(C/65536),F=C-T*65536,C=U+T+65535,T=Math.floor(C/65536),U=C-T*65536,C=V+T+65535,T=Math.floor(C/65536),V=C-T*65536,C=N+T+65535,T=Math.floor(C/65536),N=C-T*65536,C=x+T+65535,T=Math.floor(C/65536),x=C-T*65536,C=S+T+65535,T=Math.floor(C/65536),S=C-T*65536,C=R+T+65535,T=Math.floor(C/65536),R=C-T*65536,C=M+T+65535,T=Math.floor(C/65536),M=C-T*65536,C=_+T+65535,T=Math.floor(C/65536),_=C-T*65536,C=I+T+65535,T=Math.floor(C/65536),I=C-T*65536,C=B+T+65535,T=Math.floor(C/65536),B=C-T*65536,C=D+T+65535,T=Math.floor(C/65536),D=C-T*65536,C=A+T+65535,T=Math.floor(C/65536),A=C-T*65536,C=L+T+65535,T=Math.floor(C/65536),L=C-T*65536,C=G+T+65535,T=Math.floor(C/65536),G=C-T*65536,j+=T-1+37*(T-1),T=1,C=j+T+65535,T=Math.floor(C/65536),j=C-T*65536,C=F+T+65535,T=Math.floor(C/65536),F=C-T*65536,C=U+T+65535,T=Math.floor(C/65536),U=C-T*65536,C=V+T+65535,T=Math.floor(C/65536),V=C-T*65536,C=N+T+65535,T=Math.floor(C/65536),N=C-T*65536,C=x+T+65535,T=Math.floor(C/65536),x=C-T*65536,C=S+T+65535,T=Math.floor(C/65536),S=C-T*65536,C=R+T+65535,T=Math.floor(C/65536),R=C-T*65536,C=M+T+65535,T=Math.floor(C/65536),M=C-T*65536,C=_+T+65535,T=Math.floor(C/65536),_=C-T*65536,C=I+T+65535,T=Math.floor(C/65536),I=C-T*65536,C=B+T+65535,T=Math.floor(C/65536),B=C-T*65536,C=D+T+65535,T=Math.floor(C/65536),D=C-T*65536,C=A+T+65535,T=Math.floor(C/65536),A=C-T*65536,C=L+T+65535,T=Math.floor(C/65536),L=C-T*65536,C=G+T+65535,T=Math.floor(C/65536),G=C-T*65536,j+=T-1+37*(T-1),E[0]=j,E[1]=F,E[2]=U,E[3]=V,E[4]=N,E[5]=x,E[6]=S,E[7]=R,E[8]=M,E[9]=_,E[10]=I,E[11]=B,E[12]=D,E[13]=A,E[14]=L,E[15]=G}function h(E,k){d(E,k,k)}function v(E,k){const $=n();for(let C=0;C<16;C++)$[C]=k[C];for(let C=253;C>=0;C--)h($,$),C!==2&&C!==4&&d($,$,k);for(let C=0;C<16;C++)E[C]=$[C]}function y(E,k){const $=new Uint8Array(32),C=new Float64Array(80),T=n(),j=n(),F=n(),U=n(),V=n(),N=n();for(let M=0;M<31;M++)$[M]=E[M];$[31]=E[31]&127|64,$[0]&=248,c(C,k);for(let M=0;M<16;M++)j[M]=C[M];T[0]=U[0]=1;for(let M=254;M>=0;--M){const _=$[M>>>3]>>>(M&7)&1;a(T,j,_),a(F,U,_),f(V,T,F),u(T,T,F),f(F,j,U),u(j,j,U),h(U,V),h(N,T),d(T,F,T),d(F,j,V),f(V,T,F),u(T,T,F),h(j,T),u(F,U,N),d(T,F,i),f(T,T,U),d(F,F,T),d(T,U,N),d(U,j,C),h(j,V),a(T,j,_),a(F,U,_)}for(let M=0;M<16;M++)C[M+16]=T[M],C[M+32]=F[M],C[M+48]=j[M],C[M+64]=U[M];const x=C.subarray(32),S=C.subarray(16);v(x,x),d(S,S,x);const R=new Uint8Array(32);return l(R,S),R}t.scalarMult=y;function b(E){return y(E,s)}t.scalarMultBase=b;function p(E){if(E.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const k=new Uint8Array(E);return{publicKey:b(k),secretKey:k}}t.generateKeyPairFromSeed=p;function g(E){const k=(0,e.randomBytes)(32,E),$=p(k);return(0,r.wipe)(k),$}t.generateKeyPair=g;function w(E,k,$=!1){if(E.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(k.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const C=y(E,k);if($){let T=0;for(let j=0;js+i.length,0));const r=hG(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return SA(r)}function j6e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,E=new Uint8Array(w);p!==g;){for(var k=v[p],$=0,C=w-1;(k!==0||$>>0,E[C]=k%a>>>0,k=k/a>>>0;if(k!==0)throw new Error("Non-zero carry");b=$,p++}for(var T=w-b;T!==w&&E[T]===0;)T++;for(var j=l.repeat(y);T>>0,w=new Uint8Array(g);v[y];){var E=r[v.charCodeAt(y)];if(E===255)return;for(var k=0,$=g-1;(E!==0||k>>0,w[$]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");p=k,y++}if(v[y]!==" "){for(var C=g-p;C!==g&&w[C]===0;)C++;for(var T=new Uint8Array(b+(g-C)),j=b;C!==g;)T[j++]=w[C++];return T}}}function h(v){var y=d(v);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:u,decodeUnsafe:d,decode:h}}var F6e=j6e,B6e=F6e;const U6e=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")},z6e=t=>new TextEncoder().encode(t),V6e=t=>new TextDecoder().decode(t);class q6e{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 W6e{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 vG(this,e)}}class H6e{constructor(e){this.decoders=e}or(e){return vG(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 vG=(t,e)=>new H6e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class G6e{constructor(e,r,n,s){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=s,this.encoder=new q6e(e,r,n),this.decoder=new W6e(e,r,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const ax=({name:t,prefix:e,encode:r,decode:n})=>new G6e(t,e,r,n),O0=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:s}=B6e(r,e);return ax({prefix:t,name:e,encode:n,decode:i=>U6e(s(i))})},K6e=(t,e,r,n)=>{const s={};for(let f=0;f=8&&(a-=8,o[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},Q6e=(t,e,r)=>{const n=e[e.length-1]==="=",s=(1<r;)o-=r,i+=e[s&a>>o];if(o&&(i+=e[s&a<ax({prefix:e,name:t,encode(s){return Q6e(s,n,r)},decode(s){return K6e(s,n,r,t)}}),Y6e=ax({prefix:"\0",name:"identity",encode:t=>V6e(t),decode:t=>z6e(t)}),J6e=Object.freeze(Object.defineProperty({__proto__:null,identity:Y6e},Symbol.toStringTag,{value:"Module"})),X6e=hn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Z6e=Object.freeze(Object.defineProperty({__proto__:null,base2:X6e},Symbol.toStringTag,{value:"Module"})),e3e=hn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),t3e=Object.freeze(Object.defineProperty({__proto__:null,base8:e3e},Symbol.toStringTag,{value:"Module"})),r3e=O0({prefix:"9",name:"base10",alphabet:"0123456789"}),n3e=Object.freeze(Object.defineProperty({__proto__:null,base10:r3e},Symbol.toStringTag,{value:"Module"})),s3e=hn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),i3e=hn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),o3e=Object.freeze(Object.defineProperty({__proto__:null,base16:s3e,base16upper:i3e},Symbol.toStringTag,{value:"Module"})),a3e=hn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),l3e=hn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),c3e=hn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),f3e=hn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u3e=hn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),d3e=hn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),h3e=hn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),v3e=hn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),y3e=hn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),m3e=Object.freeze(Object.defineProperty({__proto__:null,base32:a3e,base32hex:u3e,base32hexpad:h3e,base32hexpadupper:v3e,base32hexupper:d3e,base32pad:c3e,base32padupper:f3e,base32upper:l3e,base32z:y3e},Symbol.toStringTag,{value:"Module"})),p3e=O0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),g3e=O0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),b3e=Object.freeze(Object.defineProperty({__proto__:null,base36:p3e,base36upper:g3e},Symbol.toStringTag,{value:"Module"})),w3e=O0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),x3e=O0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),C3e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:w3e,base58flickr:x3e},Symbol.toStringTag,{value:"Module"})),E3e=hn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),S3e=hn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),k3e=hn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),$3e=hn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),A3e=Object.freeze(Object.defineProperty({__proto__:null,base64:E3e,base64pad:S3e,base64url:k3e,base64urlpad:$3e},Symbol.toStringTag,{value:"Module"})),yG=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),_3e=yG.reduce((t,e,r)=>(t[r]=e,t),[]),P3e=yG.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function T3e(t){return t.reduce((e,r)=>(e+=_3e[r],e),"")}function R3e(t){const e=[];for(const r of t){const n=P3e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const I3e=ax({prefix:"🚀",name:"base256emoji",encode:T3e,decode:R3e}),O3e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:I3e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const vI={...J6e,...Z6e,...t3e,...n3e,...o3e,...m3e,...b3e,...C3e,...A3e,...O3e};function mG(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const yI=mG("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),FE=mG("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=hG(t.length);for(let r=0;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new j3e:typeof navigator<"u"?bI(navigator.userAgent):W3e()}function V3e(t){return t!==""&&U3e.reduce(function(e,r){var n=r[0],s=r[1];if(e)return e;var i=s.exec(t);return!!i&&[n,i]},!1)}function bI(t){var e=V3e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new L3e;var s=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);s?s.length0;)_=j[q],G.call(O,_,F[_]);this._listeners={},this._listenersCount=0,z()}}});function p(_,I,F,D){var A=Object.assign({},I);if(!_)return A;if(typeof _!="object")throw TypeError("options must be an object");var j=Object.keys(_),G=j.length,O,q,z;function H(X){throw Error('Invalid "'+O+'" option value'+(X?". Reason: "+X:""))}for(var J=0;J0;)if(O===_[q])return j;G(I)}}var k=E(["function"]),$=E(["object","function"]);function x(_,I,F){var D,A,j=0,G,O=new _(function(q,z,H){F=p(F,{timeout:0,overload:!1},{timeout:function(Q,ae){return Q*=1,(typeof Q!="number"||Q<0||!Number.isFinite(Q))&&ae("timeout must be a positive number"),Q}}),D=!F.overload&&typeof _.prototype.cancel=="function"&&typeof H=="function";function J(){A&&(A=null),j&&(clearTimeout(j),j=0)}var X=function(Q){J(),q(Q)},K=function(Q){J(),z(Q)};D?I(X,K,H):(A=[function(Q){K(Q||Error("canceled"))}],I(X,K,function(Q){if(G)throw Error("Unable to subscribe on cancel event asynchronously");if(typeof Q!="function")throw TypeError("onCancel callback must be a function");A.push(Q)}),G=!0),F.timeout>0&&(j=setTimeout(function(){var Q=Error("timeout");Q.code="ETIMEDOUT",j=0,O.cancel(Q),z(Q)},F.timeout))});return D||(O.cancel=function(q){if(A){for(var z=A.length,H=1;H0;)K=Ae[O],K!=="_listeners"&&(at=B(_,I,F[K],D+1,A),at&&(X?X.push.apply(X,at):X=at));return X}else if(st==="**"){for(ue=D+1===A||D+2===A&&ke==="*",ue&&F._listeners&&(X=B(_,I,F,A,A)),Ae=u(F),O=Ae.length;O-- >0;)K=Ae[O],K!=="_listeners"&&(K==="*"||K==="**"?(F[K]._listeners&&!ue&&(at=B(_,I,F[K],A,A),at&&(X?X.push.apply(X,at):X=at)),at=B(_,I,F[K],D,A)):K===ke?at=B(_,I,F[K],D+2,A):at=B(_,I,F[K],D,A),at&&(X?X.push.apply(X,at):X=at));return X}else F[st]&&(X=B(_,I,F[st],D+1,A));if(Q=F["*"],Q&&B(_,I,Q,D+1,A),ae=F["**"],ae)if(D0;)K=Ae[O],K!=="_listeners"&&(K===ke?B(_,I,ae[K],D+2,A):K===st?B(_,I,ae[K],D+1,A):(ie={},ie[K]=ae[K],B(_,I,{"**":ie},D+1,A)));else ae._listeners?B(_,I,ae,A,A):ae["*"]&&ae["*"]._listeners&&B(_,I,ae["*"],A,A);return X}function L(_,I,F){var D=0,A=0,j,G=this.delimiter,O=G.length,q;if(typeof _=="string")if((j=_.indexOf(G))!==-1){q=new Array(5);do q[D++]=_.slice(A,j),A=j+O;while((j=_.indexOf(G,A))!==-1);q[D++]=_.slice(A)}else q=[_],D=1;else q=_,D=_.length;if(D>1){for(j=0;j+10&&z._listeners.length>this._maxListeners&&(z._listeners.warned=!0,v.call(this,z._listeners.length,H))):z._listeners=I,!0;return!0}function U(_,I,F,D){for(var A=u(_),j=A.length,G,O,q,z=_._listeners,H;j-- >0;)O=A[j],G=_[O],O==="_listeners"?q=F:q=F?F.concat(O):[O],H=D||typeof O=="symbol",z&&I.push(H?q:q.join(this.delimiter)),typeof G=="object"&&U.call(this,G,I,q,H);return I}function V(_){for(var I=u(_),F=I.length,D,A,j;F-- >0;)A=I[F],D=_[A],D&&(j=!0,A!=="_listeners"&&!V(D)&&delete _[A]);return j}function N(_,I,F){this.emitter=_,this.event=I,this.listener=F}N.prototype.off=function(){return this.emitter.off(this.event,this.listener),this};function C(_,I,F){if(F===!0)A=!0;else if(F===!1)D=!0;else{if(!F||typeof F!="object")throw TypeError("options should be an object or true");var D=F.async,A=F.promisify,j=F.nextTick,G=F.objectify}if(D||j||A){var O=I,q=I._origin||I;if(j&&!o)throw Error("process.nextTick is not supported");A===r&&(A=I.constructor.name==="AsyncFunction"),I=function(){var z=arguments,H=this,J=this.event;return A?j?Promise.resolve():new Promise(function(X){f(X)}).then(function(){return H.event=J,O.apply(H,z)}):(j?process.nextTick:f)(function(){H.event=J,O.apply(H,z)})},I._async=!0,I._origin=q}return[I,G?new N(this,_,I):this]}function S(_){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,h.call(this,_)}S.EventEmitter2=S,S.prototype.listenTo=function(_,I,F){if(typeof _!="object")throw TypeError("target musts be an object");var D=this;F=p(F,{on:r,off:r,reducers:r},{on:k,off:k,reducers:$});function A(j){if(typeof j!="object")throw TypeError("events must be an object");var G=F.reducers,O=T.call(D,_),q;O===-1?q=new b(D,_,F):q=D._observers[O];for(var z=u(j),H=z.length,J,X=typeof G=="function",K=0;K0;)A=F[D],(!_||A._target===_)&&(A.unsubscribe(I),j=!0);return j},S.prototype.delimiter=".",S.prototype.setMaxListeners=function(_){_!==r&&(this._maxListeners=_,this._conf||(this._conf={}),this._conf.maxListeners=_)},S.prototype.getMaxListeners=function(){return this._maxListeners},S.prototype.event="",S.prototype.once=function(_,I,F){return this._once(_,I,!1,F)},S.prototype.prependOnceListener=function(_,I,F){return this._once(_,I,!0,F)},S.prototype._once=function(_,I,F,D){return this._many(_,1,I,F,D)},S.prototype.many=function(_,I,F,D){return this._many(_,I,F,!1,D)},S.prototype.prependMany=function(_,I,F,D){return this._many(_,I,F,!0,D)},S.prototype._many=function(_,I,F,D,A){var j=this;if(typeof F!="function")throw new Error("many only accepts instances of Function");function G(){return--I===0&&j.off(_,G),F.apply(this,arguments)}return G._origin=F,this._on(_,G,D,A)},S.prototype.emit=function(){if(!this._events&&!this._all)return!1;this._events||d.call(this);var _=arguments[0],I,F=this.wildcard,D,A,j,G,O;if(_==="newListener"&&!this._newListener&&!this._events.newListener)return!1;if(F&&(I=_,_!=="newListener"&&_!=="removeListener"&&typeof _=="object")){if(A=_.length,a){for(j=0;j3)for(D=new Array(q-1),G=1;G3)for(A=new Array(z-1),O=1;O0&&this._events[_].length>this._maxListeners&&(this._events[_].warned=!0,v.call(this,this._events[_].length,_))):this._events[_]=I,A)},S.prototype.off=function(_,I){if(typeof I!="function")throw new Error("removeListener only takes instances of Function");var F,D=[];if(this.wildcard){var A=typeof _=="string"?_.split(this.delimiter):_.slice();if(D=B.call(this,null,A,this.listenerTree,0),!D)return this}else{if(!this._events[_])return this;F=this._events[_],D.push({_listeners:F})}for(var j=0;j0){for(D=this._all,I=0,F=D.length;I0;)D=I[F[j]],typeof D=="function"?A.push(D):A.push.apply(A,D);return A}else{if(this.wildcard){if(G=this.listenerTree,!G)return[];var O=[],q=typeof _=="string"?_.split(this.delimiter):_.slice();return B.call(this,O,q,G,0),O}return I?(D=I[_],D?typeof D=="function"?[D]:D:[]):[]}},S.prototype.eventNames=function(_){var I=this._events;return this.wildcard?U.call(this,this.listenerTree,[],null,_):I?u(I):[]},S.prototype.listenerCount=function(_){return this.listeners(_).length},S.prototype.hasListeners=function(_){if(this.wildcard){var I=[],F=typeof _=="string"?_.split(this.delimiter):_.slice();return B.call(this,I,F,this.listenerTree,0),I.length>0}var D=this._events,A=this._all;return!!(A&&A.length||D&&(_===r?u(D).length:D[_]))},S.prototype.listenersAny=function(){return this._all?this._all:[]},S.prototype.waitFor=function(_,I){var F=this,D=typeof I;return D==="number"?I={timeout:I}:D==="function"&&(I={filter:I}),I=p(I,{timeout:0,filter:r,handleError:!1,Promise,overload:!1},{filter:k,Promise:w}),x(I.Promise,function(A,j,G){function O(){var q=I.filter;if(!(q&&!q.apply(F,arguments)))if(F.off(_,O),I.handleError){var z=arguments[0];z?j(z):A(y.apply(null,arguments).slice(1))}else A(y.apply(null,arguments))}G(function(){F.off(_,O)}),F._on(_,O,!1)},{timeout:I.timeout,overload:I.overload})};function R(_,I,F){F=p(F,{Promise,timeout:0,overload:!1},{Promise:w});var D=F.Promise;return x(D,function(A,j,G){var O;if(typeof _.addEventListener=="function"){O=function(){A(y.apply(null,arguments))},G(function(){_.removeEventListener(I,O)}),_.addEventListener(I,O,{once:!0});return}var q=function(){z&&_.removeListener("error",z),A(y.apply(null,arguments))},z;I!=="error"&&(z=function(H){_.removeListener(I,q),j(H)},_.once("error",z)),G(function(){z&&_.removeListener("error",z),_.removeListener(I,q)}),_.once(I,q)},{timeout:F.timeout,overload:F.overload})}var M=S.prototype;Object.defineProperties(S,{defaultMaxListeners:{get:function(){return M._maxListeners},set:function(_){if(typeof _!="number"||_<0||Number.isNaN(_))throw TypeError("n must be a non-negative number");M._maxListeners=_},enumerable:!0},once:{value:R,writable:!0,configurable:!0}}),Object.defineProperties(M,{_maxListeners:{value:i,writable:!0,configurable:!0},_observers:{value:null,writable:!0,configurable:!0}}),typeof r=="function"&&r.amd?r(function(){return S}):t.exports=S})()})(l5e);function ss(){return ss=Object.assign?Object.assign.bind():function(t){for(var e=1;e++c5e;class R0{constructor(){var e=this;this.pendingMessageRequests=[],this.responseCallbacks=new Map,this.confirmationOnly=!1,this.events=new Jd.EventEmitter2,this.sendAsync=async function(r,n,s){e.state===Ws.CLOSED&&(e.confirmationOnly=!0),e.openWallet(void 0,{type:"jsonRpcRequest",method:r.method},s);try{e.isOpened()||await e.waitUntilOpened();const i=await e.sendMessageRequest({idx:NH(),type:Xe.MESSAGE,data:r,chainId:s});n(void 0,i.data)}catch(i){n(i)}},this.sendMessageRequest=async function(r){return new Promise((n,s)=>{(!r.idx||r.idx<=0)&&r.type!=="init"&&s(new Error("message idx not set"));const i=(a,l)=>{if(a)s(a);else if(l)n(l);else throw new Error("no valid response to return")},o=r.idx;e.responseCallbacks.get(o)?s(new Error("duplicate message idx, should never happen")):e.responseCallbacks.set(o,i),e.isOpened()?e.sendMessage(r):(xe.debug("pushing to pending requests",r),e.pendingMessageRequests.push(r))})},this.waitUntilOpened=async function(r=gA){let n=!1;return Promise.race([new Promise((s,i)=>{const o=setTimeout(()=>{clearTimeout(o),n||(e.state=Ws.CLOSED,e.events.emit("close",{code:1005,message:"opening wallet timed out"})),i(new Error("opening wallet timed out"))},r)}),new Promise(s=>{if(e.isOpened()){var i;n=!0,s((i=e.openPayload)==null?void 0:i.session);return}e.events.once("open",o=>{e.openPayload=o,n=!0,s(o.session)})})])},this.waitUntilConnected=async function(){await e.waitUntilOpened();const r=new Promise(s=>{if(e.connectPayload){s(e.connectPayload);return}e.events.once("connect",i=>{e.connectPayload=i,s(i)})}),n=new Promise((s,i)=>{e.events.once("close",o=>{i(o?new Error(`wallet closed due to ${JSON.stringify(o)}`):new Error("user closed the wallet"))})});return Promise.race([r,n])},this.state=Ws.CLOSED,this._registered=!1,this._init=qt.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===Ws.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===Xe.INIT){xe.debug("MessageProvider, received INIT message",e);const{nonce:l}=e.data;if(!l||l.length==0){xe.error("invalid init nonce");return}this._init=qt.OK,this.sendMessage({idx:-1,type:Xe.INIT,data:{sessionId:this._sessionId,nonce:l}})}if(this._init!==qt.OK)return;xe.debug("RECEIVED MESSAGE FROM WALLET",e.idx,e);const n=e.idx,s=this.responseCallbacks.get(n);if(n&&this.responseCallbacks.delete(n),e.type===Xe.OPEN&&!this.isOpened()){var i,o;if(this._sessionId&&this._sessionId!==((i=e.data)==null?void 0:i.sessionId)){xe.debug("open event received from wallet, but does not match sessionId",this._sessionId);return}if((o=e.data)!=null&&o.error){var a;const l=new Error(`opening wallet failed: received ${(a=e.data)==null?void 0:a.error}`);throw xe.error(l),this.close(),l}this.state=Ws.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(c){r.sendMessage(c)});return}if(e.type===Xe.MESSAGE){if(this.confirmationOnly&&setTimeout(()=>{this.responseCallbacks.size===0&&this.closeWallet()},500),!s)throw new Error("impossible state");if(s){this.events.emit("message",e),s(e.data.error,e);return}}if(e.type===Xe.ACCOUNTS_CHANGED){this.accountsChangedPayload={accounts:[]},e.data&&e.data.length>0?(this.accountsChangedPayload={accounts:[Ye(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===Xe.CHAIN_CHANGED){this.events.emit("chainChanged",e.data);return}if(e.type===Xe.NETWORKS){this.networksPayload=e.data,this.events.emit("networks",this.networksPayload);return}if(e.type===Xe.WALLET_CONTEXT){this.walletContextPayload=e.data,this.events.emit("walletContext",this.walletContextPayload);return}e.type===Xe.CLOSE&&this.state!==Ws.CLOSED&&this.close(e.data),e.type===Xe.CONNECT&&(this.connectPayload=e.data,this.events.emit("connect",this.connectPayload)),e.type===Xe.DISCONNECT&&this.isConnected()&&(this.events.emit("disconnect",e.data),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!==Ws.CLOSED&&(this.state=Ws.CLOSED,this.confirmationOnly=!1,this._sessionId=void 0,xe.info("closing wallet and flushing!"),this.pendingMessageRequests.length=0,this.responseCallbacks.forEach(r=>{r(ss({},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 f5e(t){return u5e.some(e=>e.predicate(t))}const u5e=[{name:"Decentraland Exception",predicate:h5e},{name:"0x v3 Exception",predicate:v5e}],d5e=/^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 h5e(t){try{const e=Ia(t);return d5e.test(e)}catch{return!1}}function v5e(t){const e=new en(y5e);try{return e.decodeFunctionData("OrderWithHash",t),!0}catch{return!1}}const y5e=[{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"}],Vp=xt(`Ethereum Signed Message: +`),LH=t=>Ta(t)||ze(t)?ne(t):xt(t),ex=t=>{const e=LH(t);return f5e(e)?e:Ht([Vp,xt(String(e.length)),e])},m5e=t=>{if(JSON.stringify(t.slice(0,Vp.length))!==JSON.stringify(Vp))return t;const e=t.slice(Vp.length),r=String(e.length).length;let n,s;try{s=Number(Ia(e.slice(0,r)))}catch{s=Number(te(e.slice(0,r)))}return s>e.length||!Number.isInteger(s)?n=r-1:n=r,e.slice(n)},Xd=async(t,e,r,n)=>new ye.reader.OnChainReader(n).isValidSignature(t,e,r),jH=async(t,e,r,n)=>{const s=ex(e),i=W4(s);return Xd(t,i,r,n)},FH=(t,e,r,n)=>Xd(t,zw(e),r,n),Ab=()=>window.location.protocol==="chrome-extension:"||window.location.protocol==="moz-extension:",BH=()=>!!navigator.userAgent.match(/UnitySequence/i),UH=t=>t.onChain.deployed&&t.fullyMigrated;class zH{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 Ny{static isAvailable(){return typeof window=="object"&&typeof window.localStorage=="object"}constructor(){if(this.callbacks=[],!Ny.isAvailable())throw new Error("LocalStorage is not available");window.addEventListener("storage",e=>{const{key:r}=e;this.callbacks.filter(s=>s.key===r).forEach(s=>s.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 _b(){return Ny.isAvailable()?new Ny:new zH}async function VH(t){return Array.isArray(t)?Promise.all(t.map(e=>mt(e))):mt(t)}const lI="@sequence.transportSession";class I0{constructor(e){var r=this;this.sendAsync=async function(n,s,i){throw new Error("abstract method")},this.handleMessage=async function(n){const s=n;if(r._init!==qt.OK){if(s.type===Xe.INIT)if(r.isValidInitAck(n))r._initCallback&&r._initCallback();else{r._initCallback&&r._initCallback("invalid init");return}return}switch(s.type){case Xe.OPEN:{if(r._init!==qt.OK)return;const i={sessionId:s.data.sessionId,intent:s.data.intent,networkId:s.data.networkId};await r.open(i);return}case Xe.CLOSE:return r._init!==qt.OK,void 0;case Xe.MESSAGE:{const i=await r.walletRequestHandler.sendMessageRequest(s);r.sendMessage(i),i.data.error;return}default:xe.error(`unexpected payload type ${s.type}`)}},this.sendMessageRequest=async function(n){return r.walletRequestHandler.sendMessageRequest(n)},this.open=async function({sessionId:n,intent:s,networkId:i}){n&&(r._sessionId=rW(n),r.saveTransportSession({sessionId:n,intent:s,networkId:i})),r.walletRequestHandler.setOpenIntent(s),await r.init();let o;try{if(i){const a=K4(i);if(a)o=a.chainId;else throw new Error(`unknown network ${i}`)}else o=r.walletRequestHandler.defaultChainId()}catch(a){console.error(a)}if(s&&s.type==="connect"&&s.options){const a=s.options,l=a;if(r.appOrigin&&l!=null&&l.origin){if(!Ab()&&l.origin!==r.appOrigin)throw new Error("origin is invalid")}else!r.appOrigin&&l!=null&&l.origin?a.origin=sW(l.origin):r.appOrigin&&(a.origin=r.appOrigin);a.app&&(a.app=nW(a.app)),a.networkId?i=a.networkId:i&&(a.networkId=i),r.walletRequestHandler.setConnectOptions(a)}else r.walletRequestHandler.setConnectOptions(void 0);if(await r.walletRequestHandler.getAccount(),await r.walletRequestHandler.isSignedIn())if(s&&s.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(s.options);a.connected&&r.walletRequestHandler.notifyConnect(a)}catch(a){xe.warn("promptConnect not connected:",a)}finally{(!s.options||s.options.keepWalletOpened!==!0)&&r.notifyClose()}}else{if(!o||o<=0)return r.notifyOpen({sessionId:r._sessionId,error:`failed to open wallet on network ${i}`}),!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=>{_b().setItem(lI,JSON.stringify(n))},this.getCachedTransportSession=async function(){const n=_b().getItem(lI);try{return n?JSON.parse(n):null}catch{return console.error(`unable to parse transport session: ${n}`),null}},this.walletRequestHandler=e,this._init=qt.NIL,this.walletRequestHandler.on("connect",n=>{this.registered&&this.notifyConnect(n)}),this.walletRequestHandler.on("disconnect",n=>{this.registered&&this.notifyDisconnect(n)}),this.walletRequestHandler.on("accountsChanged",(n,s)=>{this.registered&&this.notifyAccountsChanged(n,s)}),this.walletRequestHandler.on("networks",n=>{this.registered&&(this.notifyNetworks(n),!n||n.length===0?this.notifyChainChanged("0x0"):this.notifyChainChanged(te(n.find(s=>s.isDefaultChain).chainId)))}),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:s,error:i}=e;this.sendMessage({idx:-1,type:Xe.OPEN,data:{chainId:r,sessionId:n,session:s,error:i}})}notifyClose(e){this.sendMessage({idx:-1,type:Xe.CLOSE,data:e?{error:e}:null})}notifyConnect(e){this.sendMessage({idx:-1,type:Xe.CONNECT,data:e})}notifyDisconnect(e){this.sendMessage({idx:-1,type:Xe.DISCONNECT,data:e?{error:e}:null})}notifyAccountsChanged(e,r){this.sendMessage({idx:-1,type:Xe.ACCOUNTS_CHANGED,data:e,origin:r})}notifyChainChanged(e){this.sendMessage({idx:-1,type:Xe.CHAIN_CHANGED,data:e})}notifyNetworks(e){this.sendMessage({idx:-1,type:Xe.NETWORKS,data:e})}notifyWalletContext(e){this.sendMessage({idx:-1,type:Xe.WALLET_CONTEXT,data:e})}isValidInitAck(e){if(this._init===qt.OK)return xe.warn("isValidInitAck, already in init'd state, so inquiry is invalid."),!1;if(e.type!==Xe.INIT)return xe.warn("isValidInitAck, invalid message type, expecting init"),!1;const{sessionId:r,nonce:n}=e.data;return!r||r.length===0||!n||n.length===0?(xe.error("invalid init ack"),!1):r!==this._sessionId||n!==this._initNonce?(xe.error("invalid init ack match"),!1):!0}init(){return new Promise((e,r)=>{if(this._init===qt.OK){e();return}if(this._init!==qt.NIL||this._initCallback){r("transport init is in progress");return}const n=setTimeout(()=>{xe.warn("transport init timed out"),this._initCallback&&this._initCallback("transport init timed out")},gA/2);this._initCallback=s=>{this._initCallback=void 0,clearTimeout(n),s?r(s):(this._init=qt.OK,e())},this._initNonce=`${performance.now()}`,this.sendMessage({idx:-1,type:Xe.INIT,data:{nonce:this._initNonce}}),this._init=qt.SENT_NONCE})}}class p5e{constructor(){const e=new CS,r=new CS;e.conn=r,r.conn=e,this.app=e,this.wallet=r}}class CS{constructor(){this.events=new Jd.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 qH extends R0{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,s)=>{if(this.state===Ws.CLOSED){this.state=Ws.OPENING;const i=`${performance.now()}`;this._sessionId=i,this.sendMessage({idx:-1,type:Xe.OPEN,data:{path:r,intent:n,networkId:s,sessionId:i}})}},this.state=Ws.CLOSED,this.port=e,!e)throw new Error("port argument cannot be empty");this._init=qt.OK}closeWallet(){this.sendMessage({idx:-1,type:Xe.CLOSE,data:null}),this.close()}sendMessage(e){if(!e.idx)throw new Error("message idx is empty");this.port.sendMessage(e)}}class g5e extends I0{constructor(e,r){super(e),this.port=r,this._init=qt.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 WH(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=(...s)=>{n.logfromjs(`${t}: ${FE(s)}`)},console.warn=(...s)=>{n.warnfromjs(`${t}: ${FE(s)}`)},console.error=(...s)=>{n.errorfromjs(`${t}: ${FE(s)}`)},window.logsOverriddenForUnreal=!0}}function FE(t){return t.map(e=>typeof e=="object"?e instanceof Error?e.message:JSON.stringify(e):String(e)).join(" ")}let hu;class HH extends R0{constructor(e){super(),this.register=()=>{var r;WH("dapp"),hu&&(hu.unregister(),hu=this),(r=window.ue)!=null&&r.sequencewallettransport&&(window.ue.sequencewallettransport.onmessagefromwallet=this.onUnrealCallback),hu=this,this._registered=!0,console.log("registering transport!")},this.unregister=()=>{var r,n;this._registered=!1,this.closeWallet(),hu===this&&(hu=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,s)=>{if(this.isOpened()){console.log("wallet already open!");return}console.log("opening wallet!");const i=new URL(this.walletURL.href),o=new T0;r&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&o.set("intent",V4(n)),s&&o.set("net",`${s}`),i.search=o.toString(),console.log("opening wallet to",i.href),window.open(i.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 s=typeof e!="string"?JSON.stringify(e):e;console.log("Sending message to wallet:",s),(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetowallet(s)}}class b5e extends I0{constructor(e){super(e),this.onMessageFromUnreal=r=>{xe.debug("RECEIVED MESSAGE",r),this.handleMessage(r)},this.getUnrealTransportSession=r=>{const n=new T0(r);return{sessionId:n.get("sid"),networkId:n.get("net"),intent:q4(n.get("intent"))}},this._init=qt.NIL}async register(e){var r;if(((r=window.ue)==null?void 0:r.sequencewallettransport)===void 0)return;WH("wallet");const{search:n}=new URL(e||window.location.href);let s=this.getUnrealTransportSession(n);if(!!s.sessionId||(s=await this.getCachedTransportSession()),!s){xe.error("unreal session is undefined");return}window.ue.sequencewallettransport.onmessagefromsequencejs=this.onMessageFromUnreal,this._registered=!0,this.open(s).then(o=>{if(!o){var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}`;xe.error(l),this.notifyClose({message:l}),window.close()}}).catch(o=>{var a;const l=`failed to open to network ${(a=s)==null?void 0:a.networkId}, due to: ${o}`;xe.error(l),this.notifyClose({message:l}),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!==Xe.INIT&&this._init!==qt.OK){xe.error("impossible state, should not be calling postMessage until inited");return}const s=JSON.stringify(e);(r=window.ue)==null||(n=r.sequencewallettransport)==null||n.sendmessagetosequencejs(s)}}const bA="sequence-extension-message-handler";class w5e extends I0{constructor(e,r){super(e),this.runtime=r,this._init=qt.OK}register(){this._registered=!0,this.port=this.runtime.connect({name:bA})}sendMessage(e){xe.info("[ExtensionMessageHandler send]",e),this.port.postMessage(e)}}class GH extends R0{constructor(e){super(),this.register=()=>{this._registered=!0},e.onConnect.addListener(r=>{r.name===bA&&(this._init=qt.OK,r.onMessage.addListener(n=>{this.handleMessage(n)}))})}sendMessage(e){}unregister(){}openWallet(e,r,n){}closeWallet(){}}class x5e extends Jd.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;xe.info("[received message]",n);const s=n.idx,i=this.responseCallbacks.get(s);switch(s&&this.responseCallbacks.delete(s),n.type){case Xe.MESSAGE:if(i)this.emit(Xe.MESSAGE,n),i(n.data.error,n);else throw new Error("impossible state");break;case Xe.DISCONNECT:case Xe.ACCOUNTS_CHANGED:case Xe.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((s,i)=>{(!n.idx||n.idx<=0)&&i(new Error("message idx not set"));const o=(l,c)=>{if(l)i(l);else if(c)s(c);else throw new Error("no valid response to return")},{idx:a}=n;r.responseCallbacks.get(a)?i(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 vu;class KH extends R0{constructor(e){super(),this.register=()=>{vu&&(vu.unregister(),vu=this),window.addEventListener("message",this.onWindowEvent),vu=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(),vu===this&&(vu=void 0),window.removeEventListener("message",this.onWindowEvent),this.events.removeAllListeners()},this.openWallet=(r,n,s)=>{if(this.walletWindow&&this.isOpened()){this.walletWindow.focus();return}const i=new URL(this.walletURL.href),o=new T0;r&&r!==""&&(i.pathname=r.toLowerCase()),this._init=qt.NIL,this._sessionId=`${performance.now()}`,o.set("sid",this._sessionId),n&&(n.type==="connect"&&(n.options||(n.options={app:window.location.origin}),!Ab()&&!BH()&&n.options&&(n.options.origin=window.location.origin)),o.set("intent",V4(n))),s&&o.set("net",`${s}`);let a,l;Ab()?(a=[450,750],l=[Math.abs(window.screen.width/2-a[0]/2),Math.abs(window.screen.height/2-a[1]/2)]):(a=[450,750],l=[Math.abs(window.screenX+window.innerWidth/2-a[0]/2),Math.abs(window.screenY+window.innerHeight/2-a[1]/2)]);const c=`toolbar=0,location=0,menubar=0,scrollbars=yes,status=yes,width=${a[0]},height=${a[1]},left=${l[0]},top=${l[1]}`;i.search=o.toString(),this.walletWindow=window.open(i.href,"sequence.app",c)},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){xe.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 C5e extends I0{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 s;try{s=JSON.parse(n.data)}catch{return}if(xe.debug("RECEIVED MESSAGE",s),r._init!==qt.OK&&r.isValidInitAck(s)&&(r.appOrigin=n.origin),r._init===qt.OK&&(!r.appOrigin||r.appOrigin.length<8)){xe.error("impossible state, init.OK and appOrigin required");return}r.handleMessage(s)},this.getWindowTransportSession=n=>{const s=new T0(n);return{sessionId:s.get("sid"),networkId:s.get("net"),intent:q4(s.get("intent"))}},this._init=qt.NIL}async register(e){const r=parent.window.opener!==null;if(this._isPopup=r,r!==!0)return;const{pathname:n,search:s}=new URL(e||window.location.href);let i=this.getWindowTransportSession(s);if(!!i.sessionId||(i=await this.getCachedTransportSession()),!i){xe.error("window session is undefined");return}this.parentWindow=parent.window.opener,window.addEventListener("message",this.onWindowEvent,!1),this._registered=!0,this.open(i).then(a=>{if(!a){var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}`;xe.error(c),this.notifyClose({message:c}),window.close()}}).catch(a=>{var l;const c=`failed to open to network ${(l=i)==null?void 0:l.networkId}, due to: ${a}`;xe.error(c),this.notifyClose({message:c}),window.close()})}unregister(){window.removeEventListener("message",this.onWindowEvent),this._registered=!1}sendMessage(e){const r=JSON.stringify(e);e.type===Xe.INIT?this.postMessage(r,!0):this.postMessage(r)}get isPopup(){return this._isPopup}postMessage(e,r=!1){if(r!==!0&&this._init!==qt.OK){xe.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):xe.error("unable to postMessage as parentOrigin is invalid")}}function QH(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 tx{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(s=>{this.provider!==s&&s.unregister()}))})})},this.unregister=()=>{this.messageProviders.forEach(n=>n.unregister()),this.provider=void 0},this.openWallet=(n,s,i)=>{if(this.provider){this.provider.openWallet(n,s,i);return}this.messageProviders.forEach(o=>o.openWallet(n,s,i))},this.sendAsync=async function(n,s,i){if(r.provider){r.provider.sendAsync(n,s,i);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,s,i;const o=new tx;if((r=e.windowTransport)!=null&&r.enabled&&typeof window=="object"&&e.walletAppURL){const a=new KH(e.walletAppURL);o.add(a)}if((n=e.proxyTransport)!=null&&n.enabled){const a=new qH(e.proxyTransport.appPort);o.add(a)}if((s=e.extensionTransport)!=null&&s.enabled){const a=new GH(e.extensionTransport.runtime);o.add(a)}if((i=e.unrealTransport)!=null&&i.enabled&&e.windowTransport&&e.walletAppURL){const a=new HH(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;nk5e(t,s))}function k5e(t,e){if(e.to.toLowerCase()===t.toLowerCase()&&e.data&&ne(e.data).length>=4)throw new Error("self calls are forbidden");if(e.delegateCall)throw new Error("delegate calls are forbidden")}const $5e=1e4;class A5e{constructor(e,r,n){var s=this;this.signerReadyCallbacks=[],this.events=new Jd.EventEmitter2,this.onConnectOptionsChange=void 0,this.promptConnect=async function(i){if(!i&&!s._connectOptions)throw new Error("prompter connect options are empty");if(!s.prompter)return s.connect(i);const o=await s.prompter.promptConnect(i||s._connectOptions).catch(l=>({connected:!1})),a=o;return a.connected&&!a.session&&(a.session=await s.walletSession(i==null?void 0:i.networkId)),o},this.sendAsync=async function(i,o,a){const l={jsonrpc:"2.0",id:i.id,result:null};await s.getAccount();try{var c;if((!s.account||s.account===null)&&!_5e.includes(i.method))throw DH;const f=s.account;if(!f)throw new Error("WalletRequestHandler: wallet account is not configured");const u=(c=s.account)==null?void 0:c.providerFor(a??s.defaultChainId());if(!u)throw new Error(`WalletRequestHandler: wallet provider is not configured for chainId ${a}`);const d=u instanceof xa?u:void 0;switch(i.method){case"net_version":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("net_version",[]);l.result=h;break}case"eth_chainId":{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send("eth_chainId",[]);l.result=h;break}case"eth_accounts":{const h=f.address;l.result=[h];break}case"eth_getBalance":{const[h,v]=i.params,y=await u.getBalance(h,v);l.result=y.toHexString();break}case"sequence_sign":case"personal_sign":case"eth_sign":{let h;switch(i.method){case"sequence_sign":case"personal_sign":{const[b,p]=i.params;h=b;break}case"eth_sign":{const[b,p]=i.params;h=p;break}}let v="";const y=ex(h),g=i.method==="sequence_sign";if(s.prompter===null?v=await f.signMessage(y,a??s.defaultChainId(),g?"eip6492":"ignore"):v=await s.prompter.promptSignMessage({chainId:a,message:y,eip6492:g},s.connectOptions),v&&v.length>0)l.result=v;else throw new Error("declined by user");break}case"sequence_signTypedData_v4":case"eth_signTypedData":case"eth_signTypedData_v4":{const[h,v]=i.params;let y;if(typeof v=="string")try{y=JSON.parse(v)}catch(p){console.warn("walletRequestHandler: error parsing typedData",p)}else y=v;if(!y||!y.domain||!y.types||!y.message)throw new Error("invalid typedData object");let g="";const b=i.method==="sequence_signTypedData_v4";if(s.prompter===null?g=await f.signTypedData(y.domain,y.types,y.message,a??s.defaultChainId(),b?"eip6492":"ignore"):g=await s.prompter.promptSignMessage({chainId:a,typedData:y,eip6492:b},s.connectOptions),g&&g.length>0)l.result=g;else throw new Error("declined by user");break}case"eth_sendTransaction":{const h=S5e(i.params[0]).map(y=>("gas"in y&&y.gasLimit===void 0&&(y.gasLimit=y.gas,delete y.gas),y));cI(f.address,h);let v="";if(s.prompter===null?v=(await f.sendTransaction(h,a??s.defaultChainId())).hash:v=await s.prompter.promptSendTransaction(h,a,s.connectOptions),v)l.result=v;else throw new Error("declined by user");break}case"eth_signTransaction":{const[h]=i.params;if(Ye(h.from)!==f.address)throw new Error("sender address does not match wallet");cI(f.address,h),s.prompter===null?l.result=await f.signTransactions(h,a??s.defaultChainId()):l.result=await s.prompter.promptSignTransaction(h,a,s.connectOptions);break}case"eth_sendRawTransaction":{if(ye.transaction.isSignedTransactionBundle(i.params[0])){const h=Z.from(i.params[0].chainId).toNumber(),v=await f.relayer(h).relay(i.params[0]);l.result=v.hash}else{const h=await u.sendTransaction(i.params[0]);l.result=h.hash}break}case"eth_getTransactionCount":{const h=Ye(i.params[0]),v=i.params[1],y=await u.getTransactionCount(h,v);l.result=Z.from(y).toHexString();break}case"eth_blockNumber":{l.result=await u.getBlockNumber();break}case"eth_getBlockByNumber":{l.result=await u.getBlock(i.params[0]);break}case"eth_getBlockByHash":{l.result=await u.getBlock(i.params[0]);break}case"eth_getTransactionByHash":{l.result=await u.getTransaction(i.params[0]);break}case"eth_call":{const[h,v]=i.params;l.result=await u.call(h,v);break}case"eth_getCode":{const[h,v]=i.params;l.result=await u.getCode(h,v);break}case"eth_estimateGas":{const[h]=i.params;l.result=await u.estimateGas(h);break}case"eth_gasPrice":{const h=await u.getGasPrice();l.result=h.toHexString();break}case"wallet_switchEthereumChain":{const[h]=i.params;if(!h.chainId||h.chainId.length===0)throw new Error("invalid chainId");const v=Z.from(h.chainId);s.setDefaultChainId(v.toNumber()),l.result=null;break}case"sequence_getWalletContext":{l.result=f.contexts;break}case"sequence_getWalletConfig":{const[h]=i.params;h?l.result=[(await f.status(h)).onChain.config]:l.result=await Promise.all(f.networks.map(async function(v){return(await f.status(v.chainId)).onChain.config}));break}case"sequence_getWalletState":{const[h]=i.params;h?l.result=[fI(h,await f.status(h))]:l.result=await Promise.all(f.networks.map(async function(v){const y=await f.status(v.chainId);return fI(v.chainId,y)}));break}case"sequence_getNetworks":{l.result=await s.getNetworks(!0);break}case"sequence_isSequence":{l.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[h]=i.params;if(!h)throw new Error("invalid request, method argument defaultChainId cannot be empty");s.setDefaultChainId(h),l.result=await s.getNetworks(!0);break}default:{if(!d)throw new Error("Account provider doesn't support send method");const h=await d.send(i.method,i.params);l.result=h}}}catch(f){xe.error(f),l.result=null,l.error=ss({},new Error(f),{code:4001})}o(void 0,l)},this.isSignedIn=async function(){return await s.signerReady(),!!s.account},this.getAccount=async function(){if(await s.signerReady(),s.account===void 0)throw new Error("signerReady failed resolve");return s.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:s}=r;if(n){const a=this._connectOptions;let l;if(this.prompter!==null){var i;l=await((i=this.prompter)==null?void 0:i.promptSignInConnect(a))}else l=await this.connect(a);this.notifyConnect(l),(!a||a.keepWalletOpened!==!0)&&this.notifyClose()}if(s&&this.defaultChainId()!==s){var o;await((o=this.prompter)==null?void 0:o.promptChangeNetwork(s))}}signOut(){this.setAccount(null)}signerReset(){this.account=void 0}signerReady(e=$5e){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 s=(r=(n=e==null?void 0:e.networkId)!=null?n:this.defaultChainId())!=null?r:ce.MAINNET,i=K4(s).chainId,o={connected:!0,chainId:Hl(i)};if(e&&e.authorize){const a={app:e.app,origin:e.origin,expiry:e.expiry};try{o.proof=await AH(this.account,i,a)}catch(l){return xe.warn(`connect, signAuthorization failed for options: ${JSON.stringify(e)}, due to: ${l.message}`),{connected:!1,chainId:"0x0",error:`signAuthorization failed: ${l.message}`}}}return o.session=await this.walletSession(i),o}sendMessageRequest(e){return new Promise(r=>{this.sendAsync(e.data,(n,s)=>{const i=ss({},e,{data:s});r(i)},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=ss({},r);return n.provider=void 0,n.relayer=void 0,n}):this.account.networks:(xe.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(s=>ss({},s,{provider:void 0,relayer:void 0}))};if(e){const s=Li(r.networks,e);if(s){var n;(n=r.networks)==null||n.forEach(i=>delete i.isDefaultChain),s.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 s;this.events.emit("accountsChanged",[(s=e.session)==null?void 0:s.accountAddress],r)}}notifyDisconnect(e){this.events.emit("accountsChanged",[],e),this.events.emit("disconnect")}async notifyNetworks(e){const r=e||await this.getNetworks(!0);if(this.events.emit("networks",r),r.length>0){const n=r.find(s=>s.chainId===this.defaultChainId());n&&this.events.emit("chainChanged",te(n.chainId))}else this.events.emit("chainChanged","0x0")}async notifyWalletContext(){if(!this.account){xe.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;rl.canOnchainValidate||l.original.version===2&&n,o=await r.status(s);if(i(o))return!0;if(await e.promptConfirmWalletDeploy(s,this.connectOptions)){const l=await r.status(s);return i(l)?!0:(xe.error("WalletRequestHandler: result for promptConfirmWalletDeploy is not correct"),!1)}return!1}}function fI(t,e){return{context:e.original.context,config:e.onChain.config,address:ye.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 _5e=["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 Lh{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(!jh.is(e))throw new Error("SequenceSigner can only be connected to a SequenceProvider");return new Lh(this.client,e)}getSigner(e){if(!e)return this;const r=this.provider.toChainId(e);return this.singleNetworkSigners[r]||(this.singleNetworkSigners[r]=new wA(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||{},s=this.useChainId(r==null?void 0:r.chainId);return this.client.signMessage(e,{eip6492:n,chainId:s})}async signTypedData(e,r,n,s){const{eip6492:i=!0}=s||{},o=this.useChainId(s==null?void 0:s.chainId);return this.client.signTypedData({domain:e,types:r,message:n},{eip6492:i,chainId:o})}getProvider(e){return this.provider.getProvider(e)}async sendTransaction(e,r){const n=this.useChainId(r==null?void 0:r.chainId),s=await VH(e),i=await this.client.sendTransaction(s,{chainId:n}),o=this.getProvider(n);try{return await yl(async function(){const a=await o.getTransaction(i);return a?o._wrapTransaction(a,i):void 0},{onceBlock:o})}catch(a){throw a.transactionHash=i,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 wA extends Lh{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 P5e{constructor(e){if(this.signer=e,wA.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,s,i){return this.signer.signTypedData(e,r,n,{chainId:s,eip6492:i})}async isValidSignature(e,r,n,s){return Xd(e,r,n,this.signer.getProvider(s))}async isValidMessageSignature(e,r,n,s){const i=this.signer.getProvider(s),o=ex(r),a=W4(o);return Xd(e,a,n,i)}isValidTypedDataSignature(e,r,n,s){return this.isValidSignature(e,zw(r),n,s)}}class jh extends Bw{constructor(e,r,n=Kd){super(e.getChainId()),this.singleNetworkProviders={},this._isSequenceProvider=!0,this.client=e,this.providerFor=r,this.networks=n,e.onConnect(s=>{this.emit("connect",s)}),e.onDisconnect(s=>{this.emit("disconnect",s)}),e.onDefaultChainIdChanged(s=>{this.emit("chainChanged",s)}),e.onAccountsChanged(s=>{this.emit("accountsChanged",s)}),this.signer=new Lh(this.client,this),this.utils=new P5e(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(ss({},e,{authorize:!0}))}async openWallet(e,r){return await this.client.openWallet(e,r),!0}toChainId(e){if(e===void 0)return;const r=Li(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 JH(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 Hl(await this.useChainId());if(e==="eth_accounts")return[this.client.getAddress()];if(e==="wallet_switchEthereumChain"){const o=r[0],a=YH(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 s=await this._getSubprovider(),i=(n=s.prepareRequest(e,r))!=null?n:[e,r];return s.send(i[0],i[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=Li(this.networks,e);if(!r)throw new Error(`Unknown network ${e}`);return r}async waitForTransaction(e,r,n,s){return(await this._getSubprovider(s==null?void 0:s.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,s){return(await this._getSubprovider(s==null?void 0:s.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 wV(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}}jh.is=t=>t&&typeof t=="object"&&t._isSequenceProvider===!0;function YH(t){return typeof t=="object"?YH(t.chainId):Z.from(t).toNumber()}class JH extends jh{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=Li(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 T5e={name:"@0xsequence/provider",version:"1.2.1",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 af{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(af.SESSION_LOCALSTORE_KEY,JSON.stringify(e))}getSession(){const e=this.store.getItem(af.SESSION_LOCALSTORE_KEY);if(e)return JSON.parse(e)}async clearSession(){return this.store.removeItem(af.SESSION_LOCALSTORE_KEY)}}af.SESSION_LOCALSTORE_KEY="@sequence.session";class lf{constructor(e,r=1){this.callbacks=[],this.store=e,this.startingChainId=r,e.onItemChange(lf.SESSION_CHAIN_ID_KEY,n=>{if(n){const s=parseInt(n);this.callbacks.forEach(i=>i(s))}})}onDefaultChainIdChanged(e){return this.callbacks.push(e),()=>{this.callbacks=this.callbacks.filter(r=>r!==e)}}setDefaultChainId(e){e!==this.getDefaultChainId()&&this.store.setItem(lf.SESSION_CHAIN_ID_KEY,e.toString())}getDefaultChainId(){const e=this.store.getItem(lf.SESSION_CHAIN_ID_KEY);return!e||e.length===0?this.startingChainId:parseInt(e)}}lf.SESSION_CHAIN_ID_KEY="@sequence.session.defaultChainId";class xA{constructor(e,r,n){var s;if(this.callbacks={},QH(e))this.transport=tx.new(e);else if(OH(e))this.transport=e;else throw new Error("Invalid transport");const i=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 af(r),this.defaultChainId=new lf(r,i),this.transport.on("accountsChanged",o=>{var a;o.length>1&&console.warn("SequenceClient: wallet-webapp returned more than one account"),(a=this.callbacks.accountsChanged)==null||a.forEach(l=>l(o))}),this.transport.on("connect",o=>{var a;const l=Hl(this.getChainId());(a=this.callbacks.connect)==null||a.forEach(c=>c(ss({},o,{chainId:l})))}),this.transport.on("disconnect",o=>{var a;(a=this.callbacks.disconnect)==null||a.forEach(l=>l(o))}),this.transport.on("networks",o=>{var a;(a=this.callbacks.networks)==null||a.forEach(l=>l(o))}),this.transport.on("walletContext",o=>{var a;(a=this.callbacks.walletContext)==null||a.forEach(l=>l(o))}),this.transport.on("open",o=>{var a;(a=this.callbacks.open)==null||a.forEach(l=>l(o))}),this.transport.on("close",()=>{var o;(o=this.callbacks.close)==null||o.forEach(a=>a())}),this.defaultChainId.onDefaultChainIdChanged(o=>{var a;const l=Hl(o);(a=this.callbacks.chainChanged)==null||a.forEach(c=>c(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)}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&&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:ss({},e,{networkId:this.getChainId(),clientVersion:T5e.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=Z.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,s)=>{this.transport.sendAsync(e,(i,o)=>{i?s(i):o===void 0?s(new Error(`Got undefined response for request: ${e}`)):typeof o=="object"&&o.error?s(o.error):typeof o=="object"&&o.result?n(o.result):s(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),s=Yr.getPayload(e.domain,e.types,e.message);return this.send({method:n,params:[this.getAddress(),s]},(r==null?void 0:r.chainId)||e.domain.chainId&&Z.from(e.domain.chainId).toNumber()||this.getChainId())}async sendTransaction(e,r){const n=Array.isArray(e)?e:[e],s=E5e(n);return this.send({method:"eth_sendTransaction",params:[s]},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 ES={transports:{walletAppURL:"https://sequence.app",windowTransport:{enabled:!0},proxyTransport:{enabled:!1}},defaultNetwork:1};let go;const XH=t=>{var e,r,n;if(go)return go;const s=ss({},ES,t,{transports:ss({},ES.transports,t==null?void 0:t.transports)}),i={},o=(e=(r=s.networks)==null?void 0:r.filter(d=>{d.rpcUrl!==void 0&&d.chainId!==void 0&&Kd.find(h=>h.chainId===d.chainId)}))!=null?e:[],a=Kd.map(d=>{var h;const v=(h=s.networks)==null?void 0:h.find(y=>y.chainId===d.chainId);return v?ss({},d,v):d}).concat(o),l=d=>{if(!i[d]){var h;const v=(h=a.find(b=>b.chainId===d))==null?void 0:h.rpcUrl;if(!v)throw new Error(`no rpcUrl found for chainId: ${d}`);const y=new xa(v),g=new Q4([bW,gW,new Y4],new bb(y));i[d]=new Oq(g,d)}return i[d]},c=s.defaultNetwork?(n=Li(a,s.defaultNetwork))==null?void 0:n.chainId:void 0;if(!c&&s.defaultNetwork)throw new Error(`defaultNetwork not found for chainId: ${s.defaultNetwork}`);const f=s.localStorage||_b(),u=new xA(s.transports,f,{defaultChainId:c,defaultEIP6492:s.defaultEIP6492});return go=new jh(u,l),go},ZH=()=>{go&&(go.client.closeWallet(),go.client.transport.unregister(),go=void 0)},eG=()=>{if(!go)throw new Error("Wallet has not been initialized, call sequence.initWallet(config) first.");return go},R5e=Object.freeze(Object.defineProperty({__proto__:null,BaseInjectedTransport:x5e,BaseProviderTransport:R0,BaseWalletTransport:I0,CHANNEL_ID:bA,DefaultChainIdTracker:lf,DefaultProviderConfig:ES,ErrSignedInRequired:DH,EventType:Xe,ExtensionMessageHandler:w5e,ExtensionMessageProvider:GH,InitState:qt,LocalStorage:Ny,MemoryItemStore:zH,MuxMessageProvider:tx,OpenState:Ws,PROVIDER_OPEN_TIMEOUT:gA,ProviderError:MH,ProxyMessageChannel:p5e,ProxyMessageChannelPort:CS,ProxyMessageHandler:g5e,ProxyMessageProvider:qH,SequenceClient:xA,SequenceClientSession:af,SequenceProvider:jh,SequenceSigner:Lh,SingleNetworkSequenceProvider:JH,SingleNetworkSequenceSigner:wA,UnrealMessageHandler:b5e,UnrealMessageProvider:HH,WalletRequestHandler:A5e,WindowMessageHandler:C5e,WindowMessageProvider:KH,WindowSessionParams:T0,getWallet:eG,initWallet:XH,isBrowserExtension:Ab,isMuxTransportTemplate:QH,isProviderTransport:OH,isUnityPlugin:BH,isValidMessageSignature:jH,isValidSignature:Xd,isValidTypedDataSignature:FH,isWalletUpToDate:UH,messageToBytes:LH,nextMessageIdx:NH,prefixEIP191Message:ex,resolveArrayProperties:VH,trimEIP191Prefix:m5e,unregisterWallet:ZH,useBestStore:_b},Symbol.toStringTag,{value:"Module"}));function Rn(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 s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(t)}var I5e=Rn({__proto__:null},[hme]),O5e=Rn({__proto__:null},[wme]),M5e=Rn({__proto__:null},[HEe]),D5e=Rn({__proto__:null},[XEe]),N5e=Rn({__proto__:null},[eEe]),L5e=Rn({__proto__:null},[cEe]),j5e=Rn({__proto__:null},[a5e]),F5e=Rn({__proto__:null},[kxe]),B5e=Rn({__proto__:null},[R5e]),U5e=Rn({__proto__:null},[DCe]);const z5e=ye.transaction;var V5e=Object.freeze({__proto__:null,transactions:z5e}),q5e=Rn({__proto__:null,isValidSignature:Xd,isValidMessageSignature:jH,isValidTypedDataSignature:FH,isWalletUpToDate:UH},[fxe]),W5e=Rn({__proto__:null},[vCe]),H5e=Rn({__proto__:null},[LCe]),G5e=Rn({__proto__:null},[VEe]),K5e=Rn({__proto__:null},[wCe]),Q5e=Rn({__proto__:null},[qCe]),tG=Object.freeze({__proto__:null,abi:I5e,api:O5e,auth:M5e,guard:D5e,indexer:N5e,metadata:L5e,multicall:j5e,network:F5e,provider:B5e,relayer:U5e,transactions:V5e,utils:q5e,core:W5e,signhub:H5e,sessions:G5e,migration:K5e,account:Q5e,initWallet:XH,getWallet:eG,unregisterWallet:ZH,SequenceProvider:jh,SequenceClient:xA,SequenceSigner:Lh}),qp,Y5e=class extends qz{constructor({chains:t,options:e}={}){const r={name:"MetaMask",shimDisconnect:!0,getProvider(){function n(i){if(i!=null&&i.isMetaMask&&!(i.isBraveWallet&&!i._events&&!i._state)&&!i.isApexWallet&&!i.isAvalanche&&!i.isBitKeep&&!i.isBlockWallet&&!i.isMathWallet&&!(i.isOkxWallet||i.isOKExWallet)&&!(i.isOneInchIOSWallet||i.isOneInchAndroidWallet)&&!i.isOpera&&!i.isPortal&&!i.isRabby&&!i.isDefiant&&!i.isTokenPocket&&!i.isTokenary&&!i.isZerion)return i}if(typeof window>"u")return;const s=window.ethereum;return s!=null&&s.providers?s.providers.find(n):n(s)},...e};super({chains:t,options:r}),ar(this,"id","metaMask"),ar(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),ps(this,qp,void 0),pw(this,qp,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:t}={}){var e,r,n,s;try{const i=await this.getProvider();if(!i)throw new sl;i.on&&(i.on("accountsChanged",this.onAccountsChanged),i.on("chainChanged",this.onChainChanged),i.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let o=null;if(er(this,qp)&&((e=this.options)!=null&&e.shimDisconnect)&&!((r=this.storage)!=null&&r.getItem(this.shimDisconnectKey))&&(o=await this.getAccount().catch(()=>null),!!o))try{await i.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),o=await this.getAccount()}catch(f){if(this.isUserRejectedRequestError(f))throw new Sn(f);if(f.code===new zl(f).code)throw f}if(!o){const c=await i.request({method:"eth_requestAccounts"});o=Tl(c[0])}let a=await this.getChainId(),l=this.isChainUnsupported(a);return t&&a!==t&&(a=(await this.switchChain(t)).id,l=this.isChainUnsupported(a)),(n=this.options)!=null&&n.shimDisconnect&&((s=this.storage)==null||s.setItem(this.shimDisconnectKey,!0)),{account:o,chain:{id:a,unsupported:l},provider:i}}catch(i){throw this.isUserRejectedRequestError(i)?new Sn(i):i.code===-32002?new zl(i):i}}};qp=new WeakMap;var CA={},rx={},qe={},rG={};(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(a,l){var c=a>>>16&65535,f=a&65535,u=l>>>16&65535,d=l&65535;return f*d+(c*d+f*u<<16>>>0)|0}t.mul=Math.imul||e;function r(a,l){return a+l|0}t.add=r;function n(a,l){return a-l|0}t.sub=n;function s(a,l){return a<>>32-l}t.rotl=s;function i(a,l){return a<<32-l|a>>>l}t.rotr=i;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}})(rG);Object.defineProperty(qe,"__esModule",{value:!0});var nG=rG;function J5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16}qe.readInt16BE=J5e;function X5e(t,e){return e===void 0&&(e=0),(t[e+0]<<8|t[e+1])>>>0}qe.readUint16BE=X5e;function Z5e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])<<16>>16}qe.readInt16LE=Z5e;function e6e(t,e){return e===void 0&&(e=0),(t[e+1]<<8|t[e])>>>0}qe.readUint16LE=e6e;function sG(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}qe.writeUint16BE=sG;qe.writeInt16BE=sG;function iG(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}qe.writeUint16LE=iG;qe.writeInt16LE=iG;function SS(t,e){return e===void 0&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}qe.readInt32BE=SS;function kS(t,e){return e===void 0&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}qe.readUint32BE=kS;function $S(t,e){return e===void 0&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}qe.readInt32LE=$S;function AS(t,e){return e===void 0&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}qe.readUint32LE=AS;function Pb(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}qe.writeUint32BE=Pb;qe.writeInt32BE=Pb;function Tb(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}qe.writeUint32LE=Tb;qe.writeInt32LE=Tb;function t6e(t,e){e===void 0&&(e=0);var r=SS(t,e),n=SS(t,e+4);return r*4294967296+n-(n>>31)*4294967296}qe.readInt64BE=t6e;function r6e(t,e){e===void 0&&(e=0);var r=kS(t,e),n=kS(t,e+4);return r*4294967296+n}qe.readUint64BE=r6e;function n6e(t,e){e===void 0&&(e=0);var r=$S(t,e),n=$S(t,e+4);return n*4294967296+r-(r>>31)*4294967296}qe.readInt64LE=n6e;function s6e(t,e){e===void 0&&(e=0);var r=AS(t,e),n=AS(t,e+4);return n*4294967296+r}qe.readUint64LE=s6e;function oG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Pb(t/4294967296>>>0,e,r),Pb(t>>>0,e,r+4),e}qe.writeUint64BE=oG;qe.writeInt64BE=oG;function aG(t,e,r){return e===void 0&&(e=new Uint8Array(8)),r===void 0&&(r=0),Tb(t>>>0,e,r),Tb(t/4294967296>>>0,e,r+4),e}qe.writeUint64LE=aG;qe.writeInt64LE=aG;function i6e(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,s=1,i=t/8+r-1;i>=r;i--)n+=e[i]*s,s*=256;return n}qe.readUintBE=i6e;function o6e(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,s=1,i=r;i=n;i--)r[i]=e/s&255,s*=256;return r}qe.writeUintBE=a6e;function l6e(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(!nG.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,i=n;i>>32-16|S<<16,U=U+S|0,x^=U,x=x>>>32-12|x<<12,E=E+T|0,R^=E,R=R>>>32-16|R<<16,V=V+R|0,T^=V,T=T>>>32-12|T<<12,k=k+B|0,M^=k,M=M>>>32-16|M<<16,N=N+M|0,B^=N,B=B>>>32-12|B<<12,$=$+L|0,_^=$,_=_>>>32-16|_<<16,C=C+_|0,L^=C,L=L>>>32-12|L<<12,k=k+B|0,M^=k,M=M>>>32-8|M<<8,N=N+M|0,B^=N,B=B>>>32-7|B<<7,$=$+L|0,_^=$,_=_>>>32-8|_<<8,C=C+_|0,L^=C,L=L>>>32-7|L<<7,E=E+T|0,R^=E,R=R>>>32-8|R<<8,V=V+R|0,T^=V,T=T>>>32-7|T<<7,w=w+x|0,S^=w,S=S>>>32-8|S<<8,U=U+S|0,x^=U,x=x>>>32-7|x<<7,w=w+T|0,_^=w,_=_>>>32-16|_<<16,N=N+_|0,T^=N,T=T>>>32-12|T<<12,E=E+B|0,S^=E,S=S>>>32-16|S<<16,C=C+S|0,B^=C,B=B>>>32-12|B<<12,k=k+L|0,R^=k,R=R>>>32-16|R<<16,U=U+R|0,L^=U,L=L>>>32-12|L<<12,$=$+x|0,M^=$,M=M>>>32-16|M<<16,V=V+M|0,x^=V,x=x>>>32-12|x<<12,k=k+L|0,R^=k,R=R>>>32-8|R<<8,U=U+R|0,L^=U,L=L>>>32-7|L<<7,$=$+x|0,M^=$,M=M>>>32-8|M<<8,V=V+M|0,x^=V,x=x>>>32-7|x<<7,E=E+B|0,S^=E,S=S>>>32-8|S<<8,C=C+S|0,B^=C,B=B>>>32-7|B<<7,w=w+T|0,_^=w,_=_>>>32-8|_<<8,N=N+_|0,T^=N,T=T>>>32-7|T<<7;pn.writeUint32LE(w+n|0,t,0),pn.writeUint32LE(E+s|0,t,4),pn.writeUint32LE(k+i|0,t,8),pn.writeUint32LE($+o|0,t,12),pn.writeUint32LE(x+a|0,t,16),pn.writeUint32LE(T+l|0,t,20),pn.writeUint32LE(B+c|0,t,24),pn.writeUint32LE(L+f|0,t,28),pn.writeUint32LE(U+u|0,t,32),pn.writeUint32LE(V+d|0,t,36),pn.writeUint32LE(N+h|0,t,40),pn.writeUint32LE(C+v|0,t,44),pn.writeUint32LE(S+y|0,t,48),pn.writeUint32LE(R+g|0,t,52),pn.writeUint32LE(M+b|0,t,56),pn.writeUint32LE(_+p|0,t,60)}function lG(t,e,r,n,s){if(s===void 0&&(s=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 cG={},hc={};Object.defineProperty(hc,"__esModule",{value:!0});function C6e(t,e,r){return~(t-1)&e|t-1&r}hc.select=C6e;function E6e(t,e){return(t|0)-(e|0)-1>>>31&1}hc.lessOrEqual=E6e;function fG(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n>>8}hc.compare=fG;function S6e(t,e){return t.length===0||e.length===0?!1:fG(t,e)!==0}hc.equal=S6e;(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=hc,r=Gi;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 l=a[0]|a[1]<<8;this._r[0]=l&8191;var c=a[2]|a[3]<<8;this._r[1]=(l>>>13|c<<3)&8191;var f=a[4]|a[5]<<8;this._r[2]=(c>>>10|f<<6)&7939;var u=a[6]|a[7]<<8;this._r[3]=(f>>>7|u<<9)&8191;var d=a[8]|a[9]<<8;this._r[4]=(u>>>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 v=a[12]|a[13]<<8;this._r[7]=(h>>>11|v<<5)&8065;var y=a[14]|a[15]<<8;this._r[8]=(v>>>8|y<<8)&8191,this._r[9]=y>>>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,l,c){for(var f=this._fin?0:2048,u=this._h[0],d=this._h[1],h=this._h[2],v=this._h[3],y=this._h[4],g=this._h[5],b=this._h[6],p=this._h[7],w=this._h[8],E=this._h[9],k=this._r[0],$=this._r[1],x=this._r[2],T=this._r[3],B=this._r[4],L=this._r[5],U=this._r[6],V=this._r[7],N=this._r[8],C=this._r[9];c>=16;){var S=a[l+0]|a[l+1]<<8;u+=S&8191;var R=a[l+2]|a[l+3]<<8;d+=(S>>>13|R<<3)&8191;var M=a[l+4]|a[l+5]<<8;h+=(R>>>10|M<<6)&8191;var _=a[l+6]|a[l+7]<<8;v+=(M>>>7|_<<9)&8191;var I=a[l+8]|a[l+9]<<8;y+=(_>>>4|I<<12)&8191,g+=I>>>1&8191;var F=a[l+10]|a[l+11]<<8;b+=(I>>>14|F<<2)&8191;var D=a[l+12]|a[l+13]<<8;p+=(F>>>11|D<<5)&8191;var A=a[l+14]|a[l+15]<<8;w+=(D>>>8|A<<8)&8191,E+=A>>>5|f;var j=0,G=j;G+=u*k,G+=d*(5*C),G+=h*(5*N),G+=v*(5*V),G+=y*(5*U),j=G>>>13,G&=8191,G+=g*(5*L),G+=b*(5*B),G+=p*(5*T),G+=w*(5*x),G+=E*(5*$),j+=G>>>13,G&=8191;var O=j;O+=u*$,O+=d*k,O+=h*(5*C),O+=v*(5*N),O+=y*(5*V),j=O>>>13,O&=8191,O+=g*(5*U),O+=b*(5*L),O+=p*(5*B),O+=w*(5*T),O+=E*(5*x),j+=O>>>13,O&=8191;var q=j;q+=u*x,q+=d*$,q+=h*k,q+=v*(5*C),q+=y*(5*N),j=q>>>13,q&=8191,q+=g*(5*V),q+=b*(5*U),q+=p*(5*L),q+=w*(5*B),q+=E*(5*T),j+=q>>>13,q&=8191;var z=j;z+=u*T,z+=d*x,z+=h*$,z+=v*k,z+=y*(5*C),j=z>>>13,z&=8191,z+=g*(5*N),z+=b*(5*V),z+=p*(5*U),z+=w*(5*L),z+=E*(5*B),j+=z>>>13,z&=8191;var H=j;H+=u*B,H+=d*T,H+=h*x,H+=v*$,H+=y*k,j=H>>>13,H&=8191,H+=g*(5*C),H+=b*(5*N),H+=p*(5*V),H+=w*(5*U),H+=E*(5*L),j+=H>>>13,H&=8191;var J=j;J+=u*L,J+=d*B,J+=h*T,J+=v*x,J+=y*$,j=J>>>13,J&=8191,J+=g*k,J+=b*(5*C),J+=p*(5*N),J+=w*(5*V),J+=E*(5*U),j+=J>>>13,J&=8191;var X=j;X+=u*U,X+=d*L,X+=h*B,X+=v*T,X+=y*x,j=X>>>13,X&=8191,X+=g*$,X+=b*k,X+=p*(5*C),X+=w*(5*N),X+=E*(5*V),j+=X>>>13,X&=8191;var K=j;K+=u*V,K+=d*U,K+=h*L,K+=v*B,K+=y*T,j=K>>>13,K&=8191,K+=g*x,K+=b*$,K+=p*k,K+=w*(5*C),K+=E*(5*N),j+=K>>>13,K&=8191;var Q=j;Q+=u*N,Q+=d*V,Q+=h*U,Q+=v*L,Q+=y*B,j=Q>>>13,Q&=8191,Q+=g*T,Q+=b*x,Q+=p*$,Q+=w*k,Q+=E*(5*C),j+=Q>>>13,Q&=8191;var ae=j;ae+=u*C,ae+=d*N,ae+=h*V,ae+=v*U,ae+=y*L,j=ae>>>13,ae&=8191,ae+=g*B,ae+=b*T,ae+=p*x,ae+=w*$,ae+=E*k,j+=ae>>>13,ae&=8191,j=(j<<2)+j|0,j=j+G|0,G=j&8191,j=j>>>13,O+=j,u=G,d=O,h=q,v=z,y=H,g=J,b=X,p=K,w=Q,E=ae,l+=16,c-=16}this._h[0]=u,this._h[1]=d,this._h[2]=h,this._h[3]=v,this._h[4]=y,this._h[5]=g,this._h[6]=b,this._h[7]=p,this._h[8]=w,this._h[9]=E},o.prototype.finish=function(a,l){l===void 0&&(l=0);var c=new Uint16Array(10),f,u,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(f=this._h[1]>>>13,this._h[1]&=8191,h=2;h<10;h++)this._h[h]+=f,f=this._h[h]>>>13,this._h[h]&=8191;for(this._h[0]+=f*5,f=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=f,f=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=f,c[0]=this._h[0]+5,f=c[0]>>>13,c[0]&=8191,h=1;h<10;h++)c[h]=this._h[h]+f,f=c[h]>>>13,c[h]&=8191;for(c[9]-=1<<13,u=(f^1)-1,h=0;h<10;h++)c[h]&=u;for(u=~u,h=0;h<10;h++)this._h[h]=this._h[h]&u|c[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[l+0]=this._h[0]>>>0,a[l+1]=this._h[0]>>>8,a[l+2]=this._h[1]>>>0,a[l+3]=this._h[1]>>>8,a[l+4]=this._h[2]>>>0,a[l+5]=this._h[2]>>>8,a[l+6]=this._h[3]>>>0,a[l+7]=this._h[3]>>>8,a[l+8]=this._h[4]>>>0,a[l+9]=this._h[4]>>>8,a[l+10]=this._h[5]>>>0,a[l+11]=this._h[5]>>>8,a[l+12]=this._h[6]>>>0,a[l+13]=this._h[6]>>>8,a[l+14]=this._h[7]>>>0,a[l+15]=this._h[7]>>>8,this._finished=!0,this},o.prototype.update=function(a){var l=0,c=a.length,f;if(this._leftover){f=16-this._leftover,f>c&&(f=c);for(var u=0;u=16&&(f=c-c%16,this._blocks(a,l,f),l+=f,c-=f),c){for(var u=0;u16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var h=new Uint8Array(16);h.set(c,h.length-c.length);var v=new Uint8Array(32);e.stream(this._key,h,v,4);var y=f.length+this.tagLength,g;if(d){if(d.length!==y)throw new Error("ChaCha20Poly1305: incorrect destination length");g=d}else g=new Uint8Array(y);return e.streamXOR(this._key,h,f,g,4),this._authenticate(g.subarray(g.length-this.tagLength,g.length),v,g.subarray(0,g.length-this.tagLength),u),n.wipe(h),g},l.prototype.open=function(c,f,u,d){if(c.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(f.length0&&h.update(o.subarray(d.length%16))),h.update(u),u.length%16>0&&h.update(o.subarray(u.length%16));var v=new Uint8Array(8);d&&s.writeUint64LE(d.length,v),h.update(v),s.writeUint64LE(u.length,v),h.update(v);for(var y=h.digest(),g=0;gthis.blockSize?this._inner.update(r).finish(n).clean():n.set(r);for(var s=0;s1&&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=f.length,v=256-256%h;for(;c>0;){const y=s(Math.ceil(c*256/v),u);for(let g=0;g0;g++){const b=y[g];b0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=l[f++],c--;this._bufferLength===this.blockSize&&(i(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(c>=this.blockSize&&(f=i(this._temp,this._state,l,f,c),c%=this.blockSize);c>0;)this._buffer[this._bufferLength++]=l[f++],c--;return this},a.prototype.finish=function(l){if(!this._finished){var c=this._bytesHashed,f=this._bufferLength,u=c/536870912|0,d=c<<3,h=c%64<56?64:128;this._buffer[f]=128;for(var v=f+1;v0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},a.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},a.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},a}();t.SHA256=n;var s=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 i(a,l,c,f,u){for(;u>=64;){for(var d=l[0],h=l[1],v=l[2],y=l[3],g=l[4],b=l[5],p=l[6],w=l[7],E=0;E<16;E++){var k=f+E*4;a[E]=e.readUint32BE(c,k)}for(var E=16;E<64;E++){var $=a[E-2],x=($>>>17|$<<32-17)^($>>>19|$<<32-19)^$>>>10;$=a[E-15];var T=($>>>7|$<<32-7)^($>>>18|$<<32-18)^$>>>3;a[E]=(x+a[E-7]|0)+(T+a[E-16]|0)}for(var E=0;E<64;E++){var x=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&p)|0)+(w+(s[E]+a[E]|0)|0)|0,T=((d>>>2|d<<32-2)^(d>>>13|d<<32-13)^(d>>>22|d<<32-22))+(d&h^d&v^h&v)|0;w=p,p=b,b=g,g=y+x|0,y=v,v=h,h=d,d=x+T|0}l[0]+=d,l[1]+=h,l[2]+=v,l[3]+=y,l[4]+=g,l[5]+=b,l[6]+=p,l[7]+=w,f+=64,u-=64}return f}function o(a){var l=new n;l.update(a);var c=l.digest();return l.clean(),c}t.hash=o})(ax);var SA={};(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=nx,r=Gi;t.PUBLIC_KEY_LENGTH=32,t.SECRET_KEY_LENGTH=32,t.SHARED_KEY_LENGTH=32;function n(E){const k=new Float64Array(16);if(E)for(let $=0;$>16&1),$[L-1]&=65535;$[15]=x[15]-32767-($[14]>>16&1);const B=$[15]>>16&1;$[14]&=65535,a(x,$,1-B)}for(let T=0;T<16;T++)E[2*T]=x[T]&255,E[2*T+1]=x[T]>>8}function c(E,k){for(let $=0;$<16;$++)E[$]=k[2*$]+(k[2*$+1]<<8);E[15]&=32767}function f(E,k,$){for(let x=0;x<16;x++)E[x]=k[x]+$[x]}function u(E,k,$){for(let x=0;x<16;x++)E[x]=k[x]-$[x]}function d(E,k,$){let x,T,B=0,L=0,U=0,V=0,N=0,C=0,S=0,R=0,M=0,_=0,I=0,F=0,D=0,A=0,j=0,G=0,O=0,q=0,z=0,H=0,J=0,X=0,K=0,Q=0,ae=0,ie=0,ue=0,st=0,ke=0,Ae=0,at=0,me=$[0],Re=$[1],Qt=$[2],Ie=$[3],Oe=$[4],Yt=$[5],Me=$[6],De=$[7],Jt=$[8],Ne=$[9],Le=$[10],Xt=$[11],je=$[12],Fe=$[13],Zt=$[14],Be=$[15];x=k[0],B+=x*me,L+=x*Re,U+=x*Qt,V+=x*Ie,N+=x*Oe,C+=x*Yt,S+=x*Me,R+=x*De,M+=x*Jt,_+=x*Ne,I+=x*Le,F+=x*Xt,D+=x*je,A+=x*Fe,j+=x*Zt,G+=x*Be,x=k[1],L+=x*me,U+=x*Re,V+=x*Qt,N+=x*Ie,C+=x*Oe,S+=x*Yt,R+=x*Me,M+=x*De,_+=x*Jt,I+=x*Ne,F+=x*Le,D+=x*Xt,A+=x*je,j+=x*Fe,G+=x*Zt,O+=x*Be,x=k[2],U+=x*me,V+=x*Re,N+=x*Qt,C+=x*Ie,S+=x*Oe,R+=x*Yt,M+=x*Me,_+=x*De,I+=x*Jt,F+=x*Ne,D+=x*Le,A+=x*Xt,j+=x*je,G+=x*Fe,O+=x*Zt,q+=x*Be,x=k[3],V+=x*me,N+=x*Re,C+=x*Qt,S+=x*Ie,R+=x*Oe,M+=x*Yt,_+=x*Me,I+=x*De,F+=x*Jt,D+=x*Ne,A+=x*Le,j+=x*Xt,G+=x*je,O+=x*Fe,q+=x*Zt,z+=x*Be,x=k[4],N+=x*me,C+=x*Re,S+=x*Qt,R+=x*Ie,M+=x*Oe,_+=x*Yt,I+=x*Me,F+=x*De,D+=x*Jt,A+=x*Ne,j+=x*Le,G+=x*Xt,O+=x*je,q+=x*Fe,z+=x*Zt,H+=x*Be,x=k[5],C+=x*me,S+=x*Re,R+=x*Qt,M+=x*Ie,_+=x*Oe,I+=x*Yt,F+=x*Me,D+=x*De,A+=x*Jt,j+=x*Ne,G+=x*Le,O+=x*Xt,q+=x*je,z+=x*Fe,H+=x*Zt,J+=x*Be,x=k[6],S+=x*me,R+=x*Re,M+=x*Qt,_+=x*Ie,I+=x*Oe,F+=x*Yt,D+=x*Me,A+=x*De,j+=x*Jt,G+=x*Ne,O+=x*Le,q+=x*Xt,z+=x*je,H+=x*Fe,J+=x*Zt,X+=x*Be,x=k[7],R+=x*me,M+=x*Re,_+=x*Qt,I+=x*Ie,F+=x*Oe,D+=x*Yt,A+=x*Me,j+=x*De,G+=x*Jt,O+=x*Ne,q+=x*Le,z+=x*Xt,H+=x*je,J+=x*Fe,X+=x*Zt,K+=x*Be,x=k[8],M+=x*me,_+=x*Re,I+=x*Qt,F+=x*Ie,D+=x*Oe,A+=x*Yt,j+=x*Me,G+=x*De,O+=x*Jt,q+=x*Ne,z+=x*Le,H+=x*Xt,J+=x*je,X+=x*Fe,K+=x*Zt,Q+=x*Be,x=k[9],_+=x*me,I+=x*Re,F+=x*Qt,D+=x*Ie,A+=x*Oe,j+=x*Yt,G+=x*Me,O+=x*De,q+=x*Jt,z+=x*Ne,H+=x*Le,J+=x*Xt,X+=x*je,K+=x*Fe,Q+=x*Zt,ae+=x*Be,x=k[10],I+=x*me,F+=x*Re,D+=x*Qt,A+=x*Ie,j+=x*Oe,G+=x*Yt,O+=x*Me,q+=x*De,z+=x*Jt,H+=x*Ne,J+=x*Le,X+=x*Xt,K+=x*je,Q+=x*Fe,ae+=x*Zt,ie+=x*Be,x=k[11],F+=x*me,D+=x*Re,A+=x*Qt,j+=x*Ie,G+=x*Oe,O+=x*Yt,q+=x*Me,z+=x*De,H+=x*Jt,J+=x*Ne,X+=x*Le,K+=x*Xt,Q+=x*je,ae+=x*Fe,ie+=x*Zt,ue+=x*Be,x=k[12],D+=x*me,A+=x*Re,j+=x*Qt,G+=x*Ie,O+=x*Oe,q+=x*Yt,z+=x*Me,H+=x*De,J+=x*Jt,X+=x*Ne,K+=x*Le,Q+=x*Xt,ae+=x*je,ie+=x*Fe,ue+=x*Zt,st+=x*Be,x=k[13],A+=x*me,j+=x*Re,G+=x*Qt,O+=x*Ie,q+=x*Oe,z+=x*Yt,H+=x*Me,J+=x*De,X+=x*Jt,K+=x*Ne,Q+=x*Le,ae+=x*Xt,ie+=x*je,ue+=x*Fe,st+=x*Zt,ke+=x*Be,x=k[14],j+=x*me,G+=x*Re,O+=x*Qt,q+=x*Ie,z+=x*Oe,H+=x*Yt,J+=x*Me,X+=x*De,K+=x*Jt,Q+=x*Ne,ae+=x*Le,ie+=x*Xt,ue+=x*je,st+=x*Fe,ke+=x*Zt,Ae+=x*Be,x=k[15],G+=x*me,O+=x*Re,q+=x*Qt,z+=x*Ie,H+=x*Oe,J+=x*Yt,X+=x*Me,K+=x*De,Q+=x*Jt,ae+=x*Ne,ie+=x*Le,ue+=x*Xt,st+=x*je,ke+=x*Fe,Ae+=x*Zt,at+=x*Be,B+=38*O,L+=38*q,U+=38*z,V+=38*H,N+=38*J,C+=38*X,S+=38*K,R+=38*Q,M+=38*ae,_+=38*ie,I+=38*ue,F+=38*st,D+=38*ke,A+=38*Ae,j+=38*at,T=1,x=B+T+65535,T=Math.floor(x/65536),B=x-T*65536,x=L+T+65535,T=Math.floor(x/65536),L=x-T*65536,x=U+T+65535,T=Math.floor(x/65536),U=x-T*65536,x=V+T+65535,T=Math.floor(x/65536),V=x-T*65536,x=N+T+65535,T=Math.floor(x/65536),N=x-T*65536,x=C+T+65535,T=Math.floor(x/65536),C=x-T*65536,x=S+T+65535,T=Math.floor(x/65536),S=x-T*65536,x=R+T+65535,T=Math.floor(x/65536),R=x-T*65536,x=M+T+65535,T=Math.floor(x/65536),M=x-T*65536,x=_+T+65535,T=Math.floor(x/65536),_=x-T*65536,x=I+T+65535,T=Math.floor(x/65536),I=x-T*65536,x=F+T+65535,T=Math.floor(x/65536),F=x-T*65536,x=D+T+65535,T=Math.floor(x/65536),D=x-T*65536,x=A+T+65535,T=Math.floor(x/65536),A=x-T*65536,x=j+T+65535,T=Math.floor(x/65536),j=x-T*65536,x=G+T+65535,T=Math.floor(x/65536),G=x-T*65536,B+=T-1+37*(T-1),T=1,x=B+T+65535,T=Math.floor(x/65536),B=x-T*65536,x=L+T+65535,T=Math.floor(x/65536),L=x-T*65536,x=U+T+65535,T=Math.floor(x/65536),U=x-T*65536,x=V+T+65535,T=Math.floor(x/65536),V=x-T*65536,x=N+T+65535,T=Math.floor(x/65536),N=x-T*65536,x=C+T+65535,T=Math.floor(x/65536),C=x-T*65536,x=S+T+65535,T=Math.floor(x/65536),S=x-T*65536,x=R+T+65535,T=Math.floor(x/65536),R=x-T*65536,x=M+T+65535,T=Math.floor(x/65536),M=x-T*65536,x=_+T+65535,T=Math.floor(x/65536),_=x-T*65536,x=I+T+65535,T=Math.floor(x/65536),I=x-T*65536,x=F+T+65535,T=Math.floor(x/65536),F=x-T*65536,x=D+T+65535,T=Math.floor(x/65536),D=x-T*65536,x=A+T+65535,T=Math.floor(x/65536),A=x-T*65536,x=j+T+65535,T=Math.floor(x/65536),j=x-T*65536,x=G+T+65535,T=Math.floor(x/65536),G=x-T*65536,B+=T-1+37*(T-1),E[0]=B,E[1]=L,E[2]=U,E[3]=V,E[4]=N,E[5]=C,E[6]=S,E[7]=R,E[8]=M,E[9]=_,E[10]=I,E[11]=F,E[12]=D,E[13]=A,E[14]=j,E[15]=G}function h(E,k){d(E,k,k)}function v(E,k){const $=n();for(let x=0;x<16;x++)$[x]=k[x];for(let x=253;x>=0;x--)h($,$),x!==2&&x!==4&&d($,$,k);for(let x=0;x<16;x++)E[x]=$[x]}function y(E,k){const $=new Uint8Array(32),x=new Float64Array(80),T=n(),B=n(),L=n(),U=n(),V=n(),N=n();for(let M=0;M<31;M++)$[M]=E[M];$[31]=E[31]&127|64,$[0]&=248,c(x,k);for(let M=0;M<16;M++)B[M]=x[M];T[0]=U[0]=1;for(let M=254;M>=0;--M){const _=$[M>>>3]>>>(M&7)&1;a(T,B,_),a(L,U,_),f(V,T,L),u(T,T,L),f(L,B,U),u(B,B,U),h(U,V),h(N,T),d(T,L,T),d(L,B,V),f(V,T,L),u(T,T,L),h(B,T),u(L,U,N),d(T,L,i),f(T,T,U),d(L,L,T),d(T,U,N),d(U,B,x),h(B,V),a(T,B,_),a(L,U,_)}for(let M=0;M<16;M++)x[M+16]=T[M],x[M+32]=L[M],x[M+48]=B[M],x[M+64]=U[M];const C=x.subarray(32),S=x.subarray(16);v(C,C),d(S,S,C);const R=new Uint8Array(32);return l(R,S),R}t.scalarMult=y;function g(E){return y(E,s)}t.scalarMultBase=g;function b(E){if(E.length!==t.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${t.SECRET_KEY_LENGTH} bytes`);const k=new Uint8Array(E);return{publicKey:g(k),secretKey:k}}t.generateKeyPairFromSeed=b;function p(E){const k=(0,e.randomBytes)(32,E),$=b(k);return(0,r.wipe)(k),$}t.generateKeyPair=p;function w(E,k,$=!1){if(E.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(k.length!==t.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const x=y(E,k);if($){let T=0;for(let B=0;Bs+i.length,0));const r=hG(e);let n=0;for(const s of t)r.set(s,n),n+=s.length;return kA(r)}function j6e(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n>>0,E=new Uint8Array(w);b!==p;){for(var k=v[b],$=0,x=w-1;(k!==0||$>>0,E[x]=k%a>>>0,k=k/a>>>0;if(k!==0)throw new Error("Non-zero carry");g=$,b++}for(var T=w-g;T!==w&&E[T]===0;)T++;for(var B=l.repeat(y);T>>0,w=new Uint8Array(p);v[y];){var E=r[v.charCodeAt(y)];if(E===255)return;for(var k=0,$=p-1;(E!==0||k>>0,w[$]=E%256>>>0,E=E/256>>>0;if(E!==0)throw new Error("Non-zero carry");b=k,y++}if(v[y]!==" "){for(var x=p-b;x!==p&&w[x]===0;)x++;for(var T=new Uint8Array(g+(p-x)),B=g;x!==p;)T[B++]=w[x++];return T}}}function h(v){var y=d(v);if(y)return y;throw new Error(`Non-${e} character`)}return{encode:u,decodeUnsafe:d,decode:h}}var F6e=j6e,B6e=F6e;const U6e=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")},z6e=t=>new TextEncoder().encode(t),V6e=t=>new TextDecoder().decode(t);class q6e{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 W6e{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 vG(this,e)}}class H6e{constructor(e){this.decoders=e}or(e){return vG(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 vG=(t,e)=>new H6e({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class G6e{constructor(e,r,n,s){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=s,this.encoder=new q6e(e,r,n),this.decoder=new W6e(e,r,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const lx=({name:t,prefix:e,encode:r,decode:n})=>new G6e(t,e,r,n),M0=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:s}=B6e(r,e);return lx({prefix:t,name:e,encode:n,decode:i=>U6e(s(i))})},K6e=(t,e,r,n)=>{const s={};for(let f=0;f=8&&(a-=8,o[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw new SyntaxError("Unexpected end of data");return o},Q6e=(t,e,r)=>{const n=e[e.length-1]==="=",s=(1<r;)o-=r,i+=e[s&a>>o];if(o&&(i+=e[s&a<lx({prefix:e,name:t,encode(s){return Q6e(s,n,r)},decode(s){return K6e(s,n,r,t)}}),Y6e=lx({prefix:"\0",name:"identity",encode:t=>V6e(t),decode:t=>z6e(t)}),J6e=Object.freeze(Object.defineProperty({__proto__:null,identity:Y6e},Symbol.toStringTag,{value:"Module"})),X6e=vn({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Z6e=Object.freeze(Object.defineProperty({__proto__:null,base2:X6e},Symbol.toStringTag,{value:"Module"})),e3e=vn({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),t3e=Object.freeze(Object.defineProperty({__proto__:null,base8:e3e},Symbol.toStringTag,{value:"Module"})),r3e=M0({prefix:"9",name:"base10",alphabet:"0123456789"}),n3e=Object.freeze(Object.defineProperty({__proto__:null,base10:r3e},Symbol.toStringTag,{value:"Module"})),s3e=vn({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),i3e=vn({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),o3e=Object.freeze(Object.defineProperty({__proto__:null,base16:s3e,base16upper:i3e},Symbol.toStringTag,{value:"Module"})),a3e=vn({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),l3e=vn({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),c3e=vn({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),f3e=vn({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),u3e=vn({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),d3e=vn({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),h3e=vn({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),v3e=vn({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),y3e=vn({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),m3e=Object.freeze(Object.defineProperty({__proto__:null,base32:a3e,base32hex:u3e,base32hexpad:h3e,base32hexpadupper:v3e,base32hexupper:d3e,base32pad:c3e,base32padupper:f3e,base32upper:l3e,base32z:y3e},Symbol.toStringTag,{value:"Module"})),p3e=M0({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),g3e=M0({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),b3e=Object.freeze(Object.defineProperty({__proto__:null,base36:p3e,base36upper:g3e},Symbol.toStringTag,{value:"Module"})),w3e=M0({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),x3e=M0({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),C3e=Object.freeze(Object.defineProperty({__proto__:null,base58btc:w3e,base58flickr:x3e},Symbol.toStringTag,{value:"Module"})),E3e=vn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),S3e=vn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),k3e=vn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),$3e=vn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),A3e=Object.freeze(Object.defineProperty({__proto__:null,base64:E3e,base64pad:S3e,base64url:k3e,base64urlpad:$3e},Symbol.toStringTag,{value:"Module"})),yG=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),_3e=yG.reduce((t,e,r)=>(t[r]=e,t),[]),P3e=yG.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function T3e(t){return t.reduce((e,r)=>(e+=_3e[r],e),"")}function R3e(t){const e=[];for(const r of t){const n=P3e[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const I3e=lx({prefix:"🚀",name:"base256emoji",encode:T3e,decode:R3e}),O3e=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:I3e},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const yI={...J6e,...Z6e,...t3e,...n3e,...o3e,...m3e,...b3e,...C3e,...A3e,...O3e};function mG(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const mI=mG("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),BE=mG("ascii","a",t=>{let e="a";for(let r=0;r{t=t.substring(1);const e=hG(t.length);for(let r=0;r"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new j3e:typeof navigator<"u"?wI(navigator.userAgent):W3e()}function V3e(t){return t!==""&&U3e.reduce(function(e,r){var n=r[0],s=r[1];if(e)return e;var i=s.exec(t);return!!i&&[n,i]},!1)}function wI(t){var e=V3e(t);if(!e)return null;var r=e[0],n=e[1];if(r==="searchbot")return new L3e;var s=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);s?s.length=0;M--)(R=F[M])&&(S=(x<3?R(S):x>3?R(U,V,S):R(U,V))||S);return x>3&&S&&Object.defineProperty(U,V,S),S},i=function(F,U){return function(V,N){U(V,N,F)}},o=function(F,U){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(F,U)},a=function(F,U,V,N){function x(S){return S instanceof V?S:new V(function(R){R(S)})}return new(V||(V=Promise))(function(S,R){function M(B){try{I(N.next(B))}catch(D){R(D)}}function _(B){try{I(N.throw(B))}catch(D){R(D)}}function I(B){B.done?S(B.value):x(B.value).then(M,_)}I((N=N.apply(F,U||[])).next())})},l=function(F,U){var V={label:0,sent:function(){if(S[0]&1)throw S[1];return S[1]},trys:[],ops:[]},N,x,S,R;return R={next:M(0),throw:M(1),return:M(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function M(I){return function(B){return _([I,B])}}function _(I){if(N)throw new TypeError("Generator is already executing.");for(;V;)try{if(N=1,x&&(S=I[0]&2?x.return:I[0]?x.throw||((S=x.return)&&S.call(x),0):x.next)&&!(S=S.call(x,I[1])).done)return S;switch(x=0,S&&(I=[I[0]&2,S.value]),I[0]){case 0:case 1:S=I;break;case 4:return V.label++,{value:I[1],done:!1};case 5:V.label++,x=I[1],I=[0];continue;case 7:I=V.ops.pop(),V.trys.pop();continue;default:if(S=V.trys,!(S=S.length>0&&S[S.length-1])&&(I[0]===6||I[0]===2)){V=0;continue}if(I[0]===3&&(!S||I[1]>S[0]&&I[1]=F.length&&(F=void 0),{value:F&&F[N++],done:!F}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(F,U){var V=typeof Symbol=="function"&&F[Symbol.iterator];if(!V)return F;var N=V.call(F),x,S=[],R;try{for(;(U===void 0||U-- >0)&&!(x=N.next()).done;)S.push(x.value)}catch(M){R={error:M}}finally{try{x&&!x.done&&(V=N.return)&&V.call(N)}finally{if(R)throw R.error}}return S},d=function(){for(var F=[],U=0;U1||M(A,L)})})}function M(A,L){try{_(N[A](L))}catch(G){D(S[0][3],G)}}function _(A){A.value instanceof v?Promise.resolve(A.value.v).then(I,B):D(S[0][2],A)}function I(A){M("next",A)}function B(A){M("throw",A)}function D(A,L){A(L),S.shift(),S.length&&M(S[0][0],S[0][1])}},b=function(F){var U,V;return U={},N("next"),N("throw",function(x){throw x}),N("return"),U[Symbol.iterator]=function(){return this},U;function N(x,S){U[x]=F[x]?function(R){return(V=!V)?{value:v(F[x](R)),done:x==="return"}:S?S(R):R}:S}},p=function(F){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var U=F[Symbol.asyncIterator],V;return U?U.call(F):(F=typeof f=="function"?f(F):F[Symbol.iterator](),V={},N("next"),N("throw"),N("return"),V[Symbol.asyncIterator]=function(){return this},V);function N(S){V[S]=F[S]&&function(R){return new Promise(function(M,_){R=F[S](R),x(M,_,R.done,R.value)})}}function x(S,R,M,_){Promise.resolve(_).then(function(I){S({value:I,done:M})},R)}},g=function(F,U){return Object.defineProperty?Object.defineProperty(F,"raw",{value:U}):F.raw=U,F},w=function(F){if(F&&F.__esModule)return F;var U={};if(F!=null)for(var V in F)Object.hasOwnProperty.call(F,V)&&(U[V]=F[V]);return U.default=F,U},E=function(F){return F&&F.__esModule?F:{default:F}},k=function(F,U){if(!U.has(F))throw new TypeError("attempted to get private field on non-instance");return U.get(F)},$=function(F,U,V){if(!U.has(F))throw new TypeError("attempted to set private field on non-instance");return U.set(F,V),V},T("__extends",e),T("__assign",r),T("__rest",n),T("__decorate",s),T("__param",i),T("__metadata",o),T("__awaiter",a),T("__generator",l),T("__exportStar",c),T("__createBinding",C),T("__values",f),T("__read",u),T("__spread",d),T("__spreadArrays",h),T("__await",v),T("__asyncGenerator",y),T("__asyncDelegator",b),T("__asyncValues",p),T("__makeTemplateObject",g),T("__importStar",w),T("__importDefault",E),T("__classPrivateFieldGet",k),T("__classPrivateFieldSet",$)})})(G3e);var BE={},g1={},wI;function K3e(){if(wI)return g1;wI=1,Object.defineProperty(g1,"__esModule",{value:!0}),g1.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return g1.delay=t,g1}var $c={},UE={},Ac={},xI;function Q3e(){return xI||(xI=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.ONE_THOUSAND=Ac.ONE_HUNDRED=void 0,Ac.ONE_HUNDRED=100,Ac.ONE_THOUSAND=1e3),Ac}var zE={},CI;function Y3e(){return CI||(CI=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}(zE)),zE}var EI;function gG(){return EI||(EI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xd;e.__exportStar(Q3e(),t),e.__exportStar(Y3e(),t)}(UE)),UE}var SI;function J3e(){if(SI)return $c;SI=1,Object.defineProperty($c,"__esModule",{value:!0}),$c.fromMiliseconds=$c.toMiliseconds=void 0;const t=gG();function e(n){return n*t.ONE_THOUSAND}$c.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return $c.fromMiliseconds=r,$c}var kI;function X3e(){return kI||(kI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xd;e.__exportStar(K3e(),t),e.__exportStar(J3e(),t)}(BE)),BE}var vu={},$I;function Z3e(){if($I)return vu;$I=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.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 s=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:s})}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 vu.Watch=t,vu.default=t,vu}var VE={},b1={},AI;function eSe(){if(AI)return b1;AI=1,Object.defineProperty(b1,"__esModule",{value:!0}),b1.IWatch=void 0;class t{}return b1.IWatch=t,b1}var _I;function tSe(){return _I||(_I=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Xd.__exportStar(eSe(),t)}(VE)),VE}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Xd;e.__exportStar(X3e(),t),e.__exportStar(Z3e(),t),e.__exportStar(tSe(),t),e.__exportStar(gG(),t)})(lf);var yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.getLocalStorage=yt.getLocalStorageOrThrow=yt.getCrypto=yt.getCryptoOrThrow=wG=yt.getLocation=yt.getLocationOrThrow=kA=yt.getNavigator=yt.getNavigatorOrThrow=bG=yt.getDocument=yt.getDocumentOrThrow=yt.getFromWindowOrThrow=yt.getFromWindow=void 0;function Hf(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}yt.getFromWindow=Hf;function jh(t){const e=Hf(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}yt.getFromWindowOrThrow=jh;function rSe(){return jh("document")}yt.getDocumentOrThrow=rSe;function nSe(){return Hf("document")}var bG=yt.getDocument=nSe;function sSe(){return jh("navigator")}yt.getNavigatorOrThrow=sSe;function iSe(){return Hf("navigator")}var kA=yt.getNavigator=iSe;function oSe(){return jh("location")}yt.getLocationOrThrow=oSe;function aSe(){return Hf("location")}var wG=yt.getLocation=aSe;function lSe(){return jh("crypto")}yt.getCryptoOrThrow=lSe;function cSe(){return Hf("crypto")}yt.getCrypto=cSe;function fSe(){return jh("localStorage")}yt.getLocalStorageOrThrow=fSe;function uSe(){return Hf("localStorage")}yt.getLocalStorage=uSe;var $A={};Object.defineProperty($A,"__esModule",{value:!0});var xG=$A.getWindowMetadata=void 0;const PI=yt;function dSe(){let t,e;try{t=PI.getDocumentOrThrow(),e=PI.getLocationOrThrow()}catch{return null}function r(){const u=t.getElementsByTagName("link"),d=[];for(let h=0;h-1){const b=v.getAttribute("href");if(b)if(b.toLowerCase().indexOf("https:")===-1&&b.toLowerCase().indexOf("http:")===-1&&b.indexOf("//")!==0){let p=e.protocol+"//"+e.host;if(b.indexOf("/")===0)p+=b;else{const g=e.pathname.split("/");g.pop();const w=g.join("/");p+=w+"/"+b}d.push(p)}else if(b.indexOf("//")===0){const p=e.protocol+b;d.push(p)}else d.push(b)}}return d}function n(...u){const d=t.getElementsByTagName("meta");for(let h=0;hv.getAttribute(b)).filter(b=>b?u.includes(b):!1);if(y.length&&y){const b=v.getAttribute("content");if(b)return b}}return""}function s(){let u=n("name","og:site_name","og:title","twitter:title");return u||(u=t.title),u}function i(){return n("description","og:description","twitter:description","keywords")}const o=s(),a=i(),l=e.origin,c=r();return{description:a,url:l,icons:c,name:o}}xG=$A.getWindowMetadata=dSe;var Ny={},hSe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),CG="%[a-f0-9]{2}",TI=new RegExp("("+CG+")|([^%]+?)","gi"),RI=new RegExp("("+CG+")+","gi");function _S(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([],_S(r),_S(n))}function vSe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(TI)||[],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)]},gSe=function(t,e){for(var r={},n=Object.keys(t),s=Array.isArray(e),i=0;ig==null,o=Symbol("encodeFragmentIdentifier");function a(g){switch(g.arrayFormat){case"index":return w=>(E,k)=>{const $=E.length;return k===void 0||g.skipNull&&k===null||g.skipEmptyString&&k===""?E:k===null?[...E,[f(w,g),"[",$,"]"].join("")]:[...E,[f(w,g),"[",f($,g),"]=",f(k,g)].join("")]};case"bracket":return w=>(E,k)=>k===void 0||g.skipNull&&k===null||g.skipEmptyString&&k===""?E:k===null?[...E,[f(w,g),"[]"].join("")]:[...E,[f(w,g),"[]=",f(k,g)].join("")];case"colon-list-separator":return w=>(E,k)=>k===void 0||g.skipNull&&k===null||g.skipEmptyString&&k===""?E:k===null?[...E,[f(w,g),":list="].join("")]:[...E,[f(w,g),":list=",f(k,g)].join("")];case"comma":case"separator":case"bracket-separator":{const w=g.arrayFormat==="bracket-separator"?"[]=":"=";return E=>(k,$)=>$===void 0||g.skipNull&&$===null||g.skipEmptyString&&$===""?k:($=$===null?"":$,k.length===0?[[f(E,g),w,f($,g)].join("")]:[[k,f($,g)].join(g.arrayFormatSeparator)])}default:return w=>(E,k)=>k===void 0||g.skipNull&&k===null||g.skipEmptyString&&k===""?E:k===null?[...E,f(w,g)]:[...E,[f(w,g),"=",f(k,g)].join("")]}}function l(g){let w;switch(g.arrayFormat){case"index":return(E,k,$)=>{if(w=/\[(\d*)\]$/.exec(E),E=E.replace(/\[\d*\]$/,""),!w){$[E]=k;return}$[E]===void 0&&($[E]={}),$[E][w[1]]=k};case"bracket":return(E,k,$)=>{if(w=/(\[\])$/.exec(E),E=E.replace(/\[\]$/,""),!w){$[E]=k;return}if($[E]===void 0){$[E]=[k];return}$[E]=[].concat($[E],k)};case"colon-list-separator":return(E,k,$)=>{if(w=/(:list)$/.exec(E),E=E.replace(/:list$/,""),!w){$[E]=k;return}if($[E]===void 0){$[E]=[k];return}$[E]=[].concat($[E],k)};case"comma":case"separator":return(E,k,$)=>{const C=typeof k=="string"&&k.includes(g.arrayFormatSeparator),T=typeof k=="string"&&!C&&u(k,g).includes(g.arrayFormatSeparator);k=T?u(k,g):k;const j=C||T?k.split(g.arrayFormatSeparator).map(F=>u(F,g)):k===null?k:u(k,g);$[E]=j};case"bracket-separator":return(E,k,$)=>{const C=/(\[\])$/.test(E);if(E=E.replace(/\[\]$/,""),!C){$[E]=k&&u(k,g);return}const T=k===null?[]:k.split(g.arrayFormatSeparator).map(j=>u(j,g));if($[E]===void 0){$[E]=T;return}$[E]=[].concat($[E],T)};default:return(E,k,$)=>{if($[E]===void 0){$[E]=k;return}$[E]=[].concat($[E],k)}}}function c(g){if(typeof g!="string"||g.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(g,w){return w.encode?w.strict?e(g):encodeURIComponent(g):g}function u(g,w){return w.decode?r(g):g}function d(g){return Array.isArray(g)?g.sort():typeof g=="object"?d(Object.keys(g)).sort((w,E)=>Number(w)-Number(E)).map(w=>g[w]):g}function h(g){const w=g.indexOf("#");return w!==-1&&(g=g.slice(0,w)),g}function v(g){let w="";const E=g.indexOf("#");return E!==-1&&(w=g.slice(E)),w}function y(g){g=h(g);const w=g.indexOf("?");return w===-1?"":g.slice(w+1)}function b(g,w){return w.parseNumbers&&!Number.isNaN(Number(g))&&typeof g=="string"&&g.trim()!==""?g=Number(g):w.parseBooleans&&g!==null&&(g.toLowerCase()==="true"||g.toLowerCase()==="false")&&(g=g.toLowerCase()==="true"),g}function p(g,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),c(w.arrayFormatSeparator);const E=l(w),k=Object.create(null);if(typeof g!="string"||(g=g.trim().replace(/^[?#&]/,""),!g))return k;for(const $ of g.split("&")){if($==="")continue;let[C,T]=n(w.decode?$.replace(/\+/g," "):$,"=");T=T===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?T:u(T,w),E(u(C,w),T,k)}for(const $ of Object.keys(k)){const C=k[$];if(typeof C=="object"&&C!==null)for(const T of Object.keys(C))C[T]=b(C[T],w);else k[$]=b(C,w)}return w.sort===!1?k:(w.sort===!0?Object.keys(k).sort():Object.keys(k).sort(w.sort)).reduce(($,C)=>{const T=k[C];return Boolean(T)&&typeof T=="object"&&!Array.isArray(T)?$[C]=d(T):$[C]=T,$},Object.create(null))}t.extract=y,t.parse=p,t.stringify=(g,w)=>{if(!g)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),c(w.arrayFormatSeparator);const E=T=>w.skipNull&&i(g[T])||w.skipEmptyString&&g[T]==="",k=a(w),$={};for(const T of Object.keys(g))E(T)||($[T]=g[T]);const C=Object.keys($);return w.sort!==!1&&C.sort(w.sort),C.map(T=>{const j=g[T];return j===void 0?"":j===null?f(T,w):Array.isArray(j)?j.length===0&&w.arrayFormat==="bracket-separator"?f(T,w)+"[]":j.reduce(k(T),[]).join("&"):f(T,w)+"="+f(j,w)}).filter(T=>T.length>0).join("&")},t.parseUrl=(g,w)=>{w=Object.assign({decode:!0},w);const[E,k]=n(g,"#");return Object.assign({url:E.split("?")[0]||"",query:p(y(g),w)},w&&w.parseFragmentIdentifier&&k?{fragmentIdentifier:u(k,w)}:{})},t.stringifyUrl=(g,w)=>{w=Object.assign({encode:!0,strict:!0,[o]:!0},w);const E=h(g.url).split("?")[0]||"",k=t.extract(g.url),$=t.parse(k,{sort:!1}),C=Object.assign($,g.query);let T=t.stringify(C,w);T&&(T=`?${T}`);let j=v(g.url);return g.fragmentIdentifier&&(j=`#${w[o]?f(g.fragmentIdentifier,w):g.fragmentIdentifier}`),`${E}${T}${j}`},t.pick=(g,w,E)=>{E=Object.assign({parseFragmentIdentifier:!0,[o]:!1},E);const{url:k,query:$,fragmentIdentifier:C}=t.parseUrl(g,E);return t.stringifyUrl({url:k,query:s($,w),fragmentIdentifier:C},E)},t.exclude=(g,w,E)=>{const k=Array.isArray(w)?$=>!w.includes($):($,C)=>!w($,C);return t.pick(g,k,E)}})(Ny);const bSe={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 yWe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const s=t[n];r.push(...s.accounts)}),r}function EG(t,e){return t.includes(":")?[t]:e.chains||[]}const SG="base10",ls="base16",PS="base64pad",AA="utf8",kG=0,M0=1,wSe=0,II=1,TS=12,_A=32;function mWe(){const t=EA.generateKeyPair();return{privateKey:qi(t.secretKey,ls),publicKey:qi(t.publicKey,ls)}}function pWe(){const t=rx.randomBytes(_A);return qi(t,ls)}function gWe(t,e){const r=EA.sharedKey(Ri(t,ls),Ri(e,ls)),n=new T6e(ox.SHA256,r).expand(_A);return qi(n,ls)}function bWe(t){const e=ox.hash(Ri(t,ls));return qi(e,ls)}function wWe(t){const e=ox.hash(Ri(t,AA));return qi(e,ls)}function xSe(t){return Ri(`${t}`,SG)}function lx(t){return Number(qi(t,SG))}function xWe(t){const e=xSe(typeof t.type<"u"?t.type:kG);if(lx(e)===M0&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Ri(t.senderPublicKey,ls):void 0,n=typeof t.iv<"u"?Ri(t.iv,ls):rx.randomBytes(TS),s=new xA.ChaCha20Poly1305(Ri(t.symKey,ls)).seal(n,Ri(t.message,AA));return CSe({type:e,sealed:s,iv:n,senderPublicKey:r})}function CWe(t){const e=new xA.ChaCha20Poly1305(Ri(t.symKey,ls)),{sealed:r,iv:n}=$G(t.encoded),s=e.open(n,r);if(s===null)throw new Error("Failed to decrypt");return qi(s,AA)}function CSe(t){if(lx(t.type)===M0){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return qi(hI([t.type,t.senderPublicKey,t.iv,t.sealed]),PS)}return qi(hI([t.type,t.iv,t.sealed]),PS)}function $G(t){const e=Ri(t,PS),r=e.slice(wSe,II),n=II;if(lx(r)===M0){const a=n+_A,l=a+TS,c=e.slice(n,a),f=e.slice(a,l),u=e.slice(l);return{type:r,sealed:u,iv:f,senderPublicKey:c}}const s=n+TS,i=e.slice(n,s),o=e.slice(s);return{type:r,sealed:o,iv:i}}function EWe(t,e){const r=$G(t);return ESe({type:lx(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?qi(r.senderPublicKey,ls):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function ESe(t){const e=(t==null?void 0:t.type)||kG;if(e===M0){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 SWe(t){return t.type===M0&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var SSe=Object.defineProperty,OI=Object.getOwnPropertySymbols,kSe=Object.prototype.hasOwnProperty,$Se=Object.prototype.propertyIsEnumerable,MI=(t,e,r)=>e in t?SSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,DI=(t,e)=>{for(var r in e||(e={}))kSe.call(e,r)&&MI(t,r,e[r]);if(OI)for(var r of OI(e))$Se.call(e,r)&&MI(t,r,e[r]);return t};const ASe="ReactNative",ml={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},_Se="js";function AG(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function PSe(){return!bG()&&!!kA()&&navigator.product===ASe}function TSe(){return!AG()&&!!kA()}function PA(){return PSe()?ml.reactNative:AG()?ml.node:TSe()?ml.browser:ml.unknown}function RSe(t,e){let r=Ny.parse(t);return r=DI(DI({},r),e),t=Ny.stringify(r),t}function kWe(){return xG()||{name:"",description:"",url:"",icons:[""]}}function ISe(){if(PA()===ml.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=z3e();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 OSe(){var t;const e=PA();return e===ml.browser?[e,((t=wG())==null?void 0:t.host)||"unknown"].join(":"):e}function MSe(t,e,r){const n=ISe(),s=OSe();return[[t,e].join("-"),[_Se,r].join("-"),n,s].join("/")}function $We({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:s,projectId:i,useOnCloseEvent:o}){const a=r.split("?"),l=MSe(t,e,n),c={auth:s,ua:l,projectId:i,useOnCloseEvent:o||void 0},f=RSe(a[1]||"",c);return a[0]+"?"+f}function Jc(t,e){return t.filter(r=>e.includes(r)).length===t.length}function AWe(t){return Object.fromEntries(t.entries())}function _We(t){return new Map(Object.entries(t))}function PWe(t=lf.FIVE_MINUTES,e){const r=lf.toMiliseconds(t||lf.FIVE_MINUTES);let n,s,i;return{resolve:o=>{i&&n&&(clearTimeout(i),n(o))},reject:o=>{i&&s&&(clearTimeout(i),s(o))},done:()=>new Promise((o,a)=>{i=setTimeout(()=>{a(new Error(e))},r),n=o,s=a})}}function TWe(t,e,r){return new Promise(async(n,s)=>{const i=setTimeout(()=>s(new Error(r)),e);try{const o=await t;n(o)}catch(o){s(o)}clearTimeout(i)})}function _G(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 RWe(t){return _G("topic",t)}function IWe(t){return _G("id",t)}function OWe(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 MWe(t,e){return lf.fromMiliseconds((e||Date.now())+lf.toMiliseconds(t))}function DWe(t){return Date.now()>=lf.toMiliseconds(t)}function NWe(t,e){return`${t}${e?`:${e}`:""}`}function qE(t=[],e=[]){return[...new Set([...t,...e])]}async function LWe({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let s=n==null?void 0:n.href;if(typeof s!="string")return;s.endsWith("/")&&(s=s.slice(0,-1));const i=`${s}/wc?requestId=${t}&sessionTopic=${e}`,o=PA();o===ml.browser?i.startsWith("https://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,"_self","noreferrer noopener"):o===ml.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(i)}catch(n){console.error(n)}}const DSe="irn";function jWe(t){return(t==null?void 0:t.relay)||{protocol:DSe}}function FWe(t){const e=bSe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var NSe=Object.defineProperty,NI=Object.getOwnPropertySymbols,LSe=Object.prototype.hasOwnProperty,jSe=Object.prototype.propertyIsEnumerable,LI=(t,e,r)=>e in t?NSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,FSe=(t,e)=>{for(var r in e||(e={}))LSe.call(e,r)&&LI(t,r,e[r]);if(NI)for(var r of NI(e))jSe.call(e,r)&&LI(t,r,e[r]);return t};function BSe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(s=>{if(s.startsWith(n)){const i=s.replace(n,""),o=t[s];r[i]=o}}),r}function BWe(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),s=t.substring(e+1,r).split("@"),i=typeof r<"u"?t.substring(r):"",o=Ny.parse(i);return{protocol:n,topic:USe(s[0]),version:parseInt(s[1],10),symKey:o.symKey,relay:BSe(o)}}function USe(t){return t.startsWith("//")?t.substring(2):t}function zSe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(s=>{const i=r+e+s;t[s]&&(n[i]=t[s])}),n}function UWe(t){return`${t.protocol}:${t.topic}@${t.version}?`+Ny.stringify(FSe({symKey:t.symKey},zSe(t.relay)))}var VSe=Object.defineProperty,qSe=Object.defineProperties,WSe=Object.getOwnPropertyDescriptors,jI=Object.getOwnPropertySymbols,HSe=Object.prototype.hasOwnProperty,GSe=Object.prototype.propertyIsEnumerable,FI=(t,e,r)=>e in t?VSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,KSe=(t,e)=>{for(var r in e||(e={}))HSe.call(e,r)&&FI(t,r,e[r]);if(jI)for(var r of jI(e))GSe.call(e,r)&&FI(t,r,e[r]);return t},QSe=(t,e)=>qSe(t,WSe(e));function Fh(t){const e=[];return t.forEach(r=>{const[n,s]=r.split(":");e.push(`${n}:${s}`)}),e}function YSe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Fh(r.accounts))}),e}function JSe(t,e){const r=[];return Object.values(t).forEach(n=>{Fh(n.accounts).includes(e)&&r.push(...n.methods)}),r}function XSe(t,e){const r=[];return Object.values(t).forEach(n=>{Fh(n.accounts).includes(e)&&r.push(...n.events)}),r}function zWe(t,e){const r=lke(t,e);if(r)throw new Error(r.message);const n={};for(const[s,i]of Object.entries(t))n[s]={methods:i.methods,events:i.events,chains:i.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function PG(t){return t.includes(":")}function ZSe(t){return PG(t)?t.split(":")[0]:t}function TG(t){var e,r,n;const s={};if(!TA(t))return s;for(const[i,o]of Object.entries(t)){const a=PG(i)?[i]:o.chains,l=o.methods||[],c=o.events||[],f=ZSe(i);s[f]=QSe(KSe({},s[f]),{chains:qE(a,(e=s[f])==null?void 0:e.chains),methods:qE(l,(r=s[f])==null?void 0:r.methods),events:qE(c,(n=s[f])==null?void 0:n.events)})}return s}const eke={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}},tke={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 ll(t,e){const{message:r,code:n}=tke[t];return{message:e?`${r} ${e}`:r,code:n}}function Zd(t,e){const{message:r,code:n}=eke[t];return{message:e?`${r} ${e}`:r,code:n}}function cx(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function TA(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function cf(t){return typeof t>"u"}function ui(t,e){return e&&cf(t)?!0:typeof t=="string"&&!!t.trim().length}function RA(t,e){return e&&cf(t)?!0:typeof t=="number"&&!isNaN(t)}function VWe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),s=Object.keys(r);let i=!0;return Jc(s,n)?(n.forEach(o=>{const{accounts:a,methods:l,events:c}=t.namespaces[o],f=Fh(a),u=r[o];(!Jc(EG(o,u),f)||!Jc(u.methods,l)||!Jc(u.events,c))&&(i=!1)}),i):!1}function Tb(t){return ui(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function rke(t){if(ui(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Tb(r)}}return!1}function qWe(t){if(ui(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function WWe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function HWe(t){return t==null?void 0:t.topic}function GWe(t,e){let r=null;return ui(t==null?void 0:t.publicKey,!1)||(r=ll("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function BI(t){let e=!0;return cx(t)?t.length&&(e=t.every(r=>ui(r,!1))):e=!1,e}function nke(t,e,r){let n=null;return cx(e)&&e.length?e.forEach(s=>{n||Tb(s)||(n=Zd("UNSUPPORTED_CHAINS",`${r}, chain ${s} should be a string and conform to "namespace:chainId" format`))}):Tb(t)||(n=Zd("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 ske(t,e,r){let n=null;return Object.entries(t).forEach(([s,i])=>{if(n)return;const o=nke(s,EG(s,i),`${e} ${r}`);o&&(n=o)}),n}function ike(t,e){let r=null;return cx(t)?t.forEach(n=>{r||rke(n)||(r=Zd("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=Zd("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function oke(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ike(n==null?void 0:n.accounts,`${e} namespace`);s&&(r=s)}),r}function ake(t,e){let r=null;return BI(t==null?void 0:t.methods)?BI(t==null?void 0:t.events)||(r=Zd("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=Zd("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function RG(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ake(n,`${e}, namespace`);s&&(r=s)}),r}function KWe(t,e,r){let n=null;if(t&&TA(t)){const s=RG(t,e);s&&(n=s);const i=ske(t,e,r);i&&(n=i)}else n=ll("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function lke(t,e){let r=null;if(t&&TA(t)){const n=RG(t,e);n&&(r=n);const s=oke(t,e);s&&(r=s)}else r=ll("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function cke(t){return ui(t.protocol,!0)}function QWe(t,e){let r=!1;return e&&!t?r=!0:t&&cx(t)&&t.length&&t.forEach(n=>{r=cke(n)}),r}function YWe(t){return typeof t=="number"}function JWe(t){return typeof t<"u"&&typeof t!==null}function XWe(t){return!(!t||typeof t!="object"||!t.code||!RA(t.code,!1)||!t.message||!ui(t.message,!1))}function ZWe(t){return!(cf(t)||!ui(t.method,!1))}function eHe(t){return!(cf(t)||cf(t.result)&&cf(t.error)||!RA(t.id,!1)||!ui(t.jsonrpc,!1))}function tHe(t){return!(cf(t)||!ui(t.name,!1))}function rHe(t,e){return!(!Tb(e)||!YSe(t).includes(e))}function nHe(t,e,r){return ui(r,!1)?JSe(t,e).includes(r):!1}function sHe(t,e,r){return ui(r,!1)?XSe(t,e).includes(r):!1}function iHe(t,e,r){let n=null;const s=fke(t),i=uke(e),o=Object.keys(s),a=Object.keys(i),l=UI(Object.keys(t)),c=UI(Object.keys(e)),f=l.filter(u=>!c.includes(u));return f.length&&(n=ll("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. +***************************************************************************** */(function(t){var e,r,n,s,i,o,a,l,c,f,u,d,h,v,y,g,b,p,w,E,k,$,x;(function(T){var B=typeof Wr=="object"?Wr:typeof self=="object"?self:typeof this=="object"?this:{};T(L(B,L(t.exports)));function L(U,V){return U!==B&&(typeof Object.create=="function"?Object.defineProperty(U,"__esModule",{value:!0}):U.__esModule=!0),function(N,C){return U[N]=V?V(N,C):C}}})(function(T){var B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,U){L.__proto__=U}||function(L,U){for(var V in U)U.hasOwnProperty(V)&&(L[V]=U[V])};e=function(L,U){B(L,U);function V(){this.constructor=L}L.prototype=U===null?Object.create(U):(V.prototype=U.prototype,new V)},r=Object.assign||function(L){for(var U,V=1,N=arguments.length;V=0;M--)(R=L[M])&&(S=(C<3?R(S):C>3?R(U,V,S):R(U,V))||S);return C>3&&S&&Object.defineProperty(U,V,S),S},i=function(L,U){return function(V,N){U(V,N,L)}},o=function(L,U){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(L,U)},a=function(L,U,V,N){function C(S){return S instanceof V?S:new V(function(R){R(S)})}return new(V||(V=Promise))(function(S,R){function M(F){try{I(N.next(F))}catch(D){R(D)}}function _(F){try{I(N.throw(F))}catch(D){R(D)}}function I(F){F.done?S(F.value):C(F.value).then(M,_)}I((N=N.apply(L,U||[])).next())})},l=function(L,U){var V={label:0,sent:function(){if(S[0]&1)throw S[1];return S[1]},trys:[],ops:[]},N,C,S,R;return R={next:M(0),throw:M(1),return:M(2)},typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function M(I){return function(F){return _([I,F])}}function _(I){if(N)throw new TypeError("Generator is already executing.");for(;V;)try{if(N=1,C&&(S=I[0]&2?C.return:I[0]?C.throw||((S=C.return)&&S.call(C),0):C.next)&&!(S=S.call(C,I[1])).done)return S;switch(C=0,S&&(I=[I[0]&2,S.value]),I[0]){case 0:case 1:S=I;break;case 4:return V.label++,{value:I[1],done:!1};case 5:V.label++,C=I[1],I=[0];continue;case 7:I=V.ops.pop(),V.trys.pop();continue;default:if(S=V.trys,!(S=S.length>0&&S[S.length-1])&&(I[0]===6||I[0]===2)){V=0;continue}if(I[0]===3&&(!S||I[1]>S[0]&&I[1]=L.length&&(L=void 0),{value:L&&L[N++],done:!L}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(L,U){var V=typeof Symbol=="function"&&L[Symbol.iterator];if(!V)return L;var N=V.call(L),C,S=[],R;try{for(;(U===void 0||U-- >0)&&!(C=N.next()).done;)S.push(C.value)}catch(M){R={error:M}}finally{try{C&&!C.done&&(V=N.return)&&V.call(N)}finally{if(R)throw R.error}}return S},d=function(){for(var L=[],U=0;U1||M(A,j)})})}function M(A,j){try{_(N[A](j))}catch(G){D(S[0][3],G)}}function _(A){A.value instanceof v?Promise.resolve(A.value.v).then(I,F):D(S[0][2],A)}function I(A){M("next",A)}function F(A){M("throw",A)}function D(A,j){A(j),S.shift(),S.length&&M(S[0][0],S[0][1])}},g=function(L){var U,V;return U={},N("next"),N("throw",function(C){throw C}),N("return"),U[Symbol.iterator]=function(){return this},U;function N(C,S){U[C]=L[C]?function(R){return(V=!V)?{value:v(L[C](R)),done:C==="return"}:S?S(R):R}:S}},b=function(L){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var U=L[Symbol.asyncIterator],V;return U?U.call(L):(L=typeof f=="function"?f(L):L[Symbol.iterator](),V={},N("next"),N("throw"),N("return"),V[Symbol.asyncIterator]=function(){return this},V);function N(S){V[S]=L[S]&&function(R){return new Promise(function(M,_){R=L[S](R),C(M,_,R.done,R.value)})}}function C(S,R,M,_){Promise.resolve(_).then(function(I){S({value:I,done:M})},R)}},p=function(L,U){return Object.defineProperty?Object.defineProperty(L,"raw",{value:U}):L.raw=U,L},w=function(L){if(L&&L.__esModule)return L;var U={};if(L!=null)for(var V in L)Object.hasOwnProperty.call(L,V)&&(U[V]=L[V]);return U.default=L,U},E=function(L){return L&&L.__esModule?L:{default:L}},k=function(L,U){if(!U.has(L))throw new TypeError("attempted to get private field on non-instance");return U.get(L)},$=function(L,U,V){if(!U.has(L))throw new TypeError("attempted to set private field on non-instance");return U.set(L,V),V},T("__extends",e),T("__assign",r),T("__rest",n),T("__decorate",s),T("__param",i),T("__metadata",o),T("__awaiter",a),T("__generator",l),T("__exportStar",c),T("__createBinding",x),T("__values",f),T("__read",u),T("__spread",d),T("__spreadArrays",h),T("__await",v),T("__asyncGenerator",y),T("__asyncDelegator",g),T("__asyncValues",b),T("__makeTemplateObject",p),T("__importStar",w),T("__importDefault",E),T("__classPrivateFieldGet",k),T("__classPrivateFieldSet",$)})})(G3e);var UE={},b1={},xI;function K3e(){if(xI)return b1;xI=1,Object.defineProperty(b1,"__esModule",{value:!0}),b1.delay=void 0;function t(e){return new Promise(r=>{setTimeout(()=>{r(!0)},e)})}return b1.delay=t,b1}var Ac={},zE={},_c={},CI;function Q3e(){return CI||(CI=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.ONE_THOUSAND=_c.ONE_HUNDRED=void 0,_c.ONE_HUNDRED=100,_c.ONE_THOUSAND=1e3),_c}var VE={},EI;function Y3e(){return EI||(EI=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}(VE)),VE}var SI;function gG(){return SI||(SI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(Q3e(),t),e.__exportStar(Y3e(),t)}(zE)),zE}var kI;function J3e(){if(kI)return Ac;kI=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.fromMiliseconds=Ac.toMiliseconds=void 0;const t=gG();function e(n){return n*t.ONE_THOUSAND}Ac.toMiliseconds=e;function r(n){return Math.floor(n/t.ONE_THOUSAND)}return Ac.fromMiliseconds=r,Ac}var $I;function X3e(){return $I||($I=1,function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(K3e(),t),e.__exportStar(J3e(),t)}(UE)),UE}var yu={},AI;function Z3e(){if(AI)return yu;AI=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.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 s=Date.now()-n.started;this.timestamps.set(r,{started:n.started,elapsed:s})}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 yu.Watch=t,yu.default=t,yu}var qE={},w1={},_I;function eSe(){if(_I)return w1;_I=1,Object.defineProperty(w1,"__esModule",{value:!0}),w1.IWatch=void 0;class t{}return w1.IWatch=t,w1}var PI;function tSe(){return PI||(PI=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Zd.__exportStar(eSe(),t)}(qE)),qE}(function(t){Object.defineProperty(t,"__esModule",{value:!0});const e=Zd;e.__exportStar(X3e(),t),e.__exportStar(Z3e(),t),e.__exportStar(tSe(),t),e.__exportStar(gG(),t)})(cf);var yt={};Object.defineProperty(yt,"__esModule",{value:!0});yt.getLocalStorage=yt.getLocalStorageOrThrow=yt.getCrypto=yt.getCryptoOrThrow=wG=yt.getLocation=yt.getLocationOrThrow=$A=yt.getNavigator=yt.getNavigatorOrThrow=bG=yt.getDocument=yt.getDocumentOrThrow=yt.getFromWindowOrThrow=yt.getFromWindow=void 0;function Gf(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}yt.getFromWindow=Gf;function Fh(t){const e=Gf(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}yt.getFromWindowOrThrow=Fh;function rSe(){return Fh("document")}yt.getDocumentOrThrow=rSe;function nSe(){return Gf("document")}var bG=yt.getDocument=nSe;function sSe(){return Fh("navigator")}yt.getNavigatorOrThrow=sSe;function iSe(){return Gf("navigator")}var $A=yt.getNavigator=iSe;function oSe(){return Fh("location")}yt.getLocationOrThrow=oSe;function aSe(){return Gf("location")}var wG=yt.getLocation=aSe;function lSe(){return Fh("crypto")}yt.getCryptoOrThrow=lSe;function cSe(){return Gf("crypto")}yt.getCrypto=cSe;function fSe(){return Fh("localStorage")}yt.getLocalStorageOrThrow=fSe;function uSe(){return Gf("localStorage")}yt.getLocalStorage=uSe;var AA={};Object.defineProperty(AA,"__esModule",{value:!0});var xG=AA.getWindowMetadata=void 0;const TI=yt;function dSe(){let t,e;try{t=TI.getDocumentOrThrow(),e=TI.getLocationOrThrow()}catch{return null}function r(){const u=t.getElementsByTagName("link"),d=[];for(let h=0;h-1){const g=v.getAttribute("href");if(g)if(g.toLowerCase().indexOf("https:")===-1&&g.toLowerCase().indexOf("http:")===-1&&g.indexOf("//")!==0){let b=e.protocol+"//"+e.host;if(g.indexOf("/")===0)b+=g;else{const p=e.pathname.split("/");p.pop();const w=p.join("/");b+=w+"/"+g}d.push(b)}else if(g.indexOf("//")===0){const b=e.protocol+g;d.push(b)}else d.push(g)}}return d}function n(...u){const d=t.getElementsByTagName("meta");for(let h=0;hv.getAttribute(g)).filter(g=>g?u.includes(g):!1);if(y.length&&y){const g=v.getAttribute("content");if(g)return g}}return""}function s(){let u=n("name","og:site_name","og:title","twitter:title");return u||(u=t.title),u}function i(){return n("description","og:description","twitter:description","keywords")}const o=s(),a=i(),l=e.origin,c=r();return{description:a,url:l,icons:c,name:o}}xG=AA.getWindowMetadata=dSe;var Ly={},hSe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),CG="%[a-f0-9]{2}",RI=new RegExp("("+CG+")|([^%]+?)","gi"),II=new RegExp("("+CG+")+","gi");function PS(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([],PS(r),PS(n))}function vSe(t){try{return decodeURIComponent(t)}catch{for(var e=t.match(RI)||[],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)]},gSe=function(t,e){for(var r={},n=Object.keys(t),s=Array.isArray(e),i=0;ip==null,o=Symbol("encodeFragmentIdentifier");function a(p){switch(p.arrayFormat){case"index":return w=>(E,k)=>{const $=E.length;return k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),"[",$,"]"].join("")]:[...E,[f(w,p),"[",f($,p),"]=",f(k,p)].join("")]};case"bracket":return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),"[]"].join("")]:[...E,[f(w,p),"[]=",f(k,p)].join("")];case"colon-list-separator":return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,[f(w,p),":list="].join("")]:[...E,[f(w,p),":list=",f(k,p)].join("")];case"comma":case"separator":case"bracket-separator":{const w=p.arrayFormat==="bracket-separator"?"[]=":"=";return E=>(k,$)=>$===void 0||p.skipNull&&$===null||p.skipEmptyString&&$===""?k:($=$===null?"":$,k.length===0?[[f(E,p),w,f($,p)].join("")]:[[k,f($,p)].join(p.arrayFormatSeparator)])}default:return w=>(E,k)=>k===void 0||p.skipNull&&k===null||p.skipEmptyString&&k===""?E:k===null?[...E,f(w,p)]:[...E,[f(w,p),"=",f(k,p)].join("")]}}function l(p){let w;switch(p.arrayFormat){case"index":return(E,k,$)=>{if(w=/\[(\d*)\]$/.exec(E),E=E.replace(/\[\d*\]$/,""),!w){$[E]=k;return}$[E]===void 0&&($[E]={}),$[E][w[1]]=k};case"bracket":return(E,k,$)=>{if(w=/(\[\])$/.exec(E),E=E.replace(/\[\]$/,""),!w){$[E]=k;return}if($[E]===void 0){$[E]=[k];return}$[E]=[].concat($[E],k)};case"colon-list-separator":return(E,k,$)=>{if(w=/(:list)$/.exec(E),E=E.replace(/:list$/,""),!w){$[E]=k;return}if($[E]===void 0){$[E]=[k];return}$[E]=[].concat($[E],k)};case"comma":case"separator":return(E,k,$)=>{const x=typeof k=="string"&&k.includes(p.arrayFormatSeparator),T=typeof k=="string"&&!x&&u(k,p).includes(p.arrayFormatSeparator);k=T?u(k,p):k;const B=x||T?k.split(p.arrayFormatSeparator).map(L=>u(L,p)):k===null?k:u(k,p);$[E]=B};case"bracket-separator":return(E,k,$)=>{const x=/(\[\])$/.test(E);if(E=E.replace(/\[\]$/,""),!x){$[E]=k&&u(k,p);return}const T=k===null?[]:k.split(p.arrayFormatSeparator).map(B=>u(B,p));if($[E]===void 0){$[E]=T;return}$[E]=[].concat($[E],T)};default:return(E,k,$)=>{if($[E]===void 0){$[E]=k;return}$[E]=[].concat($[E],k)}}}function c(p){if(typeof p!="string"||p.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function f(p,w){return w.encode?w.strict?e(p):encodeURIComponent(p):p}function u(p,w){return w.decode?r(p):p}function d(p){return Array.isArray(p)?p.sort():typeof p=="object"?d(Object.keys(p)).sort((w,E)=>Number(w)-Number(E)).map(w=>p[w]):p}function h(p){const w=p.indexOf("#");return w!==-1&&(p=p.slice(0,w)),p}function v(p){let w="";const E=p.indexOf("#");return E!==-1&&(w=p.slice(E)),w}function y(p){p=h(p);const w=p.indexOf("?");return w===-1?"":p.slice(w+1)}function g(p,w){return w.parseNumbers&&!Number.isNaN(Number(p))&&typeof p=="string"&&p.trim()!==""?p=Number(p):w.parseBooleans&&p!==null&&(p.toLowerCase()==="true"||p.toLowerCase()==="false")&&(p=p.toLowerCase()==="true"),p}function b(p,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),c(w.arrayFormatSeparator);const E=l(w),k=Object.create(null);if(typeof p!="string"||(p=p.trim().replace(/^[?#&]/,""),!p))return k;for(const $ of p.split("&")){if($==="")continue;let[x,T]=n(w.decode?$.replace(/\+/g," "):$,"=");T=T===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?T:u(T,w),E(u(x,w),T,k)}for(const $ of Object.keys(k)){const x=k[$];if(typeof x=="object"&&x!==null)for(const T of Object.keys(x))x[T]=g(x[T],w);else k[$]=g(x,w)}return w.sort===!1?k:(w.sort===!0?Object.keys(k).sort():Object.keys(k).sort(w.sort)).reduce(($,x)=>{const T=k[x];return Boolean(T)&&typeof T=="object"&&!Array.isArray(T)?$[x]=d(T):$[x]=T,$},Object.create(null))}t.extract=y,t.parse=b,t.stringify=(p,w)=>{if(!p)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),c(w.arrayFormatSeparator);const E=T=>w.skipNull&&i(p[T])||w.skipEmptyString&&p[T]==="",k=a(w),$={};for(const T of Object.keys(p))E(T)||($[T]=p[T]);const x=Object.keys($);return w.sort!==!1&&x.sort(w.sort),x.map(T=>{const B=p[T];return B===void 0?"":B===null?f(T,w):Array.isArray(B)?B.length===0&&w.arrayFormat==="bracket-separator"?f(T,w)+"[]":B.reduce(k(T),[]).join("&"):f(T,w)+"="+f(B,w)}).filter(T=>T.length>0).join("&")},t.parseUrl=(p,w)=>{w=Object.assign({decode:!0},w);const[E,k]=n(p,"#");return Object.assign({url:E.split("?")[0]||"",query:b(y(p),w)},w&&w.parseFragmentIdentifier&&k?{fragmentIdentifier:u(k,w)}:{})},t.stringifyUrl=(p,w)=>{w=Object.assign({encode:!0,strict:!0,[o]:!0},w);const E=h(p.url).split("?")[0]||"",k=t.extract(p.url),$=t.parse(k,{sort:!1}),x=Object.assign($,p.query);let T=t.stringify(x,w);T&&(T=`?${T}`);let B=v(p.url);return p.fragmentIdentifier&&(B=`#${w[o]?f(p.fragmentIdentifier,w):p.fragmentIdentifier}`),`${E}${T}${B}`},t.pick=(p,w,E)=>{E=Object.assign({parseFragmentIdentifier:!0,[o]:!1},E);const{url:k,query:$,fragmentIdentifier:x}=t.parseUrl(p,E);return t.stringifyUrl({url:k,query:s($,w),fragmentIdentifier:x},E)},t.exclude=(p,w,E)=>{const k=Array.isArray(w)?$=>!w.includes($):($,x)=>!w($,x);return t.pick(p,k,E)}})(Ly);const bSe={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 mWe(t,e=[]){const r=[];return Object.keys(t).forEach(n=>{if(e.length&&!e.includes(n))return;const s=t[n];r.push(...s.accounts)}),r}function EG(t,e){return t.includes(":")?[t]:e.chains||[]}const SG="base10",cs="base16",TS="base64pad",_A="utf8",kG=0,D0=1,wSe=0,OI=1,RS=12,PA=32;function pWe(){const t=SA.generateKeyPair();return{privateKey:Wi(t.secretKey,cs),publicKey:Wi(t.publicKey,cs)}}function gWe(){const t=nx.randomBytes(PA);return Wi(t,cs)}function bWe(t,e){const r=SA.sharedKey(Ii(t,cs),Ii(e,cs)),n=new T6e(ax.SHA256,r).expand(PA);return Wi(n,cs)}function wWe(t){const e=ax.hash(Ii(t,cs));return Wi(e,cs)}function xWe(t){const e=ax.hash(Ii(t,_A));return Wi(e,cs)}function xSe(t){return Ii(`${t}`,SG)}function cx(t){return Number(Wi(t,SG))}function CWe(t){const e=xSe(typeof t.type<"u"?t.type:kG);if(cx(e)===D0&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Ii(t.senderPublicKey,cs):void 0,n=typeof t.iv<"u"?Ii(t.iv,cs):nx.randomBytes(RS),s=new CA.ChaCha20Poly1305(Ii(t.symKey,cs)).seal(n,Ii(t.message,_A));return CSe({type:e,sealed:s,iv:n,senderPublicKey:r})}function EWe(t){const e=new CA.ChaCha20Poly1305(Ii(t.symKey,cs)),{sealed:r,iv:n}=$G(t.encoded),s=e.open(n,r);if(s===null)throw new Error("Failed to decrypt");return Wi(s,_A)}function CSe(t){if(cx(t.type)===D0){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Wi(vI([t.type,t.senderPublicKey,t.iv,t.sealed]),TS)}return Wi(vI([t.type,t.iv,t.sealed]),TS)}function $G(t){const e=Ii(t,TS),r=e.slice(wSe,OI),n=OI;if(cx(r)===D0){const a=n+PA,l=a+RS,c=e.slice(n,a),f=e.slice(a,l),u=e.slice(l);return{type:r,sealed:u,iv:f,senderPublicKey:c}}const s=n+RS,i=e.slice(n,s),o=e.slice(s);return{type:r,sealed:o,iv:i}}function SWe(t,e){const r=$G(t);return ESe({type:cx(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Wi(r.senderPublicKey,cs):void 0,receiverPublicKey:e==null?void 0:e.receiverPublicKey})}function ESe(t){const e=(t==null?void 0:t.type)||kG;if(e===D0){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 kWe(t){return t.type===D0&&typeof t.senderPublicKey=="string"&&typeof t.receiverPublicKey=="string"}var SSe=Object.defineProperty,MI=Object.getOwnPropertySymbols,kSe=Object.prototype.hasOwnProperty,$Se=Object.prototype.propertyIsEnumerable,DI=(t,e,r)=>e in t?SSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,NI=(t,e)=>{for(var r in e||(e={}))kSe.call(e,r)&&DI(t,r,e[r]);if(MI)for(var r of MI(e))$Se.call(e,r)&&DI(t,r,e[r]);return t};const ASe="ReactNative",pl={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},_Se="js";function AG(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function PSe(){return!bG()&&!!$A()&&navigator.product===ASe}function TSe(){return!AG()&&!!$A()}function TA(){return PSe()?pl.reactNative:AG()?pl.node:TSe()?pl.browser:pl.unknown}function RSe(t,e){let r=Ly.parse(t);return r=NI(NI({},r),e),t=Ly.stringify(r),t}function $We(){return xG()||{name:"",description:"",url:"",icons:[""]}}function ISe(){if(TA()===pl.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=z3e();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 OSe(){var t;const e=TA();return e===pl.browser?[e,((t=wG())==null?void 0:t.host)||"unknown"].join(":"):e}function MSe(t,e,r){const n=ISe(),s=OSe();return[[t,e].join("-"),[_Se,r].join("-"),n,s].join("/")}function AWe({protocol:t,version:e,relayUrl:r,sdkVersion:n,auth:s,projectId:i,useOnCloseEvent:o}){const a=r.split("?"),l=MSe(t,e,n),c={auth:s,ua:l,projectId:i,useOnCloseEvent:o||void 0},f=RSe(a[1]||"",c);return a[0]+"?"+f}function Xc(t,e){return t.filter(r=>e.includes(r)).length===t.length}function _We(t){return Object.fromEntries(t.entries())}function PWe(t){return new Map(Object.entries(t))}function TWe(t=cf.FIVE_MINUTES,e){const r=cf.toMiliseconds(t||cf.FIVE_MINUTES);let n,s,i;return{resolve:o=>{i&&n&&(clearTimeout(i),n(o))},reject:o=>{i&&s&&(clearTimeout(i),s(o))},done:()=>new Promise((o,a)=>{i=setTimeout(()=>{a(new Error(e))},r),n=o,s=a})}}function RWe(t,e,r){return new Promise(async(n,s)=>{const i=setTimeout(()=>s(new Error(r)),e);try{const o=await t;n(o)}catch(o){s(o)}clearTimeout(i)})}function _G(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 IWe(t){return _G("topic",t)}function OWe(t){return _G("id",t)}function MWe(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 DWe(t,e){return cf.fromMiliseconds((e||Date.now())+cf.toMiliseconds(t))}function NWe(t){return Date.now()>=cf.toMiliseconds(t)}function LWe(t,e){return`${t}${e?`:${e}`:""}`}function WE(t=[],e=[]){return[...new Set([...t,...e])]}async function jWe({id:t,topic:e,wcDeepLink:r}){try{if(!r)return;const n=typeof r=="string"?JSON.parse(r):r;let s=n==null?void 0:n.href;if(typeof s!="string")return;s.endsWith("/")&&(s=s.slice(0,-1));const i=`${s}/wc?requestId=${t}&sessionTopic=${e}`,o=TA();o===pl.browser?i.startsWith("https://")?window.open(i,"_blank","noreferrer noopener"):window.open(i,"_self","noreferrer noopener"):o===pl.reactNative&&typeof(global==null?void 0:global.Linking)<"u"&&await global.Linking.openURL(i)}catch(n){console.error(n)}}const DSe="irn";function FWe(t){return(t==null?void 0:t.relay)||{protocol:DSe}}function BWe(t){const e=bSe[t];if(typeof e>"u")throw new Error(`Relay Protocol not supported: ${t}`);return e}var NSe=Object.defineProperty,LI=Object.getOwnPropertySymbols,LSe=Object.prototype.hasOwnProperty,jSe=Object.prototype.propertyIsEnumerable,jI=(t,e,r)=>e in t?NSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,FSe=(t,e)=>{for(var r in e||(e={}))LSe.call(e,r)&&jI(t,r,e[r]);if(LI)for(var r of LI(e))jSe.call(e,r)&&jI(t,r,e[r]);return t};function BSe(t,e="-"){const r={},n="relay"+e;return Object.keys(t).forEach(s=>{if(s.startsWith(n)){const i=s.replace(n,""),o=t[s];r[i]=o}}),r}function UWe(t){const e=t.indexOf(":"),r=t.indexOf("?")!==-1?t.indexOf("?"):void 0,n=t.substring(0,e),s=t.substring(e+1,r).split("@"),i=typeof r<"u"?t.substring(r):"",o=Ly.parse(i);return{protocol:n,topic:USe(s[0]),version:parseInt(s[1],10),symKey:o.symKey,relay:BSe(o)}}function USe(t){return t.startsWith("//")?t.substring(2):t}function zSe(t,e="-"){const r="relay",n={};return Object.keys(t).forEach(s=>{const i=r+e+s;t[s]&&(n[i]=t[s])}),n}function zWe(t){return`${t.protocol}:${t.topic}@${t.version}?`+Ly.stringify(FSe({symKey:t.symKey},zSe(t.relay)))}var VSe=Object.defineProperty,qSe=Object.defineProperties,WSe=Object.getOwnPropertyDescriptors,FI=Object.getOwnPropertySymbols,HSe=Object.prototype.hasOwnProperty,GSe=Object.prototype.propertyIsEnumerable,BI=(t,e,r)=>e in t?VSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,KSe=(t,e)=>{for(var r in e||(e={}))HSe.call(e,r)&&BI(t,r,e[r]);if(FI)for(var r of FI(e))GSe.call(e,r)&&BI(t,r,e[r]);return t},QSe=(t,e)=>qSe(t,WSe(e));function Bh(t){const e=[];return t.forEach(r=>{const[n,s]=r.split(":");e.push(`${n}:${s}`)}),e}function YSe(t){const e=[];return Object.values(t).forEach(r=>{e.push(...Bh(r.accounts))}),e}function JSe(t,e){const r=[];return Object.values(t).forEach(n=>{Bh(n.accounts).includes(e)&&r.push(...n.methods)}),r}function XSe(t,e){const r=[];return Object.values(t).forEach(n=>{Bh(n.accounts).includes(e)&&r.push(...n.events)}),r}function VWe(t,e){const r=lke(t,e);if(r)throw new Error(r.message);const n={};for(const[s,i]of Object.entries(t))n[s]={methods:i.methods,events:i.events,chains:i.accounts.map(o=>`${o.split(":")[0]}:${o.split(":")[1]}`)};return n}function PG(t){return t.includes(":")}function ZSe(t){return PG(t)?t.split(":")[0]:t}function TG(t){var e,r,n;const s={};if(!RA(t))return s;for(const[i,o]of Object.entries(t)){const a=PG(i)?[i]:o.chains,l=o.methods||[],c=o.events||[],f=ZSe(i);s[f]=QSe(KSe({},s[f]),{chains:WE(a,(e=s[f])==null?void 0:e.chains),methods:WE(l,(r=s[f])==null?void 0:r.methods),events:WE(c,(n=s[f])==null?void 0:n.events)})}return s}const eke={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}},tke={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 cl(t,e){const{message:r,code:n}=tke[t];return{message:e?`${r} ${e}`:r,code:n}}function eh(t,e){const{message:r,code:n}=eke[t];return{message:e?`${r} ${e}`:r,code:n}}function fx(t,e){return Array.isArray(t)?typeof e<"u"&&t.length?t.every(e):!0:!1}function RA(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function ff(t){return typeof t>"u"}function di(t,e){return e&&ff(t)?!0:typeof t=="string"&&!!t.trim().length}function IA(t,e){return e&&ff(t)?!0:typeof t=="number"&&!isNaN(t)}function qWe(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),s=Object.keys(r);let i=!0;return Xc(s,n)?(n.forEach(o=>{const{accounts:a,methods:l,events:c}=t.namespaces[o],f=Bh(a),u=r[o];(!Xc(EG(o,u),f)||!Xc(u.methods,l)||!Xc(u.events,c))&&(i=!1)}),i):!1}function Rb(t){return di(t,!1)&&t.includes(":")?t.split(":").length===2:!1}function rke(t){if(di(t,!1)&&t.includes(":")){const e=t.split(":");if(e.length===3){const r=e[0]+":"+e[1];return!!e[2]&&Rb(r)}}return!1}function WWe(t){if(di(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function HWe(t){var e;return(e=t==null?void 0:t.proposer)==null?void 0:e.publicKey}function GWe(t){return t==null?void 0:t.topic}function KWe(t,e){let r=null;return di(t==null?void 0:t.publicKey,!1)||(r=cl("MISSING_OR_INVALID",`${e} controller public key should be a string`)),r}function UI(t){let e=!0;return fx(t)?t.length&&(e=t.every(r=>di(r,!1))):e=!1,e}function nke(t,e,r){let n=null;return fx(e)&&e.length?e.forEach(s=>{n||Rb(s)||(n=eh("UNSUPPORTED_CHAINS",`${r}, chain ${s} should be a string and conform to "namespace:chainId" format`))}):Rb(t)||(n=eh("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 ske(t,e,r){let n=null;return Object.entries(t).forEach(([s,i])=>{if(n)return;const o=nke(s,EG(s,i),`${e} ${r}`);o&&(n=o)}),n}function ike(t,e){let r=null;return fx(t)?t.forEach(n=>{r||rke(n)||(r=eh("UNSUPPORTED_ACCOUNTS",`${e}, account ${n} should be a string and conform to "namespace:chainId:address" format`))}):r=eh("UNSUPPORTED_ACCOUNTS",`${e}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}function oke(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ike(n==null?void 0:n.accounts,`${e} namespace`);s&&(r=s)}),r}function ake(t,e){let r=null;return UI(t==null?void 0:t.methods)?UI(t==null?void 0:t.events)||(r=eh("UNSUPPORTED_EVENTS",`${e}, events should be an array of strings or empty array for no events`)):r=eh("UNSUPPORTED_METHODS",`${e}, methods should be an array of strings or empty array for no methods`),r}function RG(t,e){let r=null;return Object.values(t).forEach(n=>{if(r)return;const s=ake(n,`${e}, namespace`);s&&(r=s)}),r}function QWe(t,e,r){let n=null;if(t&&RA(t)){const s=RG(t,e);s&&(n=s);const i=ske(t,e,r);i&&(n=i)}else n=cl("MISSING_OR_INVALID",`${e}, ${r} should be an object with data`);return n}function lke(t,e){let r=null;if(t&&RA(t)){const n=RG(t,e);n&&(r=n);const s=oke(t,e);s&&(r=s)}else r=cl("MISSING_OR_INVALID",`${e}, namespaces should be an object with data`);return r}function cke(t){return di(t.protocol,!0)}function YWe(t,e){let r=!1;return e&&!t?r=!0:t&&fx(t)&&t.length&&t.forEach(n=>{r=cke(n)}),r}function JWe(t){return typeof t=="number"}function XWe(t){return typeof t<"u"&&typeof t!==null}function ZWe(t){return!(!t||typeof t!="object"||!t.code||!IA(t.code,!1)||!t.message||!di(t.message,!1))}function eHe(t){return!(ff(t)||!di(t.method,!1))}function tHe(t){return!(ff(t)||ff(t.result)&&ff(t.error)||!IA(t.id,!1)||!di(t.jsonrpc,!1))}function rHe(t){return!(ff(t)||!di(t.name,!1))}function nHe(t,e){return!(!Rb(e)||!YSe(t).includes(e))}function sHe(t,e,r){return di(r,!1)?JSe(t,e).includes(r):!1}function iHe(t,e,r){return di(r,!1)?XSe(t,e).includes(r):!1}function oHe(t,e,r){let n=null;const s=fke(t),i=uke(e),o=Object.keys(s),a=Object.keys(i),l=zI(Object.keys(t)),c=zI(Object.keys(e)),f=l.filter(u=>!c.includes(u));return f.length&&(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. Required: ${f.toString()} - Received: ${Object.keys(e).toString()}`)),Jc(o,a)||(n=ll("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. + Received: ${Object.keys(e).toString()}`)),Xc(o,a)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. Required: ${o.toString()} - Approved: ${a.toString()}`)),Object.keys(e).forEach(u=>{if(!u.includes(":")||n)return;const d=Fh(e[u].accounts);d.includes(u)||(n=ll("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${u} + Approved: ${a.toString()}`)),Object.keys(e).forEach(u=>{if(!u.includes(":")||n)return;const d=Bh(e[u].accounts);d.includes(u)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${u} Required: ${u} - Approved: ${d.toString()}`))}),o.forEach(u=>{n||(Jc(s[u].methods,i[u].methods)?Jc(s[u].events,i[u].events)||(n=ll("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${u}`)):n=ll("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${u}`))}),n}function fke(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(s=>{e[s]={methods:t[r].methods,events:t[r].events}})}),e}function UI(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function uke(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=Fh(t[r].accounts);n==null||n.forEach(s=>{e[s]={accounts:t[r].accounts.filter(i=>i.includes(`${s}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function oHe(t,e){return RA(t,!1)&&t<=e.max&&t>=e.min}var IG="eip155",dke="store",OG="requestedChains",RS="wallet_addEthereumChain",lr,bv,qp,IS,IA,MG,Wp,OS,MS,DG,Rb,OA,Au,L1,Ib,MA,Ob,DA,Mb,NA,hke=class extends c4{constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),ms(this,qp),ms(this,IA),ms(this,Wp),ms(this,MS),ms(this,Rb),ms(this,Au),ms(this,Ib),ms(this,Ob),ms(this,Mb),ar(this,"id","walletConnect"),ar(this,"name","WalletConnect"),ar(this,"ready",!0),ms(this,lr,void 0),ms(this,bv,void 0),ar(this,"onAccountsChanged",e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:Pl(e[0])})}),ar(this,"onChainChanged",e=>{const r=Number(e),n=this.isChainUnsupported(r);this.emit("change",{chain:{id:r,unsupported:n}})}),ar(this,"onDisconnect",()=>{Qr(this,Au,L1).call(this,[]),this.emit("disconnect")}),ar(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),ar(this,"onConnect",()=>{this.emit("connect",{})}),Qr(this,qp,IS).call(this)}async connect({chainId:t,pairingTopic:e}={}){var r,n,s,i,o;try{let a=t;if(!a){const v=(r=this.storage)==null?void 0:r.getItem(dke),y=(i=(s=(n=v==null?void 0:v.state)==null?void 0:n.data)==null?void 0:s.chain)==null?void 0:i.id;y&&!this.isChainUnsupported(y)?a=y:a=(o=this.chains[0])==null?void 0:o.id}if(!a)throw new Error("No chains found on connector.");const l=await this.getProvider();Qr(this,MS,DG).call(this);const c=Qr(this,Wp,OS).call(this);if(l.session&&c&&await l.disconnect(),!l.session||c){const v=this.chains.filter(y=>y.id!==a).map(y=>y.id);this.emit("message",{type:"connecting"}),await l.connect({pairingTopic:e,chains:[a],optionalChains:v.length?v:void 0}),Qr(this,Au,L1).call(this,this.chains.map(({id:y})=>y))}const f=await l.enable(),u=Pl(f[0]),d=await this.getChainId(),h=this.isChainUnsupported(d);return{account:u,chain:{id:d,unsupported:h}}}catch(a){throw/user rejected/i.test(a==null?void 0:a.message)?new En(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{Qr(this,Rb,OA).call(this),Qr(this,Au,L1).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();return Pl(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider({chainId:t}={}){return er(this,lr)||await Qr(this,qp,IS).call(this),t&&await this.switchChain(t),er(this,lr)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return O4({account:r,chain:n,transport:_4(e)})}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),r=Qr(this,Wp,OS).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(s=>s.id===t);if(!e)throw new ql(new Error("chain not found on connector."));try{const s=await this.getProvider(),i=Qr(this,Ob,DA).call(this),o=Qr(this,Mb,NA).call(this);if(!i.includes(t)&&o.includes(RS)){await s.request({method:RS,params:[{chainId:We(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 l=Qr(this,Ib,MA).call(this);l.push(t),Qr(this,Au,L1).call(this,l)}return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:We(t)}]}),e}catch(s){const i=typeof s=="string"?s:s==null?void 0:s.message;throw/user rejected request/i.test(i)?new En(s):new ql(s)}}};lr=new WeakMap;bv=new WeakMap;qp=new WeakSet;IS=async function(){return!er(this,bv)&&typeof window<"u"&&kw(this,bv,Qr(this,IA,MG).call(this)),er(this,bv)};IA=new WeakSet;MG=async function(){const{EthereumProvider:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:r}=await ZV(()=>import("./index.es-5f20ba08.js"),[],import.meta.url),[n,...s]=this.chains.map(({id:i})=>i);if(n){const{projectId:i,showQrModal:o=!0,qrModalOptions:a,metadata:l,relayUrl:c}=this.options;kw(this,lr,await t.init({showQrModal:o,qrModalOptions:a,projectId:i,optionalMethods:r,optionalEvents:e,chains:[n],optionalChains:s.length?s:void 0,rpcMap:Object.fromEntries(this.chains.map(f=>[f.id,f.rpcUrls.default.http[0]])),metadata:l,relayUrl:c}))}};Wp=new WeakSet;OS=function(){if(Qr(this,Mb,NA).call(this).includes(RS)||!this.options.isNewChainsStale)return!1;const e=Qr(this,Ib,MA).call(this),r=this.chains.map(({id:s})=>s),n=Qr(this,Ob,DA).call(this);return n.length&&!n.some(s=>r.includes(s))?!1:!r.every(s=>e.includes(s))};MS=new WeakSet;DG=function(){er(this,lr)&&(Qr(this,Rb,OA).call(this),er(this,lr).on("accountsChanged",this.onAccountsChanged),er(this,lr).on("chainChanged",this.onChainChanged),er(this,lr).on("disconnect",this.onDisconnect),er(this,lr).on("session_delete",this.onDisconnect),er(this,lr).on("display_uri",this.onDisplayUri),er(this,lr).on("connect",this.onConnect))};Rb=new WeakSet;OA=function(){er(this,lr)&&(er(this,lr).removeListener("accountsChanged",this.onAccountsChanged),er(this,lr).removeListener("chainChanged",this.onChainChanged),er(this,lr).removeListener("disconnect",this.onDisconnect),er(this,lr).removeListener("session_delete",this.onDisconnect),er(this,lr).removeListener("display_uri",this.onDisplayUri),er(this,lr).removeListener("connect",this.onConnect))};Au=new WeakSet;L1=function(t){var e;(e=this.storage)==null||e.setItem(OG,t)};Ib=new WeakSet;MA=function(){var t;return((t=this.storage)==null?void 0:t.getItem(OG))??[]};Ob=new WeakSet;DA=function(){var n,s,i;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((i=(s=TG(t)[IG])==null?void 0:s.chains)==null?void 0:i.map(o=>parseInt(o.split(":")[1]||"")))??[]:[]};Mb=new WeakSet;NA=function(){var n,s;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((s=TG(t)[IG])==null?void 0:s.methods)??[]:[]};const LA=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),fx=m.createContext({});function vke(){return m.useContext(fx).visualElement}const ux=m.createContext(null),dx=typeof document<"u",zI=dx?m.useLayoutEffect:m.useEffect,NG=m.createContext({strict:!1});function yke(t,e,r,n){const s=vke(),i=m.useContext(NG),o=m.useContext(ux),a=m.useContext(LA).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return zI(()=>{c&&c.render()}),(window.HandoffAppearAnimations?zI:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Gu(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mke(t,e,r){return m.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 Ly(t){return typeof t=="string"||Array.isArray(t)}function hx(t){return typeof t=="object"&&typeof t.start=="function"}const pke=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function vx(t){return hx(t.animate)||pke.some(e=>Ly(t[e]))}function LG(t){return Boolean(vx(t)||t.variants)}function gke(t,e){if(vx(t)){const{initial:r,animate:n}=t;return{initial:r===!1||Ly(r)?r:void 0,animate:Ly(n)?n:void 0}}return t.inherit!==!1?e:{}}function bke(t){const{initial:e,animate:r}=gke(t,m.useContext(fx));return m.useMemo(()=>({initial:e,animate:r}),[VI(e),VI(r)])}function VI(t){return Array.isArray(t)?t.join(" "):t}const Uo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),jy={measureLayout:Uo(["layout","layoutId","drag"]),animation:Uo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:Uo(["exit"]),drag:Uo(["drag","dragControls"]),focus:Uo(["whileFocus"]),hover:Uo(["whileHover","onHoverStart","onHoverEnd"]),tap:Uo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:Uo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:Uo(["whileInView","onViewportEnter","onViewportLeave"])};function wke(t){for(const e in t)e==="projectionNodeConstructor"?jy.projectionNodeConstructor=t[e]:jy[e].Component=t[e]}function jA(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const wv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let xke=1;function Cke(){return jA(()=>{if(wv.hasEverUpdated)return xke++})}const jG=m.createContext({});class Eke extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const FG=m.createContext({}),Ske=Symbol.for("motionComponentSymbol");function kke({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&wke(t);function o(l,c){const f={...m.useContext(LA),...l,layoutId:$ke(l)},{isStatic:u}=f;let d=null;const h=bke(l),v=u?void 0:Cke(),y=s(l,u);if(!u&&dx){h.visualElement=yke(i,y,f,e);const b=m.useContext(NG).strict,p=m.useContext(FG);h.visualElement&&(d=h.visualElement.loadFeatures(f,b,t,v,r||jy.projectionNodeConstructor,p))}return m.createElement(Eke,{visualElement:h.visualElement,props:f},d,m.createElement(fx.Provider,{value:h},n(i,l,v,mke(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Ske]=i,a}function $ke({layoutId:t}){const e=m.useContext(jG).id;return e&&t!==void 0?e+"-"+t:t}function Ake(t){function e(n,s={}){return kke(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const _ke=["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 FA(t){return typeof t!="string"||t.includes("-")?!1:!!(_ke.indexOf(t)>-1||/[A-Z]/.test(t))}const Db={};function Pke(t){Object.assign(Db,t)}const Nb=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Bh=new Set(Nb);function BG(t,{layout:e,layoutId:r}){return Bh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Db[t]||t==="opacity")}const us=t=>!!(t!=null&&t.getVelocity),Tke={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rke=(t,e)=>Nb.indexOf(t)-Nb.indexOf(e);function Ike({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Rke);for(const a of e)o+=`${Tke[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function UG(t){return t.startsWith("--")}const Oke=(t,e)=>e&&typeof t=="number"?e.transform(t):t,eh=(t,e,r)=>Math.min(Math.max(r,t),e),Gf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xv={...Gf,transform:t=>eh(0,1,t)},Lm={...Gf,default:1},Cv=t=>Math.round(t*1e5)/1e5,Fy=/(-)?([\d]*\.?[\d])+/g,DS=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mke=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function D0(t){return typeof t=="string"}const N0=t=>({test:e=>D0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ka=N0("deg"),$o=N0("%"),Ee=N0("px"),Dke=N0("vh"),Nke=N0("vw"),qI={...$o,parse:t=>$o.parse(t)/100,transform:t=>$o.transform(t*100)},WI={...Gf,transform:Math.round},zG={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,size:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,rotate:Ka,rotateX:Ka,rotateY:Ka,rotateZ:Ka,scale:Lm,scaleX:Lm,scaleY:Lm,scaleZ:Lm,skew:Ka,skewX:Ka,skewY:Ka,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:xv,originX:qI,originY:qI,originZ:Ee,zIndex:WI,fillOpacity:xv,strokeOpacity:xv,numOctaves:WI};function BA(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(UG(d)){i[d]=h;continue}const v=zG[d],y=Oke(h,v);if(Bh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Ike(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const UA=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function VG(t,e,r){for(const n in e)!us(e[n])&&!BG(n,r)&&(t[n]=e[n])}function Lke({transformTemplate:t},e,r){return m.useMemo(()=>{const n=UA();return BA(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function jke(t,e,r){const n=t.style||{},s={};return VG(s,n,t),Object.assign(s,Lke(t,e,r)),t.transformValues?t.transformValues(s):s}function Fke(t,e,r){const n={},s=jke(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const Bke=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 Lb(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Bke.has(t)}let qG=t=>!Lb(t);function Uke(t){t&&(qG=e=>e.startsWith("on")?!Lb(e):t(e))}try{Uke(require("@emotion/is-prop-valid").default)}catch{}function zke(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(qG(s)||r===!0&&Lb(s)||!e&&!Lb(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function HI(t,e,r){return typeof t=="string"?t:Ee.transform(e+r*t)}function Vke(t,e,r){const n=HI(e,t.x,t.width),s=HI(r,t.y,t.height);return`${n} ${s}`}const qke={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wke={offset:"strokeDashoffset",array:"strokeDasharray"};function Hke(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?qke:Wke;t[i.offset]=Ee.transform(-n);const o=Ee.transform(e),a=Ee.transform(r);t[i.array]=`${o} ${a}`}function zA(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(BA(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=Vke(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&Hke(d,i,o,a,!1)}const WG=()=>({...UA(),attrs:{}}),VA=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Gke(t,e,r,n){const s=m.useMemo(()=>{const i=WG();return zA(i,e,{enableHardwareAcceleration:!1},VA(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};VG(i,t.style,t),s.style={...i,...s.style}}return s}function Kke(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(FA(r)?Gke:Fke)(n,o,a,r),u={...zke(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>us(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const qA=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HG(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const GG=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 KG(t,e,r,n){HG(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(GG.has(s)?s:qA(s),e.attrs[s])}function WA(t,e){const{style:r}=t,n={};for(const s in r)(us(r[s])||e.style&&us(e.style[s])||BG(s,t))&&(n[s]=r[s]);return n}function QG(t,e){const r=WA(t,e);for(const n in t)if(us(t[n])||us(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function HA(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const jb=t=>Array.isArray(t),Qke=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),Yke=t=>jb(t)?t[t.length-1]||0:t;function Hp(t){const e=us(t)?t.get():t;return Qke(e)?e.toValue():e}function Jke({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:Xke(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const YG=t=>(e,r)=>{const n=m.useContext(fx),s=m.useContext(ux),i=()=>Jke(t,e,n,s);return r?i():jA(i)};function Xke(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Hp(i[d]);let{initial:o,animate:a}=t;const l=vx(t),c=LG(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!hx(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=HA(t,h);if(!v)return;const{transitionEnd:y,transition:b,...p}=v;for(const g in p){let w=p[g];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[g]=w)}for(const g in y)s[g]=y[g]}),s}const Zke={useVisualState:YG({scrapeMotionValuesFromProps:QG,createRenderState:WG,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}}zA(r,n,{enableHardwareAcceleration:!1},VA(e.tagName),t.transformTemplate),KG(e,r)}})},e8e={useVisualState:YG({scrapeMotionValuesFromProps:WA,createRenderState:UA})};function t8e(t,{forwardMotionProps:e=!1},r,n,s){return{...FA(t)?Zke:e8e,preloadedFeatures:r,useRender:Kke(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var gt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(gt||(gt={}));function yx(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function NS(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return yx(s,e,r,n)},[t,e,r,n])}function r8e({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(gt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(gt.Focus,!1)},[r]);NS(e,"focus",t?n:void 0),NS(e,"blur",t?s:void 0)}const JG=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function GA(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const XG=t=>e=>JG(e)&&t(e,GA(e));function bd(t,e,r,n){return yx(t,e,XG(r),n)}function Fb(t,e,r,n){return NS(t,e,r&&XG(r),n)}function ZG(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const GI=ZG("dragHorizontal"),KI=ZG("dragVertical");function eK(t){let e=!1;if(t==="y")e=KI();else if(t==="x")e=GI();else{const r=GI(),n=KI();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function tK(){const t=eK(!0);return t?(t(),!1):!0}function QI(t,e,r,n){return(s,i)=>{s.type==="touch"||tK()||(r&&t.animationState&&t.animationState.setActive(gt.Hover,e),n&&n(s,i))}}function n8e({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Fb(n,"pointerenter",m.useMemo(()=>t||r?QI(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Fb(n,"pointerleave",m.useMemo(()=>e||r?QI(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const rK=(t,e)=>e?t===e?!0:rK(t,e.parentElement):!1;function nK(t){return m.useEffect(()=>()=>t(),[])}const s8e=(t,e)=>r=>e(t(r)),mx=(...t)=>t.reduce(s8e);function i8e({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!1),!tK()}function d(y,b){var p,g,w,E;u()&&(rK(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,b):(g=(p=s.getProps()).onTapCancel)===null||g===void 0||g.call(p,y,b))}function h(y,b){var p,g;u()&&((g=(p=s.getProps()).onTapCancel)===null||g===void 0||g.call(p,y,b))}const v=m.useCallback((y,b)=>{var p;if(f(),a.current)return;a.current=!0,l.current=mx(bd(window,"pointerup",d,c),bd(window,"pointercancel",h,c));const g=s.getProps();g.whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!0),(p=g.onTapStart)===null||p===void 0||p.call(g,y,b)},[Boolean(e),s]);Fb(s,"pointerdown",o?v:void 0,c),nK(f)}const LS=new WeakMap,WE=new WeakMap,o8e=t=>{const e=LS.get(t.target);e&&e(t)},a8e=t=>{t.forEach(o8e)};function l8e({root:t,...e}){const r=t||document;WE.has(r)||WE.set(r,{});const n=WE.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(a8e,{root:t,...e})),n[s]}function c8e(t,e,r){const n=l8e(e);return LS.set(t,r),n.observe(t),()=>{LS.delete(t),n.unobserve(t)}}function f8e({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?h8e:d8e)(o,i.current,t,s)}const u8e={some:0,all:1};function d8e(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:u8e[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(gt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return c8e(r.current,a,l)},[t,n,s,i])}function h8e(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(gt.InView,!0)})},[t])}const pl=t=>e=>(t(e),null),v8e={inView:pl(f8e),tap:pl(i8e),focus:pl(r8e),hover:pl(n8e)};function sK(){const t=m.useContext(ux);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function iK(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),m8e=t=>/^0[^.\s]+$/.test(t),aa={delta:0,timestamp:0},oK=1/60*1e3,p8e=typeof performance<"u"?()=>performance.now():()=>Date.now(),aK=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(p8e()),oK);function g8e(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=g8e(()=>By=!0),t),{}),Wn=L0.reduce((t,e)=>{const r=px[e];return t[e]=(n,s=!1,i=!1)=>(By||x8e(),r.schedule(n,s,i)),t},{}),Kl=L0.reduce((t,e)=>(t[e]=px[e].cancel,t),{}),HE=L0.reduce((t,e)=>(t[e]=()=>px[e].process(aa),t),{}),w8e=t=>px[t].process(aa),lK=t=>{By=!1,aa.delta=jS?oK:Math.max(Math.min(t-aa.timestamp,b8e),1),aa.timestamp=t,FS=!0,L0.forEach(w8e),FS=!1,By&&(jS=!1,aK(lK))},x8e=()=>{By=!0,jS=!0,FS||aK(lK)};function KA(t,e){t.indexOf(e)===-1&&t.push(e)}function QA(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class YA{constructor(){this.subscriptions=[]}add(e){return KA(this.subscriptions,e),()=>QA(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class E8e{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=aa;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Wn.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Wn.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=C8e(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new YA);const n=this.events[e].add(r);return e==="change"?()=>{n(),Wn.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?JA(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 th(t,e){return new E8e(t,e)}const XA=(t,e)=>r=>Boolean(D0(r)&&Mke.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),cK=(t,e,r)=>n=>{if(!D0(n))return n;const[s,i,o,a]=n.match(Fy);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},S8e=t=>eh(0,255,t),GE={...Gf,transform:t=>Math.round(S8e(t))},Xc={test:XA("rgb","red"),parse:cK("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+GE.transform(t)+", "+GE.transform(e)+", "+GE.transform(r)+", "+Cv(xv.transform(n))+")"};function k8e(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const BS={test:XA("#"),parse:k8e,transform:Xc.transform},Ku={test:XA("hsl","hue"),parse:cK("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+$o.transform(Cv(e))+", "+$o.transform(Cv(r))+", "+Cv(xv.transform(n))+")"},Mn={test:t=>Xc.test(t)||BS.test(t)||Ku.test(t),parse:t=>Xc.test(t)?Xc.parse(t):Ku.test(t)?Ku.parse(t):BS.parse(t),transform:t=>D0(t)?t:t.hasOwnProperty("red")?Xc.transform(t):Ku.transform(t)},fK="${c}",uK="${n}";function $8e(t){var e,r;return isNaN(t)&&D0(t)&&(((e=t.match(Fy))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(DS))===null||r===void 0?void 0:r.length)||0)>0}function Bb(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(DS);s&&(r=s.length,t=t.replace(DS,fK),e.push(...s.map(Mn.parse)));const i=t.match(Fy);return i&&(n=i.length,t=t.replace(Fy,uK),e.push(...i.map(Gf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function dK(t){return Bb(t).values}function hK(t){const{values:e,numColors:r,tokenised:n}=Bb(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function _8e(t){const e=dK(t);return hK(t)(e.map(A8e))}const Ql={test:$8e,parse:dK,createTransformer:hK,getAnimatableNone:_8e},P8e=new Set(["brightness","contrast","saturate","opacity"]);function T8e(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(Fy)||[];if(!n)return t;const s=r.replace(n,"");let i=P8e.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const R8e=/([a-z-]*)\(.*?\)/g,US={...Ql,getAnimatableNone:t=>{const e=t.match(R8e);return e?e.map(T8e).join(" "):t}},I8e={...zG,color:Mn,backgroundColor:Mn,outlineColor:Mn,fill:Mn,stroke:Mn,borderColor:Mn,borderTopColor:Mn,borderRightColor:Mn,borderBottomColor:Mn,borderLeftColor:Mn,filter:US,WebkitFilter:US},ZA=t=>I8e[t];function e_(t,e){var r;let n=ZA(t);return n!==US&&(n=Ql),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const vK=t=>e=>e.test(t),O8e={test:t=>t==="auto",parse:t=>t},yK=[Gf,Ee,$o,Ka,Nke,Dke,O8e],w1=t=>yK.find(vK(t)),M8e=[...yK,Mn,Ql],D8e=t=>M8e.find(vK(t));function N8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function L8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function gx(t,e,r){const n=t.getProps();return HA(n,e,r!==void 0?r:n.custom,N8e(t),L8e(t))}function j8e(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,th(r))}function F8e(t,e){const r=gx(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=Yke(i[o]);j8e(t,o,a)}}function B8e(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,W8e={current:!1},t_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,r_=t=>e=>1-t(1-e),n_=t=>t*t,H8e=r_(n_),s_=t_(n_),xr=(t,e,r)=>-r*t+r*e+t;function KE(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 G8e({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=KE(l,a,t+1/3),i=KE(l,a,t),o=KE(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const QE=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},K8e=[BS,Xc,Ku],Q8e=t=>K8e.find(e=>e.test(t));function YI(t){const e=Q8e(t);let r=e.parse(t);return e===Ku&&(r=G8e(r)),r}const mK=(t,e)=>{const r=YI(t),n=YI(e),s={...r};return i=>(s.red=QE(r.red,n.red,i),s.green=QE(r.green,n.green,i),s.blue=QE(r.blue,n.blue,i),s.alpha=xr(r.alpha,n.alpha,i),Xc.transform(s))};function pK(t,e){return typeof t=="number"?r=>xr(t,e,r):Mn.test(t)?mK(t,e):bK(t,e)}const gK=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>pK(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=pK(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},bK=(t,e)=>{const r=Ql.createTransformer(e),n=Bb(t),s=Bb(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?mx(gK(n.values,s.values),r):o=>`${o>0?e:t}`},zb=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},JI=(t,e)=>r=>xr(t,e,r);function J8e(t){return typeof t=="number"?JI:typeof t=="string"?Mn.test(t)?mK:bK:Array.isArray(t)?gK:typeof t=="object"?Y8e:JI}function X8e(t,e,r){const n=[],s=r||J8e(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=X8e(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(eh(t[0],t[i-1],c)):l}const i_=t=>t,xK=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Z8e=1e-7,e$e=12;function t$e(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=xK(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>Z8e&&++at$e(i,0,1,t,r);return i=>i===0||i===1?i:xK(s(i),e,n)}const EK=t=>1-Math.sin(Math.acos(t)),o_=r_(EK),r$e=t_(o_),SK=CK(.33,1.53,.69,.99),a_=r_(SK),n$e=t_(a_),s$e=t=>(t*=2)<1?.5*a_(t):.5*(2-Math.pow(2,-10*(t-1))),i$e={linear:i_,easeIn:n_,easeInOut:s_,easeOut:H8e,circIn:EK,circInOut:r$e,circOut:o_,backIn:a_,backInOut:n$e,backOut:SK,anticipate:s$e},XI=t=>{if(Array.isArray(t)){Bl(t.length===4);const[e,r,n,s]=t;return CK(e,r,n,s)}else if(typeof t=="string")return i$e[t];return t},o$e=t=>Array.isArray(t)&&typeof t[0]!="number";function a$e(t,e){return t.map(()=>e||s_).splice(0,t.length-1)}function l$e(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function c$e(t,e){return t.map(r=>r*e)}function zS({keyframes:t,ease:e=s_,times:r,duration:n=300}){t=[...t];const s=o$e(e)?e.map(XI):XI(e),i={done:!1,value:t[0]},o=c$e(r&&r.length===t.length?r:l$e(t),n);function a(){return wK(o,t,{ease:Array.isArray(s)?s:a$e(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const YE=.001,f$e=.01,ZI=10,u$e=.05,d$e=1;function h$e({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;WB(t<=ZI*1e3);let o=1-e;o=eh(u$e,d$e,o),t=eh(f$e,ZI,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=VS(c,o),v=Math.exp(-u);return YE-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=VS(Math.pow(c,2),o);return(-s(c)+YE>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-YE+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=y$e(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const v$e=12;function y$e(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function g$e(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!eO(t,p$e)&&eO(t,m$e)){const r=h$e(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const b$e=5;function kK({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=g$e(n);let h=w$e,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function b(){const p=i-s,g=Math.sqrt(a/c)/1e3,w=Math.abs(p)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=VS(g,y);h=k=>{const $=Math.exp(-y*g*k);return i-$*((v+y*g*p)/E*Math.sin(E*k)+p*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-g*E)*(p+(v+g*p)*E);else{const E=g*Math.sqrt(y*y-1);h=k=>{const $=Math.exp(-y*g*k),C=Math.min(E*k,300);return i-$*((v+y*g*p)*Math.sinh(C)+E*p*Math.cosh(C))/E}}}return b(),{next:p=>{const g=h(p);if(d)o.done=p>=u;else{let w=v;if(p!==0)if(y<1){const $=Math.max(0,p-b$e);w=JA(g-h($),p-$)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-g)<=e;o.done=E&&k}return o.value=o.done?i:g,o},flipTarget:()=>{v=-v,[s,i]=[i,s],b()}}}kK.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const w$e=t=>0;function x$e({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const C$e={decay:x$e,keyframes:zS,tween:zS,spring:kK};function $K(t,e,r=0){return t-e-r}function E$e(t,e=0,r=0,n=!0){return n?$K(e+-t,e,r):e-(t-e)+r}function S$e(t,e,r,n){return n?t>=e+r:t<=-r}const k$e=t=>{const e=({delta:r})=>t(r);return{start:()=>Wn.update(e,!0),stop:()=>Kl.update(e)}};function Vb({duration:t,driver:e=k$e,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,b;const p=r;let g,w=0,E=t,k=!1,$=!0,C;const T=C$e[o.length>2?"keyframes":h]||zS,j=o[0],F=o[o.length-1];let U={done:!1,value:j};!((b=(y=T).needsInterpolation)===null||b===void 0)&&b.call(y,j,F)&&(C=wK([0,100],[j,F],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?($=w%2===0,r=E$e(r,E,i,$)):(r=$K(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function x(){g&&g.stop(),f&&f()}function S(M){$||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),C&&(U.value=C(U.value)),k=$?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),g&&g.stop()},set currentTime(M){r=p,S(M)},sample:M=>{r=p;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const B=M-I;S(Math.min(B,_)),I+=_}return U}}}function $$e(t){return!t||Array.isArray(t)||typeof t=="string"&&AK[t]}const j1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,AK={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:j1([0,.65,.55,1]),circOut:j1([.55,0,1,.45]),backIn:j1([.31,.01,.66,-.59]),backOut:j1([.33,1.53,.69,.99])};function A$e(t){if(t)return Array.isArray(t)?j1(t):AK[t]}function _$e(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:A$e(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const tO={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},JE={},_K={};for(const t in tO)_K[t]=()=>(JE[t]===void 0&&(JE[t]=tO[t]()),JE[t]);function P$e(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const T$e=new Set(["opacity"]),jm=10;function R$e(t,e,{onUpdate:r,onComplete:n,...s}){if(!(_K.waapi()&&T$e.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!$$e(s.ease)){if(s.repeat===1/0)return;const u=Vb({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=jm;o=h,a=v-jm,c="linear"}const f=_$e(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(P$e(o,s)),Wn.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=Vb({...s,autoplay:!1});t.setWithVelocity(d.sample(u-jm).value,d.sample(u).value,jm)}Wn.update(()=>f.cancel())}}}function PK(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Kl.read(n),t(i-e))};return Wn.read(n,!0),()=>Kl.read(n)}function I$e({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:PK(s,-e)}:s()}function O$e({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function b(E){return r!==void 0&&En}function p(E){return r===void 0?n:n===void 0||Math.abs(r-E){var $;u==null||u(k),($=E.onUpdate)===null||$===void 0||$.call(E,k)},onComplete:d,onStop:h})}function w(E){g({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(b(v))w({velocity:e,keyframes:[v,p(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=p(E),$=k===r?-1:1;let C,T;const j=F=>{C=T,T=F,e=JA(F-C,aa.delta),($===1&&F>k||$===-1&&Fy==null?void 0:y.stop()}}const _c=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Fm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),XE=()=>({type:"keyframes",ease:"linear",duration:.3}),M$e={type:"keyframes",duration:.8},rO={x:_c,y:_c,z:_c,rotate:_c,rotateX:_c,rotateY:_c,rotateZ:_c,scaleX:Fm,scaleY:Fm,scale:Fm,opacity:XE,backgroundColor:XE,color:XE,default:Fm},D$e=(t,{keyframes:e})=>e.length>2?M$e:(rO[t]||rO.default)(e[1]),qS=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Ql.test(e)&&!e.startsWith("url("));function N$e({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function nO(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function sO(t){return typeof t=="number"?0:e_("",t)}function TK(t,e){return t[e]||t.default||t}function L$e(t,e,r,n){const s=qS(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=e_(e,r):nO(i)&&typeof r=="string"?i=sO(r):!Array.isArray(r)&&nO(r)&&typeof i=="string"&&(r=sO(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const l_=(t,e,r,n={})=>s=>{const i=TK(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Gp(o);const l=L$e(e,t,r,i),c=l[0],f=l[l.length-1],u=qS(t,c),d=qS(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:b=>{e.set(b),i.onUpdate&&i.onUpdate(b)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||W8e.current||i.type===!1)return I$e(h);if(i.type==="inertia")return O$e(h);N$e(i)||(h={...h,...D$e(t,h)}),h.duration&&(h.duration=Gp(h.duration)),h.repeatDelay&&(h.repeatDelay=Gp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const b=R$e(e,t,h);if(b)return b}return Vb(h)};function j$e(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>WS(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=WS(t,e,r);else{const s=typeof e=="function"?gx(t,e,r.custom):e;n=RK(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function WS(t,e,r={}){var n;const s=gx(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>RK(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return F$e(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function RK(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&U$e(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const p=t.getProps()[q8e];p&&(y.elapsed=window.HandoffAppearAnimations(p,d,h,Wn))}let b=h.start(l_(d,h,v,t.shouldReduceMotion&&Bh.has(d)?{type:!1}:y));Ub(c)&&(c.add(d),b=b.then(()=>c.remove(d))),f.push(b)}return Promise.all(f).then(()=>{a&&F8e(t,a)})}function F$e(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(B$e).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(WS(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function B$e(t,e){return t.sortNodePosition(e)}function U$e({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const c_=[gt.Animate,gt.InView,gt.Focus,gt.Hover,gt.Tap,gt.Drag,gt.Exit],z$e=[...c_].reverse(),V$e=c_.length;function q$e(t){return e=>Promise.all(e.map(({animation:r,options:n})=>j$e(t,r,n)))}function W$e(t){let e=q$e(t);const r=G$e();let n=!0;const s=(l,c)=>{const f=gx(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let p=0;py&&k;const F=Array.isArray(E)?E:[E];let U=F.reduce(s,{});$===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},x=S=>{j=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?jb(R)&&jb(M)?!iK(R,M)||T?x(S):w.protectedKeys[S]=!0:R!==void 0?x(S):h.add(S):R!==void 0&&h.has(S)?x(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(j=!1),j&&!C&&d.push(...F.map(S=>({animation:S,options:{type:g,...l}})))}if(h.size){const p={};h.forEach(g=>{const w=t.getBaseTarget(g);w!==void 0&&(p[g]=w)}),d.push({animation:p})}let b=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(b=!1),n=!1,b?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function H$e(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!iK(e,t):!1}function Pc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function G$e(){return{[gt.Animate]:Pc(!0),[gt.InView]:Pc(),[gt.Hover]:Pc(),[gt.Tap]:Pc(),[gt.Drag]:Pc(),[gt.Focus]:Pc(),[gt.Exit]:Pc()}}const K$e={animation:pl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=W$e(t)),hx(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:pl(t=>{const{custom:e,visualElement:r}=t,[n,s]=sK(),i=m.useContext(ux);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(gt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},iO=(t,e)=>Math.abs(t-e);function Q$e(t,e){const r=iO(t.x,e.x),n=iO(t.y,e.y);return Math.sqrt(r**2+n**2)}class IK{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 c=e5(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=Q$e(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=aa;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=ZE(f,this.transformPagePoint),Wn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=e5(c.type==="pointercancel"?this.lastMoveEventInfo:ZE(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!JG(e))return;this.handlers=r,this.transformPagePoint=n;const s=GA(e),i=ZE(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=aa;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,e5(i,this.history)),this.removeListeners=mx(bd(window,"pointermove",this.handlePointerMove),bd(window,"pointerup",this.handlePointerUp),bd(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Kl.update(this.updatePoint)}}function ZE(t,e){return e?{point:e(t.point)}:t}function oO(t,e){return{x:t.x-e.x,y:t.y-e.y}}function e5({point:t},e){return{point:t,delta:oO(t,OK(e)),offset:oO(t,Y$e(e)),velocity:J$e(e,.1)}}function Y$e(t){return t[0]}function OK(t){return t[t.length-1]}function J$e(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=OK(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Gp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Is(t){return t.max-t.min}function HS(t,e=0,r=.01){return Math.abs(t-e)<=r}function aO(t,e,r,n=.5){t.origin=n,t.originPoint=xr(e.min,e.max,t.origin),t.scale=Is(r)/Is(e),(HS(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=xr(r.min,r.max,t.origin)-t.originPoint,(HS(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Ev(t,e,r,n){aO(t.x,e.x,r.x,n==null?void 0:n.originX),aO(t.y,e.y,r.y,n==null?void 0:n.originY)}function lO(t,e,r){t.min=r.min+e.min,t.max=t.min+Is(e)}function X$e(t,e,r){lO(t.x,e.x,r.x),lO(t.y,e.y,r.y)}function cO(t,e,r){t.min=e.min-r.min,t.max=t.min+Is(e)}function Sv(t,e,r){cO(t.x,e.x,r.x),cO(t.y,e.y,r.y)}function Z$e(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?xr(r,t,n.max):Math.min(t,r)),t}function fO(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 e4e(t,{top:e,left:r,bottom:n,right:s}){return{x:fO(t.x,r,s),y:fO(t.y,e,n)}}function uO(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=zb(e.min,e.max-n,t.min):n>s&&(r=zb(t.min,t.max-s,e.min)),eh(0,1,r)}function n4e(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 GS=.35;function s4e(t=GS){return t===!1?t=0:t===!0&&(t=GS),{x:dO(t,"left","right"),y:dO(t,"top","bottom")}}function dO(t,e,r){return{min:hO(t,e),max:hO(t,r)}}function hO(t,e){return typeof t=="number"?t:t[e]||0}const vO=()=>({translate:0,scale:1,origin:0,originPoint:0}),kv=()=>({x:vO(),y:vO()}),yO=()=>({min:0,max:0}),Br=()=>({x:yO(),y:yO()});function no(t){return[t("x"),t("y")]}function MK({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function i4e({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function o4e(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 t5(t){return t===void 0||t===1}function KS({scale:t,scaleX:e,scaleY:r}){return!t5(t)||!t5(e)||!t5(r)}function Dc(t){return KS(t)||DK(t)||t.z||t.rotate||t.rotateX||t.rotateY}function DK(t){return mO(t.x)||mO(t.y)}function mO(t){return t&&t!=="0%"}function qb(t,e,r){const n=t-r,s=e*n;return r+s}function pO(t,e,r,n,s){return s!==void 0&&(t=qb(t,s,n)),qb(t,r,n)+e}function QS(t,e=0,r=1,n,s){t.min=pO(t.min,e,r,n,s),t.max=pO(t.max,e,r,n,s)}function NK(t,{x:e,y:r}){QS(t.x,e.translate,e.scale,e.originPoint),QS(t.y,r.translate,r.scale,r.originPoint)}function a4e(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function sl(t,e){t.min=t.min+e,t.max=t.max+e}function bO(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=xr(t.min,t.max,i);QS(t,e[r],e[n],o,e.scale)}const l4e=["x","scaleX","originX"],c4e=["y","scaleY","originY"];function Qu(t,e){bO(t.x,e,l4e),bO(t.y,e,c4e)}function LK(t,e){return MK(o4e(t.getBoundingClientRect(),e))}function f4e(t,e,r){const n=LK(t,r),{scroll:s}=e;return s&&(sl(n.x,s.offset.x),sl(n.y,s.offset.y)),n}const u4e=new WeakMap;class d4e{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=Br(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(GA(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=eK(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),no(h=>{var v,y;let b=this.getAxisMotionValue(h).get()||0;if($o.test(b)){const p=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];p&&(b=Is(p)*(parseFloat(b)/100))}this.originPoint[h]=b}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(gt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=h4e(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new IK(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(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(gt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!Bm(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Z$e(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Gu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=e4e(n.layoutBox,e):this.constraints=!1,this.elastic=s4e(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&no(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=n4e(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Gu(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=f4e(n,s.root,this.visualElement.getTransformPagePoint());let o=t4e(s.layout.layoutBox,i);if(r){const a=r(i4e(o));this.hasMutatedConstraints=!!a,a&&(o=MK(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=no(f=>{if(!Bm(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(l_(e,n,0,r))}stopAnimation(){no(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){no(r=>{const{drag:n}=this.getProps();if(!Bm(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-xr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Gu(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};no(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=r4e({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),no(a=>{if(!Bm(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(xr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;u4e.set(this.visualElement,this);const r=this.visualElement.current,n=bd(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Gu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=yx(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(no(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=GS,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Bm(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function h4e(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function v4e(t){const{dragControls:e,visualElement:r}=t,n=jA(()=>new d4e(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function y4e({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(LA),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new IK(f,l,{transformPagePoint:a})}Fb(s,"pointerdown",i&&c),nK(()=>o.current&&o.current.end())}const m4e={pan:pl(y4e),drag:pl(v4e)};function YS(t){return typeof t=="string"&&t.startsWith("var(--")}const jK=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function p4e(t){const e=jK.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function JS(t,e,r=1){const[n,s]=p4e(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():YS(s)?JS(s,e,r+1):s}function g4e(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!YS(i))return;const o=JS(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!YS(i))continue;const o=JS(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const b4e=new Set(["width","height","top","left","right","bottom","x","y"]),FK=t=>b4e.has(t),w4e=t=>Object.keys(t).some(FK),wO=t=>t===Gf||t===Ee;var xO;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(xO||(xO={}));const CO=(t,e)=>parseFloat(t.split(", ")[e]),EO=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return CO(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?CO(i[1],t):0}},x4e=new Set(["x","y","z"]),C4e=Nb.filter(t=>!x4e.has(t));function E4e(t){const e=[];return C4e.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 SO={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:EO(4,13),y:EO(5,14)},S4e=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=SO[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=SO[c](l,i)}),t},k4e=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(FK);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=w1(f);const d=e[l];let h;if(jb(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=w1(f);for(let b=y;b=0?window.pageYOffset:null,c=S4e(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),dx&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function $4e(t,e,r,n){return w4e(e)?k4e(t,e,r,n):{target:e,transitionEnd:n}}const A4e=(t,e,r,n)=>{const s=g4e(t,e,n);return e=s.target,n=s.transitionEnd,$4e(t,e,r,n)},XS={current:null},BK={current:!1};function _4e(){if(BK.current=!0,!!dx)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>XS.current=t.matches;t.addListener(e),e()}else XS.current=!1}function P4e(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(us(i))t.addValue(s,i),Ub(n)&&n.add(s);else if(us(o))t.addValue(s,th(i,{owner:t})),Ub(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,th(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const UK=Object.keys(jy),T4e=UK.length,kO=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class R4e{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){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=()=>Wn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;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=i,this.isControllingVariants=vx(r),this.isVariantNode=LG(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&us(u)&&(u.set(o[f],!1),Ub(l)&&l.add(f))}}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,s)=>this.bindToMotionValue(s,n)),BK.current||_4e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:XS.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(),Kl.update(this.notifyUpdate),Kl.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=Bh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Wn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Br()}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=th(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,s=typeof n=="string"||typeof n=="object"?(r=HA(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!us(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new YA),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const zK=["initial",...c_],I4e=zK.length;class VK extends R4e{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:s},i){let o=z8e(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){B8e(this,n,o);const a=A4e(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function O4e(t){return window.getComputedStyle(t)}class M4e extends VK{readValueFromInstance(e,r){if(Bh.has(r)){const n=ZA(r);return n&&n.default||0}else{const n=O4e(e),s=(UG(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return LK(e,r)}build(e,r,n,s){BA(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return WA(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;us(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){HG(e,r,n,s)}}class D4e extends VK{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Bh.has(r)?((n=ZA(r))===null||n===void 0?void 0:n.default)||0:(r=GG.has(r)?r:qA(r),e.getAttribute(r))}measureInstanceViewportBox(){return Br()}scrapeMotionValuesFromProps(e,r){return QG(e,r)}build(e,r,n,s){zA(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){KG(e,r,n,s)}mount(e){this.isSVGTag=VA(e.tagName),super.mount(e)}}const N4e=(t,e)=>FA(t)?new D4e(e,{enableHardwareAcceleration:!1}):new M4e(e,{enableHardwareAcceleration:!0});function $O(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const x1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ee.test(t))t=parseFloat(t);else return t;const r=$O(t,e.target.x),n=$O(t,e.target.y);return`${r}% ${n}%`}},AO="_$css",L4e={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(jK,h=>(i.push(h),AO)));const o=Ql.parse(t);if(o.length>5)return n;const a=Ql.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=xr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(AO,()=>{const v=i[h];return h++,v})}return d}};class j4e extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Pke(B4e),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),wv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Wn.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function F4e(t){const[e,r]=sK(),n=m.useContext(jG);return P.createElement(j4e,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(FG),isPresent:e,safeToRemove:r})}const B4e={borderRadius:{...x1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:x1,borderTopRightRadius:x1,borderBottomLeftRadius:x1,borderBottomRightRadius:x1,boxShadow:L4e},U4e={measureLayout:F4e};function z4e(t,e,r={}){const n=us(t)?t:th(t);return n.start(l_("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const qK=["TopLeft","TopRight","BottomLeft","BottomRight"],V4e=qK.length,_O=t=>typeof t=="string"?parseFloat(t):t,PO=t=>typeof t=="number"||Ee.test(t);function q4e(t,e,r,n,s,i){s?(t.opacity=xr(0,r.opacity!==void 0?r.opacity:1,W4e(n)),t.opacityExit=xr(e.opacity!==void 0?e.opacity:1,0,H4e(n))):i&&(t.opacity=xr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(zb(t,e,n))}function RO(t,e){t.min=e.min,t.max=e.max}function bi(t,e){RO(t.x,e.x),RO(t.y,e.y)}function IO(t,e,r,n,s){return t-=e,t=qb(t,1/r,n),s!==void 0&&(t=qb(t,1/s,n)),t}function G4e(t,e=0,r=1,n=.5,s,i=t,o=t){if($o.test(e)&&(e=parseFloat(e),e=xr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=xr(i.min,i.max,n);t===i&&(a-=e),t.min=IO(t.min,e,r,a,s),t.max=IO(t.max,e,r,a,s)}function OO(t,e,[r,n,s],i,o){G4e(t,e[r],e[n],e[s],e.scale,i,o)}const K4e=["x","scaleX","originX"],Q4e=["y","scaleY","originY"];function MO(t,e,r,n){OO(t.x,e,K4e,r==null?void 0:r.x,n==null?void 0:n.x),OO(t.y,e,Q4e,r==null?void 0:r.y,n==null?void 0:n.y)}function DO(t){return t.translate===0&&t.scale===1}function HK(t){return DO(t.x)&&DO(t.y)}function GK(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 NO(t){return Is(t.x)/Is(t.y)}class Y4e{constructor(){this.members=[]}add(e){KA(this.members,e),e.scheduleRender()}remove(e){if(QA(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function LO(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}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 J4e=(t,e)=>t.depth-e.depth;class X4e{constructor(){this.children=[],this.isDirty=!1}add(e){KA(this.children,e),this.isDirty=!0}remove(e){QA(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(J4e),this.isDirty=!1,this.children.forEach(e)}}const jO=["","X","Y","Z"],FO=1e3;let Z4e=0;function KK({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=Z4e++,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(rAe),this.nodes.forEach(iAe),this.nodes.forEach(oAe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=PK(h,250),wv.hasAnimatedSinceResize&&(wv.hasAnimatedSinceResize=!1,this.nodes.forEach(UO))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var b,p,g,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(p=(b=this.options.transition)!==null&&b!==void 0?b:u.getDefaultTransition())!==null&&p!==void 0?p:uAe,{onLayoutAnimationStart:$,onLayoutAnimationComplete:C}=u.getProps(),T=!this.targetLayout||!GK(this.targetLayout,y)||v,j=!h&&v;if(this.options.layoutRoot||!((g=this.resumeFrom)===null||g===void 0)&&g.instance||j||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,j);const F={...TK(k,"layout"),onPlay:$,onComplete:C};(u.shouldReduceMotion||this.options.layoutRoot)&&(F.delay=0,F.type=!1),this.startAnimation(F)}else!h&&this.animationProgress===0&&UO(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}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,Kl.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(aAe),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.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 l=0;l{var w;const E=g/1e3;zO(h.x,o.x,E),zO(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(Sv(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cAe(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,q4e(d,u,this.latestValues,E,p,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Kl.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wn.update(()=>{wv.hasAnimatedSinceResize=!0,this.currentAnimation=z4e(0,FO,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.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,FO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&QK(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Br();const u=Is(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Is(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}bi(a,l),Qu(a,f),Ev(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new Y4e),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,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:l}={}){const c=this.getStack();c&&c.promote(this,l),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:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(BO),this.root.sharedNodes.clear()}}}function eAe(t){t.updateLayout()}function tAe(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(v);v.min=i[h].min,v.max=v.min+y}):QK(a,s.layoutBox,i)&&no(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Is(i[h]);v.max=v.min+y});const c=kv();Ev(c,i,s.layoutBox);const f=kv();l?Ev(f,t.applyTransform(o,!0),s.measuredBox):Ev(f,i,s.layoutBox);const u=!HK(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const b=Br();Sv(b,s.layoutBox,v.layoutBox);const p=Br();Sv(p,i,y.layoutBox),GK(b,p)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function rAe(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function nAe(t){t.clearSnapshot()}function BO(t){t.clearMeasurements()}function sAe(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function UO(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function iAe(t){t.resolveTargetDelta()}function oAe(t){t.calcProjection()}function aAe(t){t.resetRotation()}function lAe(t){t.removeLeadSnapshot()}function zO(t,e,r){t.translate=xr(e.translate,0,r),t.scale=xr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function VO(t,e,r,n){t.min=xr(e.min,r.min,n),t.max=xr(e.max,r.max,n)}function cAe(t,e,r,n){VO(t.x,e.x,r.x,n),VO(t.y,e.y,r.y,n)}function fAe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const uAe={duration:.45,ease:[.4,0,.1,1]};function dAe(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function qO(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function hAe(t){qO(t.x),qO(t.y)}function QK(t,e,r){return t==="position"||t==="preserve-aspect"&&!HS(NO(e),NO(r),.2)}const vAe=KK({attachResizeListener:(t,e)=>yx(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),r5={current:void 0},yAe=KK({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!r5.current){const t=new vAe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),r5.current=t}return r5.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),mAe={...K$e,...v8e,...m4e,...U4e},pAe=Ake((t,e)=>t8e(t,e,mAe,N4e,yAe)),gAe={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};function bAe(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 wAe(t){var e=bAe(t,"string");return typeof e=="symbol"?e:String(e)}function xAe(t,e,r){return e=wAe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function WO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function n5(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=n5({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var b of y.mappings)f[b]=v,u[b]==null&&delete u[b]}}var p=d?n5(n5({},f),u):l,g=function(){var $=p[w],C=s[w];try{if(C.mappings)return"continue";if(typeof $=="string"||typeof $=="number")c.push(C.values[$].defaultClass);else if(Array.isArray($))for(var T=0;T<$.length;T++){var j=$[T];if(j!=null){var F=C.responsiveArray[T];c.push(C.values[j].conditions[F])}}else for(var U in $){var V=$[U];V!=null&&c.push(C.values[V].conditions[U])}}catch(N){throw N}};for(var w in p)var E=g();return t(c.join(" "))};return Object.assign(a,{properties:new Set(i)})},EAe=t=>t,SAe=function(){return CAe(EAe)(...arguments)},YK=SAe({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 kAe=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],ZS=t=>(t.display||(t.display=Object.keys(t).some(e=>kAe.includes(e))?"flex":void 0),YK(t));ZS.properties=YK.properties;function JK(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:s,...i}=t,o={},a={};for(const c in i)ZS.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=ZS({...o,...n});return m.createElement(r,{className:Ls(l,s),...a,ref:e})});var XK={exports:{}},C1={};/** + Approved: ${d.toString()}`))}),o.forEach(u=>{n||(Xc(s[u].methods,i[u].methods)?Xc(s[u].events,i[u].events)||(n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${u}`)):n=cl("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${u}`))}),n}function fke(t){const e={};return Object.keys(t).forEach(r=>{var n;r.includes(":")?e[r]=t[r]:(n=t[r].chains)==null||n.forEach(s=>{e[s]={methods:t[r].methods,events:t[r].events}})}),e}function zI(t){return[...new Set(t.map(e=>e.includes(":")?e.split(":")[0]:e))]}function uke(t){const e={};return Object.keys(t).forEach(r=>{if(r.includes(":"))e[r]=t[r];else{const n=Bh(t[r].accounts);n==null||n.forEach(s=>{e[s]={accounts:t[r].accounts.filter(i=>i.includes(`${s}:`)),methods:t[r].methods,events:t[r].events}})}}),e}function aHe(t,e){return IA(t,!1)&&t<=e.max&&t>=e.min}var IG="eip155",dke="store",OG="requestedChains",IS="wallet_addEthereumChain",lr,wv,Wp,OS,OA,MG,Hp,MS,DS,DG,Ib,MA,_u,j1,Ob,DA,Mb,NA,Db,LA,hke=class extends V${constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),ps(this,Wp),ps(this,OA),ps(this,Hp),ps(this,DS),ps(this,Ib),ps(this,_u),ps(this,Ob),ps(this,Mb),ps(this,Db),ar(this,"id","walletConnect"),ar(this,"name","WalletConnect"),ar(this,"ready",!0),ps(this,lr,void 0),ps(this,wv,void 0),ar(this,"onAccountsChanged",e=>{e.length===0?this.emit("disconnect"):this.emit("change",{account:Tl(e[0])})}),ar(this,"onChainChanged",e=>{const r=Number(e),n=this.isChainUnsupported(r);this.emit("change",{chain:{id:r,unsupported:n}})}),ar(this,"onDisconnect",()=>{Qr(this,_u,j1).call(this,[]),this.emit("disconnect")}),ar(this,"onDisplayUri",e=>{this.emit("message",{type:"display_uri",data:e})}),ar(this,"onConnect",()=>{this.emit("connect",{})}),Qr(this,Wp,OS).call(this)}async connect({chainId:t,pairingTopic:e}={}){var r,n,s,i,o;try{let a=t;if(!a){const v=(r=this.storage)==null?void 0:r.getItem(dke),y=(i=(s=(n=v==null?void 0:v.state)==null?void 0:n.data)==null?void 0:s.chain)==null?void 0:i.id;y&&!this.isChainUnsupported(y)?a=y:a=(o=this.chains[0])==null?void 0:o.id}if(!a)throw new Error("No chains found on connector.");const l=await this.getProvider();Qr(this,DS,DG).call(this);const c=Qr(this,Hp,MS).call(this);if(l.session&&c&&await l.disconnect(),!l.session||c){const v=this.chains.filter(y=>y.id!==a).map(y=>y.id);this.emit("message",{type:"connecting"}),await l.connect({pairingTopic:e,chains:[a],optionalChains:v.length?v:void 0}),Qr(this,_u,j1).call(this,this.chains.map(({id:y})=>y))}const f=await l.enable(),u=Tl(f[0]),d=await this.getChainId(),h=this.isChainUnsupported(d);return{account:u,chain:{id:d,unsupported:h}}}catch(a){throw/user rejected/i.test(a==null?void 0:a.message)?new Sn(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{Qr(this,Ib,MA).call(this),Qr(this,_u,j1).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();return Tl(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider({chainId:t}={}){return er(this,lr)||await Qr(this,Wp,OS).call(this),t&&await this.switchChain(t),er(this,lr)}async getWalletClient({chainId:t}={}){const[e,r]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]),n=this.chains.find(s=>s.id===t);if(!e)throw new Error("provider is required.");return h4({account:r,chain:n,transport:l4(e)})}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),r=Qr(this,Hp,MS).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(s=>s.id===t);if(!e)throw new Vl(new Error("chain not found on connector."));try{const s=await this.getProvider(),i=Qr(this,Mb,NA).call(this),o=Qr(this,Db,LA).call(this);if(!i.includes(t)&&o.includes(IS)){await s.request({method:IS,params:[{chainId:We(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 l=Qr(this,Ob,DA).call(this);l.push(t),Qr(this,_u,j1).call(this,l)}return await s.request({method:"wallet_switchEthereumChain",params:[{chainId:We(t)}]}),e}catch(s){const i=typeof s=="string"?s:s==null?void 0:s.message;throw/user rejected request/i.test(i)?new Sn(s):new Vl(s)}}};lr=new WeakMap;wv=new WeakMap;Wp=new WeakSet;OS=async function(){return!er(this,wv)&&typeof window<"u"&&pw(this,wv,Qr(this,OA,MG).call(this)),er(this,wv)};OA=new WeakSet;MG=async function(){const{EthereumProvider:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:r}=await xz(()=>import("./index.es-d71ec09d.js"),[],import.meta.url),[n,...s]=this.chains.map(({id:i})=>i);if(n){const{projectId:i,showQrModal:o=!0,qrModalOptions:a,metadata:l,relayUrl:c}=this.options;pw(this,lr,await t.init({showQrModal:o,qrModalOptions:a,projectId:i,optionalMethods:r,optionalEvents:e,chains:[n],optionalChains:s.length?s:void 0,rpcMap:Object.fromEntries(this.chains.map(f=>[f.id,f.rpcUrls.default.http[0]])),metadata:l,relayUrl:c}))}};Hp=new WeakSet;MS=function(){if(Qr(this,Db,LA).call(this).includes(IS)||!this.options.isNewChainsStale)return!1;const e=Qr(this,Ob,DA).call(this),r=this.chains.map(({id:s})=>s),n=Qr(this,Mb,NA).call(this);return n.length&&!n.some(s=>r.includes(s))?!1:!r.every(s=>e.includes(s))};DS=new WeakSet;DG=function(){er(this,lr)&&(Qr(this,Ib,MA).call(this),er(this,lr).on("accountsChanged",this.onAccountsChanged),er(this,lr).on("chainChanged",this.onChainChanged),er(this,lr).on("disconnect",this.onDisconnect),er(this,lr).on("session_delete",this.onDisconnect),er(this,lr).on("display_uri",this.onDisplayUri),er(this,lr).on("connect",this.onConnect))};Ib=new WeakSet;MA=function(){er(this,lr)&&(er(this,lr).removeListener("accountsChanged",this.onAccountsChanged),er(this,lr).removeListener("chainChanged",this.onChainChanged),er(this,lr).removeListener("disconnect",this.onDisconnect),er(this,lr).removeListener("session_delete",this.onDisconnect),er(this,lr).removeListener("display_uri",this.onDisplayUri),er(this,lr).removeListener("connect",this.onConnect))};_u=new WeakSet;j1=function(t){var e;(e=this.storage)==null||e.setItem(OG,t)};Ob=new WeakSet;DA=function(){var t;return((t=this.storage)==null?void 0:t.getItem(OG))??[]};Mb=new WeakSet;NA=function(){var n,s,i;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((i=(s=TG(t)[IG])==null?void 0:s.chains)==null?void 0:i.map(o=>parseInt(o.split(":")[1]||"")))??[]:[]};Db=new WeakSet;LA=function(){var n,s;if(!er(this,lr))return[];const t=(n=er(this,lr).session)==null?void 0:n.namespaces;return t?((s=TG(t)[IG])==null?void 0:s.methods)??[]:[]};const jA=m.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ux=m.createContext({});function vke(){return m.useContext(ux).visualElement}const dx=m.createContext(null),hx=typeof document<"u",VI=hx?m.useLayoutEffect:m.useEffect,NG=m.createContext({strict:!1});function yke(t,e,r,n){const s=vke(),i=m.useContext(NG),o=m.useContext(dx),a=m.useContext(jA).reducedMotion,l=m.useRef();n=n||i.renderer,!l.current&&n&&(l.current=n(t,{visualState:e,parent:s,props:r,presenceId:o?o.id:void 0,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return VI(()=>{c&&c.render()}),(window.HandoffAppearAnimations?VI:m.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Ku(t){return typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function mke(t,e,r){return m.useCallback(n=>{n&&t.mount&&t.mount(n),e&&(n?e.mount(n):e.unmount()),r&&(typeof r=="function"?r(n):Ku(r)&&(r.current=n))},[e])}function jy(t){return typeof t=="string"||Array.isArray(t)}function vx(t){return typeof t=="object"&&typeof t.start=="function"}const pke=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function yx(t){return vx(t.animate)||pke.some(e=>jy(t[e]))}function LG(t){return Boolean(yx(t)||t.variants)}function gke(t,e){if(yx(t)){const{initial:r,animate:n}=t;return{initial:r===!1||jy(r)?r:void 0,animate:jy(n)?n:void 0}}return t.inherit!==!1?e:{}}function bke(t){const{initial:e,animate:r}=gke(t,m.useContext(ux));return m.useMemo(()=>({initial:e,animate:r}),[qI(e),qI(r)])}function qI(t){return Array.isArray(t)?t.join(" "):t}const zo=t=>({isEnabled:e=>t.some(r=>!!e[r])}),Fy={measureLayout:zo(["layout","layoutId","drag"]),animation:zo(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:zo(["exit"]),drag:zo(["drag","dragControls"]),focus:zo(["whileFocus"]),hover:zo(["whileHover","onHoverStart","onHoverEnd"]),tap:zo(["whileTap","onTap","onTapStart","onTapCancel"]),pan:zo(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:zo(["whileInView","onViewportEnter","onViewportLeave"])};function wke(t){for(const e in t)e==="projectionNodeConstructor"?Fy.projectionNodeConstructor=t[e]:Fy[e].Component=t[e]}function FA(t){const e=m.useRef(null);return e.current===null&&(e.current=t()),e.current}const xv={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let xke=1;function Cke(){return FA(()=>{if(xv.hasEverUpdated)return xke++})}const jG=m.createContext({});class Eke extends P.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:r}=this.props;return e&&e.setProps(r),null}componentDidUpdate(){}render(){return this.props.children}}const FG=m.createContext({}),Ske=Symbol.for("motionComponentSymbol");function kke({preloadedFeatures:t,createVisualElement:e,projectionNodeConstructor:r,useRender:n,useVisualState:s,Component:i}){t&&wke(t);function o(l,c){const f={...m.useContext(jA),...l,layoutId:$ke(l)},{isStatic:u}=f;let d=null;const h=bke(l),v=u?void 0:Cke(),y=s(l,u);if(!u&&hx){h.visualElement=yke(i,y,f,e);const g=m.useContext(NG).strict,b=m.useContext(FG);h.visualElement&&(d=h.visualElement.loadFeatures(f,g,t,v,r||Fy.projectionNodeConstructor,b))}return m.createElement(Eke,{visualElement:h.visualElement,props:f},d,m.createElement(ux.Provider,{value:h},n(i,l,v,mke(y,h.visualElement,c),y,u,h.visualElement)))}const a=m.forwardRef(o);return a[Ske]=i,a}function $ke({layoutId:t}){const e=m.useContext(jG).id;return e&&t!==void 0?e+"-"+t:t}function Ake(t){function e(n,s={}){return kke(t(n,s))}if(typeof Proxy>"u")return e;const r=new Map;return new Proxy(e,{get:(n,s)=>(r.has(s)||r.set(s,e(s)),r.get(s))})}const _ke=["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 BA(t){return typeof t!="string"||t.includes("-")?!1:!!(_ke.indexOf(t)>-1||/[A-Z]/.test(t))}const Nb={};function Pke(t){Object.assign(Nb,t)}const Lb=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Uh=new Set(Lb);function BG(t,{layout:e,layoutId:r}){return Uh.has(t)||t.startsWith("origin")||(e||r!==void 0)&&(!!Nb[t]||t==="opacity")}const ds=t=>!!(t!=null&&t.getVelocity),Tke={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rke=(t,e)=>Lb.indexOf(t)-Lb.indexOf(e);function Ike({transform:t,transformKeys:e},{enableHardwareAcceleration:r=!0,allowTransformNone:n=!0},s,i){let o="";e.sort(Rke);for(const a of e)o+=`${Tke[a]||a}(${t[a]}) `;return r&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}function UG(t){return t.startsWith("--")}const Oke=(t,e)=>e&&typeof t=="number"?e.transform(t):t,th=(t,e,r)=>Math.min(Math.max(r,t),e),Kf={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Cv={...Kf,transform:t=>th(0,1,t)},jm={...Kf,default:1},Ev=t=>Math.round(t*1e5)/1e5,By=/(-)?([\d]*\.?[\d])+/g,NS=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Mke=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function N0(t){return typeof t=="string"}const L0=t=>({test:e=>N0(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Qa=L0("deg"),Ao=L0("%"),Ee=L0("px"),Dke=L0("vh"),Nke=L0("vw"),WI={...Ao,parse:t=>Ao.parse(t)/100,transform:t=>Ao.transform(t*100)},HI={...Kf,transform:Math.round},zG={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,radius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,size:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,rotate:Qa,rotateX:Qa,rotateY:Qa,rotateZ:Qa,scale:jm,scaleX:jm,scaleY:jm,scaleZ:jm,skew:Qa,skewX:Qa,skewY:Qa,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:Cv,originX:WI,originY:WI,originZ:Ee,zIndex:HI,fillOpacity:Cv,strokeOpacity:Cv,numOctaves:HI};function UA(t,e,r,n){const{style:s,vars:i,transform:o,transformKeys:a,transformOrigin:l}=t;a.length=0;let c=!1,f=!1,u=!0;for(const d in e){const h=e[d];if(UG(d)){i[d]=h;continue}const v=zG[d],y=Oke(h,v);if(Uh.has(d)){if(c=!0,o[d]=y,a.push(d),!u)continue;h!==(v.default||0)&&(u=!1)}else d.startsWith("origin")?(f=!0,l[d]=y):s[d]=y}if(e.transform||(c||n?s.transform=Ike(t,r,u,n):s.transform&&(s.transform="none")),f){const{originX:d="50%",originY:h="50%",originZ:v=0}=l;s.transformOrigin=`${d} ${h} ${v}`}}const zA=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function VG(t,e,r){for(const n in e)!ds(e[n])&&!BG(n,r)&&(t[n]=e[n])}function Lke({transformTemplate:t},e,r){return m.useMemo(()=>{const n=zA();return UA(n,e,{enableHardwareAcceleration:!r},t),Object.assign({},n.vars,n.style)},[e])}function jke(t,e,r){const n=t.style||{},s={};return VG(s,n,t),Object.assign(s,Lke(t,e,r)),t.transformValues?t.transformValues(s):s}function Fke(t,e,r){const n={},s=jke(t,e,r);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),n.style=s,n}const Bke=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 jb(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Bke.has(t)}let qG=t=>!jb(t);function Uke(t){t&&(qG=e=>e.startsWith("on")?!jb(e):t(e))}try{Uke(require("@emotion/is-prop-valid").default)}catch{}function zke(t,e,r){const n={};for(const s in t)s==="values"&&typeof t.values=="object"||(qG(s)||r===!0&&jb(s)||!e&&!jb(s)||t.draggable&&s.startsWith("onDrag"))&&(n[s]=t[s]);return n}function GI(t,e,r){return typeof t=="string"?t:Ee.transform(e+r*t)}function Vke(t,e,r){const n=GI(e,t.x,t.width),s=GI(r,t.y,t.height);return`${n} ${s}`}const qke={offset:"stroke-dashoffset",array:"stroke-dasharray"},Wke={offset:"strokeDashoffset",array:"strokeDasharray"};function Hke(t,e,r=1,n=0,s=!0){t.pathLength=1;const i=s?qke:Wke;t[i.offset]=Ee.transform(-n);const o=Ee.transform(e),a=Ee.transform(r);t[i.array]=`${o} ${a}`}function VA(t,{attrX:e,attrY:r,originX:n,originY:s,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...l},c,f,u){if(UA(t,l,c,u),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:h,dimensions:v}=t;d.transform&&(v&&(h.transform=d.transform),delete d.transform),v&&(n!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=Vke(v,n!==void 0?n:.5,s!==void 0?s:.5)),e!==void 0&&(d.x=e),r!==void 0&&(d.y=r),i!==void 0&&Hke(d,i,o,a,!1)}const WG=()=>({...zA(),attrs:{}}),qA=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Gke(t,e,r,n){const s=m.useMemo(()=>{const i=WG();return VA(i,e,{enableHardwareAcceleration:!1},qA(n),t.transformTemplate),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};VG(i,t.style,t),s.style={...i,...s.style}}return s}function Kke(t=!1){return(r,n,s,i,{latestValues:o},a)=>{const c=(BA(r)?Gke:Fke)(n,o,a,r),u={...zke(n,typeof r=="string",t),...c,ref:i},{children:d}=n,h=m.useMemo(()=>ds(d)?d.get():d,[d]);return s&&(u["data-projection-id"]=s),m.createElement(r,{...u,children:h})}}const WA=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HG(t,{style:e,vars:r},n,s){Object.assign(t.style,e,s&&s.getProjectionStyles(n));for(const i in r)t.style.setProperty(i,r[i])}const GG=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 KG(t,e,r,n){HG(t,e,void 0,n);for(const s in e.attrs)t.setAttribute(GG.has(s)?s:WA(s),e.attrs[s])}function HA(t,e){const{style:r}=t,n={};for(const s in r)(ds(r[s])||e.style&&ds(e.style[s])||BG(s,t))&&(n[s]=r[s]);return n}function QG(t,e){const r=HA(t,e);for(const n in t)if(ds(t[n])||ds(e[n])){const s=n==="x"||n==="y"?"attr"+n.toUpperCase():n;r[s]=t[n]}return r}function GA(t,e,r,n={},s={}){return typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(r!==void 0?r:t.custom,n,s)),e}const Fb=t=>Array.isArray(t),Qke=t=>Boolean(t&&typeof t=="object"&&t.mix&&t.toValue),Yke=t=>Fb(t)?t[t.length-1]||0:t;function Gp(t){const e=ds(t)?t.get():t;return Qke(e)?e.toValue():e}function Jke({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:r},n,s,i){const o={latestValues:Xke(n,s,i,t),renderState:e()};return r&&(o.mount=a=>r(n,a,o)),o}const YG=t=>(e,r)=>{const n=m.useContext(ux),s=m.useContext(dx),i=()=>Jke(t,e,n,s);return r?i():FA(i)};function Xke(t,e,r,n){const s={},i=n(t,{});for(const d in i)s[d]=Gp(i[d]);let{initial:o,animate:a}=t;const l=yx(t),c=LG(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let f=r?r.initial===!1:!1;f=f||o===!1;const u=f?a:o;return u&&typeof u!="boolean"&&!vx(u)&&(Array.isArray(u)?u:[u]).forEach(h=>{const v=GA(t,h);if(!v)return;const{transitionEnd:y,transition:g,...b}=v;for(const p in b){let w=b[p];if(Array.isArray(w)){const E=f?w.length-1:0;w=w[E]}w!==null&&(s[p]=w)}for(const p in y)s[p]=y[p]}),s}const Zke={useVisualState:YG({scrapeMotionValuesFromProps:QG,createRenderState:WG,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}}VA(r,n,{enableHardwareAcceleration:!1},qA(e.tagName),t.transformTemplate),KG(e,r)}})},e8e={useVisualState:YG({scrapeMotionValuesFromProps:HA,createRenderState:zA})};function t8e(t,{forwardMotionProps:e=!1},r,n,s){return{...BA(t)?Zke:e8e,preloadedFeatures:r,useRender:Kke(e),createVisualElement:n,projectionNodeConstructor:s,Component:t}}var gt;(function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.InView="whileInView",t.Exit="exit"})(gt||(gt={}));function mx(t,e,r,n={passive:!0}){return t.addEventListener(e,r,n),()=>t.removeEventListener(e,r)}function LS(t,e,r,n){m.useEffect(()=>{const s=t.current;if(r&&s)return mx(s,e,r,n)},[t,e,r,n])}function r8e({whileFocus:t,visualElement:e}){const{animationState:r}=e,n=m.useCallback(()=>{r&&r.setActive(gt.Focus,!0)},[r]),s=m.useCallback(()=>{r&&r.setActive(gt.Focus,!1)},[r]);LS(e,"focus",t?n:void 0),LS(e,"blur",t?s:void 0)}const JG=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function KA(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const XG=t=>e=>JG(e)&&t(e,KA(e));function wd(t,e,r,n){return mx(t,e,XG(r),n)}function Bb(t,e,r,n){return LS(t,e,r&&XG(r),n)}function ZG(t){let e=null;return()=>{const r=()=>{e=null};return e===null?(e=t,r):!1}}const KI=ZG("dragHorizontal"),QI=ZG("dragVertical");function eK(t){let e=!1;if(t==="y")e=QI();else if(t==="x")e=KI();else{const r=KI(),n=QI();r&&n?e=()=>{r(),n()}:(r&&r(),n&&n())}return e}function tK(){const t=eK(!0);return t?(t(),!1):!0}function YI(t,e,r,n){return(s,i)=>{s.type==="touch"||tK()||(r&&t.animationState&&t.animationState.setActive(gt.Hover,e),n&&n(s,i))}}function n8e({onHoverStart:t,onHoverEnd:e,whileHover:r,visualElement:n}){Bb(n,"pointerenter",m.useMemo(()=>t||r?YI(n,!0,Boolean(r),t):void 0,[t,Boolean(r),n]),{passive:!t}),Bb(n,"pointerleave",m.useMemo(()=>e||r?YI(n,!1,Boolean(r),e):void 0,[t,Boolean(r),n]),{passive:!e})}const rK=(t,e)=>e?t===e?!0:rK(t,e.parentElement):!1;function nK(t){return m.useEffect(()=>()=>t(),[])}const s8e=(t,e)=>r=>e(t(r)),px=(...t)=>t.reduce(s8e);function i8e({onTap:t,onTapStart:e,onTapCancel:r,whileTap:n,visualElement:s,...i}){const o=t||e||r||n,a=m.useRef(!1),l=m.useRef(null),c={passive:!(e||t||r||i.onPointerDown)};function f(){l.current&&l.current(),l.current=null}function u(){return f(),a.current=!1,s.getProps().whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!1),!tK()}function d(y,g){var b,p,w,E;u()&&(rK(s.current,y.target)?(E=(w=s.getProps()).onTap)===null||E===void 0||E.call(w,y,g):(p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}function h(y,g){var b,p;u()&&((p=(b=s.getProps()).onTapCancel)===null||p===void 0||p.call(b,y,g))}const v=m.useCallback((y,g)=>{var b;if(f(),a.current)return;a.current=!0,l.current=px(wd(window,"pointerup",d,c),wd(window,"pointercancel",h,c));const p=s.getProps();p.whileTap&&s.animationState&&s.animationState.setActive(gt.Tap,!0),(b=p.onTapStart)===null||b===void 0||b.call(p,y,g)},[Boolean(e),s]);Bb(s,"pointerdown",o?v:void 0,c),nK(f)}const jS=new WeakMap,HE=new WeakMap,o8e=t=>{const e=jS.get(t.target);e&&e(t)},a8e=t=>{t.forEach(o8e)};function l8e({root:t,...e}){const r=t||document;HE.has(r)||HE.set(r,{});const n=HE.get(r),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(a8e,{root:t,...e})),n[s]}function c8e(t,e,r){const n=l8e(e);return jS.set(t,r),n.observe(t),()=>{jS.delete(t),n.unobserve(t)}}function f8e({visualElement:t,whileInView:e,onViewportEnter:r,onViewportLeave:n,viewport:s={}}){const i=m.useRef({hasEnteredView:!1,isInView:!1});let o=Boolean(e||r||n);s.once&&i.current.hasEnteredView&&(o=!1),(typeof IntersectionObserver>"u"?h8e:d8e)(o,i.current,t,s)}const u8e={some:0,all:1};function d8e(t,e,r,{root:n,margin:s,amount:i="some",once:o}){m.useEffect(()=>{if(!t||!r.current)return;const a={root:n==null?void 0:n.current,rootMargin:s,threshold:typeof i=="number"?i:u8e[i]},l=c=>{const{isIntersecting:f}=c;if(e.isInView===f||(e.isInView=f,o&&!f&&e.hasEnteredView))return;f&&(e.hasEnteredView=!0),r.animationState&&r.animationState.setActive(gt.InView,f);const u=r.getProps(),d=f?u.onViewportEnter:u.onViewportLeave;d&&d(c)};return c8e(r.current,a,l)},[t,n,s,i])}function h8e(t,e,r,{fallback:n=!0}){m.useEffect(()=>{!t||!n||requestAnimationFrame(()=>{e.hasEnteredView=!0;const{onViewportEnter:s}=r.getProps();s&&s(null),r.animationState&&r.animationState.setActive(gt.InView,!0)})},[t])}const gl=t=>e=>(t(e),null),v8e={inView:gl(f8e),tap:gl(i8e),focus:gl(r8e),hover:gl(n8e)};function sK(){const t=m.useContext(dx);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:r,register:n}=t,s=m.useId();return m.useEffect(()=>n(s),[]),!e&&r?[!1,()=>r&&r(s)]:[!0]}function iK(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),m8e=t=>/^0[^.\s]+$/.test(t),la={delta:0,timestamp:0},oK=1/60*1e3,p8e=typeof performance<"u"?()=>performance.now():()=>Date.now(),aK=typeof window<"u"?t=>window.requestAnimationFrame(t):t=>setTimeout(()=>t(p8e()),oK);function g8e(t){let e=[],r=[],n=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const u=f&&s,d=u?e:r;return c&&o.add(l),d.indexOf(l)===-1&&(d.push(l),u&&s&&(n=e.length)),l},cancel:l=>{const c=r.indexOf(l);c!==-1&&r.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[e,r]=[r,e],r.length=0,n=e.length,n)for(let c=0;c(t[e]=g8e(()=>Uy=!0),t),{}),Hn=j0.reduce((t,e)=>{const r=gx[e];return t[e]=(n,s=!1,i=!1)=>(Uy||x8e(),r.schedule(n,s,i)),t},{}),Ql=j0.reduce((t,e)=>(t[e]=gx[e].cancel,t),{}),GE=j0.reduce((t,e)=>(t[e]=()=>gx[e].process(la),t),{}),w8e=t=>gx[t].process(la),lK=t=>{Uy=!1,la.delta=FS?oK:Math.max(Math.min(t-la.timestamp,b8e),1),la.timestamp=t,BS=!0,j0.forEach(w8e),BS=!1,Uy&&(FS=!1,aK(lK))},x8e=()=>{Uy=!0,FS=!0,BS||aK(lK)};function QA(t,e){t.indexOf(e)===-1&&t.push(e)}function YA(t,e){const r=t.indexOf(e);r>-1&&t.splice(r,1)}class JA{constructor(){this.subscriptions=[]}add(e){return QA(this.subscriptions,e),()=>YA(this.subscriptions,e)}notify(e,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,r,n);else for(let i=0;i!isNaN(parseFloat(t));class E8e{constructor(e,r={}){this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,s=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=la;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Hn.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()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Hn.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=C8e(this.current),this.owner=r.owner}onChange(e){return this.on("change",e)}on(e,r){this.events[e]||(this.events[e]=new JA);const n=this.events[e].add(r);return e==="change"?()=>{n(),Hn.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?XA(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 rh(t,e){return new E8e(t,e)}const ZA=(t,e)=>r=>Boolean(N0(r)&&Mke.test(r)&&r.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(r,e)),cK=(t,e,r)=>n=>{if(!N0(n))return n;const[s,i,o,a]=n.match(By);return{[t]:parseFloat(s),[e]:parseFloat(i),[r]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},S8e=t=>th(0,255,t),KE={...Kf,transform:t=>Math.round(S8e(t))},Zc={test:ZA("rgb","red"),parse:cK("red","green","blue"),transform:({red:t,green:e,blue:r,alpha:n=1})=>"rgba("+KE.transform(t)+", "+KE.transform(e)+", "+KE.transform(r)+", "+Ev(Cv.transform(n))+")"};function k8e(t){let e="",r="",n="",s="";return t.length>5?(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),r=t.substring(2,3),n=t.substring(3,4),s=t.substring(4,5),e+=e,r+=r,n+=n,s+=s),{red:parseInt(e,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const US={test:ZA("#"),parse:k8e,transform:Zc.transform},Qu={test:ZA("hsl","hue"),parse:cK("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:r,alpha:n=1})=>"hsla("+Math.round(t)+", "+Ao.transform(Ev(e))+", "+Ao.transform(Ev(r))+", "+Ev(Cv.transform(n))+")"},Dn={test:t=>Zc.test(t)||US.test(t)||Qu.test(t),parse:t=>Zc.test(t)?Zc.parse(t):Qu.test(t)?Qu.parse(t):US.parse(t),transform:t=>N0(t)?t:t.hasOwnProperty("red")?Zc.transform(t):Qu.transform(t)},fK="${c}",uK="${n}";function $8e(t){var e,r;return isNaN(t)&&N0(t)&&(((e=t.match(By))===null||e===void 0?void 0:e.length)||0)+(((r=t.match(NS))===null||r===void 0?void 0:r.length)||0)>0}function Ub(t){typeof t=="number"&&(t=`${t}`);const e=[];let r=0,n=0;const s=t.match(NS);s&&(r=s.length,t=t.replace(NS,fK),e.push(...s.map(Dn.parse)));const i=t.match(By);return i&&(n=i.length,t=t.replace(By,uK),e.push(...i.map(Kf.parse))),{values:e,numColors:r,numNumbers:n,tokenised:t}}function dK(t){return Ub(t).values}function hK(t){const{values:e,numColors:r,tokenised:n}=Ub(t),s=e.length;return i=>{let o=n;for(let a=0;atypeof t=="number"?0:t;function _8e(t){const e=dK(t);return hK(t)(e.map(A8e))}const Yl={test:$8e,parse:dK,createTransformer:hK,getAnimatableNone:_8e},P8e=new Set(["brightness","contrast","saturate","opacity"]);function T8e(t){const[e,r]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=r.match(By)||[];if(!n)return t;const s=r.replace(n,"");let i=P8e.has(e)?1:0;return n!==r&&(i*=100),e+"("+i+s+")"}const R8e=/([a-z-]*)\(.*?\)/g,zS={...Yl,getAnimatableNone:t=>{const e=t.match(R8e);return e?e.map(T8e).join(" "):t}},I8e={...zG,color:Dn,backgroundColor:Dn,outlineColor:Dn,fill:Dn,stroke:Dn,borderColor:Dn,borderTopColor:Dn,borderRightColor:Dn,borderBottomColor:Dn,borderLeftColor:Dn,filter:zS,WebkitFilter:zS},e_=t=>I8e[t];function t_(t,e){var r;let n=e_(t);return n!==zS&&(n=Yl),(r=n.getAnimatableNone)===null||r===void 0?void 0:r.call(n,e)}const vK=t=>e=>e.test(t),O8e={test:t=>t==="auto",parse:t=>t},yK=[Kf,Ee,Ao,Qa,Nke,Dke,O8e],x1=t=>yK.find(vK(t)),M8e=[...yK,Dn,Yl],D8e=t=>M8e.find(vK(t));function N8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.get()),e}function L8e(t){const e={};return t.values.forEach((r,n)=>e[n]=r.getVelocity()),e}function bx(t,e,r){const n=t.getProps();return GA(n,e,r!==void 0?r:n.custom,N8e(t),L8e(t))}function j8e(t,e,r){t.hasValue(e)?t.getValue(e).set(r):t.addValue(e,rh(r))}function F8e(t,e){const r=bx(t,e);let{transitionEnd:n={},transition:s={},...i}=r?t.makeTargetAnimatable(r,!1):{};i={...i,...n};for(const o in i){const a=Yke(i[o]);j8e(t,o,a)}}function B8e(t,e,r){var n,s;const i=Object.keys(e).filter(a=>!t.hasValue(a)),o=i.length;if(o)for(let a=0;at*1e3,W8e={current:!1},r_=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,n_=t=>e=>1-t(1-e),s_=t=>t*t,H8e=n_(s_),i_=r_(s_),xr=(t,e,r)=>-r*t+r*e+t;function QE(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 G8e({hue:t,saturation:e,lightness:r,alpha:n}){t/=360,e/=100,r/=100;let s=0,i=0,o=0;if(!e)s=i=o=r;else{const a=r<.5?r*(1+e):r+e-r*e,l=2*r-a;s=QE(l,a,t+1/3),i=QE(l,a,t),o=QE(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:n}}const YE=(t,e,r)=>{const n=t*t;return Math.sqrt(Math.max(0,r*(e*e-n)+n))},K8e=[US,Zc,Qu],Q8e=t=>K8e.find(e=>e.test(t));function JI(t){const e=Q8e(t);let r=e.parse(t);return e===Qu&&(r=G8e(r)),r}const mK=(t,e)=>{const r=JI(t),n=JI(e),s={...r};return i=>(s.red=YE(r.red,n.red,i),s.green=YE(r.green,n.green,i),s.blue=YE(r.blue,n.blue,i),s.alpha=xr(r.alpha,n.alpha,i),Zc.transform(s))};function pK(t,e){return typeof t=="number"?r=>xr(t,e,r):Dn.test(t)?mK(t,e):bK(t,e)}const gK=(t,e)=>{const r=[...t],n=r.length,s=t.map((i,o)=>pK(i,e[o]));return i=>{for(let o=0;o{const r={...t,...e},n={};for(const s in r)t[s]!==void 0&&e[s]!==void 0&&(n[s]=pK(t[s],e[s]));return s=>{for(const i in n)r[i]=n[i](s);return r}},bK=(t,e)=>{const r=Yl.createTransformer(e),n=Ub(t),s=Ub(e);return n.numColors===s.numColors&&n.numNumbers>=s.numNumbers?px(gK(n.values,s.values),r):o=>`${o>0?e:t}`},Vb=(t,e,r)=>{const n=e-t;return n===0?1:(r-t)/n},XI=(t,e)=>r=>xr(t,e,r);function J8e(t){return typeof t=="number"?XI:typeof t=="string"?Dn.test(t)?mK:bK:Array.isArray(t)?gK:typeof t=="object"?Y8e:XI}function X8e(t,e,r){const n=[],s=r||J8e(t[0]),i=t.length-1;for(let o=0;ot[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=X8e(e,n,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(th(t[0],t[i-1],c)):l}const o_=t=>t,xK=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,Z8e=1e-7,e$e=12;function t$e(t,e,r,n,s){let i,o,a=0;do o=e+(r-e)/2,i=xK(o,n,s)-t,i>0?r=o:e=o;while(Math.abs(i)>Z8e&&++at$e(i,0,1,t,r);return i=>i===0||i===1?i:xK(s(i),e,n)}const EK=t=>1-Math.sin(Math.acos(t)),a_=n_(EK),r$e=r_(a_),SK=CK(.33,1.53,.69,.99),l_=n_(SK),n$e=r_(l_),s$e=t=>(t*=2)<1?.5*l_(t):.5*(2-Math.pow(2,-10*(t-1))),i$e={linear:o_,easeIn:s_,easeInOut:i_,easeOut:H8e,circIn:EK,circInOut:r$e,circOut:a_,backIn:l_,backInOut:n$e,backOut:SK,anticipate:s$e},ZI=t=>{if(Array.isArray(t)){Fl(t.length===4);const[e,r,n,s]=t;return CK(e,r,n,s)}else if(typeof t=="string")return i$e[t];return t},o$e=t=>Array.isArray(t)&&typeof t[0]!="number";function a$e(t,e){return t.map(()=>e||i_).splice(0,t.length-1)}function l$e(t){const e=t.length;return t.map((r,n)=>n!==0?n/(e-1):0)}function c$e(t,e){return t.map(r=>r*e)}function VS({keyframes:t,ease:e=i_,times:r,duration:n=300}){t=[...t];const s=o$e(e)?e.map(ZI):ZI(e),i={done:!1,value:t[0]},o=c$e(r&&r.length===t.length?r:l$e(t),n);function a(){return wK(o,t,{ease:Array.isArray(s)?s:a$e(t,s)})}let l=a();return{next:c=>(i.value=l(c),i.done=c>=n,i),flipTarget:()=>{t.reverse(),l=a()}}}const JE=.001,f$e=.01,eO=10,u$e=.05,d$e=1;function h$e({duration:t=800,bounce:e=.25,velocity:r=0,mass:n=1}){let s,i;hF(t<=eO*1e3);let o=1-e;o=th(u$e,d$e,o),t=th(f$e,eO,t/1e3),o<1?(s=c=>{const f=c*o,u=f*t,d=f-r,h=qS(c,o),v=Math.exp(-u);return JE-d/h*v},i=c=>{const u=c*o*t,d=u*r+r,h=Math.pow(o,2)*Math.pow(c,2)*t,v=Math.exp(-u),y=qS(Math.pow(c,2),o);return(-s(c)+JE>0?-1:1)*((d-h)*v)/y}):(s=c=>{const f=Math.exp(-c*t),u=(c-r)*t+1;return-JE+f*u},i=c=>{const f=Math.exp(-c*t),u=(r-c)*(t*t);return f*u});const a=5/t,l=y$e(s,i,a);if(t=t*1e3,isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const v$e=12;function y$e(t,e,r){let n=r;for(let s=1;st[r]!==void 0)}function g$e(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!tO(t,p$e)&&tO(t,m$e)){const r=h$e(t);e={...e,...r,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}const b$e=5;function kK({keyframes:t,restDelta:e,restSpeed:r,...n}){let s=t[0],i=t[t.length-1];const o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:f,duration:u,isResolvedFromDuration:d}=g$e(n);let h=w$e,v=f?-(f/1e3):0;const y=l/(2*Math.sqrt(a*c));function g(){const b=i-s,p=Math.sqrt(a/c)/1e3,w=Math.abs(b)<5;if(r||(r=w?.01:2),e||(e=w?.005:.5),y<1){const E=qS(p,y);h=k=>{const $=Math.exp(-y*p*k);return i-$*((v+y*p*b)/E*Math.sin(E*k)+b*Math.cos(E*k))}}else if(y===1)h=E=>i-Math.exp(-p*E)*(b+(v+p*b)*E);else{const E=p*Math.sqrt(y*y-1);h=k=>{const $=Math.exp(-y*p*k),x=Math.min(E*k,300);return i-$*((v+y*p*b)*Math.sinh(x)+E*b*Math.cosh(x))/E}}}return g(),{next:b=>{const p=h(b);if(d)o.done=b>=u;else{let w=v;if(b!==0)if(y<1){const $=Math.max(0,b-b$e);w=XA(p-h($),b-$)}else w=0;const E=Math.abs(w)<=r,k=Math.abs(i-p)<=e;o.done=E&&k}return o.value=o.done?i:p,o},flipTarget:()=>{v=-v,[s,i]=[i,s],g()}}}kK.needsInterpolation=(t,e)=>typeof t=="string"||typeof e=="string";const w$e=t=>0;function x$e({keyframes:t=[0],velocity:e=0,power:r=.8,timeConstant:n=350,restDelta:s=.5,modifyTarget:i}){const o=t[0],a={done:!1,value:o};let l=r*e;const c=o+l,f=i===void 0?c:i(c);return f!==c&&(l=f-o),{next:u=>{const d=-l*Math.exp(-u/n);return a.done=!(d>s||d<-s),a.value=a.done?f:f+d,a},flipTarget:()=>{}}}const C$e={decay:x$e,keyframes:VS,tween:VS,spring:kK};function $K(t,e,r=0){return t-e-r}function E$e(t,e=0,r=0,n=!0){return n?$K(e+-t,e,r):e-(t-e)+r}function S$e(t,e,r,n){return n?t>=e+r:t<=-r}const k$e=t=>{const e=({delta:r})=>t(r);return{start:()=>Hn.update(e,!0),stop:()=>Ql.update(e)}};function qb({duration:t,driver:e=k$e,elapsed:r=0,repeat:n=0,repeatType:s="loop",repeatDelay:i=0,keyframes:o,autoplay:a=!0,onPlay:l,onStop:c,onComplete:f,onRepeat:u,onUpdate:d,type:h="keyframes",...v}){var y,g;const b=r;let p,w=0,E=t,k=!1,$=!0,x;const T=C$e[o.length>2?"keyframes":h]||VS,B=o[0],L=o[o.length-1];let U={done:!1,value:B};!((g=(y=T).needsInterpolation)===null||g===void 0)&&g.call(y,B,L)&&(x=wK([0,100],[B,L],{clamp:!1}),o=[0,100]);const V=T({...v,duration:t,keyframes:o});function N(){w++,s==="reverse"?($=w%2===0,r=E$e(r,E,i,$)):(r=$K(r,E,i),s==="mirror"&&V.flipTarget()),k=!1,u&&u()}function C(){p&&p.stop(),f&&f()}function S(M){$||(M=-M),r+=M,k||(U=V.next(Math.max(0,r)),x&&(U.value=x(U.value)),k=$?U.done:r<=0),d&&d(U.value),k&&(w===0&&(E=E!==void 0?E:r),w{c&&c(),p&&p.stop()},set currentTime(M){r=b,S(M)},sample:M=>{r=b;const _=t&&typeof t=="number"?Math.max(t*.5,50):50;let I=0;for(S(0);I<=M;){const F=M-I;S(Math.min(F,_)),I+=_}return U}}}function $$e(t){return!t||Array.isArray(t)||typeof t=="string"&&AK[t]}const F1=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`,AK={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:F1([0,.65,.55,1]),circOut:F1([.55,0,1,.45]),backIn:F1([.31,.01,.66,-.59]),backOut:F1([.33,1.53,.69,.99])};function A$e(t){if(t)return Array.isArray(t)?F1(t):AK[t]}function _$e(t,e,r,{delay:n=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){return t.animate({[e]:r,offset:l},{delay:n,duration:s,easing:A$e(a),fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const rO={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},XE={},_K={};for(const t in rO)_K[t]=()=>(XE[t]===void 0&&(XE[t]=rO[t]()),XE[t]);function P$e(t,{repeat:e,repeatType:r="loop"}){const n=e&&r!=="loop"&&e%2===1?0:t.length-1;return t[n]}const T$e=new Set(["opacity"]),Fm=10;function R$e(t,e,{onUpdate:r,onComplete:n,...s}){if(!(_K.waapi()&&T$e.has(e)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0))return!1;let{keyframes:o,duration:a=300,elapsed:l=0,ease:c}=s;if(s.type==="spring"||!$$e(s.ease)){if(s.repeat===1/0)return;const u=qb({...s,elapsed:0});let d={done:!1,value:o[0]};const h=[];let v=0;for(;!d.done&&v<2e4;)d=u.sample(v),h.push(d.value),v+=Fm;o=h,a=v-Fm,c="linear"}const f=_$e(t.owner.current,e,o,{...s,delay:-l,duration:a,ease:c});return f.onfinish=()=>{t.set(P$e(o,s)),Hn.update(()=>f.cancel()),n&&n()},{get currentTime(){return f.currentTime||0},set currentTime(u){f.currentTime=u},stop:()=>{const{currentTime:u}=f;if(u){const d=qb({...s,autoplay:!1});t.setWithVelocity(d.sample(u-Fm).value,d.sample(u).value,Fm)}Hn.update(()=>f.cancel())}}}function PK(t,e){const r=performance.now(),n=({timestamp:s})=>{const i=s-r;i>=e&&(Ql.read(n),t(i-e))};return Hn.read(n,!0),()=>Ql.read(n)}function I$e({keyframes:t,elapsed:e,onUpdate:r,onComplete:n}){const s=()=>{r&&r(t[t.length-1]),n&&n()};return e?{stop:PK(s,-e)}:s()}function O$e({keyframes:t,velocity:e=0,min:r,max:n,power:s=.8,timeConstant:i=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:f,onUpdate:u,onComplete:d,onStop:h}){const v=t[0];let y;function g(E){return r!==void 0&&En}function b(E){return r===void 0?n:n===void 0||Math.abs(r-E){var $;u==null||u(k),($=E.onUpdate)===null||$===void 0||$.call(E,k)},onComplete:d,onStop:h})}function w(E){p({type:"spring",stiffness:o,damping:a,restDelta:l,...E})}if(g(v))w({velocity:e,keyframes:[v,b(v)]});else{let E=s*e+v;typeof c<"u"&&(E=c(E));const k=b(E),$=k===r?-1:1;let x,T;const B=L=>{x=T,T=L,e=XA(L-x,la.delta),($===1&&L>k||$===-1&&Ly==null?void 0:y.stop()}}const Pc=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Bm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ZE=()=>({type:"keyframes",ease:"linear",duration:.3}),M$e={type:"keyframes",duration:.8},nO={x:Pc,y:Pc,z:Pc,rotate:Pc,rotateX:Pc,rotateY:Pc,rotateZ:Pc,scaleX:Bm,scaleY:Bm,scale:Bm,opacity:ZE,backgroundColor:ZE,color:ZE,default:Bm},D$e=(t,{keyframes:e})=>e.length>2?M$e:(nO[t]||nO.default)(e[1]),WS=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Yl.test(e)&&!e.startsWith("url("));function N$e({when:t,delay:e,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...f}){return!!Object.keys(f).length}function sO(t){return t===0||typeof t=="string"&&parseFloat(t)===0&&t.indexOf(" ")===-1}function iO(t){return typeof t=="number"?0:t_("",t)}function TK(t,e){return t[e]||t.default||t}function L$e(t,e,r,n){const s=WS(e,r);let i=n.from!==void 0?n.from:t.get();return i==="none"&&s&&typeof r=="string"?i=t_(e,r):sO(i)&&typeof r=="string"?i=iO(r):!Array.isArray(r)&&sO(r)&&typeof i=="string"&&(r=iO(i)),Array.isArray(r)?(r[0]===null&&(r[0]=i),r):[i,r]}const c_=(t,e,r,n={})=>s=>{const i=TK(n,t)||{},o=i.delay||n.delay||0;let{elapsed:a=0}=n;a=a-Kp(o);const l=L$e(e,t,r,i),c=l[0],f=l[l.length-1],u=WS(t,c),d=WS(t,f);let h={keyframes:l,velocity:e.getVelocity(),...i,elapsed:a,onUpdate:g=>{e.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(!u||!d||W8e.current||i.type===!1)return I$e(h);if(i.type==="inertia")return O$e(h);N$e(i)||(h={...h,...D$e(t,h)}),h.duration&&(h.duration=Kp(h.duration)),h.repeatDelay&&(h.repeatDelay=Kp(h.repeatDelay));const v=e.owner,y=v&&v.current;if(v&&y instanceof HTMLElement&&!(v!=null&&v.getProps().onUpdate)){const g=R$e(e,t,h);if(g)return g}return qb(h)};function j$e(t,e,r={}){t.notify("AnimationStart",e);let n;if(Array.isArray(e)){const s=e.map(i=>HS(t,i,r));n=Promise.all(s)}else if(typeof e=="string")n=HS(t,e,r);else{const s=typeof e=="function"?bx(t,e,r.custom):e;n=RK(t,s,r)}return n.then(()=>t.notify("AnimationComplete",e))}function HS(t,e,r={}){var n;const s=bx(t,e,r.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(i=r.transitionOverride);const o=s?()=>RK(t,s,r):()=>Promise.resolve(),a=!((n=t.variantChildren)===null||n===void 0)&&n.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:u,staggerDirection:d}=i;return F$e(t,e,f+c,u,d,r)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,f]=l==="beforeChildren"?[o,a]:[a,o];return c().then(f)}else return Promise.all([o(),a(r.delay)])}function RK(t,e,{delay:r=0,transitionOverride:n,type:s}={}){var i;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");n&&(o=n);const f=[],u=s&&((i=t.animationState)===null||i===void 0?void 0:i.getState()[s]);for(const d in l){const h=t.getValue(d),v=l[d];if(!h||v===void 0||u&&U$e(u,d))continue;const y={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!h.hasAnimated){const b=t.getProps()[q8e];b&&(y.elapsed=window.HandoffAppearAnimations(b,d,h,Hn))}let g=h.start(c_(d,h,v,t.shouldReduceMotion&&Uh.has(d)?{type:!1}:y));zb(c)&&(c.add(d),g=g.then(()=>c.remove(d))),f.push(g)}return Promise.all(f).then(()=>{a&&F8e(t,a)})}function F$e(t,e,r=0,n=0,s=1,i){const o=[],a=(t.variantChildren.size-1)*n,l=s===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(t.variantChildren).sort(B$e).forEach((c,f)=>{c.notify("AnimationStart",e),o.push(HS(c,e,{...i,delay:r+l(f)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function B$e(t,e){return t.sortNodePosition(e)}function U$e({protectedKeys:t,needsAnimating:e},r){const n=t.hasOwnProperty(r)&&e[r]!==!0;return e[r]=!1,n}const f_=[gt.Animate,gt.InView,gt.Focus,gt.Hover,gt.Tap,gt.Drag,gt.Exit],z$e=[...f_].reverse(),V$e=f_.length;function q$e(t){return e=>Promise.all(e.map(({animation:r,options:n})=>j$e(t,r,n)))}function W$e(t){let e=q$e(t);const r=G$e();let n=!0;const s=(l,c)=>{const f=bx(t,c);if(f){const{transition:u,transitionEnd:d,...h}=f;l={...l,...h,...d}}return l};function i(l){e=l(t)}function o(l,c){const f=t.getProps(),u=t.getVariantContext(!0)||{},d=[],h=new Set;let v={},y=1/0;for(let b=0;by&&k;const L=Array.isArray(E)?E:[E];let U=L.reduce(s,{});$===!1&&(U={});const{prevResolvedValues:V={}}=w,N={...V,...U},C=S=>{B=!0,h.delete(S),w.needsAnimating[S]=!0};for(const S in N){const R=U[S],M=V[S];v.hasOwnProperty(S)||(R!==M?Fb(R)&&Fb(M)?!iK(R,M)||T?C(S):w.protectedKeys[S]=!0:R!==void 0?C(S):h.add(S):R!==void 0&&h.has(S)?C(S):w.protectedKeys[S]=!0)}w.prevProp=E,w.prevResolvedValues=U,w.isActive&&(v={...v,...U}),n&&t.blockInitialAnimation&&(B=!1),B&&!x&&d.push(...L.map(S=>({animation:S,options:{type:p,...l}})))}if(h.size){const b={};h.forEach(p=>{const w=t.getBaseTarget(p);w!==void 0&&(b[p]=w)}),d.push({animation:b})}let g=Boolean(d.length);return n&&f.initial===!1&&!t.manuallyAnimateOnMount&&(g=!1),n=!1,g?e(d):Promise.resolve()}function a(l,c,f){var u;if(r[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var v;return(v=h.animationState)===null||v===void 0?void 0:v.setActive(l,c)}),r[l].isActive=c;const d=o(f,l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>r}}function H$e(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!iK(e,t):!1}function Tc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function G$e(){return{[gt.Animate]:Tc(!0),[gt.InView]:Tc(),[gt.Hover]:Tc(),[gt.Tap]:Tc(),[gt.Drag]:Tc(),[gt.Focus]:Tc(),[gt.Exit]:Tc()}}const K$e={animation:gl(({visualElement:t,animate:e})=>{t.animationState||(t.animationState=W$e(t)),vx(e)&&m.useEffect(()=>e.subscribe(t),[e])}),exit:gl(t=>{const{custom:e,visualElement:r}=t,[n,s]=sK(),i=m.useContext(dx);m.useEffect(()=>{r.isPresent=n;const o=r.animationState&&r.animationState.setActive(gt.Exit,!n,{custom:i&&i.custom||e});o&&!n&&o.then(s)},[n])})},oO=(t,e)=>Math.abs(t-e);function Q$e(t,e){const r=oO(t.x,e.x),n=oO(t.y,e.y);return Math.sqrt(r**2+n**2)}class IK{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 c=t5(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,u=Q$e(c.offset,{x:0,y:0})>=3;if(!f&&!u)return;const{point:d}=c,{timestamp:h}=la;this.history.push({...d,timestamp:h});const{onStart:v,onMove:y}=this.handlers;f||(v&&v(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,f)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=e5(f,this.transformPagePoint),Hn.update(this.updatePoint,!0)},this.handlePointerUp=(c,f)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:u,onSessionEnd:d}=this.handlers,h=t5(c.type==="pointercancel"?this.lastMoveEventInfo:e5(f,this.transformPagePoint),this.history);this.startEvent&&u&&u(c,h),d&&d(c,h)},!JG(e))return;this.handlers=r,this.transformPagePoint=n;const s=KA(e),i=e5(s,this.transformPagePoint),{point:o}=i,{timestamp:a}=la;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=r;l&&l(e,t5(i,this.history)),this.removeListeners=px(wd(window,"pointermove",this.handlePointerMove),wd(window,"pointerup",this.handlePointerUp),wd(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ql.update(this.updatePoint)}}function e5(t,e){return e?{point:e(t.point)}:t}function aO(t,e){return{x:t.x-e.x,y:t.y-e.y}}function t5({point:t},e){return{point:t,delta:aO(t,OK(e)),offset:aO(t,Y$e(e)),velocity:J$e(e,.1)}}function Y$e(t){return t[0]}function OK(t){return t[t.length-1]}function J$e(t,e){if(t.length<2)return{x:0,y:0};let r=t.length-1,n=null;const s=OK(t);for(;r>=0&&(n=t[r],!(s.timestamp-n.timestamp>Kp(e)));)r--;if(!n)return{x:0,y:0};const i=(s.timestamp-n.timestamp)/1e3;if(i===0)return{x:0,y:0};const o={x:(s.x-n.x)/i,y:(s.y-n.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Os(t){return t.max-t.min}function GS(t,e=0,r=.01){return Math.abs(t-e)<=r}function lO(t,e,r,n=.5){t.origin=n,t.originPoint=xr(e.min,e.max,t.origin),t.scale=Os(r)/Os(e),(GS(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=xr(r.min,r.max,t.origin)-t.originPoint,(GS(t.translate)||isNaN(t.translate))&&(t.translate=0)}function Sv(t,e,r,n){lO(t.x,e.x,r.x,n==null?void 0:n.originX),lO(t.y,e.y,r.y,n==null?void 0:n.originY)}function cO(t,e,r){t.min=r.min+e.min,t.max=t.min+Os(e)}function X$e(t,e,r){cO(t.x,e.x,r.x),cO(t.y,e.y,r.y)}function fO(t,e,r){t.min=e.min-r.min,t.max=t.min+Os(e)}function kv(t,e,r){fO(t.x,e.x,r.x),fO(t.y,e.y,r.y)}function Z$e(t,{min:e,max:r},n){return e!==void 0&&tr&&(t=n?xr(r,t,n.max):Math.min(t,r)),t}function uO(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 e4e(t,{top:e,left:r,bottom:n,right:s}){return{x:uO(t.x,r,s),y:uO(t.y,e,n)}}function dO(t,e){let r=e.min-t.min,n=e.max-t.max;return e.max-e.minn?r=Vb(e.min,e.max-n,t.min):n>s&&(r=Vb(t.min,t.max-s,e.min)),th(0,1,r)}function n4e(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 KS=.35;function s4e(t=KS){return t===!1?t=0:t===!0&&(t=KS),{x:hO(t,"left","right"),y:hO(t,"top","bottom")}}function hO(t,e,r){return{min:vO(t,e),max:vO(t,r)}}function vO(t,e){return typeof t=="number"?t:t[e]||0}const yO=()=>({translate:0,scale:1,origin:0,originPoint:0}),$v=()=>({x:yO(),y:yO()}),mO=()=>({min:0,max:0}),Br=()=>({x:mO(),y:mO()});function so(t){return[t("x"),t("y")]}function MK({top:t,left:e,right:r,bottom:n}){return{x:{min:e,max:r},y:{min:t,max:n}}}function i4e({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function o4e(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 r5(t){return t===void 0||t===1}function QS({scale:t,scaleX:e,scaleY:r}){return!r5(t)||!r5(e)||!r5(r)}function Nc(t){return QS(t)||DK(t)||t.z||t.rotate||t.rotateX||t.rotateY}function DK(t){return pO(t.x)||pO(t.y)}function pO(t){return t&&t!=="0%"}function Wb(t,e,r){const n=t-r,s=e*n;return r+s}function gO(t,e,r,n,s){return s!==void 0&&(t=Wb(t,s,n)),Wb(t,r,n)+e}function YS(t,e=0,r=1,n,s){t.min=gO(t.min,e,r,n,s),t.max=gO(t.max,e,r,n,s)}function NK(t,{x:e,y:r}){YS(t.x,e.translate,e.scale,e.originPoint),YS(t.y,r.translate,r.scale,r.originPoint)}function a4e(t,e,r,n=!1){var s,i;const o=r.length;if(!o)return;e.x=e.y=1;let a,l;for(let c=0;c1.0000000000001||t<.999999999999?t:1}function il(t,e){t.min=t.min+e,t.max=t.max+e}function wO(t,e,[r,n,s]){const i=e[s]!==void 0?e[s]:.5,o=xr(t.min,t.max,i);YS(t,e[r],e[n],o,e.scale)}const l4e=["x","scaleX","originX"],c4e=["y","scaleY","originY"];function Yu(t,e){wO(t.x,e,l4e),wO(t.y,e,c4e)}function LK(t,e){return MK(o4e(t.getBoundingClientRect(),e))}function f4e(t,e,r){const n=LK(t,r),{scroll:s}=e;return s&&(il(n.x,s.offset.x),il(n.y,s.offset.y)),n}const u4e=new WeakMap;class d4e{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=Br(),this.visualElement=e}start(e,{snapToCursor:r=!1}={}){if(this.visualElement.isPresent===!1)return;const n=a=>{this.stopAnimation(),r&&this.snapToCursor(KA(a,"page").point)},s=(a,l)=>{var c;const{drag:f,dragPropagation:u,onDragStart:d}=this.getProps();f&&!u&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=eK(f),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),so(h=>{var v,y;let g=this.getAxisMotionValue(h).get()||0;if(Ao.test(g)){const b=(y=(v=this.visualElement.projection)===null||v===void 0?void 0:v.layout)===null||y===void 0?void 0:y.layoutBox[h];b&&(g=Os(b)*(parseFloat(g)/100))}this.originPoint[h]=g}),d==null||d(a,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(gt.Drag,!0))},i=(a,l)=>{const{dragPropagation:c,dragDirectionLock:f,onDirectionLock:u,onDrag:d}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:h}=l;if(f&&this.currentDirection===null){this.currentDirection=h4e(h),this.currentDirection!==null&&(u==null||u(this.currentDirection));return}this.updateAxis("x",l.point,h),this.updateAxis("y",l.point,h),this.visualElement.render(),d==null||d(a,l)},o=(a,l)=>this.stop(a,l);this.panSession=new IK(e,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:o},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,r){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=r;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i==null||i(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(gt.Drag,!1)}updateAxis(e,r,n){const{drag:s}=this.getProps();if(!n||!Um(e,s,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Z$e(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:r}=this.getProps(),{layout:n}=this.visualElement.projection||{},s=this.constraints;e&&Ku(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=e4e(n.layoutBox,e):this.constraints=!1,this.elastic=s4e(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&so(i=>{this.getAxisMotionValue(i)&&(this.constraints[i]=n4e(n.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:r}=this.getProps();if(!e||!Ku(e))return!1;const n=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=f4e(n,s.root,this.visualElement.getTransformPagePoint());let o=t4e(s.layout.layoutBox,i);if(r){const a=r(i4e(o));this.hasMutatedConstraints=!!a,a&&(o=MK(a))}return o}startAnimation(e){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=so(f=>{if(!Um(f,r,this.currentDirection))return;let u=(l==null?void 0:l[f])||{};o&&(u={min:0,max:0});const d=s?200:1e6,h=s?40:1e7,v={type:"inertia",velocity:n?e[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...u};return this.startAxisValueAnimation(f,v)});return Promise.all(c).then(a)}startAxisValueAnimation(e,r){const n=this.getAxisMotionValue(e);return n.start(c_(e,n,0,r))}stopAnimation(){so(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){var r;const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(e,((r=this.visualElement.getProps().initial)===null||r===void 0?void 0:r[e])||0)}snapToCursor(e){so(r=>{const{drag:n}=this.getProps();if(!Um(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[r];i.set(e[r]-xr(o,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:r,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Ku(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};so(a=>{const l=this.getAxisMotionValue(a);if(l){const c=l.get();i[a]=r4e({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",(e=s.root)===null||e===void 0||e.updateScroll(),s.updateLayout(),this.resolveConstraints(),so(a=>{if(!Um(a,r,null))return;const l=this.getAxisMotionValue(a),{min:c,max:f}=this.constraints[a];l.set(xr(c,f,i[a]))})}addListeners(){var e;if(!this.visualElement.current)return;u4e.set(this.visualElement,this);const r=this.visualElement.current,n=wd(r,"pointerdown",c=>{const{drag:f,dragListener:u=!0}=this.getProps();f&&u&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Ku(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&((e=i.root)===null||e===void 0||e.updateScroll(),i.updateLayout()),s();const a=mx(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(so(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=c[u].translate,d.set(d.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),l==null||l()}}getProps(){const e=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=KS,dragMomentum:a=!0}=e;return{...e,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Um(t,e,r){return(e===!0||e===t)&&(r===null||r===t)}function h4e(t,e=10){let r=null;return Math.abs(t.y)>e?r="y":Math.abs(t.x)>e&&(r="x"),r}function v4e(t){const{dragControls:e,visualElement:r}=t,n=FA(()=>new d4e(r));m.useEffect(()=>e&&e.subscribe(n),[n,e]),m.useEffect(()=>n.addListeners(),[n])}function y4e({onPan:t,onPanStart:e,onPanEnd:r,onPanSessionStart:n,visualElement:s}){const i=t||e||r||n,o=m.useRef(null),{transformPagePoint:a}=m.useContext(jA),l={onSessionStart:n,onStart:e,onMove:t,onEnd:(f,u)=>{o.current=null,r&&r(f,u)}};m.useEffect(()=>{o.current!==null&&o.current.updateHandlers(l)});function c(f){o.current=new IK(f,l,{transformPagePoint:a})}Bb(s,"pointerdown",i&&c),nK(()=>o.current&&o.current.end())}const m4e={pan:gl(y4e),drag:gl(v4e)};function JS(t){return typeof t=="string"&&t.startsWith("var(--")}const jK=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function p4e(t){const e=jK.exec(t);if(!e)return[,];const[,r,n]=e;return[r,n]}function XS(t,e,r=1){const[n,s]=p4e(t);if(!n)return;const i=window.getComputedStyle(e).getPropertyValue(n);return i?i.trim():JS(s)?XS(s,e,r+1):s}function g4e(t,{...e},r){const n=t.current;if(!(n instanceof Element))return{target:e,transitionEnd:r};r&&(r={...r}),t.values.forEach(s=>{const i=s.get();if(!JS(i))return;const o=XS(i,n);o&&s.set(o)});for(const s in e){const i=e[s];if(!JS(i))continue;const o=XS(i,n);o&&(e[s]=o,r&&r[s]===void 0&&(r[s]=i))}return{target:e,transitionEnd:r}}const b4e=new Set(["width","height","top","left","right","bottom","x","y"]),FK=t=>b4e.has(t),w4e=t=>Object.keys(t).some(FK),xO=t=>t===Kf||t===Ee;var CO;(function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"})(CO||(CO={}));const EO=(t,e)=>parseFloat(t.split(", ")[e]),SO=(t,e)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const s=n.match(/^matrix3d\((.+)\)$/);if(s)return EO(s[1],e);{const i=n.match(/^matrix\((.+)\)$/);return i?EO(i[1],t):0}},x4e=new Set(["x","y","z"]),C4e=Lb.filter(t=>!x4e.has(t));function E4e(t){const e=[];return C4e.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 kO={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:SO(4,13),y:SO(5,14)},S4e=(t,e,r)=>{const n=e.measureViewportBox(),s=e.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&e.setStaticValue("display",t.display||"block"),r.forEach(c=>{a[c]=kO[c](n,i)}),e.render();const l=e.measureViewportBox();return r.forEach(c=>{const f=e.getValue(c);f&&f.jump(a[c]),t[c]=kO[c](l,i)}),t},k4e=(t,e,r={},n={})=>{e={...e},n={...n};const s=Object.keys(e).filter(FK);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=t.getValue(l);if(!t.hasValue(l))return;let f=r[l],u=x1(f);const d=e[l];let h;if(Fb(d)){const v=d.length,y=d[0]===null?1:0;f=d[y],u=x1(f);for(let g=y;g=0?window.pageYOffset:null,c=S4e(e,t,a);return i.length&&i.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),hx&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:n}}else return{target:e,transitionEnd:n}};function $4e(t,e,r,n){return w4e(e)?k4e(t,e,r,n):{target:e,transitionEnd:n}}const A4e=(t,e,r,n)=>{const s=g4e(t,e,n);return e=s.target,n=s.transitionEnd,$4e(t,e,r,n)},ZS={current:null},BK={current:!1};function _4e(){if(BK.current=!0,!!hx)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ZS.current=t.matches;t.addListener(e),e()}else ZS.current=!1}function P4e(t,e,r){const{willChange:n}=e;for(const s in e){const i=e[s],o=r[s];if(ds(i))t.addValue(s,i),zb(n)&&n.add(s);else if(ds(o))t.addValue(s,rh(i,{owner:t})),zb(n)&&n.remove(s);else if(o!==i)if(t.hasValue(s)){const a=t.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,rh(a!==void 0?a:i,{owner:t}))}}for(const s in r)e[s]===void 0&&t.removeValue(s);return e}const UK=Object.keys(Fy),T4e=UK.length,$O=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class R4e{constructor({parent:e,props:r,reducedMotionConfig:n,visualState:s},i={}){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=()=>Hn.render(this.render,!1,!0);const{latestValues:o,renderState:a}=s;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=i,this.isControllingVariants=yx(r),this.isVariantNode=LG(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(r,{});for(const f in c){const u=c[f];o[f]!==void 0&&ds(u)&&(u.set(o[f],!1),zb(l)&&l.add(f))}}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,s)=>this.bindToMotionValue(s,n)),BK.current||_4e(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ZS.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(),Ql.update(this.notifyUpdate),Ql.render(this.render),this.valueSubscriptions.forEach(s=>s()),(r=this.removeFromVariantTree)===null||r===void 0||r.call(this),(n=this.parent)===null||n===void 0||n.children.delete(this);for(const s in this.events)this.events[s].clear();this.current=null}bindToMotionValue(e,r){const n=Uh.has(e),s=r.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Hn.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{s(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...r},n,s,i,o,a){const l=[];for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:a,layoutScroll:h,layoutRoot:v})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Br()}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;n<$O.length;n++){const s=$O[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=e["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=P4e(this,this.scrapeMotionValuesFromProps(e,r),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var r;return(r=this.props.variants)===null||r===void 0?void 0:r[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:(e=this.parent)===null||e===void 0?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var r,n;if(e)return(r=this.parent)===null||r===void 0?void 0:r.getVariantContext();if(!this.isControllingVariants){const i=((n=this.parent)===null||n===void 0?void 0:n.getVariantContext())||{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const s={};for(let i=0;in.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=rh(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,s=typeof n=="string"||typeof n=="object"?(r=GA(this.props,n))===null||r===void 0?void 0:r[e]:void 0;if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!ds(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,r){return this.events[e]||(this.events[e]=new JA),this.events[e].add(r)}notify(e,...r){var n;(n=this.events[e])===null||n===void 0||n.notify(...r)}}const zK=["initial",...f_],I4e=zK.length;class VK extends R4e{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:s},i){let o=z8e(n,e||{},this);if(s&&(r&&(r=s(r)),n&&(n=s(n)),o&&(o=s(o))),i){B8e(this,n,o);const a=A4e(this,n,o,r);r=a.transitionEnd,n=a.target}return{transition:e,transitionEnd:r,...n}}}function O4e(t){return window.getComputedStyle(t)}class M4e extends VK{readValueFromInstance(e,r){if(Uh.has(r)){const n=e_(r);return n&&n.default||0}else{const n=O4e(e),s=(UG(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:r}){return LK(e,r)}build(e,r,n,s){UA(e,r,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,r){return HA(e,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ds(e)&&(this.childSubscription=e.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(e,r,n,s){HG(e,r,n,s)}}class D4e extends VK{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,r){return e[r]}readValueFromInstance(e,r){var n;return Uh.has(r)?((n=e_(r))===null||n===void 0?void 0:n.default)||0:(r=GG.has(r)?r:WA(r),e.getAttribute(r))}measureInstanceViewportBox(){return Br()}scrapeMotionValuesFromProps(e,r){return QG(e,r)}build(e,r,n,s){VA(e,r,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,r,n,s){KG(e,r,n,s)}mount(e){this.isSVGTag=qA(e.tagName),super.mount(e)}}const N4e=(t,e)=>BA(t)?new D4e(e,{enableHardwareAcceleration:!1}):new M4e(e,{enableHardwareAcceleration:!0});function AO(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const C1={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ee.test(t))t=parseFloat(t);else return t;const r=AO(t,e.target.x),n=AO(t,e.target.y);return`${r}% ${n}%`}},_O="_$css",L4e={correct:(t,{treeScale:e,projectionDelta:r})=>{const n=t,s=t.includes("var("),i=[];s&&(t=t.replace(jK,h=>(i.push(h),_O)));const o=Yl.parse(t);if(o.length>5)return n;const a=Yl.createTransformer(t),l=typeof o[0]!="number"?1:0,c=r.x.scale*e.x,f=r.y.scale*e.y;o[0+l]/=c,o[1+l]/=f;const u=xr(c,f,.5);typeof o[2+l]=="number"&&(o[2+l]/=u),typeof o[3+l]=="number"&&(o[3+l]/=u);let d=a(o);if(s){let h=0;d=d.replace(_O,()=>{const v=i[h];return h++,v})}return d}};class j4e extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=e;Pke(B4e),i&&(r.group&&r.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),xv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:r,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o&&(o.isPresent=i,s||e.layoutDependency!==r||r===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Hn.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:s}=e;s&&(s.scheduleCheckAfterUnmount(),r!=null&&r.group&&r.group.remove(s),n!=null&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e==null||e()}render(){return null}}function F4e(t){const[e,r]=sK(),n=m.useContext(jG);return P.createElement(j4e,{...t,layoutGroup:n,switchLayoutGroup:m.useContext(FG),isPresent:e,safeToRemove:r})}const B4e={borderRadius:{...C1,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:C1,borderTopRightRadius:C1,borderBottomLeftRadius:C1,borderBottomRightRadius:C1,boxShadow:L4e},U4e={measureLayout:F4e};function z4e(t,e,r={}){const n=ds(t)?t:rh(t);return n.start(c_("",n,e,r)),{stop:()=>n.stop(),isAnimating:()=>n.isAnimating()}}const qK=["TopLeft","TopRight","BottomLeft","BottomRight"],V4e=qK.length,PO=t=>typeof t=="string"?parseFloat(t):t,TO=t=>typeof t=="number"||Ee.test(t);function q4e(t,e,r,n,s,i){s?(t.opacity=xr(0,r.opacity!==void 0?r.opacity:1,W4e(n)),t.opacityExit=xr(e.opacity!==void 0?e.opacity:1,0,H4e(n))):i&&(t.opacity=xr(e.opacity!==void 0?e.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let o=0;one?1:r(Vb(t,e,n))}function IO(t,e){t.min=e.min,t.max=e.max}function wi(t,e){IO(t.x,e.x),IO(t.y,e.y)}function OO(t,e,r,n,s){return t-=e,t=Wb(t,1/r,n),s!==void 0&&(t=Wb(t,1/s,n)),t}function G4e(t,e=0,r=1,n=.5,s,i=t,o=t){if(Ao.test(e)&&(e=parseFloat(e),e=xr(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=xr(i.min,i.max,n);t===i&&(a-=e),t.min=OO(t.min,e,r,a,s),t.max=OO(t.max,e,r,a,s)}function MO(t,e,[r,n,s],i,o){G4e(t,e[r],e[n],e[s],e.scale,i,o)}const K4e=["x","scaleX","originX"],Q4e=["y","scaleY","originY"];function DO(t,e,r,n){MO(t.x,e,K4e,r==null?void 0:r.x,n==null?void 0:n.x),MO(t.y,e,Q4e,r==null?void 0:r.y,n==null?void 0:n.y)}function NO(t){return t.translate===0&&t.scale===1}function HK(t){return NO(t.x)&&NO(t.y)}function GK(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 LO(t){return Os(t.x)/Os(t.y)}class Y4e{constructor(){this.members=[]}add(e){QA(this.members,e),e.scheduleRender()}remove(e){if(YA(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(s=>e===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(e,r){var n;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,r&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),!((n=e.root)===null||n===void 0)&&n.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var r,n,s,i,o;(n=(r=e.options).onExitComplete)===null||n===void 0||n.call(r),(o=(s=e.resumingFrom)===null||s===void 0?void 0:(i=s.options).onExitComplete)===null||o===void 0||o.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jO(t,e,r){let n="";const s=t.x.translate/e.x,i=t.y.translate/e.y;if((s||i)&&(n=`translate3d(${s}px, ${i}px, 0) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),r){const{rotate:l,rotateX:c,rotateY:f}=r;l&&(n+=`rotate(${l}deg) `),c&&(n+=`rotateX(${c}deg) `),f&&(n+=`rotateY(${f}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 J4e=(t,e)=>t.depth-e.depth;class X4e{constructor(){this.children=[],this.isDirty=!1}add(e){QA(this.children,e),this.isDirty=!0}remove(e){YA(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(J4e),this.isDirty=!1,this.children.forEach(e)}}const FO=["","X","Y","Z"],BO=1e3;let Z4e=0;function KK({attachResizeListener:t,defaultParent:e,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=Z4e++,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(rAe),this.nodes.forEach(iAe),this.nodes.forEach(oAe)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let c=0;cthis.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=PK(h,250),xv.hasAnimatedSinceResize&&(xv.hasAnimatedSinceResize=!1,this.nodes.forEach(zO))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&u&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:v,layout:y})=>{var g,b,p,w,E;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=(b=(g=this.options.transition)!==null&&g!==void 0?g:u.getDefaultTransition())!==null&&b!==void 0?b:uAe,{onLayoutAnimationStart:$,onLayoutAnimationComplete:x}=u.getProps(),T=!this.targetLayout||!GK(this.targetLayout,y)||v,B=!h&&v;if(this.options.layoutRoot||!((p=this.resumeFrom)===null||p===void 0)&&p.instance||B||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,B);const L={...TK(k,"layout"),onPlay:$,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L)}else!h&&this.animationProgress===0&&zO(this),this.isLead()&&((E=(w=this.options).onExitComplete)===null||E===void 0||E.call(w));this.targetLayout=y})}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,Ql.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(aAe),this.animationId++)}getTransformTemplate(){var o;return(o=this.options.visualElement)===null||o===void 0?void 0:o.getProps().transformTemplate}willUpdate(o=!0){var a,l,c;if(this.root.isUpdateBlocked()){(l=(a=this.options).onExitComplete)===null||l===void 0||l.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 l=0;l{var w;const E=p/1e3;VO(h.x,o.x,E),VO(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(!((w=this.relativeParent)===null||w===void 0)&&w.layout)&&(kv(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cAe(this.relativeTarget,this.relativeTargetOrigin,v,E)),y&&(this.animationValues=d,q4e(d,u,this.latestValues,E,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l;this.notifyListeners("animationStart"),(a=this.currentAnimation)===null||a===void 0||a.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ql.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Hn.update(()=>{xv.hasAnimatedSinceResize=!0,this.currentAnimation=z4e(0,BO,{...o,onUpdate:c=>{var f;this.mixTargetDelta(c),(f=o.onUpdate)===null||f===void 0||f.call(o,c)},onComplete:()=>{var c;(c=o.onComplete)===null||c===void 0||c.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,BO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:f}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&QK(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Br();const u=Os(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const d=Os(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}wi(a,l),Yu(a,f),Sv(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){var l,c,f;this.sharedNodes.has(o)||this.sharedNodes.set(o,new Y4e),this.sharedNodes.get(o).add(a),a.promote({transition:(l=a.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(f=(c=a.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||f===void 0?void 0:f.call(c,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:l}={}){const c=this.getStack();c&&c.promote(this,l),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:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const c={};for(let f=0;f{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(UO),this.root.sharedNodes.clear()}}}function eAe(t){t.updateLayout()}function tAe(t){var e,r,n;const s=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=t.layout,{animationType:a}=t.options,l=s.source!==t.layout.source;a==="size"?so(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Os(v);v.min=i[h].min,v.max=v.min+y}):QK(a,s.layoutBox,i)&&so(h=>{const v=l?s.measuredBox[h]:s.layoutBox[h],y=Os(i[h]);v.max=v.min+y});const c=$v();Sv(c,i,s.layoutBox);const f=$v();l?Sv(f,t.applyTransform(o,!0),s.measuredBox):Sv(f,i,s.layoutBox);const u=!HK(c);let d=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:v,layout:y}=h;if(v&&y){const g=Br();kv(g,s.layoutBox,v.layoutBox);const b=Br();kv(b,i,y.layoutBox),GK(g,b)||(d=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=g,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:s,delta:f,layoutDelta:c,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else t.isLead()&&((n=(r=t.options).onExitComplete)===null||n===void 0||n.call(r));t.options.transition=void 0}function rAe(t){t.isProjectionDirty||(t.isProjectionDirty=Boolean(t.parent&&t.parent.isProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=Boolean(t.parent&&t.parent.isTransformDirty))}function nAe(t){t.clearSnapshot()}function UO(t){t.clearMeasurements()}function sAe(t){const{visualElement:e}=t.options;e!=null&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zO(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0}function iAe(t){t.resolveTargetDelta()}function oAe(t){t.calcProjection()}function aAe(t){t.resetRotation()}function lAe(t){t.removeLeadSnapshot()}function VO(t,e,r){t.translate=xr(e.translate,0,r),t.scale=xr(e.scale,1,r),t.origin=e.origin,t.originPoint=e.originPoint}function qO(t,e,r,n){t.min=xr(e.min,r.min,n),t.max=xr(e.max,r.max,n)}function cAe(t,e,r,n){qO(t.x,e.x,r.x,n),qO(t.y,e.y,r.y,n)}function fAe(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const uAe={duration:.45,ease:[.4,0,.1,1]};function dAe(t,e){let r=t.root;for(let i=t.path.length-1;i>=0;i--)if(Boolean(t.path[i].instance)){r=t.path[i];break}const s=(r&&r!==t.root?r.instance:document).querySelector(`[data-projection-id="${e}"]`);s&&t.mount(s,!0)}function WO(t){t.min=Math.round(t.min),t.max=Math.round(t.max)}function hAe(t){WO(t.x),WO(t.y)}function QK(t,e,r){return t==="position"||t==="preserve-aspect"&&!GS(LO(e),LO(r),.2)}const vAe=KK({attachResizeListener:(t,e)=>mx(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),n5={current:void 0},yAe=KK({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!n5.current){const t=new vAe(0,{});t.mount(window),t.setOptions({layoutScroll:!0}),n5.current=t}return n5.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>Boolean(window.getComputedStyle(t).position==="fixed")}),mAe={...K$e,...v8e,...m4e,...U4e},pAe=Ake((t,e)=>t8e(t,e,mAe,N4e,yAe)),gAe={inherit:{fontFamily:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit",fontWeight:"inherit"},xlarge:{fontFamily:"body",fontSize:"xlarge",lineHeight:"9",letterSpacing:"none",fontWeight:"bold"},large:{fontFamily:"body",fontSize:"large",lineHeight:"7",letterSpacing:"normal",fontWeight:"semibold"},medium:{fontFamily:"body",fontSize:"medium",lineHeight:"6",letterSpacing:"normal",fontWeight:"bold"},normal:{fontFamily:"body",fontSize:"normal",lineHeight:"5",letterSpacing:"wide",fontWeight:"normal"},small:{fontFamily:"body",fontSize:"small",lineHeight:"4",letterSpacing:"wide",fontWeight:"medium"},xsmall:{fontFamily:"body",fontSize:"xsmall",lineHeight:"4",letterSpacing:"wide",fontWeight:"bold"},code:{fontFamily:"mono",fontSize:"normal",lineHeight:"5",letterSpacing:"none",fontWeight:"normal"}};function bAe(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 wAe(t){var e=bAe(t,"string");return typeof e=="symbol"?e:String(e)}function xAe(t,e,r){return e=wAe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function s5(t){for(var e=1;efunction(){for(var e=arguments.length,r=new Array(e),n=0;nl.styles)),i=Object.keys(s),o=i.filter(l=>"mappings"in s[l]),a=l=>{var c=[],f={},u=s5({},l),d=!1;for(var h of o){var v=l[h];if(v!=null){var y=s[h];d=!0;for(var g of y.mappings)f[g]=v,u[g]==null&&delete u[g]}}var b=d?s5(s5({},f),u):l,p=function(){var $=b[w],x=s[w];try{if(x.mappings)return"continue";if(typeof $=="string"||typeof $=="number")c.push(x.values[$].defaultClass);else if(Array.isArray($))for(var T=0;T<$.length;T++){var B=$[T];if(B!=null){var L=x.responsiveArray[T];c.push(x.values[B].conditions[L])}}else for(var U in $){var V=$[U];V!=null&&c.push(x.values[V].conditions[U])}}catch(N){throw N}};for(var w in b)var E=p();return t(c.join(" "))};return Object.assign(a,{properties:new Set(i)})},EAe=t=>t,SAe=function(){return CAe(EAe)(...arguments)},YK=SAe({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 kAe=["alignItems","alignSelf","flexDirection","gap","justifyContent","justifySelf","placeItems"],ek=t=>(t.display||(t.display=Object.keys(t).some(e=>kAe.includes(e))?"flex":void 0),YK(t));ek.properties=YK.properties;function JK(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:s,...i}=t,o={},a={};for(const c in i)ek.properties.has(c)?o[c]=i[c]:a[c]=i[c];const l=ek({...o,...n});return m.createElement(r,{className:js(l,s),...a,ref:e})});var XK={exports:{}},E1={};/** * @license React * react-jsx-runtime.production.min.js * @@ -206,7 +206,7 @@ PERFORMANCE OF THIS SOFTWARE. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var HO;function $Ae(){if(HO)return C1;HO=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return C1.Fragment=r,C1.jsx=o,C1.jsxs=o,C1}XK.exports=$Ae();var se=XK.exports;function AAe(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 _Ae(t){var e=AAe(t,"string");return typeof e=="symbol"?e:String(e)}function PAe(t,e,r){return e=_Ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function KO(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},yr=t=>{var e=r=>{var n=t.defaultClassName,s=KO(KO({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)TAe(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return QO(t.variantClassNames,r=>QO(r,n=>n.split(" ")[0]))}},e};yr({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:[]});var RAe=yr({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 Li=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=gAe[n];return se.jsx(dt,{as:r,className:Ls(s,RAe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var IAe=yr({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 OAe=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:b="button",...p}=t,g=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return se.jsx(dt,{as:r,className:Ls(s,IAe({activeOutline:n,disabled:i||l,hasLeftIcon:g,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:b,width:v,...p,children:E?se.jsx(f,{size:k}):se.jsxs(dt,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[se.jsxs(dt,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&se.jsx(f,{size:k}),se.jsx(Li,{children:c})]}),u&&se.jsx(u,{size:k})]})})});var MAe=yr({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:[]});m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return se.jsx(dt,{className:Ls(r,MAe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function $e(){return $e=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>DAe(r,e))}function Er(...t){return m.useCallback(ZK(...t),t)}function Rn(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,b=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:b},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,NAe(s,...e)]}function NAe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ve(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function ii(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Uy({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=LAe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=ii(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function LAe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=ii(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function f_(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const oi=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function u_(t){const[e,r]=m.useState(void 0);return oi(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.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 jAe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const bx=t=>{const{present:e,children:r}=t,n=FAe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Er(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};bx.displayName="Presence";function FAe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=jAe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=Um(n.current);i.current=a==="mounted"?c:"none"},[a]),oi(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=Um(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),oi(()=>{if(e){const c=u=>{const h=Um(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=Um(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function Um(t){return(t==null?void 0:t.animationName)||"none"}function rh(){return rh=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(UAe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(ek,$e({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(ek,$e({},n,{ref:e}),r)});zy.displayName="Slot";const ek=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...zAe(n,r.props),ref:e?ZK(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});ek.displayName="SlotClone";const BAe=({children:t})=>m.createElement(m.Fragment,null,t);function UAe(t){return m.isValidElement(t)&&t.type===BAe}function zAe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const VAe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],vt=VAe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?zy:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,rh({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function d_(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eQ="Checkbox",[qAe,lHe]=Rn(eQ),[WAe,HAe]=qAe(eQ),GAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Er(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[b=!1,p]=Uy({prop:s,defaultProp:i,onChange:c}),g=m.useRef(b);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>p(g.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,p]),m.createElement(WAe,{scope:r,state:b,disabled:a},m.createElement(vt.button,$e({type:"button",role:"checkbox","aria-checked":ff(b)?"mixed":b,"aria-required":o,"data-state":tQ(b),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Ve(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ve(t.onClick,w=>{p(E=>ff(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(YAe,{control:u,bubbles:!v.current,name:n,value:l,checked:b,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),KAe="CheckboxIndicator",QAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=HAe(KAe,r);return m.createElement(bx,{present:n||ff(i.state)||i.state===!0},m.createElement(vt.span,$e({"data-state":tQ(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),YAe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=f_(r),a=u_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=ff(r),u.call(l,ff(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"checkbox","aria-hidden":!0,defaultChecked:ff(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function ff(t){return t==="indeterminate"}function tQ(t){return ff(t)?"indeterminate":t?"checked":"unchecked"}const JAe=GAe,XAe=QAe;var ZAe=yr({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 Uh=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?se.jsxs(dt,{flexDirection:"column",gap:"0.5",children:[r&&se.jsx(Li,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&se.jsx(Li,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return se.jsxs(dt,{as:"label",className:ZAe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var wx=yr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const e_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),rQ=({size:t="sm",...e})=>se.jsx(dt,{as:e_e,className:wx({size:t}),...e}),t_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.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"})}),r_e=({size:t="sm",...e})=>se.jsx(dt,{as:t_e,className:wx({size:t}),...e}),n_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.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"})}),nQ=({size:t="sm",...e})=>se.jsx(dt,{as:n_e,className:wx({size:t}),...e}),s_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.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"})}),i_e=({size:t="sm",...e})=>se.jsx(dt,{as:s_e,className:wx({size:t}),...e});var o_e=yr({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:[]}),a_e=yr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const l_e=({size:t="sm"})=>se.jsx(XAe,{className:a_e({size:t}),children:se.jsx(rQ,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return se.jsx(Uh,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:se.jsx(JAe,{className:o_e({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:se.jsx(l_e,{})})})});P.createContext(null);const c_e=Zk["useId".toString()]||(()=>{});let f_e=0;function xx(t){const[e,r]=m.useState(c_e());return oi(()=>{t||r(n=>n??String(f_e++))},[t]),t||(e?`radix-${e}`:"")}const sQ="Collapsible",[u_e,cHe]=Rn(sQ);u_e(sQ);function Cx(t){const e=t+"CollectionProvider",[r,n]=Rn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,b=P.useRef(null),p=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:p,collectionRef:b},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:b}=h,p=i(a,y),g=Er(v,p.collectionRef);return P.createElement(zy,{ref:g},b)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:b,...p}=h,g=P.useRef(null),w=Er(v,g),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(g,{ref:g,...p}),()=>void E.itemMap.delete(g))),P.createElement(zy,{[f]:"",ref:w},b)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const p=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>p.indexOf(E.ref.current)-p.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const d_e=m.createContext(void 0);function h_(t){const e=m.useContext(d_e);return t||e||"ltr"}function h_e(t,e=globalThis==null?void 0:globalThis.document){const r=ii(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const tk="dismissableLayer.update",v_e="dismissableLayer.pointerDownOutside",y_e="dismissableLayer.focusOutside";let YO;const m_e=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iQ=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(m_e),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Er(e,T=>d(T)),b=Array.from(f.layers),[p]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(p),w=u?b.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=g,$=p_e(T=>{const j=T.target,F=[...f.branches].some(U=>U.contains(j));!k||F||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),C=g_e(T=>{const j=T.target;[...f.branches].some(U=>U.contains(j))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return h_e(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(YO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),JO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=YO)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),JO())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(tk,T),()=>document.removeEventListener(tk,T)},[]),m.createElement(vt.div,$e({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Ve(t.onFocusCapture,C.onFocusCapture),onBlurCapture:Ve(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ve(t.onPointerDownCapture,$.onPointerDownCapture)}))});function p_e(t,e=globalThis==null?void 0:globalThis.document){const r=ii(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){oQ(v_e,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function g_e(t,e=globalThis==null?void 0:globalThis.document){const r=ii(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&oQ(y_e,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function JO(){const t=new CustomEvent(tk);document.dispatchEvent(t)}function oQ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?d_(s,i):s.dispatchEvent(i)}const b_e=iQ;let s5=0;function w_e(){m.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:XO()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:XO()),s5++,()=>{s5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),s5--}},[])}function XO(){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 i5="focusScope.autoFocusOnMount",o5="focusScope.autoFocusOnUnmount",ZO={bubbles:!1,cancelable:!0},x_e=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=ii(s),f=ii(i),u=m.useRef(null),d=Er(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Qa(u.current,{select:!0})},b=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Qa(u.current,{select:!0}))},p=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Qa(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const g=new MutationObserver(p);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),g.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){tM.add(h);const y=document.activeElement;if(!a.contains(y)){const p=new CustomEvent(i5,ZO);a.addEventListener(i5,c),a.dispatchEvent(p),p.defaultPrevented||(C_e(A_e(aQ(a)),{select:!0}),document.activeElement===y&&Qa(a))}return()=>{a.removeEventListener(i5,c),setTimeout(()=>{const p=new CustomEvent(o5,ZO);a.addEventListener(o5,f),a.dispatchEvent(p),p.defaultPrevented||Qa(y??document.body,{select:!0}),a.removeEventListener(o5,f),tM.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,p=document.activeElement;if(b&&p){const g=y.currentTarget,[w,E]=E_e(g);w&&E?!y.shiftKey&&p===E?(y.preventDefault(),r&&Qa(w,{select:!0})):y.shiftKey&&p===w&&(y.preventDefault(),r&&Qa(E,{select:!0})):p===g&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(vt.div,$e({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function C_e(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Qa(n,{select:e}),document.activeElement!==r)return}function E_e(t){const e=aQ(t),r=eM(e,t),n=eM(e.reverse(),t);return[r,n]}function aQ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function eM(t,e){for(const r of t)if(!S_e(r,{upTo:e}))return r}function S_e(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 k_e(t){return t instanceof HTMLInputElement&&"select"in t}function Qa(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&k_e(t)&&e&&t.select()}}const tM=$_e();function $_e(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=rM(t,e),t.unshift(e)},remove(e){var r;t=rM(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function rM(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function A_e(t){return t.filter(e=>e.tagName!=="A")}function zh(t){return t.split("-")[1]}function v_(t){return t==="y"?"height":"width"}function la(t){return t.split("-")[0]}function Kf(t){return["top","bottom"].includes(la(t))?"x":"y"}function nM(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Kf(e),l=v_(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(la(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(zh(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const __e=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=nM(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=lQ(n),u={x:s,y:i},d=Kf(o),h=v_(d),v=await l.getDimensions(r),y=d==="y",b=y?"top":"left",p=y?"bottom":"right",g=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=k?k[g]:0;$&&await(l.isElement==null?void 0:l.isElement(k))||($=c.floating[g]||a.floating[h]);const C=w/2-E/2,T=f[b],j=$-v[h]-f[p],F=$/2-v[h]/2+C,U=nk(T,F,j),V=zh(o)!=null&&F!=U&&a.reference[h]/2-(Ft.concat(e,e+"-start",e+"-end"),[]);const P_e={left:"right",right:"left",bottom:"top",top:"bottom"};function Hb(t){return t.replace(/left|right|bottom|top/g,e=>P_e[e])}function T_e(t,e,r){r===void 0&&(r=!1);const n=zh(t),s=Kf(t),i=v_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Hb(o)),{main:o,cross:Hb(o)}}const R_e={start:"end",end:"start"};function a5(t){return t.replace(/start|end/g,e=>R_e[e])}const I_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,b=la(n),p=la(o)===o,g=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(p||!v?[Hb(o)]:function(U){const V=Hb(U);return[a5(U),V,a5(V)]}(o));u||h==="none"||w.push(...function(U,V,N,x){const S=zh(U);let R=function(M,_,I){const B=["left","right"],D=["right","left"],A=["top","bottom"],L=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:B:_?B:D;case"left":case"right":return _?A:L;default:return[]}}(la(U),N==="start",x);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(a5)))),R}(o,v,h,g));const E=[o,...w],k=await Vy(e,y),$=[];let C=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&$.push(k[b]),f){const{main:U,cross:V}=T_e(n,i,g);$.push(k[U],k[V])}if(C=[...C,{placement:n,overflows:$}],!$.every(U=>U<=0)){var T,j;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:C},reset:{placement:V}};let N=(j=C.filter(x=>x.overflows[0]<=0).sort((x,S)=>x.overflows[1]-S.overflows[1])[0])==null?void 0:j.placement;if(!N)switch(d){case"bestFit":{var F;const x=(F=C.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:F[0];x&&(N=x);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function iM(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function oM(t){return cQ.some(e=>t[e]>=0)}const O_e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=iM(await Vy(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:oM(i)}}}case"escaped":{const i=iM(await Vy(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:oM(i)}}}default:return{}}}}},M_e=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=la(a),d=zh(a),h=Kf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,b=typeof o=="function"?o(i):o;let{mainAxis:p,crossAxis:g,alignmentAxis:w}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return d&&typeof w=="number"&&(g=d==="end"?-1*w:w),h?{x:g*y,y:p*v}:{x:p*v,y:g*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function fQ(t){return t==="x"?"y":"x"}const D_e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:p,y:g}=b;return{x:p,y:g}}},...l}=t,c={x:r,y:n},f=await Vy(e,l),u=Kf(la(s)),d=fQ(u);let h=c[u],v=c[d];if(i){const b=u==="y"?"bottom":"right";h=nk(h+f[u==="y"?"top":"left"],h,h-f[b])}if(o){const b=d==="y"?"bottom":"right";v=nk(v+f[d==="y"?"top":"left"],v,v-f[b])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},N_e=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Kf(s),d=fQ(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+b.mainAxis,k=i.reference[u]+i.reference[w]-b.mainAxis;hk&&(h=k)}if(c){var p,g;const w=u==="y"?"width":"height",E=["top","left"].includes(la(s)),k=i.reference[d]-i.floating[w]+(E&&((p=o.offset)==null?void 0:p[d])||0)+(E?0:b.crossAxis),$=i.reference[d]+i.reference[w]+(E?0:((g=o.offset)==null?void 0:g[d])||0)-(E?b.crossAxis:0);v$&&(v=$)}return{[u]:h,[d]:v}}}},L_e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await Vy(e,a),c=la(r),f=zh(r),u=Kf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const b=h-l[v],p=d-l[y],g=!e.middlewareData.shift;let w=b,E=p;if(u){const $=d-l.left-l.right;E=f||g?rk(p,$):$}else{const $=h-l.top-l.bottom;w=f||g?rk(b,$):$}if(g&&!f){const $=Nc(l.left,0),C=Nc(l.right,0),T=Nc(l.top,0),j=Nc(l.bottom,0);u?E=d-2*($!==0||C!==0?$+C:Nc(l.left,l.right)):w=h-2*(T!==0||j!==0?T+j:Nc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Xs(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ji(t){return Xs(t).getComputedStyle(t)}function uQ(t){return t instanceof Xs(t).Node}function Yl(t){return uQ(t)?(t.nodeName||"").toLowerCase():""}function Wi(t){return t instanceof Xs(t).HTMLElement}function ks(t){return t instanceof Xs(t).Element}function aM(t){return typeof ShadowRoot>"u"?!1:t instanceof Xs(t).ShadowRoot||t instanceof ShadowRoot}function qy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=ji(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function j_e(t){return["table","td","th"].includes(Yl(t))}function sk(t){const e=y_(),r=ji(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function y_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ex(t){return["html","body","#document"].includes(Yl(t))}const lM=Math.min,$v=Math.max,Gb=Math.round;function dQ(t){const e=ji(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Wi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Gb(r)!==i||Gb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function hQ(t){return ks(t)?t:t.contextElement}const vQ={x:1,y:1};function wd(t){const e=hQ(t);if(!Wi(e))return vQ;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=dQ(e);let o=(i?Gb(r.width):r.width)/n,a=(i?Gb(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const cM={x:0,y:0};function yQ(t,e,r){var n,s;if(e===void 0&&(e=!0),!y_())return cM;const i=t?Xs(t):window;return!r||e&&r!==i?cM:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function Tf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=hQ(t);let o=vQ;e&&(n?ks(n)&&(o=wd(n)):o=wd(t));const a=yQ(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Xs(i),h=n&&ks(n)?Xs(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=wd(v),b=v.getBoundingClientRect(),p=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(p.paddingLeft))*y.x,b.y+=(v.clientTop+parseFloat(p.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=b.x,c+=b.y,v=Xs(v).frameElement}}return Wb({width:f,height:u,x:l,y:c})}function Ol(t){return((uQ(t)?t.ownerDocument:t.document)||window.document).documentElement}function Sx(t){return ks(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function mQ(t){return Tf(Ol(t)).left+Sx(t).scrollLeft}function nh(t){if(Yl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||aM(t)&&t.host||Ol(t);return aM(e)?e.host:e}function pQ(t){const e=nh(t);return Ex(e)?e.ownerDocument.body:Wi(e)&&qy(e)?e:pQ(e)}function Av(t,e){var r;e===void 0&&(e=[]);const n=pQ(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Xs(n);return s?e.concat(i,i.visualViewport||[],qy(n)?n:[]):e.concat(n,Av(n))}function fM(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Xs(s),a=Ol(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=y_();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=Ol(s),o=Sx(s),a=s.ownerDocument.body,l=$v(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=$v(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+mQ(s);const u=-o.scrollTop;return ji(a).direction==="rtl"&&(f+=$v(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(Ol(t));else if(ks(e))n=function(s,i){const o=Tf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Wi(s)?wd(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=yQ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Wb(n)}function gQ(t,e){const r=nh(t);return!(r===e||!ks(r)||Ex(r))&&(ji(r).position==="fixed"||gQ(r,e))}function uM(t,e){return Wi(t)&&ji(t).position!=="fixed"?e?e(t):t.offsetParent:null}function dM(t,e){const r=Xs(t);if(!Wi(t))return r;let n=uM(t,e);for(;n&&j_e(n)&&ji(n).position==="static";)n=uM(n,e);return n&&(Yl(n)==="html"||Yl(n)==="body"&&ji(n).position==="static"&&!sk(n))?r:n||function(s){let i=nh(s);for(;Wi(i)&&!Ex(i);){if(sk(i))return i;i=nh(i)}return null}(t)||r}function F_e(t,e,r){const n=Wi(e),s=Ol(e),i=r==="fixed",o=Tf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Yl(e)!=="body"||qy(s))&&(a=Sx(e)),Wi(e)){const c=Tf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=mQ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const B_e={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=Av(c).filter(b=>ks(b)&&Yl(b)!=="body"),h=null;const v=ji(c).position==="fixed";let y=v?nh(c):c;for(;ks(y)&&!Ex(y);){const b=ji(y),p=sk(y);p||b.position!=="fixed"||(h=null),(v?!p&&!h:!p&&b.position==="static"&&h&&["absolute","fixed"].includes(h.position)||qy(y)&&!p&&gQ(c,y))?d=d.filter(g=>g!==y):h=b,y=nh(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=fM(e,f,s);return c.top=$v(u.top,c.top),c.right=lM(u.right,c.right),c.bottom=lM(u.bottom,c.bottom),c.left=$v(u.left,c.left),c},fM(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Wi(r),i=Ol(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Yl(r)!=="body"||qy(i))&&(o=Sx(r)),Wi(r))){const c=Tf(r);a=wd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:ks,getDimensions:function(t){return dQ(t)},getOffsetParent:dM,getDocumentElement:Ol,getScale:wd,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||dM,i=this.getDimensions;return{reference:F_e(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>ji(t).direction==="rtl"};function U_e(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...ks(t)?Av(t):t.contextElement?Av(t.contextElement):[],...Av(e)]:[];l.forEach(d=>{const h=!ks(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),ks(t)&&!a&&f.observe(t),ks(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?Tf(t):null;return a&&function d(){const h=Tf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const z_e=(t,e,r)=>{const n=new Map,s={platform:B_e,...r},i={...s.platform,_c:n};return __e(t,e,{...s,platform:i})},V_e=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?sM({element:e.current,padding:r}).fn(s):{}:e?sM({element:e,padding:r}).fn(s):{}}}};var Kp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Kb(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,s;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(!Kb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Kb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function bQ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function hM(t,e){const r=bQ(t);return Math.round(e*r)/r}function vM(t){const e=m.useRef(t);return Kp(()=>{e.current=t}),e}function q_e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);Kb(d,n)||h(n);const[v,y]=m.useState(null),[b,p]=m.useState(null),g=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==C.current&&(C.current=R,p(R))},[p]),E=i||v,k=o||b,$=m.useRef(null),C=m.useRef(null),T=m.useRef(f),j=vM(l),F=vM(s),U=m.useCallback(()=>{if(!$.current||!C.current)return;const R={placement:e,strategy:r,middleware:d};F.current&&(R.platform=F.current),z_e($.current,C.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!Kb(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,F]);Kp(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Kp(()=>(V.current=!0,()=>{V.current=!1}),[]),Kp(()=>{if(E&&($.current=E),k&&(C.current=k),E&&k){if(j.current)return j.current(E,k,U);U()}},[E,k,U,j]);const N=m.useMemo(()=>({reference:$,floating:C,setReference:g,setFloating:w}),[g,w]),x=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!x.floating)return R;const M=hM(x.floating,f.x),_=hM(x.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...bQ(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,x.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:x,floatingStyles:S}),[f,U,N,x,S])}const wQ="Popper",[xQ,Vh]=Rn(wQ),[W_e,CQ]=xQ(wQ),H_e=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(W_e,{scope:e,anchor:n,onAnchorChange:s},r)},G_e="PopperAnchor",K_e=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=CQ(G_e,r),o=m.useRef(null),a=Er(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(vt.div,$e({},s,{ref:a}))}),EQ="PopperContent",[Q_e,fHe]=xQ(EQ),Y_e=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:b=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,C=CQ(EQ,f),[T,j]=m.useState(null),F=Er(e,ie=>j(ie)),[U,V]=m.useState(null),N=u_(U),x=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(b)?b:[b],I=_.length>0,B={padding:M,boundary:_.filter(J_e),altBoundary:I},{refs:D,floatingStyles:A,placement:L,isPositioned:G,middlewareData:O}=q_e({strategy:"fixed",placement:R,whileElementsMounted:U_e,elements:{reference:C.anchor},middleware:[M_e({mainAxis:d+S,alignmentAxis:v}),E&&D_e({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?N_e():void 0,...B}),E&&I_e({...B}),L_e({...B,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&V_e({element:U,padding:y}),X_e({arrowWidth:x,arrowHeight:S}),w&&O_e({strategy:"referenceHidden"})]}),[q,z]=SQ(L),H=ii(k);oi(()=>{G&&(H==null||H())},[G,H]);const X=(s=O.arrow)===null||s===void 0?void 0:s.x,Q=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[J,ae]=m.useState();return oi(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(Q_e,{scope:f,placedSide:q,onArrowChange:V,arrowX:X,arrowY:Q,shouldHideArrow:K},m.createElement(vt.div,$e({"data-side":q,"data-align":z},$,{ref:F,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function J_e(t){return t!==null}const X_e=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=SQ(a),b={start:"0%",center:"50%",end:"100%"}[y],p=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,g=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?b:`${p}px`,E=`${-h}px`):v==="top"?(w=u?b:`${p}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?b:`${g}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?b:`${g}px`),{data:{x:w,y:E}}}});function SQ(t){const[e,r="center"]=t.split("-");return[e,r]}const Z_e=H_e,ePe=K_e,tPe=Y_e,rPe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?q8.createPortal(m.createElement(vt.div,$e({},s,{ref:e})),n):null}),l5="rovingFocusGroup.onEntryFocus",nPe={bubbles:!1,cancelable:!0},m_="RovingFocusGroup",[ik,kQ,sPe]=Cx(m_),[iPe,qh]=Rn(m_,[sPe]),[oPe,aPe]=iPe(m_),lPe=m.forwardRef((t,e)=>m.createElement(ik.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(ik.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(cPe,rh({},t,{ref:e}))))),cPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Er(e,u),h=h_(i),[v=null,y]=Uy({prop:o,defaultProp:a,onChange:l}),[b,p]=m.useState(!1),g=ii(c),w=kQ(r),E=m.useRef(!1),[k,$]=m.useState(0);return m.useEffect(()=>{const C=u.current;if(C)return C.addEventListener(l5,g),()=>C.removeEventListener(l5,g)},[g]),m.createElement(oPe,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(C=>y(C),[y]),onItemShiftTab:m.useCallback(()=>p(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(C=>C+1),[]),onFocusableItemRemove:m.useCallback(()=>$(C=>C-1),[])},m.createElement(vt.div,rh({tabIndex:b||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Ve(t.onMouseDown,()=>{E.current=!0}),onFocus:Ve(t.onFocus,C=>{const T=!E.current;if(C.target===C.currentTarget&&T&&!b){const j=new CustomEvent(l5,nPe);if(C.currentTarget.dispatchEvent(j),!j.defaultPrevented){const F=w().filter(S=>S.focusable),U=F.find(S=>S.active),V=F.find(S=>S.id===v),x=[U,V,...F].filter(Boolean).map(S=>S.ref.current);$Q(x)}}E.current=!1}),onBlur:Ve(t.onBlur,()=>p(!1))})))}),fPe="RovingFocusGroupItem",uPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=xx(),l=i||a,c=aPe(fPe,r),f=c.currentTabStopId===l,u=kQ(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(ik.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(vt.span,rh({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Ve(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Ve(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ve(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=vPe(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let p=u().filter(g=>g.focusable).map(g=>g.ref.current);if(y==="last")p.reverse();else if(y==="prev"||y==="next"){y==="prev"&&p.reverse();const g=p.indexOf(v.currentTarget);p=c.loop?yPe(p,g+1):p.slice(g+1)}setTimeout(()=>$Q(p))}})})))}),dPe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hPe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vPe(t,e,r){const n=hPe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dPe[n]}function $Q(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function yPe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const mPe=lPe,AQ=uPe;var pPe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},yu=new WeakMap,zm=new WeakMap,Vm={},c5=0,_Q=function(t){return t&&(t.host||_Q(t.parentNode))},gPe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=_Q(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},bPe=function(t,e,r,n){var s=gPe(e,Array.isArray(t)?t:[t]);Vm[r]||(Vm[r]=new WeakMap);var i=Vm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(yu.get(d)||0)+1,b=(i.get(d)||0)+1;yu.set(d,y),i.set(d,b),o.push(d),y===1&&v&&zm.set(d,!0),b===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),c5++,function(){o.forEach(function(u){var d=yu.get(u)-1,h=i.get(u)-1;yu.set(u,d),i.set(u,h),d||(zm.has(u)||u.removeAttribute(n),zm.delete(u)),h||u.removeAttribute(r)}),c5--,c5||(yu=new WeakMap,yu=new WeakMap,zm=new WeakMap,Vm={})}},wPe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||pPe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),bPe(n,s,r,"aria-hidden")):function(){return null}},yo=function(){return yo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return LPe;var e=jPe(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])}},BPe=IQ(),UPe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + */var GO;function $Ae(){if(GO)return E1;GO=1;var t=P,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var f,u={},d=null,h=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(u[f]=l[f]);if(a&&a.defaultProps)for(f in l=a.defaultProps,l)u[f]===void 0&&(u[f]=l[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:s.current}}return E1.Fragment=r,E1.jsx=o,E1.jsxs=o,E1}XK.exports=$Ae();var se=XK.exports;function AAe(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 _Ae(t){var e=AAe(t,"string");return typeof e=="symbol"?e:String(e)}function PAe(t,e,r){return e=_Ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function KO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function QO(t){for(var e=1;e{for(var n of Object.keys(t)){var s;if(t[n]!==((s=e[n])!==null&&s!==void 0?s:r[n]))return!1}return!0},yr=t=>{var e=r=>{var n=t.defaultClassName,s=QO(QO({},t.defaultVariants),r);for(var i in s){var o,a=(o=s[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(a!=null){var l=a;typeof l=="boolean"&&(l=l===!0?"true":"false");var c=t.variantClassNames[i][l];c&&(n+=" "+c)}}for(var[f,u]of t.compoundVariants)TAe(f,s,t.defaultVariants)&&(n+=" "+u);return n};return e.variants=()=>Object.keys(t.variantClassNames),e.classNames={get base(){return t.defaultClassName.split(" ")[0]},get variants(){return YO(t.variantClassNames,r=>YO(r,n=>n.split(" ")[0]))}},e};yr({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:[]});var RAe=yr({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 ji=m.forwardRef((t,e)=>{const{as:r="span",variant:n="inherit",className:s,hidden:i,italic:o,underline:a,children:l,ellipsis:c,uppercase:f,capitalize:u,...d}=t,h=gAe[n];return se.jsx(dt,{as:r,className:js(s,RAe({hidden:i,ellipsis:c,italic:o,underline:a,uppercase:f,capitalize:u})),ref:e,...h,...d,children:l})});var IAe=yr({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 OAe=m.forwardRef((t,e)=>{const{as:r="button",activeOutline:n,className:s,disabled:i=!1,display:o="inline-flex",fontWeight:a="bold",pending:l=!1,label:c,leftIcon:f,rightIcon:u,size:d="md",variant:h="glass",width:v="fit",shape:y="circle",type:g="button",...b}=t,p=f!==void 0&&c!==void 0,w=u!==void 0&&c!==void 0,E=f!==void 0&&c===void 0,k=d==="xs"?"xs":"sm";return se.jsx(dt,{as:r,className:js(s,IAe({activeOutline:n,disabled:i||l,hasLeftIcon:p,hasRightIcon:w,iconOnly:E,size:h==="text"?void 0:d,shape:h==="text"?void 0:y,variant:h})),disabled:i||l,display:o,fontWeight:a,ref:e,type:g,width:v,...b,children:E?se.jsx(f,{size:k}):se.jsxs(dt,{width:"full",height:"full",justifyContent:"space-between",alignItems:"center",gap:d==="xs"?"1":"2",children:[se.jsxs(dt,{justifyContent:"flex-start",alignItems:"center",gap:d==="xs"?"1":"2",children:[f&&se.jsx(f,{size:k}),se.jsx(ji,{children:c})]}),u&&se.jsx(u,{size:k})]})})});var MAe=yr({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:[]});m.forwardRef((t,e)=>{const{className:r,children:n,clickable:s,outlined:i,disabled:o,blur:a,width:l="full",...c}=t;return se.jsx(dt,{className:js(r,MAe({clickable:s,outlined:i,disabled:o,blur:a})),background:i?"transparent":"backgroundSecondary",overflow:"hidden",borderRadius:"md",padding:"4",width:l,ref:e,...c,children:n})});function $e(){return $e=Object.assign?Object.assign.bind():function(t){for(var e=1;et.forEach(r=>DAe(r,e))}function Cr(...t){return m.useCallback(ZK(...t),t)}function In(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,NAe(s,...e)]}function NAe(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function Ve(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function oi(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function zy({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=LAe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=oi(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function LAe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=oi(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}function u_(t){const e=m.useRef({value:t,previous:t});return m.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}const ai=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{};function d_(t){const[e,r]=m.useState(void 0);return ai(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.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 jAe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const wx=t=>{const{present:e,children:r}=t,n=FAe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=Cr(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};wx.displayName="Presence";function FAe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=jAe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=zm(n.current);i.current=a==="mounted"?c:"none"},[a]),ai(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=zm(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ai(()=>{if(e){const c=u=>{const h=zm(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=zm(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function zm(t){return(t==null?void 0:t.animationName)||"none"}function nh(){return nh=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(UAe);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(tk,$e({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(tk,$e({},n,{ref:e}),r)});Vy.displayName="Slot";const tk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...zAe(n,r.props),ref:e?ZK(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});tk.displayName="SlotClone";const BAe=({children:t})=>m.createElement(m.Fragment,null,t);function UAe(t){return m.isValidElement(t)&&t.type===BAe}function zAe(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const VAe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],vt=VAe.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?Vy:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,nh({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function h_(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}const eQ="Checkbox",[qAe,cHe]=In(eQ),[WAe,HAe]=qAe(eQ),GAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,...f}=t,[u,d]=m.useState(null),h=Cr(e,w=>d(w)),v=m.useRef(!1),y=u?Boolean(u.closest("form")):!0,[g=!1,b]=zy({prop:s,defaultProp:i,onChange:c}),p=m.useRef(g);return m.useEffect(()=>{const w=u==null?void 0:u.form;if(w){const E=()=>b(p.current);return w.addEventListener("reset",E),()=>w.removeEventListener("reset",E)}},[u,b]),m.createElement(WAe,{scope:r,state:g,disabled:a},m.createElement(vt.button,$e({type:"button",role:"checkbox","aria-checked":uf(g)?"mixed":g,"aria-required":o,"data-state":tQ(g),"data-disabled":a?"":void 0,disabled:a,value:l},f,{ref:h,onKeyDown:Ve(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Ve(t.onClick,w=>{b(E=>uf(E)?!0:!E),y&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),y&&m.createElement(YAe,{control:u,bubbles:!v.current,name:n,value:l,checked:g,required:o,disabled:a,style:{transform:"translateX(-100%)"}}))}),KAe="CheckboxIndicator",QAe=m.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,i=HAe(KAe,r);return m.createElement(wx,{present:n||uf(i.state)||i.state===!0},m.createElement(vt.span,$e({"data-state":tQ(i.state),"data-disabled":i.disabled?"":void 0},s,{ref:e,style:{pointerEvents:"none",...t.style}})))}),YAe=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=u_(r),a=d_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});l.indeterminate=uf(r),u.call(l,uf(r)?!1:r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"checkbox","aria-hidden":!0,defaultChecked:uf(r)?!1:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uf(t){return t==="indeterminate"}function tQ(t){return uf(t)?"indeterminate":t?"checked":"unchecked"}const JAe=GAe,XAe=QAe;var ZAe=yr({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 zh=t=>{const{id:e,label:r,description:n,labelLocation:s="top",children:i,...o}=t,a=()=>r||n?se.jsxs(dt,{flexDirection:"column",gap:"0.5",children:[r&&se.jsx(ji,{variant:"small",color:"text100",hidden:s==="hidden",children:r}),n&&se.jsx(ji,{variant:"small",color:"text50",hidden:s==="hidden",children:n})]}):null;return se.jsxs(dt,{as:"label",className:ZAe({labelLocation:s}),htmlFor:e,...o,children:[["left","top","hidden"].includes(s)&&a(),i,s==="right"&&a()]})};var xx=yr({defaultClassName:"_1dizidw0",variantClassNames:{size:{xs:"_1dizidw1",sm:"_1dizidw2",md:"_1dizidw3",lg:"_1dizidw4",xl:"_1dizidw5"}},defaultVariants:{},compoundVariants:[]});const e_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.jsx("path",{stroke:"currentColor",strokeWidth:1.5,d:"m4.304 10.232 4.263 4.79 7.13-11.238"})}),rQ=({size:t="sm",...e})=>se.jsx(dt,{as:e_e,className:xx({size:t}),...e}),t_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.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"})}),r_e=({size:t="sm",...e})=>se.jsx(dt,{as:t_e,className:xx({size:t}),...e}),n_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.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"})}),nQ=({size:t="sm",...e})=>se.jsx(dt,{as:n_e,className:xx({size:t}),...e}),s_e=t=>se.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",...t,children:se.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"})}),i_e=({size:t="sm",...e})=>se.jsx(dt,{as:s_e,className:xx({size:t}),...e});var o_e=yr({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:[]}),a_e=yr({defaultClassName:"_1c9x66f5 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr12sh fyvr11rz",variantClassNames:{size:{sm:"_1c9x66f6",lg:"_1c9x66f7"}},defaultVariants:{},compoundVariants:[]});const l_e=({size:t="sm"})=>se.jsx(XAe,{className:a_e({size:t}),children:se.jsx(rQ,{size:t})});m.forwardRef((t,e)=>{const{disabled:r=!1,id:n,name:s,label:i="",labelLocation:o="left",size:a="sm",...l}=t;return se.jsx(zh,{disabled:r,display:"flex",id:n??s,label:i,labelLocation:o,whiteSpace:"nowrap",children:se.jsx(JAe,{className:o_e({size:a}),disabled:r,id:n??s,name:s,ref:e,...l,children:se.jsx(l_e,{})})})});P.createContext(null);const c_e=t8["useId".toString()]||(()=>{});let f_e=0;function Cx(t){const[e,r]=m.useState(c_e());return ai(()=>{t||r(n=>n??String(f_e++))},[t]),t||(e?`radix-${e}`:"")}const sQ="Collapsible",[u_e,fHe]=In(sQ);u_e(sQ);function Ex(t){const e=t+"CollectionProvider",[r,n]=In(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=h=>{const{scope:v,children:y}=h,g=P.useRef(null),b=P.useRef(new Map).current;return P.createElement(s,{scope:v,itemMap:b,collectionRef:g},y)},a=t+"CollectionSlot",l=P.forwardRef((h,v)=>{const{scope:y,children:g}=h,b=i(a,y),p=Cr(v,b.collectionRef);return P.createElement(Vy,{ref:p},g)}),c=t+"CollectionItemSlot",f="data-radix-collection-item",u=P.forwardRef((h,v)=>{const{scope:y,children:g,...b}=h,p=P.useRef(null),w=Cr(v,p),E=i(c,y);return P.useEffect(()=>(E.itemMap.set(p,{ref:p,...b}),()=>void E.itemMap.delete(p))),P.createElement(Vy,{[f]:"",ref:w},g)});function d(h){const v=i(t+"CollectionConsumer",h);return P.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>b.indexOf(E.ref.current)-b.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:l,ItemSlot:u},d,n]}const d_e=m.createContext(void 0);function v_(t){const e=m.useContext(d_e);return t||e||"ltr"}function h_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const rk="dismissableLayer.update",v_e="dismissableLayer.pointerDownOutside",y_e="dismissableLayer.focusOutside";let JO;const m_e=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),iQ=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(m_e),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=Cr(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,$=p_e(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=g_e(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return h_e(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(JO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),XO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=JO)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),XO())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(rk,T),()=>document.removeEventListener(rk,T)},[]),m.createElement(vt.div,$e({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:Ve(t.onFocusCapture,x.onFocusCapture),onBlurCapture:Ve(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Ve(t.onPointerDownCapture,$.onPointerDownCapture)}))});function p_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){oQ(v_e,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function g_e(t,e=globalThis==null?void 0:globalThis.document){const r=oi(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&oQ(y_e,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function XO(){const t=new CustomEvent(rk);document.dispatchEvent(t)}function oQ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?h_(s,i):s.dispatchEvent(i)}const b_e=iQ;let i5=0;function w_e(){m.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:ZO()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:ZO()),i5++,()=>{i5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),i5--}},[])}function ZO(){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 o5="focusScope.autoFocusOnMount",a5="focusScope.autoFocusOnUnmount",eM={bubbles:!1,cancelable:!0},x_e=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=oi(s),f=oi(i),u=m.useRef(null),d=Cr(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ya(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ya(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ya(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){rM.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(o5,eM);a.addEventListener(o5,c),a.dispatchEvent(b),b.defaultPrevented||(C_e(A_e(aQ(a)),{select:!0}),document.activeElement===y&&Ya(a))}return()=>{a.removeEventListener(o5,c),setTimeout(()=>{const b=new CustomEvent(a5,eM);a.addEventListener(a5,f),a.dispatchEvent(b),b.defaultPrevented||Ya(y??document.body,{select:!0}),a.removeEventListener(a5,f),rM.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=E_e(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ya(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ya(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(vt.div,$e({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function C_e(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ya(n,{select:e}),document.activeElement!==r)return}function E_e(t){const e=aQ(t),r=tM(e,t),n=tM(e.reverse(),t);return[r,n]}function aQ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function tM(t,e){for(const r of t)if(!S_e(r,{upTo:e}))return r}function S_e(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 k_e(t){return t instanceof HTMLInputElement&&"select"in t}function Ya(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&k_e(t)&&e&&t.select()}}const rM=$_e();function $_e(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=nM(t,e),t.unshift(e)},remove(e){var r;t=nM(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function nM(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function A_e(t){return t.filter(e=>e.tagName!=="A")}function Vh(t){return t.split("-")[1]}function y_(t){return t==="y"?"height":"width"}function ca(t){return t.split("-")[0]}function Qf(t){return["top","bottom"].includes(ca(t))?"x":"y"}function sM(t,e,r){let{reference:n,floating:s}=t;const i=n.x+n.width/2-s.width/2,o=n.y+n.height/2-s.height/2,a=Qf(e),l=y_(a),c=n[l]/2-s[l]/2,f=a==="x";let u;switch(ca(e)){case"top":u={x:i,y:n.y-s.height};break;case"bottom":u={x:i,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:o};break;case"left":u={x:n.x-s.width,y:o};break;default:u={x:n.x,y:n.y}}switch(Vh(e)){case"start":u[a]-=c*(r&&f?-1:1);break;case"end":u[a]+=c*(r&&f?-1:1)}return u}const __e=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=sM(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{element:r,padding:n=0}=t||{},{x:s,y:i,placement:o,rects:a,platform:l,elements:c}=e;if(r==null)return{};const f=lQ(n),u={x:s,y:i},d=Qf(o),h=y_(d),v=await l.getDimensions(r),y=d==="y",g=y?"top":"left",b=y?"bottom":"right",p=y?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[d]-u[d]-a.floating[h],E=u[d]-a.reference[d],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=k?k[p]:0;$&&await(l.isElement==null?void 0:l.isElement(k))||($=c.floating[p]||a.floating[h]);const x=w/2-E/2,T=f[g],B=$-v[h]-f[b],L=$/2-v[h]/2+x,U=sk(T,L,B),V=Vh(o)!=null&&L!=U&&a.reference[h]/2-(Lt.concat(e,e+"-start",e+"-end"),[]);const P_e={left:"right",right:"left",bottom:"top",top:"bottom"};function Gb(t){return t.replace(/left|right|bottom|top/g,e=>P_e[e])}function T_e(t,e,r){r===void 0&&(r=!1);const n=Vh(t),s=Qf(t),i=y_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Gb(o)),{main:o,cross:Gb(o)}}const R_e={start:"end",end:"start"};function l5(t){return t.replace(/start|end/g,e=>R_e[e])}const I_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r;const{placement:n,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=t,g=ca(n),b=ca(o)===o,p=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=u||(b||!v?[Gb(o)]:function(U){const V=Gb(U);return[l5(U),V,l5(V)]}(o));u||h==="none"||w.push(...function(U,V,N,C){const S=Vh(U);let R=function(M,_,I){const F=["left","right"],D=["right","left"],A=["top","bottom"],j=["bottom","top"];switch(M){case"top":case"bottom":return I?_?D:F:_?F:D;case"left":case"right":return _?A:j;default:return[]}}(ca(U),N==="start",C);return S&&(R=R.map(M=>M+"-"+S),V&&(R=R.concat(R.map(l5)))),R}(o,v,h,p));const E=[o,...w],k=await qy(e,y),$=[];let x=((r=s.flip)==null?void 0:r.overflows)||[];if(c&&$.push(k[g]),f){const{main:U,cross:V}=T_e(n,i,p);$.push(k[U],k[V])}if(x=[...x,{placement:n,overflows:$}],!$.every(U=>U<=0)){var T,B;const U=(((T=s.flip)==null?void 0:T.index)||0)+1,V=E[U];if(V)return{data:{index:U,overflows:x},reset:{placement:V}};let N=(B=x.filter(C=>C.overflows[0]<=0).sort((C,S)=>C.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!N)switch(d){case"bestFit":{var L;const C=(L=x.map(S=>[S.placement,S.overflows.filter(R=>R>0).reduce((R,M)=>R+M,0)]).sort((S,R)=>S[1]-R[1])[0])==null?void 0:L[0];C&&(N=C);break}case"initialPlacement":N=o}if(n!==N)return{reset:{placement:N}}}return{}}}};function oM(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function aM(t){return cQ.some(e=>t[e]>=0)}const O_e=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{strategy:r="referenceHidden",...n}=t,{rects:s}=e;switch(r){case"referenceHidden":{const i=oM(await qy(e,{...n,elementContext:"reference"}),s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:aM(i)}}}case"escaped":{const i=oM(await qy(e,{...n,altBoundary:!0}),s.floating);return{data:{escapedOffsets:i,escaped:aM(i)}}}default:return{}}}}},M_e=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,f=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ca(a),d=Vh(a),h=Qf(a)==="x",v=["left","top"].includes(u)?-1:1,y=f&&h?-1:1,g=typeof o=="function"?o(i):o;let{mainAxis:b,crossAxis:p,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return d&&typeof w=="number"&&(p=d==="end"?-1*w:w),h?{x:p*y,y:b*v}:{x:b*v,y:p*y}}(e,t);return{x:r+s.x,y:n+s.y,data:s}}}};function fQ(t){return t==="x"?"y":"x"}const D_e=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=t,c={x:r,y:n},f=await qy(e,l),u=Qf(ca(s)),d=fQ(u);let h=c[u],v=c[d];if(i){const g=u==="y"?"bottom":"right";h=sk(h+f[u==="y"?"top":"left"],h,h-f[g])}if(o){const g=d==="y"?"bottom":"right";v=sk(v+f[d==="y"?"top":"left"],v,v-f[g])}const y=a.fn({...e,[u]:h,[d]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},N_e=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=t,f={x:r,y:n},u=Qf(s),d=fQ(u);let h=f[u],v=f[d];const y=typeof a=="function"?a(e):a,g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=u==="y"?"height":"width",E=i.reference[u]-i.floating[w]+g.mainAxis,k=i.reference[u]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=u==="y"?"width":"height",E=["top","left"].includes(ca(s)),k=i.reference[d]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[d])||0)+(E?0:g.crossAxis),$=i.reference[d]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[d])||0)-(E?g.crossAxis:0);v$&&(v=$)}return{[u]:h,[d]:v}}}},L_e=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=t,l=await qy(e,a),c=ca(r),f=Vh(r),u=Qf(r)==="x",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const $=d-l.left-l.right;E=f||p?nk(b,$):$}else{const $=h-l.top-l.bottom;w=f||p?nk(g,$):$}if(p&&!f){const $=Lc(l.left,0),x=Lc(l.right,0),T=Lc(l.top,0),B=Lc(l.bottom,0);u?E=d-2*($!==0||x!==0?$+x:Lc(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Lc(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function Zs(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Fi(t){return Zs(t).getComputedStyle(t)}function uQ(t){return t instanceof Zs(t).Node}function Jl(t){return uQ(t)?(t.nodeName||"").toLowerCase():""}function Hi(t){return t instanceof Zs(t).HTMLElement}function $s(t){return t instanceof Zs(t).Element}function lM(t){return typeof ShadowRoot>"u"?!1:t instanceof Zs(t).ShadowRoot||t instanceof ShadowRoot}function Wy(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=Fi(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function j_e(t){return["table","td","th"].includes(Jl(t))}function ik(t){const e=m_(),r=Fi(t);return r.transform!=="none"||r.perspective!=="none"||!e&&!!r.backdropFilter&&r.backdropFilter!=="none"||!e&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function m_(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Sx(t){return["html","body","#document"].includes(Jl(t))}const cM=Math.min,Av=Math.max,Kb=Math.round;function dQ(t){const e=Fi(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Hi(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=Kb(r)!==i||Kb(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function hQ(t){return $s(t)?t:t.contextElement}const vQ={x:1,y:1};function xd(t){const e=hQ(t);if(!Hi(e))return vQ;const r=e.getBoundingClientRect(),{width:n,height:s,fallback:i}=dQ(e);let o=(i?Kb(r.width):r.width)/n,a=(i?Kb(r.height):r.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const fM={x:0,y:0};function yQ(t,e,r){var n,s;if(e===void 0&&(e=!0),!m_())return fM;const i=t?Zs(t):window;return!r||e&&r!==i?fM:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function Rf(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=hQ(t);let o=vQ;e&&(n?$s(n)&&(o=xd(n)):o=xd(t));const a=yQ(i,r,n);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Zs(i),h=n&&$s(n)?Zs(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=xd(v),g=v.getBoundingClientRect(),b=getComputedStyle(v);g.x+=(v.clientLeft+parseFloat(b.paddingLeft))*y.x,g.y+=(v.clientTop+parseFloat(b.paddingTop))*y.y,l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g.x,c+=g.y,v=Zs(v).frameElement}}return Hb({width:f,height:u,x:l,y:c})}function Ml(t){return((uQ(t)?t.ownerDocument:t.document)||window.document).documentElement}function kx(t){return $s(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function mQ(t){return Rf(Ml(t)).left+kx(t).scrollLeft}function sh(t){if(Jl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||lM(t)&&t.host||Ml(t);return lM(e)?e.host:e}function pQ(t){const e=sh(t);return Sx(e)?e.ownerDocument.body:Hi(e)&&Wy(e)?e:pQ(e)}function _v(t,e){var r;e===void 0&&(e=[]);const n=pQ(t),s=n===((r=t.ownerDocument)==null?void 0:r.body),i=Zs(n);return s?e.concat(i,i.visualViewport||[],Wy(n)?n:[]):e.concat(n,_v(n))}function uM(t,e,r){let n;if(e==="viewport")n=function(s,i){const o=Zs(s),a=Ml(s),l=o.visualViewport;let c=a.clientWidth,f=a.clientHeight,u=0,d=0;if(l){c=l.width,f=l.height;const h=m_();(!h||h&&i==="fixed")&&(u=l.offsetLeft,d=l.offsetTop)}return{width:c,height:f,x:u,y:d}}(t,r);else if(e==="document")n=function(s){const i=Ml(s),o=kx(s),a=s.ownerDocument.body,l=Av(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=Av(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let f=-o.scrollLeft+mQ(s);const u=-o.scrollTop;return Fi(a).direction==="rtl"&&(f+=Av(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:f,y:u}}(Ml(t));else if($s(e))n=function(s,i){const o=Rf(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Hi(s)?xd(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,r);else{const s=yQ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return Hb(n)}function gQ(t,e){const r=sh(t);return!(r===e||!$s(r)||Sx(r))&&(Fi(r).position==="fixed"||gQ(r,e))}function dM(t,e){return Hi(t)&&Fi(t).position!=="fixed"?e?e(t):t.offsetParent:null}function hM(t,e){const r=Zs(t);if(!Hi(t))return r;let n=dM(t,e);for(;n&&j_e(n)&&Fi(n).position==="static";)n=dM(n,e);return n&&(Jl(n)==="html"||Jl(n)==="body"&&Fi(n).position==="static"&&!ik(n))?r:n||function(s){let i=sh(s);for(;Hi(i)&&!Sx(i);){if(ik(i))return i;i=sh(i)}return null}(t)||r}function F_e(t,e,r){const n=Hi(e),s=Ml(e),i=r==="fixed",o=Rf(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((Jl(e)!=="body"||Wy(s))&&(a=kx(e)),Hi(e)){const c=Rf(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=mQ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const B_e={getClippingRect:function(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=r==="clippingAncestors"?function(c,f){const u=f.get(c);if(u)return u;let d=_v(c).filter(g=>$s(g)&&Jl(g)!=="body"),h=null;const v=Fi(c).position==="fixed";let y=v?sh(c):c;for(;$s(y)&&!Sx(y);){const g=Fi(y),b=ik(y);b||g.position!=="fixed"||(h=null),(v?!b&&!h:!b&&g.position==="static"&&h&&["absolute","fixed"].includes(h.position)||Wy(y)&&!b&&gQ(c,y))?d=d.filter(p=>p!==y):h=g,y=sh(y)}return f.set(c,d),d}(e,this._c):[].concat(r),o=[...i,n],a=o[0],l=o.reduce((c,f)=>{const u=uM(e,f,s);return c.top=Av(u.top,c.top),c.right=cM(u.right,c.right),c.bottom=cM(u.bottom,c.bottom),c.left=Av(u.left,c.left),c},uM(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Hi(r),i=Ml(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&n!=="fixed")&&((Jl(r)!=="body"||Wy(i))&&(o=kx(r)),Hi(r))){const c=Rf(r);a=xd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}},isElement:$s,getDimensions:function(t){return dQ(t)},getOffsetParent:hM,getDocumentElement:Ml,getScale:xd,async getElementRects(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||hM,i=this.getDimensions;return{reference:F_e(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Fi(t).direction==="rtl"};function U_e(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,animationFrame:a=!1}=n,l=s||i?[...$s(t)?_v(t):t.contextElement?_v(t.contextElement):[],..._v(e)]:[];l.forEach(d=>{const h=!$s(d)&&d.toString().includes("V");!s||a&&!h||d.addEventListener("scroll",r,{passive:!0}),i&&d.addEventListener("resize",r)});let c,f=null;o&&(f=new ResizeObserver(()=>{r()}),$s(t)&&!a&&f.observe(t),$s(t)||!t.contextElement||a||f.observe(t.contextElement),f.observe(e));let u=a?Rf(t):null;return a&&function d(){const h=Rf(t);!u||h.x===u.x&&h.y===u.y&&h.width===u.width&&h.height===u.height||r(),u=h,c=requestAnimationFrame(d)}(),r(),()=>{var d;l.forEach(h=>{s&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(d=f)==null||d.disconnect(),f=null,a&&cancelAnimationFrame(c)}}const z_e=(t,e,r)=>{const n=new Map,s={platform:B_e,...r},i={...s.platform,_c:n};return __e(t,e,{...s,platform:i})},V_e=t=>{const{element:e,padding:r}=t;function n(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:t,fn(s){return e&&n(e)?e.current!=null?iM({element:e.current,padding:r}).fn(s):{}:e?iM({element:e,padding:r}).fn(s):{}}}};var Qp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Qb(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,s;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(!Qb(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!Qb(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function bQ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function vM(t,e){const r=bQ(t);return Math.round(e*r)/r}function yM(t){const e=m.useRef(t);return Qp(()=>{e.current=t}),e}function q_e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);Qb(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,$=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=yM(l),L=yM(s),U=m.useCallback(()=>{if(!$.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),z_e($.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!Qb(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);Qp(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Qp(()=>(V.current=!0,()=>{V.current=!1}),[]),Qp(()=>{if(E&&($.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:$,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=vM(C.floating,f.x),_=vM(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...bQ(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}const wQ="Popper",[xQ,qh]=In(wQ),[W_e,CQ]=xQ(wQ),H_e=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(W_e,{scope:e,anchor:n,onAnchorChange:s},r)},G_e="PopperAnchor",K_e=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=CQ(G_e,r),o=m.useRef(null),a=Cr(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(vt.div,$e({},s,{ref:a}))}),EQ="PopperContent",[Q_e,uHe]=xQ(EQ),Y_e=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,x=CQ(EQ,f),[T,B]=m.useState(null),L=Cr(e,ie=>B(ie)),[U,V]=m.useState(null),N=d_(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(J_e),altBoundary:I},{refs:D,floatingStyles:A,placement:j,isPositioned:G,middlewareData:O}=q_e({strategy:"fixed",placement:R,whileElementsMounted:U_e,elements:{reference:x.anchor},middleware:[M_e({mainAxis:d+S,alignmentAxis:v}),E&&D_e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?N_e():void 0,...F}),E&&I_e({...F}),L_e({...F,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&V_e({element:U,padding:y}),X_e({arrowWidth:C,arrowHeight:S}),w&&O_e({strategy:"referenceHidden"})]}),[q,z]=SQ(j),H=oi(k);ai(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ai(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(Q_e,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(vt.div,$e({"data-side":q,"data-align":z},$,{ref:L,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function J_e(t){return t!==null}const X_e=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=SQ(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function SQ(t){const[e,r="center"]=t.split("-");return[e,r]}const Z_e=H_e,ePe=K_e,tPe=Y_e,rPe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(vt.div,$e({},s,{ref:e})),n):null}),c5="rovingFocusGroup.onEntryFocus",nPe={bubbles:!1,cancelable:!0},p_="RovingFocusGroup",[ok,kQ,sPe]=Ex(p_),[iPe,Wh]=In(p_,[sPe]),[oPe,aPe]=iPe(p_),lPe=m.forwardRef((t,e)=>m.createElement(ok.Provider,{scope:t.__scopeRovingFocusGroup},m.createElement(ok.Slot,{scope:t.__scopeRovingFocusGroup},m.createElement(cPe,nh({},t,{ref:e}))))),cPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,...f}=t,u=m.useRef(null),d=Cr(e,u),h=v_(i),[v=null,y]=zy({prop:o,defaultProp:a,onChange:l}),[g,b]=m.useState(!1),p=oi(c),w=kQ(r),E=m.useRef(!1),[k,$]=m.useState(0);return m.useEffect(()=>{const x=u.current;if(x)return x.addEventListener(c5,p),()=>x.removeEventListener(c5,p)},[p]),m.createElement(oPe,{scope:r,orientation:n,dir:h,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(x=>y(x),[y]),onItemShiftTab:m.useCallback(()=>b(!0),[]),onFocusableItemAdd:m.useCallback(()=>$(x=>x+1),[]),onFocusableItemRemove:m.useCallback(()=>$(x=>x-1),[])},m.createElement(vt.div,nh({tabIndex:g||k===0?-1:0,"data-orientation":n},f,{ref:d,style:{outline:"none",...t.style},onMouseDown:Ve(t.onMouseDown,()=>{E.current=!0}),onFocus:Ve(t.onFocus,x=>{const T=!E.current;if(x.target===x.currentTarget&&T&&!g){const B=new CustomEvent(c5,nPe);if(x.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=w().filter(S=>S.focusable),U=L.find(S=>S.active),V=L.find(S=>S.id===v),C=[U,V,...L].filter(Boolean).map(S=>S.ref.current);$Q(C)}}E.current=!1}),onBlur:Ve(t.onBlur,()=>b(!1))})))}),fPe="RovingFocusGroupItem",uPe=m.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,...o}=t,a=Cx(),l=i||a,c=aPe(fPe,r),f=c.currentTabStopId===l,u=kQ(r),{onFocusableItemAdd:d,onFocusableItemRemove:h}=c;return m.useEffect(()=>{if(n)return d(),()=>h()},[n,d,h]),m.createElement(ok.ItemSlot,{scope:r,id:l,focusable:n,active:s},m.createElement(vt.span,nh({tabIndex:f?0:-1,"data-orientation":c.orientation},o,{ref:e,onMouseDown:Ve(t.onMouseDown,v=>{n?c.onItemFocus(l):v.preventDefault()}),onFocus:Ve(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:Ve(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){c.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=vPe(v,c.orientation,c.dir);if(y!==void 0){v.preventDefault();let b=u().filter(p=>p.focusable).map(p=>p.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const p=b.indexOf(v.currentTarget);b=c.loop?yPe(b,p+1):b.slice(p+1)}setTimeout(()=>$Q(b))}})})))}),dPe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function hPe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function vPe(t,e,r){const n=hPe(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return dPe[n]}function $Q(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function yPe(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const mPe=lPe,AQ=uPe;var pPe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},mu=new WeakMap,Vm=new WeakMap,qm={},f5=0,_Q=function(t){return t&&(t.host||_Q(t.parentNode))},gPe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=_Q(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},bPe=function(t,e,r,n){var s=gPe(e,Array.isArray(t)?t:[t]);qm[r]||(qm[r]=new WeakMap);var i=qm[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(mu.get(d)||0)+1,g=(i.get(d)||0)+1;mu.set(d,y),i.set(d,g),o.push(d),y===1&&v&&Vm.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),f5++,function(){o.forEach(function(u){var d=mu.get(u)-1,h=i.get(u)-1;mu.set(u,d),i.set(u,h),d||(Vm.has(u)||u.removeAttribute(n),Vm.delete(u)),h||u.removeAttribute(r)}),f5--,f5||(mu=new WeakMap,mu=new WeakMap,Vm=new WeakMap,qm={})}},wPe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||pPe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),bPe(n,s,r,"aria-hidden")):function(){return null}},mo=function(){return mo=Object.assign||function(e){for(var r,n=1,s=arguments.length;n"u")return LPe;var e=jPe(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])}},BPe=IQ(),UPe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` .`.concat(CPe,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; @@ -224,40 +224,40 @@ PERFORMANCE OF THIS SOFTWARE. `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(Qp,` { + .`).concat(Yp,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(Yp,` { + .`).concat(Jp,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(Qp," .").concat(Qp,` { + .`).concat(Yp," .").concat(Yp,` { right: 0 `).concat(n,`; } - .`).concat(Yp," .").concat(Yp,` { + .`).concat(Jp," .").concat(Jp,` { margin-right: 0 `).concat(n,`; } body { `).concat(EPe,": ").concat(a,`px; } -`)},zPe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return FPe(s)},[s]);return m.createElement(BPe,{styles:UPe(i,!e,s,r?"":"!important")})},ok=!1;if(typeof window<"u")try{var qm=Object.defineProperty({},"passive",{get:function(){return ok=!0,!0}});window.addEventListener("test",qm,qm),window.removeEventListener("test",qm,qm)}catch{ok=!1}var mu=ok?{passive:!1}:!1,VPe=function(t){return t.tagName==="TEXTAREA"},OQ=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!VPe(t)&&r[e]==="visible")},qPe=function(t){return OQ(t,"overflowY")},WPe=function(t){return OQ(t,"overflowX")},yM=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=MQ(t,r);if(n){var s=DQ(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},HPe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},GPe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},MQ=function(t,e){return t==="v"?qPe(e):WPe(e)},DQ=function(t,e){return t==="v"?HPe(e):GPe(e)},KPe=function(t,e){return t==="h"&&e==="rtl"?-1:1},QPe=function(t,e,r,n,s){var i=KPe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=DQ(t,a),v=h[0],y=h[1],b=h[2],p=y-b-i*v;(v||p)&&MQ(t,a)&&(u+=p,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},Wm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},mM=function(t){return[t.deltaX,t.deltaY]},pM=function(t){return t&&"current"in t?t.current:t},YPe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},JPe=function(t){return` +`)},zPe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return FPe(s)},[s]);return m.createElement(BPe,{styles:UPe(i,!e,s,r?"":"!important")})},ak=!1;if(typeof window<"u")try{var Wm=Object.defineProperty({},"passive",{get:function(){return ak=!0,!0}});window.addEventListener("test",Wm,Wm),window.removeEventListener("test",Wm,Wm)}catch{ak=!1}var pu=ak?{passive:!1}:!1,VPe=function(t){return t.tagName==="TEXTAREA"},OQ=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!VPe(t)&&r[e]==="visible")},qPe=function(t){return OQ(t,"overflowY")},WPe=function(t){return OQ(t,"overflowX")},mM=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=MQ(t,r);if(n){var s=DQ(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},HPe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},GPe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},MQ=function(t,e){return t==="v"?qPe(e):WPe(e)},DQ=function(t,e){return t==="v"?HPe(e):GPe(e)},KPe=function(t,e){return t==="h"&&e==="rtl"?-1:1},QPe=function(t,e,r,n,s){var i=KPe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=DQ(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&MQ(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},Hm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},pM=function(t){return[t.deltaX,t.deltaY]},gM=function(t){return t&&"current"in t?t.current:t},YPe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},JPe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},XPe=0,pu=[];function ZPe(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(XPe++)[0],i=m.useState(function(){return IQ()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=xPe([t.lockRef.current],(t.shards||[]).map(pM),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,b){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var p=Wm(y),g=r.current,w="deltaX"in y?y.deltaX:g[0]-p[0],E="deltaY"in y?y.deltaY:g[1]-p[1],k,$=y.target,C=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&C==="h"&&$.type==="range")return!1;var T=yM(C,$);if(!T)return!0;if(T?k=C:(k=C==="v"?"h":"v",T=yM(C,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var j=n.current||k;return QPe(j,b,y,j==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var b=y;if(!(!pu.length||pu[pu.length-1]!==i)){var p="deltaY"in b?mM(b):Wm(b),g=e.current.filter(function(k){return k.name===b.type&&k.target===b.target&&YPe(k.delta,p)})[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var w=(o.current.shards||[]).map(pM).filter(Boolean).filter(function(k){return k.contains(b.target)}),E=w.length>0?a(b,w[0]):!o.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),c=m.useCallback(function(y,b,p,g){var w={name:y,delta:b,target:p,should:g};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=Wm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,mM(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,Wm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return pu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,mu),document.addEventListener("touchmove",l,mu),document.addEventListener("touchstart",f,mu),function(){pu=pu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,mu),document.removeEventListener("touchmove",l,mu),document.removeEventListener("touchstart",f,mu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:JPe(s)}):null,h?m.createElement(zPe,{gapMode:"margin"}):null)}const eTe=TPe(RQ,ZPe);var NQ=m.forwardRef(function(t,e){return m.createElement(kx,yo({},t,{ref:e,sideCar:eTe}))});NQ.classNames=kx.classNames;const tTe=NQ,rTe=["Enter"," "],$x="Menu",[nTe,uHe,sTe]=Cx($x),[Qf,LQ]=Rn($x,[sTe,Vh,qh]);Vh();const iTe=qh();Qf($x);const[dHe,oTe]=Qf($x),aTe="MenuPortal";Qf(aTe,{forceMount:void 0});const lTe="MenuContent",[hHe,jQ]=Qf(lTe),ak="MenuItem",gM="menu.itemSelect",FQ=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=oTe(ak,t.__scopeMenu),a=jQ(ak,t.__scopeMenu),l=Er(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(gM,{bubbles:!0,cancelable:!0});u.addEventListener(gM,h=>n==null?void 0:n(h),{once:!0}),d_(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(cTe,$e({},s,{ref:l,disabled:r,onClick:Ve(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Ve(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ve(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||rTe.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),cTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=jQ(ak,r),a=iTe(r),l=m.useRef(null),c=Er(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(nTe.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement(AQ,$e({asChild:!0},a,{focusable:!n}),m.createElement(vt.div,$e({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Ve(t.onPointerMove,bM(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Ve(t.onPointerLeave,bM(v=>o.onItemLeave(v))),onFocus:Ve(t.onFocus,()=>u(!0)),onBlur:Ve(t.onBlur,()=>u(!1))}))))}),fTe=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(UQ,{scope:t.__scopeMenu,checked:r},m.createElement(FQ,$e({role:"menuitemcheckbox","aria-checked":Qb(r)?"mixed":r},s,{ref:e,"data-state":p_(r),onSelect:Ve(s.onSelect,()=>n==null?void 0:n(Qb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),uTe="MenuRadioGroup",[vHe,dTe]=Qf(uTe,{value:void 0,onValueChange:()=>{}}),hTe="MenuRadioItem",vTe=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=dTe(hTe,t.__scopeMenu),i=r===s.value;return m.createElement(UQ,{scope:t.__scopeMenu,checked:i},m.createElement(FQ,$e({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":p_(i),onSelect:Ve(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),BQ="MenuItemIndicator",[UQ,yTe]=Qf(BQ,{checked:!1}),mTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=yTe(BQ,r);return m.createElement(bx,{present:n||Qb(i.checked)||i.checked===!0},m.createElement(vt.span,$e({},s,{ref:e,"data-state":p_(i.checked)})))}),pTe="MenuSub";Qf(pTe);function Qb(t){return t==="indeterminate"}function p_(t){return Qb(t)?"indeterminate":t?"checked":"unchecked"}function bM(t){return e=>e.pointerType==="mouse"?t(e):void 0}const gTe=fTe,bTe=vTe,wTe=mTe,zQ="DropdownMenu",[xTe,yHe]=Rn(zQ,[LQ]),g_=LQ();xTe(zQ);const CTe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=g_(r);return m.createElement(gTe,$e({},s,n,{ref:e}))}),ETe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=g_(r);return m.createElement(bTe,$e({},s,n,{ref:e}))}),STe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=g_(r);return m.createElement(wTe,$e({},s,n,{ref:e}))}),kTe=CTe,$Te=ETe,VQ=STe;var qQ="_1k2mbvi5",WQ="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const ATe=({children:t})=>se.jsx(VQ,{className:qQ,children:t});m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs(kTe,{className:Ls(WQ,t),...r,ref:n,children:[se.jsx(ATe,{children:se.jsx(rQ,{size:"xs"})}),se.jsx(Li,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs($Te,{className:Ls(WQ,t),...r,ref:n,children:[se.jsx(VQ,{className:qQ,children:se.jsx(Li,{children:"•"})}),se.jsx(Li,{variant:"small",children:e})]}));const HQ=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return se.jsx(OAe,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),_Te=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var PTe="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",TTe="_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",RTe=yr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ITe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=_Te(h,e),[y,b]=m.useState(null),p=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],$=k.name,C=k.size/1e3;b({name:$,size:C,extension:$.split(".").pop()??""}),c==null||c(k)},g=u.map(w=>ITe[w]).join(",");return se.jsx(Uh,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:Ls(TTe,RTe({borderRadius:r})),children:[y?se.jsxs(dt,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[se.jsx(Li,{children:y.name}),se.jsxs(Li,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):se.jsx(Li,{children:f}),se.jsx(dt,{accept:g,as:"input",className:PTe,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:p,ref:v,type:"file",...d}),y&&se.jsx(HQ,{cursor:"pointer",icon:nQ,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),b(null)},zIndex:"10"})]})})})});var OTe=yr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const lk=1e3,xd=64,d5=xd/2,h5=(t,e=lk)=>t%e/(lk/xd),Lc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},MTe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:Lc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},DTe=(t,e)=>{const r=[];for(let n=0;n{const i=xd/10+h5(n.r,lk*1.5/(s+1));return{...MTe(n.a,n.b,n.c),x:h5(n.x),y:h5(n.y),r:i}})};m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=DTe(r,s);return se.jsxs(dt,{as:"svg",className:Ls(e,OTe({size:n})),viewBox:`0 0 ${xd} ${xd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[se.jsxs("defs",{children:[se.jsx("clipPath",{id:"circle-clip",children:se.jsx("circle",{cx:d5,cy:d5,r:d5})}),se.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[se.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),se.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),se.jsx("feGaussianBlur",{stdDeviation:xd/10,result:"effect1_foregroundBlur"})]}),se.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[se.jsx("stop",{offset:"0",stopColor:o[0].c}),se.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>se.jsxs(m.Fragment,{children:[se.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.a}),se.jsx("stop",{offset:"1",stopColor:a.b})]}),se.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.c}),se.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),se.jsxs("g",{clipPath:"url(#circle-clip)",children:[se.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),se.jsx("g",{filter:"url(#blur)",children:o.map(a=>se.jsxs(m.Fragment,{children:[se.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),se.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const NTe=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return se.jsx(dt,{as:pAe.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},GQ="Dialog",[KQ,mHe]=Rn(GQ);KQ(GQ);const LTe="DialogPortal";KQ(LTe,{forceMount:void 0});yr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});yr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});yr({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"]]});var jTe=yr({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:[]}),FTe="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",BTe=yr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const QQ=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...b}=t;return se.jsx(Uh,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{className:Ls(FTe,BTe({borderRadius:s})),children:[f&&se.jsx(f,{size:"sm"}),se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:jTe({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...b}),u&&se.jsx(u,{size:"sm"}),h]})})})}),UTe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function zTe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||UTe.test(zTe(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return se.jsx(QQ,{name:r,onChange:a,onBlur:l,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})});yr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const YQ="Progress",Ax=100,[VTe,pHe]=Rn(YQ),[qTe,gHe]=VTe(YQ),WTe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=HTe,...o}=t,a=ck(s)?s:Ax,l=JQ(n,a)?n:null,c=Yb(l)?i(l,a):void 0;return m.createElement(qTe,{scope:r,value:l,max:a},m.createElement(vt.div,$e({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Yb(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":GTe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});WTe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!ck(n)?new Error(KTe(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=ck(t.max)?t.max:Ax;return n!=null&&!JQ(n,i)?new Error(QTe(s,r)):null}};function HTe(t,e){return`${Math.round(t/e*100)}%`}function GTe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Yb(t){return typeof t=="number"}function ck(t){return Yb(t)&&!isNaN(t)&&t>0}function JQ(t,e){return Yb(t)&&!isNaN(t)&&t<=e&&t>=0}function KTe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ax}\`.`}function QTe(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +`)},XPe=0,gu=[];function ZPe(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(XPe++)[0],i=m.useState(function(){return IQ()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=xPe([t.lockRef.current],(t.shards||[]).map(gM),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=Hm(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,$=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&$.type==="range")return!1;var T=mM(x,$);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=mM(x,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return QPe(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!gu.length||gu[gu.length-1]!==i)){var b="deltaY"in g?pM(g):Hm(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&YPe(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(gM).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=Hm(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,pM(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,Hm(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return gu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,pu),document.addEventListener("touchmove",l,pu),document.addEventListener("touchstart",f,pu),function(){gu=gu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,pu),document.removeEventListener("touchmove",l,pu),document.removeEventListener("touchstart",f,pu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:JPe(s)}):null,h?m.createElement(zPe,{gapMode:"margin"}):null)}const eTe=TPe(RQ,ZPe);var NQ=m.forwardRef(function(t,e){return m.createElement($x,mo({},t,{ref:e,sideCar:eTe}))});NQ.classNames=$x.classNames;const tTe=NQ,rTe=["Enter"," "],Ax="Menu",[nTe,dHe,sTe]=Ex(Ax),[Yf,LQ]=In(Ax,[sTe,qh,Wh]);qh();const iTe=Wh();Yf(Ax);const[hHe,oTe]=Yf(Ax),aTe="MenuPortal";Yf(aTe,{forceMount:void 0});const lTe="MenuContent",[vHe,jQ]=Yf(lTe),lk="MenuItem",bM="menu.itemSelect",FQ=m.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,i=m.useRef(null),o=oTe(lk,t.__scopeMenu),a=jQ(lk,t.__scopeMenu),l=Cr(e,i),c=m.useRef(!1),f=()=>{const u=i.current;if(!r&&u){const d=new CustomEvent(bM,{bubbles:!0,cancelable:!0});u.addEventListener(bM,h=>n==null?void 0:n(h),{once:!0}),h_(u,d),d.defaultPrevented?c.current=!1:o.onClose()}};return m.createElement(cTe,$e({},s,{ref:l,disabled:r,onClick:Ve(t.onClick,f),onPointerDown:u=>{var d;(d=t.onPointerDown)===null||d===void 0||d.call(t,u),c.current=!0},onPointerUp:Ve(t.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ve(t.onKeyDown,u=>{const d=a.searchRef.current!=="";r||d&&u.key===" "||rTe.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),cTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...i}=t,o=jQ(lk,r),a=iTe(r),l=m.useRef(null),c=Cr(e,l),[f,u]=m.useState(!1),[d,h]=m.useState("");return m.useEffect(()=>{const v=l.current;if(v){var y;h(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[i.children]),m.createElement(nTe.ItemSlot,{scope:r,disabled:n,textValue:s??d},m.createElement(AQ,$e({asChild:!0},a,{focusable:!n}),m.createElement(vt.div,$e({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:c,onPointerMove:Ve(t.onPointerMove,wM(v=>{n?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:Ve(t.onPointerLeave,wM(v=>o.onItemLeave(v))),onFocus:Ve(t.onFocus,()=>u(!0)),onBlur:Ve(t.onBlur,()=>u(!1))}))))}),fTe=m.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return m.createElement(UQ,{scope:t.__scopeMenu,checked:r},m.createElement(FQ,$e({role:"menuitemcheckbox","aria-checked":Yb(r)?"mixed":r},s,{ref:e,"data-state":g_(r),onSelect:Ve(s.onSelect,()=>n==null?void 0:n(Yb(r)?!0:!r),{checkForDefaultPrevented:!1})})))}),uTe="MenuRadioGroup",[yHe,dTe]=Yf(uTe,{value:void 0,onValueChange:()=>{}}),hTe="MenuRadioItem",vTe=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=dTe(hTe,t.__scopeMenu),i=r===s.value;return m.createElement(UQ,{scope:t.__scopeMenu,checked:i},m.createElement(FQ,$e({role:"menuitemradio","aria-checked":i},n,{ref:e,"data-state":g_(i),onSelect:Ve(n.onSelect,()=>{var o;return(o=s.onValueChange)===null||o===void 0?void 0:o.call(s,r)},{checkForDefaultPrevented:!1})})))}),BQ="MenuItemIndicator",[UQ,yTe]=Yf(BQ,{checked:!1}),mTe=m.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,i=yTe(BQ,r);return m.createElement(wx,{present:n||Yb(i.checked)||i.checked===!0},m.createElement(vt.span,$e({},s,{ref:e,"data-state":g_(i.checked)})))}),pTe="MenuSub";Yf(pTe);function Yb(t){return t==="indeterminate"}function g_(t){return Yb(t)?"indeterminate":t?"checked":"unchecked"}function wM(t){return e=>e.pointerType==="mouse"?t(e):void 0}const gTe=fTe,bTe=vTe,wTe=mTe,zQ="DropdownMenu",[xTe,mHe]=In(zQ,[LQ]),b_=LQ();xTe(zQ);const CTe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(gTe,$e({},s,n,{ref:e}))}),ETe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(bTe,$e({},s,n,{ref:e}))}),STe=m.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=b_(r);return m.createElement(wTe,$e({},s,n,{ref:e}))}),kTe=CTe,$Te=ETe,VQ=STe;var qQ="_1k2mbvi5",WQ="_1k2mbvi4 fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1x4 fyvr1yk fyvr1ss fyvr1uo fyvr12wk fyvr12we fyvr11h0 fyvr11ko fyvr11jw fyvr12uz fyvr11n2 fyvr11hw fyvr12sb";const ATe=({children:t})=>se.jsx(VQ,{className:qQ,children:t});m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs(kTe,{className:js(WQ,t),...r,ref:n,children:[se.jsx(ATe,{children:se.jsx(rQ,{size:"xs"})}),se.jsx(ji,{variant:"small",children:e})]}));m.forwardRef(({className:t,children:e,...r},n)=>se.jsxs($Te,{className:js(WQ,t),...r,ref:n,children:[se.jsx(VQ,{className:qQ,children:se.jsx(ji,{children:"•"})}),se.jsx(ji,{variant:"small",children:e})]}));const HQ=m.forwardRef((t,e)=>{const{icon:r,size:n="md",...s}=t;return se.jsx(OAe,{leftIcon:r,size:n,flexShrink:"0",ref:e,...s})}),_Te=(...t)=>e=>t.forEach(r=>{r&&(typeof r=="function"?r(e):r.current=e)});var PTe="fyvr12wh fyvr12wb fyvr11ho fyvr12vb fyvr1ko fyvr1oo fyvr1mo fyvr1qo",TTe="_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",RTe=yr({defaultClassName:"_1hq71vk5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const ITe={png:".png,image/png",jpeg:".jpeg,image/jpeg",jpg:".jpg,image/jpg",images:"image/*",pdf:".pdf,application/pdf"};m.forwardRef((t,e)=>{const{borderRadius:r="md",description:n,disabled:s=!1,id:i,label:o="",labelLocation:a="hidden",name:l,onValueChange:c,placeholder:f="Upload a file",validExtensions:u,...d}=t,h=m.useRef(null),v=_Te(h,e),[y,g]=m.useState(null),b=w=>{const E=w.currentTarget.files;if(!E||!E[0])return;const k=E[0],$=k.name,x=k.size/1e3;g({name:$,size:x,extension:$.split(".").pop()??""}),c==null||c(k)},p=u.map(w=>ITe[w]).join(",");return se.jsx(zh,{description:n,disabled:s,display:"grid",id:i??l,label:o,labelLocation:a,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{justifyContent:y?"space-between":"flex-start",color:y?"text100":"text50",className:js(TTe,RTe({borderRadius:r})),children:[y?se.jsxs(dt,{flexDirection:"row",gap:"2",alignItems:"baseline",children:[se.jsx(ji,{children:y.name}),se.jsxs(ji,{color:"text50",variant:"xsmall",children:[y.size.toFixed(2)," kb"]})]}):se.jsx(ji,{children:f}),se.jsx(dt,{accept:p,as:"input",className:PTe,cursor:y?"text":"pointer",disabled:s||!!y,id:i??l,name:l,onChange:b,ref:v,type:"file",...d}),y&&se.jsx(HQ,{cursor:"pointer",icon:nQ,size:"xs",onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),(E=h.current)!=null&&E.value&&(h.current.value=""),c==null||c(null),g(null)},zIndex:"10"})]})})})});var OTe=yr({defaultClassName:"_1bhyzin0",variantClassNames:{size:{xs:"_1bhyzin1",sm:"_1bhyzin2",md:"_1bhyzin3",lg:"_1bhyzin4",xl:"_1bhyzin5"}},defaultVariants:{},compoundVariants:[]});const ck=1e3,Cd=64,h5=Cd/2,v5=(t,e=ck)=>t%e/(ck/Cd),jc=(t,e=0)=>{let r=3735928559^e,n=1103547991^e;for(let s=0,i;s>>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)},MTe=(t,e,r)=>{const n=Math.random().toString(36).slice(2,12),s=t%360,i=(t+120)%360,o=r%360;return{id:jc(n),a:`hsl(${s}deg 100% 40%)`,b:`hsl(${i}deg 100% 50%)`,c:`hsl(${o}deg 100% 50%)`}},DTe=(t,e)=>{const r=[];for(let n=0;n{const i=Cd/10+v5(n.r,ck*1.5/(s+1));return{...MTe(n.a,n.b,n.c),x:v5(n.x),y:v5(n.y),r:i}})};m.memo(t=>{const{className:e,address:r,size:n="md",complexity:s=1,...i}=t,o=DTe(r,s);return se.jsxs(dt,{as:"svg",className:js(e,OTe({size:n})),viewBox:`0 0 ${Cd} ${Cd}`,version:"1.1",flexShrink:"0",borderRadius:"circle",overflow:"hidden",xmlns:"http://www.w3.org/2000/svg",...i,children:[se.jsxs("defs",{children:[se.jsx("clipPath",{id:"circle-clip",children:se.jsx("circle",{cx:h5,cy:h5,r:h5})}),se.jsxs("filter",{id:"blur",x:"-10%",y:"-10%",width:"120%",height:"120%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[se.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),se.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),se.jsx("feGaussianBlur",{stdDeviation:Cd/10,result:"effect1_foregroundBlur"})]}),se.jsxs("linearGradient",{id:`gradient-background-${o[0].id}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[se.jsx("stop",{offset:"0",stopColor:o[0].c}),se.jsx("stop",{offset:"1",stopColor:o[0].a})]}),o.map(a=>se.jsxs(m.Fragment,{children:[se.jsxs("radialGradient",{id:`gradient-primary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.a}),se.jsx("stop",{offset:"1",stopColor:a.b})]}),se.jsxs("radialGradient",{id:`gradient-secondary-${a.id}`,children:[se.jsx("stop",{offset:"0",stopColor:a.c}),se.jsx("stop",{offset:"1",stopColor:a.b})]})]},a.id))]}),se.jsxs("g",{clipPath:"url(#circle-clip)",children:[se.jsx("rect",{width:"100%",height:"100%",fill:`url(#gradient-background-${o[0].id})`}),se.jsx("g",{filter:"url(#blur)",children:o.map(a=>se.jsxs(m.Fragment,{children:[se.jsx("circle",{fill:`url(#gradient-primary-${a.id})`,cx:a.x,cy:a.y,r:a.r}),se.jsx("circle",{fill:`url(#gradient-secondary-${a.id})`,cx:a.y,cy:a.x,r:a.r/2})]},a.id))})]})]})});const NTe=t=>{const{disableAnimation:e=!1,onLoad:r,...n}=t,[s,i]=m.useState(!1),o=a=>{i(!0),r==null||r(a)};return se.jsx(dt,{as:pAe.img,initial:e?void 0:{opacity:0},animate:e?void 0:{opacity:s?1:0},transition:{duration:.2},onLoad:e?void 0:o,...n})},GQ="Dialog",[KQ,pHe]=In(GQ);KQ(GQ);const LTe="DialogPortal";KQ(LTe,{forceMount:void 0});yr({defaultClassName:"_1vqx0w94",variantClassNames:{shadows:{true:"_1vqx0w95",false:"_1vqx0w96"},direction:{vertical:"_1vqx0w97",horizontal:"_1vqx0w98"}},defaultVariants:{},compoundVariants:[]});yr({defaultClassName:"_1vqx0w91 fyvr128 fyvr15o",variantClassNames:{direction:{vertical:"_1vqx0w92",horizontal:"_1vqx0w93"}},defaultVariants:{},compoundVariants:[]});yr({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"]]});var jTe=yr({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:[]}),FTe="_1acm19y1 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1ww fyvr1ys fyvr11hc fyvr11ko fyvr11ob fyvr12sh fyvr1g0 fyvr118g",BTe=yr({defaultClassName:"_1acm19y5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const QQ=m.forwardRef((t,e)=>{const{as:r="input",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",leftIcon:f,rightIcon:u,name:d,controls:h,type:v="text",numeric:y=!1,...g}=t;return se.jsx(zh,{description:i,disabled:o,display:"grid",id:a??d,label:l,labelLocation:c,children:se.jsx(dt,{width:"full",children:se.jsxs(dt,{className:js(FTe,BTe({borderRadius:s})),children:[f&&se.jsx(f,{size:"sm"}),se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:jTe({numeric:y}),disabled:o,id:a??d,name:d,ref:e,type:v,...g}),u&&se.jsx(u,{size:"sm"}),h]})})})}),UTe=RegExp("^\\d*(?:\\\\[.])?\\d*$");function zTe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}m.forwardRef((t,e)=>{const{name:r="amount",placeholder:n,onChange:s,onBlur:i,...o}=t,a=c=>{let{value:f}=c.target;f=f.replace(/,/g,"."),f.startsWith(".")&&(f="0"+f),f.startsWith("0")&&(f=f.replace(/^0+(?=\d)/,"")),(f===""||UTe.test(zTe(f)))&&(s==null||s({...c,target:{...c.target,value:f}}))},l=c=>{const{value:f}=c.target;let u=f;u.endsWith(".")&&(u=u.slice(0,-1)),u.endsWith(".0")&&(u=u.slice(0,-2)),u==="0"&&(u=""),i==null||i(c),u!==f&&(s==null||s({...c,target:{...c.target,value:u}}))};return se.jsx(QQ,{name:r,onChange:a,onBlur:l,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})});yr({defaultClassName:"dtv8gt1",variantClassNames:{size:{sm:"dtv8gt2",normal:"dtv8gt3",md:"dtv8gt4",lg:"dtv8gt5",xl:"dtv8gt6"}},defaultVariants:{},compoundVariants:[]});const YQ="Progress",_x=100,[VTe,gHe]=In(YQ),[qTe,bHe]=VTe(YQ),WTe=m.forwardRef((t,e)=>{const{__scopeProgress:r,value:n,max:s,getValueLabel:i=HTe,...o}=t,a=fk(s)?s:_x,l=JQ(n,a)?n:null,c=Jb(l)?i(l,a):void 0;return m.createElement(qTe,{scope:r,value:l,max:a},m.createElement(vt.div,$e({"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Jb(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":GTe(l,a),"data-value":l??void 0,"data-max":a},o,{ref:e})))});WTe.propTypes={max(t,e,r){const n=t[e],s=String(n);return n&&!fk(n)?new Error(KTe(s,r)):null},value(t,e,r){const n=t[e],s=String(n),i=fk(t.max)?t.max:_x;return n!=null&&!JQ(n,i)?new Error(QTe(s,r)):null}};function HTe(t,e){return`${Math.round(t/e*100)}%`}function GTe(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Jb(t){return typeof t=="number"}function fk(t){return Jb(t)&&!isNaN(t)&&t>0}function JQ(t,e){return Jb(t)&&!isNaN(t)&&t<=e&&t>=0}function KTe(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${_x}\`.`}function QTe(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 ${Ax} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${_x} if no \`max\` prop is set) - \`null\` if the progress is indeterminate. -Defaulting to \`null\`.`}const XQ="Radio",[YTe,ZQ]=Rn(XQ),[JTe,XTe]=YTe(XQ),ZTe=m.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Er(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(JTe,{scope:r,checked:s,disabled:o},m.createElement(vt.button,$e({type:"button",role:"radio","aria-checked":s,"data-state":eY(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Ve(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(r7e,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),e7e="RadioIndicator",t7e=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=XTe(e7e,r);return m.createElement(bx,{present:n||i.checked},m.createElement(vt.span,$e({"data-state":eY(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),r7e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=f_(r),a=u_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function eY(t){return t?"checked":"unchecked"}const n7e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tY="RadioGroup",[s7e,bHe]=Rn(tY,[qh,ZQ]),rY=qh(),nY=ZQ(),[i7e,o7e]=s7e(tY),a7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=rY(r),v=h_(c),[y,b]=Uy({prop:i,defaultProp:s,onChange:u});return m.createElement(i7e,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:b},m.createElement(mPe,$e({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(vt.div,$e({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),l7e="RadioGroupItem",c7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=o7e(l7e,r),o=i.disabled||n,a=rY(r),l=nY(r),c=m.useRef(null),f=Er(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{n7e.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement(AQ,$e({asChild:!0},a,{focusable:!o,active:u}),m.createElement(ZTe,$e({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Ve(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ve(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),f7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=nY(r);return m.createElement(t7e,$e({},s,n,{ref:e}))}),u7e=a7e,d7e=c7e,h7e=f7e;var v7e=yr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),y7e=yr({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 m7e=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return se.jsx(dt,{alignItems:"center",children:se.jsx(Uh,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:se.jsx(d7e,{className:y7e({size:n}),value:s,id:e,disabled:i,children:se.jsx(h7e,{className:v7e({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return se.jsx(u7e,{disabled:n,name:i,ref:e,...l,children:se.jsx(dt,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>se.jsx(m7e,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function wM(t,[e,r]){return Math.min(r,Math.max(e,t))}const sY=m.forwardRef((t,e)=>m.createElement(vt.span,$e({},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}}))),p7e=[" ","Enter","ArrowUp","ArrowDown"],g7e=[" ","Enter"],_x="Select",[Px,b_,b7e]=Cx(_x),[Wh,wHe]=Rn(_x,[b7e,Vh]),w_=Vh(),[w7e,Yf]=Wh(_x),[x7e,C7e]=Wh(_x),E7e=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=w_(e),[y,b]=m.useState(null),[p,g]=m.useState(null),[w,E]=m.useState(!1),k=h_(c),[$=!1,C]=Uy({prop:n,defaultProp:s,onChange:i}),[T,j]=Uy({prop:o,defaultProp:a,onChange:l}),F=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),x=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(Z_e,v,m.createElement(w7e,{required:h,scope:e,trigger:y,onTriggerChange:b,valueNode:p,onValueNodeChange:g,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:xx(),value:T,onValueChange:j,open:$,onOpenChange:C,dir:k,triggerPointerDownPosRef:F,disabled:d},m.createElement(Px.Provider,{scope:e},m.createElement(x7e,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(oY,{key:x,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>j(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},S7e="SelectTrigger",k7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=w_(r),o=Yf(S7e,r),a=o.disabled||n,l=Er(e,o.onTriggerChange),c=b_(r),[f,u,d]=aY(v=>{const y=c().filter(g=>!g.disabled),b=y.find(g=>g.value===o.value),p=lY(y,v,b);p!==void 0&&o.onValueChange(p.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(ePe,$e({asChild:!0},i),m.createElement(vt.button,$e({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":o.value===void 0?"":void 0},s,{ref:l,onClick:Ve(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Ve(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Ve(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&p7e.includes(v.key)&&(h(),v.preventDefault())})})))}),$7e="SelectValue",A7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Yf($7e,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Er(e,l.onValueNodeChange);return oi(()=>{c(f)},[c,f]),m.createElement(vt.span,$e({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),_7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(vt.span,$e({"aria-hidden":!0},s,{ref:e}),n||"▼")}),sh="SelectContent",P7e=m.forwardRef((t,e)=>{const r=Yf(sh,t.__scopeSelect),[n,s]=m.useState();if(oi(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(iY,{scope:t.__scopeSelect},m.createElement(Px.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(T7e,$e({},t,{ref:e}))}),Go=10,[iY,Tx]=Wh(sh),T7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:b,...p}=t,g=Yf(sh,r),[w,E]=m.useState(null),[k,$]=m.useState(null),C=Er(e,z=>E(z)),[T,j]=m.useState(null),[F,U]=m.useState(null),V=b_(r),[N,x]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return wPe(w)},[w]),w_e();const R=m.useCallback(z=>{const[H,...X]=V().map(J=>J.ref.current),[Q]=X.slice(-1),K=document.activeElement;for(const J of z)if(J===K||(J==null||J.scrollIntoView({block:"nearest"}),J===H&&k&&(k.scrollTop=0),J===Q&&k&&(k.scrollTop=k.scrollHeight),J==null||J.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=g;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=Q=>{var K,J,ae,ie;z={x:Math.abs(Math.round(Q.pageX)-((K=(J=I.current)===null||J===void 0?void 0:J.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(Q.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},X=Q=>{z.x<=10&&z.y<=10?Q.preventDefault():w.contains(Q.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",X,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[B,D]=aY(z=>{const H=V().filter(K=>!K.disabled),X=H.find(K=>K.ref.current===document.activeElement),Q=lY(H,z,X);Q&&setTimeout(()=>Q.ref.current.focus())}),A=m.useCallback((z,H,X)=>{const Q=!S.current&&!X;(g.value!==void 0&&g.value===H||Q)&&(j(z),Q&&(S.current=!0))},[g.value]),L=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,X)=>{const Q=!S.current&&!X;(g.value!==void 0&&g.value===H||Q)&&U(z)},[g.value]),O=n==="popper"?xM:R7e,q=O===xM?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:b}:{};return m.createElement(iY,{scope:r,content:w,viewport:k,onViewportChange:$,itemRefCallback:A,selectedItem:T,onItemLeave:L,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:F,position:n,isPositioned:N,searchRef:B},m.createElement(tTe,{as:zy,allowPinchZoom:!0},m.createElement(x_e,{asChild:!0,trapped:g.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ve(s,z=>{var H;(H=g.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(iQ,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>g.onOpenChange(!1)},m.createElement(O,$e({role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:z=>z.preventDefault()},p,q,{onPlaced:()=>x(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:Ve(p.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Q=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,J=Q.indexOf(K);Q=Q.slice(J+1)}setTimeout(()=>R(Q)),z.preventDefault()}})}))))))}),R7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Yf(sh,r),o=Tx(sh,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Er(e,C=>f(C)),d=b_(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:b,selectedItemText:p,focusSelectedItem:g}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&b&&p){const C=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),j=i.valueNode.getBoundingClientRect(),F=p.getBoundingClientRect();if(i.dir!=="rtl"){const K=F.left-T.left,J=j.left-K,ae=C.left-J,ie=C.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Go,ke=wM(J,[Go,st-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-F.right,J=window.innerWidth-j.right-K,ae=window.innerWidth-C.right-J,ie=C.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Go,ke=wM(J,[Go,st-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-Go*2,N=y.scrollHeight,x=window.getComputedStyle(c),S=parseInt(x.borderTopWidth,10),R=parseInt(x.paddingTop,10),M=parseInt(x.borderBottomWidth,10),_=parseInt(x.paddingBottom,10),I=S+R+N+_+M,B=Math.min(b.offsetHeight*5,I),D=window.getComputedStyle(y),A=parseInt(D.paddingTop,10),L=parseInt(D.paddingBottom,10),G=C.top+C.height/2-Go,O=V-G,q=b.offsetHeight/2,z=b.offsetTop+q,H=S+R+z,X=I-H;if(H<=G){const K=b===U[U.length-1].ref.current;a.style.bottom="0px";const J=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?L:0)+J+M),ie=H+ae;a.style.height=ie+"px"}else{const K=b===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?A:0)+q)+X;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${Go}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,b,p,i.dir,n]);oi(()=>w(),[w]);const[E,k]=m.useState();oi(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const $=m.useCallback(C=>{C&&v.current===!0&&(w(),g==null||g(),v.current=!1)},[w,g]);return m.createElement(I7e,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:$},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(vt.div,$e({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),xM=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Go,...i}=t,o=w_(r);return m.createElement(tPe,$e({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}}))}),[I7e,O7e]=Wh(sh,{}),CM="SelectViewport",M7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Tx(CM,r),i=O7e(CM,r),o=Er(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.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}"}}),m.createElement(Px.Slot,{scope:r},m.createElement(vt.div,$e({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ve(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Go*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),b=Math.max(v,y);if(b0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),D7e="SelectGroup",[N7e,xHe]=Wh(D7e),L7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=xx();return m.createElement(N7e,{scope:r,id:s},m.createElement(vt.div,$e({role:"group","aria-labelledby":s},n,{ref:e})))}),fk="SelectItem",[j7e,F7e]=Wh(fk),B7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Yf(fk,r),l=Tx(fk,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Er(e,p=>{var g;return(g=l.itemRefCallback)===null||g===void 0?void 0:g.call(l,p,n,s)}),y=xx(),b=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(j7e,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(p=>{u(g=>{var w;return g||((w=p==null?void 0:p.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(Px.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(vt.div,$e({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Ve(o.onFocus,()=>h(!0)),onBlur:Ve(o.onBlur,()=>h(!1)),onPointerUp:Ve(o.onPointerUp,b),onPointerMove:Ve(o.onPointerMove,p=>{if(s){var g;(g=l.onItemLeave)===null||g===void 0||g.call(l)}else p.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(o.onPointerLeave,p=>{if(p.currentTarget===document.activeElement){var g;(g=l.onItemLeave)===null||g===void 0||g.call(l)}}),onKeyDown:Ve(o.onKeyDown,p=>{var g;((g=l.searchRef)===null||g===void 0?void 0:g.current)!==""&&p.key===" "||(g7e.includes(p.key)&&b(),p.key===" "&&p.preventDefault())})}))))}),Hm="SelectItemText",U7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Yf(Hm,r),a=Tx(Hm,r),l=F7e(Hm,r),c=C7e(Hm,r),[f,u]=m.useState(null),d=Er(e,p=>u(p),l.onItemTextChange,p=>{var g;return(g=a.itemTextRefCallback)===null||g===void 0?void 0:g.call(a,p,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:b}=c;return oi(()=>(y(v),()=>b(v)),[y,b,v]),m.createElement(m.Fragment,null,m.createElement(vt.span,$e({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),oY=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Er(e,s),o=f_(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(sY,{asChild:!0},m.createElement("select",$e({},n,{ref:i,defaultValue:r})))});oY.displayName="BubbleSelect";function aY(t){const e=ii(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function lY(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=z7e(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function z7e(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const V7e=E7e,q7e=k7e,W7e=A7e,H7e=_7e,G7e=P7e,K7e=M7e,Q7e=L7e,Y7e=B7e,J7e=U7e;var X7e="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",Z7e="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",e9e="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",t9e=yr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const r9e=m.forwardRef(({children:t,className:e,...r},n)=>se.jsx(Y7e,{className:Ls(Z7e,e),...r,ref:n,children:se.jsx(J7e,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return se.jsx(Uh,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:se.jsxs(V7e,{disabled:n,name:l,...u,children:[se.jsxs(q7e,{id:s??l,className:Ls(e9e,t9e({borderRadius:r})),ref:e,children:[se.jsx(W7e,{placeholder:f}),se.jsx(dt,{as:H7e,display:"inline-flex",children:se.jsx(r_e,{})})]}),se.jsx(G7e,{className:X7e,children:se.jsx(K7e,{children:se.jsx(Q7e,{children:c.map(({value:d,label:h,...v})=>se.jsx(r9e,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?se.jsx(HQ,{icon:nQ,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return se.jsx(QQ,{ref:e,name:i,leftIcon:i_e,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var n9e=yr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return se.jsx(dt,{className:n9e({size:r}),color:"text50",ref:e,...n,children:se.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[se.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),se.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>se.jsx(dt,{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 cY="Switch",[s9e,CHe]=Rn(cY);s9e(cY);yr({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 fY="Tabs",[i9e,EHe]=Rn(fY,[qh]);qh();i9e(fY);var o9e="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return se.jsxs(dt,{className:o9e,ref:e,background:"buttonGlass",...s,children:[r&&se.jsx(r,{size:"xs"}),se.jsx(Li,{children:n})]})});const a9e="ToastProvider",[l9e,SHe,c9e]=Cx("Toast"),[uY,kHe]=Rn("Toast",[c9e]),[$He,dY]=uY(a9e),EM="toast.viewportPause",SM="toast.viewportResume",Rx="Toast",f9e="toast.swipeStart",u9e="toast.swipeMove",d9e="toast.swipeCancel",h9e="toast.swipeEnd",[v9e,y9e]=uY(Rx,{onClose(){}}),m9e=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=dY(Rx,r),[b,p]=m.useState(null),g=Er(e,x=>p(x)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,$=m.useRef(0),C=m.useRef(k),T=m.useRef(0),{onToastAdd:j,onToastRemove:F}=y,U=ii(()=>{var x;(b==null?void 0:b.contains(document.activeElement))&&((x=y.viewport)===null||x===void 0||x.focus()),o()}),V=m.useCallback(x=>{!x||x===1/0||(window.clearTimeout(T.current),$.current=new Date().getTime(),T.current=window.setTimeout(U,x))},[U]);m.useEffect(()=>{const x=y.viewport;if(x){const S=()=>{V(C.current),c==null||c()},R=()=>{const M=new Date().getTime()-$.current;C.current=C.current-M,window.clearTimeout(T.current),l==null||l()};return x.addEventListener(EM,R),x.addEventListener(SM,S),()=>{x.removeEventListener(EM,R),x.removeEventListener(SM,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(j(),()=>F()),[j,F]);const N=m.useMemo(()=>b?vY(b):null,[b]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(p9e,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(v9e,{scope:r,onClose:U},Kr.createPortal(m.createElement(l9e.ItemSlot,{scope:r},m.createElement(b_e,{asChild:!0,onEscapeKeyDown:Ve(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(vt.li,$e({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:g,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ve(t.onKeyDown,x=>{x.key==="Escape"&&(a==null||a(x.nativeEvent),x.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Ve(t.onPointerDown,x=>{x.button===0&&(w.current={x:x.clientX,y:x.clientY})}),onPointerMove:Ve(t.onPointerMove,x=>{if(!w.current)return;const S=x.clientX-w.current.x,R=x.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,B=_?I(0,S):0,D=_?0:I(0,R),A=x.pointerType==="touch"?10:2,L={x:B,y:D},G={originalEvent:x,delta:L};M?(E.current=L,Gm(u9e,u,G,{discrete:!1})):kM(L,y.swipeDirection,A)?(E.current=L,Gm(f9e,f,G,{discrete:!1}),x.target.setPointerCapture(x.pointerId)):(Math.abs(S)>A||Math.abs(R)>A)&&(w.current=null)}),onPointerUp:Ve(t.onPointerUp,x=>{const S=E.current,R=x.target;if(R.hasPointerCapture(x.pointerId)&&R.releasePointerCapture(x.pointerId),E.current=null,w.current=null,S){const M=x.currentTarget,_={originalEvent:x,delta:S};kM(S,y.swipeDirection,y.swipeThreshold)?Gm(h9e,h,_,{discrete:!0}):Gm(d9e,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});m9e.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Rx}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const p9e=t=>{const{__scopeToast:e,children:r,...n}=t,s=dY(Rx,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return C9e(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(rPe,{asChild:!0},m.createElement(sY,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},g9e="ToastAction",b9e=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(hY,{altText:r,asChild:!0},m.createElement(x9e,$e({},n,{ref:e}))):null});b9e.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${g9e}\``)}};const w9e="ToastClose",x9e=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=y9e(w9e,r);return m.createElement(hY,{asChild:!0},m.createElement(vt.button,$e({type:"button"},n,{ref:e,onClick:Ve(t.onClick,s.onClose)})))}),hY=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(vt.div,$e({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function vY(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),E9e(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...vY(n))}}),e}function Gm(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?d_(s,i):s.dispatchEvent(i)}const kM=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function C9e(t=()=>{}){const e=ii(t);oi(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function E9e(t){return t.nodeType===t.ELEMENT_NODE}yr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var S9e="_15pztn2",k9e="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return se.jsx(Uh,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:Ls(k9e,d&&S9e),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});m.createContext(null);var $9e="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",A9e="bnrrebe",_9e=yr({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:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return se.jsx(dt,{className:Ls(r,_9e({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?se.jsx(NTe,{className:A9e,disableAnimation:n,src:i}):se.jsx(Li,{className:$9e,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Ix,AHe]=Rn("Tooltip",[Vh]);Vh();const P9e="TooltipProvider";Ix(P9e);const yY="Tooltip";Ix(yY);const T9e="TooltipPortal";Ix(T9e,{forceMount:void 0});Ix(yY,{isInside:!1});function jo(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let e=Ke({},(jo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("rect",{width:"28",height:"28"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"})))},R9e=({chains:t})=>({id:"metamask",logoDark:$M,logoLight:$M,name:"Metamask",createConnector:()=>new Y5e({chains:t,options:{shimDisconnect:!0}})}),AM=t=>{let e=Ke({},(jo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),P.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"})))},I9e=({chains:t,options:e})=>({id:"wallet-connect",logoDark:AM,logoLight:AM,name:"Walletconnect",createConnector:()=>new hke({chains:t,options:e})});window.ethereum=window.ethereum||{};class j0 extends c4{constructor({chains:e,options:r={}}){var n,s,i,o;super({chains:e,options:r}),this.id="google",this.name="google",this.ready=!0,this.provider=void 0,this.onAccountsChanged=c=>({account:c[0]}),this.onDisconnect=()=>{this==null||this.emit("disconnect")};const a=(r==null||(n=r.connect)==null||(s=n.settings)==null?void 0:s.signInOptions)||[],l=r==null||(i=r.connect)==null||(o=i.settings)==null?void 0:o.signInWith;if(l)this.id=l,this.name=`${l[0].toUpperCase()}${l.slice(1)}`;else if(a.length>0){const c=a[0],f=`${c[0].toUpperCase()}${c.slice(1)}`;this.id=c,this.name=f}else this.id="email",this.name="Email";this.provider=tG.initWallet({defaultNetwork:r==null?void 0:r.defaultNetwork,transports:{walletAppURL:"https://sequence.app"},defaultEIP6492:!0}),this.provider.on("chainChanged",c=>{this==null||this.emit("change",{chain:{id:uk(c),unsupported:!1}})}),this.provider.on("accountsChanged",c=>{this==null||this.emit("accountsChanged",this.onAccountsChanged(c))}),this.provider.on("disconnect",()=>{this.onDisconnect()})}async connect(){if(!this.provider.isConnected()){var e,r,n;this==null||this.emit("message",{type:"connecting"});const i=(e=this.options)==null?void 0:e.connect,o=localStorage.getItem(Cs.Theme),a=localStorage.getItem(Cs.EthAuthSettings),l=a?JSON.parse(a):{},c=Ke({authorize:!0},l,i,{settings:Ke({theme:o||"dark"},i==null?void 0:i.settings)}),f=await this.provider.connect(c);if(f.error)throw new En(new Error(f.error));if(!f.connected)throw new En(new Error("Wallet connection rejected"));const u=(r=f.proof)==null?void 0:r.proofString,d=(n=f.proof)==null?void 0:n.typedData;if(u){const h=JSON.stringify({proofString:u,typedData:d});localStorage.setItem(Cs.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 O4({chain:r,account:await this.getAccount(),transport:_4(this.provider)})}onChainChanged(e){this.provider.setDefaultChainId(uk(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(Cs.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 uk=t=>typeof t=="object"?uk(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t,_M=t=>{let e=Ke({},(jo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("g",{id:"Frame 2114"},P.createElement("g",{id:"Group"},P.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"}),P.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"}),P.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"}),P.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"})))))},PM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(jo(n),n));return P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.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}))}},O9e=({chains:t,options:e={}})=>({id:"google",isSequenceBased:!0,logoDark:_M,logoLight:_M,miniLogoDark:PM({isDarkMode:!0}),miniLogoLight:PM({isDarkMode:!1}),name:"Google",createConnector:()=>{var r;return new j0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"google"})})})})}}),TM=t=>{let e=Ke({},(jo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),P.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)"}),P.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"}),P.createElement("defs",null,P.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},P.createElement("stop",{"stop-color":"#0062E0"}),P.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},RM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(jo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.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})))}},M9e=({chains:t,options:e={}})=>({id:"facebook",isSequenceBased:!0,logoDark:TM,logoLight:TM,miniLogoDark:RM({isDarkMode:!0}),miniLogoLight:RM({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var r;return new j0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"facebook"})})})})}}),IM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(jo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},s),P.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})))}},OM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(jo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.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}),P.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})))}},D9e=({chains:t,options:e={}})=>({id:"apple",isSequenceBased:!0,logoDark:IM({isDarkMode:!0}),logoLight:IM({isDarkMode:!1}),miniLogoDark:OM({isDarkMode:!0}),miniLogoLight:OM({isDarkMode:!1}),name:"Apple",createConnector:()=>{var r;return new j0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"apple"})})})})}}),MM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(jo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},s),P.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}),P.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})))}},dk="@sequence.kit.connector.email",N9e=({chains:t,options:e={}})=>({id:"email",isSequenceBased:!0,logoDark:MM({isDarkMode:!0}),logoLight:MM({isDarkMode:!1}),name:"Email",createConnector:()=>{var r;const n=localStorage.getItem(dk);return new j0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWithEmail:n||""})})})})}}),Km=({isDarkMode:t})=>{const e=t?"white":"black";return n=>(Ke({},(jo(n),n)),P.createElement(P.Fragment,null,P.createElement("svg",{viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P.createElement("g",{id:"discord-icon-svgrepo-com 1",clipPath:"url(#clip0_193_26839)"},P.createElement("path",{id:"Vector",d:"M30.3437 10.9324C28.5312 10.0844 26.5932 9.46812 24.567 9.11719C24.3182 9.56707 24.0275 10.1722 23.8271 10.6535C21.6733 10.3296 19.5392 10.3296 17.425 10.6535C17.2246 10.1722 16.9273 9.56707 16.6763 9.11719C14.6479 9.46812 12.7077 10.0867 10.8952 10.9369C7.23942 16.4613 6.24839 21.8485 6.7439 27.1592C9.16863 28.9699 11.5185 30.0699 13.8287 30.7897C14.3991 30.0047 14.9078 29.1701 15.346 28.2907C14.5114 27.9735 13.712 27.5821 12.9566 27.1277C13.157 26.9793 13.353 26.8241 13.5424 26.6644C18.1496 28.8193 23.1554 28.8193 27.7075 26.6644C27.8991 26.8241 28.0951 26.9793 28.2933 27.1277C27.5357 27.5843 26.7341 27.9757 25.8995 28.2929C26.3377 29.1701 26.8442 30.0069 27.4168 30.7919C29.7292 30.0721 32.0813 28.9722 34.506 27.1592C35.0874 21.0028 33.5128 15.6651 30.3437 10.9324ZM15.9737 23.8932C14.5907 23.8932 13.4565 22.602 13.4565 21.0298C13.4565 19.4575 14.5665 18.1641 15.9737 18.1641C17.381 18.1641 18.5152 19.4552 18.4909 21.0298C18.4931 22.602 17.381 23.8932 15.9737 23.8932ZM25.2762 23.8932C23.8932 23.8932 22.759 22.602 22.759 21.0298C22.759 19.4575 23.8689 18.1641 25.2762 18.1641C26.6835 18.1641 27.8176 19.4552 27.7934 21.0298C27.7934 22.602 26.6835 23.8932 25.2762 23.8932Z",fill:e})),P.createElement("defs",null,P.createElement("clipPath",{id:"clip0_193_26839"},P.createElement("rect",{width:"28",height:"28",fill:e,transform:"translate(6.625 6)"}))))))},L9e=({chains:t,options:e={}})=>({id:"discord",isSequenceBased:!0,logoDark:Km({isDarkMode:!0}),logoLight:Km({isDarkMode:!1}),miniLogoDark:Km({isDarkMode:!0}),miniLogoLight:Km({isDarkMode:!1}),name:"Discord",createConnector:()=>{var r;return new j0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"discord"})})})})}}),j9e=({chains:t,walletConnectProjectId:e,defaultChainId:r})=>{let n=t[0].id;if(r){const i=t.find(o=>o.id===r);i&&(n=i.id)}return FIe([N9e({chains:t,options:{defaultNetwork:n}}),O9e({chains:t,options:{defaultNetwork:n}}),M9e({chains:t,options:{defaultNetwork:n}}),L9e({chains:t,options:{defaultNetwork:n}}),D9e({chains:t,options:{defaultNetwork:n}}),R9e({chains:t}),I9e({chains:t,options:{projectId:e}})])};function x_(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Qm(){}function DM(){return typeof WeakMap<"u"?new WeakMap:F9e()}function F9e(){return{add:Qm,delete:Qm,get:Qm,set:Qm,has:function(t){return!1}}}var B9e=Object.prototype.hasOwnProperty,hk=function(t,e){return B9e.call(t,e)};function v5(t,e){for(var r in e)hk(e,r)&&(t[r]=e[r]);return t}var U9e=/^[ \t]*(?:\r\n|\r|\n)/,z9e=/(?:\r\n|\r|\n)[ \t]*$/,V9e=/^(?:[\r\n]|$)/,q9e=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,W9e=/^[ \t]*[\r\n][ \t\r\n]*$/;function NM(t,e,r){var n=0,s=t[0].match(q9e);s&&(n=s[1].length);var i="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(i,"g");e&&(t=t.slice(1));var a=r.newline,l=r.trimLeadingNewline,c=r.trimTrailingNewline,f=typeof a=="string",u=t.length,d=t.map(function(h,v){return h=h.replace(o,"$1"),v===0&&l&&(h=h.replace(U9e,"")),v===u-1&&c&&(h=h.replace(z9e,"")),f&&(h=h.replace(/\r\n|\n|\r/g,function(y){return a})),h});return d}function H9e(t,e){for(var r="",n=0,s=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Jp=[K9e],Hh=()=>{if(Jp.length<1)throw new Error("No adapter configured");return Jp[Jp.length-1]},pY=!1,Q9e=t=>{pY||Y9e(t)},Y9e=t=>{pY=!0,Jp.push(t)},Ox=function(){return Hh().appendCss(...arguments)},gY=function(){return Hh().registerClassName(...arguments)},J9e=function(){return Hh().registerComposition(...arguments)},bY=function(){return Hh().markCompositionUsed(...arguments)},X9e=function(){return Hh().onEndFileScope(...arguments)},Z9e=function(){var e=Hh();return"getIdentOption"in e?e.getIdentOption(...arguments):"short"},LM,C_=0,Jb=[];function Jf(t,e){C_=0,Jb.unshift({filePath:t,packageName:e})}function Xf(){X9e(Zf()),C_=0,Jb.splice(0,1)}function Zf(){if(Jb.length===0)throw new Error(ao(LM||(LM=x_([` +Defaulting to \`null\`.`}const XQ="Radio",[YTe,ZQ]=In(XQ),[JTe,XTe]=YTe(XQ),ZTe=m.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:i,disabled:o,value:a="on",onCheck:l,...c}=t,[f,u]=m.useState(null),d=Cr(e,y=>u(y)),h=m.useRef(!1),v=f?Boolean(f.closest("form")):!0;return m.createElement(JTe,{scope:r,checked:s,disabled:o},m.createElement(vt.button,$e({type:"button",role:"radio","aria-checked":s,"data-state":eY(s),"data-disabled":o?"":void 0,disabled:o,value:a},c,{ref:d,onClick:Ve(t.onClick,y=>{s||l==null||l(),v&&(h.current=y.isPropagationStopped(),h.current||y.stopPropagation())})})),v&&m.createElement(r7e,{control:f,bubbles:!h.current,name:n,value:a,checked:s,required:i,disabled:o,style:{transform:"translateX(-100%)"}}))}),e7e="RadioIndicator",t7e=m.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,i=XTe(e7e,r);return m.createElement(wx,{present:n||i.checked},m.createElement(vt.span,$e({"data-state":eY(i.checked),"data-disabled":i.disabled?"":void 0},s,{ref:e})))}),r7e=t=>{const{control:e,checked:r,bubbles:n=!0,...s}=t,i=m.useRef(null),o=u_(r),a=d_(e);return m.useEffect(()=>{const l=i.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(o!==r&&u){const d=new Event("click",{bubbles:n});u.call(l,r),l.dispatchEvent(d)}},[o,r,n]),m.createElement("input",$e({type:"radio","aria-hidden":!0,defaultChecked:r},s,{tabIndex:-1,ref:i,style:{...t.style,...a,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function eY(t){return t?"checked":"unchecked"}const n7e=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],tY="RadioGroup",[s7e,wHe]=In(tY,[Wh,ZQ]),rY=Wh(),nY=ZQ(),[i7e,o7e]=s7e(tY),a7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:u,...d}=t,h=rY(r),v=v_(c),[y,g]=zy({prop:i,defaultProp:s,onChange:u});return m.createElement(i7e,{scope:r,name:n,required:o,disabled:a,value:y,onValueChange:g},m.createElement(mPe,$e({asChild:!0},h,{orientation:l,dir:v,loop:f}),m.createElement(vt.div,$e({role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v},d,{ref:e}))))}),l7e="RadioGroupItem",c7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,i=o7e(l7e,r),o=i.disabled||n,a=rY(r),l=nY(r),c=m.useRef(null),f=Cr(e,c),u=i.value===s.value,d=m.useRef(!1);return m.useEffect(()=>{const h=y=>{n7e.includes(y.key)&&(d.current=!0)},v=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),m.createElement(AQ,$e({asChild:!0},a,{focusable:!o,active:u}),m.createElement(ZTe,$e({disabled:o,required:i.required,checked:u},l,s,{name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:Ve(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ve(s.onFocus,()=>{var h;d.current&&((h=c.current)===null||h===void 0||h.click())})})))}),f7e=m.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=nY(r);return m.createElement(t7e,$e({},s,n,{ref:e}))}),u7e=a7e,d7e=c7e,h7e=f7e;var v7e=yr({defaultClassName:"io59uy8 io59uy7 fyvr11h0 fyvr11ko fyvr11jg fyvr11hw fyvr128 fyvr15o fyvr12sh",variantClassNames:{size:{sm:"io59uy9",lg:"io59uya"}},defaultVariants:{},compoundVariants:[]}),y7e=yr({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 m7e=t=>{const{id:e,label:r,size:n="sm",value:s,disabled:i}=t;return se.jsx(dt,{alignItems:"center",children:se.jsx(zh,{disabled:i,display:"flex",id:e,label:r,labelLocation:"right",children:se.jsx(d7e,{className:y7e({size:n}),value:s,id:e,disabled:i,children:se.jsx(h7e,{className:v7e({size:n})})})})})};m.forwardRef((t,e)=>{const{flexDirection:r="column",disabled:n=!1,gap:s="2",name:i,options:o,size:a="sm",...l}=t;return se.jsx(u7e,{disabled:n,name:i,ref:e,...l,children:se.jsx(dt,{flexDirection:r,gap:s,children:o.map(({label:c,value:f,disabled:u})=>se.jsx(m7e,{id:`${i}-${f}`,label:c,size:a,value:f,disabled:u},f))})})});function xM(t,[e,r]){return Math.min(r,Math.max(e,t))}const sY=m.forwardRef((t,e)=>m.createElement(vt.span,$e({},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}}))),p7e=[" ","Enter","ArrowUp","ArrowDown"],g7e=[" ","Enter"],Px="Select",[Tx,w_,b7e]=Ex(Px),[Hh,xHe]=In(Px,[b7e,qh]),x_=qh(),[w7e,Jf]=Hh(Px),[x7e,C7e]=Hh(Px),E7e=t=>{const{__scopeSelect:e,children:r,open:n,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h}=t,v=x_(e),[y,g]=m.useState(null),[b,p]=m.useState(null),[w,E]=m.useState(!1),k=v_(c),[$=!1,x]=zy({prop:n,defaultProp:s,onChange:i}),[T,B]=zy({prop:o,defaultProp:a,onChange:l}),L=m.useRef(null),U=y?Boolean(y.closest("form")):!0,[V,N]=m.useState(new Set),C=Array.from(V).map(S=>S.props.value).join(";");return m.createElement(Z_e,v,m.createElement(w7e,{required:h,scope:e,trigger:y,onTriggerChange:g,valueNode:b,onValueNodeChange:p,valueNodeHasChildren:w,onValueNodeHasChildrenChange:E,contentId:Cx(),value:T,onValueChange:B,open:$,onOpenChange:x,dir:k,triggerPointerDownPosRef:L,disabled:d},m.createElement(Tx.Provider,{scope:e},m.createElement(x7e,{scope:t.__scopeSelect,onNativeOptionAdd:m.useCallback(S=>{N(R=>new Set(R).add(S))},[]),onNativeOptionRemove:m.useCallback(S=>{N(R=>{const M=new Set(R);return M.delete(S),M})},[])},r)),U?m.createElement(oY,{key:C,"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:T,onChange:S=>B(S.target.value),disabled:d},T===void 0?m.createElement("option",{value:""}):null,Array.from(V)):null))},S7e="SelectTrigger",k7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:n=!1,...s}=t,i=x_(r),o=Jf(S7e,r),a=o.disabled||n,l=Cr(e,o.onTriggerChange),c=w_(r),[f,u,d]=aY(v=>{const y=c().filter(p=>!p.disabled),g=y.find(p=>p.value===o.value),b=lY(y,v,g);b!==void 0&&o.onValueChange(b.value)}),h=()=>{a||(o.onOpenChange(!0),d())};return m.createElement(ePe,$e({asChild:!0},i),m.createElement(vt.button,$e({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":o.value===void 0?"":void 0},s,{ref:l,onClick:Ve(s.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Ve(s.onPointerDown,v=>{const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(h(),o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Ve(s.onKeyDown,v=>{const y=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&u(v.key),!(y&&v.key===" ")&&p7e.includes(v.key)&&(h(),v.preventDefault())})})))}),$7e="SelectValue",A7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,children:i,placeholder:o,...a}=t,l=Jf($7e,r),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,u=Cr(e,l.onValueNodeChange);return ai(()=>{c(f)},[c,f]),m.createElement(vt.span,$e({},a,{ref:u,style:{pointerEvents:"none"}}),l.value===void 0&&o!==void 0?o:i)}),_7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,children:n,...s}=t;return m.createElement(vt.span,$e({"aria-hidden":!0},s,{ref:e}),n||"▼")}),ih="SelectContent",P7e=m.forwardRef((t,e)=>{const r=Jf(ih,t.__scopeSelect),[n,s]=m.useState();if(ai(()=>{s(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(m.createElement(iY,{scope:t.__scopeSelect},m.createElement(Tx.Slot,{scope:t.__scopeSelect},m.createElement("div",null,t.children))),i):null}return m.createElement(T7e,$e({},t,{ref:e}))}),Ko=10,[iY,Rx]=Hh(ih),T7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g,...b}=t,p=Jf(ih,r),[w,E]=m.useState(null),[k,$]=m.useState(null),x=Cr(e,z=>E(z)),[T,B]=m.useState(null),[L,U]=m.useState(null),V=w_(r),[N,C]=m.useState(!1),S=m.useRef(!1);m.useEffect(()=>{if(w)return wPe(w)},[w]),w_e();const R=m.useCallback(z=>{const[H,...J]=V().map(Q=>Q.ref.current),[X]=J.slice(-1),K=document.activeElement;for(const Q of z)if(Q===K||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===H&&k&&(k.scrollTop=0),Q===X&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==K))return},[V,k]),M=m.useCallback(()=>R([T,w]),[R,T,w]);m.useEffect(()=>{N&&M()},[N,M]);const{onOpenChange:_,triggerPointerDownPosRef:I}=p;m.useEffect(()=>{if(w){let z={x:0,y:0};const H=X=>{var K,Q,ae,ie;z={x:Math.abs(Math.round(X.pageX)-((K=(Q=I.current)===null||Q===void 0?void 0:Q.x)!==null&&K!==void 0?K:0)),y:Math.abs(Math.round(X.pageY)-((ae=(ie=I.current)===null||ie===void 0?void 0:ie.y)!==null&&ae!==void 0?ae:0))}},J=X=>{z.x<=10&&z.y<=10?X.preventDefault():w.contains(X.target)||_(!1),document.removeEventListener("pointermove",H),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",H),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",H),document.removeEventListener("pointerup",J,{capture:!0})}}},[w,_,I]),m.useEffect(()=>{const z=()=>_(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[_]);const[F,D]=aY(z=>{const H=V().filter(K=>!K.disabled),J=H.find(K=>K.ref.current===document.activeElement),X=lY(H,z,J);X&&setTimeout(()=>X.ref.current.focus())}),A=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&(B(z),X&&(S.current=!0))},[p.value]),j=m.useCallback(()=>w==null?void 0:w.focus(),[w]),G=m.useCallback((z,H,J)=>{const X=!S.current&&!J;(p.value!==void 0&&p.value===H||X)&&U(z)},[p.value]),O=n==="popper"?CM:R7e,q=O===CM?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:v,hideWhenDetached:y,avoidCollisions:g}:{};return m.createElement(iY,{scope:r,content:w,viewport:k,onViewportChange:$,itemRefCallback:A,selectedItem:T,onItemLeave:j,itemTextRefCallback:G,focusSelectedItem:M,selectedItemText:L,position:n,isPositioned:N,searchRef:F},m.createElement(tTe,{as:Vy,allowPinchZoom:!0},m.createElement(x_e,{asChild:!0,trapped:p.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:Ve(s,z=>{var H;(H=p.trigger)===null||H===void 0||H.focus({preventScroll:!0}),z.preventDefault()})},m.createElement(iQ,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>p.onOpenChange(!1)},m.createElement(O,$e({role:"listbox",id:p.contentId,"data-state":p.open?"open":"closed",dir:p.dir,onContextMenu:z=>z.preventDefault()},b,q,{onPlaced:()=>C(!0),ref:x,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Ve(b.onKeyDown,z=>{const H=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!H&&z.key.length===1&&D(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let X=V().filter(K=>!K.disabled).map(K=>K.ref.current);if(["ArrowUp","End"].includes(z.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const K=z.target,Q=X.indexOf(K);X=X.slice(Q+1)}setTimeout(()=>R(X)),z.preventDefault()}})}))))))}),R7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:n,...s}=t,i=Jf(ih,r),o=Rx(ih,r),[a,l]=m.useState(null),[c,f]=m.useState(null),u=Cr(e,x=>f(x)),d=w_(r),h=m.useRef(!1),v=m.useRef(!0),{viewport:y,selectedItem:g,selectedItemText:b,focusSelectedItem:p}=o,w=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&y&&g&&b){const x=i.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),B=i.valueNode.getBoundingClientRect(),L=b.getBoundingClientRect();if(i.dir!=="rtl"){const K=L.left-T.left,Q=B.left-K,ae=x.left-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Ko,ke=xM(Q,[Ko,st-ue]);a.style.minWidth=ie+"px",a.style.left=ke+"px"}else{const K=T.right-L.right,Q=window.innerWidth-B.right-K,ae=window.innerWidth-x.right-Q,ie=x.width+ae,ue=Math.max(ie,T.width),st=window.innerWidth-Ko,ke=xM(Q,[Ko,st-ue]);a.style.minWidth=ie+"px",a.style.right=ke+"px"}const U=d(),V=window.innerHeight-Ko*2,N=y.scrollHeight,C=window.getComputedStyle(c),S=parseInt(C.borderTopWidth,10),R=parseInt(C.paddingTop,10),M=parseInt(C.borderBottomWidth,10),_=parseInt(C.paddingBottom,10),I=S+R+N+_+M,F=Math.min(g.offsetHeight*5,I),D=window.getComputedStyle(y),A=parseInt(D.paddingTop,10),j=parseInt(D.paddingBottom,10),G=x.top+x.height/2-Ko,O=V-G,q=g.offsetHeight/2,z=g.offsetTop+q,H=S+R+z,J=I-H;if(H<=G){const K=g===U[U.length-1].ref.current;a.style.bottom="0px";const Q=c.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(O,q+(K?j:0)+Q+M),ie=H+ae;a.style.height=ie+"px"}else{const K=g===U[0].ref.current;a.style.top="0px";const ae=Math.max(G,S+y.offsetTop+(K?A:0)+q)+J;a.style.height=ae+"px",y.scrollTop=H-G+y.offsetTop}a.style.margin=`${Ko}px 0`,a.style.minHeight=F+"px",a.style.maxHeight=V+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,y,g,b,i.dir,n]);ai(()=>w(),[w]);const[E,k]=m.useState();ai(()=>{c&&k(window.getComputedStyle(c).zIndex)},[c]);const $=m.useCallback(x=>{x&&v.current===!0&&(w(),p==null||p(),v.current=!1)},[w,p]);return m.createElement(I7e,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:$},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E}},m.createElement(vt.div,$e({},s,{ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))}),CM=m.forwardRef((t,e)=>{const{__scopeSelect:r,align:n="start",collisionPadding:s=Ko,...i}=t,o=x_(r);return m.createElement(tPe,$e({},o,i,{ref:e,align:n,collisionPadding:s,style:{boxSizing:"border-box",...i.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)"}}))}),[I7e,O7e]=Hh(ih,{}),EM="SelectViewport",M7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Rx(EM,r),i=O7e(EM,r),o=Cr(e,s.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.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}"}}),m.createElement(Tx.Slot,{scope:r},m.createElement(vt.div,$e({"data-radix-select-viewport":"",role:"presentation"},n,{ref:o,style:{position:"relative",flex:1,overflow:"auto",...n.style},onScroll:Ve(n.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:u}=i;if(u!=null&&u.current&&f){const d=Math.abs(a.current-c.scrollTop);if(d>0){const h=window.innerHeight-Ko*2,v=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),g=Math.max(v,y);if(g0?w:0,f.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),D7e="SelectGroup",[N7e,CHe]=Hh(D7e),L7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,...n}=t,s=Cx();return m.createElement(N7e,{scope:r,id:s},m.createElement(vt.div,$e({role:"group","aria-labelledby":s},n,{ref:e})))}),uk="SelectItem",[j7e,F7e]=Hh(uk),B7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,value:n,disabled:s=!1,textValue:i,...o}=t,a=Jf(uk,r),l=Rx(uk,r),c=a.value===n,[f,u]=m.useState(i??""),[d,h]=m.useState(!1),v=Cr(e,b=>{var p;return(p=l.itemRefCallback)===null||p===void 0?void 0:p.call(l,b,n,s)}),y=Cx(),g=()=>{s||(a.onValueChange(n),a.onOpenChange(!1))};return m.createElement(j7e,{scope:r,value:n,disabled:s,textId:y,isSelected:c,onItemTextChange:m.useCallback(b=>{u(p=>{var w;return p||((w=b==null?void 0:b.textContent)!==null&&w!==void 0?w:"").trim()})},[])},m.createElement(Tx.ItemSlot,{scope:r,value:n,disabled:s,textValue:f},m.createElement(vt.div,$e({role:"option","aria-labelledby":y,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1},o,{ref:v,onFocus:Ve(o.onFocus,()=>h(!0)),onBlur:Ve(o.onBlur,()=>h(!1)),onPointerUp:Ve(o.onPointerUp,g),onPointerMove:Ve(o.onPointerMove,b=>{if(s){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}else b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(o.onPointerLeave,b=>{if(b.currentTarget===document.activeElement){var p;(p=l.onItemLeave)===null||p===void 0||p.call(l)}}),onKeyDown:Ve(o.onKeyDown,b=>{var p;((p=l.searchRef)===null||p===void 0?void 0:p.current)!==""&&b.key===" "||(g7e.includes(b.key)&&g(),b.key===" "&&b.preventDefault())})}))))}),Gm="SelectItemText",U7e=m.forwardRef((t,e)=>{const{__scopeSelect:r,className:n,style:s,...i}=t,o=Jf(Gm,r),a=Rx(Gm,r),l=F7e(Gm,r),c=C7e(Gm,r),[f,u]=m.useState(null),d=Cr(e,b=>u(b),l.onItemTextChange,b=>{var p;return(p=a.itemTextRefCallback)===null||p===void 0?void 0:p.call(a,b,l.value,l.disabled)}),h=f==null?void 0:f.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},h),[l.disabled,l.value,h]),{onNativeOptionAdd:y,onNativeOptionRemove:g}=c;return ai(()=>(y(v),()=>g(v)),[y,g,v]),m.createElement(m.Fragment,null,m.createElement(vt.span,$e({id:l.textId},i,{ref:d})),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Kr.createPortal(i.children,o.valueNode):null)}),oY=m.forwardRef((t,e)=>{const{value:r,...n}=t,s=m.useRef(null),i=Cr(e,s),o=u_(r);return m.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==r&&f){const u=new Event("change",{bubbles:!0});f.call(a,r),a.dispatchEvent(u)}},[o,r]),m.createElement(sY,{asChild:!0},m.createElement("select",$e({},n,{ref:i,defaultValue:r})))});oY.displayName="BubbleSelect";function aY(t){const e=oi(t),r=m.useRef(""),n=m.useRef(0),s=m.useCallback(o=>{const a=r.current+o;e(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=m.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,s,i]}function lY(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=r?t.indexOf(r):-1;let o=z7e(t,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==r));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function z7e(t,e){return t.map((r,n)=>t[(e+n)%t.length])}const V7e=E7e,q7e=k7e,W7e=A7e,H7e=_7e,G7e=P7e,K7e=M7e,Q7e=L7e,Y7e=B7e,J7e=U7e;var X7e="gohwuma fyvr11d0 fyvr11do fyvr11bo fyvr11cc fyvr11ls fyvr11m8 fyvr11ms fyvr11rh fyvr12sh fyvr11nj",Z7e="gohwume _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1ww fyvr1ys fyvr1t0 fyvr1uw fyvr12wk fyvr12wl fyvr12we fyvr12wf fyvr11h0 fyvr11jw fyvr11ko fyvr12uz fyvr12uv fyvr12sh fyvr12vt fyvr12vj",e9e="gohwum1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr11hc fyvr11f4 fyvr12sh fyvr118c fyvr11jw fyvr11n2 fyvr12uz",t9e=yr({defaultClassName:"gohwum5",variantClassNames:{borderRadius:{xs:"fyvr11cw fyvr11dk fyvr11bk fyvr11c8",sm:"fyvr11d0 fyvr11do fyvr11bo fyvr11cc",md:"fyvr11d4 fyvr11ds fyvr11bs fyvr11cg"}},defaultVariants:{},compoundVariants:[]});const r9e=m.forwardRef(({children:t,className:e,...r},n)=>se.jsx(Y7e,{className:js(Z7e,e),...r,ref:n,children:se.jsx(J7e,{children:t})}));m.forwardRef((t,e)=>{const{borderRadius:r="md",disabled:n=!1,id:s,label:i="",description:o,labelLocation:a="hidden",name:l,options:c,placeholder:f,...u}=t;return se.jsx(zh,{disabled:n,display:"grid",id:s??l,label:i,labelLocation:a,description:o,whiteSpace:"nowrap",children:se.jsxs(V7e,{disabled:n,name:l,...u,children:[se.jsxs(q7e,{id:s??l,className:js(e9e,t9e({borderRadius:r})),ref:e,children:[se.jsx(W7e,{placeholder:f}),se.jsx(dt,{as:H7e,display:"inline-flex",children:se.jsx(r_e,{})})]}),se.jsx(G7e,{className:X7e,children:se.jsx(K7e,{children:se.jsx(Q7e,{children:c.map(({value:d,label:h,...v})=>se.jsx(r9e,{value:d,...v,children:h},d))})})})]})})});m.forwardRef((t,e)=>{const{controls:r,onChange:n,placeholder:s="Search",name:i="search",value:o,...a}=t,l=o?se.jsx(HQ,{icon:nQ,size:"xs",onClick:()=>n==null?void 0:n({target:{value:""}})}):void 0;return se.jsx(QQ,{ref:e,name:i,leftIcon:i_e,controls:r||l,placeholder:s,value:o,onChange:c=>n==null?void 0:n(c),...a})});var n9e=yr({defaultClassName:"en4abt1",variantClassNames:{size:{sm:"en4abt2",md:"en4abt3",lg:"en4abt4"}},defaultVariants:{},compoundVariants:[]});m.forwardRef((t,e)=>{const{size:r="md",...n}=t;return se.jsx(dt,{className:n9e({size:r}),color:"text50",ref:e,...n,children:se.jsxs("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",children:[se.jsx("circle",{cx:"12",cy:"12",fill:"none",r:"10.5",strokeDasharray:"42",strokeLinecap:"round"}),se.jsx("circle",{cx:"12",cy:"12",fill:"none",opacity:"0.25",r:"10.5",strokeLinecap:"round"})]})})});m.forwardRef(({children:t},e)=>se.jsx(dt,{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 cY="Switch",[s9e,EHe]=In(cY);s9e(cY);yr({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 fY="Tabs",[i9e,SHe]=In(fY,[Wh]);Wh();i9e(fY);var o9e="_1qxj1ib9 fyvr11mv fyvr11e8 fyvr11fw fyvr11fs fyvr11fc fyvr11cw fyvr11dk fyvr11bk fyvr11c8 fyvr1wo fyvr1yk fyvr1ss fyvr1uo fyvr11hc fyvr118c fyvr11n7";m.forwardRef((t,e)=>{const{icon:r,label:n,...s}=t;return se.jsxs(dt,{className:o9e,ref:e,background:"buttonGlass",...s,children:[r&&se.jsx(r,{size:"xs"}),se.jsx(ji,{children:n})]})});const a9e="ToastProvider",[l9e,kHe,c9e]=Ex("Toast"),[uY,$He]=In("Toast",[c9e]),[AHe,dY]=uY(a9e),SM="toast.viewportPause",kM="toast.viewportResume",Ix="Toast",f9e="toast.swipeStart",u9e="toast.swipeMove",d9e="toast.swipeCancel",h9e="toast.swipeEnd",[v9e,y9e]=uY(Ix,{onClose(){}}),m9e=m.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:f,onSwipeMove:u,onSwipeCancel:d,onSwipeEnd:h,...v}=t,y=dY(Ix,r),[g,b]=m.useState(null),p=Cr(e,C=>b(C)),w=m.useRef(null),E=m.useRef(null),k=s||y.duration,$=m.useRef(0),x=m.useRef(k),T=m.useRef(0),{onToastAdd:B,onToastRemove:L}=y,U=oi(()=>{var C;(g==null?void 0:g.contains(document.activeElement))&&((C=y.viewport)===null||C===void 0||C.focus()),o()}),V=m.useCallback(C=>{!C||C===1/0||(window.clearTimeout(T.current),$.current=new Date().getTime(),T.current=window.setTimeout(U,C))},[U]);m.useEffect(()=>{const C=y.viewport;if(C){const S=()=>{V(x.current),c==null||c()},R=()=>{const M=new Date().getTime()-$.current;x.current=x.current-M,window.clearTimeout(T.current),l==null||l()};return C.addEventListener(SM,R),C.addEventListener(kM,S),()=>{C.removeEventListener(SM,R),C.removeEventListener(kM,S)}}},[y.viewport,k,l,c,V]),m.useEffect(()=>{i&&!y.isClosePausedRef.current&&V(k)},[i,k,y.isClosePausedRef,V]),m.useEffect(()=>(B(),()=>L()),[B,L]);const N=m.useMemo(()=>g?vY(g):null,[g]);return y.viewport?m.createElement(m.Fragment,null,N&&m.createElement(p9e,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0},N),m.createElement(v9e,{scope:r,onClose:U},Kr.createPortal(m.createElement(l9e.ItemSlot,{scope:r},m.createElement(b_e,{asChild:!0,onEscapeKeyDown:Ve(a,()=>{y.isFocusedToastEscapeKeyDownRef.current||U(),y.isFocusedToastEscapeKeyDownRef.current=!1})},m.createElement(vt.li,$e({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection},v,{ref:p,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Ve(t.onKeyDown,C=>{C.key==="Escape"&&(a==null||a(C.nativeEvent),C.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:Ve(t.onPointerDown,C=>{C.button===0&&(w.current={x:C.clientX,y:C.clientY})}),onPointerMove:Ve(t.onPointerMove,C=>{if(!w.current)return;const S=C.clientX-w.current.x,R=C.clientY-w.current.y,M=Boolean(E.current),_=["left","right"].includes(y.swipeDirection),I=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,F=_?I(0,S):0,D=_?0:I(0,R),A=C.pointerType==="touch"?10:2,j={x:F,y:D},G={originalEvent:C,delta:j};M?(E.current=j,Km(u9e,u,G,{discrete:!1})):$M(j,y.swipeDirection,A)?(E.current=j,Km(f9e,f,G,{discrete:!1}),C.target.setPointerCapture(C.pointerId)):(Math.abs(S)>A||Math.abs(R)>A)&&(w.current=null)}),onPointerUp:Ve(t.onPointerUp,C=>{const S=E.current,R=C.target;if(R.hasPointerCapture(C.pointerId)&&R.releasePointerCapture(C.pointerId),E.current=null,w.current=null,S){const M=C.currentTarget,_={originalEvent:C,delta:S};$M(S,y.swipeDirection,y.swipeThreshold)?Km(h9e,h,_,{discrete:!0}):Km(d9e,d,_,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})))),y.viewport))):null});m9e.propTypes={type(t){if(t.type&&!["foreground","background"].includes(t.type)){const e=`Invalid prop \`type\` supplied to \`${Ix}\`. Expected \`foreground | background\`.`;return new Error(e)}return null}};const p9e=t=>{const{__scopeToast:e,children:r,...n}=t,s=dY(Ix,e),[i,o]=m.useState(!1),[a,l]=m.useState(!1);return C9e(()=>o(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:m.createElement(rPe,{asChild:!0},m.createElement(sY,n,i&&m.createElement(m.Fragment,null,s.label," ",r)))},g9e="ToastAction",b9e=m.forwardRef((t,e)=>{const{altText:r,...n}=t;return r?m.createElement(hY,{altText:r,asChild:!0},m.createElement(x9e,$e({},n,{ref:e}))):null});b9e.propTypes={altText(t){return t.altText?null:new Error(`Missing prop \`altText\` expected on \`${g9e}\``)}};const w9e="ToastClose",x9e=m.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=y9e(w9e,r);return m.createElement(hY,{asChild:!0},m.createElement(vt.button,$e({type:"button"},n,{ref:e,onClick:Ve(t.onClick,s.onClose)})))}),hY=m.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return m.createElement(vt.div,$e({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0},s,{ref:e}))});function vY(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),E9e(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...vY(n))}}),e}function Km(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?h_(s,i):s.dispatchEvent(i)}const $M=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function C9e(t=()=>{}){const e=oi(t);ai(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function E9e(t){return t.nodeType===t.ELEMENT_NODE}yr({defaultClassName:"_6wut8v3",variantClassNames:{variant:{normal:"_6wut8v4",success:"_6wut8v5",error:"_6wut8v6"}},defaultVariants:{},compoundVariants:[]});m.createContext(null);var S9e="_15pztn2",k9e="_15pztn1 _1qxj1ib9 fyvr11mv fyvr11eg fyvr11g0 fyvr11fs fyvr11f0 fyvr11d4 fyvr11ds fyvr11bs fyvr11cg fyvr1t4 fyvr1v0 fyvr1ww fyvr1ys fyvr11ko fyvr11ob fyvr12sh fyvr128 fyvr11h0";m.forwardRef((t,e)=>{const{as:r="textarea",autoComplete:n="off",borderRadius:s="md",description:i,disabled:o=!1,id:a,label:l="",labelLocation:c="hidden",name:f,rows:u,resize:d=!1,...h}=t;return se.jsx(zh,{description:i,disabled:o,display:"grid",id:a??f,label:l,labelLocation:c,children:se.jsx(dt,{as:r,autoComplete:n,spellCheck:"false",className:js(k9e,d&&S9e),disabled:o,id:a??f,name:f,ref:e,rows:u,borderRadius:s,...h})})});m.createContext(null);var $9e="bnrrebg fyvr11dc fyvr11e0 fyvr11c0 fyvr11co fyvr11ls fyvr11m8 fyvr11jg fyvr11ko fyvr11pt fyvr128 fyvr15o fyvr11h0",A9e="bnrrebe",_9e=yr({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:[]});m.memo(t=>{const{borderRadius:e="circle",className:r,disableAnimation:n=!1,style:s,src:i,symbol:o,size:a="md",...l}=t;return se.jsx(dt,{className:js(r,_9e({borderRadius:e,size:a})),style:s,flexShrink:"0",...l,children:i?se.jsx(NTe,{className:A9e,disableAnimation:n,src:i}):se.jsx(ji,{className:$9e,variant:"normal",fontWeight:"medium",color:"text50",uppercase:!0,children:o==null?void 0:o.replace(/\s/,"").slice(0,4)})})});const[Ox,_He]=In("Tooltip",[qh]);qh();const P9e="TooltipProvider";Ox(P9e);const yY="Tooltip";Ox(yY);const T9e="TooltipPortal";Ox(T9e,{forceMount:void 0});Ox(yY,{isInside:!1});function Fo(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function Ke(){return Ke=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("rect",{width:"28",height:"28"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"}),P.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"})))},R9e=({chains:t})=>({id:"metamask",logoDark:AM,logoLight:AM,name:"Metamask",createConnector:()=>new Y5e({chains:t,options:{shimDisconnect:!0}})}),_M=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({fill:"none",viewBox:"0 0 480 332",xmlns:"http://www.w3.org/2000/svg"},e),P.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"})))},I9e=({chains:t,options:e})=>({id:"wallet-connect",logoDark:_M,logoLight:_M,name:"Walletconnect",createConnector:()=>new hke({chains:t,options:e})});window.ethereum=window.ethereum||{};class F0 extends V${constructor({chains:e,options:r={}}){var n,s,i,o;super({chains:e,options:r}),this.id="google",this.name="google",this.ready=!0,this.provider=void 0,this.onAccountsChanged=c=>({account:c[0]}),this.onDisconnect=()=>{this==null||this.emit("disconnect")};const a=(r==null||(n=r.connect)==null||(s=n.settings)==null?void 0:s.signInOptions)||[],l=r==null||(i=r.connect)==null||(o=i.settings)==null?void 0:o.signInWith;if(l)this.id=l,this.name=`${l[0].toUpperCase()}${l.slice(1)}`;else if(a.length>0){const c=a[0],f=`${c[0].toUpperCase()}${c.slice(1)}`;this.id=c,this.name=f}else this.id="email",this.name="Email";this.provider=tG.initWallet({defaultNetwork:r==null?void 0:r.defaultNetwork,transports:{walletAppURL:"https://sequence.app"},defaultEIP6492:!0}),this.provider.on("chainChanged",c=>{this==null||this.emit("change",{chain:{id:dk(c),unsupported:!1}})}),this.provider.on("accountsChanged",c=>{this==null||this.emit("accountsChanged",this.onAccountsChanged(c))}),this.provider.on("disconnect",()=>{this.onDisconnect()})}async connect(){if(!this.provider.isConnected()){var e,r,n;this==null||this.emit("message",{type:"connecting"});const i=(e=this.options)==null?void 0:e.connect,o=localStorage.getItem(Es.Theme),a=localStorage.getItem(Es.EthAuthSettings),l=a?JSON.parse(a):{},c=Ke({authorize:!0},l,i,{settings:Ke({theme:o||"dark"},i==null?void 0:i.settings)}),f=await this.provider.connect(c);if(f.error)throw new Sn(new Error(f.error));if(!f.connected)throw new Sn(new Error("Wallet connection rejected"));const u=(r=f.proof)==null?void 0:r.proofString,d=(n=f.proof)==null?void 0:n.typedData;if(u){const h=JSON.stringify({proofString:u,typedData:d});localStorage.setItem(Es.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 h4({chain:r,account:await this.getAccount(),transport:l4(this.provider)})}onChainChanged(e){this.provider.setDefaultChainId(dk(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(Es.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 dk=t=>typeof t=="object"?dk(t.chainId):typeof t=="string"?Number.parseInt(t,t.trim().substring(0,2)==="0x"?16:10):typeof t=="bigint"?Number(t):t,PM=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),P.createElement("g",{id:"Frame 2114"},P.createElement("g",{id:"Group"},P.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"}),P.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"}),P.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"}),P.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"})))))},TM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.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}))}},O9e=({chains:t,options:e={}})=>({id:"google",isSequenceBased:!0,logoDark:PM,logoLight:PM,miniLogoDark:TM({isDarkMode:!0}),miniLogoLight:TM({isDarkMode:!1}),name:"Google",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"google"})})})})}}),RM=t=>{let e=Ke({},(Fo(t),t));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},e),P.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)"}),P.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"}),P.createElement("defs",null,P.createElement("linearGradient",{id:"paint0_linear_193_14528",x1:"20.2508",y1:"35.9507",x2:"20.2508",y2:"2.85086",gradientUnits:"userSpaceOnUse"},P.createElement("stop",{"stop-color":"#0062E0"}),P.createElement("stop",{offset:"1","stop-color":"#19AFFF"})))))},IM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.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})))}},M9e=({chains:t,options:e={}})=>({id:"facebook",isSequenceBased:!0,logoDark:RM,logoLight:RM,miniLogoDark:IM({isDarkMode:!0}),miniLogoLight:IM({isDarkMode:!1}),name:"Facebook",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"facebook"})})})})}}),OM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 29 34",fill:"none"},s),P.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})))}},MM=({isDarkMode:t})=>{const e=t?"#FFFFFF":"#000000";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 41 40",fill:"none"},s),P.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}),P.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})))}},D9e=({chains:t,options:e={}})=>({id:"apple",isSequenceBased:!0,logoDark:OM({isDarkMode:!0}),logoLight:OM({isDarkMode:!1}),miniLogoDark:MM({isDarkMode:!0}),miniLogoLight:MM({isDarkMode:!1}),name:"Apple",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"apple"})})})})}}),DM=({isDarkMode:t})=>{const e=t?"white":"black";return n=>{let s=Ke({},(Fo(n),n));return P.createElement(P.Fragment,null,P.createElement("svg",Ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 34",fill:"none"},s),P.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}),P.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})))}},hk="@sequence.kit.connector.email",N9e=({chains:t,options:e={}})=>({id:"email",isSequenceBased:!0,logoDark:DM({isDarkMode:!0}),logoLight:DM({isDarkMode:!1}),name:"Email",createConnector:()=>{var r;const n=localStorage.getItem(hk);return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWithEmail:n||""})})})})}}),Qm=({isDarkMode:t})=>{const e=t?"white":"black";return n=>(Ke({},(Fo(n),n)),P.createElement(P.Fragment,null,P.createElement("svg",{viewBox:"0 0 41 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P.createElement("g",{id:"discord-icon-svgrepo-com 1",clipPath:"url(#clip0_193_26839)"},P.createElement("path",{id:"Vector",d:"M30.3437 10.9324C28.5312 10.0844 26.5932 9.46812 24.567 9.11719C24.3182 9.56707 24.0275 10.1722 23.8271 10.6535C21.6733 10.3296 19.5392 10.3296 17.425 10.6535C17.2246 10.1722 16.9273 9.56707 16.6763 9.11719C14.6479 9.46812 12.7077 10.0867 10.8952 10.9369C7.23942 16.4613 6.24839 21.8485 6.7439 27.1592C9.16863 28.9699 11.5185 30.0699 13.8287 30.7897C14.3991 30.0047 14.9078 29.1701 15.346 28.2907C14.5114 27.9735 13.712 27.5821 12.9566 27.1277C13.157 26.9793 13.353 26.8241 13.5424 26.6644C18.1496 28.8193 23.1554 28.8193 27.7075 26.6644C27.8991 26.8241 28.0951 26.9793 28.2933 27.1277C27.5357 27.5843 26.7341 27.9757 25.8995 28.2929C26.3377 29.1701 26.8442 30.0069 27.4168 30.7919C29.7292 30.0721 32.0813 28.9722 34.506 27.1592C35.0874 21.0028 33.5128 15.6651 30.3437 10.9324ZM15.9737 23.8932C14.5907 23.8932 13.4565 22.602 13.4565 21.0298C13.4565 19.4575 14.5665 18.1641 15.9737 18.1641C17.381 18.1641 18.5152 19.4552 18.4909 21.0298C18.4931 22.602 17.381 23.8932 15.9737 23.8932ZM25.2762 23.8932C23.8932 23.8932 22.759 22.602 22.759 21.0298C22.759 19.4575 23.8689 18.1641 25.2762 18.1641C26.6835 18.1641 27.8176 19.4552 27.7934 21.0298C27.7934 22.602 26.6835 23.8932 25.2762 23.8932Z",fill:e})),P.createElement("defs",null,P.createElement("clipPath",{id:"clip0_193_26839"},P.createElement("rect",{width:"28",height:"28",fill:e,transform:"translate(6.625 6)"}))))))},L9e=({chains:t,options:e={}})=>({id:"discord",isSequenceBased:!0,logoDark:Qm({isDarkMode:!0}),logoLight:Qm({isDarkMode:!1}),miniLogoDark:Qm({isDarkMode:!0}),miniLogoLight:Qm({isDarkMode:!1}),name:"Discord",createConnector:()=>{var r;return new F0({chains:t,options:Ke({},e,{connect:Ke({},e==null?void 0:e.connect,{settings:Ke({},e==null||(r=e.connect)==null?void 0:r.settings,{signInWith:"discord"})})})})}}),j9e=({chains:t,walletConnectProjectId:e,defaultChainId:r})=>{let n=t[0].id;if(r){const i=t.find(o=>o.id===r);i&&(n=i.id)}return FIe([N9e({chains:t,options:{defaultNetwork:n}}),O9e({chains:t,options:{defaultNetwork:n}}),M9e({chains:t,options:{defaultNetwork:n}}),L9e({chains:t,options:{defaultNetwork:n}}),D9e({chains:t,options:{defaultNetwork:n}}),R9e({chains:t}),I9e({chains:t,options:{projectId:e}})])};function C_(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Ym(){}function NM(){return typeof WeakMap<"u"?new WeakMap:F9e()}function F9e(){return{add:Ym,delete:Ym,get:Ym,set:Ym,has:function(t){return!1}}}var B9e=Object.prototype.hasOwnProperty,vk=function(t,e){return B9e.call(t,e)};function y5(t,e){for(var r in e)vk(e,r)&&(t[r]=e[r]);return t}var U9e=/^[ \t]*(?:\r\n|\r|\n)/,z9e=/(?:\r\n|\r|\n)[ \t]*$/,V9e=/^(?:[\r\n]|$)/,q9e=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,W9e=/^[ \t]*[\r\n][ \t\r\n]*$/;function LM(t,e,r){var n=0,s=t[0].match(q9e);s&&(n=s[1].length);var i="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(i,"g");e&&(t=t.slice(1));var a=r.newline,l=r.trimLeadingNewline,c=r.trimTrailingNewline,f=typeof a=="string",u=t.length,d=t.map(function(h,v){return h=h.replace(o,"$1"),v===0&&l&&(h=h.replace(U9e,"")),v===u-1&&c&&(h=h.replace(z9e,"")),f&&(h=h.replace(/\r\n|\n|\r/g,function(y){return a})),h});return d}function H9e(t,e){for(var r="",n=0,s=t.length;n{},registerClassName:()=>{},onEndFileScope:()=>{},registerComposition:()=>{},markCompositionUsed:()=>{},getIdentOption:()=>"short"},Xp=[K9e],Gh=()=>{if(Xp.length<1)throw new Error("No adapter configured");return Xp[Xp.length-1]},pY=!1,Q9e=t=>{pY||Y9e(t)},Y9e=t=>{pY=!0,Xp.push(t)},Mx=function(){return Gh().appendCss(...arguments)},gY=function(){return Gh().registerClassName(...arguments)},J9e=function(){return Gh().registerComposition(...arguments)},bY=function(){return Gh().markCompositionUsed(...arguments)},X9e=function(){return Gh().onEndFileScope(...arguments)},Z9e=function(){var e=Gh();return"getIdentOption"in e?e.getIdentOption(...arguments):"short"},jM,E_=0,Xb=[];function Xf(t,e){E_=0,Xb.unshift({filePath:t,packageName:e})}function Zf(){X9e(eu()),E_=0,Xb.splice(0,1)}function eu(){if(Xb.length===0)throw new Error(lo(jM||(jM=C_([` Styles were unable to be assigned to a file. This is generally caused by one of the following: - You may have created styles outside of a '.css.ts' context - You may have incorrect configuration. See https://vanilla-extract.style/documentation/getting-started - `]))));return Jb[0]}function eRe(){return C_++}var jM={},tRe=t=>{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=jM[n];if(!s){var i=document.createElement("style");e.packageName&&i.setAttribute("data-package",e.packageName),i.setAttribute("data-file",e.filePath),i.setAttribute("type","text/css"),s=jM[n]=i,document.head.appendChild(i)}s.innerHTML=r};function rRe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var nRe={},sRe=nRe.hasOwnProperty,iRe=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=sRe.call(e,s)?e[s]:r[s];return n},oRe=/[ -,\.\/:-@\[-\^`\{-~]/,aRe=/[ -,\.\/:-@\[\]\^`\{-~]/,lRe=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,E_=function t(e,r){r=iRe(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",s=r.isIdentifier,i=e.charAt(0),o="",a=0,l=e.length;a126){if(f>=55296&&f<=56319&&a0&&!(l in n[i]);)i=o[i];if(l in n[i]){var u=n[i][l];o[f]=u,s[f]=s[f].concat(s[u])}else o[f]=0}}this.gotoFn=n,this.output=s,this.failure=o},e.prototype.search=function(r){for(var n=0,s=[],i=0;i0&&!(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];s.push([i,a])}}return s},t.exports=e})()})(cRe);var wY={},ih={},fRe=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n":"child","<":"parent","~":"sibling","+":"adjacent"},BM={"#":["id","equals"],".":["class","element"]},hRe=new Set(["has","not","matches","is","where","host","host-context"]),vRe=new Set(fRe(["descendant"],Object.keys(Xb).map(function(t){return Xb[t]}),!0)),yRe=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function xY(t){return vRe.has(t.type)}ih.isTraversal=xY;var mRe=new Set(["contains","icontains"]),y5=new Set(['"',"'"]);function pRe(t,e,r){var 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 Ym(t){return t.replace(uRe,pRe)}function m5(t){return t===" "||t===` -`||t===" "||t==="\f"||t==="\r"}function gRe(t,e){var r=[],n=CY(r,""+t,e,0);if(n0&&xY(o[o.length-1]))throw new Error("Did not expect successive traversals.")}for(c(0);e!=="";){var d=e.charAt(n);if(m5(d))a=!0,c(1);else if(d in Xb)u(),o.push({type:Xb[d]}),a=!1,c(1);else if(d===","){if(o.length===0)throw new Error("Empty sub-selector");t.push(o),o=[],a=!1,c(1)}else if(e.startsWith("/*",n)){var h=e.indexOf("*/",n+2);if(h<0)throw new Error("Comment was not terminated");n=h+2}else if(a&&(u(),o.push({type:"descendant"}),a=!1),d in BM){var v=BM[d],y=v[0],b=v[1];o.push({type:"attribute",name:y,action:b,value:l(1),namespace:null,ignoreCase:r.xmlMode?null:!1})}else if(d==="["){c(1);var p=null;e.charAt(n)==="|"&&(p="",n+=1),e.startsWith("*|",n)&&(p="*",n+=2);var g=l(0);p===null&&e.charAt(n)==="|"&&e.charAt(n+1)!=="="&&(p=g,g=l(1)),((s=r.lowerCaseAttributeNames)!==null&&s!==void 0?s:!r.xmlMode)&&(g=g.toLowerCase()),c(0);var b="exists",w=dRe.get(e.charAt(n));if(w){if(b=w,e.charAt(n+1)!=="=")throw new Error("Expected `=`");c(2)}else e.charAt(n)==="="&&(b="equals",c(1));var E="",k=null;if(b!=="exists"){if(y5.has(e.charAt(n))){for(var $=e.charAt(n),C=n+1;C0&&n0&&e.length===0)throw new Error("Empty sub-selector");t.push(e)}var k_={},zM=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return SY(t.namespace)+"*";case"tag":return VM(t);case"pseudo-element":return"::"+so(t.name);case"pseudo":return t.data===null?":"+so(t.name):typeof t.data=="string"?":"+so(t.name)+"("+so(t.data)+")":":"+so(t.name)+"("+EY(t.data)+")";case"attribute":{if(t.name==="id"&&t.action==="equals"&&!t.ignoreCase&&!t.namespace)return"#"+so(t.value);if(t.name==="class"&&t.action==="element"&&!t.ignoreCase&&!t.namespace)return"."+so(t.value);var e=VM(t);return t.action==="exists"?"["+e+"]":"["+e+yk[t.action]+"='"+so(t.value)+"'"+(t.ignoreCase?"i":t.ignoreCase===!1?"s":"")+"]"}}}function VM(t){return""+SY(t.namespace)+so(t.name)}function SY(t){return t!==null?(t==="*"?"*":so(t))+"|":""}function so(t){return t.split("").map(function(e){return bRe.has(e)?"\\"+e:e}).join("")}(function(t){var e=Wr&&Wr.__createBinding||(Object.create?function(o,a,l,c){c===void 0&&(c=l),Object.defineProperty(o,c,{enumerable:!0,get:function(){return a[l]}})}:function(o,a,l,c){c===void 0&&(c=l),o[c]=a[l]}),r=Wr&&Wr.__exportStar||function(o,a){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(a,l)&&e(a,o,l)},n=Wr&&Wr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=void 0,r(ih,t);var s=ih;Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return n(s).default}});var i=k_;Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n(i).default}})})(wY);/*! @license MediaQueryParser - MIT License - Tom Golden (github@tbjgolden.com) *//*! ***************************************************************************** + `]))));return Xb[0]}function eRe(){return E_++}var FM={},tRe=t=>{var{fileScope:e,css:r}=t,n=e.packageName?[e.packageName,e.filePath].join("/"):e.filePath,s=FM[n];if(!s){var i=document.createElement("style");e.packageName&&i.setAttribute("data-package",e.packageName),i.setAttribute("data-file",e.filePath),i.setAttribute("type","text/css"),s=FM[n]=i,document.head.appendChild(i)}s.innerHTML=r};function rRe(t){var e=t.match(/^var\((.*)\)$/);return e?e[1]:t}/*! https://mths.be/cssesc v3.0.0 by @mathias */var nRe={},sRe=nRe.hasOwnProperty,iRe=function(e,r){if(!e)return r;var n={};for(var s in r)n[s]=sRe.call(e,s)?e[s]:r[s];return n},oRe=/[ -,\.\/:-@\[-\^`\{-~]/,aRe=/[ -,\.\/:-@\[\]\^`\{-~]/,lRe=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,S_=function t(e,r){r=iRe(r,t.options),r.quotes!="single"&&r.quotes!="double"&&(r.quotes="single");for(var n=r.quotes=="double"?'"':"'",s=r.isIdentifier,i=e.charAt(0),o="",a=0,l=e.length;a126){if(f>=55296&&f<=56319&&a0&&!(l in n[i]);)i=o[i];if(l in n[i]){var u=n[i][l];o[f]=u,s[f]=s[f].concat(s[u])}else o[f]=0}}this.gotoFn=n,this.output=s,this.failure=o},e.prototype.search=function(r){for(var n=0,s=[],i=0;i0&&!(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];s.push([i,a])}}return s},t.exports=e})()})(cRe);var wY={},oh={},fRe=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n":"child","<":"parent","~":"sibling","+":"adjacent"},UM={"#":["id","equals"],".":["class","element"]},hRe=new Set(["has","not","matches","is","where","host","host-context"]),vRe=new Set(fRe(["descendant"],Object.keys(Zb).map(function(t){return Zb[t]}),!0)),yRe=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function xY(t){return vRe.has(t.type)}oh.isTraversal=xY;var mRe=new Set(["contains","icontains"]),m5=new Set(['"',"'"]);function pRe(t,e,r){var 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 Jm(t){return t.replace(uRe,pRe)}function p5(t){return t===" "||t===` +`||t===" "||t==="\f"||t==="\r"}function gRe(t,e){var r=[],n=CY(r,""+t,e,0);if(n0&&xY(o[o.length-1]))throw new Error("Did not expect successive traversals.")}for(c(0);e!=="";){var d=e.charAt(n);if(p5(d))a=!0,c(1);else if(d in Zb)u(),o.push({type:Zb[d]}),a=!1,c(1);else if(d===","){if(o.length===0)throw new Error("Empty sub-selector");t.push(o),o=[],a=!1,c(1)}else if(e.startsWith("/*",n)){var h=e.indexOf("*/",n+2);if(h<0)throw new Error("Comment was not terminated");n=h+2}else if(a&&(u(),o.push({type:"descendant"}),a=!1),d in UM){var v=UM[d],y=v[0],g=v[1];o.push({type:"attribute",name:y,action:g,value:l(1),namespace:null,ignoreCase:r.xmlMode?null:!1})}else if(d==="["){c(1);var b=null;e.charAt(n)==="|"&&(b="",n+=1),e.startsWith("*|",n)&&(b="*",n+=2);var p=l(0);b===null&&e.charAt(n)==="|"&&e.charAt(n+1)!=="="&&(b=p,p=l(1)),((s=r.lowerCaseAttributeNames)!==null&&s!==void 0?s:!r.xmlMode)&&(p=p.toLowerCase()),c(0);var g="exists",w=dRe.get(e.charAt(n));if(w){if(g=w,e.charAt(n+1)!=="=")throw new Error("Expected `=`");c(2)}else e.charAt(n)==="="&&(g="equals",c(1));var E="",k=null;if(g!=="exists"){if(m5.has(e.charAt(n))){for(var $=e.charAt(n),x=n+1;x0&&n0&&e.length===0)throw new Error("Empty sub-selector");t.push(e)}var $_={},VM=Wr&&Wr.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n ";case"parent":return" < ";case"sibling":return" ~ ";case"adjacent":return" + ";case"descendant":return" ";case"universal":return SY(t.namespace)+"*";case"tag":return qM(t);case"pseudo-element":return"::"+io(t.name);case"pseudo":return t.data===null?":"+io(t.name):typeof t.data=="string"?":"+io(t.name)+"("+io(t.data)+")":":"+io(t.name)+"("+EY(t.data)+")";case"attribute":{if(t.name==="id"&&t.action==="equals"&&!t.ignoreCase&&!t.namespace)return"#"+io(t.value);if(t.name==="class"&&t.action==="element"&&!t.ignoreCase&&!t.namespace)return"."+io(t.value);var e=qM(t);return t.action==="exists"?"["+e+"]":"["+e+mk[t.action]+"='"+io(t.value)+"'"+(t.ignoreCase?"i":t.ignoreCase===!1?"s":"")+"]"}}}function qM(t){return""+SY(t.namespace)+io(t.name)}function SY(t){return t!==null?(t==="*"?"*":io(t))+"|":""}function io(t){return t.split("").map(function(e){return bRe.has(e)?"\\"+e:e}).join("")}(function(t){var e=Wr&&Wr.__createBinding||(Object.create?function(o,a,l,c){c===void 0&&(c=l),Object.defineProperty(o,c,{enumerable:!0,get:function(){return a[l]}})}:function(o,a,l,c){c===void 0&&(c=l),o[c]=a[l]}),r=Wr&&Wr.__exportStar||function(o,a){for(var l in o)l!=="default"&&!Object.prototype.hasOwnProperty.call(a,l)&&e(a,o,l)},n=Wr&&Wr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=t.parse=void 0,r(oh,t);var s=oh;Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return n(s).default}});var i=$_;Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n(i).default}})})(wY);/*! @license MediaQueryParser - MIT License - Tom Golden (github@tbjgolden.com) *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -270,14 +270,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Zb=function(){return Zb=Object.assign||function(e){for(var r,n=1,s=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 zr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}var ERe=/(\u000D|\u000C|\u000D\u000A)/g,SRe=/[\u0000\uD800-\uDFFF]/g,kRe=/(\/\*)[\s\S]*?(\*\/)/g,$Re=function(e,r){r===void 0&&(r=0),e=e.replace(ERe,` -`).replace(SRe,"�"),e=e.replace(kRe,"");for(var n=[];r"})}else if(s===34){var o=qM(e,r);if(o===null)return null;var a=zr(o,2),l=a[0],c=a[1];n.push({type:"",value:c}),r=l}else if(s===35){if(r+1=65&&f<=90||f>=97&&f<=122||f>=128||f>=48&&f<=57||f===92&&r+2",value:c.toLowerCase(),flag:u}),r=l;continue}}}n.push({type:"",value:s})}else if(s===39){var o=qM(e,r);if(o===null)return null;var h=zr(o,2),l=h[0],c=h[1];n.push({type:"",value:c}),r=l}else if(s===40)n.push({type:"<(-token>"});else if(s===41)n.push({type:"<)-token>"});else if(s===43){var v=Jm(e,r);if(v===null)n.push({type:"",value:s});else{var y=zr(v,2),l=y[0],b=y[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=l}}else if(s===44)n.push({type:""});else if(s===45){var p=Jm(e,r);if(p!==null){var g=zr(p,2),l=g[0],b=g[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=l;continue}if(r+2"}),r+=2;continue}}var o=WM(e,r);if(o!==null){var E=zr(o,3),l=E[0],c=E[1],k=E[2];n.push({type:k,value:c}),r=l;continue}n.push({type:"",value:s})}else if(s===46){var p=Jm(e,r);if(p===null)n.push({type:"",value:s});else{var $=zr(p,2),l=$[0],b=$[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=l;continue}}else if(s===58)n.push({type:""});else if(s===59)n.push({type:""});else if(s===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:s})}else if(s===64){var o=$_(e,r+1);if(o!==null){var T=zr(o,2),l=T[0],c=T[1];n.push({type:"",value:c.toLowerCase()}),r=l;continue}n.push({type:"",value:s})}else if(s===91)n.push({type:"<[-token>"});else if(s===92){var o=F0(e,r);if(o===null)return null;var j=zr(o,2),l=j[0],c=j[1];e=e.slice(0,r)+c+e.slice(l+1),r-=1}else if(s===93)n.push({type:"<]-token>"});else if(s===123)n.push({type:"<{-token>"});else if(s===125)n.push({type:"<}-token>"});else if(s>=48&&s<=57){var o=Jm(e,r),F=zr(o,2),l=F[0],b=F[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=l}else if(s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128){var o=WM(e,r);if(o===null)return null;var U=zr(o,3),l=U[0],c=U[1],k=U[2];n.push({type:k,value:c}),r=l}else n.push({type:"",value:s})}return n.push({type:""}),n},qM=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),s=[],i=r+1;i=65&&s<=90||s>=97&&s<=122||s>=128)return!0;if(s===92){if(e.length<=r+2)return!1;var i=e.charCodeAt(r+2);return i!==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 s=e.charCodeAt(r+1);return s!==10}else return!1}},F0=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 s=[n],i=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)s.push(a);else break}if(o",o,u]]}return i+1",o]]:[i,["",o,a]]},ARe=function(e,r){if(e.length<=r)return null;var n="integer",s=[],i=e.charCodeAt(r);for((i===43||i===45)&&(r+=1,i===45&&s.push(45));r=48&&o<=57)s.push(o),r+=1;else break}if(r+1=48&&l<=57)for(s.push(a,l),n="number",r+=2;r=48&&o<=57)s.push(o),r+=1;else break}}if(r+1=48&&l<=57;if(f||(l===43||l===45)&&c>=48&&c<=57)for(n="number",f?(s.push(69,l),r+=2):l===45?(s.push(69,45,c),r+=3):(s.push(69,c),r+=3);r=48&&o<=57)s.push(o),r+=1;else break}}}var u=String.fromCharCode.apply(null,s),d=n==="number"?parseFloat(u):parseInt(u);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},_Re=function(e,r){if(e.length<=r)return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=F0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},$_=function(e,r){if(e.length<=r||!kY(e,r))return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=F0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},PRe=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var s=[],i=!1;ri+1){var a=e.charCodeAt(i+1);if(a===40){for(var l=2;i+l"];if(c!==9&&c!==32&&c!==10){var f=PRe(e,i+l);if(f===null)return null;var u=zr(f,2),d=u[0],h=u[1];return[d,h,""]}}return[i+1,o.toLowerCase(),""]}}}else if(e.length>i+1){var a=e.charCodeAt(i+1);if(a===40)return[i+1,o.toLowerCase(),""]}return[i,o.toLowerCase(),""]},TRe=function(e){for(var r=e.length-1;r>=0;r--)e[r]=RRe(e[r]);return e},RRe=function(e){if(e.mediaCondition===null)return e;var r=IRe(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}},IRe=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var s=t(n);if(s.operator===null&&s.children.length===1)e.children[r]=s.children[0];else if(s.operator===e.operator&&(s.operator==="and"||s.operator==="or")){for(var i=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Xn("Expected whitespace after media");n=2;for(var i=2;i"){s=i;break}else if(o.type==="")throw Xn("Expected '{' in media query but found ';'")}}return r=r.slice(n,s),NRe(r)},DRe=function(e){for(var r=[],n=!1,s=0;s"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(Zb(Zb({},e[s]),{wsBefore:n,wsAfter:!1})),n=!1);return r},NRe=function(e){for(var r,n,s=[[]],i=0;i"?s.push([]):s[s.length-1].push(o)}var a=s.map(DRe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var l=a.map(function(h){return h.length===0?null:LRe(h)}),c=[];try{for(var f=CRe(l),u=f.next();!u.done;u=f.next()){var d=u.value;d!==null&&c.push(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(c.length===0)throw Xn("No valid media queries");return c},LRe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:p5(e,!0)}}catch(u){throw Xn("Expected media condition after '('",u)}else if(r.type===""){var n=null,s=void 0,i=r.value;(i==="only"||i==="not")&&(n=i);var o=n===null?0:1;if(e.length<=o)throw Xn("Expected extra token in media query");var a=e[o];if(a.type===""){var l=a.value;if(l==="all")s="all";else if(l==="print"||l==="screen")s=l;else if(l==="tty"||l==="tv"||l==="projection"||l==="handheld"||l==="braille"||l==="embossed"||l==="aural"||l==="speech")n=n==="not"?null:"not",s="all";else throw Xn("Unknown ident '".concat(l,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var c=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];c.push.apply(c,e),c.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:p5(c,!0)}}catch(u){throw Xn("Expected media condition after '('",u)}}else throw Xn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:s,mediaCondition:null};if(o+4"&&f.value==="and")try{return{mediaPrefix:n,mediaType:s,mediaCondition:p5(e.slice(o+2),!1)}}catch(u){throw Xn("Expected media condition after 'and'",u)}else throw Xn("Expected 'and' after media prefix")}else throw Xn("Expected media condition after media prefix")}else throw Xn("Expected media condition or media prefix")},p5=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 s=e.length-1,i=0,o=0,a=0;a"?(o+=1,i=Math.max(i,o)):l.type==="<)-token>"&&(o-=1),o===0){s=a;break}}if(o!==0)throw new Error(`Mismatched parens +***************************************************************************** */var e2=function(){return e2=Object.assign||function(e){for(var r,n=1,s=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 zr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,i=[],o;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)i.push(s.value)}catch(a){o={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}var ERe=/(\u000D|\u000C|\u000D\u000A)/g,SRe=/[\u0000\uD800-\uDFFF]/g,kRe=/(\/\*)[\s\S]*?(\*\/)/g,$Re=function(e,r){r===void 0&&(r=0),e=e.replace(ERe,` +`).replace(SRe,"�"),e=e.replace(kRe,"");for(var n=[];r"})}else if(s===34){var o=WM(e,r);if(o===null)return null;var a=zr(o,2),l=a[0],c=a[1];n.push({type:"",value:c}),r=l}else if(s===35){if(r+1=65&&f<=90||f>=97&&f<=122||f>=128||f>=48&&f<=57||f===92&&r+2",value:c.toLowerCase(),flag:u}),r=l;continue}}}n.push({type:"",value:s})}else if(s===39){var o=WM(e,r);if(o===null)return null;var h=zr(o,2),l=h[0],c=h[1];n.push({type:"",value:c}),r=l}else if(s===40)n.push({type:"<(-token>"});else if(s===41)n.push({type:"<)-token>"});else if(s===43){var v=Xm(e,r);if(v===null)n.push({type:"",value:s});else{var y=zr(v,2),l=y[0],g=y[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l}}else if(s===44)n.push({type:""});else if(s===45){var b=Xm(e,r);if(b!==null){var p=zr(b,2),l=p[0],g=p[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l;continue}if(r+2"}),r+=2;continue}}var o=HM(e,r);if(o!==null){var E=zr(o,3),l=E[0],c=E[1],k=E[2];n.push({type:k,value:c}),r=l;continue}n.push({type:"",value:s})}else if(s===46){var b=Xm(e,r);if(b===null)n.push({type:"",value:s});else{var $=zr(b,2),l=$[0],g=$[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l;continue}}else if(s===58)n.push({type:""});else if(s===59)n.push({type:""});else if(s===60){if(r+3"}),r+=3;continue}}n.push({type:"",value:s})}else if(s===64){var o=A_(e,r+1);if(o!==null){var T=zr(o,2),l=T[0],c=T[1];n.push({type:"",value:c.toLowerCase()}),r=l;continue}n.push({type:"",value:s})}else if(s===91)n.push({type:"<[-token>"});else if(s===92){var o=B0(e,r);if(o===null)return null;var B=zr(o,2),l=B[0],c=B[1];e=e.slice(0,r)+c+e.slice(l+1),r-=1}else if(s===93)n.push({type:"<]-token>"});else if(s===123)n.push({type:"<{-token>"});else if(s===125)n.push({type:"<}-token>"});else if(s>=48&&s<=57){var o=Xm(e,r),L=zr(o,2),l=L[0],g=L[1];g[0]===""?n.push({type:"",value:g[1],unit:g[2].toLowerCase(),flag:"number"}):g[0]===""?n.push({type:g[0],value:g[1],flag:g[2]}):n.push({type:g[0],value:g[1],flag:"number"}),r=l}else if(s===95||s>=65&&s<=90||s>=97&&s<=122||s>=128){var o=HM(e,r);if(o===null)return null;var U=zr(o,3),l=U[0],c=U[1],k=U[2];n.push({type:k,value:c}),r=l}else n.push({type:"",value:s})}return n.push({type:""}),n},WM=function(e,r){if(e.length<=r+1)return null;for(var n=e.charCodeAt(r),s=[],i=r+1;i=65&&s<=90||s>=97&&s<=122||s>=128)return!0;if(s===92){if(e.length<=r+2)return!1;var i=e.charCodeAt(r+2);return i!==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 s=e.charCodeAt(r+1);return s!==10}else return!1}},B0=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 s=[n],i=Math.min(r+7,e.length),o=r+2;o=48&&a<=57||a>=65&&a<=70||a>=97&&a<=102)s.push(a);else break}if(o",o,u]]}return i+1",o]]:[i,["",o,a]]},ARe=function(e,r){if(e.length<=r)return null;var n="integer",s=[],i=e.charCodeAt(r);for((i===43||i===45)&&(r+=1,i===45&&s.push(45));r=48&&o<=57)s.push(o),r+=1;else break}if(r+1=48&&l<=57)for(s.push(a,l),n="number",r+=2;r=48&&o<=57)s.push(o),r+=1;else break}}if(r+1=48&&l<=57;if(f||(l===43||l===45)&&c>=48&&c<=57)for(n="number",f?(s.push(69,l),r+=2):l===45?(s.push(69,45,c),r+=3):(s.push(69,c),r+=3);r=48&&o<=57)s.push(o),r+=1;else break}}}var u=String.fromCharCode.apply(null,s),d=n==="number"?parseFloat(u):parseInt(u);return d===-0&&(d=0),Number.isNaN(d)?null:[r-1,d,n]},_Re=function(e,r){if(e.length<=r)return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=B0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return r===0?null:[r-1,String.fromCharCode.apply(null,n)]},A_=function(e,r){if(e.length<=r||!kY(e,r))return null;for(var n=[],s=e.charCodeAt(r);r=65&&s<=90||s>=97&&s<=122||s>=128||s>=48&&s<=57){n.push(s);continue}else{var i=B0(e,r);if(i!==null){var o=zr(i,2),a=o[0],l=o[1];n.push(l),r=a;continue}}break}return[r-1,String.fromCharCode.apply(null,n)]},PRe=function(e,r){for(var n=e.charCodeAt(r);n===9||n===32||n===10;)n=e.charCodeAt(++r);for(var s=[],i=!1;ri+1){var a=e.charCodeAt(i+1);if(a===40){for(var l=2;i+l"];if(c!==9&&c!==32&&c!==10){var f=PRe(e,i+l);if(f===null)return null;var u=zr(f,2),d=u[0],h=u[1];return[d,h,""]}}return[i+1,o.toLowerCase(),""]}}}else if(e.length>i+1){var a=e.charCodeAt(i+1);if(a===40)return[i+1,o.toLowerCase(),""]}return[i,o.toLowerCase(),""]},TRe=function(e){for(var r=e.length-1;r>=0;r--)e[r]=RRe(e[r]);return e},RRe=function(e){if(e.mediaCondition===null)return e;var r=IRe(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}},IRe=function t(e){for(var r=e.children.length-1;r>=0;r--){var n=e.children[r];if(!("context"in n)){var s=t(n);if(s.operator===null&&s.children.length===1)e.children[r]=s.children[0];else if(s.operator===e.operator&&(s.operator==="and"||s.operator==="or")){for(var i=[r,1],o=0;o"&&r[0].value==="media"){if(r[1].type!=="")throw Zn("Expected whitespace after media");n=2;for(var i=2;i"){s=i;break}else if(o.type==="")throw Zn("Expected '{' in media query but found ';'")}}return r=r.slice(n,s),NRe(r)},DRe=function(e){for(var r=[],n=!1,s=0;s"?(n=!0,r.length>0&&(r[r.length-1].wsAfter=!0)):(r.push(e2(e2({},e[s]),{wsBefore:n,wsAfter:!1})),n=!1);return r},NRe=function(e){for(var r,n,s=[[]],i=0;i"?s.push([]):s[s.length-1].push(o)}var a=s.map(DRe);if(a.length===1&&a[0].length===0)return[{mediaCondition:null,mediaPrefix:null,mediaType:"all"}];var l=a.map(function(h){return h.length===0?null:LRe(h)}),c=[];try{for(var f=CRe(l),u=f.next();!u.done;u=f.next()){var d=u.value;d!==null&&c.push(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}if(c.length===0)throw Zn("No valid media queries");return c},LRe=function(e){var r=e[0];if(r.type==="<(-token>")try{return{mediaPrefix:null,mediaType:"all",mediaCondition:g5(e,!0)}}catch(u){throw Zn("Expected media condition after '('",u)}else if(r.type===""){var n=null,s=void 0,i=r.value;(i==="only"||i==="not")&&(n=i);var o=n===null?0:1;if(e.length<=o)throw Zn("Expected extra token in media query");var a=e[o];if(a.type===""){var l=a.value;if(l==="all")s="all";else if(l==="print"||l==="screen")s=l;else if(l==="tty"||l==="tv"||l==="projection"||l==="handheld"||l==="braille"||l==="embossed"||l==="aural"||l==="speech")n=n==="not"?null:"not",s="all";else throw Zn("Unknown ident '".concat(l,"' in media query"))}else if(n==="not"&&a.type==="<(-token>"){var c=[{type:"<(-token>",wsBefore:!1,wsAfter:!1}];c.push.apply(c,e),c.push({type:"<)-token>",wsBefore:!1,wsAfter:!1});try{return{mediaPrefix:null,mediaType:"all",mediaCondition:g5(c,!0)}}catch(u){throw Zn("Expected media condition after '('",u)}}else throw Zn("Invalid media query");if(o+1===e.length)return{mediaPrefix:n,mediaType:s,mediaCondition:null};if(o+4"&&f.value==="and")try{return{mediaPrefix:n,mediaType:s,mediaCondition:g5(e.slice(o+2),!1)}}catch(u){throw Zn("Expected media condition after 'and'",u)}else throw Zn("Expected 'and' after media prefix")}else throw Zn("Expected media condition after media prefix")}else throw Zn("Expected media condition or media prefix")},g5=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 s=e.length-1,i=0,o=0,a=0;a"?(o+=1,i=Math.max(i,o)):l.type==="<)-token>"&&(o-=1),o===0){s=a;break}}if(o!==0)throw new Error(`Mismatched parens Invalid media condition`);var c,f=e.slice(0,s+1);if(i===1?c=jRe(f):f[1].type===""&&f[1].value==="not"?c=t(f.slice(2,-1),!0,"not"):c=t(f.slice(1,-1),!0),s===e.length-1)return{operator:n,children:[c]};var u=e[s+1];if(u.type!=="")throw new Error(`Invalid operator Invalid media condition`);if(n!==null&&n!==u.value)throw new Error("'".concat(u.value,"' and '").concat(n,`' must not be at same level Invalid media condition`));if(u.value==="or"&&!r)throw new Error(`Cannot use 'or' at top level of a media query Invalid media condition`);if(u.value!=="and"&&u.value!=="or")throw new Error("Invalid operator: '".concat(u.value,`' -Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.value,children:[c].concat(d.children)}},jRe=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"&&s.value>0&&i.type===""&&i.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:s.value,denominator:o.value,wsBefore:s.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 l=r[3];if(l.type===""||l.type===""||l.type===""||l.type===""){var c=r[1].value,f=null,u=c.slice(0,4);u==="min-"?(f="min",c=c.slice(4)):u==="max-"&&(f="max",c=c.slice(4)),l.wsBefore,l.wsAfter;var d=mk(l,["wsBefore","wsAfter"]);return{context:"value",prefix:f,feature:c,value:d}}}else if(r.length>=5)try{var h=FRe(r);return{context:"range",feature:h.featureName,range:h}}catch(v){throw Xn("Invalid media feature",v)}throw new Error("Invalid media feature")},FRe=function(e){var r,n,s,i;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 l=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),c=e[l];if(a)if(c.type===""){if(o.featureName=c.value,e.length>=7){var f=e[l+1],u=e[l+2];if(f.type===""){var d=f.value;if(d===60)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[l+1+((i=(s=o.rightOp)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(l+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=c;var v=null,y=o.leftToken,b=o.leftOp,p=o.featureName,g=o.rightOp,w=o.rightToken,E=null;if(y!==null){if(y.type===""){var k=y.type,$=y.value;$==="infinite"&&(E={type:k,value:$})}else if(y.type===""||y.type===""||y.type===""){y.wsBefore,y.wsAfter;var C=mk(y,["wsBefore","wsAfter"]);E=C}}var T=null;if(w!==null){if(w.type===""){var k=w.type,$=w.value;$==="infinite"&&(T={type:k,value:$})}else if(w.type===""||w.type===""||w.type===""){w.wsBefore,w.wsAfter;var j=mk(w,["wsBefore","wsAfter"]);T=j}}if(E!==null&&T!==null)if((b==="<"||b==="<=")&&(g==="<"||g==="<="))v={leftToken:E,leftOp:b,featureName:p,rightOp:g,rightToken:T};else if((b===">"||b===">=")&&(g===">"||g===">="))v={leftToken:E,leftOp:b,featureName:p,rightOp:g,rightToken:T};else throw new Error("Invalid range");else E===null&&b===null&&g!==null&&T!==null?v={leftToken:E,leftOp:b,featureName:p,rightOp:g,rightToken:T}:E!==null&&b!==null&&g===null&&T===null&&(v={leftToken:E,leftOp:b,featureName:p,rightOp:g,rightToken:T});return v}else throw new Error("Invalid range")};function BRe(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 URe(t){var e=BRe(t,"string");return typeof e=="symbol"?e:String(e)}function zRe(t,e,r){return e=URe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function HM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function _v(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}function GM(t,e){if(t==null)return{};var r=VRe(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function E1(t,e){for(var r in t)e(t[r],r)}function S1(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function qRe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function pk(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var s=new RegExp(".".concat(HRe(S_(e,{isIdentifier:!0}))),"g");return t.replace(s,"&")},n;try{n=wY.parse(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(s=>{try{for(var i=s.length-1;i>=-1;i--){if(!s[i])throw new Error;var o=s[i];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(ao(KM||(KM=x_([` +Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.value,children:[c].concat(d.children)}},jRe=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"&&s.value>0&&i.type===""&&i.value===47&&o.type===""&&o.value>0){r.push({type:"",numerator:s.value,denominator:o.value,wsBefore:s.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 l=r[3];if(l.type===""||l.type===""||l.type===""||l.type===""){var c=r[1].value,f=null,u=c.slice(0,4);u==="min-"?(f="min",c=c.slice(4)):u==="max-"&&(f="max",c=c.slice(4)),l.wsBefore,l.wsAfter;var d=pk(l,["wsBefore","wsAfter"]);return{context:"value",prefix:f,feature:c,value:d}}}else if(r.length>=5)try{var h=FRe(r);return{context:"range",feature:h.featureName,range:h}}catch(v){throw Zn("Invalid media feature",v)}throw new Error("Invalid media feature")},FRe=function(e){var r,n,s,i;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 l=2+((n=(r=o[a?"leftOp":"rightOp"])===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0),c=e[l];if(a)if(c.type===""){if(o.featureName=c.value,e.length>=7){var f=e[l+1],u=e[l+2];if(f.type===""){var d=f.value;if(d===60)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp="<=":o.rightOp="<";else if(d===62)u.type===""&&u.value===61&&!u.wsBefore?o.rightOp=">=":o.rightOp=">";else throw new Error("Invalid range");var h=e[l+1+((i=(s=o.rightOp)===null||s===void 0?void 0:s.length)!==null&&i!==void 0?i:0)];o.rightToken=h}else throw new Error("Invalid range")}else if(l+2!==e.length)throw new Error("Invalid range")}else throw new Error("Invalid range");else o.rightToken=c;var v=null,y=o.leftToken,g=o.leftOp,b=o.featureName,p=o.rightOp,w=o.rightToken,E=null;if(y!==null){if(y.type===""){var k=y.type,$=y.value;$==="infinite"&&(E={type:k,value:$})}else if(y.type===""||y.type===""||y.type===""){y.wsBefore,y.wsAfter;var x=pk(y,["wsBefore","wsAfter"]);E=x}}var T=null;if(w!==null){if(w.type===""){var k=w.type,$=w.value;$==="infinite"&&(T={type:k,value:$})}else if(w.type===""||w.type===""||w.type===""){w.wsBefore,w.wsAfter;var B=pk(w,["wsBefore","wsAfter"]);T=B}}if(E!==null&&T!==null)if((g==="<"||g==="<=")&&(p==="<"||p==="<="))v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T};else if((g===">"||g===">=")&&(p===">"||p===">="))v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T};else throw new Error("Invalid range");else E===null&&g===null&&p!==null&&T!==null?v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T}:E!==null&&g!==null&&p===null&&T===null&&(v={leftToken:E,leftOp:g,featureName:b,rightOp:p,rightToken:T});return v}else throw new Error("Invalid range")};function BRe(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 URe(t){var e=BRe(t,"string");return typeof e=="symbol"?e:String(e)}function zRe(t,e,r){return e=URe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function GM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Pv(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}function KM(t,e){if(t==null)return{};var r=VRe(t,e),n,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function S1(t,e){for(var r in t)e(t[r],r)}function k1(t,e){var r={};for(var n in t)e.indexOf(n)===-1&&(r[n]=t[n]);return r}function qRe(t,e){var r={};for(var n in t)r[e(t[n],n)]=t[n];return r}function gk(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n{var r=()=>{var s=new RegExp(".".concat(HRe(k_(e,{isIdentifier:!0}))),"g");return t.replace(s,"&")},n;try{n=wY.parse(t)}catch{throw new Error("Invalid selector: ".concat(r()))}n.forEach(s=>{try{for(var i=s.length-1;i>=-1;i--){if(!s[i])throw new Error;var o=s[i];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(lo(QM||(QM=C_([` Invalid selector: `,` Style selectors must target the '&' character (along with any modifiers), e.g. `," or ",`. @@ -287,31 +287,31 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.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 e2{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 e2},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var s=r.findOrCreateCondition(n);r=s.children}return r}addRule(e,r,n){var s=this.getConditionalRulesetByPath(n),i=s.findOrCreateCondition(r);if(!i)throw new Error("Failed to add conditional rule");i.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),s=0;sa.has(f.query));c>-1?r.splice(c,0,l):r.push(l)};for(var[s,i]of this.precedenceLookup.entries())n(i);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:s}of this.getSortedRuleset()){var i={};for(var o of n)i[o.selector]=o.rule;Object.assign(i,...s.renderToArray()),e.push({[r]:i})}return e}}var $Y={":-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},KRe=Object.keys($Y),QRe=$Y,QM,YM=(t,e)=>new Error(ao(QM||(QM=x_([` + `])),r(),"`${parent} &`","`${parent} &:hover`","`& ${child}`","`${parent} &`","`& h1`","`${parent} h1`"))}})};class t2{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 t2},this.ruleset.set(e,r)),r}getConditionalRulesetByPath(e){var r=this;for(var n of e){var s=r.findOrCreateCondition(n);r=s.children}return r}addRule(e,r,n){var s=this.getConditionalRulesetByPath(n),i=s.findOrCreateCondition(r);if(!i)throw new Error("Failed to add conditional rule");i.rules.push(e)}addConditionPrecedence(e,r){for(var n=this.getConditionalRulesetByPath(e),s=0;sa.has(f.query));c>-1?r.splice(c,0,l):r.push(l)};for(var[s,i]of this.precedenceLookup.entries())n(i);return r}renderToArray(){var e=[];for(var{query:r,rules:n,children:s}of this.getSortedRuleset()){var i={};for(var o of n)i[o.selector]=o.rule;Object.assign(i,...s.renderToArray()),e.push({[r]:i})}return e}}var $Y={":-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},KRe=Object.keys($Y),QRe=$Y,YM,JM=(t,e)=>new Error(lo(YM||(YM=C_([` Invalid media query: "`,`" `,` Read more on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries - `])),t,e)),YRe=t=>{if(t==="@media ")throw YM(t,"Query is empty");try{ORe(t)}catch(e){throw YM(t,e.message)}},JRe=["vars"],XRe=["content"],ZRe={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 eIe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function tIe(t,e,r,n){var s=t.slice(0,e),i=t.slice(r);return"".concat(s).concat(n).concat(i)}var rIe=" ",k1=[...KRe,"@media","@supports","@container","selectors"];class nIe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new e2],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new vk(e),this.composedClassLists=r.map(n=>{var{identifier:s,classList:i}=n;return{identifier:s,regex:RegExp("(".concat(i,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){this.keyframesRules.push(e);return}var r=S1(e.rule,k1);this.addRule({selector:e.selector,rule:r}),this.currConditionalRuleset=new e2,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 n=this.conditionalRulesets[this.conditionalRulesets.length-1];n.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var i=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},i,o)}addRule(e){var r=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}pixelifyProperties(e){return E1(e,(r,n)=>{typeof r=="number"&&r!==0&&!ZRe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=GM(e,JRe);return r?_v(_v({},qRe(r,(s,i)=>rRe(i))),n):n}transformContent(e){var{content:r}=e,n=GM(e,XRe);if(typeof r>"u")return n;var s=Array.isArray(r)?r:[r];return _v({content:s.map(i=>i&&(i.includes('"')||i.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(i))?i:'"'.concat(i,'"'))},n)}transformClassname(e){return".".concat(S_(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(i,()=>(bY(h),h))};for(var{identifier:s,regex:i}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,l=o.length-1;l>=0;l--){var[c,[f]]=o[l],u=c-f.length+1;u>=a||(a=u,r[u-1]!=="."&&(r=tIe(r,u,c+1,this.transformClassname(f))))}return r}transformSelectors(e,r,n){E1(r.selectors,(s,i)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(i.replace(RegExp("&","g"),e.selector));GRe(o,e.selector);var a={selector:o,rule:S1(s,k1)};n?this.addConditionalRule(a,n):this.addRule(a);var l={type:"selector",selector:o,rule:s};this.transformSupports(l,s["@supports"],n),this.transformMedia(l,s["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@media ".concat(i))),E1(r,(i,o)=>{var a="@media ".concat(o);YRe(a);var l=[...n,a];this.addConditionalRule({selector:e.selector,rule:S1(i,k1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformContainer(e,i["@container"],l)})}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@container ".concat(i))),E1(r,(i,o)=>{var a="@container ".concat(o),l=[...n,a];this.addConditionalRule({selector:e.selector,rule:S1(i,k1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformMedia(e,i["@media"],l)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@supports ".concat(i))),E1(r,(i,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:S1(i,k1)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformMedia(e,i["@media"],a),this.transformContainer(e,i["@container"],a)})}}transformSimplePseudos(e,r,n){for(var s of Object.keys(r))if(QRe[s]){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(s),rule:r[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:r[s]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(Yu({"@font-face":r}));for(var n of this.keyframesRules)e.push(Yu({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.rules)e.push(Yu({[s.selector]:s.rule}));for(var i of this.conditionalRulesets)for(var o of i.renderToArray())e.push(Yu(o));return e.filter(Boolean)}}function Yu(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(c=>Yu({[o]:c},e)));else if(a&&typeof a=="object"){var l=Object.keys(a).length===0;l||r.push("".concat(e).concat(o,` { -`).concat(Yu(a,e+rIe),` + `])),t,e)),YRe=t=>{if(t==="@media ")throw JM(t,"Query is empty");try{ORe(t)}catch(e){throw JM(t,e.message)}},JRe=["vars"],XRe=["content"],ZRe={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 eIe(t){return t.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function tIe(t,e,r,n){var s=t.slice(0,e),i=t.slice(r);return"".concat(s).concat(n).concat(i)}var rIe=" ",$1=[...KRe,"@media","@supports","@container","selectors"];class nIe{constructor(e,r){this.rules=[],this.conditionalRulesets=[new t2],this.fontFaceRules=[],this.keyframesRules=[],this.localClassNamesMap=new Map(e.map(n=>[n,n])),this.localClassNamesSearch=new yk(e),this.composedClassLists=r.map(n=>{var{identifier:s,classList:i}=n;return{identifier:s,regex:RegExp("(".concat(i,")"),"g")}}).reverse()}processCssObj(e){if(e.type==="fontFace"){this.fontFaceRules.push(e.rule);return}if(e.type==="keyframes"){this.keyframesRules.push(e);return}var r=k1(e.rule,$1);this.addRule({selector:e.selector,rule:r}),this.currConditionalRuleset=new t2,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 n=this.conditionalRulesets[this.conditionalRulesets.length-1];n.mergeIfCompatible(this.currConditionalRuleset)||this.conditionalRulesets.push(this.currConditionalRuleset)}addConditionalRule(e,r){var n=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),s=this.transformSelector(e.selector);if(!this.currConditionalRuleset)throw new Error("Couldn't add conditional rule");var i=r[r.length-1],o=r.slice(0,r.length-1);this.currConditionalRuleset.addRule({selector:s,rule:n},i,o)}addRule(e){var r=this.transformVars(this.transformContent(this.pixelifyProperties(e.rule))),n=this.transformSelector(e.selector);this.rules.push({selector:n,rule:r})}pixelifyProperties(e){return S1(e,(r,n)=>{typeof r=="number"&&r!==0&&!ZRe[n]&&(e[n]="".concat(r,"px"))}),e}transformVars(e){var{vars:r}=e,n=KM(e,JRe);return r?Pv(Pv({},qRe(r,(s,i)=>rRe(i))),n):n}transformContent(e){var{content:r}=e,n=KM(e,XRe);if(typeof r>"u")return n;var s=Array.isArray(r)?r:[r];return Pv({content:s.map(i=>i&&(i.includes('"')||i.includes("'")||/^([A-Za-z\-]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)(\s|$)/.test(i))?i:'"'.concat(i,'"'))},n)}transformClassname(e){return".".concat(k_(e,{isIdentifier:!0}))}transformSelector(e){var r=e,n=function(h){r=r.replace(i,()=>(bY(h),h))};for(var{identifier:s,regex:i}of this.composedClassLists)n(s);if(this.localClassNamesMap.has(r))return this.transformClassname(r);for(var o=this.localClassNamesSearch.search(r),a=r.length,l=o.length-1;l>=0;l--){var[c,[f]]=o[l],u=c-f.length+1;u>=a||(a=u,r[u-1]!=="."&&(r=tIe(r,u,c+1,this.transformClassname(f))))}return r}transformSelectors(e,r,n){S1(r.selectors,(s,i)=>{if(e.type!=="local")throw new Error("Selectors are not allowed within ".concat(e.type==="global"?'"globalStyle"':'"selectors"'));var o=this.transformSelector(i.replace(RegExp("&","g"),e.selector));GRe(o,e.selector);var a={selector:o,rule:k1(s,$1)};n?this.addConditionalRule(a,n):this.addRule(a);var l={type:"selector",selector:o,rule:s};this.transformSupports(l,s["@supports"],n),this.transformMedia(l,s["@media"],n)})}transformMedia(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@media ".concat(i))),S1(r,(i,o)=>{var a="@media ".concat(o);YRe(a);var l=[...n,a];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformContainer(e,i["@container"],l)})}}transformContainer(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@container ".concat(i))),S1(r,(i,o)=>{var a="@container ".concat(o),l=[...n,a];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},l),e.type==="local"&&(this.transformSimplePseudos(e,i,l),this.transformSelectors(e,i,l)),this.transformSupports(e,i["@supports"],l),this.transformMedia(e,i["@media"],l)})}}transformSupports(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r){var s;(s=this.currConditionalRuleset)===null||s===void 0||s.addConditionPrecedence(n,Object.keys(r).map(i=>"@supports ".concat(i))),S1(r,(i,o)=>{var a=[...n,"@supports ".concat(o)];this.addConditionalRule({selector:e.selector,rule:k1(i,$1)},a),e.type==="local"&&(this.transformSimplePseudos(e,i,a),this.transformSelectors(e,i,a)),this.transformMedia(e,i["@media"],a),this.transformContainer(e,i["@container"],a)})}}transformSimplePseudos(e,r,n){for(var s of Object.keys(r))if(QRe[s]){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(s),rule:r[s]},n):this.addRule({conditions:n,selector:"".concat(e.selector).concat(s),rule:r[s]})}}toCss(){var e=[];for(var r of this.fontFaceRules)e.push(Ju({"@font-face":r}));for(var n of this.keyframesRules)e.push(Ju({["@keyframes ".concat(n.name)]:n.rule}));for(var s of this.rules)e.push(Ju({[s.selector]:s.rule}));for(var i of this.conditionalRulesets)for(var o of i.renderToArray())e.push(Ju(o));return e.filter(Boolean)}}function Ju(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(c=>Ju({[o]:c},e)));else if(a&&typeof a=="object"){var l=Object.keys(a).length===0;l||r.push("".concat(e).concat(o,` { +`).concat(Ju(a,e+rIe),` `).concat(e,"}"))}else r.push("".concat(e).concat(o.startsWith("--")?o:eIe(o),": ").concat(a,";"))};for(var s of Object.keys(t))n(s);return r.join(` -`)}function sIe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,s=new nIe(e,n);for(var i of r)s.processCssObj(i);return s.toCss()}function AY(t){for(var e=0,r,n=0,s=t.length;s>=4;++n,s-=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(s){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 gk={},iIe={get exports(){return gk},set exports(t){gk=t}},g5,JM;function oIe(){return JM||(JM=1,g5={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]}),g5}var b5,XM;function _Y(){if(XM)return b5;XM=1;const t=oIe(),e={};for(const s of Object.keys(t))e[t[s]]=s;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"]}};b5=r;for(const s of Object.keys(r)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);const{channels:i,labels:o}=r[s];delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:i}),Object.defineProperty(r[s],"labels",{value:o})}r.rgb.hsl=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(i,o,a),c=Math.max(i,o,a),f=c-l;let u,d;c===l?u=0:i===c?u=(o-a)/f:o===c?u=2+(a-i)/f:a===c&&(u=4+(i-o)/f),u=Math.min(u*60,360),u<0&&(u+=360);const h=(l+c)/2;return c===l?d=0:h<=.5?d=f/(c+l):d=f/(2-c-l),[u,d*100,h*100]},r.rgb.hsv=function(s){let i,o,a,l,c;const f=s[0]/255,u=s[1]/255,d=s[2]/255,h=Math.max(f,u,d),v=h-Math.min(f,u,d),y=function(b){return(h-b)/6/v+1/2};return v===0?(l=0,c=0):(c=v/h,i=y(f),o=y(u),a=y(d),f===h?l=a-o:u===h?l=1/3+i-a:d===h&&(l=2/3+o-i),l<0?l+=1:l>1&&(l-=1)),[l*360,c*100,h*100]},r.rgb.hwb=function(s){const i=s[0],o=s[1];let a=s[2];const l=r.rgb.hsl(s)[0],c=1/255*Math.min(i,Math.min(o,a));return a=1-1/255*Math.max(i,Math.max(o,a)),[l,c*100,a*100]},r.rgb.cmyk=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(1-i,1-o,1-a),c=(1-i-l)/(1-l)||0,f=(1-o-l)/(1-l)||0,u=(1-a-l)/(1-l)||0;return[c*100,f*100,u*100,l*100]};function n(s,i){return(s[0]-i[0])**2+(s[1]-i[1])**2+(s[2]-i[2])**2}return r.rgb.keyword=function(s){const i=e[s];if(i)return i;let o=1/0,a;for(const l of Object.keys(t)){const c=t[l],f=n(s,c);f.04045?((i+.055)/1.055)**2.4:i/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 l=i*.4124+o*.3576+a*.1805,c=i*.2126+o*.7152+a*.0722,f=i*.0193+o*.1192+a*.9505;return[l*100,c*100,f*100]},r.rgb.lab=function(s){const i=r.rgb.xyz(s);let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,f=500*(o-a),u=200*(a-l);return[c,f,u]},r.hsl.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;let l,c,f;if(o===0)return f=a*255,[f,f,f];a<.5?l=a*(1+o):l=a+o-a*o;const u=2*a-l,d=[0,0,0];for(let h=0;h<3;h++)c=i+1/3*-(h-1),c<0&&c++,c>1&&c--,6*c<1?f=u+(l-u)*6*c:2*c<1?f=l:3*c<2?f=u+(l-u)*(2/3-c)*6:f=u,d[h]=f*255;return d},r.hsl.hsv=function(s){const i=s[0];let o=s[1]/100,a=s[2]/100,l=o;const c=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,l*=c<=1?c:2-c;const f=(a+o)/2,u=a===0?2*l/(c+l):2*o/(a+o);return[i,u*100,f*100]},r.hsv.rgb=function(s){const i=s[0]/60,o=s[1]/100;let a=s[2]/100;const l=Math.floor(i)%6,c=i-Math.floor(i),f=255*a*(1-o),u=255*a*(1-o*c),d=255*a*(1-o*(1-c));switch(a*=255,l){case 0:return[a,d,f];case 1:return[u,a,f];case 2:return[f,a,d];case 3:return[f,u,a];case 4:return[d,f,a];case 5:return[a,f,u]}},r.hsv.hsl=function(s){const i=s[0],o=s[1]/100,a=s[2]/100,l=Math.max(a,.01);let c,f;f=(2-o)*a;const u=(2-o)*l;return c=o*l,c/=u<=1?u:2-u,c=c||0,f/=2,[i,c*100,f*100]},r.hwb.rgb=function(s){const i=s[0]/360;let o=s[1]/100,a=s[2]/100;const l=o+a;let c;l>1&&(o/=l,a/=l);const f=Math.floor(6*i),u=1-a;c=6*i-f,f&1&&(c=1-c);const d=o+c*(u-o);let h,v,y;switch(f){default:case 6:case 0:h=u,v=d,y=o;break;case 1:h=d,v=u,y=o;break;case 2:h=o,v=u,y=d;break;case 3:h=o,v=d,y=u;break;case 4:h=d,v=o,y=u;break;case 5:h=u,v=o,y=d;break}return[h*255,v*255,y*255]},r.cmyk.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100,l=s[3]/100,c=1-Math.min(1,i*(1-l)+l),f=1-Math.min(1,o*(1-l)+l),u=1-Math.min(1,a*(1-l)+l);return[c*255,f*255,u*255]},r.xyz.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100;let l,c,f;return l=i*3.2406+o*-1.5372+a*-.4986,c=i*-.9689+o*1.8758+a*.0415,f=i*.0557+o*-.204+a*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,l=Math.min(Math.max(0,l),1),c=Math.min(Math.max(0,c),1),f=Math.min(Math.max(0,f),1),[l*255,c*255,f*255]},r.xyz.lab=function(s){let i=s[0],o=s[1],a=s[2];i/=95.047,o/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+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 l=116*o-16,c=500*(i-o),f=200*(o-a);return[l,c,f]},r.lab.xyz=function(s){const i=s[0],o=s[1],a=s[2];let l,c,f;c=(i+16)/116,l=o/500+c,f=c-a/200;const u=c**3,d=l**3,h=f**3;return c=u>.008856?u:(c-16/116)/7.787,l=d>.008856?d:(l-16/116)/7.787,f=h>.008856?h:(f-16/116)/7.787,l*=95.047,c*=100,f*=108.883,[l,c,f]},r.lab.lch=function(s){const i=s[0],o=s[1],a=s[2];let l;l=Math.atan2(a,o)*360/2/Math.PI,l<0&&(l+=360);const f=Math.sqrt(o*o+a*a);return[i,f,l]},r.lch.lab=function(s){const i=s[0],o=s[1],l=s[2]/360*2*Math.PI,c=o*Math.cos(l),f=o*Math.sin(l);return[i,c,f]},r.rgb.ansi16=function(s,i=null){const[o,a,l]=s;let c=i===null?r.rgb.hsv(s)[2]:i;if(c=Math.round(c/50),c===0)return 30;let f=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return c===2&&(f+=60),f},r.hsv.ansi16=function(s){return r.rgb.ansi16(r.hsv.rgb(s),s[2])},r.rgb.ansi256=function(s){const i=s[0],o=s[1],a=s[2];return i===o&&o===a?i<8?16:i>248?231:Math.round((i-8)/247*24)+232:16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(s){let i=s%10;if(i===0||i===7)return s>50&&(i+=3.5),i=i/10.5*255,[i,i,i];const o=(~~(s>50)+1)*.5,a=(i&1)*o*255,l=(i>>1&1)*o*255,c=(i>>2&1)*o*255;return[a,l,c]},r.ansi256.rgb=function(s){if(s>=232){const c=(s-232)*10+8;return[c,c,c]}s-=16;let i;const o=Math.floor(s/36)/5*255,a=Math.floor((i=s%36)/6)/5*255,l=i%6/5*255;return[o,a,l]},r.rgb.hex=function(s){const o=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(s){const i=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];let o=i[0];i[0].length===3&&(o=o.split("").map(u=>u+u).join(""));const a=parseInt(o,16),l=a>>16&255,c=a>>8&255,f=a&255;return[l,c,f]},r.rgb.hcg=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.max(Math.max(i,o),a),c=Math.min(Math.min(i,o),a),f=l-c;let u,d;return f<1?u=c/(1-f):u=0,f<=0?d=0:l===i?d=(o-a)/f%6:l===o?d=2+(a-i)/f:d=4+(i-o)/f,d/=6,d%=1,[d*360,f*100,u*100]},r.hsl.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=o<.5?2*i*o:2*i*(1-o);let l=0;return a<1&&(l=(o-.5*a)/(1-a)),[s[0],a*100,l*100]},r.hsv.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=i*o;let l=0;return a<1&&(l=(o-a)/(1-a)),[s[0],a*100,l*100]},r.hcg.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;if(o===0)return[a*255,a*255,a*255];const l=[0,0,0],c=i%1*6,f=c%1,u=1-f;let d=0;switch(Math.floor(c)){case 0:l[0]=1,l[1]=f,l[2]=0;break;case 1:l[0]=u,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=f;break;case 3:l[0]=0,l[1]=u,l[2]=1;break;case 4:l[0]=f,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=u}return d=(1-o)*a,[(o*l[0]+d)*255,(o*l[1]+d)*255,(o*l[2]+d)*255]},r.hcg.hsv=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);let l=0;return a>0&&(l=i/a),[s[0],l*100,a*100]},r.hcg.hsl=function(s){const i=s[1]/100,a=s[2]/100*(1-i)+.5*i;let l=0;return a>0&&a<.5?l=i/(2*a):a>=.5&&a<1&&(l=i/(2*(1-a))),[s[0],l*100,a*100]},r.hcg.hwb=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);return[s[0],(a-i)*100,(1-a)*100]},r.hwb.hcg=function(s){const i=s[1]/100,a=1-s[2]/100,l=a-i;let c=0;return l<1&&(c=(a-l)/(1-l)),[s[0],l*100,c*100]},r.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},r.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},r.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},r.gray.hsl=function(s){return[0,0,s[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(s){return[0,100,s[0]]},r.gray.cmyk=function(s){return[0,0,0,s[0]]},r.gray.lab=function(s){return[s[0],0,0]},r.gray.hex=function(s){const i=Math.round(s[0]/100*255)&255,a=((i<<16)+(i<<8)+i).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]},b5}var w5,ZM;function aIe(){if(ZM)return w5;ZM=1;const t=_Y();function e(){const i={},o=Object.keys(t);for(let a=o.length,l=0;l1&&(l=c),o(l))};return"conversion"in o&&(a.conversion=o.conversion),a}function i(o){const a=function(...l){const c=l[0];if(c==null)return c;c.length>1&&(l=c);const f=o(l);if(typeof f=="object")for(let u=f.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(c=>{const f=a[c];r[o][c]=i(f),r[o][c].raw=s(f)})}),x5=r,x5}(function(t){const e=(f,u)=>(...d)=>`\x1B[${f(...d)+u}m`,r=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};5;${h}m`},n=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};2;${h[0]};${h[1]};${h[2]}m`},s=f=>f,i=(f,u,d)=>[f,u,d],o=(f,u,d)=>{Object.defineProperty(f,u,{get:()=>{const h=d();return Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const l=(f,u,d,h)=>{a===void 0&&(a=lIe());const v=h?10:0,y={};for(const[b,p]of Object.entries(a)){const g=b==="ansi16"?"ansi":b;b===u?y[g]=f(d,v):typeof p=="object"&&(y[g]=f(p[u],v))}return y};function c(){const f=new Map,u={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]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[d,h]of Object.entries(u)){for(const[v,y]of Object.entries(h))u[v]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},h[v]=u[v],f.set(y[0],y[1]);Object.defineProperty(u,d,{value:h,enumerable:!1})}return Object.defineProperty(u,"codes",{value:f,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",o(u.color,"ansi",()=>l(e,"ansi16",s,!1)),o(u.color,"ansi256",()=>l(r,"ansi256",s,!1)),o(u.color,"ansi16m",()=>l(n,"rgb",i,!1)),o(u.bgColor,"ansi",()=>l(e,"ansi16",s,!0)),o(u.bgColor,"ansi256",()=>l(r,"ansi256",s,!0)),o(u.bgColor,"ansi16m",()=>l(n,"rgb",i,!0)),u}Object.defineProperty(t,"exports",{enumerable:!0,get:c})})(iIe);var cIe={stdout:!1,stderr:!1};const fIe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const s=e.length;let i=0,o="";do o+=t.substr(i,n-i)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return o+=t.substr(i),o},uIe=(t,e,r,n)=>{let s=0,i="";do{const o=t[n-1]==="\r";i+=t.substr(s,(o?n-1:n)-s)+e+(o?`\r +`)}function sIe(t){var{localClassNames:e,cssObjs:r,composedClassLists:n}=t,s=new nIe(e,n);for(var i of r)s.processCssObj(i);return s.toCss()}function AY(t){for(var e=0,r,n=0,s=t.length;s>=4;++n,s-=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(s){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 bk={},iIe={get exports(){return bk},set exports(t){bk=t}},b5,XM;function oIe(){return XM||(XM=1,b5={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]}),b5}var w5,ZM;function _Y(){if(ZM)return w5;ZM=1;const t=oIe(),e={};for(const s of Object.keys(t))e[t[s]]=s;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"]}};w5=r;for(const s of Object.keys(r)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);const{channels:i,labels:o}=r[s];delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:i}),Object.defineProperty(r[s],"labels",{value:o})}r.rgb.hsl=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(i,o,a),c=Math.max(i,o,a),f=c-l;let u,d;c===l?u=0:i===c?u=(o-a)/f:o===c?u=2+(a-i)/f:a===c&&(u=4+(i-o)/f),u=Math.min(u*60,360),u<0&&(u+=360);const h=(l+c)/2;return c===l?d=0:h<=.5?d=f/(c+l):d=f/(2-c-l),[u,d*100,h*100]},r.rgb.hsv=function(s){let i,o,a,l,c;const f=s[0]/255,u=s[1]/255,d=s[2]/255,h=Math.max(f,u,d),v=h-Math.min(f,u,d),y=function(g){return(h-g)/6/v+1/2};return v===0?(l=0,c=0):(c=v/h,i=y(f),o=y(u),a=y(d),f===h?l=a-o:u===h?l=1/3+i-a:d===h&&(l=2/3+o-i),l<0?l+=1:l>1&&(l-=1)),[l*360,c*100,h*100]},r.rgb.hwb=function(s){const i=s[0],o=s[1];let a=s[2];const l=r.rgb.hsl(s)[0],c=1/255*Math.min(i,Math.min(o,a));return a=1-1/255*Math.max(i,Math.max(o,a)),[l,c*100,a*100]},r.rgb.cmyk=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.min(1-i,1-o,1-a),c=(1-i-l)/(1-l)||0,f=(1-o-l)/(1-l)||0,u=(1-a-l)/(1-l)||0;return[c*100,f*100,u*100,l*100]};function n(s,i){return(s[0]-i[0])**2+(s[1]-i[1])**2+(s[2]-i[2])**2}return r.rgb.keyword=function(s){const i=e[s];if(i)return i;let o=1/0,a;for(const l of Object.keys(t)){const c=t[l],f=n(s,c);f.04045?((i+.055)/1.055)**2.4:i/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 l=i*.4124+o*.3576+a*.1805,c=i*.2126+o*.7152+a*.0722,f=i*.0193+o*.1192+a*.9505;return[l*100,c*100,f*100]},r.rgb.lab=function(s){const i=r.rgb.xyz(s);let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,f=500*(o-a),u=200*(a-l);return[c,f,u]},r.hsl.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;let l,c,f;if(o===0)return f=a*255,[f,f,f];a<.5?l=a*(1+o):l=a+o-a*o;const u=2*a-l,d=[0,0,0];for(let h=0;h<3;h++)c=i+1/3*-(h-1),c<0&&c++,c>1&&c--,6*c<1?f=u+(l-u)*6*c:2*c<1?f=l:3*c<2?f=u+(l-u)*(2/3-c)*6:f=u,d[h]=f*255;return d},r.hsl.hsv=function(s){const i=s[0];let o=s[1]/100,a=s[2]/100,l=o;const c=Math.max(a,.01);a*=2,o*=a<=1?a:2-a,l*=c<=1?c:2-c;const f=(a+o)/2,u=a===0?2*l/(c+l):2*o/(a+o);return[i,u*100,f*100]},r.hsv.rgb=function(s){const i=s[0]/60,o=s[1]/100;let a=s[2]/100;const l=Math.floor(i)%6,c=i-Math.floor(i),f=255*a*(1-o),u=255*a*(1-o*c),d=255*a*(1-o*(1-c));switch(a*=255,l){case 0:return[a,d,f];case 1:return[u,a,f];case 2:return[f,a,d];case 3:return[f,u,a];case 4:return[d,f,a];case 5:return[a,f,u]}},r.hsv.hsl=function(s){const i=s[0],o=s[1]/100,a=s[2]/100,l=Math.max(a,.01);let c,f;f=(2-o)*a;const u=(2-o)*l;return c=o*l,c/=u<=1?u:2-u,c=c||0,f/=2,[i,c*100,f*100]},r.hwb.rgb=function(s){const i=s[0]/360;let o=s[1]/100,a=s[2]/100;const l=o+a;let c;l>1&&(o/=l,a/=l);const f=Math.floor(6*i),u=1-a;c=6*i-f,f&1&&(c=1-c);const d=o+c*(u-o);let h,v,y;switch(f){default:case 6:case 0:h=u,v=d,y=o;break;case 1:h=d,v=u,y=o;break;case 2:h=o,v=u,y=d;break;case 3:h=o,v=d,y=u;break;case 4:h=d,v=o,y=u;break;case 5:h=u,v=o,y=d;break}return[h*255,v*255,y*255]},r.cmyk.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100,l=s[3]/100,c=1-Math.min(1,i*(1-l)+l),f=1-Math.min(1,o*(1-l)+l),u=1-Math.min(1,a*(1-l)+l);return[c*255,f*255,u*255]},r.xyz.rgb=function(s){const i=s[0]/100,o=s[1]/100,a=s[2]/100;let l,c,f;return l=i*3.2406+o*-1.5372+a*-.4986,c=i*-.9689+o*1.8758+a*.0415,f=i*.0557+o*-.204+a*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,l=Math.min(Math.max(0,l),1),c=Math.min(Math.max(0,c),1),f=Math.min(Math.max(0,f),1),[l*255,c*255,f*255]},r.xyz.lab=function(s){let i=s[0],o=s[1],a=s[2];i/=95.047,o/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+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 l=116*o-16,c=500*(i-o),f=200*(o-a);return[l,c,f]},r.lab.xyz=function(s){const i=s[0],o=s[1],a=s[2];let l,c,f;c=(i+16)/116,l=o/500+c,f=c-a/200;const u=c**3,d=l**3,h=f**3;return c=u>.008856?u:(c-16/116)/7.787,l=d>.008856?d:(l-16/116)/7.787,f=h>.008856?h:(f-16/116)/7.787,l*=95.047,c*=100,f*=108.883,[l,c,f]},r.lab.lch=function(s){const i=s[0],o=s[1],a=s[2];let l;l=Math.atan2(a,o)*360/2/Math.PI,l<0&&(l+=360);const f=Math.sqrt(o*o+a*a);return[i,f,l]},r.lch.lab=function(s){const i=s[0],o=s[1],l=s[2]/360*2*Math.PI,c=o*Math.cos(l),f=o*Math.sin(l);return[i,c,f]},r.rgb.ansi16=function(s,i=null){const[o,a,l]=s;let c=i===null?r.rgb.hsv(s)[2]:i;if(c=Math.round(c/50),c===0)return 30;let f=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(o/255));return c===2&&(f+=60),f},r.hsv.ansi16=function(s){return r.rgb.ansi16(r.hsv.rgb(s),s[2])},r.rgb.ansi256=function(s){const i=s[0],o=s[1],a=s[2];return i===o&&o===a?i<8?16:i>248?231:Math.round((i-8)/247*24)+232:16+36*Math.round(i/255*5)+6*Math.round(o/255*5)+Math.round(a/255*5)},r.ansi16.rgb=function(s){let i=s%10;if(i===0||i===7)return s>50&&(i+=3.5),i=i/10.5*255,[i,i,i];const o=(~~(s>50)+1)*.5,a=(i&1)*o*255,l=(i>>1&1)*o*255,c=(i>>2&1)*o*255;return[a,l,c]},r.ansi256.rgb=function(s){if(s>=232){const c=(s-232)*10+8;return[c,c,c]}s-=16;let i;const o=Math.floor(s/36)/5*255,a=Math.floor((i=s%36)/6)/5*255,l=i%6/5*255;return[o,a,l]},r.rgb.hex=function(s){const o=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.hex.rgb=function(s){const i=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!i)return[0,0,0];let o=i[0];i[0].length===3&&(o=o.split("").map(u=>u+u).join(""));const a=parseInt(o,16),l=a>>16&255,c=a>>8&255,f=a&255;return[l,c,f]},r.rgb.hcg=function(s){const i=s[0]/255,o=s[1]/255,a=s[2]/255,l=Math.max(Math.max(i,o),a),c=Math.min(Math.min(i,o),a),f=l-c;let u,d;return f<1?u=c/(1-f):u=0,f<=0?d=0:l===i?d=(o-a)/f%6:l===o?d=2+(a-i)/f:d=4+(i-o)/f,d/=6,d%=1,[d*360,f*100,u*100]},r.hsl.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=o<.5?2*i*o:2*i*(1-o);let l=0;return a<1&&(l=(o-.5*a)/(1-a)),[s[0],a*100,l*100]},r.hsv.hcg=function(s){const i=s[1]/100,o=s[2]/100,a=i*o;let l=0;return a<1&&(l=(o-a)/(1-a)),[s[0],a*100,l*100]},r.hcg.rgb=function(s){const i=s[0]/360,o=s[1]/100,a=s[2]/100;if(o===0)return[a*255,a*255,a*255];const l=[0,0,0],c=i%1*6,f=c%1,u=1-f;let d=0;switch(Math.floor(c)){case 0:l[0]=1,l[1]=f,l[2]=0;break;case 1:l[0]=u,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=f;break;case 3:l[0]=0,l[1]=u,l[2]=1;break;case 4:l[0]=f,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=u}return d=(1-o)*a,[(o*l[0]+d)*255,(o*l[1]+d)*255,(o*l[2]+d)*255]},r.hcg.hsv=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);let l=0;return a>0&&(l=i/a),[s[0],l*100,a*100]},r.hcg.hsl=function(s){const i=s[1]/100,a=s[2]/100*(1-i)+.5*i;let l=0;return a>0&&a<.5?l=i/(2*a):a>=.5&&a<1&&(l=i/(2*(1-a))),[s[0],l*100,a*100]},r.hcg.hwb=function(s){const i=s[1]/100,o=s[2]/100,a=i+o*(1-i);return[s[0],(a-i)*100,(1-a)*100]},r.hwb.hcg=function(s){const i=s[1]/100,a=1-s[2]/100,l=a-i;let c=0;return l<1&&(c=(a-l)/(1-l)),[s[0],l*100,c*100]},r.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},r.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},r.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},r.gray.hsl=function(s){return[0,0,s[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(s){return[0,100,s[0]]},r.gray.cmyk=function(s){return[0,0,0,s[0]]},r.gray.lab=function(s){return[s[0],0,0]},r.gray.hex=function(s){const i=Math.round(s[0]/100*255)&255,a=((i<<16)+(i<<8)+i).toString(16).toUpperCase();return"000000".substring(a.length)+a},r.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]},w5}var x5,eD;function aIe(){if(eD)return x5;eD=1;const t=_Y();function e(){const i={},o=Object.keys(t);for(let a=o.length,l=0;l1&&(l=c),o(l))};return"conversion"in o&&(a.conversion=o.conversion),a}function i(o){const a=function(...l){const c=l[0];if(c==null)return c;c.length>1&&(l=c);const f=o(l);if(typeof f=="object")for(let u=f.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(c=>{const f=a[c];r[o][c]=i(f),r[o][c].raw=s(f)})}),C5=r,C5}(function(t){const e=(f,u)=>(...d)=>`\x1B[${f(...d)+u}m`,r=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};5;${h}m`},n=(f,u)=>(...d)=>{const h=f(...d);return`\x1B[${38+u};2;${h[0]};${h[1]};${h[2]}m`},s=f=>f,i=(f,u,d)=>[f,u,d],o=(f,u,d)=>{Object.defineProperty(f,u,{get:()=>{const h=d();return Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0}),h},enumerable:!0,configurable:!0})};let a;const l=(f,u,d,h)=>{a===void 0&&(a=lIe());const v=h?10:0,y={};for(const[g,b]of Object.entries(a)){const p=g==="ansi16"?"ansi":g;g===u?y[p]=f(d,v):typeof b=="object"&&(y[p]=f(b[u],v))}return y};function c(){const f=new Map,u={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]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(const[d,h]of Object.entries(u)){for(const[v,y]of Object.entries(h))u[v]={open:`\x1B[${y[0]}m`,close:`\x1B[${y[1]}m`},h[v]=u[v],f.set(y[0],y[1]);Object.defineProperty(u,d,{value:h,enumerable:!1})}return Object.defineProperty(u,"codes",{value:f,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",o(u.color,"ansi",()=>l(e,"ansi16",s,!1)),o(u.color,"ansi256",()=>l(r,"ansi256",s,!1)),o(u.color,"ansi16m",()=>l(n,"rgb",i,!1)),o(u.bgColor,"ansi",()=>l(e,"ansi16",s,!0)),o(u.bgColor,"ansi256",()=>l(r,"ansi256",s,!0)),o(u.bgColor,"ansi16m",()=>l(n,"rgb",i,!0)),u}Object.defineProperty(t,"exports",{enumerable:!0,get:c})})(iIe);var cIe={stdout:!1,stderr:!1};const fIe=(t,e,r)=>{let n=t.indexOf(e);if(n===-1)return t;const s=e.length;let i=0,o="";do o+=t.substr(i,n-i)+e+r,i=n+s,n=t.indexOf(e,i);while(n!==-1);return o+=t.substr(i),o},uIe=(t,e,r,n)=>{let s=0,i="";do{const o=t[n-1]==="\r";i+=t.substr(s,(o?n-1:n)-s)+e+(o?`\r `:` `)+r,s=n+1,n=t.indexOf(` -`,s)}while(n!==-1);return i+=t.substr(s),i};var dIe={stringReplaceAll:fIe,stringEncaseCRLFWithFirstIndex:uIe},C5,tD;function hIe(){if(tD)return C5;tD=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,s=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function i(c){const f=c[0]==="u",u=c[1]==="{";return f&&!u&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):f&&u?String.fromCodePoint(parseInt(c.slice(2,-1),16)):s.get(c)||c}function o(c,f){const u=[],d=f.trim().split(/\s*,\s*/g);let h;for(const v of d){const y=Number(v);if(!Number.isNaN(y))u.push(y);else if(h=v.match(r))u.push(h[2].replace(n,(b,p,g)=>p?i(p):g));else throw new Error(`Invalid Chalk template style argument: ${v} (in style '${c}')`)}return u}function a(c){e.lastIndex=0;const f=[];let u;for(;(u=e.exec(c))!==null;){const d=u[1];if(u[2]){const h=o(d,u[2]);f.push([d].concat(h))}else f.push([d])}return f}function l(c,f){const u={};for(const h of f)for(const v of h.styles)u[v[0]]=h.inverse?null:v.slice(1);let d=c;for(const[h,v]of Object.entries(u))if(Array.isArray(v)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=v.length>0?d[h](...v):d[h]}return d}return C5=(c,f)=>{const u=[],d=[];let h=[];if(f.replace(t,(v,y,b,p,g,w)=>{if(y)h.push(i(y));else if(p){const E=h.join("");h=[],d.push(u.length===0?E:l(c,u)(E)),u.push({inverse:b,styles:a(p)})}else if(g){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(l(c,u)(h.join(""))),h=[],u.pop()}else h.push(w)}),d.push(h.join("")),u.length>0){const v=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(v)}return d.join("")},C5}const Wy=gk,{stdout:bk,stderr:wk}=cIe,{stringReplaceAll:vIe,stringEncaseCRLFWithFirstIndex:yIe}=dIe,{isArray:t2}=Array,PY=["ansi","ansi","ansi256","ansi16m"],Gh=Object.create(null),mIe=(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=bk?bk.level:0;t.level=e.level===void 0?r:e.level};class pIe{constructor(e){return TY(e)}}const TY=t=>{const e={};return mIe(e,t),e.template=(...r)=>IY(e.template,...r),Object.setPrototypeOf(e,Mx.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=pIe,e.template};function Mx(t){return TY(t)}for(const[t,e]of Object.entries(Wy))Gh[t]={get(){const r=Dx(this,A_(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Gh.visible={get(){const t=Dx(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const RY=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of RY)Gh[t]={get(){const{level:e}=this;return function(...r){const n=A_(Wy.color[PY[e]][t](...r),Wy.color.close,this._styler);return Dx(this,n,this._isEmpty)}}};for(const t of RY){const e="bg"+t[0].toUpperCase()+t.slice(1);Gh[e]={get(){const{level:r}=this;return function(...n){const s=A_(Wy.bgColor[PY[r]][t](...n),Wy.bgColor.close,this._styler);return Dx(this,s,this._isEmpty)}}}}const gIe=Object.defineProperties(()=>{},{...Gh,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),A_=(t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},Dx=(t,e,r)=>{const n=(...s)=>t2(s[0])&&t2(s[0].raw)?rD(n,IY(n,...s)):rD(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,gIe),n._generator=t,n._styler=e,n._isEmpty=r,n},rD=(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:s}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=vIe(e,r.close,r.open),r=r.parent;const i=e.indexOf(` -`);return i!==-1&&(e=yIe(e,s,n,i)),n+e+s};let E5;const IY=(t,...e)=>{const[r]=e;if(!t2(r)||!t2(r.raw))return e.join(" ");const n=e.slice(1),s=[r.raw[0]];for(let i=1;i{S5.push(t)},registerClassName:t=>{sD.add(t)},registerComposition:t=>{iD.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=sIe({localClassNames:Array.from(sD),composedClassLists:iD,cssObjs:S5}).join(` -`);tRe({fileScope:t,css:e}),S5=[]},getIdentOption:()=>"short"};Q9e(OIe);function r2(t,e){return r2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},r2(t,e)}function MIe(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&&r2(t,e)}function xk(){xk=function(s,i){return new r(s,void 0,i)};var t=RegExp.prototype,e=new WeakMap;function r(s,i,o){var a=new RegExp(s,i);return e.set(a,o||e.get(s)),r2(a,r.prototype)}function n(s,i){var o=e.get(i);return Object.keys(o).reduce(function(a,l){var c=o[l];if(typeof c=="number")a[l]=s[c];else{for(var f=0;s[c[f]]===void 0&&f+1]+)>/g,function(l,c){var f=o[c];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof i=="function"){var a=this;return t[Symbol.replace].call(this,s,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(n(l,a)),i.apply(this,l)})}return t[Symbol.replace].call(this,s,i)},xk.apply(this,arguments)}function DIe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:s}=Zf(),i=s.match(xk(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(i&&i.groups){var{dir:o,file:a}=i.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function P_(t){var{debugId:e,debugFileName:r=!0}=_v(_v({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),n=eRe().toString(36),{filePath:s,packageName:i}=Zf(),o=AY(i?"".concat(i).concat(s):s),a="".concat(o).concat(n);if(Z9e()==="debug"){var l=DIe({debugId:e,debugFileName:r});l&&(a="".concat(l,"__").concat(a))}return a.match(/^[0-9]/)?"_".concat(a):a}function NIe(t,e){var r=P_(e);gY(r);var n=[],s=[];for(var i of t)typeof i=="string"?n.push(i):s.push(i);var o=r;if(n.length>0&&(o="".concat(r," ").concat(WRe(n)),J9e({identifier:r,classList:o}),s.length>0&&bY(r)),s.length>0){var a=IIe.all(s,{arrayMerge:(l,c)=>c});Ox({type:"local",selector:r,rule:a},Zf())}return o}function js(t,e){if(Array.isArray(t))return NIe(t,e);var r=P_(e);return gY(r),Ox({type:"local",selector:r,rule:t},Zf()),r}function Gi(t,e){Ox({type:"global",selector:t,rule:e},Zf())}function MY(t,e){var r=S_(P_(e),{isIdentifier:!0});return Ox({type:"keyframes",name:r,rule:t},Zf()),r}function ah(){return ah=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const jIe=["createConnector"],FIe=t=>{const e=[],r=t.find(s=>s.id==="injected");return t.filter(s=>!r||!r.hideConnectorId?!0:s.id!==r.hideConnectorId).forEach(s=>{const i=LIe(s,jIe),o=s.createConnector(),a=ah({},i),c=((f,u)=>{const d=f;return d._wallet=ah({},u),d})(o,a);e.push(c)}),e},BIe=t=>/^\S+@\S+\.\S{2,}$/.test(t),oD={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"}},Mr=t=>oD[t]||oD[1],eu=()=>{const t=P.createContext(void 0);return[()=>{const r=P.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},T_=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{}}},UIe=(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"}},zIe=(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 VIe(t){var e,r;const{account:n,chain:s,transport:i}=t,o={chainId:s.id,name:s.name,ensAddress:(e=s.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return new cB(i,o).getSigner(n.address)}function qIe(t){var e,r;const{chain:n,transport:s}=t,i={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return s.type==="fallback"?new koe(s.transports.map(({value:o})=>new ga(o==null?void 0:o.url,i))):new ga(s.url,i)}let Cs=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t}({});const k5={showEmailInput:!0,miniAuthOptions:["google","discord","facebook","apple"],authOptions:["metamask","wallet-connect"]},DY=60*60*24*7,WIe=async t=>{const e=localStorage.getItem(Cs.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(Cs.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),s=t.account.address,i=new Bw;i.address=s,i.claims.app=n.app||"app",i.claims.ogn=n.origin,i.claims.n=n.nonce,i.setExpiryIn(n.expiry?Math.max(n.expiry,200):DY);const o=i.messageTypedData();o.domain.verifyingContract;const l=await VIe(t)._signTypedData(o.domain,o.types,o.message);i.signature=l;const f=await new Ry().encodeProof(i,!0);return{typedData:o,proofString:f}},HIe=async(t,e,r)=>{const n=t.account.address,i=await new Ry().decodeProof(r.proofString,!0),o=qIe(e);return await tG.utils.isValidTypedDataSignature(n,r.typedData,i.signature,o)},[GIe,KIe]=eu(),QIe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=GIe();return{setOpenConnectModal:t,openConnectModalState:e}},[YIe,JIe]=eu(),Da=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=YIe();return{setTheme:t,theme:e,position:r,setPosition:n}},[XIe,ZIe]=eu(),eOe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=XIe();return{displayedAssets:e,setDisplayedAssets:t}};Jf("packages/kit/src/components/styles.css.ts","kit");const tOe=js({maxWidth:"400px",width:"100%",":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"networkButton"),Xm=js({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Ck=js({},"walletLogoContainer");Gi(`${Ck} svg`,{height:"40px"});const NY=js({},"walletLogoContainerExtended");Gi(`${NY} svg`,{width:"30px"});const R_=js({},"walletContent");Gi(`${R_} + button`,{backgroundColor:"transparent"});Gi(`${R_} + button > svg`,{width:"20px",height:"20px"});Xf();const rOe=({onConnect:t,connectors:e})=>{const{theme:r}=Da(),{connectors:n,connect:s,isLoading:i}=Oq();return P.createElement(W,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(o=>{const a=r==="dark"?o._wallet.logoDark:o._wallet.logoLight,l=o._wallet.name;return P.createElement(W,{key:o.id,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:tOe,onClick:()=>t(o)},P.createElement(re,{variant:"medium"},l,i),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{backgroundColor:o._wallet.iconBackground},borderRadius:"md",className:NY},P.createElement(a,null)))}))},nOe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrlDarkMode:r,logoUrlLightMode:n}=e,{theme:s}=Da();return P.createElement(P.Fragment,null,s==="dark"&&r&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:r,style:{height:"110px"}})),s==="light"&&n&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:n,style:{height:"110px"}})))},sOe=t=>{const{isConnected:e}=Pn(),{theme:r}=Da(),{config:n={}}=t,{signIn:s={}}=n,{showEmailInput:i=k5.showEmailInput,authOptions:o=k5.authOptions,miniAuthOptions:a=k5.miniAuthOptions}=s,{openConnectModal:l,setOpenConnectModal:c}=t,[f,u]=m.useState(""),{connectors:d,connect:h,isLoading:v}=Oq(),y=d,[b,p]=m.useState(!1),g=y.find(j=>j._wallet.id==="email"),w=y.filter(j=>!!o.find(U=>U===j._wallet.id)),E=y.filter(j=>!!a.find(U=>U===j._wallet.id)),k=w.length>6,$=j=>{u(j.target.value)};m.useEffect(()=>{e&&l&&c(!1)},[e,l]);const C=j=>{if(j._wallet.id==="email"){const F=prompt("Auto-email login, please specify the email address:");localStorage.setItem(dk,F||"")}h({connector:j})},T=j=>{j.preventDefault(),localStorage.setItem(dk,f),h({connector:g})};return b?P.createElement(P.Fragment,null,P.createElement(W,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>p(!1),className:Xm},P.createElement(nw,null)),P.createElement(rOe,{connectors:w,onConnect:C})):P.createElement(P.Fragment,null,P.createElement(nOe,{config:n}),P.createElement(W,{marginTop:"5"},g&&i&&P.createElement(P.Fragment,null,P.createElement("form",{onSubmit:T},P.createElement(lc,{onChange:$,value:f,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),P.createElement(nt,{type:"submit",disabled:!BIe(f),marginTop:"4",width:"full",label:"Continue",rightIcon:Mi}))),E.length>0&&P.createElement(P.Fragment,null,g&&i&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ly,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or sign in via"))),P.createElement(W,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},E.slice(0,6).map(j=>{const F=r==="dark"?j._wallet.miniLogoDark||j._wallet.logoDark:j._wallet.miniLogoLight||j._wallet.logoLight;return P.createElement(Oo,{key:j._wallet.id,className:Xm,justifyContent:"center",alignItems:"center",onClick:()=>C(j),aspectRatio:"1/1",style:{width:`calc(25% - ${ge.space[2]})`}},P.createElement(W,{className:Ck,flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(F,null)))}))),w.length>0&&P.createElement(P.Fragment,null,(g&&i||E.length>0)&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ly,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or select a wallet"))),P.createElement(W,{marginTop:"3",gap:"3",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},w.slice(0,6).map(j=>{const F=r==="dark"?j._wallet.logoDark:j._wallet.logoLight;return P.createElement(Oo,{key:j._wallet.id,className:Xm,justifyContent:"center",alignItems:"center",onClick:()=>C(j),style:{height:"110px",width:`calc(50% - ${ge.space[2]})`}},P.createElement(W,{className:Ck,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},P.createElement(F,null),P.createElement(re,{fontSize:"normal",fontWeight:"bold"},j._wallet.name)))})),k&&P.createElement(W,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:Xm,onClick:()=>p(!0)},P.createElement(re,{variant:"medium"},"More options"),P.createElement(Mi,null)))))},LY={dark:"dark",light:"light"},iOe=t=>{const{config:e={},children:r}=t,{defaultTheme:n="dark",signIn:s={},position:i="center",displayedAssets:o=[],ethAuth:a={}}=e,l=s.projectName||"app",{expiry:c=DY,app:f=l,origin:u=location.origin,nonce:d}=a,{projectName:h}=s,[v,y]=m.useState(!1),[b,p]=m.useState(n||LY.dark),[g,w]=m.useState(i),[E,k]=m.useState(o);return m.useEffect(()=>{localStorage.setItem(Cs.Theme,b),localStorage.setItem(Cs.EthAuthSettings,JSON.stringify({expiry:c,app:f,origin:u,nonce:d}))},[b,a]),m.useEffect(()=>{k(E)},[o]),P.createElement(JIe,{value:{theme:b,setTheme:p,position:g,setPosition:w}},P.createElement(KIe,{value:{setOpenConnectModal:y,openConnectModalState:v}},P.createElement(ZIe,{value:{setDisplayedAssets:k,displayedAssets:E}},P.createElement(gw,{theme:b},P.createElement(ew,null,v&&P.createElement(Q$,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:ah({maxWidth:"364px"},T_(i))},onClose:()=>y(!1)},P.createElement(W,{padding:"4",className:R_},P.createElement(W,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},P.createElement(re,null,"Sign in ",h?`to ${h}`:"")),P.createElement(sOe,ah({openConnectModal:v,setOpenConnectModal:y},t)))))),r)))};class B0{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Gy=typeof window>"u"||"Deno"in window;function Ws(){}function oOe(t,e){return typeof t=="function"?t(e):t}function Ek(t){return typeof t=="number"&&t>=0&&t!==1/0}function jY(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ju(t,e,r){return Nx(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function il(t,e,r){return Nx(t)?[{...e,queryKey:t},r]:[t||{},e]}function aD(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(Nx(o)){if(n){if(e.queryHash!==I_(o,e.options))return!1}else if(!n2(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function lD(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(Nx(i)){if(!e.options.mutationKey)return!1;if(r){if(Zc(e.options.mutationKey)!==Zc(i))return!1}else if(!n2(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function I_(t,e){return((e==null?void 0:e.queryKeyHashFn)||Zc)(t)}function Zc(t){return JSON.stringify(t,(e,r)=>Sk(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function n2(t,e){return FY(t,e)}function FY(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!FY(t[r],e[r])):!1}function BY(t,e){if(t===e)return t;const r=fD(t)&&fD(e);if(r||Sk(t)&&Sk(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!uD(r)||!r.hasOwnProperty("isPrototypeOf"))}function uD(t){return Object.prototype.toString.call(t)==="[object Object]"}function Nx(t){return Array.isArray(t)}function UY(t){return new Promise(e=>{setTimeout(e,t)})}function dD(t){UY(0).then(t)}function aOe(){if(typeof AbortController=="function")return new AbortController}function kk(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?BY(t,e):e}class lOe extends B0{constructor(){super(),this.setup=e=>{if(!Gy&&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,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const s2=new lOe;class cOe extends B0{constructor(){super(),this.setup=e=>{if(!Gy&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",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,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const i2=new cOe;function fOe(t){return Math.min(1e3*2**t,3e4)}function Lx(t){return(t??"online")==="online"?i2.isOnline():!0}class zY{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Xp(t){return t instanceof zY}function VY(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((b,p)=>{i=b,o=p}),l=b=>{n||(h(new zY(b)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!s2.isFocused()||t.networkMode!=="always"&&!i2.isOnline(),d=b=>{n||(n=!0,t.onSuccess==null||t.onSuccess(b),s==null||s(),i(b))},h=b=>{n||(n=!0,t.onError==null||t.onError(b),s==null||s(),o(b))},v=()=>new Promise(b=>{s=p=>{const g=n||!u();return g&&b(p),g},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let b;try{b=t.fn()}catch(p){b=Promise.reject(p)}Promise.resolve(b).then(d).catch(p=>{var g,w;if(n)return;const E=(g=t.retry)!=null?g:3,k=(w=t.retryDelay)!=null?w:fOe,$=typeof k=="function"?k(r,p):k,C=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(p):y()})})};return Lx(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const O_=console;function uOe(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):dD(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&dD(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const Rr=uOe();class qY{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ek(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(Gy?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class dOe extends qY{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||O_,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||hOe(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=kk(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(Ws).catch(Ws):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||!jY(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.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(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,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey);const o=aOe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if(Xp(h)&&h.silent||this.dispatch({type:"error",error:h}),!Xp(h)){var v,y,b,p;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(b=(p=this.cache.config).onSettled)==null||b.call(p,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=VY({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,b,p;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(b=(p=this.cache.config).onSettled)==null||b.call(p,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;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:(s=e.meta)!=null?s:null,fetchStatus:Lx(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Xp(o)&&o.revert&&this.revertState?{...this.revertState}:{...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),Rr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function hOe(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 vOe extends B0{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:I_(i,r);let a=this.get(o);return a||(a=new dOe({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),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(){Rr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=il(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>aD(n,s))}findAll(e,r){const[n]=il(e,r);return Object.keys(n).length>0?this.queries.filter(s=>aD(n,s)):this.queries}notify(e){Rr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Rr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){Rr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class yOe extends qY{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||O_,this.observers=[],this.state=e.state||mOe(),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.indexOf(e)===-1&&(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 C;return this.retryer=VY({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,j)=>{this.dispatch({type:"failed",failureCount:T,error:j})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const C=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,C,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,C,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,C,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var y,b,p,g,w,E,k,$;throw await((y=(b=this.mutationCache.config).onError)==null?void 0:y.call(b,C,this.state.variables,this.state.context,this)),await((p=(g=this.options).onError)==null?void 0:p.call(g,C,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,C,this.state.variables,this.state.context,this)),await((k=($=this.options).onSettled)==null?void 0:k.call($,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}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:!Lx(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),Rr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function mOe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class pOe extends B0{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new yOe({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(s),s}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(){Rr.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=>lD(e,r))}findAll(e){return this.mutations.filter(r=>lD(e,r))}notify(e){Rr.batch(()=>{this.listeners.forEach(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 Rr.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(Ws)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function $k(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const b=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var C;if((C=t.signal)!=null&&C.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},p=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),g=($,C,T,j)=>(v=j?[C,...v]:[...v,C],j?[T,...$]:[...$,T]),w=($,C,T,j)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!C&&$.length)return Promise.resolve($);const F={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};b(F);const U=p(F);return Promise.resolve(U).then(N=>g($,T,N,j))};let E;if(!d.length)E=w([]);else if(f){const $=typeof c<"u",C=$?c:Ak(t.options,d);E=w(d,$,C)}else if(u){const $=typeof c<"u",C=$?c:WY(t.options,d);E=w(d,$,C,!0)}else{v=[];const $=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],$,h[0]):Promise.resolve(g([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=$?h[T]:Ak(t.options,j);return w(j,$,U)}return Promise.resolve(g(j,h[T],d[T]))})}return E.then($=>({pages:$,pageParams:v}))}}}}function Ak(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function WY(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function gOe(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=Ak(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function bOe(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=WY(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class HY{constructor(e={}){this.queryCache=e.queryCache||new vOe,this.mutationCache=e.mutationCache||new pOe,this.logger=e.logger||O_,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=s2.subscribe(()=>{s2.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=i2.subscribe(()=>{i2.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]=il(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 s=Ju(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=oOe(r,i);if(typeof o>"u")return;const a=Ju(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return Rr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=il(e,r),s=this.queryCache;Rr.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=il(e,r,n),o=this.queryCache,a={type:"active",...s};return Rr.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=il(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=Rr.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Ws).catch(Ws)}invalidateQueries(e,r,n){const[s,i]=il(e,r,n);return Rr.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=il(e,r,n),o=Rr.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Ws);return i!=null&&i.throwOnError||(a=a.catch(Ws)),a}fetchQuery(e,r,n){const s=Ju(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Ws).catch(Ws)}fetchInfiniteQuery(e,r,n){const s=Ju(e,r,n);return s.behavior=$k(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Ws).catch(Ws)}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(s=>Zc(e)===Zc(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>n2(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>Zc(e)===Zc(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>n2(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=I_(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 GY extends B0{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.length===1&&(this.currentQuery.addObserver(this),hD(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return _k(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _k(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),cD(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 i=this.hasListeners();i&&vD(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}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(Ws)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Gy||this.currentResult.isStale||!Ek(this.options.staleTime))return;const r=jY(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,!(Gy||this.options.enabled===!1||!Ek(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||s2.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,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:b}=u,p=!1,g=!1,w;if(r._optimisticResults){const T=this.hasListeners(),j=!T&&hD(e,r),F=T&&vD(e,n,r,s);(j||F)&&(y=Lx(e.options.networkMode)?"fetching":"paused",d||(b="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&b!=="error")w=f.data,d=f.dataUpdatedAt,b=f.status,p=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=kk(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&b==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(j){this.selectError=j}typeof T<"u"&&(b="success",w=kk(i==null?void 0:i.data,T,r),g=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),b="error");const E=y==="fetching",k=b==="loading",$=b==="error";return{status:b,fetchStatus:y,isLoading:k,isSuccess:b==="success",isError:$,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:$&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:g,isPreviousData:p,isRefetchError:$&&u.dataUpdatedAt!==0,isStale:M_(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,cD(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options;if(o==="all"||!o&&!this.trackedProps.size)return!0;const a=new Set(o??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&a.has(c)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...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"&&!Xp(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){Rr.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(f=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function wOe(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function hD(t,e){return wOe(t,e)||t.state.dataUpdatedAt>0&&_k(t,e,e.refetchOnMount)}function _k(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&M_(t,e)}return!1}function vD(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&M_(t,r)}function M_(t,e){return t.isStaleByTime(e.staleTime)}class xOe extends GY{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:$k()},r)}getOptimisticResult(e){return e.behavior=$k(),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,s,i,o,a,l;const{state:c}=e,f=super.createResult(e,r),{isFetching:u,isRefetching:d}=f,h=u&&((n=c.fetchMeta)==null||(s=n.fetchMore)==null?void 0:s.direction)==="forward",v=u&&((i=c.fetchMeta)==null||(o=i.fetchMore)==null?void 0:o.direction)==="backward";return{...f,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:gOe(r,(a=c.data)==null?void 0:a.pages),hasPreviousPage:bOe(r,(l=c.data)==null?void 0:l.pages),isFetchingNextPage:h,isFetchingPreviousPage:v,isRefetching:d&&!h&&!v}}}const COe=Vd.useSyncExternalStore,yD=m.createContext(void 0),KY=m.createContext(!1);function QY(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=yD),window.ReactQueryClientContext):yD)}const EOe=({context:t}={})=>{const e=m.useContext(QY(t,m.useContext(KY)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},YY=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=QY(r,n);return m.createElement(KY.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},JY=m.createContext(!1),SOe=()=>m.useContext(JY);JY.Provider;function kOe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const $Oe=m.createContext(kOe()),AOe=()=>m.useContext($Oe);function _Oe(t,e){return typeof t=="function"?t(...e):!!t}const POe=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},TOe=t=>{m.useEffect(()=>{t.clearReset()},[t])},ROe=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&_Oe(r,[t.error,n]),IOe=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},OOe=(t,e)=>t.isLoading&&t.isFetching&&!e,MOe=(t,e,r)=>(t==null?void 0:t.suspense)&&OOe(e,r),DOe=(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 XY(t,e){const r=EOe({context:t.context}),n=SOe(),s=AOe(),i=r.defaultQueryOptions(t);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=Rr.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Rr.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Rr.batchCalls(i.onSettled)),IOe(i),POe(i,s),TOe(s);const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(COe(m.useCallback(l=>n?()=>{}:o.subscribe(Rr.batchCalls(l)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),MOe(i,a,n))throw DOe(i,o,s);if(ROe({result:a,errorResetBoundary:s,useErrorBoundary:i.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:o.trackResult(a)}function di(t,e,r){const n=Ju(t,e,r);return XY(n,GY)}function NOe(t,e,r){const n=Ju(t,e,r);return XY(n,xOe)}function LOe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var ZY=LOe;function jOe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=UMe}var lJ=zMe,VMe=jx,qMe=lJ,WMe=Fx,HMe="[object Arguments]",GMe="[object Array]",KMe="[object Boolean]",QMe="[object Date]",YMe="[object Error]",JMe="[object Function]",XMe="[object Map]",ZMe="[object Number]",eDe="[object Object]",tDe="[object RegExp]",rDe="[object Set]",nDe="[object String]",sDe="[object WeakMap]",iDe="[object ArrayBuffer]",oDe="[object DataView]",aDe="[object Float32Array]",lDe="[object Float64Array]",cDe="[object Int8Array]",fDe="[object Int16Array]",uDe="[object Int32Array]",dDe="[object Uint8Array]",hDe="[object Uint8ClampedArray]",vDe="[object Uint16Array]",yDe="[object Uint32Array]",Vt={};Vt[aDe]=Vt[lDe]=Vt[cDe]=Vt[fDe]=Vt[uDe]=Vt[dDe]=Vt[hDe]=Vt[vDe]=Vt[yDe]=!0;Vt[HMe]=Vt[GMe]=Vt[iDe]=Vt[KMe]=Vt[oDe]=Vt[QMe]=Vt[YMe]=Vt[JMe]=Vt[XMe]=Vt[ZMe]=Vt[eDe]=Vt[tDe]=Vt[rDe]=Vt[nDe]=Vt[sDe]=!1;function mDe(t){return WMe(t)&&qMe(t.length)&&!!Vt[VMe(t)]}var pDe=mDe;function gDe(t){return function(e){return t(e)}}var bDe=gDe,a2={},wDe={get exports(){return a2},set exports(t){a2=t}};(function(t,e){var r=tJ,n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===n,o=i&&r.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(wDe,a2);var xDe=pDe,CDe=bDe,wD=a2,xD=wD&&wD.isTypedArray,EDe=xD?CDe(xD):xDe,SDe=EDe,kDe=nMe,$De=OMe,ADe=oJ,_De=o2,PDe=aJ,TDe=SDe,RDe=Object.prototype,IDe=RDe.hasOwnProperty;function ODe(t,e){var r=ADe(t),n=!r&&$De(t),s=!r&&!n&&_De(t),i=!r&&!n&&!s&&TDe(t),o=r||n||s||i,a=o?kDe(t.length,String):[],l=a.length;for(var c in t)(e||IDe.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||PDe(c,l)))&&a.push(c);return a}var MDe=ODe,DDe=Object.prototype;function NDe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||DDe;return t===r}var LDe=NDe;function jDe(t,e){return function(r){return t(e(r))}}var FDe=jDe,BDe=FDe,UDe=BDe(Object.keys,Object),zDe=UDe,VDe=LDe,qDe=zDe,WDe=Object.prototype,HDe=WDe.hasOwnProperty;function GDe(t){if(!VDe(t))return qDe(t);var e=[];for(var r in Object(t))HDe.call(t,r)&&r!="constructor"&&e.push(r);return e}var KDe=GDe;function QDe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var D_=QDe,YDe=jx,JDe=D_,XDe="[object AsyncFunction]",ZDe="[object Function]",eNe="[object GeneratorFunction]",tNe="[object Proxy]";function rNe(t){if(!JDe(t))return!1;var e=YDe(t);return e==ZDe||e==eNe||e==XDe||e==tNe}var nNe=rNe,sNe=nNe,iNe=lJ;function oNe(t){return t!=null&&iNe(t.length)&&!sNe(t)}var cJ=oNe,aNe=MDe,lNe=KDe,cNe=cJ;function fNe(t){return cNe(t)?aNe(t):lNe(t)}var uNe=fNe,dNe=tMe,hNe=uNe;function vNe(t){return t==null?[]:dNe(t,hNe(t))}var yNe=vNe,mNe=ZY,pNe=eJ,gNe=yNe;function bNe(t,e){var r=gNe(t);return pNe(r,mNe(e,0,r.length))}var wNe=bNe;function xNe(t,e){return t===e||t!==t&&e!==e}var CNe=xNe,ENe=CNe,SNe=cJ,kNe=aJ,$Ne=D_;function ANe(t,e,r){if(!$Ne(r))return!1;var n=typeof e;return(n=="number"?SNe(r)&&kNe(e,r.length):n=="string"&&e in r)?ENe(r[e],t):!1}var _Ne=ANe,PNe=/\s/;function TNe(t){for(var e=t.length;e--&&PNe.test(t.charAt(e)););return e}var RNe=TNe,INe=RNe,ONe=/^\s+/;function MNe(t){return t&&t.slice(0,INe(t)+1).replace(ONe,"")}var DNe=MNe,NNe=jx,LNe=Fx,jNe="[object Symbol]";function FNe(t){return typeof t=="symbol"||LNe(t)&&NNe(t)==jNe}var BNe=FNe,UNe=DNe,CD=D_,zNe=BNe,ED=0/0,VNe=/^[-+]0x[0-9a-f]+$/i,qNe=/^0b[01]+$/i,WNe=/^0o[0-7]+$/i,HNe=parseInt;function GNe(t){if(typeof t=="number")return t;if(zNe(t))return ED;if(CD(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=CD(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=UNe(t);var r=qNe.test(t);return r||WNe.test(t)?HNe(t.slice(2),r?2:8):VNe.test(t)?ED:+t}var KNe=GNe,QNe=KNe,SD=1/0,YNe=17976931348623157e292;function JNe(t){if(!t)return t===0?t:0;if(t=QNe(t),t===SD||t===-SD){var e=t<0?-1:1;return e*YNe}return t===t?t:0}var XNe=JNe,ZNe=XNe;function eLe(t){var e=ZNe(t),r=e%1;return e===e?r?e-r:e:0}var tLe=eLe,rLe=YOe,nLe=wNe,sLe=oJ,iLe=_Ne,oLe=tLe;function aLe(t,e,r){(r?iLe(t,e,r):e===void 0)?e=1:e=oLe(e);var n=sLe(t)?rLe:nLe;return n(t,e)}var lLe=aLe,Bx={},cLe=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 u=kD[e.format]||kD.default;window.clipboardData.setData(u,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),n=dLe("message"in e?e.message:uLe),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var vLe=hLe;function Pk(t){return Pk=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},Pk(t)}Object.defineProperty(Bx,"__esModule",{value:!0});Bx.CopyToClipboard=void 0;var Zm=fJ(m),yLe=fJ(vLe),mLe=["text","onCopy","options","children"];function fJ(t){return t&&t.__esModule?t:{default:t}}function $D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function AD(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function gLe(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}function bLe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _D(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 l2(t){return l2=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},l2(t)}function N_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dJ=function(t){xLe(r,t);var e=CLe(r);function r(){var n;bLe(this,r);for(var s=arguments.length,i=new Array(s),o=0;oe in t?$Le(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Ky=(t,e)=>{for(var r in e||(e={}))vJ.call(e,r)&&PD(t,r,e[r]);if(c2)for(var r of c2(e))yJ.call(e,r)&&PD(t,r,e[r]);return t},L_=(t,e)=>{var r={};for(var n in t)vJ.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&c2)for(var n of c2(t))e.indexOf(n)<0&&yJ.call(t,n)&&(r[n]=t[n]);return r};/** +`,s)}while(n!==-1);return i+=t.substr(s),i};var dIe={stringReplaceAll:fIe,stringEncaseCRLFWithFirstIndex:uIe},E5,rD;function hIe(){if(rD)return E5;rD=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,s=new Map([["n",` +`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function i(c){const f=c[0]==="u",u=c[1]==="{";return f&&!u&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):f&&u?String.fromCodePoint(parseInt(c.slice(2,-1),16)):s.get(c)||c}function o(c,f){const u=[],d=f.trim().split(/\s*,\s*/g);let h;for(const v of d){const y=Number(v);if(!Number.isNaN(y))u.push(y);else if(h=v.match(r))u.push(h[2].replace(n,(g,b,p)=>b?i(b):p));else throw new Error(`Invalid Chalk template style argument: ${v} (in style '${c}')`)}return u}function a(c){e.lastIndex=0;const f=[];let u;for(;(u=e.exec(c))!==null;){const d=u[1];if(u[2]){const h=o(d,u[2]);f.push([d].concat(h))}else f.push([d])}return f}function l(c,f){const u={};for(const h of f)for(const v of h.styles)u[v[0]]=h.inverse?null:v.slice(1);let d=c;for(const[h,v]of Object.entries(u))if(Array.isArray(v)){if(!(h in d))throw new Error(`Unknown Chalk style: ${h}`);d=v.length>0?d[h](...v):d[h]}return d}return E5=(c,f)=>{const u=[],d=[];let h=[];if(f.replace(t,(v,y,g,b,p,w)=>{if(y)h.push(i(y));else if(b){const E=h.join("");h=[],d.push(u.length===0?E:l(c,u)(E)),u.push({inverse:g,styles:a(b)})}else if(p){if(u.length===0)throw new Error("Found extraneous } in Chalk template literal");d.push(l(c,u)(h.join(""))),h=[],u.pop()}else h.push(w)}),d.push(h.join("")),u.length>0){const v=`Chalk template literal is missing ${u.length} closing bracket${u.length===1?"":"s"} (\`}\`)`;throw new Error(v)}return d.join("")},E5}const Hy=bk,{stdout:wk,stderr:xk}=cIe,{stringReplaceAll:vIe,stringEncaseCRLFWithFirstIndex:yIe}=dIe,{isArray:r2}=Array,PY=["ansi","ansi","ansi256","ansi16m"],Kh=Object.create(null),mIe=(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=wk?wk.level:0;t.level=e.level===void 0?r:e.level};class pIe{constructor(e){return TY(e)}}const TY=t=>{const e={};return mIe(e,t),e.template=(...r)=>IY(e.template,...r),Object.setPrototypeOf(e,Dx.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=pIe,e.template};function Dx(t){return TY(t)}for(const[t,e]of Object.entries(Hy))Kh[t]={get(){const r=Nx(this,__(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Kh.visible={get(){const t=Nx(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};const RY=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of RY)Kh[t]={get(){const{level:e}=this;return function(...r){const n=__(Hy.color[PY[e]][t](...r),Hy.color.close,this._styler);return Nx(this,n,this._isEmpty)}}};for(const t of RY){const e="bg"+t[0].toUpperCase()+t.slice(1);Kh[e]={get(){const{level:r}=this;return function(...n){const s=__(Hy.bgColor[PY[r]][t](...n),Hy.bgColor.close,this._styler);return Nx(this,s,this._isEmpty)}}}}const gIe=Object.defineProperties(()=>{},{...Kh,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),__=(t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},Nx=(t,e,r)=>{const n=(...s)=>r2(s[0])&&r2(s[0].raw)?nD(n,IY(n,...s)):nD(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,gIe),n._generator=t,n._styler=e,n._isEmpty=r,n},nD=(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:s}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=vIe(e,r.close,r.open),r=r.parent;const i=e.indexOf(` +`);return i!==-1&&(e=yIe(e,s,n,i)),n+e+s};let S5;const IY=(t,...e)=>{const[r]=e;if(!r2(r)||!r2(r.raw))return e.join(" ");const n=e.slice(1),s=[r.raw[0]];for(let i=1;i{k5.push(t)},registerClassName:t=>{iD.add(t)},registerComposition:t=>{oD.push(t)},markCompositionUsed:()=>{},onEndFileScope:t=>{var e=sIe({localClassNames:Array.from(iD),composedClassLists:oD,cssObjs:k5}).join(` +`);tRe({fileScope:t,css:e}),k5=[]},getIdentOption:()=>"short"};Q9e(OIe);function n2(t,e){return n2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},n2(t,e)}function MIe(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&&n2(t,e)}function Ck(){Ck=function(s,i){return new r(s,void 0,i)};var t=RegExp.prototype,e=new WeakMap;function r(s,i,o){var a=new RegExp(s,i);return e.set(a,o||e.get(s)),n2(a,r.prototype)}function n(s,i){var o=e.get(i);return Object.keys(o).reduce(function(a,l){var c=o[l];if(typeof c=="number")a[l]=s[c];else{for(var f=0;s[c[f]]===void 0&&f+1]+)>/g,function(l,c){var f=o[c];return"$"+(Array.isArray(f)?f.join("$"):f)}))}if(typeof i=="function"){var a=this;return t[Symbol.replace].call(this,s,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(n(l,a)),i.apply(this,l)})}return t[Symbol.replace].call(this,s,i)},Ck.apply(this,arguments)}function DIe(t){var{debugId:e,debugFileName:r}=t,n=e?[e.replace(/\s/g,"_")]:[];if(r){var{filePath:s}=eu(),i=s.match(Ck(/([^\/\\]*)?[\/\\]?([^\/\\]*)\.css\.(ts|js|tsx|jsx|cjs|mjs)$/,{dir:1,file:2}));if(i&&i.groups){var{dir:o,file:a}=i.groups;n.unshift(a&&a!=="index"?a:o)}}return n.join("_")}function T_(t){var{debugId:e,debugFileName:r=!0}=Pv(Pv({},typeof t=="string"?{debugId:t}:null),typeof t=="object"?t:null),n=eRe().toString(36),{filePath:s,packageName:i}=eu(),o=AY(i?"".concat(i).concat(s):s),a="".concat(o).concat(n);if(Z9e()==="debug"){var l=DIe({debugId:e,debugFileName:r});l&&(a="".concat(l,"__").concat(a))}return a.match(/^[0-9]/)?"_".concat(a):a}function NIe(t,e){var r=T_(e);gY(r);var n=[],s=[];for(var i of t)typeof i=="string"?n.push(i):s.push(i);var o=r;if(n.length>0&&(o="".concat(r," ").concat(WRe(n)),J9e({identifier:r,classList:o}),s.length>0&&bY(r)),s.length>0){var a=IIe.all(s,{arrayMerge:(l,c)=>c});Mx({type:"local",selector:r,rule:a},eu())}return o}function Fs(t,e){if(Array.isArray(t))return NIe(t,e);var r=T_(e);return gY(r),Mx({type:"local",selector:r,rule:t},eu()),r}function Ki(t,e){Mx({type:"global",selector:t,rule:e},eu())}function MY(t,e){var r=k_(T_(e),{isIdentifier:!0});return Mx({type:"keyframes",name:r,rule:t},eu()),r}function lh(){return lh=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const jIe=["createConnector"],FIe=t=>{const e=[],r=t.find(s=>s.id==="injected");return t.filter(s=>!r||!r.hideConnectorId?!0:s.id!==r.hideConnectorId).forEach(s=>{const i=LIe(s,jIe),o=s.createConnector(),a=lh({},i),c=((f,u)=>{const d=f;return d._wallet=lh({},u),d})(o,a);e.push(c)}),e},BIe=t=>/^\S+@\S+\.\S{2,}$/.test(t),Ek={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"}},UIe=(t,e)=>{const r=e.find(i=>i.id===t);if(r){var n,s;return{name:r.name,symbol:r.nativeCurrency.symbol,decimals:r.nativeCurrency.decimals,logoURI:Ek[1].logoURI,blockExplorerName:(n=r.blockExplorers)==null?void 0:n.default.name,blockExplorerUrl:(s=r.blockExplorers)==null?void 0:s.default.url}}},Mr=(t,e)=>Ek[t]||UIe(t,e)||Ek[1],tu=()=>{const t=P.createContext(void 0);return[()=>{const r=P.useContext(t);if(!r)throw new Error("useGenericContext must be used within a Provider");return r},t.Provider]},R_=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{}}},zIe=(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"}},VIe=(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 qIe(t){var e,r;const{account:n,chain:s,transport:i}=t,o={chainId:s.id,name:s.name,ensAddress:(e=s.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return new Oq(i,o).getSigner(n.address)}function WIe(t){var e,r;const{chain:n,transport:s}=t,i={chainId:n.id,name:n.name,ensAddress:(e=n.contracts)==null||(r=e.ensRegistry)==null?void 0:r.address};return s.type==="fallback"?new mwe(s.transports.map(({value:o})=>new xa(o==null?void 0:o.url,i))):new xa(s.url,i)}let Es=function(t){return t.Settings="@kit.settings",t.Theme="@kit.theme",t.EthAuthProof="@kit.ethAuthProof",t.EthAuthSettings="@kit.ethAuthSettings",t}({});const $5={showEmailInput:!0,miniAuthOptions:["google","discord","facebook","apple"],authOptions:["metamask","wallet-connect"]},DY=60*60*24*7,HIe=async t=>{const e=localStorage.getItem(Es.EthAuthProof);if(e)return JSON.parse(e);const r=localStorage.getItem(Es.EthAuthSettings);if(!r)throw new Error("No ETHAuth settings found");const n=JSON.parse(r),s=t.account.address,i=new Uw;i.address=s,i.claims.app=n.app||"app",i.claims.ogn=n.origin,i.claims.n=n.nonce,i.setExpiryIn(n.expiry?Math.max(n.expiry,200):DY);const o=i.messageTypedData();o.domain.verifyingContract;const l=await qIe(t)._signTypedData(o.domain,o.types,o.message);i.signature=l;const f=await new Iy().encodeProof(i,!0);return{typedData:o,proofString:f}},GIe=async(t,e,r)=>{const n=t.account.address,i=await new Iy().decodeProof(r.proofString,!0),o=WIe(e);return await tG.utils.isValidTypedDataSignature(n,r.typedData,i.signature,o)},[KIe,QIe]=tu(),YIe=()=>{const{setOpenConnectModal:t,openConnectModalState:e}=KIe();return{setOpenConnectModal:t,openConnectModalState:e}},[JIe,XIe]=tu(),Na=()=>{const{setTheme:t,theme:e,position:r,setPosition:n}=JIe();return{setTheme:t,theme:e,position:r,setPosition:n}},[ZIe,eOe]=tu(),tOe=()=>{const{setDisplayedAssets:t,displayedAssets:e}=ZIe();return{displayedAssets:e,setDisplayedAssets:t}};Xf("packages/kit/src/components/styles.css.ts","kit");const rOe=Fs({maxWidth:"400px",width:"100%",":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"networkButton"),Zm=Fs({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Sk=Fs({},"walletLogoContainer");Ki(`${Sk} svg`,{height:"40px"});const NY=Fs({},"walletLogoContainerExtended");Ki(`${NY} svg`,{width:"30px"});const I_=Fs({},"walletContent");Ki(`${I_} + button`,{backgroundColor:"transparent"});Ki(`${I_} + button > svg`,{width:"20px",height:"20px"});Zf();const nOe=({onConnect:t,connectors:e})=>{const{theme:r}=Na(),{connectors:n,connect:s,isLoading:i}=tV();return P.createElement(W,{flexDirection:"column",gap:"2",marginTop:"5"},e.map(o=>{const a=r==="dark"?o._wallet.logoDark:o._wallet.logoLight,l=o._wallet.name;return P.createElement(W,{key:o.id,as:"button",flexDirection:"row",alignItems:"center",justifyContent:"space-between",background:"backgroundSecondary",color:"text100",borderRadius:"md",padding:"4",style:{height:"60px"},className:rOe,onClick:()=>t(o)},P.createElement(re,{variant:"medium"},l,i),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{backgroundColor:o._wallet.iconBackground},borderRadius:"md",className:NY},P.createElement(a,null)))}))},sOe=({config:t={}})=>{const{signIn:e={}}=t,{logoUrlDarkMode:r,logoUrlLightMode:n}=e,{theme:s}=Na();return P.createElement(P.Fragment,null,s==="dark"&&r&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:r,style:{height:"110px"}})),s==="light"&&n&&P.createElement(W,{marginTop:"5",justifyContent:"center",alignItems:"center"},P.createElement(fr,{src:n,style:{height:"110px"}})))},iOe=t=>{const{isConnected:e}=Tn(),{theme:r}=Na(),{config:n={}}=t,{signIn:s={}}=n,{showEmailInput:i=$5.showEmailInput,authOptions:o=$5.authOptions,miniAuthOptions:a=$5.miniAuthOptions}=s,{openConnectModal:l,setOpenConnectModal:c}=t,[f,u]=m.useState(""),{connectors:d,connect:h,isLoading:v}=tV(),y=d,[g,b]=m.useState(!1),p=y.find(B=>B._wallet.id==="email"),w=y.filter(B=>!!o.find(U=>U===B._wallet.id)),E=y.filter(B=>!!a.find(U=>U===B._wallet.id)),k=w.length>6,$=B=>{u(B.target.value)};m.useEffect(()=>{e&&l&&c(!1)},[e,l]);const x=B=>{if(B._wallet.id==="email"){const L=prompt("Auto-email login, please specify the email address:");localStorage.setItem(hk,L||"")}h({connector:B})},T=B=>{B.preventDefault(),localStorage.setItem(hk,f),h({connector:p})};return g?P.createElement(P.Fragment,null,P.createElement(W,{as:"button",position:"absolute",style:{top:"20px"},onClick:()=>b(!1),className:Zm},P.createElement(Q2,null)),P.createElement(nOe,{connectors:w,onConnect:x})):P.createElement(P.Fragment,null,P.createElement(sOe,{config:n}),P.createElement(W,{marginTop:"5"},p&&i&&P.createElement(P.Fragment,null,P.createElement("form",{onSubmit:T},P.createElement(ac,{onChange:$,value:f,name:"email",placeholder:"Enter email","data-1p-ignore":!0}),P.createElement(nt,{type:"submit",disabled:!BIe(f),marginTop:"4",width:"full",label:"Continue",rightIcon:Di}))),E.length>0&&P.createElement(P.Fragment,null,p&&i&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ey,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or sign in via"))),P.createElement(W,{marginTop:"3",gap:"2",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},E.slice(0,6).map(B=>{const L=r==="dark"?B._wallet.miniLogoDark||B._wallet.logoDark:B._wallet.miniLogoLight||B._wallet.logoLight;return P.createElement(To,{key:B._wallet.id,className:Zm,justifyContent:"center",alignItems:"center",onClick:()=>x(B),aspectRatio:"1/1",style:{width:`calc(25% - ${ge.space[2]})`}},P.createElement(W,{className:Sk,flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(L,null)))}))),w.length>0&&P.createElement(P.Fragment,null,(p&&i||E.length>0)&&P.createElement(P.Fragment,null,P.createElement(W,{style:{marginBottom:"-4px"}},P.createElement(ey,{color:"backgroundSecondary"})),P.createElement(W,{justifyContent:"center",alignItems:"center"},P.createElement(re,{variant:"small",color:"text50"},"or select a wallet"))),P.createElement(W,{marginTop:"3",gap:"3",flexDirection:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},w.slice(0,6).map(B=>{const L=r==="dark"?B._wallet.logoDark:B._wallet.logoLight;return P.createElement(To,{key:B._wallet.id,className:Zm,justifyContent:"center",alignItems:"center",onClick:()=>x(B),style:{height:"110px",width:`calc(50% - ${ge.space[2]})`}},P.createElement(W,{className:Sk,flexDirection:"column",gap:"4",alignItems:"center",justifyContent:"center"},P.createElement(L,null),P.createElement(re,{fontSize:"normal",fontWeight:"bold"},B._wallet.name)))})),k&&P.createElement(W,{padding:"4",marginTop:"3",background:"backgroundSecondary",width:"full",justifyContent:"space-between",alignItems:"center",borderRadius:"md",color:"text100",as:"button",className:Zm,onClick:()=>b(!0)},P.createElement(re,{variant:"medium"},"More options"),P.createElement(Di,null)))))},LY={dark:"dark",light:"light"},oOe=t=>{const{config:e={},children:r}=t,{defaultTheme:n="dark",signIn:s={},position:i="center",displayedAssets:o=[],ethAuth:a={}}=e,l=s.projectName||"app",{expiry:c=DY,app:f=l,origin:u=location.origin,nonce:d}=a,{projectName:h}=s,[v,y]=m.useState(!1),[g,b]=m.useState(n||LY.dark),[p,w]=m.useState(i),[E,k]=m.useState(o);return m.useEffect(()=>{localStorage.setItem(Es.Theme,g),localStorage.setItem(Es.EthAuthSettings,JSON.stringify({expiry:c,app:f,origin:u,nonce:d}))},[g,a]),m.useEffect(()=>{k(E)},[o]),P.createElement(XIe,{value:{theme:g,setTheme:b,position:p,setPosition:w}},P.createElement(QIe,{value:{setOpenConnectModal:y,openConnectModalState:v}},P.createElement(eOe,{value:{setDisplayedAssets:k,displayedAssets:E}},P.createElement(fw,{theme:g},P.createElement(H2,null,v&&P.createElement(P$,{scroll:!1,backdropColor:"backgroundBackdrop",size:"sm",contentProps:{style:lh({maxWidth:"364px"},R_(i))},onClose:()=>y(!1)},P.createElement(W,{padding:"4",className:I_},P.createElement(W,{justifyContent:"center",color:"text100",alignItems:"center",fontWeight:"medium",style:{marginTop:"4px"}},P.createElement(re,null,"Sign in ",h?`to ${h}`:"")),P.createElement(iOe,lh({openConnectModal:v,setOpenConnectModal:y},t)))))),r)))};class U0{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(r=>r!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ky=typeof window>"u"||"Deno"in window;function Hs(){}function aOe(t,e){return typeof t=="function"?t(e):t}function kk(t){return typeof t=="number"&&t>=0&&t!==1/0}function jY(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Xu(t,e,r){return Lx(t)?typeof e=="function"?{...r,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function ol(t,e,r){return Lx(t)?[{...e,queryKey:t},r]:[t||{},e]}function aD(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(Lx(o)){if(n){if(e.queryHash!==O_(o,e.options))return!1}else if(!s2(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||typeof s<"u"&&s!==e.state.fetchStatus||i&&!i(e))}function lD(t,e){const{exact:r,fetching:n,predicate:s,mutationKey:i}=t;if(Lx(i)){if(!e.options.mutationKey)return!1;if(r){if(ef(e.options.mutationKey)!==ef(i))return!1}else if(!s2(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||s&&!s(e))}function O_(t,e){return((e==null?void 0:e.queryKeyHashFn)||ef)(t)}function ef(t){return JSON.stringify(t,(e,r)=>$k(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function s2(t,e){return FY(t,e)}function FY(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(r=>!FY(t[r],e[r])):!1}function BY(t,e){if(t===e)return t;const r=fD(t)&&fD(e);if(r||$k(t)&&$k(e)){const n=r?t.length:Object.keys(t).length,s=r?e:Object.keys(e),i=s.length,o=r?[]:{};let a=0;for(let l=0;l"u")return!0;const r=e.prototype;return!(!uD(r)||!r.hasOwnProperty("isPrototypeOf"))}function uD(t){return Object.prototype.toString.call(t)==="[object Object]"}function Lx(t){return Array.isArray(t)}function UY(t){return new Promise(e=>{setTimeout(e,t)})}function dD(t){UY(0).then(t)}function lOe(){if(typeof AbortController=="function")return new AbortController}function Ak(t,e,r){return r.isDataEqual!=null&&r.isDataEqual(t,e)?t:typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?BY(t,e):e}class cOe extends U0{constructor(){super(),this.setup=e=>{if(!Ky&&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,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const i2=new cOe;class fOe extends U0{constructor(){super(),this.setup=e=>{if(!Ky&&window.addEventListener){const r=()=>e();return window.addEventListener("online",r,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",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,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const o2=new fOe;function uOe(t){return Math.min(1e3*2**t,3e4)}function jx(t){return(t??"online")==="online"?o2.isOnline():!0}class zY{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Zp(t){return t instanceof zY}function VY(t){let e=!1,r=0,n=!1,s,i,o;const a=new Promise((g,b)=>{i=g,o=b}),l=g=>{n||(h(new zY(g)),t.abort==null||t.abort())},c=()=>{e=!0},f=()=>{e=!1},u=()=>!i2.isFocused()||t.networkMode!=="always"&&!o2.isOnline(),d=g=>{n||(n=!0,t.onSuccess==null||t.onSuccess(g),s==null||s(),i(g))},h=g=>{n||(n=!0,t.onError==null||t.onError(g),s==null||s(),o(g))},v=()=>new Promise(g=>{s=b=>{const p=n||!u();return p&&g(b),p},t.onPause==null||t.onPause()}).then(()=>{s=void 0,n||t.onContinue==null||t.onContinue()}),y=()=>{if(n)return;let g;try{g=t.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{var p,w;if(n)return;const E=(p=t.retry)!=null?p:3,k=(w=t.retryDelay)!=null?w:uOe,$=typeof k=="function"?k(r,b):k,x=E===!0||typeof E=="number"&&r{if(u())return v()}).then(()=>{e?h(b):y()})})};return jx(t.networkMode)?y():v().then(y),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}const M_=console;function dOe(){let t=[],e=0,r=f=>{f()},n=f=>{f()};const s=f=>{let u;e++;try{u=f()}finally{e--,e||a()}return u},i=f=>{e?t.push(f):dD(()=>{r(f)})},o=f=>(...u)=>{i(()=>{f(...u)})},a=()=>{const f=t;t=[],f.length&&dD(()=>{n(()=>{f.forEach(u=>{r(u)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{n=f}}}const Rr=dOe();class qY{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kk(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(Ky?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class hOe extends qY{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||M_,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||vOe(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=Ak(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(Hs).catch(Hs):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||!jY(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.indexOf(e)===-1&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.indexOf(e)!==-1&&(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,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&r!=null&&r.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}Array.isArray(this.options.queryKey);const o=lOe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),f={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(f),(n=this.options.behavior)==null||n.onFetch(f),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=f.fetchOptions)==null?void 0:s.meta)){var u;this.dispatch({type:"fetch",meta:(u=f.fetchOptions)==null?void 0:u.meta})}const d=h=>{if(Zp(h)&&h.silent||this.dispatch({type:"error",error:h}),!Zp(h)){var v,y,g,b;(v=(y=this.cache.config).onError)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,this.state.data,h,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=VY({fn:f.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:h=>{var v,y,g,b;if(typeof h>"u"){d(new Error(this.queryHash+" data is undefined"));return}this.setData(h),(v=(y=this.cache.config).onSuccess)==null||v.call(y,h,this),(g=(b=this.cache.config).onSettled)==null||g.call(b,h,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:(h,v)=>{this.dispatch({type:"failed",failureCount:h,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const r=n=>{var s,i;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:(s=e.meta)!=null?s:null,fetchStatus:jx(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=e.error;return Zp(o)&&o.revert&&this.revertState?{...this.revertState}:{...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),Rr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function vOe(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 yOe extends U0{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,r,n){var s;const i=r.queryKey,o=(s=r.queryHash)!=null?s:O_(i,r);let a=this.get(o);return a||(a=new hOe({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(i)}),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(){Rr.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,r){const[n]=ol(e,r);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(s=>aD(n,s))}findAll(e,r){const[n]=ol(e,r);return Object.keys(n).length>0?this.queries.filter(s=>aD(n,s)):this.queries}notify(e){Rr.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Rr.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){Rr.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class mOe extends qY{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||M_,this.observers=[],this.state=e.state||pOe(),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.indexOf(e)===-1&&(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 x;return this.retryer=VY({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(T,B)=>{this.dispatch({type:"failed",failureCount:T,error:B})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(x=this.options.retry)!=null?x:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},r=this.state.status==="loading";try{var n,s,i,o,a,l,c,f;if(!r){var u,d,h,v;this.dispatch({type:"loading",variables:this.options.variables}),await((u=(d=this.mutationCache.config).onMutate)==null?void 0:u.call(d,this.state.variables,this));const T=await((h=(v=this.options).onMutate)==null?void 0:h.call(v,this.state.variables));T!==this.state.context&&this.dispatch({type:"loading",context:T,variables:this.state.variables})}const x=await e();return await((n=(s=this.mutationCache.config).onSuccess)==null?void 0:n.call(s,x,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,x,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,x,null,this.state.variables,this.state.context,this)),await((c=(f=this.options).onSettled)==null?void 0:c.call(f,x,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:x}),x}catch(x){try{var y,g,b,p,w,E,k,$;throw await((y=(g=this.mutationCache.config).onError)==null?void 0:y.call(g,x,this.state.variables,this.state.context,this)),await((b=(p=this.options).onError)==null?void 0:b.call(p,x,this.state.variables,this.state.context)),await((w=(E=this.mutationCache.config).onSettled)==null?void 0:w.call(E,void 0,x,this.state.variables,this.state.context,this)),await((k=($=this.options).onSettled)==null?void 0:k.call($,void 0,x,this.state.variables,this.state.context)),x}finally{this.dispatch({type:"error",error:x})}}}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:!jx(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),Rr.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function pOe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class gOe extends U0{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,r,n){const s=new mOe({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(s),s}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(){Rr.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=>lD(e,r))}findAll(e){return this.mutations.filter(r=>lD(e,r))}notify(e){Rr.batch(()=>{this.listeners.forEach(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 Rr.batch(()=>r.reduce((n,s)=>n.then(()=>s.continue().catch(Hs)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function _k(){return{onFetch:t=>{t.fetchFn=()=>{var e,r,n,s,i,o;const a=(e=t.fetchOptions)==null||(r=e.meta)==null?void 0:r.refetchPage,l=(n=t.fetchOptions)==null||(s=n.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,f=(l==null?void 0:l.direction)==="forward",u=(l==null?void 0:l.direction)==="backward",d=((i=t.state.data)==null?void 0:i.pages)||[],h=((o=t.state.data)==null?void 0:o.pageParams)||[];let v=h,y=!1;const g=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var x;if((x=t.signal)!=null&&x.aborted)y=!0;else{var T;(T=t.signal)==null||T.addEventListener("abort",()=>{y=!0})}return t.signal}})},b=t.options.queryFn||(()=>Promise.reject("Missing queryFn")),p=($,x,T,B)=>(v=B?[x,...v]:[...v,x],B?[T,...$]:[...$,T]),w=($,x,T,B)=>{if(y)return Promise.reject("Cancelled");if(typeof T>"u"&&!x&&$.length)return Promise.resolve($);const L={queryKey:t.queryKey,pageParam:T,meta:t.options.meta};g(L);const U=b(L);return Promise.resolve(U).then(N=>p($,T,N,B))};let E;if(!d.length)E=w([]);else if(f){const $=typeof c<"u",x=$?c:Pk(t.options,d);E=w(d,$,x)}else if(u){const $=typeof c<"u",x=$?c:WY(t.options,d);E=w(d,$,x,!0)}else{v=[];const $=typeof t.options.getNextPageParam>"u";E=(a&&d[0]?a(d[0],0,d):!0)?w([],$,h[0]):Promise.resolve(p([],h[0],d[0]));for(let T=1;T{if(a&&d[T]?a(d[T],T,d):!0){const U=$?h[T]:Pk(t.options,B);return w(B,$,U)}return Promise.resolve(p(B,h[T],d[T]))})}return E.then($=>({pages:$,pageParams:v}))}}}}function Pk(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function WY(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}function bOe(t,e){if(t.getNextPageParam&&Array.isArray(e)){const r=Pk(t,e);return typeof r<"u"&&r!==null&&r!==!1}}function wOe(t,e){if(t.getPreviousPageParam&&Array.isArray(e)){const r=WY(t,e);return typeof r<"u"&&r!==null&&r!==!1}}class HY{constructor(e={}){this.queryCache=e.queryCache||new yOe,this.mutationCache=e.mutationCache||new gOe,this.logger=e.logger||M_,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=i2.subscribe(()=>{i2.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=o2.subscribe(()=>{o2.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]=ol(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 s=Xu(e,r,n),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:r,state:n})=>{const s=n.data;return[r,s]})}setQueryData(e,r,n){const s=this.queryCache.find(e),i=s==null?void 0:s.state.data,o=aOe(r,i);if(typeof o>"u")return;const a=Xu(e),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...n,manual:!0})}setQueriesData(e,r,n){return Rr.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,n)]))}getQueryState(e,r){var n;return(n=this.queryCache.find(e,r))==null?void 0:n.state}removeQueries(e,r){const[n]=ol(e,r),s=this.queryCache;Rr.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(e,r,n){const[s,i]=ol(e,r,n),o=this.queryCache,a={type:"active",...s};return Rr.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(e,r,n){const[s,i={}]=ol(e,r,n);typeof i.revert>"u"&&(i.revert=!0);const o=Rr.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Hs).catch(Hs)}invalidateQueries(e,r,n){const[s,i]=ol(e,r,n);return Rr.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(e,r,n){const[s,i]=ol(e,r,n),o=Rr.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Hs);return i!=null&&i.throwOnError||(a=a.catch(Hs)),a}fetchQuery(e,r,n){const s=Xu(e,r,n),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,r,n){return this.fetchQuery(e,r,n).then(Hs).catch(Hs)}fetchInfiniteQuery(e,r,n){const s=Xu(e,r,n);return s.behavior=_k(),this.fetchQuery(s)}prefetchInfiniteQuery(e,r,n){return this.fetchInfiniteQuery(e,r,n).then(Hs).catch(Hs)}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(s=>ef(e)===ef(s.queryKey));n?n.defaultOptions=r:this.queryDefaults.push({queryKey:e,defaultOptions:r})}getQueryDefaults(e){if(!e)return;const r=this.queryDefaults.find(n=>s2(e,n.queryKey));return r==null?void 0:r.defaultOptions}setMutationDefaults(e,r){const n=this.mutationDefaults.find(s=>ef(e)===ef(s.mutationKey));n?n.defaultOptions=r:this.mutationDefaults.push({mutationKey:e,defaultOptions:r})}getMutationDefaults(e){if(!e)return;const r=this.mutationDefaults.find(n=>s2(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=O_(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 GY extends U0{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.length===1&&(this.currentQuery.addObserver(this),hD(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return Tk(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tk(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,r){const n=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),cD(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 i=this.hasListeners();i&&vD(this.currentQuery,s,this.options,n)&&this.executeFetch(),this.updateResult(r),i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==n.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){const r=this.client.getQueryCache().build(this.client,e);return this.createResult(r,e)}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(Hs)),r}updateStaleTimeout(){if(this.clearStaleTimeout(),Ky||this.currentResult.isStale||!kk(this.options.staleTime))return;const r=jY(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,!(Ky||this.options.enabled===!1||!kk(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||i2.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,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,c=l?e.state:this.currentQueryInitialState,f=l?this.currentResult:this.previousQueryResult,{state:u}=e;let{dataUpdatedAt:d,error:h,errorUpdatedAt:v,fetchStatus:y,status:g}=u,b=!1,p=!1,w;if(r._optimisticResults){const T=this.hasListeners(),B=!T&&hD(e,r),L=T&&vD(e,n,r,s);(B||L)&&(y=jx(e.options.networkMode)?"fetching":"paused",d||(g="loading")),r._optimisticResults==="isRestoring"&&(y="idle")}if(r.keepPreviousData&&!u.dataUpdatedAt&&f!=null&&f.isSuccess&&g!=="error")w=f.data,d=f.dataUpdatedAt,g=f.status,b=!0;else if(r.select&&typeof u.data<"u")if(i&&u.data===(o==null?void 0:o.data)&&r.select===this.selectFn)w=this.selectResult;else try{this.selectFn=r.select,w=r.select(u.data),w=Ak(i==null?void 0:i.data,w,r),this.selectResult=w,this.selectError=null}catch(T){this.selectError=T}else w=u.data;if(typeof r.placeholderData<"u"&&typeof w>"u"&&g==="loading"){let T;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof r.placeholderData=="function"?r.placeholderData():r.placeholderData,r.select&&typeof T<"u")try{T=r.select(T),this.selectError=null}catch(B){this.selectError=B}typeof T<"u"&&(g="success",w=Ak(i==null?void 0:i.data,T,r),p=!0)}this.selectError&&(h=this.selectError,w=this.selectResult,v=Date.now(),g="error");const E=y==="fetching",k=g==="loading",$=g==="error";return{status:g,fetchStatus:y,isLoading:k,isSuccess:g==="success",isError:$,isInitialLoading:k&&E,data:w,dataUpdatedAt:d,error:h,errorUpdatedAt:v,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:E,isRefetching:E&&!k,isLoadingError:$&&u.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:p,isPreviousData:b,isRefetchError:$&&u.dataUpdatedAt!==0,isStale:D_(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,cD(n,r))return;this.currentResult=n;const s={cache:!0},i=()=>{if(!r)return!0;const{notifyOnChangeProps:o}=this.options;if(o==="all"||!o&&!this.trackedProps.size)return!0;const a=new Set(o??this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(l=>{const c=l;return this.currentResult[c]!==r[c]&&a.has(c)})};(e==null?void 0:e.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...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"&&!Zp(e.error)&&(r.onError=!0),this.updateResult(r),this.hasListeners()&&this.updateTimers()}notify(e){Rr.batch(()=>{if(e.onSuccess){var r,n,s,i;(r=(n=this.options).onSuccess)==null||r.call(n,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(e.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(f=>{f(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function xOe(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function hD(t,e){return xOe(t,e)||t.state.dataUpdatedAt>0&&Tk(t,e,e.refetchOnMount)}function Tk(t,e,r){if(e.enabled!==!1){const n=typeof r=="function"?r(t):r;return n==="always"||n!==!1&&D_(t,e)}return!1}function vD(t,e,r,n){return r.enabled!==!1&&(t!==e||n.enabled===!1)&&(!r.suspense||t.state.status!=="error")&&D_(t,r)}function D_(t,e){return t.isStaleByTime(e.staleTime)}class COe extends GY{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:_k()},r)}getOptimisticResult(e){return e.behavior=_k(),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,s,i,o,a,l;const{state:c}=e,f=super.createResult(e,r),{isFetching:u,isRefetching:d}=f,h=u&&((n=c.fetchMeta)==null||(s=n.fetchMore)==null?void 0:s.direction)==="forward",v=u&&((i=c.fetchMeta)==null||(o=i.fetchMore)==null?void 0:o.direction)==="backward";return{...f,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:bOe(r,(a=c.data)==null?void 0:a.pages),hasPreviousPage:wOe(r,(l=c.data)==null?void 0:l.pages),isFetchingNextPage:h,isFetchingPreviousPage:v,isRefetching:d&&!h&&!v}}}const EOe=jd.useSyncExternalStore,yD=m.createContext(void 0),KY=m.createContext(!1);function QY(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=yD),window.ReactQueryClientContext):yD)}const SOe=({context:t}={})=>{const e=m.useContext(QY(t,m.useContext(KY)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},YY=({client:t,children:e,context:r,contextSharing:n=!1})=>{m.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]);const s=QY(r,n);return m.createElement(KY.Provider,{value:!r&&n},m.createElement(s.Provider,{value:t},e))},JY=m.createContext(!1),kOe=()=>m.useContext(JY);JY.Provider;function $Oe(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const AOe=m.createContext($Oe()),_Oe=()=>m.useContext(AOe);function POe(t,e){return typeof t=="function"?t(...e):!!t}const TOe=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},ROe=t=>{m.useEffect(()=>{t.clearReset()},[t])},IOe=({result:t,errorResetBoundary:e,useErrorBoundary:r,query:n})=>t.isError&&!e.isReset()&&!t.isFetching&&POe(r,[t.error,n]),OOe=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},MOe=(t,e)=>t.isLoading&&t.isFetching&&!e,DOe=(t,e,r)=>(t==null?void 0:t.suspense)&&MOe(e,r),NOe=(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 XY(t,e){const r=SOe({context:t.context}),n=kOe(),s=_Oe(),i=r.defaultQueryOptions(t);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=Rr.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Rr.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Rr.batchCalls(i.onSettled)),OOe(i),TOe(i,s),ROe(s);const[o]=m.useState(()=>new e(r,i)),a=o.getOptimisticResult(i);if(EOe(m.useCallback(l=>n?()=>{}:o.subscribe(Rr.batchCalls(l)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),m.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),DOe(i,a,n))throw NOe(i,o,s);if(IOe({result:a,errorResetBoundary:s,useErrorBoundary:i.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:o.trackResult(a)}function hi(t,e,r){const n=Xu(t,e,r);return XY(n,GY)}function LOe(t,e,r){const n=Xu(t,e,r);return XY(n,COe)}function jOe(t,e,r){return t===t&&(r!==void 0&&(t=t<=r?t:r),e!==void 0&&(t=t>=e?t:e)),t}var ZY=jOe;function FOe(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t-1&&t%1==0&&t<=zMe}var lJ=VMe,qMe=Fx,WMe=lJ,HMe=Bx,GMe="[object Arguments]",KMe="[object Array]",QMe="[object Boolean]",YMe="[object Date]",JMe="[object Error]",XMe="[object Function]",ZMe="[object Map]",eDe="[object Number]",tDe="[object Object]",rDe="[object RegExp]",nDe="[object Set]",sDe="[object String]",iDe="[object WeakMap]",oDe="[object ArrayBuffer]",aDe="[object DataView]",lDe="[object Float32Array]",cDe="[object Float64Array]",fDe="[object Int8Array]",uDe="[object Int16Array]",dDe="[object Int32Array]",hDe="[object Uint8Array]",vDe="[object Uint8ClampedArray]",yDe="[object Uint16Array]",mDe="[object Uint32Array]",Vt={};Vt[lDe]=Vt[cDe]=Vt[fDe]=Vt[uDe]=Vt[dDe]=Vt[hDe]=Vt[vDe]=Vt[yDe]=Vt[mDe]=!0;Vt[GMe]=Vt[KMe]=Vt[oDe]=Vt[QMe]=Vt[aDe]=Vt[YMe]=Vt[JMe]=Vt[XMe]=Vt[ZMe]=Vt[eDe]=Vt[tDe]=Vt[rDe]=Vt[nDe]=Vt[sDe]=Vt[iDe]=!1;function pDe(t){return HMe(t)&&WMe(t.length)&&!!Vt[qMe(t)]}var gDe=pDe;function bDe(t){return function(e){return t(e)}}var wDe=bDe,l2={},xDe={get exports(){return l2},set exports(t){l2=t}};(function(t,e){var r=tJ,n=e&&!e.nodeType&&e,s=n&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===n,o=i&&r.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=a})(xDe,l2);var CDe=gDe,EDe=wDe,wD=l2,xD=wD&&wD.isTypedArray,SDe=xD?EDe(xD):CDe,kDe=SDe,$De=sMe,ADe=MMe,_De=oJ,PDe=a2,TDe=aJ,RDe=kDe,IDe=Object.prototype,ODe=IDe.hasOwnProperty;function MDe(t,e){var r=_De(t),n=!r&&ADe(t),s=!r&&!n&&PDe(t),i=!r&&!n&&!s&&RDe(t),o=r||n||s||i,a=o?$De(t.length,String):[],l=a.length;for(var c in t)(e||ODe.call(t,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||TDe(c,l)))&&a.push(c);return a}var DDe=MDe,NDe=Object.prototype;function LDe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||NDe;return t===r}var jDe=LDe;function FDe(t,e){return function(r){return t(e(r))}}var BDe=FDe,UDe=BDe,zDe=UDe(Object.keys,Object),VDe=zDe,qDe=jDe,WDe=VDe,HDe=Object.prototype,GDe=HDe.hasOwnProperty;function KDe(t){if(!qDe(t))return WDe(t);var e=[];for(var r in Object(t))GDe.call(t,r)&&r!="constructor"&&e.push(r);return e}var QDe=KDe;function YDe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var N_=YDe,JDe=Fx,XDe=N_,ZDe="[object AsyncFunction]",eNe="[object Function]",tNe="[object GeneratorFunction]",rNe="[object Proxy]";function nNe(t){if(!XDe(t))return!1;var e=JDe(t);return e==eNe||e==tNe||e==ZDe||e==rNe}var sNe=nNe,iNe=sNe,oNe=lJ;function aNe(t){return t!=null&&oNe(t.length)&&!iNe(t)}var cJ=aNe,lNe=DDe,cNe=QDe,fNe=cJ;function uNe(t){return fNe(t)?lNe(t):cNe(t)}var dNe=uNe,hNe=rMe,vNe=dNe;function yNe(t){return t==null?[]:hNe(t,vNe(t))}var mNe=yNe,pNe=ZY,gNe=eJ,bNe=mNe;function wNe(t,e){var r=bNe(t);return gNe(r,pNe(e,0,r.length))}var xNe=wNe;function CNe(t,e){return t===e||t!==t&&e!==e}var ENe=CNe,SNe=ENe,kNe=cJ,$Ne=aJ,ANe=N_;function _Ne(t,e,r){if(!ANe(r))return!1;var n=typeof e;return(n=="number"?kNe(r)&&$Ne(e,r.length):n=="string"&&e in r)?SNe(r[e],t):!1}var PNe=_Ne,TNe=/\s/;function RNe(t){for(var e=t.length;e--&&TNe.test(t.charAt(e)););return e}var INe=RNe,ONe=INe,MNe=/^\s+/;function DNe(t){return t&&t.slice(0,ONe(t)+1).replace(MNe,"")}var NNe=DNe,LNe=Fx,jNe=Bx,FNe="[object Symbol]";function BNe(t){return typeof t=="symbol"||jNe(t)&&LNe(t)==FNe}var UNe=BNe,zNe=NNe,CD=N_,VNe=UNe,ED=0/0,qNe=/^[-+]0x[0-9a-f]+$/i,WNe=/^0b[01]+$/i,HNe=/^0o[0-7]+$/i,GNe=parseInt;function KNe(t){if(typeof t=="number")return t;if(VNe(t))return ED;if(CD(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=CD(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=zNe(t);var r=WNe.test(t);return r||HNe.test(t)?GNe(t.slice(2),r?2:8):qNe.test(t)?ED:+t}var QNe=KNe,YNe=QNe,SD=1/0,JNe=17976931348623157e292;function XNe(t){if(!t)return t===0?t:0;if(t=YNe(t),t===SD||t===-SD){var e=t<0?-1:1;return e*JNe}return t===t?t:0}var ZNe=XNe,eLe=ZNe;function tLe(t){var e=eLe(t),r=e%1;return e===e?r?e-r:e:0}var rLe=tLe,nLe=JOe,sLe=xNe,iLe=oJ,oLe=PNe,aLe=rLe;function lLe(t,e,r){(r?oLe(t,e,r):e===void 0)?e=1:e=aLe(e);var n=iLe(t)?nLe:sLe;return n(t,e)}var cLe=lLe,Ux={},fLe=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 u=kD[e.format]||kD.default;window.clipboardData.setData(u,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(u){r&&console.error("unable to copy using clipboardData: ",u),r&&console.error("falling back to prompt"),n=hLe("message"in e?e.message:dLe),window.prompt(n,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var yLe=vLe;function Rk(t){return Rk=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},Rk(t)}Object.defineProperty(Ux,"__esModule",{value:!0});Ux.CopyToClipboard=void 0;var ep=fJ(m),mLe=fJ(yLe),pLe=["text","onCopy","options","children"];function fJ(t){return t&&t.__esModule?t:{default:t}}function $D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function AD(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function bLe(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i=0)&&(r[s]=t[s]);return r}function wLe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _D(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 c2(t){return c2=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},c2(t)}function L_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dJ=function(t){CLe(r,t);var e=ELe(r);function r(){var n;wLe(this,r);for(var s=arguments.length,i=new Array(s),o=0;oe in t?ALe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Qy=(t,e)=>{for(var r in e||(e={}))vJ.call(e,r)&&PD(t,r,e[r]);if(f2)for(var r of f2(e))yJ.call(e,r)&&PD(t,r,e[r]);return t},j_=(t,e)=>{var r={};for(var n in t)vJ.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&f2)for(var n of f2(t))e.indexOf(n)<0&&yJ.call(t,n)&&(r[n]=t[n]);return r};/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT - */var Rf;(t=>{const e=class{constructor(l,c,f,u){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],le.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let v=0;v7)throw new RangeError("Invalid value");let v,y;for(v=f;;v++){const w=e.getNumDataCodewords(v,c)*8,E=a.getTotalBits(l,v);if(E<=w){y=E;break}if(v>=u)throw new RangeError("Data too long")}for(const w of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])h&&y<=e.getNumDataCodewords(v,w)*8&&(c=w);let b=[];for(const w of l){n(w.mode.modeBits,4,b),n(w.numChars,w.mode.numCharCountBits(v),b);for(const E of w.getData())b.push(E)}i(b.length==y);const p=e.getNumDataCodewords(v,c)*8;i(b.length<=p),n(0,Math.min(4,p-b.length),b),n(0,(8-b.length%8)%8,b),i(b.length%8==0);for(let w=236;b.lengthg[E>>>3]|=w<<7-(E&7)),new e(v,c,g,d)}getModule(l,c){return 0<=l&&l>>9)*1335;const u=(c<<10|f)^21522;i(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,s(u,d));this.setFunctionModule(8,7,s(u,6)),this.setFunctionModule(8,8,s(u,7)),this.setFunctionModule(7,8,s(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,s(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,s(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,s(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let f=0;f<12;f++)l=l<<1^(l>>>11)*7973;const c=this.version<<12|l;i(c>>>18==0);for(let f=0;f<18;f++){const u=s(c,f),d=this.size-11+f%3,h=Math.floor(f/3);this.setFunctionModule(d,h,u),this.setFunctionModule(h,d,u)}}drawFinderPattern(l,c){for(let f=-4;f<=4;f++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(f)),h=l+u,v=c+f;0<=h&&h{(w!=y-d||k>=v)&&g.push(E[w])});return i(g.length==h),g}drawCodewords(l){if(l.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let f=this.size-1;f>=1;f-=2){f==6&&(f=5);for(let u=0;u>>3],7-(c&7)),c++)}}i(c==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let c=0;c5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[d][b],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[b][d],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;dh+(v?1:0),c);const f=this.size*this.size,u=Math.ceil(Math.abs(c*20-f*10)/f)-1;return i(0<=u&&u<=9),l+=u*e.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let f=[6];for(let u=this.size-7;f.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*l+128)*l+64;if(l>=2){const f=Math.floor(l/7)+2;c-=(25*f-10)*f-55,l>=7&&(c-=36)}return i(208<=c&&c<=29648),c}static getNumDataCodewords(l,c){return Math.floor(e.getNumRawDataModules(l)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let c=[];for(let u=0;u0);for(const u of l){const d=u^f.shift();f.push(0),c.forEach((h,v)=>f[v]^=e.reedSolomonMultiply(h,d))}return f}static reedSolomonMultiply(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");let f=0;for(let u=7;u>=0;u--)f=f<<1^(f>>>7)*285,f^=(c>>>u&1)*l;return i(f>>>8==0),f}finderPenaltyCountPatterns(l){const c=l[1];i(c<=this.size*3);const f=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(f&&l[0]>=c*4&&l[6]>=c?1:0)+(f&&l[6]>=c*4&&l[0]>=c?1:0)}finderPenaltyTerminateAndCount(l,c,f){return l&&(this.finderPenaltyAddHistory(c,f),c=0),c+=this.size,this.finderPenaltyAddHistory(c,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)}};let r=e;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;function n(l,c,f){if(c<0||c>31||l>>>c)throw new RangeError("Value out of range");for(let u=c-1;u>=0;u--)f.push(l>>>u&1)}function s(l,c){return(l>>>c&1)!=0}function i(l){if(!l)throw new Error("Assertion error")}const o=class{constructor(l,c,f){if(this.mode=l,this.numChars=c,this.bitData=f,c<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}static makeBytes(l){let c=[];for(const f of l)n(f,8,c);return new o(o.Mode.BYTE,l.length,c)}static makeNumeric(l){if(!o.isNumeric(l))throw new RangeError("String contains non-numeric characters");let c=[];for(let f=0;f=1<{(e=>{const r=class{constructor(s,i){this.ordinal=s,this.formatBits=i}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(Rf||(Rf={}));(t=>{(e=>{const r=class{constructor(s,i){this.modeBits=s,this.numBitsCharCount=i}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(Rf||(Rf={}));var Xu=Rf;/** + */var If;(t=>{const e=class{constructor(l,c,f,u){if(this.version=l,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],le.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=l*4+17;let d=[];for(let v=0;v7)throw new RangeError("Invalid value");let v,y;for(v=f;;v++){const w=e.getNumDataCodewords(v,c)*8,E=a.getTotalBits(l,v);if(E<=w){y=E;break}if(v>=u)throw new RangeError("Data too long")}for(const w of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])h&&y<=e.getNumDataCodewords(v,w)*8&&(c=w);let g=[];for(const w of l){n(w.mode.modeBits,4,g),n(w.numChars,w.mode.numCharCountBits(v),g);for(const E of w.getData())g.push(E)}i(g.length==y);const b=e.getNumDataCodewords(v,c)*8;i(g.length<=b),n(0,Math.min(4,b-g.length),g),n(0,(8-g.length%8)%8,g),i(g.length%8==0);for(let w=236;g.lengthp[E>>>3]|=w<<7-(E&7)),new e(v,c,p,d)}getModule(l,c){return 0<=l&&l>>9)*1335;const u=(c<<10|f)^21522;i(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,s(u,d));this.setFunctionModule(8,7,s(u,6)),this.setFunctionModule(8,8,s(u,7)),this.setFunctionModule(7,8,s(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,s(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,s(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,s(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let l=this.version;for(let f=0;f<12;f++)l=l<<1^(l>>>11)*7973;const c=this.version<<12|l;i(c>>>18==0);for(let f=0;f<18;f++){const u=s(c,f),d=this.size-11+f%3,h=Math.floor(f/3);this.setFunctionModule(d,h,u),this.setFunctionModule(h,d,u)}}drawFinderPattern(l,c){for(let f=-4;f<=4;f++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(f)),h=l+u,v=c+f;0<=h&&h{(w!=y-d||k>=v)&&p.push(E[w])});return i(p.length==h),p}drawCodewords(l){if(l.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let f=this.size-1;f>=1;f-=2){f==6&&(f=5);for(let u=0;u>>3],7-(c&7)),c++)}}i(c==l.length*8)}applyMask(l){if(l<0||l>7)throw new RangeError("Mask value out of range");for(let c=0;c5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[d][g],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;d5&&l++):(this.finderPenaltyAddHistory(v,y),h||(l+=this.finderPenaltyCountPatterns(y)*e.PENALTY_N3),h=this.modules[g][d],v=1);l+=this.finderPenaltyTerminateAndCount(h,v,y)*e.PENALTY_N3}for(let d=0;dh+(v?1:0),c);const f=this.size*this.size,u=Math.ceil(Math.abs(c*20-f*10)/f)-1;return i(0<=u&&u<=9),l+=u*e.PENALTY_N4,i(0<=l&&l<=2568888),l}getAlignmentPatternPositions(){if(this.version==1)return[];{const l=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(l*2-2))*2;let f=[6];for(let u=this.size-7;f.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*l+128)*l+64;if(l>=2){const f=Math.floor(l/7)+2;c-=(25*f-10)*f-55,l>=7&&(c-=36)}return i(208<=c&&c<=29648),c}static getNumDataCodewords(l,c){return Math.floor(e.getNumRawDataModules(l)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][l]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][l]}static reedSolomonComputeDivisor(l){if(l<1||l>255)throw new RangeError("Degree out of range");let c=[];for(let u=0;u0);for(const u of l){const d=u^f.shift();f.push(0),c.forEach((h,v)=>f[v]^=e.reedSolomonMultiply(h,d))}return f}static reedSolomonMultiply(l,c){if(l>>>8||c>>>8)throw new RangeError("Byte out of range");let f=0;for(let u=7;u>=0;u--)f=f<<1^(f>>>7)*285,f^=(c>>>u&1)*l;return i(f>>>8==0),f}finderPenaltyCountPatterns(l){const c=l[1];i(c<=this.size*3);const f=c>0&&l[2]==c&&l[3]==c*3&&l[4]==c&&l[5]==c;return(f&&l[0]>=c*4&&l[6]>=c?1:0)+(f&&l[6]>=c*4&&l[0]>=c?1:0)}finderPenaltyTerminateAndCount(l,c,f){return l&&(this.finderPenaltyAddHistory(c,f),c=0),c+=this.size,this.finderPenaltyAddHistory(c,f),this.finderPenaltyCountPatterns(f)}finderPenaltyAddHistory(l,c){c[0]==0&&(l+=this.size),c.pop(),c.unshift(l)}};let r=e;r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=r;function n(l,c,f){if(c<0||c>31||l>>>c)throw new RangeError("Value out of range");for(let u=c-1;u>=0;u--)f.push(l>>>u&1)}function s(l,c){return(l>>>c&1)!=0}function i(l){if(!l)throw new Error("Assertion error")}const o=class{constructor(l,c,f){if(this.mode=l,this.numChars=c,this.bitData=f,c<0)throw new RangeError("Invalid argument");this.bitData=f.slice()}static makeBytes(l){let c=[];for(const f of l)n(f,8,c);return new o(o.Mode.BYTE,l.length,c)}static makeNumeric(l){if(!o.isNumeric(l))throw new RangeError("String contains non-numeric characters");let c=[];for(let f=0;f=1<{(e=>{const r=class{constructor(s,i){this.ordinal=s,this.formatBits=i}};let n=r;n.LOW=new r(0,1),n.MEDIUM=new r(1,0),n.QUARTILE=new r(2,3),n.HIGH=new r(3,2),e.Ecc=n})(t.QrCode||(t.QrCode={}))})(If||(If={}));(t=>{(e=>{const r=class{constructor(s,i){this.modeBits=s,this.numBitsCharCount=i}numCharCountBits(s){return this.numBitsCharCount[Math.floor((s+7)/17)]}};let n=r;n.NUMERIC=new r(1,[10,12,14]),n.ALPHANUMERIC=new r(2,[9,11,13]),n.BYTE=new r(4,[8,16,16]),n.KANJI=new r(8,[8,10,12]),n.ECI=new r(7,[0,0,0]),e.Mode=n})(t.QrSegment||(t.QrSegment={}))})(If||(If={}));var Zu=If;/** * @license qrcode.react * Copyright (c) Paul O'Shannessy * SPDX-License-Identifier: ISC - */var mJ={L:Xu.QrCode.Ecc.LOW,M:Xu.QrCode.Ecc.MEDIUM,Q:Xu.QrCode.Ecc.QUARTILE,H:Xu.QrCode.Ecc.HIGH},pJ=128,gJ="L",bJ="#FFFFFF",wJ="#000000",xJ=!1,j_=4,ALe=.1;function CJ(t,e=0){const r=[];return t.forEach(function(n,s){let i=null;n.forEach(function(o,a){if(!o&&i!==null){r.push(`M${i+e} ${s+e}h${a-i}v1H${i+e}z`),i=null;return}if(a===n.length-1){if(!o)return;i===null?r.push(`M${a+e},${s+e} h1v1H${a+e}z`):r.push(`M${i+e},${s+e} h${a+1-i}v1H${i+e}z`);return}o&&i===null&&(i=a)})}),r.join("")}function EJ(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((s,i)=>i=e.x+e.w?s:!1))}function SJ(t,e,r,n){if(n==null)return null;const s=r?j_:0,i=t.length+s*2,o=Math.floor(e*ALe),a=i/e,l=(n.width||o)*a,c=(n.height||o)*a,f=n.x==null?t.length/2-l/2:n.x*a,u=n.y==null?t.length/2-c/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(f),v=Math.floor(u),y=Math.ceil(l+f-h),b=Math.ceil(c+u-v);d={x:h,y:v,w:y,h:b}}return{x:f,y:u,h:c,w:l,excavation:d}}var _Le=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function PLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,style:l,imageSettings:c}=e,f=L_(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),u=c==null?void 0:c.src,d=m.useRef(null),h=m.useRef(null),[v,y]=m.useState(!1);m.useEffect(()=>{if(d.current!=null){const g=d.current,w=g.getContext("2d");if(!w)return;let E=Xu.QrCode.encodeText(r,mJ[s]).getModules();const k=a?j_:0,$=E.length+k*2,C=SJ(E,n,a,c),T=h.current,j=C!=null&&T!==null&&T.complete&&T.naturalHeight!==0&&T.naturalWidth!==0;j&&C.excavation!=null&&(E=EJ(E,C.excavation));const F=window.devicePixelRatio||1;g.height=g.width=n*F;const U=n/$*F;w.scale(U,U),w.fillStyle=i,w.fillRect(0,0,$,$),w.fillStyle=o,_Le?w.fill(new Path2D(CJ(E,k))):E.forEach(function(V,N){V.forEach(function(x,S){x&&w.fillRect(S+k,N+k,1,1)})}),j&&w.drawImage(T,C.x+k,C.y+k,C.w,C.h)}}),m.useEffect(()=>{y(!1)},[u]);const b=Ky({height:n,width:n},l);let p=null;return u!=null&&(p=P.createElement("img",{src:u,key:u,style:{display:"none"},onLoad:()=>{y(!0)},ref:h})),P.createElement(P.Fragment,null,P.createElement("canvas",Ky({style:b,height:n,width:n,ref:d},f)),p)}function TLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,imageSettings:l}=e,c=L_(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=Xu.QrCode.encodeText(r,mJ[s]).getModules();const u=a?j_:0,d=f.length+u*2,h=SJ(f,n,a,l);let v=null;l!=null&&h!=null&&(h.excavation!=null&&(f=EJ(f,h.excavation)),v=P.createElement("image",{xlinkHref:l.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"}));const y=CJ(f,u);return P.createElement("svg",Ky({height:n,width:n,viewBox:`0 0 ${d} ${d}`},c),P.createElement("path",{fill:i,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),P.createElement("path",{fill:o,d:y,shapeRendering:"crispEdges"}),v)}var RLe=t=>{const e=t,{renderAs:r}=e,n=L_(e,["renderAs"]);return r==="svg"?P.createElement(TLe,Ky({},n)):P.createElement(PLe,Ky({},n))},Ik={},ILe={get exports(){return Ik},set exports(t){Ik=t}};(function(t,e){(function(r,n){t.exports=n()})(Wr,function(){var r=1e3,n=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",f="week",u="month",d="quarter",h="year",v="date",y="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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,g={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(N){var x=["th","st","nd","rd"],S=N%100;return"["+N+(x[(S-20)%10]||x[S]||x[0])+"]"}},w=function(N,x,S){var R=String(N);return!R||R.length>=x?N:""+Array(x+1-R.length).join(S)+N},E={s:w,z:function(N){var x=-N.utcOffset(),S=Math.abs(x),R=Math.floor(S/60),M=S%60;return(x<=0?"+":"-")+w(R,2,"0")+":"+w(M,2,"0")},m:function N(x,S){if(x.date()1)return N(I[0])}else{var B=x.name;$[B]=x,M=B}return!R&&M&&(k=M),M||!R&&k},j=function(N,x){if(C(N))return N.clone();var S=typeof x=="object"?x:{};return S.date=N,S.args=arguments,new U(S)},F=E;F.l=T,F.i=C,F.w=function(N,x){return j(N,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var U=function(){function N(S){this.$L=T(S.locale,null,!0),this.parse(S)}var x=N.prototype;return x.parse=function(S){this.$d=function(R){var M=R.date,_=R.utc;if(M===null)return new Date(NaN);if(F.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var I=M.match(b);if(I){var B=I[2]-1||0,D=(I[7]||"0").substring(0,3);return _?new Date(Date.UTC(I[1],B,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)):new Date(I[1],B,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)}}return new Date(M)}(S),this.$x=S.x||{},this.init()},x.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},x.$utils=function(){return F},x.isValid=function(){return this.$d.toString()!==y},x.isSame=function(S,R){var M=j(S);return this.startOf(R)<=M&&M<=this.endOf(R)},x.isAfter=function(S,R){return j(S)`Invalid value for key ${t}`,BLe=t=>`Pattern length exceeds max of ${t}.`,ULe=t=>`Missing ${t} property in key`,zLe=t=>`Property 'weight' in key '${t}' must be a positive integer`,TD=Object.prototype.hasOwnProperty;class VLe{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let s=PJ(n);r+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,r+=s.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 PJ(t){let e=null,r=null,n=null,s=1,i=null;if(go(t)||xa(t))n=t,e=RD(t),r=Ok(t);else{if(!TD.call(t,"name"))throw new Error(ULe("name"));const o=t.name;if(n=o,TD.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(zLe(o));e=RD(o),r=Ok(o),i=t.getFn}return{path:e,id:r,weight:s,src:n,getFn:i}}function RD(t){return xa(t)?t:t.split(".")}function Ok(t){return xa(t)?t.join("."):t}function qLe(t,e){let r=[],n=!1;const s=(i,o,a)=>{if(ws(i))if(!o[a])r.push(i);else{let l=o[a];const c=i[l];if(!ws(c))return;if(a===o.length-1&&(go(c)||$J(c)||NLe(c)))r.push(DLe(c));else if(xa(c)){n=!0;for(let f=0,u=c.length;ft.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,go(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();go(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=s.getFn?s.getFn(e):this.getFn(e,s.path);if(ws(o)){if(xa(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:f}=l.pop();if(ws(f))if(go(f)&&!$5(f)){let u={v:f,i:c,n:this.norm.get(f)};a.push(u)}else xa(f)&&f.forEach((u,d)=>{l.push({nestedArrIndex:d,value:u})})}n.$[i]=a}else if(go(o)&&!$5(o)){let a={v:o,n:this.norm.get(o)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function TJ(t,e,{getFn:r=_e.getFn,fieldNormWeight:n=_e.fieldNormWeight}={}){const s=new F_({getFn:r,fieldNormWeight:n});return s.setKeys(t.map(PJ)),s.setSources(e),s.create(),s}function JLe(t,{getFn:e=_e.getFn,fieldNormWeight:r=_e.fieldNormWeight}={}){const{keys:n,records:s}=t,i=new F_({getFn:e,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(s),i}function ep(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:s=_e.distance,ignoreLocation:i=_e.ignoreLocation}={}){const o=e/t.length;if(i)return o;const a=Math.abs(n-r);return s?o+a/s:a?1:o}function XLe(t=[],e=_e.minMatchCharLength){let r=[],n=-1,s=-1,i=0;for(let o=t.length;i=e&&r.push([n,s]),n=-1)}return t[i-1]&&i-n>=e&&r.push([n,i-1]),r}const qc=32;function ZLe(t,e,r,{location:n=_e.location,distance:s=_e.distance,threshold:i=_e.threshold,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,includeMatches:l=_e.includeMatches,ignoreLocation:c=_e.ignoreLocation}={}){if(e.length>qc)throw new Error(BLe(qc));const f=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let h=i,v=d;const y=a>1||l,b=y?Array(u):[];let p;for(;(p=t.indexOf(e,v))>-1;){let C=ep(e,{currentLocation:p,expectedLocation:d,distance:s,ignoreLocation:c});if(h=Math.min(C,h),v=p+f,y){let T=0;for(;T=F;x-=1){let S=x-1,R=r[t.charAt(S)];if(y&&(b[S]=+!!R),V[x]=(V[x+1]<<1|1)&R,C&&(V[x]|=(g[x+1]|g[x])<<1|1|g[x+1]),V[x]&k&&(w=ep(e,{errors:C,currentLocation:S,expectedLocation:d,distance:s,ignoreLocation:c}),w<=h)){if(h=w,v=S,v<=d)break;F=Math.max(1,2*d-v)}}if(ep(e,{errors:C+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:c})>h)break;g=V}const $={isMatch:v>=0,score:Math.max(.001,w)};if(y){const C=XLe(b,a);C.length?l&&($.indices=C):$.isMatch=!1}return $}function eje(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:eje(d),startIndex:h})},u=this.pattern.length;if(u>qc){let d=0;const h=u%qc,v=u-h;for(;d{const{isMatch:p,score:g,indices:w}=ZLe(e,v,y,{location:s+b,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:n,ignoreLocation:c});p&&(d=!0),u+=g,p&&w&&(f=[...f,...w])});let h={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(h.indices=f),h}}class hc{constructor(e){this.pattern=e}static isMultiMatch(e){return ID(e,this.multiRegex)}static isSingleMatch(e){return ID(e,this.singleRegex)}search(){}}function ID(t,e){const r=t.match(e);return r?r[1]:null}class tje extends hc{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 rje extends hc{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 nje extends hc{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 sje extends hc{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 ije extends hc{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 oje extends hc{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 IJ extends hc{constructor(e,{location:r=_e.location,threshold:n=_e.threshold,distance:s=_e.distance,includeMatches:i=_e.includeMatches,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,isCaseSensitive:l=_e.isCaseSensitive,ignoreLocation:c=_e.ignoreLocation}={}){super(e),this._bitapSearch=new RJ(e,{location:r,threshold:n,distance:s,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class OJ extends hc{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const s=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+i,s.push([n,r-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const Mk=[tje,OJ,nje,sje,oje,ije,rje,IJ],OD=Mk.length,aje=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,lje="|";function cje(t,e={}){return t.split(lje).map(r=>{let n=r.trim().split(aje).filter(i=>i&&!!i.trim()),s=[];for(let i=0,o=n.length;i!!(t[f2.AND]||t[f2.OR]),hje=t=>!!t[Lk.PATH],vje=t=>!xa(t)&&AJ(t)&&!jk(t),MD=t=>({[f2.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function MJ(t,e,{auto:r=!0}={}){const n=s=>{let i=Object.keys(s);const o=hje(s);if(!o&&i.length>1&&!jk(s))return n(MD(s));if(vje(s)){const l=o?s[Lk.PATH]:i[0],c=o?s[Lk.PATTERN]:s[l];if(!go(c))throw new Error(FLe(l));const f={keyId:Ok(l),pattern:c};return r&&(f.searcher=Nk(c,e)),f}let a={children:[],operator:i[0]};return i.forEach(l=>{const c=s[l];xa(c)&&c.forEach(f=>{a.children.push(n(f))})}),a};return jk(t)||(t=MD(t)),n(t)}function yje(t,{ignoreFieldNorm:e=_e.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:s,norm:i,score:o})=>{const a=s?s.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:i))}),r.score=n})}function mje(t,e){const r=t.matches;e.matches=[],ws(r)&&r.forEach(n=>{if(!ws(n.indices)||!n.indices.length)return;const{indices:s,value:i}=n;let o={indices:s,value:i};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function pje(t,e){e.score=t.score}function gje(t,e,{includeMatches:r=_e.includeMatches,includeScore:n=_e.includeScore}={}){const s=[];return r&&s.push(mje),n&&s.push(pje),t.map(i=>{const{idx:o}=i,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(i,a)}),a})}class Ca{constructor(e,r={},n){this.options={..._e,...r},this.options.useExtendedSearch,this._keyStore=new VLe(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof F_))throw new Error(jLe);this._myIndex=r||TJ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){ws(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,s=this._docs.length;n-1&&(l=l.slice(0,r)),gje(l,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const r=Nk(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:i,i:o,n:a})=>{if(!ws(i))return;const{isMatch:l,score:c,indices:f}=r.searchIn(i);l&&s.push({item:i,idx:o,matches:[{score:c,value:i,norm:a,indices:f}]})}),s}_searchLogical(e){const r=MJ(e,this.options),n=(a,l,c)=>{if(!a.children){const{keyId:u,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:d});return h&&h.length?[{idx:c,item:l,matches:h}]:[]}const f=[];for(let u=0,d=a.children.length;u{if(ws(a)){let c=n(r,a,l);c.length&&(i[l]||(i[l]={idx:l,item:a,matches:[]},o.push(i[l])),c.forEach(({matches:f})=>{i[l].matches.push(...f)}))}}),o}_searchObjectList(e){const r=Nk(e,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:o,i:a})=>{if(!ws(o))return;let l=[];n.forEach((c,f)=>{l.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),l.length&&i.push({idx:a,item:o,matches:l})}),i}_findMatches({key:e,value:r,searcher:n}){if(!ws(r))return[];let s=[];if(xa(r))r.forEach(({v:i,i:o,n:a})=>{if(!ws(i))return;const{isMatch:l,score:c,indices:f}=n.searchIn(i);l&&s.push({score:c,key:e,value:i,idx:o,norm:a,indices:f})});else{const{v:i,n:o}=r,{isMatch:a,score:l,indices:c}=n.searchIn(i);a&&s.push({score:l,key:e,value:i,norm:o,indices:c})}return s}}Ca.version="6.6.2";Ca.createIndex=TJ;Ca.parseIndex=JLe;Ca.config=_e;Ca.parseQuery=MJ;dje(uje);function DJ(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=>wje(r,e))}function tu(...t){return m.useCallback(NJ(...t),t)}function LJ(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,b=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:b},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,xje(s,...e)]}function xje(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const B_=m.forwardRef((t,e)=>{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(Eje);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(Fk,tn({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(Fk,tn({},n,{ref:e}),r)});B_.displayName="Slot";const Fk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...Sje(n,r.props),ref:e?NJ(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});Fk.displayName="SlotClone";const Cje=({children:t})=>m.createElement(m.Fragment,null,t);function Eje(t){return m.isValidElement(t)&&t.type===Cje}function Sje(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const kje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Kh=kje.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?B_:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,tn({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function $je(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}function Jl(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Aje(t,e=globalThis==null?void 0:globalThis.document){const r=Jl(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const Bk="dismissableLayer.update",_je="dismissableLayer.pointerDownOutside",Pje="dismissableLayer.focusOutside";let DD;const Tje=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rje=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(Tje),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=tu(e,T=>d(T)),b=Array.from(f.layers),[p]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(p),w=u?b.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=g,$=Ije(T=>{const j=T.target,F=[...f.branches].some(U=>U.contains(j));!k||F||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),C=Oje(T=>{const j=T.target;[...f.branches].some(U=>U.contains(j))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return Aje(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(DD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ND(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=DD)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ND())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(Bk,T),()=>document.removeEventListener(Bk,T)},[]),m.createElement(Kh.div,tn({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:uf(t.onFocusCapture,C.onFocusCapture),onBlurCapture:uf(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:uf(t.onPointerDownCapture,$.onPointerDownCapture)}))});function Ije(t,e=globalThis==null?void 0:globalThis.document){const r=Jl(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){jJ(_je,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function Oje(t,e=globalThis==null?void 0:globalThis.document){const r=Jl(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&jJ(Pje,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ND(){const t=new CustomEvent(Bk);document.dispatchEvent(t)}function jJ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?$je(s,i):s.dispatchEvent(i)}let A5=0;function Mje(){m.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:LD()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:LD()),A5++,()=>{A5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),A5--}},[])}function LD(){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 _5="focusScope.autoFocusOnMount",P5="focusScope.autoFocusOnUnmount",jD={bubbles:!1,cancelable:!0},Dje=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=Jl(s),f=Jl(i),u=m.useRef(null),d=tu(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ya(u.current,{select:!0})},b=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ya(u.current,{select:!0}))},p=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ya(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const g=new MutationObserver(p);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),g.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){BD.add(h);const y=document.activeElement;if(!a.contains(y)){const p=new CustomEvent(_5,jD);a.addEventListener(_5,c),a.dispatchEvent(p),p.defaultPrevented||(Nje(Uje(FJ(a)),{select:!0}),document.activeElement===y&&Ya(a))}return()=>{a.removeEventListener(_5,c),setTimeout(()=>{const p=new CustomEvent(P5,jD);a.addEventListener(P5,f),a.dispatchEvent(p),p.defaultPrevented||Ya(y??document.body,{select:!0}),a.removeEventListener(P5,f),BD.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,p=document.activeElement;if(b&&p){const g=y.currentTarget,[w,E]=Lje(g);w&&E?!y.shiftKey&&p===E?(y.preventDefault(),r&&Ya(w,{select:!0})):y.shiftKey&&p===w&&(y.preventDefault(),r&&Ya(E,{select:!0})):p===g&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(Kh.div,tn({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function Nje(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ya(n,{select:e}),document.activeElement!==r)return}function Lje(t){const e=FJ(t),r=FD(e,t),n=FD(e.reverse(),t);return[r,n]}function FJ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function FD(t,e){for(const r of t)if(!jje(r,{upTo:e}))return r}function jje(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 Fje(t){return t instanceof HTMLInputElement&&"select"in t}function Ya(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Fje(t)&&e&&t.select()}}const BD=Bje();function Bje(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=UD(t,e),t.unshift(e)},remove(e){var r;t=UD(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function UD(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Uje(t){return t.filter(e=>e.tagName!=="A")}const lh=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{},zje=Zk["useId".toString()]||(()=>{});let Vje=0;function qje(t){const[e,r]=m.useState(zje());return lh(()=>{t||r(n=>n??String(Vje++))},[t]),t||(e?`radix-${e}`:"")}const Wje=["top","right","bottom","left"],Xl=Math.min,xs=Math.max,u2=Math.round,tp=Math.floor,Zl=t=>({x:t,y:t}),Hje={left:"right",right:"left",bottom:"top",top:"bottom"},Gje={start:"end",end:"start"};function Uk(t,e,r){return xs(t,Xl(e,r))}function Ea(t,e){return typeof t=="function"?t(e):t}function Sa(t){return t.split("-")[0]}function Qh(t){return t.split("-")[1]}function U_(t){return t==="x"?"y":"x"}function z_(t){return t==="y"?"height":"width"}function Yh(t){return["top","bottom"].includes(Sa(t))?"y":"x"}function V_(t){return U_(Yh(t))}function Kje(t,e,r){r===void 0&&(r=!1);const n=Qh(t),s=V_(t),i=z_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=d2(o)),[o,d2(o)]}function Qje(t){const e=d2(t);return[zk(t),e,zk(e)]}function zk(t){return t.replace(/start|end/g,e=>Gje[e])}function Yje(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function Jje(t,e,r,n){const s=Qh(t);let i=Yje(Sa(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(zk)))),i}function d2(t){return t.replace(/left|right|bottom|top/g,e=>Hje[e])}function Xje(t){return{top:0,right:0,bottom:0,left:0,...t}}function BJ(t){return typeof t!="number"?Xje(t):{top:t,right:t,bottom:t,left:t}}function h2(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function zD(t,e,r){let{reference:n,floating:s}=t;const i=Yh(e),o=V_(e),a=z_(o),l=Sa(e),c=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Qh(e)){case"start":h[o]-=d*(r&&c?-1:1);break;case"end":h[o]+=d*(r&&c?-1:1);break}return h}const Zje=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=zD(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Ea(t,e)||{};if(c==null)return{};const u=BJ(f),d={x:r,y:n},h=V_(s),v=z_(h),y=await o.getDimensions(c),b=h==="y",p=b?"top":"left",g=b?"bottom":"right",w=b?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[h]-d[h]-i.floating[v],k=d[h]-i.reference[h],$=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let C=$?$[w]:0;(!C||!await(o.isElement==null?void 0:o.isElement($)))&&(C=a.floating[w]||i.floating[v]);const T=E/2-k/2,j=C/2-y[v]/2-1,F=Xl(u[p],j),U=Xl(u[g],j),V=F,N=C-y[v]-U,x=C/2-y[v]/2+T,S=Uk(V,x,N),R=!l.arrow&&Qh(s)!=null&&x!=S&&i.reference[v]/2-(xV<=0)){var j,F;const V=(((j=i.flip)==null?void 0:j.index)||0)+1,N=k[V];if(N)return{data:{index:V,overflows:T},reset:{placement:N}};let x=(F=T.filter(S=>S.overflows[0]<=0).sort((S,R)=>S.overflows[1]-R.overflows[1])[0])==null?void 0:F.placement;if(!x)switch(h){case"bestFit":{var U;const S=(U=T.map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,_)=>M+_,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:U[0];S&&(x=S);break}case"initialPlacement":x=a;break}if(s!==x)return{reset:{placement:x}}}return{}}}};function qD(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function WD(t){return Wje.some(e=>t[e]>=0)}const tFe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Ea(t,e);switch(n){case"referenceHidden":{const i=await Qy(e,{...s,elementContext:"reference"}),o=qD(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:WD(o)}}}case"escaped":{const i=await Qy(e,{...s,altBoundary:!0}),o=qD(i,r.floating);return{data:{escapedOffsets:o,escaped:WD(o)}}}default:return{}}}}};async function rFe(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=Sa(r),a=Qh(r),l=Yh(r)==="y",c=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,u=Ea(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const nFe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await rFe(e,t);return{x:r+s.x,y:n+s.y,data:s}}}},sFe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:p,y:g}=b;return{x:p,y:g}}},...l}=Ea(t,e),c={x:r,y:n},f=await Qy(e,l),u=Yh(Sa(s)),d=U_(u);let h=c[d],v=c[u];if(i){const b=d==="y"?"top":"left",p=d==="y"?"bottom":"right",g=h+f[b],w=h-f[p];h=Uk(g,h,w)}if(o){const b=u==="y"?"top":"left",p=u==="y"?"bottom":"right",g=v+f[b],w=v-f[p];v=Uk(g,v,w)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},iFe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ea(t,e),f={x:r,y:n},u=Yh(s),d=U_(u);let h=f[d],v=f[u];const y=Ea(a,e),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",E=i.reference[d]-i.floating[w]+b.mainAxis,k=i.reference[d]+i.reference[w]-b.mainAxis;hk&&(h=k)}if(c){var p,g;const w=d==="y"?"width":"height",E=["top","left"].includes(Sa(s)),k=i.reference[u]-i.floating[w]+(E&&((p=o.offset)==null?void 0:p[u])||0)+(E?0:b.crossAxis),$=i.reference[u]+i.reference[w]+(E?0:((g=o.offset)==null?void 0:g[u])||0)-(E?b.crossAxis:0);v$&&(v=$)}return{[d]:h,[u]:v}}}},oFe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=Ea(t,e),l=await Qy(e,a),c=Sa(r),f=Qh(r),u=Yh(r)==="y",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const b=h-l[v],p=d-l[y],g=!e.middlewareData.shift;let w=b,E=p;if(u){const $=d-l.left-l.right;E=f||g?Xl(p,$):$}else{const $=h-l.top-l.bottom;w=f||g?Xl(b,$):$}if(g&&!f){const $=xs(l.left,0),C=xs(l.right,0),T=xs(l.top,0),j=xs(l.bottom,0);u?E=d-2*($!==0||C!==0?$+C:xs(l.left,l.right)):w=h-2*(T!==0||j!==0?T+j:xs(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function ec(t){return UJ(t)?(t.nodeName||"").toLowerCase():"#document"}function _s(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Na(t){var e;return(e=(UJ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function UJ(t){return t instanceof Node||t instanceof _s(t).Node}function ka(t){return t instanceof Element||t instanceof _s(t).Element}function Do(t){return t instanceof HTMLElement||t instanceof _s(t).HTMLElement}function HD(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _s(t).ShadowRoot}function U0(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=ai(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function aFe(t){return["table","td","th"].includes(ec(t))}function q_(t){const e=W_(),r=ai(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 lFe(t){let e=ch(t);for(;Do(e)&&!Ux(e);){if(q_(e))return e;e=ch(e)}return null}function W_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ux(t){return["html","body","#document"].includes(ec(t))}function ai(t){return _s(t).getComputedStyle(t)}function zx(t){return ka(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ch(t){if(ec(t)==="html")return t;const e=t.assignedSlot||t.parentNode||HD(t)&&t.host||Na(t);return HD(e)?e.host:e}function zJ(t){const e=ch(t);return Ux(e)?t.ownerDocument?t.ownerDocument.body:t.body:Do(e)&&U0(e)?e:zJ(e)}function Yy(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=zJ(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=_s(s);return i?e.concat(o,o.visualViewport||[],U0(s)?s:[],o.frameElement&&r?Yy(o.frameElement):[]):e.concat(s,Yy(s,[],r))}function VJ(t){const e=ai(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Do(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=u2(r)!==i||u2(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function H_(t){return ka(t)?t:t.contextElement}function Cd(t){const e=H_(t);if(!Do(e))return Zl(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=VJ(e);let o=(i?u2(r.width):r.width)/n,a=(i?u2(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const cFe=Zl(0);function qJ(t){const e=_s(t);return!W_()||!e.visualViewport?cFe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function fFe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==_s(t)?!1:e}function If(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=H_(t);let o=Zl(1);e&&(n?ka(n)&&(o=Cd(n)):o=Cd(t));const a=fFe(i,r,n)?qJ(i):Zl(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=_s(i),h=n&&ka(n)?_s(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=Cd(v),b=v.getBoundingClientRect(),p=ai(v),g=b.left+(v.clientLeft+parseFloat(p.paddingLeft))*y.x,w=b.top+(v.clientTop+parseFloat(p.paddingTop))*y.y;l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=g,c+=w,v=_s(v).frameElement}}return h2({width:f,height:u,x:l,y:c})}function uFe(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=Do(r),i=Na(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a=Zl(1);const l=Zl(0);if((s||!s&&n!=="fixed")&&((ec(r)!=="body"||U0(i))&&(o=zx(r)),Do(r))){const c=If(r);a=Cd(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function dFe(t){return Array.from(t.getClientRects())}function WJ(t){return If(Na(t)).left+zx(t).scrollLeft}function hFe(t){const e=Na(t),r=zx(t),n=t.ownerDocument.body,s=xs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=xs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+WJ(t);const a=-r.scrollTop;return ai(n).direction==="rtl"&&(o+=xs(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function vFe(t,e){const r=_s(t),n=Na(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=W_();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function yFe(t,e){const r=If(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Do(t)?Cd(t):Zl(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function GD(t,e,r){let n;if(e==="viewport")n=vFe(t,r);else if(e==="document")n=hFe(Na(t));else if(ka(e))n=yFe(e,r);else{const s=qJ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return h2(n)}function HJ(t,e){const r=ch(t);return r===e||!ka(r)||Ux(r)?!1:ai(r).position==="fixed"||HJ(r,e)}function mFe(t,e){const r=e.get(t);if(r)return r;let n=Yy(t,[],!1).filter(a=>ka(a)&&ec(a)!=="body"),s=null;const i=ai(t).position==="fixed";let o=i?ch(t):t;for(;ka(o)&&!Ux(o);){const a=ai(o),l=q_(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||U0(o)&&!l&&HJ(t,o))?n=n.filter(f=>f!==o):s=a,o=ch(o)}return e.set(t,n),n}function pFe(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?mFe(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=GD(e,f,s);return c.top=xs(u.top,c.top),c.right=Xl(u.right,c.right),c.bottom=Xl(u.bottom,c.bottom),c.left=xs(u.left,c.left),c},GD(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gFe(t){return VJ(t)}function bFe(t,e,r){const n=Do(e),s=Na(e),i=r==="fixed",o=If(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Zl(0);if(n||!n&&!i)if((ec(e)!=="body"||U0(s))&&(a=zx(e)),n){const c=If(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=WJ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function KD(t,e){return!Do(t)||ai(t).position==="fixed"?null:e?e(t):t.offsetParent}function GJ(t,e){const r=_s(t);if(!Do(t))return r;let n=KD(t,e);for(;n&&aFe(n)&&ai(n).position==="static";)n=KD(n,e);return n&&(ec(n)==="html"||ec(n)==="body"&&ai(n).position==="static"&&!q_(n))?r:n||lFe(t)||r}const wFe=async function(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||GJ,i=this.getDimensions;return{reference:bFe(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}};function xFe(t){return ai(t).direction==="rtl"}const CFe={convertOffsetParentRelativeRectToViewportRelativeRect:uFe,getDocumentElement:Na,getClippingRect:pFe,getOffsetParent:GJ,getElementRects:wFe,getClientRects:dFe,getDimensions:gFe,getScale:Cd,isElement:ka,isRTL:xFe};function EFe(t,e){let r=null,n;const s=Na(t);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=tp(f),v=tp(s.clientWidth-(c+u)),y=tp(s.clientHeight-(f+d)),b=tp(c),g={rootMargin:-h+"px "+-v+"px "+-y+"px "+-b+"px",threshold:xs(0,Xl(1,l))||1};let w=!0;function E(k){const $=k[0].intersectionRatio;if($!==l){if(!w)return o();$?o(!1,$):n=setTimeout(()=>{o(!1,1e-7)},100)}w=!1}try{r=new IntersectionObserver(E,{...g,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,g)}r.observe(t)}return o(!0),i}function SFe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=H_(t),f=s||i?[...c?Yy(c):[],...Yy(e)]:[];f.forEach(p=>{s&&p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});const u=c&&a?EFe(c,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(p=>{let[g]=p;g&&g.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let v,y=l?If(t):null;l&&b();function b(){const p=If(t);y&&(p.x!==y.x||p.y!==y.y||p.width!==y.width||p.height!==y.height)&&r(),y=p,v=requestAnimationFrame(b)}return r(),()=>{f.forEach(p=>{s&&p.removeEventListener("scroll",r),i&&p.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const kFe=(t,e,r)=>{const n=new Map,s={platform:CFe,...r},i={...s.platform,_c:n};return Zje(t,e,{...s,platform:i})},$Fe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?VD({element:n.current,padding:s}).fn(r):{}:n?VD({element:n,padding:s}).fn(r):{}}}};var Zp=typeof document<"u"?m.useLayoutEffect:m.useEffect;function v2(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,s;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(!v2(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!v2(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function KJ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function QD(t,e){const r=KJ(t);return Math.round(e*r)/r}function YD(t){const e=m.useRef(t);return Zp(()=>{e.current=t}),e}function AFe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);v2(d,n)||h(n);const[v,y]=m.useState(null),[b,p]=m.useState(null),g=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==C.current&&(C.current=R,p(R))},[p]),E=i||v,k=o||b,$=m.useRef(null),C=m.useRef(null),T=m.useRef(f),j=YD(l),F=YD(s),U=m.useCallback(()=>{if(!$.current||!C.current)return;const R={placement:e,strategy:r,middleware:d};F.current&&(R.platform=F.current),kFe($.current,C.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!v2(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,F]);Zp(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);Zp(()=>(V.current=!0,()=>{V.current=!1}),[]),Zp(()=>{if(E&&($.current=E),k&&(C.current=k),E&&k){if(j.current)return j.current(E,k,U);U()}},[E,k,U,j]);const N=m.useMemo(()=>({reference:$,floating:C,setReference:g,setFloating:w}),[g,w]),x=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!x.floating)return R;const M=QD(x.floating,f.x),_=QD(x.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...KJ(x.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,x.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:x,floatingStyles:S}),[f,U,N,x,S])}function _Fe(t){const[e,r]=m.useState(void 0);return lh(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.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 QJ="Popper",[YJ,JJ]=LJ(QJ),[PFe,XJ]=YJ(QJ),TFe=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(PFe,{scope:e,anchor:n,onAnchorChange:s},r)},RFe="PopperAnchor",IFe=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=XJ(RFe,r),o=m.useRef(null),a=tu(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(Kh.div,tn({},s,{ref:a}))}),ZJ="PopperContent",[OFe,_He]=YJ(ZJ),MFe=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:b=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,C=XJ(ZJ,f),[T,j]=m.useState(null),F=tu(e,ie=>j(ie)),[U,V]=m.useState(null),N=_Fe(U),x=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},_=Array.isArray(b)?b:[b],I=_.length>0,B={padding:M,boundary:_.filter(DFe),altBoundary:I},{refs:D,floatingStyles:A,placement:L,isPositioned:G,middlewareData:O}=AFe({strategy:"fixed",placement:R,whileElementsMounted:SFe,elements:{reference:C.anchor},middleware:[nFe({mainAxis:d+S,alignmentAxis:v}),E&&sFe({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?iFe():void 0,...B}),E&&eFe({...B}),oFe({...B,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&$Fe({element:U,padding:y}),NFe({arrowWidth:x,arrowHeight:S}),w&&tFe({strategy:"referenceHidden"})]}),[q,z]=eX(L),H=Jl(k);lh(()=>{G&&(H==null||H())},[G,H]);const X=(s=O.arrow)===null||s===void 0?void 0:s.x,Q=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[J,ae]=m.useState();return lh(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(OFe,{scope:f,placedSide:q,onArrowChange:V,arrowX:X,arrowY:Q,shouldHideArrow:K},m.createElement(Kh.div,tn({"data-side":q,"data-align":z},$,{ref:F,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function DFe(t){return t!==null}const NFe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=eX(a),b={start:"0%",center:"50%",end:"100%"}[y],p=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,g=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?b:`${p}px`,E=`${-h}px`):v==="top"?(w=u?b:`${p}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?b:`${g}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?b:`${g}px`),{data:{x:w,y:E}}}});function eX(t){const[e,r="center"]=t.split("-");return[e,r]}const LFe=TFe,tX=IFe,jFe=MFe,FFe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?q8.createPortal(m.createElement(Kh.div,tn({},s,{ref:e})),n):null});function BFe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const G_=t=>{const{present:e,children:r}=t,n=UFe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=tu(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};G_.displayName="Presence";function UFe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=BFe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=rp(n.current);i.current=a==="mounted"?c:"none"},[a]),lh(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=rp(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),lh(()=>{if(e){const c=u=>{const h=rp(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=rp(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function rp(t){return(t==null?void 0:t.animationName)||"none"}function zFe({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=VFe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Jl(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function VFe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=Jl(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var qFe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},gu=new WeakMap,np=new WeakMap,sp={},T5=0,rX=function(t){return t&&(t.host||rX(t.parentNode))},WFe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=rX(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},HFe=function(t,e,r,n){var s=WFe(e,Array.isArray(t)?t:[t]);sp[r]||(sp[r]=new WeakMap);var i=sp[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(gu.get(d)||0)+1,b=(i.get(d)||0)+1;gu.set(d,y),i.set(d,b),o.push(d),y===1&&v&&np.set(d,!0),b===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),T5++,function(){o.forEach(function(u){var d=gu.get(u)-1,h=i.get(u)-1;gu.set(u,d),i.set(u,h),d||(np.has(u)||u.removeAttribute(n),np.delete(u)),h||u.removeAttribute(r)}),T5--,T5||(gu=new WeakMap,gu=new WeakMap,np=new WeakMap,sp={})}},GFe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||qFe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),HFe(n,s,r,"aria-hidden")):function(){return null}},eg="right-scroll-bar-position",tg="width-before-scroll-bar",KFe="with-scroll-bars-hidden",QFe="--removed-body-scroll-bar-size";function YFe(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function JFe(t,e){var r=m.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}function XFe(t,e){return JFe(e||null,function(r){return t.forEach(function(n){return YFe(n,r)})})}function ZFe(t){return t}function eBe(t,e){e===void 0&&(e=ZFe);var r=[],n=!1,s={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(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var f=o;o=[],f.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(f){o.push(f),c()},filter:function(f){return o=o.filter(f),r}}}};return s}function tBe(t){t===void 0&&(t={});var e=eBe(null);return e.options=ho({async:!0,ssr:!1},t),e}var nX=function(t){var e=t.sideCar,r=AU(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 m.createElement(n,ho({},r))};nX.isSideCarExport=!0;function rBe(t,e){return t.useMedium(e),nX}var sX=tBe(),R5=function(){},Vx=m.forwardRef(function(t,e){var r=m.useRef(null),n=m.useState({onScrollCapture:R5,onWheelCapture:R5,onTouchMoveCapture:R5}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,f=t.enabled,u=t.shards,d=t.sideCar,h=t.noIsolation,v=t.inert,y=t.allowPinchZoom,b=t.as,p=b===void 0?"div":b,g=AU(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=d,E=XFe([r,e]),k=ho(ho({},g),s);return m.createElement(m.Fragment,null,f&&m.createElement(w,{sideCar:sX,removeScrollBar:c,shards:u,noIsolation:h,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),o?m.cloneElement(m.Children.only(a),ho(ho({},k),{ref:E})):m.createElement(p,ho({},k,{className:l,ref:E}),a))});Vx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vx.classNames={fullWidth:tg,zeroRight:eg};var JD,nBe=function(){if(JD)return JD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sBe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=nBe();return e&&t.setAttribute("nonce",e),t}function iBe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function oBe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var aBe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=sBe())&&(iBe(e,r),oBe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},lBe=function(){var t=aBe();return function(e,r){m.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},iX=function(){var t=lBe(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},cBe={left:0,top:0,right:0,gap:0},I5=function(t){return parseInt(t||"",10)||0},fBe=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[I5(r),I5(n),I5(s)]},uBe=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return cBe;var e=fBe(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])}},dBe=iX(),hBe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` - .`.concat(KFe,` { + */var mJ={L:Zu.QrCode.Ecc.LOW,M:Zu.QrCode.Ecc.MEDIUM,Q:Zu.QrCode.Ecc.QUARTILE,H:Zu.QrCode.Ecc.HIGH},pJ=128,gJ="L",bJ="#FFFFFF",wJ="#000000",xJ=!1,F_=4,_Le=.1;function CJ(t,e=0){const r=[];return t.forEach(function(n,s){let i=null;n.forEach(function(o,a){if(!o&&i!==null){r.push(`M${i+e} ${s+e}h${a-i}v1H${i+e}z`),i=null;return}if(a===n.length-1){if(!o)return;i===null?r.push(`M${a+e},${s+e} h1v1H${a+e}z`):r.push(`M${i+e},${s+e} h${a+1-i}v1H${i+e}z`);return}o&&i===null&&(i=a)})}),r.join("")}function EJ(t,e){return t.slice().map((r,n)=>n=e.y+e.h?r:r.map((s,i)=>i=e.x+e.w?s:!1))}function SJ(t,e,r,n){if(n==null)return null;const s=r?F_:0,i=t.length+s*2,o=Math.floor(e*_Le),a=i/e,l=(n.width||o)*a,c=(n.height||o)*a,f=n.x==null?t.length/2-l/2:n.x*a,u=n.y==null?t.length/2-c/2:n.y*a;let d=null;if(n.excavate){let h=Math.floor(f),v=Math.floor(u),y=Math.ceil(l+f-h),g=Math.ceil(c+u-v);d={x:h,y:v,w:y,h:g}}return{x:f,y:u,h:c,w:l,excavation:d}}var PLe=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}();function TLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,style:l,imageSettings:c}=e,f=j_(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),u=c==null?void 0:c.src,d=m.useRef(null),h=m.useRef(null),[v,y]=m.useState(!1);m.useEffect(()=>{if(d.current!=null){const p=d.current,w=p.getContext("2d");if(!w)return;let E=Zu.QrCode.encodeText(r,mJ[s]).getModules();const k=a?F_:0,$=E.length+k*2,x=SJ(E,n,a,c),T=h.current,B=x!=null&&T!==null&&T.complete&&T.naturalHeight!==0&&T.naturalWidth!==0;B&&x.excavation!=null&&(E=EJ(E,x.excavation));const L=window.devicePixelRatio||1;p.height=p.width=n*L;const U=n/$*L;w.scale(U,U),w.fillStyle=i,w.fillRect(0,0,$,$),w.fillStyle=o,PLe?w.fill(new Path2D(CJ(E,k))):E.forEach(function(V,N){V.forEach(function(C,S){C&&w.fillRect(S+k,N+k,1,1)})}),B&&w.drawImage(T,x.x+k,x.y+k,x.w,x.h)}}),m.useEffect(()=>{y(!1)},[u]);const g=Qy({height:n,width:n},l);let b=null;return u!=null&&(b=P.createElement("img",{src:u,key:u,style:{display:"none"},onLoad:()=>{y(!0)},ref:h})),P.createElement(P.Fragment,null,P.createElement("canvas",Qy({style:g,height:n,width:n,ref:d},f)),b)}function RLe(t){const e=t,{value:r,size:n=pJ,level:s=gJ,bgColor:i=bJ,fgColor:o=wJ,includeMargin:a=xJ,imageSettings:l}=e,c=j_(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let f=Zu.QrCode.encodeText(r,mJ[s]).getModules();const u=a?F_:0,d=f.length+u*2,h=SJ(f,n,a,l);let v=null;l!=null&&h!=null&&(h.excavation!=null&&(f=EJ(f,h.excavation)),v=P.createElement("image",{xlinkHref:l.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"}));const y=CJ(f,u);return P.createElement("svg",Qy({height:n,width:n,viewBox:`0 0 ${d} ${d}`},c),P.createElement("path",{fill:i,d:`M0,0 h${d}v${d}H0z`,shapeRendering:"crispEdges"}),P.createElement("path",{fill:o,d:y,shapeRendering:"crispEdges"}),v)}var ILe=t=>{const e=t,{renderAs:r}=e,n=j_(e,["renderAs"]);return r==="svg"?P.createElement(RLe,Qy({},n)):P.createElement(TLe,Qy({},n))},Mk={},OLe={get exports(){return Mk},set exports(t){Mk=t}};(function(t,e){(function(r,n){t.exports=n()})(Wr,function(){var r=1e3,n=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",f="week",u="month",d="quarter",h="year",v="date",y="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,p={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(N){var C=["th","st","nd","rd"],S=N%100;return"["+N+(C[(S-20)%10]||C[S]||C[0])+"]"}},w=function(N,C,S){var R=String(N);return!R||R.length>=C?N:""+Array(C+1-R.length).join(S)+N},E={s:w,z:function(N){var C=-N.utcOffset(),S=Math.abs(C),R=Math.floor(S/60),M=S%60;return(C<=0?"+":"-")+w(R,2,"0")+":"+w(M,2,"0")},m:function N(C,S){if(C.date()1)return N(I[0])}else{var F=C.name;$[F]=C,M=F}return!R&&M&&(k=M),M||!R&&k},B=function(N,C){if(x(N))return N.clone();var S=typeof C=="object"?C:{};return S.date=N,S.args=arguments,new U(S)},L=E;L.l=T,L.i=x,L.w=function(N,C){return B(N,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var U=function(){function N(S){this.$L=T(S.locale,null,!0),this.parse(S)}var C=N.prototype;return C.parse=function(S){this.$d=function(R){var M=R.date,_=R.utc;if(M===null)return new Date(NaN);if(L.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var I=M.match(g);if(I){var F=I[2]-1||0,D=(I[7]||"0").substring(0,3);return _?new Date(Date.UTC(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)):new Date(I[1],F,I[3]||1,I[4]||0,I[5]||0,I[6]||0,D)}}return new Date(M)}(S),this.$x=S.x||{},this.init()},C.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},C.$utils=function(){return L},C.isValid=function(){return this.$d.toString()!==y},C.isSame=function(S,R){var M=B(S);return this.startOf(R)<=M&&M<=this.endOf(R)},C.isAfter=function(S,R){return B(S)`Invalid value for key ${t}`,ULe=t=>`Pattern length exceeds max of ${t}.`,zLe=t=>`Missing ${t} property in key`,VLe=t=>`Property 'weight' in key '${t}' must be a positive integer`,TD=Object.prototype.hasOwnProperty;class qLe{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let s=PJ(n);r+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,r+=s.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 PJ(t){let e=null,r=null,n=null,s=1,i=null;if(bo(t)||Ca(t))n=t,e=RD(t),r=Dk(t);else{if(!TD.call(t,"name"))throw new Error(zLe("name"));const o=t.name;if(n=o,TD.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(VLe(o));e=RD(o),r=Dk(o),i=t.getFn}return{path:e,id:r,weight:s,src:n,getFn:i}}function RD(t){return Ca(t)?t:t.split(".")}function Dk(t){return Ca(t)?t.join("."):t}function WLe(t,e){let r=[],n=!1;const s=(i,o,a)=>{if(xs(i))if(!o[a])r.push(i);else{let l=o[a];const c=i[l];if(!xs(c))return;if(a===o.length-1&&(bo(c)||$J(c)||LLe(c)))r.push(NLe(c));else if(Ca(c)){n=!0;for(let f=0,u=c.length;ft.score===e.score?t.idx{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,bo(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();bo(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=s.getFn?s.getFn(e):this.getFn(e,s.path);if(xs(o)){if(Ca(o)){let a=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:c,value:f}=l.pop();if(xs(f))if(bo(f)&&!A5(f)){let u={v:f,i:c,n:this.norm.get(f)};a.push(u)}else Ca(f)&&f.forEach((u,d)=>{l.push({nestedArrIndex:d,value:u})})}n.$[i]=a}else if(bo(o)&&!A5(o)){let a={v:o,n:this.norm.get(o)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function TJ(t,e,{getFn:r=_e.getFn,fieldNormWeight:n=_e.fieldNormWeight}={}){const s=new B_({getFn:r,fieldNormWeight:n});return s.setKeys(t.map(PJ)),s.setSources(e),s.create(),s}function XLe(t,{getFn:e=_e.getFn,fieldNormWeight:r=_e.fieldNormWeight}={}){const{keys:n,records:s}=t,i=new B_({getFn:e,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(s),i}function tp(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:s=_e.distance,ignoreLocation:i=_e.ignoreLocation}={}){const o=e/t.length;if(i)return o;const a=Math.abs(n-r);return s?o+a/s:a?1:o}function ZLe(t=[],e=_e.minMatchCharLength){let r=[],n=-1,s=-1,i=0;for(let o=t.length;i=e&&r.push([n,s]),n=-1)}return t[i-1]&&i-n>=e&&r.push([n,i-1]),r}const Wc=32;function eje(t,e,r,{location:n=_e.location,distance:s=_e.distance,threshold:i=_e.threshold,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,includeMatches:l=_e.includeMatches,ignoreLocation:c=_e.ignoreLocation}={}){if(e.length>Wc)throw new Error(ULe(Wc));const f=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let h=i,v=d;const y=a>1||l,g=y?Array(u):[];let b;for(;(b=t.indexOf(e,v))>-1;){let x=tp(e,{currentLocation:b,expectedLocation:d,distance:s,ignoreLocation:c});if(h=Math.min(x,h),v=b+f,y){let T=0;for(;T=L;C-=1){let S=C-1,R=r[t.charAt(S)];if(y&&(g[S]=+!!R),V[C]=(V[C+1]<<1|1)&R,x&&(V[C]|=(p[C+1]|p[C])<<1|1|p[C+1]),V[C]&k&&(w=tp(e,{errors:x,currentLocation:S,expectedLocation:d,distance:s,ignoreLocation:c}),w<=h)){if(h=w,v=S,v<=d)break;L=Math.max(1,2*d-v)}}if(tp(e,{errors:x+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:c})>h)break;p=V}const $={isMatch:v>=0,score:Math.max(.001,w)};if(y){const x=ZLe(g,a);x.length?l&&($.indices=x):$.isMatch=!1}return $}function tje(t){let e={};for(let r=0,n=t.length;r{this.chunks.push({pattern:d,alphabet:tje(d),startIndex:h})},u=this.pattern.length;if(u>Wc){let d=0;const h=u%Wc,v=u-h;for(;d{const{isMatch:b,score:p,indices:w}=eje(e,v,y,{location:s+g,distance:i,threshold:o,findAllMatches:a,minMatchCharLength:l,includeMatches:n,ignoreLocation:c});b&&(d=!0),u+=p,b&&w&&(f=[...f,...w])});let h={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(h.indices=f),h}}class vc{constructor(e){this.pattern=e}static isMultiMatch(e){return ID(e,this.multiRegex)}static isSingleMatch(e){return ID(e,this.singleRegex)}search(){}}function ID(t,e){const r=t.match(e);return r?r[1]:null}class rje extends vc{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 nje extends vc{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 sje extends vc{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 ije extends vc{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 oje extends vc{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 aje extends vc{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 IJ extends vc{constructor(e,{location:r=_e.location,threshold:n=_e.threshold,distance:s=_e.distance,includeMatches:i=_e.includeMatches,findAllMatches:o=_e.findAllMatches,minMatchCharLength:a=_e.minMatchCharLength,isCaseSensitive:l=_e.isCaseSensitive,ignoreLocation:c=_e.ignoreLocation}={}){super(e),this._bitapSearch=new RJ(e,{location:r,threshold:n,distance:s,includeMatches:i,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class OJ extends vc{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const s=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+i,s.push([n,r-1]);const o=!!s.length;return{isMatch:o,score:o?0:1,indices:s}}}const Nk=[rje,OJ,sje,ije,aje,oje,nje,IJ],OD=Nk.length,lje=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,cje="|";function fje(t,e={}){return t.split(cje).map(r=>{let n=r.trim().split(lje).filter(i=>i&&!!i.trim()),s=[];for(let i=0,o=n.length;i!!(t[u2.AND]||t[u2.OR]),vje=t=>!!t[Fk.PATH],yje=t=>!Ca(t)&&AJ(t)&&!Bk(t),MD=t=>({[u2.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function MJ(t,e,{auto:r=!0}={}){const n=s=>{let i=Object.keys(s);const o=vje(s);if(!o&&i.length>1&&!Bk(s))return n(MD(s));if(yje(s)){const l=o?s[Fk.PATH]:i[0],c=o?s[Fk.PATTERN]:s[l];if(!bo(c))throw new Error(BLe(l));const f={keyId:Dk(l),pattern:c};return r&&(f.searcher=jk(c,e)),f}let a={children:[],operator:i[0]};return i.forEach(l=>{const c=s[l];Ca(c)&&c.forEach(f=>{a.children.push(n(f))})}),a};return Bk(t)||(t=MD(t)),n(t)}function mje(t,{ignoreFieldNorm:e=_e.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:s,norm:i,score:o})=>{const a=s?s.weight:null;n*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(e?1:i))}),r.score=n})}function pje(t,e){const r=t.matches;e.matches=[],xs(r)&&r.forEach(n=>{if(!xs(n.indices)||!n.indices.length)return;const{indices:s,value:i}=n;let o={indices:s,value:i};n.key&&(o.key=n.key.src),n.idx>-1&&(o.refIndex=n.idx),e.matches.push(o)})}function gje(t,e){e.score=t.score}function bje(t,e,{includeMatches:r=_e.includeMatches,includeScore:n=_e.includeScore}={}){const s=[];return r&&s.push(pje),n&&s.push(gje),t.map(i=>{const{idx:o}=i,a={item:e[o],refIndex:o};return s.length&&s.forEach(l=>{l(i,a)}),a})}class Ea{constructor(e,r={},n){this.options={..._e,...r},this.options.useExtendedSearch,this._keyStore=new qLe(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof B_))throw new Error(FLe);this._myIndex=r||TJ(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){xs(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,s=this._docs.length;n-1&&(l=l.slice(0,r)),bje(l,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(e){const r=jk(e,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:i,i:o,n:a})=>{if(!xs(i))return;const{isMatch:l,score:c,indices:f}=r.searchIn(i);l&&s.push({item:i,idx:o,matches:[{score:c,value:i,norm:a,indices:f}]})}),s}_searchLogical(e){const r=MJ(e,this.options),n=(a,l,c)=>{if(!a.children){const{keyId:u,searcher:d}=a,h=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:d});return h&&h.length?[{idx:c,item:l,matches:h}]:[]}const f=[];for(let u=0,d=a.children.length;u{if(xs(a)){let c=n(r,a,l);c.length&&(i[l]||(i[l]={idx:l,item:a,matches:[]},o.push(i[l])),c.forEach(({matches:f})=>{i[l].matches.push(...f)}))}}),o}_searchObjectList(e){const r=jk(e,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:o,i:a})=>{if(!xs(o))return;let l=[];n.forEach((c,f)=>{l.push(...this._findMatches({key:c,value:o[f],searcher:r}))}),l.length&&i.push({idx:a,item:o,matches:l})}),i}_findMatches({key:e,value:r,searcher:n}){if(!xs(r))return[];let s=[];if(Ca(r))r.forEach(({v:i,i:o,n:a})=>{if(!xs(i))return;const{isMatch:l,score:c,indices:f}=n.searchIn(i);l&&s.push({score:c,key:e,value:i,idx:o,norm:a,indices:f})});else{const{v:i,n:o}=r,{isMatch:a,score:l,indices:c}=n.searchIn(i);a&&s.push({score:l,key:e,value:i,norm:o,indices:c})}return s}}Ea.version="6.6.2";Ea.createIndex=TJ;Ea.parseIndex=XLe;Ea.config=_e;Ea.parseQuery=MJ;hje(dje);function DJ(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=>xje(r,e))}function ru(...t){return m.useCallback(NJ(...t),t)}function LJ(t,e=[]){let r=[];function n(i,o){const a=m.createContext(o),l=r.length;r=[...r,o];function c(u){const{scope:d,children:h,...v}=u,y=(d==null?void 0:d[t][l])||a,g=m.useMemo(()=>v,Object.values(v));return m.createElement(y.Provider,{value:g},h)}function f(u,d){const h=(d==null?void 0:d[t][l])||a,v=m.useContext(h);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${u}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,f]}const s=()=>{const i=r.map(o=>m.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return m.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,Cje(s,...e)]}function Cje(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const u=l(i)[`__scope${c}`];return{...a,...u}},{});return m.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}const U_=m.forwardRef((t,e)=>{const{children:r,...n}=t,s=m.Children.toArray(r),i=s.find(Sje);if(i){const o=i.props.children,a=s.map(l=>l===i?m.Children.count(o)>1?m.Children.only(null):m.isValidElement(o)?o.props.children:null:l);return m.createElement(Uk,tn({},n,{ref:e}),m.isValidElement(o)?m.cloneElement(o,void 0,a):null)}return m.createElement(Uk,tn({},n,{ref:e}),r)});U_.displayName="Slot";const Uk=m.forwardRef((t,e)=>{const{children:r,...n}=t;return m.isValidElement(r)?m.cloneElement(r,{...kje(n,r.props),ref:e?NJ(e,r.ref):r.ref}):m.Children.count(r)>1?m.Children.only(null):null});Uk.displayName="SlotClone";const Eje=({children:t})=>m.createElement(m.Fragment,null,t);function Sje(t){return m.isValidElement(t)&&t.type===Eje}function kje(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{i(...a),s(...a)}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}const $je=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Qh=$je.reduce((t,e)=>{const r=m.forwardRef((n,s)=>{const{asChild:i,...o}=n,a=i?U_:e;return m.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),m.createElement(a,tn({},o,{ref:s}))});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function Aje(t,e){t&&Kr.flushSync(()=>t.dispatchEvent(e))}function Xl(t){const e=m.useRef(t);return m.useEffect(()=>{e.current=t}),m.useMemo(()=>(...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function _je(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t);m.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[r,e])}const zk="dismissableLayer.update",Pje="dismissableLayer.pointerDownOutside",Tje="dismissableLayer.focusOutside";let DD;const Rje=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ije=m.forwardRef((t,e)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:l,...c}=t,f=m.useContext(Rje),[u,d]=m.useState(null),h=(r=u==null?void 0:u.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=m.useState({}),y=ru(e,T=>d(T)),g=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),p=g.indexOf(b),w=u?g.indexOf(u):-1,E=f.layersWithOutsidePointerEventsDisabled.size>0,k=w>=p,$=Oje(T=>{const B=T.target,L=[...f.branches].some(U=>U.contains(B));!k||L||(i==null||i(T),a==null||a(T),T.defaultPrevented||l==null||l())},h),x=Mje(T=>{const B=T.target;[...f.branches].some(U=>U.contains(B))||(o==null||o(T),a==null||a(T),T.defaultPrevented||l==null||l())},h);return _je(T=>{w===f.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},h),m.useEffect(()=>{if(u)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(DD=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(u)),f.layers.add(u),ND(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=DD)}},[u,h,n,f]),m.useEffect(()=>()=>{u&&(f.layers.delete(u),f.layersWithOutsidePointerEventsDisabled.delete(u),ND())},[u,f]),m.useEffect(()=>{const T=()=>v({});return document.addEventListener(zk,T),()=>document.removeEventListener(zk,T)},[]),m.createElement(Qh.div,tn({},c,{ref:y,style:{pointerEvents:E?k?"auto":"none":void 0,...t.style},onFocusCapture:df(t.onFocusCapture,x.onFocusCapture),onBlurCapture:df(t.onBlurCapture,x.onBlurCapture),onPointerDownCapture:df(t.onPointerDownCapture,$.onPointerDownCapture)}))});function Oje(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t),n=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let c=function(){jJ(Pje,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function Mje(t,e=globalThis==null?void 0:globalThis.document){const r=Xl(t),n=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!n.current&&jJ(Tje,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ND(){const t=new CustomEvent(zk);document.dispatchEvent(t)}function jJ(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Aje(s,i):s.dispatchEvent(i)}let _5=0;function Dje(){m.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:LD()),document.body.insertAdjacentElement("beforeend",(e=r[1])!==null&&e!==void 0?e:LD()),_5++,()=>{_5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),_5--}},[])}function LD(){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 P5="focusScope.autoFocusOnMount",T5="focusScope.autoFocusOnUnmount",jD={bubbles:!1,cancelable:!0},Nje=m.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=m.useState(null),c=Xl(s),f=Xl(i),u=m.useRef(null),d=ru(e,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(n){let y=function(w){if(h.paused||!a)return;const E=w.target;a.contains(E)?u.current=E:Ja(u.current,{select:!0})},g=function(w){if(h.paused||!a)return;const E=w.relatedTarget;E!==null&&(a.contains(E)||Ja(u.current,{select:!0}))},b=function(w){const E=document.activeElement;for(const k of w)k.removedNodes.length>0&&(a!=null&&a.contains(E)||Ja(a))};document.addEventListener("focusin",y),document.addEventListener("focusout",g);const p=new MutationObserver(b);return a&&p.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",g),p.disconnect()}}},[n,a,h.paused]),m.useEffect(()=>{if(a){BD.add(h);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(P5,jD);a.addEventListener(P5,c),a.dispatchEvent(b),b.defaultPrevented||(Lje(zje(FJ(a)),{select:!0}),document.activeElement===y&&Ja(a))}return()=>{a.removeEventListener(P5,c),setTimeout(()=>{const b=new CustomEvent(T5,jD);a.addEventListener(T5,f),a.dispatchEvent(b),b.defaultPrevented||Ja(y??document.body,{select:!0}),a.removeEventListener(T5,f),BD.remove(h)},0)}}},[a,c,f,h]);const v=m.useCallback(y=>{if(!r&&!n||h.paused)return;const g=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(g&&b){const p=y.currentTarget,[w,E]=jje(p);w&&E?!y.shiftKey&&b===E?(y.preventDefault(),r&&Ja(w,{select:!0})):y.shiftKey&&b===w&&(y.preventDefault(),r&&Ja(E,{select:!0})):b===p&&y.preventDefault()}},[r,n,h.paused]);return m.createElement(Qh.div,tn({tabIndex:-1},o,{ref:d,onKeyDown:v}))});function Lje(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Ja(n,{select:e}),document.activeElement!==r)return}function jje(t){const e=FJ(t),r=FD(e,t),n=FD(e.reverse(),t);return[r,n]}function FJ(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function FD(t,e){for(const r of t)if(!Fje(r,{upTo:e}))return r}function Fje(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 Bje(t){return t instanceof HTMLInputElement&&"select"in t}function Ja(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Bje(t)&&e&&t.select()}}const BD=Uje();function Uje(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=UD(t,e),t.unshift(e)},remove(e){var r;t=UD(t,e),(r=t[0])===null||r===void 0||r.resume()}}}function UD(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function zje(t){return t.filter(e=>e.tagName!=="A")}const ch=Boolean(globalThis==null?void 0:globalThis.document)?m.useLayoutEffect:()=>{},Vje=t8["useId".toString()]||(()=>{});let qje=0;function Wje(t){const[e,r]=m.useState(Vje());return ch(()=>{t||r(n=>n??String(qje++))},[t]),t||(e?`radix-${e}`:"")}const Hje=["top","right","bottom","left"],Zl=Math.min,Cs=Math.max,d2=Math.round,rp=Math.floor,ec=t=>({x:t,y:t}),Gje={left:"right",right:"left",bottom:"top",top:"bottom"},Kje={start:"end",end:"start"};function Vk(t,e,r){return Cs(t,Zl(e,r))}function Sa(t,e){return typeof t=="function"?t(e):t}function ka(t){return t.split("-")[0]}function Yh(t){return t.split("-")[1]}function z_(t){return t==="x"?"y":"x"}function V_(t){return t==="y"?"height":"width"}function Jh(t){return["top","bottom"].includes(ka(t))?"y":"x"}function q_(t){return z_(Jh(t))}function Qje(t,e,r){r===void 0&&(r=!1);const n=Yh(t),s=q_(t),i=V_(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=h2(o)),[o,h2(o)]}function Yje(t){const e=h2(t);return[qk(t),e,qk(e)]}function qk(t){return t.replace(/start|end/g,e=>Kje[e])}function Jje(t,e,r){const n=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return r?e?s:n:e?n:s;case"left":case"right":return e?i:o;default:return[]}}function Xje(t,e,r,n){const s=Yh(t);let i=Jje(ka(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(qk)))),i}function h2(t){return t.replace(/left|right|bottom|top/g,e=>Gje[e])}function Zje(t){return{top:0,right:0,bottom:0,left:0,...t}}function BJ(t){return typeof t!="number"?Zje(t):{top:t,right:t,bottom:t,left:t}}function v2(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function zD(t,e,r){let{reference:n,floating:s}=t;const i=Jh(e),o=q_(e),a=V_(o),l=ka(e),c=i==="y",f=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,d=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:f,y:n.y-s.height};break;case"bottom":h={x:f,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-s.width,y:u};break;default:h={x:n.x,y:n.y}}switch(Yh(e)){case"start":h[o]-=d*(r&&c?-1:1);break;case"end":h[o]+=d*(r&&c?-1:1);break}return h}const eFe=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:u}=zD(c,n,l),d=n,h={},v=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:f=0}=Sa(t,e)||{};if(c==null)return{};const u=BJ(f),d={x:r,y:n},h=q_(s),v=V_(h),y=await o.getDimensions(c),g=h==="y",b=g?"top":"left",p=g?"bottom":"right",w=g?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[h]-d[h]-i.floating[v],k=d[h]-i.reference[h],$=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let x=$?$[w]:0;(!x||!await(o.isElement==null?void 0:o.isElement($)))&&(x=a.floating[w]||i.floating[v]);const T=E/2-k/2,B=x/2-y[v]/2-1,L=Zl(u[b],B),U=Zl(u[p],B),V=L,N=x-y[v]-U,C=x/2-y[v]/2+T,S=Vk(V,C,N),R=!l.arrow&&Yh(s)!=null&&C!=S&&i.reference[v]/2-(CV<=0)){var B,L;const V=(((B=i.flip)==null?void 0:B.index)||0)+1,N=k[V];if(N)return{data:{index:V,overflows:T},reset:{placement:N}};let C=(L=T.filter(S=>S.overflows[0]<=0).sort((S,R)=>S.overflows[1]-R.overflows[1])[0])==null?void 0:L.placement;if(!C)switch(h){case"bestFit":{var U;const S=(U=T.map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,_)=>M+_,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:U[0];S&&(C=S);break}case"initialPlacement":C=a;break}if(s!==C)return{reset:{placement:C}}}return{}}}};function qD(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function WD(t){return Hje.some(e=>t[e]>=0)}const rFe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=Sa(t,e);switch(n){case"referenceHidden":{const i=await Yy(e,{...s,elementContext:"reference"}),o=qD(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:WD(o)}}}case"escaped":{const i=await Yy(e,{...s,altBoundary:!0}),o=qD(i,r.floating);return{data:{escapedOffsets:o,escaped:WD(o)}}}default:return{}}}}};async function nFe(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=ka(r),a=Yh(r),l=Jh(r)==="y",c=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,u=Sa(e,t);let{mainAxis:d,crossAxis:h,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const sFe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:r,y:n}=e,s=await nFe(e,t);return{x:r+s.x,y:n+s.y,data:s}}}},iFe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:b,y:p}=g;return{x:b,y:p}}},...l}=Sa(t,e),c={x:r,y:n},f=await Yy(e,l),u=Jh(ka(s)),d=z_(u);let h=c[d],v=c[u];if(i){const g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",p=h+f[g],w=h-f[b];h=Vk(p,h,w)}if(o){const g=u==="y"?"top":"left",b=u==="y"?"bottom":"right",p=v+f[g],w=v-f[b];v=Vk(p,v,w)}const y=a.fn({...e,[d]:h,[u]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},oFe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Sa(t,e),f={x:r,y:n},u=Jh(s),d=z_(u);let h=f[d],v=f[u];const y=Sa(a,e),g=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",E=i.reference[d]-i.floating[w]+g.mainAxis,k=i.reference[d]+i.reference[w]-g.mainAxis;hk&&(h=k)}if(c){var b,p;const w=d==="y"?"width":"height",E=["top","left"].includes(ka(s)),k=i.reference[u]-i.floating[w]+(E&&((b=o.offset)==null?void 0:b[u])||0)+(E?0:g.crossAxis),$=i.reference[u]+i.reference[w]+(E?0:((p=o.offset)==null?void 0:p[u])||0)-(E?g.crossAxis:0);v$&&(v=$)}return{[d]:h,[u]:v}}}},aFe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:r,rects:n,platform:s,elements:i}=e,{apply:o=()=>{},...a}=Sa(t,e),l=await Yy(e,a),c=ka(r),f=Yh(r),u=Jh(r)==="y",{width:d,height:h}=n.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(y=c,v=f==="end"?"top":"bottom");const g=h-l[v],b=d-l[y],p=!e.middlewareData.shift;let w=g,E=b;if(u){const $=d-l.left-l.right;E=f||p?Zl(b,$):$}else{const $=h-l.top-l.bottom;w=f||p?Zl(g,$):$}if(p&&!f){const $=Cs(l.left,0),x=Cs(l.right,0),T=Cs(l.top,0),B=Cs(l.bottom,0);u?E=d-2*($!==0||x!==0?$+x:Cs(l.left,l.right)):w=h-2*(T!==0||B!==0?T+B:Cs(l.top,l.bottom))}await o({...e,availableWidth:E,availableHeight:w});const k=await s.getDimensions(i.floating);return d!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function tc(t){return UJ(t)?(t.nodeName||"").toLowerCase():"#document"}function Ps(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function La(t){var e;return(e=(UJ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function UJ(t){return t instanceof Node||t instanceof Ps(t).Node}function $a(t){return t instanceof Element||t instanceof Ps(t).Element}function No(t){return t instanceof HTMLElement||t instanceof Ps(t).HTMLElement}function HD(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ps(t).ShadowRoot}function z0(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=li(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(s)}function lFe(t){return["table","td","th"].includes(tc(t))}function W_(t){const e=H_(),r=li(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 cFe(t){let e=fh(t);for(;No(e)&&!zx(e);){if(W_(e))return e;e=fh(e)}return null}function H_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zx(t){return["html","body","#document"].includes(tc(t))}function li(t){return Ps(t).getComputedStyle(t)}function Vx(t){return $a(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function fh(t){if(tc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||HD(t)&&t.host||La(t);return HD(e)?e.host:e}function zJ(t){const e=fh(t);return zx(e)?t.ownerDocument?t.ownerDocument.body:t.body:No(e)&&z0(e)?e:zJ(e)}function Jy(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=zJ(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Ps(s);return i?e.concat(o,o.visualViewport||[],z0(s)?s:[],o.frameElement&&r?Jy(o.frameElement):[]):e.concat(s,Jy(s,[],r))}function VJ(t){const e=li(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=No(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=d2(r)!==i||d2(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function G_(t){return $a(t)?t:t.contextElement}function Ed(t){const e=G_(t);if(!No(e))return ec(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=VJ(e);let o=(i?d2(r.width):r.width)/n,a=(i?d2(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const fFe=ec(0);function qJ(t){const e=Ps(t);return!H_()||!e.visualViewport?fFe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function uFe(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ps(t)?!1:e}function Of(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=G_(t);let o=ec(1);e&&(n?$a(n)&&(o=Ed(n)):o=Ed(t));const a=uFe(i,r,n)?qJ(i):ec(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,u=s.height/o.y;if(i){const d=Ps(i),h=n&&$a(n)?Ps(n):n;let v=d.frameElement;for(;v&&n&&h!==d;){const y=Ed(v),g=v.getBoundingClientRect(),b=li(v),p=g.left+(v.clientLeft+parseFloat(b.paddingLeft))*y.x,w=g.top+(v.clientTop+parseFloat(b.paddingTop))*y.y;l*=y.x,c*=y.y,f*=y.x,u*=y.y,l+=p,c+=w,v=Ps(v).frameElement}}return v2({width:f,height:u,x:l,y:c})}function dFe(t){let{rect:e,offsetParent:r,strategy:n}=t;const s=No(r),i=La(r);if(r===i)return e;let o={scrollLeft:0,scrollTop:0},a=ec(1);const l=ec(0);if((s||!s&&n!=="fixed")&&((tc(r)!=="body"||z0(i))&&(o=Vx(r)),No(r))){const c=Of(r);a=Ed(r),l.x=c.x+r.clientLeft,l.y=c.y+r.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function hFe(t){return Array.from(t.getClientRects())}function WJ(t){return Of(La(t)).left+Vx(t).scrollLeft}function vFe(t){const e=La(t),r=Vx(t),n=t.ownerDocument.body,s=Cs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Cs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+WJ(t);const a=-r.scrollTop;return li(n).direction==="rtl"&&(o+=Cs(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function yFe(t,e){const r=Ps(t),n=La(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=H_();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function mFe(t,e){const r=Of(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=No(t)?Ed(t):ec(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function GD(t,e,r){let n;if(e==="viewport")n=yFe(t,r);else if(e==="document")n=vFe(La(t));else if($a(e))n=mFe(e,r);else{const s=qJ(t);n={...e,x:e.x-s.x,y:e.y-s.y}}return v2(n)}function HJ(t,e){const r=fh(t);return r===e||!$a(r)||zx(r)?!1:li(r).position==="fixed"||HJ(r,e)}function pFe(t,e){const r=e.get(t);if(r)return r;let n=Jy(t,[],!1).filter(a=>$a(a)&&tc(a)!=="body"),s=null;const i=li(t).position==="fixed";let o=i?fh(t):t;for(;$a(o)&&!zx(o);){const a=li(o),l=W_(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||z0(o)&&!l&&HJ(t,o))?n=n.filter(f=>f!==o):s=a,o=fh(o)}return e.set(t,n),n}function gFe(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?pFe(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,f)=>{const u=GD(e,f,s);return c.top=Cs(u.top,c.top),c.right=Zl(u.right,c.right),c.bottom=Zl(u.bottom,c.bottom),c.left=Cs(u.left,c.left),c},GD(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function bFe(t){return VJ(t)}function wFe(t,e,r){const n=No(e),s=La(e),i=r==="fixed",o=Of(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=ec(0);if(n||!n&&!i)if((tc(e)!=="body"||z0(s))&&(a=Vx(e)),n){const c=Of(e,!0,i,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else s&&(l.x=WJ(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function KD(t,e){return!No(t)||li(t).position==="fixed"?null:e?e(t):t.offsetParent}function GJ(t,e){const r=Ps(t);if(!No(t))return r;let n=KD(t,e);for(;n&&lFe(n)&&li(n).position==="static";)n=KD(n,e);return n&&(tc(n)==="html"||tc(n)==="body"&&li(n).position==="static"&&!W_(n))?r:n||cFe(t)||r}const xFe=async function(t){let{reference:e,floating:r,strategy:n}=t;const s=this.getOffsetParent||GJ,i=this.getDimensions;return{reference:wFe(e,await s(r),n),floating:{x:0,y:0,...await i(r)}}};function CFe(t){return li(t).direction==="rtl"}const EFe={convertOffsetParentRelativeRectToViewportRelativeRect:dFe,getDocumentElement:La,getClippingRect:gFe,getOffsetParent:GJ,getElementRects:xFe,getClientRects:hFe,getDimensions:bFe,getScale:Ed,isElement:$a,isRTL:CFe};function SFe(t,e){let r=null,n;const s=La(t);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:u,height:d}=t.getBoundingClientRect();if(a||e(),!u||!d)return;const h=rp(f),v=rp(s.clientWidth-(c+u)),y=rp(s.clientHeight-(f+d)),g=rp(c),p={rootMargin:-h+"px "+-v+"px "+-y+"px "+-g+"px",threshold:Cs(0,Zl(1,l))||1};let w=!0;function E(k){const $=k[0].intersectionRatio;if($!==l){if(!w)return o();$?o(!1,$):n=setTimeout(()=>{o(!1,1e-7)},100)}w=!1}try{r=new IntersectionObserver(E,{...p,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,p)}r.observe(t)}return o(!0),i}function kFe(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=G_(t),f=s||i?[...c?Jy(c):[],...Jy(e)]:[];f.forEach(b=>{s&&b.addEventListener("scroll",r,{passive:!0}),i&&b.addEventListener("resize",r)});const u=c&&a?SFe(c,r):null;let d=-1,h=null;o&&(h=new ResizeObserver(b=>{let[p]=b;p&&p.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let v,y=l?Of(t):null;l&&g();function g(){const b=Of(t);y&&(b.x!==y.x||b.y!==y.y||b.width!==y.width||b.height!==y.height)&&r(),y=b,v=requestAnimationFrame(g)}return r(),()=>{f.forEach(b=>{s&&b.removeEventListener("scroll",r),i&&b.removeEventListener("resize",r)}),u&&u(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const $Fe=(t,e,r)=>{const n=new Map,s={platform:EFe,...r},i={...s.platform,_c:n};return eFe(t,e,{...s,platform:i})},AFe=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?VD({element:n.current,padding:s}).fn(r):{}:n?VD({element:n,padding:s}).fn(r):{}}}};var eg=typeof document<"u"?m.useLayoutEffect:m.useEffect;function y2(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,s;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(!y2(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!y2(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function KJ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function QD(t,e){const r=KJ(t);return Math.round(e*r)/r}function YD(t){const e=m.useRef(t);return eg(()=>{e.current=t}),e}function _Fe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[f,u]=m.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[d,h]=m.useState(n);y2(d,n)||h(n);const[v,y]=m.useState(null),[g,b]=m.useState(null),p=m.useCallback(R=>{R!=$.current&&($.current=R,y(R))},[y]),w=m.useCallback(R=>{R!==x.current&&(x.current=R,b(R))},[b]),E=i||v,k=o||g,$=m.useRef(null),x=m.useRef(null),T=m.useRef(f),B=YD(l),L=YD(s),U=m.useCallback(()=>{if(!$.current||!x.current)return;const R={placement:e,strategy:r,middleware:d};L.current&&(R.platform=L.current),$Fe($.current,x.current,R).then(M=>{const _={...M,isPositioned:!0};V.current&&!y2(T.current,_)&&(T.current=_,Kr.flushSync(()=>{u(_)}))})},[d,e,r,L]);eg(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const V=m.useRef(!1);eg(()=>(V.current=!0,()=>{V.current=!1}),[]),eg(()=>{if(E&&($.current=E),k&&(x.current=k),E&&k){if(B.current)return B.current(E,k,U);U()}},[E,k,U,B]);const N=m.useMemo(()=>({reference:$,floating:x,setReference:p,setFloating:w}),[p,w]),C=m.useMemo(()=>({reference:E,floating:k}),[E,k]),S=m.useMemo(()=>{const R={position:r,left:0,top:0};if(!C.floating)return R;const M=QD(C.floating,f.x),_=QD(C.floating,f.y);return a?{...R,transform:"translate("+M+"px, "+_+"px)",...KJ(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:_}},[r,a,C.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:U,refs:N,elements:C,floatingStyles:S}),[f,U,N,C,S])}function PFe(t){const[e,r]=m.useState(void 0);return ch(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.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 QJ="Popper",[YJ,JJ]=LJ(QJ),[TFe,XJ]=YJ(QJ),RFe=t=>{const{__scopePopper:e,children:r}=t,[n,s]=m.useState(null);return m.createElement(TFe,{scope:e,anchor:n,onAnchorChange:s},r)},IFe="PopperAnchor",OFe=m.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=XJ(IFe,r),o=m.useRef(null),a=ru(e,o);return m.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:m.createElement(Qh.div,tn({},s,{ref:a}))}),ZJ="PopperContent",[MFe,PHe]=YJ(ZJ),DFe=m.forwardRef((t,e)=>{var r,n,s,i,o,a,l,c;const{__scopePopper:f,side:u="bottom",sideOffset:d=0,align:h="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:g=[],collisionPadding:b=0,sticky:p="partial",hideWhenDetached:w=!1,avoidCollisions:E=!0,onPlaced:k,...$}=t,x=XJ(ZJ,f),[T,B]=m.useState(null),L=ru(e,ie=>B(ie)),[U,V]=m.useState(null),N=PFe(U),C=(r=N==null?void 0:N.width)!==null&&r!==void 0?r:0,S=(n=N==null?void 0:N.height)!==null&&n!==void 0?n:0,R=u+(h!=="center"?"-"+h:""),M=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},_=Array.isArray(g)?g:[g],I=_.length>0,F={padding:M,boundary:_.filter(NFe),altBoundary:I},{refs:D,floatingStyles:A,placement:j,isPositioned:G,middlewareData:O}=_Fe({strategy:"fixed",placement:R,whileElementsMounted:kFe,elements:{reference:x.anchor},middleware:[sFe({mainAxis:d+S,alignmentAxis:v}),E&&iFe({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?oFe():void 0,...F}),E&&tFe({...F}),aFe({...F,apply:({elements:ie,rects:ue,availableWidth:st,availableHeight:ke})=>{const{width:Ae,height:at}=ue.reference,me=ie.floating.style;me.setProperty("--radix-popper-available-width",`${st}px`),me.setProperty("--radix-popper-available-height",`${ke}px`),me.setProperty("--radix-popper-anchor-width",`${Ae}px`),me.setProperty("--radix-popper-anchor-height",`${at}px`)}}),U&&AFe({element:U,padding:y}),LFe({arrowWidth:C,arrowHeight:S}),w&&rFe({strategy:"referenceHidden"})]}),[q,z]=eX(j),H=Xl(k);ch(()=>{G&&(H==null||H())},[G,H]);const J=(s=O.arrow)===null||s===void 0?void 0:s.x,X=(i=O.arrow)===null||i===void 0?void 0:i.y,K=((o=O.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[Q,ae]=m.useState();return ch(()=>{T&&ae(window.getComputedStyle(T).zIndex)},[T]),m.createElement("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:G?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,["--radix-popper-transform-origin"]:[(a=O.transformOrigin)===null||a===void 0?void 0:a.x,(l=O.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:t.dir},m.createElement(MFe,{scope:f,placedSide:q,onArrowChange:V,arrowX:J,arrowY:X,shouldHideArrow:K},m.createElement(Qh.div,tn({"data-side":q,"data-align":z},$,{ref:L,style:{...$.style,animation:G?void 0:"none",opacity:(c=O.hide)!==null&&c!==void 0&&c.referenceHidden?0:void 0}}))))});function NFe(t){return t!==null}const LFe=t=>({name:"transformOrigin",options:t,fn(e){var r,n,s,i,o;const{placement:a,rects:l,middlewareData:c}=e,u=((r=c.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[v,y]=eX(a),g={start:"0%",center:"50%",end:"100%"}[y],b=((n=(s=c.arrow)===null||s===void 0?void 0:s.x)!==null&&n!==void 0?n:0)+d/2,p=((i=(o=c.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+h/2;let w="",E="";return v==="bottom"?(w=u?g:`${b}px`,E=`${-h}px`):v==="top"?(w=u?g:`${b}px`,E=`${l.floating.height+h}px`):v==="right"?(w=`${-h}px`,E=u?g:`${p}px`):v==="left"&&(w=`${l.floating.width+h}px`,E=u?g:`${p}px`),{data:{x:w,y:E}}}});function eX(t){const[e,r="center"]=t.split("-");return[e,r]}const jFe=RFe,tX=OFe,FFe=DFe,BFe=m.forwardRef((t,e)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...s}=t;return n?H8.createPortal(m.createElement(Qh.div,tn({},s,{ref:e})),n):null});function UFe(t,e){return m.useReducer((r,n)=>{const s=e[r][n];return s??r},t)}const K_=t=>{const{present:e,children:r}=t,n=zFe(e),s=typeof r=="function"?r({present:n.isPresent}):m.Children.only(r),i=ru(n.ref,s.ref);return typeof r=="function"||n.isPresent?m.cloneElement(s,{ref:i}):null};K_.displayName="Presence";function zFe(t){const[e,r]=m.useState(),n=m.useRef({}),s=m.useRef(t),i=m.useRef("none"),o=t?"mounted":"unmounted",[a,l]=UFe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=np(n.current);i.current=a==="mounted"?c:"none"},[a]),ch(()=>{const c=n.current,f=s.current;if(f!==t){const d=i.current,h=np(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),ch(()=>{if(e){const c=u=>{const h=np(n.current).includes(u.animationName);u.target===e&&h&&Kr.flushSync(()=>l("ANIMATION_END"))},f=u=>{u.target===e&&(i.current=np(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:m.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function np(t){return(t==null?void 0:t.animationName)||"none"}function VFe({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=qFe({defaultProp:e,onChange:r}),i=t!==void 0,o=i?t:n,a=Xl(r),l=m.useCallback(c=>{if(i){const u=typeof c=="function"?c(t):c;u!==t&&a(u)}else s(c)},[i,t,s,a]);return[o,l]}function qFe({defaultProp:t,onChange:e}){const r=m.useState(t),[n]=r,s=m.useRef(n),i=Xl(e);return m.useEffect(()=>{s.current!==n&&(i(n),s.current=n)},[n,s,i]),r}var WFe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},bu=new WeakMap,sp=new WeakMap,ip={},R5=0,rX=function(t){return t&&(t.host||rX(t.parentNode))},HFe=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=rX(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return Boolean(r)})},GFe=function(t,e,r,n){var s=HFe(e,Array.isArray(t)?t:[t]);ip[r]||(ip[r]=new WeakMap);var i=ip[r],o=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else{var h=d.getAttribute(n),v=h!==null&&h!=="false",y=(bu.get(d)||0)+1,g=(i.get(d)||0)+1;bu.set(d,y),i.set(d,g),o.push(d),y===1&&v&&sp.set(d,!0),g===1&&d.setAttribute(r,"true"),v||d.setAttribute(n,"true")}})};return f(e),a.clear(),R5++,function(){o.forEach(function(u){var d=bu.get(u)-1,h=i.get(u)-1;bu.set(u,d),i.set(u,h),d||(sp.has(u)||u.removeAttribute(n),sp.delete(u)),h||u.removeAttribute(r)}),R5--,R5||(bu=new WeakMap,bu=new WeakMap,sp=new WeakMap,ip={})}},KFe=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=e||WFe(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),GFe(n,s,r,"aria-hidden")):function(){return null}},tg="right-scroll-bar-position",rg="width-before-scroll-bar",QFe="with-scroll-bars-hidden",YFe="--removed-body-scroll-bar-size";function JFe(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function XFe(t,e){var r=m.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}function ZFe(t,e){return XFe(e||null,function(r){return t.forEach(function(n){return JFe(n,r)})})}function eBe(t){return t}function tBe(t,e){e===void 0&&(e=eBe);var r=[],n=!1,s={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(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var f=o;o=[],f.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(f){o.push(f),c()},filter:function(f){return o=o.filter(f),r}}}};return s}function rBe(t){t===void 0&&(t={});var e=tBe(null);return e.options=ho({async:!0,ssr:!1},t),e}var nX=function(t){var e=t.sideCar,r=QF(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 m.createElement(n,ho({},r))};nX.isSideCarExport=!0;function nBe(t,e){return t.useMedium(e),nX}var sX=rBe(),I5=function(){},qx=m.forwardRef(function(t,e){var r=m.useRef(null),n=m.useState({onScrollCapture:I5,onWheelCapture:I5,onTouchMoveCapture:I5}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,f=t.enabled,u=t.shards,d=t.sideCar,h=t.noIsolation,v=t.inert,y=t.allowPinchZoom,g=t.as,b=g===void 0?"div":g,p=QF(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=d,E=ZFe([r,e]),k=ho(ho({},p),s);return m.createElement(m.Fragment,null,f&&m.createElement(w,{sideCar:sX,removeScrollBar:c,shards:u,noIsolation:h,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),o?m.cloneElement(m.Children.only(a),ho(ho({},k),{ref:E})):m.createElement(b,ho({},k,{className:l,ref:E}),a))});qx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qx.classNames={fullWidth:rg,zeroRight:tg};var JD,sBe=function(){if(JD)return JD;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iBe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=sBe();return e&&t.setAttribute("nonce",e),t}function oBe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function aBe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var lBe=function(){var t=0,e=null;return{add:function(r){t==0&&(e=iBe())&&(oBe(e,r),aBe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},cBe=function(){var t=lBe();return function(e,r){m.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},iX=function(){var t=cBe(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},fBe={left:0,top:0,right:0,gap:0},O5=function(t){return parseInt(t||"",10)||0},uBe=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[O5(r),O5(n),O5(s)]},dBe=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return fBe;var e=uBe(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])}},hBe=iX(),vBe=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),` + .`.concat(QFe,` { overflow: hidden `).concat(n,`; padding-right: `).concat(a,"px ").concat(n,`; } @@ -328,29 +328,29 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),` } - .`).concat(eg,` { + .`).concat(tg,` { right: `).concat(a,"px ").concat(n,`; } - .`).concat(tg,` { + .`).concat(rg,` { margin-right: `).concat(a,"px ").concat(n,`; } - .`).concat(eg," .").concat(eg,` { + .`).concat(tg," .").concat(tg,` { right: 0 `).concat(n,`; } - .`).concat(tg," .").concat(tg,` { + .`).concat(rg," .").concat(rg,` { margin-right: 0 `).concat(n,`; } body { - `).concat(QFe,": ").concat(a,`px; + `).concat(YFe,": ").concat(a,`px; } -`)},vBe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return uBe(s)},[s]);return m.createElement(dBe,{styles:hBe(i,!e,s,r?"":"!important")})},Vk=!1;if(typeof window<"u")try{var ip=Object.defineProperty({},"passive",{get:function(){return Vk=!0,!0}});window.addEventListener("test",ip,ip),window.removeEventListener("test",ip,ip)}catch{Vk=!1}var bu=Vk?{passive:!1}:!1,yBe=function(t){return t.tagName==="TEXTAREA"},oX=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!yBe(t)&&r[e]==="visible")},mBe=function(t){return oX(t,"overflowY")},pBe=function(t){return oX(t,"overflowX")},XD=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=aX(t,r);if(n){var s=lX(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},gBe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},bBe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},aX=function(t,e){return t==="v"?mBe(e):pBe(e)},lX=function(t,e){return t==="v"?gBe(e):bBe(e)},wBe=function(t,e){return t==="h"&&e==="rtl"?-1:1},xBe=function(t,e,r,n,s){var i=wBe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=lX(t,a),v=h[0],y=h[1],b=h[2],p=y-b-i*v;(v||p)&&aX(t,a)&&(u+=p,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},op=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ZD=function(t){return[t.deltaX,t.deltaY]},eN=function(t){return t&&"current"in t?t.current:t},CBe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},EBe=function(t){return` +`)},yBe=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n,i=m.useMemo(function(){return dBe(s)},[s]);return m.createElement(hBe,{styles:vBe(i,!e,s,r?"":"!important")})},Wk=!1;if(typeof window<"u")try{var op=Object.defineProperty({},"passive",{get:function(){return Wk=!0,!0}});window.addEventListener("test",op,op),window.removeEventListener("test",op,op)}catch{Wk=!1}var wu=Wk?{passive:!1}:!1,mBe=function(t){return t.tagName==="TEXTAREA"},oX=function(t,e){var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!mBe(t)&&r[e]==="visible")},pBe=function(t){return oX(t,"overflowY")},gBe=function(t){return oX(t,"overflowX")},XD=function(t,e){var r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=aX(t,r);if(n){var s=lX(t,r),i=s[1],o=s[2];if(i>o)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},bBe=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},wBe=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},aX=function(t,e){return t==="v"?pBe(e):gBe(e)},lX=function(t,e){return t==="v"?bBe(e):wBe(e)},xBe=function(t,e){return t==="h"&&e==="rtl"?-1:1},CBe=function(t,e,r,n,s){var i=xBe(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,f=o>0,u=0,d=0;do{var h=lX(t,a),v=h[0],y=h[1],g=h[2],b=y-g-i*v;(v||b)&&aX(t,a)&&(u+=b,d+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(f&&(s&&u===0||!s&&o>u)||!f&&(s&&d===0||!s&&-o>d))&&(c=!0),c},ap=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ZD=function(t){return[t.deltaX,t.deltaY]},eN=function(t){return t&&"current"in t?t.current:t},EBe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},SBe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},SBe=0,wu=[];function kBe(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(SBe++)[0],i=m.useState(function(){return iX()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Xfe([t.lockRef.current],(t.shards||[]).map(eN),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,b){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var p=op(y),g=r.current,w="deltaX"in y?y.deltaX:g[0]-p[0],E="deltaY"in y?y.deltaY:g[1]-p[1],k,$=y.target,C=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&C==="h"&&$.type==="range")return!1;var T=XD(C,$);if(!T)return!0;if(T?k=C:(k=C==="v"?"h":"v",T=XD(C,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var j=n.current||k;return xBe(j,b,y,j==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var b=y;if(!(!wu.length||wu[wu.length-1]!==i)){var p="deltaY"in b?ZD(b):op(b),g=e.current.filter(function(k){return k.name===b.type&&k.target===b.target&&CBe(k.delta,p)})[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var w=(o.current.shards||[]).map(eN).filter(Boolean).filter(function(k){return k.contains(b.target)}),E=w.length>0?a(b,w[0]):!o.current.noIsolation;E&&b.cancelable&&b.preventDefault()}}},[]),c=m.useCallback(function(y,b,p,g){var w={name:y,delta:b,target:p,should:g};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=op(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,ZD(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,op(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return wu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,bu),document.addEventListener("touchmove",l,bu),document.addEventListener("touchstart",f,bu),function(){wu=wu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,bu),document.removeEventListener("touchmove",l,bu),document.removeEventListener("touchstart",f,bu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:EBe(s)}):null,h?m.createElement(vBe,{gapMode:"margin"}):null)}const $Be=rBe(sX,kBe);var cX=m.forwardRef(function(t,e){return m.createElement(Vx,ho({},t,{ref:e,sideCar:$Be}))});cX.classNames=Vx.classNames;const ABe=cX,fX="Popover",[uX,PHe]=LJ(fX,[JJ]),qx=JJ(),[_Be,ru]=uX(fX),PBe=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=qx(e),l=m.useRef(null),[c,f]=m.useState(!1),[u=!1,d]=zFe({prop:n,defaultProp:s,onChange:i});return m.createElement(LFe,a,m.createElement(_Be,{scope:e,contentId:qje(),triggerRef:l,open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:o},r))},TBe="PopoverAnchor",RBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=ru(TBe,r),i=qx(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return m.useEffect(()=>(o(),()=>a()),[o,a]),m.createElement(tX,tn({},i,n,{ref:e}))}),IBe="PopoverTrigger",OBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=ru(IBe,r),i=qx(r),o=tu(e,s.triggerRef),a=m.createElement(Kh.button,tn({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":vX(s.open)},n,{ref:o,onClick:uf(t.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?a:m.createElement(tX,tn({asChild:!0},i),a)}),dX="PopoverPortal",[MBe,DBe]=uX(dX,{forceMount:void 0}),NBe=t=>{const{__scopePopover:e,forceMount:r,children:n,container:s}=t,i=ru(dX,e);return m.createElement(MBe,{scope:e,forceMount:r},m.createElement(G_,{present:r||i.open},m.createElement(FFe,{asChild:!0,container:s},n)))},Jy="PopoverContent",LBe=m.forwardRef((t,e)=>{const r=DBe(Jy,t.__scopePopover),{forceMount:n=r.forceMount,...s}=t,i=ru(Jy,t.__scopePopover);return m.createElement(G_,{present:n||i.open},i.modal?m.createElement(jBe,tn({},s,{ref:e})):m.createElement(FBe,tn({},s,{ref:e})))}),jBe=m.forwardRef((t,e)=>{const r=ru(Jy,t.__scopePopover),n=m.useRef(null),s=tu(e,n),i=m.useRef(!1);return m.useEffect(()=>{const o=n.current;if(o)return GFe(o)},[]),m.createElement(ABe,{as:B_,allowPinchZoom:!0},m.createElement(hX,tn({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uf(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:uf(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:uf(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),FBe=m.forwardRef((t,e)=>{const r=ru(Jy,t.__scopePopover),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(hX,tn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),hX=m.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,...u}=t,d=ru(Jy,r),h=qx(r);return Mje(),m.createElement(Dje,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(Rje,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1)},m.createElement(jFe,tn({"data-state":vX(d.open),role:"dialog",id:d.contentId},h,u,{ref:e,style:{...u.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 vX(t){return t?"open":"closed"}const BBe=PBe,UBe=RBe,zBe=OBe,VBe=NBe,qBe=LBe,[WBe,HBe]=eu(),z0=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=WBe();return{setOpenWalletModal:t,openWalletModalState:e}};function Cn(){return Cn=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const La=t=>{const e=zt[t];if(!e)throw"invalid network";const r=new Xw("https://metadata.sequence.app"),n=new Jw(Vw(e.name)),s=new yd("https://api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},cr=(t,e)=>t.toLowerCase()===e.toLowerCase(),K_=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},yX=t=>`0x${K_((t==null?void 0:t.substring(2))||"",8)}`;var Ja=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}(Ja||{});const $a=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=Ja.VERY_LARGE:e<1e-10?r=Ja.VERY_TINY:e<1?r=Ja.FRACTION:r=Ja.MIXED;let n,s;switch(r){case Ja.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Ja.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Ja.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Cn({notation:n},s)).format(e)},GBe=t=>t.charAt(0).toUpperCase()+t.slice(1),mX=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},y2=t=>/0x[a-fA-F0-9]{40}/.test(t),KBe=t=>t>0?ge.colors.positive:t<0?ge.colors.negative:ge.colors.text50,tN=(t,e)=>{var r;const n=e.find(i=>cr(i.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},No=(t,e,r)=>{var n,s;let i=0;const o=e.find(h=>cr(h.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((n=o.price)==null?void 0:n.value)||0;let l=((s=t.contractInfo)==null?void 0:s.decimals)||18;if(t.contractType==="ERC721"||t.contractType==="ERC1155"){var c;l=((c=t.tokenMetadata)==null?void 0:c.decimals)||0}const f=_r(t.balance,l),u=parseFloat(f)*a;return i+=u,`${(i*r).toFixed(2)}`},pX=t=>{const e=[],r=[],n=[];return t.forEach(s=>{s.contractAddress===Cr?e.push(s):s.contractType==="ERC20"?r.push(s):(s.contractType==="ERC721"||s.contractType==="ERC1155")&&n.push(s)}),{nativeTokens:e,erc20Tokens:r,collectibles:n}},gX=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},m2=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await La(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Cr,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:hA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},Q_=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await La(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},p2=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{try{const{indexerClient:i}=await La(e),o=await i.getTokenBalances(Cn({accountAddress:t,includeMetadata:!0},r?{contractAddress:r}:{}));let a=(o==null?void 0:o.balances)||[];if(n&&a.length>0){const l=await Q_({tokens:a.map(c=>({chainId:c.chainId,contractAddress:c.contractAddress,tokenId:c.tokenID}))});a=a.filter(c=>{const f=l==null?void 0:l.find(u=>cr(u.token.contractAddress,c.contractAddress)&&u.token.chainId===c.chainId);return c.contractType!=="ERC20"||!!f&&f.price!==null})}return s&&a.length>0&&(a=a.filter(l=>l.contractType!=="ERC721"&&l.contractType!=="ERC1155")),a}catch(i){return console.error(i),[]}},QBe=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([m2({accountAddress:t,chainId:e}),p2({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(s){return console.error(s),[]}},bX=async({accountAddress:t,chainId:e,collectionAddress:r})=>{try{const{indexerClient:n}=await La(e),s=await n.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r});return(s==null?void 0:s.balances)||[]}catch(n){return console.error(n),[]}},YBe=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{let o=[];try{if(r.length>0){const p=r.filter(k=>cr(k.contractAddress,Cr)),g=r.filter(k=>!cr(k.contractAddress,Cr)),w={},E={};p.forEach(k=>{w[k.chainId]||(w[k.chainId]=[]),w[k.chainId].push(k)}),g.forEach(k=>{E[k.chainId]||(E[k.chainId]=[]),E[k.chainId].push(k)}),o=(await Promise.all([...Object.keys(w).map(k=>m2({accountAddress:t,chainId:Number(k)})),...Object.keys(E).map(k=>E[Number(k)].map($=>p2({accountAddress:t,chainId:Number(k),contractAddress:$.contractAddress},{hideUnlistedTokens:n,hideCollectibles:s}))).flat()])).flat()}else o=(await Promise.all([...e.map(p=>m2({accountAddress:t,chainId:p})),...e.map(p=>p2({accountAddress:t,chainId:p},{hideUnlistedTokens:n,hideCollectibles:s}))])).flat();const{nativeTokens:a,erc20Tokens:l,collectibles:c}=pX(o),f=new Promise(async(p,g)=>{if(l.length>0){const w=l.map(k=>({chainId:k.chainId,contractAddress:k.contractAddress})),E=await Q_({tokens:w})||[];p(E)}else p([])}),u=c.map(async p=>await bX({accountAddress:t,chainId:p.chainId,collectionAddress:p.contractAddress})),[d,...h]=await Promise.all([f,...u]),v=l.sort((p,g)=>{var w,E;const k=d.find(N=>cr(N.token.contractAddress,p.contractAddress)),$=d.find(N=>cr(N.token.contractAddress,g.contractAddress)),C=k!=null&&k.price?k.price.value:0,T=$!=null&&$.price?$.price.value:0,j=Number(_r(p.balance,((w=p.contractInfo)==null?void 0:w.decimals)||0)),F=Number(_r(g.balance,((E=g.contractInfo)==null?void 0:E.decimals)||0)),U=j*C;return F*T-U}),y=lLe(h.flat(),10).sort((p,g)=>p.contractAddress.localeCompare(g.contractAddress));return s?[...a.length>0?[a[0]]:[],...v.length>0?v.slice(0,11):[]]:[...a.length>0?[a[0]]:[],...v.length>0?[v[0]]:[],...y.length>0?[...y]:[]]}catch(a){return console.error(a),[]}},JBe=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n})=>{const{indexerClient:s}=await La(e);return(await s.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n})).balances[0]},XBe=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await La(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},wX=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:s})=>{const{indexerClient:i}=La(t);return i.getTransactionHistory({includeMetadata:!0,page:s,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},ZBe=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(i=>wX({chainId:i,accountAddress:e,page:{page:1}}))])).map(i=>i.transactions).flat().sort((i,o)=>{const a=new Date(i.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),eUe=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=La(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},tUe=["chainIds"],rUe=["disabled"],Fo={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},Y_=(t,e)=>di({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=Wx(t,tUe);return(await Promise.all(r.map(i=>QBe(Cn({},n,{chainId:i}),e)))).flat()},retry:!0,staleTime:10*Fo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),nUe=t=>di({queryKey:["collectionBalance",t],queryFn:()=>bX(t),retry:!0,staleTime:10*Fo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),nu=t=>{let{disabled:e}=t,r=Wx(t,rUe);return di({queryKey:["coinPrices",r],queryFn:()=>Q_(r),retry:!0,staleTime:1*Fo.oneMinute,enabled:r.tokens.length>0&&!e})},sUe=(t,e)=>di({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>YBe(t,e),retry:!0,staleTime:10*Fo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),iUe=(t,e)=>di({queryKey:["coinBalance",t,e],queryFn:()=>cr((t==null?void 0:t.contractAddress)||"",Cr)?m2({accountAddress:t.accountAddress,chainId:t.chainId}).then(s=>s[0]):p2(t,e).then(n=>n[0]),retry:!0,staleTime:1*Fo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),xX=t=>di({queryKey:["collectibleBalance",t],queryFn:()=>JBe(t),retry:!0,staleTime:5*Fo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),CX=t=>di({queryKey:["useCollectiblePrices",t],queryFn:()=>XBe(t),retry:!0,staleTime:5*Fo.oneMinute,enabled:t.tokens.length>0}),EX=t=>NOe({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>wX(Cn({},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*Fo.oneMinute,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),oUe=t=>di({queryKey:["transactionHistorySummary",t],queryFn:()=>ZBe(t),retry:!0,staleTime:10*Fo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),vc=t=>di({queryKey:["useConversionRate",t],queryFn:()=>eUe(t),retry:!0,staleTime:60*Fo.oneMinute}),[aUe,lUe]=eu(),Ki=()=>{const{setHistory:t,history:e}=aUe();return{setNavigation:s=>{const i=document.getElementById("sequence-kit-wallet-content"),o=i==null?void 0:i.parentElement;o==null||o.scrollTo(0,0);const a=[...e,s];t(a)},history:e,setHistory:t,goBack:()=>{const s=[...e];s.pop(),t(s)}}},cUe=[{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"}],fUe=[{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"}],uUe=[{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"}],SX=[{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}],dUe=SX[0],Fs="54px",Qi=navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px",Qn=()=>{const{chains:t}=F4(),e=()=>{let c=!0,f=!1,u=dUe,d=t.map(h=>h.id);try{const h=localStorage.getItem(Cs.Settings),v=JSON.parse(h||"{}");if((v==null?void 0:v.hideUnlistedTokens)!==void 0&&(c=v==null?void 0:v.hideUnlistedTokens),(v==null?void 0:v.hideCollectibles)!==void 0&&(f=v==null?void 0:v.hideCollectibles),(v==null?void 0:v.fiatCurrency)!==void 0&&(u=v==null?void 0:v.fiatCurrency),(v==null?void 0:v.selectedNetworks)!==void 0){let y=!0;v.selectedNetworks.forEach(b=>{t.find(p=>p.id===b)===void 0&&(y=!1)}),y&&(d=v==null?void 0:v.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:c,hideCollectibles:f,fiatCurrency:u,selectedNetworks:d}},r=e(),[n,s]=m.useState(r);return Cn({},n,{setFiatCurrency:c=>{const f=e(),u=Cn({},f,{fiatCurrency:c});localStorage.setItem(Cs.Settings,JSON.stringify(u)),s(u)},setHideCollectibles:c=>{const f=e(),u=Cn({},f,{hideCollectibles:c});localStorage.setItem(Cs.Settings,JSON.stringify(u)),s(u)},setHideUnlistedTokens:c=>{const f=e(),u=Cn({},f,{hideUnlistedTokens:c});localStorage.setItem(Cs.Settings,JSON.stringify(u)),s(u)},setSelectedNetworks:c=>{const f=e(),u=Cn({},f,{selectedNetworks:c});localStorage.setItem(Cs.Settings,JSON.stringify(u)),s(u)}})},hUe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{variant:"large",color:"textInverse100"},"?")),Of=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(hUe,{size:e}),rN=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:s,priceChangePercentage:i,symbol:o})=>{const{fiatCurrency:a}=Qn(),l=i>0?"+":"";return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},P.createElement(W,{marginBottom:"1"},P.createElement(Of,{size:36,imageUrl:e})),P.createElement(W,{marginBottom:"3"},P.createElement(W,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{fontWeight:"bold",whiteSpace:"nowrap",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),P.createElement(Of,{size:12,imageUrl:t})),P.createElement(re,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"bold"},`${a.sign}${s}`)),P.createElement(re,{style:{color:KBe(i)}},`${l}${i.toFixed(2)}%`)))},nN=({balance:t})=>{var e,r,n,s,i;const{fiatCurrency:o}=Qn(),a=cr(t.contractAddress,Cr),l=Mr(t.chainId),{data:c=[],isLoading:f}=nu({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:u=1,isLoading:d}=vc({toCurrency:o.symbol});if(f||d)return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(a){const $=No(t,c,u),C=tN(t,c),T=_r(t.balance,l.decimals),j=$a(T);return P.createElement(rN,{networkLogoUrl:l.logoURI,logoUrl:l.logoURI,tokenName:l.name,balance:j,balanceFiat:$,priceChangePercentage:C,symbol:l.symbol})}const v=No(t,c,u),y=tN(t,c),b=(e=(r=t.contractInfo)==null?void 0:r.decimals)!=null?e:18,p=_r(t.balance,b),g=$a(p),w=((n=t.contractInfo)==null?void 0:n.name)||"Unknown",E=((s=t.contractInfo)==null?void 0:s.name)||"TOKEN",k=(i=t.contractInfo)==null?void 0:i.logoURI;return P.createElement(rN,{networkLogoUrl:l.logoURI,logoUrl:k,tokenName:w,balance:g,balanceFiat:v,priceChangePercentage:y,symbol:E})},J_=({imageUrl:t})=>P.createElement(Oo,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"md",background:"backgroundSecondary"},P.createElement(fr,{style:{height:"100%"},src:t})),vUe=({balance:t})=>{var e;return P.createElement(J_,{imageUrl:t==null||(e=t.tokenMetadata)==null?void 0:e.image})};Jf("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const yUe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),mUe=js({height:"76px",backgroundColor:"#909090",animation:`${yUe} 2s ease-in-out infinite`},"skeleton");Xf();const wt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>P.createElement(W,{className:mUe,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),pUe=()=>P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},Array(12).fill(null).map((t,e)=>P.createElement(W,{key:e},P.createElement(wt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));Jf("packages/wallet/src/shared/styles.css.ts","kit");const Ao=js({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),X_=js({"> div":{overflowY:"scroll"}},"scrollbar");Gi(`html:not(.is-apple) ${X_} > div::-webkit-scrollbar-thumb`,{background:"none",backgroundClip:"content-box",transition:"background 0.5s linear"});Gi(`html:not(.is-apple) ${X_} > div:hover::-webkit-scrollbar-thumb`,{background:ge.colors.text50,backgroundClip:"content-box"});const Z_=js({},"walletContent");Gi(`${Z_} + button`,{backgroundColor:"transparent"});Gi(`${Z_} + button > svg`,{width:"20px",height:"20px"});Xf();const gUe=()=>{const{address:t}=Pn(),{setNavigation:e}=Ki(),{displayedAssets:r}=eOe(),{hideUnlistedTokens:n,hideCollectibles:s,selectedNetworks:i}=Qn(),{data:o=[],isLoading:a}=sUe({accountAddress:t||"",chainIds:i,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s});if(a)return P.createElement(pUe,null);const{nativeTokens:l,erc20Tokens:c,collectibles:f}=pX(o),u=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 P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},l.map(d=>P.createElement(W,{key:d.contractAddress,className:Ao,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),c.map(d=>P.createElement(W,{className:Ao,key:d.contractAddress,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),f.map(d=>P.createElement(W,{className:Ao,aspectRatio:"1/1",key:`${d.contractAddress}-${d.tokenID}}`,onClick:()=>u(d)},P.createElement(vUe,{balance:d}))))},bUe=()=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",gap:"4",flexDirection:"column",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(gUe,null)),wUe=()=>{const{address:t}=Pn(),{chain:e}=F4(),[r,n]=m.useState(!1),s=Mr((e==null?void 0:e.id)||1);m.useEffect(()=>{r&&setTimeout(()=>{n(!1)},4e3)},[r]);const i=()=>{n(!0)},o=()=>{window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},P.createElement(W,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},P.createElement(RLe,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),P.createElement(W,null,P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(re,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),P.createElement(fr,{width:"5",src:s.logoURI,alt:"icon"})),P.createElement(W,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},P.createElement(re,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),P.createElement(W,{gap:"3"},P.createElement(hJ.CopyToClipboard,{text:t||""},P.createElement(nt,{onClick:i,leftIcon:sw,label:r?"Copied!":"Copy"})),P.createElement(nt,{onClick:o,leftIcon:ade,label:"Share"})),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},P.createElement(re,{variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${s.name} address. Please only send assets on the ${s.name} network.`))))},kX=({imageUrl:t,name:e,decimals:r,balance:n,symbol:s,fiatValue:i,chainId:o,showSquareImage:a})=>{const{fiatCurrency:l}=Qn(),c=_r(n,r),f=$a(c),u=Mr(o);return P.createElement(W,{alignItems:"flex-end",justifyContent:"space-between"},P.createElement(W,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?P.createElement(W,{style:{width:"40px"}},P.createElement(J_,{imageUrl:t})):P.createElement(Of,{imageUrl:t,size:40}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",alignItems:"center",gap:"1"},P.createElement(re,{variant:"medium"},e),P.createElement(Of,{imageUrl:u.logoURI,size:12})),P.createElement(re,{color:"text50",variant:"normal"}," ",`${f} ${s} available`))),P.createElement(W,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},i&&P.createElement(re,{variant:"normal"},`${l.sign}${i}`)))},xUe=({chainId:t,contractAddress:e})=>{var r,n,s,i,o;const a=j4(),{address:l="",connector:c}=Pn(),f=!!(c!=null&&(r=c._wallet)!=null&&r.isSequenceBased),u=a===t,d=!u&&!f,{switchNetwork:h}=Dq(),v=m.useRef(null),{setOpenWalletModal:y}=z0(),{fiatCurrency:b}=Qn(),[p,g]=m.useState("0"),[w,E]=m.useState(""),{data:k}=L4(),{data:$=[],isLoading:C}=Y_({accountAddress:l,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),T=Mr(t),j=$.find(Q=>Q.contractAddress===e),{data:F=[],isLoading:U}=nu({tokens:[{chainId:t,contractAddress:e}]}),{data:V=1,isLoading:N}=vc({toCurrency:b.symbol});if(C||U||N)return null;const S=cr(e,Cr),R=S?T.decimals:(j==null||(n=j.contractInfo)==null?void 0:n.decimals)||18,M=S?T.name:(j==null||(s=j.contractInfo)==null?void 0:s.name)||"",_=S?T.logoURI:j==null||(i=j.contractInfo)==null?void 0:i.logoURI,I=S?T.symbol:(j==null||(o=j.contractInfo)==null?void 0:o.symbol)||"",B=p===""?"0":p,D=Nd(B,R),A=No(Cn({},j,{balance:D.toString()}),F,V),L=D.gt((j==null?void 0:j.balance)||"0"),G=D.gt(0),O=Q=>{const{value:K}=Q.target,J=mX(K,R);g(J)},q=()=>{var Q;(Q=v.current)==null||Q.focus();const K=_r((j==null?void 0:j.balance)||0,R).toString();g(K)},z=async()=>{const Q=await navigator.clipboard.readText();E(Q)},H=()=>{E("")},X=async Q=>{!u&&f&&h&&h(t),Q.preventDefault();const K=Nd(B,R);S?k==null||k.sendTransaction({to:w,value:BigInt(K.toString())}).catch(J=>console.error("User rejected transaction",J)):k==null||k.sendTransaction({to:j==null?void 0:j.contractAddress,data:new en(fUe).encodeFunctionData("transfer",[w,K.toHexString()])}).catch(J=>console.error("User rejected transaction",J)),y(!1)};return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Fs},gap:"2",flexDirection:"column",as:"form",onSubmit:X},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:_,decimals:R,name:M,symbol:I,balance:(j==null?void 0:j.balance)||"0",fiatValue:No(j,F,V),chainId:t}),P.createElement(Lz,{ref:v,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:O,controls:P.createElement(P.Fragment,null,P.createElement(re,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${b.sign}${A}`),P.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:q,"data-id":"maxCoin",flexShrink:"0"}),P.createElement(re,{fontSize:"xlarge",fontWeight:"bold"},I))}),L&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),y2(w)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:Ao,onClick:H,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(y0,{address:w,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${K_(w.substring(2),8)}`)),P.createElement(zf,{size:"xs"})):P.createElement(lc,{value:w,onChange:Q=>E(Q.target.value),placeholder:`${T.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:z,"data-id":"to-address",flexShrink:"0",leftIcon:sw})})),d&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>h&&h(t),disabled:u,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(nt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!G||!y2(w)||L||!u&&!f,label:"Send",rightIcon:Mi,style:{height:"52px",borderRadius:ge.radii.md}}))},CUe=({chainId:t,contractAddress:e,tokenId:r})=>{var n,s,i,o,a;const l=j4(),{address:c="",connector:f}=Pn(),u=!!(f!=null&&(n=f._wallet)!=null&&n.isSequenceBased),d=l===t,h=!d&&!u,{switchNetwork:v}=Dq(),y=m.useRef(null),{setOpenWalletModal:b}=z0(),[p,g]=m.useState("0"),[w,E]=m.useState(""),{data:k}=L4(),{data:$,isLoading:C}=xX({accountAddress:c,chainId:t,collectionAddress:e,tokenId:r}),T=Mr(t);if(C)return null;const F=($==null||(s=$.tokenMetadata)==null?void 0:s.decimals)||0,U=($==null||(i=$.tokenMetadata)==null?void 0:i.name)||"Unknown",V=($==null||(o=$.tokenMetadata)==null?void 0:o.image)||($==null||(a=$.contractInfo)==null?void 0:a.logoURI)||"",N=p===""?"0":p,x=Nd(N,F),S=x.gt(($==null?void 0:$.balance)||"0"),R=x.gt(0),M=z=>{const{value:H}=z.target,X=mX(H,F);g(X)},_=()=>{var z;(z=y.current)==null||z.focus();const H=Number(p)-1,X=Math.max(H,0).toString();g(X)},I=()=>{var z;(z=y.current)==null||z.focus();const H=Number(p)+1,X=Number(_r(($==null?void 0:$.balance)||0,F)),Q=Math.min(H,X).toString();g(Q)},B=()=>{var z;(z=y.current)==null||z.focus();const H=_r(($==null?void 0:$.balance)||0,F).toString();g(H)},D=async()=>{const z=await navigator.clipboard.readText();E(z)},A=()=>{E("")},L=async z=>{z.preventDefault(),!d&&u&&v&&v(t);const H=Nd(N,F),{contractType:X}=$;switch(X){case"ERC721":k==null||k.sendTransaction({to:$.contractAddress,data:new en(uUe).encodeFunctionData("safeTransferFrom",[c,w,r])}).catch(Q=>console.error("User rejected transaction",Q));break;case"ERC1155":default:k==null||k.sendTransaction({to:$.contractAddress,data:new en(cUe).encodeFunctionData("safeBatchTransferFrom",[c,w,[r],[H.toHexString()],[]])}).catch(Q=>console.error("User rejected transaction",Q))}b(!1)},G=_r(($==null?void 0:$.balance)||0,F).toString(),O=Number(p)===0,q=Number(p)>=Number(G);return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Fs},gap:"2",flexDirection:"column",as:"form",onSubmit:L},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:V,showSquareImage:!0,decimals:F,name:U,symbol:"",balance:($==null?void 0:$.balance)||"0",chainId:t}),P.createElement(Lz,{ref:y,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:M,controls:P.createElement(W,{gap:"2"},P.createElement(nt,{disabled:O,size:"xs",onClick:_,leftIcon:fde}),P.createElement(nt,{disabled:q,size:"xs",onClick:I,leftIcon:Due}),P.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:B,"data-id":"maxCoin",flexShrink:"0"}))}),S&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),y2(w)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:Ao,onClick:A,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(y0,{address:w,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${K_(w.substring(2),8)}`)),P.createElement(zf,{size:"xs"})):P.createElement(lc,{value:w,onChange:z=>E(z.target.value),placeholder:`${T.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:D,"data-id":"to-address",flexShrink:"0",leftIcon:sw})})),h&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>v&&v(t),disabled:d,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(nt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!R||!y2(w)||S||!d&&!u,label:"Send",rightIcon:Mi,style:{height:"52px",borderRadius:ge.radii.md}}))},EUe=({transaction:t})=>{var e;const{fiatCurrency:r}=Qn(),{setNavigation:n}=Ki(),s=()=>{n({location:"transaction-details",params:{transaction:t}})};let i=[];(e=t.transfers)==null||e.forEach(p=>{const g=p.contractAddress;i.includes(g)||i.push(g)});const{data:o=[],isLoading:a}=nu({tokens:i.map(p=>({contractAddress:p,chainId:t.chainId}))}),{data:l=1,isLoading:c}=vc({toCurrency:r.symbol}),f=a||c,{transfers:u}=t,d=Mr(t.chainId),h=p=>{switch(p){case Ci.SEND:return P.createElement(d3,{style:{transform:"rotate(270deg)",width:"16px"}});case Ci.RECEIVE:return P.createElement(d3,{style:{transform:"rotate(90deg)",width:"16px"}});case Ci.UNKNOWN:default:return P.createElement(LU,{style:{width:"14px"}})}},v=p=>{switch(p){case Ci.SEND:return"Sent";case Ci.RECEIVE:return"Received";case Ci.UNKNOWN:default:return"Transacted"}},y=(p,g,w)=>{let E="";w===Ci.SEND?E="-":w===Ci.RECEIVE&&(E="+");let k="text50";return w===Ci.SEND?k=ge.colors.negative:w===Ci.RECEIVE&&(k=ge.colors.positive),P.createElement(re,{fontWeight:"bold",fontSize:"normal",style:{color:k}},`${E}${p} ${g}`)},b=({transfer:p,isFirstItem:g})=>{const{amounts:w}=p,E=kJ(t.timestamp).format("MMM DD, YYYY");return P.createElement(W,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},h(p.transferType),P.createElement(re,{fontWeight:"medium",fontSize:"normal"},v(p.transferType)),P.createElement(fr,{src:d.logoURI,width:"3"})),g&&P.createElement(W,null,P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},E))),w.map((k,$)=>{var C,T,j,F,U,V,N;const x=Mr(t.chainId),S=cr(p.contractAddress,Cr),R=((C=p.contractInfo)==null?void 0:C.type)==="ERC721"||((T=p.contractInfo)==null?void 0:T.type)==="ERC1155";let M;const _=(j=p.tokenIds)==null?void 0:j[$];if(R&&_){var I,B;M=((I=p.tokenMetadata)==null||(B=I[_])==null?void 0:B.decimals)||0}else{var D;M=S?x.decimals:(D=p.contractInfo)==null?void 0:D.decimals}const A=_r(k,M),L=S?x.symbol:((F=p.contractInfo)==null?void 0:F.symbol)||"",G=S?x.logoURI:(U=p.contractInfo)==null?void 0:U.logoURI,O=(V=o.find(q=>cr(q.token.contractAddress,p.contractAddress)))==null||(N=V.price)==null?void 0:N.value;return P.createElement(W,{key:$,flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},G&&P.createElement(fr,{src:G,width:"5",alt:"token logo"}),y($a(A),L,p.transferType)),f&&P.createElement(wt,{width:"35px",height:"20px"}),O&&P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${r.sign}${(Number(A)*O*l).toFixed(2)}`))}))};return P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:Ao,onClick:()=>s()},u==null?void 0:u.map((p,g)=>P.createElement(W,{key:`${t.txnHash}-${g}`,width:"full"},b({transfer:p,isFirstItem:g===0}))))},eP=()=>{const t=()=>P.createElement(W,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"65px",height:"20px"}),P.createElement(wt,{width:"75px",height:"17px"})),P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"120px",height:"20px"}),P.createElement(wt,{width:"35px",height:"17px"})));return P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(wt,{width:"70px",height:"17px"}),P.createElement(W,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>P.createElement(W,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},tP=({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"}],s=m.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),l=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),c=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const v=new Date(h.timestamp).getTime();v>a?d.today.push(h):v>l?d.yesterday.push(h):v>c?d.week.push(h):v>f?d.month.push(h):v>u?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(eP,null));const i=({label:a})=>P.createElement(W,null,P.createElement(re,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>P.createElement(W,{flexDirection:"column",gap:"2"},a.map((l,c)=>P.createElement(W,{key:`${l.txnHash}-${c}`,flexDirection:"column",gap:"2"},P.createElement(EUe,{transaction:l}))));return P.createElement(W,{flexDirection:"column",gap:"5"},n.map(a=>{const l=s[a.id];return l.length===0?null:P.createElement(W,{key:a.id,flexDirection:"column",gap:"3"},P.createElement(i,{label:a.label}),P.createElement(o,{transactions:l}))}),t.length===0&&P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(i,{label:"History"}),P.createElement(re,null,"No Recent Transaction History Found")),r&&P.createElement(W,{margin:"4",alignItems:"center",justifyContent:"center"},P.createElement(X$,null)))},SUe=()=>{const{selectedNetworks:t}=Qn(),{address:e}=Pn(),{data:r=[],isLoading:n}=oUe({accountAddress:e||"",chainIds:t});return P.createElement(W,null,P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(tP,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},g2=({balance:t})=>{var e,r;const{setNavigation:n}=Ki(),s=cr(t.contractAddress,Cr),i=Mr(t.chainId),o=s?i.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,a=s?i.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",l=()=>{var f,u;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const d=s?i.decimals:t==null||(f=t.contractInfo)==null?void 0:f.decimals,h=_r(t.balance,d||0),v=$a(h),y=s?i.symbol:t==null||(u=t.contractInfo)==null?void 0:u.symbol;return`${v} ${y}`},c=()=>{const f=t.contractType==="ERC721"||t.contractType==="ERC1155";n(f?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return P.createElement(W,{key:t.contractAddress,onClick:c,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:Ao},P.createElement(W,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(Of,{imageUrl:o,size:30}),P.createElement(W,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},a),P.createElement(fr,{src:i.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},P.createElement(re,{color:"text50",fontWeight:"bold",fontSize:"normal"},l()),P.createElement(Mi,{color:"text50"})))},sN=({toLocation:t,label:e})=>{const{setNavigation:r}=Ki(),n=()=>{r(t)};return P.createElement(W,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:Ao},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),P.createElement(Mi,{color:"text50",size:"sm"})))},kUe=()=>{const{fiatCurrency:t,hideUnlistedTokens:e,selectedNetworks:r}=Qn(),[n,s]=m.useState(""),{address:i}=Pn(),{data:o,isLoading:a}=Y_({accountAddress:i||"",chainIds:r},{hideUnlistedTokens:e}),l=(o==null?void 0:o.filter(j=>j.contractType==="ERC20"||cr(j.contractAddress,Cr)))||[],{data:c=[],isLoading:f}=nu({tokens:l.map(j=>({chainId:j.chainId,contractAddress:j.contractAddress}))}),{data:u=1,isLoading:d}=vc({toCurrency:t.symbol}),h=l.sort((j,F)=>Number(No(F,c,u))-Number(No(j,c,u))),y=((o==null?void 0:o.filter(j=>j.contractType==="ERC721"||j.contractType==="ERC1155"))||[]).sort((j,F)=>Number(F.balance)-Number(j.balance)),b=a||f||d,p=y.map((j,F)=>{var U;return{index:F,name:((U=j.contractInfo)==null?void 0:U.name)||"Unknown"}}),g=h.map((j,F)=>{if(cr(j.contractAddress,Cr)){const V=Mr(j.chainId);return{index:F,name:V.name}}else{var U;return{index:F,name:((U=j.contractInfo)==null?void 0:U.name)||"Unknown"}}}),w=h.length,E=y.length,k=new Ca(g,{keys:["name"]}),$=new Ca(p,{keys:["name"]}),C=(n===""?g:k.search(n).map(j=>j.item)).slice(0,5),T=(n===""?p:$.search(n).map(j=>j.item)).slice(0,5);return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{width:"full"},P.createElement(lc,{autoFocus:!0,name:"search wallet",leftIcon:iw,value:n,onChange:j=>s(j.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${E})`}),b?Array(5).fill(null).map((j,F)=>P.createElement(wt,{key:F,width:"100%",height:"32px"})):T.length===0?P.createElement(re,null,"No collections found"):T.map(j=>{const F=y[j.index];return P.createElement(g2,{key:F.contractAddress,balance:F})})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${w})`}),b?Array(5).fill(null).map((j,F)=>P.createElement(wt,{key:F,width:"100%",height:"32px"})):C.length===0?P.createElement(re,null,"No coins found"):C.map(j=>{const F=h[j.index];return P.createElement(g2,{key:F.contractAddress,balance:F})})))},$Ue=({defaultTab:t})=>{const{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Qn(),[s,i]=m.useState(""),[o,a]=m.useState(t);m.useEffect(()=>{i("")},[o]);const{address:l}=Pn(),{data:c,isLoading:f}=Y_({accountAddress:l||"",chainIds:n},{hideUnlistedTokens:r}),u=(c==null?void 0:c.filter(x=>x.contractType==="ERC20"||cr(x.contractAddress,Cr)))||[],{data:d=[],isLoading:h}=nu({tokens:u.map(x=>({chainId:x.chainId,contractAddress:x.contractAddress}))}),{data:v=1,isLoading:y}=vc({toCurrency:e.symbol}),b=u.sort((x,S)=>Number(No(S,d,v))-Number(No(x,d,v))),g=((c==null?void 0:c.filter(x=>x.contractType==="ERC721"||x.contractType==="ERC1155"))||[]).sort((x,S)=>Number(S.balance)-Number(x.balance)),w=b.length,E=g.length,k=f||h||y,$=g.map((x,S)=>{var R;return{index:S,name:((R=x.contractInfo)==null?void 0:R.name)||"Unknown"}}),C=b.map((x,S)=>{if(cr(x.contractAddress,Cr)){const M=Mr(x.chainId);return{index:S,name:M.name}}else{var R;return{index:S,name:((R=x.contractInfo)==null?void 0:R.name)||"Unknown"}}}),T=new Ca(C,{keys:["name"]}),j=new Ca($,{keys:["name"]}),F=s===""?C:T.search(s).map(x=>x.item),U=s===""?$:j.search(s).map(x=>x.item),V=()=>P.createElement(wt,{width:"360px",height:"48px"}),N=()=>P.createElement(P.Fragment,null,Array(8).fill(null).map((x,S)=>P.createElement(wt,{key:S,width:"full",height:"32px"})));return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{width:"full"},P.createElement(lc,{autoFocus:!0,name:"search wallet",leftIcon:iw,value:s,onChange:x=>i(x.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full"},P.createElement(Zye,{value:o,onValueChange:x=>a(x)},P.createElement(W,{marginBottom:"5"},!k&&P.createElement(Xye,{value:o,tabs:[{label:`Collections (${E})`,value:"collections"},{label:`Coins (${w})`,value:"coins"}]}),k&&P.createElement(V,null)),P.createElement(iR,{value:"collections"},P.createElement(W,{flexDirection:"column",gap:"3"},k&&P.createElement(N,null),!k&&U.length===0&&P.createElement(re,null,"No Collectibles Found"),!k&&U.length>0&&U.map(x=>{const S=g[x.index];return P.createElement(g2,{key:S.contractAddress,balance:S})}))),P.createElement(iR,{value:"coins"},P.createElement(W,{flexDirection:"column",gap:"3"},k&&P.createElement(N,null),!k&&b.length==0&&P.createElement(re,null,"No Coins Found"),!k&&F.length>0&&F.map(x=>{const S=b[x.index];return P.createElement(g2,{key:S.contractAddress,balance:S})}))))))},AUe=()=>{const{setNavigation:t}=Ki(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(nt,{onClick:e,leftIcon:DU,rightIcon:Mi,width:"full",label:"General",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(nt,{onClick:r,leftIcon:que,rightIcon:Mi,width:"full",label:"Currency",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(nt,{onClick:n,leftIcon:Xue,rightIcon:Mi,width:"full",label:"Networks",style:{height:"52px",borderRadius:ge.radii.md}}))))},_Ue=()=>{Da();const{hideUnlistedTokens:t,setHideUnlistedTokens:e,hideCollectibles:r,setHideCollectibles:n}=Qn(),s=()=>{e(!t)},i=()=>{n(!r)};return P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},P.createElement(Oo,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide unlisted tokens"),P.createElement(sR,{checked:t,onCheckedChange:s})),P.createElement(Oo,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide collectibles"),P.createElement(sR,{checked:r,onCheckedChange:i}))))},PUe=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return P.createElement(W,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":ge.radii.circle,width:"20px",height:"20px"}},P.createElement(W,{as:ay.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":ge.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&P.createElement(xh,{color:"white",style:{width:"14px",height:"14px"}})))},TUe=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],$X=t=>{const{value:e,selected:r,children:n,disabled:s,onClick:i,className:o,hideIndicator:a,squareIndicator:l=!1}=t,c=Wx(t,TUe);return P.createElement(Oo,Cn({as:"button",clickable:!0,className:bje(o),disabled:s,onClick:()=>i(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},c),n,!a&&P.createElement(PUe,{selected:r,squareIndicator:l}))},RUe=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Qn();return P.createElement(W,{paddingBottom:"5",paddingLeft:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{flexDirection:"column",gap:"2"},SX.map(r=>P.createElement($X,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},P.createElement(W,{gap:"2",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold"},r.symbol),P.createElement(re,{color:"text50"},r.name.message))))))},IUe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Qn(),{chains:r}=F4(),n=s=>{if(t.includes(s)){if(t.length===1)return;e(t.filter(i=>i!==s))}else e([...t,s])};return P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(re,{variant:"small",color:"text50"},"Networks"),P.createElement(W,{flexDirection:"column",gap:"2"},r.map(s=>{const i=Mr(s.id);return P.createElement($X,{disabled:t.length===1&&t.includes(s.id),key:s.id,selected:t.includes(s.id),onClick:()=>n(s.id),value:s.id,squareIndicator:!0},P.createElement(W,{gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{width:"3",height:"3",src:i.logoURI,alt:"network"}),P.createElement(re,{color:"text100",variant:"small"},i.name)))}))))},V0=({chainId:t})=>{const{network:e}=La(t),r=Mr(t),n=UIe(t),s=zIe(t);return P.createElement(W,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:s},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"min"},P.createElement(fr,{style:{width:"14px"},src:r.logoURI}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",style:{color:n}},GBe(e.name)))},OUe=({chainId:t})=>P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{height:"24px",width:"70px"}),P.createElement(V0,{chainId:t})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"150px",height:"36px"}),P.createElement(wt,{width:"33px",height:"17px"}))),P.createElement(nt,{marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:ow,label:"Send",disabled:!0,onClick:()=>{}}),P.createElement(W,null,P.createElement(eP,null)))),MUe=(t,e)=>{var r;const[n,s]=m.useState(null),i=m.useMemo(()=>new IntersectionObserver(([o])=>s(o),e),[]);return m.useEffect(()=>(t.current&&i.observe(t.current),()=>{t.current&&i.disconnect()}),[t.current,i]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},AX=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[s,i]=m.useState(0),[o,a]=m.useState(!1),l=m.useRef(null),c=MUe(l);m.useEffect(()=>{c&&r&&!o&&f()},[c]);const f=async()=>{a(!0),await e(s),i(u=>u+1),a(!1)};return P.createElement(P.Fragment,null,n,P.createElement("div",{ref:l}))},DUe=({contractAddress:t,chainId:e})=>{var r,n,s,i;const{setNavigation:o}=Ki(),{fiatCurrency:a,hideUnlistedTokens:l}=Qn(),{address:c}=Pn(),{data:f,isLoading:u,fetchNextPage:d,hasNextPage:h,isFetchingNextPage:v}=EX({chainId:e,accountAddress:c||"",contractAddress:t}),y=gX(f),{data:b,isLoading:p}=iUe({accountAddress:c||"",contractAddress:t,chainId:e},{hideUnlistedTokens:l}),{data:g,isLoading:w}=nu({tokens:[{chainId:e,contractAddress:t}]}),{data:E=1,isLoading:k}=vc({toCurrency:a.symbol});if(p||w||k)return P.createElement(OUe,{chainId:e});const C=cr(t,Cr),T=C?Mr(e).logoURI:b==null||(r=b.contractInfo)==null?void 0:r.logoURI,j=C?Mr(e).symbol:b==null||(n=b.contractInfo)==null?void 0:n.symbol,F=C?Mr(e).name:b==null||(s=b.contractInfo)==null?void 0:s.name,U=C?Mr(e).decimals:b==null||(i=b.contractInfo)==null?void 0:i.decimals,V=_r((b==null?void 0:b.balance)||"0",U),N=$a(V),x=b?No(b,g||[],E):"0",S=()=>{o({location:"send-coin",params:{chainId:e,contractAddress:t}})};return P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(fr,{width:"8",src:T,alt:"logo"}),P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},F),P.createElement(V0,{chainId:e})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${N} ${j}`),P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${a.sign}${x}`))),P.createElement(nt,{width:"full",variant:"primary",leftIcon:ow,label:"Send",onClick:S}),P.createElement(W,null,P.createElement(AX,{onLoad:()=>d(),hasMore:h},P.createElement(tP,{transactions:y,isLoading:u,isFetchingNextPage:v})))))},NUe=({chainId:t})=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{width:"100px",height:"24px"}),P.createElement(V0,{chainId:t}),P.createElement(wt,{width:"142px",height:"17px"})),P.createElement(W,{width:"full"},P.createElement(wt,{width:"168px",height:"20px"}),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>P.createElement(wt,{width:"full",aspectRatio:"1/1"}))))),LUe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Ki(),{address:s}=Pn(),{data:i,isLoading:o}=nUe({chainId:t,accountAddress:s||"",collectionAddress:e}),a=i==null||(r=i[0])==null?void 0:r.contractInfo,l=a==null?void 0:a.logoURI;if(o)return P.createElement(NUe,{chainId:t});const c=f=>{n&&n({location:"collectible-details",params:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenID}})};return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(Of,{imageUrl:l,size:32}),P.createElement(re,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),P.createElement(V0,{chainId:t}),P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(i==null?void 0:i.length)||0} Unique Collectibles`)),P.createElement(W,{width:"full"},P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(i==null?void 0:i.length)||0})`),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},i==null?void 0:i.map(f=>{var u,d,h;const v=f.balance,y=(f==null||(u=f.tokenMetadata)==null?void 0:u.decimals)||0,b=$a(_r(v,y));return P.createElement(W,{key:`${f.contractAddress}-${f.tokenID}`,onClick:()=>c(f),className:Ao},P.createElement(W,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},P.createElement(fr,{style:{height:"100%"},src:(d=f.tokenMetadata)==null?void 0:d.image})),P.createElement(W,null,P.createElement(re,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(h=f.tokenMetadata)==null?void 0:h.name}`)),P.createElement(W,null,P.createElement(re,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},b," Owned")))}))))},jUe=()=>P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"120px",height:"30px"}),P.createElement(wt,{width:"140px",height:"40px"})),P.createElement(W,null,P.createElement(wt,{width:"347px",height:"347px"})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"44px",height:"36px"}),P.createElement(wt,{width:"34px",height:"17px"}))),P.createElement(nt,{marginTop:"4",width:"full",variant:"primary",leftIcon:ow,label:"Send",onClick:()=>{}})),P.createElement(W,null,P.createElement(re,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),P.createElement(eP,null)))),FUe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,s,i,o,a,l;const{address:c}=Pn(),{fiatCurrency:f}=Qn(),{setNavigation:u}=Ki(),{data:d,isLoading:h,fetchNextPage:v,hasNextPage:y,isFetchingNextPage:b}=EX({chainId:e,accountAddress:c||"",contractAddress:t,tokenId:r}),p=gX(d),{data:g,isLoading:w}=xX({accountAddress:c||"",collectionAddress:t,chainId:e,tokenId:r}),{data:E,isLoading:k}=CX({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:$=1,isLoading:C}=vc({toCurrency:f.symbol});if(w||k||C)return P.createElement(jUe,null);const j=()=>{u({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},F=Mr(e),U=g==null||(n=g.contractInfo)==null?void 0:n.logoURI,V=(g==null||(s=g.contractInfo)==null?void 0:s.name)||"Unknown Collection",N=(g==null||(i=g.tokenMetadata)==null?void 0:i.decimals)||0,x=(g==null?void 0:g.balance)||"0",S=_r(x,N),R=$a(Number(S)),M=g?No(g,E||[],$):"0";return P.createElement(W,{style:{paddingTop:Fs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Qi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{borderRadius:"circle",width:"8",src:U,alt:"collection logo",style:{objectFit:"cover"}}),P.createElement(W,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"small"},V),P.createElement(fr,{width:"3",src:F.logoURI,alt:"collection logo"}))),P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},(g==null||(o=g.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),P.createElement(re,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),P.createElement(W,null,P.createElement(J_,{imageUrl:g==null||(a=g.tokenMetadata)==null?void 0:a.image})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},R),E&&((l=E[0].price)==null?void 0:l.value)&&P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${f.symbol} ${M}`))),P.createElement(nt,{marginTop:"4",width:"full",variant:"primary",leftIcon:ow,label:"Send",onClick:j})),P.createElement(W,null,P.createElement(AX,{onLoad:()=>v(),hasMore:y},P.createElement(tP,{transactions:p,isLoading:h,isFetchingNextPage:b})))))},BUe=["buttonVariant","text","size"],_X=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,s=Wx(t,BUe),[i,o]=m.useState(!1);m.useEffect(()=>{i&&setTimeout(()=>{o(!1)},4e3)},[i]);const a=()=>{o(!0)},l=i?"Copied!":"Copy",c=e==="icon"?"rgba(0,0,0,0)":ge.colors.buttonGlass;return P.createElement(hJ.CopyToClipboard,{text:r,onCopy:a},P.createElement(ba,Cn({size:n,icon:i?xh:sw},s,{style:Cn({background:c},t==null?void 0:t.style),label:e==="with-label"?l:void 0})))},UUe=({transaction:t})=>{var e,r;const{fiatCurrency:n}=Qn(),s=[],i=[];(e=t.transfers)==null||e.forEach(p=>{var g,w;if(((g=p.contractInfo)==null?void 0:g.type)==="ERC721"||((w=p.contractInfo)==null?void 0:w.type)==="ERC1155"){var E;(E=p.tokenIds)==null||E.forEach($=>{if(!i.find(j=>{var F;return j.chainId===t.chainId&&cr(j.contractAddress,((F=p.contractInfo)==null?void 0:F.address)||"")&&j.tokenId===$})){var T;i.push({chainId:t.chainId,contractAddress:((T=p.contractInfo)==null?void 0:T.address)||"",tokenId:$})}})}else{var k;const $=(p==null||(k=p.contractInfo)==null?void 0:k.address)||Cr;s.find(T=>T.chainId===t.chainId&&cr(T.contractAddress,$))||s.push({chainId:t.chainId,contractAddress:$})}});const{data:o,isLoading:a}=nu({tokens:s}),{data:l,isLoading:c}=CX({tokens:i}),{data:f=1,isLoading:u}=vc({toCurrency:n.symbol}),d=s.length>0&&a||i.length>0&&c||u,h=Mr(t.chainId),v=kJ(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),y=()=>{window.open(`${h.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},b=({transfer:p})=>{var g,w,E,k;const $=p.to,C=$.substring(0,10)+"..."+$.substring(p.to.length-4,p.to.length),T=cr((p==null||(g=p.contractInfo)==null?void 0:g.address)||"",Cr),j=T?h.logoURI:p==null||(w=p.contractInfo)==null?void 0:w.logoURI,F=T?h.symbol:(p==null||(E=p.contractInfo)==null?void 0:E.symbol)||"";return P.createElement(P.Fragment,null,(k=p.amounts)==null?void 0:k.map((U,V)=>{var N,x,S,R,M,_,I,B;const D=p.contractType==="ERC721"||p.contractType==="ERC1155",A=((N=p.tokenIds)==null?void 0:N[V])||"0",L=(p==null||(x=p.tokenMetadata)==null||(S=x[A])==null?void 0:S.decimals)||0,G=T?h.decimals:(p==null||(R=p.contractInfo)==null?void 0:R.decimals)||0,q=_r(U,D?L:G),z=$a(q),H=D?l==null||(M=l.find(Q=>{var K,J;return cr(Q.token.contractAddress,((K=p.contractInfo)==null?void 0:K.address)||"")&&Q.token.tokenId===((J=p.tokenIds)==null?void 0:J[V])&&Q.token.chainId===t.chainId}))==null||(_=M.price)==null?void 0:_.value:o==null||(I=o.find(Q=>{var K;return cr(Q.token.contractAddress,((K=p.contractInfo)==null?void 0:K.address)||Cr)&&Q.token.chainId===t.chainId}))==null||(B=I.price)==null?void 0:B.value,X=(parseFloat(q)*(f*(H||0))).toFixed(2);return P.createElement(W,{key:V,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(Of,{imageUrl:j,size:20}),P.createElement(W,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${z} ${F}`),d?P.createElement(wt,{width:"44px",height:"12px"}):P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},H?`${n.sign}${X}`:""))),P.createElement(d3,{color:"text50",style:{width:"16px"}}),P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(y0,{address:$,style:{width:"20px"}}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},C)))}))};return P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},P.createElement(W,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),P.createElement(re,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},v),P.createElement(V0,{chainId:t.chainId})),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},P.createElement(W,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},P.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),P.createElement(fr,{width:"3",src:h.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((p,g)=>P.createElement(W,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${g}`},P.createElement(b,{transfer:p})))),P.createElement(nt,{onClick:y,width:"full",borderRadius:"md",rightIcon:Kue,label:`View on ${h.blockExplorerName}`}),P.createElement(W,null,P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ly,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Complete")),P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ly,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),P.createElement(re,{fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),P.createElement(_X,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},zUe=m.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Pn();return P.createElement(W,{gap:"2",alignItems:"center"},P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(W,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:Ao,position:"relative",ref:e},P.createElement(y0,{size:"sm",address:r||""}),P.createElement(re,{color:"text100",fontWeight:"medium",variant:"normal"},yX(r||"")),P.createElement(MU,null))))}),VUe=m.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Ki(),{setOpenWalletModal:n}=z0(),{address:s}=Pn(),{disconnect:i}=Mq(),{theme:o}=Da(),a=()=>{t(!1),r({location:"receive"})},l=()=>{t(!1),r({location:"history"})},c=()=>{t(!1),r({location:"settings"})},f=()=>{n(!1),t(!1),i()};return P.createElement(W,{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)"}},P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2"},P.createElement(y0,{style:{width:"28px"},size:"md",address:s||""}),P.createElement(re,{fontSize:"large",color:"text100",style:{fontWeight:"700"}},yX(s||"")),P.createElement(_X,{buttonVariant:"icon",size:"md",text:s||"",style:{marginLeft:"-16px"}})),P.createElement(ba,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:zf})),P.createElement(W,{gap:"2",marginTop:"3",flexDirection:"column"},P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:rde,label:"Receive",onClick:a}),P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:LU,label:"History",onClick:l}),P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:DU,label:"Settings",onClick:c}),P.createElement(nt,{label:"Sign Out",style:{borderRadius:ge.radii.md},width:"full",leftIcon:NU,onClick:f})))});Jf("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const qUe=js({":focus-visible":{boxShadow:"none"}},"searchButton");Xf();const O5=({})=>{const{openWalletModalState:t}=z0(),[e,r]=m.useState(!1),{goBack:n,history:s,setNavigation:i}=Ki(),o=m.useRef(!1);m.useEffect(()=>{t||r(!1)},[t]),m.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[s.length,e]);const a=()=>{r(!0)},l=()=>{n()},c=()=>{i({location:"search"})};return P.createElement(W,{as:ay.div},P.createElement(BBe,{open:e},P.createElement(UBe,null),P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Fs,paddingTop:"6px"}},s.length>0?P.createElement(ba,{onClick:l,icon:nw,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}):P.createElement(ba,{onClick:c,icon:iw,className:qUe,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}),P.createElement(zBe,{asChild:!0},P.createElement(zUe,{onClickAccount:a})),P.createElement(W,{style:{width:"44px"}})),P.createElement(ew,null,e&&P.createElement(VBe,null,P.createElement(qBe,{asChild:!0,side:"bottom",align:"start"},P.createElement(VUe,{setOpenWalletDropdown:r}))))))},Zi=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Ki(),s=()=>{r()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Fs,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},n.length>0?P.createElement(ba,{onClick:s,icon:nw,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))},iN=t=>{const{location:e}=t;switch(e){case"send-coin":return P.createElement(xUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return P.createElement(CUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return P.createElement(wUe,null);case"history":return P.createElement(SUe,null);case"search":return P.createElement(kUe,null);case"search-view-all":return P.createElement($Ue,{defaultTab:t.params.defaultTab});case"settings":return P.createElement(AUe,null);case"settings-general":return P.createElement(_Ue,null);case"settings-currency":return P.createElement(RUe,null);case"settings-networks":return P.createElement(IUe,null);case"coin-details":return P.createElement(DUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return P.createElement(FUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return P.createElement(LUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return P.createElement(UUe,{transaction:t.params.transaction});case"home":default:return P.createElement(bUe,null)}},WUe=t=>{const{location:e}=t;switch(e){case"search":return P.createElement(Zi,{primaryText:"Search wallet"});case"search-view-all":return P.createElement(Zi,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return P.createElement(Zi,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return P.createElement(Zi,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return P.createElement(Zi,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return P.createElement(Zi,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return P.createElement(Zi,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return P.createElement(Zi,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return P.createElement(O5,null);case"collectible-details":return P.createElement(O5,null);case"transaction-details":return P.createElement(Zi,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return P.createElement(Zi,{secondaryText:"Wallet /",primaryText:"Send"});case"home":default:return P.createElement(O5,null)}},HUe={location:"home"},GUe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(KUe,t))},KUe=({children:t})=>{const{theme:e,position:r}=Da(),[n,s]=m.useState(!1),[i,o]=m.useState([]),a=i.length>0?i[i.length-1]:HUe,l=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 m.useEffect(()=>{n&&o([])},[n]),P.createElement(HBe,{value:{setOpenWalletModal:s,openWalletModalState:n}},P.createElement(lUe,{value:{setHistory:o,history:i}},P.createElement(gw,{theme:e},P.createElement(ew,null,n&&P.createElement(Q$,{contentProps:{style:Cn({maxWidth:"400px",height:"fit-content"},T_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{className:Z_,id:"sequence-kit-wallet-content"},WUe(a),l?P.createElement(Nz,{className:X_,style:{paddingTop:Fs,height:"min(800px, 80vh)"}},iN(a)):iN(a))))),t))};var QUe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",YUe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),PX=()=>{var t;return QUe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":YUe()?window.location.origin:"https://withpaper.com"},TX={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},JUe=Object.defineProperty,XUe=Object.defineProperties,ZUe=Object.getOwnPropertyDescriptors,oN=Object.getOwnPropertySymbols,eze=Object.prototype.hasOwnProperty,tze=Object.prototype.propertyIsEnumerable,aN=(t,e,r)=>e in t?JUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Jn=(t,e)=>{for(var r in e||(e={}))eze.call(e,r)&&aN(t,r,e[r]);if(oN)for(var r of oN(e))tze.call(e,r)&&aN(t,r,e[r]);return t},lN=(t,e)=>XUe(t,ZUe(e)),rze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),RX=rze((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"}}}),IX=PX(),nze="/sdk/2022-08-12/checkout-with-card",sze=(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))(sze||{}),ize=(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))(ize||{}),oze=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}},aze=({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,s=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${s}`)};function cN(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Jn({eventType:e},r),"*")}var lze=RX(),cze=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let s=document.createElement("iframe");if(s.src=r.href,s.id=n,s.allow="payment",s.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;"),s.onload=a=>{this.onLoad&&this.onLoad(a)},s.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${lze.version}`),!this.elementOrId)return window.addEventListener("message",e(s)),s;let i=this.elementOrId;if(typeof i=="string"){let a=document.getElementById(i);if(!a)throw new Error("Invalid id given");i=a}let o=i.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(s)),i.appendChild(s))}},fN={top:"0px",left:"0px",right:"0px",bottom:"0px"},fze=()=>({main:lN(Jn({},fN),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center"}),overlay:lN(Jn({},fN),{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"}}),uze=` +`)},kBe=0,xu=[];function $Be(t){var e=m.useRef([]),r=m.useRef([0,0]),n=m.useRef(),s=m.useState(kBe++)[0],i=m.useState(function(){return iX()})[0],o=m.useRef(t);m.useEffect(function(){o.current=t},[t]),m.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Vie([t.lockRef.current],(t.shards||[]).map(eN),!0).filter(Boolean);return y.forEach(function(g){return g.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=m.useCallback(function(y,g){if("touches"in y&&y.touches.length===2)return!o.current.allowPinchZoom;var b=ap(y),p=r.current,w="deltaX"in y?y.deltaX:p[0]-b[0],E="deltaY"in y?y.deltaY:p[1]-b[1],k,$=y.target,x=Math.abs(w)>Math.abs(E)?"h":"v";if("touches"in y&&x==="h"&&$.type==="range")return!1;var T=XD(x,$);if(!T)return!0;if(T?k=x:(k=x==="v"?"h":"v",T=XD(x,$)),!T)return!1;if(!n.current&&"changedTouches"in y&&(w||E)&&(n.current=k),!k)return!0;var B=n.current||k;return CBe(B,g,y,B==="h"?w:E,!0)},[]),l=m.useCallback(function(y){var g=y;if(!(!xu.length||xu[xu.length-1]!==i)){var b="deltaY"in g?ZD(g):ap(g),p=e.current.filter(function(k){return k.name===g.type&&k.target===g.target&&EBe(k.delta,b)})[0];if(p&&p.should){g.cancelable&&g.preventDefault();return}if(!p){var w=(o.current.shards||[]).map(eN).filter(Boolean).filter(function(k){return k.contains(g.target)}),E=w.length>0?a(g,w[0]):!o.current.noIsolation;E&&g.cancelable&&g.preventDefault()}}},[]),c=m.useCallback(function(y,g,b,p){var w={name:y,delta:g,target:b,should:p};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(E){return E!==w})},1)},[]),f=m.useCallback(function(y){r.current=ap(y),n.current=void 0},[]),u=m.useCallback(function(y){c(y.type,ZD(y),y.target,a(y,t.lockRef.current))},[]),d=m.useCallback(function(y){c(y.type,ap(y),y.target,a(y,t.lockRef.current))},[]);m.useEffect(function(){return xu.push(i),t.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,wu),document.addEventListener("touchmove",l,wu),document.addEventListener("touchstart",f,wu),function(){xu=xu.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,wu),document.removeEventListener("touchmove",l,wu),document.removeEventListener("touchstart",f,wu)}},[]);var h=t.removeScrollBar,v=t.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:SBe(s)}):null,h?m.createElement(yBe,{gapMode:"margin"}):null)}const ABe=nBe(sX,$Be);var cX=m.forwardRef(function(t,e){return m.createElement(qx,ho({},t,{ref:e,sideCar:ABe}))});cX.classNames=qx.classNames;const _Be=cX,fX="Popover",[uX,THe]=LJ(fX,[JJ]),Wx=JJ(),[PBe,nu]=uX(fX),TBe=t=>{const{__scopePopover:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!1}=t,a=Wx(e),l=m.useRef(null),[c,f]=m.useState(!1),[u=!1,d]=VFe({prop:n,defaultProp:s,onChange:i});return m.createElement(jFe,a,m.createElement(PBe,{scope:e,contentId:Wje(),triggerRef:l,open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:o},r))},RBe="PopoverAnchor",IBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=nu(RBe,r),i=Wx(r),{onCustomAnchorAdd:o,onCustomAnchorRemove:a}=s;return m.useEffect(()=>(o(),()=>a()),[o,a]),m.createElement(tX,tn({},i,n,{ref:e}))}),OBe="PopoverTrigger",MBe=m.forwardRef((t,e)=>{const{__scopePopover:r,...n}=t,s=nu(OBe,r),i=Wx(r),o=ru(e,s.triggerRef),a=m.createElement(Qh.button,tn({type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":vX(s.open)},n,{ref:o,onClick:df(t.onClick,s.onOpenToggle)}));return s.hasCustomAnchor?a:m.createElement(tX,tn({asChild:!0},i),a)}),dX="PopoverPortal",[DBe,NBe]=uX(dX,{forceMount:void 0}),LBe=t=>{const{__scopePopover:e,forceMount:r,children:n,container:s}=t,i=nu(dX,e);return m.createElement(DBe,{scope:e,forceMount:r},m.createElement(K_,{present:r||i.open},m.createElement(BFe,{asChild:!0,container:s},n)))},Xy="PopoverContent",jBe=m.forwardRef((t,e)=>{const r=NBe(Xy,t.__scopePopover),{forceMount:n=r.forceMount,...s}=t,i=nu(Xy,t.__scopePopover);return m.createElement(K_,{present:n||i.open},i.modal?m.createElement(FBe,tn({},s,{ref:e})):m.createElement(BBe,tn({},s,{ref:e})))}),FBe=m.forwardRef((t,e)=>{const r=nu(Xy,t.__scopePopover),n=m.useRef(null),s=ru(e,n),i=m.useRef(!1);return m.useEffect(()=>{const o=n.current;if(o)return KFe(o)},[]),m.createElement(_Be,{as:U_,allowPinchZoom:!0},m.createElement(hX,tn({},t,{ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:df(t.onCloseAutoFocus,o=>{var a;o.preventDefault(),i.current||(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:df(t.onPointerDownOutside,o=>{const a=o.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:df(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})))}),BBe=m.forwardRef((t,e)=>{const r=nu(Xy,t.__scopePopover),n=m.useRef(!1),s=m.useRef(!1);return m.createElement(hX,tn({},t,{ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=t.onCloseAutoFocus)===null||o===void 0||o.call(t,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1,s.current=!1},onInteractOutside:i=>{var o,a;(o=t.onInteractOutside)===null||o===void 0||o.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}}))}),hX=m.forwardRef((t,e)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,...u}=t,d=nu(Xy,r),h=Wx(r);return Dje(),m.createElement(Nje,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i},m.createElement(Ije,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1)},m.createElement(FFe,tn({"data-state":vX(d.open),role:"dialog",id:d.contentId},h,u,{ref:e,style:{...u.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 vX(t){return t?"open":"closed"}const UBe=TBe,zBe=IBe,VBe=MBe,qBe=LBe,WBe=jBe,[HBe,GBe]=tu(),V0=()=>{const{setOpenWalletModal:t,openWalletModalState:e}=HBe();return{setOpenWalletModal:t,openWalletModalState:e}};function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(r[s]=t[s]);return r}const ja=t=>{const e=zt[t];if(!e)throw"invalid network";const r=new Zw("https://metadata.sequence.app"),n=new Xw(qw(e.name)),s=new hd("https://api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},cr=(t,e)=>t.toLowerCase()===e.toLowerCase(),Q_=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},yX=t=>`0x${Q_((t==null?void 0:t.substring(2))||"",8)}`;var Xa=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}(Xa||{});const Aa=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=Xa.VERY_LARGE:e<1e-10?r=Xa.VERY_TINY:e<1?r=Xa.FRACTION:r=Xa.MIXED;let n,s;switch(r){case Xa.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Xa.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Xa.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",En({notation:n},s)).format(e)},KBe=t=>t.charAt(0).toUpperCase()+t.slice(1),mX=(t,e)=>{const r=t.split(".");return r.length===1?t:`${r[0]}.${r[1].slice(0,e)}`},m2=t=>/0x[a-fA-F0-9]{40}/.test(t),QBe=t=>t>0?ge.colors.positive:t<0?ge.colors.negative:ge.colors.text50,tN=(t,e)=>{var r;const n=e.find(i=>cr(i.token.contractAddress,t.contractAddress));return n&&(n==null||(r=n.price24hChange)==null?void 0:r.value)||0},Lo=(t,e,r)=>{var n,s;let i=0;const o=e.find(h=>cr(h.token.contractAddress,t.contractAddress));if(!o)return"0.00";const a=((n=o.price)==null?void 0:n.value)||0;let l=((s=t.contractInfo)==null?void 0:s.decimals)||18;if(t.contractType==="ERC721"||t.contractType==="ERC1155"){var c;l=((c=t.tokenMetadata)==null?void 0:c.decimals)||0}const f=_r(t.balance,l),u=parseFloat(f)*a;return i+=u,`${(i*r).toFixed(2)}`},pX=t=>{const e=[],r=[],n=[];return t.forEach(s=>{s.contractAddress===Ar?e.push(s):s.contractType==="ERC20"?r.push(s):(s.contractType==="ERC721"||s.contractType==="ERC1155")&&n.push(s)}),{nativeTokens:e,erc20Tokens:r,collectibles:n}},gX=t=>{const e=[];return t==null||t.pages.forEach(r=>{e.push(...r.transactions)}),e},p2=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await ja(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Ar,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:vA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},Y_=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ja(e),n=await r.getCoinPrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},g2=async({accountAddress:t,chainId:e,contractAddress:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{try{const{indexerClient:i}=await ja(e),o=await i.getTokenBalances(En({accountAddress:t,includeMetadata:!0},r?{contractAddress:r}:{}));let a=(o==null?void 0:o.balances)||[];if(n&&a.length>0){const l=await Y_({tokens:a.map(c=>({chainId:c.chainId,contractAddress:c.contractAddress,tokenId:c.tokenID}))});a=a.filter(c=>{const f=l==null?void 0:l.find(u=>cr(u.token.contractAddress,c.contractAddress)&&u.token.chainId===c.chainId);return c.contractType!=="ERC20"||!!f&&f.price!==null})}return s&&a.length>0&&(a=a.filter(l=>l.contractType!=="ERC721"&&l.contractType!=="ERC1155")),a}catch(i){return console.error(i),[]}},YBe=async({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})=>{try{return(await Promise.all([p2({accountAddress:t,chainId:e}),g2({accountAddress:t,chainId:e},{hideUnlistedTokens:r,hideCollectibles:n})])).flat()}catch(s){return console.error(s),[]}},bX=async({accountAddress:t,chainId:e,collectionAddress:r})=>{try{const{indexerClient:n}=await ja(e),s=await n.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r});return(s==null?void 0:s.balances)||[]}catch(n){return console.error(n),[]}},JBe=async({accountAddress:t,chainIds:e,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s})=>{let o=[];try{if(r.length>0){const b=r.filter(k=>cr(k.contractAddress,Ar)),p=r.filter(k=>!cr(k.contractAddress,Ar)),w={},E={};b.forEach(k=>{w[k.chainId]||(w[k.chainId]=[]),w[k.chainId].push(k)}),p.forEach(k=>{E[k.chainId]||(E[k.chainId]=[]),E[k.chainId].push(k)}),o=(await Promise.all([...Object.keys(w).map(k=>p2({accountAddress:t,chainId:Number(k)})),...Object.keys(E).map(k=>E[Number(k)].map($=>g2({accountAddress:t,chainId:Number(k),contractAddress:$.contractAddress},{hideUnlistedTokens:n,hideCollectibles:s}))).flat()])).flat()}else o=(await Promise.all([...e.map(b=>p2({accountAddress:t,chainId:b})),...e.map(b=>g2({accountAddress:t,chainId:b},{hideUnlistedTokens:n,hideCollectibles:s}))])).flat();const{nativeTokens:a,erc20Tokens:l,collectibles:c}=pX(o),f=new Promise(async(b,p)=>{if(l.length>0){const w=l.map(k=>({chainId:k.chainId,contractAddress:k.contractAddress})),E=await Y_({tokens:w})||[];b(E)}else b([])}),u=c.map(async b=>await bX({accountAddress:t,chainId:b.chainId,collectionAddress:b.contractAddress})),[d,...h]=await Promise.all([f,...u]),v=l.sort((b,p)=>{var w,E;const k=d.find(N=>cr(N.token.contractAddress,b.contractAddress)),$=d.find(N=>cr(N.token.contractAddress,p.contractAddress)),x=k!=null&&k.price?k.price.value:0,T=$!=null&&$.price?$.price.value:0,B=Number(_r(b.balance,((w=b.contractInfo)==null?void 0:w.decimals)||0)),L=Number(_r(p.balance,((E=p.contractInfo)==null?void 0:E.decimals)||0)),U=B*x;return L*T-U}),y=cLe(h.flat(),10).sort((b,p)=>b.contractAddress.localeCompare(p.contractAddress));return s?[...a.length>0?[a[0]]:[],...v.length>0?v.slice(0,11):[]]:[...a.length>0?[a[0]]:[],...v.length>0?[v[0]]:[],...y.length>0?[...y]:[]]}catch(a){return console.error(a),[]}},XBe=async({accountAddress:t,chainId:e,collectionAddress:r,tokenId:n})=>{const{indexerClient:s}=await ja(e);return(await s.getTokenBalances({accountAddress:t,includeMetadata:!0,contractAddress:r,tokenID:n})).balances[0]},ZBe=async({tokens:t})=>{try{if(t.length===0)return[];const e=t[0].chainId,{apiClient:r}=await ja(e),n=await r.getCollectiblePrices({tokens:t});return(n==null?void 0:n.tokenPrices)||[]}catch(e){console.error(e);return}},wX=async({chainId:t,contractAddress:e,accountAddress:r,tokenId:n,page:s})=>{const{indexerClient:i}=ja(t);return i.getTransactionHistory({includeMetadata:!0,page:s,filter:{accountAddress:r,contractAddress:e,tokenID:n}})},eUe=async({chainIds:t,accountAddress:e})=>(await Promise.all([...t.map(i=>wX({chainId:i,accountAddress:e,page:{page:1}}))])).map(i=>i.transactions).flat().sort((i,o)=>{const a=new Date(i.timestamp).getTime();return new Date(o.timestamp).getTime()-a}),tUe=async({toCurrency:t})=>{if(t==="USD")return 1;const{apiClient:e}=ja(137);return(await e.getExchangeRate({toCurrency:t})).exchangeRate.value},rUe=["chainIds"],nUe=["disabled"],Bo={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},J_=(t,e)=>hi({queryKey:["balances",t,e],queryFn:async()=>{const{chainIds:r}=t,n=Hx(t,rUe);return(await Promise.all(r.map(i=>YBe(En({},n,{chainId:i}),e)))).flat()},retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),sUe=t=>hi({queryKey:["collectionBalance",t],queryFn:()=>bX(t),retry:!0,staleTime:10*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress}),su=t=>{let{disabled:e}=t,r=Hx(t,nUe);return hi({queryKey:["coinPrices",r],queryFn:()=>Y_(r),retry:!0,staleTime:1*Bo.oneMinute,enabled:r.tokens.length>0&&!e})},iUe=(t,e)=>hi({queryKey:["balancesAssetsSummary",t,e],queryFn:()=>JBe(t,e),retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),oUe=(t,e)=>hi({queryKey:["coinBalance",t,e],queryFn:()=>cr((t==null?void 0:t.contractAddress)||"",Ar)?p2({accountAddress:t.accountAddress,chainId:t.chainId}).then(s=>s[0]):g2(t,e).then(n=>n[0]),retry:!0,staleTime:1*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),xX=t=>hi({queryKey:["collectibleBalance",t],queryFn:()=>XBe(t),retry:!0,staleTime:5*Bo.oneMinute,enabled:!!t.chainId&&!!t.accountAddress&&!!t.collectionAddress&&!!t.tokenId}),CX=t=>hi({queryKey:["useCollectiblePrices",t],queryFn:()=>ZBe(t),retry:!0,staleTime:5*Bo.oneMinute,enabled:t.tokens.length>0}),EX=t=>LOe({queryKey:["transactionHistory",t],queryFn:({pageParam:e})=>wX(En({},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*Bo.oneMinute,enabled:!!t.chainId&&!t.disabled&&!!t.accountAddress}),aUe=t=>hi({queryKey:["transactionHistorySummary",t],queryFn:()=>eUe(t),retry:!0,staleTime:10*Bo.oneMinute,enabled:t.chainIds.length>0&&!!t.accountAddress}),yc=t=>hi({queryKey:["useConversionRate",t],queryFn:()=>tUe(t),retry:!0,staleTime:60*Bo.oneMinute}),[lUe,cUe]=tu(),Qi=()=>{const{setHistory:t,history:e}=lUe();return{setNavigation:s=>{const i=document.getElementById("sequence-kit-wallet-content"),o=i==null?void 0:i.parentElement;o==null||o.scrollTo(0,0);const a=[...e,s];t(a)},history:e,setHistory:t,goBack:()=>{const s=[...e];s.pop(),t(s)}}},fUe=[{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"}],uUe=[{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"}],dUe=[{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"}],SX=[{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}],hUe=SX[0],Bs="54px",Yi=navigator.userAgent.match(/chrome|chromium|crios/i)?"13px":"0px",Yn=()=>{const{chains:t}=dn(),e=()=>{let c=!0,f=!1,u=hUe,d=t.map(h=>h.id);try{const h=localStorage.getItem(Es.Settings),v=JSON.parse(h||"{}");if((v==null?void 0:v.hideUnlistedTokens)!==void 0&&(c=v==null?void 0:v.hideUnlistedTokens),(v==null?void 0:v.hideCollectibles)!==void 0&&(f=v==null?void 0:v.hideCollectibles),(v==null?void 0:v.fiatCurrency)!==void 0&&(u=v==null?void 0:v.fiatCurrency),(v==null?void 0:v.selectedNetworks)!==void 0){let y=!0;v.selectedNetworks.forEach(g=>{t.find(b=>b.id===g)===void 0&&(y=!1)}),y&&(d=v==null?void 0:v.selectedNetworks)}}catch(h){console.error(h,"Failed to fetch settings")}return{hideUnlistedTokens:c,hideCollectibles:f,fiatCurrency:u,selectedNetworks:d}},r=e(),[n,s]=m.useState(r);return En({},n,{setFiatCurrency:c=>{const f=e(),u=En({},f,{fiatCurrency:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setHideCollectibles:c=>{const f=e(),u=En({},f,{hideCollectibles:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setHideUnlistedTokens:c=>{const f=e(),u=En({},f,{hideUnlistedTokens:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)},setSelectedNetworks:c=>{const f=e(),u=En({},f,{selectedNetworks:c});localStorage.setItem(Es.Settings,JSON.stringify(u)),s(u)}})},vUe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",flexShrink:"0",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{variant:"large",color:"textInverse100"},"?")),Mf=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(vUe,{size:e}),rN=({networkLogoUrl:t,logoUrl:e,tokenName:r,balance:n,balanceFiat:s,priceChangePercentage:i,symbol:o})=>{const{fiatCurrency:a}=Yn(),l=i>0?"+":"";return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md",padding:"4",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"1"},P.createElement(W,{marginBottom:"1"},P.createElement(Mf,{size:36,imageUrl:e})),P.createElement(W,{marginBottom:"3"},P.createElement(W,{flexDirection:"row",gap:"1",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{fontWeight:"bold",whiteSpace:"nowrap",style:{maxWidth:"130px",textOverflow:"ellipsis",overflow:"hidden"}},r),P.createElement(Mf,{size:12,imageUrl:t})),P.createElement(re,{color:"text50",whiteSpace:"nowrap",style:{display:"block",maxWidth:"150px",textOverflow:"ellipsis",overflow:"hidden"}},`${n} ${o}`)),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"bold"},`${a.sign}${s}`)),P.createElement(re,{style:{color:QBe(i)}},`${l}${i.toFixed(2)}%`)))},nN=({balance:t})=>{var e,r,n,s,i;const{chains:o=[]}=dn(),{fiatCurrency:a}=Yn(),l=cr(t.contractAddress,Ar),c=Mr(t.chainId,o),{data:f=[],isLoading:u}=su({tokens:[{chainId:t.chainId,contractAddress:t.contractAddress}]}),{data:d=1,isLoading:h}=yc({toCurrency:a.symbol});if(u||h)return P.createElement(W,{background:"backgroundSecondary",width:"full",height:"full",borderRadius:"md"});if(l){const x=Lo(t,f,d),T=tN(t,f),B=_r(t.balance,c.decimals),L=Aa(B);return P.createElement(rN,{networkLogoUrl:c.logoURI,logoUrl:c.logoURI,tokenName:c.name,balance:L,balanceFiat:x,priceChangePercentage:T,symbol:c.symbol})}const y=Lo(t,f,d),g=tN(t,f),b=(e=(r=t.contractInfo)==null?void 0:r.decimals)!=null?e:18,p=_r(t.balance,b),w=Aa(p),E=((n=t.contractInfo)==null?void 0:n.name)||"Unknown",k=((s=t.contractInfo)==null?void 0:s.name)||"TOKEN",$=(i=t.contractInfo)==null?void 0:i.logoURI;return P.createElement(rN,{networkLogoUrl:c.logoURI,logoUrl:$,tokenName:E,balance:w,balanceFiat:y,priceChangePercentage:g,symbol:k})},X_=({imageUrl:t})=>P.createElement(To,{padding:"0",aspectRatio:"1/1",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"md",background:"backgroundSecondary"},P.createElement(fr,{style:{height:"100%"},src:t})),yUe=({balance:t})=>{var e;return P.createElement(X_,{imageUrl:t==null||(e=t.tokenMetadata)==null?void 0:e.image})};Xf("packages/wallet/src/shared/Skeleton/styles.css.ts","kit");const mUe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),pUe=Fs({height:"76px",backgroundColor:"#909090",animation:`${mUe} 2s ease-in-out infinite`},"skeleton");Zf();const wt=({width:t="100%",height:e="100%",borderRadius:r="md",aspectRatio:n})=>P.createElement(W,{className:pUe,borderRadius:r,aspectRatio:n,style:{width:t,height:e}}),gUe=()=>P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},Array(12).fill(null).map((t,e)=>P.createElement(W,{key:e},P.createElement(wt,{height:"100%",width:"100%",aspectRatio:"1/1"}))));Xf("packages/wallet/src/shared/styles.css.ts","kit");const _o=Fs({":hover":{cursor:"pointer",opacity:"0.8",userSelect:"none"}},"clickable"),Z_=Fs({"> div":{overflowY:"scroll"}},"scrollbar");Ki(`html:not(.is-apple) ${Z_} > div::-webkit-scrollbar-thumb`,{background:"none",backgroundClip:"content-box",transition:"background 0.5s linear"});Ki(`html:not(.is-apple) ${Z_} > div:hover::-webkit-scrollbar-thumb`,{background:ge.colors.text50,backgroundClip:"content-box"});const eP=Fs({},"walletContent");Ki(`${eP} + button`,{backgroundColor:"transparent"});Ki(`${eP} + button > svg`,{width:"20px",height:"20px"});Zf();const bUe=()=>{const{address:t}=Tn(),{setNavigation:e}=Qi(),{displayedAssets:r}=tOe(),{hideUnlistedTokens:n,hideCollectibles:s,selectedNetworks:i}=Yn(),{data:o=[],isLoading:a}=iUe({accountAddress:t||"",chainIds:i,displayAssets:r},{hideUnlistedTokens:n,hideCollectibles:s});if(a)return P.createElement(gUe,null);const{nativeTokens:l,erc20Tokens:c,collectibles:f}=pX(o),u=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 P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]}},l.map(d=>P.createElement(W,{key:d.contractAddress,className:_o,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),c.map(d=>P.createElement(W,{className:_o,key:d.contractAddress,aspectRatio:"1/1",onClick:()=>u(d)},P.createElement(nN,{balance:d}))),f.map(d=>P.createElement(W,{className:_o,aspectRatio:"1/1",key:`${d.contractAddress}-${d.tokenID}}`,onClick:()=>u(d)},P.createElement(yUe,{balance:d}))))},wUe=()=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",gap:"4",flexDirection:"column",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(bUe,null)),xUe=()=>{const{address:t}=Tn(),{chain:e,chains:r=[]}=dn(),[n,s]=m.useState(!1),i=Mr((e==null?void 0:e.id)||1,r);m.useEffect(()=>{n&&setTimeout(()=>{s(!1)},4e3)},[n]);const o=()=>{s(!0)},a=()=>{window.open(`https://twitter.com/intent/tweet?text=Here%20is%20my%20address%20${t}`)};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4"},P.createElement(W,{marginTop:"1",width:"fit",background:"white",borderRadius:"md",alignItems:"center",justifyContent:"center",padding:"4"},P.createElement(ILe,{value:t||"",size:200,bgColor:"white",fgColor:"black","data-id":"receiveQR"})),P.createElement(W,null,P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(re,{variant:"medium",color:"text100",textAlign:"center",lineHeight:"inherit",style:{fontWeight:"700"}},"My Wallet"),P.createElement(fr,{width:"5",src:i.logoURI,alt:"icon"})),P.createElement(W,{marginTop:"2",style:{maxWidth:"180px",textAlign:"center"}},P.createElement(re,{textAlign:"center",color:"text50",style:{fontSize:"14px",maxWidth:"180px",overflowWrap:"anywhere"}},t))),P.createElement(W,{gap:"3"},P.createElement(hJ.CopyToClipboard,{text:t||""},P.createElement(nt,{onClick:o,leftIcon:Y2,label:n?"Copied!":"Copy"})),P.createElement(nt,{onClick:a,leftIcon:Xoe,label:"Share"})),P.createElement(W,{justifyContent:"center",alignItems:"center",style:{maxWidth:"260px",textAlign:"center"}},P.createElement(re,{variant:"small",style:{maxWidth:"260px",overflowWrap:"anywhere"}},`This is a ${i.name} address. Please only send assets on the ${i.name} network.`))))},kX=({imageUrl:t,name:e,decimals:r,balance:n,symbol:s,fiatValue:i,chainId:o,showSquareImage:a})=>{const{chains:l=[]}=dn(),{fiatCurrency:c}=Yn(),f=_r(n,r),u=Aa(f),d=Mr(o,l);return P.createElement(W,{alignItems:"flex-end",justifyContent:"space-between"},P.createElement(W,{justifyContent:"space-between",alignItems:"center",gap:"2"},a?P.createElement(W,{style:{width:"40px"}},P.createElement(X_,{imageUrl:t})):P.createElement(Mf,{imageUrl:t,size:40}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",alignItems:"center",gap:"1"},P.createElement(re,{variant:"medium"},e),P.createElement(Mf,{imageUrl:d.logoURI,size:12})),P.createElement(re,{color:"text50",variant:"normal"}," ",`${u} ${s} available`))),P.createElement(W,{flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end"},i&&P.createElement(re,{variant:"normal"},`${c.sign}${i}`)))},CUe=({chainId:t,contractAddress:e})=>{var r,n,s,i,o;const{chains:a=[]}=dn(),l=g4(),{address:c="",connector:f}=Tn(),u=!!(f!=null&&(r=f._wallet)!=null&&r.isSequenceBased),d=l===t,h=!d&&!u,{switchNetwork:v}=nV(),y=m.useRef(null),{setOpenWalletModal:g}=V0(),{fiatCurrency:b}=Yn(),[p,w]=m.useState("0"),[E,k]=m.useState(""),{data:$}=p4(),{data:x=[],isLoading:T}=J_({accountAddress:c,chainIds:[t],contractAddress:e},{hideUnlistedTokens:!1}),B=Mr(t,a),L=x.find(K=>K.contractAddress===e),{data:U=[],isLoading:V}=su({tokens:[{chainId:t,contractAddress:e}]}),{data:N=1,isLoading:C}=yc({toCurrency:b.symbol});if(T||V||C)return null;const R=cr(e,Ar),M=R?B.decimals:(L==null||(n=L.contractInfo)==null?void 0:n.decimals)||18,_=R?B.name:(L==null||(s=L.contractInfo)==null?void 0:s.name)||"",I=R?B.logoURI:L==null||(i=L.contractInfo)==null?void 0:i.logoURI,F=R?B.symbol:(L==null||(o=L.contractInfo)==null?void 0:o.symbol)||"",D=p===""?"0":p,A=Gd(D,M),j=Lo(En({},L,{balance:A.toString()}),U,N),G=A.gt((L==null?void 0:L.balance)||"0"),O=A.gt(0),q=K=>{const{value:Q}=K.target,ae=mX(Q,M);w(ae)},z=()=>{var K;(K=y.current)==null||K.focus();const Q=_r((L==null?void 0:L.balance)||0,M).toString();w(Q)},H=async()=>{const K=await navigator.clipboard.readText();k(K)},J=()=>{k("")},X=async K=>{!d&&u&&v&&v(t),K.preventDefault();const Q=Gd(D,M);R?$==null||$.sendTransaction({to:E,value:BigInt(Q.toString())}).catch(ae=>console.error("User rejected transaction",ae)):$==null||$.sendTransaction({to:L==null?void 0:L.contractAddress,data:new en(uUe).encodeFunctionData("transfer",[E,Q.toHexString()])}).catch(ae=>console.error("User rejected transaction",ae)),g(!1)};return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Bs},gap:"2",flexDirection:"column",as:"form",onSubmit:X},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:I,decimals:M,name:_,symbol:F,balance:(L==null?void 0:L.balance)||"0",fiatValue:Lo(L,U,N),chainId:t}),P.createElement(iU,{ref:y,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:q,controls:P.createElement(P.Fragment,null,P.createElement(re,{variant:"small",color:"text50",whiteSpace:"nowrap"},`~${b.sign}${j}`),P.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:z,"data-id":"maxCoin",flexShrink:"0"}),P.createElement(re,{fontSize:"xlarge",fontWeight:"bold"},F))}),G&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Funds")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),m2(E)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:_o,onClick:J,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(u0,{address:E,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${Q_(E.substring(2),8)}`)),P.createElement(Bf,{size:"xs"})):P.createElement(ac,{value:E,onChange:K=>k(K.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:H,"data-id":"to-address",flexShrink:"0",leftIcon:Y2})})),h&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>v&&v(t),disabled:d,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(nt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!O||!m2(E)||G||!d&&!u,label:"Send",rightIcon:Di,style:{height:"52px",borderRadius:ge.radii.md}}))},EUe=({chainId:t,contractAddress:e,tokenId:r})=>{var n,s,i,o,a;const{chains:l=[]}=dn(),c=g4(),{address:f="",connector:u}=Tn(),d=!!(u!=null&&(n=u._wallet)!=null&&n.isSequenceBased),h=c===t,v=!h&&!d,{switchNetwork:y}=nV(),g=m.useRef(null),{setOpenWalletModal:b}=V0(),[p,w]=m.useState("0"),[E,k]=m.useState(""),{data:$}=p4(),{data:x,isLoading:T}=xX({accountAddress:f,chainId:t,collectionAddress:e,tokenId:r}),B=Mr(t,l);if(T)return null;const U=(x==null||(s=x.tokenMetadata)==null?void 0:s.decimals)||0,V=(x==null||(i=x.tokenMetadata)==null?void 0:i.name)||"Unknown",N=(x==null||(o=x.tokenMetadata)==null?void 0:o.image)||(x==null||(a=x.contractInfo)==null?void 0:a.logoURI)||"",C=p===""?"0":p,S=Gd(C,U),R=S.gt((x==null?void 0:x.balance)||"0"),M=S.gt(0),_=H=>{const{value:J}=H.target,X=mX(J,U);w(X)},I=()=>{var H;(H=g.current)==null||H.focus();const J=Number(p)-1,X=Math.max(J,0).toString();w(X)},F=()=>{var H;(H=g.current)==null||H.focus();const J=Number(p)+1,X=Number(_r((x==null?void 0:x.balance)||0,U)),K=Math.min(J,X).toString();w(K)},D=()=>{var H;(H=g.current)==null||H.focus();const J=_r((x==null?void 0:x.balance)||0,U).toString();w(J)},A=async()=>{const H=await navigator.clipboard.readText();k(H)},j=()=>{k("")},G=async H=>{H.preventDefault(),!h&&d&&y&&y(t);const J=Gd(C,U),{contractType:X}=x;switch(X){case"ERC721":$==null||$.sendTransaction({to:x.contractAddress,data:new en(dUe).encodeFunctionData("safeTransferFrom",[f,E,r])}).catch(K=>console.error("User rejected transaction",K));break;case"ERC1155":default:$==null||$.sendTransaction({to:x.contractAddress,data:new en(fUe).encodeFunctionData("safeBatchTransferFrom",[f,E,[r],[J.toHexString()],[]])}).catch(K=>console.error("User rejected transaction",K))}b(!1)},O=_r((x==null?void 0:x.balance)||0,U).toString(),q=Number(p)===0,z=Number(p)>=Number(O);return P.createElement(W,{padding:"5",paddingTop:"3",style:{marginTop:Bs},gap:"2",flexDirection:"column",as:"form",onSubmit:G},P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(kX,{imageUrl:N,showSquareImage:!0,decimals:U,name:V,symbol:"",balance:(x==null?void 0:x.balance)||"0",chainId:t}),P.createElement(iU,{ref:g,style:{fontSize:ge.fontSizes.xlarge,fontWeight:ge.fontWeights.bold},name:"amount",value:p,onChange:_,controls:P.createElement(W,{gap:"2"},P.createElement(nt,{disabled:q,size:"xs",onClick:I,leftIcon:tae}),P.createElement(nt,{disabled:z,size:"xs",onClick:F,leftIcon:$oe}),P.createElement(nt,{size:"xs",shape:"square",label:"Max",onClick:D,"data-id":"maxCoin",flexShrink:"0"}))}),R&&P.createElement(re,{as:"div",variant:"normal",color:"negative",marginTop:"2"},"Insufficient Balance")),P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",flexDirection:"column"},P.createElement(re,{fontSize:"normal",color:"text50"},"To"),m2(E)?P.createElement(W,{borderRadius:"md",background:"backgroundSecondary",width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:"4",className:_o,onClick:j,style:{height:"52px"}},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"2"},P.createElement(u0,{address:E,style:{width:"20px"}}),P.createElement(re,{color:"text100"},`0x${Q_(E.substring(2),8)}`)),P.createElement(Bf,{size:"xs"})):P.createElement(ac,{value:E,onChange:H=>k(H.target.value),placeholder:`${B.name} Address (0x...)`,name:"to-address","data-1p-ignore":!0,controls:P.createElement(nt,{size:"xs",shape:"square",label:"Paste",onClick:A,"data-id":"to-address",flexShrink:"0",leftIcon:Y2})})),v&&P.createElement(W,{marginTop:"3"},P.createElement(re,{color:"negative"},"The wallet is connected to the wrong network. Please switch network before proceeding"),P.createElement(nt,{marginTop:"2",width:"full",variant:"primary",type:"button",label:"Switch Network",onClick:()=>y&&y(t),disabled:h,style:{height:"52px",borderRadius:ge.radii.md}})),P.createElement(nt,{marginTop:"3",width:"full",variant:"primary",type:"submit",disabled:!M||!m2(E)||R||!h&&!d,label:"Send",rightIcon:Di,style:{height:"52px",borderRadius:ge.radii.md}}))},SUe=({transaction:t})=>{var e;const{chains:r=[]}=dn(),{fiatCurrency:n}=Yn(),{setNavigation:s}=Qi(),i=()=>{s({location:"transaction-details",params:{transaction:t}})};let o=[];(e=t.transfers)==null||e.forEach(p=>{const w=p.contractAddress;o.includes(w)||o.push(w)});const{data:a=[],isLoading:l}=su({tokens:o.map(p=>({contractAddress:p,chainId:t.chainId}))}),{data:c=1,isLoading:f}=yc({toCurrency:n.symbol}),u=l||f,{transfers:d}=t,h=Mr(t.chainId,r),v=p=>{switch(p){case Ei.SEND:return P.createElement(X6,{style:{transform:"rotate(270deg)",width:"16px"}});case Ei.RECEIVE:return P.createElement(X6,{style:{transform:"rotate(90deg)",width:"16px"}});case Ei.UNKNOWN:default:return P.createElement(iB,{style:{width:"14px"}})}},y=p=>{switch(p){case Ei.SEND:return"Sent";case Ei.RECEIVE:return"Received";case Ei.UNKNOWN:default:return"Transacted"}},g=(p,w,E)=>{let k="";E===Ei.SEND?k="-":E===Ei.RECEIVE&&(k="+");let $="text50";return E===Ei.SEND?$=ge.colors.negative:E===Ei.RECEIVE&&($=ge.colors.positive),P.createElement(re,{fontWeight:"bold",fontSize:"normal",style:{color:$}},`${k}${p} ${w}`)},b=({transfer:p,isFirstItem:w})=>{const{amounts:E}=p,k=kJ(t.timestamp).format("MMM DD, YYYY");return P.createElement(W,{gap:"2",width:"full",flexDirection:"column",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{color:"text50",gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},v(p.transferType),P.createElement(re,{fontWeight:"medium",fontSize:"normal"},y(p.transferType)),P.createElement(fr,{src:h.logoURI,width:"3"})),w&&P.createElement(W,null,P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},k))),E.map(($,x)=>{var T,B,L,U,V,N,C;const S=Mr(t.chainId,r),R=cr(p.contractAddress,Ar),M=((T=p.contractInfo)==null?void 0:T.type)==="ERC721"||((B=p.contractInfo)==null?void 0:B.type)==="ERC1155";let _;const I=(L=p.tokenIds)==null?void 0:L[x];if(M&&I){var F,D;_=((F=p.tokenMetadata)==null||(D=F[I])==null?void 0:D.decimals)||0}else{var A;_=R?S.decimals:(A=p.contractInfo)==null?void 0:A.decimals}const j=_r($,_),G=R?S.symbol:((U=p.contractInfo)==null?void 0:U.symbol)||"",O=R?S.logoURI:(V=p.contractInfo)==null?void 0:V.logoURI,q=(N=a.find(z=>cr(z.token.contractAddress,p.contractAddress)))==null||(C=N.price)==null?void 0:C.value;return P.createElement(W,{key:x,flexDirection:"row",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},O&&P.createElement(fr,{src:O,width:"5",alt:"token logo"}),g(Aa(j),G,p.transferType)),u&&P.createElement(wt,{width:"35px",height:"20px"}),q&&P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${n.sign}${(Number(j)*q*c).toFixed(2)}`))}))};return P.createElement(W,{background:"backgroundSecondary",borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",className:_o,onClick:()=>i()},d==null?void 0:d.map((p,w)=>P.createElement(W,{key:`${t.txnHash}-${w}`,width:"full"},b({transfer:p,isFirstItem:w===0}))))},tP=()=>{const t=()=>P.createElement(W,{flexDirection:"column",gap:"2",width:"full",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"65px",height:"20px"}),P.createElement(wt,{width:"75px",height:"17px"})),P.createElement(W,{flexDirection:"row",justifyContent:"space-between"},P.createElement(wt,{width:"120px",height:"20px"}),P.createElement(wt,{width:"35px",height:"17px"})));return P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(wt,{width:"70px",height:"17px"}),P.createElement(W,{flexDirection:"column",gap:"2"},Array(8).fill(null).map((e,r)=>P.createElement(W,{borderRadius:"md",padding:"4",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column",background:"backgroundSecondary",key:r},t()))))},rP=({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"}],s=m.useMemo(()=>{const a=new Date(new Date().setHours(0,0,0,0)).getTime(),l=new Date(new Date().setDate(new Date(a).getDate()-1)).getTime(),c=new Date(new Date().setDate(new Date().getDate()-7)).getTime(),f=new Date(new Date().setDate(new Date().getDate()-30)).getTime(),u=new Date(new Date().setDate(new Date().getDate()-365)).getTime(),d={today:[],yesterday:[],week:[],month:[],year:[],years:[]};return t.forEach(h=>{const v=new Date(h.timestamp).getTime();v>a?d.today.push(h):v>l?d.yesterday.push(h):v>c?d.week.push(h):v>f?d.month.push(h):v>u?d.year.push(h):d.years.push(h)}),d},[t]);if(e)return P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(tP,null));const i=({label:a})=>P.createElement(W,null,P.createElement(re,{color:"text50",fontWeight:"medium",fontSize:"normal"},a)),o=({transactions:a})=>P.createElement(W,{flexDirection:"column",gap:"2"},a.map((l,c)=>P.createElement(W,{key:`${l.txnHash}-${c}`,flexDirection:"column",gap:"2"},P.createElement(SUe,{transaction:l}))));return P.createElement(W,{flexDirection:"column",gap:"5"},n.map(a=>{const l=s[a.id];return l.length===0?null:P.createElement(W,{key:a.id,flexDirection:"column",gap:"3"},P.createElement(i,{label:a.label}),P.createElement(o,{transactions:l}))}),t.length===0&&P.createElement(W,{flexDirection:"column",gap:"3"},P.createElement(i,{label:"History"}),P.createElement(re,null,"No Recent Transaction History Found")),r&&P.createElement(W,{margin:"4",alignItems:"center",justifyContent:"center"},P.createElement(I$,null)))},kUe=()=>{const{selectedNetworks:t}=Yn(),{address:e}=Tn(),{data:r=[],isLoading:n}=aUe({accountAddress:e||"",chainIds:t});return P.createElement(W,null,P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(rP,{transactions:r,isLoading:n,isFetchingNextPage:!1})))},b2=({balance:t})=>{var e,r;const{chains:n=[]}=dn(),{setNavigation:s}=Qi(),i=cr(t.contractAddress,Ar),o=Mr(t.chainId,n),a=i?o.logoURI:t==null||(e=t.contractInfo)==null?void 0:e.logoURI,l=i?o.name:(t==null||(r=t.contractInfo)==null?void 0:r.name)||"Unknown",c=()=>{var u,d;if(t.contractType==="ERC721"||t.contractType==="ERC1155")return t.balance;const h=i?o.decimals:t==null||(u=t.contractInfo)==null?void 0:u.decimals,v=_r(t.balance,h||0),y=Aa(v),g=i?o.symbol:t==null||(d=t.contractInfo)==null?void 0:d.symbol;return`${y} ${g}`},f=()=>{const u=t.contractType==="ERC721"||t.contractType==="ERC1155";s(u?{location:"collection-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}}:{location:"coin-details",params:{contractAddress:t.contractAddress,chainId:t.chainId}})};return P.createElement(W,{key:t.contractAddress,onClick:f,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:_o},P.createElement(W,{gap:"3",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(Mf,{imageUrl:a,size:30}),P.createElement(W,{gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"normal",style:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"250px",textWrap:"nowrap"}},l),P.createElement(fr,{src:o.logoURI,alt:"network logo",style:{width:"12px",height:"12px"}}))),P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"1"},P.createElement(re,{color:"text50",fontWeight:"bold",fontSize:"normal"},c()),P.createElement(Di,{color:"text50"})))},sN=({toLocation:t,label:e})=>{const{setNavigation:r}=Qi(),n=()=>{r(t)};return P.createElement(W,{onClick:n,width:"full",flexDirection:"row",justifyContent:"space-between",alignItems:"center",className:_o},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},e),P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"View all"),P.createElement(Di,{color:"text50",size:"sm"})))},$Ue=()=>{const{chains:t=[]}=dn(),{fiatCurrency:e,hideUnlistedTokens:r,selectedNetworks:n}=Yn(),[s,i]=m.useState(""),{address:o}=Tn(),{data:a,isLoading:l}=J_({accountAddress:o||"",chainIds:n},{hideUnlistedTokens:r}),c=(a==null?void 0:a.filter(L=>L.contractType==="ERC20"||cr(L.contractAddress,Ar)))||[],{data:f=[],isLoading:u}=su({tokens:c.map(L=>({chainId:L.chainId,contractAddress:L.contractAddress}))}),{data:d=1,isLoading:h}=yc({toCurrency:e.symbol}),v=c.sort((L,U)=>Number(Lo(U,f,d))-Number(Lo(L,f,d))),g=((a==null?void 0:a.filter(L=>L.contractType==="ERC721"||L.contractType==="ERC1155"))||[]).sort((L,U)=>Number(U.balance)-Number(L.balance)),b=l||u||h,p=g.map((L,U)=>{var V;return{index:U,name:((V=L.contractInfo)==null?void 0:V.name)||"Unknown"}}),w=v.map((L,U)=>{if(cr(L.contractAddress,Ar)){const N=Mr(L.chainId,t);return{index:U,name:N.name}}else{var V;return{index:U,name:((V=L.contractInfo)==null?void 0:V.name)||"Unknown"}}}),E=v.length,k=g.length,$=new Ea(w,{keys:["name"]}),x=new Ea(p,{keys:["name"]}),T=(s===""?w:$.search(s).map(L=>L.item)).slice(0,5),B=(s===""?p:x.search(s).map(L=>L.item)).slice(0,5);return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"10",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{width:"full"},P.createElement(ac,{autoFocus:!0,name:"search wallet",leftIcon:J2,value:s,onChange:L=>i(L.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"collections"}},label:`Collections (${k})`}),b?Array(5).fill(null).map((L,U)=>P.createElement(wt,{key:U,width:"100%",height:"32px"})):B.length===0?P.createElement(re,null,"No collections found"):B.map(L=>{const U=g[L.index];return P.createElement(b2,{key:U.contractAddress,balance:U})})),P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5"},P.createElement(sN,{toLocation:{location:"search-view-all",params:{defaultTab:"coins"}},label:`Coins (${E})`}),b?Array(5).fill(null).map((L,U)=>P.createElement(wt,{key:U,width:"100%",height:"32px"})):T.length===0?P.createElement(re,null,"No coins found"):T.map(L=>{const U=v[L.index];return P.createElement(b2,{key:U.contractAddress,balance:U})})))},AUe=({defaultTab:t})=>{const{chains:e=[]}=dn(),{fiatCurrency:r,hideUnlistedTokens:n,selectedNetworks:s}=Yn(),[i,o]=m.useState(""),[a,l]=m.useState(t);m.useEffect(()=>{o("")},[a]);const{address:c}=Tn(),{data:f,isLoading:u}=J_({accountAddress:c||"",chainIds:s},{hideUnlistedTokens:n}),d=(f==null?void 0:f.filter(S=>S.contractType==="ERC20"||cr(S.contractAddress,Ar)))||[],{data:h=[],isLoading:v}=su({tokens:d.map(S=>({chainId:S.chainId,contractAddress:S.contractAddress}))}),{data:y=1,isLoading:g}=yc({toCurrency:r.symbol}),b=d.sort((S,R)=>Number(Lo(R,h,y))-Number(Lo(S,h,y))),w=((f==null?void 0:f.filter(S=>S.contractType==="ERC721"||S.contractType==="ERC1155"))||[]).sort((S,R)=>Number(R.balance)-Number(S.balance)),E=b.length,k=w.length,$=u||v||g,x=w.map((S,R)=>{var M;return{index:R,name:((M=S.contractInfo)==null?void 0:M.name)||"Unknown"}}),T=b.map((S,R)=>{if(cr(S.contractAddress,Ar)){const _=Mr(S.chainId,e);return{index:R,name:_.name}}else{var M;return{index:R,name:((M=S.contractInfo)==null?void 0:M.name)||"Unknown"}}}),B=new Ea(T,{keys:["name"]}),L=new Ea(x,{keys:["name"]}),U=i===""?T:B.search(i).map(S=>S.item),V=i===""?x:L.search(i).map(S=>S.item),N=()=>P.createElement(wt,{width:"360px",height:"48px"}),C=()=>P.createElement(P.Fragment,null,Array(8).fill(null).map((S,R)=>P.createElement(wt,{key:R,width:"full",height:"32px"})));return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",flexDirection:"column",gap:"5",alignItems:"center",justifyContent:"center",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{width:"full"},P.createElement(ac,{autoFocus:!0,name:"search wallet",leftIcon:J2,value:i,onChange:S=>o(S.target.value),placeholder:"Search your wallet","data-1p-ignore":!0})),P.createElement(W,{width:"full"},P.createElement(que,{value:a,onValueChange:S=>l(S)},P.createElement(W,{marginBottom:"5"},!$&&P.createElement(Vue,{value:a,tabs:[{label:`Collections (${k})`,value:"collections"},{label:`Coins (${E})`,value:"coins"}]}),$&&P.createElement(N,null)),P.createElement(s9,{value:"collections"},P.createElement(W,{flexDirection:"column",gap:"3"},$&&P.createElement(C,null),!$&&V.length===0&&P.createElement(re,null,"No Collectibles Found"),!$&&V.length>0&&V.map(S=>{const R=w[S.index];return P.createElement(b2,{key:R.contractAddress,balance:R})}))),P.createElement(s9,{value:"coins"},P.createElement(W,{flexDirection:"column",gap:"3"},$&&P.createElement(C,null),!$&&b.length==0&&P.createElement(re,null,"No Coins Found"),!$&&U.length>0&&U.map(S=>{const R=b[S.index];return P.createElement(b2,{key:R.contractAddress,balance:R})}))))))},_Ue=()=>{const{setNavigation:t}=Qi(),e=()=>{t({location:"settings-general"})},r=()=>{t({location:"settings-currency"})},n=()=>{t({location:"settings-networks"})};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(W,{flexDirection:"column",gap:"2"},P.createElement(nt,{onClick:e,leftIcon:nB,rightIcon:Di,width:"full",label:"General",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(nt,{onClick:r,leftIcon:Doe,rightIcon:Di,width:"full",label:"Currency",style:{height:"52px",borderRadius:ge.radii.md}}),P.createElement(nt,{onClick:n,leftIcon:Voe,rightIcon:Di,width:"full",label:"Networks",style:{height:"52px",borderRadius:ge.radii.md}}))))},PUe=()=>{Na();const{hideUnlistedTokens:t,setHideUnlistedTokens:e,hideCollectibles:r,setHideCollectibles:n}=Yn(),s=()=>{e(!t)},i=()=>{n(!r)};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{gap:"2",padding:"5",paddingTop:"3",flexDirection:"column"},P.createElement(To,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide unlisted tokens"),P.createElement(n9,{checked:t,onCheckedChange:s})),P.createElement(To,{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"bold"},"Hide collectibles"),P.createElement(n9,{checked:r,onCheckedChange:i}))))},TUe=t=>{const{selected:e,className:r,squareIndicator:n=!1}=t;return P.createElement(W,{borderStyle:"solid",borderColor:n&&e?"transparent":"borderNormal",borderWidth:"thin",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:"0",className:r,style:{borderRadius:n?"4px":ge.radii.circle,width:"20px",height:"20px"}},P.createElement(W,{as:Zv.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":ge.radii.circle,width:n?"20px":"14px",height:n?"20px":"14px"},justifyContent:"center",alignItems:"center"},n&&P.createElement(mh,{color:"white",style:{width:"14px",height:"14px"}})))},RUe=["value","selected","children","disabled","onClick","className","hideIndicator","squareIndicator"],$X=t=>{const{value:e,selected:r,children:n,disabled:s,onClick:i,className:o,hideIndicator:a,squareIndicator:l=!1}=t,c=Hx(t,RUe);return P.createElement(To,En({as:"button",clickable:!0,className:wje(o),disabled:s,onClick:()=>i(e),userSelect:"none",alignItems:"center",justifyContent:"space-between",textAlign:"left",width:"full",style:{appearance:"none"}},c),n,!a&&P.createElement(TUe,{selected:r,squareIndicator:l}))},IUe=()=>{const{fiatCurrency:t,setFiatCurrency:e}=Yn();return P.createElement(W,{paddingBottom:"5",paddingLeft:"5",paddingTop:"3",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{flexDirection:"column",gap:"2"},SX.map(r=>P.createElement($X,{key:r.symbol,value:r.symbol,selected:r.symbol===t.symbol,onClick:()=>e&&e(r)},P.createElement(W,{gap:"2",justifyContent:"flex-start",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold"},r.symbol),P.createElement(re,{color:"text50"},r.name.message))))))},OUe=()=>{const{selectedNetworks:t,setSelectedNetworks:e}=Yn(),{chains:r=[]}=dn(),n=s=>{if(t.includes(s)){if(t.length===1)return;e(t.filter(i=>i!==s))}else e([...t,s])};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{padding:"5",paddingTop:"3"},P.createElement(re,{variant:"small",color:"text50"},"Networks"),P.createElement(W,{flexDirection:"column",gap:"2"},r.map(s=>{const i=Mr(s.id,r);return P.createElement($X,{disabled:t.length===1&&t.includes(s.id),key:s.id,selected:t.includes(s.id),onClick:()=>n(s.id),value:s.id,squareIndicator:!0},P.createElement(W,{gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{width:"3",height:"3",src:i.logoURI,alt:"network"}),P.createElement(re,{color:"text100",variant:"small"},i.name)))}))))},q0=({chainId:t})=>{const{chains:e=[]}=dn(),{network:r}=ja(t),n=Mr(t,e),s=zIe(t),i=VIe(t);return P.createElement(W,{height:"6",paddingY:"1",paddingLeft:"1.5",paddingRight:"2",gap:"1",style:{background:i},borderRadius:"xs",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"min"},P.createElement(fr,{style:{width:"14px"},src:n.logoURI}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",style:{color:s}},KBe(r.name)))},MUe=({chainId:t})=>P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{height:"24px",width:"70px"}),P.createElement(q0,{chainId:t})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"150px",height:"36px"}),P.createElement(wt,{width:"33px",height:"17px"}))),P.createElement(nt,{marginTop:"4",marginBottom:"10",width:"full",variant:"primary",leftIcon:X2,label:"Send",disabled:!0,onClick:()=>{}}),P.createElement(W,null,P.createElement(tP,null)))),DUe=(t,e)=>{var r;const[n,s]=m.useState(null),i=m.useMemo(()=>new IntersectionObserver(([o])=>s(o),e),[]);return m.useEffect(()=>(t.current&&i.observe(t.current),()=>{t.current&&i.disconnect()}),[t.current,i]),(r=n==null?void 0:n.isIntersecting)!=null?r:!1},AX=t=>{const{onLoad:e,hasMore:r=!0,children:n}=t,[s,i]=m.useState(0),[o,a]=m.useState(!1),l=m.useRef(null),c=DUe(l);m.useEffect(()=>{c&&r&&!o&&f()},[c]);const f=async()=>{a(!0),await e(s),i(u=>u+1),a(!1)};return P.createElement(P.Fragment,null,n,P.createElement("div",{ref:l}))},NUe=({contractAddress:t,chainId:e})=>{var r,n,s,i;const{chains:o=[]}=dn(),{setNavigation:a}=Qi(),{fiatCurrency:l,hideUnlistedTokens:c}=Yn(),{address:f}=Tn(),{data:u,isLoading:d,fetchNextPage:h,hasNextPage:v,isFetchingNextPage:y}=EX({chainId:e,accountAddress:f||"",contractAddress:t}),g=gX(u),{data:b,isLoading:p}=oUe({accountAddress:f||"",contractAddress:t,chainId:e},{hideUnlistedTokens:c}),{data:w,isLoading:E}=su({tokens:[{chainId:e,contractAddress:t}]}),{data:k=1,isLoading:$}=yc({toCurrency:l.symbol});if(p||E||$)return P.createElement(MUe,{chainId:e});const T=cr(t,Ar),B=T?Mr(e,o).logoURI:b==null||(r=b.contractInfo)==null?void 0:r.logoURI,L=T?Mr(e,o).symbol:b==null||(n=b.contractInfo)==null?void 0:n.symbol,U=T?Mr(e,o).name:b==null||(s=b.contractInfo)==null?void 0:s.name,V=T?Mr(e,o).decimals:b==null||(i=b.contractInfo)==null?void 0:i.decimals,N=_r((b==null?void 0:b.balance)||"0",V),C=Aa(N),S=b?Lo(b,w||[],k):"0",R=()=>{a({location:"send-coin",params:{chainId:e,contractAddress:t}})};return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{marginBottom:"10",gap:"2",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(fr,{width:"8",src:B,alt:"logo"}),P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},U),P.createElement(q0,{chainId:e})),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},`${C} ${L}`),P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${l.sign}${S}`))),P.createElement(nt,{width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:R}),P.createElement(W,null,P.createElement(AX,{onLoad:()=>h(),hasMore:v},P.createElement(rP,{transactions:g,isLoading:d,isFetchingNextPage:y})))))},LUe=({chainId:t})=>P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(wt,{width:"32px",height:"32px"}),P.createElement(wt,{width:"100px",height:"24px"}),P.createElement(q0,{chainId:t}),P.createElement(wt,{width:"142px",height:"17px"})),P.createElement(W,{width:"full"},P.createElement(wt,{width:"168px",height:"20px"}),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},Array(8).fill(null).map((e,r)=>P.createElement(wt,{width:"full",aspectRatio:"1/1"}))))),jUe=({chainId:t,contractAddress:e})=>{var r;const{setNavigation:n}=Qi(),{address:s}=Tn(),{data:i,isLoading:o}=sUe({chainId:t,accountAddress:s||"",collectionAddress:e}),a=i==null||(r=i[0])==null?void 0:r.contractInfo,l=a==null?void 0:a.logoURI;if(o)return P.createElement(LUe,{chainId:t});const c=f=>{n&&n({location:"collectible-details",params:{contractAddress:f.contractAddress,chainId:f.chainId,tokenId:f.tokenID}})};return P.createElement(W,{paddingLeft:"5",paddingBottom:"5",paddingTop:"3",marginTop:"8",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",style:{paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(Mf,{imageUrl:l,size:32}),P.createElement(re,{fontWeight:"bold",fontSize:"large",color:"text100"},(a==null?void 0:a.name)||"Unknown"),P.createElement(q0,{chainId:t}),P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`${(i==null?void 0:i.length)||0} Unique Collectibles`)),P.createElement(W,{width:"full"},P.createElement(re,{fontWeight:"medium",fontSize:"normal",color:"text50"},`Owned (${(i==null?void 0:i.length)||0})`),P.createElement(W,{style:{display:"grid",gridTemplateColumns:`calc(50% - ${ge.space[1]}) calc(50% - ${ge.space[1]})`,gap:ge.space[2]},width:"full",marginTop:"3"},i==null?void 0:i.map(f=>{var u,d,h;const v=f.balance,y=(f==null||(u=f.tokenMetadata)==null?void 0:u.decimals)||0,g=Aa(_r(v,y));return P.createElement(W,{key:`${f.contractAddress}-${f.tokenID}`,onClick:()=>c(f),className:_o},P.createElement(W,{background:"backgroundSecondary",aspectRatio:"1/1",width:"full",borderRadius:"md",justifyContent:"center",alignItems:"center",marginBottom:"2"},P.createElement(fr,{style:{height:"100%"},src:(d=f.tokenMetadata)==null?void 0:d.image})),P.createElement(W,null,P.createElement(re,{fontWeight:"bold",fontSize:"normal",color:"text100"},`${(h=f.tokenMetadata)==null?void 0:h.name}`)),P.createElement(W,null,P.createElement(re,{marginTop:"1",fontWeight:"medium",fontSize:"normal",color:"text50"},g," Owned")))}))))},FUe=()=>P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(wt,{width:"120px",height:"30px"}),P.createElement(wt,{width:"140px",height:"40px"})),P.createElement(W,null,P.createElement(wt,{width:"347px",height:"347px"})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(wt,{width:"44px",height:"36px"}),P.createElement(wt,{width:"34px",height:"17px"}))),P.createElement(nt,{marginTop:"4",width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:()=>{}})),P.createElement(W,null,P.createElement(re,{fontSize:"normal",color:"text50",fontWeight:"medium"},"This week"),P.createElement(tP,null)))),BUe=({contractAddress:t,chainId:e,tokenId:r})=>{var n,s,i,o,a,l;const{chains:c=[]}=dn(),{address:f}=Tn(),{fiatCurrency:u}=Yn(),{setNavigation:d}=Qi(),{data:h,isLoading:v,fetchNextPage:y,hasNextPage:g,isFetchingNextPage:b}=EX({chainId:e,accountAddress:f||"",contractAddress:t,tokenId:r}),p=gX(h),{data:w,isLoading:E}=xX({accountAddress:f||"",collectionAddress:t,chainId:e,tokenId:r}),{data:k,isLoading:$}=CX({tokens:[{chainId:e,contractAddress:t,tokenId:r}]}),{data:x=1,isLoading:T}=yc({toCurrency:u.symbol});if(E||$||T)return P.createElement(FUe,null);const L=()=>{d({location:"send-collectible",params:{chainId:e,contractAddress:t,tokenId:r}})},U=Mr(e,c),V=w==null||(n=w.contractInfo)==null?void 0:n.logoURI,N=(w==null||(s=w.contractInfo)==null?void 0:s.name)||"Unknown Collection",C=(w==null||(i=w.tokenMetadata)==null?void 0:i.decimals)||0,S=(w==null?void 0:w.balance)||"0",R=_r(S,C),M=Aa(Number(R)),_=w?Lo(w,k||[],x):"0";return P.createElement(W,{style:{paddingTop:Bs}},P.createElement(W,{flexDirection:"column",gap:"10",paddingBottom:"5",paddingLeft:"5",paddingTop:"0",style:{marginTop:"-20px",paddingRight:`calc(${ge.space[5]} - ${Yi})`}},P.createElement(W,{gap:"3",alignItems:"center",justifyContent:"center",flexDirection:"column"},P.createElement(W,{flexDirection:"row",gap:"2",justifyContent:"center",alignItems:"center"},P.createElement(fr,{borderRadius:"circle",width:"8",src:V,alt:"collection logo",style:{objectFit:"cover"}}),P.createElement(W,{gap:"1",flexDirection:"row",justifyContent:"center",alignItems:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"small"},N),P.createElement(fr,{width:"3",src:U.logoURI,alt:"collection logo"}))),P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"center"},P.createElement(re,{color:"text100",fontWeight:"bold",fontSize:"large"},(w==null||(o=w.tokenMetadata)==null?void 0:o.name)||"Unknown Collectible"),P.createElement(re,{color:"text50",fontSize:"small",fontWeight:"medium"},`#${r}`))),P.createElement(W,null,P.createElement(X_,{imageUrl:w==null||(a=w.tokenMetadata)==null?void 0:a.image})),P.createElement(W,null,P.createElement(W,null,P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},"Balance"),P.createElement(W,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-between"},P.createElement(re,{fontWeight:"bold",color:"text100",fontSize:"xlarge"},M),k&&((l=k[0].price)==null?void 0:l.value)&&P.createElement(re,{fontWeight:"medium",color:"text50",fontSize:"normal"},`${u.symbol} ${_}`))),P.createElement(nt,{marginTop:"4",width:"full",variant:"primary",leftIcon:X2,label:"Send",onClick:L})),P.createElement(W,null,P.createElement(AX,{onLoad:()=>y(),hasMore:g},P.createElement(rP,{transactions:p,isLoading:v,isFetchingNextPage:b})))))},UUe=["buttonVariant","text","size"],_X=t=>{const{buttonVariant:e="icon",text:r,size:n="xs"}=t,s=Hx(t,UUe),[i,o]=m.useState(!1);m.useEffect(()=>{i&&setTimeout(()=>{o(!1)},4e3)},[i]);const a=()=>{o(!0)},l=i?"Copied!":"Copy",c=e==="icon"?"rgba(0,0,0,0)":ge.colors.buttonGlass;return P.createElement(hJ.CopyToClipboard,{text:r,onCopy:a},P.createElement(va,En({size:n,icon:i?mh:Y2},s,{style:En({background:c},t==null?void 0:t.style),label:e==="with-label"?l:void 0})))},zUe=({transaction:t})=>{var e,r;const{chains:n=[]}=dn(),{fiatCurrency:s}=Yn(),i=[],o=[];(e=t.transfers)==null||e.forEach(p=>{var w,E;if(((w=p.contractInfo)==null?void 0:w.type)==="ERC721"||((E=p.contractInfo)==null?void 0:E.type)==="ERC1155"){var k;(k=p.tokenIds)==null||k.forEach(x=>{if(!o.find(L=>{var U;return L.chainId===t.chainId&&cr(L.contractAddress,((U=p.contractInfo)==null?void 0:U.address)||"")&&L.tokenId===x})){var B;o.push({chainId:t.chainId,contractAddress:((B=p.contractInfo)==null?void 0:B.address)||"",tokenId:x})}})}else{var $;const x=(p==null||($=p.contractInfo)==null?void 0:$.address)||Ar;i.find(B=>B.chainId===t.chainId&&cr(B.contractAddress,x))||i.push({chainId:t.chainId,contractAddress:x})}});const{data:a,isLoading:l}=su({tokens:i}),{data:c,isLoading:f}=CX({tokens:o}),{data:u=1,isLoading:d}=yc({toCurrency:s.symbol}),h=i.length>0&&l||o.length>0&&f||d,v=Mr(t.chainId,n),y=kJ(t.timestamp).format("ddd MMM DD YYYY, h:m:s a"),g=()=>{window.open(`${v.blockExplorerUrl}/tx/${t.txnHash}`,"_blank")},b=({transfer:p})=>{var w,E,k,$;const x=p.to,T=x.substring(0,10)+"..."+x.substring(p.to.length-4,p.to.length),B=cr((p==null||(w=p.contractInfo)==null?void 0:w.address)||"",Ar),L=B?v.logoURI:p==null||(E=p.contractInfo)==null?void 0:E.logoURI,U=B?v.symbol:(p==null||(k=p.contractInfo)==null?void 0:k.symbol)||"";return P.createElement(P.Fragment,null,($=p.amounts)==null?void 0:$.map((V,N)=>{var C,S,R,M,_,I,F,D;const A=p.contractType==="ERC721"||p.contractType==="ERC1155",j=((C=p.tokenIds)==null?void 0:C[N])||"0",G=(p==null||(S=p.tokenMetadata)==null||(R=S[j])==null?void 0:R.decimals)||0,O=B?v.decimals:(p==null||(M=p.contractInfo)==null?void 0:M.decimals)||0,z=_r(V,A?G:O),H=Aa(z),J=A?c==null||(_=c.find(K=>{var Q,ae;return cr(K.token.contractAddress,((Q=p.contractInfo)==null?void 0:Q.address)||"")&&K.token.tokenId===((ae=p.tokenIds)==null?void 0:ae[N])&&K.token.chainId===t.chainId}))==null||(I=_.price)==null?void 0:I.value:a==null||(F=a.find(K=>{var Q;return cr(K.token.contractAddress,((Q=p.contractInfo)==null?void 0:Q.address)||Ar)&&K.token.chainId===t.chainId}))==null||(D=F.price)==null?void 0:D.value,X=(parseFloat(z)*(u*(J||0))).toFixed(2);return P.createElement(W,{key:N,width:"full",flexDirection:"row",gap:"2",justifyContent:"space-between",alignItems:"center"},P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(Mf,{imageUrl:L,size:20}),P.createElement(W,{gap:"0.5",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"},P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},`${H} ${U}`),h?P.createElement(wt,{width:"44px",height:"12px"}):P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text50"},J?`${s.sign}${X}`:""))),P.createElement(X6,{color:"text50",style:{width:"16px"}}),P.createElement(W,{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",gap:"2",height:"12",borderRadius:"md",background:"buttonGlass",padding:"2",style:{flexBasis:"100%"}},P.createElement(u0,{address:x,style:{width:"20px"}}),P.createElement(re,{fontWeight:"bold",fontSize:"xsmall",color:"text100"},T)))}))};return P.createElement(W,{padding:"5",paddingTop:"3",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10",marginTop:"5"},P.createElement(W,{marginTop:"6",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"1"},P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Transaction details"),P.createElement(re,{marginBottom:"1",fontSize:"small",fontWeight:"medium",color:"text50"},y),P.createElement(q0,{chainId:t.chainId})),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"4",width:"full",padding:"4",background:"backgroundSecondary",borderRadius:"md"},P.createElement(W,{width:"full",gap:"1",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},P.createElement(re,{fontSize:"normal",fontWeight:"medium",color:"text50"},"Transfer"),P.createElement(fr,{width:"3",src:v.logoURI,alt:"network logo"})),(r=t.transfers)==null?void 0:r.map((p,w)=>P.createElement(W,{width:"full",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"4",key:`transfer-${w}`},P.createElement(b,{transfer:p})))),P.createElement(nt,{onClick:g,width:"full",borderRadius:"md",rightIcon:Foe,label:`View on ${v.blockExplorerName}`}),P.createElement(W,null,P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ey,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Status"),P.createElement(re,{fontSize:"normal",fontWeight:"medium"},"Complete")),P.createElement(W,{width:"full",flexDirection:"column",gap:"2",justifyContent:"center",alignItems:"flex-start"},P.createElement(ey,{width:"full",margin:"0",style:{marginBottom:"-4px"}}),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"medium"},"Transaction Hash"),P.createElement(re,{fontSize:"normal",fontWeight:"medium",style:{overflowWrap:"anywhere"}},t.txnHash),P.createElement(_X,{marginTop:"2",buttonVariant:"with-label",text:t.txnHash}))))},VUe=m.forwardRef(({onClickAccount:t},e)=>{const{address:r}=Tn();return P.createElement(W,{gap:"2",alignItems:"center"},P.createElement(W,{width:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(W,{onClick:t,gap:"2",alignItems:"center",justifyContent:"center",className:_o,position:"relative",ref:e},P.createElement(u0,{size:"sm",address:r||""}),P.createElement(re,{color:"text100",fontWeight:"medium",variant:"normal"},yX(r||"")),P.createElement(rB,null))))}),qUe=m.forwardRef(({setOpenWalletDropdown:t},e)=>{const{setNavigation:r}=Qi(),{setOpenWalletModal:n}=V0(),{address:s}=Tn(),{disconnect:i}=rV(),{theme:o}=Na(),a=()=>{t(!1),r({location:"receive"})},l=()=>{t(!1),r({location:"history"})},c=()=>{t(!1),r({location:"settings"})},f=()=>{n(!1),t(!1),i()};return P.createElement(W,{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)"}},P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"3",marginLeft:"2"},P.createElement(u0,{style:{width:"28px"},size:"md",address:s||""}),P.createElement(re,{fontSize:"large",color:"text100",style:{fontWeight:"700"}},yX(s||"")),P.createElement(_X,{buttonVariant:"icon",size:"md",text:s||"",style:{marginLeft:"-16px"}})),P.createElement(va,{onClick:()=>t(!1),size:"xs",background:"buttonGlass",icon:Bf})),P.createElement(W,{gap:"2",marginTop:"3",flexDirection:"column"},P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:Goe,label:"Receive",onClick:a}),P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:iB,label:"History",onClick:l}),P.createElement(nt,{style:{borderRadius:ge.radii.md},width:"full",leftIcon:nB,label:"Settings",onClick:c}),P.createElement(nt,{label:"Sign Out",style:{borderRadius:ge.radii.md},width:"full",leftIcon:sB,onClick:f})))});Xf("packages/wallet/src/shared/WalletHeader/styles.css.ts","kit");const WUe=Fs({":focus-visible":{boxShadow:"none"}},"searchButton");Zf();const M5=({})=>{const{openWalletModalState:t}=V0(),[e,r]=m.useState(!1),{goBack:n,history:s,setNavigation:i}=Qi(),o=m.useRef(!1);m.useEffect(()=>{t||r(!1)},[t]),m.useEffect(()=>{e?o.current?r(!1):o.current=!0:o.current=!1},[s.length,e]);const a=()=>{r(!0)},l=()=>{n()},c=()=>{i({location:"search"})};return P.createElement(W,{as:Zv.div},P.createElement(UBe,{open:e},P.createElement(zBe,null),P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"full",style:{height:Bs,paddingTop:"6px"}},s.length>0?P.createElement(va,{onClick:l,icon:Q2,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}):P.createElement(va,{onClick:c,icon:J2,className:WUe,style:{backgroundColor:ge.colors.backgroundPrimary,width:"44px"}}),P.createElement(VBe,{asChild:!0},P.createElement(VUe,{onClickAccount:a})),P.createElement(W,{style:{width:"44px"}})),P.createElement(H2,null,e&&P.createElement(qBe,null,P.createElement(WBe,{asChild:!0,side:"bottom",align:"start"},P.createElement(qUe,{setOpenWalletDropdown:r}))))))},eo=({secondaryText:t,primaryText:e})=>{const{goBack:r,history:n}=Qi(),s=()=>{r()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:Bs,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},n.length>0?P.createElement(va,{onClick:s,icon:Q2,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))},iN=t=>{const{location:e}=t;switch(e){case"send-coin":return P.createElement(CUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress});case"send-collectible":return P.createElement(EUe,{chainId:t.params.chainId,contractAddress:t.params.contractAddress,tokenId:t.params.tokenId});case"receive":return P.createElement(xUe,null);case"history":return P.createElement(kUe,null);case"search":return P.createElement($Ue,null);case"search-view-all":return P.createElement(AUe,{defaultTab:t.params.defaultTab});case"settings":return P.createElement(_Ue,null);case"settings-general":return P.createElement(PUe,null);case"settings-currency":return P.createElement(IUe,null);case"settings-networks":return P.createElement(OUe,null);case"coin-details":return P.createElement(NUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"collectible-details":return P.createElement(BUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId,tokenId:t.params.tokenId});case"collection-details":return P.createElement(jUe,{contractAddress:t.params.contractAddress,chainId:t.params.chainId});case"transaction-details":return P.createElement(zUe,{transaction:t.params.transaction});case"home":default:return P.createElement(wUe,null)}},HUe=t=>{const{location:e}=t;switch(e){case"search":return P.createElement(eo,{primaryText:"Search wallet"});case"search-view-all":return P.createElement(eo,{secondaryText:"Search wallet / ",primaryText:"View all"});case"settings":return P.createElement(eo,{secondaryText:"Wallet / ",primaryText:"Settings"});case"settings-general":return P.createElement(eo,{secondaryText:"Wallet / Settings / ",primaryText:"General"});case"settings-currency":return P.createElement(eo,{secondaryText:"Wallet / Settings / ",primaryText:"Currency"});case"settings-networks":return P.createElement(eo,{secondaryText:"Wallet / Settings / ",primaryText:"Networks"});case"receive":return P.createElement(eo,{secondaryText:"Wallet / ",primaryText:"Receive"});case"history":return P.createElement(eo,{secondaryText:"Wallet / ",primaryText:"History"});case"coin-details":return P.createElement(M5,null);case"collectible-details":return P.createElement(M5,null);case"transaction-details":return P.createElement(eo,{secondaryText:"",primaryText:""});case"send-collectible":case"send-coin":return P.createElement(eo,{secondaryText:"Wallet /",primaryText:"Send"});case"home":default:return P.createElement(M5,null)}},GUe={location:"home"},KUe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(QUe,t))},QUe=({children:t})=>{const{theme:e,position:r}=Na(),[n,s]=m.useState(!1),[i,o]=m.useState([]),a=i.length>0?i[i.length-1]:GUe,l=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 m.useEffect(()=>{n&&o([])},[n]),P.createElement(GBe,{value:{setOpenWalletModal:s,openWalletModalState:n}},P.createElement(cUe,{value:{setHistory:o,history:i}},P.createElement(fw,{theme:e},P.createElement(H2,null,n&&P.createElement(P$,{contentProps:{style:En({maxWidth:"400px",height:"fit-content"},R_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{className:eP,id:"sequence-kit-wallet-content"},HUe(a),l?P.createElement(sU,{className:Z_,style:{paddingTop:Bs,height:"min(800px, 80vh)"}},iN(a)):iN(a))))),t))};var YUe=()=>typeof window<"u"&&window.localStorage.getItem("IS_PAPER_DEV")==="true",JUe=()=>typeof window<"u"&&window.location.origin.includes("paper.xyz"),PX=()=>{var t;return YUe()?(t=window.localStorage.getItem("PAPER_DEV_URL"))!=null?t:"http://localhost:3000":JUe()?window.location.origin:"https://withpaper.com"},TX={colorPrimary:"#cf3781",colorBackground:"#ffffff",colorText:"#1a202c",borderRadius:12,fontFamily:"Open Sans"},XUe=Object.defineProperty,ZUe=Object.defineProperties,eze=Object.getOwnPropertyDescriptors,oN=Object.getOwnPropertySymbols,tze=Object.prototype.hasOwnProperty,rze=Object.prototype.propertyIsEnumerable,aN=(t,e,r)=>e in t?XUe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xn=(t,e)=>{for(var r in e||(e={}))tze.call(e,r)&&aN(t,r,e[r]);if(oN)for(var r of oN(e))rze.call(e,r)&&aN(t,r,e[r]);return t},lN=(t,e)=>ZUe(t,eze(e)),nze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),RX=nze((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"}}}),IX=PX(),sze="/sdk/2022-08-12/checkout-with-card",ize=(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))(ize||{}),oze=(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))(oze||{}),aze=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}},lze=({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,s=window.top.outerWidth/2+window.top.screenX-e/2;return window.open(t,"_blank",`popup=true,width=${e},height=${r},top=${n},left=${s}`)};function cN(t,e,r){var n;(n=t.contentWindow)==null||n.postMessage(Xn({eventType:e},r),"*")}var cze=RX(),fze=class{constructor({elementOrId:e,onLoad:r}){this.elementOrId=e,this.onLoad=r}createPaymentElement({handler:e,link:r,iframeId:n}){let s=document.createElement("iframe");if(s.src=r.href,s.id=n,s.allow="payment",s.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;"),s.onload=a=>{this.onLoad&&this.onLoad(a)},s.setAttribute("data-paper-sdk-version",`@paperxyz/js-client-sdk@${cze.version}`),!this.elementOrId)return window.addEventListener("message",e(s)),s;let i=this.elementOrId;if(typeof i=="string"){let a=document.getElementById(i);if(!a)throw new Error("Invalid id given");i=a}let o=i.querySelector("#"+n);return o?(o.src===r.href||(o.src=r.href),o):(window.addEventListener("message",e(s)),i.appendChild(s))}},fN={top:"0px",left:"0px",right:"0px",bottom:"0px"},uze=()=>({main:lN(Xn({},fN),{position:"fixed",zIndex:"10000",display:"flex",alignItems:"center",justifyContent:"center"}),overlay:lN(Xn({},fN),{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"}}),dze=` @keyframes pew-modal-slideIn { from {opacity: 0; transform: translate3d(0, 20px, 0);} to {opacity: 1; transform: translate3d(0, 0, 0);} @@ -364,54 +364,54 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val @keyframes spin { to { transform: rotate(360deg); } } -`,A1="paper-js-sdk-modal",dze=class{constructor(t,e){this.styles=fze(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=A1,this.overlay=document.createElement("div"),this.overlay.id=`${A1}-overlay`,this.body=document.createElement("div"),this.body.id=`${A1}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${A1}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${A1}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=uze,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=Jn(Jn({},this.styles.body),t.body||{}),this.styles.spinner=Jn(Jn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Jn(Jn({},this.styles.overlay),t.overlay||{}),this.styles.main=Jn(Jn({},this.styles.main),t.main||{}),this.styles.iframe=Jn(Jn({},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 hze({sdkClientSecret:t,appName:e,options:r=Jn({},TX),locale:n,configs:s}){let i=new URL(nze,IX),o=t;if(!o&&s&&(o=btoa(JSON.stringify(s))),!o){let l="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",c=PX();return new URL(l,c)}let a=new oze(i);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function vze({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:s,onPriceUpdate:i}){let o;return a=>{if(!a.origin.startsWith(IX))return;let{data:l}=a;switch(l.eventType){case"checkoutWithCardError":e&&e({code:l.code,error:l.error});break;case"paymentSuccess":n&&n({transactionId:l.id,id:l.id}),l.postToIframe&&cN(t,l.eventType,l);break;case"reviewComplete":r&&r({id:l.id,cardholderName:l.cardholderName});break;case"openModalWithUrl":s&&l.url&&l.url.includes("promptKYCModal")?s({url:l.url}):(o=new dze(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:l.url}));break;case"completedSDKModal":o.close(),l.postToIframe&&cN(t,l.eventType,l);break;case"requestedPopup":{aze({url:l.url,width:l.width,height:l.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=l.height+"px",t.style.maxHeight=l.height+"px";break;case"onPriceUpdate":{i==null||i(l);break}}}}function yze({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:s,onLoad:i,onError:o,locale:a,options:l,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h=!0,configs:v}){let y="checkout-with-card-iframe",b=g=>vze({iframe:g,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h}),p=hze({sdkClientSecret:r,appName:n,locale:a,options:l,useAltDomain:h,configs:v});return new cze({onLoad:i,elementOrId:s}).createPaymentElement({handler:b,iframeId:y,link:p})}RX();function mze(t){if(t.sheet)return t.sheet;for(var e=0;e0?cn(Jh,--ds):0,fh--,Ir===10&&(fh=1,Gx--),Ir}function Ps(){return Ir=ds2||Zy(Ir)>3?"":" "}function Pze(t,e){for(;--e&&Ps()&&!(Ir<48||Ir>102||Ir>57&&Ir<65||Ir>70&&Ir<97););return q0(t,rg()+(e<6&&_o()==32&&Ps()==32))}function Wk(t){for(;Ps();)switch(Ir){case t:return ds;case 34:case 39:t!==34&&t!==39&&Wk(Ir);break;case 40:t===41&&Wk(t);break;case 92:Ps();break}return ds}function Tze(t,e){for(;Ps()&&t+Ir!==47+10;)if(t+Ir===42+42&&_o()===47)break;return"/*"+q0(e,ds-1)+"*"+Hx(t===47?t:Ps())}function Rze(t){for(;!Zy(_o());)Ps();return q0(t,ds)}function Ize(t){return jX(sg("",null,null,null,[""],t=LX(t),0,[0],t))}function sg(t,e,r,n,s,i,o,a,l){for(var c=0,f=0,u=o,d=0,h=0,v=0,y=1,b=1,p=1,g=0,w="",E=s,k=i,$=n,C=w;b;)switch(v=g,g=Ps()){case 40:if(v!=108&&cn(C,u-1)==58){qk(C+=ct(ng(g),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:C+=ng(g);break;case 9:case 10:case 13:case 32:C+=_ze(v);break;case 92:C+=Pze(rg()-1,7);continue;case 47:switch(_o()){case 42:case 47:ap(Oze(Tze(Ps(),rg()),e,r),l);break;default:C+="/"}break;case 123*y:a[c++]=lo(C)*p;case 125*y:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+f:p==-1&&(C=ct(C,/\f/g,"")),h>0&&lo(C)-u&&ap(h>32?dN(C+";",n,r,u-1):dN(ct(C," ","")+";",n,r,u-2),l);break;case 59:C+=";";default:if(ap($=uN(C,e,r,c,f,s,a,w,E=[],k=[],u),i),g===123)if(f===0)sg(C,e,$,$,E,i,u,a,k);else switch(d===99&&cn(C,3)===110?100:d){case 100:case 108:case 109:case 115:sg(t,$,$,n&&ap(uN(t,$,$,0,0,s,a,w,s,E=[],u),k),s,k,u,a,n?E:k);break;default:sg(C,$,$,$,[""],k,0,a,k)}}c=f=h=0,y=p=1,w=C="",u=o;break;case 58:u=1+lo(C),h=v;default:if(y<1){if(g==123)--y;else if(g==125&&y++==0&&Aze()==125)continue}switch(C+=Hx(g),g*y){case 38:p=f>0?1:(C+="\f",-1);break;case 44:a[c++]=(lo(C)-1)*p,p=1;break;case 64:_o()===45&&(C+=ng(Ps())),d=_o(),f=u=lo(w=C+=Rze(rg())),g++;break;case 45:v===45&&lo(C)==2&&(y=0)}}return i}function uN(t,e,r,n,s,i,o,a,l,c,f){for(var u=s-1,d=s===0?i:[""],h=sP(d),v=0,y=0,b=0;v0?d[p]+" "+g:ct(g,/&\f/g,d[p])))&&(l[b++]=w);return Kx(t,e,r,s===0?rP:a,l,c,f)}function Oze(t,e,r){return Kx(t,e,r,OX,Hx($ze()),Xy(t,2,-2),0)}function dN(t,e,r,n){return Kx(t,e,r,nP,Xy(t,0,n),Xy(t,n+1,-1),n)}function Ed(t,e){for(var r="",n=sP(t),s=0;s6)switch(cn(t,e+1)){case 109:if(cn(t,e+4)!==45)break;case 102:return ct(t,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+b2+(cn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~qk(t,"stretch")?FX(ct(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(cn(t,e+1)!==115)break;case 6444:switch(cn(t,lo(t)-3-(~qk(t,"!important")&&10))){case 107:return ct(t,":",":"+lt)+t;case 101:return ct(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(cn(t,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+gn+"$2box$3")+t}break;case 5936:switch(cn(t,e+11)){case 114:return lt+t+gn+ct(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return lt+t+gn+ct(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return lt+t+gn+ct(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return lt+t+gn+t+t}return t}var Vze=function(e,r,n,s){if(e.length>-1&&!e.return)switch(e.type){case nP:e.return=FX(e.value,e.length);break;case MX:return Ed([_1(e,{value:ct(e.value,"@","@"+lt)})],s);case rP:if(e.length)return kze(e.props,function(i){switch(Sze(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ed([_1(e,{props:[ct(i,/:(read-\w+)/,":"+b2+"$1")]})],s);case"::placeholder":return Ed([_1(e,{props:[ct(i,/:(plac\w+)/,":"+lt+"input-$1")]}),_1(e,{props:[ct(i,/:(plac\w+)/,":"+b2+"$1")]}),_1(e,{props:[ct(i,/:(plac\w+)/,gn+"input-$1")]})],s)}return""})}},qze=[Vze],Wze=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(y){var b=y.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var s=e.stylisPlugins||qze,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var b=y.getAttribute("data-emotion").split(" "),p=1;pe in t?nVe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,oVe=(t,e)=>{for(var r in e||(e={}))sVe.call(e,r)&&wN(t,r,e[r]);if(bN)for(var r of bN(e))iVe.call(e,r)&&wN(t,r,e[r]);return t},aVe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),oP=aVe((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":"*"}}}),lVe=m.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),cVe=()=>m.useContext(lVe);Yi` +`,_1="paper-js-sdk-modal",hze=class{constructor(t,e){this.styles=uze(),this.container=t||document.body,e&&this.mergeStyles(e),this.main=document.createElement("div"),this.main.id=_1,this.overlay=document.createElement("div"),this.overlay.id=`${_1}-overlay`,this.body=document.createElement("div"),this.body.id=`${_1}-body`,this.spinner=document.createElement("div"),this.spinner.id=`${_1}-spinner`,this.iframe=document.createElement("iframe"),this.iframe.id=`${_1}-iframe`,this.iframe.allow="camera; microphone; payment",this.style=document.createElement("style"),this.style.innerHTML=dze,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=Xn(Xn({},this.styles.body),t.body||{}),this.styles.spinner=Xn(Xn({},this.styles.spinner),t.spinner||{}),this.styles.overlay=Xn(Xn({},this.styles.overlay),t.overlay||{}),this.styles.main=Xn(Xn({},this.styles.main),t.main||{}),this.styles.iframe=Xn(Xn({},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 vze({sdkClientSecret:t,appName:e,options:r=Xn({},TX),locale:n,configs:s}){let i=new URL(sze,IX),o=t;if(!o&&s&&(o=btoa(JSON.stringify(s))),!o){let l="/error?errorMessage=Must have either sdkClientSecret or configs field set. Received neither",c=PX();return new URL(l,c)}let a=new aze(i);return a.addClientSecret(o??""),a.addStylingOptions(r),a.addLocale(n),a.addAppName(e),a.getLink()}function yze({iframe:t,onError:e,onReview:r,onPaymentSuccess:n,onBeforeModalOpen:s,onPriceUpdate:i}){let o;return a=>{if(!a.origin.startsWith(IX))return;let{data:l}=a;switch(l.eventType){case"checkoutWithCardError":e&&e({code:l.code,error:l.error});break;case"paymentSuccess":n&&n({transactionId:l.id,id:l.id}),l.postToIframe&&cN(t,l.eventType,l);break;case"reviewComplete":r&&r({id:l.id,cardholderName:l.cardholderName});break;case"openModalWithUrl":s&&l.url&&l.url.includes("promptKYCModal")?s({url:l.url}):(o=new hze(void 0,{body:{colorScheme:"light"}}),o.open({iframeUrl:l.url}));break;case"completedSDKModal":o.close(),l.postToIframe&&cN(t,l.eventType,l);break;case"requestedPopup":{lze({url:l.url,width:l.width,height:l.height})||console.error("CheckoutWithCard: Unable to open popup.");break}case"sizing":t.style.height=l.height+"px",t.style.maxHeight=l.height+"px";break;case"onPriceUpdate":{i==null||i(l);break}}}}function mze({onCloseKycModal:t,onOpenKycModal:e,sdkClientSecret:r,appName:n,elementOrId:s,onLoad:i,onError:o,locale:a,options:l,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h=!0,configs:v}){let y="checkout-with-card-iframe",g=p=>yze({iframe:p,onCloseKycModal:t,onOpenKycModal:e,onError:o,onPaymentSuccess:c,onReview:f,onBeforeModalOpen:u,onPriceUpdate:d,useAltDomain:h}),b=vze({sdkClientSecret:r,appName:n,locale:a,options:l,useAltDomain:h,configs:v});return new fze({onLoad:i,elementOrId:s}).createPaymentElement({handler:g,iframeId:y,link:b})}RX();function pze(t){if(t.sheet)return t.sheet;for(var e=0;e0?cn(Xh,--hs):0,uh--,Ir===10&&(uh=1,Kx--),Ir}function Ts(){return Ir=hs2||e0(Ir)>3?"":" "}function Tze(t,e){for(;--e&&Ts()&&!(Ir<48||Ir>102||Ir>57&&Ir<65||Ir>70&&Ir<97););return W0(t,ng()+(e<6&&Po()==32&&Ts()==32))}function Gk(t){for(;Ts();)switch(Ir){case t:return hs;case 34:case 39:t!==34&&t!==39&&Gk(Ir);break;case 40:t===41&&Gk(t);break;case 92:Ts();break}return hs}function Rze(t,e){for(;Ts()&&t+Ir!==47+10;)if(t+Ir===42+42&&Po()===47)break;return"/*"+W0(e,hs-1)+"*"+Gx(t===47?t:Ts())}function Ize(t){for(;!e0(Po());)Ts();return W0(t,hs)}function Oze(t){return jX(ig("",null,null,null,[""],t=LX(t),0,[0],t))}function ig(t,e,r,n,s,i,o,a,l){for(var c=0,f=0,u=o,d=0,h=0,v=0,y=1,g=1,b=1,p=0,w="",E=s,k=i,$=n,x=w;g;)switch(v=p,p=Ts()){case 40:if(v!=108&&cn(x,u-1)==58){Hk(x+=ct(sg(p),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:x+=sg(p);break;case 9:case 10:case 13:case 32:x+=Pze(v);break;case 92:x+=Tze(ng()-1,7);continue;case 47:switch(Po()){case 42:case 47:lp(Mze(Rze(Ts(),ng()),e,r),l);break;default:x+="/"}break;case 123*y:a[c++]=co(x)*b;case 125*y:case 59:case 0:switch(p){case 0:case 125:g=0;case 59+f:b==-1&&(x=ct(x,/\f/g,"")),h>0&&co(x)-u&&lp(h>32?dN(x+";",n,r,u-1):dN(ct(x," ","")+";",n,r,u-2),l);break;case 59:x+=";";default:if(lp($=uN(x,e,r,c,f,s,a,w,E=[],k=[],u),i),p===123)if(f===0)ig(x,e,$,$,E,i,u,a,k);else switch(d===99&&cn(x,3)===110?100:d){case 100:case 108:case 109:case 115:ig(t,$,$,n&&lp(uN(t,$,$,0,0,s,a,w,s,E=[],u),k),s,k,u,a,n?E:k);break;default:ig(x,$,$,$,[""],k,0,a,k)}}c=f=h=0,y=b=1,w=x="",u=o;break;case 58:u=1+co(x),h=v;default:if(y<1){if(p==123)--y;else if(p==125&&y++==0&&_ze()==125)continue}switch(x+=Gx(p),p*y){case 38:b=f>0?1:(x+="\f",-1);break;case 44:a[c++]=(co(x)-1)*b,b=1;break;case 64:Po()===45&&(x+=sg(Ts())),d=Po(),f=u=co(w=x+=Ize(ng())),p++;break;case 45:v===45&&co(x)==2&&(y=0)}}return i}function uN(t,e,r,n,s,i,o,a,l,c,f){for(var u=s-1,d=s===0?i:[""],h=iP(d),v=0,y=0,g=0;v0?d[b]+" "+p:ct(p,/&\f/g,d[b])))&&(l[g++]=w);return Qx(t,e,r,s===0?nP:a,l,c,f)}function Mze(t,e,r){return Qx(t,e,r,OX,Gx(Aze()),Zy(t,2,-2),0)}function dN(t,e,r,n){return Qx(t,e,r,sP,Zy(t,0,n),Zy(t,n+1,-1),n)}function Sd(t,e){for(var r="",n=iP(t),s=0;s6)switch(cn(t,e+1)){case 109:if(cn(t,e+4)!==45)break;case 102:return ct(t,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+w2+(cn(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Hk(t,"stretch")?FX(ct(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(cn(t,e+1)!==115)break;case 6444:switch(cn(t,co(t)-3-(~Hk(t,"!important")&&10))){case 107:return ct(t,":",":"+lt)+t;case 101:return ct(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(cn(t,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+bn+"$2box$3")+t}break;case 5936:switch(cn(t,e+11)){case 114:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return lt+t+bn+ct(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return lt+t+bn+t+t}return t}var qze=function(e,r,n,s){if(e.length>-1&&!e.return)switch(e.type){case sP:e.return=FX(e.value,e.length);break;case MX:return Sd([P1(e,{value:ct(e.value,"@","@"+lt)})],s);case nP:if(e.length)return $ze(e.props,function(i){switch(kze(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Sd([P1(e,{props:[ct(i,/:(read-\w+)/,":"+w2+"$1")]})],s);case"::placeholder":return Sd([P1(e,{props:[ct(i,/:(plac\w+)/,":"+lt+"input-$1")]}),P1(e,{props:[ct(i,/:(plac\w+)/,":"+w2+"$1")]}),P1(e,{props:[ct(i,/:(plac\w+)/,bn+"input-$1")]})],s)}return""})}},Wze=[qze],Hze=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(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var s=e.stylisPlugins||Wze,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),b=1;be in t?sVe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,aVe=(t,e)=>{for(var r in e||(e={}))iVe.call(e,r)&&wN(t,r,e[r]);if(bN)for(var r of bN(e))oVe.call(e,r)&&wN(t,r,e[r]);return t},lVe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),aP=lVe((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":"*"}}}),cVe=m.createContext({chainName:"Polygon",setChainName:()=>{},clientId:"",appName:""}),fVe=()=>m.useContext(cVe);Ji` opacity: 0; -`;Yi` +`;Ji` opacity: 1; -`;var fVe=Yi` +`;var uVe=Ji` position: relative; width: 100%; height: 100%; -`;Yi` +`;Ji` display: grid; position: relative; width: 100%; -`;Yi` +`;Ji` transition-delay: 150ms; transition-property: opacity; transition-duration: 75ms; -`;Yi` +`;Ji` transition-property: opacity; transition-duration: 150ms; -`;Yi` +`;Ji` background-color: transparent; grid-column-start: 1; grid-row-start: 1; -`;var uVe=({className:t})=>pe("div",{id:"loader",className:tVe(hVe,t)}),dVe=rVe` +`;var dVe=({className:t})=>pe("div",{id:"loader",className:rVe(vVe,t)}),hVe=nVe` from { transform: rotate(0deg); } to { transform: rotate(360deg); } -`,hVe=Yi` +`,vVe=Ji` 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: ${dVe} 1s linear infinite; -`,vVe=()=>pe("div",{className:yVe,children:pe(uVe,{className:mVe})}),yVe=Yi` + animation: ${hVe} 1s linear infinite; +`,yVe=()=>pe("div",{className:mVe,children:pe(dVe,{className:pVe})}),mVe=Ji` position: absolute; top: 50%; left: 50%; transform: translate3d(-50%, -50%, 0); -`,mVe=Yi` +`,pVe=Ji` color: #000000; width: 2rem; height: 2rem; -`,pVe=oP(),gVe=({sdkClientSecret:t,appName:e,options:r=oVe({},TX),onPaymentSuccess:n,onReview:s,onError:i,onBeforeModalOpen:o,onPriceUpdate:a,locale:l,configs:c})=>{let{appName:f}=cVe(),[u,d]=m.useState(!0),h=m.useCallback(()=>{d(!1)},[]),v=m.useRef(null),y=e||f;return m.useEffect(()=>{let b=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(b)}},[]),m.useEffect(()=>{v.current&&yze({sdkClientSecret:t,appName:y,elementOrId:v.current,locale:l,onError:i,onLoad:h,onPaymentSuccess:n,onReview:s,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:c})},[v.current]),pe(kZ,{children:pe("div",{className:fVe,ref:v,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${pVe.version}`,children:u&&pe(vVe,{})})})};Yi` +`,gVe=aP(),bVe=({sdkClientSecret:t,appName:e,options:r=aVe({},TX),onPaymentSuccess:n,onReview:s,onError:i,onBeforeModalOpen:o,onPriceUpdate:a,locale:l,configs:c})=>{let{appName:f}=fVe(),[u,d]=m.useState(!0),h=m.useCallback(()=>{d(!1)},[]),v=m.useRef(null),y=e||f;return m.useEffect(()=>{let g=setTimeout(()=>{d(!1)},1e3);return()=>{clearTimeout(g)}},[]),m.useEffect(()=>{v.current&&mze({sdkClientSecret:t,appName:y,elementOrId:v.current,locale:l,onError:i,onLoad:h,onPaymentSuccess:n,onReview:s,onBeforeModalOpen:o,onPriceUpdate:a,options:r,configs:c})},[v.current]),pe(kZ,{children:pe("div",{className:uVe,ref:v,"data-paper-sdk-version":`@paperxyz/react-client-sdk@${gVe.version}`,children:u&&pe(yVe,{})})})};Ji` padding-top: 0.625rem; padding-bottom: 0.625rem; padding-left: 1.25rem; @@ -426,7 +426,7 @@ Invalid media condition`));var d=t(e.slice(s+2),r,u.value);return{operator:u.val border-radius: 0.5rem; border: none; cursor: pointer; -`;oP();oP();var bVe=(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))(bVe||{}),wVe=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(wVe||{});const[xVe,CVe]=eu(),W0=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=xVe();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Mf(){return Mf=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const e=zt[t];if(!e)throw"invalid network";const r=new Xw("https://metadata.sequence.app"),n=new Jw(Vw(e.name)),s=new yd("https://dev-api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},xN=(t,e)=>t.toLowerCase()===e.toLowerCase();var Xa=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}(Xa||{});const Hk=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=Xa.VERY_LARGE:e<1e-10?r=Xa.VERY_TINY:e<1?r=Xa.FRACTION:r=Xa.MIXED;let n,s;switch(r){case Xa.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Xa.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Xa.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Mf({notation:n},s)).format(e)},EVe=t=>t.charAt(0).toUpperCase()+t.slice(1),SVe=t=>t.chainId===1?"Ethereum":EVe(t.name),kVe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await H0(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Cr,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:hA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},$Ve=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await H0(e),n=await r.getTokenBalances({accountAddress:t,includeMetadata:!0});return(n==null?void 0:n.balances)||[]}catch(r){return console.error(r),[]}},AVe=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([kVe({accountAddress:t,chainId:e}),$Ve({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},_Ve=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=await H0(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},PVe=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=await H0(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},TVe=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:s,collectionContractAddress:i,methodArguments:o,currency:a,currencyAmount:l,methodName:c,recipientAddress:f})=>{const{network:u,apiClient:d}=await H0(t),h=SVe(u),v=JSON.stringify(Mf({title:s,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${l} * $QUANTITY`},name:c},walletAddress:f},i?{contractArgs:{collectionContractAddress:i}}:{})),{secret:y}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:v});return y},aP={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},RVe=t=>di({queryKey:["balances",t],queryFn:()=>AVe(t),retry:!0,staleTime:10*aP.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),IVe=t=>di({queryKey:["useTokenMetadata",t],queryFn:()=>_Ve(t),retry:!0,staleTime:10*aP.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),zX=t=>di({queryKey:["useContractInfo",t],queryFn:()=>PVe(t),retry:!0,staleTime:60*aP.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[OVe,MVe]=eu(),DVe=({settings:t})=>{var e,r;const[n,s]=m.useState(!0),[i,o]=m.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,l]=m.useState(i),[c,f]=m.useState(null),[u,d]=m.useState(!1),{setNavigation:h}=Xh(),v=()=>{n&&o(a||""),n||l(i),s(!n)},y=async()=>{d(!0);try{if(!i)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const k=await TVe(Mf({email:i},t.creditCardCheckout));f(k)}catch(k){console.error("Failed to fetch paper secret",k),h({location:"transaction-error",params:{error:k}})}d(!1)};m.useEffect(()=>{const k=setInterval(()=>{const $=document.getElementById("paper-js-sdk-modal");$&&($.style.pointerEvents="visible")},100);return()=>{clearInterval(k)}},[]),m.useEffect(()=>{i!==""&&y()},[i]);const b=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),p=k=>{l(k.target.value)},g=k=>{h({location:"transaction-pending",params:{transactionId:k}})},w=k=>{h({location:"transaction-error",params:{error:k}})},E=()=>n?P.createElement(W,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:v},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(lc,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:p,"data-1p-ignore":!0})),P.createElement(nt,{size:"xs",label:"Save",leftIcon:xh,disabled:!b(),type:"submit"})):P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},i)),P.createElement(nt,{size:"xs",label:"Edit",leftIcon:Hue,onClick:v}));return P.createElement(W,null,E(),u&&P.createElement(W,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},P.createElement(X$,{size:"lg",style:{width:"60px",height:"60px"}})),c&&!u&&P.createElement(Oo,{marginY:"4",flexDirection:"column"},P.createElement(gVe,{sdkClientSecret:c,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:k=>{g(k.id)},onError:k=>{console.error("Payment error:",k),w(k.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},lP="54px",NVe=()=>{const{settings:t}=W0();return P.createElement(W,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:lP}},t&&P.createElement(DVe,{settings:t}))},LVe=10*1e3,jVe=()=>{const t=Xh(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,s=async()=>{try{console.log("Polling for transaction status");const i=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(l=>l.json()),o=i.result.status,a=i.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(i){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:i}})}};return m.useEffect(()=>{const i=setInterval(()=>{s()},LVe);return()=>{clearInterval(i)}},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(X$,{size:"lg",style:{width:"60px",height:"60px"}}),P.createElement(re,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",P.createElement("br",null),"This may take a few minutes.")))},FVe=()=>{const{closeCheckout:t,settings:e}=W0(),n=Xh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onSuccess&&(e==null||(i=e.creditCardCheckout)==null||i.onSuccess(n.params.transactionHash))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(BVe,null),P.createElement(re,{fontSize:"xlarge"},"Success!"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},BVe=()=>P.createElement(W,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},P.createElement(xh,{size:"xl"})),UVe=()=>{const{closeCheckout:t,settings:e}=W0(),n=Xh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onError&&(e==null||(i=e.creditCardCheckout)==null||i.onError(n.params.error))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(zVe,null),P.createElement(re,{fontSize:"xlarge"},"Error"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},zVe=()=>P.createElement(W,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},P.createElement(zf,{size:"xl"})),VVe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),Pv=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(VVe,{size:e});Jf("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const qVe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),WVe=js({height:"76px",backgroundColor:"#909090",animation:`${qVe} 2s ease-in-out infinite`},"skeleton");Xf();const Zu=({width:t="100%",height:e="100%",borderRadius:r="md"})=>P.createElement(W,{className:WVe,borderRadius:r,style:{width:t,height:e}}),HVe=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{data:s,isLoading:i}=IVe({chainId:n,contractAddress:t,tokenId:e}),{data:o,isLoading:a}=zX({chainID:String(n),contractAddress:t});if(i||a)return P.createElement(GVe,null);const c=Mr(n),{name:f="unknown",image:u,decimals:d=0}=s||{},{logoURI:h,name:v="Unknown Collection"}=o||{},y=_r(r,d);return P.createElement(Oo,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(W,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},P.createElement(fr,{src:u,borderRadius:"md",style:{height:"80px"}})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(W,{gap:"1",alignItems:"center"},P.createElement(Pv,{size:12,imageUrl:h}),P.createElement(re,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},v),P.createElement(Pv,{size:12,imageUrl:c.logoURI})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},P.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"normal"},f),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),P.createElement(W,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${Hk(y)}`))},GVe=()=>P.createElement(Oo,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(Zu,{height:"80px",width:"80px"}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(Zu,{width:"100px",height:"14px"}),P.createElement(Zu,{width:"180px",height:"34px"}))),P.createElement(Zu,{height:"14px",width:"14px"}));Jf("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const VX=js({},"insufficientBalanceButton");Gi(`${VX} > div`,{justifyContent:"center"});Xf();const KVe=()=>{var t,e,r,n,s;const{setNavigation:i}=Xh(),{closeCheckout:o,settings:a}=W0(),{address:l}=Pn(),c=a==null?void 0:a.cryptoCheckout,f=a==null?void 0:a.creditCardCheckout,u=!!c,d=!!f,{data:h,isLoading:v}=zX({contractAddress:(c==null||(t=c.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((c==null?void 0:c.chainId)||1)}),{data:y,isLoading:b}=RVe({accountAddress:l||"",chainId:(c==null?void 0:c.chainId)||1}),p=(v||b)&&c,g=xN((c==null||(e=c.coinQuantity)==null?void 0:e.contractAddress)||"",Cr),w=Mr((c==null?void 0:c.chainId)||1),E=g?w.decimals:(h==null?void 0:h.decimals)||0,k=g?w.symbol:(h==null?void 0:h.symbol)||"COIN",$=g?w.logoURI:(h==null?void 0:h.logoURI)||"",C=y==null?void 0:y.find(M=>{var _;return xN(M.contractAddress,(c==null||(_=c.coinQuantity)==null?void 0:_.contractAddress)||"")}),T=C?C.balance:"0",j=(c==null||(r=c.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",F=_r(T,E),U=_r(j,E),V=Z.from(T).lt(Z.from(j)),N=(a==null?void 0:a.orderSummaryItems)||[],x=(a==null||(n=a.cryptoCheckout)==null?void 0:n.chainId)||(a==null||(s=a.creditCardCheckout)==null?void 0:s.chainId)||1,S=()=>{i({location:"transaction-form"})},R=()=>{var M;console.log("trigger transaction");const _=a==null||(M=a.cryptoCheckout)==null?void 0:M.triggerTransaction;_&&_(),o()};return P.createElement(W,{paddingX:"5",paddingBottom:"5",style:{marginTop:lP},flexDirection:"column",gap:"3"},N.length>0&&P.createElement(P.Fragment,null,P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),P.createElement(W,{flexDirection:"column",gap:"2"},N.map((M,_)=>P.createElement(HVe,Mf({key:_},M,{chainId:x})))),P.createElement(W,{marginTop:"2"},P.createElement(ly,{color:"backgroundSecondary",style:{margin:"0px"}}))),u&&P.createElement(W,{justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),p?P.createElement(Zu,{width:"100px",height:"17px"}):P.createElement(W,{flexDirection:"row",gap:"1",alignItems:"center"},P.createElement(Pv,{imageUrl:$,size:12}),P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${Hk(U)} ${k}`))),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},d&&P.createElement(nt,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",borderRadius:"md",leftIcon:ede,variant:"primary",label:"Pay with credit card",rightIcon:Mi,onClick:S}),u&&!V&&!p&&P.createElement(nt,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",leftIcon:()=>P.createElement(Pv,{size:20,imageUrl:$}),variant:"primary",label:`Pay with ${k}`,rightIcon:Mi,onClick:R}),u&&(V||p)&&P.createElement(nt,{className:VX,style:{borderRadius:ge.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>P.createElement(Pv,{size:20,imageUrl:$}),variant:"glass",label:`Insufficient ${k}`,onClick:R,disabled:!0})),u&&P.createElement(W,{width:"full",justifyContent:"flex-end"},p?P.createElement(Zu,{width:"102px",height:"14px"}):P.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${Hk(F)} ${k}`)))},N5=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:s}=Xh(),i=()=>{n()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:lP,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},s.length>0&&!r?P.createElement(ba,{onClick:i,icon:nw,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))};Jf("packages/checkout/src/shared/styles.css.ts","kit");const cP=js({},"walletContent");Gi(`${cP} + button`,{backgroundColor:"transparent"});Gi(`${cP} + button > svg`,{width:"20px",height:"20px"});Xf();const qX={location:"select-method-checkout"},QVe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(YVe,t))},YVe=({children:t})=>{const{theme:e,position:r}=Da(),[n,s]=m.useState(!1),[i,o]=m.useState(),[a,l]=m.useState([]),c=a.length>0?a[a.length-1]:qX,f=v=>{o(v),s(!0)},u=()=>{s(!1)},d=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(KVe,null);case"transaction-pending":return P.createElement(jVe,null);case"transaction-success":return P.createElement(FVe,null);case"transaction-error":return P.createElement(UVe,null);case"transaction-form":default:return P.createElement(NVe,null)}},h=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(N5,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return P.createElement(N5,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return P.createElement(N5,{primaryText:"Pay with credit or debit card"})}};return m.useEffect(()=>{n&&l([])},[n]),P.createElement(CVe,{value:{triggerCheckout:f,closeCheckout:u,settings:i,theme:e}},P.createElement(MVe,{value:{history:a,setHistory:l}},P.createElement(gw,{theme:e},P.createElement(ew,null,n&&P.createElement(Q$,{contentProps:{style:Mf({maxWidth:"400px",height:"auto"},T_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{id:"sequence-kit-checkout-content",className:cP},h(),d())))),t))},Xh=()=>{const{setHistory:t,history:e}=OVe(),r=i=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const l=[...e,i];t(l)},n=()=>{const i=[...e];i.pop(),t(i)},s=e.length>0?e[e.length-1]:qX;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:s}},WX="%[a-f0-9]{2}",CN=new RegExp("("+WX+")|([^%]+?)","gi"),EN=new RegExp("("+WX+")+","gi");function Gk(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([],Gk(r),Gk(n))}function JVe(t){try{return decodeURIComponent(t)}catch{let e=t.match(CN)||[];for(let r=1;rt==null,rqe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Kk=Symbol("encodeFragmentIdentifier");function nqe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const s=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[",s,"]"].join("")]:[...r,[Pr(e,t),"[",Pr(s,t),"]=",Pr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[]"].join("")]:[...r,[Pr(e,t),"[]=",Pr(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,[Pr(e,t),":list="].join("")]:[...r,[Pr(e,t),":list=",Pr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?n:(s=s===null?"":s,n.length===0?[[Pr(r,t),e,Pr(s,t)].join("")]:[[n,Pr(s,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Pr(e,t)]:[...r,[Pr(e,t),"=",Pr(n,t)].join("")]}}function sqe(t){let e;switch(t.arrayFormat){case"index":return(r,n,s)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){s[r]=n;return}s[r]===void 0&&(s[r]={}),s[r][e[1]]=n};case"bracket":return(r,n,s)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"colon-list-separator":return(r,n,s)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"comma":case"separator":return(r,n,s)=>{const i=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!i&&Yo(n,t).includes(t.arrayFormatSeparator);n=o?Yo(n,t):n;const a=i||o?n.split(t.arrayFormatSeparator).map(l=>Yo(l,t)):n===null?n:Yo(n,t);s[r]=a};case"bracket-separator":return(r,n,s)=>{const i=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!i){s[r]=n&&Yo(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>Yo(a,t));if(s[r]===void 0){s[r]=o;return}s[r]=[...s[r],...o]};default:return(r,n,s)=>{if(s[r]===void 0){s[r]=n;return}s[r]=[...[s[r]].flat(),n]}}}function GX(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Pr(t,e){return e.encode?e.strict?rqe(t):encodeURIComponent(t):t}function Yo(t,e){return e.decode?ZVe(t):t}function KX(t){return Array.isArray(t)?t.sort():typeof t=="object"?KX(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function QX(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function iqe(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function SN(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 fP(t){t=QX(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function uP(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},GX(e.arrayFormatSeparator);const r=sqe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const s of t.split("&")){if(s==="")continue;const i=e.decode?s.replace(/\+/g," "):s;let[o,a]=HX(i,"=");o===void 0&&(o=i),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Yo(a,e),r(Yo(o,e),a,n)}for(const[s,i]of Object.entries(n))if(typeof i=="object"&&i!==null)for(const[o,a]of Object.entries(i))i[o]=SN(a,e);else n[s]=SN(i,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((s,i)=>{const o=n[i];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?s[i]=KX(o):s[i]=o,s},Object.create(null))}function YX(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},GX(e.arrayFormatSeparator);const r=o=>e.skipNull&&tqe(t[o])||e.skipEmptyString&&t[o]==="",n=nqe(e),s={};for(const[o,a]of Object.entries(t))r(o)||(s[o]=a);const i=Object.keys(s);return e.sort!==!1&&i.sort(e.sort),i.map(o=>{const a=t[o];return a===void 0?"":a===null?Pr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Pr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Pr(o,e)+"="+Pr(a,e)}).filter(o=>o.length>0).join("&")}function JX(t,e){var s;e={decode:!0,...e};let[r,n]=HX(t,"#");return r===void 0&&(r=t),{url:((s=r==null?void 0:r.split("?"))==null?void 0:s[0])??"",query:uP(fP(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Yo(n,e)}:{}}}function XX(t,e){e={encode:!0,strict:!0,[Kk]:!0,...e};const r=QX(t.url).split("?")[0]||"",n=fP(t.url),s={...uP(n,{sort:!1}),...t.query};let i=YX(s,e);i&&(i=`?${i}`);let o=iqe(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[Kk]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${i}${o}`}function ZX(t,e,r){r={parseFragmentIdentifier:!0,[Kk]:!1,...r};const{url:n,query:s,fragmentIdentifier:i}=JX(t,r);return XX({url:n,query:eqe(s,e),fragmentIdentifier:i},r)}function oqe(t,e,r){const n=Array.isArray(e)?s=>!e.includes(s):(s,i)=>!e(s,i);return ZX(t,n,r)}const aqe=Object.freeze(Object.defineProperty({__proto__:null,exclude:oqe,extract:fP,parse:uP,parseUrl:JX,pick:ZX,stringify:YX,stringifyUrl:XX},Symbol.toStringTag,{value:"Module"})),lqe=[{inputs:[{internalType:"uint256[]",name:"_tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"_tokensBoughtAmounts",type:"uint256[]"},{internalType:"uint256",name:"_maxCurrency",type:"uint256"},{internalType:"uint256",name:"_deadline",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"address[]",name:"_extraFeeRecipients",type:"address[]"},{internalType:"uint256[]",name:"_extraFeeAmounts",type:"uint256[]"}],name:"buyTokens",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"}],cqe=`Two roads diverged in a yellow wood, +`;aP();aP();var wVe=(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))(wVe||{}),xVe=(t=>(t.POPUP="POPUP",t.NEW_TAB="NEW_TAB",t.MODAL="MODAL",t.DRAWER="DRAWER",t.EMBED="EMBED",t))(xVe||{});const[CVe,EVe]=tu(),H0=()=>{const{triggerCheckout:t,closeCheckout:e,settings:r}=CVe();return{triggerCheckout:t,closeCheckout:e,settings:r}};function Df(){return Df=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const e=zt[t];if(!e)throw"invalid network";const r=new Zw("https://metadata.sequence.app"),n=new Xw(qw(e.name)),s=new hd("https://dev-api.sequence.app");return{network:e,metadataClient:r,indexerClient:n,apiClient:s}},xN=(t,e)=>t.toLowerCase()===e.toLowerCase();var Za=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}(Za||{});const Kk=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=Za.VERY_LARGE:e<1e-10?r=Za.VERY_TINY:e<1?r=Za.FRACTION:r=Za.MIXED;let n,s;switch(r){case Za.VERY_LARGE:n="compact",s={maximumFractionDigits:4};break;case Za.VERY_TINY:n="scientific",s={maximumFractionDigits:4};break;case Za.FRACTION:n="standard",s={maximumSignificantDigits:4};break;default:n="standard",s={maximumFractionDigits:2}}return Intl.NumberFormat("en-US",Df({notation:n},s)).format(e)},SVe=t=>t.charAt(0).toUpperCase()+t.slice(1),kVe=t=>t.chainId===1?"Ethereum":SVe(t.name),$Ve=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await G0(e),n=await r.getEtherBalance({accountAddress:t});return[{chainId:e,contractAddress:Ar,accountAddress:t,balance:(n==null?void 0:n.balance.balanceWei)||"0",contractType:vA.UNKNOWN,blockHash:"",blockNumber:0,tokenID:""}]}catch(r){return console.error(r),[]}},AVe=async({accountAddress:t,chainId:e})=>{try{const{indexerClient:r}=await G0(e),n=await r.getTokenBalances({accountAddress:t,includeMetadata:!0});return(n==null?void 0:n.balances)||[]}catch(r){return console.error(r),[]}},_Ve=async({accountAddress:t,chainId:e})=>{try{return(await Promise.all([$Ve({accountAddress:t,chainId:e}),AVe({accountAddress:t,chainId:e})])).flat()}catch(r){return console.error(r),[]}},PVe=async({chainId:t,tokenId:e,contractAddress:r})=>{const{metadataClient:n}=await G0(t);return(await n.getTokenMetadata({chainID:String(t),contractAddress:r,tokenIDs:[e]})).tokenMetadata[0]},TVe=async({chainID:t,contractAddress:e})=>{const{metadataClient:r}=await G0(t);return(await r.getContractInfo({chainID:t,contractAddress:e})).contractInfo},RVe=async({chainId:t,email:e,contractAddress:r,abi:n,receiptTitle:s,collectionContractAddress:i,methodArguments:o,currency:a,currencyAmount:l,methodName:c,recipientAddress:f})=>{const{network:u,apiClient:d}=await G0(t),h=kVe(u),v=JSON.stringify(Df({title:s,email:e,limitPerTransaction:1,quantity:1,mintMethod:{args:o,payment:{currency:a,value:`${l} * $QUANTITY`},name:c},walletAddress:f},i?{contractArgs:{collectionContractAddress:i}}:{})),{secret:y}=await d.paperSessionSecret2({chainName:h,contractAddress:r,abi:n,paramsJson:v});return y},lP={oneSecond:1*1e3,oneMinute:60*1e3,oneHour:60*60*1e3},IVe=t=>hi({queryKey:["balances",t],queryFn:()=>_Ve(t),retry:!0,staleTime:10*lP.oneMinute,enabled:!!t.chainId&&!!t.accountAddress}),OVe=t=>hi({queryKey:["useTokenMetadata",t],queryFn:()=>PVe(t),retry:!0,staleTime:10*lP.oneMinute,enabled:!!t.chainId&&!!t.contractAddress}),zX=t=>hi({queryKey:["useContractInfo",t],queryFn:()=>TVe(t),retry:!0,staleTime:60*lP.oneMinute,enabled:!!t.chainID&&!!t.contractAddress}),[MVe,DVe]=tu(),NVe=({settings:t})=>{var e,r;const[n,s]=m.useState(!0),[i,o]=m.useState(((e=t.creditCardCheckout)==null?void 0:e.email)||""),[a,l]=m.useState(i),[c,f]=m.useState(null),[u,d]=m.useState(!1),{setNavigation:h}=Zh(),v=()=>{n&&o(a||""),n||l(i),s(!n)},y=async()=>{d(!0);try{if(!i)throw"No email address found";if(!t.creditCardCheckout)throw"No credit card checkout settings found";const k=await RVe(Df({email:i},t.creditCardCheckout));f(k)}catch(k){console.error("Failed to fetch paper secret",k),h({location:"transaction-error",params:{error:k}})}d(!1)};m.useEffect(()=>{const k=setInterval(()=>{const $=document.getElementById("paper-js-sdk-modal");$&&($.style.pointerEvents="visible")},100);return()=>{clearInterval(k)}},[]),m.useEffect(()=>{i!==""&&y()},[i]);const g=()=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/.test(a||""),b=k=>{l(k.target.value)},p=k=>{h({location:"transaction-pending",params:{transactionId:k}})},w=k=>{h({location:"transaction-error",params:{error:k}})},E=()=>n?P.createElement(W,{as:"form",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",onSubmit:v},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(ac,{autoFocus:!0,name:"email",type:"email",placeholder:"Email Address",value:a,onChange:b,"data-1p-ignore":!0})),P.createElement(nt,{size:"xs",label:"Save",leftIcon:mh,disabled:!g(),type:"submit"})):P.createElement(W,{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start"},P.createElement(W,{flexDirection:"column",justifyContent:"center",alignItems:"flex-start",gap:"2"},P.createElement(re,{fontSize:"normal",fontWeight:"normal",color:"text50"},"Receipt email address"),P.createElement(re,{fontSize:"normal",fontWeight:"bold",color:"text100"},i)),P.createElement(nt,{size:"xs",label:"Edit",leftIcon:Loe,onClick:v}));return P.createElement(W,null,E(),u&&P.createElement(W,{width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center",style:{height:"200px"}},P.createElement(I$,{size:"lg",style:{width:"60px",height:"60px"}})),c&&!u&&P.createElement(To,{marginY:"4",flexDirection:"column"},P.createElement(bVe,{sdkClientSecret:c,appName:t==null||(r=t.creditCardCheckout)==null?void 0:r.receiptTitle,onReview:()=>{},onPaymentSuccess:k=>{p(k.id)},onError:k=>{console.error("Payment error:",k),w(k.error)},options:{colorPrimary:"#447dd1",colorText:"#ffffff",borderRadius:12}})))},cP="54px",LVe=()=>{const{settings:t}=H0();return P.createElement(W,{paddingX:"4",paddingBottom:"8",gap:"4",flexDirection:"column",style:{marginTop:cP}},t&&P.createElement(NVe,{settings:t}))},jVe=10*1e3,FVe=()=>{const t=Zh(),{params:{transactionId:e}}=t.navigation,{setNavigation:r}=t,n=`https://withpaper.com/api/v1/transaction-status/${e}`,s=async()=>{try{console.log("Polling for transaction status");const i=await fetch(n,{method:"GET",headers:{accept:"application/json"}}).then(l=>l.json()),o=i.result.status,a=i.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(i){console.error("An error occurred while fetching the transaction status"),r&&r({location:"transaction-error",params:{error:i}})}};return m.useEffect(()=>{const i=setInterval(()=>{s()},jVe);return()=>{clearInterval(i)}},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{position:"absolute",top:"0",left:"0",width:"full",height:"full",flexDirection:"column",alignItems:"center",justifyContent:"center"},P.createElement(I$,{size:"lg",style:{width:"60px",height:"60px"}}),P.createElement(re,{variant:"medium",color:"text50",textAlign:"center",marginTop:"8"},"Transaction in progress. ",P.createElement("br",null),"This may take a few minutes.")))},BVe=()=>{const{closeCheckout:t,settings:e}=H0(),n=Zh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onSuccess&&(e==null||(i=e.creditCardCheckout)==null||i.onSuccess(n.params.transactionHash))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(UVe,null),P.createElement(re,{fontSize:"xlarge"},"Success!"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"The transaction was successful.")))},UVe=()=>P.createElement(W,{color:"white",background:"positive",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2"},P.createElement(mh,{size:"xl"})),zVe=()=>{const{closeCheckout:t,settings:e}=H0(),n=Zh().navigation;return m.useEffect(()=>{setTimeout(()=>{var s,i;t(),!(e==null||(s=e.creditCardCheckout)==null)&&s.onError&&(e==null||(i=e.creditCardCheckout)==null||i.onError(n.params.error))},3e3)},[]),P.createElement(W,{style:{height:"500px"}},P.createElement(W,{flexDirection:"column",alignItems:"center",position:"absolute",style:{top:"50%",right:"50%",transform:"translate(50%, -50%)"}},P.createElement(VVe,null),P.createElement(re,{fontSize:"xlarge"},"Error"),P.createElement(re,{textAlign:"center",variant:"normal",color:"text80"},"An error occurred while processing the transaction.")))},VVe=()=>P.createElement(W,{color:"white",alignItems:"center",justifyContent:"center",width:"16",height:"16",borderRadius:"circle",marginBottom:"2",background:"negative"},P.createElement(Bf,{size:"xl"})),qVe=({size:t=30})=>P.createElement(W,{alignItems:"center",justifyContent:"center",borderRadius:"circle",background:"backgroundInverse",style:{width:`${t}px`,height:`${t}px`}},P.createElement(re,{style:{fontSize:`${t-4}px`},display:"inline-block",variant:"large",color:"textInverse100"},"?")),Tv=({imageUrl:t,size:e=30})=>t?P.createElement(fr,{src:t,borderRadius:"circle",style:{width:`${e}px`,height:`${e}px`}}):P.createElement(qVe,{size:e});Xf("packages/checkout/src/shared/components/Skeleton/styles.css.ts","kit");const WVe=MY({"0%":{opacity:.25},"50%":{opacity:.1},"100%":{opacity:.25}},"PulseSimple"),HVe=Fs({height:"76px",backgroundColor:"#909090",animation:`${WVe} 2s ease-in-out infinite`},"skeleton");Zf();const ed=({width:t="100%",height:e="100%",borderRadius:r="md"})=>P.createElement(W,{className:HVe,borderRadius:r,style:{width:t,height:e}}),GVe=({contractAddress:t,tokenId:e,quantityRaw:r,chainId:n})=>{const{chains:s=[]}=dn(),{data:i,isLoading:o}=OVe({chainId:n,contractAddress:t,tokenId:e}),{data:a,isLoading:l}=zX({chainID:String(n),contractAddress:t});if(o||l)return P.createElement(KVe,null);const f=Mr(n,s),{name:u="unknown",image:d,decimals:h=0}=i||{},{logoURI:v,name:y="Unknown Collection"}=a||{},g=_r(r,h);return P.createElement(To,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(W,{aspectRatio:"1/1",height:"full",justifyContent:"center",alignItems:"center",style:{width:"80px"}},P.createElement(fr,{src:d,borderRadius:"md",style:{height:"80px"}})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(W,{gap:"1",alignItems:"center"},P.createElement(Tv,{size:12,imageUrl:v}),P.createElement(re,{marginLeft:"1",fontSize:"small",color:"text80",fontWeight:"bold"},y),P.createElement(Tv,{size:12,imageUrl:f.logoURI})),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",style:{width:"180px"}},P.createElement(re,{color:"text100",fontSize:"normal",fontWeight:"normal"},u),P.createElement(re,{color:"text50",fontSize:"normal",fontWeight:"normal"},`#${e}`)))),P.createElement(W,{height:"full",fontSize:"small",color:"text50",fontWeight:"bold"},`x${Kk(g)}`))},KVe=()=>P.createElement(To,{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"},P.createElement(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"2"},P.createElement(ed,{height:"80px",width:"80px"}),P.createElement(W,{flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"2"},P.createElement(ed,{width:"100px",height:"14px"}),P.createElement(ed,{width:"180px",height:"34px"}))),P.createElement(ed,{height:"14px",width:"14px"}));Xf("packages/checkout/src/views/CheckoutSelection/styles.css.ts","kit");const VX=Fs({},"insufficientBalanceButton");Ki(`${VX} > div`,{justifyContent:"center"});Zf();const QVe=()=>{var t,e,r,n,s;const{chains:i=[]}=dn(),{setNavigation:o}=Zh(),{closeCheckout:a,settings:l}=H0(),{address:c}=Tn(),f=l==null?void 0:l.cryptoCheckout,u=l==null?void 0:l.creditCardCheckout,d=!!f,h=!!u,{data:v,isLoading:y}=zX({contractAddress:(f==null||(t=f.coinQuantity)==null?void 0:t.contractAddress)||"",chainID:String((f==null?void 0:f.chainId)||1)}),{data:g,isLoading:b}=IVe({accountAddress:c||"",chainId:(f==null?void 0:f.chainId)||1}),p=(y||b)&&f,w=xN((f==null||(e=f.coinQuantity)==null?void 0:e.contractAddress)||"",Ar),E=Mr((f==null?void 0:f.chainId)||1,i),k=w?E.decimals:(v==null?void 0:v.decimals)||0,$=w?E.symbol:(v==null?void 0:v.symbol)||"COIN",x=w?E.logoURI:(v==null?void 0:v.logoURI)||"",T=g==null?void 0:g.find(_=>{var I;return xN(_.contractAddress,(f==null||(I=f.coinQuantity)==null?void 0:I.contractAddress)||"")}),B=T?T.balance:"0",L=(f==null||(r=f.coinQuantity)==null?void 0:r.amountRequiredRaw)||"0",U=_r(B,k),V=_r(L,k),N=Z.from(B).lt(Z.from(L)),C=(l==null?void 0:l.orderSummaryItems)||[],S=(l==null||(n=l.cryptoCheckout)==null?void 0:n.chainId)||(l==null||(s=l.creditCardCheckout)==null?void 0:s.chainId)||1,R=()=>{o({location:"transaction-form"})},M=()=>{var _;console.log("trigger transaction");const I=l==null||(_=l.cryptoCheckout)==null?void 0:_.triggerTransaction;I&&I(),a()};return P.createElement(W,{paddingX:"5",paddingBottom:"5",style:{marginTop:cP},flexDirection:"column",gap:"3"},C.length>0&&P.createElement(P.Fragment,null,P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Order summary"),P.createElement(W,{flexDirection:"column",gap:"2"},C.map((_,I)=>P.createElement(GVe,Df({key:I},_,{chainId:S})))),P.createElement(W,{marginTop:"2"},P.createElement(ey,{color:"backgroundSecondary",style:{margin:"0px"}}))),d&&P.createElement(W,{justifyContent:"space-between",alignItems:"center"},P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text50"},"Total"),p?P.createElement(ed,{width:"100px",height:"17px"}):P.createElement(W,{flexDirection:"row",gap:"1",alignItems:"center"},P.createElement(Tv,{imageUrl:x,size:12}),P.createElement(re,{fontWeight:"normal",fontSize:"normal",color:"text100"},`${Kk(V)} ${$}`))),P.createElement(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"2"},h&&P.createElement(nt,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",borderRadius:"md",leftIcon:Woe,variant:"primary",label:"Pay with credit card",rightIcon:Di,onClick:R}),d&&!N&&!p&&P.createElement(nt,{style:{borderRadius:ge.radii.md,height:"56px"},width:"full",leftIcon:()=>P.createElement(Tv,{size:20,imageUrl:x}),variant:"primary",label:`Pay with ${$}`,rightIcon:Di,onClick:M}),d&&(N||p)&&P.createElement(nt,{className:VX,style:{borderRadius:ge.radii.md,height:"56px",justifyContent:"center"},width:"full",leftIcon:()=>P.createElement(Tv,{size:20,imageUrl:x}),variant:"glass",label:`Insufficient ${$}`,onClick:M,disabled:!0})),d&&P.createElement(W,{width:"full",justifyContent:"flex-end"},p?P.createElement(ed,{width:"102px",height:"14px"}):P.createElement(re,{fontWeight:"bold",fontSize:"small",color:"text50"},"Balance: ",`${Kk(U)} ${$}`)))},L5=({secondaryText:t,primaryText:e,disableBack:r=!1})=>{const{goBack:n,history:s}=Zh(),i=()=>{n()};return P.createElement(W,{background:"backgroundPrimary",zIndex:"20",position:"fixed",width:"full",flexDirection:"row",alignItems:"center",justifyContent:"space-between",style:{height:cP,paddingTop:"6px",backgroundColor:ge.colors.backgroundPrimary}},s.length>0&&!r?P.createElement(va,{onClick:i,icon:Q2,size:"sm",style:{background:"rgba(0,0,0,0)",width:"44px"}}):P.createElement(W,null),P.createElement(W,null,P.createElement(re,{fontWeight:"medium",variant:"small",color:"text50"},t),P.createElement(re,{fontWeight:"medium",variant:"small",color:"text100"},e)),P.createElement(W,{style:{width:"44px"}}))};Xf("packages/checkout/src/shared/styles.css.ts","kit");const fP=Fs({},"walletContent");Ki(`${fP} + button`,{backgroundColor:"transparent"});Ki(`${fP} + button > svg`,{width:"20px",height:"20px"});Zf();const qX={location:"select-method-checkout"},YVe=t=>{const e=new HY;return P.createElement(YY,{client:e},P.createElement(JVe,t))},JVe=({children:t})=>{const{theme:e,position:r}=Na(),[n,s]=m.useState(!1),[i,o]=m.useState(),[a,l]=m.useState([]),c=a.length>0?a[a.length-1]:qX,f=v=>{o(v),s(!0)},u=()=>{s(!1)},d=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(QVe,null);case"transaction-pending":return P.createElement(FVe,null);case"transaction-success":return P.createElement(BVe,null);case"transaction-error":return P.createElement(zVe,null);case"transaction-form":default:return P.createElement(LVe,null)}},h=()=>{const{location:v}=c;switch(v){case"select-method-checkout":return P.createElement(L5,{primaryText:"Checkout"});case"transaction-success":case"transaction-error":case"transaction-pending":return P.createElement(L5,{disableBack:!0,primaryText:"Pay with credit or debit card"});case"transaction-form":default:return P.createElement(L5,{primaryText:"Pay with credit or debit card"})}};return m.useEffect(()=>{n&&l([])},[n]),P.createElement(EVe,{value:{triggerCheckout:f,closeCheckout:u,settings:i,theme:e}},P.createElement(DVe,{value:{history:a,setHistory:l}},P.createElement(fw,{theme:e},P.createElement(H2,null,n&&P.createElement(P$,{contentProps:{style:Df({maxWidth:"400px",height:"auto"},R_(r))},scroll:!1,backdropColor:"backgroundBackdrop",onClose:()=>s(!1)},P.createElement(W,{id:"sequence-kit-checkout-content",className:fP},h(),d())))),t))},Zh=()=>{const{setHistory:t,history:e}=MVe(),r=i=>{const o=document.getElementById("sequence-kit-wallet-content"),a=o==null?void 0:o.parentElement;a==null||a.scrollTo(0,0);const l=[...e,i];t(l)},n=()=>{const i=[...e];i.pop(),t(i)},s=e.length>0?e[e.length-1]:qX;return{setNavigation:r,history:e,setHistory:t,goBack:n,navigation:s}},WX="%[a-f0-9]{2}",CN=new RegExp("("+WX+")|([^%]+?)","gi"),EN=new RegExp("("+WX+")+","gi");function Qk(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([],Qk(r),Qk(n))}function XVe(t){try{return decodeURIComponent(t)}catch{let e=t.match(CN)||[];for(let r=1;rt==null,nqe=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Yk=Symbol("encodeFragmentIdentifier");function sqe(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const s=r.length;return n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[",s,"]"].join("")]:[...r,[Pr(e,t),"[",Pr(s,t),"]=",Pr(n,t)].join("")]};case"bracket":return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,[Pr(e,t),"[]"].join("")]:[...r,[Pr(e,t),"[]=",Pr(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,[Pr(e,t),":list="].join("")]:[...r,[Pr(e,t),":list=",Pr(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e=t.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?n:(s=s===null?"":s,n.length===0?[[Pr(r,t),e,Pr(s,t)].join("")]:[[n,Pr(s,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>n===void 0||t.skipNull&&n===null||t.skipEmptyString&&n===""?r:n===null?[...r,Pr(e,t)]:[...r,[Pr(e,t),"=",Pr(n,t)].join("")]}}function iqe(t){let e;switch(t.arrayFormat){case"index":return(r,n,s)=>{if(e=/\[(\d*)]$/.exec(r),r=r.replace(/\[\d*]$/,""),!e){s[r]=n;return}s[r]===void 0&&(s[r]={}),s[r][e[1]]=n};case"bracket":return(r,n,s)=>{if(e=/(\[])$/.exec(r),r=r.replace(/\[]$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"colon-list-separator":return(r,n,s)=>{if(e=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!e){s[r]=n;return}if(s[r]===void 0){s[r]=[n];return}s[r]=[...s[r],n]};case"comma":case"separator":return(r,n,s)=>{const i=typeof n=="string"&&n.includes(t.arrayFormatSeparator),o=typeof n=="string"&&!i&&Jo(n,t).includes(t.arrayFormatSeparator);n=o?Jo(n,t):n;const a=i||o?n.split(t.arrayFormatSeparator).map(l=>Jo(l,t)):n===null?n:Jo(n,t);s[r]=a};case"bracket-separator":return(r,n,s)=>{const i=/(\[])$/.test(r);if(r=r.replace(/\[]$/,""),!i){s[r]=n&&Jo(n,t);return}const o=n===null?[]:n.split(t.arrayFormatSeparator).map(a=>Jo(a,t));if(s[r]===void 0){s[r]=o;return}s[r]=[...s[r],...o]};default:return(r,n,s)=>{if(s[r]===void 0){s[r]=n;return}s[r]=[...[s[r]].flat(),n]}}}function GX(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Pr(t,e){return e.encode?e.strict?nqe(t):encodeURIComponent(t):t}function Jo(t,e){return e.decode?eqe(t):t}function KX(t){return Array.isArray(t)?t.sort():typeof t=="object"?KX(Object.keys(t)).sort((e,r)=>Number(e)-Number(r)).map(e=>t[e]):t}function QX(t){const e=t.indexOf("#");return e!==-1&&(t=t.slice(0,e)),t}function oqe(t){let e="";const r=t.indexOf("#");return r!==-1&&(e=t.slice(r)),e}function SN(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 uP(t){t=QX(t);const e=t.indexOf("?");return e===-1?"":t.slice(e+1)}function dP(t,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,...e},GX(e.arrayFormatSeparator);const r=iqe(e),n=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return n;for(const s of t.split("&")){if(s==="")continue;const i=e.decode?s.replace(/\+/g," "):s;let[o,a]=HX(i,"=");o===void 0&&(o=i),a=a===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?a:Jo(a,e),r(Jo(o,e),a,n)}for(const[s,i]of Object.entries(n))if(typeof i=="object"&&i!==null)for(const[o,a]of Object.entries(i))i[o]=SN(a,e);else n[s]=SN(i,e);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((s,i)=>{const o=n[i];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?s[i]=KX(o):s[i]=o,s},Object.create(null))}function YX(t,e){if(!t)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},GX(e.arrayFormatSeparator);const r=o=>e.skipNull&&rqe(t[o])||e.skipEmptyString&&t[o]==="",n=sqe(e),s={};for(const[o,a]of Object.entries(t))r(o)||(s[o]=a);const i=Object.keys(s);return e.sort!==!1&&i.sort(e.sort),i.map(o=>{const a=t[o];return a===void 0?"":a===null?Pr(o,e):Array.isArray(a)?a.length===0&&e.arrayFormat==="bracket-separator"?Pr(o,e)+"[]":a.reduce(n(o),[]).join("&"):Pr(o,e)+"="+Pr(a,e)}).filter(o=>o.length>0).join("&")}function JX(t,e){var s;e={decode:!0,...e};let[r,n]=HX(t,"#");return r===void 0&&(r=t),{url:((s=r==null?void 0:r.split("?"))==null?void 0:s[0])??"",query:dP(uP(t),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:Jo(n,e)}:{}}}function XX(t,e){e={encode:!0,strict:!0,[Yk]:!0,...e};const r=QX(t.url).split("?")[0]||"",n=uP(t.url),s={...dP(n,{sort:!1}),...t.query};let i=YX(s,e);i&&(i=`?${i}`);let o=oqe(t.url);if(t.fragmentIdentifier){const a=new URL(r);a.hash=t.fragmentIdentifier,o=e[Yk]?a.hash:`#${t.fragmentIdentifier}`}return`${r}${i}${o}`}function ZX(t,e,r){r={parseFragmentIdentifier:!0,[Yk]:!1,...r};const{url:n,query:s,fragmentIdentifier:i}=JX(t,r);return XX({url:n,query:tqe(s,e),fragmentIdentifier:i},r)}function aqe(t,e,r){const n=Array.isArray(e)?s=>!e.includes(s):(s,i)=>!e(s,i);return ZX(t,n,r)}const lqe=Object.freeze(Object.defineProperty({__proto__:null,exclude:aqe,extract:uP,parse:dP,parseUrl:JX,pick:ZX,stringify:YX,stringifyUrl:XX},Symbol.toStringTag,{value:"Module"})),cqe=[{inputs:[{internalType:"uint256[]",name:"_tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"_tokensBoughtAmounts",type:"uint256[]"},{internalType:"uint256",name:"_maxCurrency",type:"uint256"},{internalType:"uint256",name:"_deadline",type:"uint256"},{internalType:"address",name:"_recipient",type:"address"},{internalType:"address[]",name:"_extraFeeRecipients",type:"address[]"},{internalType:"uint256[]",name:"_extraFeeAmounts",type:"uint256[]"}],name:"buyTokens",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"}],fqe=`Two roads diverged in a yellow wood, Robert Frost poet And sorry I could not travel both @@ -450,4 +450,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.`,fqe=[{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"}],uqe=[{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 kN="u3q5o00";const dqe=()=>{const{theme:t}=Da(),e=P0e("isMobile"),r=i=>{window.open(i)},n=()=>pe(W,{flexDirection:"row",gap:"4",children:fqe.map((i,o)=>pe(W,{onClick:()=>r(i.url),className:kN,gap:"4",children:pe(re,{fontWeight:"normal",fontSize:"small",color:"text50",children:i.label})},o))}),s=()=>pe(W,{gap:"4",justifyContent:"center",alignItems:"center",children:uqe.map(i=>pe(W,{className:kN,onClick:()=>window.open(i.url),children:pe(fr,{height:"3",src:i.icon,alt:i.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})}))});return e?zs(W,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe(n,{}),pe(s,{})]}):zs(W,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe(n,{}),pe(s,{})]})},hqe=t=>{const e=String(Math.round(new Date().getTime()/1e3)+3600),r="1";return{creditCardCheckout:{chainId:137,receiptTitle:"Custom Sequence Kit Checkout Demo",abi:JSON.stringify(lqe),methodName:"buyTokens",methodArguments:{_recipient:"$WALLET",_deadline:e,_maxCurrency:`${Number(r)*10**6}`,_tokenIds:["65570"],_tokensBoughtAmounts:["100"],_extraFeeRecipients:[],_extraFeeAmounts:[]},recipientAddress:t||"",contractAddress:"0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334",currency:"USDC",currencyAmount:`${r}`,collectionContractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",onSuccess:()=>{console.log("success")},onError:()=>{console.log("error")}},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"}]}},vqe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},yqe=t=>`0x${vqe((t==null?void 0:t.substring(2))||"",8)}`;function mqe(){const{theme:t,setTheme:e}=Da(),{address:r,connector:n,isConnected:s}=Pn(),{setOpenConnectModal:i}=QIe(),{setOpenWalletModal:o}=z0(),{triggerCheckout:a}=W0(),{disconnect:l}=Mq(),{data:c}=L4(),f=Rq(),{debug:u}=aqe.parse(location.search),d=u==="true",h=async()=>{if(!(!c||!f))try{const k=await WIe(c);console.log("proof:",k);const $=await HIe(c,f,k);console.log("isValid?:",$)}catch(k){console.error(k)}},v=async()=>{if(c)try{const k=cqe,$=await c.signMessage({account:r||"",message:k});console.log("signature:",$);const[C]=await c.getAddresses(),T=await f.verifyMessage({address:C,message:k,signature:$});console.log("isValid?",T)}catch(k){console.error(k)}},y=()=>{e(t==="dark"?"light":"dark")},b=()=>s?zs(W,{padding:"5",justifyContent:"space-between",children:[zs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"36px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{children:zs(W,{flexDirection:"column",children:[zs(W,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe(W,{style:{marginRight:"-12px"},children:pe(E,{})}),pe(re,{fontWeight:"medium",fontSize:"normal",color:"text100",children:yqe(r||"")})]}),pe(W,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe(re,{fontWeight:"medium",fontSize:"normal",color:"text50",children:n==null?void 0:n.name})})]})})]}):pe(W,{padding:"5",justifyContent:"flex-end",children:pe(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:pe(E,{})})}),p=({title:k,description:$,onClick:C})=>zs(Oo,{style:{width:"332px"},clickable:!0,onClick:C,children:[pe(re,{lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:k}),pe(W,{marginTop:"1",children:pe(re,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:$})})]}),g=()=>{i(!0)},w=()=>{a(hqe(r))},E=()=>pe(nt,{variant:"base",onClick:y,leftIcon:t==="dark"?dde:Yue});return zs(W,{background:"backgroundPrimary",children:[d&&pe(W,{justifyContent:"center",alignItems:"center",children:pe(re,{children:"Debug mode"})}),pe(W,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe(b,{})}),pe(W,{style:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?zs(W,{flexDirection:"column",gap:"4",children:[zs(W,{flexDirection:"column",gap:"2",children:[pe(re,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe(p,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>o(!0)}),pe(p,{title:"Checkout",description:"Checkout screen before placing a purchase on coins or collections",onClick:w}),pe(p,{title:"Sign message",description:"Sign a message with your wallet",onClick:v}),d&&pe(p,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:h})]}),pe(W,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe(nt,{onClick:()=>l(),leftIcon:NU,label:"Sign out"})})]}):pe(W,{children:zs(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[zs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"48px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{gap:"2",flexDirection:"row",alignItems:"center",children:pe(nt,{onClick:g,variant:"feature",label:"Connect"})})]})})}),pe(dqe,{})]})}function pqe(){return function(t){return t.rpcUrls.public.http[0]?{chain:t,rpcUrls:t.rpcUrls.public}:null}}function gqe(){const{chains:t,publicClient:e,webSocketPublicClient:r}=h2e([P2e,_2e],[pqe()]),n=j9e({chains:t,walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:137}),s=F2e({autoConnect:!0,publicClient:e,webSocketPublicClient:r,connectors:n}),i={defaultTheme:LY.dark,signIn:{projectName:"Skyweaver"},displayedAssets:[{contractAddress:Cr,chainId:137},{contractAddress:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",chainId:137},{contractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",chainId:137}]};return pe(gw,{theme:"dark",children:pe(B2e,{config:s,children:pe(iOe,{config:i,children:pe(GUe,{children:pe(QVe,{children:pe(mqe,{})})})})})})}const bqe=L5.createRoot(document.getElementById("root"));bqe.render(pe(P.StrictMode,{children:pe(gqe,{})}));export{lx as $,WWe as A,qWe as B,CWe as C,EWe as D,ui as E,OWe as F,RWe as G,IWe as H,cf as I,PSe as J,TSe as K,AG as L,AWe as M,wWe as N,jWe as O,ESe as P,FWe as Q,cx as R,kWe as S,TA as T,HWe as U,SWe as V,zWe as W,PWe as X,_We as Y,$G as Z,bWe as _,lf as a,LWe as a0,VWe as a1,QWe as a2,KWe as a3,lke as a4,iHe as a5,XWe as a6,cke as a7,GWe as a8,rHe as a9,ZWe as aa,nHe as ab,oHe as ac,eHe as ad,tHe as ae,sHe as af,YWe as ag,$N as ah,ZSe as ai,PG as aj,qE as ak,yWe as al,ZV as am,fe as an,xw as ao,Vn as ap,Wd as aq,vy as ar,uge as as,Iw as at,wa as au,g0 as av,lv as aw,Mo as ax,qe as b,Wr as c,qi as d,hI as e,Ri as f,tZ as g,ll as h,mWe as i,pWe as j,gWe as k,xWe as l,ls as m,TWe as n,M0 as o,MWe as p,$We as q,rx as r,BWe as s,Xd as t,NWe as u,Zd as v,Hi as w,DWe as x,UWe as y,JWe as z}; +And that has made all the difference.`,uqe=[{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"}],dqe=[{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 kN="u3q5o00";const hqe=()=>{const{theme:t}=Na(),e=wde("isMobile"),r=i=>{window.open(i)},n=()=>pe(W,{flexDirection:"row",gap:"4",children:uqe.map((i,o)=>pe(W,{onClick:()=>r(i.url),className:kN,gap:"4",children:pe(re,{fontWeight:"normal",fontSize:"small",color:"text50",children:i.label})},o))}),s=()=>pe(W,{gap:"4",justifyContent:"center",alignItems:"center",children:dqe.map((i,o)=>pe(W,{className:kN,onClick:()=>window.open(i.url),children:pe(fr,{height:"3",src:i.icon,alt:i.id,style:{filter:t==="dark"?"invert(0)":"invert(1)"}})},o))});return e?Vs(W,{flexDirection:"column",padding:"5",gap:"2",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"center",alignItems:"center",children:[pe(n,{}),pe(s,{})]}):Vs(W,{padding:"5",style:{height:"60px"},position:"fixed",bottom:"0",width:"full",justifyContent:"space-between",children:[pe(n,{}),pe(s,{})]})},vqe=t=>{const e=String(Math.round(new Date().getTime()/1e3)+3600),r="1";return{creditCardCheckout:{chainId:137,receiptTitle:"Custom Sequence Kit Checkout Demo",abi:JSON.stringify(cqe),methodName:"buyTokens",methodArguments:{_recipient:"$WALLET",_deadline:e,_maxCurrency:`${Number(r)*10**6}`,_tokenIds:["65570"],_tokensBoughtAmounts:["100"],_extraFeeRecipients:[],_extraFeeAmounts:[]},recipientAddress:t||"",contractAddress:"0x8bb759bb68995343ff1e9d57ac85ff5c5fb79334",currency:"USDC",currencyAmount:`${r}`,collectionContractAddress:"0x631998e91476da5b870d741192fc5cbc55f5a52e",onSuccess:()=>{console.log("success")},onError:()=>{console.log("error")}},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"}]}},yqe=(t,e)=>{let r=t;return t.length>=e&&(r=t.slice(0,e/2)+"..."+t.slice(t.length-e/2,t.length)),r},mqe=t=>`0x${yqe((t==null?void 0:t.substring(2))||"",8)}`;function pqe(){const{theme:t,setTheme:e}=Na(),{address:r,connector:n,isConnected:s}=Tn(),{setOpenConnectModal:i}=YIe(),{setOpenWalletModal:o}=V0(),{triggerCheckout:a}=H0(),{disconnect:l}=rV(),{data:c}=p4(),f=Zz(),{debug:u}=lqe.parse(location.search),d=u==="true",h=async()=>{if(!(!c||!f))try{const k=await HIe(c);console.log("proof:",k);const $=await GIe(c,f,k);console.log("isValid?:",$)}catch(k){console.error(k)}},v=async()=>{if(c)try{const k=fqe,$=await c.signMessage({account:r||"",message:k});console.log("signature:",$);const[x]=await c.getAddresses(),T=await f.verifyMessage({address:x,message:k,signature:$});console.log("isValid?",T)}catch(k){console.error(k)}},y=()=>{e(t==="dark"?"light":"dark")},g=()=>s?Vs(W,{padding:"5",justifyContent:"space-between",children:[Vs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"36px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"24px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{children:Vs(W,{flexDirection:"column",children:[Vs(W,{flexDirection:"row",gap:"2",justifyContent:"flex-end",alignItems:"center",children:[pe(W,{style:{marginRight:"-12px"},children:pe(E,{})}),pe(re,{fontWeight:"medium",fontSize:"normal",color:"text100",children:mqe(r||"")})]}),pe(W,{alignItems:"center",justifyContent:"flex-end",flexDirection:"row",children:pe(re,{fontWeight:"medium",fontSize:"normal",color:"text50",children:n==null?void 0:n.name})})]})})]}):pe(W,{padding:"5",justifyContent:"flex-end",children:pe(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:pe(E,{})})}),b=({title:k,description:$,onClick:x})=>Vs(To,{style:{width:"332px"},clickable:!0,onClick:x,children:[pe(re,{lineHeight:"5",fontSize:"normal",fontWeight:"bold",children:k}),pe(W,{marginTop:"1",children:pe(re,{fontWeight:"medium",lineHeight:"5",color:"text50",fontSize:"normal",children:$})})]}),p=()=>{i(!0)},w=()=>{a(vqe(r))},E=()=>pe(nt,{variant:"base",onClick:y,leftIcon:t==="dark"?nae:Uoe});return Vs(W,{background:"backgroundPrimary",children:[d&&pe(W,{justifyContent:"center",alignItems:"center",children:pe(re,{children:"Debug mode"})}),pe(W,{style:{height:"72px"},position:"fixed",width:"full",top:"0",children:pe(g,{})}),pe(W,{style:{height:"100vh"},flexDirection:"column",justifyContent:"center",alignItems:"center",children:s?Vs(W,{flexDirection:"column",gap:"4",children:[Vs(W,{flexDirection:"column",gap:"2",children:[pe(re,{color:"text50",fontSize:"small",fontWeight:"medium",children:"Demos"}),pe(b,{title:"Embedded wallet",description:"Connect a Sequence wallet to view, swap, send, and receive collections",onClick:()=>o(!0)}),pe(b,{title:"Checkout",description:"Checkout screen before placing a purchase on coins or collections",onClick:w}),pe(b,{title:"Sign message",description:"Sign a message with your wallet",onClick:v}),d&&pe(b,{title:"Generate EthAuth proof",description:"Generate EthAuth proof",onClick:h})]}),pe(W,{width:"full",gap:"2",flexDirection:"row",justifyContent:"flex-end",children:pe(nt,{onClick:()=>l(),leftIcon:sB,label:"Sign out"})})]}):pe(W,{children:Vs(W,{flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"5",children:[Vs(W,{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"3",children:[pe(fr,{style:{width:"48px"},src:"kit-logo.svg"}),pe(fr,{style:{width:"32px",filter:t==="dark"?"invert(0)":"invert(1)"},src:"kit-logo-text.svg"})]}),pe(W,{gap:"2",flexDirection:"row",alignItems:"center",children:pe(nt,{onClick:p,variant:"feature",label:"Connect"})})]})})}),pe(hqe,{})]})}function gqe(){return function(t){return t.rpcUrls.public.http[0]?{chain:t,rpcUrls:t.rpcUrls.public}:null}}function bqe(){const{chains:t,publicClient:e,webSocketPublicClient:r}=s0e([w0e,b0e],[gqe()]),n=j9e({chains:t,walletConnectProjectId:"c65a6cb1aa83c4e24500130f23a437d8",defaultChainId:137}),s=T0e({autoConnect:!0,publicClient:e,webSocketPublicClient:r,connectors:n}),i={defaultTheme:LY.dark,signIn:{projectName:"Skyweaver"}};return pe(fw,{theme:"dark",children:pe(R0e,{config:s,children:pe(oOe,{config:i,children:pe(KUe,{children:pe(YVe,{children:pe(pqe,{})})})})})})}const wqe=j5.createRoot(document.getElementById("root"));wqe.render(pe(P.StrictMode,{children:pe(bqe,{})}));export{cx as $,HWe as A,WWe as B,EWe as C,SWe as D,di as E,MWe as F,IWe as G,OWe as H,ff as I,PSe as J,TSe as K,AG as L,_We as M,xWe as N,FWe as O,ESe as P,BWe as Q,fx as R,$We as S,RA as T,GWe as U,kWe as V,VWe as W,TWe as X,PWe as Y,$G as Z,wWe as _,cf as a,jWe as a0,qWe as a1,YWe as a2,QWe as a3,lke as a4,oHe as a5,ZWe as a6,cke as a7,KWe as a8,nHe as a9,eHe as aa,sHe as ab,aHe as ac,tHe as ad,rHe as ae,iHe as af,JWe as ag,$N as ah,ZSe as ai,PG as aj,WE as ak,mWe as al,xz as am,fe as an,hw as ao,qn as ap,Bd as aq,oy as ar,rve as as,Sw as at,ya as au,v0 as av,nv as aw,Ro as ax,qe as b,Wr as c,Wi as d,vI as e,Ii as f,tZ as g,cl as h,pWe as i,gWe as j,bWe as k,CWe as l,cs as m,RWe as n,D0 as o,DWe as p,AWe as q,nx as r,UWe as s,Zd as t,LWe as u,eh as v,Gi as w,NWe as x,zWe as y,XWe as z}; diff --git a/assets/index.es-5f20ba08.js b/assets/index.es-d71ec09d.js similarity index 99% rename from assets/index.es-5f20ba08.js rename to assets/index.es-d71ec09d.js index 7a884264..fe2d94d3 100644 --- a/assets/index.es-5f20ba08.js +++ b/assets/index.es-d71ec09d.js @@ -1,4 +1,4 @@ -import{c as hr,t as bi,g as f1,a as ne,b as p1,w as $l,r as jl,f as vc,d as fo,e as d1,I as _i,A as g1,U as v1,h as Q,i as y1,j as cc,k as m1,_ as _1,P as w1,V as Ah,l as b1,D as E1,C as x1,Z as Ch,$ as I1,m as S1,n as oo,q as P1,o as Ml,p as Fr,y as A1,s as C1,X as cs,u as Ft,v as rr,x as mi,z as ur,B as O1,E as us,F as Ul,G as R1,H as T1,J as N1,K as ql,L as L1,M as zl,Y as kl,N as ls,O as uc,Q as ro,R as ps,S as D1,T as io,W as F1,a0 as $1,a1 as j1,a2 as M1,a3 as U1,a4 as Va,a5 as Oh,a6 as q1,a7 as z1,a8 as k1,a9 as Rh,aa as H1,ab as B1,ac as V1,ad as K1,ae as G1,af as W1,ag as J1,ah as Y1,ai as so,aj as Hl,ak as Ka,al as X1,am as Z1}from"./index-3c24af3d.js";var kt={},Q1={get exports(){return kt},set exports(c){kt=c}},fs=typeof Reflect=="object"?Reflect:null,Th=fs&&typeof fs.apply=="function"?fs.apply:function(r,i,n){return Function.prototype.apply.call(r,i,n)},no;fs&&typeof fs.ownKeys=="function"?no=fs.ownKeys:Object.getOwnPropertySymbols?no=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:no=function(r){return Object.getOwnPropertyNames(r)};function em(c){console&&console.warn&&console.warn(c)}var Bl=Number.isNaN||function(r){return r!==r};function He(){He.init.call(this)}Q1.exports=He;kt.once=sm;He.EventEmitter=He;He.prototype._events=void 0;He.prototype._eventsCount=0;He.prototype._maxListeners=void 0;var Nh=10;function po(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 Nh},set:function(c){if(typeof c!="number"||c<0||Bl(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");Nh=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||Bl(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 Vl(c){return c._maxListeners===void 0?He.defaultMaxListeners:c._maxListeners}He.prototype.getMaxListeners=function(){return Vl(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")Th(w,this,i);else for(var A=w.length,F=Yl(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 Kl(this,r,i,!1)};He.prototype.on=He.prototype.addListener;He.prototype.prependListener=function(r,i){return Kl(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 Gl(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 po(i),this.on(r,Gl(this,r,i)),this};He.prototype.prependOnceListener=function(r,i){return po(i),this.prependListener(r,Gl(this,r,i)),this};He.prototype.removeListener=function(r,i){var n,o,h,d,y;if(po(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 Wl(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):Yl(o,o.length)}He.prototype.listeners=function(r){return Wl(this,r,!0)};He.prototype.rawListeners=function(r){return Wl(this,r,!1)};He.listenerCount=function(c,r){return typeof c.listenerCount=="function"?c.listenerCount(r):Jl.call(c,r)};He.prototype.listenerCount=Jl;function Jl(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?no(this._events):[]};function Yl(c,r){for(var i=new Array(r),n=0;ntypeof i>"u"?null:i)}Ks.safeJsonStringify=am;var ao={},Ga={get exports(){return ao},set exports(c){ao=c}},Lh;function cm(){return Lh||(Lh=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 hr<"u"&&hr.localStorage?Ga.exports=hr.localStorage:typeof window<"u"&&window.localStorage?Ga.exports=window.localStorage:Ga.exports=new r}()),ao}var Wa={},Ds={},Dh;function um(){if(Dh)return Ds;Dh=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.IKeyValueStorage=void 0;class c{}return Ds.IKeyValueStorage=c,Ds}var Fs={},Fh;function hm(){if(Fh)return Fs;Fh=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.parseEntry=void 0;const c=Ks;function r(i){var n;return[i[0],c.safeJsonParse((n=i[1])!==null&&n!==void 0?n:"")]}return Fs.parseEntry=r,Fs}var $h;function lm(){return $h||($h=1,function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(um(),c),r.__exportStar(hm(),c)}(Wa)),Wa}Object.defineProperty(go,"__esModule",{value:!0});go.KeyValueStorage=void 0;const hs=bi,jh=Ks,fm=hs.__importDefault(cm()),pm=lm();class Zl{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 jh.safeJsonParse(i)})}setItem(r,i){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(r,jh.safeJsonStringify(i))})}removeItem(r){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(r)})}}go.KeyValueStorage=Zl;var dm=go.default=Zl,ds={},$s={},Ja={},js={};let qi=class{};const gm=Object.freeze(Object.defineProperty({__proto__:null,IEvents:qi},Symbol.toStringTag,{value:"Module"})),vm=f1(gm);var Mh;function ym(){if(Mh)return js;Mh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.IHeartBeat=void 0;const c=vm;class r extends c.IEvents{constructor(n){super()}}return js.IHeartBeat=r,js}var Uh;function Ql(){return Uh||(Uh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(ym(),c)}(Ja)),Ja}var Ya={},Mi={},qh;function mm(){if(qh)return Mi;qh=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 zh;function ef(){return zh||(zh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(mm(),c)}(Ya)),Ya}var kh;function _m(){if(kh)return $s;kh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.HeartBeat=void 0;const c=bi,r=kt,i=ne,n=Ql(),o=ef();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 $s.HeartBeat=h,$s}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(_m(),c),r.__exportStar(Ql(),c),r.__exportStar(ef(),c)})(ds);var Re={},Xa,Hh;function wm(){if(Hh)return Xa;Hh=1;function c(i){try{return JSON.stringify(i)}catch{return'"[Circular]"'}}Xa=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}tr.getLoggerContext=o;function h(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=o(y,A);return F.trim()?`${F}/${w}`:w}tr.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 tr.generateChildLogger=d,tr}(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(tf(),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 yc(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 Vs(c){return typeof c=="string"?c:Dm(c)||""}var mc={},rf={};(function(c){Object.defineProperty(c,"__esModule",{value:!0});var r=p1,i=$l;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})(rf);(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=jl,i=rf,n=$l;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,Ht=0,Bt=0,Ut=0,Jt=0,ir=0,Mr=0,Yt=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,Ht+=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,Ht+=u*Tt,Bt+=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,Ht+=u*Xe,Bt+=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,Ht+=u*vt,Bt+=u*Xe,Ut+=u*Tt,Jt+=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,Ht+=u*wt,Bt+=u*vt,Ut+=u*Xe,Jt+=u*Tt,ir+=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,Ht+=u*gt,Bt+=u*wt,Ut+=u*vt,Jt+=u*Xe,ir+=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,Ht+=u*Rt,Bt+=u*gt,Ut+=u*wt,Jt+=u*vt,ir+=u*Xe,Mr+=u*Tt,Yt+=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,Ht+=u*dt,Bt+=u*Rt,Ut+=u*gt,Jt+=u*wt,ir+=u*vt,Mr+=u*Xe,Yt+=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,Ht+=u*Ot,Bt+=u*dt,Ut+=u*Rt,Jt+=u*gt,ir+=u*wt,Mr+=u*vt,Yt+=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,Ht+=u*Ct,Bt+=u*Ot,Ut+=u*dt,Jt+=u*Rt,ir+=u*gt,Mr+=u*wt,Yt+=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*Ht,Pt+=38*Bt,_t+=38*Ut,ot+=38*Jt,$e+=38*ir,Ze+=38*Mr,Qe+=38*Yt,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})(mc);const $m="EdDSA",jm="JWT",sf=".",nf="base64url",Mm="utf8",Um="utf8",qm=":",zm="did",km="key",Gh="base58btc",Hm="z",Bm="K36",Vm=32;function co(c){return fo(vc(Vs(c),Mm),nf)}function of(c){const r=vc(Bm,Gh),i=Hm+fo(d1([r,c]),Gh);return[zm,km,i].join(qm)}function Km(c){return fo(c,nf)}function Gm(c){return vc([co(c.header),co(c.payload)].join(sf),Um)}function Wm(c){return[co(c.header),co(c.payload),Km(c.signature)].join(sf)}function Wh(c=jl.randomBytes(Vm)){return mc.generateKeyPairFromSeed(c)}async function Jm(c,r,i,n,o=ne.fromMiliseconds(Date.now())){const h={alg:$m,typ:jm},d=of(n.publicKey),y=o+i,w={iss:d,sub:c,aud:r,iat:o,exp:y},A=Gm({header:h,payload:w}),F=mc.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",af="INTERNAL_ERROR",_c="SERVER_ERROR",e_=[-32700,-32600,-32601,-32602,-32603],Bs={[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"},[af]:{code:-32603,message:"Internal error"},[_c]:{code:-32e3,message:"Server error"}},cf=_c;function t_(c){return e_.includes(c)}function Jh(c){return Object.keys(Bs).includes(c)?Bs[c]:Bs[cf]}function r_(c){const r=Object.values(Bs).find(i=>i.code===c);return r||Bs[cf]}function uf(c,r,i){return c.message.includes("getaddrinfo ENOTFOUND")||c.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${i} RPC url at ${r}`):c}var hf={},si={},Yh;function i_(){if(Yh)return si;Yh=1,Object.defineProperty(si,"__esModule",{value:!0}),si.isBrowserCryptoAvailable=si.getSubtleCrypto=si.getBrowerCrypto=void 0;function c(){return(hr===null||hr===void 0?void 0:hr.crypto)||(hr===null||hr===void 0?void 0:hr.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={},Xh;function s_(){if(Xh)return ni;Xh=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)})(hf);function lf(c=3){const r=Date.now()*Math.pow(10,c),i=Math.floor(Math.random()*Math.pow(10,c));return r+i}function wc(c=6){return BigInt(lf(c))}function vo(c,r,i){return{id:i||lf(),jsonrpc:"2.0",method:c,params:r}}function bc(c,r){return{id:c,jsonrpc:"2.0",result:r}}function yo(c,r,i){return{id:c,jsonrpc:"2.0",error:n_(r,i)}}function n_(c,r){return typeof c>"u"?Jh(af):(typeof c=="string"&&(c=Object.assign(Object.assign({},Jh(_c)),{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 ff(c,r){const i=l_(c);return typeof i>"u"?!1:new RegExp(r).test(i)}function Zh(c){return ff(c,u_)}function Qh(c){return ff(c,h_)}function f_(c){return new RegExp("wss?://localhost(:d{2,5})?").test(c)}function pf(c){return typeof c=="object"&&"id"in c&&"jsonrpc"in c&&c.jsonrpc==="2.0"}function Ec(c){return pf(c)&&"method"in c}function mo(c){return pf(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 kt.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(vo(r.method,r.params||[],r.id||wc().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),mo(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",el=c=>c.split("?")[0],tl=10,g_=p_();class v_{constructor(r){if(this.url=r,this.events=new kt.EventEmitter,this.registering=!1,!Qh(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(Vs(r))}catch(n){this.onError(r.id,n)}}register(r=this.url){if(!Qh(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=hf.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"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,el(i),"WS")}resetMaxListeners(){this.events.getMaxListeners()>tl&&this.events.setMaxListeners(tl)}emitError(r){const i=this.parseError(new Error((r==null?void 0:r.message)||`WebSocket connection failed for host: ${el(this.url)}`));return this.events.emit("register_error",i),i}}var uo={},y_={get exports(){return uo},set exports(c){uo=c}};(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 hr=="object"&&hr&&hr.Object===Object&&hr,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 Co(g,x){var $=this.__data__,Y=Si($,g);return Y<0?(++this.size,$.push([g,x])):$[Y][1]=x,this}yr.prototype.clear=Io,yr.prototype.delete=So,yr.prototype.get=Po,yr.prototype.has=Ao,yr.prototype.set=Co;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 Oo(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 Ro(g){return ci(this,g).has(g)}function To(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=Oo,Gr.prototype.get=Hi,Gr.prototype.has=Ro,Gr.prototype.set=To;function Bi(g){var x=-1,$=g==null?0:g.length;for(this.__data__=new Gr;++x<$;)this.add(g[x])}function Ws(g){return this.__data__.set(g,n),this}function Js(g){return this.__data__.has(g)}Bi.prototype.add=Bi.prototype.push=Ws,Bi.prototype.has=Js;function Or(g){var x=this.__data__=new yr(g);this.size=x.size}function No(){this.__data__=new yr,this.size=0}function Lo(g){var x=this.__data__,$=x.delete(g);return this.size=x.size,$}function Do(g){return this.__data__.get(g)}function Fo(g){return this.__data__.has(g)}function Ys(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,sr=!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 fn(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Ci(g){return g!=null&&typeof g=="object"}var pn=we?_t(we):Qs;function zo(g){return Uo(g)?Xs(g):en(g)}function Ke(){return[]}function ke(){return!1}c.exports=qo})(y_,uo);function m_(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 __=m_,w_=__;const df=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")},b_=c=>new TextEncoder().encode(c),E_=c=>new TextDecoder().decode(c);class x_{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 I_{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 gf(this,r)}}class S_{constructor(r){this.decoders=r}or(r){return gf(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 gf=(c,r)=>new S_({...c.decoders||{[c.prefix]:c},...r.decoders||{[r.prefix]:r}});class P_{constructor(r,i,n,o){this.name=r,this.prefix=i,this.baseEncode=n,this.baseDecode=o,this.encoder=new x_(r,i,n),this.decoder=new I_(r,i,o)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const _o=({name:c,prefix:r,encode:i,decode:n})=>new P_(c,r,i,n),Gs=({prefix:c,name:r,alphabet:i})=>{const{encode:n,decode:o}=w_(i,r);return _o({prefix:c,name:r,encode:n,decode:h=>df(o(h))})},A_=(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},C_=(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<_o({prefix:r,name:c,encode(o){return C_(o,n,i)},decode(o){return A_(o,n,i,c)}}),O_=_o({prefix:"\0",name:"identity",encode:c=>E_(c),decode:c=>b_(c)});var R_=Object.freeze({__proto__:null,identity:O_});const T_=Kt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var N_=Object.freeze({__proto__:null,base2:T_});const L_=Kt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var D_=Object.freeze({__proto__:null,base8:L_});const F_=Gs({prefix:"9",name:"base10",alphabet:"0123456789"});var $_=Object.freeze({__proto__:null,base10:F_});const j_=Kt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),M_=Kt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var U_=Object.freeze({__proto__:null,base16:j_,base16upper:M_});const q_=Kt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),z_=Kt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),k_=Kt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),H_=Kt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),B_=Kt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),V_=Kt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),K_=Kt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),G_=Kt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),W_=Kt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var J_=Object.freeze({__proto__:null,base32:q_,base32upper:z_,base32pad:k_,base32padupper:H_,base32hex:B_,base32hexupper:V_,base32hexpad:K_,base32hexpadupper:G_,base32z:W_});const Y_=Gs({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X_=Gs({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Z_=Object.freeze({__proto__:null,base36:Y_,base36upper:X_});const Q_=Gs({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ew=Gs({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var tw=Object.freeze({__proto__:null,base58btc:Q_,base58flickr:ew});const rw=Kt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),iw=Kt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),sw=Kt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),nw=Kt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ow=Object.freeze({__proto__:null,base64:rw,base64pad:iw,base64url:sw,base64urlpad:nw});const vf=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),aw=vf.reduce((c,r,i)=>(c[i]=r,c),[]),cw=vf.reduce((c,r,i)=>(c[r.codePointAt(0)]=i,c),[]);function uw(c){return c.reduce((r,i)=>(r+=aw[i],r),"")}function hw(c){const r=[];for(const i of c){const n=cw[i.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${i}`);r.push(n)}return new Uint8Array(r)}const lw=_o({prefix:"🚀",name:"base256emoji",encode:uw,decode:hw});var fw=Object.freeze({__proto__:null,base256emoji:lw}),pw=yf,rl=128,dw=127,gw=~dw,vw=Math.pow(2,31);function yf(c,r,i){r=r||[],i=i||0;for(var n=i;c>=vw;)r[i++]=c&255|rl,c/=128;for(;c&gw;)r[i++]=c&255|rl,c>>>=7;return r[i]=c|0,yf.bytes=i-n+1,r}var yw=hc,mw=128,il=127;function hc(c,n){var i=0,n=n||0,o=0,h=n,d,y=c.length;do{if(h>=y)throw hc.bytes=0,new RangeError("Could not decode varint");d=c[h++],i+=o<28?(d&il)<=mw);return hc.bytes=h-n,i}var _w=Math.pow(2,7),ww=Math.pow(2,14),bw=Math.pow(2,21),Ew=Math.pow(2,28),xw=Math.pow(2,35),Iw=Math.pow(2,42),Sw=Math.pow(2,49),Pw=Math.pow(2,56),Aw=Math.pow(2,63),Cw=function(c){return c<_w?1:c(mf.encode(c,r,i),r),nl=c=>mf.encodingLength(c),lc=(c,r)=>{const i=r.byteLength,n=nl(c),o=n+nl(i),h=new Uint8Array(o+i);return sl(c,h,0),sl(i,h,n),h.set(r,o),new Rw(c,i,r,h)};class Rw{constructor(r,i,n,o){this.code=r,this.size=i,this.digest=n,this.bytes=o}}const _f=({name:c,code:r,encode:i})=>new Tw(c,r,i);class Tw{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?lc(this.code,i):i.then(n=>lc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const wf=c=>async r=>new Uint8Array(await crypto.subtle.digest(c,r)),Nw=_f({name:"sha2-256",code:18,encode:wf("SHA-256")}),Lw=_f({name:"sha2-512",code:19,encode:wf("SHA-512")});var Dw=Object.freeze({__proto__:null,sha256:Nw,sha512:Lw});const bf=0,Fw="identity",Ef=df,$w=c=>lc(bf,Ef(c)),jw={code:bf,name:Fw,encode:Ef,digest:$w};var Mw=Object.freeze({__proto__:null,identity:jw});new TextEncoder,new TextDecoder;const ol={...R_,...N_,...D_,...$_,...U_,...J_,...Z_,...tw,...ow,...fw};({...Dw,...Mw});function xf(c){return globalThis.Buffer!=null?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):c}function Uw(c=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?xf(globalThis.Buffer.allocUnsafe(c)):new Uint8Array(c)}function If(c,r,i,n){return{name:c,prefix:r,encoder:{name:c,prefix:r,encode:i},decoder:{decode:n}}}const al=If("utf8","u",c=>"u"+new TextDecoder("utf8").decode(c),c=>new TextEncoder().encode(c.substring(1))),Qa=If("ascii","a",c=>{let r="a";for(let i=0;i{c=c.substring(1);const r=Uw(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,zl(r))}async getKeyChain(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(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 yb{constructor(r,i,n){this.core=r,this.logger=i,this.name=Vw,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=Wh(o);return of(h.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=y1();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const h=await this.getClientSeed(),d=Wh(h),y=cc();return await Jm(y,o,Kw,d)},this.generateSharedKey=(o,h,d)=>{this.isInitialized();const y=this.getPrivateKey(o),w=m1(y,h);return this.setSymKey(w,d)},this.setSymKey=async(o,h)=>{this.isInitialized();const d=h||_1(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=w1(d),w=Vs(h);if(Ah(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 b1({type:F,symKey:A,message:w,senderPublicKey:K})},this.decode=async(o,h,d)=>{this.isInitialized();const y=E1(h,d);if(Ah(y)){const F=y.receiverPublicKey,K=y.senderPublicKey;o=await this.generateSharedKey(F,K)}const w=this.getSymKey(o),A=x1({symKey:w,encoded:h});return yc(A)},this.getPayloadType=o=>{const h=Ch(o);return I1(h.type)},this.getPayloadSenderPublicKey=o=>{const h=Ch(o);return h.senderPublicKey?fo(h.senderPublicKey,S1):void 0},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.keychain=n||new vb(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(cl)}catch{r=cc(),await this.keychain.set(cl,r)}return zw(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 mb extends Sm{constructor(r,i){super(r,i),this.logger=r,this.core=i,this.messages=new Map,this.name=Jw,this.version=Yw,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,zl(r))}async getRelayerMessages(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(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 _b extends Pm{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.events=new kt.EventEmitter,this.name=Zw,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)||Xw,y=uc(h),w=(h==null?void 0:h.prompt)||!1,A=(h==null?void 0:h.tag)||0,F=(h==null?void 0:h.id)||wc().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 oo(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:ro(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 wb{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 bb=Object.defineProperty,Eb=Object.defineProperties,xb=Object.getOwnPropertyDescriptors,ll=Object.getOwnPropertySymbols,Ib=Object.prototype.hasOwnProperty,Sb=Object.prototype.propertyIsEnumerable,fl=(c,r,i)=>r in c?bb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,qs=(c,r)=>{for(var i in r||(r={}))Ib.call(r,i)&&fl(c,i,r[i]);if(ll)for(var i of ll(r))Sb.call(r,i)&&fl(c,i,r[i]);return c},tc=(c,r)=>Eb(c,xb(r));class Pb extends Om{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.subscriptions=new Map,this.topicMap=new wb,this.events=new kt.EventEmitter,this.name=ab,this.version=cb,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=uc(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)>=ub&&(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=uc(n);await this.rpcUnsubscribe(r,i,o);const h=rr("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:ro(i.protocol).subscribe,params:{topic:r}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await oo(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:ro(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 oo(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:ro(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,tc(qs({},i),{id:r})),this.pending.delete(i.topic)}onBatchSubscribe(r){r.length&&r.forEach(i=>{this.setSubscription(i.id,qs({},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,qs({},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,tc(qs({},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)=>tc(qs({},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 Ab=Object.defineProperty,pl=Object.getOwnPropertySymbols,Cb=Object.prototype.hasOwnProperty,Ob=Object.prototype.propertyIsEnumerable,dl=(c,r,i)=>r in c?Ab(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Rb=(c,r)=>{for(var i in r||(r={}))Cb.call(r,i)&&dl(c,i,r[i]);if(pl)for(var i of pl(r))Ob.call(r,i)&&dl(c,i,r[i]);return c};class Tb extends Am{constructor(r){super(r),this.protocol="wc",this.version=2,this.events=new kt.EventEmitter,this.name=eb,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||Qw})),this.messages=new mb(this.logger,r.core),this.subscriber=new Pb(this,this.logger),this.publisher=new _b(this,this.logger),this.relayUrl=(r==null?void 0:r.relayUrl)||Af,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 ${ul}...`),await this.restartTransport(ul)}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)},sb)}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 oo(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(Ms.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_(P1({sdkVersion:ib,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}),Ec(r)){if(!r.method.endsWith(tb))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(Rb({type:"event",event:i.id},d)),this.events.emit(i.id,d),await this.acknowledgePayload(r),await this.onMessageEvent(d)}else mo(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=bc(r.id,!0);await this.provider.connection.send(i)}registerProviderListeners(){this.provider.on(Ms.payload,r=>this.onProviderPayload(r)),this.provider.on(Ms.connect,()=>{this.events.emit(mt.connect)}),this.provider.on(Ms.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Ms.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(rb))}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 Nb=Object.defineProperty,gl=Object.getOwnPropertySymbols,Lb=Object.prototype.hasOwnProperty,Db=Object.prototype.propertyIsEnumerable,vl=(c,r,i)=>r in c?Nb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,yl=(c,r)=>{for(var i in r||(r={}))Lb.call(r,i)&&vl(c,i,r[i]);if(gl)for(var i of gl(r))Db.call(r,i)&&vl(c,i,r[i]);return c};class wo 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=nb,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):g1(d)?this.map.set(d.id,d):v1(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=>uo(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=yl(yl({},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 Fb{constructor(r,i){this.core=r,this.logger=i,this.name=hb,this.version=lb,this.events=new kt,this.initialized=!1,this.storagePrefix=wi,this.ignoredPayloadTypes=[Ml],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=cc(),o=await this.core.crypto.setSymKey(n),h=Fr(ne.FIVE_MINUTES),d={protocol:Pf},y={topic:o,expiry:h,relay:d,active:!1},w=A1({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}=C1(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",rr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,h)=>{const d=vo(o,h),y=await this.core.crypto.encode(n,d),w=Us[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=bc(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[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=yo(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[w.request.method]?Us[w.request.method].res:Us.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,rr("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=rr("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(rr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!ur(n)){const{message:o}=Q("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!O1(n.uri)){const{message:o}=Q("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!ur(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(!ur(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 wo(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);Ec(o)?(this.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(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}=Ul(r.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit("pairing_expire",{topic:i}))})}}class $b extends Im{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.records=new Map,this.events=new kt.EventEmitter,this.name=fb,this.version=pb,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:vo(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 jb extends Rm{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.expirations=new Map,this.events=new kt.EventEmitter,this.name=db,this.version=gb,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 R1(r);if(typeof r=="number")return T1(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 Mb extends Tm{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.name=ec,this.initialized=!1,this.init=async n=>{N1()||!ql()||(this.verifyUrl=(n==null?void 0:n.verifyUrl)||hl,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(ec))return n();const h=document.createElement("iframe");h.setAttribute("id",ec),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=hl,this.abortController=new AbortController,this.isDevEnv=L1()&&{}.IS_VITEST}get context(){return Re.getLoggerContext(this.logger)}startAbortTimer(r){return setTimeout(()=>this.abortController.abort(),ne.toMiliseconds(r))}}var Ub=Object.defineProperty,ml=Object.getOwnPropertySymbols,qb=Object.prototype.hasOwnProperty,zb=Object.prototype.propertyIsEnumerable,_l=(c,r,i)=>r in c?Ub(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,wl=(c,r)=>{for(var i in r||(r={}))qb.call(r,i)&&_l(c,i,r[i]);if(ml)for(var i of ml(r))zb.call(r,i)&&_l(c,i,r[i]);return c};class Ic extends xm{constructor(r){super(r),this.protocol=Sf,this.version=kw,this.name=xc,this.events=new kt.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)||Af;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)||Hw.logger}));this.logger=Re.generateChildLogger(i,this.name),this.heartbeat=new ds.HeartBeat,this.crypto=new yb(this,this.logger,r==null?void 0:r.keychain),this.history=new $b(this,this.logger),this.expirer=new jb(this,this.logger),this.storage=r!=null&&r.storage?r.storage:new dm(wl(wl({},Bw),r==null?void 0:r.storageOptions)),this.relayer=new Tb({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Fb(this,this.logger),this.verify=new Mb(this.projectId||"",this.logger)}static async init(r){const i=new Ic(r);await i.initialize();const n=await i.crypto.getClientId();return await i.storage.setItem(ob,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 kb=Ic,Cf="wc",Of=2,Rf="client",Sc=`${Cf}@${Of}:${Rf}:`,rc={name:Rf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Hb="WALLETCONNECT_DEEPLINK_CHOICE",Bb="proposal",Tf="Proposal expired",Vb="session",Qn=ne.SEVEN_DAYS,Kb="engine",zs={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}}},ic={min:ne.FIVE_MINUTES,max:ne.SEVEN_DAYS},Gb="request",Wb=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Jb=Object.defineProperty,Yb=Object.defineProperties,Xb=Object.getOwnPropertyDescriptors,bl=Object.getOwnPropertySymbols,Zb=Object.prototype.hasOwnProperty,Qb=Object.prototype.propertyIsEnumerable,El=(c,r,i)=>r in c?Jb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Pr=(c,r)=>{for(var i in r||(r={}))Zb.call(r,i)&&El(c,i,r[i]);if(bl)for(var i of bl(r))Qb.call(r,i)&&El(c,i,r[i]);return c},sc=(c,r)=>Yb(c,Xb(r));class eE extends Lm{constructor(r){super(r),this.name=Kb,this.events=new kt,this.initialized=!1,this.ignoredPayloadTypes=[Ml],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(zs)}),this.initialized=!0)},this.connect=async i=>{this.isInitialized();const n=sc(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:Pf}],proposer:{publicKey:J,metadata:this.client.metadata}},y&&{sessionProperties:y}),{reject:j,resolve:V,done:ie}=cs(ne.FIVE_MINUTES,Tf);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=sc(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||"",io(F)||(F=F1(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,rr("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(Qn)},d&&{sessionProperties:d});await this.client.core.relayer.subscribe(j),await this.sendRequest(j,"wc_sessionSettle",V);const ie=sc(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(Qn)),{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,rr("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(Qn)),{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(Hb);return $1({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=wc().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",rr("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=>j1(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,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),n||this.client.core.expirer.del(i)},this.deleteProposal=async(i,n)=>{await Promise.all([this.client.proposal.delete(i,rr("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=zs.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=vo(n,o);if(ql()&&Wb.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=zs[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=bc(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[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=yo(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[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,rr("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,rr("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(Qn)),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(!ur(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),!M1(y,!0)){const{message:w}=Q("MISSING_OR_INVALID",`connect() relays: ${y}`);throw new Error(w)}!_i(o)&&io(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!_i(h)&&io(h)!==0&&this.validateNamespaces(h,"optionalNamespaces"),_i(d)||this.validateSessionProps(d,"sessionProperties")},this.validateNamespaces=(i,n)=>{const o=U1(i,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async i=>{if(!ur(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=Va(o,"approve()");if(w)throw new Error(w.message);const A=Oh(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(!ur(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),!q1(o)){const{message:h}=Q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidSessionSettleRequest=i=>{if(!ur(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(!z1(n)){const{message:A}=Q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(A)}const y=k1(o,"onSessionSettleRequest()");if(y)throw new Error(y.message);const w=Va(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(!ur(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=Va(o,"update()");if(d)throw new Error(d.message);const y=Oh(h.requiredNamespaces,o,"update()");if(y)throw new Error(y.message)},this.isValidExtend=async i=>{if(!ur(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(!ur(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(!Rh(y,h)){const{message:w}=Q("MISSING_OR_INVALID",`request() chainId: ${h}`);throw new Error(w)}if(!H1(o)){const{message:w}=Q("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(w)}if(!B1(y,h,o.method)){const{message:w}=Q("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(w)}if(d&&!V1(d,ic)){const{message:w}=Q("MISSING_OR_INVALID",`request() expiry: ${d}. Expiry must be a number (in seconds) between ${ic.min} and ${ic.max}`);throw new Error(w)}},this.isValidRespond=async i=>{if(!ur(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),!K1(o)){const{message:h}=Q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidPing=async i=>{if(!ur(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(!ur(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(!Rh(d,h)){const{message:y}=Q("MISSING_OR_INVALID",`emit() chainId: ${h}`);throw new Error(y)}if(!G1(o)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}if(!W1(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(!ur(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);Ec(o)?(this.client.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(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}=Ul(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(!J1(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 tE extends wo{constructor(r,i){super(r,i,Bb,Sc),this.core=r,this.logger=i}}class rE extends wo{constructor(r,i){super(r,i,Vb,Sc),this.core=r,this.logger=i}}class iE extends wo{constructor(r,i){super(r,i,Gb,Sc,n=>n.id),this.core=r,this.logger=i}}let sE=class Nf extends Nm{constructor(r){super(r),this.protocol=Cf,this.version=Of,this.name=rc.name,this.events=new kt.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)||rc.name,this.metadata=(r==null?void 0:r.metadata)||D1();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)||rc.logger}));this.core=(r==null?void 0:r.core)||new kb(r),this.logger=Re.generateChildLogger(i,this.name),this.session=new rE(this.core,this.logger),this.proposal=new tE(this.core,this.logger),this.pendingRequest=new iE(this.core,this.logger),this.engine=new eE(this)}static async init(r){const i=new Nf(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 ho={},nE={get exports(){return ho},set exports(c){ho=c}};(function(c,r){var i=typeof self<"u"?self:hr,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})(nE,ho);const xl=Y1(ho),oE={Accept:"application/json","Content-Type":"application/json"},aE="POST",Il={headers:oE,method:aE},Sl=10;class zi{constructor(r,i=!1){if(this.url=r,this.disableProviderPing=i,this.events=new kt.EventEmitter,this.isAvailable=!1,this.registering=!1,!Zh(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=Vs(r),h=await(await xl(this.url,Object.assign(Object.assign({},Il),{body:n}))).json();this.onPayload({data:h})}catch(n){this.onError(r.id,n)}}async register(r=this.url){if(!Zh(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=Vs({id:1,jsonrpc:"2.0",method:"test",params:[]});await xl(r,Object.assign(Object.assign({},Il),{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"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Sl&&this.events.setMaxListeners(Sl)}}const Pl="error",cE="wss://relay.walletconnect.com",uE="wc",hE="universal_provider",Al=`${uE}@2:${hE}:`,lE="https://rpc.walletconnect.com/v1",xi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fc={exports:{}};/** +import{c as hr,t as bi,g as f1,a as ne,b as p1,w as $l,r as jl,f as vc,d as fo,e as d1,I as _i,A as g1,U as v1,h as Q,i as y1,j as cc,k as m1,_ as _1,P as w1,V as Ah,l as b1,D as E1,C as x1,Z as Ch,$ as I1,m as S1,n as oo,q as P1,o as Ml,p as Fr,y as A1,s as C1,X as cs,u as Ft,v as rr,x as mi,z as ur,B as O1,E as us,F as Ul,G as R1,H as T1,J as N1,K as ql,L as L1,M as zl,Y as kl,N as ls,O as uc,Q as ro,R as ps,S as D1,T as io,W as F1,a0 as $1,a1 as j1,a2 as M1,a3 as U1,a4 as Va,a5 as Oh,a6 as q1,a7 as z1,a8 as k1,a9 as Rh,aa as H1,ab as B1,ac as V1,ad as K1,ae as G1,af as W1,ag as J1,ah as Y1,ai as so,aj as Hl,ak as Ka,al as X1,am as Z1}from"./index-aa62d2a2.js";var kt={},Q1={get exports(){return kt},set exports(c){kt=c}},fs=typeof Reflect=="object"?Reflect:null,Th=fs&&typeof fs.apply=="function"?fs.apply:function(r,i,n){return Function.prototype.apply.call(r,i,n)},no;fs&&typeof fs.ownKeys=="function"?no=fs.ownKeys:Object.getOwnPropertySymbols?no=function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:no=function(r){return Object.getOwnPropertyNames(r)};function em(c){console&&console.warn&&console.warn(c)}var Bl=Number.isNaN||function(r){return r!==r};function He(){He.init.call(this)}Q1.exports=He;kt.once=sm;He.EventEmitter=He;He.prototype._events=void 0;He.prototype._eventsCount=0;He.prototype._maxListeners=void 0;var Nh=10;function po(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 Nh},set:function(c){if(typeof c!="number"||c<0||Bl(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");Nh=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||Bl(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 Vl(c){return c._maxListeners===void 0?He.defaultMaxListeners:c._maxListeners}He.prototype.getMaxListeners=function(){return Vl(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")Th(w,this,i);else for(var A=w.length,F=Yl(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 Kl(this,r,i,!1)};He.prototype.on=He.prototype.addListener;He.prototype.prependListener=function(r,i){return Kl(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 Gl(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 po(i),this.on(r,Gl(this,r,i)),this};He.prototype.prependOnceListener=function(r,i){return po(i),this.prependListener(r,Gl(this,r,i)),this};He.prototype.removeListener=function(r,i){var n,o,h,d,y;if(po(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 Wl(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):Yl(o,o.length)}He.prototype.listeners=function(r){return Wl(this,r,!0)};He.prototype.rawListeners=function(r){return Wl(this,r,!1)};He.listenerCount=function(c,r){return typeof c.listenerCount=="function"?c.listenerCount(r):Jl.call(c,r)};He.prototype.listenerCount=Jl;function Jl(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?no(this._events):[]};function Yl(c,r){for(var i=new Array(r),n=0;ntypeof i>"u"?null:i)}Ks.safeJsonStringify=am;var ao={},Ga={get exports(){return ao},set exports(c){ao=c}},Lh;function cm(){return Lh||(Lh=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 hr<"u"&&hr.localStorage?Ga.exports=hr.localStorage:typeof window<"u"&&window.localStorage?Ga.exports=window.localStorage:Ga.exports=new r}()),ao}var Wa={},Ds={},Dh;function um(){if(Dh)return Ds;Dh=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.IKeyValueStorage=void 0;class c{}return Ds.IKeyValueStorage=c,Ds}var Fs={},Fh;function hm(){if(Fh)return Fs;Fh=1,Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.parseEntry=void 0;const c=Ks;function r(i){var n;return[i[0],c.safeJsonParse((n=i[1])!==null&&n!==void 0?n:"")]}return Fs.parseEntry=r,Fs}var $h;function lm(){return $h||($h=1,function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(um(),c),r.__exportStar(hm(),c)}(Wa)),Wa}Object.defineProperty(go,"__esModule",{value:!0});go.KeyValueStorage=void 0;const hs=bi,jh=Ks,fm=hs.__importDefault(cm()),pm=lm();class Zl{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 jh.safeJsonParse(i)})}setItem(r,i){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(r,jh.safeJsonStringify(i))})}removeItem(r){return hs.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(r)})}}go.KeyValueStorage=Zl;var dm=go.default=Zl,ds={},$s={},Ja={},js={};let qi=class{};const gm=Object.freeze(Object.defineProperty({__proto__:null,IEvents:qi},Symbol.toStringTag,{value:"Module"})),vm=f1(gm);var Mh;function ym(){if(Mh)return js;Mh=1,Object.defineProperty(js,"__esModule",{value:!0}),js.IHeartBeat=void 0;const c=vm;class r extends c.IEvents{constructor(n){super()}}return js.IHeartBeat=r,js}var Uh;function Ql(){return Uh||(Uh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(ym(),c)}(Ja)),Ja}var Ya={},Mi={},qh;function mm(){if(qh)return Mi;qh=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 zh;function ef(){return zh||(zh=1,function(c){Object.defineProperty(c,"__esModule",{value:!0}),bi.__exportStar(mm(),c)}(Ya)),Ya}var kh;function _m(){if(kh)return $s;kh=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.HeartBeat=void 0;const c=bi,r=kt,i=ne,n=Ql(),o=ef();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 $s.HeartBeat=h,$s}(function(c){Object.defineProperty(c,"__esModule",{value:!0});const r=bi;r.__exportStar(_m(),c),r.__exportStar(Ql(),c),r.__exportStar(ef(),c)})(ds);var Re={},Xa,Hh;function wm(){if(Hh)return Xa;Hh=1;function c(i){try{return JSON.stringify(i)}catch{return'"[Circular]"'}}Xa=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}tr.getLoggerContext=o;function h(y,w,A=c.PINO_CUSTOM_CONTEXT_KEY){const F=o(y,A);return F.trim()?`${F}/${w}`:w}tr.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 tr.generateChildLogger=d,tr}(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(tf(),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 yc(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 Vs(c){return typeof c=="string"?c:Dm(c)||""}var mc={},rf={};(function(c){Object.defineProperty(c,"__esModule",{value:!0});var r=p1,i=$l;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})(rf);(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=jl,i=rf,n=$l;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,Ht=0,Bt=0,Ut=0,Jt=0,ir=0,Mr=0,Yt=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,Ht+=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,Ht+=u*Tt,Bt+=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,Ht+=u*Xe,Bt+=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,Ht+=u*vt,Bt+=u*Xe,Ut+=u*Tt,Jt+=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,Ht+=u*wt,Bt+=u*vt,Ut+=u*Xe,Jt+=u*Tt,ir+=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,Ht+=u*gt,Bt+=u*wt,Ut+=u*vt,Jt+=u*Xe,ir+=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,Ht+=u*Rt,Bt+=u*gt,Ut+=u*wt,Jt+=u*vt,ir+=u*Xe,Mr+=u*Tt,Yt+=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,Ht+=u*dt,Bt+=u*Rt,Ut+=u*gt,Jt+=u*wt,ir+=u*vt,Mr+=u*Xe,Yt+=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,Ht+=u*Ot,Bt+=u*dt,Ut+=u*Rt,Jt+=u*gt,ir+=u*wt,Mr+=u*vt,Yt+=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,Ht+=u*Ct,Bt+=u*Ot,Ut+=u*dt,Jt+=u*Rt,ir+=u*gt,Mr+=u*wt,Yt+=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*Ht,Pt+=38*Bt,_t+=38*Ut,ot+=38*Jt,$e+=38*ir,Ze+=38*Mr,Qe+=38*Yt,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})(mc);const $m="EdDSA",jm="JWT",sf=".",nf="base64url",Mm="utf8",Um="utf8",qm=":",zm="did",km="key",Gh="base58btc",Hm="z",Bm="K36",Vm=32;function co(c){return fo(vc(Vs(c),Mm),nf)}function of(c){const r=vc(Bm,Gh),i=Hm+fo(d1([r,c]),Gh);return[zm,km,i].join(qm)}function Km(c){return fo(c,nf)}function Gm(c){return vc([co(c.header),co(c.payload)].join(sf),Um)}function Wm(c){return[co(c.header),co(c.payload),Km(c.signature)].join(sf)}function Wh(c=jl.randomBytes(Vm)){return mc.generateKeyPairFromSeed(c)}async function Jm(c,r,i,n,o=ne.fromMiliseconds(Date.now())){const h={alg:$m,typ:jm},d=of(n.publicKey),y=o+i,w={iss:d,sub:c,aud:r,iat:o,exp:y},A=Gm({header:h,payload:w}),F=mc.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",af="INTERNAL_ERROR",_c="SERVER_ERROR",e_=[-32700,-32600,-32601,-32602,-32603],Bs={[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"},[af]:{code:-32603,message:"Internal error"},[_c]:{code:-32e3,message:"Server error"}},cf=_c;function t_(c){return e_.includes(c)}function Jh(c){return Object.keys(Bs).includes(c)?Bs[c]:Bs[cf]}function r_(c){const r=Object.values(Bs).find(i=>i.code===c);return r||Bs[cf]}function uf(c,r,i){return c.message.includes("getaddrinfo ENOTFOUND")||c.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${i} RPC url at ${r}`):c}var hf={},si={},Yh;function i_(){if(Yh)return si;Yh=1,Object.defineProperty(si,"__esModule",{value:!0}),si.isBrowserCryptoAvailable=si.getSubtleCrypto=si.getBrowerCrypto=void 0;function c(){return(hr===null||hr===void 0?void 0:hr.crypto)||(hr===null||hr===void 0?void 0:hr.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={},Xh;function s_(){if(Xh)return ni;Xh=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)})(hf);function lf(c=3){const r=Date.now()*Math.pow(10,c),i=Math.floor(Math.random()*Math.pow(10,c));return r+i}function wc(c=6){return BigInt(lf(c))}function vo(c,r,i){return{id:i||lf(),jsonrpc:"2.0",method:c,params:r}}function bc(c,r){return{id:c,jsonrpc:"2.0",result:r}}function yo(c,r,i){return{id:c,jsonrpc:"2.0",error:n_(r,i)}}function n_(c,r){return typeof c>"u"?Jh(af):(typeof c=="string"&&(c=Object.assign(Object.assign({},Jh(_c)),{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 ff(c,r){const i=l_(c);return typeof i>"u"?!1:new RegExp(r).test(i)}function Zh(c){return ff(c,u_)}function Qh(c){return ff(c,h_)}function f_(c){return new RegExp("wss?://localhost(:d{2,5})?").test(c)}function pf(c){return typeof c=="object"&&"id"in c&&"jsonrpc"in c&&c.jsonrpc==="2.0"}function Ec(c){return pf(c)&&"method"in c}function mo(c){return pf(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 kt.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(vo(r.method,r.params||[],r.id||wc().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),mo(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",el=c=>c.split("?")[0],tl=10,g_=p_();class v_{constructor(r){if(this.url=r,this.events=new kt.EventEmitter,this.registering=!1,!Qh(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(Vs(r))}catch(n){this.onError(r.id,n)}}register(r=this.url){if(!Qh(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=hf.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"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,el(i),"WS")}resetMaxListeners(){this.events.getMaxListeners()>tl&&this.events.setMaxListeners(tl)}emitError(r){const i=this.parseError(new Error((r==null?void 0:r.message)||`WebSocket connection failed for host: ${el(this.url)}`));return this.events.emit("register_error",i),i}}var uo={},y_={get exports(){return uo},set exports(c){uo=c}};(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 hr=="object"&&hr&&hr.Object===Object&&hr,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 Co(g,x){var $=this.__data__,Y=Si($,g);return Y<0?(++this.size,$.push([g,x])):$[Y][1]=x,this}yr.prototype.clear=Io,yr.prototype.delete=So,yr.prototype.get=Po,yr.prototype.has=Ao,yr.prototype.set=Co;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 Oo(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 Ro(g){return ci(this,g).has(g)}function To(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=Oo,Gr.prototype.get=Hi,Gr.prototype.has=Ro,Gr.prototype.set=To;function Bi(g){var x=-1,$=g==null?0:g.length;for(this.__data__=new Gr;++x<$;)this.add(g[x])}function Ws(g){return this.__data__.set(g,n),this}function Js(g){return this.__data__.has(g)}Bi.prototype.add=Bi.prototype.push=Ws,Bi.prototype.has=Js;function Or(g){var x=this.__data__=new yr(g);this.size=x.size}function No(){this.__data__=new yr,this.size=0}function Lo(g){var x=this.__data__,$=x.delete(g);return this.size=x.size,$}function Do(g){return this.__data__.get(g)}function Fo(g){return this.__data__.has(g)}function Ys(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,sr=!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 fn(g){var x=typeof g;return g!=null&&(x=="object"||x=="function")}function Ci(g){return g!=null&&typeof g=="object"}var pn=we?_t(we):Qs;function zo(g){return Uo(g)?Xs(g):en(g)}function Ke(){return[]}function ke(){return!1}c.exports=qo})(y_,uo);function m_(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 __=m_,w_=__;const df=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")},b_=c=>new TextEncoder().encode(c),E_=c=>new TextDecoder().decode(c);class x_{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 I_{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 gf(this,r)}}class S_{constructor(r){this.decoders=r}or(r){return gf(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 gf=(c,r)=>new S_({...c.decoders||{[c.prefix]:c},...r.decoders||{[r.prefix]:r}});class P_{constructor(r,i,n,o){this.name=r,this.prefix=i,this.baseEncode=n,this.baseDecode=o,this.encoder=new x_(r,i,n),this.decoder=new I_(r,i,o)}encode(r){return this.encoder.encode(r)}decode(r){return this.decoder.decode(r)}}const _o=({name:c,prefix:r,encode:i,decode:n})=>new P_(c,r,i,n),Gs=({prefix:c,name:r,alphabet:i})=>{const{encode:n,decode:o}=w_(i,r);return _o({prefix:c,name:r,encode:n,decode:h=>df(o(h))})},A_=(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},C_=(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<_o({prefix:r,name:c,encode(o){return C_(o,n,i)},decode(o){return A_(o,n,i,c)}}),O_=_o({prefix:"\0",name:"identity",encode:c=>E_(c),decode:c=>b_(c)});var R_=Object.freeze({__proto__:null,identity:O_});const T_=Kt({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var N_=Object.freeze({__proto__:null,base2:T_});const L_=Kt({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var D_=Object.freeze({__proto__:null,base8:L_});const F_=Gs({prefix:"9",name:"base10",alphabet:"0123456789"});var $_=Object.freeze({__proto__:null,base10:F_});const j_=Kt({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),M_=Kt({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var U_=Object.freeze({__proto__:null,base16:j_,base16upper:M_});const q_=Kt({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),z_=Kt({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),k_=Kt({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),H_=Kt({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),B_=Kt({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),V_=Kt({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),K_=Kt({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),G_=Kt({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),W_=Kt({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var J_=Object.freeze({__proto__:null,base32:q_,base32upper:z_,base32pad:k_,base32padupper:H_,base32hex:B_,base32hexupper:V_,base32hexpad:K_,base32hexpadupper:G_,base32z:W_});const Y_=Gs({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),X_=Gs({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Z_=Object.freeze({__proto__:null,base36:Y_,base36upper:X_});const Q_=Gs({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),ew=Gs({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var tw=Object.freeze({__proto__:null,base58btc:Q_,base58flickr:ew});const rw=Kt({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),iw=Kt({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),sw=Kt({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),nw=Kt({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var ow=Object.freeze({__proto__:null,base64:rw,base64pad:iw,base64url:sw,base64urlpad:nw});const vf=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),aw=vf.reduce((c,r,i)=>(c[i]=r,c),[]),cw=vf.reduce((c,r,i)=>(c[r.codePointAt(0)]=i,c),[]);function uw(c){return c.reduce((r,i)=>(r+=aw[i],r),"")}function hw(c){const r=[];for(const i of c){const n=cw[i.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${i}`);r.push(n)}return new Uint8Array(r)}const lw=_o({prefix:"🚀",name:"base256emoji",encode:uw,decode:hw});var fw=Object.freeze({__proto__:null,base256emoji:lw}),pw=yf,rl=128,dw=127,gw=~dw,vw=Math.pow(2,31);function yf(c,r,i){r=r||[],i=i||0;for(var n=i;c>=vw;)r[i++]=c&255|rl,c/=128;for(;c&gw;)r[i++]=c&255|rl,c>>>=7;return r[i]=c|0,yf.bytes=i-n+1,r}var yw=hc,mw=128,il=127;function hc(c,n){var i=0,n=n||0,o=0,h=n,d,y=c.length;do{if(h>=y)throw hc.bytes=0,new RangeError("Could not decode varint");d=c[h++],i+=o<28?(d&il)<=mw);return hc.bytes=h-n,i}var _w=Math.pow(2,7),ww=Math.pow(2,14),bw=Math.pow(2,21),Ew=Math.pow(2,28),xw=Math.pow(2,35),Iw=Math.pow(2,42),Sw=Math.pow(2,49),Pw=Math.pow(2,56),Aw=Math.pow(2,63),Cw=function(c){return c<_w?1:c(mf.encode(c,r,i),r),nl=c=>mf.encodingLength(c),lc=(c,r)=>{const i=r.byteLength,n=nl(c),o=n+nl(i),h=new Uint8Array(o+i);return sl(c,h,0),sl(i,h,n),h.set(r,o),new Rw(c,i,r,h)};class Rw{constructor(r,i,n,o){this.code=r,this.size=i,this.digest=n,this.bytes=o}}const _f=({name:c,code:r,encode:i})=>new Tw(c,r,i);class Tw{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?lc(this.code,i):i.then(n=>lc(this.code,n))}else throw Error("Unknown type, must be binary type")}}const wf=c=>async r=>new Uint8Array(await crypto.subtle.digest(c,r)),Nw=_f({name:"sha2-256",code:18,encode:wf("SHA-256")}),Lw=_f({name:"sha2-512",code:19,encode:wf("SHA-512")});var Dw=Object.freeze({__proto__:null,sha256:Nw,sha512:Lw});const bf=0,Fw="identity",Ef=df,$w=c=>lc(bf,Ef(c)),jw={code:bf,name:Fw,encode:Ef,digest:$w};var Mw=Object.freeze({__proto__:null,identity:jw});new TextEncoder,new TextDecoder;const ol={...R_,...N_,...D_,...$_,...U_,...J_,...Z_,...tw,...ow,...fw};({...Dw,...Mw});function xf(c){return globalThis.Buffer!=null?new Uint8Array(c.buffer,c.byteOffset,c.byteLength):c}function Uw(c=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?xf(globalThis.Buffer.allocUnsafe(c)):new Uint8Array(c)}function If(c,r,i,n){return{name:c,prefix:r,encoder:{name:c,prefix:r,encode:i},decoder:{decode:n}}}const al=If("utf8","u",c=>"u"+new TextDecoder("utf8").decode(c),c=>new TextEncoder().encode(c.substring(1))),Qa=If("ascii","a",c=>{let r="a";for(let i=0;i{c=c.substring(1);const r=Uw(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,zl(r))}async getKeyChain(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(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 yb{constructor(r,i,n){this.core=r,this.logger=i,this.name=Vw,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=Wh(o);return of(h.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const o=y1();return this.setPrivateKey(o.publicKey,o.privateKey)},this.signJWT=async o=>{this.isInitialized();const h=await this.getClientSeed(),d=Wh(h),y=cc();return await Jm(y,o,Kw,d)},this.generateSharedKey=(o,h,d)=>{this.isInitialized();const y=this.getPrivateKey(o),w=m1(y,h);return this.setSymKey(w,d)},this.setSymKey=async(o,h)=>{this.isInitialized();const d=h||_1(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=w1(d),w=Vs(h);if(Ah(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 b1({type:F,symKey:A,message:w,senderPublicKey:K})},this.decode=async(o,h,d)=>{this.isInitialized();const y=E1(h,d);if(Ah(y)){const F=y.receiverPublicKey,K=y.senderPublicKey;o=await this.generateSharedKey(F,K)}const w=this.getSymKey(o),A=x1({symKey:w,encoded:h});return yc(A)},this.getPayloadType=o=>{const h=Ch(o);return I1(h.type)},this.getPayloadSenderPublicKey=o=>{const h=Ch(o);return h.senderPublicKey?fo(h.senderPublicKey,S1):void 0},this.core=r,this.logger=Re.generateChildLogger(i,this.name),this.keychain=n||new vb(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(cl)}catch{r=cc(),await this.keychain.set(cl,r)}return zw(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 mb extends Sm{constructor(r,i){super(r,i),this.logger=r,this.core=i,this.messages=new Map,this.name=Jw,this.version=Yw,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,zl(r))}async getRelayerMessages(){const r=await this.core.storage.getItem(this.storageKey);return typeof r<"u"?kl(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 _b extends Pm{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.events=new kt.EventEmitter,this.name=Zw,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)||Xw,y=uc(h),w=(h==null?void 0:h.prompt)||!1,A=(h==null?void 0:h.tag)||0,F=(h==null?void 0:h.id)||wc().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 oo(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:ro(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 wb{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 bb=Object.defineProperty,Eb=Object.defineProperties,xb=Object.getOwnPropertyDescriptors,ll=Object.getOwnPropertySymbols,Ib=Object.prototype.hasOwnProperty,Sb=Object.prototype.propertyIsEnumerable,fl=(c,r,i)=>r in c?bb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,qs=(c,r)=>{for(var i in r||(r={}))Ib.call(r,i)&&fl(c,i,r[i]);if(ll)for(var i of ll(r))Sb.call(r,i)&&fl(c,i,r[i]);return c},tc=(c,r)=>Eb(c,xb(r));class Pb extends Om{constructor(r,i){super(r,i),this.relayer=r,this.logger=i,this.subscriptions=new Map,this.topicMap=new wb,this.events=new kt.EventEmitter,this.name=ab,this.version=cb,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=uc(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)>=ub&&(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=uc(n);await this.rpcUnsubscribe(r,i,o);const h=rr("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:ro(i.protocol).subscribe,params:{topic:r}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n});try{await await oo(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:ro(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 oo(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:ro(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,tc(qs({},i),{id:r})),this.pending.delete(i.topic)}onBatchSubscribe(r){r.length&&r.forEach(i=>{this.setSubscription(i.id,qs({},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,qs({},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,tc(qs({},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)=>tc(qs({},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 Ab=Object.defineProperty,pl=Object.getOwnPropertySymbols,Cb=Object.prototype.hasOwnProperty,Ob=Object.prototype.propertyIsEnumerable,dl=(c,r,i)=>r in c?Ab(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Rb=(c,r)=>{for(var i in r||(r={}))Cb.call(r,i)&&dl(c,i,r[i]);if(pl)for(var i of pl(r))Ob.call(r,i)&&dl(c,i,r[i]);return c};class Tb extends Am{constructor(r){super(r),this.protocol="wc",this.version=2,this.events=new kt.EventEmitter,this.name=eb,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||Qw})),this.messages=new mb(this.logger,r.core),this.subscriber=new Pb(this,this.logger),this.publisher=new _b(this,this.logger),this.relayUrl=(r==null?void 0:r.relayUrl)||Af,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 ${ul}...`),await this.restartTransport(ul)}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)},sb)}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 oo(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(Ms.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_(P1({sdkVersion:ib,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}),Ec(r)){if(!r.method.endsWith(tb))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(Rb({type:"event",event:i.id},d)),this.events.emit(i.id,d),await this.acknowledgePayload(r),await this.onMessageEvent(d)}else mo(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=bc(r.id,!0);await this.provider.connection.send(i)}registerProviderListeners(){this.provider.on(Ms.payload,r=>this.onProviderPayload(r)),this.provider.on(Ms.connect,()=>{this.events.emit(mt.connect)}),this.provider.on(Ms.disconnect,()=>{this.onProviderDisconnect()}),this.provider.on(Ms.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(rb))}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 Nb=Object.defineProperty,gl=Object.getOwnPropertySymbols,Lb=Object.prototype.hasOwnProperty,Db=Object.prototype.propertyIsEnumerable,vl=(c,r,i)=>r in c?Nb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,yl=(c,r)=>{for(var i in r||(r={}))Lb.call(r,i)&&vl(c,i,r[i]);if(gl)for(var i of gl(r))Db.call(r,i)&&vl(c,i,r[i]);return c};class wo 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=nb,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):g1(d)?this.map.set(d.id,d):v1(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=>uo(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=yl(yl({},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 Fb{constructor(r,i){this.core=r,this.logger=i,this.name=hb,this.version=lb,this.events=new kt,this.initialized=!1,this.storagePrefix=wi,this.ignoredPayloadTypes=[Ml],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=cc(),o=await this.core.crypto.setSymKey(n),h=Fr(ne.FIVE_MINUTES),d={protocol:Pf},y={topic:o,expiry:h,relay:d,active:!1},w=A1({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}=C1(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",rr("USER_DISCONNECTED")),await this.deletePairing(o))},this.sendRequest=async(n,o,h)=>{const d=vo(o,h),y=await this.core.crypto.encode(n,d),w=Us[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=bc(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[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=yo(n,h),y=await this.core.crypto.encode(o,d),w=await this.core.history.get(o,n),A=Us[w.request.method]?Us[w.request.method].res:Us.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,rr("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=rr("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(rr("WC_METHOD_UNSUPPORTED",n))},this.isValidPair=n=>{if(!ur(n)){const{message:o}=Q("MISSING_OR_INVALID",`pair() params: ${n}`);throw new Error(o)}if(!O1(n.uri)){const{message:o}=Q("MISSING_OR_INVALID",`pair() uri: ${n.uri}`);throw new Error(o)}},this.isValidPing=async n=>{if(!ur(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(!ur(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 wo(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);Ec(o)?(this.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(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}=Ul(r.target);i&&this.pairings.keys.includes(i)&&(await this.deletePairing(i,!0),this.events.emit("pairing_expire",{topic:i}))})}}class $b extends Im{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.records=new Map,this.events=new kt.EventEmitter,this.name=fb,this.version=pb,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:vo(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 jb extends Rm{constructor(r,i){super(r,i),this.core=r,this.logger=i,this.expirations=new Map,this.events=new kt.EventEmitter,this.name=db,this.version=gb,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 R1(r);if(typeof r=="number")return T1(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 Mb extends Tm{constructor(r,i){super(r,i),this.projectId=r,this.logger=i,this.name=ec,this.initialized=!1,this.init=async n=>{N1()||!ql()||(this.verifyUrl=(n==null?void 0:n.verifyUrl)||hl,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(ec))return n();const h=document.createElement("iframe");h.setAttribute("id",ec),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=hl,this.abortController=new AbortController,this.isDevEnv=L1()&&{}.IS_VITEST}get context(){return Re.getLoggerContext(this.logger)}startAbortTimer(r){return setTimeout(()=>this.abortController.abort(),ne.toMiliseconds(r))}}var Ub=Object.defineProperty,ml=Object.getOwnPropertySymbols,qb=Object.prototype.hasOwnProperty,zb=Object.prototype.propertyIsEnumerable,_l=(c,r,i)=>r in c?Ub(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,wl=(c,r)=>{for(var i in r||(r={}))qb.call(r,i)&&_l(c,i,r[i]);if(ml)for(var i of ml(r))zb.call(r,i)&&_l(c,i,r[i]);return c};class Ic extends xm{constructor(r){super(r),this.protocol=Sf,this.version=kw,this.name=xc,this.events=new kt.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)||Af;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)||Hw.logger}));this.logger=Re.generateChildLogger(i,this.name),this.heartbeat=new ds.HeartBeat,this.crypto=new yb(this,this.logger,r==null?void 0:r.keychain),this.history=new $b(this,this.logger),this.expirer=new jb(this,this.logger),this.storage=r!=null&&r.storage?r.storage:new dm(wl(wl({},Bw),r==null?void 0:r.storageOptions)),this.relayer=new Tb({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new Fb(this,this.logger),this.verify=new Mb(this.projectId||"",this.logger)}static async init(r){const i=new Ic(r);await i.initialize();const n=await i.crypto.getClientId();return await i.storage.setItem(ob,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 kb=Ic,Cf="wc",Of=2,Rf="client",Sc=`${Cf}@${Of}:${Rf}:`,rc={name:Rf,logger:"error",controller:!1,relayUrl:"wss://relay.walletconnect.com"},Hb="WALLETCONNECT_DEEPLINK_CHOICE",Bb="proposal",Tf="Proposal expired",Vb="session",Qn=ne.SEVEN_DAYS,Kb="engine",zs={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}}},ic={min:ne.FIVE_MINUTES,max:ne.SEVEN_DAYS},Gb="request",Wb=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Jb=Object.defineProperty,Yb=Object.defineProperties,Xb=Object.getOwnPropertyDescriptors,bl=Object.getOwnPropertySymbols,Zb=Object.prototype.hasOwnProperty,Qb=Object.prototype.propertyIsEnumerable,El=(c,r,i)=>r in c?Jb(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Pr=(c,r)=>{for(var i in r||(r={}))Zb.call(r,i)&&El(c,i,r[i]);if(bl)for(var i of bl(r))Qb.call(r,i)&&El(c,i,r[i]);return c},sc=(c,r)=>Yb(c,Xb(r));class eE extends Lm{constructor(r){super(r),this.name=Kb,this.events=new kt,this.initialized=!1,this.ignoredPayloadTypes=[Ml],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(zs)}),this.initialized=!0)},this.connect=async i=>{this.isInitialized();const n=sc(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:Pf}],proposer:{publicKey:J,metadata:this.client.metadata}},y&&{sessionProperties:y}),{reject:j,resolve:V,done:ie}=cs(ne.FIVE_MINUTES,Tf);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=sc(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||"",io(F)||(F=F1(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,rr("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(Qn)},d&&{sessionProperties:d});await this.client.core.relayer.subscribe(j),await this.sendRequest(j,"wc_sessionSettle",V);const ie=sc(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(Qn)),{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,rr("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(Qn)),{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(Hb);return $1({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=wc().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",rr("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=>j1(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,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),n||this.client.core.expirer.del(i)},this.deleteProposal=async(i,n)=>{await Promise.all([this.client.proposal.delete(i,rr("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=zs.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=vo(n,o);if(ql()&&Wb.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=zs[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=bc(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[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=yo(i,o),d=await this.client.core.crypto.encode(n,h),y=await this.client.core.history.get(n,i),w=zs[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,rr("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,rr("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(Qn)),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(!ur(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),!M1(y,!0)){const{message:w}=Q("MISSING_OR_INVALID",`connect() relays: ${y}`);throw new Error(w)}!_i(o)&&io(o)!==0&&this.validateNamespaces(o,"requiredNamespaces"),!_i(h)&&io(h)!==0&&this.validateNamespaces(h,"optionalNamespaces"),_i(d)||this.validateSessionProps(d,"sessionProperties")},this.validateNamespaces=(i,n)=>{const o=U1(i,"connect()",n);if(o)throw new Error(o.message)},this.isValidApprove=async i=>{if(!ur(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=Va(o,"approve()");if(w)throw new Error(w.message);const A=Oh(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(!ur(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),!q1(o)){const{message:h}=Q("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidSessionSettleRequest=i=>{if(!ur(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(!z1(n)){const{message:A}=Q("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(A)}const y=k1(o,"onSessionSettleRequest()");if(y)throw new Error(y.message);const w=Va(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(!ur(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=Va(o,"update()");if(d)throw new Error(d.message);const y=Oh(h.requiredNamespaces,o,"update()");if(y)throw new Error(y.message)},this.isValidExtend=async i=>{if(!ur(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(!ur(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(!Rh(y,h)){const{message:w}=Q("MISSING_OR_INVALID",`request() chainId: ${h}`);throw new Error(w)}if(!H1(o)){const{message:w}=Q("MISSING_OR_INVALID",`request() ${JSON.stringify(o)}`);throw new Error(w)}if(!B1(y,h,o.method)){const{message:w}=Q("MISSING_OR_INVALID",`request() method: ${o.method}`);throw new Error(w)}if(d&&!V1(d,ic)){const{message:w}=Q("MISSING_OR_INVALID",`request() expiry: ${d}. Expiry must be a number (in seconds) between ${ic.min} and ${ic.max}`);throw new Error(w)}},this.isValidRespond=async i=>{if(!ur(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),!K1(o)){const{message:h}=Q("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(o)}`);throw new Error(h)}},this.isValidPing=async i=>{if(!ur(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(!ur(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(!Rh(d,h)){const{message:y}=Q("MISSING_OR_INVALID",`emit() chainId: ${h}`);throw new Error(y)}if(!G1(o)){const{message:y}=Q("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(o)}`);throw new Error(y)}if(!W1(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(!ur(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);Ec(o)?(this.client.core.history.set(i,o),this.onRelayEventRequest({topic:i,payload:o})):mo(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}=Ul(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(!J1(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 tE extends wo{constructor(r,i){super(r,i,Bb,Sc),this.core=r,this.logger=i}}class rE extends wo{constructor(r,i){super(r,i,Vb,Sc),this.core=r,this.logger=i}}class iE extends wo{constructor(r,i){super(r,i,Gb,Sc,n=>n.id),this.core=r,this.logger=i}}let sE=class Nf extends Nm{constructor(r){super(r),this.protocol=Cf,this.version=Of,this.name=rc.name,this.events=new kt.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)||rc.name,this.metadata=(r==null?void 0:r.metadata)||D1();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)||rc.logger}));this.core=(r==null?void 0:r.core)||new kb(r),this.logger=Re.generateChildLogger(i,this.name),this.session=new rE(this.core,this.logger),this.proposal=new tE(this.core,this.logger),this.pendingRequest=new iE(this.core,this.logger),this.engine=new eE(this)}static async init(r){const i=new Nf(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 ho={},nE={get exports(){return ho},set exports(c){ho=c}};(function(c,r){var i=typeof self<"u"?self:hr,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})(nE,ho);const xl=Y1(ho),oE={Accept:"application/json","Content-Type":"application/json"},aE="POST",Il={headers:oE,method:aE},Sl=10;class zi{constructor(r,i=!1){if(this.url=r,this.disableProviderPing=i,this.events=new kt.EventEmitter,this.isAvailable=!1,this.registering=!1,!Zh(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=Vs(r),h=await(await xl(this.url,Object.assign(Object.assign({},Il),{body:n}))).json();this.onPayload({data:h})}catch(n){this.onError(r.id,n)}}async register(r=this.url){if(!Zh(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=Vs({id:1,jsonrpc:"2.0",method:"test",params:[]});await xl(r,Object.assign(Object.assign({},Il),{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"?yc(r.data):r.data;this.events.emit("payload",i)}onError(r,i){const n=this.parseError(i),o=n.message||n.toString(),h=yo(r,o);this.events.emit("payload",h)}parseError(r,i=this.url){return uf(r,i,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>Sl&&this.events.setMaxListeners(Sl)}}const Pl="error",cE="wss://relay.walletconnect.com",uE="wc",hE="universal_provider",Al=`${uE}@2:${hE}:`,lE="https://rpc.walletconnect.com/v1",xi={DEFAULT_CHAIN_CHANGED:"default_chain_changed"};var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},fc={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors @@ -24,4 +24,4 @@ __p += '`),Oe&&(q+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+q+`return __p -}`;var be=Ih(function(){return Fe(p,te+"return "+q).apply(i,m)});if(be.source=q,Da(be))throw be;return be}function _0(e){return je(e).toLowerCase()}function w0(e){return je(e).toUpperCase()}function b0(e,t,s){if(e=je(e),e&&(s||t===i))return Lc(e);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Tr(t),p=Dc(a,l),m=Fc(a,l)+1;return vi(a,p,m).join("")}function E0(e,t,s){if(e=je(e),e&&(s||t===i))return e.slice(0,jc(e)+1);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Fc(a,Tr(t))+1;return vi(a,0,l).join("")}function x0(e,t,s){if(e=je(e),e&&(s||t===i))return e.replace(gt,"");if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Dc(a,Tr(t));return vi(a,l).join("")}function I0(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?pr(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-_),Fa(l)){if(e.slice(_).search(l)){var L,D=S;for(l.global||(l=Xo(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(pr(l),_)!=_){var W=S.lastIndexOf(l);W>-1&&(S=S.slice(0,W))}return S+a}function S0(e){return e=je(e),e&<.test(e)?e.replace(ai,ep):e}var P0=ss(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ma=Su("toUpperCase");function xh(e,t,s){return e=je(e),t=s?i:t,t===i?Jf(e)?ip(e):qf(e):e.match(t)||[]}var Ih=Ie(function(e,t){try{return qt(e,i,t)}catch(s){return Da(s)?s:new de(s)}}),A0=Qr(function(e,t){return _r(t,function(s){s=Hr(s),Xr(e,s,Na(e[s],e))}),e});function C0(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=Gt(e,H);t=se(t),e-=H;for(var l=Wo(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:Vn,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=yn[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[Mn(i,Ee).name]=[{name:"wrapper",func:i}],Ae.prototype.clone=Sp,Ae.prototype.reverse=Pp,Ae.prototype.value=Ap,f.prototype.at=rv,f.prototype.chain=iv,f.prototype.commit=sv,f.prototype.next=nv,f.prototype.plant=av,f.prototype.reverse=cv,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=uv,f.prototype.first=f.prototype.head,ws&&(f.prototype[ws]=ov),f},Zi=sp();bt?((bt.exports=Zi)._=Zi,We._=Zi):Ce._=Zi}).call(ks)})(fc,fc.exports);var fE=Object.defineProperty,pE=Object.defineProperties,dE=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,gE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,Ol=(c,r,i)=>r in c?fE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,eo=(c,r)=>{for(var i in r||(r={}))gE.call(r,i)&&Ol(c,i,r[i]);if(Cl)for(var i of Cl(r))vE.call(r,i)&&Ol(c,i,r[i]);return c},yE=(c,r)=>pE(c,dE(r));function Cr(c,r,i){let n;const o=pc(c);return r.rpcMap&&(n=r.rpcMap[o]),n||(n=`${lE}?chainId=eip155:${o}&projectId=${i}`),n}function pc(c){return c.includes("eip155")?Number(c.split(":")[1]):Number(c)}function Lf(c){return c.map(r=>`${r.split(":")[0]}:${r.split(":")[1]}`)}function mE(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 _E(c={},r={}){const i=Rl(c),n=Rl(r);return fc.exports.merge(i,n)}function Rl(c){var r,i,n,o;const h={};if(!io(c))return h;for(const[d,y]of Object.entries(c)){const w=Hl(d)?[d]:y.chains,A=y.methods||[],F=y.events||[],K=y.rpcMap||{},J=so(d);h[J]=yE(eo(eo({},h[J]),y),{chains:Ka(w,(r=h[J])==null?void 0:r.chains),methods:Ka(A,(i=h[J])==null?void 0:i.methods),events:Ka(F,(n=h[J])==null?void 0:n.events),rpcMap:eo(eo({},K),(o=h[J])==null?void 0:o.rpcMap)})}return h}function wE(c){return c.includes(":")?c.split(":")[2]:c}function bE(c){const r={};for(const[i,n]of Object.entries(c)){const o=n.methods||[],h=n.events||[],d=n.accounts||[],y=Hl(i)?[i]:n.chains?n.chains:Lf(n.accounts);r[i]={chains:y,methods:o,events:h,accounts:d}}return r}const Df={},It=c=>Df[c],nc=(c,r)=>{Df[c]=r};class EE{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 xE{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=pc(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=pc(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 IE{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 SE{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 PE{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 AE{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 CE{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 OE=Object.defineProperty,RE=Object.defineProperties,TE=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,NE=Object.prototype.hasOwnProperty,LE=Object.prototype.propertyIsEnumerable,Nl=(c,r,i)=>r in c?OE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,to=(c,r)=>{for(var i in r||(r={}))NE.call(r,i)&&Nl(c,i,r[i]);if(Tl)for(var i of Tl(r))LE.call(r,i)&&Nl(c,i,r[i]);return c},oc=(c,r)=>RE(c,TE(r));class Pc{constructor(r){this.events=new kt,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)||Pl})),this.disableProviderPing=(r==null?void 0:r.disableProviderPing)||!1}static async init(r){const i=new Pc(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:to({},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:rr("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=bE(h.namespaces),this.persist("namespaces",this.namespaces))}).catch(h=>{if(h.message!==Tf)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 sE.init({logger:this.providerOpts.logger||Pl,relayUrl:this.providerOpts.relayUrl||cE,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=>so(i)))];nc("client",this.client),nc("events",this.events),nc("disableProviderPing",this.disableProviderPing),r.forEach(i=>{if(!this.session)return;const n=mE(i,this.session),o=Lf(n),h=_E(this.namespaces,this.optionalNamespaces),d=oc(to({},h[i]),{accounts:n,chains:o});switch(i){case"eip155":this.rpcProviders[i]=new xE({namespace:d});break;case"solana":this.rpcProviders[i]=new IE({namespace:d});break;case"cosmos":this.rpcProviders[i]=new SE({namespace:d});break;case"polkadot":this.rpcProviders[i]=new EE({namespace:d});break;case"cip34":this.rpcProviders[i]=new PE({namespace:d});break;case"elrond":this.rpcProviders[i]=new AE({namespace:d});break;case"multiversx":this.rpcProviders[i]=new CE({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(wE))}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=oc(to({},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",oc(to({},rr("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=>so(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=so(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(`${Al}/${r}`,i)}async getFromStore(r){return await this.client.core.storage.getItem(`${Al}/${r}`)}}const DE=Pc,FE="wc",$E="ethereum_provider",jE=`${FE}@2:${$E}:`,ME="https://rpc.walletconnect.com/v1/",dc=["eth_sendTransaction","personal_sign"],UE=["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"],gc=["chainChanged","accountsChanged"],qE=["message","disconnect","connect"];var zE=Object.defineProperty,kE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,Dl=(c,r,i)=>r in c?zE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Hs=(c,r)=>{for(var i in r||(r={}))BE.call(r,i)&&Dl(c,i,r[i]);if(Ll)for(var i of Ll(r))VE.call(r,i)&&Dl(c,i,r[i]);return c},Fl=(c,r)=>kE(c,HE(r));function lo(c){return Number(c[0].split(":")[1])}function ac(c){return`0x${c.toString(16)}`}function KE(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||dc,events:h||gc,rpcMap:Hs({},r.length?{[lo(r)]:y[lo(r)]}:{})},A=h==null?void 0:h.filter(G=>!gc.includes(G)),F=n==null?void 0:n.filter(G=>!dc.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:UE))],events:[...new Set(w.events.concat(d||qE))],rpcMap:y};return{required:r.length?w:void 0,optional:i.length?J:void 0}}class Ac{constructor(){this.events=new kt.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=jE,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 Ac;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}=KE(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(Fl(Hs({namespaces:Hs({},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=X1(o.namespaces,[this.namespace]);this.setAccounts(h),this.events.emit("connect",{chainId:ac(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",ac(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",Fl(Hs({},rr("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",ac(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)||dc:[],w=o.length?(r==null?void 0:r.events)||gc:[],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?lo(this.rpc.chains):lo(this.rpc.optionalChains),this.signer=await DE.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 Z1(()=>import("./index-d001aca1.js").then(o=>o.a),["./index-d001aca1.js","./index-3c24af3d.js","./index-fddf5a6e.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(Hs({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])||`${ME}?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 rx=Ac;export{rx as EthereumProvider,qE as OPTIONAL_EVENTS,UE as OPTIONAL_METHODS,gc as REQUIRED_EVENTS,dc as REQUIRED_METHODS,Ac as default}; +}`;var be=Ih(function(){return Fe(p,te+"return "+q).apply(i,m)});if(be.source=q,Da(be))throw be;return be}function _0(e){return je(e).toLowerCase()}function w0(e){return je(e).toUpperCase()}function b0(e,t,s){if(e=je(e),e&&(s||t===i))return Lc(e);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Tr(t),p=Dc(a,l),m=Fc(a,l)+1;return vi(a,p,m).join("")}function E0(e,t,s){if(e=je(e),e&&(s||t===i))return e.slice(0,jc(e)+1);if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Fc(a,Tr(t))+1;return vi(a,0,l).join("")}function x0(e,t,s){if(e=je(e),e&&(s||t===i))return e.replace(gt,"");if(!e||!(t=pr(t)))return e;var a=Tr(e),l=Dc(a,Tr(t));return vi(a,l).join("")}function I0(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?pr(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-_),Fa(l)){if(e.slice(_).search(l)){var L,D=S;for(l.global||(l=Xo(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(pr(l),_)!=_){var W=S.lastIndexOf(l);W>-1&&(S=S.slice(0,W))}return S+a}function S0(e){return e=je(e),e&<.test(e)?e.replace(ai,ep):e}var P0=ss(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Ma=Su("toUpperCase");function xh(e,t,s){return e=je(e),t=s?i:t,t===i?Jf(e)?ip(e):qf(e):e.match(t)||[]}var Ih=Ie(function(e,t){try{return qt(e,i,t)}catch(s){return Da(s)?s:new de(s)}}),A0=Qr(function(e,t){return _r(t,function(s){s=Hr(s),Xr(e,s,Na(e[s],e))}),e});function C0(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=Gt(e,H);t=se(t),e-=H;for(var l=Wo(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:Vn,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=yn[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[Mn(i,Ee).name]=[{name:"wrapper",func:i}],Ae.prototype.clone=Sp,Ae.prototype.reverse=Pp,Ae.prototype.value=Ap,f.prototype.at=rv,f.prototype.chain=iv,f.prototype.commit=sv,f.prototype.next=nv,f.prototype.plant=av,f.prototype.reverse=cv,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=uv,f.prototype.first=f.prototype.head,ws&&(f.prototype[ws]=ov),f},Zi=sp();bt?((bt.exports=Zi)._=Zi,We._=Zi):Ce._=Zi}).call(ks)})(fc,fc.exports);var fE=Object.defineProperty,pE=Object.defineProperties,dE=Object.getOwnPropertyDescriptors,Cl=Object.getOwnPropertySymbols,gE=Object.prototype.hasOwnProperty,vE=Object.prototype.propertyIsEnumerable,Ol=(c,r,i)=>r in c?fE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,eo=(c,r)=>{for(var i in r||(r={}))gE.call(r,i)&&Ol(c,i,r[i]);if(Cl)for(var i of Cl(r))vE.call(r,i)&&Ol(c,i,r[i]);return c},yE=(c,r)=>pE(c,dE(r));function Cr(c,r,i){let n;const o=pc(c);return r.rpcMap&&(n=r.rpcMap[o]),n||(n=`${lE}?chainId=eip155:${o}&projectId=${i}`),n}function pc(c){return c.includes("eip155")?Number(c.split(":")[1]):Number(c)}function Lf(c){return c.map(r=>`${r.split(":")[0]}:${r.split(":")[1]}`)}function mE(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 _E(c={},r={}){const i=Rl(c),n=Rl(r);return fc.exports.merge(i,n)}function Rl(c){var r,i,n,o;const h={};if(!io(c))return h;for(const[d,y]of Object.entries(c)){const w=Hl(d)?[d]:y.chains,A=y.methods||[],F=y.events||[],K=y.rpcMap||{},J=so(d);h[J]=yE(eo(eo({},h[J]),y),{chains:Ka(w,(r=h[J])==null?void 0:r.chains),methods:Ka(A,(i=h[J])==null?void 0:i.methods),events:Ka(F,(n=h[J])==null?void 0:n.events),rpcMap:eo(eo({},K),(o=h[J])==null?void 0:o.rpcMap)})}return h}function wE(c){return c.includes(":")?c.split(":")[2]:c}function bE(c){const r={};for(const[i,n]of Object.entries(c)){const o=n.methods||[],h=n.events||[],d=n.accounts||[],y=Hl(i)?[i]:n.chains?n.chains:Lf(n.accounts);r[i]={chains:y,methods:o,events:h,accounts:d}}return r}const Df={},It=c=>Df[c],nc=(c,r)=>{Df[c]=r};class EE{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 xE{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=pc(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=pc(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 IE{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 SE{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 PE{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 AE{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 CE{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 OE=Object.defineProperty,RE=Object.defineProperties,TE=Object.getOwnPropertyDescriptors,Tl=Object.getOwnPropertySymbols,NE=Object.prototype.hasOwnProperty,LE=Object.prototype.propertyIsEnumerable,Nl=(c,r,i)=>r in c?OE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,to=(c,r)=>{for(var i in r||(r={}))NE.call(r,i)&&Nl(c,i,r[i]);if(Tl)for(var i of Tl(r))LE.call(r,i)&&Nl(c,i,r[i]);return c},oc=(c,r)=>RE(c,TE(r));class Pc{constructor(r){this.events=new kt,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)||Pl})),this.disableProviderPing=(r==null?void 0:r.disableProviderPing)||!1}static async init(r){const i=new Pc(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:to({},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:rr("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=bE(h.namespaces),this.persist("namespaces",this.namespaces))}).catch(h=>{if(h.message!==Tf)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 sE.init({logger:this.providerOpts.logger||Pl,relayUrl:this.providerOpts.relayUrl||cE,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=>so(i)))];nc("client",this.client),nc("events",this.events),nc("disableProviderPing",this.disableProviderPing),r.forEach(i=>{if(!this.session)return;const n=mE(i,this.session),o=Lf(n),h=_E(this.namespaces,this.optionalNamespaces),d=oc(to({},h[i]),{accounts:n,chains:o});switch(i){case"eip155":this.rpcProviders[i]=new xE({namespace:d});break;case"solana":this.rpcProviders[i]=new IE({namespace:d});break;case"cosmos":this.rpcProviders[i]=new SE({namespace:d});break;case"polkadot":this.rpcProviders[i]=new EE({namespace:d});break;case"cip34":this.rpcProviders[i]=new PE({namespace:d});break;case"elrond":this.rpcProviders[i]=new AE({namespace:d});break;case"multiversx":this.rpcProviders[i]=new CE({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(wE))}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=oc(to({},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",oc(to({},rr("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=>so(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=so(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(`${Al}/${r}`,i)}async getFromStore(r){return await this.client.core.storage.getItem(`${Al}/${r}`)}}const DE=Pc,FE="wc",$E="ethereum_provider",jE=`${FE}@2:${$E}:`,ME="https://rpc.walletconnect.com/v1/",dc=["eth_sendTransaction","personal_sign"],UE=["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"],gc=["chainChanged","accountsChanged"],qE=["message","disconnect","connect"];var zE=Object.defineProperty,kE=Object.defineProperties,HE=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,VE=Object.prototype.propertyIsEnumerable,Dl=(c,r,i)=>r in c?zE(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,Hs=(c,r)=>{for(var i in r||(r={}))BE.call(r,i)&&Dl(c,i,r[i]);if(Ll)for(var i of Ll(r))VE.call(r,i)&&Dl(c,i,r[i]);return c},Fl=(c,r)=>kE(c,HE(r));function lo(c){return Number(c[0].split(":")[1])}function ac(c){return`0x${c.toString(16)}`}function KE(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||dc,events:h||gc,rpcMap:Hs({},r.length?{[lo(r)]:y[lo(r)]}:{})},A=h==null?void 0:h.filter(G=>!gc.includes(G)),F=n==null?void 0:n.filter(G=>!dc.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:UE))],events:[...new Set(w.events.concat(d||qE))],rpcMap:y};return{required:r.length?w:void 0,optional:i.length?J:void 0}}class Ac{constructor(){this.events=new kt.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=jE,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 Ac;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}=KE(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(Fl(Hs({namespaces:Hs({},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=X1(o.namespaces,[this.namespace]);this.setAccounts(h),this.events.emit("connect",{chainId:ac(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",ac(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",Fl(Hs({},rr("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",ac(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)||dc:[],w=o.length?(r==null?void 0:r.events)||gc:[],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?lo(this.rpc.chains):lo(this.rpc.optionalChains),this.signer=await DE.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 Z1(()=>import("./index-123c87d4.js").then(o=>o.a),["./index-123c87d4.js","./index-aa62d2a2.js","./index-fddf5a6e.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(Hs({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])||`${ME}?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 rx=Ac;export{rx as EthereumProvider,qE as OPTIONAL_EVENTS,UE as OPTIONAL_METHODS,gc as REQUIRED_EVENTS,dc as REQUIRED_METHODS,Ac as default}; diff --git a/index.html b/index.html index 964eaa30..8032c47b 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence Kit Demo - +