@tokenflight/swap 0.2.0-rc.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}function r(){return{...e.context,id:e.getNextContextId(),count:0}}var i=(e,t)=>e===t,a=Symbol(`solid-proxy`),o=typeof Proxy==`function`,s=Symbol(`solid-track`),c={equals:i},l=null,u=we,d=1,f=2,p={owned:null,cleanups:null,context:null,owner:null},m={},h=null,g=null,_=null,v=null,y=null,b=null,x=null,S=0;function C(e,t){let n=y,r=h,i=e.length===0,a=t===void 0?r:t,o=i?p:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>O(()=>k(o)));h=o,y=null;try{return Se(s,!0)}finally{y=n,h=r}}function w(e,t){t=t?Object.assign({},c,t):c;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ge.bind(n),e=>(typeof e==`function`&&(e=g&&g.running&&g.sources.has(n)?e(n.tValue):e(n.value)),_e(n,e))]}function ee(e,t,n){let r=be(e,t,!0,d);_&&g&&g.running?b.push(r):ve(r)}function T(e,t,n){let r=be(e,t,!1,d);_&&g&&g.running?b.push(r):ve(r)}function E(e,t,n){u=Ee;let r=be(e,t,!1,d),i=he&&pe(he);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),x?x.push(r):ve(r)}function D(e,t,n){n=n?Object.assign({},c,n):c;let r=be(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,_&&g&&g.running?(r.tState=d,b.push(r)):ve(r),ge.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function ne(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=m,l=null,u=!1,d=!1,f=`initialValue`in o,p=typeof i==`function`&&D(i),_=new Set,[v,b]=(o.storage||w)(o.initialValue),[x,S]=w(void 0),[C,T]=w(void 0,{equals:!1}),[E,ne]=w(f?`ready`:`unresolved`);e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function re(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=m,g&&e&&u?(g.promises.delete(e),u=!1,Se(()=>{g.running=!0,ie(t,n)},!1)):ie(t,n)),t}function ie(e,t){Se(()=>{t===void 0&&b(()=>e),ne(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of _.keys())e.decrement();_.clear()},!1)}function ae(){let e=he&&pe(he),t=v(),n=x();if(n!==void 0&&!s)throw n;return y&&!y.user&&e&&ee(()=>{C(),s&&(e.resolved&&g&&u?g.promises.add(s):_.has(e)||(e.increment(),_.add(e)))}),t}function oe(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():i;if(u=g&&g.running,t==null||t===!1){re(s,O(v));return}g&&s&&g.promises.delete(s);let n,r=c===m?O(()=>{try{return a(t,{value:v(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){re(s,void 0,Ae(n),t);return}else if(!te(r))return re(s,r,void 0,t),r;return s=r,`v`in r?(r.s===1?re(s,r.v,void 0,t):re(s,void 0,Ae(r.v),t),r):(d=!0,queueMicrotask(()=>d=!1),Se(()=>{ne(f?`refreshing`:`pending`),T()},!1),r.then(e=>re(r,e,void 0,t),e=>re(r,void 0,Ae(e),t)))}Object.defineProperties(ae,{state:{get:()=>E()},error:{get:()=>x()},loading:{get(){let e=E();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return ae();let e=x();if(e&&!s)throw e;return v()}}});let se=h;return p?ee(()=>(se=h,oe(!1))):oe(!1),[ae,{refetch:e=>ce(se,()=>oe(e)),mutate:b}]}function re(e){return Se(e,!1)}function O(e){if(!v&&y===null)return e();let t=y;y=null;try{return v?v.untrack(e):e()}finally{y=t}}function ie(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=O(()=>t(o,i,n));return i=o,s}}function ae(e){E(()=>O(e))}function oe(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function se(){return y}function ce(e,t){let n=h,r=y;h=e,y=null;try{return Se(t,!0)}catch(e){Me(e)}finally{h=n,y=r}}function le(e){if(g&&g.running)return e(),g.done;let t=y,n=h;return Promise.resolve().then(()=>{y=t,h=n;let r;return(_||he)&&(r=g||(g={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(e=>r.resolve=e)),r.running=!0),Se(e,!1),y=h=null,r?r.done:void 0})}var[ue,de]=w(!1);function fe(e,t){let n=Symbol(`context`);return{id:n,Provider:Pe(n),defaultValue:e}}function pe(e){let t;return h&&h.context&&(t=h.context[e.id])!==void 0?t:e.defaultValue}function me(e){let t=D(e),n=D(()=>Ne(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var he;function ge(){let e=g&&g.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===d)ve(this);else{let e=b;b=null,Se(()=>De(this),!1),b=e}if(y){let e=this.observers?this.observers.length:0;y.sources?(y.sources.push(this),y.sourceSlots.push(e)):(y.sources=[this],y.sourceSlots=[e]),this.observers?(this.observers.push(y),this.observerSlots.push(y.sources.length-1)):(this.observers=[y],this.observerSlots=[y.sources.length-1])}return e&&g.sources.has(this)?this.tValue:this.value}function _e(e,t,n){let r=g&&g.running&&g.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(g){let r=g.running;(r||!n&&g.sources.has(e))&&(g.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Se(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=g&&g.running;r&&g.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?b.push(n):x.push(n),n.observers&&Oe(n)),r?n.tState=d:n.state=d)}if(b.length>1e6)throw b=[],Error()},!1)}return t}function ve(e){if(!e.fn)return;k(e);let t=S;ye(e,g&&g.running&&g.sources.has(e)?e.tValue:e.value,t),g&&!g.running&&g.sources.has(e)&&queueMicrotask(()=>{Se(()=>{g&&(g.running=!0),y=h=e,ye(e,e.tValue,t),y=h=null},!1)})}function ye(e,t,n){let r,i=h,a=y;y=h=e;try{r=e.fn(t)}catch(t){return e.pure&&(g&&g.running?(e.tState=d,e.tOwned&&e.tOwned.forEach(k),e.tOwned=void 0):(e.state=d,e.owned&&e.owned.forEach(k),e.owned=null)),e.updatedAt=n+1,Me(t)}finally{y=a,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?_e(e,r,!0):g&&g.running&&e.pure?(g.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function be(e,t,n,r=d,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};if(g&&g.running&&(a.state=0,a.tState=r),h===null||h!==p&&(g&&g.running&&h.pure?h.tOwned?h.tOwned.push(a):h.tOwned=[a]:h.owned?h.owned.push(a):h.owned=[a]),v&&a.fn){let[e,t]=w(void 0,{equals:!1}),n=v.factory(a.fn,t);oe(()=>n.dispose());let r=v.factory(a.fn,()=>le(t).then(()=>r.dispose()));a.fn=t=>(e(),g&&g.running?r.track(t):n.track(t))}return a}function xe(e){let t=g&&g.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===f)return De(e);if(e.suspense&&O(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<S);){if(t&&g.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(g.disposed.has(t))return}if((t?e.tState:e.state)===d)ve(e);else if((t?e.tState:e.state)===f){let t=b;b=null,Se(()=>De(e,n[0]),!1),b=t}}}function Se(e,t){if(b)return e();let n=!1;t||(b=[]),x?n=!0:x=[],S++;try{let t=e();return Ce(n),t}catch(e){n||(x=null),b=null,Me(e)}}function Ce(e){if(b&&(_&&g&&g.running?Te(b):we(b),b=null),e)return;let t;if(g){if(!g.promises.size&&!g.queue.size){let e=g.sources,n=g.disposed;x.push.apply(x,g.effects),t=g.resolve;for(let e of x)`tState`in e&&(e.state=e.tState),delete e.tState;g=null,Se(()=>{for(let e of n)k(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)k(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}de(!1)},!1)}else if(g.running){g.running=!1,g.effects.push.apply(g.effects,x),x=null,de(!0);return}}let n=x;x=null,n.length&&Se(()=>u(n),!1),t&&t()}function we(e){for(let t=0;t<e.length;t++)xe(e[t])}function Te(e){for(let t=0;t<e.length;t++){let n=e[t],r=g.queue;r.has(n)||(r.add(n),_(()=>{r.delete(n),Se(()=>{g.running=!0,xe(n)},!1),g&&(g.running=!1)}))}}function Ee(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:xe(e)}if(e.context){if(e.count){e.effects||(e.effects=[]),e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)xe(t[r])}function De(e,t){let n=g&&g.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===d?i!==t&&(!i.updatedAt||i.updatedAt<S)&&xe(i):e===f&&De(i,t)}}}function Oe(e){let t=g&&g.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=f:r.state=f,r.pure?b.push(r):x.push(r),r.observers&&Oe(r))}}function k(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)k(e.tOwned[t]);delete e.tOwned}if(g&&g.running&&e.pure)ke(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)k(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}g&&g.running?e.tState=0:e.state=0}function ke(e,t){if(t||(e.tState=0,g.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ke(e.owned[t])}function Ae(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function je(e,t,n){try{for(let n of t)n(e)}catch(e){Me(e,n&&n.owner||null)}}function Me(e,t=h){let n=l&&t&&t.context&&t.context[l],r=Ae(e);if(!n)throw r;x?x.push({fn(){je(r,n,t)},state:d}):je(r,n,t)}function Ne(e){if(typeof e==`function`&&!e.length)return Ne(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Ne(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Pe(e,t){return function(t){let n;return T(()=>n=O(()=>(h.context={...h.context,[e]:t.value},me(()=>t.children))),void 0),n}}var Fe=Symbol(`fallback`);function Ie(e){for(let t=0;t<e.length;t++)e[t]()}function Le(e,t,n={}){let r=[],i=[],a=[],o=0,c=t.length>1?[]:null;return oe(()=>Ie(a)),()=>{let l=e()||[],u=l.length,d,f;return l[s],O(()=>{let e,t,s,m,h,g,_,v,y;if(u===0)o!==0&&(Ie(a),a=[],r=[],i=[],o=0,c&&(c=[])),n.fallback&&(r=[Fe],i[0]=C(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=C(p);o=u}else{for(s=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(o,u);g<_&&r[g]===l[g];g++);for(_=o-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)s[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(s[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in s?(i[f]=s[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=C(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=w(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}function Re(e,t,n={}){let r=[],i=[],a=[],o=[],c=0,l;return oe(()=>Ie(a)),()=>{let u=e()||[],d=u.length;return u[s],O(()=>{if(d===0)return c!==0&&(Ie(a),a=[],r=[],i=[],c=0,o=[]),n.fallback&&(r=[Fe],i[0]=C(e=>(a[0]=e,n.fallback())),c=1),i;for(r[0]===Fe&&(a[0](),a=[],r=[],i=[],c=0),l=0;l<d;l++)l<r.length&&r[l]!==u[l]?o[l](()=>u[l]):l>=r.length&&(i[l]=C(f));for(;l<r.length;l++)a[l]();return c=o.length=a.length=d,r=u.slice(0),i=i.slice(0,c)});function f(e){a[l]=e;let[n,r]=w(u[l]);return o[l]=r,t(n,l)}}}var ze=!1;function A(t,i){if(ze&&e.context){let a=e.context;n(r());let o=O(()=>t(i||{}));return n(a),o}return O(()=>t(i||{}))}function Be(){return!0}var Ve={get(e,t,n){return t===a?n:e.get(t)},has(e,t){return t===a?!0:e.has(t)},set:Be,deleteProperty:Be,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Be,deleteProperty:Be}},ownKeys(e){return e.keys()}};function He(e){return(e=typeof e==`function`?e():e)?e:{}}function Ue(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function We(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t=t||!!r&&a in r,e[n]=typeof r==`function`?(t=!0,D(r)):r}if(o&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=He(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in He(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(He(e[n])));return[...new Set(t)]}},Ve);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Ue.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function Ge(e,...t){let n=t.length;if(o&&a in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Ve));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Ve)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}var Ke=e=>`Stale read from <${e}>.`;function qe(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return D(Le(()=>e.each,e.children,t||void 0))}function Je(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return D(Re(()=>e.each,e.children,t||void 0))}function j(e){let t=e.keyed,n=D(()=>e.when,void 0,void 0),r=t?n:D(n,void 0,{equals:(e,t)=>!e==!t});return D(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?O(()=>a(t?i:()=>{if(!O(r))throw Ke(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Ye(e){let t=me(()=>e.children),n=D(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=D(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:D(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return D(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?O(()=>o(a.keyed?i():()=>{if(O(n)()?.[0]!==r)throw Ke(`Match`);return i()})):o},void 0,void 0)}function M(e){return e}var Xe;function Ze(e){return{lang:e?.lang??Xe?.lang,message:e?.message,abortEarly:e?.abortEarly??Xe?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Xe?.abortPipeEarly}}var Qe;function $e(e){return Qe?.get(e)}var et;function N(e){return et?.get(e)}var tt;function nt(e,t){return tt?.get(e)?.get(t)}function rt(e){let t=typeof e;return t===`string`?`"${e}"`:t===`number`||t===`bigint`||t===`boolean`?`${e}`:t===`object`||t===`function`?(e&&Object.getPrototypeOf(e)?.constructor?.name)??`null`:t}function it(e,t,n,r,i){let a=i&&`input`in i?i.input:n.value,o=i?.expected??e.expects??null,s=i?.received??rt(a),c={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:`R`}eceived ${s}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},l=e.kind===`schema`,u=i?.message??e.message??nt(e.reference,c.lang)??(l?N(c.lang):null)??r.message??$e(c.lang);u!==void 0&&(c.message=typeof u==`function`?u(c):u),l&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}function at(e){return{version:1,vendor:`valibot`,validate(t){return e[`~run`]({value:t},Ze())}}}function ot(e,t){return Object.hasOwn(e,t)&&t!==`__proto__`&&t!==`prototype`&&t!==`constructor`}function st(e,t){let n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:n[0]??`never`}function ct(e,t,n){return typeof e.fallback==`function`?e.fallback(t,n):e.fallback}function lt(e,t,n){return typeof e.default==`function`?e.default(t,n):e.default}function ut(e,t){return{kind:`schema`,type:`array`,reference:ut,expects:`Array`,async:!1,item:e,message:t,get"~standard"(){return at(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){let i=n[r],a=this.item[`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else it(this,`type`,e,t);return e}}}function dt(e){return{kind:`schema`,type:`boolean`,reference:dt,expects:`boolean`,async:!1,message:e,get"~standard"(){return at(this)},"~run"(e,t){return typeof e.value==`boolean`?e.typed=!0:it(this,`type`,e,t),e}}}function ft(e){return{kind:`schema`,type:`number`,reference:ft,expects:`number`,async:!1,message:e,get"~standard"(){return at(this)},"~run"(e,t){return typeof e.value==`number`&&!isNaN(e.value)?e.typed=!0:it(this,`type`,e,t),e}}}function pt(e,t){return{kind:`schema`,type:`object`,reference:pt,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return at(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){e.typed=!0,e.value={};for(let r in this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:lt(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=o.issues),t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=ct(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(it(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}}else it(this,`type`,e,t);return e}}}function mt(e,t){return{kind:`schema`,type:`optional`,reference:mt,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return at(this)},"~run"(e,t){return e.value===void 0&&(this.default!==void 0&&(e.value=lt(this,e,t)),e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function ht(e,t){return{kind:`schema`,type:`picklist`,reference:ht,expects:st(e.map(rt),`|`),async:!1,options:e,message:t,get"~standard"(){return at(this)},"~run"(e,t){return this.options.includes(e.value)?e.typed=!0:it(this,`type`,e,t),e}}}function gt(e,t,n){return{kind:`schema`,type:`record`,reference:gt,expects:`Object`,async:!1,key:e,value:t,message:n,get"~standard"(){return at(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){e.typed=!0,e.value={};for(let r in n)if(ot(n,r)){let i=n[r],a=this.key[`~run`]({value:r},t);if(a.issues){let o={type:`object`,origin:`key`,input:n,key:r,value:i};for(let t of a.issues)t.path=[o],e.issues?.push(t);if(e.issues||(e.issues=a.issues),t.abortEarly){e.typed=!1;break}}let o=this.value[`~run`]({value:i},t);if(o.issues){let a={type:`object`,origin:`value`,input:n,key:r,value:i};for(let t of o.issues)t.path?t.path.unshift(a):t.path=[a],e.issues?.push(t);if(e.issues||(e.issues=o.issues),t.abortEarly){e.typed=!1;break}}(!a.typed||!o.typed)&&(e.typed=!1),a.typed&&(e.value[a.value]=o.value)}}else it(this,`type`,e,t);return e}}}function _t(e){return{kind:`schema`,type:`string`,reference:_t,expects:`string`,async:!1,message:e,get"~standard"(){return at(this)},"~run"(e,t){return typeof e.value==`string`?e.typed=!0:it(this,`type`,e,t),e}}}function vt(e,t){let n={};for(let r in e.entries)n[r]=!t||t.includes(r)?mt(e.entries[r]):e.entries[r];return{...e,entries:n,get"~standard"(){return at(this)}}}function yt(e,t,n){let r=e[`~run`]({value:t},Ze(n));return{typed:r.typed,success:!r.issues,output:r.value,issues:r.issues}}var bt=vt(pt({apiEndpoint:_t(),fiatApiEndpoint:_t(),theme:ht([`light`,`dark`,`auto`]),locale:_t(),customColors:gt(_t(),_t()),hideTitle:dt(),hidePoweredBy:dt(),noBackground:dt(),noBorder:dt(),methods:ut(ht([`crypto`,`card`])),supportedChainIds:ut(ft()),rpcOverrides:gt(_t(),_t()),reownProjectId:_t()})),xt=`https://embed.tokenflight.ai/api/config/defaults.json`,St=5e3,Ct=null;function wt(){return Ct||(typeof fetch==`function`?(Ct=(async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),St);try{let t=await fetch(xt,{credentials:`omit`,signal:e.signal});if(!t.ok)return null;let n=yt(bt,await t.json());return n.success?n.output:null}catch{return null}finally{clearTimeout(t)}})(),Ct):(Ct=Promise.resolve(null),Ct))}function Tt(e){if(e!=null){if(typeof e==`boolean`)return e;if(typeof e==`string`){let t=e.trim().toLowerCase();if(t===``||t===`true`||t===`1`||t===`yes`)return!0;if(t===`false`||t===`0`||t===`no`)return!1}}}var[Et,Dt]=w(),[Ot,kt]=w(),[At,jt]=w(),[Mt,Nt]=w(),[Pt,Ft]=w(),[It,Lt]=w(),[Rt,zt]=w(),[Bt,Vt]=w(),[Ht,Ut]=w(),[Wt,Gt]=w(),[Kt,qt]=w(),[Jt,Yt]=w(),[Xt,Zt]=w(),[Qt,$t]=w(),[en,tn]=w();function nn(e){`walletAdapter`in e&&Dt(()=>e.walletAdapter),`callbacks`in e&&kt(()=>e.callbacks),`customColors`in e&&jt(()=>e.customColors),`apiEndpoint`in e&&Nt(e.apiEndpoint),`fiatApiEndpoint`in e&&Ft(e.fiatApiEndpoint),`theme`in e&&Lt(e.theme),`locale`in e&&zt(e.locale),`textOverrides`in e&&Vt(()=>e.textOverrides),`hideTitle`in e&&Ut(e.hideTitle),`hidePoweredBy`in e&&Gt(e.hidePoweredBy),`noBackground`in e&&qt(e.noBackground),`noBorder`in e&&Yt(e.noBorder),`methods`in e&&Zt(()=>e.methods),`rpcOverrides`in e&&$t(()=>e.rpcOverrides),`supportedChainIds`in e&&tn(()=>e.supportedChainIds)}function rn(e){Vt(()=>e)}function an(){typeof window>`u`||wt().then(e=>{e&&O(()=>{e.apiEndpoint!==void 0&&Mt()===void 0&&Nt(e.apiEndpoint),e.fiatApiEndpoint!==void 0&&Pt()===void 0&&Ft(e.fiatApiEndpoint),e.theme!==void 0&&It()===void 0&&Lt(e.theme),e.locale!==void 0&&Rt()===void 0&&zt(e.locale),e.customColors!==void 0&&At()===void 0&&jt(()=>e.customColors),e.hideTitle!==void 0&&Ht()===void 0&&Ut(e.hideTitle),e.hidePoweredBy!==void 0&&Wt()===void 0&&Gt(e.hidePoweredBy),e.noBackground!==void 0&&Kt()===void 0&&qt(e.noBackground),e.noBorder!==void 0&&Jt()===void 0&&Yt(e.noBorder),e.methods!==void 0&&Xt()===void 0&&Zt(()=>e.methods),e.rpcOverrides!==void 0&&Qt()===void 0&&$t(()=>e.rpcOverrides),e.supportedChainIds!==void 0&&en()===void 0&&tn(()=>e.supportedChainIds)})})}an();function on(e){"@babel/helpers - typeof";return on=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},on(e)}function sn(e,t){if(on(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(on(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function cn(e){var t=sn(e,`string`);return on(t)==`symbol`?t:t+``}function ln(e,t,n){return(t=cn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var un=class extends Error{constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText??``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),ln(this,`response`,void 0),ln(this,`request`,void 0),ln(this,`options`,void 0),this.name=`HTTPError`,this.response=e,this.request=t,this.options=n}},dn=class extends Error{constructor(e){let t=`Non-error value was thrown`;try{typeof e==`string`?t=e:e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`&&(t=e.message)}catch{}super(t),ln(this,`name`,`NonError`),ln(this,`value`,void 0),this.value=e}},fn=class extends Error{constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new dn(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:`Forced retry`,t?{cause:t}:void 0),ln(this,`name`,`ForceRetryError`),ln(this,`customDelay`,void 0),ln(this,`code`,void 0),ln(this,`customRequest`,void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},pn=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),mn=typeof globalThis.AbortController==`function`,hn=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,gn=typeof globalThis.ReadableStream==`function`,_n=typeof globalThis.FormData==`function`,vn=[`get`,`post`,`put`,`patch`,`head`,`delete`],yn={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`,bytes:`*/*`},bn=2147483647,xn=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,Sn=Symbol(`stop`),Cn=class{constructor(e){ln(this,`options`,void 0),this.options=e}},wn=e=>new Cn(e),Tn={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},En={next:!0},Dn={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},On=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=xn,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r==`string`?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e==`string`)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if(`byteLength`in e)return e.byteLength;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},kn=(e,t,n)=>{let r,i=0;return e.pipeThrough(new TransformStream({transform(e,a){if(a.enqueue(e),r){i+=r.byteLength;let e=t===0?0:i/t;e>=1&&(e=1-2**-52),n?.({percent:e,totalBytes:Math.max(t,i),transferredBytes:i},r)}r=e},flush(){r&&(i+=r.byteLength,n?.({percent:1,totalBytes:Math.max(t,i),transferredBytes:i},r))}}))},An=(e,t)=>{if(!e.body)return e;if(e.status===204)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let n=Math.max(0,Number(e.headers.get(`content-length`))||0);return new Response(kn(e.body,n,t),{status:e.status,statusText:e.statusText,headers:e.headers})},jn=(e,t,n)=>{if(!e.body)return e;let r=On(n??e.body);return new Request(e,{duplex:`half`,body:kn(e.body,r,t)})},Mn=e=>typeof e==`object`&&!!e,Nn=(...e)=>{for(let t of e)if((!Mn(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return Rn({},...e)},Pn=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n};function Fn(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:Rn(e[n]??[],t[n]??[])}var In=(e={},t={})=>({beforeRequest:Fn(e,t,`beforeRequest`),beforeRetry:Fn(e,t,`beforeRetry`),afterResponse:Fn(e,t,`afterResponse`),beforeError:Fn(e,t,`beforeError`)}),Ln=(e,t)=>{let n=new URLSearchParams;for(let r of[e,t])if(r!==void 0)if(r instanceof URLSearchParams)for(let[e,t]of r.entries())n.append(e,t);else if(Array.isArray(r))for(let e of r){if(!Array.isArray(e)||e.length!==2)throw TypeError(`Array search parameters must be provided in [[key, value], ...] format`);n.append(String(e[0]),String(e[1]))}else if(Mn(r))for(let[e,t]of Object.entries(r))t!==void 0&&n.append(e,String(t));else{let e=new URLSearchParams(r);for(let[t,r]of e.entries())n.append(t,r)}return n},Rn=(...e)=>{let t={},n={},r={},i,a=[];for(let o of e)if(Array.isArray(o))Array.isArray(t)||(t=[]),t=[...t,...o];else if(Mn(o)){for(let[e,n]of Object.entries(o)){if(e===`signal`&&n instanceof globalThis.AbortSignal){a.push(n);continue}if(e===`context`){if(n!=null&&(!Mn(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");t={...t,context:n==null?{}:{...t.context,...n}};continue}if(e===`searchParams`){i=n==null?void 0:i===void 0?n:Ln(i,n);continue}Mn(n)&&e in t&&(n=Rn(t[e],n)),t={...t,[e]:n}}Mn(o.hooks)&&(r=In(r,o.hooks),t.hooks=r),Mn(o.headers)&&(n=Pn(n,o.headers),t.headers=n)}return i!==void 0&&(t.searchParams=i),a.length>0&&(a.length===1?t.signal=a[0]:hn?t.signal=AbortSignal.any(a):t.signal=a.at(-1)),t},zn=e=>vn.includes(e)?e.toUpperCase():e,Bn={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},Vn=(e={})=>{if(typeof e==`number`)return{...Bn,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.methods&&(e.methods=e.methods.map(e=>e.toLowerCase())),e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);let t=Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0));return{...Bn,...t}},Hn=class extends Error{constructor(e){super(`Request timed out: ${e.method} ${e.url}`),ln(this,`request`,void 0),this.name=`TimeoutError`,this.request=e}};async function Un(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new Hn(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function Wn(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var Gn=(e,t)=>{let n={};for(let r in t)Object.hasOwn(t,r)&&!(r in Dn)&&!(r in Tn)&&(!(r in e)||r in En)&&(n[r]=t[r]);return n},Kn=e=>e===void 0?!1:Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:typeof e==`object`?Object.keys(e).length>0:typeof e==`string`?e.trim().length>0:!!e;function qn(e){return e instanceof un||e?.name===un.name}function Jn(e){return e instanceof Hn||e?.name===Hn.name}function Yn(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function Xn(e,t){Yn(e,t),t.add(e)}function P(e,t,n){Yn(e,t),t.set(e,n)}function F(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function I(e,t){return e.get(F(e,t))}function L(e,t,n){return e.set(F(e,t),n),n}var Zn=new WeakMap,Qn=new WeakMap,$n=new WeakMap,R=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,rr=new WeakSet,ir=class e{static create(t,n){let r=new e(t,n),i=F(rr,r,dr).call(r,async()=>{if(typeof I(R,r).timeout==`number`&&I(R,r).timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${bn}`);await Promise.resolve();let e=await F(rr,r,fr).call(r);for(let t of I(R,r).hooks.afterResponse){let n=F(rr,r,cr).call(r,e.clone()),i;try{i=await t(r.request,F(rr,r,pr).call(r),n,{retryCount:I(Qn,r)})}catch(t){throw F(rr,r,ur).call(r,n),F(rr,r,ur).call(r,e),t}if(i instanceof Cn)throw F(rr,r,ur).call(r,n),F(rr,r,ur).call(r,e),new fn(i.options);let a=i instanceof globalThis.Response?i:e;n!==a&&F(rr,r,ur).call(r,n),e!==a&&F(rr,r,ur).call(r,e),e=a}if(F(rr,r,cr).call(r,e),!e.ok&&(typeof I(R,r).throwHttpErrors==`function`?I(R,r).throwHttpErrors(e.status):I(R,r).throwHttpErrors)){let t=new un(e,r.request,F(rr,r,pr).call(r));for(let e of I(R,r).hooks.beforeError)t=await e(t,{retryCount:I(Qn,r)});throw t}if(I(R,r).onDownloadProgress){if(typeof I(R,r).onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!gn)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let t=e.clone();return F(rr,r,ur).call(r,e),An(t,I(R,r).onDownloadProgress)}return e}).finally(()=>{let e=I(er,r);F(rr,r,lr).call(r,e?.body??void 0),F(rr,r,lr).call(r,r.request.body??void 0)});for(let[e,t]of Object.entries(yn))e===`bytes`&&typeof globalThis.Response?.prototype?.bytes!=`function`||(i[e]=async()=>{r.request.headers.set(`accept`,r.request.headers.get(`accept`)||t);let a=await i;if(e===`json`){if(a.status===204)return``;let e=await a.text();return e===``?``:n.parseJson?n.parseJson(e):JSON.parse(e)}return a[e]()});return i}constructor(t,n={}){if(Xn(this,rr),ln(this,`request`,void 0),P(this,Zn,void 0),P(this,Qn,0),P(this,$n,void 0),P(this,R,void 0),P(this,er,void 0),P(this,tr,void 0),P(this,nr,void 0),L($n,this,t),L(R,this,{...n,headers:Pn(I($n,this).headers,n.headers),hooks:In({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:zn(n.method??I($n,this).method??`GET`),prefixUrl:String(n.prefixUrl||``),retry:Vn(n.retry),throwHttpErrors:n.throwHttpErrors??!0,timeout:n.timeout??1e4,fetch:n.fetch??globalThis.fetch.bind(globalThis),context:n.context??{}}),typeof I($n,this)!=`string`&&!(I($n,this)instanceof URL||I($n,this)instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(I(R,this).prefixUrl&&typeof I($n,this)==`string`){if(I($n,this).startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");I(R,this).prefixUrl.endsWith(`/`)||(I(R,this).prefixUrl+=`/`),L($n,this,I(R,this).prefixUrl+I($n,this))}mn&&hn&&(L(tr,this,I(R,this).signal??I($n,this).signal),L(Zn,this,new globalThis.AbortController),I(R,this).signal=I(tr,this)?AbortSignal.any([I(tr,this),I(Zn,this).signal]):I(Zn,this).signal),pn&&(I(R,this).duplex=`half`),I(R,this).json!==void 0&&(I(R,this).body=I(R,this).stringifyJson?.(I(R,this).json)??JSON.stringify(I(R,this).json),I(R,this).headers.set(`content-type`,I(R,this).headers.get(`content-type`)??`application/json`));let r=n.headers&&new globalThis.Headers(n.headers).has(`content-type`);if(I($n,this)instanceof globalThis.Request&&(_n&&I(R,this).body instanceof globalThis.FormData||I(R,this).body instanceof URLSearchParams)&&!r&&I(R,this).headers.delete(`content-type`),this.request=new globalThis.Request(I($n,this),I(R,this)),Kn(I(R,this).searchParams)){let t=`?`+(typeof I(R,this).searchParams==`string`?I(R,this).searchParams.replace(/^\?/,``):new URLSearchParams(ar.call(e,I(R,this).searchParams)).toString()),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(n,I(R,this))}if(I(R,this).onUploadProgress){if(typeof I(R,this).onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!pn)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=F(rr,this,hr).call(this,this.request,I(R,this).body??void 0)}}};function ar(e){return e&&typeof e==`object`&&!Array.isArray(e)&&!(e instanceof URLSearchParams)?Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0)):e}function or(){let e=I(R,this).retry.delay(I(Qn,this)),t=e;I(R,this).retry.jitter===!0?t=Math.random()*e:typeof I(R,this).retry.jitter==`function`&&(t=I(R,this).retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));let n=I(R,this).retry.backoffLimit??1/0;return Math.min(n,t)}async function sr(e){var t;if(L(Qn,this,(t=I(Qn,this),t++,t)),I(Qn,this)>I(R,this).retry.limit)throw e;let n=e instanceof Error?e:new dn(e);if(n instanceof fn)return n.customDelay??F(rr,this,or).call(this);if(!I(R,this).retry.methods.includes(this.request.method.toLowerCase()))throw e;if(I(R,this).retry.shouldRetry!==void 0){let t=await I(R,this).retry.shouldRetry({error:n,retryCount:I(Qn,this)});if(t===!1)throw e;if(t===!0)return F(rr,this,or).call(this)}if(Jn(e)&&!I(R,this).retry.retryOnTimeout)throw e;if(qn(e)){if(!I(R,this).retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Retry-After`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&I(R,this).retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now());let n=I(R,this).retry.maxRetryAfter??e;return e<n?e:n}if(e.response.status===413)throw e}return F(rr,this,or).call(this)}function cr(e){return I(R,this).parseJson&&(e.json=async()=>I(R,this).parseJson(await e.text())),e}function lr(e){e&&e.cancel().catch(()=>void 0)}function ur(e){F(rr,this,lr).call(this,e.body??void 0)}async function dr(e){try{return await e()}catch(t){let n=Math.min(await F(rr,this,sr).call(this,t),bn);if(I(Qn,this)<1)throw t;if(await Wn(n,I(tr,this)?{signal:I(tr,this)}:{}),t instanceof fn&&t.customRequest){let e=I(R,this).signal?new globalThis.Request(t.customRequest,{signal:I(R,this).signal}):new globalThis.Request(t.customRequest);F(rr,this,mr).call(this,e)}for(let e of I(R,this).hooks.beforeRetry){let n=await e({request:this.request,options:F(rr,this,pr).call(this),error:t,retryCount:I(Qn,this)});if(n instanceof globalThis.Request){F(rr,this,mr).call(this,n);break}if(n instanceof globalThis.Response)return n;if(n===Sn)return}return F(rr,this,dr).call(this,e)}}async function fr(){I(Zn,this)?.signal.aborted&&(L(Zn,this,new globalThis.AbortController),I(R,this).signal=I(tr,this)?AbortSignal.any([I(tr,this),I(Zn,this).signal]):I(Zn,this).signal,this.request=new globalThis.Request(this.request,{signal:I(R,this).signal}));for(let e of I(R,this).hooks.beforeRequest){let t=await e(this.request,F(rr,this,pr).call(this),{retryCount:I(Qn,this)});if(t instanceof Response)return t;if(t instanceof globalThis.Request){F(rr,this,mr).call(this,t);break}}let e=Gn(this.request,I(R,this));return L(er,this,this.request),this.request=I(er,this).clone(),I(R,this).timeout===!1?I(R,this).fetch(I(er,this),e):Un(I(er,this),e,I(Zn,this),I(R,this))}function pr(){if(!I(nr,this)){let{hooks:e,...t}=I(R,this);L(nr,this,Object.freeze(t))}return I(nr,this)}function mr(e){L(nr,this,void 0),this.request=F(rr,this,hr).call(this,e)}function hr(e,t){return!I(R,this).onUploadProgress||!e.body?e:jn(e,I(R,this).onUploadProgress,t??I(R,this).body??void 0)}var gr=e=>{let t=(t,n)=>ir.create(t,Nn(e,n));for(let n of vn)t[n]=(t,r)=>ir.create(t,Nn(e,r,{method:n}));return t.create=e=>gr(Nn(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),gr(Nn(e,t))),t.stop=Sn,t.retry=wn,t},_r=gr(),z={INVALID_CONFIG:`TF1001`,INVALID_TOKEN_IDENTIFIER:`TF1002`,INVALID_AMOUNT:`TF1003`,MISSING_REQUIRED_CONFIG:`TF1004`,WALLET_NOT_CONNECTED:`TF2001`,WALLET_CONNECTION_FAILED:`TF2002`,WALLET_ACTION_FAILED:`TF2003`,WALLET_ACTION_REJECTED:`TF2004`,UNSUPPORTED_ACTION_TYPE:`TF2005`,API_REQUEST_FAILED:`TF3001`,API_TIMEOUT:`TF3002`,API_INVALID_RESPONSE:`TF3003`,QUOTE_FAILED:`TF3004`,QUOTE_EXPIRED:`TF3005`,DEPOSIT_BUILD_FAILED:`TF3006`,DEPOSIT_SUBMIT_FAILED:`TF3007`,ORDER_FAILED:`TF3008`,TRANSACTION_FAILED:`TF4001`,TRANSACTION_REJECTED:`TF4002`,INSUFFICIENT_BALANCE:`TF4003`,ELEMENT_NOT_FOUND:`TF5001`,INITIALIZATION_FAILED:`TF5002`,FIAT_QUOTE_FAILED:`TF6001`,FIAT_ORDER_FAILED:`TF6002`,FIAT_STATUS_FAILED:`TF6003`,FIAT_PROVIDER_ERROR:`TF6004`,FIAT_AMOUNT_OUT_OF_RANGE:`TF6005`},vr={[z.INVALID_CONFIG]:`Invalid configuration provided`,[z.INVALID_TOKEN_IDENTIFIER]:`Invalid token identifier format`,[z.INVALID_AMOUNT]:`Invalid amount value`,[z.MISSING_REQUIRED_CONFIG]:`Missing required configuration field`,[z.WALLET_NOT_CONNECTED]:`Wallet is not connected`,[z.WALLET_CONNECTION_FAILED]:`Failed to connect wallet`,[z.WALLET_ACTION_FAILED]:`Wallet action failed`,[z.WALLET_ACTION_REJECTED]:`Wallet action was rejected by user`,[z.UNSUPPORTED_ACTION_TYPE]:`Unsupported wallet action type`,[z.API_REQUEST_FAILED]:`API request failed`,[z.API_TIMEOUT]:`API request timed out`,[z.API_INVALID_RESPONSE]:`Invalid API response`,[z.QUOTE_FAILED]:`Failed to get quote`,[z.QUOTE_EXPIRED]:`Quote has expired`,[z.DEPOSIT_BUILD_FAILED]:`Failed to build deposit transaction`,[z.DEPOSIT_SUBMIT_FAILED]:`Failed to submit deposit`,[z.ORDER_FAILED]:`Order processing failed`,[z.TRANSACTION_FAILED]:`Transaction failed`,[z.TRANSACTION_REJECTED]:`Transaction was rejected`,[z.INSUFFICIENT_BALANCE]:`Insufficient balance`,[z.ELEMENT_NOT_FOUND]:`Target DOM element not found`,[z.INITIALIZATION_FAILED]:`Widget initialization failed`,[z.FIAT_QUOTE_FAILED]:`Failed to get fiat quote`,[z.FIAT_ORDER_FAILED]:`Failed to create fiat order`,[z.FIAT_STATUS_FAILED]:`Failed to get fiat order status`,[z.FIAT_PROVIDER_ERROR]:`Fiat provider error`,[z.FIAT_AMOUNT_OUT_OF_RANGE]:`Fiat amount is out of range`},yr=class extends Error{constructor(e,t,n){let r=typeof t==`string`?t:t instanceof Error||typeof t==`object`&&t&&`message`in t&&typeof t.message==`string`?t.message:vr[e]??`Unknown error`;super(r),this.name=`TokenFlightError`,this.code=e,this.details=n}},br=`https://api.hyperstream.dev`,xr=15e3,Sr=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.ky=_r.create({prefixUrl:this.baseUrl,timeout:xr,retry:0,headers:{"X-TF-SDK-Version":`0.2.0`}})}async request(e){try{return await e}catch(e){if(e instanceof yr)throw e;if(e instanceof Hn)throw new yr(z.API_TIMEOUT,`API request timed out`,e);if(e instanceof un){let t=``;try{t=await e.response.json()}catch{t=await e.response.text().catch(()=>``)}let n=typeof t==`object`&&t&&`message`in t?String(t.message):`API request failed: ${e.response.status} ${e.response.statusText}`;throw new yr(z.API_REQUEST_FAILED,n,{status:e.response.status,body:t})}throw new yr(z.API_REQUEST_FAILED,`API request failed: ${String(e)}`,e)}}getQuotes(e,t){return this.request(this.ky.post(`v1/quotes`,{json:e,signal:t}).json())}buildDeposit(e,t){return this.request(this.ky.post(`v1/deposit/build`,{json:e,signal:t}).json())}submitDeposit(e,t){return this.request(this.ky.put(`v1/deposit/submit`,{json:e,signal:t}).json())}getOrdersByAddress(e,t){let n={};return t?.orderIds?.length&&(n.orderIds=t.orderIds.join(`,`)),t?.limit&&(n.limit=t.limit.toString()),t?.cursor&&(n.cursor=t.cursor.toString()),this.request(this.ky.get(`v1/orders/${encodeURIComponent(e)}`,{searchParams:n}).json())}async getOrderById(e,t){return(await this.getOrdersByAddress(e,{orderIds:[t]})).data[0]??null}getTokens(e){let t={};return e?.q&&(t.q=e.q),e?.chainIds?.length&&(t.chainIds=e.chainIds.join(`,`)),e?.limit&&(t.limit=e.limit.toString()),e?.cursor&&(t.cursor=e.cursor.toString()),this.request(this.ky.get(`v1/tokens`,{searchParams:t}).json())}searchTokens(e,t){let n={q:e};return t?.chainIds?.length&&(n.chainIds=t.chainIds.join(`,`)),this.request(this.ky.get(`v1/tokens/search`,{searchParams:n}).json())}getTopTokens(e){let t={};return e?.chainIds?.length&&(t.chainIds=e.chainIds.join(`,`)),this.request(this.ky.get(`v1/tokens/top`,{searchParams:t}).json())}getTokenBalances(e,t){let n={};return t?.chainIds?.length&&(n.chainIds=t.chainIds.join(`,`)),this.request(this.ky.get(`v1/tokens/balances/${encodeURIComponent(e)}`,{searchParams:n}).json())}getChains(){return this.request(this.ky.get(`v1/chains`).json())}},Cr=15e3,wr=class{constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.ky=_r.create({prefixUrl:this.baseUrl,timeout:Cr,retry:0,headers:{"X-TF-SDK-Version":`0.2.0`}})}async request(e){try{return await e}catch(e){if(e instanceof yr)throw e;if(e instanceof Hn)throw new yr(z.API_TIMEOUT,`Fiat API request timed out`,e);if(e instanceof un){let t=``;try{t=await e.response.json()}catch{t=await e.response.text().catch(()=>``)}let n=typeof t==`object`&&t&&`message`in t?String(t.message):`Fiat API request failed: ${e.response.status} ${e.response.statusText}`;throw new yr(z.API_REQUEST_FAILED,n,{status:e.response.status,body:t})}throw new yr(z.API_REQUEST_FAILED,`Fiat API request failed: ${String(e)}`,e)}}getProviders(){return this.request(this.ky.get(`v1/fiat/providers`).json())}getQuote(e,t){return this.request(this.ky.post(`v1/fiat/quote`,{json:e,signal:t}).json())}createOrder(e,t){return this.request(this.ky.post(`v1/fiat/order`,{json:e,signal:t}).json())}getStatus(e,t,n){let r=n?{force:`1`}:void 0;return this.request(this.ky.get(`v1/fiat/status/${encodeURIComponent(e)}`,{signal:t,searchParams:r}).json())}},Tr=[`filled`,`refunded`,`failed`],Er=new Set([`completed`,`failed`,`canceled`]),Dr=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Or=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),kr=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ar=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function jr(e,t){let n=Ar[e];return typeof n==`object`?n[t]?n.$:void 0:n}var Mr=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Nr=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),Pr={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},B=e=>D(()=>e());function Fr(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var Ir=`_$DX_DELEGATE`;function Lr(e,t,n,r={}){let i;return C(r=>{i=r,t===document?e():G(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function V(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>O(()=>document.importNode(i||(i=a()),!0)):()=>(i||(i=a())).cloneNode(!0);return o.cloneNode=o,o}function Rr(e,t=window.document){let n=t[Ir]||(t[Ir]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Qr))}}function H(e,t,n){Jr(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function zr(e,t,n,r){Jr(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Br(e,t,n){Jr(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function U(e,t){Jr(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function W(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function Vr(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(Xr(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(Xr(e,i,!0),n[i]=o)}return n}function Hr(e,t,n){if(!t)return n?H(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function Ur(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Wr(e,t={},n,r){let i={};return r||T(()=>i.children=$r(e,t.children,i.children)),T(()=>typeof t.ref==`function`&&Gr(t.ref,e)),T(()=>Kr(e,t,n,!0,i,!0)),i}function Gr(e,t,n){return O(()=>e(t,n))}function G(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return $r(e,t,r,n);T(r=>$r(e,t(),r,n),r)}function Kr(e,t,n,r,i={},a=!1){t||(t={});for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=Zr(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||$r(e,t.children);continue}let s=t[o];i[o]=Zr(e,o,s,i[o],n,a,t)}}function qr(t){let n,r;return!Jr()||!(n=e.registry.get(r=ri()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function Jr(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function Yr(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Xr(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function Zr(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return Hr(e,n,r);if(t===`classList`)return Vr(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Mr.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(W(e,i,n,a),a&&Rr([i]))}else if(t.slice(0,5)===`attr:`)H(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Br(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Or.has(t))||!i&&((u=jr(t,e.tagName))||(c=Dr.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(Jr(e))return n;t===`class`||t===`className`?U(e,n):s&&!c&&!l?e[Yr(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Pr[t.split(`:`)[0]];r?zr(e,r,t,n):H(e,kr[t]||t,n)}return n}function Qr(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,`target`,{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,`currentTarget`,{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function $r(e,t,n,r,i){let a=Jr(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=ni(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=ni(e,n,r)}else if(o===`function`)return T(()=>{let i=t();for(;typeof i==`function`;)i=i();n=$r(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(ei(o,t,n,i))return T(()=>n=$r(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=ni(e,n,r),s)return n}else c?n.length===0?ti(e,o,r):Fr(e,n,o):(n&&ni(e),ti(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=ni(e,n,r,t);ni(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function ei(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=ei(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=ei(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function ti(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function ni(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function ri(){return e.getNextContextId()}var ii=`http://www.w3.org/2000/svg`;function ai(e,t=!1,n=void 0){return t?document.createElementNS(ii,e):document.createElement(e,{is:n})}function oi(t,n){let r=D(t);return D(()=>{let t=r();switch(typeof t){case`function`:return O(()=>t(n));case`string`:let r=Nr.has(t),i=e.context?qr():ai(t,r,O(()=>n.is));return Wr(i,n,r),i}})}function si(e){let[,t]=Ge(e,[`component`]);return oi(()=>e.component,t)}var ci=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},li,ui,di={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fi=new(li=new WeakMap,ui=new WeakMap,class{constructor(){P(this,li,di),P(this,ui,!1)}setTimeoutProvider(e){process.env.NODE_ENV!==`production`&&I(ui,this)&&I(li,this),L(li,this,e),process.env.NODE_ENV!==`production`&&L(ui,this,!1)}setTimeout(e,t){return process.env.NODE_ENV!==`production`&&L(ui,this,!0),I(li,this).setTimeout(e,t)}clearTimeout(e){I(li,this).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!==`production`&&L(ui,this,!0),I(li,this).setInterval(e,t)}clearInterval(e){I(li,this).clearInterval(e)}});function pi(e){setTimeout(e,0)}var mi=typeof window>`u`||`Deno`in globalThis;function hi(){}function gi(e,t){return typeof e==`function`?e(t):e}function _i(e){return typeof e==`number`&&e>=0&&e!==1/0}function vi(e,t){return Math.max(e+(t||0)-Date.now(),0)}function yi(e,t){return typeof e==`function`?e(t):e}function bi(e,t){return typeof e==`function`?e(t):e}function xi(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ci(o,t.options))return!1}else if(!Ti(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Si(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(wi(t.options.mutationKey)!==wi(a))return!1}else if(!Ti(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ci(e,t){return(t?.queryKeyHashFn||wi)(e)}function wi(e){return JSON.stringify(e,(e,t)=>Ai(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ti(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Ti(e[n],t[n])):!1}var Ei=Object.prototype.hasOwnProperty;function Di(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ki(e)&&ki(t);if(!r&&!(Ai(e)&&Ai(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ei.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Di(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Oi(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ki(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ai(e){if(!ji(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ji(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ji(e){return Object.prototype.toString.call(e)===`[object Object]`}function Mi(e){return new Promise(t=>{fi.setTimeout(t,e)})}function Ni(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!==`production`)try{return Di(e,t)}catch(e){throw e}return Di(e,t)}return t}function Pi(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fi(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ii=Symbol();function Li(e,t){return process.env.NODE_ENV!==`production`&&e.queryFn,!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ii?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ri(e,t){return typeof e==`function`?e(...t):!!e}function zi(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??(i=t()),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Bi,Vi,Hi,Ui=new(Bi=new WeakMap,Vi=new WeakMap,Hi=new WeakMap,class extends ci{constructor(){super(),P(this,Bi,void 0),P(this,Vi,void 0),P(this,Hi,void 0),L(Hi,this,e=>{if(!mi&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}})}onSubscribe(){I(Vi,this)||this.setEventListener(I(Hi,this))}onUnsubscribe(){this.hasListeners()||(I(Vi,this)?.call(this),L(Vi,this,void 0))}setEventListener(e){L(Hi,this,e),I(Vi,this)?.call(this),L(Vi,this,e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()}))}setFocused(e){I(Bi,this)!==e&&(L(Bi,this,e),this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof I(Bi,this)==`boolean`?I(Bi,this):globalThis.document?.visibilityState!==`hidden`}});function Wi(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}function Gi(e){let t;if(e.then(e=>(t=e,e),hi)?.catch(hi),t!==void 0)return{data:t}}function Ki(e){return e}function qi(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??Ki,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l})=>{let u=c?Gi(c):void 0,d=r.data===void 0?u?.data:r.data,f=d===void 0?d:a(d),p=i.get(o),m=p?.state.status===`pending`,h=p?.state.fetchStatus===`fetching`;if(p){let e=u&&l!==void 0&&l>p.state.dataUpdatedAt;if(r.dataUpdatedAt>p.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;p.setState({...t,data:f})}}else p=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s},{...r,data:f,fetchStatus:`idle`,status:f===void 0?r.status:`success`});c&&!m&&!h&&(l===void 0||l>p.state.dataUpdatedAt)&&p.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(hi)})}var Ji=pi;function Yi(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Ji,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Xi=Yi(),Zi,Qi,$i,ea=new(Zi=new WeakMap,Qi=new WeakMap,$i=new WeakMap,class extends ci{constructor(){super(),P(this,Zi,!0),P(this,Qi,void 0),P(this,$i,void 0),L($i,this,e=>{if(!mi&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}})}onSubscribe(){I(Qi,this)||this.setEventListener(I($i,this))}onUnsubscribe(){this.hasListeners()||(I(Qi,this)?.call(this),L(Qi,this,void 0))}setEventListener(e){L($i,this,e),I(Qi,this)?.call(this),L(Qi,this,e(this.setOnline.bind(this)))}setOnline(e){I(Zi,this)!==e&&(L(Zi,this,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return I(Zi,this)}});function ta(e){return Math.min(1e3*2**e,3e4)}function na(e){return(e??`online`)===`online`?ea.isOnline():!0}var ra=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ia(e){let t=!1,n=0,r,i=Wi(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new ra(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Ui.isFocused()&&(e.networkMode===`always`||ea.isOnline())&&e.canRun(),u=()=>na(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(mi?0:3),o=e.retryDelay??ta,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Mi(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var aa,oa=(aa=new WeakMap,class{constructor(){P(this,aa,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_i(this.gcTime)&&L(aa,this,fi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mi?1/0:300*1e3))}clearGcTimeout(){I(aa,this)&&(fi.clearTimeout(I(aa,this)),L(aa,this,void 0))}}),sa,ca,la,ua,da,fa,pa,ma,ha=(sa=new WeakMap,ca=new WeakMap,la=new WeakMap,ua=new WeakMap,da=new WeakMap,fa=new WeakMap,pa=new WeakMap,ma=new WeakSet,class extends oa{constructor(e){super(),Xn(this,ma),P(this,sa,void 0),P(this,ca,void 0),P(this,la,void 0),P(this,ua,void 0),P(this,da,void 0),P(this,fa,void 0),P(this,pa,void 0),L(pa,this,!1),L(fa,this,e.defaultOptions),this.setOptions(e.options),this.observers=[],L(ua,this,e.client),L(la,this,I(ua,this).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,L(sa,this,ya(this.options)),this.state=e.state??I(sa,this),this.scheduleGc()}get meta(){return this.options.meta}get promise(){return I(da,this)?.promise}setOptions(e){if(this.options={...I(fa,this),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ya(this.options);e.data!==void 0&&(this.setState(va(e.data,e.dataUpdatedAt)),L(sa,this,e))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&I(la,this).remove(this)}setData(e,t){let n=Ni(this.state.data,e,this.options);return F(ma,this,ga).call(this,{data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){F(ma,this,ga).call(this,{type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=I(da,this)?.promise;return I(da,this)?.cancel(e),t?t.then(hi).catch(hi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(I(sa,this))}isActive(){return this.observers.some(e=>bi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ii||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>yi(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!vi(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),I(da,this)?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),I(da,this)?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),I(la,this).notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(I(da,this)&&(I(pa,this)?I(da,this).cancel({revert:!0}):I(da,this).cancelRetry()),this.scheduleGc()),I(la,this).notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||F(ma,this,ga).call(this,{type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&I(da,this)?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(I(da,this))return I(da,this).continueRetry(),I(da,this).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}process.env.NODE_ENV!==`production`&&Array.isArray(this.options.queryKey);let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(L(pa,this,!0),n.signal)})},i=()=>{let e=Li(this.options,t),n=(()=>{let e={client:I(ua,this),queryKey:this.queryKey,meta:this.meta};return r(e),e})();return L(pa,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:I(ua,this),state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),L(ca,this,this.state),(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&F(ma,this,ga).call(this,{type:`fetch`,meta:a.fetchOptions?.meta}),L(da,this,ia({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ra&&e.revert&&this.setState({...I(ca,this),fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{F(ma,this,ga).call(this,{type:`failed`,failureCount:e,error:t})},onPause:()=>{F(ma,this,ga).call(this,{type:`pause`})},onContinue:()=>{F(ma,this,ga).call(this,{type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{let e=await I(da,this).start();if(e===void 0)throw process.env.NODE_ENV,Error(`${this.queryHash} data is undefined`);return this.setData(e),I(la,this).config.onSuccess?.(e,this),I(la,this).config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ra){if(e.silent)return I(da,this).promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw F(ma,this,ga).call(this,{type:`error`,error:e}),I(la,this).config.onError?.(e,this),I(la,this).config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}});function ga(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,..._a(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...va(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return L(ca,this,e.manual?n:void 0),n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Xi.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),I(la,this).notify({query:this,type:`updated`,action:e})})}function _a(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:na(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function va(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ya(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja,Ma,Na,Pa,Fa,Ia=(ba=new WeakMap,xa=new WeakMap,Sa=new WeakMap,Ca=new WeakMap,wa=new WeakMap,Ta=new WeakMap,Ea=new WeakMap,Da=new WeakMap,Oa=new WeakMap,ka=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Ma=new WeakMap,Na=new WeakMap,Pa=new WeakMap,Fa=new WeakSet,class extends ci{constructor(e,t){super(),Xn(this,Fa),P(this,ba,void 0),P(this,xa,void 0),P(this,Sa,void 0),P(this,Ca,void 0),P(this,wa,void 0),P(this,Ta,void 0),P(this,Ea,void 0),P(this,Da,void 0),P(this,Oa,void 0),P(this,ka,void 0),P(this,Aa,void 0),P(this,ja,void 0),P(this,Ma,void 0),P(this,Na,void 0),P(this,Pa,new Set),this.options=t,L(ba,this,e),L(Da,this,null),L(Ea,this,Wi()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(xa,this).addObserver(this),qa(I(xa,this),this.options)?F(Fa,this,La).call(this):this.updateResult(),F(Fa,this,Va).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ja(I(xa,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ja(I(xa,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,F(Fa,this,Ha).call(this),F(Fa,this,Ua).call(this),I(xa,this).removeObserver(this)}setOptions(e){let t=this.options,n=I(xa,this);if(this.options=I(ba,this).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof bi(this.options.enabled,I(xa,this))!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);F(Fa,this,Wa).call(this),I(xa,this).setOptions(this.options),t._defaulted&&!Oi(this.options,t)&&I(ba,this).getQueryCache().notify({type:`observerOptionsUpdated`,query:I(xa,this),observer:this});let r=this.hasListeners();r&&Ya(I(xa,this),n,this.options,t)&&F(Fa,this,La).call(this),this.updateResult(),r&&(I(xa,this)!==n||bi(this.options.enabled,I(xa,this))!==bi(t.enabled,I(xa,this))||yi(this.options.staleTime,I(xa,this))!==yi(t.staleTime,I(xa,this)))&&F(Fa,this,Ra).call(this);let i=F(Fa,this,za).call(this);r&&(I(xa,this)!==n||bi(this.options.enabled,I(xa,this))!==bi(t.enabled,I(xa,this))||i!==I(Na,this))&&F(Fa,this,Ba).call(this,i)}getOptimisticResult(e){let t=I(ba,this).getQueryCache().build(I(ba,this),e),n=this.createResult(t,e);return Za(this,n)&&(L(Ca,this,n),L(Ta,this,this.options),L(wa,this,I(xa,this).state)),n}getCurrentResult(){return I(Ca,this)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&I(Ea,this).status===`pending`&&I(Ea,this).reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){I(Pa,this).add(e)}getCurrentQuery(){return I(xa,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=I(ba,this).defaultQueryOptions(e),n=I(ba,this).getQueryCache().build(I(ba,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return F(Fa,this,La).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),I(Ca,this)))}createResult(e,t){let n=I(xa,this),r=this.options,i=I(Ca,this),a=I(wa,this),o=I(Ta,this),s=e===n?I(Sa,this):e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&qa(e,t),o=i&&Ya(e,n,t,r);(a||o)&&(l={...l,..._a(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(I(Aa,this)?.state.data,I(Aa,this)):t.placeholderData,e!==void 0&&(m=`success`,d=Ni(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===I(Oa,this))d=I(ka,this);else try{L(Oa,this,t.select),d=t.select(d),d=Ni(i?.data,d,t),L(ka,this,d),L(Da,this,null)}catch(e){L(Da,this,e)}I(Da,this)&&(f=I(Da,this),d=I(ka,this),p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Xa(e,t),refetch:this.refetch,promise:I(Ea,this),isEnabled:bi(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(L(Ea,this,x.promise=Wi()))},o=I(Ea,this);switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=I(Ca,this),t=this.createResult(I(xa,this),this.options);L(wa,this,I(xa,this).state),L(Ta,this,this.options),I(wa,this).data!==void 0&&L(Aa,this,I(xa,this)),!Oi(t,e)&&(L(Ca,this,t),F(Fa,this,Ga).call(this,{listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!I(Pa,this).size)return!0;let r=new Set(n??I(Pa,this));return this.options.throwOnError&&r.add(`error`),Object.keys(I(Ca,this)).some(t=>{let n=t;return I(Ca,this)[n]!==e[n]&&r.has(n)})})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&F(Fa,this,Va).call(this)}});function La(e){F(Fa,this,Wa).call(this);let t=I(xa,this).fetch(this.options,e);return e?.throwOnError||(t=t.catch(hi)),t}function Ra(){F(Fa,this,Ha).call(this);let e=yi(this.options.staleTime,I(xa,this));if(mi||I(Ca,this).isStale||!_i(e))return;let t=vi(I(Ca,this).dataUpdatedAt,e)+1;L(ja,this,fi.setTimeout(()=>{I(Ca,this).isStale||this.updateResult()},t))}function za(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(I(xa,this)):this.options.refetchInterval)??!1}function Ba(e){F(Fa,this,Ua).call(this),L(Na,this,e),!(mi||bi(this.options.enabled,I(xa,this))===!1||!_i(I(Na,this))||I(Na,this)===0)&&L(Ma,this,fi.setInterval(()=>{(this.options.refetchIntervalInBackground||Ui.isFocused())&&F(Fa,this,La).call(this)},I(Na,this)))}function Va(){F(Fa,this,Ra).call(this),F(Fa,this,Ba).call(this,F(Fa,this,za).call(this))}function Ha(){I(ja,this)&&(fi.clearTimeout(I(ja,this)),L(ja,this,void 0))}function Ua(){I(Ma,this)&&(fi.clearInterval(I(Ma,this)),L(Ma,this,void 0))}function Wa(){let e=I(ba,this).getQueryCache().build(I(ba,this),this.options);if(e===I(xa,this))return;let t=I(xa,this);L(xa,this,e),L(Sa,this,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function Ga(e){Xi.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(I(Ca,this))}),I(ba,this).getQueryCache().notify({query:I(xa,this),type:`observerResultsUpdated`})})}function Ka(e,t){return bi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function qa(e,t){return Ka(e,t)||e.state.data!==void 0&&Ja(e,t,t.refetchOnMount)}function Ja(e,t,n){if(bi(t.enabled,e)!==!1&&yi(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Xa(e,t)}return!1}function Ya(e,t,n,r){return(e!==t||bi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Xa(e,n)}function Xa(e,t){return bi(t.enabled,e)!==!1&&e.isStaleByTime(yi(t.staleTime,e))}function Za(e,t){return!Oi(e.getCurrentResult(),t)}function Qa(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{zi(e,()=>t.signal,()=>n=!0)},u=Li(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Fi:Pi;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?eo:$a,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:$a(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function $a(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function eo(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var to,no,ro,io,ao,oo=(to=new WeakMap,no=new WeakMap,ro=new WeakMap,io=new WeakMap,ao=new WeakSet,class extends oa{constructor(e){super(),Xn(this,ao),P(this,to,void 0),P(this,no,void 0),P(this,ro,void 0),P(this,io,void 0),L(to,this,e.client),this.mutationId=e.mutationId,L(ro,this,e.mutationCache),L(no,this,[]),this.state=e.state||co(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){I(no,this).includes(e)||(I(no,this).push(e),this.clearGcTimeout(),I(ro,this).notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){L(no,this,I(no,this).filter(t=>t!==e)),this.scheduleGc(),I(ro,this).notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){I(no,this).length||(this.state.status===`pending`?this.scheduleGc():I(ro,this).remove(this))}continue(){return I(io,this)?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{F(ao,this,so).call(this,{type:`continue`})},n={client:I(to,this),meta:this.options.meta,mutationKey:this.options.mutationKey};L(io,this,ia({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{F(ao,this,so).call(this,{type:`failed`,failureCount:e,error:t})},onPause:()=>{F(ao,this,so).call(this,{type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(ro,this).canRun(this)}));let r=this.state.status===`pending`,i=!I(io,this).canStart();try{if(r)t();else{F(ao,this,so).call(this,{type:`pending`,variables:e,isPaused:i}),I(ro,this).config.onMutate&&await I(ro,this).config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&F(ao,this,so).call(this,{type:`pending`,context:t,variables:e,isPaused:i})}let a=await I(io,this).start();return await I(ro,this).config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await I(ro,this).config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),F(ao,this,so).call(this,{type:`success`,data:a}),a}catch(t){try{await I(ro,this).config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await I(ro,this).config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw F(ao,this,so).call(this,{type:`error`,error:t}),t}finally{I(ro,this).runNext(this)}}});function so(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Xi.batch(()=>{I(no,this).forEach(t=>{t.onMutationUpdate(e)}),I(ro,this).notify({mutation:this,type:`updated`,action:e})})}function co(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var lo,uo,fo,po=(lo=new WeakMap,uo=new WeakMap,fo=new WeakMap,class extends ci{constructor(e={}){super(),P(this,lo,void 0),P(this,uo,void 0),P(this,fo,void 0),this.config=e,L(lo,this,new Set),L(uo,this,new Map),L(fo,this,0)}build(e,t,n){var r;let i=new oo({client:e,mutationCache:this,mutationId:L(fo,this,(r=I(fo,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){I(lo,this).add(e);let t=mo(e);if(typeof t==`string`){let n=I(uo,this).get(t);n?n.push(e):I(uo,this).set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(I(lo,this).delete(e)){let t=mo(e);if(typeof t==`string`){let n=I(uo,this).get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&I(uo,this).delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=mo(e);if(typeof t==`string`){let n=I(uo,this).get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=mo(e);return typeof t==`string`?(I(uo,this).get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Xi.batch(()=>{I(lo,this).forEach(e=>{this.notify({type:`removed`,mutation:e})}),I(lo,this).clear(),I(uo,this).clear()})}getAll(){return Array.from(I(lo,this))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Si(t,e))}findAll(e={}){return this.getAll().filter(t=>Si(e,t))}notify(e){Xi.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Xi.batch(()=>Promise.all(e.map(e=>e.continue().catch(hi))))}});function mo(e){return e.options.scope?.id}var ho,go=(ho=new WeakMap,class extends ci{constructor(e={}){super(),P(this,ho,void 0),this.config=e,L(ho,this,new Map)}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ci(r,t),a=this.get(i);return a||(a=new ha({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){I(ho,this).has(e.queryHash)||(I(ho,this).set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=I(ho,this).get(e.queryHash);t&&(e.destroy(),t===e&&I(ho,this).delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Xi.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return I(ho,this).get(e)}getAll(){return[...I(ho,this).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>xi(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>xi(e,t)):t}notify(e){Xi.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Xi.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Xi.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}),_o,vo,yo,bo,xo,So,Co,wo,To=(_o=new WeakMap,vo=new WeakMap,yo=new WeakMap,bo=new WeakMap,xo=new WeakMap,So=new WeakMap,Co=new WeakMap,wo=new WeakMap,class{constructor(e={}){P(this,_o,void 0),P(this,vo,void 0),P(this,yo,void 0),P(this,bo,void 0),P(this,xo,void 0),P(this,So,void 0),P(this,Co,void 0),P(this,wo,void 0),L(_o,this,e.queryCache||new go),L(vo,this,e.mutationCache||new po),L(yo,this,e.defaultOptions||{}),L(bo,this,new Map),L(xo,this,new Map),L(So,this,0)}mount(){var e;L(So,this,(e=I(So,this),e++,e)),I(So,this)===1&&(L(Co,this,Ui.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(_o,this).onFocus())})),L(wo,this,ea.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(_o,this).onOnline())})))}unmount(){var e;L(So,this,(e=I(So,this),e--,e)),I(So,this)===0&&(I(Co,this)?.call(this),L(Co,this,void 0),I(wo,this)?.call(this),L(wo,this,void 0))}isFetching(e){return I(_o,this).findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return I(vo,this).findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return I(_o,this).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=I(_o,this).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(yi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return I(_o,this).findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=I(_o,this).get(r.queryHash)?.state.data,a=gi(t,i);if(a!==void 0)return I(_o,this).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Xi.batch(()=>I(_o,this).findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return I(_o,this).get(t.queryHash)?.state}removeQueries(e){let t=I(_o,this);Xi.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=I(_o,this);return Xi.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Xi.batch(()=>I(_o,this).findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(hi).catch(hi)}invalidateQueries(e,t={}){return Xi.batch(()=>(I(_o,this).findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Xi.batch(()=>I(_o,this).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(hi)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(hi)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=I(_o,this).build(this,t);return n.isStaleByTime(yi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hi).catch(hi)}fetchInfiniteQuery(e){return e.behavior=Qa(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hi).catch(hi)}ensureInfiniteQueryData(e){return e.behavior=Qa(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ea.isOnline()?I(vo,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(_o,this)}getMutationCache(){return I(vo,this)}getDefaultOptions(){return I(yo,this)}setDefaultOptions(e){L(yo,this,e)}setQueryDefaults(e,t){I(bo,this).set(wi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...I(bo,this).values()],n={};return t.forEach(t=>{Ti(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){I(xo,this).set(wi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...I(xo,this).values()],n={};return t.forEach(t=>{Ti(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...I(yo,this).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ci(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ii&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...I(yo,this).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(_o,this).clear(),I(vo,this).clear()}}),Eo=Symbol(`store-raw`),Do=Symbol(`store-node`),Oo=Symbol(`store-has`),ko=Symbol(`store-self`);function Ao(e){let t=e[a];if(!t&&(Object.defineProperty(e,a,{value:t=new Proxy(e,Ro)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function jo(e){let t;return typeof e==`object`&&!!e&&(e[a]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Mo(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[Eo])return n;if(!jo(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=Mo(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=Mo(i,t))!==i&&(e[a]=r))}return e}function No(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Po(e,t,n){if(e[t])return e[t];let[r,i]=w(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Fo(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===a||t===Do?n:(delete n.value,delete n.writable,n.get=()=>e[a][t],n)}function Io(e){se()&&Po(No(e,Do),ko)()}function Lo(e){return Io(e),Reflect.ownKeys(e)}var Ro={get(e,t,n){if(t===Eo)return e;if(t===a)return n;if(t===s)return Io(e),n;let r=No(e,Do),i=r[t],o=i?i():e[t];if(t===Do||t===Oo||t===`__proto__`)return o;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);se()&&(typeof o!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(o=Po(r,t,o)())}return jo(o)?Ao(o):o},has(e,t){return t===Eo||t===a||t===s||t===Do||t===Oo||t===`__proto__`?!0:(se()&&Po(No(e,Oo),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Lo,getOwnPropertyDescriptor:Fo};function zo(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Oo]&&e[Oo][t]&&i!==void 0&&e[Oo][t].$()):(e[t]=n,e[Oo]&&e[Oo][t]&&i===void 0&&e[Oo][t].$());let o=No(e,Do),s;if((s=Po(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=Po(o,`length`,a))&&s.$(e.length)}(s=o[ko])&&s.$()}function Bo(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];zo(e,i,t[i])}}function Vo(e,t){if(typeof t==`function`&&(t=t(e)),t=Mo(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&zo(e,n,r)}zo(e,`length`,r)}else Bo(e,t)}function Ho(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)Ho(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Ho(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)Ho(e,[r].concat(t),n);return}else if(t.length>1){Ho(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=Mo(a),r===void 0||jo(i)&&jo(a)&&!Array.isArray(a)?Bo(i,a):zo(e,r,a))}function Uo(...[e,t]){let n=Mo(e||{}),r=Array.isArray(n),i=Ao(n);function a(...e){re(()=>{r&&e.length===1?Vo(n,e[0]):Ho(n,e)})}return[i,a]}var Wo=Symbol(`store-root`);function Go(e,t,n,r,i){let a=t[n];if(e===a)return;let o=Array.isArray(e);if(n!==Wo&&(!jo(e)||!jo(a)||o!==Array.isArray(a)||i&&e[i]!==a[i])){zo(t,n,e);return}if(o){if(e.length&&a.length&&(!r||i&&e[0]&&e[0][i]!=null)){let t,n,o,s,c,l,u,d;for(o=0,s=Math.min(a.length,e.length);o<s&&(a[o]===e[o]||i&&a[o]&&e[o]&&a[o][i]&&a[o][i]===e[o][i]);o++)Go(e[o],a,o,r,i);let f=Array(e.length),p=new Map;for(s=a.length-1,c=e.length-1;s>=o&&c>=o&&(a[s]===e[c]||i&&a[s]&&e[c]&&a[s][i]&&a[s][i]===e[c][i]);s--,c--)f[c]=a[s];if(o>c||o>s){for(n=o;n<=c;n++)zo(a,n,e[n]);for(;n<e.length;n++)zo(a,n,f[n]),Go(e[n],a,n,r,i);a.length>e.length&&zo(a,`length`,e.length);return}for(u=Array(c+1),n=c;n>=o;n--)l=e[n],d=i&&l?l[i]:l,t=p.get(d),u[n]=t===void 0?-1:t,p.set(d,n);for(t=o;t<=s;t++)l=a[t],d=i&&l?l[i]:l,n=p.get(d),n!==void 0&&n!==-1&&(f[n]=a[t],n=u[n],p.set(d,n));for(n=o;n<e.length;n++)n in f?(zo(a,n,f[n]),Go(e[n],a,n,r,i)):zo(a,n,e[n])}else for(let t=0,n=e.length;t<n;t++)Go(e[t],a,t,r,i);a.length>e.length&&zo(a,`length`,e.length);return}let s=Object.keys(e);for(let t=0,n=s.length;t<n;t++)Go(e[s[t]],a,s[t],r,i);let c=Object.keys(a);for(let t=0,n=c.length;t<n;t++)e[c[t]]===void 0&&zo(a,c[t],void 0)}function Ko(e,t={}){let{merge:n,key:r=`id`}=t,i=Mo(e);return e=>{if(!jo(e)||!jo(i))return i;let t=Go(i,{[Wo]:e},Wo,n,r);return t===void 0?e:t}}var qo=fe(void 0),Jo=e=>{if(e)return e;let t=pe(qo);if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t()},Yo=e=>(T(t=>(t?.(),e.client.mount(),e.client.unmount.bind(e.client))),oe(()=>e.client.unmount()),A(qo.Provider,{value:()=>e.client,get children(){return e.children}})),Xo=fe(()=>!1),Zo=()=>pe(Xo);Xo.Provider;function Qo(e,t,n,r){if(n===!1)return t;if(typeof n==`function`){let r=n(e.data,t.data);return{...t,data:r}}let i=t.data;if(e.data===void 0)try{i=structuredClone(i)}catch{}let a=Ko(i,{key:n})(e.data);return{...t,data:a}}var $o=(e,t)=>t;function es(e,t,n){let r=D(()=>Jo(n?.())),i=Zo(),a=D(()=>{let t=r().defaultQueryOptions(e());return t._optimisticResults=i()?`isRestoring`:`optimistic`,t.structuralSharing=!1,t}),o=a(),[s,c]=w(new t(r(),a())),l=s().getOptimisticResult(a()),[u,d]=Uo(l),f=()=>s().subscribe(e=>{l=e,queueMicrotask(()=>{h&&v()})});function p(e){let t=s().options,n=t.reconcile;d(r=>Qo(r,e,n===void 0?!1:n,t.queryHash))}function m(){return[()=>u,e=>{let t=Mo(u);if(typeof e==`function`&&(e=e(t)),e?.hydrationData){let{hydrationData:t,...n}=e;e=n}p(e)}]}let h=null,g=null,[_,{refetch:v}]=ne(()=>{let e=s();return new Promise((t,n)=>{if(g=t,!h&&!i()&&(h=f()),e.updateResult(),l.isError&&!l.isFetching&&!i()&&Ri(e.options.throwOnError,[l.error,e.getCurrentQuery()]))return p(l),n(l.error);if(!l.isLoading)return g=null,t($o(e.getCurrentQuery(),l));p(l)})},{storage:m,get deferStream(){return e().deferStream},onHydrated(e,t){if(t.value&&`hydrationData`in t.value&&qi(r(),{queries:[{...t.value.hydrationData}]}),h)return;let n={...o};(o.staleTime||!o.initialData)&&t.value&&(n.refetchOnMount=!1),s().setOptions(n),p(s().getOptimisticResult(n)),h=f()}});return ee(ie(r,e=>{h&&h();let n=new t(e,a());h=f(),c(n)},{defer:!0})),ee(ie(i,e=>{e||v()},{defer:!0})),oe(()=>{h&&(h(),h=null),g&&(g(l),g=null)}),ee(ie([s,a],([e,t])=>{e.setOptions(t),p(e.getOptimisticResult(t)),v()},{defer:!0})),new Proxy(u,{get(e,t){return t===`data`?u.data===void 0?_()?.data:_.latest?.data:Reflect.get(e,t)}})}function ts(e,t){return es(D(()=>e()),Ia,t)}var ns=class extends To{constructor(e={}){super(e)}},rs={"--tf-bg":`#ffffff`,"--tf-bg-secondary":`#f8f9fb`,"--tf-bg-elevated":`#ffffff`,"--tf-surface":`#ffffff`,"--tf-surface-hover":`#f3f4f8`,"--tf-text":`#0f1419`,"--tf-text-secondary":`#5e6673`,"--tf-text-tertiary":`#9ba3af`,"--tf-text-on-primary":`#ffffff`,"--tf-border":`#e8eaef`,"--tf-border-light":`#f0f1f5`,"--tf-primary":`#6C5CE7`,"--tf-primary-alpha":`rgba(108,92,231,0.12)`,"--tf-primary-light":`rgba(108,92,231,0.1)`,"--tf-primary-glow":`rgba(108,92,231,0.15)`,"--tf-success":`#00C48C`,"--tf-success-bg":`rgba(0,196,140,0.08)`,"--tf-error":`#FF4757`,"--tf-error-bg":`rgba(255,71,87,0.08)`,"--tf-error-alpha":`rgba(255,71,87,0.06)`,"--tf-warning":`#FFAA00`,"--tf-warning-bg":`rgba(255,170,0,0.08)`,"--tf-shadow":`0 2px 16px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.1)`,"--tf-shadow-lg":`0 8px 40px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.1)`,"--tf-input-bg":`#f5f6f8`,"--tf-glass":`rgba(255,255,255,0.7)`,"--tf-skeleton":`#e8eaef`,"--tf-radius-xs":`6px`,"--tf-radius-sm":`8px`,"--tf-radius":`12px`,"--tf-radius-lg":`16px`,"--tf-radius-xl":`20px`,"--tf-button-radius":`var(--tf-radius-lg)`,"--tf-widget-max-width":`400px`,"--tf-accent":`var(--tf-primary)`,"--tf-accent-light":`var(--tf-primary-light)`,"--tf-accent-glow":`var(--tf-primary-glow)`},is={"--tf-bg":`#0d0f14`,"--tf-bg-secondary":`#141720`,"--tf-bg-elevated":`#1e2230`,"--tf-surface":`#181b25`,"--tf-surface-hover":`#1e2230`,"--tf-text":`#eef0f6`,"--tf-text-secondary":`#8b93a5`,"--tf-text-tertiary":`#555d6e`,"--tf-text-on-primary":`#ffffff`,"--tf-border":`#252a38`,"--tf-border-light":`#1e2230`,"--tf-primary":`#8B7CF6`,"--tf-primary-alpha":`rgba(139,124,246,0.15)`,"--tf-primary-light":`rgba(139,124,246,0.1)`,"--tf-primary-glow":`rgba(139,124,246,0.2)`,"--tf-success":`#34D399`,"--tf-success-bg":`rgba(52,211,153,0.1)`,"--tf-error":`#F87171`,"--tf-error-bg":`rgba(248,113,113,0.1)`,"--tf-error-alpha":`rgba(248,113,113,0.06)`,"--tf-warning":`#FBBF24`,"--tf-warning-bg":`rgba(251,191,36,0.1)`,"--tf-shadow":`0 2px 16px rgba(0,0,0,0.3), 0 0 1px rgba(0,0,0,0.5)`,"--tf-shadow-lg":`0 8px 40px rgba(0,0,0,0.4), 0 0 1px rgba(0,0,0,0.5)`,"--tf-input-bg":`#141720`,"--tf-glass":`rgba(13,15,20,0.7)`,"--tf-skeleton":`#252a38`,"--tf-radius-xs":`6px`,"--tf-radius-sm":`8px`,"--tf-radius":`12px`,"--tf-radius-lg":`16px`,"--tf-radius-xl":`20px`,"--tf-button-radius":`var(--tf-radius-lg)`,"--tf-widget-max-width":`400px`,"--tf-accent":`var(--tf-primary)`,"--tf-accent-light":`var(--tf-primary-light)`,"--tf-accent-glow":`var(--tf-primary-glow)`};function as(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(`
2
+ `)}function os(e){if(typeof window>`u`||!window.matchMedia)return()=>{};let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>e(t.matches?is:rs);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}function ss(e,t){for(let[n,r]of Object.entries(t))r!==void 0&&/^--tf-[a-z]/.test(n)&&(/[\n\r\0]/.test(r)||e.style.setProperty(n,r))}var cs=new ns({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function ls(e){if(typeof e==`string`){let t=document.querySelector(e);if(!t)throw new yr(z.ELEMENT_NOT_FOUND,`Element not found: ${e}`);return t}return e}function us(e,t){var n,r,i,a,o,s,c,l;return n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,o=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakSet,class{constructor(e){Xn(this,l),P(this,n,null),P(this,r,null),P(this,i,void 0),P(this,a,null),P(this,o,void 0),P(this,s,void 0),P(this,c,void 0),L(i,this,ls(e.container)),L(o,this,e.config),L(s,this,e.walletAdapter),L(c,this,e.callbacks)}initialize(){I(n,this)&&this.destroy();let t=document.createElement(`div`);I(i,this).appendChild(t);let r=t.attachShadow({mode:`open`});L(a,this,r);let f=document.createElement(`style`),p=I(o,this).theme??`light`;F(l,this,u).call(this,f,p),r.appendChild(f),F(l,this,d).call(this,f);let m=document.createElement(`div`);r.appendChild(m),I(o,this).customColors&&ss(t,I(o,this).customColors);let h=I(o,this),g=I(s,this),_=I(c,this);L(n,this,Lr(()=>A(Yo,{client:cs,get children(){return e(h,g,_)}}),m))}destroy(){I(r,this)&&(I(r,this).call(this),L(r,this,null)),I(n,this)&&(I(n,this).call(this),L(n,this,null)),L(a,this,null),I(i,this).innerHTML=``}setTheme(e){L(o,this,{...I(o,this),theme:e});let t=I(a,this);if(t){let n=t.querySelector(`style`);n&&(F(l,this,u).call(this,n,e),F(l,this,d).call(this,n))}}setCustomColors(e){let t=I(a,this)?.host;t&&ss(t,e)}};function u(e,n){let r=(n===`auto`?typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches===!0:n===`dark`)?is:rs;e.textContent=`${t()}\n:host { ${as(r)} }`}function d(e){I(r,this)&&(I(r,this).call(this),L(r,this,null)),I(o,this).theme===`auto`&&L(r,this,os(n=>{e.textContent=`${t()}\n:host { ${as(n)} }`}))}}var ds=/^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{1,8})*$/;function fs(e,t){if(typeof e!=`string`||e.trim()===``)throw Error(`[fluenti] ${t}: locale must be a non-empty string, got ${JSON.stringify(e)}`);if(!ds.test(e))throw Error(`[fluenti] ${t}: locale must be a valid BCP 47 tag (e.g. "en", "en-US"), got ${JSON.stringify(e)}`)}var ps=class{constructor(){ln(this,`_catalogs`,Object.create(null))}get(e,t){let n=this._catalogs[e];if(n)return Object.hasOwn(n,t)?n[t]:void 0}set(e,t){let n=this._catalogs[e];n?this._catalogs[e]={...n,...t}:this._catalogs[e]={...t}}has(e,t){let n=this._catalogs[e];return n?Object.hasOwn(n,t):!1}getLocales(){return Object.keys(this._catalogs)}};function ms(e,t){return t===void 0?e:JSON.stringify([e,t])}function hs(e,t){let n=ms(e,t),r=2166136261;for(let e=0;e<n.length;e++)r^=n.charCodeAt(e),r=Math.imul(r,16777619);return(r>>>0).toString(36)}function gs(e,t){return hs(e,t)}function _s(e){return typeof e.id==`string`&&e.id.length>0?e.id:typeof e.message==`string`?gs(e.message,e.context):e.id??``}function vs(e,t){let n=e[0];for(let r=0;r<t.length;r++)n+=`{arg${r}}`+e[r+1];return n}function ys(e){return(e.id===void 0||e.id===``)&&e.message!==void 0?{...e,id:gs(e.message,e.context)}:e}function bs(e,...t){let n=vs(e,t);return{id:gs(n),message:n}}bs.descriptor=ys;var xs={short:{year:`numeric`,month:`numeric`,day:`numeric`},long:{year:`numeric`,month:`long`,day:`numeric`,weekday:`long`},time:{hour:`numeric`,minute:`numeric`},datetime:{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}},Ss={en:`USD`,"en-US":`USD`,"en-GB":`GBP`,"en-AU":`AUD`,"en-CA":`CAD`,ja:`JPY`,"ja-JP":`JPY`,"zh-CN":`CNY`,"zh-TW":`TWD`,de:`EUR`,"de-DE":`EUR`,fr:`EUR`,"fr-FR":`EUR`,es:`EUR`,"es-ES":`EUR`,ko:`KRW`,"ko-KR":`KRW`,ar:`SAR`,"ar-SA":`SAR`},Cs={currency:e=>({style:`currency`,currency:Ss[e]??Ss[e.split(`-`)[0]]??`USD`}),percent:{style:`percent`},decimal:{minimumFractionDigits:2,maximumFractionDigits:2}};function ws(e,t,n,r){return t?e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r==null?e:String(r)}):e}function Ts(e){fs(e.locale,`createFluentiCore`);let t=e.locale,n=new ps,r=e.interpolate??ws,i=e.diagnostics&&`missingKey`in e.diagnostics?e.diagnostics:void 0;for(let[t,r]of Object.entries(e.messages))n.set(t,r);function a(n,r){return e.transform?e.transform(n,r,t):n}function o(t,n,i,o){return typeof t==`function`?a(t(n),o):t.includes(`{`)?a(r(t,n,i,e.formatters),o):a(t,o)}function s(r,a){let s=n.get(t,r);if(s!==void 0)return o(s,a,t,r);if(e.fallbackLocale){let s=n.get(e.fallbackLocale,r);if(s!==void 0)return i?.fallbackUsed(t,e.fallbackLocale,r),o(s,a,e.fallbackLocale,r)}let c=e.fallbackChain?.[t]??e.fallbackChain?.[`*`];if(c)for(let e of c){let s=n.get(e,r);if(s!==void 0)return i?.fallbackUsed(t,e,r),o(s,a,e,r)}}function c(n){if(e.missing)try{let r=e.missing(t,n);if(r!==void 0)return a(r,n)}catch{}}let l=e.devWarnings||typeof process<`u`&&process.env?.FLUENTI_DEBUG===`true`;function u(n,o){let u=s(n,o);if(u!==void 0)return u;let d=c(n);return d===void 0?n.includes(`{`)?a(r(n,o,t,e.formatters),n):(i?.missingKey(t,n),l?`[!] ${n}`:n):d}return{get locale(){return t},set locale(n){fs(n,`locale setter`);let r=t;t=n,r!==n&&e.onLocaleChange?.(n,r)},t(n,...i){if(Array.isArray(n)&&`raw`in n){let e=vs(n,i),t=Object.fromEntries(i.map((e,t)=>[`arg${t}`,e])),r=s(gs(e),t);return r===void 0?u(e,t):r}let o=n,l=i[0];if(typeof o==`object`){let n=o,i=_s(n);if(i){let e=s(i,l);if(e!==void 0)return e;let t=c(i);if(t!==void 0)return t}if(n.message!==void 0){let o=i||n.message;return a(r(n.message,l,t,e.formatters),o)}return i}return u(o,l)},setLocale(n){fs(n,`setLocale`);let r=t;t=n,r!==n&&e.onLocaleChange?.(n,r)},loadMessages(e,t){n.set(e,t)},getLocales(){return n.getLocales()},d(n,r){let i=typeof n==`number`?new Date(n):n;if(r===`relative`&&!e.dateFormats?.relative){let e=i.getTime()-Date.now(),n=Math.abs(e),r=e<0?-1:1,a=`second`,o=Math.round(n/1e3);n>=864e5?(a=`day`,o=Math.round(n/864e5)):n>=36e5?(a=`hour`,o=Math.round(n/36e5)):n>=6e4&&(a=`minute`,o=Math.round(n/6e4));try{return new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(r*o,a)}catch{return`Invalid Date`}}let a=r?e.dateFormats?.[r]??xs[r]:void 0,o=typeof a==`string`?void 0:a;try{return new Intl.DateTimeFormat(t,o).format(i)}catch{return`Invalid Date`}},n(n,r){let i=r?e.numberFormats?.[r]??Cs[r]:void 0,a=typeof i==`function`?i(t):i;return new Intl.NumberFormat(t,a).format(n)},format(n,i){return r(n,i,t,e.formatters)},...i?{diagnostics:i}:{}}}var Es=Symbol.for(`fluenti.runtime.solid.v1`),Ds=Symbol.for(`fluenti.solid.context.v1`),Os=Symbol.for(`fluenti.solid.fallback-context.v1`);function ks(){let e=globalThis[Es];return typeof e==`object`&&e?e:null}function As(e){return typeof e==`object`&&e&&`default`in e?e.default:e}function js(){try{if(typeof process<`u`&&process.env!=null&&process.env.NODE_ENV===`production`)return!1}catch{}try{return!1}catch{}try{if(typeof process<`u`&&process.env!=null)return process.env.NODE_ENV!==`production`}catch{}return!1}function Ms(e){let t=globalThis[e];return t&&typeof t==`object`?t:void 0}function Ns(e,t){return globalThis[e]=t,t}var Ps={en:`USD`,"en-US":`USD`,"en-GB":`GBP`,"en-AU":`AUD`,"en-CA":`CAD`,"zh-CN":`CNY`,"zh-TW":`TWD`,"zh-HK":`HKD`,ja:`JPY`,"ja-JP":`JPY`,ko:`KRW`,"ko-KR":`KRW`,de:`EUR`,"de-DE":`EUR`,"de-AT":`EUR`,fr:`EUR`,"fr-FR":`EUR`,"fr-CA":`CAD`,es:`EUR`,"es-ES":`EUR`,"es-MX":`MXN`,pt:`EUR`,"pt-BR":`BRL`,"pt-PT":`EUR`,it:`EUR`,ru:`RUB`,ar:`SAR`,hi:`INR`},Fs={short:{year:`numeric`,month:`numeric`,day:`numeric`},long:{year:`numeric`,month:`long`,day:`numeric`,weekday:`long`},time:{hour:`numeric`,minute:`numeric`},datetime:{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`numeric`}},Is={currency:e=>({style:`currency`,currency:Ps[e]??Ps[e.split(`-`)[0]]??`USD`}),percent:{style:`percent`},decimal:{minimumFractionDigits:2,maximumFractionDigits:2}};function Ls(){let e=`en`,t={en:{}},n=Ts({locale:e,messages:t,devWarnings:!1}),r=()=>e,i=()=>!1,a=()=>new Set(Object.keys(t));function o(){n.locale!==e&&(n.locale=e)}function s(e,...t){return o(),Array.isArray(e)&&`raw`in e?n.t(e,...t):n.t(e,t[0])}return{locale:r,setLocale:async r=>{e=r,n.locale=r,t[r]??(t[r]={})},t:s,loadMessages:(e,r)=>{n.loadMessages(e,r),t[e]={...t[e],...r}},getLocales:()=>Array.from(new Set([...n.getLocales(),...Object.keys(t)])),d:(e,t)=>(o(),n.d(e,t)),n:(e,t)=>(o(),n.n(e,t)),format:(e,t)=>(o(),n.format(e,t)),isLoading:i,loadedLocales:a,preloadLocale:e=>{},te:(n,r)=>{let i=t[r??e];return i!==void 0&&n in i},tm:(n,r)=>{let i=t[r??e];return i?i[n]:void 0}}}function Rs(){let e=Ms(Ds);if(e)return{context:e,source:`singleton`};if(!js())return;let t=Ms(Os);return t||(t=Ns(Os,Ls())),{context:t,source:`development`}}function zs(e){let[t,n]=w(e.locale),[r,i]=w(!1),a=new Set([e.locale]),[o,s]=w(new Set(a)),c={...e.messages},l=e,u=l.lazyLocaleLoading??e.splitting??!1,d={locale:e.locale,messages:e.messages??{},dateFormats:{...Fs,...l.dateFormats},numberFormats:{...Is,...l.numberFormats}};e.fallbackLocale!==void 0&&(d.fallbackLocale=e.fallbackLocale),l.fallbackChain!==void 0&&(d.fallbackChain=l.fallbackChain),e.missing!==void 0&&(d.missing=e.missing),l.diagnostics!==void 0&&(d.diagnostics=l.diagnostics),l.interpolate!==void 0&&(d.interpolate=l.interpolate),d.devWarnings=d.devWarnings??(typeof process<`u`&&process.env.NODE_ENV===`development`);let f=Ts(d);function p(e,...n){let r=t();return f.locale!==r&&(f.locale=r),Array.isArray(e)&&`raw`in e?f.t(e,...n):f.t(e,n[0])}let m=(e,t)=>{f.loadMessages(e,t),c[e]={...c[e],...t},a.add(e),s(new Set(a))},h=0,g=async e=>{if(!u||!l.chunkLoader){n(e);return}let t=ks();if(a.has(e)){try{t?.__switchLocale&&await t.__switchLocale(e)}catch{}n(e);return}let r=++h;i(!0);try{let i=As(await l.chunkLoader(e));if(f.loadMessages(e,i),c[e]={...c[e],...i},a.add(e),s(new Set(a)),r!==h)return;try{t?.__switchLocale&&await t.__switchLocale(e)}catch{}if(r!==h)return;n(e)}finally{r===h&&i(!1)}},_=new Set;return{locale:t,setLocale:g,t:p,loadMessages:m,getLocales:()=>f.getLocales(),d:(e,n)=>{let r=t();return f.locale!==r&&(f.locale=r),f.d(e,n)},n:(e,n)=>{let r=t();return f.locale!==r&&(f.locale=r),f.n(e,n)},format:(e,n)=>{let r=t();return f.locale!==r&&(f.locale=r),f.format(e,n)},isLoading:r,loadedLocales:o,preloadLocale:e=>{if(!u||a.has(e)||!l.chunkLoader||_.has(e))return;_.add(e);let t=ks();l.chunkLoader(e).then(async n=>{let r=As(n);f.loadMessages(e,r),c[e]={...c[e],...r},a.add(e),s(new Set(a)),t?.__preloadLocale&&await t.__preloadLocale(e)}).catch(e=>{}).finally(()=>{_.delete(e)})},te:(e,n)=>{let r=c[n??t()];return r!==void 0&&e in r},tm:(e,n)=>{let r=c[n??t()];return r?r[e]:void 0}}}function Bs(e){return Ns(Ds,zs(e))}var Vs=fe(),Hs=e=>{let t=zs(e);return A(Vs.Provider,{value:t,get children(){return e.children}})};function Us(){let e=pe(Vs);if(e)return e;let t=Rs();if(t)return t.context;throw Error(`useI18n() must be used inside an <I18nProvider>.`)}function Ws(e,t){return Bt()?.[e]??t}var Gs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Ks=V(`<svg>`),qs=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Js=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ys=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Xs=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Zs=e=>{let t=Ys(e);return t.charAt(0).toUpperCase()+t.slice(1)},Qs=e=>{let[t,n]=Ge(e,[`color`,`size`,`strokeWidth`,`children`,`class`,`name`,`iconNode`,`absoluteStrokeWidth`]);return(()=>{var e=Ks();return Wr(e,We(Gs,{get width(){return t.size??Gs.width},get height(){return t.size??Gs.height},get stroke(){return t.color??Gs.stroke},get"stroke-width"(){return B(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??Gs[`stroke-width`])*24/Number(t.size):Number(t.strokeWidth??Gs[`stroke-width`])},get class(){return Js(`lucide`,`lucide-icon`,...t.name==null?[]:[`lucide-${Xs(Zs(t.name))}`,`lucide-${Xs(t.name)}`],t.class==null?``:t.class)},get"aria-hidden"(){return!t.children&&!qs(n)?`true`:void 0}},n),!0,!0),G(e,A(qe,{get each(){return t.iconNode},children:([e,t])=>A(si,We({component:e},t))})),e})()},$s=[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]],ec=e=>A(Qs,We(e,{iconNode:$s,name:`arrow-up-down`})),tc=[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]],nc=e=>A(Qs,We(e,{iconNode:tc,name:`chevron-down`})),rc=[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]],ic=e=>A(Qs,We(e,{iconNode:rc,name:`arrow-left`})),ac=[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]],oc=e=>A(Qs,We(e,{iconNode:ac,name:`arrow-right`})),sc=[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]],cc=e=>A(Qs,We(e,{iconNode:sc,name:`chevron-right`})),lc=[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]],uc=e=>A(Qs,We(e,{iconNode:lc,name:`credit-card`})),dc=[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]],fc=e=>A(Qs,We(e,{iconNode:dc,name:`check`})),pc=[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]],mc=e=>A(Qs,We(e,{iconNode:pc,name:`x`})),hc=[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]],gc=e=>A(Qs,We(e,{iconNode:hc,name:`external-link`})),_c=[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]],vc=e=>A(Qs,We(e,{iconNode:_c,name:`search`})),yc=[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]],bc=e=>A(Qs,We(e,{iconNode:yc,name:`pencil`})),xc=[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]],Sc=e=>A(Qs,We(e,{iconNode:xc,name:`wallet`})),Cc=[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]],wc=e=>A(Qs,We(e,{iconNode:Cc,name:`hexagon`})),Tc=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],Ec=e=>A(Qs,We(e,{iconNode:Tc,name:`circle-question-mark`})),Dc=[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],Oc=e=>A(Qs,We(e,{iconNode:Dc,name:`triangle-alert`})),kc={tokenIcon:`tf-c63ac0`,tokenIconImg:`tf-59aca7`,chainDot:`tf-dbfbb3`,chainDotImg:`tf-f89395`,footer:`tf-cdfe94`,footerText:`tf-7c0c36`,footerIcon:`tf-26d5ea`,footerBrand:`tf-8b1e15`,footerBrandAccent:`tf-3852e5`,footerArrow:`tf-b35860`},Ac=V(`<svg viewBox="0 0 100 100"fill=none xmlns=http://www.w3.org/2000/svg aria-label=TokenFlight role=img style=border-radius:18%;flex-shrink:0><defs><linearGradient id=tf-logo-bg x1=0 y1=0 x2=0 y2=1><stop offset=0% stop-color=#6672FF></stop><stop offset=100% stop-color=#9CA2FF></stop></linearGradient></defs><rect width=100 height=100 rx=18 ry=18 fill=url(#tf-logo-bg)></rect><path d="M74.15 24.2L71.2 24.35 66.7 26.5 55.3 37.25 50.05 36.35 51.45 34 49.2 31.65 48.3 31.85 44.7 35.4 27.45 32.45 25.75 32.85 23.75 34.4 41.6 43.2 45.55 46.9 34.85 59.2 25 57.95 22.65 59.6 31.15 64.7 30.1 68.75 33.95 67.35 39.1 76.05 40.8 73.7 39.45 63.7 51.65 52.95 55.4 56.8 64.45 74.45 66.3 70.9 63.4 53.9 67.15 49.4 65.05 47.15 62.45 48.6 61.55 43.2 72.4 31.6 74.55 26.75Z"fill=white>`),jc=V(`<svg viewBox="0 0 100 100"fill=none xmlns=http://www.w3.org/2000/svg style=border-radius:18%;flex-shrink:0><defs><linearGradient id=tf-sm-logo-bg x1=0 y1=0 x2=0 y2=1><stop offset=0% stop-color=#6672FF></stop><stop offset=100% stop-color=#9CA2FF></stop></linearGradient></defs><rect width=100 height=100 rx=18 ry=18 fill=url(#tf-sm-logo-bg)></rect><path d="M74.15 24.2L71.2 24.35 66.7 26.5 55.3 37.25 50.05 36.35 51.45 34 49.2 31.65 48.3 31.85 44.7 35.4 27.45 32.45 25.75 32.85 23.75 34.4 41.6 43.2 45.55 46.9 34.85 59.2 25 57.95 22.65 59.6 31.15 64.7 30.1 68.75 33.95 67.35 39.1 76.05 40.8 73.7 39.45 63.7 51.65 52.95 55.4 56.8 64.45 74.45 66.3 70.9 63.4 53.9 67.15 49.4 65.05 47.15 62.45 48.6 61.55 43.2 72.4 31.6 74.55 26.75Z"fill=white>`),Mc=V(`<div>`),Nc=V(`<img>`),Pc=V(`<img alt>`),Fc=V(`<a href=https://tokenflight.ai target=_blank rel="noopener noreferrer"part=fee-info data-testid=footer><span>Powered by</span><span>Token<span>Flight`);function Ic(e,t){if(e)return`${e.replace(/\/$/,``)}/v1/chain/${t}/icon`}function Lc(e){let t=()=>e.size??28;return(()=>{var e=Ac();return T(n=>{var r=t(),i=t();return r!==n.e&&H(e,`width`,n.e=r),i!==n.t&&H(e,`height`,n.t=i),n},{e:void 0,t:void 0}),e})()}function Rc(e){let t=()=>e.size??16;return(()=>{var e=jc();return T(n=>{var r=t(),i=t();return r!==n.e&&H(e,`width`,n.e=r),i!==n.t&&H(e,`height`,n.t=i),n},{e:void 0,t:void 0}),e})()}var zc={USDC:`$`,ETH:`Ξ`,USDT:`₮`,WBTC:`₿`,DAI:`◈`,ARB:`A`,SOL:`◎`};function Bc(e){let t=()=>e.size??36,n=()=>zc[e.symbol]??e.symbol[0]??`?`,[r,i]=w(!1),a=()=>!!e.logoURI&&!r();return(()=>{var r=Mc();return G(r,(()=>{var r=B(()=>!!a());return()=>r()?(()=>{var n=Nc();return W(n,`error`,()=>i(!0)),T(r=>{var i=e.logoURI,a=e.symbol,o=t(),s=t(),c=kc.tokenIconImg;return i!==r.e&&H(n,`src`,r.e=i),a!==r.t&&H(n,`alt`,r.t=a),o!==r.a&&H(n,`width`,r.a=o),s!==r.o&&H(n,`height`,r.o=s),c!==r.i&&U(n,r.i=c),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n})():n()})()),T(n=>{var i=kc.tokenIcon,o={width:`${t()}px`,height:`${t()}px`,...a()?{}:{background:`linear-gradient(135deg, ${e.color}, ${e.color}cc)`,"font-size":`${t()*.42}px`,"box-shadow":`0 2px 8px ${e.color}33`}};return i!==n.e&&U(r,n.e=i),n.t=Hr(r,o,n.t),n},{e:void 0,t:void 0}),r})()}function Vc(e){let t=()=>e.size??8,[n,r]=w(!1),i=()=>!!e.iconUrl&&!n();return(()=>{var n=Mc();return G(n,(()=>{var n=B(()=>!!i());return()=>n()&&(()=>{var n=Pc();return W(n,`error`,()=>r(!0)),T(r=>{var i=e.iconUrl,a=t(),o=t(),s=kc.chainDotImg;return i!==r.e&&H(n,`src`,r.e=i),a!==r.t&&H(n,`width`,r.t=a),o!==r.a&&H(n,`height`,r.a=o),s!==r.o&&U(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()})()),T(r=>{var a=kc.chainDot,o={width:`${t()}px`,height:`${t()}px`,...i()?{}:{background:e.color?e.color:`conic-gradient(#627EEA 0deg 90deg, #0052FF 90deg 180deg, #28A0F0 180deg 270deg, #9945FF 270deg 360deg)`}};return a!==r.e&&U(n,r.e=a),r.t=Hr(n,o,r.t),r},{e:void 0,t:void 0}),n})()}function Hc(){return(()=>{var e=Fc(),t=e.firstChild,n=t.nextSibling,r=n.firstChild.nextSibling;return G(e,A(Rc,{size:14}),n),G(e,A(gc,{size:12,get class(){return kc.footerArrow}}),null),T(i=>{var a=kc.footer,o=kc.footerText,s=kc.footerBrand,c=kc.footerBrandAccent;return a!==i.e&&U(e,i.e=a),o!==i.t&&U(t,i.t=o),s!==i.a&&U(n,i.a=s),c!==i.o&&U(r,i.o=c),i},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()}var Uc={amount:`tf-59b76a`,muted:`tf-a859d8`},Wc=V(`<input type=number inputmode=decimal part=input>`);function Gc(e){let{t}=Us(),n=null,[r,i]=w(e.value);E(()=>{i(e.value)});let a=t=>{let r=t.target.value;r=r.replace(/[^0-9.]/g,``);let a=r.indexOf(`.`);a!==-1&&(r=r.slice(0,a+1)+r.slice(a+1).replace(/\./g,``)),i(r),n&&clearTimeout(n),n=setTimeout(()=>{e.onChange(r)},500)};return oe(()=>{n&&clearTimeout(n)}),(()=>{var n=Wc();return W(n,`input`,a),T(r=>{var i=Uc.amount,a=e.disabled,o=e.placeholder??t({id:`epw9f3`,message:`0`});return i!==r.e&&U(n,r.e=i),a!==r.t&&(n.disabled=r.t=a),o!==r.a&&H(n,`placeholder`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),T(()=>n.value=r()),n})()}function Kc(e,t){if(!e||t<0)return`0`;let n;try{n=(e.startsWith(`0x`),BigInt(e).toString())}catch{return`0`}let r=n.startsWith(`-`),i=r?n.slice(1):n;if(t===0)return r?`-${i}`:i;let a=i.padStart(t+1,`0`),o=a.slice(0,a.length-t),s=a.slice(a.length-t).replace(/0+$/,``),c=s?`${o}.${s}`:o;return r?`-${c}`:c}function qc(e,t){if(!e||!/^-?(?:\d+(?:\.\d*)?|\.\d+)$/.test(e))return`0`;let n=e.startsWith(`-`),r=(n?e.slice(1):e).split(`.`),i=((r[0]??`0`)+(r[1]??``).slice(0,t).padEnd(t,`0`)).replace(/^0+/,``)||`0`;return n?`-${i}`:i}function Jc(e,t,n,r){if(!e||!n||e===`0`||t<0||r<0)return`0`;let i,a;try{i=BigInt(e),a=BigInt(n)}catch{return`0`}if(i===0n)return`0`;let o=10n**BigInt(8),s=(a*10n**BigInt(t)*o/(i*10n**BigInt(r))).toString().padStart(9,`0`),c=s.slice(0,s.length-8),l=s.slice(s.length-8).replace(/0+$/,``);return l?`${c}.${l}`:c}function Yc(e){let t=e.split(`.`),n=t[0]??`0`,r=n.startsWith(`-`),i=(r?n.slice(1):n).replace(/\B(?=(\d{3})+(?!\d))/g,`,`),a=r?`-${i}`:i;return t[1]===void 0?a:`${a}.${t[1]}`}function Xc(e,t=6){if(!e||e===`0`)return`0`;let n=e.split(`.`),r=n[0]??`0`;if(!n[1])return e;let i=n[1];if(r!==`0`&&r!==`-0`){let e=i.slice(0,t).replace(/0+$/,``);return e?`${r}.${e}`:r}let a=i.search(/[1-9]/);if(a===-1)return`0`;let o=a+t,s=i.slice(0,o).replace(/0+$/,``);return s?`${r}.${s}`:`0`}var Zc={1:{symbol:`ETH`,decimals:18},10:{symbol:`ETH`,decimals:18},8453:{symbol:`ETH`,decimals:18},42161:{symbol:`ETH`,decimals:18},324:{symbol:`ETH`,decimals:18},59144:{symbol:`ETH`,decimals:18},11155111:{symbol:`ETH`,decimals:18},11155420:{symbol:`ETH`,decimals:18},1313161554:{symbol:`ETH`,decimals:18},56:{symbol:`BNB`,decimals:18},137:{symbol:`POL`,decimals:18},43114:{symbol:`AVAX`,decimals:18},20011e6:{symbol:`SOL`,decimals:9}};function Qc(e){return Zc[e]??{symbol:`ETH`,decimals:18}}function $c(e){let t=Number(e);return Number.isFinite(t)?t===0?`0`:t>=1?Xc(e,4):t>=.01?Xc(e,6):Xc(e,8):e}function el(e,t){let{symbol:n,decimals:r}=Qc(t),i=(e??``).trim();if(!i)return{amount:`0`,symbol:n};try{return i.includes(`.`)?{amount:$c(i),symbol:n}:{amount:$c(Kc(i,r)),symbol:n}}catch{return{amount:i,symbol:n}}}var tl={significantNumber:`tf-ba406b`,zeroCount:`tf-9d81a4`,tooltip:`tf-7977ef`,"tf-value-update":`tf-6887ec`},nl=V(`<span><span></span><span aria-hidden=true></span><span>`),rl=V(`<span>`);function il(e){if(e==null)return null;if(typeof e==`bigint`)return e.toString();let t=String(e).trim();if(!t)return null;let n=Number(t);return Number.isFinite(n)?t:null}function al(e){return e.includes(`.`)?e.replace(/(\.\d*?[1-9])0+$/,`$1`).replace(/\.0+$/,``).replace(/\.$/,``):e}function ol(e,t,n){if(!Number.isFinite(e))return null;if(n!==void 0)return e.toFixed(n);if(e===0)return`0`;let r=Math.abs(e)<1?e.toPrecision(t):e.toLocaleString(`en-US`,{useGrouping:!0,maximumSignificantDigits:t});if(!/[eE]/.test(r))return r;let[i,a]=r.toLowerCase().split(`e`);if(!i||a===void 0)return r;let o=Number(a);if(!Number.isFinite(o))return r;let s=i.startsWith(`-`)?`-`:``,[c,l=``]=(s?i.slice(1):i).split(`.`),u=`${c??``}${l}`,d=(c?.length??0)+o;return d<=0?`${s}0.${`0`.repeat(Math.abs(d))}${u}`:d>=u.length?`${s}${u}${`0`.repeat(d-u.length)}`:`${s}${u.slice(0,d)}.${u.slice(d)}`}function sl(e,t,n){let r=il(e);if(!r)return null;let i=ol(Number(r),t,n);if(!i)return null;let a=al(i),o=a.match(/^(-?\d+)\.(0+)(\d*)$/);if(!o)return a;let s=o[1],c=o[2],l=o[3]??``;return!s||!c||c.length<3?a:{prefix:`${s}.${c.charAt(0)}`,zeroCount:c.length,suffix:l}}function cl(e){let t=()=>e.digits??8,n=D(()=>sl(e.value,t(),e.fixedDecimals)),r=D(()=>{let t=n();if(t===null||typeof t==`string`)return null;let r=ol(Number(e.value??0),18);return r?al(r):null});return B(()=>{let e=n();if(e===null)return null;if(typeof e==`string`)return e;let t=(()=>{var t=nl(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return G(n,()=>e.prefix),G(r,()=>e.zeroCount),G(i,()=>e.suffix),T(e=>{var n=tl.significantNumber,i=tl.zeroCount;return n!==e.e&&U(t,e.e=n),i!==e.t&&U(r,e.t=i),e},{e:void 0,t:void 0}),t})(),i=r();return i?(()=>{var e=rl();return H(e,`title`,i),G(e,t),T(()=>U(e,tl.tooltip)),e})():t})}var ll=`tf-1019c2`,ul=`tf-4922f1`,dl=`tf-57f45f`,fl=`tf-d74ccc`,pl=`tf-92e7a8`,ml=`tf-d20f50`,hl=`tf-a9a96f`,gl=`tf-0134eb`,_l=`tf-91635c`,vl=`tf-ca1291`,yl=`tf-a249b3`,bl=`tf-adeddd`,xl={quote:ll,"tf-slide-up":`tf-42889f`,row:ul,value:dl,skeletonRow:fl,skeletonLabel:pl,skeletonLabelShort:ml,skeletonValue:hl,skeletonValueShort:gl,skeletonValueTiny:_l,rowRecipient:vl,rowError:yl,rowRecipientEmpty:bl,"tf-recipient-pulse":`tf-d990e5`},Sl=`tf-1ac2ef`,Cl=`tf-90e981`,wl=`tf-68a980`,Tl=`tf-0c7f16`,El=`tf-e7b9c7`,Dl=`tf-b4f391`,Ol=`tf-118b57`,kl=`tf-07225e`,Al=`tf-d01dff`,jl=`tf-5bb68c`,Ml=`tf-37ddcc`,Nl=`tf-04e1e2`,Pl=`tf-d01908`,Fl=`tf-1cc72b`,Il=`tf-480f1a`,Ll=`tf-bc7950`,Rl=`tf-d9b7b4`,zl=`tf-9398ea`,Bl=`tf-2d9323`,Vl=`tf-4567e1`,Hl=`tf-58881e`,Ul=`tf-c7b4d2`,Wl=`tf-771a48`,Gl=`tf-e2b7ba`,Kl=`tf-6f7fab`,ql=`tf-b15cde`,Jl=`tf-52678c`,Yl=`tf-25f74d`,Xl=`tf-b385cd`,Zl=`tf-dc46f6`,Ql=`tf-55c652`,$l=`tf-2ad189`,eu=`tf-192a37`,tu=`tf-44389f`,nu=`tf-58158c`,ru=`tf-6f8fbb`,iu=`tf-2a2ad5`,K={skeleton:Sl,pulse:Cl,selectorOverlay:wl,"tf-fade-in":`tf-ed0355`,selectorOverlayDismissing:Tl,"tf-overlay-fade-out":`tf-9cad3e`,container:El,noBg:Dl,noBorder:Ol,accentLine:kl,ctaWrapper:Al,ctaWrapperReceive:jl,footerSlot:Ml,noOffer:Nl,"tf-slide-up":`tf-b61e63`,noOfferIcon:Pl,noOfferText:Fl,explorerLink:Il,explorerLinkReceive:Ll,recipientBadge:Rl,recipientBadgeEmpty:zl,recipientBadgeText:Bl,recipientBadgeLocked:Vl,recipientPlaceholder:Hl,flexCenter:Ul,flexCol:Wl,flexRow:Gl,flexBetween:Kl,fadeIn:ql,idleCard:Jl,idleIcon:Yl,idleTitle:Xl,idleSub:Zl,disabledOpacity:Ql,monoAmount:$l,dividerLine:eu,providerIconInline:tu,payMethodTabs:nu,payMethodTab:ru,payMethodTabActive:iu},au=V(`<div part=price-preview aria-hidden=true><div><div></div><div></div></div><div><div></div><div>`),ou=V(`<div><span></span><span>`),su=V(`<div part=price-preview>`);function cu(){return(()=>{var e=au(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=t.nextSibling,a=i.firstChild,o=a.nextSibling;return T(s=>{var c=xl.quote,l=xl.skeletonRow,u=`${K.skeleton} ${xl.skeletonLabel}`,d=`${K.skeleton} ${xl.skeletonValue} ${xl.skeletonValueShort}`,f=xl.skeletonRow,p=`${K.skeleton} ${xl.skeletonLabel} ${xl.skeletonLabelShort}`,m=`${K.skeleton} ${xl.skeletonValue} ${xl.skeletonValueTiny}`;return c!==s.e&&U(e,s.e=c),l!==s.t&&U(t,s.t=l),u!==s.a&&U(n,s.a=u),d!==s.o&&U(r,s.o=d),f!==s.i&&U(i,s.i=f),p!==s.n&&U(a,s.n=p),m!==s.s&&U(o,s.s=m),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),e})()}function lu(e){let{t}=Us(),n=e=>e>=60?t({id:`knrcsh`,message:`~{value}m`},{value:Math.round(e/60)}):t({id:`ek03j3`,message:`~{value}s`},{value:e}),r=D(()=>el(e.route.quote.estimatedGas,e.fromToken.chainId)),i=[(()=>{var n=ou(),i=n.firstChild,a=i.nextSibling;return G(i,()=>t({id:`9l4mg3`,message:`Fee`})),G(a,A(j,{get when(){return e.route.quote.estimatedGas},fallback:`-`,get children(){return[`~`,A(cl,{get value(){return r().amount},digits:8}),` `,B(()=>r().symbol)]}})),T(e=>{var t=xl.row,r=xl.value;return t!==e.e&&U(n,e.e=t),r!==e.t&&U(a,e.t=r),e},{e:void 0,t:void 0}),n})(),(()=>{var r=ou(),i=r.firstChild,a=i.nextSibling;return G(i,()=>t({id:`f45rwo`,message:`Est. time`})),G(a,()=>n(e.route.quote.expectedDurationSeconds)),T(e=>{var t=xl.row,n=xl.value;return t!==e.e&&U(r,e.e=t),n!==e.t&&U(a,e.t=n),e},{e:void 0,t:void 0}),r})()];return A(j,{get when(){return!e.inline},fallback:i,get children(){var e=su();return G(e,i),T(()=>U(e,xl.quote)),e}})}var uu={countdown:`tf-216412`,clickable:`tf-40ee76`,ring:`tf-52dc68`,ringSpinning:`tf-25c5c8`,spin:`tf-27c522`,text:`tf-fd32be`},du=V(`<span>s`),fu=V(`<div><svg width=14 height=14 viewBox="0 0 16 16"><circle cx=8 cy=8 r=6 fill=none stroke=var(--tf-border) stroke-width=2></circle><circle cx=8 cy=8 r=6 fill=none stroke=var(--tf-accent) stroke-width=2 stroke-linecap=round transform="rotate(-90 8 8)">`);function pu(e){let t=2*Math.PI*6,n=()=>t*(1-e.secondsRemaining()/e.totalSeconds),r=()=>e.isRefreshing?.()??!1;return(()=>{var i=fu(),a=i.firstChild,o=a.firstChild.nextSibling;return W(i,`click`,()=>e.onRefresh?.()),G(i,A(j,{get when(){return!r()},get children(){var t=du(),n=t.firstChild;return G(t,()=>e.secondsRemaining(),n),T(()=>U(t,uu.text)),t}}),a),T(s=>{var c=`${uu.countdown} ${e.onRefresh?uu.clickable:``}`,l=`${uu.ring} ${r()?uu.ringSpinning:``}`,u=String(t),d=r()?t*.75:n(),f=r()?`none`:`stroke-dashoffset 1s linear`;return c!==s.e&&U(i,s.e=c),l!==s.t&&H(a,`class`,s.t=l),u!==s.a&&H(o,`stroke-dasharray`,s.a=u),d!==s.o&&H(o,`stroke-dashoffset`,s.o=d),f!==s.i&&Ur(o,`transition`,s.i=f),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()}var mu=`tf-2de115`,hu=`tf-0d518f`,gu=`tf-47dc2a`,_u=`tf-44b8f1`,vu=`tf-04fe16`,yu=`tf-65cf23`,bu=`tf-2f0314`,xu=`tf-20b1ac`,Su=`tf-e6dae0`,Cu=`tf-8a3bc2`,wu=`tf-90e712`,Tu={btnPrimary:mu,btnDisabled:hu,executing:gu,btnConnect:_u,btnRecipient:vu,"tf-recipient-pulse":`tf-d53743`,btnSuccess:yu,btnError:bu,btnInner:xu,spinner:Su,spin:Cu,spinnerSm:wu},Eu=V(`<div part=button-primary data-testid=btn-primary>`),Du=V(`<button part=button-primary data-testid=btn-primary>`),Ou=V(`<button part=button-secondary data-testid=btn-connect>`),ku=V(`<button part=button-primary data-testid=btn-primary disabled><span><span>`),Au=V(`<button part=button-primary data-testid=btn-recipient>`),ju=V(`<button part=button-primary data-testid=btn-primary disabled>`);function Mu(e){let{t}=Us();return A(Ye,{get children(){return[A(M,{get when(){return e.phase===`success`},get children(){var n=Eu();return G(n,A(fc,{size:18}),null),G(n,()=>e.label??t({id:`cjn1xs`,message:`Swap Successful`}),null),T(()=>U(n,Tu.btnSuccess)),n}}),A(M,{get when(){return e.phase===`error`},get children(){var n=Du();return W(n,`click`,e.onRetry),G(n,A(mc,{size:16}),null),G(n,()=>e.errorLabel||t({id:`1hb73om`,message:`Transaction failed — Retry`}),null),T(()=>U(n,Tu.btnError)),n}}),A(M,{get when(){return!e.isConnected},get children(){var n=Ou();return W(n,`click`,e.onConnect),G(n,()=>t({id:`u61kge`,message:`Connect Wallet`})),T(()=>U(n,Tu.btnConnect)),n}}),A(M,{get when(){return e.phase===`submitting`||e.phase===`building`||e.phase===`awaiting-wallet`||e.phase===`tracking`},get children(){var e=ku(),n=e.firstChild,r=n.firstChild;return G(n,()=>t({id:`1ih47b3`,message:`Executing...`}),null),T(t=>{var i=`${Tu.btnPrimary} ${Tu.executing}`,a=Tu.btnInner,o=Tu.spinner;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),A(M,{get when(){return e.needsRecipient},get children(){var n=Au();return W(n,`click`,e.onEnterRecipient),G(n,()=>t({id:`wx5bee`,message:`Enter Recipient Address`})),T(()=>U(n,Tu.btnRecipient)),n}}),A(M,{get when(){return e.insufficientBalance},get children(){var e=ju();return G(e,()=>t({id:`fcy4ey`,message:`Insufficient balance`})),T(()=>U(e,`${Tu.btnPrimary} ${Tu.btnDisabled}`)),e}}),A(M,{get when(){return e.hasQuote},get children(){var n=Du();return W(n,`click`,e.onConfirm),G(n,()=>e.label??t({id:`ibrnk6`,message:`Confirm Swap`})),T(t=>{var r=`${Tu.btnPrimary}${e.confirmDisabled?` ${Tu.btnDisabled}`:``}`,i=e.confirmDisabled;return r!==t.e&&U(n,t.e=r),i!==t.t&&(n.disabled=t.t=i),t},{e:void 0,t:void 0}),n}}),A(M,{get when(){return e.phase===`idle`||e.phase===`quoting`||e.phase===`quoted`},get children(){var e=ju();return G(e,()=>t({id:`1x5xdes`,message:`Review Swap`})),T(()=>U(e,`${Tu.btnPrimary} ${Tu.btnDisabled}`)),e}})]}})}var Nu=20011e6;function Pu(e){return e===Nu}function Fu(e){return e!==Nu}function Iu(e){return Pu(e)?`solana`:`evm`}function Lu(e,t){return Iu(e)!==Iu(t)}function Ru(e){return Pu(e)?`11111111111111111111111111111111`:`0x0000000000000000000000000000000000000000`}function zu(e,t){return t?.get(e)?.name??`Chain ${e}`}function Bu(e,t){return t===`evm`?/^0x[0-9a-fA-F]{40}$/.test(e):/^[1-9A-HJ-NP-Za-km-z]{32,44}$/.test(e)}function Vu(e,t,n){if(!t)return null;let r=n?.get(e)?.blockExplorers?.default?.url;return r?`${r}/tx/${t}`:null}function Hu(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-4)}`}var Uu=`tf-5835df`,Wu=`tf-9322ae`,Gu=`tf-7d5519`,Ku=`tf-0b8d30`,qu=`tf-bfbd0b`,Ju=`tf-7e8fdf`,Yu=`tf-37f3cf`,Xu=`tf-9401fd`,Zu=`tf-832fae`,Qu=`tf-b557fc`,$u=`tf-2b42d5`,ed=`tf-5953e8`,td=`tf-a168c7`,nd=`tf-062404`,rd=`tf-26af4c`,id=`tf-4b9be7`,ad=`tf-036db2`,od=`tf-09b7bb`,sd=`tf-aef7e0`,cd=`tf-5c628c`,ld=`tf-a5abdf`,ud=`tf-9efe7c`,dd=`tf-d36961`,fd=`tf-5c7806`,pd=`tf-185719`,md=`tf-84527b`,hd=`tf-417d35`,gd=`tf-aad7e9`,_d=`tf-8de1c6`,vd=`tf-bcb46a`,yd=`tf-16cfdc`,bd=`tf-0aa291`,xd=`tf-234e31`,Sd=`tf-adb588`,Cd=`tf-11fa21`,wd=`tf-4f7573`,Td=`tf-c918a2`,Ed=`tf-ad7aab`,Dd=`tf-603d2e`,Od=`tf-1e22cb`,q={progress:Uu,"tf-scale-in":`tf-e061c9`,header:Wu,tokenCol:Gu,tokenColFrom:Ku,tokenColInner:qu,tokenIconWrap:Ju,chainBadge:Yu,tokenInfo:Xu,tokenAmount:Zu,tokenChain:Qu,fiatBadge:$u,arrow:ed,via:td,viaIcon:nd,steps:rd,step:id,stepIcon:ad,stepIconCompleted:od,"tf-step-complete":`tf-3cfd5b`,stepIconActive:sd,stepIconPending:cd,stepIconWarning:ld,stepSpinner:ud,progressSpin:dd,stepSpinnerWarning:fd,stepBody:pd,completed:md,warning:hd,stepTitle:gd,pending:_d,stepSubtitle:vd,active:yd,stepExplorer:bd,failure:xd,failureMessage:Sd,failureLink:Cd,failureBtn:wd,retry:Td,retryHidden:Ed,retryHint:Dd,retryBtn:Od},kd=V(`<div><div><div><div><div></div></div><div><div></div><span></span></div></div></div><div></div><div><div><div><div></div></div><div><div></div><span>`),Ad=V(`<img>`),jd=V(`<div>`),Md=V(`<div><button>`),Nd=V(`<a target=_blank rel="noopener noreferrer"> `),Pd=V(`<button>`),Fd=V(`<div><div>`),Id=V(`<div part=progress><div>`),Ld=V(`<div><div></div><div><div></div><div><span>`),Rd=V(`<span style=font-size:14px>!`),zd=V(`<span>`);function Bd(e){if(e.style.transform=``,e.scrollWidth>e.clientWidth){let t=e.clientWidth/e.scrollWidth;e.style.transform=`scale(${t})`,e.style.transformOrigin=`left`}}function Vd(e){let{t}=Us(),n=()=>e.fromToken?zu(e.fromToken.chainId,e.chainMap):``,r=()=>e.toToken?zu(e.toToken.chainId,e.chainMap):``,i=D(()=>{let i=e.order,a=i?.status??null,o,s=e.providerName??`Provider`,c=a===`deposited`||a===`published`||a===`filled`||a===`refund_pending`||i?.stepsCompleted?.includes(`deposited`)===!0||!!i?.transactions?.deposit,l=a===`refund_pending`||a===`refunded`,u=a===`filled`,d=a===`failed`,f=e.phase===`building`||e.phase===`awaiting-wallet`,p={title:t(f?{id:`6gkge0`,message:`Sign in wallet`}:{id:`1o4ofyx`,message:`Signed in wallet`}),subtitle:t(f?{id:`1bze7sg`,message:`Confirm in your wallet...`}:{id:`tgp8yw`,message:`Signature submitted`}),status:f?`active`:`completed`,explorerUrl:null,isWarning:!1},m=i?.depositTxHash??``,h=i?.transactions?.deposit?.chainId??e.fromToken?.chainId,g=h&&m?Vu(h,m,e.chainMap):null,_=f?`pending`:c?`completed`:`active`,v=f?t({id:`10ioi7e`,message:`Waiting for confirmation...`}):c?t({id:`6c5l2f`,message:`Confirmed on-chain`}):m?`${t({id:`10ioi7e`,message:`Waiting for confirmation...`})} · ${Hu(m)}`:t({id:`10ioi7e`,message:`Waiting for confirmation...`}),y={title:(o=n(),t({id:`1nn0owb`,message:`Deposit on {chain}`},{chain:o})),subtitle:v,status:_,explorerUrl:g,isWarning:!1},b=`pending`,x=t({id:`1y28pgi`,message:`Provider filling your order`}),S=t({id:`1t86tnu`,message:`Via {provider}`},{provider:s}),C=!1;l?(x=t({id:`12rrl0i`,message:`Order expired`}),S=t({id:`1hdpo6q`,message:`No filler accepted the order`}),b=`completed`,C=!0):d?(x=t({id:`1ok4m5g`,message:`Order failed`}),S=t({id:`9p7amh`,message:`Could not be completed`}),b=`completed`,C=!0):u?b=`completed`:(a===`deposited`||a===`published`)&&(b=`active`);let w={title:x,subtitle:S,status:b,explorerUrl:null,isWarning:C},ee=`pending`;o=r();let T=t({id:`1ixbbo7`,message:`Filled on {chain}`},{chain:o}),E=t({id:`cnwfg3`,message:`Tokens delivered`}),D=!1,te=null;if(u){ee=`completed`;let t=i?.transactions?.fill?.txHash,n=i?.transactions?.fill?.chainId??e.toToken?.chainId;t&&n&&(te=Vu(n,t,e.chainMap))}else if(a===`refund_pending`)T=t({id:`1nhkl7x`,message:`Refund in progress`}),o=n(),E=t({id:`27fhcv`,message:`Returning tokens on {chain}`},{chain:o}),ee=`active`,D=!0;else if(a===`refunded`){T=t({id:`1nhkl7x`,message:`Refund in progress`}),o=n(),E=t({id:`27fhcv`,message:`Returning tokens on {chain}`},{chain:o}),ee=`completed`,D=!0;let r=i?.transactions?.refund?.txHash,a=i?.transactions?.refund?.chainId??e.fromToken?.chainId;r&&a&&(te=Vu(a,r,e.chainMap))}else d&&(T=t({id:`1ok4m5g`,message:`Order failed`}),E=t({id:`115lknq`,message:`Delivery unsuccessful`}),ee=`completed`,D=!0);let ne=[p,y,w,{title:T,subtitle:E,status:ee,explorerUrl:te,isWarning:D}];if(e.executionError){for(let t=ne.length-1;t>=0;t--){let n=ne[t];if(n&&n.status===`active`){ne[t]={...n,subtitle:e.executionError,isWarning:!0};break}}let t=ne[0];t&&!ne.some(e=>e.isWarning&&e.status===`active`)&&(ne[0]={...t,subtitle:e.executionError,status:`active`,isWarning:!0})}return ne}),a=()=>{let t=e.order?.status;return t===`failed`||t===`refunded`},o=()=>{let t=e.order?.transactions?.refund?.txHash,n=e.order?.transactions?.refund?.chainId??e.fromToken?.chainId;return t&&n?Vu(n,t,e.chainMap):null},s=()=>{let n=e.providerName;return t({id:`14j1lze`,message:`via {provider}`},{provider:n})};return(()=>{var c=Id(),l=c.firstChild;return G(c,A(j,{get when(){return B(()=>!!e.fromToken)()&&e.toToken},get children(){return[(()=>{var t=kd(),i=t.firstChild,a=i.firstChild,o=a.firstChild,s=o.firstChild,c=o.nextSibling,l=c.firstChild,u=l.nextSibling,d=i.nextSibling,f=d.nextSibling,p=f.firstChild,m=p.firstChild,h=m.firstChild,g=m.nextSibling,_=g.firstChild,v=_.nextSibling;return G(o,A(Bc,{get symbol(){return e.fromToken.symbol??`?`},color:`#2775CA`,size:32,get logoURI(){return e.fromToken.logoURI}}),s),G(s,A(Vc,{color:null,size:14,get iconUrl(){return Ic(e.apiEndpoint,e.fromToken.chainId)}})),Gr(t=>E(()=>{e.inputAmount,e.fromToken,Bd(t)}),l),G(l,A(j,{get when(){return e.inputAmount},get children(){return[A(cl,{get value(){return e.inputAmount},digits:6}),` `]}}),null),G(l,()=>e.fromToken.symbol??``,null),G(u,n),G(d,A(oc,{size:14})),G(m,A(Bc,{get symbol(){return e.toToken.symbol??`?`},color:`#0052FF`,size:32,get logoURI(){return e.toToken.logoURI}}),h),G(h,A(Vc,{color:null,size:14,get iconUrl(){return Ic(e.apiEndpoint,e.toToken.chainId)}})),Gr(t=>E(()=>{e.outputAmount,e.toToken,Bd(t)}),_),G(_,A(j,{get when(){return e.outputAmount},get children(){return[A(cl,{get value(){return e.outputAmount},digits:6}),` `]}}),null),G(_,()=>e.toToken.symbol??``,null),G(v,r),T(e=>{var n=q.header,r=`${q.tokenCol} ${q.tokenColFrom}`,y=q.tokenColInner,b=q.tokenIconWrap,x=q.chainBadge,S=q.tokenInfo,C=q.tokenAmount,w=q.tokenChain,ee=q.arrow,T=q.tokenCol,E=q.tokenColInner,D=q.tokenIconWrap,te=q.chainBadge,ne=q.tokenInfo,re=q.tokenAmount,O=q.tokenChain;return n!==e.e&&U(t,e.e=n),r!==e.t&&U(i,e.t=r),y!==e.a&&U(a,e.a=y),b!==e.o&&U(o,e.o=b),x!==e.i&&U(s,e.i=x),S!==e.n&&U(c,e.n=S),C!==e.s&&U(l,e.s=C),w!==e.h&&U(u,e.h=w),ee!==e.r&&U(d,e.r=ee),T!==e.d&&U(f,e.d=T),E!==e.l&&U(p,e.l=E),D!==e.u&&U(m,e.u=D),te!==e.c&&U(h,e.c=te),ne!==e.w&&U(g,e.w=ne),re!==e.m&&U(_,e.m=re),O!==e.f&&U(v,e.f=O),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0,f:void 0}),t})(),A(j,{get when(){return e.providerName},get children(){var t=jd();return G(t,A(j,{get when(){return e.providerIcon},get children(){var t=Ad();return T(n=>{var r=e.providerIcon,i=e.providerName,a=q.viaIcon;return r!==n.e&&H(t,`src`,n.e=r),i!==n.t&&H(t,`alt`,n.t=i),a!==n.a&&U(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t}}),null),G(t,s,null),T(()=>U(t,q.via)),t}})]}}),l),G(l,A(Je,{get each(){return i()},children:(e,n)=>{let r=()=>{let t=e();return t.isWarning?`${q.step} ${q.warning}`:t.status===`completed`?`${q.step} ${q.completed}`:t.status===`active`?`${q.step} ${q.active}`:`${q.step} ${q.pending}`};return(()=>{var i=Ld(),a=i.firstChild,o=a.nextSibling,s=o.firstChild,c=s.nextSibling,l=c.firstChild;return G(a,()=>{let t=e();return t.status===`completed`&&!t.isWarning?A(fc,{size:14}):t.status===`active`&&t.isWarning?Rd():t.status===`active`?(()=>{var e=jd();return T(()=>U(e,q.stepSpinner)),e})():t.isWarning&&t.status===`completed`?Rd():(()=>{var e=zd();return G(e,n+1),e})()}),G(s,()=>e().title),G(l,()=>e().subtitle),G(c,A(j,{get when(){return e().explorerUrl},get children(){var n=Nd(),r=n.firstChild;return G(n,()=>t({id:`q5w460`,message:`View`}),r),G(n,A(gc,{size:10}),null),T(t=>{var r=e().explorerUrl,i=q.stepExplorer;return r!==t.e&&H(n,`href`,t.e=r),i!==t.t&&U(n,t.t=i),t},{e:void 0,t:void 0}),n}}),null),T(t=>{var n=r(),l=(()=>{let t=e();return`${q.stepIcon} ${t.isWarning&&(t.status===`completed`||t.status===`active`)?q.stepIconWarning:t.status===`completed`?q.stepIconCompleted:t.status===`active`?q.stepIconActive:q.stepIconPending}`})(),u=q.stepBody,d=q.stepTitle,f=q.stepSubtitle;return n!==t.e&&U(i,t.e=n),l!==t.t&&U(a,t.t=l),u!==t.a&&U(o,t.a=u),d!==t.o&&U(s,t.o=d),f!==t.i&&U(c,t.i=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()}})),G(c,A(j,{get when(){return e.onRetry},get children(){var n=Md(),r=n.firstChild;return W(r,`click`,e.onRetry),G(r,()=>t({id:`zkouah`,message:`Retry`})),T(t=>{var i=`${q.retry}${e.executionError?``:` ${q.retryHidden}`}`,a=q.retryBtn;return i!==t.e&&U(n,t.e=i),a!==t.t&&U(r,t.t=a),t},{e:void 0,t:void 0}),n}}),null),G(c,A(j,{get when(){return a()},get children(){var n=Fd(),r=n.firstChild;return G(r,(()=>{var n=B(()=>e.order?.status===`refunded`);return()=>n()?t({id:`t1rvqg`,message:`Your funds have been returned to your wallet.`}):t({id:`rvctng`,message:`Your order could not be completed.`})})()),G(n,A(j,{get when(){return o()},get children(){var e=Nd(),n=e.firstChild;return G(e,()=>t({id:`1c5n7ll`,message:`Refund tx`}),n),G(e,A(gc,{size:10}),null),T(t=>{var n=o(),r=q.failureLink;return n!==t.e&&H(e,`href`,t.e=n),r!==t.t&&U(e,t.t=r),t},{e:void 0,t:void 0}),e}}),null),G(n,A(j,{get when(){return e.onNewSwap},get children(){var n=Pd();return W(n,`click`,e.onNewSwap),G(n,(()=>{var n=B(()=>e.mode===`receive`);return()=>n()?t({id:`3u5vqs`,message:`New Purchase`}):t({id:`pmqvh0`,message:`New Swap`})})()),T(()=>U(n,q.failureBtn)),n}}),null),T(e=>{var t=q.failure,i=q.failureMessage;return t!==e.e&&U(n,e.e=t),i!==e.t&&U(r,e.t=i),e},{e:void 0,t:void 0}),n}}),null),T(e=>{var t=q.progress,n=q.steps;return t!==e.e&&U(c,e.e=t),n!==e.t&&U(l,e.t=n),e},{e:void 0,t:void 0}),c})()}function Hd(e){return e.length<=14?e:`${e.slice(0,6)}...${e.slice(-4)}`}function Ud(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Wd(e){return e.replace(/\.?0+$/,``)}function Gd(e){return!Number.isFinite(e)||e<=0?`0`:e<.01?`<0.01`:Yc(Wd(e.toFixed(2)))}var Kd=`tf-e98a9a`,qd=`tf-1f9019`,Jd=`tf-fd4d56`,Yd=`tf-d3c8df`,Xd=`tf-9e3a66`,Zd=`tf-db06d4`,Qd=`tf-c9a5e1`,$d=`tf-7b3b5b`,ef=`tf-651299`,tf=`tf-f52291`,nf=`tf-8cfc86`,rf=`tf-5f768d`,af=`tf-75f592`,of=`tf-73910d`,sf=`tf-1afb0a`,cf=`tf-92a530`,lf=`tf-6e8c3e`,uf=`tf-4b5396`,df=`tf-63cca1`,ff=`tf-18c122`,pf=`tf-d7e813`,J={page:Kd,hero:qd,"tf-success-pop":`tf-36c468`,"tf-pulse-ring":`tf-13e6cd`,heroInner:Jd,heroCheck:Yd,"tf-check-draw":`tf-dc4326`,title:Xd,subtitle:Zd,receivedCard:Qd,"tf-scale-in":`tf-2b6de5`,receivedIconWrap:$d,"tf-slide-up":`tf-5b8ef8`,receivedChainBadge:ef,receivedAmount:tf,receivedSymbol:nf,receivedChainName:rf,journey:af,journeyToggle:of,"journeyToggle--open":`tf-ae94a0`,journeyChevron:sf,"journeyChevron--open":`tf-7737cf`,journeyBody:cf,journeyRow:lf,journeyLabel:uf,journeyValue:df,journeyLink:ff,primaryBtn:pf},mf=V(`<div><div>`),hf=V(`<div><span></span><span>`),gf=V(`<div><span></span><a target=_blank rel="noopener noreferrer"> `),_f=V(`<div>`),vf=V(`<div><button><span> <span> </span> </span><span>`),yf=V(`<div part=success data-testid=success-page><div><div><div><svg width=28 height=28 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><polyline points="4,12 10,18 20,6"></polyline></svg></div></div></div><div data-testid=success-title></div><div></div><div><div><span></span><span></span></div></div><button data-testid=success-primary-btn>`),bf=V(`<div part=success>`);function xf(e){let{t}=Us(),[n,r]=w(!1),i=()=>e.order,a=()=>{let t=i();return!t?.destAmount||typeof e.toToken?.decimals!=`number`?t?.destAmount??`0`:Xc(Kc(t.destAmount,e.toToken.decimals),6)},o=()=>{let t=i();return!t?.srcAmount||typeof e.fromToken?.decimals!=`number`?t?.srcAmount??`0`:Xc(Kc(t.srcAmount,e.fromToken.decimals),6)},s=()=>{let e=i();if(!e)return null;let t=Date.parse(e.createdAt),n=Date.parse(e.updatedAt);if(Number.isNaN(t)||Number.isNaN(n))return null;let r=Math.round((n-t)/1e3);return r>0?r:null},c=()=>{let t=i();if(!t)return null;let n=t.transactions?.deposit?.txHash??t.depositTxHash,r=t.transactions?.deposit?.chainId??t.fromChainId;return n?Vu(r,n,e.chainMap):null},l=()=>{let t=i();if(!t)return null;let n=t.transactions?.fill?.txHash,r=t.transactions?.fill?.chainId??t.toChainId;return n?Vu(r,n,e.chainMap):null},u=()=>{let t=i();return t?zu(t.toChainId,e.chainMap):``},d=()=>{let t=i();return t?zu(t.fromChainId,e.chainMap):``},f=()=>e.mode===`receive`?t({id:`3u5vqs`,message:`New Purchase`}):t({id:`pmqvh0`,message:`New Swap`}),p=()=>s()===null?t({id:`17wtaao`,message:`Your tokens have been delivered`}):t({id:`biwlqk`,message:`Delivered in {seconds}s`},{seconds:String(s())}),m=()=>t({id:`k47stp`,message:`on {chain}`},{chain:u()}),h=()=>t({id:`k47stp`,message:`on {chain}`},{chain:d()});return A(j,{get when(){return i()},get fallback(){return(()=>{var e=bf();return T(()=>U(e,J.page)),e})()},get children(){var s=yf(),u=s.firstChild,d=u.firstChild,g=d.firstChild,_=u.nextSibling,v=_.nextSibling,y=v.nextSibling,b=y.firstChild,x=b.firstChild,S=x.nextSibling,C=y.nextSibling;return G(_,()=>t({id:`mnlddk`,message:`Tokens Landed!`})),G(v,p),G(y,A(j,{get when(){return e.toToken},get children(){var t=mf(),n=t.firstChild;return G(t,A(Bc,{get symbol(){return e.toToken.symbol??`?`},color:`#0052FF`,size:40,get logoURI(){return e.toToken.logoURI}}),n),G(n,A(Vc,{color:null,size:14,get iconUrl(){return Ic(e.apiEndpoint,i().toChainId)}})),T(e=>{var r=J.receivedIconWrap,i=J.receivedChainBadge;return r!==e.e&&U(t,e.e=r),i!==e.t&&U(n,e.t=i),e},{e:void 0,t:void 0}),t}}),b),G(b,A(cl,{get value(){return a()},digits:8}),x),G(x,()=>e.toToken?.symbol??``),G(S,m),G(s,A(j,{get when(){return e.fromToken},get children(){var a=vf(),s=a.firstChild,u=s.firstChild,d=u.firstChild,f=d.nextSibling,p=f.firstChild;f.nextSibling;var m=u.nextSibling;return W(s,`click`,()=>r(!n())),G(u,()=>t({id:`6s9hn9`,message:`From`}),d),G(f,A(cl,{get value(){return o()},digits:6}),p),G(f,()=>e.fromToken.symbol??``,null),G(u,h,null),G(m,A(nc,{size:14})),G(a,A(j,{get when(){return n()},get children(){var n=_f();return G(n,A(j,{get when(){return i()?.author},get children(){var e=hf(),n=e.firstChild,r=n.nextSibling;return G(n,()=>t({id:`1rnxx1g`,message:`Sender`})),G(r,()=>Hd(i().author)),T(t=>{var i=J.journeyRow,a=J.journeyLabel,o=J.journeyValue;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(n,A(j,{get when(){return i()?.recipient},get children(){var e=hf(),n=e.firstChild,r=n.nextSibling;return G(n,()=>t({id:`1oncz6g`,message:`Recipient`})),G(r,()=>Hd(i().recipient)),T(t=>{var i=J.journeyRow,a=J.journeyLabel,o=J.journeyValue;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(n,A(j,{get when(){return c()},get children(){var e=gf(),n=e.firstChild,r=n.nextSibling,i=r.firstChild;return G(n,()=>t({id:`tjg3i3`,message:`Deposit tx`})),G(r,()=>t({id:`10v0i5g`,message:`View on Explorer`}),i),G(r,A(gc,{size:10}),null),T(t=>{var i=J.journeyRow,a=J.journeyLabel,o=c(),s=J.journeyLink;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&H(r,`href`,t.a=o),s!==t.o&&U(r,t.o=s),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),null),G(n,A(j,{get when(){return l()},get children(){var e=gf(),n=e.firstChild,r=n.nextSibling,i=r.firstChild;return G(n,()=>t({id:`bdo3n8`,message:`Fill tx`})),G(r,()=>t({id:`10v0i5g`,message:`View on Explorer`}),i),G(r,A(gc,{size:10}),null),T(t=>{var i=J.journeyRow,a=J.journeyLabel,o=l(),s=J.journeyLink;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&H(r,`href`,t.a=o),s!==t.o&&U(r,t.o=s),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),null),G(n,A(j,{get when(){return e.providerName},get children(){var n=hf(),r=n.firstChild,i=r.nextSibling;return G(r,()=>t({id:`evz7q4`,message:`Provider`})),G(i,()=>e.providerName),T(e=>{var t=J.journeyRow,a=J.journeyLabel,o=J.journeyValue;return t!==e.e&&U(n,e.e=t),a!==e.t&&U(r,e.t=a),o!==e.a&&U(i,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n}}),null),T(()=>U(n,J.journeyBody)),n}}),null),T(e=>{var t=J.journey,r=`${J.journeyToggle}${n()?` ${J[`journeyToggle--open`]}`:``}`,i=K.monoAmount,o=`${J.journeyChevron}${n()?` ${J[`journeyChevron--open`]}`:``}`;return t!==e.e&&U(a,e.e=t),r!==e.t&&U(s,e.t=r),i!==e.a&&U(f,e.a=i),o!==e.o&&U(m,e.o=o),e},{e:void 0,t:void 0,a:void 0,o:void 0}),a}}),C),W(C,`click`,e.onNewSwap),G(C,f),T(e=>{var t=J.page,n=J.hero,r=J.heroInner,i=J.heroCheck,a=J.title,o=J.subtitle,c=J.receivedCard,l=J.receivedAmount,f=J.receivedSymbol,p=J.receivedChainName,m=J.primaryBtn;return t!==e.e&&U(s,e.e=t),n!==e.t&&U(u,e.t=n),r!==e.a&&U(d,e.a=r),i!==e.o&&U(g,e.o=i),a!==e.i&&U(_,e.i=a),o!==e.n&&U(v,e.n=o),c!==e.s&&U(y,e.s=c),l!==e.h&&U(b,e.h=l),f!==e.r&&U(x,e.r=f),p!==e.d&&U(S,e.d=p),m!==e.l&&U(C,e.l=m),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),s}})}var Sf=`tf-e6f4f9`,Cf=`tf-02c58b`,wf=`tf-8975d9`,Tf=`tf-94ab07`,Ef={wrapper:Sf,fadeOut:Cf,"tf-crossfade-out":`tf-c1e2f1`,fadeIn:wf,"tf-crossfade-in":`tf-c41d8a`,active:Tf},Df=V(`<div>`),Of=500;function kf(e){let t=typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0,n=()=>t?0:e.duration??Of,[r,i]=w(e.current),[a,o]=w(null),s;E(ie(()=>e.current,(e,t)=>{e===t||!t||(s&&clearTimeout(s),o(t),i(e),s=setTimeout(()=>{o(null)},n()+50))})),oe(()=>{s&&clearTimeout(s)});let c=e=>r()===e||a()===e,l=e=>a()===e?Ef.fadeOut:a()!==null&&r()===e?`${Ef.fadeIn} ${Ef.active}`:Ef.active;return(()=>{var t=Df();return G(t,A(j,{get when(){return c(`form`)},get children(){var t=Df();return G(t,()=>e.views.form()),T(()=>U(t,l(`form`))),t}}),null),G(t,A(j,{get when(){return c(`tracking`)},get children(){var t=Df();return G(t,()=>e.views.tracking()),T(()=>U(t,l(`tracking`))),t}}),null),G(t,A(j,{get when(){return c(`success`)},get children(){var t=Df();return G(t,()=>e.views.success()),T(()=>U(t,l(`success`))),t}}),null),T(()=>U(t,Ef.wrapper)),t})()}var Af={USD:`$`,EUR:`€`,GBP:`£`,JPY:`¥`,KRW:`₩`,CNY:`¥`,AUD:`A$`,CAD:`C$`,CHF:`Fr`,INR:`₹`,BRL:`R$`,MXN:`Mex$`,SGD:`S$`,HKD:`HK$`,NZD:`NZ$`,SEK:`kr`,NOK:`kr`,DKK:`kr`,PLN:`zł`,ZAR:`R`,THB:`฿`,TWD:`NT$`,TRY:`₺`,ILS:`₪`,PHP:`₱`,IDR:`Rp`,MYR:`RM`,VND:`₫`,CZK:`Kč`,HUF:`Ft`},jf={USD:`🇺🇸`,EUR:`🇪🇺`,GBP:`🇬🇧`,JPY:`🇯🇵`,KRW:`🇰🇷`,CNY:`🇨🇳`,AUD:`🇦🇺`,CAD:`🇨🇦`,CHF:`🇨🇭`,INR:`🇮🇳`,BRL:`🇧🇷`,MXN:`🇲🇽`,SGD:`🇸🇬`,HKD:`🇭🇰`,NZD:`🇳🇿`,SEK:`🇸🇪`,NOK:`🇳🇴`,DKK:`🇩🇰`,PLN:`🇵🇱`,ZAR:`🇿🇦`,THB:`🇹🇭`,TWD:`🇹🇼`,TRY:`🇹🇷`,ILS:`🇮🇱`,PHP:`🇵🇭`,IDR:`🇮🇩`,MYR:`🇲🇾`,VND:`🇻🇳`,CZK:`🇨🇿`,HUF:`🇭🇺`,RON:`🇷🇴`,RSD:`🇷🇸`,GEL:`🇬🇪`,ISK:`🇮🇸`,KWD:`🇰🇼`,BHD:`🇧🇭`,BMD:`🇧🇲`},Mf={en:{USD:`US Dollar`,EUR:`Euro`,GBP:`British Pound`,JPY:`Japanese Yen`,KRW:`South Korean Won`,CNY:`Chinese Yuan`,AUD:`Australian Dollar`,CAD:`Canadian Dollar`,CHF:`Swiss Franc`,INR:`Indian Rupee`,BRL:`Brazilian Real`,MXN:`Mexican Peso`,SGD:`Singapore Dollar`,HKD:`Hong Kong Dollar`,NZD:`New Zealand Dollar`,SEK:`Swedish Krona`,NOK:`Norwegian Krone`,DKK:`Danish Krone`,PLN:`Polish Zloty`,ZAR:`South African Rand`,THB:`Thai Baht`,TWD:`Taiwan Dollar`,TRY:`Turkish Lira`,ILS:`Israeli Shekel`,PHP:`Philippine Peso`,IDR:`Indonesian Rupiah`,MYR:`Malaysian Ringgit`,VND:`Vietnamese Dong`,CZK:`Czech Koruna`,HUF:`Hungarian Forint`,RON:`Romanian Leu`,RSD:`Serbian Dinar`,GEL:`Georgian Lari`,ISK:`Icelandic Krona`,KWD:`Kuwaiti Dinar`,BHD:`Bahraini Dinar`,BMD:`Bermudian Dollar`},"zh-CN":{USD:`美元`,EUR:`欧元`,GBP:`英镑`,JPY:`日元`,KRW:`韩元`,CNY:`人民币`,AUD:`澳元`,CAD:`加元`,CHF:`瑞士法郎`,INR:`印度卢比`,BRL:`巴西雷亚尔`,MXN:`墨西哥比索`,SGD:`新加坡元`,HKD:`港币`,NZD:`新西兰元`,SEK:`瑞典克朗`,NOK:`挪威克朗`,DKK:`丹麦克朗`,PLN:`波兰兹罗提`,ZAR:`南非兰特`,THB:`泰铢`,TWD:`新台币`,TRY:`土耳其里拉`,ILS:`以色列谢克尔`,PHP:`菲律宾比索`,IDR:`印尼盾`,MYR:`马来西亚林吉特`,VND:`越南盾`,CZK:`捷克克朗`,HUF:`匈牙利福林`,RON:`罗马尼亚列伊`,RSD:`塞尔维亚第纳尔`,GEL:`格鲁吉亚拉里`,ISK:`冰岛克朗`,KWD:`科威特第纳尔`,BHD:`巴林第纳尔`,BMD:`百慕大元`},"zh-TW":{USD:`美元`,EUR:`歐元`,GBP:`英鎊`,JPY:`日圓`,KRW:`韓元`,CNY:`人民幣`,AUD:`澳幣`,CAD:`加幣`,CHF:`瑞士法郎`,INR:`印度盧比`,BRL:`巴西雷亞爾`,MXN:`墨西哥披索`,SGD:`新加坡幣`,HKD:`港幣`,NZD:`紐西蘭幣`,SEK:`瑞典克朗`,NOK:`挪威克朗`,DKK:`丹麥克朗`,PLN:`波蘭茲羅提`,ZAR:`南非蘭特`,THB:`泰銖`,TWD:`新臺幣`,TRY:`土耳其里拉`,ILS:`以色列謝克爾`,PHP:`菲律賓披索`,IDR:`印尼盾`,MYR:`馬來西亞令吉`,VND:`越南盾`,CZK:`捷克克朗`,HUF:`匈牙利福林`,RON:`羅馬尼亞列伊`,RSD:`塞爾維亞第納爾`,GEL:`喬治亞拉里`,ISK:`冰島克朗`,KWD:`科威特第納爾`,BHD:`巴林第納爾`,BMD:`百慕達元`},ja:{USD:`米ドル`,EUR:`ユーロ`,GBP:`英ポンド`,JPY:`日本円`,KRW:`韓国ウォン`,CNY:`中国人民元`,AUD:`豪ドル`,CAD:`カナダドル`,CHF:`スイスフラン`,INR:`インドルピー`,BRL:`ブラジルレアル`,MXN:`メキシコペソ`,SGD:`シンガポールドル`,HKD:`香港ドル`,NZD:`NZドル`,SEK:`スウェーデンクローナ`,NOK:`ノルウェークローネ`,DKK:`デンマーククローネ`,PLN:`ポーランドズロチ`,ZAR:`南アフリカランド`,THB:`タイバーツ`,TWD:`台湾ドル`,TRY:`トルコリラ`,ILS:`イスラエルシェケル`,PHP:`フィリピンペソ`,IDR:`インドネシアルピア`,MYR:`マレーシアリンギット`,VND:`ベトナムドン`,CZK:`チェココルナ`,HUF:`ハンガリーフォリント`,RON:`ルーマニアレウ`,RSD:`セルビアディナール`,GEL:`ジョージアラリ`,ISK:`アイスランドクローナ`,KWD:`クウェートディナール`,BHD:`バーレーンディナール`,BMD:`バミューダドル`},ko:{USD:`미국 달러`,EUR:`유로`,GBP:`영국 파운드`,JPY:`일본 엔`,KRW:`대한민국 원`,CNY:`중국 위안`,AUD:`호주 달러`,CAD:`캐나다 달러`,CHF:`스위스 프랑`,INR:`인도 루피`,BRL:`브라질 헤알`,MXN:`멕시코 페소`,SGD:`싱가포르 달러`,HKD:`홍콩 달러`,NZD:`뉴질랜드 달러`,SEK:`스웨덴 크로나`,NOK:`노르웨이 크로네`,DKK:`덴마크 크로네`,PLN:`폴란드 즈워티`,ZAR:`남아공 랜드`,THB:`태국 바트`,TWD:`대만 달러`,TRY:`터키 리라`,ILS:`이스라엘 셰켈`,PHP:`필리핀 페소`,IDR:`인도네시아 루피아`,MYR:`말레이시아 링깃`,VND:`베트남 동`,CZK:`체코 코루나`,HUF:`헝가리 포린트`,RON:`루마니아 레우`,RSD:`세르비아 디나르`,GEL:`조지아 라리`,ISK:`아이슬란드 크로나`,KWD:`쿠웨이트 디나르`,BHD:`바레인 디나르`,BMD:`버뮤다 달러`}};function Nf(e){return Af[e]??``}function Pf(e){return jf[e]??`🌐`}function Ff(e,t){return Mf[If(t)]?.[e]??Mf.en[e]??e}function If(e){if(!e)return`en`;let t=e.toLowerCase();if(t===`zh-cn`)return`zh-CN`;if(t===`zh-tw`)return`zh-TW`;let n=t.split(`-`)[0];return n===`zh`?`zh-CN`:n===`ja`?`ja`:n===`ko`?`ko`:`en`}var Lf=V(`<div><div><div><div></div><div><div> </div><span></span></div></div></div><div></div><div><div><div><div></div></div><div><div></div><span>`),Rf=V(`<div>`),zf=V(`<button>`),Bf=V(`<div><div>`),Vf=V(`<div><button data-testid=fiat-back-btn>`),Hf=V(`<div part=fiat-progress><div>`),Uf=V(`<a target=_blank rel="noopener noreferrer"> `),Wf=V(`<div><div></div><div><div></div><div><span>`),Gf=V(`<span style=font-size:14px>!`),Kf=V(`<span>`);function qf(e){let{t}=Us(),n=()=>e.targetToken?zu(e.targetToken.chainId,e.chainMap):``,r=()=>Nf(e.fiatCurrency.toUpperCase()),i=D(()=>{let{phase:n,status:i,strategy:a,provider:o}=e,s=i===`failed`,c=n===`success`,l=n===`tracking`,u=n===`awaiting-payment`||n===`creating-order`,d=l||c,f=e.targetToken?.symbol??``,p=`${r()}${e.fiatAmount} ${e.fiatCurrency.toUpperCase()}`,m={title:t({id:`n9zkql`,message:`Awaiting payment`}),subtitle:d?t({id:`1jhuo24`,message:`Payment confirmed`}):t({id:`132vna6`,message:`Pay {amount} via {provider}`},{amount:p,provider:o}),status:d?`completed`:u?`active`:`pending`,explorerUrl:null,isWarning:!1};if(a===`direct`){let n=`pending`,r=t({id:`sykid7`,message:`Delivering {symbol} to your wallet...`},{symbol:f}),i=!1,a=null;return c?(n=`completed`,r=t({id:`1685rko`,message:`Tokens delivered to your wallet`}),e.transferTxHash&&e.targetToken&&(a=Vu(e.targetToken.chainId,e.transferTxHash,e.chainMap))):s?(n=`completed`,r=e.failedReason??t({id:`3pklqf`,message:`Purchase failed`}),i=!0):l&&(n=`active`),[m,{title:t({id:`yhtv6l`,message:`Purchase complete`}),subtitle:r,status:n,explorerUrl:a,isWarning:i}]}let h=`pending`,g=t({id:`1g8tdk7`,message:`Swapping via DEX...`}),_=!1;c?h=`completed`:l?h=`active`:s&&(h=`completed`,g=e.failedReason??t({id:`3pklqf`,message:`Purchase failed`}),_=!0);let v={title:t({id:`1y6hn5o`,message:`Swapping tokens`}),subtitle:g,status:h,explorerUrl:null,isWarning:_},y=`pending`,b=t({id:`sykid7`,message:`Delivering {symbol} to your wallet...`},{symbol:f}),x=!1,S=null;return c?(y=`completed`,b=t({id:`1685rko`,message:`Tokens delivered to your wallet`}),e.transferTxHash&&e.targetToken&&(S=Vu(e.targetToken.chainId,e.transferTxHash,e.chainMap))):s&&!_&&(y=`completed`,b=e.failedReason??t({id:`3pklqf`,message:`Purchase failed`}),x=!0),[m,v,{title:t({id:`yhtv6l`,message:`Purchase complete`}),subtitle:b,status:y,explorerUrl:S,isWarning:x}]}),a=()=>e.status===`failed`,o=()=>{let n=e.provider;return t({id:`14j1lze`,message:`via {provider}`},{provider:n})};return(()=>{var s=Hf(),c=s.firstChild;return G(s,A(j,{get when(){return e.targetToken},get children(){return[(()=>{var i=Lf(),a=i.firstChild,o=a.firstChild,s=o.firstChild,c=s.nextSibling,l=c.firstChild,u=l.firstChild,d=l.nextSibling,f=a.nextSibling,p=f.nextSibling,m=p.firstChild,h=m.firstChild,g=h.firstChild,_=h.nextSibling,v=_.firstChild,y=v.nextSibling;return G(s,r),G(l,r,u),G(l,()=>e.fiatAmount,u),G(l,()=>e.fiatCurrency.toUpperCase(),null),G(d,()=>t({id:`2zh3gr`,message:`Fiat payment`})),G(f,A(oc,{size:14})),G(h,A(Bc,{get symbol(){return e.targetToken.symbol??`?`},color:`#0052FF`,size:32,get logoURI(){return e.targetToken.logoURI}}),g),G(g,A(Vc,{color:null,size:14,get iconUrl(){return Ic(e.apiBase,e.targetToken.chainId)}})),G(v,A(j,{get when(){return e.cryptoAmount},get children(){return[A(cl,{get value(){return e.cryptoAmount},digits:6}),` `]}}),null),G(v,()=>e.targetToken.symbol??``,null),G(y,n),T(e=>{var t=q.header,n=`${q.tokenCol} ${q.tokenColFrom}`,r=q.tokenColInner,u=q.fiatBadge,b=q.tokenInfo,x=q.tokenAmount,S=q.tokenChain,C=q.arrow,w=q.tokenCol,ee=q.tokenColInner,T=q.tokenIconWrap,E=q.chainBadge,D=q.tokenInfo,te=q.tokenAmount,ne=q.tokenChain;return t!==e.e&&U(i,e.e=t),n!==e.t&&U(a,e.t=n),r!==e.a&&U(o,e.a=r),u!==e.o&&U(s,e.o=u),b!==e.i&&U(c,e.i=b),x!==e.n&&U(l,e.n=x),S!==e.s&&U(d,e.s=S),C!==e.h&&U(f,e.h=C),w!==e.r&&U(p,e.r=w),ee!==e.d&&U(m,e.d=ee),T!==e.l&&U(h,e.l=T),E!==e.u&&U(g,e.u=E),D!==e.c&&U(_,e.c=D),te!==e.w&&U(v,e.w=te),ne!==e.m&&U(y,e.m=ne),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0}),i})(),(()=>{var e=Rf();return G(e,o),T(()=>U(e,q.via)),e})()]}}),c),G(c,A(Je,{get each(){return i()},children:(e,n)=>{let r=()=>{let t=e();return t.isWarning?`${q.step} ${q.warning}`:t.status===`completed`?`${q.step} ${q.completed}`:t.status===`active`?`${q.step} ${q.active}`:`${q.step} ${q.pending}`};return(()=>{var i=Wf(),a=i.firstChild,o=a.nextSibling,s=o.firstChild,c=s.nextSibling,l=c.firstChild;return G(a,()=>{let t=e();return t.status===`completed`&&!t.isWarning?A(fc,{size:14}):t.status===`active`&&t.isWarning?Gf():t.status===`active`?(()=>{var e=Rf();return T(()=>U(e,q.stepSpinner)),e})():t.isWarning&&t.status===`completed`?Gf():(()=>{var e=Kf();return G(e,n+1),e})()}),G(s,()=>e().title),G(l,()=>e().subtitle),G(c,A(j,{get when(){return e().explorerUrl},get children(){var n=Uf(),r=n.firstChild;return G(n,()=>t({id:`q5w460`,message:`View`}),r),G(n,A(gc,{size:10}),null),T(t=>{var r=e().explorerUrl,i=q.stepExplorer;return r!==t.e&&H(n,`href`,t.e=r),i!==t.t&&U(n,t.t=i),t},{e:void 0,t:void 0}),n}}),null),T(t=>{var n=r(),l=(()=>{let t=e();return`${q.stepIcon} ${t.isWarning&&(t.status===`completed`||t.status===`active`)?q.stepIconWarning:t.status===`completed`?q.stepIconCompleted:t.status===`active`?q.stepIconActive:q.stepIconPending}`})(),u=q.stepBody,d=q.stepTitle,f=q.stepSubtitle;return n!==t.e&&U(i,t.e=n),l!==t.t&&U(a,t.t=l),u!==t.a&&U(o,t.a=u),d!==t.o&&U(s,t.o=d),f!==t.i&&U(c,t.i=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()}})),G(s,A(j,{get when(){return a()},get children(){var n=Bf(),r=n.firstChild;return G(r,()=>e.failedReason??t({id:`3pklqf`,message:`Purchase failed`})),G(n,A(j,{get when(){return e.onNewPurchase},get children(){var n=zf();return W(n,`click`,e.onNewPurchase),G(n,()=>t({id:`3u5vqs`,message:`New Purchase`})),T(()=>U(n,q.failureBtn)),n}}),null),T(e=>{var t=q.failure,i=q.failureMessage;return t!==e.e&&U(n,e.e=t),i!==e.t&&U(r,e.t=i),e},{e:void 0,t:void 0}),n}}),null),G(s,A(j,{get when(){return B(()=>!!e.userCanceled)()&&e.onBack},get children(){var n=Vf(),r=n.firstChild;return W(r,`click`,e.onBack),G(r,()=>t({id:`1hzmxtu`,message:`Back`})),T(e=>{var t=q.retry,i=q.retryBtn;return t!==e.e&&U(n,e.e=t),i!==e.t&&U(r,e.t=i),e},{e:void 0,t:void 0}),n}}),null),T(e=>{var t=q.progress,n=q.steps;return t!==e.e&&U(s,e.e=t),n!==e.t&&U(c,e.t=n),e},{e:void 0,t:void 0}),s})()}var Jf=V(`<div><div>`),Yf=V(`<div><span></span><span>`),Xf=V(`<div><span></span><a target=_blank rel="noopener noreferrer"> `),Zf=V(`<div><div><span></span><span>`),Qf=V(`<div part=fiat-success data-testid=fiat-success-page><div><div><div><svg width=28 height=28 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><polyline points="4,12 10,18 20,6"></polyline></svg></div></div></div><div data-testid=fiat-success-title></div><div></div><div><div><span></span><span></span></div></div><div><button><span> <span> </span></span><span></span></button></div><button data-testid=fiat-success-new-purchase>`);function $f(e){let{t}=Us(),[n,r]=w(!1),i=()=>{let t=e.orderStatus.outputAmount??e.orderStatus.quotedCryptoAmount;return t?Xc(Kc(t,e.tokenDecimals??e.targetToken?.decimals??18),6):`0`},a=()=>{let t=Date.parse(e.orderStatus.createdAt),n=Date.parse(e.orderStatus.updatedAt);if(Number.isNaN(t)||Number.isNaN(n))return null;let r=Math.round((n-t)/1e3);return r>0?r:null},o=()=>{let t=e.orderStatus.fillTxHash??e.orderStatus.transferTxHash,n=e.orderStatus.toChainId;return t?Vu(n,t,e.chainMap):null},s=()=>zu(e.orderStatus.toChainId,e.chainMap),c=()=>Nf(e.fiatCurrency.toUpperCase()),l=()=>a()===null?t({id:`17wtaao`,message:`Your tokens have been delivered`}):t({id:`biwlqk`,message:`Delivered in {seconds}s`},{seconds:String(a())}),u=()=>t({id:`k47stp`,message:`on {chain}`},{chain:s()});return(()=>{var a=Qf(),s=a.firstChild,d=s.firstChild,f=d.firstChild,p=s.nextSibling,m=p.nextSibling,h=m.nextSibling,g=h.firstChild,_=g.firstChild,v=_.nextSibling,y=h.nextSibling,b=y.firstChild,x=b.firstChild,S=x.firstChild,C=S.nextSibling,w=C.firstChild,ee=x.nextSibling,E=y.nextSibling;return G(p,()=>t({id:`vum0cd`,message:`Purchase Complete`})),G(m,l),G(h,A(j,{get when(){return e.targetToken},get children(){var t=Jf(),n=t.firstChild;return G(t,A(Bc,{get symbol(){return e.targetToken.symbol??`?`},color:`#0052FF`,size:40,get logoURI(){return e.targetToken.logoURI}}),n),G(n,A(Vc,{color:null,size:14,get iconUrl(){return Ic(e.apiBase,e.orderStatus.toChainId)}})),T(e=>{var r=J.receivedIconWrap,i=J.receivedChainBadge;return r!==e.e&&U(t,e.e=r),i!==e.t&&U(n,e.t=i),e},{e:void 0,t:void 0}),t}}),g),G(g,A(cl,{get value(){return i()},digits:8}),_),G(_,()=>e.targetToken?.symbol??``),G(v,u),W(b,`click`,()=>r(!n())),G(x,()=>t({id:`1w0n607`,message:`Paid`}),S),G(C,c,w),G(C,()=>e.fiatAmount,w),G(C,()=>e.fiatCurrency.toUpperCase(),null),G(ee,A(nc,{size:14})),G(y,A(j,{get when(){return n()},get children(){var n=Zf(),r=n.firstChild,i=r.firstChild,a=i.nextSibling;return G(n,A(j,{get when(){return e.orderStatus.recipient},get children(){var n=Yf(),r=n.firstChild,i=r.nextSibling;return G(r,()=>t({id:`1oncz6g`,message:`Recipient`})),G(i,()=>Hd(e.orderStatus.recipient)),T(e=>{var t=J.journeyRow,a=J.journeyLabel,o=J.journeyValue;return t!==e.e&&U(n,e.e=t),a!==e.t&&U(r,e.t=a),o!==e.a&&U(i,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n}}),r),G(n,A(j,{get when(){return o()},get children(){var e=Xf(),n=e.firstChild,r=n.nextSibling,i=r.firstChild;return G(n,()=>t({id:`hzq69q`,message:`Transfer tx`})),G(r,()=>t({id:`10v0i5g`,message:`View on Explorer`}),i),G(r,A(gc,{size:10}),null),T(t=>{var i=J.journeyRow,a=J.journeyLabel,s=o(),c=J.journeyLink;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),s!==t.a&&H(r,`href`,t.a=s),c!==t.o&&U(r,t.o=c),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),r),G(i,()=>t({id:`evz7q4`,message:`Provider`})),G(a,()=>e.provider),T(e=>{var t=J.journeyBody,o=J.journeyRow,s=J.journeyLabel,c=J.journeyValue;return t!==e.e&&U(n,e.e=t),o!==e.t&&U(r,e.t=o),s!==e.a&&U(i,e.a=s),c!==e.o&&U(a,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}}),null),W(E,`click`,e.onNewPurchase),G(E,()=>t({id:`3u5vqs`,message:`New Purchase`})),T(e=>{var t=J.page,r=J.hero,i=J.heroInner,o=J.heroCheck,c=J.title,l=J.subtitle,u=J.receivedCard,x=J.receivedAmount,S=J.receivedSymbol,w=J.receivedChainName,T=J.journey,D=`${J.journeyToggle}${n()?` ${J[`journeyToggle--open`]}`:``}`,te=K.monoAmount,ne=`${J.journeyChevron}${n()?` ${J[`journeyChevron--open`]}`:``}`,re=J.primaryBtn;return t!==e.e&&U(a,e.e=t),r!==e.t&&U(s,e.t=r),i!==e.a&&U(d,e.a=i),o!==e.o&&U(f,e.o=o),c!==e.i&&U(p,e.i=c),l!==e.n&&U(m,e.n=l),u!==e.s&&U(h,e.s=u),x!==e.h&&U(g,e.h=x),S!==e.r&&U(_,e.r=S),w!==e.d&&U(v,e.d=w),T!==e.l&&U(y,e.l=T),D!==e.u&&U(b,e.u=D),te!==e.c&&U(C,e.c=te),ne!==e.w&&U(ee,e.w=ne),re!==e.m&&U(E,e.m=re),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0,m:void 0}),a})()}var ep={selector:`tf-28b876`,header:`tf-2aa545`,titleRow:`tf-bcba74`,title:`tf-a974e8`,headerRight:`tf-14447c`,close:`tf-527e42`,divider:`tf-a5a3ce`,providerList:`tf-211bfe`,providerItem:`tf-fd33c1`,providerItemSelected:`tf-a0382b`,providerLeft:`tf-2aece4`,providerIcon:`tf-949870`,providerIconFallback:`tf-13e09e`,providerInfo:`tf-2387c4`,providerName:`tf-74069b`,bestBadge:`tf-113a28`,providerFee:`tf-69fe0b`,providerRight:`tf-cb2799`,cryptoAmount:`tf-d4ce76`,checkmark:`tf-b3b747`},tp=V(`<div role=dialog part=provider-selector data-testid=provider-selector><div><div><span data-testid=provider-selector-title></span><div><button data-testid=provider-selector-close></button></div></div></div><div></div><div>`),np=V(`<img>`),rp=V(`<span>`),ip=V(`<button type=button data-testid=provider-list-item><div><div><span></span><span>: </span></div></div><div><span>≈ <!> `),ap=V(`<div>`);function op(e){if(e.swapStrategy===`jump`&&e.routes?.length){let t=e.routes[0]?.estimatedOutputAmount;if(t)return t}return e.cryptoAmount}function sp(e){let{t}=Us(),n=()=>Nf(e.fiatCurrency.toUpperCase()),r=t=>e.selectedProviderId?t===e.selectedProviderId:e.quotes.length>0&&e.quotes[0].provider===t,i=t=>{t.key===`Escape`&&e.onClose()};return(()=>{var a=tp(),o=a.firstChild,s=o.firstChild,c=s.firstChild,l=c.nextSibling,u=l.firstChild,d=o.nextSibling,f=d.nextSibling;return W(a,`keydown`,i),G(c,()=>t({id:`118a77s`,message:`Select Fiat Provider`})),G(l,A(pu,{get secondsRemaining(){return e.countdownSeconds},get totalSeconds(){return e.totalCountdownSeconds},get onRefresh(){return e.onRefresh},get isRefreshing(){return e.isRefreshing}}),u),W(u,`click`,()=>e.onClose()),G(u,A(mc,{size:18})),G(f,A(qe,{get each(){return[...e.quotes]},children:(i,a)=>{let[o,s]=w(!1),c=()=>r(i.provider),l=()=>a()===0,u=()=>i.providerIcon?`${e.apiBase}${i.providerIcon}`:null;return(()=>{var r=ip(),a=r.firstChild,d=a.firstChild,f=d.firstChild,p=f.nextSibling,m=p.firstChild,h=a.nextSibling,g=h.firstChild,_=g.firstChild.nextSibling;return _.nextSibling,W(r,`click`,()=>e.onSelect(i.provider)),G(a,A(j,{get when(){return B(()=>!!u())()&&!o()},get fallback(){return(()=>{var e=ap();return G(e,()=>(i.providerName??i.provider).charAt(0).toUpperCase()),T(()=>U(e,ep.providerIconFallback)),e})()},get children(){var e=np();return W(e,`error`,()=>s(!0)),T(t=>{var n=ep.providerIcon,r=u(),a=i.provider;return n!==t.e&&U(e,t.e=n),r!==t.t&&H(e,`src`,t.t=r),a!==t.a&&H(e,`alt`,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e}}),d),G(f,()=>i.providerName??i.provider,null),G(f,A(j,{get when(){return l()},get children(){var e=rp();return G(e,()=>t({id:`r7v9s7`,message:`BEST RATE`})),T(()=>U(e,ep.bestBadge)),e}}),null),G(p,()=>t({id:`1viukn9`,message:`Total fee`}),m),G(p,n,null),G(p,()=>parseFloat(String(i.totalFee)).toFixed(2),null),G(g,()=>Xc(Kc(op(i),e.tokenDecimals),4),_),G(g,()=>e.targetSymbol,null),G(h,A(j,{get when(){return c()},get children(){var e=rp();return G(e,A(fc,{size:16})),T(()=>U(e,ep.checkmark)),e}}),null),T(e=>{var t=`${ep.providerItem}${c()?` ${ep.providerItemSelected}`:``}`,n=ep.providerLeft,i=ep.providerInfo,o=ep.providerName,s=ep.providerFee,l=ep.providerRight,u=ep.cryptoAmount;return t!==e.e&&U(r,e.e=t),n!==e.t&&U(a,e.t=n),i!==e.a&&U(d,e.a=i),o!==e.o&&U(f,e.o=o),s!==e.i&&U(p,e.i=s),l!==e.n&&U(h,e.n=l),u!==e.s&&U(g,e.s=u),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),r})()}})),T(e=>{var n=ep.selector,r=t({id:`118a77s`,message:`Select Fiat Provider`}),i=ep.header,p=ep.titleRow,m=ep.title,h=ep.headerRight,g=ep.close,_=t({id:`1l0xxoj`,message:`Close`}),v=ep.divider,y=ep.providerList;return n!==e.e&&U(a,e.e=n),r!==e.t&&H(a,`aria-label`,e.t=r),i!==e.a&&U(o,e.a=i),p!==e.o&&U(s,e.o=p),m!==e.i&&U(c,e.i=m),h!==e.n&&U(l,e.n=h),g!==e.s&&U(u,e.s=g),_!==e.h&&H(u,`aria-label`,e.h=_),v!==e.r&&U(d,e.r=v),y!==e.d&&U(f,e.d=y),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),a})()}var cp=`tf-9b9575`,lp=`tf-140273`,up=`tf-fce59b`,dp=`tf-72e47b`,fp=`tf-b9a357`,pp=`tf-45030f`,mp=`tf-ce0622`,hp=`tf-0c1692`,gp=`tf-64aa3f`,_p=`tf-9819ca`,vp=`tf-d9fcd6`,yp=`tf-4ad0e7`,bp=`tf-9ea859`,xp=`tf-25e112`,Sp=`tf-478cb9`,Cp=`tf-125be5`,wp=`tf-bb4fb1`,Tp=`tf-ad5703`,Ep=`tf-de9986`,Dp=`tf-7ac0fe`,Op=`tf-c6ef08`,kp=`tf-3643cf`,Ap=`tf-9b3d59`,jp=`tf-a4cc17`,Mp=`tf-7f1baf`,Np=`tf-9171a2`,Pp=`tf-71ea5d`,Fp=`tf-dfb33a`,Ip=`tf-43fbf4`,Lp=`tf-61ca3c`,Rp=`tf-512365`,zp=`tf-9f601f`,Bp=`tf-a0b0d9`,Vp=`tf-1e7a62`,Hp=`tf-67f18a`,Up=`tf-cd76b9`,Wp=`tf-189814`,Gp=`tf-8f4efd`,Kp=`tf-6d4840`,qp=`tf-51bf2b`,Jp=`tf-87740a`,Yp=`tf-2ee375`,Xp=`tf-0afeec`,Zp=`tf-ea8b28`,Qp=`tf-74f38a`,$p=`tf-d9b5e6`,em=`tf-635e96`,Y={overlay:cp,"tf-ts-fade":`tf-9e8870`,selector:lp,"tf-ts-slide":`tf-c66348`,selectorNoBorder:up,overlayDismissing:dp,"tf-ts-fade-out":`tf-d98d4b`,selectorDismissing:fp,"tf-ts-slide-out":`tf-d911c1`,header:pp,titleRow:mp,title:hp,close:gp,search:_p,focused:vp,searchIcon:yp,searchInput:bp,chainFilter:xp,chainFilterBtn:Sp,active:Cp,chainFilterSkeleton:wp,divider:Tp,tokenList:Ep,tokenListSkeleton:Dp,tokenListItemSkeleton:Op,tokenListSkeletonLeft:kp,tokenListSkeletonIcon:Ap,tokenListSkeletonInfo:jp,tokenListSkeletonRight:Mp,tokenListSkeletonLine:Np,primary:Pp,secondary:Fp,balance:Ip,usd:Lp,tokenListItem:Rp,highlighted:zp,tokenListLeft:Bp,tokenListIconWrap:Vp,chainIndicator:Hp,tokenListInfo:Up,symbolRow:Wp,symbol:Gp,tokenTag:Kp,name:qp,tokenListRight:Jp,zero:Yp,emptyState:Xp,emptyStateIcon:Zp,emptyStateTitle:Qp,emptyStateDesc:$p,emptyStateBtn:em},tm={ETH:[`ETH`,`WETH`],USDC:[`USDC`,`USDC.e`,`USDbC`],USDT:[`USDT`,`USDT.e`]},nm={STABLES_MAJOR:[`USDT`,`USDC`,`USDE`,`DAI`,`USDS`,`USD1`,`BUIDL`,`USDF`,`USDTB`,`PYUSD`],STABLE_WRAPPED:[`USDE`,`SUSDE`,`USDS`,`SUSDS`,`DAI`,`SDAI`],BTC:[`BTC`,`WBTC`,`TBTC`,`CBBTC`,`BTC.B`,`CKBTC`],ETH_LST_LRT:[`ETH`,`WETH`,`STETH`,`WSTETH`,`RETH`,`CBETH`,`FRXETH`,`SFRXETH`,`OSETH`,`ETHX`,`METH`,`EETH`,`WEETH`,`EZETH`,`PUFETH`,`RSETH`,`WBETH`]},rm=new Set([`BTC`,`ETH`,`WETH`,`WBTC`,`USDC`,`USDT`,`DAI`,`BNB`,`XRP`,`SOL`,`TRX`,`DOGE`,`ADA`,`BCH`,`HYPE`,`XMR`,`LEO`,`LINK`,`MATIC`,`AVAX`]),im=new Set([`USDC`,`USDT`,`DAI`,`USDE`,`USDS`,`USD1`,`USDF`,`USDG`,`RLUSD`,`USDD`,`BUSD`,`TUSD`,`USDP`,`FRAX`,`LUSD`,`GUSD`,`PYUSD`]),am=.1,om=new Set([1]),sm=new Set([`0x0000000000000000000000000000000000000000`,`0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`,`11111111111111111111111111111111`]);function cm(e){return e?sm.has(e.toLowerCase()):!1}function lm(e,t){let n=e.toUpperCase(),r=t.toUpperCase();if(n===r)return!0;for(let e of Object.values(tm)){let t=e.some(e=>e.toUpperCase()===n),i=e.some(e=>e.toUpperCase()===r);if(t&&i)return!0}return!1}function um(e,t){let n=e.toUpperCase(),r=t.toUpperCase();for(let e of Object.values(nm)){let t=e.some(e=>e.toUpperCase()===n),i=e.some(e=>e.toUpperCase()===r);if(t&&i)return!0}return!1}function dm(e){return im.has(e.toUpperCase())}function fm(e){return rm.has(e.toUpperCase())}function pm(e){return cm(e)&&(e.startsWith(`0x`)||e.startsWith(`0X`))?`0x0000000000000000000000000000000000000000`:e.toLowerCase()}function mm(e,t){return e.chainId===t.chainId&&pm(e.address)===pm(t.address)}function hm(e){return`${e.chainId}:${pm(e.address)}`}function gm(e){let{defaultFromToken:t,balances:n,currentSelection:r,userPicked:i}=e;return!t||n.length===0||i||r&&mm(r,t)?null:n.find(e=>mm(e,t))??null}function _m(e){return new Map(e.map(e=>[e.id,e]))}var vm=`tf:token:`,ym=1440*60*1e3,bm=200;function xm(e,t,n){return[`tokenInfo`,n??`__default__`,e,t.toLowerCase()]}function Sm(e,t){return`${vm}${e}:${t.toLowerCase()}`}function Cm(e,t,n){return cs.getQueryData(xm(e,t,n))??null}function wm(e,t){cs.setQueryData(xm(e.chainId,e.address,t),e)}function Tm(e,t){try{let n=Sm(e,t),r=localStorage.getItem(n);if(!r)return null;let i=JSON.parse(r);return Date.now()-i.timestamp>ym?(localStorage.removeItem(n),null):i.token}catch{return null}}function Em(e){try{let t=Sm(e.chainId,e.address),n={token:e,timestamp:Date.now()};localStorage.setItem(t,JSON.stringify(n)),Dm()}catch{}}function Dm(){let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(vm))try{let t=localStorage.getItem(n);if(t){let r=JSON.parse(t);e.push({key:n,timestamp:r.timestamp})}}catch{n&&localStorage.removeItem(n)}}if(e.length<=bm)return;e.sort((e,t)=>e.timestamp-t.timestamp);let t=e.length-bm;for(let n=0;n<t;n++)localStorage.removeItem(e[n].key)}function Om(e,t){Em(e),wm(e,t)}function km(){try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(vm)&&e.push(n)}for(let t of e)localStorage.removeItem(t)}catch{}}async function Am(e,t,n,r){let i=(r?.baseUrl??n)?.replace(/\/$/,``),a=Cm(e,t,i);if(a)return a;let o=Tm(e,t);if(o)return wm(o,i),o;let s=n=>({chainId:n.chainId??e,address:n.address??t,symbol:n.symbol,name:n.name,decimals:n.decimals,logoURI:n.logoURI,...Number.isFinite(Number(n.extensions?.price?.usd??``))?{priceUsd:Number(n.extensions?.price?.usd??``)}:{}}),c=n=>{let r=pm(t);return n.find(t=>Number(t.chainId)===e&&pm(t.address)===r)};if(r||n)try{let a=c((await(r??new Sr({baseUrl:n})).searchTokens(t,{chainIds:[e]})).data??[]);if(a){let e=s(a);return Om(e,i),e}throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Token not found for chain ${e}: ${t}`)}catch(e){if(e instanceof yr)throw e}return{chainId:e,address:t,decimals:void 0}}var jm=[{thresholdMs:1e4,intervalMs:1e3},{thresholdMs:3e4,intervalMs:2e3},{thresholdMs:6e4,intervalMs:3e3},{thresholdMs:12e4,intervalMs:5e3}],Mm=1e4;function Nm(e){let{orderStatus:t,dataUpdatedAt:n,now:r=Date.now()}=e;if(t&&Tr.includes(t))return!1;if(n===0)return jm[0].intervalMs;let i=r-n;for(let e of jm)if(i<e.thresholdMs)return e.intervalMs;return Mm}function Pm(e,t){return ts(()=>({queryKey:[`chains`,e()?.baseUrl??`__default__`],queryFn:async()=>{let t=e();if(!t)throw Error(`Missing client`);return t.getChains()},enabled:t()&&!!e(),staleTime:600*1e3}))}function Fm(e,t,n){return ts(()=>({queryKey:[`quote`,e()?.baseUrl??`__default__`,t()],queryFn:async({signal:n})=>{let r=e(),i=t();if(!r||!i)throw Error(`Missing client or request`);return r.getQuotes(i,n)},enabled:n()&&!!e()&&!!t(),staleTime:15e3,refetchOnWindowFocus:!1}))}function Im(e,t,n,r){return ts(()=>{let i=n(),a=t();return{queryKey:[`order`,e()?.baseUrl??`__default__`,a,i],queryFn:async()=>{let t=e();if(!t||!i||!a)throw Error(`Missing client, address, or orderId`);return t.getOrderById(a,i)},enabled:r()&&!!e()&&!!i&&!!a,staleTime:5e3,refetchInterval:e=>Nm({orderStatus:e.state.data?.status,dataUpdatedAt:e.state.dataUpdatedAt??0})}})}function Lm(e,t,n,r){return ts(()=>({queryKey:[`searchTokens`,e()?.baseUrl??`__default__`,t(),r?.()?.join(`,`)??`all`],queryFn:async()=>{let n=e(),i=t();if(!n||!i)throw Error(`Missing client or query`);let a=r?.();return n.searchTokens(i,a?.length?{chainIds:a}:void 0)},select:e=>e.data,enabled:n()&&!!e()&&!!t(),staleTime:30*1e3}))}function Rm(e,t,n){return ts(()=>({queryKey:[`topTokens`,e()?.baseUrl??`__default__`,n?.()?.join(`,`)??`all`],queryFn:async()=>{let t=e();if(!t)throw Error(`Missing client`);let r=n?.();return t.getTopTokens(r?.length?{chainIds:r}:void 0)},enabled:t()&&!!e(),staleTime:300*1e3}))}function zm(e,t){return ts(()=>({queryKey:[`fiatProviders`,e()?.baseUrl??`__default__`],queryFn:async()=>{let t=e();if(!t)throw Error(`Missing client`);return t.getProviders()},enabled:t()&&!!e(),staleTime:600*1e3}))}function Bm(e,t,n){return ts(()=>({queryKey:[`fiatQuote`,e()?.baseUrl??`__default__`,t()],queryFn:async({signal:n})=>{let r=e(),i=t();if(!r||!i)throw Error(`Missing client or request`);return r.getQuote(i,n)},enabled:n()&&!!e()&&!!t(),staleTime:3e4,refetchOnWindowFocus:!1}))}function Vm(e,t,n,r){return ts(()=>{let i=t(),a=r?.()??!1;return{queryKey:[`fiatStatus`,e()?.baseUrl??`__default__`,i],queryFn:async({signal:t})=>{let n=e();if(!n||!i)throw Error(`Missing client or orderId`);return n.getStatus(i,t,a)},enabled:n()&&!!e()&&!!i,staleTime:5e3,gcTime:0,refetchInterval:e=>{let t=e.state.data?.status;return t&&Er.has(t)?!1:3e3}}})}function Hm(e,t,n,r){return ts(()=>({queryKey:[`tokenBalances`,e()?.baseUrl??`__default__`,t(),r?.()?.join(`,`)??`all`],queryFn:async()=>{let n=e(),i=t();if(!n||!i)throw Error(`Missing client or address`);let a=Bu(i,`solana`),o=r?.()?.filter(a?Pu:Fu);return n.getTokenBalances(i,o?.length?{chainIds:o}:void 0)},enabled:n()&&!!e()&&!!t(),staleTime:30*1e3}))}function Um(e,t=500){let[n,r]=w(e),i=null;return oe(()=>{i!==null&&clearTimeout(i)}),[n,e=>{i!==null&&clearTimeout(i),i=setTimeout(()=>{r(()=>e),i=null},t)},e=>{i!==null&&(clearTimeout(i),i=null),r(()=>e)}]}var Wm=V(`<div><button data-testid=chain-filter-btn>All Chains`),Gm=V(`<div data-token-selector><div role=dialog part=token-selector data-testid=selector><div><div><span data-testid=selector-title></span><button data-testid=selector-close></button></div><div><span></span><input data-testid=selector-search-input></div></div><div></div><div>`),Km=V(`<div aria-hidden=true>`),qm=V(`<div>`),Jm=V(`<button data-testid=chain-filter-btn>`),Ym=V(`<div><div><div></div><div><div></div><div></div></div></div><div><div></div><div>`),Xm=V(`<button><svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><rect x=2 y=2 width=20 height=8 rx=2></rect><rect x=2 y=14 width=20 height=8 rx=2>`),Zm=V(`<div><div><svg width=28 height=28 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><circle cx=11 cy=11 r=8></circle><path d="m21 21-4.35-4.35"></path></svg></div><div></div><div>`),Qm=V(`<span>`),$m=V(`<div><div></div><div>`),eh=V(`<button data-testid=token-list-item><div><div><div></div></div><div><div><span></span></div><span>`),th=[`108px`,`80px`,`92px`,`84px`],nh=[0,1,2,3,4];function rh(e){let t=Gd(e);return t===`<0.01`?`<$0.01`:`$${t}`}function ih(e,t){let n=Number(e.chainId),r=Number.isFinite(n)?n:0,i=r>0?t?.get(r):void 0,a=typeof e.decimals==`number`&&e.decimals>=0?e.decimals:18,o=e.extensions?.balance,s=o!==void 0&&o!==`0`,c=o===void 0?null:s?Yc(Xc(Kc(o,a),2)):`0`,l=Number(e.extensions?.price?.usd??``),u=s?Number(Kc(o,a)):0,d=Number.isFinite(l)&&Number.isFinite(u)?u*l:0;return{symbol:e.symbol,name:e.name,chain:i?.name??(r>0?`Chain ${r}`:`Unknown Chain`),chainId:r,color:`#888`,balance:c,usd:c===null?``:rh(d),address:e.address,decimals:a,logoURI:e.logoURI,priceUsd:Number.isFinite(l)?l:void 0}}function ah(e){let{t}=Us(),n=()=>e.selectingFor===`from`,[r,i]=w(``),[a,o]=Um(``,300),[s,c]=w(`All Chains`),[l,u]=w(!1),d=Pm(()=>e.client??null,()=>!!e.client),f=Hm(()=>e.client??null,()=>e.walletAddress??null,()=>!!e.client&&!!e.walletAddress&&n(),()=>void 0),p=D(()=>{let t=d.data;if(!t)return[];if(n()){let e=f.data;if(!e?.length)return[];let n=new Set(e.map(e=>Number(e.chainId)));return t.filter(e=>n.has(e.id))}let r=e.supportedChainIds;if(r?.length){let e=new Set(r);return t.filter(t=>e.has(t.id))}return t}),m=D(()=>d.isPending&&!d.data),h=()=>e.client?.baseUrl,g=D(()=>{if(s()===`All Chains`)return e.supportedChainIds?.length?e.supportedChainIds:void 0;let t=p().find(e=>e.name===s());return t?[t.id]:void 0}),_=D(()=>g()??(e.supportedChainIds?.length?e.supportedChainIds:void 0)),v=Rm(()=>e.client??null,()=>!!e.client&&!n(),()=>g()),y=Hm(()=>e.client??null,()=>e.walletAddress??null,()=>!!e.client&&!!e.walletAddress,()=>g()),b=Lm(()=>e.client??null,()=>a().trim(),()=>!!e.client&&!n()&&!!a().trim(),()=>_()),x=D(()=>{let e=d.data;return e?_m(e):new Map}),S=D(()=>{let e=y.data;if(!e)return new Map;let t=new Map;for(let n of e)t.set(`${n.chainId}:${n.address.toLowerCase()}`,n);return t}),C=(e,t)=>{if(e.extensions?.balance!==void 0)return e;let n=t.get(`${e.chainId}:${e.address.toLowerCase()}`);return n?.extensions?.balance?{...e,extensions:{...e.extensions,balance:n.extensions.balance}}:e},ee=D(()=>{let e=x(),t=S(),n=v.data;return n?n.map(n=>ih(C(n,t),e)):[]}),E=D(()=>{let e=x(),t=y.data;return t?t.map(t=>ih(t,e)):[]}),te=D(()=>{let e=x(),t=S(),n=b.data;return n?n.map(n=>ih(C(n,t),e)):null}),ne=D(()=>{if(te()!==null)return te();if(e.allowedTokens&&e.tokens?.length)return e.tokens;let t=n()?E():ee();return t.length>0?t:e.tokens??[]}),re=D(()=>{let t=e.allowedTokens,n=e.tokenTags,i=ne().filter(e=>{if(t&&e.address&&!t.has(hm({chainId:e.chainId,address:e.address}))||s()!==`All Chains`&&e.chain!==s())return!1;if(!b.data&&r()){let t=r().toLowerCase();if(!e.symbol.toLowerCase().includes(t)&&!e.name.toLowerCase().includes(t))return!1}return!0});if(n&&Object.keys(n).length>0){let e=e=>!!e.address&&!!n[`eip155:${e.chainId}:${e.address.toLowerCase()}`];i.sort((t,n)=>(e(n)?1:0)-(e(t)?1:0))}return i}),O=D(()=>n()?(y.isPending||y.isFetching)&&!y.data:(v.isPending||v.isFetching)&&!v.data),ie=D(()=>b.isFetching&&!b.data),ae=D(()=>ie()||O()),oe=t=>{t.key===`Escape`&&e.onClose()},se=t=>{t.target===t.currentTarget&&e.onClose()},ce=t=>{t.address&&Om({chainId:t.chainId,address:t.address,symbol:t.symbol,name:t.name,decimals:t.decimals,logoURI:t.logoURI,priceUsd:t.priceUsd}),e.onSelect(t)};return(()=>{var n=Gm(),a=n.firstChild,d=a.firstChild,f=d.firstChild,g=f.firstChild,_=g.nextSibling,v=f.nextSibling,y=v.firstChild,b=y.nextSibling,x=d.nextSibling,S=x.nextSibling;return W(n,`click`,se),W(n,`keydown`,oe),G(g,(()=>{var n=B(()=>e.selectingFor===`from`);return()=>n()?t({id:`1t0r88u`,message:`Select payment token`}):t({id:`1ix1b7w`,message:`Select destination token`})})()),W(_,`click`,e.onClose),G(_,A(mc,{size:18})),G(y,A(vc,{size:14})),W(b,`blur`,()=>u(!1)),W(b,`focus`,()=>u(!0)),W(b,`input`,e=>{let t=e.target.value;i(t),o(t)}),G(d,A(j,{get when(){return!m()},get fallback(){return(()=>{var e=Km();return G(e,A(qe,{each:th,children:e=>(()=>{var t=qm();return Ur(t,`width`,e),T(()=>U(t,`${K.skeleton} ${Y.chainFilterSkeleton}`)),t})()})),T(()=>U(e,Y.chainFilter)),e})()},get children(){var e=Wm(),t=e.firstChild,n=t.firstChild;return W(t,`click`,()=>c(`All Chains`)),G(t,A(Vc,{size:14}),n),G(e,A(qe,{get each(){return p()},children:e=>(()=>{var t=Jm();return W(t,`click`,()=>c(e.name)),G(t,A(Vc,{size:14,get iconUrl(){return Ic(h(),e.id)}}),null),G(t,()=>e.name,null),T(()=>U(t,`${Y.chainFilterBtn} ${s()===e.name?Y.active:``}`)),t})()}),null),T(n=>{var r=Y.chainFilter,i=`${Y.chainFilterBtn} ${s()===`All Chains`?Y.active:``}`;return r!==n.e&&U(e,n.e=r),i!==n.t&&U(t,n.t=i),n},{e:void 0,t:void 0}),e}}),null),G(S,A(j,{get when(){return!ae()},get fallback(){return(()=>{var e=Km();return G(e,A(qe,{each:nh,children:()=>(()=>{var e=Ym(),t=e.firstChild,n=t.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,o=t.nextSibling,s=o.firstChild,c=s.nextSibling;return T(l=>{var u=Y.tokenListItemSkeleton,d=Y.tokenListSkeletonLeft,f=`${K.skeleton} ${Y.tokenListSkeletonIcon}`,p=Y.tokenListSkeletonInfo,m=`${K.skeleton} ${Y.tokenListSkeletonLine} ${Y.primary}`,h=`${K.skeleton} ${Y.tokenListSkeletonLine} ${Y.secondary}`,g=Y.tokenListSkeletonRight,_=`${K.skeleton} ${Y.tokenListSkeletonLine} ${Y.balance}`,v=`${K.skeleton} ${Y.tokenListSkeletonLine} ${Y.usd}`;return u!==l.e&&U(e,l.e=u),d!==l.t&&U(t,l.t=d),f!==l.a&&U(n,l.a=f),p!==l.o&&U(r,l.o=p),m!==l.i&&U(i,l.i=m),h!==l.n&&U(a,l.n=h),g!==l.s&&U(o,l.s=g),_!==l.h&&U(s,l.h=_),v!==l.r&&U(c,l.r=v),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),e})()})),T(()=>U(e,Y.tokenListSkeleton)),e})()},get children(){return A(qe,{get each(){return re()},get fallback(){return(()=>{var e=Zm(),n=e.firstChild,r=n.nextSibling,i=r.nextSibling;return G(r,()=>t({id:`19is1h8`,message:`No tokens found`})),G(i,()=>t({id:`13x5i2v`,message:`Try selecting a different chain or search for a specific token`})),G(e,A(j,{get when(){return s()!==`All Chains`},get children(){var e=Xm();return e.firstChild,W(e,`click`,()=>c(`All Chains`)),G(e,()=>t({id:`1qbiehv`,message:`View All Chains`}),null),T(()=>U(e,Y.emptyStateBtn)),e}}),null),T(t=>{var a=Y.emptyState,o=Y.emptyStateIcon,s=Y.emptyStateTitle,c=Y.emptyStateDesc;return a!==t.e&&U(e,t.e=a),o!==t.t&&U(n,t.t=o),s!==t.a&&U(r,t.a=s),c!==t.o&&U(i,t.o=c),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()},children:t=>{let n=()=>t.balance!==null,r=()=>t.balance!==null&&t.balance!==`0`,i=()=>null,a=()=>{let n=e.tokenTags;if(!(!n||!t.address))return n[`eip155:${t.chainId}:${t.address.toLowerCase()}`]};return(()=>{var e=eh(),o=e.firstChild,s=o.firstChild,c=s.firstChild,l=s.nextSibling,u=l.firstChild,d=u.firstChild,f=u.nextSibling;return W(e,`click`,()=>ce(t)),G(s,A(Bc,{get symbol(){return t.symbol},get color(){return t.color},size:36,get logoURI(){return t.logoURI}}),c),G(c,A(Vc,{get color(){return i()},size:11,get iconUrl(){return B(()=>t.chainId>0)()?Ic(h(),t.chainId):void 0}})),G(d,()=>t.symbol),G(u,A(j,{get when(){return a()},get children(){var e=Qm();return G(e,a),T(()=>U(e,Y.tokenTag)),e}}),null),G(f,()=>t.chain),G(e,A(j,{get when(){return n()},get children(){var e=$m(),n=e.firstChild,i=n.nextSibling;return G(n,()=>t.balance),G(i,()=>t.usd),T(t=>{var a=Y.tokenListRight,o=`${Y.balance} ${r()?``:Y.zero}`,s=Y.usd;return a!==t.e&&U(e,t.e=a),o!==t.t&&U(n,t.t=o),s!==t.a&&U(i,t.a=s),t},{e:void 0,t:void 0,a:void 0}),e}}),null),T(t=>{var n=Y.tokenListItem,r=Y.tokenListLeft,i=Y.tokenListIconWrap,a=Y.chainIndicator,p=Y.tokenListInfo,m=Y.symbolRow,h=Y.symbol,g=Y.name;return n!==t.e&&U(e,t.e=n),r!==t.t&&U(o,t.t=r),i!==t.a&&U(s,t.a=i),a!==t.o&&U(c,t.o=a),p!==t.i&&U(l,t.i=p),m!==t.n&&U(u,t.n=m),h!==t.s&&U(d,t.s=h),g!==t.h&&U(f,t.h=g),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),e})()}})}})),T(r=>{var i=`${Y.overlay}${e.dismissing?` ${Y.overlayDismissing}`:``}`,o=`${Y.selector}${e.noBorder?` ${Y.selectorNoBorder}`:``}${e.dismissing?` ${Y.selectorDismissing}`:``}`,s=e.selectingFor===`from`?t({id:`1t0r88u`,message:`Select payment token`}):t({id:`1ix1b7w`,message:`Select destination token`}),c=Y.header,u=Y.titleRow,p=Y.title,m=Y.close,h=t({id:`1l0xxoj`,message:`Close`}),C=`${Y.search} ${l()?Y.focused:``}`,w=Y.searchIcon,ee=Y.searchInput,T=t({id:`dizog6`,message:`Search by name or address`}),E=Y.divider,D=Y.tokenList;return i!==r.e&&U(n,r.e=i),o!==r.t&&U(a,r.t=o),s!==r.a&&H(a,`aria-label`,r.a=s),c!==r.o&&U(d,r.o=c),u!==r.i&&U(f,r.i=u),p!==r.n&&U(g,r.n=p),m!==r.s&&U(_,r.s=m),h!==r.h&&H(_,`aria-label`,r.h=h),C!==r.r&&U(v,r.r=C),w!==r.d&&U(y,r.d=w),ee!==r.l&&U(b,r.l=ee),T!==r.u&&H(b,`placeholder`,r.u=T),E!==r.c&&U(x,r.c=E),D!==r.w&&U(S,r.w=D),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0,w:void 0}),T(()=>b.value=r()),n})()}var oh=`tf-bdf976`,sh=`tf-0d4452`,ch=`tf-7e8f39`,lh=`tf-7b9980`,uh=`tf-6a97ad`,dh=`tf-c939b4`,fh=`tf-1e672b`,ph=`tf-63111f`,mh=`tf-5c9e1e`,hh=`tf-cabaa6`,gh=`tf-efb45d`,_h={dropdown:oh,"tf-slide-up":`tf-c88647`,searchWrap:sh,searchInput:ch,listWrap:lh,option:uh,optionActive:dh,optionFlag:fh,optionCode:ph,optionName:mh,optionCheck:hh,noResults:gh},vh=`tf-dc5721`,yh=`tf-68123c`,bh=`tf-532d07`,xh=`tf-b7936a`,Sh=`tf-883305`,Ch=`tf-bc1b05`,wh=`tf-98d625`,Th=`tf-dd09ea`,Eh=`tf-018710`,Dh=`tf-21456c`,Oh=`tf-6da3db`,kh=`tf-d25568`,Ah=`tf-11bb1d`,jh=`tf-677ece`,Mh=`tf-635915`,Nh=`tf-b8a04a`,Ph=`tf-0d1ef8`,Fh=`tf-d04a4e`,Ih=`tf-d7140f`,Lh=`tf-dcd620`,Rh=`tf-038cf1`,zh=`tf-33c9cb`,Bh=`tf-b1e4a6`,Vh=`tf-d168ae`,Hh=`tf-b2b098`,Uh=`tf-92acfd`,Wh=`tf-5f8805`,Gh=`tf-af41ab`,Kh=`tf-18c3f4`,qh=`tf-85dacd`,Jh=`tf-8a93b8`,Yh=`tf-ae3eb4`,Xh=`tf-93effc`,Zh=`tf-a04b23`,Qh=`tf-57762e`,$h=`tf-e71ca8`,eg=`tf-553778`,tg=`tf-35d309`,ng=`tf-936478`,rg=`tf-e1d634`,ig=`tf-8ad819`,ag=`tf-5be26a`,X={header:vh,headerLeft:yh,headerLogoImage:bh,"headerLogoImage--solo":`tf-aede09`,headerTitle:xh,"headerTitle--hidden":`tf-30630d`,headerTitleAccent:Sh,breadcrumb:Ch,panelWrapper:wh,breadcrumbLink:Th,breadcrumbSep:Eh,breadcrumbCurrent:Dh,headerRight:Oh,walletDot:kh,"walletDot--success":`tf-16ce7d`,walletAddress:Ah,"panelWrapper--to":`tf-8b7743`,"panelWrapper--noArrow":`tf-fdf8be`,panel:jh,panelHeader:Mh,panelHeaderRight:Nh,panelLabel:Ph,panelBalance:Fh,panelRow:Ih,tokenBtn:Lh,"tokenBtn--locked":`tf-6859a9`,"tokenBtn--select":`tf-e25a5c`,tokenName:Rh,tokenNameAccent:zh,caret:Bh,panelFooter:Vh,panelFiatRow:Hh,fiat:Uh,"fiat--hidden":`tf-bd2f5c`,maxBtn:Wh,swapArrow:Gh,swapArrowInner:Kh,"swapArrowInner--disabled":`tf-194ce7`,mergedPanel:qh,mergedSection:Jh,panelDivider:Yh,swapArrowCircle:Xh,"swapArrowCircle--disabled":`tf-cede4f`,tokenIconWrap:Zh,tokenChainDot:Qh,noRoutesCard:$h,idleCardInline:eg,recipientGateCard:tg,payWithLabel:ng,methodButtonDisabled:rg,methodButtonIconExchange:ig,comingSoonPill:ag,"tf-fade-in":`tf-07c947`},og=V(`<button type=button data-testid=currency-selector-btn><span style=font-size:16px;line-height:1></span><span></span><span>`),sg=V(`<div>No currencies found`),cg=V(`<div data-testid=currency-dropdown><div><input type=text placeholder=Search...></div><div>`),lg=V(`<div style=position:relative;margin-left:auto>`),ug=V(`<div style=cursor:default;opacity:0.6><span style=font-size:16px;line-height:1></span><span>`),dg=V(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=3 stroke-linecap=round stroke-linejoin=round><path d="M20 6L9 17l-5-5">`),fg=V(`<button type=button><span></span><span></span><span>`);function pg(e){let[t,n]=w(!1),[r,i]=w(``),a,o,s=D(()=>{let t=r().toLowerCase();return t?[...e.currencies].filter(n=>{let r=Ff(n,e.locale).toLowerCase();return n.toLowerCase().includes(t)||r.includes(t)}):[...e.currencies]});return E(()=>{if(!t())return;let e=e=>{a&&!a.contains(e.target)&&(n(!1),i(``))},r=a?.getRootNode()??document,o=setTimeout(()=>r.addEventListener(`click`,e,!0),0);oe(()=>{clearTimeout(o),r.removeEventListener(`click`,e,!0)})}),E(()=>{t()&&o&&setTimeout(()=>o.focus(),50)}),(()=>{var c=lg(),l=a;return typeof l==`function`?Gr(l,c):a=c,G(c,A(j,{get when(){return!e.locked},get fallback(){return(()=>{var t=ug(),n=t.firstChild,r=n.nextSibling;return G(n,()=>Pf(e.selected)),G(r,()=>e.selected),T(e=>{var n=X.tokenBtn,i=X.tokenName;return n!==e.e&&U(t,e.e=n),i!==e.t&&U(r,e.t=i),e},{e:void 0,t:void 0}),t})()},get children(){var r=og(),i=r.firstChild,a=i.nextSibling,o=a.nextSibling;return W(r,`click`,()=>n(!t())),G(i,()=>Pf(e.selected)),G(a,()=>e.selected),G(o,A(nc,{size:14})),T(e=>{var t=X.tokenBtn,n=X.tokenName,i=X.caret;return t!==e.e&&U(r,e.e=t),n!==e.t&&U(a,e.t=n),i!==e.a&&U(o,e.a=i),e},{e:void 0,t:void 0,a:void 0}),r}}),null),G(c,A(j,{get when(){return B(()=>!!t())()&&!e.locked},get children(){var t=cg(),a=t.firstChild,c=a.firstChild,l=a.nextSibling;W(c,`keydown`,e=>{e.key===`Escape`&&(n(!1),i(``))}),W(c,`input`,e=>i(e.target.value));var u=o;return typeof u==`function`?Gr(u,c):o=c,G(l,A(qe,{get each(){return s()},children:t=>(()=>{var r=fg(),a=r.firstChild,o=a.nextSibling,s=o.nextSibling;return W(r,`click`,()=>{e.onSelect(t),n(!1),i(``)}),G(a,()=>Pf(t)),G(o,t),G(s,()=>Ff(t,e.locale)),G(r,A(j,{get when(){return t===e.selected},get children(){var e=dg();return T(()=>H(e,`class`,_h.optionCheck)),e}}),null),T(n=>{var i=`${_h.option} ${t===e.selected?_h.optionActive:``}`,c=_h.optionFlag,l=_h.optionCode,u=_h.optionName;return i!==n.e&&U(r,n.e=i),c!==n.t&&U(a,n.t=c),l!==n.a&&U(o,n.a=l),u!==n.o&&U(s,n.o=u),n},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}),null),G(l,A(j,{get when(){return s().length===0},get children(){var e=sg();return T(()=>U(e,_h.noResults)),e}}),null),T(e=>{var n=_h.dropdown,r=_h.searchWrap,i=_h.searchInput,o=_h.listWrap;return n!==e.e&&U(t,e.e=n),r!==e.t&&U(a,e.t=r),i!==e.a&&U(c,e.a=i),o!==e.o&&U(l,e.o=o),e},{e:void 0,t:void 0,a:void 0,o:void 0}),T(()=>c.value=r()),t}}),null),T(e=>Ur(c,`z-index`,t()?`100`:void 0)),c})()}var mg=`tf-636daf`,hg=`tf-75c7ef`,gg=`tf-fddfab`,_g=`tf-970eb9`,vg=`tf-de123a`,yg=`tf-0445e3`,bg=`tf-9a65ec`,xg=`tf-c5ea21`,Sg=`tf-9d4bba`,Cg=`tf-cb9b60`,wg=`tf-2cba65`,Tg={editor:mg,"tf-recipient-slide":`tf-6933ac`,editorDismissing:hg,"tf-recipient-slide-out":`tf-cc2d20`,header:gg,title:_g,close:vg,body:yg,textarea:bg,textareaError:xg,error:Sg,footer:Cg,confirm:wg},Eg=V(`<div data-testid=recipient-editor><div><span></span><button aria-label=Close data-testid=recipient-editor-close></button></div><div><textarea rows=3 autocomplete=off data-testid=recipient-editor-input></textarea></div><div><button data-testid=recipient-editor-confirm>`),Dg=V(`<span data-testid=recipient-editor-error>`);function Og(e){let{t}=Us(),[n,r]=w(e.initialValue),i=D(()=>{let t=n().trim();return t?Bu(t,e.chainType):!1}),a=D(()=>{let t=n().trim();return t.length>0&&!Bu(t,e.chainType)}),o=()=>{let t=n().trim();t&&i()&&e.onConfirm(t)};return(()=>{var s=Eg(),c=s.firstChild,l=c.firstChild,u=l.nextSibling,d=c.nextSibling,f=d.firstChild,p=d.nextSibling,m=p.firstChild;return G(l,()=>t({id:`18cmny0`,message:`Recipient Address`})),W(u,`click`,()=>e.onClose()),G(u,A(mc,{size:18})),W(f,`keydown`,e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),o())}),W(f,`input`,e=>r(e.target.value)),H(f,`spellcheck`,!1),G(d,(()=>{var e=B(()=>!!a());return()=>e()&&(()=>{var e=Dg();return G(e,()=>t({id:`fo0vw0`,message:`Invalid address for this chain`})),T(()=>U(e,Tg.error)),e})()})(),null),W(m,`click`,o),G(m,()=>t({id:`18tbqwf`,message:`Confirm`})),T(n=>{var r=`${Tg.editor}${e.dismissing?` ${Tg.editorDismissing}`:``}`,o=Tg.header,h=Tg.title,g=Tg.close,_=Tg.body,v=`${Tg.textarea} ${a()?Tg.textareaError:``}`,y=t({id:`fpand1`,message:`Enter destination address`}),b=Tg.footer,x=`${Tu.btnPrimary} ${Tg.confirm}`,S=!i();return r!==n.e&&U(s,n.e=r),o!==n.t&&U(c,n.t=o),h!==n.a&&U(l,n.a=h),g!==n.o&&U(u,n.o=g),_!==n.i&&U(d,n.i=_),v!==n.n&&U(f,n.n=v),y!==n.s&&H(f,`placeholder`,n.s=y),b!==n.h&&U(p,n.h=b),x!==n.r&&U(m,n.r=x),S!==n.d&&(m.disabled=n.d=S),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),T(()=>f.value=n()),s})()}var kg=250;function Ag(){let[e,t]=w(!1),[n,r]=w(!1),i,a=D(()=>e()||n());return oe(()=>{i&&clearTimeout(i)}),{open:e,dismissing:n,mounted:a,show:()=>{i&&(clearTimeout(i),i=void 0),r(!1),t(!0)},hide:()=>{e()&&(t(!1),r(!0),i=setTimeout(()=>{r(!1),i=void 0},kg))}}}var jg=`tf-062e26`,Mg=`tf-8f452a`,Ng=`tf-1a6365`,Pg=`tf-991c0d`,Fg=`tf-a9a7d7`,Ig=`tf-dc8a7b`,Lg=`tf-4bb83d`,Rg=`tf-19de08`,zg=`tf-2ee659`,Bg=`tf-cbd017`,Vg=`tf-36561c`,Hg=`tf-f78710`,Ug=`tf-b584f9`,Wg=`tf-d8fd5c`,Gg=`tf-96a148`,Kg=`tf-4337e5`,qg=`tf-1bf9bf`,Jg=`tf-2e8f34`,Yg=`tf-2fa202`,Xg=`tf-45bc49`,Zg=`tf-fdf611`,Qg=`tf-0e3026`,$g=`tf-fb4397`,e_=`tf-2db646`,t_=`tf-c78adb`,n_=`tf-b84c90`,r_=`tf-bb0779`,i_=`tf-306e03`,a_=`tf-5602d3`,o_=`tf-78593f`,s_=`tf-5527d4`,c_=`tf-0e800e`,l_=`tf-ade349`,u_=`tf-ba22f3`,d_=`tf-64436e`,f_=`tf-df7635`,p_=`tf-aae089`,m_=`tf-b211ea`,h_=`tf-e99a74`,g_=`tf-839279`,__=`tf-b68773`,v_=`tf-845c61`,y_=`tf-a514cb`,b_=`tf-35e95b`,x_=`tf-57fdcd`,S_=`tf-e10cfb`,C_=`tf-4386a3`,w_=`tf-96a3b0`,T_=`tf-539af2`,E_=`tf-002628`,D_=`tf-8ddccf`,O_=`tf-0ebcc2`,k_=`tf-c6db08`,A_=`tf-4f9afa`,j_=`tf-3e82ef`,M_=`tf-2f01a5`,N_=`tf-a108b2`,Z={fiatAmountWrap:jg,fiatCurrencyPrefix:Mg,fiatAmountInput:Ng,fiatCurrencyBtn:Pg,fiatCurrencyBtnLocked:Fg,fiatCurrencyBtnLabel:Ig,fiatCurrencyOverlay:Lg,fiatCryptoDisplay:Rg,fiatCryptoDisplayEmpty:zg,fiatLimitsText:Bg,fiatLimitsError:Vg,quoteCardSlot:Hg,quoteCardSlotCard:Ug,"tf-slide-up":`tf-7df115`,quoteCard:Wg,quoteCardHeader:Gg,quoteCardTitle:Kg,bestRateBadge:qg,quoteProvider:Jg,quoteAmountRow:Yg,quoteCryptoAmount:Xg,quoteFiatEquiv:Zg,quoteFeeRow:Qg,jumpFlowSlot:$g,jumpFlow:e_,jumpFlowDesc:t_,jumpHelpIcon:n_,jumpTooltip:r_,"tf-fade-in":`tf-4bb2f7`,jumpSteps:i_,jumpStep:a_,jumpStepIcon:o_,jumpCurrencyBadge:s_,jumpWalletBadge:c_,jumpStepLabel:l_,jumpArrow:u_,providerToggle:d_,providerToggleBtn:f_,providerAvatars:p_,providerAvatar:m_,providerList:h_,providerCard:g_,providerCardActive:__,strategyBadge:v_,strategyDirect:y_,strategyJump:b_,providerRow:x_,providerIcon:S_,errorSlot:C_,errorArea:w_,errorText:T_,errorCardArea:E_,errorCardIcon:D_,errorCardTitle:O_,errorCardMsg:k_,retryBtn:A_,ctaWrapper:j_,skeletonLine:M_,pulse:N_},P_=V(`<div style=margin-bottom:0><span style=margin:0;width:100px>\xA0</span><span style=width:65px>\xA0`),F_=V(`<div>`),I_=V(`<div style=display:flex;justify-content:space-between;align-items:center;margin-top:10px><span style=width:50px;font-size:var(--tf-font-sm);display:inline-block;border-radius:4px>\xA0</span><span style=width:80px;font-size:var(--tf-font-lg);display:inline-block;border-radius:4px>\xA0`),L_=V(`<div style=display:flex;justify-content:space-between;align-items:center;margin-top:10px><span style=width:60px;font-size:var(--tf-font-sm);display:inline-block;border-radius:4px>\xA0</span><span style=width:40px;font-size:var(--tf-font-sm);display:inline-block;border-radius:4px>\xA0`),R_=V(`<div style=display:flex;flex-direction:column;gap:8px;align-items:center;margin-top:10px><span style=width:120px;font-size:var(--tf-font-sm);display:inline-block;border-radius:4px>\xA0</span><div><div><div><div style=width:28px;height:28px;border-radius:50%></div></div><span style=width:20px;font-size:10px;display:inline-block;border-radius:4px>\xA0</span></div><div style=opacity:0.3></div><div><div><div style=width:28px;height:28px;border-radius:50%></div></div><span style=width:24px;font-size:10px;display:inline-block;border-radius:4px>\xA0`),z_=V(`<div style=flex:1><div><svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><rect x=2 y=5 width=20 height=14 rx=2></rect><path d="M2 10h20"></path></svg></div><span></span><span>`),B_=V(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px><div style=color:var(--tf-error);flex-shrink:0;opacity:0.8></div><div style=font-size:var(--tf-font-lg);font-weight:600;color:var(--tf-error)></div><div style=font-size:var(--tf-font-sm);color:var(--tf-text-secondary);line-height:1.5;max-width:280px;text-align:center>`),V_=V(`<div style=display:flex;flex-direction:column><div style=display:flex;flex-direction:column;flex:1>`),H_=V(`<img width=18 height=18>`),U_=V(`<span>`),W_=V(`<div style=margin-bottom:0><span style=margin:0></span><div style=display:flex;align-items:center;gap:8px>`),G_=V(`<div style=display:flex;justify-content:space-between;align-items:center;margin-top:10px><span style=font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)></span><span style=font-size:var(--tf-font-lg);font-weight:600;color:var(--tf-text)> <span style=font-size:var(--tf-font-sm);font-weight:500;color:var(--tf-text-tertiary)>`),K_=V(`<div style=display:flex;justify-content:space-between;align-items:center;margin-top:10px><span style=font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)></span><span style=font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)>`),q_=V(`<div><div></div><div> `),J_=V(`<div><div></div><div>`),Y_=V(`<div style=display:flex;flex-direction:column;gap:8px;align-items:center;margin-top:10px><span style=font-size:var(--tf-font-sm);color:var(--tf-text-secondary);font-weight:500;display:inline-flex;align-items:center;gap:4px;position:relative></span><div><div><div><div></div></div><div></div></div><div></div><div><div><div></div></div><div>`);function X_(e){let{t}=Us(),n=e.fiatCheckout,r=D(()=>Nf(e.fiatCurrency)||e.fiatCurrency),[i,a]=w(!1),o=D(()=>{let e=n.quote();return e?.fiatAmount?Yc(parseFloat(String(e.fiatAmount)).toFixed(2)):null}),s=D(()=>{let t=n.quote()?.providerIcon;return!t||!t.startsWith(`/`)||t.startsWith(`//`)?null:`${e.apiBase}${t}`}),c=D(()=>{let e=n.quote();return e?t({id:`ofi1rq`,message:`Routed through {token} for the best rate`},{token:e.intermediateToken?.symbol??`USDC`}):``});return(()=>{var l=V_(),u=l.firstChild;return G(u,A(Ye,{get children(){return[A(M,{get when(){return B(()=>!e.hideStates)()&&n.phase()===`quoting`},get children(){return[(()=>{var e=P_(),t=e.firstChild,n=t.nextSibling;return T(r=>{var i=`${Z.quoteCardHeader} ${K.fadeIn}`,a=`${Z.quoteProvider} ${Z.skeletonLine}`,o=`${Z.bestRateBadge} ${Z.skeletonLine}`;return i!==r.e&&U(e,r.e=i),a!==r.t&&U(t,r.t=a),o!==r.a&&U(n,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e})(),(()=>{var e=F_();return T(()=>U(e,K.dividerLine)),e})(),A(j,{get when(){return e.showPayAmount!==!1},get children(){var e=I_(),t=e.firstChild,n=t.nextSibling;return T(e=>{var r=`${K.skeleton}`,i=`${K.skeleton}`;return r!==e.e&&U(t,e.e=r),i!==e.t&&U(n,e.t=i),e},{e:void 0,t:void 0}),e}}),(()=>{var e=L_(),t=e.firstChild,n=t.nextSibling;return T(e=>{var r=`${K.skeleton}`,i=`${K.skeleton}`;return r!==e.e&&U(t,e.e=r),i!==e.t&&U(n,e.t=i),e},{e:void 0,t:void 0}),e})(),(()=>{var e=F_();return T(()=>U(e,K.dividerLine)),e})(),(()=>{var e=R_(),t=e.firstChild,n=t.nextSibling,r=n.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling,s=r.nextSibling,c=s.nextSibling,l=c.firstChild,u=l.firstChild,d=l.nextSibling;return G(s,A(oc,{size:14})),T(e=>{var f=`${K.skeleton}`,p=Z.jumpSteps,m=Z.jumpStep,h=Z.jumpStepIcon,g=`${K.skeleton}`,_=`${K.skeleton}`,v=Z.jumpArrow,y=Z.jumpStep,b=Z.jumpStepIcon,x=`${K.skeleton}`,S=`${K.skeleton}`;return f!==e.e&&U(t,e.e=f),p!==e.t&&U(n,e.t=p),m!==e.a&&U(r,e.a=m),h!==e.o&&U(i,e.o=h),g!==e.i&&U(a,e.i=g),_!==e.n&&U(o,e.n=_),v!==e.s&&U(s,e.s=v),y!==e.h&&U(c,e.h=y),b!==e.r&&U(l,e.r=b),x!==e.d&&U(u,e.d=x),S!==e.l&&U(d,e.l=S),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),e})()]}}),A(M,{get when(){return B(()=>n.phase()!==`quoting`)()?n.quote():null},children:l=>[(()=>{var r=W_(),i=r.firstChild,a=i.nextSibling;return G(i,A(j,{get when(){return s()},get children(){var e=H_();return T(t=>{var n=s(),r=l().provider,i=K.providerIconInline;return n!==t.e&&H(e,`src`,t.e=n),r!==t.t&&H(e,`alt`,t.t=r),i!==t.a&&U(e,t.a=i),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(i,()=>l().providerName??Ud(l().provider),null),G(a,A(j,{get when(){return l()===n.allQuotes()[0]},get children(){var e=U_();return G(e,()=>t({id:`r7v9s7`,message:`BEST RATE`})),T(()=>U(e,Z.bestRateBadge)),e}}),null),G(a,A(j,{get when(){return!e.hideCountdown},get children(){return A(pu,{get secondsRemaining(){return e.fiatCountdown.countdownSeconds},totalSeconds:30,onRefresh:()=>{n.refetchQuote(),e.fiatCountdown.resetCountdown()},get isRefreshing(){return n.isQuoteFetching}})}}),null),T(e=>{var t=`${Z.quoteCardHeader} ${K.fadeIn}`,n=Z.quoteProvider;return t!==e.e&&U(r,e.e=t),n!==e.t&&U(i,e.t=n),e},{e:void 0,t:void 0}),r})(),(()=>{var e=F_();return T(()=>U(e,K.dividerLine)),e})(),A(j,{get when(){return e.showPayAmount!==!1},get children(){var n=G_(),i=n.firstChild,a=i.nextSibling,s=a.firstChild,c=s.nextSibling;return G(i,()=>Ws(`youPay`,t({id:`17kq51m`,message:`You pay`}))),G(a,r,s),G(a,()=>o()??`—`,s),G(c,()=>e.fiatCurrency),n}}),(()=>{var e=K_(),n=e.firstChild,i=n.nextSibling;return G(n,()=>t({id:`1viukn9`,message:`Total fee`})),G(i,r,null),G(i,()=>parseFloat(String(l().totalFee)).toFixed(2),null),e})(),(()=>{var e=F_();return T(()=>U(e,K.dividerLine)),e})(),(()=>{var n=Y_(),o=n.firstChild,s=o.nextSibling,u=s.firstChild,d=u.firstChild,f=d.firstChild,p=d.nextSibling,m=u.nextSibling,h=m.nextSibling,g=h.firstChild,_=g.firstChild,v=g.nextSibling;return G(o,A(j,{get when(){return l().swapStrategy===`jump`},get fallback(){return t({id:`jnzipx`,message:`Buy {arg0} directly`},{arg0:e.targetToken?.symbol??``})},get children(){return[B(()=>c()),(()=>{var e=U_();return W(e,`click`,()=>a(e=>!e)),W(e,`mouseleave`,()=>a(!1)),W(e,`mouseenter`,()=>a(!0)),G(e,A(Ec,{size:13})),T(()=>U(e,Z.jumpHelpIcon)),e})(),A(j,{get when(){return i()},get children(){var e=F_();return G(e,()=>t({id:`ifug2i`,message:`This token is not directly available for card purchase. We buy USDC first, then swap it to your desired token automatically.`})),T(()=>U(e,Z.jumpTooltip)),e}})]}})),G(f,r),G(p,()=>t({id:`1i7coq1`,message:`Pay`})),G(s,A(j,{get when(){return l().swapStrategy===`jump`},get children(){return[(()=>{var e=F_();return G(e,A(oc,{size:14})),T(()=>U(e,Z.jumpArrow)),e})(),(()=>{var n=q_(),r=n.firstChild,i=r.nextSibling,a=i.firstChild;return G(r,A(Bc,{get symbol(){return l().intermediateToken?.symbol??`USDC`},color:`#2775CA`,size:28,get logoURI(){return l().intermediateToken?.logoURI}}),null),G(r,A(j,{get when(){return l().intermediateToken?.chainId},get children(){var t=F_();return G(t,A(Vc,{size:10,get iconUrl(){return Ic(e.apiBase,l().intermediateToken.chainId)}})),T(()=>U(t,X.tokenChainDot)),t}}),null),G(i,()=>t({id:`1ka8utn`,message:`Buy`}),a),G(i,()=>l().intermediateToken?.symbol??`USDC`,null),T(e=>{var t=Z.jumpStep,a=Z.jumpStepIcon,o=Z.jumpStepLabel;return t!==e.e&&U(n,e.e=t),a!==e.t&&U(r,e.t=a),o!==e.a&&U(i,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n})(),(()=>{var e=F_();return G(e,A(oc,{size:14})),T(()=>U(e,Z.jumpArrow)),e})(),(()=>{var n=J_(),r=n.firstChild,i=r.nextSibling;return G(r,A(Bc,{get symbol(){return e.targetToken?.symbol??`?`},color:`#0052FF`,size:28,get logoURI(){return e.targetToken?.logoURI}}),null),G(r,A(j,{get when(){return e.targetToken},get children(){var t=F_();return G(t,A(Vc,{size:10,get iconUrl(){return Ic(e.apiBase,e.targetToken.chainId)}})),T(()=>U(t,X.tokenChainDot)),t}}),null),G(i,()=>t({id:`1rkfalq`,message:`Swap`})),T(e=>{var t=Z.jumpStep,a=Z.jumpStepIcon,o=Z.jumpStepLabel;return t!==e.e&&U(n,e.e=t),a!==e.t&&U(r,e.t=a),o!==e.a&&U(i,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n})()]}}),m),G(m,A(oc,{size:14})),G(_,A(Sc,{size:14})),G(v,()=>t({id:`cwk7r6`,message:`Receive`})),T(e=>{var t=Z.jumpSteps,n=Z.jumpStep,r=Z.jumpStepIcon,i=Z.jumpCurrencyBadge,a=Z.jumpStepLabel,o=Z.jumpArrow,c=Z.jumpStep,l=Z.jumpStepIcon,y=Z.jumpWalletBadge,b=Z.jumpStepLabel;return t!==e.e&&U(s,e.e=t),n!==e.t&&U(u,e.t=n),r!==e.a&&U(d,e.a=r),i!==e.o&&U(f,e.o=i),a!==e.i&&U(p,e.i=a),o!==e.n&&U(m,e.n=o),c!==e.s&&U(h,e.s=c),l!==e.h&&U(g,e.h=l),y!==e.r&&U(_,e.r=y),b!==e.d&&U(v,e.d=b),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),n})()]}),A(M,{get when(){return B(()=>!e.hideStates&&n.phase()===`idle`)()&&!n.quote()},get children(){var n=z_(),r=n.firstChild,i=r.nextSibling,a=i.nextSibling;return G(i,()=>e.idleTitle??t({id:`1olegnl`,message:`Enter amount to get started`})),G(a,()=>e.idleSub??t({id:`6c0jc7`,message:`Pay with credit or debit card`})),T(e=>{var t=`${K.idleCard} ${K.fadeIn}`,o=K.idleIcon,s=K.idleTitle,c=K.idleSub;return t!==e.e&&U(n,e.e=t),o!==e.t&&U(r,e.t=o),s!==e.a&&U(i,e.a=s),c!==e.o&&U(a,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}}),A(M,{get when(){return B(()=>!e.hideStates&&n.phase()===`error`)()&&n.error()},get children(){var e=B_(),r=e.firstChild,i=r.nextSibling,a=i.nextSibling;return G(r,A(Oc,{size:32})),G(i,()=>t({id:`jf8ts4`,message:`Quote Failed`})),G(a,()=>n.error()),T(()=>U(e,K.fadeIn)),e}})]}})),T(t=>{var n=e.margin??`10px 20px 0`,r=e.height??`auto`,i=e.showPayAmount?`206px`:`177px`,a=Z.quoteCardSlotCard;return n!==t.e&&Ur(l,`margin`,t.e=n),r!==t.t&&Ur(l,`height`,t.t=r),i!==t.a&&Ur(l,`min-height`,t.a=i),a!==t.o&&U(u,t.o=a),t},{e:void 0,t:void 0,a:void 0,o:void 0}),l})()}function Z_(e,t,n,r,i){return e||(t?`error`:n&&r===0&&i?`quoting`:r>0?`quoted`:`idle`)}function Q_(e,t,n,r){return e||(t?`error`:n&&r===0?`quoting`:r>0?`quoted`:`idle`)}function $_(){let[e,t]=w(null),[n,r]=w(null),[i,a]=w(``),[o,s]=w(null),[c,l]=w(null),[u,d]=w(null),[f,p]=w(null),[m,h]=w(null),[g,_]=w(null);function v(e){c()!==e&&l(e)}function y(e){o()!==e&&s(e)}function b(){re(()=>{h(null),_(null)})}function x(){re(()=>{a(``),p(null),d(null),h(null),_(null)})}return{fromToken:e,toToken:n,inputAmount:i,recipient:o,walletAddress:c,execPhase:u,order:f,error:m,errorCode:g,setFromToken:t,setToToken:r,setInputAmount:a,setRecipient:y,setWalletAddress:v,setExecPhase:d,setOrder:p,setError:h,setErrorCode:_,clearError:b,reset:x}}function ev(){let[e,t]=w(null),[n,r]=w(``),[i,a]=w(null),[o,s]=w(null),[c,l]=w(null),[u,d]=w(null),[f,p]=w(null),[m,h]=w(null),[g,_]=w(null);function v(e){c()!==e&&l(e)}function y(e){o()!==e&&s(e)}function b(){re(()=>{h(null),_(null)})}function x(){re(()=>{a(null),p(null),d(null),h(null),_(null)})}return{targetToken:e,targetAmount:n,fromToken:i,recipient:o,walletAddress:c,execPhase:u,order:f,error:m,errorCode:g,setTargetToken:t,setTargetAmount:r,setFromToken:a,setRecipient:y,setWalletAddress:v,setExecPhase:d,setOrder:p,setError:h,setErrorCode:_,clearError:b,reset:x}}var tv={eip155:{1:1,137:137,42161:42161,8453:8453,10:10,56:56,43114:43114},solana:{"5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":20011e6}};function nv(e){if(typeof e==`object`&&e){if(typeof e.chainId!=`number`||typeof e.address!=`string`)throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Token target must have numeric chainId and string address`,e);return{chainId:e.chainId,address:e.address}}if(typeof e!=`string`)throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Token identifier must be a string or TokenTarget object`,e);if(e.startsWith(`{`)){try{let t=JSON.parse(e);if(typeof t.chainId==`number`&&typeof t.address==`string`)return{chainId:t.chainId,address:t.address}}catch{}throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Invalid JSON token identifier`,e)}let t=e.split(`:`);if(t.length!==3)throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Invalid CAIP-10 format: expected "namespace:reference:address", got "${e}"`,e);let[n,r,i]=t;if(!n||!r||!i)throw new yr(z.INVALID_TOKEN_IDENTIFIER,`CAIP-10 parts cannot be empty`,e);let a=tv[n],o;if(a&&a[r]!==void 0)o=a[r];else if(n===`eip155`){if(o=parseInt(r,10),isNaN(o))throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Invalid EIP-155 chain reference: "${r}"`,e)}else throw new yr(z.INVALID_TOKEN_IDENTIFIER,`Unknown CAIP-10 namespace: "${n}"`,e);return{chainId:o,address:i}}function rv(e){let t=new Set;for(let n of e)try{let e=nv(n);t.add(hm(e))}catch{}return t}function iv(e){return e?.includes(`1-click`)??!1}function av(e){try{return e.startsWith(`0x`),BigInt(e)}catch{return null}}function ov(e){let t=[];for(let n of e){let e=av(n.quote.amountOut);e!==null&&t.push({routeId:n.routeId,amountOut:e,etaSeconds:Number.isFinite(n.quote.expectedDurationSeconds)?n.quote.expectedDurationSeconds:2**53-1,isGuaranteedOutput:!1,isOneClick:iv(n.tags)})}return t}function sv(e,t){let n=[];for(let r of e){let e=av(r.quote.amountIn);if(e===null)continue;let i=t===`EXACT_OUTPUT`&&r.exactOutMethod===`native`;n.push({routeId:r.routeId,amountIn:e,etaSeconds:Number.isFinite(r.quote.expectedDurationSeconds)?r.quote.expectedDurationSeconds:2**53-1,isGuaranteedOutput:i,isOneClick:iv(r.tags)})}return n}function cv(e){if(e.length===0)return[];let t=e[0].amountOut;for(let n of e)n.amountOut>t&&(t=n.amountOut);let n=t*999n/1000n,r=[...e.filter(e=>e.amountOut>=n)].sort((e,t)=>{if(e.isGuaranteedOutput!==t.isGuaranteedOutput)return e.isGuaranteedOutput?-1:1;if(e.isOneClick!==t.isOneClick)return e.isOneClick?-1:1;let n=e.etaSeconds-t.etaSeconds;return n===0?t.amountOut>e.amountOut?1:t.amountOut<e.amountOut?-1:0:n}),i=new Set(r.map(e=>e.routeId)),a=e.filter(e=>!i.has(e.routeId)).sort((e,t)=>t.amountOut>e.amountOut?1:t.amountOut<e.amountOut?-1:0);return[...r.map(e=>e.routeId),...a.map(e=>e.routeId)]}function lv(e){if(e.length===0)return[];let t=e[0].amountIn;for(let n of e)n.amountIn<t&&(t=n.amountIn);let n=t*1001n/1000n,r=[...e.filter(e=>e.amountIn<=n)].sort((e,t)=>{if(e.isGuaranteedOutput!==t.isGuaranteedOutput)return e.isGuaranteedOutput?-1:1;if(e.isOneClick!==t.isOneClick)return e.isOneClick?-1:1;let n=e.etaSeconds-t.etaSeconds;return n===0?e.amountIn>t.amountIn?1:e.amountIn<t.amountIn?-1:0:n}),i=new Set(r.map(e=>e.routeId)),a=e.filter(e=>!i.has(e.routeId)).sort((e,t)=>e.amountIn>t.amountIn?1:e.amountIn<t.amountIn?-1:0);return[...r.map(e=>e.routeId),...a.map(e=>e.routeId)]}function uv(e){return cv(ov(e))[0]??null}function dv(e,t){return lv(sv(e,t))[0]??null}var fv={"en-US":()=>import(`./en-US-qDDiLksN.js`),"zh-CN":()=>import(`./zh-CN-DpZbMBLR.js`),"zh-TW":()=>import(`./zh-TW-CtmyKF1W.js`),"ja-JP":()=>import(`./ja-JP-C_ZBjfPb.js`),"ko-KR":()=>import(`./ko-KR-BHIB7ZQf.js`)},pv={locale:`en-US`,fallbackLocale:`en-US`,messages:{},lazyLocaleLoading:!0,chunkLoader:async e=>{let t=fv[e];return t?t():{}}};Bs(pv);var mv=e=>Hs({...pv,get children(){return e.children}}),hv={},gv=new Map;function _v(e,t){return t?e.replace(/\{(\w+)\}/g,(e,n)=>n in t?String(t[n]):`{${n}}`):e}function vv(e,...t){if(typeof e==`string`)return e;if(typeof e==`object`&&`message`in e){let n=e.message,r=t[0];if(gv.size>0){let e=gv.get(n);if(e&&e in hv){let t=hv[e];if(typeof t==`function`)return t(r??{});if(typeof t==`string`)return _v(t,r)}}return _v(n,r)}let n=e,r=n[0]??``;for(let e=1;e<n.length;e++)r+=String(t[e-1]??``)+(n[e]??``);return r}function yv(e){let[t,n]=w(!1),[r,i]=w(null),a=()=>{let t=e.walletAdapter();return t&&t.supportedActionTypes.some(e=>e.startsWith(`solana_`))?`solana`:`evm`},o;return E(ie(e.walletAdapter,s=>{if(o?.(),o=void 0,!s)return;let c=s.isConnected();n(c),c&&s.getAddress().then(t=>{i(t),e.onAddressChange(t),e.callbacks()?.onWalletConnected?.({address:t??``,chainType:a()})});let l=async()=>{let o=await s.getAddress();t()&&r()===o||(re(()=>{n(!0),i(o),e.onAddressChange(o)}),e.callbacks()?.onWalletConnected?.({address:o??``,chainType:a()}))},u=()=>{t()&&(re(()=>{n(!1),i(null),e.onAddressChange(null)}),e.onDisconnect?.())};s.on(`connect`,l),s.on(`disconnect`,u),o=()=>{s.off(`connect`,l),s.off(`disconnect`,u)}})),oe(()=>o?.()),{isConnected:t,walletAddress:r,detectChainType:a,handleConnect:async()=>{let t=e.walletAdapter();if(!t){e.callbacks()?.onConnectWallet?.();return}try{await t.connect()}catch{e.onConnectError?.(`Failed to connect wallet`,z.WALLET_CONNECTION_FAILED)}}}}function bv(e){let t=e.intervalSeconds??30,[n,r]=w(t);return E(ie(e.phase,n=>{if(n!==`quoted`){r(t);return}r(t);let i=setInterval(()=>{r(n=>n<=1?(e.onExpired(),t):n-1)},1e3);oe(()=>clearInterval(i))})),{countdownSeconds:n,resetCountdown:()=>{r(t)}}}function xv(e){let t=D(()=>{let t=e.toToken();if(!t||!e.isConnected())return!1;let n=e.walletAddress();return n?!Bu(n,Iu(t.chainId)):!1}),n=D(()=>e.recipient()||(e.isConnected()&&e.walletAddress()&&!t()?e.walletAddress():null));return E(ie(t,n=>{if(n&&!e.recipient()&&e.walletAdapter()){let n=e.toToken();if(!n)return;let r=Iu(n.chainId);e.walletAdapter().getAddress(r).then(n=>{n&&Bu(n,r)&&!e.recipient()&&t()&&e.setRecipient(n)}).catch(()=>{})}})),{needRecipient:t,recipientDisplay:n,handleRecipientChange:t=>{e.setRecipient(t.trim()||null)}}}function Sv(e){let t=Im(e.client,e.walletAddress,e.trackingOrderId,()=>e.phase()===`tracking`&&!!e.trackingOrderId());return E(ie(()=>t.data,t=>{if(!t||e.execPhase()!==`tracking`)return;let n=t.status===`filled`||t.stepsCompleted?.includes(`filled`),r=t.status===`failed`||t.status===`refunded`;re(()=>{e.setOrder(t),n?(e.setExecPhase(`success`),cs.invalidateQueries({queryKey:[`tokenBalances`,e.client().baseUrl]}),e.onOrderFilled(t)):r&&(cs.invalidateQueries({queryKey:[`tokenBalances`,e.client().baseUrl]}),e.onOrderFailed(t))})})),{orderQuery:t}}function Cv(){let[e,t]=w(null),[n,r]=w(null),[i,a]=w(null),[o,s]=w(null),[c,l]=w(null);return{trackingOrderId:e,trackingProviderName:n,trackingProviderIcon:i,trackingInputAmount:o,executionError:c,setTrackingOrderId:t,setTrackingProviderName:r,setTrackingProviderIcon:a,setTrackingInputAmount:s,setExecutionError:l}}var wv=new Set([`eth_sign`]);async function Tv(e,t,n){let r,i;if(t.kind===`CONTRACT_CALL`&&t.approvals){for(let a of t.approvals)if(a.type===`eip1193_request`){if(wv.has(a.request.method))throw new yr(z.WALLET_ACTION_FAILED,`Blocked wallet method: ${a.request.method}`);let t=await e.executeWalletAction({type:`eip1193_request`,chainId:n,method:a.request.method,params:a.request.params});if(!t.success)throw new yr(z.WALLET_ACTION_FAILED,t.error??`Wallet action failed`);a.deposit&&(r=t.txHash??r)}else if(a.type===`solana_sendTransaction`){let t=await e.executeWalletAction({type:`solana_signTransaction`,transaction:a.transaction});if(!t.success)throw new yr(z.WALLET_ACTION_FAILED,t.error??`Wallet action failed`);a.deposit&&(i=typeof t.data==`string`?t.data:void 0)}}if(!r&&!i)throw new yr(z.TRANSACTION_FAILED,`No deposit transaction received`);return{txHash:r,signedTransaction:i}}async function Ev(e,t,n,r){return e.submitDeposit(r.signedTransaction?{quoteId:t,routeId:n,signedTransaction:r.signedTransaction}:{quoteId:t,routeId:n,txHash:r.txHash})}function Dv(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`Transaction failed`;return e instanceof yr?t?.onSwapError?.({code:e.code,message:e.message,details:e.details}):t?.onSwapError?.({code:z.TRANSACTION_FAILED,message:String(e)}),n}function Ov(e,t){re(()=>{e.setTrackingOrderId(null),e.setTrackingProviderName(null),e.setTrackingProviderIcon(null),e.setTrackingInputAmount(null),e.setExecutionError(null)}),cs.removeQueries({queryKey:[`quote`,t]}),cs.removeQueries({queryKey:[`order`,t]})}function kv(e){let t=Cv();return{trackingOrderId:t.trackingOrderId,trackingProviderName:t.trackingProviderName,trackingProviderIcon:t.trackingProviderIcon,executionError:t.executionError,handleConfirm:async()=>{let n=e.routes(),r=e.quoteId(),i=n.find(t=>t.routeId===e.selectedRouteId())??n[0];if(!i||!r||!e.client()||!e.walletAdapter())return;if(e.needRecipient()&&!e.recipient()){e.setError(`Recipient address is required for cross-chain swaps`),e.setErrorCode(z.INVALID_CONFIG);return}let a=Iu(e.fromToken().chainId),o=e.walletAddress();if(!o){e.setError(`Wallet not connected`),e.setErrorCode(z.WALLET_CONNECTION_FAILED);return}if(!Bu(o,a)){e.setError(vv`Wallet doesn't match source chain`),e.setErrorCode(z.INVALID_CONFIG);return}t.setTrackingProviderName(i.routeId??null);let s=e.apiEndpoint()??`https://api.hyperstream.dev`;t.setTrackingProviderIcon(i.icon?`${s}${i.icon}`:null),t.setExecutionError(null),e.setExecPhase(`building`);try{let n=await e.client().buildDeposit({from:o,quoteId:r,routeId:i.routeId});e.setExecPhase(`awaiting-wallet`);let a=await Tv(e.walletAdapter(),n,e.fromToken().chainId);e.setExecPhase(`submitting`);let s=await Ev(e.client(),r,i.routeId,a);e.setExecPhase(`tracking`),t.setTrackingOrderId(s.orderId)}catch(n){let r=Dv(n,e.callbacks());t.setExecutionError(r)}},handleRetry:()=>{t.setExecutionError(null),e.setExecPhase(null)},handleNewSwap:()=>{e.storeReset(),Ov(t,e.client().baseUrl),e.onReset?.()}}}function Av(e){let[t,n]=w(!1),r=r=>{let i=e.apiBaseUrl();if(!i)return;try{let e=new URL(i).origin;if(r.origin!==e)return}catch{return}let a=r.data;if(!a||a.type!==`FIAT_WIDGET_EVENT`)return;let o=e.orderId();if(!(a.orderId&&o&&a.orderId!==o))switch(a.event){case`widget_ready`:n(!0),e.onWidgetReady?.();break;case`order_completed`:e.onOrderCompleted?.(a);break;case`widget_close`:case`order_failed`:if(!t())break;a.event===`order_failed`?e.onOrderFailed?.(a):e.onWidgetClose?.(a);break}};return window.addEventListener(`message`,r),oe(()=>window.removeEventListener(`message`,r)),{widgetReady:t,reset:()=>{n(!1)}}}function jv(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`}catch{return!1}}function Mv(e,t){let n=typeof window.outerWidth==`number`?window.outerWidth:0,r=typeof window.outerHeight==`number`?window.outerHeight:0,i=typeof window.screenX==`number`?window.screenX:0,a=typeof window.screenY==`number`?window.screenY:0,o=n>0?n:screen.width,s=r>0?r:screen.height,c=n>0?i:0,l=r>0?a:0;return`width=${e},height=${t},left=${Math.max(0,Math.round(c+(o-e)/2))},top=${Math.max(0,Math.round(l+(s-t)/2))}`}function Nv(e){e.current&&clearTimeout(e.current),e.current=null}var Pv=500;function Fv(e){let[t,n]=w(``),[r,i,a]=Um(``,Pv),o=e=>{n(e),i(e)},[s,c]=w(null),[l,u]=w(null),[d,f]=w(null),[p,m]=w(null),[h,g]=w(null),[_,v]=w(`none`),[y,b]=w(null),[x,S]=w(null),C={current:null},ee={current:null},T=()=>{ee.current&&clearInterval(ee.current),ee.current=null},te=e=>{T(),ee.current=setInterval(()=>{if(!e.closed)return;T();let t=_();t===`completed`||t===`failed`||O()},500)},ne=Av({apiBaseUrl:()=>e.client()?.baseUrl,orderId:d,onOrderCompleted:()=>{v(`completed`),s()===`awaiting-payment`&&c(`tracking`)},onOrderFailed:t=>{v(`failed`),T();let n=t.data?.failedReason??t.data?.providerStatus??`Payment failed`;c(null),g(n);let r=d();r&&e.callbacks()?.onFiatOrderCompleted?.({orderId:r,status:`failed`})}}),O=()=>{Nv(C),T();let t=d();re(()=>{c(null),f(null),m(null),v(`none`)}),ne.reset(),cs.removeQueries({queryKey:[`fiatStatus`,e.client()?.baseUrl]}),cs.invalidateQueries({queryKey:[`fiatQuote`,e.client()?.baseUrl]}),t&&e.callbacks()?.onFiatOrderCompleted?.({orderId:t,status:`canceled`})};oe(()=>{Nv(C),T()});let ae=D(()=>{let t=e.targetToken();if(!t)return null;let n=e.recipient();if(e.requireRecipient&&!n)return null;let i=n?n.startsWith(`0x`)?n.toLowerCase():n:`0x0000000000000000000000000000000000000000`,a=e.cryptoAmount?.();if(a)return{fiatCurrency:e.fiatCurrency(),cryptoAmount:a,toChainId:t.chainId,toToken:t.address,recipient:i};let o=r(),s=parseFloat(o);return!Number.isFinite(s)||s<=0?null:{fiatCurrency:e.fiatCurrency(),fiatAmount:o,toChainId:t.chainId,toToken:t.address,recipient:i}}),se=Bm(e.client,ae,()=>s()===null&&!h()),ce=D(()=>se.data?.quotes??[]),le=D(()=>ce()[0]??null),ue=D(()=>{let e=l();if(e){let t=ce().find(t=>t.provider===e);if(t)return t}return le()}),de=D(()=>se.isFetching),fe=Vm(e.client,d,()=>s()===`awaiting-payment`||s()===`tracking`||s()===`success`,()=>s()===`tracking`),pe=D(()=>fe.data??null);E(ie(pe,t=>{if(!t)return;let n=s(),r=d();if(!(!r||t.orderId!==r)&&!(n!==`awaiting-payment`&&n!==`tracking`)){if(t.status===`failed`){T(),v(`failed`),c(null),g(t.failedReason??t.errorReason??`Purchase failed`),e.callbacks()?.onFiatOrderCompleted?.({orderId:t.orderId,status:t.status});return}if(t.status===`canceled`){O();return}if(t.status===`completed`){T(),n===`awaiting-payment`&&c(`tracking`),C.current||(C.current=setTimeout(()=>{s()===`tracking`&&(c(`success`),e.callbacks()?.onFiatOrderCompleted?.({orderId:t.orderId,status:t.status,txHash:t.fillTxHash??t.transferTxHash??void 0}))},3e3));return}}})),E(ie(()=>se.error,e=>{e&&!s()?g(e instanceof Error?e.message:String(e)):!e&&h()&&!s()&&g(null)})),E(ie(()=>fe.error,t=>{if(!t)return;let n=s();if(n!==`awaiting-payment`&&n!==`tracking`)return;let r=t instanceof Error?t.message:String(t);Nv(C),T(),v(`none`),c(null),g(r),e.callbacks()?.onSwapError?.({code:z.FIAT_STATUS_FAILED,message:r})}));let me=D(()=>s()||(h()?`error`:se.isFetching&&ae()&&ce().length===0?`quoting`:ce().length>0?`quoted`:`idle`)),he=async()=>{let t=e.client(),n=ue(),r=e.recipient();if(!(!t||!n||!r)){g(null),b(n.token?.decimals??e.targetToken()?.decimals??null),S(n.swapStrategy),v(`none`),ne.reset(),cs.removeQueries({queryKey:[`fiatStatus`,e.client()?.baseUrl]}),c(`creating-order`);try{let i=n.routes?.[0]?.routeId,a=await t.createOrder({quoteId:n.quoteId,author:r,routeId:i});if(!jv(a.wrapperUrl))throw Error(`Invalid wrapper URL scheme from server`);let o=window.open(a.wrapperUrl,`tf-payment`,Mv(500,700));if(!o||o.closed){c(null),g(`Popup was blocked by your browser. Please allow popups and try again.`),e.callbacks()?.onSwapError?.({code:z.FIAT_ORDER_FAILED,message:`Popup blocked`});return}re(()=>{f(a.orderId),m(a.wrapperUrl),c(`awaiting-payment`)}),te(o),e.callbacks()?.onFiatOrderCreated?.({orderId:a.orderId,widgetUrl:a.wrapperUrl})}catch(t){let n=t instanceof Error?t.message:String(t),r=/quote.*(?:not found|expired)/i.test(n);c(null),r?cs.invalidateQueries({queryKey:[`fiatQuote`,e.client()?.baseUrl]}):(g(n),e.callbacks()?.onSwapError?.({code:z.FIAT_ORDER_FAILED,message:n}))}}},ge=()=>{Nv(C),T(),v(`none`),ne.reset(),u(null),b(null),S(null)};return{phase:me,fiatAmount:t,setFiatAmount:o,quote:ue,allQuotes:ce,selectedProviderId:l,setSelectedProvider:e=>u(e),isQuoteFetching:de,orderId:d,orderStatus:pe,directWidgetUrl:p,error:h,tokenDecimals:y,strategy:x,createOrder:he,refetchQuote:()=>{cs.invalidateQueries({queryKey:[`fiatQuote`,e.client()?.baseUrl]})},handleRetry:()=>{ge(),re(()=>{c(null),f(null),m(null),g(null)}),cs.removeQueries({queryKey:[`fiatStatus`,e.client()?.baseUrl]}),cs.resetQueries({queryKey:[`fiatQuote`,e.client()?.baseUrl]})},handleNewPurchase:()=>{ge(),re(()=>{n(``),a(``),c(null),f(null),m(null),g(null)}),cs.removeQueries({queryKey:[`fiatQuote`,e.client()?.baseUrl]}),cs.removeQueries({queryKey:[`fiatStatus`,e.client()?.baseUrl]})}}}var Q={methodButtons:`tf-5cc2e5`,methodButton:`tf-292b5c`,methodButtonIcon:`tf-4ceb2d`,methodButtonIconCrypto:`tf-0f5916`,methodButtonIconCard:`tf-4aaad9`,methodButtonText:`tf-0fbb44`,methodButtonTitle:`tf-47c991`,methodButtonDesc:`tf-474f21`,methodButtonArrow:`tf-16f0ec`,entryPage:`tf-612245`,errorBanner:`tf-bcbc56`},Iv=`tf-9b71d6`,Lv=`tf-4c9136`,Rv=`tf-febe61`,zv=`tf-b8cb88`,Bv=`tf-0d09cf`,Vv=`tf-398c5c`,Hv=`tf-2368bf`,Uv=`tf-86d030`,Wv=`tf-b31fd2`,Gv=`tf-f55867`,Kv=`tf-a27aab`,qv=`tf-d62361`,Jv=`tf-f0b3f5`,Yv=`tf-7a6fbc`,Xv=`tf-e9e9a1`,Zv=`tf-f3baad`,Qv=`tf-0131e4`,$v=`tf-e8980b`,ey=`tf-81181d`,ty=`tf-a274dd`,ny=`tf-0039f9`,ry=`tf-2ee752`,iy=`tf-96714d`,ay=`tf-619747`,oy=`tf-cd221a`,sy=`tf-2c683f`,cy=`tf-c839a0`,ly=`tf-0b0d52`,uy=`tf-19df0d`,dy=`tf-c7d33a`,fy=`tf-e51789`,py=`tf-8a3107`,my=`tf-e255df`,hy=`tf-fb2771`,gy=`tf-1b1e61`,_y=`tf-18dcca`,vy=`tf-a5c85b`,yy=`tf-12a725`,by=`tf-df9ebb`,xy=`tf-3547fa`,Sy=`tf-a46696`,Cy=`tf-1d40de`,wy=`tf-5d25d7`,$={header:Iv,section:Lv,sectionLabel:Rv,backButton:zv,"backButton--exiting":`tf-bf5d6c`,backArrowEnter:Bv,backArrowPush:Vv,backTextEnter:Hv,backTextPush:Uv,backArrowExit:Wv,backTextExit:Gv,target:Kv,targetContent:qv,targetIcon:Jv,targetChainDot:Yv,amount:Xv,symbol:Zv,fiat:Qv,amountInput:$v,paySelected:ey,paySelectedLeft:ty,payIconWrap:ny,payChainDot:ry,paySelectedInfo:iy,paySelectedTopRow:ay,payTokenSymbol:oy,payBestBadge:sy,payTokenChain:cy,paySelectedRight:ly,paySelectedAmount:uy,paySelectedAmountUsd:dy,paySelectedCaret:fy,payAmountSkeleton:py,paySelectedSkeleton:my,paySkeletonIcon:hy,paySkeletonInfo:gy,paySkeletonLine:_y,paySkeletonSymbol:vy,paySkeletonChain:yy,paySkeletonRight:by,paySkeletonAmount:xy,paySkeletonUsd:Sy,payEmpty:Cy,payEmptyText:wy},Ty=V(`<div>`),Ey=V(`<div part=container><div part=accent-line>`),Dy=V(`<button type=button part=back-button><span>`),Oy=V(`<img height=22>`),ky=V(`<button part=wallet-info><div></div><span>`),Ay=V(`<div part=header><div><span>`),jy=V(`<div><span>`),My=V(`<button type=button><div></div><div><span></span><span></span></div><span>`),Ny=V(`<div part=method-buttons><button type=button disabled aria-disabled=true><div></div><div><span></span><span></span></div><span>`),Py=V(`<div><span></span><button type=button>`),Fy=V(`<span>`),Iy=V(`<div><div><div></div></div><span>`),Ly=V(`<div><div><span></span><input type=number inputmode=decimal placeholder=0 part=fiat-amount-input>`),Ry=V(`<button type=button part=swap-arrow>`),zy=V(`<button part=recipient-badge><span>`),By=V(`<span part=amount-display style=cursor:default>`),Vy=V(`<div style=position:relative><div><div part=panel-from><div><span></span></div></div><div></div><div part=panel-to><div><span></span></div><div></div><div><span>`),Hy=V(`<div part=price-preview>`),Uy=V(`<div part=no-offer><span>`),Wy=V(`<div><div style=width:32px;height:32px></div><span>`),Gy=V(`<div><div></div><span></span><span>`),Ky=V(`<div><button type=button data-testid=provider-selector-trigger><span></span><span style=color:var(--tf-text-tertiary)>›`),qy=V(`<div><div><div style=margin-bottom:0>`),Jy=V(`<button part=button-primary type=button>`),Yy=V(`<button disabled type=button><span><span>`),Xy=V(`<button disabled type=button style=opacity:0.6>`),Zy=V(`<div part=cta-wrapper>`),Qy=V(`<span>Flight`),$y=V(`<button><span>`),eb=V(`<span> `),tb=V(`<div style=width:120px;height:28px>`),nb=V(`<img width=20 height=20>`);function rb(e){return A(mv,{get children(){return A(ib,e)}})}function ib(e){let{t}=Us(),n=e.config,r=Us();ae(()=>{n.locale&&r.setLocale(n.locale)});let i=D(()=>n.methods??[`crypto`]),a=D(()=>i().includes(`crypto`)),o=D(()=>i().includes(`card`)),s=D(()=>!!n.lockFromToken||!!n.defaultPayMethod),c=D(()=>!!n.lockToToken),[l,u]=w((()=>{if(n.defaultPayMethod)return n.defaultPayMethod;let e=i();return e.length===1?e[0]:`entry`})()),d=D(()=>!n.defaultPayMethod&&i().length>1&&l()!==`entry`),f=D(()=>d()||!!e.onBack),[p,m]=w(!1),h=()=>{p()||(d()?m(!0):e.onBack&&e.onBack())},g=()=>{m(!1),u(`entry`)},_=$_(),[v,y]=w(`from`),b=Ag(),x=Ag(),S=Ag(),[C,ee]=w(!1),[te,ne]=w(n.fiatCurrency??`USD`),{isConnected:O,walletAddress:oe,handleConnect:se}=yv({walletAdapter:()=>e.walletAdapter,callbacks:()=>e.callbacks,onAddressChange:e=>_.setWalletAddress(e),onConnectError:(e,t)=>{_.setError(e),_.setErrorCode(t)}}),ce=D(()=>new Sr({baseUrl:n.apiEndpoint??`https://api.hyperstream.dev`})),le=D(()=>new wr({baseUrl:n.fiatApiEndpoint??`https://fiat.hyperstream.dev`})),ue=()=>ce().baseUrl,de=D(()=>n.fromTokens?.length?rv(n.fromTokens):void 0),fe=D(()=>n.toTokens?.length?rv(n.toTokens):void 0),[pe,me]=w([]),he=Pm(ce,()=>!0),ge=D(()=>{let e=he.data;return e?_m(e):new Map}),{needRecipient:_e,recipientDisplay:ve,handleRecipientChange:ye}=xv({fromToken:_.fromToken,toToken:_.toToken,recipient:_.recipient,isConnected:O,walletAddress:oe,walletAdapter:()=>e.walletAdapter,setRecipient:_.setRecipient}),be=Hm(ce,oe,()=>O()&&!!oe(),()=>e.walletAdapter?.supportedChainIds),xe=D(()=>{let e=_.fromToken();if(!e||typeof e.decimals!=`number`||!be.data)return null;let t=be.data.find(t=>t.address.toLowerCase()===e.address.toLowerCase()&&t.chainId===e.chainId);return t?.extensions?.balance?Yc(Xc(Kc(t.extensions.balance,t.decimals),2)):`0`}),Se=D(()=>{let e=_.fromToken();return!e||typeof e.decimals!=`number`||!be.data?null:be.data.find(t=>t.address.toLowerCase()===e.address.toLowerCase()&&t.chainId===e.chainId)?.extensions?.balance??`0`}),Ce=D(()=>{let e=_.inputAmount(),t=_.fromToken(),n=Se();if(!t||typeof t.decimals!=`number`||!n||!e||e===`0`||e===``)return!1;try{return BigInt(qc(e,t.decimals))>BigInt(n)}catch{return!1}}),[we,Te,Ee]=Um(``,300),De=D(()=>n.tradeType===`EXACT_OUTPUT`),Oe=D(()=>e.lockRecipient===void 0?!!n.recipient&&n.recipientEditable!==!0:e.lockRecipient),k=D(()=>{if(l()!==`crypto`)return null;let e=_.fromToken(),t=_.toToken(),r=_.recipient();if(!e||typeof e.decimals!=`number`||!t||typeof t.decimals!=`number`||!ce()||_e()&&!r)return null;if(De()){let i=n.amount;return!i||parseFloat(i)<=0?null:{tradeType:`EXACT_OUTPUT`,fromChainId:e.chainId,fromToken:e.address,toChainId:t.chainId,toToken:t.address,amount:qc(i,t.decimals),fromAddress:oe()??Ru(e.chainId),...r&&{recipient:r},...n.refundTo&&{refundTo:n.refundTo}}}let i=we();return!i||parseFloat(i)<=0?null:{tradeType:`EXACT_INPUT`,fromChainId:e.chainId,fromToken:e.address,toChainId:t.chainId,toToken:t.address,amount:qc(i,e.decimals),fromAddress:oe()??Ru(e.chainId),...r&&{recipient:r},...n.refundTo&&{refundTo:n.refundTo}}}),ke=Fm(ce,k,D(()=>!!k()&&!_.execPhase())),Ae=D(()=>{if(!_.fromToken()||!_.toToken())return[];if(!De()){let e=_.inputAmount();if(!e||parseFloat(e)<=0)return[]}return ke.data?.routes??[]}),je=D(()=>ke.data?.quoteId??null),Me=D(()=>Ae().length>0?uv(Ae()):null),Ne=D(()=>{let e=Ae(),t=Me();return e.find(e=>e.routeId===t)??e[0]??null}),Pe=D(()=>{let e=Ne(),t=_.toToken();return!e||!t||typeof t.decimals!=`number`?``:Xc(Kc(e.quote.amountOut,t.decimals))}),Fe=D(()=>{if(!De())return null;let e=Ne(),t=_.fromToken();return!e||!t||typeof t.decimals!=`number`?null:Xc(Kc(e.quote.amountIn,t.decimals))}),Ie=D(()=>Z_(_.execPhase(),_.error(),ke.isFetching,Ae().length,!!k())),Le=D(()=>_.execPhase()||!k()?!1:!ke.isFetching&&ke.isSuccess&&Ae().length===0),Re=D(()=>{let e=Ie();return e===`quoted`||e===`building`||e===`awaiting-wallet`||e===`submitting`||e===`tracking`||e===`success`}),ze=D(()=>{let e=Ie();return e===`building`||e===`awaiting-wallet`||e===`submitting`||e===`tracking`}),Be=D(()=>!_.fromToken()||!_.toToken()?!1:Ie()===`quoting`&&parseFloat(_.inputAmount())>0&&Ae().length===0),Ve=D(()=>{let e=_.fromToken();if(!e)return null;if(typeof e.priceUsd==`number`&&Number.isFinite(e.priceUsd))return e.priceUsd;let t=be.data?.find(t=>t.address.toLowerCase()===e.address.toLowerCase()&&t.chainId===e.chainId),n=Number(t?.extensions?.price?.usd??``);return Number.isFinite(n)?n:null}),He=D(()=>{let e=_.toToken();return e&&typeof e.priceUsd==`number`&&Number.isFinite(e.priceUsd)?e.priceUsd:null}),Ue=D(()=>{let e=De()?Fe()??`0`:_.inputAmount(),n=Number(e),r=Ve();return!Number.isFinite(n)||n<=0||r===null?null:t({id:`188897k`,message:"≈ ${formatUsd}"},{formatUsd:Gd(n*r)})}),{trackingOrderId:We,trackingProviderName:Ge,trackingProviderIcon:Ke,executionError:qe,handleConfirm:Je,handleRetry:Xe,handleNewSwap:Ze}=kv({client:ce,walletAdapter:()=>e.walletAdapter,callbacks:()=>e.callbacks,apiEndpoint:()=>n.apiEndpoint,fromToken:_.fromToken,recipient:_.recipient,needRecipient:_e,walletAddress:oe,routes:Ae,quoteId:je,selectedRouteId:Me,setExecPhase:_.setExecPhase,setError:_.setError,setErrorCode:_.setErrorCode,storeReset:_.reset,onReset:()=>Ee(``)});Sv({client:ce,walletAddress:oe,trackingOrderId:We,phase:Ie,execPhase:_.execPhase,setOrder:_.setOrder,setExecPhase:_.setExecPhase,onOrderFilled:t=>e.callbacks?.onSwapSuccess?.({orderId:t.id,fromToken:_.fromToken().symbol??_.fromToken().address,toToken:_.toToken().symbol??_.toToken().address,fromAmount:t.srcAmount,toAmount:t.destAmount,txHash:t.depositTxHash}),onOrderFailed:t=>e.callbacks?.onSwapError?.({code:z.ORDER_FAILED,message:`Order `+t.status})});let{countdownSeconds:Qe}=bv({phase:Ie,onExpired:()=>ke.refetch()});E(ie(()=>({isError:ke.isError,error:ke.error,data:ke.data}),({isError:e,error:t,data:n})=>{_.execPhase()||l()!==`crypto`||(e&&!n?t instanceof yr?(_.setError(t.message),_.setErrorCode(t.code)):(_.setError(String(t)),_.setErrorCode(null)):_.error()&&!e&&_.clearError())})),E(ie(()=>ke.data,t=>{t&&e.callbacks?.onQuoteReceived?.(t)}));let $e=D(()=>{let e=_.recipient();if(e)return e;let t=_.toToken(),n=oe();return O()&&n&&t&&Bu(n,Iu(t.chainId))?n:null}),et=D(()=>{if(!De()||!n.amount)return null;let e=_.toToken();return!e||typeof e.decimals!=`number`?null:qc(n.amount,e.decimals)}),N=Fv({client:le,targetToken:_.toToken,recipient:$e,fiatCurrency:()=>te(),callbacks:()=>e.callbacks,cryptoAmount:et,requireRecipient:!0}),tt=bv({phase:N.phase,onExpired:()=>N.refetchQuote(),intervalSeconds:30}),nt=D(()=>l()===`card`&&!$e()&&!!_.toToken()&&(!!N.fiatAmount()||De())),rt=D(()=>_.recipient()??(O()?oe():null)),it=D(()=>!!n.fiatCurrency),at=zm(le,()=>!it()),ot=D(()=>{if(it())return[];let e=at.data;if(!e?.providers?.length)return[];let t=new Set;for(let n of e.providers){let e=n.supportedCurrencies;if(Array.isArray(e))for(let n of e)typeof n==`string`?t.add(n):n&&typeof n.code==`string`&&t.add(n.code)}return[...t].sort()}),st=[`USD`,`EUR`,`GBP`,`JPY`,`KRW`,`CNY`,`AUD`,`CAD`,`INR`,`SGD`,`HKD`,`TWD`,`BRL`,`MXN`,`CHF`],ct=D(()=>{let e=ot();return e.length>0?e:st}),lt=D(()=>Nf(te())||te()),ut=()=>N.quote()?.token?.decimals??_.toToken()?.decimals??18,dt=e=>e?Xc(Kc(e,ut()),6):`0`,ft=D(()=>{let e=N.quote(),t=parseFloat(N.fiatAmount());return!e||!t?!1:!!(e.minFiatAmount&&t<parseFloat(String(e.minFiatAmount))||e.maxFiatAmount&&t>parseFloat(String(e.maxFiatAmount)))}),pt=D(()=>{let e=N.phase();return e===`awaiting-payment`||e===`tracking`}),mt=D(()=>{let e=N.phase();return e===`creating-order`||e===`quoting`}),ht=D(()=>{let e=N.phase();return e===`error`?t({id:`1w68n16`,message:`Try Again`})??`Try Again`:e===`creating-order`||e===`quoting`?t({id:`344av8`,message:`Processing...`}):e===`quoted`&&N.quote()?t({id:`13l4n4r`,message:`Continue via {provider}`},{provider:N.quote().providerName??Ud(N.quote().provider)}):t({id:`119fv83`,message:`Enter amount`})}),gt=()=>t({id:`1m2n0pw`,message:`Compare {count} more`},{count:String(N.allQuotes().length-1)}),_t=D(()=>N.phase()===`quoted`&&!!$e()&&!ft()&&!N.isQuoteFetching()),vt=()=>{let e=N.phase();e===`error`?N.handleRetry():e===`quoted`&&_t()&&N.createOrder()},yt=D(()=>{if(De()&&n.amount)return n.amount;if(l()===`crypto`)return Pe();let e=N.quote();if(!e)return``;if(e.swapStrategy===`jump`){let t=e.routes?.[0]?.estimatedOutputAmount??e.estimatedOutputAmount;if(t)return Xc(Kc(t,_.toToken()?.decimals??18),6)}return dt(e.cryptoAmount)}),bt=D(()=>De()&&n.amount?!0:l()===`crypto`?Re()||Ie()===`quoting`:!!N.quote()||N.phase()===`quoting`),xt=D(()=>{let e=Number(yt()||`0`),n=He();return!bt()||!Number.isFinite(e)||e<=0||n===null?null:t({id:`188897k`,message:"≈ ${formatUsd}"},{formatUsd:Gd(e*n)})});ae(async()=>{let e=ce();if(n.fromToken)try{let t=nv(n.fromToken),r=await Am(t.chainId,t.address,n.apiEndpoint,e);typeof r.decimals==`number`&&_.setFromToken(r)}catch{}if(n.toToken)try{let t=nv(n.toToken),r=await Am(t.chainId,t.address,n.apiEndpoint,e);typeof r.decimals==`number`&&_.setToToken(r)}catch{}if(n.toTokens?.length){let t=[];for(let r of n.toTokens)try{let i=nv(r),a=await Am(i.chainId,i.address,n.apiEndpoint,e);if(typeof a.decimals==`number`){let e=ge().get(a.chainId);t.push({symbol:a.symbol??``,name:a.name??a.symbol??``,chain:e?.name??`Chain ${a.chainId}`,chainId:a.chainId,color:`#888`,balance:null,usd:``,address:a.address,decimals:a.decimals,logoURI:a.logoURI,priceUsd:a.priceUsd})}}catch{}me(t)}n.recipient&&_.setRecipient(n.recipient),n.amount&&!De()&&(_.setInputAmount(n.amount),Ee(n.amount))});let St=t=>{_.setInputAmount(t),e.callbacks?.onAmountChanged?.({amount:t,direction:`from`}),_.error()&&_.clearError(),Te(t)},Ct=e=>{let t={chainId:e.chainId,address:e.address??``,symbol:e.symbol,name:e.name,decimals:e.decimals,logoURI:e.logoURI,priceUsd:e.priceUsd};v()===`from`?_.setFromToken(t):_.setToToken(t),b.hide()},wt=()=>{if(ze()||!_.fromToken()||!_.toToken())return;let e=_.fromToken(),t=_.toToken();re(()=>{_.setFromToken(t),_.setToToken(e),_.execPhase()===`success`&&_.setExecPhase(null)})},Tt=()=>{let e=_.fromToken(),t=Se();if(!e||typeof e.decimals!=`number`||!t||t===`0`)return;let n=Kc(t,e.decimals);n&&n!==`0`&&St(n)},Et=e=>`${e.slice(0,6)}...${e.slice(-4)}`,Dt=D(()=>{let e=Ne();return!e||!_.fromToken()||!_.toToken()?null:Ie()===`quoting`||Re()?e:null}),Ot=D(()=>{let e=n.titleText?.trim();return e&&e.length>0?e:`TokenFlight`}),kt=D(()=>{let e=n.titleText?.trim();return!!e&&e.length>0}),At=D(()=>{let e=n.titleImageUrl?.trim();return e&&e.length>0?e:null}),jt=D(()=>l()===`card`&&(pt()||N.phase()===`success`)),Mt=D(()=>Ie()===`success`&&_.order()?`success`:ze()?`tracking`:`form`);return(()=>{var r=Ey(),i=r.firstChild;return G(r,A(j,{get when(){return jt()},get children(){return A(j,{get when(){return B(()=>N.phase()===`success`)()&&N.orderStatus()},get fallback(){return A(qf,{get phase(){return N.phase()},get status(){return N.orderStatus()?.status??`pending_payment`},get strategy(){return N.strategy()??N.orderStatus()?.swapStrategy??`direct`},get fiatAmount(){return N.fiatAmount()},get fiatCurrency(){return te()},get cryptoAmount(){return dt(N.orderStatus()?.quotedCryptoAmount??N.quote()?.cryptoAmount)},get targetToken(){return _.toToken()},get provider(){return N.orderStatus()?.provider??N.quote()?.provider??`transak`},get transferTxHash(){return N.orderStatus()?.fillTxHash??N.orderStatus()?.transferTxHash},get failedReason(){return N.orderStatus()?.failedReason??N.orderStatus()?.errorReason},get apiBase(){return ue()},get chainMap(){return ge()},onNewPurchase:()=>N.handleNewPurchase(),onRetry:()=>N.handleRetry()})},get children(){return A($f,{get orderStatus(){return N.orderStatus()},get fiatAmount(){return N.fiatAmount()},get fiatCurrency(){return te()},get targetToken(){return _.toToken()},get tokenDecimals(){return N.tokenDecimals()},get provider(){return N.orderStatus()?.provider??`transak`},get apiBase(){return ue()},get chainMap(){return ge()},onNewPurchase:()=>N.handleNewPurchase()})}})}}),null),G(r,A(j,{get when(){return!jt()},get children(){return A(kf,{get current(){return Mt()},views:{form:()=>[(()=>{var n=Ay(),r=n.firstChild,i=r.firstChild;return G(r,A(j,{get when(){return f()},get children(){var e=Dy(),n=e.firstChild;return W(e,`click`,h),W(n,`animationend`,p()?g:void 0),G(n,A(ic,{size:16})),T(r=>{var i=`${$.backButton}${p()?` ${$[`backButton--exiting`]}`:``}`,a=t({id:`1hzmxtu`,message:`Back`}),o=p()?$.backArrowExit:$.backArrowEnter;return i!==r.e&&U(e,r.e=i),a!==r.t&&H(e,`aria-label`,r.t=a),o!==r.a&&U(n,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e}}),i),G(r,A(j,{get when(){return At()},get fallback(){return A(j,{get when(){return!e.config.hideTitle},get children(){return A(Lc,{size:22})}})},get children(){var t=Oy();return T(n=>{var r=At(),i=Ot(),a=`${X.headerLogoImage} ${e.config.hideTitle?X[`headerLogoImage--solo`]:``}`;return r!==n.e&&H(t,`src`,n.e=r),i!==n.t&&H(t,`alt`,n.t=i),a!==n.a&&U(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t}}),i),G(i,A(j,{get when(){return kt()},get fallback(){return[`Token`,(()=>{var e=Qy();return T(()=>U(e,X.headerTitleAccent)),e})()]},get children(){return Ot()}})),G(n,A(j,{get when(){return B(()=>!!O())()&&oe()},get children(){var n=ky(),r=n.firstChild,i=r.nextSibling;return W(n,`click`,async()=>{e.walletAdapter?.openAccountModal?await e.walletAdapter.openAccountModal():e.callbacks?.onAccountModal?.()}),G(i,()=>Et(oe())),T(e=>{var a=X.headerRight,o=t({id:`xphk5n`,message:`Wallet account`}),s=X.walletDot,c=X.walletAddress;return a!==e.e&&U(n,e.e=a),o!==e.t&&H(n,`aria-label`,e.t=o),s!==e.a&&U(r,e.a=s),c!==e.o&&U(i,e.o=c),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}}),null),T(t=>{var a=X.header,o=X.headerLeft,s=`${X.headerTitle} ${e.config.hideTitle?X[`headerTitle--hidden`]:``}`;return a!==t.e&&U(n,t.e=a),o!==t.t&&U(r,t.t=o),s!==t.a&&U(i,t.a=s),t},{e:void 0,t:void 0,a:void 0}),n})(),A(Ye,{get children(){return[A(M,{get when(){return l()===`entry`},get children(){return[(()=>{var e=jy(),n=e.firstChild;return G(n,()=>t({id:`cgzgvn`,message:`Pay with`})),T(()=>U(e,X.payWithLabel)),e})(),(()=>{var e=Ny(),n=e.firstChild,r=n.firstChild,i=r.nextSibling,s=i.firstChild,c=s.nextSibling,l=i.nextSibling;return G(e,A(j,{get when(){return a()},get children(){var e=My(),n=e.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,o=r.nextSibling;return W(e,`click`,()=>u(`crypto`)),G(n,A(Sc,{size:20})),G(i,()=>t({id:`1o1b4a8`,message:`Crypto`})),G(a,()=>t({id:`udneg1`,message:`Pay with tokens from your wallet`})),G(o,A(cc,{size:16})),T(t=>{var s=Q.methodButton,c=`${Q.methodButtonIcon} ${Q.methodButtonIconCrypto}`,l=Q.methodButtonText,u=Q.methodButtonTitle,d=Q.methodButtonDesc,f=Q.methodButtonArrow;return s!==t.e&&U(e,t.e=s),c!==t.t&&U(n,t.t=c),l!==t.a&&U(r,t.a=l),u!==t.o&&U(i,t.o=u),d!==t.i&&U(a,t.i=d),f!==t.n&&U(o,t.n=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}}),n),G(e,A(j,{get when(){return o()},get children(){var e=My(),n=e.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,o=r.nextSibling;return W(e,`click`,()=>u(`card`)),G(n,A(uc,{size:20})),G(i,()=>t({id:`2b8ghr`,message:`Card`})),G(a,()=>t({id:`1q45kup`,message:`Buy with credit or debit card`})),G(o,A(cc,{size:16})),T(t=>{var s=Q.methodButton,c=`${Q.methodButtonIcon} ${Q.methodButtonIconCard}`,l=Q.methodButtonText,u=Q.methodButtonTitle,d=Q.methodButtonDesc,f=Q.methodButtonArrow;return s!==t.e&&U(e,t.e=s),c!==t.t&&U(n,t.t=c),l!==t.a&&U(r,t.a=l),u!==t.o&&U(i,t.o=u),d!==t.i&&U(a,t.i=d),f!==t.n&&U(o,t.n=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}}),n),G(r,A(wc,{size:20})),G(s,()=>t({id:`1dyojgg`,message:`Exchange`})),G(c,()=>t({id:`14ho4vt`,message:`Coming soon`})),G(l,A(cc,{size:16})),T(t=>{var a=Q.methodButtons,o=`${Q.methodButton} ${X.methodButtonDisabled}`,u=`${Q.methodButtonIcon} ${X.methodButtonIconExchange}`,d=Q.methodButtonText,f=Q.methodButtonTitle,p=X.comingSoonPill,m=Q.methodButtonArrow;return a!==t.e&&U(e,t.e=a),o!==t.t&&U(n,t.t=o),u!==t.a&&U(r,t.a=u),d!==t.o&&U(i,t.o=d),f!==t.i&&U(s,t.i=f),p!==t.n&&U(c,t.n=p),m!==t.s&&U(l,t.s=m),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),e})()]}}),A(M,{get when(){return l()!==`entry`},get children(){return[(()=>{var r=Vy(),i=r.firstChild,a=i.firstChild,o=a.firstChild,u=o.firstChild,d=a.nextSibling,f=d.nextSibling,p=f.firstChild,m=p.firstChild,h=p.nextSibling,g=h.nextSibling,v=g.firstChild;return G(u,()=>Ws(`youPay`,t({id:`17kq51m`,message:`You pay`}))),G(o,A(j,{get when(){return B(()=>!!(l()===`crypto`&&O()))()&&xe()},get children(){var e=Py(),n=e.firstChild,r=n.nextSibling;return G(n,()=>t({id:`y6jqu9`,message:`Balance: {fromBalance}`},{fromBalance:xe()})),W(r,`click`,Tt),G(r,()=>t({id:`7v6g6x`,message:`MAX`})),T(t=>{var i=X.panelHeaderRight,a=X.panelBalance,o=X.maxBtn;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(a,A(Ye,{get children(){return[A(M,{get when(){return l()===`crypto`},get children(){return[(()=>{var e=Ty();return G(e,A(Gc,{get value(){return B(()=>!!De())()?Fe()??`0`:_.inputAmount()},onChange:St,get disabled(){return ze()||De()}}),null),G(e,A(j,{get when(){return _.fromToken()},get fallback(){return(()=>{var e=$y(),n=e.firstChild;return W(e,`click`,()=>s()?void 0:O()?(y(`from`),b.show()):se()),G(n,()=>t({id:`zz4mrw`,message:`Select token`})),G(e,A(j,{get when(){return!s()},get children(){var e=Fy();return G(e,A(nc,{size:14})),T(()=>U(e,X.caret)),e}}),null),T(t=>{var r=`${X.tokenBtn} ${X[`tokenBtn--select`]}`,i=X.tokenNameAccent;return r!==t.e&&U(e,t.e=r),i!==t.t&&U(n,t.t=i),t},{e:void 0,t:void 0}),e})()},get children(){var e=Iy(),t=e.firstChild,n=t.firstChild,r=t.nextSibling;return W(e,`click`,()=>{s()||(y(`from`),b.show())}),G(t,A(Bc,{get symbol(){return _.fromToken().symbol??`?`},color:`#2775CA`,size:24,get logoURI(){return _.fromToken().logoURI}}),n),G(n,A(Vc,{size:10,get iconUrl(){return Ic(ue(),_.fromToken().chainId)}})),G(r,()=>_.fromToken().symbol),G(e,A(j,{get when(){return!s()},get children(){var e=Fy();return G(e,A(nc,{size:14})),T(()=>U(e,X.caret)),e}}),null),T(i=>{var a=`${X.tokenBtn}${s()?` ${X[`tokenBtn--locked`]}`:``}`,o=s()?void 0:`button`,c=X.tokenIconWrap,l=X.tokenChainDot,u=X.tokenName;return a!==i.e&&U(e,i.e=a),o!==i.t&&H(e,`role`,i.t=o),c!==i.a&&U(t,i.a=c),l!==i.o&&U(n,i.o=l),u!==i.i&&U(r,i.i=u),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}}),null),T(()=>U(e,X.panelRow)),e})(),(()=>{var e=jy(),t=e.firstChild;return G(t,()=>Ue()??` `),T(n=>{var r=X.panelFooter,i=`${X.fiat} ${Ue()?``:X[`fiat--hidden`]}`;return r!==n.e&&U(e,n.e=r),i!==n.t&&U(t,n.t=i),n},{e:void 0,t:void 0}),e})()]}}),A(M,{get when(){return l()===`card`},get children(){return[(()=>{var e=Ly(),t=e.firstChild,r=t.firstChild,i=r.nextSibling;return G(r,lt),W(i,`input`,e=>!De()&&N.setFiatAmount(e.target.value)),G(e,A(pg,{get currencies(){return ct()},get selected(){return te()},onSelect:ne,get locked(){return it()},get locale(){return n.locale}}),null),T(n=>{var a=X.panelRow,o=Z.fiatAmountWrap,s=Z.fiatCurrencyPrefix,c=Z.fiatAmountInput,l=De();return a!==n.e&&U(e,n.e=a),o!==n.t&&U(t,n.t=o),s!==n.a&&U(r,n.a=s),c!==n.o&&U(i,n.o=c),l!==n.i&&(i.disabled=n.i=l),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),T(()=>i.value=De()?N.quote()?.fiatAmount??`0`:N.fiatAmount()),e})(),(()=>{var e=Ty();return G(e,A(j,{get when(){return N.quote()},get fallback(){return(()=>{var e=eb();return T(()=>U(e,`${X.fiat} ${X[`fiat--hidden`]}`)),e})()},children:e=>(()=>{var n=Fy();return G(n,A(j,{get when(){return e().minFiatAmount},get children(){return[B(()=>t({id:`cx9lh3`,message:`Min`})),`: `,B(()=>lt()),B(()=>e().minFiatAmount)]}}),null),G(n,A(j,{get when(){return B(()=>!!e().minFiatAmount)()&&e().maxFiatAmount},children:` · `}),null),G(n,A(j,{get when(){return e().maxFiatAmount},get children(){return[B(()=>t({id:`gtvgs9`,message:`Max`})),`: `,B(()=>lt()),B(()=>e().maxFiatAmount)]}}),null),T(()=>U(n,`${Z.fiatLimitsText}${ft()?` ${Z.fiatLimitsError}`:``}`)),n})()})),T(()=>U(e,X.panelFooter)),e})()]}})]}}),null),G(d,A(j,{get when(){return B(()=>!e.hideSwapArrow&&l()===`crypto`)()&&!c()},get children(){var e=Ry();return W(e,`click`,wt),G(e,A(ec,{size:13})),T(n=>{var r=X.swapArrowCircle,i=t({id:`2eikro`,message:`Swap tokens`});return r!==n.e&&U(e,n.e=r),i!==n.t&&H(e,`aria-label`,n.t=i),n},{e:void 0,t:void 0}),e}})),G(m,()=>Ws(`youReceive`,t({id:`va18uh`,message:`You receive`}))),G(p,A(j,{get when(){return l()===`card`||_.toToken()&&O()},get children(){var e=zy(),n=e.firstChild;return W(e,`click`,()=>!Oe()&&x.show()),G(n,(()=>{var e=B(()=>!!(l()===`card`?rt():ve()));return()=>e()?Et(l()===`card`?rt():ve()):t({id:`fpand1`,message:`Enter destination address`})})()),G(e,A(j,{get when(){return!Oe()},get children(){return A(bc,{size:10})}}),null),T(t=>{var r=`${K.recipientBadge} ${(l()===`card`?rt():ve())?``:K.recipientBadgeEmpty}${Oe()?` ${K.recipientBadgeLocked}`:``}`,i=Oe(),a=K.recipientBadgeText;return r!==t.e&&U(e,t.e=r),i!==t.t&&(e.disabled=t.t=i),a!==t.a&&U(n,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(h,A(j,{get when(){return!(l()===`crypto`?Be():N.phase()===`quoting`)},get fallback(){return(()=>{var e=tb();return T(()=>U(e,K.skeleton)),e})()},get children(){var e=By();return G(e,A(cl,{get value(){return yt()||`0`},digits:8})),T(()=>U(e,`${Uc.amount} ${bt()?``:Uc.muted}`)),e}}),null),G(h,A(j,{get when(){return _.toToken()},get fallback(){return(()=>{var e=$y(),n=e.firstChild;return W(e,`click`,()=>c()?void 0:l()===`card`||O()?(y(`to`),b.show()):se()),G(n,()=>t({id:`zz4mrw`,message:`Select token`})),G(e,A(j,{get when(){return!c()},get children(){var e=Fy();return G(e,A(nc,{size:14})),T(()=>U(e,X.caret)),e}}),null),T(t=>{var r=`${X.tokenBtn} ${X[`tokenBtn--select`]}`,i=X.tokenNameAccent;return r!==t.e&&U(e,t.e=r),i!==t.t&&U(n,t.t=i),t},{e:void 0,t:void 0}),e})()},get children(){var e=Iy(),t=e.firstChild,n=t.firstChild,r=t.nextSibling;return W(e,`click`,()=>{c()||(y(`to`),b.show())}),G(t,A(Bc,{get symbol(){return _.toToken().symbol??`?`},color:`#0052FF`,size:24,get logoURI(){return _.toToken().logoURI}}),n),G(n,A(Vc,{size:10,get iconUrl(){return Ic(ue(),_.toToken().chainId)}})),G(r,()=>_.toToken().symbol),G(e,A(j,{get when(){return!c()},get children(){var e=Fy();return G(e,A(nc,{size:14})),T(()=>U(e,X.caret)),e}}),null),T(i=>{var a=`${X.tokenBtn}${c()?` ${X[`tokenBtn--locked`]}`:``}`,o=c()?void 0:`button`,s=X.tokenIconWrap,l=X.tokenChainDot,u=X.tokenName;return a!==i.e&&U(e,i.e=a),o!==i.t&&H(e,`role`,i.t=o),s!==i.a&&U(t,i.a=s),l!==i.o&&U(n,i.o=l),u!==i.i&&U(r,i.i=u),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}}),null),G(v,()=>xt()??` `),G(g,A(j,{get when(){return B(()=>l()===`crypto`)()&&Ie()===`quoted`},get children(){return A(pu,{secondsRemaining:Qe,totalSeconds:30,onRefresh:()=>ke.refetch(),isRefreshing:()=>ke.isFetching})}}),null),G(g,A(j,{get when(){return B(()=>l()===`card`)()&&N.phase()===`quoted`},get children(){return A(pu,{get secondsRemaining(){return tt.countdownSeconds},totalSeconds:30,onRefresh:()=>{N.refetchQuote(),tt.resetCountdown()},get isRefreshing(){return N.isQuoteFetching}})}}),null),T(e=>{var t=X.panelWrapper,n=C()?`5`:void 0,s=X.mergedPanel,c=X.mergedSection,l=X.panelHeader,_=X.panelLabel,y=X.panelDivider,b=X.mergedSection,x=X.panelHeader,S=X.panelLabel,w=X.panelRow,ee=X.panelFiatRow,T=`${X.fiat} ${xt()?``:X[`fiat--hidden`]}`;return t!==e.e&&U(r,e.e=t),n!==e.t&&Ur(r,`z-index`,e.t=n),s!==e.a&&U(i,e.a=s),c!==e.o&&U(a,e.o=c),l!==e.i&&U(o,e.i=l),_!==e.n&&U(u,e.n=_),y!==e.s&&U(d,e.s=y),b!==e.h&&U(f,e.h=b),x!==e.r&&U(p,e.r=x),S!==e.d&&U(m,e.d=S),w!==e.l&&U(h,e.l=w),ee!==e.u&&U(g,e.u=ee),T!==e.c&&U(v,e.c=T),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0}),r})(),A(Ye,{get children(){return[A(M,{get when(){return l()===`crypto`},get children(){return[A(j,{get when(){return Be()},get children(){var e=Ty();return G(e,A(cu,{})),T(()=>U(e,K.fadeIn)),e}}),A(j,{get when(){return B(()=>!!(Dt()&&_.fromToken()))()&&_.toToken()},get children(){var e=Hy();return G(e,A(lu,{get route(){return Dt()},get fromToken(){return _.fromToken()},get toToken(){return _.toToken()},inline:!0})),T(()=>U(e,xl.quote)),e}}),A(j,{get when(){return B(()=>!!Le())()&&!Be()},get children(){var e=Uy(),n=e.firstChild;return G(n,()=>t({id:`ln9xiv`,message:`No routes available`})),T(t=>{var r=`${X.noRoutesCard} ${K.fadeIn}`,i=K.noOfferText;return r!==t.e&&U(e,t.e=r),i!==t.t&&U(n,t.t=i),t},{e:void 0,t:void 0}),e}}),A(j,{get when(){return B(()=>!Be()&&!Dt())()&&!Le()},get children(){var e=Wy(),n=e.firstChild,r=n.nextSibling;return G(n,A(ec,{size:16})),G(r,()=>t({id:`1olegnl`,message:`Enter amount to get started`})),T(t=>{var i=`${Z.quoteCardSlotCard} ${X.idleCardInline} ${K.fadeIn}`,a=K.idleIcon,o=K.idleTitle;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}})]}}),A(M,{get when(){return nt()},get children(){var e=Gy(),n=e.firstChild,r=n.nextSibling,i=r.nextSibling;return G(n,A(Sc,{size:20})),G(r,()=>t({id:`fpand1`,message:`Enter destination address`})),G(i,()=>t({id:`19ne1ha`,message:`Connect wallet or enter an address to get a quote`})),T(t=>{var a=`${Z.quoteCardSlotCard} ${X.recipientGateCard} ${K.fadeIn}`,o=K.idleIcon,s=K.idleTitle,c=K.idleSub;return a!==t.e&&U(e,t.e=a),o!==t.t&&U(n,t.t=o),s!==t.a&&U(r,t.a=s),c!==t.o&&U(i,t.o=c),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),A(M,{get when(){return B(()=>l()===`card`)()&&N.phase()!==`error`},get children(){return[A(X_,{fiatCheckout:N,fiatCountdown:tt,get targetToken(){return _.toToken()??null},get fiatCurrency(){return te()},get apiBase(){return ue()},get showPayAmount(){return De()},hideCountdown:!0}),A(j,{get when(){return N.allQuotes().length>1},get children(){var e=Ky(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;return W(t,`click`,()=>S.show()),G(n,()=>N.allQuotes().slice(1).map(e=>(()=>{var t=Fy();return G(t,A(j,{get when(){return e.providerIcon},get fallback(){return B(()=>(e.providerName??e.provider).charAt(0).toUpperCase())},get children(){var t=nb();return T(n=>{var r=`${ue()}${e.providerIcon}`,i=e.provider;return r!==n.e&&H(t,`src`,n.e=r),i!==n.t&&H(t,`alt`,n.t=i),n},{e:void 0,t:void 0}),t}})),T(()=>U(t,Z.providerAvatar)),t})())),G(t,gt,r),T(r=>{var i=Z.providerToggle,a=Z.providerToggleBtn,o=Z.providerAvatars;return i!==r.e&&U(e,r.e=i),a!==r.t&&U(t,r.t=a),o!==r.a&&U(n,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e}})]}})]}}),A(j,{get when(){return B(()=>l()===`card`&&N.phase()===`error`)()&&N.error()},get children(){var e=qy(),t=e.firstChild,n=t.firstChild;return G(n,()=>N.error()),T(r=>{var i=Z.errorSlot,a=Z.errorArea,o=Z.errorText;return i!==r.e&&U(e,r.e=i),a!==r.t&&U(t,r.t=a),o!==r.a&&U(n,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e}}),(()=>{var e=Zy();return G(e,A(Ye,{get children(){return[A(M,{get when(){return l()===`crypto`},get children(){return A(Mu,{get phase(){return Ie()},get isConnected(){return O()},get hasQuote(){return Re()},onConnect:se,onConfirm:Je,onRetry:Xe,get errorLabel(){return _.error()??void 0},get needsRecipient(){return B(()=>!!_e())()&&!_.recipient()},onEnterRecipient:()=>x.show(),get insufficientBalance(){return Ce()}})}}),A(M,{get when(){return l()===`card`},get children(){return A(Ye,{get children(){return[A(M,{get when(){return N.phase()===`error`},get children(){var e=Jy();return W(e,`click`,vt),G(e,ht),T(()=>U(e,Tu.btnPrimary)),e}}),A(M,{get when(){return mt()},get children(){var e=Yy(),t=e.firstChild,n=t.firstChild;return G(t,ht,null),T(r=>{var i=`${Tu.btnPrimary} ${Tu.executing}`,a=Tu.btnInner,o=Tu.spinner;return i!==r.e&&U(e,r.e=i),a!==r.t&&U(t,r.t=a),o!==r.a&&U(n,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e}}),A(M,{get when(){return B(()=>!_.toToken())()&&(!!N.fiatAmount()||De())},get children(){var e=Jy();return W(e,`click`,()=>{y(`to`),b.show()}),G(e,()=>t({id:`zz4mrw`,message:`Select token`})),T(()=>U(e,Tu.btnRecipient)),e}}),A(M,{get when(){return nt()},get children(){var e=Jy();return W(e,`click`,()=>x.show()),G(e,()=>t({id:`wx5bee`,message:`Enter Recipient Address`})),T(()=>U(e,Tu.btnRecipient)),e}}),A(M,{get when(){return _t()},get children(){var e=Jy();return W(e,`click`,vt),G(e,ht),T(()=>U(e,Tu.btnPrimary)),e}}),A(M,{when:!0,get children(){var e=Xy();return G(e,ht),T(()=>U(e,Tu.btnPrimary)),e}})]}})}})]}})),T(()=>U(e,K.ctaWrapper)),e})()]}})]}}),A(j,{get when(){return!e.config.hidePoweredBy},get children(){var e=Ty();return G(e,A(Hc,{})),T(()=>U(e,K.footerSlot)),e}})],tracking:()=>A(Vd,{get order(){return _.order()},get fromToken(){return _.fromToken()},get toToken(){return _.toToken()},get providerName(){return Ge()},get providerIcon(){return Ke()},get apiEndpoint(){return n.apiEndpoint??`https://api.hyperstream.dev`},get inputAmount(){return _.inputAmount()},get outputAmount(){return Pe()},onNewSwap:Ze,onRetry:Xe,get executionError(){return qe()},mode:`swap`,get phase(){return Ie()},get chainMap(){return ge()}}),success:()=>A(xf,{get order(){return _.order()},get fromToken(){return _.fromToken()},get toToken(){return _.toToken()},onNewSwap:Ze,get apiEndpoint(){return n.apiEndpoint??`https://api.hyperstream.dev`},get providerName(){return Ge()},mode:`swap`,get chainMap(){return ge()}})}})}}),null),G(r,A(j,{get when(){return b.mounted()},get children(){return A(ah,{get client(){return ce()},get walletAddress(){return oe()},get selectingFor(){return v()},onSelect:Ct,onClose:()=>b.hide(),get supportedChainIds(){return e.walletAdapter?.supportedChainIds},get allowedTokens(){return B(()=>v()===`from`)()?de():fe()},get tokens(){return B(()=>!!(v()===`to`&&pe().length))()?pe():void 0},get noBorder(){return e.config.noBorder},get dismissing(){return b.dismissing()}})}}),null),G(r,A(j,{get when(){return B(()=>!!x.mounted())()&&_.toToken()},get children(){var e=Ty();return G(e,A(Og,{get initialValue(){return _.recipient()??``},get chainType(){return Iu(_.toToken().chainId)},onConfirm:e=>{ye(e),x.hide()},onClose:()=>x.hide(),get dismissing(){return x.dismissing()}})),T(()=>U(e,`${K.selectorOverlay}${x.dismissing()?` ${K.selectorOverlayDismissing}`:``}`)),e}}),null),G(r,A(j,{get when(){return S.mounted()},get children(){var e=Ty();return G(e,A(sp,{get quotes(){return N.allQuotes()},get selectedProviderId(){return N.selectedProviderId()},get fiatCurrency(){return te()},get apiBase(){return ue()},get tokenDecimals(){return ut()},get targetSymbol(){return _.toToken()?.symbol??``},get countdownSeconds(){return tt.countdownSeconds},totalCountdownSeconds:30,onRefresh:()=>{N.refetchQuote(),tt.resetCountdown()},get isRefreshing(){return N.isQuoteFetching},onSelect:e=>{N.setSelectedProvider(e),S.hide()},onClose:()=>S.hide()})),T(()=>U(e,`${K.selectorOverlay}${S.dismissing()?` ${K.selectorOverlayDismissing}`:``}`)),e}}),null),T(t=>{var n=`${K.container}${e.config.noBackground?` ${K.noBg}`:``}${e.config.noBorder?` ${K.noBorder}`:``}`,a=K.accentLine;return n!==t.e&&U(r,t.e=n),a!==t.t&&U(i,t.t=a),t},{e:void 0,t:void 0}),r})()}var ab=`.tf-2de115{border-radius:var(--tf-button-radius);box-sizing:border-box;background:linear-gradient(135deg, var(--tf-primary), color-mix(in srgb, var(--tf-primary) 80%, #000));width:100%;min-height:48px;color:var(--tf-text-on-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;box-shadow:0 4px 16px var(--tf-primary-glow);letter-spacing:-.01em;font-family:var(--tf-font-family);border:none;padding:14px 0;transition:transform .15s,opacity .15s,box-shadow .15s}.tf-2de115:hover{opacity:.95;box-shadow:0 6px 20px var(--tf-primary-glow);transform:translateY(-1px)}.tf-2de115:active{transform:translateY(0)}.tf-0d518f{opacity:.6}.tf-47dc2a{background:var(--tf-primary);cursor:wait;opacity:.85}.tf-44b8f1{border-radius:var(--tf-button-radius);border:1px solid var(--tf-primary);box-sizing:border-box;background:var(--tf-primary-light);width:100%;min-height:48px;color:var(--tf-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;font-family:var(--tf-font-family);padding:14px 0;transition:transform .15s,background .15s}.tf-44b8f1:hover{transform:translateY(-1px)}.tf-44b8f1:active{transform:translateY(0)}.tf-04fe16{border-radius:var(--tf-button-radius);border:1.5px dashed var(--tf-primary);box-sizing:border-box;background:var(--tf-primary-light);width:100%;min-height:48px;color:var(--tf-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;font-family:var(--tf-font-family);padding:14px 0;transition:transform .15s,background .15s;animation:2s ease-in-out infinite tf-d53743}.tf-04fe16:hover{background:var(--tf-primary-glow);transform:translateY(-1px)}.tf-04fe16:active{transform:translateY(0)}.tf-65cf23{border-radius:var(--tf-button-radius);box-sizing:border-box;text-align:center;background:var(--tf-success-bg);width:100%;min-height:48px;color:var(--tf-success);font-weight:600;font-size:var(--tf-font-xl);border:none;justify-content:center;align-items:center;gap:8px;padding:14px 0;display:flex}.tf-2f0314{border-radius:var(--tf-button-radius);box-sizing:border-box;text-align:center;background:var(--tf-error-bg);width:100%;min-height:48px;color:var(--tf-error);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;border:none;justify-content:center;align-items:center;gap:8px;padding:14px 0;transition:transform .15s,opacity .15s;display:flex}.tf-2f0314:hover{opacity:.85;transform:translateY(-1px)}.tf-2f0314:active{transform:translateY(0)}.tf-20b1ac{justify-content:center;align-items:center;gap:8px;display:flex}.tf-e6dae0{border:2px solid #ffffff4d;border-top-color:var(--tf-text-on-primary,#fff);border-radius:50%;width:16px;height:16px;animation:.8s linear infinite tf-8a3bc2;display:inline-block}.tf-90e712{width:14px;height:14px}@keyframes tf-8a3bc2{to{transform:rotate(360deg)}}`,ob=`.tf-59b76a{font-size:var(--tf-font-amount);letter-spacing:-.02em;color:var(--tf-text);font-weight:700;line-height:100%;font-family:var(--tf-font-family);text-align:left;background:0 0;border:none;outline:none;width:100%;min-width:0}.tf-59b76a::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tf-59b76a::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tf-59b76a{-moz-appearance:textfield}.tf-59b76a::placeholder,.tf-a859d8{color:var(--tf-text-tertiary)}`,sb=`@keyframes tf-c1e2f1{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.97)}}@keyframes tf-c41d8a{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.tf-e6f4f9{flex-direction:column;flex:1;display:flex;position:relative}.tf-02c58b{z-index:1;pointer-events:none;width:100%;animation:.35s both tf-c1e2f1;position:absolute;top:0;left:0}.tf-8975d9{animation:.4s .1s both tf-c41d8a}.tf-94ab07{flex-direction:column;flex:1;display:flex}`,cb=`.tf-bdf976{z-index:50;border-radius:var(--tf-radius);border:1px solid var(--tf-border);background:var(--tf-bg);min-width:200px;max-height:300px;box-shadow:var(--tf-shadow-lg);flex-direction:column;margin-top:6px;animation:.15s both tf-c88647;display:flex;position:absolute;top:100%;right:0}.tf-0d4452{padding:8px 8px 4px}.tf-7e8f39{border-radius:var(--tf-radius-sm);border:1px solid var(--tf-border-light);background:var(--tf-input-bg);width:100%;color:var(--tf-text);font-size:var(--tf-font-sm);font-family:var(--tf-font-family);box-sizing:border-box;outline:none;padding:8px 10px;transition:border-color .15s}.tf-7e8f39::placeholder{color:var(--tf-text-tertiary)}.tf-7e8f39:focus{border-color:var(--tf-primary)}.tf-7b9980{overscroll-behavior:contain;scrollbar-width:none;flex:1;padding:4px;overflow-y:auto}.tf-7b9980::-webkit-scrollbar{display:none}.tf-6a97ad{border-radius:var(--tf-radius-sm);width:100%;color:var(--tf-text);font-size:var(--tf-font-sm);cursor:pointer;font-weight:500;font-family:var(--tf-font-family);text-align:left;background:0 0;border:none;align-items:center;gap:8px;padding:8px 10px;transition:background .1s;display:flex}.tf-6a97ad:hover{background:var(--tf-surface-hover)}.tf-c939b4{background:var(--tf-primary-light);color:var(--tf-primary)}.tf-1e672b{text-align:center;flex-shrink:0;width:22px;font-size:16px;line-height:1}.tf-63111f{min-width:32px;font-weight:600}.tf-5c9e1e{color:var(--tf-text-tertiary);white-space:nowrap;text-overflow:ellipsis;flex:1;font-weight:400;overflow:hidden}.tf-cabaa6{color:var(--tf-primary);flex-shrink:0}.tf-efb45d{text-align:center;color:var(--tf-text-tertiary);font-size:var(--tf-font-sm);padding:16px}`,lb=`.tf-5cc2e5{flex-direction:column;gap:8px;margin:4px 20px 12px;display:flex}.tf-292b5c{background:var(--tf-input-bg);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius);color:var(--tf-text);font-size:var(--tf-font-base);cursor:pointer;align-items:center;gap:14px;padding:14px 16px;font-family:inherit;font-weight:500;transition:all .15s;display:flex}.tf-292b5c:hover{background:var(--tf-surface-hover);border-color:var(--tf-border)}.tf-4ceb2d{border-radius:var(--tf-radius-sm);flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.tf-0f5916{background:linear-gradient(225deg, color-mix(in srgb, var(--tf-primary) 10%, transparent), color-mix(in srgb, var(--tf-primary) 3%, transparent));border:1px solid color-mix(in srgb, var(--tf-primary) 19%, transparent);color:var(--tf-primary)}.tf-4aaad9{background:linear-gradient(225deg, color-mix(in srgb, var(--tf-success) 10%, transparent), color-mix(in srgb, var(--tf-success) 3%, transparent));border:1px solid color-mix(in srgb, var(--tf-success) 19%, transparent);color:var(--tf-success)}.tf-0fbb44{text-align:left;flex-direction:column;flex:1;gap:2px;display:flex}.tf-47c991{font-size:var(--tf-font-md);color:var(--tf-text);font-weight:600}.tf-474f21{font-size:var(--tf-font-xs);color:var(--tf-text-tertiary);font-weight:400}.tf-16f0ec{color:var(--tf-text-tertiary);align-items:center;display:flex}.tf-612245{flex-direction:column;flex:1;display:flex}.tf-bcbc56{background:color-mix(in srgb, var(--tf-error) 10%, transparent);border:1px solid color-mix(in srgb, var(--tf-error) 30%, transparent);border-radius:var(--tf-radius-sm);color:var(--tf-error);font-size:var(--tf-font-sm);text-align:center;margin:0 20px 12px;padding:12px 14px}`,ub=`.tf-062e26{flex:1;align-items:baseline;min-width:0;display:flex}.tf-8f452a{font-size:var(--tf-font-amount);color:var(--tf-text-tertiary);flex-shrink:0;margin-right:2px;font-weight:700;line-height:1}.tf-1a6365{font-size:var(--tf-font-amount);letter-spacing:-.02em;font-weight:700;font-family:var(--tf-font-family);width:100%;min-width:0;color:var(--tf-text);text-align:left;background:0 0;border:none;outline:none;line-height:1}.tf-1a6365::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tf-1a6365::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tf-1a6365{-moz-appearance:textfield}.tf-1a6365::placeholder{color:var(--tf-text-tertiary)}.tf-991c0d{background:var(--tf-surface);border-radius:var(--tf-radius-sm);box-sizing:border-box;border:1px solid var(--tf-border);cursor:pointer;height:36px;font-family:var(--tf-font-family);flex-shrink:0;align-items:center;gap:6px;padding:6px 12px;transition:background .15s,border-color .15s,transform .1s;display:flex;position:relative}.tf-991c0d:hover{background:var(--tf-surface-hover);transform:scale(1.02)}.tf-a9a7d7{cursor:default;pointer-events:none}.tf-a9a7d7:hover{background:var(--tf-surface);transform:none}.tf-991c0d:focus-within{outline:2px solid var(--tf-primary);outline-offset:2px}.tf-dc8a7b{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600}.tf-4bb83d{opacity:0;cursor:pointer;-webkit-appearance:none;appearance:none;border:none;width:100%;height:100%;position:absolute;top:0;left:0}.tf-19de08{font-size:var(--tf-font-amount);color:var(--tf-text);letter-spacing:-.02em;flex:1;min-width:0;font-weight:700;line-height:1}.tf-2ee659{color:var(--tf-text-tertiary)}.tf-cbd017{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)}.tf-36561c{color:var(--tf-error)}.tf-f78710{margin:10px 20px 0}.tf-b584f9{background:var(--tf-surface);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius-lg);padding:14px 16px;animation:.25s both tf-7df115}.tf-d8fd5c{background:var(--tf-surface);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius-lg);margin:12px 20px 0;padding:14px 16px;animation:.25s both tf-7df115}.tf-96a148{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}.tf-4337e5{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-weight:500}.tf-1bf9bf{border-radius:var(--tf-radius-sm);background:var(--tf-success-bg);color:var(--tf-success);letter-spacing:.5px;text-transform:uppercase;align-items:center;padding:2px 8px;font-size:10px;font-weight:700;display:inline-flex}.tf-2e8f34{font-size:var(--tf-font-lg);color:var(--tf-text);margin-bottom:8px;font-weight:700}.tf-2fa202{justify-content:space-between;align-items:baseline;display:flex}.tf-45bc49{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600;font-family:var(--tf-font-family-mono)}.tf-fdf611{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)}.tf-0e3026{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);margin-top:8px}.tf-fb4397{margin:6px 20px 0;overflow:hidden}.tf-2db646{background:color-mix(in srgb, var(--tf-primary) 6%, transparent);border:1px solid color-mix(in srgb, var(--tf-primary) 12%, transparent);border-radius:var(--tf-radius-sm);flex-direction:column;gap:10px;margin:10px 0 0;padding:14px 16px;animation:.25s both tf-7df115;display:flex}.tf-c78adb{font-size:var(--tf-font-sm);color:var(--tf-text-secondary);text-align:center;font-weight:500}.tf-b84c90{cursor:pointer;color:var(--tf-text-tertiary);opacity:.6;align-items:center;transition:opacity .15s;display:inline-flex}.tf-b84c90:hover{opacity:1}.tf-bb0779{background:var(--tf-bg-elevated,var(--tf-bg));border:1px solid var(--tf-border);border-radius:var(--tf-radius-sm);width:240px;color:var(--tf-text-secondary);font-size:var(--tf-font-sm,12px);text-align:center;z-index:10;pointer-events:none;padding:8px 10px;font-weight:400;line-height:1.45;animation:.15s tf-4bb2f7;position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%);box-shadow:0 4px 12px #00000040}.tf-306e03{justify-content:center;align-items:center;gap:6px;display:flex}.tf-5602d3{flex-direction:column;align-items:center;gap:4px;min-width:0;display:flex}.tf-78593f{justify-content:center;align-items:center;display:flex;position:relative}.tf-5527d4{background:var(--tf-surface);border:1px solid var(--tf-border);width:28px;height:28px;font-size:var(--tf-font-md);color:var(--tf-text);border-radius:50%;justify-content:center;align-items:center;font-weight:700;display:flex}.tf-0e800e{background:color-mix(in srgb, var(--tf-success) 15%, transparent);width:28px;height:28px;color:var(--tf-success);border-radius:50%;justify-content:center;align-items:center;display:flex}.tf-ade349{color:var(--tf-text-tertiary);white-space:nowrap;text-overflow:ellipsis;text-align:center;max-width:64px;font-size:10px;font-weight:500;overflow:hidden}.tf-ba22f3{color:var(--tf-text-tertiary);flex-shrink:0;margin-top:-16px}.tf-64436e{justify-content:center;margin-top:4px;padding:4px 20px;display:flex}.tf-df7635{border-radius:var(--tf-radius-xl);border:1px solid var(--tf-border-light);background:var(--tf-surface);color:var(--tf-primary);font-size:var(--tf-font-sm);cursor:pointer;font-weight:500;font-family:var(--tf-font-family);align-items:center;gap:8px;padding:6px 14px;transition:background .15s,border-color .15s;display:inline-flex}.tf-df7635:hover{background:var(--tf-surface-hover);border-color:var(--tf-primary)}.tf-aae089{align-items:center;display:flex}.tf-b211ea{border:1.5px solid var(--tf-surface);background:var(--tf-input-bg);object-fit:contain;width:20px;height:20px;color:var(--tf-text-secondary);border-radius:50%;justify-content:center;align-items:center;font-size:10px;font-weight:700;display:flex;overflow:hidden}.tf-b211ea+.tf-b211ea{margin-left:-6px}.tf-b211ea img{object-fit:contain;width:100%;height:100%}.tf-e99a74{flex-direction:column;gap:6px;margin:6px 20px 0;animation:.2s both tf-7df115;display:flex}.tf-839279{background:var(--tf-surface);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius);cursor:pointer;font-family:var(--tf-font-family);justify-content:space-between;align-items:center;padding:12px 14px;transition:border-color .15s,background .15s;display:flex}.tf-839279:hover{border-color:var(--tf-border);background:var(--tf-surface-hover)}.tf-b68773{border-color:var(--tf-primary);background:color-mix(in srgb, var(--tf-primary) 6%, var(--tf-surface))}.tf-845c61{font-size:var(--tf-font-sm);align-items:center;gap:4px;font-weight:500;display:inline-flex}.tf-a514cb{color:var(--tf-success)}.tf-35e95b{color:var(--tf-warning)}.tf-57fdcd{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);align-items:center;gap:6px;display:flex}.tf-e10cfb{object-fit:contain;border-radius:4px;width:16px;height:16px}.tf-4386a3{justify-content:center;align-items:center;margin:10px 20px 0;display:flex}.tf-96a3b0{background:var(--tf-error-alpha,#ef44440f);border:1px solid var(--tf-error-bg);border-radius:var(--tf-radius-sm);text-align:center;width:100%;padding:14px;animation:.25s both tf-7df115}.tf-539af2{font-size:var(--tf-font-md);color:var(--tf-error);margin-bottom:12px}.tf-002628{background:var(--tf-error-alpha,#ef44440f);border:1px solid var(--tf-error-bg);border-radius:var(--tf-radius-sm);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:8px;height:100%;padding:20px 16px;animation:.25s both tf-7df115;display:flex;overflow-y:auto}.tf-8ddccf{color:var(--tf-error);opacity:.8;flex-shrink:0}.tf-0ebcc2{font-size:var(--tf-font-lg);color:var(--tf-error);font-weight:600}.tf-c6db08{font-size:var(--tf-font-sm);color:var(--tf-text-secondary);max-width:280px;line-height:1.5}.tf-4f9afa{border-radius:var(--tf-radius);background:var(--tf-bg-secondary);width:100%;color:var(--tf-text);font-size:var(--tf-font-lg);cursor:pointer;border:1px solid var(--tf-border);font-weight:600;font-family:var(--tf-font-family);padding:12px;transition:opacity .2s,transform .15s}.tf-4f9afa:hover{opacity:.85;transform:translateY(-1px)}.tf-4f9afa:active{transform:scale(.98)}.tf-3e82ef{padding:12px 20px 0}@keyframes tf-a108b2{0%,to{opacity:1}50%{opacity:.4}}.tf-2f01a5{border-radius:var(--tf-radius-xs);animation:1.5s ease-in-out infinite tf-a108b2;overflow:hidden;background:var(--tf-skeleton)!important;color:#0000!important}`,db=`@keyframes tf-d36961{to{transform:rotate(360deg)}}@keyframes tf-3cfd5b{0%{transform:scale(1)}50%{transform:scale(1.15)}to{transform:scale(1)}}.tf-5835df{box-sizing:border-box;width:100%;min-width:0;padding:24px 20px 16px;animation:.3s both tf-e061c9;overflow:hidden}.tf-9322ae{border-bottom:1px solid var(--tf-border-light);justify-content:center;align-items:center;gap:12px;margin-bottom:4px;padding-bottom:20px;display:flex}.tf-7d5519{flex:1;justify-content:flex-start;align-items:center;min-width:0;display:flex}.tf-0b8d30{justify-content:flex-end}.tf-bfbd0b{align-items:center;gap:8px;min-width:0;display:flex}.tf-7e8fdf{flex-shrink:0;width:32px;height:32px;position:relative}.tf-37f3cf{background:var(--tf-bg);border:1.5px solid var(--tf-bg);border-radius:50%;justify-content:center;align-items:center;width:16px;height:16px;display:flex;position:absolute;bottom:-2px;right:-2px}.tf-9401fd{flex-direction:column;min-width:0;display:flex;overflow:hidden}.tf-832fae{font-family:var(--tf-font-family-mono);font-weight:600;font-size:var(--tf-font-lg);color:var(--tf-text);white-space:nowrap;line-height:1.2}.tf-b557fc{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-weight:500;line-height:1.2}.tf-2b42d5{background:var(--tf-primary-light);border:1px solid color-mix(in srgb, var(--tf-primary) 30%, transparent);width:32px;height:32px;font-size:var(--tf-font-lg);color:var(--tf-primary);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-weight:700;display:flex}.tf-5953e8{color:var(--tf-text-tertiary);flex-shrink:0}.tf-a168c7{text-align:center;font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);justify-content:center;align-items:center;gap:6px;padding-bottom:16px;display:flex}.tf-062404{object-fit:contain;border-radius:4px;width:16px;height:16px}.tf-26af4c{flex-direction:column;display:flex}.tf-4b9be7{gap:12px;display:flex}.tf-036db2{width:28px;height:28px;font-size:var(--tf-font-base);z-index:1;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-weight:600;display:flex}.tf-09b7bb{background:var(--tf-success-bg);color:var(--tf-success);animation:.4s tf-3cfd5b}.tf-aef7e0{background:var(--tf-primary-light)}.tf-5c628c{background:var(--tf-input-bg);color:var(--tf-text-tertiary);border:1px solid var(--tf-border-light)}.tf-a5abdf{background:var(--tf-error-bg);color:var(--tf-error)}.tf-9efe7c{border:2px solid var(--tf-primary-light);border-top-color:var(--tf-primary);border-radius:50%;width:14px;height:14px;animation:.8s linear infinite tf-d36961}.tf-5c7806{border-color:color-mix(in srgb, var(--tf-error) 20%, transparent);border-top-color:var(--tf-error)}.tf-185719{flex:1;min-width:0;padding-bottom:20px;position:relative}.tf-185719:before{content:"";background:var(--tf-border-light);width:2px;position:absolute;top:28px;bottom:0;left:-26px}.tf-4b9be7:last-child .tf-185719:before{display:none}.tf-4b9be7:last-child .tf-185719{padding-bottom:4px}.tf-84527b .tf-185719:before{background:var(--tf-success)}.tf-417d35 .tf-185719:before{background:var(--tf-error)}.tf-aad7e9{font-size:var(--tf-font-md);color:var(--tf-text);font-weight:600;line-height:28px}.tf-8de1c6 .tf-aad7e9{color:var(--tf-text-tertiary)}.tf-417d35 .tf-aad7e9{color:var(--tf-error)}.tf-bcb46a{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);word-break:break-word;overflow-wrap:break-word;flex-wrap:wrap;align-items:center;gap:6px;margin-top:2px;display:flex}.tf-16cfdc .tf-bcb46a{color:var(--tf-primary)}.tf-0aa291{font-size:var(--tf-font-sm);color:var(--tf-primary);align-items:center;gap:3px;text-decoration:none;transition:opacity .15s;display:inline-flex}.tf-0aa291:hover{opacity:.7}.tf-234e31{border-radius:var(--tf-radius);background:var(--tf-error-alpha,#ef44440f);border:1px solid var(--tf-error-bg);text-align:center;margin-top:20px;padding:16px}.tf-adb588{font-size:var(--tf-font-md);color:var(--tf-text-secondary);margin-bottom:12px;line-height:1.5}.tf-11fa21{font-size:var(--tf-font-base);color:var(--tf-primary);align-items:center;gap:4px;margin-bottom:12px;text-decoration:none;transition:opacity .15s;display:inline-flex}.tf-11fa21:hover{opacity:.7}.tf-4f7573{border-radius:var(--tf-radius);background:linear-gradient(135deg, var(--tf-success), color-mix(in srgb, var(--tf-success) 80%, #000));width:100%;color:var(--tf-text-on-primary);font-size:var(--tf-font-lg);cursor:pointer;border:none;padding:12px;font-weight:600;transition:opacity .2s,transform .15s}.tf-4f7573:hover{opacity:.9;transform:translateY(-1px)}.tf-4f7573:active{transform:scale(.98)}.tf-c918a2{text-align:center;margin-top:16px}.tf-ad7aab{visibility:hidden;pointer-events:none}.tf-603d2e{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);margin-bottom:8px}.tf-1e22cb{border-radius:var(--tf-radius);background:var(--tf-bg-secondary);width:100%;color:var(--tf-text);font-size:var(--tf-font-lg);cursor:pointer;border:1px solid var(--tf-border);padding:12px;font-weight:600;transition:opacity .2s,transform .15s}.tf-1e22cb:hover{opacity:.85;transform:translateY(-1px)}.tf-1e22cb:active{transform:scale(.98)}`,fb=`.tf-28b876{border-radius:var(--tf-radius-xl);background:var(--tf-bg);border:1px solid var(--tf-border);width:100%;max-width:400px;box-shadow:var(--tf-shadow-lg);font-family:var(--tf-font-family);color:var(--tf-text);flex-direction:column;height:100%;display:flex;overflow:hidden}.tf-2aa545{flex-shrink:0;padding:18px 20px 14px}.tf-bcba74{justify-content:space-between;align-items:center;display:flex}.tf-a974e8{font-size:var(--tf-font-xl);font-weight:600}.tf-14447c{align-items:center;gap:10px;display:flex}.tf-527e42{border-radius:var(--tf-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--tf-text-tertiary);background:var(--tf-input-bg);font-family:var(--tf-font-family);border:none;justify-content:center;align-items:center;display:flex}.tf-527e42:hover{background:var(--tf-surface-hover)}.tf-a5a3ce{background:var(--tf-border);flex-shrink:0;height:1px;margin:0 20px}.tf-211bfe{flex:1;min-height:0;padding:6px 8px;overflow-y:auto}.tf-fd33c1{border-radius:var(--tf-radius);cursor:pointer;width:100%;font-family:var(--tf-font-family);background:0 0;border:1px solid #0000;justify-content:space-between;align-items:center;padding:12px;transition:background .1s;display:flex}.tf-fd33c1:hover{background:var(--tf-surface-hover)}.tf-a0382b{background:var(--tf-primary-light);border-color:var(--tf-primary)}.tf-a0382b:hover{background:var(--tf-primary-light)}.tf-2aece4{align-items:center;gap:12px;display:flex}.tf-949870{border-radius:var(--tf-radius-xs);object-fit:contain;flex-shrink:0;width:32px;height:32px}.tf-13e09e{border-radius:var(--tf-radius-xs);background:var(--tf-input-bg);width:32px;height:32px;font-size:var(--tf-font-lg);color:var(--tf-text-secondary);flex-shrink:0;justify-content:center;align-items:center;font-weight:700;display:flex}.tf-2387c4{flex-direction:column;align-items:flex-start;gap:2px;display:flex}.tf-74069b{font-size:var(--tf-font-lg);color:var(--tf-text);align-items:center;gap:8px;font-weight:600;display:flex}.tf-113a28{letter-spacing:.03em;text-transform:uppercase;color:var(--tf-primary);background:var(--tf-primary-light);border-radius:4px;padding:2px 6px;font-size:10px;font-weight:700;line-height:1.2}.tf-69fe0b{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)}.tf-cb2799{align-items:center;gap:8px;display:flex}.tf-d4ce76{font-size:var(--tf-font-md);color:var(--tf-text-secondary);font-weight:500;font-family:var(--tf-font-family-mono);text-align:right}.tf-b3b747{color:var(--tf-primary);flex-shrink:0}`,pb=`.tf-216412{align-items:center;gap:4px;display:inline-flex}.tf-40ee76{cursor:pointer;border-radius:4px;margin:-2px -4px;padding:2px 4px;transition:background .15s}.tf-40ee76:hover{background:var(--tf-surface-hover)}.tf-52dc68{flex-shrink:0}.tf-25c5c8{animation:.8s linear infinite tf-27c522}@keyframes tf-27c522{to{transform:rotate(360deg)}}.tf-fd32be{font-size:var(--tf-font-sm);color:var(--tf-text-secondary);min-width:20px}`,mb=`.tf-1019c2{background:var(--tf-bg-secondary);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);min-height:80px;font-size:var(--tf-font-base);color:var(--tf-text-secondary);box-sizing:border-box;flex-direction:column;justify-content:center;gap:8px;margin:12px 20px 0;padding:14px;animation:.25s both tf-42889f;display:flex}.tf-4922f1{justify-content:space-between;align-items:center;display:flex}.tf-57f45f{font-family:var(--tf-font-family-mono);font-size:var(--tf-font-sm)}.tf-d74ccc{justify-content:space-between;align-items:center;display:flex}.tf-92e7a8{width:68px;height:14px}.tf-d20f50{width:56px}.tf-a9a96f{width:150px;height:14px}.tf-0134eb{width:126px}.tf-91635c{width:80px}.tf-ca1291{cursor:pointer;border-bottom:1px solid var(--tf-border-light);margin-bottom:10px;transition:opacity .15s}.tf-ca1291:hover{opacity:.7}.tf-ca1291 .tf-57f45f{align-items:center;gap:4px;display:inline-flex}.tf-ca1291 .tf-57f45f svg{opacity:.35;flex-shrink:0;transition:opacity .15s}.tf-ca1291:hover .tf-57f45f svg{opacity:.7}.tf-a249b3 .tf-recipient-placeholder{color:var(--tf-error)}.tf-adeddd{border:1px dashed var(--tf-primary);border-radius:var(--tf-radius);margin-bottom:10px;padding:8px 12px;animation:2s ease-in-out infinite tf-d990e5}.tf-adeddd .tf-recipient-placeholder{color:var(--tf-primary);font-style:normal}`,hb=`.tf-9b71d6{box-sizing:border-box;justify-content:space-between;align-items:center;gap:7px;height:65px;padding:0 20px;display:flex}.tf-4c9136{padding:0 20px 10px}.tf-febe61{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);text-align:left;box-sizing:border-box;height:22px;font-weight:500}.tf-b8cb88{cursor:pointer;color:var(--tf-text-tertiary);height:36px;font-family:var(--tf-font-family);font-size:var(--tf-font-sm);border-radius:var(--tf-radius-sm);background:0 0;border:none;align-items:center;gap:6px;padding:0 8px;font-weight:500;transition:color .15s,background .15s;display:flex}.tf-b8cb88:hover{color:var(--tf-text-secondary);background:var(--tf-input-bg)}.tf-bf5d6c{pointer-events:none}.tf-0d09cf{animation:.3s both tf-398c5c;display:inline-flex}@keyframes tf-398c5c{0%{opacity:0;transform:translate(-20px)}to{opacity:1;transform:translate(0)}}.tf-2368bf{animation:.3s both tf-86d030;display:inline}@keyframes tf-86d030{0%{transform:translate(-20px)}to{transform:translate(0)}}.tf-b31fd2{animation:.25s reverse both tf-398c5c;display:inline-flex}.tf-f55867{animation:.25s reverse both tf-86d030;display:inline}.tf-a27aab{background:var(--tf-input-bg);border-radius:var(--tf-radius);border:1px solid var(--tf-border-light);box-sizing:border-box;flex-direction:column;gap:8px;padding:12px 14px 14px;display:flex}.tf-d62361{align-items:center;gap:10px;height:48px;display:flex}.tf-f0b3f5{flex-shrink:0;position:relative}.tf-7a6fbc{width:12px;height:12px;position:absolute;bottom:-1px;right:-1px}.tf-e9e9a1{font-size:var(--tf-font-amount-sm);letter-spacing:-.02em;font-weight:700}.tf-f3baad{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600;line-height:20px}.tf-0131e4{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-family:var(--tf-font-family-mono);margin-left:auto}.tf-e8980b{font-size:var(--tf-font-amount-sm);letter-spacing:-.02em;font-weight:700;font-family:var(--tf-font-family);width:80px;min-width:0;color:var(--tf-text);text-align:left;background:0 0;border:none;outline:none;line-height:1}.tf-e8980b::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.tf-e8980b::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tf-e8980b{-moz-appearance:textfield}.tf-e8980b::placeholder{color:var(--tf-text-tertiary)}.tf-81181d{border-radius:var(--tf-radius);border:1px solid var(--tf-border-light);background:var(--tf-input-bg);cursor:pointer;width:100%;height:56px;font-family:var(--tf-font-family);align-items:center;padding:0 14px;transition:background .15s,border-color .15s;display:flex}.tf-81181d:hover{border-color:var(--tf-primary);background:var(--tf-primary-light)}.tf-81181d:active{transform:scale(.98)}.tf-a274dd{align-items:center;gap:9px;display:flex}.tf-0039f9{position:relative}.tf-2ee752{background:var(--tf-surface);border:1px solid var(--tf-border);border-radius:50%;justify-content:center;align-items:center;width:11px;height:11px;display:flex;position:absolute;bottom:-1px;right:-1px}.tf-96714d{text-align:left;flex-direction:column;gap:1px;line-height:1.2;display:flex}.tf-619747{align-items:center;gap:5px;display:flex}.tf-cd221a{font-size:var(--tf-font-base);color:var(--tf-text);font-weight:600}.tf-2c683f{font-size:var(--tf-font-2xs);background:var(--tf-success-bg);color:var(--tf-success);border-radius:3px;padding:1px 4px;font-weight:700}.tf-c839a0{font-size:var(--tf-font-xs);color:var(--tf-text-tertiary)}.tf-0b0d52{text-align:right;flex-direction:column;gap:1px;margin-left:auto;margin-right:8px;line-height:1.2;display:flex}.tf-19df0d{font-size:var(--tf-font-lg);font-weight:500;font-family:var(--tf-font-family-mono);color:var(--tf-text);letter-spacing:-.02em}.tf-c7d33a{font-size:var(--tf-font-xs);color:var(--tf-text-tertiary);font-family:var(--tf-font-family-mono)}.tf-e51789{color:var(--tf-text-tertiary);flex-shrink:0;align-items:center;transition:transform .2s;display:flex}.tf-8a3107{border-radius:4px;width:60px;height:16px}.tf-e255df{border-radius:var(--tf-radius);border:1px solid var(--tf-border-light);background:var(--tf-input-bg);cursor:default;pointer-events:none;align-items:center;padding:11px 14px;display:flex}.tf-fb2771{border-radius:50%;width:32px;height:32px}.tf-1b1e61{flex-direction:column;gap:6px;margin-left:9px;display:flex}.tf-18dcca{height:10px}.tf-a5c85b{width:52px}.tf-12a725{width:40px}.tf-df9ebb{flex-direction:column;align-items:flex-end;gap:6px;margin-left:auto;display:flex}.tf-3547fa{width:60px}.tf-a46696{width:44px}.tf-1d40de{background:var(--tf-surface);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius);flex-direction:column;justify-content:center;align-items:center;gap:10px;min-height:180px;padding:14px 16px;display:flex}.tf-5d25d7{font-size:var(--tf-font-md);color:var(--tf-text-secondary);font-weight:600}`,gb=`.tf-636daf{background:var(--tf-bg);border-radius:var(--tf-radius-xl) var(--tf-radius-xl) 0 0;flex-direction:column;width:100%;height:300px;animation:.3s cubic-bezier(.32,.72,0,1) both tf-6933ac;display:flex;overflow:hidden;box-shadow:0 -4px 24px #00000026}@keyframes tf-6933ac{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes tf-cc2d20{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}.tf-75c7ef{animation:.2s both tf-cc2d20}.tf-fddfab{border-bottom:1px solid var(--tf-border-light);justify-content:space-between;align-items:center;padding:16px 20px;display:flex}.tf-970eb9{font-size:var(--tf-font-2xl);color:var(--tf-text);font-weight:600}.tf-de123a{cursor:pointer;color:var(--tf-text-secondary);border-radius:var(--tf-radius-xs);background:0 0;border:none;justify-content:center;align-items:center;padding:4px;transition:background .15s;display:flex}.tf-de123a:hover{background:var(--tf-bg-elevated)}.tf-0445e3{flex-direction:column;flex:1;gap:8px;padding:16px 20px;display:flex}.tf-9a65ec{background:var(--tf-input-bg);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius);width:100%;min-height:80px;font-size:var(--tf-font-lg);font-family:var(--tf-font-family-mono);color:var(--tf-text);resize:none;box-sizing:border-box;outline:none;padding:12px 14px;transition:border-color .2s,box-shadow .2s}.tf-9a65ec::placeholder{color:var(--tf-text-tertiary)}.tf-9a65ec:focus{border-color:var(--tf-primary);box-shadow:0 0 0 3px var(--tf-primary-alpha)}.tf-c5ea21{border-color:var(--tf-error)}.tf-c5ea21:focus{border-color:var(--tf-error);box-shadow:0 0 0 3px var(--tf-error-alpha)}.tf-9d4bba{font-size:var(--tf-font-base);color:var(--tf-error);padding:0 2px}.tf-cb9b60{padding:16px 20px 20px}.tf-2cba65{width:100%}.tf-2cba65:disabled{opacity:.5;cursor:not-allowed}`,_b=`@keyframes tf-6887ec{0%{opacity:.6}to{opacity:1}}.tf-ba406b{align-items:baseline;transition:opacity .15s;display:inline-flex}.tf-9d81a4{opacity:.85;font-size:.7em;line-height:1}.tf-7977ef{cursor:help}`,vb=`@keyframes tf-07c947{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.tf-dc5721{box-sizing:border-box;justify-content:space-between;align-items:center;height:65px;padding:0 20px;display:flex}.tf-68123c{align-items:center;gap:7px;min-width:0;display:flex}.tf-532d07{object-fit:contain;flex-shrink:0;width:auto;max-width:88px;height:22px}.tf-aede09{max-width:144px}.tf-b7936a{font-size:var(--tf-font-xl);letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:600;display:inline-block;overflow:hidden}.tf-30630d{display:none}.tf-883305{color:var(--tf-primary)}.tf-bc1b05{font-size:var(--tf-font-sm);align-items:center;gap:5px;padding:12px 20px 0;display:flex}.tf-bc1b05+.tf-98d625{padding-top:10px}.tf-dd09ea{cursor:pointer;font-family:var(--tf-font-family);font-size:var(--tf-font-sm);color:var(--tf-primary);background:0 0;border:none;padding:0;font-weight:500;transition:opacity .15s}.tf-dd09ea:hover{opacity:.8}.tf-018710{color:var(--tf-text-tertiary);font-weight:400}.tf-21456c{color:var(--tf-text-secondary);font-weight:500}.tf-6da3db{cursor:pointer;border-radius:var(--tf-radius-sm);background:0 0;border:none;align-items:center;gap:6px;padding:4px 8px;font-family:inherit;transition:background .15s;display:flex}.tf-6da3db:hover{background:var(--tf-surface-hover)}.tf-6da3db:focus-visible{outline:2px solid var(--tf-primary);outline-offset:2px}.tf-d25568{background:var(--tf-primary);width:8px;height:8px;box-shadow:0 0 8px var(--tf-primary-glow);border-radius:50%}.tf-16ce7d{background:var(--tf-success);box-shadow:0 0 8px var(--tf-success)}.tf-11bb1d{font-size:var(--tf-font-base);color:var(--tf-text-secondary);font-family:var(--tf-font-family-mono)}.tf-98d625,.tf-8b7743{padding:0 20px}.tf-fdf8be{margin-top:6px}.tf-677ece{background:var(--tf-input-bg);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);padding:14px 16px;transition:border-color .2s,background .25s,box-shadow .2s}.tf-635915{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.tf-b8a04a{align-items:center;gap:8px;display:inline-flex}.tf-0d1ef8{font-size:var(--tf-font-base);color:var(--tf-text-tertiary);text-align:left;font-weight:500}.tf-d04a4e{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-family:var(--tf-font-family-mono)}.tf-d7140f{justify-content:space-between;align-items:center;display:flex}.tf-dcd620{background:var(--tf-surface);border-radius:var(--tf-radius-sm);box-sizing:border-box;border:1px solid var(--tf-border);cursor:pointer;height:36px;font-family:var(--tf-font-family);flex-shrink:0;align-items:center;gap:8px;padding:6px 12px 6px 8px;transition:background .15s,border-color .15s,transform .1s;display:flex}.tf-dcd620:hover{background:var(--tf-surface-hover);transform:scale(1.02)}.tf-6859a9{cursor:default;pointer-events:none}.tf-6859a9:hover{background:var(--tf-surface);transform:none}.tf-e25a5c{padding:0 12px}.tf-038cf1{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600}.tf-33c9cb{font-size:var(--tf-font-md);color:var(--tf-primary);font-weight:600}.tf-b1e4a6{font-size:var(--tf-font-xs);color:var(--tf-text-tertiary);align-items:center;display:inline-flex}.tf-d168ae{min-height:16px;font-size:var(--tf-font-base);justify-content:space-between;align-items:center;margin-top:6px;line-height:100%;display:flex}.tf-b2b098{justify-content:space-between;align-items:center;height:16px;margin-top:6px;display:flex}.tf-92acfd{min-height:16px;font-size:var(--tf-font-base);color:var(--tf-text-tertiary);line-height:100%;display:inline-block}.tf-bd2f5c{visibility:hidden}.tf-5f8805{font-size:var(--tf-font-sm);color:var(--tf-primary);background:var(--tf-primary-light);border-radius:var(--tf-radius-xs);cursor:pointer;font-weight:600;font-family:var(--tf-font-family);border:none;padding:2px 8px}.tf-5f8805:hover{opacity:.8}.tf-af41ab{z-index:2;justify-content:center;margin:-6px 0;display:flex;position:relative}.tf-18c3f4{-webkit-appearance:none;appearance:none;border-radius:var(--tf-radius-sm);background:var(--tf-surface);border:3px solid var(--tf-bg);cursor:pointer;width:36px;height:36px;font-size:var(--tf-font-lg);color:var(--tf-text-secondary);justify-content:center;align-items:center;padding:0;transition:transform .2s,background .15s,color .15s,border-color .15s;display:flex;box-shadow:0 2px 8px #0000000f}.tf-18c3f4:hover{color:var(--tf-primary);background:color-mix(in srgb, var(--tf-primary) 12%, var(--tf-surface));border-color:var(--tf-primary);transform:scale(1.1)}.tf-18c3f4:active{transform:scale(.95)rotate(180deg)}.tf-194ce7{cursor:default;color:var(--tf-text-tertiary)}.tf-194ce7:hover{color:var(--tf-text-tertiary);background:var(--tf-surface);border-color:var(--tf-bg);transform:none}.tf-194ce7:active{transform:none}.tf-85dacd{background:var(--tf-input-bg);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);transition:border-color .2s,background .25s,box-shadow .2s}.tf-8a93b8{padding:14px 16px}.tf-ae3eb4{background:var(--tf-border-light);height:1px;margin:0 16px;position:relative}.tf-93effc{-webkit-appearance:none;appearance:none;background:var(--tf-input-bg);border:1px solid var(--tf-border-light);cursor:pointer;width:28px;height:28px;color:var(--tf-text-secondary);z-index:1;border-radius:50%;justify-content:center;align-items:center;padding:0;font-family:inherit;transition:transform .2s,background .15s,color .15s,border-color .15s;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%)translateY(-50%)}.tf-93effc:hover{color:var(--tf-primary);border-color:var(--tf-primary);transform:translate(-50%)translateY(-50%)scale(1.1)}.tf-93effc:active{transform:translate(-50%)translateY(-50%)scale(.95)rotate(180deg)}.tf-cede4f{cursor:default;color:var(--tf-text-tertiary)}.tf-cede4f:hover{color:var(--tf-text-tertiary);border-color:var(--tf-border-light);transform:translate(-50%)translateY(-50%)}.tf-cede4f:active{transform:translate(-50%)translateY(-50%)}.tf-a04b23{flex-shrink:0;position:relative}.tf-57762e{position:absolute;bottom:-2px;right:-2px}.tf-e71ca8{box-sizing:border-box;background:var(--tf-bg-secondary);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);justify-content:center;align-items:center;min-height:80px;margin:12px 20px 0;display:flex}.tf-553778{box-sizing:border-box;justify-content:center;align-items:center;gap:12px;min-height:80px;margin:12px 20px 0;display:flex}.tf-35d309{flex-direction:column;justify-content:center;align-items:center;gap:10px;min-height:165px;margin:12px 20px 0;display:flex}.tf-936478{height:36px;font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);align-items:center;padding:0 20px;font-weight:500;display:flex}.tf-e1d634{opacity:.55;cursor:not-allowed;pointer-events:none}.tf-8ad819{background:color-mix(in srgb, var(--tf-text-tertiary) 15%, transparent);color:var(--tf-text-tertiary)}.tf-5be26a{border:1px solid var(--tf-border);color:var(--tf-text-tertiary);background:0 0;border-radius:999px;align-items:center;width:-moz-fit-content;width:fit-content;padding:2px 8px;font-size:11px;font-weight:500;display:inline-flex}`,yb=`.tf-9b9575{border-radius:var(--tf-radius-xl);z-index:10;background:#00000059;align-items:flex-end;animation:.2s both tf-9e8870;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}@keyframes tf-9e8870{0%{opacity:0}to{opacity:1}}@keyframes tf-d98d4b{0%{opacity:1}to{opacity:0}}@keyframes tf-c66348{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes tf-d911c1{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}.tf-140273{border-radius:var(--tf-radius-xl) var(--tf-radius-xl) 0 0;background:var(--tf-bg);width:100%;font-family:var(--tf-font-family);color:var(--tf-text);flex-direction:column;height:calc(100% - 45px);animation:.3s cubic-bezier(.32,.72,0,1) both tf-c66348;display:flex;overflow:hidden;box-shadow:0 -4px 24px #00000026}.tf-fce59b{box-shadow:none}.tf-72e47b{pointer-events:none;animation:.2s both tf-d98d4b}.tf-b9a357{animation:.2s both tf-d911c1}.tf-45030f{flex-shrink:0;padding:18px 20px 0}.tf-ce0622{justify-content:space-between;align-items:center;margin-bottom:14px;display:flex}.tf-0c1692{font-size:var(--tf-font-xl);font-weight:600}.tf-64aa3f{border-radius:var(--tf-radius-sm);cursor:pointer;width:28px;height:28px;color:var(--tf-text-tertiary);font-size:var(--tf-font-2xl);background:var(--tf-input-bg);font-weight:300;font-family:var(--tf-font-family);border:none;justify-content:center;align-items:center;transition:background .15s;display:flex}.tf-64aa3f:hover{background:var(--tf-surface-hover)}.tf-9819ca{background:var(--tf-input-bg);border-radius:var(--tf-radius);border:1px solid var(--tf-border-light);align-items:center;gap:10px;padding:10px 14px;transition:border-color .15s;display:flex}.tf-9819ca.tf-d9fcd6{border-color:var(--tf-primary)}.tf-4ad0e7{color:var(--tf-text-tertiary);font-size:var(--tf-font-lg);flex-shrink:0}.tf-9ea859{font-size:var(--tf-font-lg);color:var(--tf-text);font-family:var(--tf-font-family);background:0 0;border:none;outline:none;flex:1;transition:border-color .15s}.tf-9ea859:focus{outline:none}.tf-9ea859::placeholder{color:var(--tf-text-tertiary)}.tf-25e112{gap:4px;margin-top:12px;padding-bottom:14px;display:flex;overflow-x:auto}.tf-478cb9{border-radius:var(--tf-radius-sm);font-size:var(--tf-font-sm);cursor:pointer;white-space:nowrap;font-weight:500;font-family:var(--tf-font-family);background:var(--tf-input-bg);color:var(--tf-text-secondary);border:none;align-items:center;gap:5px;padding:4px 10px;transition:background .15s;display:flex}.tf-478cb9:hover{background:var(--tf-surface-hover)}.tf-478cb9.tf-125be5{background:var(--tf-primary-light);color:var(--tf-primary);outline:1px solid var(--tf-primary);outline-offset:-1px}.tf-bb4fb1{border-radius:var(--tf-radius-sm);flex-shrink:0;height:24px}.tf-ad5703{background:var(--tf-border);flex-shrink:0;height:1px;margin:0 20px}.tf-de9986{flex:1;min-height:0;padding:6px 8px 16px;overflow-y:auto}.tf-7ac0fe{flex-direction:column;display:flex}.tf-c6ef08{border-radius:var(--tf-radius);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.tf-3643cf{align-items:center;gap:12px;display:flex}.tf-9b3d59{border-radius:50%;width:36px;height:36px}.tf-a4cc17{flex-direction:column;gap:6px;display:flex}.tf-7f1baf{flex-direction:column;align-items:flex-end;gap:6px;display:flex}.tf-9171a2{height:10px}.tf-9171a2.tf-71ea5d{width:88px}.tf-9171a2.tf-dfb33a{width:64px}.tf-9171a2.tf-43fbf4{width:56px}.tf-9171a2.tf-61ca3c{width:44px}.tf-512365{border-radius:var(--tf-radius);cursor:pointer;width:100%;font-family:var(--tf-font-family);background:0 0;border:none;justify-content:space-between;align-items:center;padding:10px 12px;transition:background .1s;display:flex}.tf-512365:hover{background:var(--tf-surface-hover)}.tf-512365:active{transform:scale(.98)}.tf-512365.tf-9f601f{background:var(--tf-primary-light)}.tf-a0b0d9{align-items:center;gap:12px;display:flex}.tf-1e7a62{position:relative}.tf-67f18a{background:var(--tf-surface);border:1px solid var(--tf-border);border-radius:50%;justify-content:center;align-items:center;width:13px;height:13px;display:flex;position:absolute;bottom:-1px;right:-1px}.tf-cd76b9{text-align:left;flex-direction:column;align-items:flex-start;display:flex}.tf-189814{align-items:center;gap:5px;display:flex}.tf-8f4efd{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600;line-height:20px}.tf-6d4840{font-size:var(--tf-font-2xs);background:var(--tf-success-bg);color:var(--tf-success);letter-spacing:.03em;border-radius:3px;padding:1px 4px;font-weight:700}.tf-51bf2b{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);line-height:16px}.tf-87740a{text-align:right}.tf-43fbf4{color:var(--tf-text);font-size:var(--tf-font-md);font-weight:500;font-family:var(--tf-font-family-mono)}.tf-43fbf4.tf-2ee375{color:var(--tf-text-tertiary)}.tf-61ca3c{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-family:var(--tf-font-family-mono)}.tf-0afeec{flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:200px;padding:40px 32px;display:flex}.tf-ea8b28{background:var(--tf-primary-light);width:64px;height:64px;color:var(--tf-text-tertiary);border-radius:50%;justify-content:center;align-items:center;margin-bottom:4px;display:flex}.tf-74f38a{font-size:var(--tf-font-lg);color:var(--tf-text);font-weight:600}.tf-d9b5e6{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);text-align:center;max-width:280px;line-height:1.5}.tf-635e96{background:var(--tf-primary-light);color:var(--tf-primary);font-size:var(--tf-font-sm);font-weight:600;font-family:var(--tf-font-family);cursor:pointer;border:none;border-radius:10px;align-items:center;gap:6px;margin-top:4px;padding:10px 20px;transition:background .15s;display:flex}.tf-635e96:hover{background:var(--tf-primary-alpha)}`,bb=`@keyframes tf-36c468{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}@keyframes tf-dc4326{0%{stroke-dashoffset:24px}to{stroke-dashoffset:0}}@keyframes tf-13e6cd{0%{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.6)}}@keyframes tf-2b6de5{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes tf-5b8ef8{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.tf-e98a9a{box-sizing:border-box;flex-direction:column;flex:1;align-items:center;width:100%;min-width:0;padding:28px 20px 24px;display:flex}.tf-1f9019{background:linear-gradient(145deg, var(--tf-success), color-mix(in srgb, var(--tf-success) 80%, white));width:64px;height:64px;box-shadow:0 2px 8px color-mix(in srgb, var(--tf-success) 30%, transparent), 0 8px 32px color-mix(in srgb, var(--tf-success) 20%, transparent);border-radius:50%;justify-content:center;align-items:center;margin-bottom:16px;padding:2px;animation:.5s cubic-bezier(.34,1.56,.64,1) both tf-36c468;display:flex;position:relative}.tf-1f9019:before{content:"";border:2px solid var(--tf-success);pointer-events:none;border-radius:50%;animation:3s ease-out infinite tf-13e6cd;position:absolute;top:-2px;bottom:-2px;left:-2px;right:-2px}.tf-fd4d56{background:var(--tf-bg);border-radius:50%;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.tf-d3c8df{color:var(--tf-success);display:flex}.tf-d3c8df svg{stroke-dasharray:24;stroke-dashoffset:24px;animation:.4s .35s forwards tf-dc4326}.tf-9e3a66{font-size:var(--tf-font-heading);color:var(--tf-text);letter-spacing:-.01em;margin-bottom:4px;font-weight:700}.tf-db06d4{font-size:var(--tf-font-md);color:var(--tf-text-secondary);margin-bottom:20px}.tf-c9a5e1{border-radius:var(--tf-radius-lg);background:linear-gradient(135deg, color-mix(in srgb, var(--tf-success) 8%, transparent), color-mix(in srgb, var(--tf-success) 4%, transparent));border:1px solid color-mix(in srgb, var(--tf-success) 15%, transparent);flex-direction:column;align-items:center;gap:6px;width:100%;margin-bottom:16px;padding:20px;animation:.4s .2s both tf-2b6de5;display:flex;position:relative;overflow:hidden}.tf-c9a5e1:after{content:"";background:radial-gradient(ellipse at center, color-mix(in srgb, var(--tf-success) 12%, transparent), transparent 70%);pointer-events:none;width:60%;height:40px;position:absolute;bottom:-20px;left:50%;transform:translate(-50%)}.tf-7b3b5b{width:40px;height:40px;margin-bottom:4px;animation:.3s .1s both tf-5b8ef8;position:relative}.tf-651299{background:var(--tf-bg);border:1.5px solid color-mix(in srgb, var(--tf-success) 15%, transparent);border-radius:50%;justify-content:center;align-items:center;width:16px;height:16px;display:flex;position:absolute;bottom:-2px;right:-2px}.tf-f52291{font-size:var(--tf-font-amount-lg);color:var(--tf-text);font-weight:700;font-family:var(--tf-font-family-mono);letter-spacing:-.02em;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:8px;animation:.3s .2s both tf-5b8ef8;display:flex}.tf-8cfc86{font-size:var(--tf-font-lg);color:var(--tf-text-secondary);font-weight:500;animation:.3s .25s both tf-5b8ef8}.tf-5f768d{font-size:var(--tf-font-sm);font-weight:500;font-family:var(--tf-font-family);color:var(--tf-text-tertiary);letter-spacing:0;animation:.3s .3s both tf-5b8ef8}.tf-75f592{width:100%;margin-bottom:16px}.tf-73910d{background:var(--tf-input-bg);border:1px solid var(--tf-border-light);border-radius:var(--tf-radius-sm);cursor:pointer;width:100%;font-size:var(--tf-font-base);color:var(--tf-text-secondary);font-weight:500;font-family:var(--tf-font-family);justify-content:space-between;align-items:center;padding:10px 14px;transition:background .15s;display:flex}.tf-73910d:hover{background:var(--tf-bg-secondary)}.tf-ae94a0{border-radius:var(--tf-radius-sm) var(--tf-radius-sm) 0 0}.tf-1afb0a{color:var(--tf-text-tertiary);justify-content:center;align-items:center;transition:transform .2s;display:flex}.tf-7737cf{transform:rotate(180deg)}.tf-92a530{border:1px solid var(--tf-border-light);border-radius:0 0 var(--tf-radius-sm) var(--tf-radius-sm);background:var(--tf-input-bg);border-top:none;padding:8px 14px 12px;animation:.15s both tf-5b8ef8}.tf-6e8c3e{font-size:var(--tf-font-sm);justify-content:space-between;align-items:center;padding:5px 0;display:flex}.tf-4b5396{color:var(--tf-text-tertiary);font-weight:500}.tf-63cca1{color:var(--tf-text-secondary);font-family:var(--tf-font-family-mono);font-size:var(--tf-font-sm);align-items:center;gap:4px;display:flex}.tf-18c122{color:var(--tf-primary);font-size:var(--tf-font-sm);font-family:var(--tf-font-family-mono);align-items:center;gap:3px;text-decoration:none;transition:opacity .15s;display:inline-flex}.tf-18c122:hover{opacity:.7}.tf-d7e813{border-radius:var(--tf-radius-lg);background:var(--tf-primary);width:100%;color:var(--tf-text-on-primary);font-weight:600;font-size:var(--tf-font-xl);cursor:pointer;font-family:var(--tf-font-family);box-shadow:0 4px 16px color-mix(in srgb, var(--tf-primary) 25%, transparent);border:none;margin-top:auto;padding:14px 0;transition:transform .15s,opacity .15s}.tf-d7e813:hover{opacity:.95;transform:translateY(-1px)}.tf-d7e813:active{transform:translateY(0)}`,xb=`.tf-c63ac0{color:var(--tf-text-on-primary);font-weight:700;font-family:var(--tf-font-family);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tf-59aca7{object-fit:cover;border-radius:50%;width:100%;height:100%}.tf-dbfbb3{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex;overflow:hidden}.tf-f89395{object-fit:cover;border-radius:50%;width:100%;height:100%;display:block}.tf-cdfe94{justify-content:center;align-items:center;gap:6px;margin:0 20px;padding:0 0 14px;text-decoration:none;display:flex}.tf-7c0c36{font-size:var(--tf-font-sm);color:var(--tf-text-tertiary)}.tf-26d5ea{font-size:var(--tf-font-base);line-height:1}.tf-8b1e15{font-size:var(--tf-font-sm);letter-spacing:.02em;color:var(--tf-text-secondary);font-weight:600}.tf-3852e5,.tf-b35860{color:var(--tf-primary)}`,Sb=`@keyframes tf-80a677{to{transform:rotate(360deg)}}@keyframes tf-d97ff2{0%,to{opacity:1}50%{opacity:.4}}@keyframes tf-c3558b{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tf-89a83e{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(6px)}}@keyframes tf-ca9155{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes tf-d2dbc4{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes tf-83b1f2{0%{opacity:.5;transform:scale(.98)}to{opacity:1;transform:scale(1)}}@keyframes tf-54b7e7{0%,to{border-color:var(--tf-primary)}50%{border-color:var(--tf-primary-light)}}@keyframes tf-194f18{to{transform:rotate(360deg)}}@keyframes tf-cdef4a{0%{opacity:0;transform:scale(.3)}50%{transform:scale(1.05)}70%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tf-fd8795{0%{transform:translateY(0)rotate(0)}to{transform:translateY(-4px)rotate(8deg)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important}}*,:before,:after{box-sizing:border-box;margin:0;padding:0}:host{color:var(--tf-text);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--tf-font-family:"DM Sans", sans-serif;--tf-font-family-mono:"JetBrains Mono", monospace;--tf-font-size:16px;--tf-line-height:1.5;font-family:var(--tf-font-family);font-size:var(--tf-font-size);line-height:var(--tf-line-height);--tf-font-2xs:10px;--tf-font-xs:11px;--tf-font-sm:12px;--tf-font-base:13px;--tf-font-md:14px;--tf-font-lg:15px;--tf-font-xl:16px;--tf-font-2xl:17px;--tf-font-heading:20px;--tf-font-amount:28px;--tf-font-amount-lg:24px;--tf-font-amount-sm:22px;display:block}button:focus-visible{outline:2px solid var(--tf-primary);outline-offset:2px;border-radius:4px}a:focus-visible{outline:2px solid var(--tf-primary);outline-offset:2px;border-radius:4px}`,Cb=`@keyframes tf-90e981{0%,to{opacity:1}50%{opacity:.4}}.tf-1ac2ef{border-radius:var(--tf-radius-xs);background:var(--tf-skeleton);animation:1.5s ease-in-out infinite tf-90e981}.tf-68a980{border-radius:var(--tf-radius-xl);z-index:10;background:#0009;align-items:flex-end;animation:.2s both tf-ed0355;display:flex;position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}@keyframes tf-9cad3e{0%{opacity:1}to{opacity:0}}.tf-0c7f16{pointer-events:none;animation:.2s both tf-9cad3e}.tf-e7b9c7{width:100%;min-height:500px;max-width:var(--tf-widget-max-width,400px);border-radius:var(--tf-radius-xl);background:var(--tf-bg);border:1px solid var(--tf-border);min-width:360px;box-shadow:var(--tf-shadow-lg);font-family:var(--tf-font-family);color:var(--tf-text);flex-direction:column;transition:background .25s,border-color .25s,box-shadow .25s;display:flex;position:relative;overflow:hidden}.tf-b4f391{background:0 0}.tf-118b57{box-shadow:none;border:none}.tf-118b57 .tf-07225e{display:none}.tf-07225e{background:linear-gradient(90deg, transparent, var(--tf-primary), transparent);opacity:.6;height:2px}.tf-d01dff{padding:12px 20px 0;animation:.3s .1s both tf-ed0355}.tf-5bb68c{padding:12px 20px 0}.tf-37ddcc{margin-top:auto;padding-top:22px}.tf-04e1e2{background:var(--tf-bg-secondary);border-radius:var(--tf-radius-lg);border:1px solid var(--tf-border-light);box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;gap:8px;min-height:120px;margin:12px 20px 0;padding:14px;animation:.25s both tf-b61e63;display:flex}.tf-d01908{color:var(--tf-text-tertiary);opacity:.4}.tf-1cc72b{font-size:var(--tf-font-base);color:var(--tf-text-secondary)}.tf-480f1a{text-align:center;padding:0 20px 16px}.tf-480f1a a{font-size:var(--tf-font-base);color:var(--tf-primary);font-family:var(--tf-font-family-mono);text-decoration:none}.tf-bc7950{text-align:center;margin-top:8px;margin-bottom:10px}.tf-bc7950 a{font-size:var(--tf-font-sm);color:var(--tf-primary);font-family:var(--tf-font-family-mono);text-decoration:none}.tf-d9b7b4{background:var(--tf-surface);border:1px solid var(--tf-border);border-radius:var(--tf-radius-xs);cursor:pointer;font-size:var(--tf-font-sm);font-family:var(--tf-font-family-mono);color:var(--tf-text-secondary);align-items:center;gap:4px;padding:2px 8px;transition:background .15s,border-color .15s;display:inline-flex}.tf-d9b7b4:hover{background:var(--tf-surface-hover)}.tf-d9b7b4 svg{opacity:.4;transition:opacity .15s}.tf-d9b7b4:hover svg{opacity:.7}.tf-9398ea{border-style:dashed;border-color:var(--tf-primary)}.tf-9398ea .tf-2d9323{color:var(--tf-primary);font-style:italic;font-family:var(--tf-font-family)}.tf-4567e1{cursor:default;opacity:.8}.tf-4567e1:hover{background:var(--tf-surface)}.tf-58881e{color:var(--tf-text-tertiary);font-style:italic}.tf-c7b4d2{justify-content:center;align-items:center;display:flex}.tf-771a48{flex-direction:column;display:flex}.tf-e2b7ba{align-items:center;display:flex}.tf-6f7fab{justify-content:space-between;align-items:center;display:flex}.tf-b15cde{animation:.2s both tf-ed0355}.tf-52678c{flex-direction:column;justify-content:center;align-items:center;gap:10px;display:flex}.tf-25f74d{background:linear-gradient(180deg, color-mix(in srgb, var(--tf-primary) 12%, transparent) 0%, color-mix(in srgb, var(--tf-primary) 3%, transparent) 100%);width:40px;height:40px;color:var(--tf-primary);border-radius:50%;justify-content:center;align-items:center;display:flex}.tf-b385cd{color:var(--tf-text-secondary);font-size:13px;font-weight:600}.tf-dc46f6{color:var(--tf-text-tertiary);font-size:11px}.tf-55c652{opacity:.6}.tf-2ad189{font-family:var(--tf-font-family-mono);color:var(--tf-text);font-weight:600}.tf-192a37{background:var(--tf-border-light);flex-shrink:0;width:100%;height:1px;margin-top:10px}.tf-44389f{vertical-align:middle;border-radius:4px;margin-right:6px}.tf-58158c{background:color-mix(in srgb, var(--tf-surface) 60%, var(--tf-bg));border-radius:var(--tf-radius-sm);gap:2px;padding:3px;display:flex}.tf-6f8fbb{border-radius:var(--tf-radius-sm);color:color-mix(in srgb, var(--tf-text-tertiary) 65%, transparent);font-size:var(--tf-font-sm);cursor:pointer;font-weight:500;font-family:var(--tf-font-family);background:0 0;border:none;padding:5px 14px;transition:background .15s,color .15s,box-shadow .15s}.tf-6f8fbb:hover{color:var(--tf-text-secondary)}.tf-2a2ad5{background:var(--tf-surface);color:var(--tf-text);font-weight:600;box-shadow:0 1px 3px #00000026}`,wb=1.05;function Tb(e,t){let n=e.chainId===t.chainId,r=lm(e.symbol,t.symbol),i=um(e.symbol,t.symbol),a=dm(e.symbol),o=dm(t.symbol),s=fm(e.symbol);return n&&r?1:r?2:i||a&&o?n?3:4:a&&!o?5:s?6:n?7:8}function Eb(e){return om.has(e)?1:0}function Db(e){let t=new Map;for(let n of e){if(!cm(n.address))continue;let e=n.extensions?.balance??`0`;if(e===`0`)continue;let r=Number(Kc(e,n.decimals)),i=Number(n.extensions?.price?.usd??`0`);if(i<=0)continue;let a=r*i,o=t.get(n.chainId)??0;t.set(n.chainId,o+a)}return t}function Ob(e,t,n){return cm(e)?!0:(n.get(t)??0)>=am}function kb(e,t,n,r,i){if(e.length===0)return[];let a=Db(e),o={address:r,chainId:n},s=[];for(let r of e){if(mm(r,o))continue;let e=r.extensions?.balance;if(!e||e===`0`)continue;let c=Number(r.extensions?.price?.usd??`0`);if(c<=0)continue;let l=Number(Kc(e,r.decimals))*c;if(l<1||i!==void 0&&l<i*wb||!Ob(r.address,r.chainId,a))continue;let u=Tb({symbol:r.symbol,chainId:r.chainId},{symbol:t,chainId:n});s.push({token:r,tier:u,gasCostScore:Eb(r.chainId)})}return s.sort((e,t)=>e.tier===t.tier?e.gasCostScore-t.gasCostScore:e.tier-t.tier),s.map(e=>e.token)}function Ab(e){let t=Cv();return{trackingOrderId:t.trackingOrderId,trackingProviderName:t.trackingProviderName,trackingProviderIcon:t.trackingProviderIcon,trackingInputAmount:t.trackingInputAmount,executionError:t.executionError,handleConfirm:async()=>{let n=e.selectedPayToken(),r=n?e.payTokenQuotes().find(e=>mm(e.token,n)):null,i=e.walletAddress();if(!r||!e.client()||!e.walletAdapter()||!i)return;if(e.needRecipient()&&!e.recipient()){e.setError(`Recipient address is required for cross-chain swaps`),e.setErrorCode(z.INVALID_CONFIG);return}let a=r.route.quote.validBefore;if(a&&Date.now()/1e3>a){e.setLoadingQuotes(!0);try{let t=e.targetToken();if(!t||typeof t.decimals!=`number`)return;let n=qc(e.configAmount(),t.decimals),a=await e.fetchSingleQuote(e.client(),r.token,n,i,t,e.recipient());if(a){let t=[...e.payTokenQuotes()],n=t.findIndex(e=>mm(e.token,r.token));n>=0?t[n]=a:t.push(a),e.setPayTokenQuotes(t)}else{e.setError(`Quote expired and could not be refreshed`),e.setErrorCode(z.QUOTE_EXPIRED);return}}catch{e.setError(`Quote expired and could not be refreshed`),e.setErrorCode(z.QUOTE_EXPIRED);return}finally{e.setLoadingQuotes(!1)}}let o=e.selectedPayToken(),s=o?e.payTokenQuotes().find(e=>mm(e.token,o)):null;if(!s)return;e.setFromToken({chainId:s.token.chainId,address:s.token.address,symbol:s.token.symbol,name:s.token.name,decimals:s.token.decimals,logoURI:s.token.logoURI}),t.setTrackingProviderName(s.route.routeId??null);let c=e.apiEndpoint()??`https://api.hyperstream.dev`;t.setTrackingProviderIcon(s.route.icon?`${c}${s.route.icon}`:null),t.setTrackingInputAmount(Kc(s.route.quote.amountIn,s.token.decimals)),t.setExecutionError(null),e.setExecPhase(`building`);try{let n=await e.client().buildDeposit({from:i,quoteId:s.quoteId,routeId:s.route.routeId});e.setExecPhase(`awaiting-wallet`);let r=await Tv(e.walletAdapter(),n,s.token.chainId);e.setExecPhase(`submitting`);let a=await Ev(e.client(),s.quoteId,s.route.routeId,r);e.setExecPhase(`tracking`),t.setTrackingOrderId(a.orderId)}catch(n){let r=Dv(n,e.callbacks());t.setExecutionError(r)}},handleRetry:()=>{re(()=>{t.setExecutionError(null),e.setExecPhase(null),e.storeClearError(),e.setPayTokenQuotes([])}),e.onRetry?.()},handleNewSwap:()=>{re(()=>{e.storeReset(),e.setPayTokenQuotes([])}),Ov(t,e.client().baseUrl),e.onReset?.()}}}var jb=V(`<div>`),Mb=V(`<div part=container style=min-height:565px><div part=accent-line data-testid=accent-line>`),Nb=V(`<img height=22>`),Pb=V(`<button part=wallet-info><div data-testid=wallet-dot></div><span data-testid=wallet-address>`),Fb=V(`<div part=header><div><span data-testid=header-title>`),Ib=V(`<button part=recipient-badge data-testid=recipient-badge><span>`),Lb=V(`<div style=display:flex;align-items:center;gap:10px><div data-testid=receive-target-icon></div><div style=display:flex;align-items:center;gap:4px><div style=display:flex;flex-direction:column><span data-testid=receive-symbol></span><span style=font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);line-height:16px>`),Rb=V(`<input type=number inputmode=decimal placeholder=0 data-testid=receive-amount-input style=text-align:right>`),zb=V(`<div><div part=target-token><div data-testid=receive-section-label style=display:flex;justify-content:space-between;align-items:center><span></span></div><div style=justify-content:space-between><div style=display:flex;flex-direction:column;align-items:flex-end><span style=margin-left:0>`),Bb=V(`<div style="padding:0 20px"><div style=display:flex;align-items:center;height:36px><span style=font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-weight:500>`),Vb=V(`<button type=button><div></div><div><span></span><span></span></div><span>`),Hb=V(`<div part=method-buttons>`),Ub=V(`<button type=button><span></span><span>`),Wb=V(`<div style="padding:0 20px;margin-bottom:8px"><div style=display:flex;align-items:center;height:36px;justify-content:space-between>`),Gb=V(`<div part=payment-list style="padding:0 20px">`),Kb=V(`<div part=pay-token-error style="padding:8px 20px 0;color:var(--tf-error);font-size:var(--tf-font-xs)">`),qb=V(`<div part=price-preview data-testid=quote>`),Jb=V(`<div style=min-height:186px;display:flex;flex-direction:column>`),Yb=V(`<div style="padding:0 20px"><div style=display:flex;align-items:center;height:36px><div style=margin-left:auto>`),Xb=V(`<button part=button-primary type=button>`),Zb=V(`<button disabled type=button><span><span>`),Qb=V(`<button disabled type=button style=opacity:0.6>`),$b=V(`<div part=cta-wrapper style=margin-top:auto>`),ex=V(`<div style=flex:1;display:flex;flex-direction:column>`),tx=V(`<span>Flight`),nx=V(`<button type=button style=display:flex;align-items:center;gap:4px;background:none;border:none;cursor:pointer;color:var(--tf-primary);font-size:var(--tf-font-lg);font-weight:600;font-family:var(--tf-font-family);padding:0>`),rx=V(`<span data-testid=receive-amount>`),ix=V(`<span style=font-size:var(--tf-font-sm);color:var(--tf-text-tertiary);font-weight:500>`),ax=V(`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:186px;flex:1;gap:10px;margin:0 20px"><div><svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><circle cx=8 cy=8 r=6></circle><path d="M18.09 10.37A6 6 0 1 1 10.34 18"></path><path d="M7 6h1v4"></path><path d="m16.71 13.88.7.71-2.82 2.82"></path></svg></div><span></span><span>`),ox=V(`<div style="padding:0 20px"><div><div><div></div><div><div></div><div></div></div></div><div><div></div><div>`),sx=V(`<div><svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><circle cx=12 cy=12 r=10></circle><path d="M12 6v6l4 2">`),cx=V(`<span data-testid=pay-empty-text>`),lx=V(`<div data-testid=pay-empty>`),ux=V(`<div><svg width=20 height=20 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><rect x=1 y=5 width=22 height=16 rx=2></rect><path d="M16 14h.01"></path><path d="M1 10h22">`),dx=V(`<span data-testid=recommended-badge>`),fx=V(`<button data-testid=pay-selected><div><div data-testid=pay-token-icon-wrap><div data-testid=pay-token-chain-dot></div></div><div><div><span data-testid=pay-token-symbol></span></div><span data-testid=pay-token-chain-name></span></div></div><div></div><span data-testid=pay-selected-caret>`),px=V(`<div data-testid=pay-selected-amount>`),mx=V(`<div part=no-offer><div><svg width=28 height=28 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round><circle cx=11 cy=11 r=8></circle><path d="m21 21-4.35-4.35"></path><path d="M8 11h6"></path></svg></div><span>`);function hx(e){return A(mv,{get children(){return A(gx,e)}})}function gx(e){let{t}=Us(),n=ev(),r=Us();ae(()=>{e.config.locale&&r.setLocale(e.config.locale)});let i=D(()=>e.config.methods??[`crypto`]),a=D(()=>i().includes(`crypto`)),o=D(()=>i().includes(`card`)),s=D(()=>i().length>1),[c,l]=w(s()?`entry`:a()?`crypto`:`card`),u=D(()=>s()&&c()!==`entry`),[d,f]=w(!1),p=()=>{f(!0)},m=()=>{l(`entry`),f(!1)},[h,g]=w(e.config.amount??``),_=()=>!!e.config.amountEditable,v=()=>_()?h():e.config.amount??``,y=Ag(),b=Ag(),[x,S]=w([]),[C,ee]=w(!1),[te,ne]=w(!1),[O,se]=w(!1),[ce,le]=w(null),[ue,de]=w(null),[fe,pe]=w(null),[me,he]=w(null),[ge,_e]=w(!1),{isConnected:ve,walletAddress:ye,handleConnect:be}=yv({walletAdapter:()=>e.walletAdapter,callbacks:()=>e.callbacks,onAddressChange:e=>n.setWalletAddress(e),onDisconnect:()=>{S([]),le(null),_e(!1),de(null),pe(null)},onConnectError:(e,t)=>{n.setError(e),n.setErrorCode(t)}}),xe=D(()=>new Sr({baseUrl:e.config.apiEndpoint??`https://api.hyperstream.dev`})),Se=()=>xe().baseUrl,Ce=D(()=>o()?new wr({baseUrl:e.config.fiatApiEndpoint??`https://fiat.hyperstream.dev`}):null),[we,Te]=w(e.config.fiatCurrency??`USD`),Ee=D(()=>!!e.config.fiatCurrency),De=D(()=>{let e=n.recipient();if(e)return e;let t=n.targetToken(),r=ye();return ve()&&r&&t&&Bu(r,Iu(t.chainId))?r:null}),Oe=D(()=>{if(c()!==`card`)return null;let e=n.targetToken(),t=v();return!e||typeof e.decimals!=`number`||!t?null:qc(t,e.decimals)}),k=Fv({client:Ce,targetToken:n.targetToken,recipient:De,fiatCurrency:()=>we(),callbacks:()=>e.callbacks,cryptoAmount:Oe}),ke=bv({phase:k.phase,onExpired:()=>k.refetchQuote(),intervalSeconds:30}),Ae=zm(Ce,()=>o()&&!Ee()),je=[`USD`,`EUR`,`GBP`,`JPY`,`KRW`,`CNY`,`AUD`,`CAD`,`INR`,`SGD`,`HKD`,`TWD`,`BRL`,`MXN`,`CHF`],Me=D(()=>{let e=Ae.data;if(!e?.providers?.length)return je;let t=new Set;for(let n of e.providers){let e=n.supportedCurrencies;if(Array.isArray(e))for(let n of e)typeof n==`string`?t.add(n):n&&typeof n.code==`string`&&t.add(n.code)}return t.size>0?[...t].sort():je}),Ne=D(()=>{let e=k.quote(),t=parseFloat(k.fiatAmount());return!e||!t?!1:!!(e.minFiatAmount&&t<parseFloat(String(e.minFiatAmount))||e.maxFiatAmount&&t>parseFloat(String(e.maxFiatAmount)))}),Pe=D(()=>{let e=k.phase();return e===`awaiting-payment`||e===`tracking`}),Fe=D(()=>{let e=k.phase();return e===`creating-order`||e===`quoting`}),Ie=D(()=>{let e=k.phase();return e===`error`?t({id:`1w68n16`,message:`Try Again`})??`Try Again`:e===`creating-order`||e===`quoting`?t({id:`344av8`,message:`Processing...`}):e===`quoted`&&k.quote()?t({id:`13l4n4r`,message:`Continue via {provider}`},{provider:k.quote().providerName??Ud(k.quote().provider)}):t({id:`119fv83`,message:`Enter amount`})}),Le=D(()=>k.phase()===`quoted`&&!!De()&&!Ne()&&!k.isQuoteFetching()),Re=()=>{let e=k.phase();e===`error`?k.handleRetry():e===`quoted`&&Le()&&k.createOrder()},ze=D(()=>Q_(n.execPhase(),n.error(),C(),x().length)),Be=D(()=>{let e=ze();return e===`building`||e===`awaiting-wallet`||e===`submitting`||e===`tracking`}),Ve=D(()=>c()===`card`?`form`:ze()===`success`&&n.order()?`success`:Be()?`tracking`:`form`),He=Ag(),Ue=D(()=>!!e.config.recipient&&e.config.recipientEditable!==!0),{needRecipient:Ge,recipientDisplay:Ke,handleRecipientChange:qe}=xv({fromToken:ce,toToken:n.targetToken,recipient:n.recipient,isConnected:ve,walletAddress:ye,walletAdapter:()=>e.walletAdapter,setRecipient:n.setRecipient}),Je=D(()=>e.config.fromTokens?.length?rv(e.config.fromTokens):void 0),Xe=Hm(xe,ye,()=>ve()&&!!ye(),()=>e.walletAdapter?.supportedChainIds);ae(()=>{e.config.recipient&&n.setRecipient(e.config.recipient)});let Ze=Pm(xe,()=>!0),Qe=D(()=>{let e=Ze.data;return e?_m(e):new Map});ae(async()=>{let t=xe();if(e.config.amount){let t=Number(e.config.amount);if(!Number.isFinite(t)||t<=0){n.setError(`Invalid amount: must be greater than zero`),n.setErrorCode(z.INVALID_AMOUNT);return}}try{if(e.config.target){let r=nv(e.config.target),i=await Am(r.chainId,r.address,e.config.apiEndpoint,t);if(typeof i.decimals!=`number`){n.setError(`Failed to resolve target token metadata`),n.setErrorCode(z.INVALID_CONFIG);return}n.setTargetToken(i),e.config.amount&&n.setTargetAmount(e.config.amount)}if(e.config.fromToken)try{let n=nv(e.config.fromToken),r=await Am(n.chainId,n.address,e.config.apiEndpoint,t);typeof r.decimals==`number`&&he({address:r.address,chainId:r.chainId,symbol:r.symbol??r.address.slice(0,6),name:r.name??r.symbol??r.address,decimals:r.decimals,logoURI:r.logoURI,...r.priceUsd===void 0?{}:{extensions:{price:{usd:String(r.priceUsd)}}}})}catch(t){e.callbacks?.onSwapError?.({code:z.INVALID_TOKEN_IDENTIFIER,message:`Failed to resolve fromToken: ${t instanceof Error?t.message:String(t)}`})}}catch(e){n.setError(e instanceof Error?e.message:`Failed to resolve target token`),n.setErrorCode(z.INVALID_CONFIG)}});let $e=D(()=>{let t=Xe.data;if(!t||t.length===0)return[];let n=e.walletAdapter?.supportedChainIds,r=Je();return t.filter(e=>!(n?.length&&!n.includes(e.chainId)||r&&!r.has(hm({chainId:e.chainId,address:e.address}))))}),et=D(()=>{let e=$e(),t=n.targetToken();if(!e||e.length===0||!t)return[];let r=t.priceUsd??1,i=Number(v()||`0`)*r;return kb(e,t.symbol??``,t.chainId,t.address,i>0?i:void 0)});E(ie([me,et],([e,t])=>{let n=gm({defaultFromToken:e,balances:t,currentSelection:ce(),userPicked:ge()});if(!n)return;le(n);let r=ze();(r===`quoting`||r===`quoted`||r===`error`)&&ot(t)})),E(ie(et,e=>{let t=ze();e.length>0&&(t===`idle`||t===`error`)&&c()===`crypto`&&ot(e)})),E(ie(()=>n.recipient(),()=>{let e=et(),t=ze();e.length>0&&(t===`idle`||t===`quoted`||t===`error`)&&c()===`crypto`&&ot(e)},{defer:!0})),E(ie(()=>c(),e=>{if(e===`crypto`){let e=et();e.length>0&&(ze()===`idle`||ze()===`error`)&&ot(e)}},{defer:!0}));let N=D(()=>{let t=ce();if(!t)return null;let r=n.targetToken(),i=ye(),a=n.recipient(),o=v();return!r||typeof r.decimals!=`number`||!i||!o||Ge()&&!a?null:{tradeType:`EXACT_OUTPUT`,fromChainId:t.chainId,fromToken:t.address,toChainId:r.chainId,toToken:r.address,amount:qc(o,r.decimals),fromAddress:i,...a&&{recipient:a},...e.config.refundTo&&{refundTo:e.config.refundTo}}}),tt=Fm(xe,N,D(()=>!!N()&&ze()===`quoted`)),nt=D(()=>c()===`crypto`&&(C()||te()||ze()===`quoted`&&tt.isFetching));E(ie(()=>tt.data,t=>{if(t&&e.callbacks?.onQuoteReceived?.(t),!t||ze()!==`quoted`)return;let n=ce();if(n&&t.routes.length>0){let e=lv(sv(t.routes,`EXACT_OUTPUT`))[0],r=t.routes.find(t=>t.routeId===e)??t.routes[0],i=x(),a=i.findIndex(e=>e.token.address.toLowerCase()===n.address.toLowerCase()&&e.token.chainId===n.chainId);if(a>=0){let e=[...i];e[a]={token:n,route:r,quoteId:t.quoteId},S(e)}}}));let{countdownSeconds:rt}=bv({phase:ze,onExpired:()=>{tt.refetch()}}),it=async(t,n,r,i,a,o,s)=>{try{let c={tradeType:`EXACT_OUTPUT`,fromChainId:n.chainId,fromToken:n.address,toChainId:a.chainId,toToken:a.address,amount:r,fromAddress:i,...o&&{recipient:o},...e.config.refundTo&&{refundTo:e.config.refundTo}},l=await cs.fetchQuery({queryKey:[`quote`,t.baseUrl,c],queryFn:({signal:e})=>t.getQuotes(c,s??e),staleTime:15e3});if(l.routes.length>0){let e=lv(sv(l.routes,`EXACT_OUTPUT`))[0];return{token:n,route:l.routes.find(t=>t.routeId===e)??l.routes[0],quoteId:l.quoteId}}}catch{}return null},at=null,ot=async e=>{let t=xe(),r=ye(),i=n.targetToken();if(!t||!r||!i||typeof i.decimals!=`number`||e.length===0)return;re(()=>{x().length>0&&S([]),n.error()&&n.clearError(),fe()&&pe(null),ee(!0)}),at?.abort();let a=new AbortController;at=a;try{let o=v();if(!o){ee(!1);return}let s=qc(o,i.decimals),c=ce(),l=c?e.find(e=>mm(e,c)):void 0,u=l?[l,...e.filter(e=>!mm(e,l))]:e;for(let e of u){if(a.signal.aborted)return;let o=await it(t,e,s,r,i,n.recipient(),a.signal);if(a.signal.aborted)return;if(o){S([o]),le(e),de(hm(e)),pe(null),ee(!1);return}}a.signal.aborted||(S([]),de(null))}catch{}finally{ee(!1),se(!0)}};oe(()=>{at?.abort()});let st=D(()=>{let e=et(),t=$e();if(e.length===0)return t;let n=[...e];for(let e of t)n.some(t=>mm(t,e))||n.push(e);return n}),ct=D(()=>{let e=ce(),t=st();if(!e||t.length===0)return 0;let n=t.findIndex(t=>mm(t,e));return n>=0?n:0}),lt=D(()=>{let e=st(),t=x(),r=n.targetToken(),i=Qe();if(e.length===0||!r)return[];let a=new Map;for(let e of t)a.set(hm(e.token),e);let o=ue();return e.map(e=>{let t=hm(e),n=a.get(t),r=i.get(e.chainId),s=e.decimals,c=Number(e.extensions?.price?.usd??`0`),l=e.extensions?.balance?Kc(e.extensions.balance,s):`0`,u=Yc(Xc(l,2)),d=``;if(c>0&&e.extensions?.balance){let e=Number(l)*c;d=e<.01?`<$0.01`:`$${Yc(e.toFixed(2).replace(/\.?0+$/,``))}`}let f=``,p=``,m=!0;if(n){let t=Kc(n.route.quote.amountIn,s);if(f=Yc(Xc(t,2)),c>0){let e=Number(t)*c;p=e<.01?`<$0.01`:`$${Yc(e.toFixed(2).replace(/\.?0+$/,``))}`}m=BigInt(e.extensions?.balance??`0`)>=BigInt(n.route.quote.amountIn||`0`)}return{symbol:e.symbol,chain:r?.name??`Chain ${e.chainId}`,color:`#888`,amount:f,amountUsd:p,balance:u,balanceUsd:d,recommended:o!==null&&t===o,disabled:!m,logoURI:e.logoURI,chainId:e.chainId,address:e.address}})}),ut=D(()=>{let e={};for(let n of lt())if(n.recommended&&n.chainId){let r=(n.address??`0x0000000000000000000000000000000000000000`).toLowerCase();e[`eip155:${n.chainId}:${r}`]=t({id:`xel5qk`,message:`Recommended`})}return e}),dt=D(()=>{let e=ce();return e?x().find(t=>mm(t.token,e))??null:null}),ft=D(()=>dt()?.route??null),pt=D(()=>{let e=dt();return e?{chainId:e.token.chainId,address:e.token.address,symbol:e.token.symbol,name:e.token.name,decimals:e.token.decimals,logoURI:e.token.logoURI}:null}),{trackingOrderId:mt,trackingProviderName:ht,trackingProviderIcon:gt,trackingInputAmount:_t,executionError:vt,handleConfirm:yt,handleRetry:bt,handleNewSwap:xt}=Ab({client:xe,walletAdapter:()=>e.walletAdapter,callbacks:()=>e.callbacks,apiEndpoint:()=>e.config.apiEndpoint,recipient:n.recipient,needRecipient:Ge,walletAddress:ye,targetToken:n.targetToken,selectedPayToken:ce,payTokenQuotes:x,setPayTokenQuotes:S,setLoadingQuotes:ee,fetchSingleQuote:it,configAmount:v,setExecPhase:n.setExecPhase,setFromToken:n.setFromToken,setError:n.setError,setErrorCode:n.setErrorCode,storeReset:n.reset,storeClearError:n.clearError,onRetry:()=>{le(null),_e(!1),de(null),pe(null);let e=et();e.length>0&&ot(e)},onReset:()=>{le(null),_e(!1),de(null),pe(null);let e=et();e.length>0&&ot(e)}});Sv({client:xe,walletAddress:ye,trackingOrderId:mt,phase:ze,execPhase:n.execPhase,setOrder:n.setOrder,setExecPhase:n.setExecPhase,onOrderFilled:t=>{let r=ce();e.callbacks?.onSwapSuccess?.({orderId:t.id,fromToken:r?.symbol??``,toToken:n.targetToken()?.symbol??``,fromAmount:t.srcAmount,toAmount:t.destAmount,txHash:t.depositTxHash})},onOrderFailed:t=>{e.callbacks?.onSwapError?.({code:z.ORDER_FAILED,message:`Order `+t.status})}});let St=async e=>{ne(!0),pe(null);try{let r=xe(),i=ye(),a=n.targetToken(),o=v();if(!r||!i||!a||typeof a.decimals!=`number`||!o)return!1;let s=await it(r,e,qc(o,a.decimals),i,a,n.recipient());if(!s)return pe(t({id:`wuxjl9`,message:`Selected token is unavailable for this purchase`})),!1;let c=x(),l=[...c],u=c.findIndex(t=>mm(t.token,e));return u>=0?l[u]=s:l.push(s),S(l),le(e),_e(!0),!0}finally{ne(!1)}},Ct=e=>{y.hide(),e.address&&St(st().find(t=>mm(t,{chainId:e.chainId,address:e.address}))||{chainId:e.chainId,address:e.address,symbol:e.symbol,name:e.name,decimals:e.decimals??18,logoURI:e.logoURI})},wt=async()=>{e.walletAdapter?.openAccountModal?await e.walletAdapter.openAccountModal():e.callbacks?.onAccountModal?.()},Tt=()=>n.targetToken()?.symbol??``,Et=()=>k.quote()?.token?.decimals??n.targetToken()?.decimals??18,Dt=e=>e?Xc(Kc(e,Et()),6):`0`,Ot=()=>{if(c()===`card`&&k.quote()){let e=k.quote();if(e.swapStrategy===`jump`){let t=e.routes?.[0]?.estimatedOutputAmount??e.estimatedOutputAmount;if(t)return Xc(Kc(t,n.targetToken()?.decimals??18),6)}if(e.cryptoAmount)return Dt(e.cryptoAmount)}return n.targetAmount()||v()},kt=()=>{let e=Number(Ot()),r=n.targetToken()?.priceUsd??0;return!e||r<=0?``:t({id:`1ovj1tk`,message:"≈ ${addThousandsSeparator}"},{addThousandsSeparator:Yc((e*r).toFixed(2).replace(/\.?0+$/,``))})},At=()=>{let e=Ot(),n=Tt();return!e||!n?t({id:`119fv83`,message:`Enter amount`}):t({id:`1cei180`,message:`Buy {amt} {sym}`},{amt:e,sym:n})},jt=()=>!!n.targetToken(),Mt=()=>!!e.config.target,Nt=D(()=>e.config.toTokens?.length?rv(e.config.toTokens):void 0),Pt=e=>{if(re(()=>{g(e),n.setTargetAmount(e),c()===`crypto`&&et().length>0&&e&&ee(!0)}),c()===`crypto`){let t=et();t.length>0&&e&&ot(t)}},Ft=D(()=>{let t=e.config.titleText?.trim();return t&&t.length>0?t:`TokenFlight`}),It=D(()=>{let t=e.config.titleText?.trim();return!!t&&t.length>0}),Lt=D(()=>{let t=e.config.titleImageUrl?.trim();return t&&t.length>0?t:null});return(()=>{var r=Mb(),i=r.firstChild;return G(r,A(j,{get when(){return B(()=>c()===`card`)()&&(Pe()||k.phase()===`success`)},get children(){return A(j,{get when(){return B(()=>k.phase()===`success`)()&&k.orderStatus()},get fallback(){return A(qf,{get phase(){return k.phase()},get status(){return k.orderStatus()?.status??`pending_payment`},get strategy(){return k.strategy()??k.orderStatus()?.swapStrategy??`direct`},get fiatAmount(){return k.fiatAmount()},get fiatCurrency(){return we()},get cryptoAmount(){let e=k.orderStatus()?.quotedCryptoAmount??k.quote()?.cryptoAmount,t=n.targetToken()?.decimals;return!e||t==null?e:Kc(e,t)},get targetToken(){return n.targetToken()},get provider(){return k.orderStatus()?.provider??k.quote()?.provider??`transak`},get transferTxHash(){return k.orderStatus()?.fillTxHash??k.orderStatus()?.transferTxHash},get failedReason(){return k.orderStatus()?.failedReason??k.orderStatus()?.errorReason},get apiBase(){return Se()},get chainMap(){return Qe()},onNewPurchase:()=>k.handleNewPurchase(),onRetry:()=>k.handleRetry(),onBack:()=>k.handleNewPurchase()})},get children(){return A($f,{get orderStatus(){return k.orderStatus()},get fiatAmount(){return k.fiatAmount()},get fiatCurrency(){return we()},get targetToken(){return n.targetToken()},get tokenDecimals(){return k.tokenDecimals()},get provider(){return k.orderStatus()?.provider??`transak`},get apiBase(){return Se()},get chainMap(){return Qe()},onNewPurchase:()=>k.handleNewPurchase()})}})}}),null),G(r,A(j,{get when(){return!(c()===`card`&&(Pe()||k.phase()===`success`))},get children(){return A(kf,{get current(){return Ve()},views:{form:()=>[(()=>{var n=Fb(),r=n.firstChild,i=r.firstChild;return G(r,A(j,{get when(){return Lt()},get fallback(){return A(j,{get when(){return!e.config.hideTitle},get children(){return A(Lc,{size:22})}})},get children(){var t=Nb();return T(n=>{var r=Lt(),i=Ft(),a=`${X.headerLogoImage} ${e.config.hideTitle?X[`headerLogoImage--solo`]:``}`;return r!==n.e&&H(t,`src`,n.e=r),i!==n.t&&H(t,`alt`,n.t=i),a!==n.a&&U(t,n.a=a),n},{e:void 0,t:void 0,a:void 0}),t}}),i),G(i,A(j,{get when(){return It()},get fallback(){return[`Token`,(()=>{var e=tx();return T(()=>U(e,X.headerTitleAccent)),e})()]},get children(){return Ft()}})),G(n,A(j,{get when(){return B(()=>!!ve())()&&ye()},get children(){var e=Pb(),n=e.firstChild,r=n.nextSibling;return W(e,`click`,wt),G(r,()=>Hd(ye())),T(i=>{var a=X.headerRight,o=t({id:`xphk5n`,message:`Wallet account`}),s=X.walletDot,c=X.walletAddress;return a!==i.e&&U(e,i.e=a),o!==i.t&&H(e,`aria-label`,i.t=o),s!==i.a&&U(n,i.a=s),c!==i.o&&U(r,i.o=c),i},{e:void 0,t:void 0,a:void 0,o:void 0}),e}}),null),T(t=>{var a=$.header,o=X.headerLeft,s=`${X.headerTitle} ${e.config.hideTitle?X[`headerTitle--hidden`]:``}`;return a!==t.e&&U(n,t.e=a),o!==t.t&&U(r,t.t=o),s!==t.a&&U(i,t.a=s),t},{e:void 0,t:void 0,a:void 0}),n})(),(()=>{var e=zb(),r=e.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling,s=o.firstChild,c=s.firstChild;return G(a,()=>Ws(`youReceive`,t({id:`va18uh`,message:`You receive`}))),G(i,A(j,{get when(){return Ke()||ve()},get children(){var e=Ib(),n=e.firstChild;return W(e,`click`,()=>!Be()&&!Ue()&&He.show()),G(n,(()=>{var e=B(()=>!!Ke());return()=>e()?Hd(Ke()):t({id:`fpand1`,message:`Enter destination address`})})()),G(e,A(j,{get when(){return!Ue()},get children(){return A(bc,{size:10})}}),null),T(t=>{var r=`${K.recipientBadge} ${Ke()?``:K.recipientBadgeEmpty}${Ue()?` ${K.recipientBadgeLocked}`:``}`,i=Ue(),a=K.recipientBadgeText;return r!==t.e&&U(e,t.e=r),i!==t.t&&(e.disabled=t.t=i),a!==t.a&&U(n,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(o,A(j,{get when(){return jt()},get fallback(){return(()=>{var e=nx();return W(e,`click`,()=>b.show()),G(e,()=>t({id:`zz4mrw`,message:`Select token`}),null),G(e,A(nc,{size:14}),null),e})()},get children(){var e=Lb(),t=e.firstChild,r=t.nextSibling,i=r.firstChild.firstChild,a=i.nextSibling;return W(e,`click`,()=>{Mt()||b.show()}),G(t,A(Bc,{get symbol(){return Tt()},color:`#0052FF`,size:32,get logoURI(){return n.targetToken()?.logoURI}}),null),G(t,A(j,{get when(){return n.targetToken()?.chainId},get children(){var e=jb();return G(e,A(Vc,{size:12,get iconUrl(){return Ic(Se(),n.targetToken()?.chainId??0)}})),T(()=>U(e,$.targetChainDot)),e}}),null),G(i,Tt),G(a,()=>Qe().get(n.targetToken()?.chainId??0)?.name??``),G(r,A(j,{get when(){return!Mt()},get children(){return A(nc,{size:14})}}),null),T(n=>{var r={...Mt()?{}:{cursor:`pointer`}},a=$.targetIcon,o=$.symbol;return n.e=Hr(e,r,n.e),a!==n.t&&U(t,n.t=a),o!==n.a&&U(i,n.a=o),n},{e:void 0,t:void 0,a:void 0}),e}}),s),G(s,A(j,{get when(){return _()},get fallback(){return(()=>{var e=rx();return G(e,()=>Yc(Ot())),T(()=>U(e,$.amount)),e})()},get children(){var e=Rb();return W(e,`input`,e=>Pt(e.target.value)),T(()=>U(e,$.amountInput)),T(()=>e.value=h()),e}}),c),G(c,kt),T(t=>{var n=$.section,a=$.target,s=$.sectionLabel,l=$.targetContent,u=$.fiat;return n!==t.e&&U(e,t.e=n),a!==t.t&&U(r,t.t=a),s!==t.a&&U(i,t.a=s),l!==t.o&&U(o,t.o=l),u!==t.i&&U(c,t.i=u),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e})(),(()=>{var r=ex();return G(r,A(j,{get when(){return c()===`entry`},get children(){return[(()=>{var e=Bb(),n=e.firstChild.firstChild;return G(n,()=>t({id:`cgzgvn`,message:`Pay with`})),e})(),(()=>{var e=Hb();return G(e,A(j,{get when(){return a()},get children(){var e=Vb(),n=e.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,o=r.nextSibling;return W(e,`click`,()=>l(`crypto`)),G(n,A(Sc,{size:20})),G(i,()=>t({id:`1o1b4a8`,message:`Crypto`})),G(a,()=>t({id:`udneg1`,message:`Pay with tokens from your wallet`})),G(o,A(cc,{size:16})),T(t=>{var s=Q.methodButton,c=`${Q.methodButtonIcon} ${Q.methodButtonIconCrypto}`,l=Q.methodButtonText,u=Q.methodButtonTitle,d=Q.methodButtonDesc,f=Q.methodButtonArrow;return s!==t.e&&U(e,t.e=s),c!==t.t&&U(n,t.t=c),l!==t.a&&U(r,t.a=l),u!==t.o&&U(i,t.o=u),d!==t.i&&U(a,t.i=d),f!==t.n&&U(o,t.n=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}}),null),G(e,A(j,{get when(){return o()},get children(){var e=Vb(),n=e.firstChild,r=n.nextSibling,i=r.firstChild,a=i.nextSibling,o=r.nextSibling;return W(e,`click`,()=>l(`card`)),G(n,A(uc,{size:20})),G(i,()=>t({id:`2b8ghr`,message:`Card`})),G(a,()=>t({id:`1q45kup`,message:`Buy with credit or debit card`})),G(o,A(cc,{size:16})),T(t=>{var s=Q.methodButton,c=`${Q.methodButtonIcon} ${Q.methodButtonIconCard}`,l=Q.methodButtonText,u=Q.methodButtonTitle,d=Q.methodButtonDesc,f=Q.methodButtonArrow;return s!==t.e&&U(e,t.e=s),c!==t.t&&U(n,t.t=c),l!==t.a&&U(r,t.a=l),u!==t.o&&U(i,t.o=u),d!==t.i&&U(a,t.i=d),f!==t.n&&U(o,t.n=f),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e}}),null),T(()=>U(e,Q.methodButtons)),e})()]}}),null),G(r,A(j,{get when(){return c()===`crypto`},get children(){return[(()=>{var e=Wb(),n=e.firstChild;return G(n,A(j,{get when(){return u()},get fallback(){return(()=>{var e=ix();return G(e,()=>t({id:`cgzgvn`,message:`Pay with`})),e})()},get children(){var e=Ub(),n=e.firstChild,r=n.nextSibling;return W(e,`click`,p),W(n,`animationend`,d()?m:void 0),G(n,A(ic,{size:14})),G(r,()=>t({id:`cgzgvn`,message:`Pay with`})),T(t=>{var i=`${$.backButton}${d()?` ${$[`backButton--exiting`]}`:``}`,a=d()?$.backArrowExit:$.backArrowEnter,o=d()?$.backTextExit:$.backTextEnter;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),null),G(n,A(j,{get when(){return ze()===`quoted`},get children(){return A(pu,{secondsRemaining:rt,totalSeconds:30,onRefresh:()=>{tt.refetch()},isRefreshing:()=>tt.isFetching})}}),null),e})(),(()=>{var e=Jb();return G(e,A(j,{get when(){return v()},get fallback(){return(()=>{var e=ax(),n=e.firstChild,r=n.nextSibling,i=r.nextSibling;return G(r,()=>t({id:`1olegnl`,message:`Enter amount to get started`})),G(i,()=>t({id:`13i9oqu`,message:`We'll find the best rate for you`})),T(t=>{var a=Z.quoteCardSlotCard,o=K.idleIcon,s=K.idleTitle,c=K.idleSub;return a!==t.e&&U(e,t.e=a),o!==t.t&&U(n,t.t=o),s!==t.a&&U(r,t.a=s),c!==t.o&&U(i,t.o=c),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()},get children(){return[A(j,{get when(){return!C()||x().length>0},get fallback(){return[(()=>{var e=ox(),t=e.firstChild,n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=i.firstChild,o=a.nextSibling,s=n.nextSibling,c=s.firstChild,l=c.nextSibling;return T(e=>{var u=$.paySelectedSkeleton,d=$.paySelectedLeft,f=`${K.skeleton} ${$.paySkeletonIcon}`,p=$.paySkeletonInfo,m=`${K.skeleton} ${$.paySkeletonLine} ${$.paySkeletonSymbol}`,h=`${K.skeleton} ${$.paySkeletonLine} ${$.paySkeletonChain}`,g=$.paySkeletonRight,_=`${K.skeleton} ${$.paySkeletonLine} ${$.paySkeletonAmount}`,v=`${K.skeleton} ${$.paySkeletonLine} ${$.paySkeletonUsd}`;return u!==e.e&&U(t,e.e=u),d!==e.t&&U(n,e.t=d),f!==e.a&&U(r,e.a=f),p!==e.o&&U(i,e.o=p),m!==e.i&&U(a,e.i=m),h!==e.n&&U(o,e.n=h),g!==e.s&&U(s,e.s=g),_!==e.h&&U(c,e.h=_),v!==e.r&&U(l,e.r=v),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),e})(),A(cu,{})]},get children(){return[(()=>{var e=Gb();return G(e,A(j,{get when(){return lt().length>0},get fallback(){return(()=>{var e=lx();return G(e,A(j,{get when(){return ve()},get fallback(){return[(()=>{var e=ux();return T(()=>U(e,K.idleIcon)),e})(),(()=>{var e=cx();return G(e,()=>t({id:`18y1lrp`,message:`Connect your wallet to see payment options`})),T(()=>U(e,$.payEmptyText)),e})()]},get children(){return[(()=>{var e=sx();return T(()=>U(e,K.idleIcon)),e})(),(()=>{var e=cx();return G(e,()=>t({id:`g7pjpv`,message:`No tokens available`})),T(()=>U(e,$.payEmptyText)),e})()]}})),T(()=>U(e,$.payEmpty)),e})()},get children(){return(()=>{let e=()=>lt()[ct()]??lt()[0];return(()=>{var n=fx(),r=n.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling,s=o.firstChild,c=s.firstChild,l=s.nextSibling,u=r.nextSibling,d=u.nextSibling;return W(n,`click`,()=>y.show()),G(i,A(Bc,{get symbol(){return e().symbol},get color(){return e().color},size:32,get logoURI(){return e().logoURI}}),a),G(a,A(Vc,{color:null,size:12,get iconUrl(){return B(()=>e().chainId!==void 0)()?Ic(Se(),e().chainId):void 0}})),G(c,()=>e().symbol),G(s,A(j,{get when(){return e().recommended},get children(){var e=dx();return G(e,()=>t({id:`xel5qk`,message:`Recommended`})),T(()=>U(e,$.payBestBadge)),e}}),null),G(l,()=>e().chain),G(u,A(j,{get when(){return B(()=>!!C())()&&!e().amount},get fallback(){return[(()=>{var t=px();return G(t,()=>e().amount),T(()=>U(t,$.paySelectedAmount)),t})(),A(j,{get when(){return e().amountUsd},get children(){var t=jb();return G(t,()=>e().amountUsd),T(()=>U(t,$.paySelectedAmountUsd)),t}})]},get children(){var e=jb();return T(()=>U(e,`${K.skeleton} ${$.payAmountSkeleton}`)),e}})),G(d,A(nc,{size:16})),T(e=>{var f=$.paySelected,p=t({id:`1t0r88u`,message:`Select payment token`}),m=$.paySelectedLeft,h=$.payIconWrap,g=$.payChainDot,_=$.paySelectedInfo,v=$.paySelectedTopRow,y=$.payTokenSymbol,b=$.payTokenChain,x=$.paySelectedRight,S=$.paySelectedCaret;return f!==e.e&&U(n,e.e=f),p!==e.t&&H(n,`aria-label`,e.t=p),m!==e.a&&U(r,e.a=m),h!==e.o&&U(i,e.o=h),g!==e.i&&U(a,e.i=g),_!==e.n&&U(o,e.n=_),v!==e.s&&U(s,e.s=v),y!==e.h&&U(c,e.h=y),b!==e.r&&U(l,e.r=b),x!==e.d&&U(u,e.d=x),S!==e.l&&U(d,e.l=S),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),n})()})()}})),e})(),A(j,{get when(){return fe()},get children(){var e=Kb();return G(e,fe),e}})]}}),A(j,{get when(){return B(()=>!!(lt().some(e=>!e.disabled)&&ft()&&pt()))()&&n.targetToken()},get fallback(){return A(j,{get when(){return te()},get fallback(){return A(j,{get when(){return B(()=>!!(O()&&!C()&&v()&&lt().some(e=>!e.disabled)))()&&!ft()},get children(){var e=mx(),n=e.firstChild,r=n.nextSibling;return G(r,()=>t({id:`1ne9nkz`,message:`No offer available`})),T(t=>{var i=K.noOffer,a=K.noOfferIcon,o=K.noOfferText;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}})},get children(){return A(cu,{})}})},get children(){var e=qb();return G(e,A(lu,{get route(){return ft()},get fromToken(){return pt()},get toToken(){return n.targetToken()},inline:!0})),T(()=>U(e,xl.quote)),e}})]}})),e})()]}}),null),G(r,A(j,{get when(){return c()===`card`},get children(){return[(()=>{var n=Yb(),r=n.firstChild,i=r.firstChild;return G(r,A(j,{get when(){return u()},get fallback(){return(()=>{var e=ix();return G(e,()=>t({id:`cgzgvn`,message:`Pay with`})),e})()},get children(){var e=Ub(),n=e.firstChild,r=n.nextSibling;return W(e,`click`,p),W(n,`animationend`,d()?m:void 0),G(n,A(ic,{size:14})),G(r,()=>t({id:`cgzgvn`,message:`Pay with`})),T(t=>{var i=`${$.backButton}${d()?` ${$[`backButton--exiting`]}`:``}`,a=d()?$.backArrowExit:$.backArrowEnter,o=d()?$.backTextExit:$.backTextEnter;return i!==t.e&&U(e,t.e=i),a!==t.t&&U(n,t.t=a),o!==t.a&&U(r,t.a=o),t},{e:void 0,t:void 0,a:void 0}),e}}),i),G(i,A(pg,{get currencies(){return Me()},get selected(){return we()},onSelect:Te,get locked(){return Ee()},get locale(){return e.config.locale}})),n})(),A(X_,We({fiatCheckout:k,fiatCountdown:ke,get targetToken(){return n.targetToken()??null},get fiatCurrency(){return we()},get apiBase(){return Se()},showPayAmount:!0},()=>v()&&!De()?{idleTitle:t({id:`pom1h2`,message:`Enter recipient address`}),idleSub:t({id:`7m2ht3`,message:`Required to receive your tokens`})}:{}))]}}),null),G(r,A(j,{get when(){return c()!==`entry`},get children(){var e=$b();return G(e,A(Ye,{get children(){return[A(M,{get when(){return!jt()},get children(){var e=Xb();return W(e,`click`,()=>b.show()),G(e,()=>t({id:`zz4mrw`,message:`Select token`})),T(()=>U(e,Tu.btnRecipient)),e}}),A(M,{get when(){return c()===`crypto`},get children(){return A(Mu,{get phase(){return ze()},get isConnected(){return ve()},get hasQuote(){return!!ft()},get confirmDisabled(){return nt()},onConnect:be,onConfirm:yt,onRetry:bt,get needsRecipient(){return B(()=>!!Ge())()&&!n.recipient()},onEnterRecipient:()=>He.show(),get label(){return B(()=>!!Be())()?void 0:At()}})}}),A(M,{get when(){return c()===`card`},get children(){return A(Ye,{get children(){return[A(M,{get when(){return k.phase()===`error`},get children(){var e=Xb();return W(e,`click`,Re),G(e,Ie),T(()=>U(e,Tu.btnPrimary)),e}}),A(M,{get when(){return Fe()},get children(){var e=Zb(),t=e.firstChild,n=t.firstChild;return G(t,Ie,null),T(r=>{var i=`${Tu.btnPrimary} ${Tu.executing}`,a=Tu.btnInner,o=Tu.spinner;return i!==r.e&&U(e,r.e=i),a!==r.t&&U(t,r.t=a),o!==r.a&&U(n,r.a=o),r},{e:void 0,t:void 0,a:void 0}),e}}),A(M,{get when(){return!v()},get children(){var e=Qb();return G(e,()=>t({id:`119fv83`,message:`Enter amount`})),T(()=>U(e,Tu.btnPrimary)),e}}),A(M,{get when(){return!De()},get children(){var e=Xb();return W(e,`click`,()=>He.show()),G(e,()=>t({id:`wx5bee`,message:`Enter Recipient Address`})),T(()=>U(e,Tu.btnRecipient)),e}}),A(M,{get when(){return Le()},get children(){var e=Xb();return W(e,`click`,Re),G(e,Ie),T(()=>U(e,Tu.btnPrimary)),e}}),A(M,{when:!0,get children(){var e=Qb();return G(e,Ie),T(()=>U(e,Tu.btnPrimary)),e}})]}})}})]}})),T(()=>U(e,K.ctaWrapperReceive)),e}}),null),r})(),(()=>{var t=jb();return G(t,A(j,{get when(){return!e.config.hidePoweredBy},get children(){return A(Hc,{})}})),T(()=>U(t,K.footerSlot)),t})()],tracking:()=>A(Vd,{get order(){return n.order()},get fromToken(){return n.fromToken()},get toToken(){return n.targetToken()},get providerName(){return ht()},get providerIcon(){return gt()},get apiEndpoint(){return e.config.apiEndpoint??`https://api.hyperstream.dev`},get inputAmount(){return _t()??``},get outputAmount(){return n.targetAmount()},onNewSwap:xt,mode:`receive`,get executionError(){return vt()},onRetry:bt,get phase(){return ze()},get chainMap(){return Qe()}}),success:()=>A(xf,{get order(){return n.order()},get fromToken(){return n.fromToken()},get toToken(){return n.targetToken()},onNewSwap:xt,get apiEndpoint(){return e.config.apiEndpoint??`https://api.hyperstream.dev`},get providerName(){return ht()},mode:`receive`,get chainMap(){return Qe()}})}})}}),null),G(r,A(j,{get when(){return y.mounted()},get children(){return A(ah,{get client(){return xe()},get walletAddress(){return ye()},selectingFor:`from`,get tokenTags(){return ut()},onSelect:Ct,onClose:()=>y.hide(),get allowedTokens(){return Je()},get noBorder(){return e.config.noBorder},get dismissing(){return y.dismissing()}})}}),null),G(r,A(j,{get when(){return b.mounted()},get children(){return A(ah,{get client(){return xe()},walletAddress:null,selectingFor:`to`,onSelect:e=>{e.address&&typeof e.decimals==`number`&&n.setTargetToken({chainId:e.chainId,address:e.address,symbol:e.symbol,name:e.name,decimals:e.decimals,logoURI:e.logoURI,priceUsd:e.priceUsd}),b.hide()},onClose:()=>b.hide(),get allowedTokens(){return Nt()},get noBorder(){return e.config.noBorder},get dismissing(){return b.dismissing()}})}}),null),G(r,A(j,{get when(){return B(()=>!!He.mounted())()&&n.targetToken()},get children(){var e=jb();return G(e,A(Og,{get initialValue(){return n.recipient()??``},get chainType(){return Iu(n.targetToken().chainId)},onConfirm:e=>{qe(e),He.hide()},onClose:()=>He.hide(),get dismissing(){return He.dismissing()}})),T(()=>U(e,`${K.selectorOverlay}${He.dismissing()?` ${K.selectorOverlayDismissing}`:``}`)),e}}),null),T(t=>{var n=`${K.container}${e.config.noBackground?` ${K.noBg}`:``}${e.config.noBorder?` ${K.noBorder}`:``}`,a=K.accentLine;return n!==t.e&&U(r,t.e=n),a!==t.t&&U(i,t.t=a),t},{e:void 0,t:void 0}),r})()}function _x(e){let t=D(()=>e.config.tradeType===`EXACT_OUTPUT`?`receive`:`swap`),n=D(()=>{let t=e.config,n=Array.isArray(t.toToken)?t.toToken:void 0,r=n?void 0:t.toToken;return{apiEndpoint:t.apiEndpoint,fiatApiEndpoint:t.fiatApiEndpoint,theme:t.theme,locale:t.locale,customColors:t.customColors,titleText:t.titleText,titleImageUrl:t.titleImageUrl,hideTitle:t.hideTitle,hidePoweredBy:t.hidePoweredBy,noBackground:t.noBackground,noBorder:t.noBorder,fromToken:t.fromToken,toToken:r,tradeType:t.tradeType,amount:t.amount,recipient:t.recipient,recipientEditable:t.recipientEditable,refundTo:t.refundTo,methods:t.methods,defaultPayMethod:t.defaultPayMethod,fiatCurrency:t.fiatCurrency,fromTokens:t.fromTokens,toTokens:n??t.toTokens,lockFromToken:t.lockFromToken,lockToToken:t.lockToToken}}),r=D(()=>{let t=e.config,n=Array.isArray(t.toToken)?t.toToken[0]:t.toToken;return{apiEndpoint:t.apiEndpoint,fiatApiEndpoint:t.fiatApiEndpoint,theme:t.theme,locale:t.locale,customColors:t.customColors,titleText:t.titleText,titleImageUrl:t.titleImageUrl,hideTitle:t.hideTitle,hidePoweredBy:t.hidePoweredBy,noBackground:t.noBackground,noBorder:t.noBorder,...n&&{target:n},icon:t.icon,amount:t.amount??``,fromToken:t.fromToken,recipient:t.recipient,recipientEditable:t.recipientEditable,refundTo:t.refundTo,amountEditable:!t.amount,methods:t.methods?.map(e=>e===`crypto`?`crypto`:`card`),fiatCurrency:t.fiatCurrency,fromTokens:t.fromTokens,toTokens:t.toTokens}});return A(Ye,{get children(){return[A(M,{get when(){return t()===`receive`},get children(){return A(hx,{get config(){return r()},get walletAdapter(){return e.walletAdapter},get callbacks(){return e.callbacks}})}}),A(M,{get when(){return t()===`swap`},get children(){return A(rb,{get config(){return n()},get walletAdapter(){return e.walletAdapter},get callbacks(){return e.callbacks}})}})]}})}var vx=[ab,ob,sb,cb,lb,ub,db,fb,pb,mb,hb,gb,_b,vb,yb,bb,xb,Sb,Cb].join(`
3
+ `),yx=us((e,t,n)=>A(_x,{config:e,walletAdapter:t,callbacks:n}),()=>vx);function bx(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return t[n]=Object.assign({},r),Dx(r.value)&&!Ox(r.value)&&!Array.isArray(r.value)&&(t[n].value=Object.assign({},r.value)),Array.isArray(r.value)&&(t[n].value=r.value.slice(0)),t},{})}function xx(e){return e?Object.keys(e).reduce((t,n)=>{let r=e[n];return t[n]=Dx(r)&&`value`in r?r:{value:r},t[n].attribute||(t[n].attribute=Ex(n)),t[n].parse=`parse`in t[n]?t[n].parse:typeof t[n].value!=`string`,t},{}):{}}function Sx(e){return Object.keys(e).reduce((t,n)=>(t[n]=e[n].value,t),{})}function Cx(e,t){let n=bx(t);return Object.keys(t).forEach(t=>{let r=n[t],i=e.getAttribute(r.attribute),a=e[t];i!=null&&(r.value=r.parse?wx(i):i),a!=null&&(r.value=Array.isArray(a)?a.slice(0):a),r.reflect&&Tx(e,r.attribute,r.value,!!r.parse),Object.defineProperty(e,t,{get(){return r.value},set(e){let n=r.value;r.value=e,r.reflect&&Tx(this,r.attribute,r.value,!!r.parse);for(let r=0,i=this.__propertyChangedCallbacks.length;r<i;r++)this.__propertyChangedCallbacks[r](t,e,n)},enumerable:!0,configurable:!0})}),n}function wx(e){if(e)try{return JSON.parse(e)}catch{return e}}function Tx(e,t,n,r){if(n==null||n===!1)return e.removeAttribute(t);let i=r?JSON.stringify(n):n;e.__updating[t]=!0,i===`true`&&(i=``),e.setAttribute(t,i),Promise.resolve().then(()=>delete e.__updating[t])}function Ex(e){return e.replace(/\.?([A-Z]+)/g,(e,t)=>`-`+t.toLowerCase()).replace(`_`,`-`).replace(/^-/,``)}function Dx(e){return e!=null&&(typeof e==`object`||typeof e==`function`)}function Ox(e){return Object.prototype.toString.call(e)===`[object Function]`}function kx(e){return typeof e==`function`&&e.toString().indexOf(`class`)===0}var Ax;function jx(e,t){let n=Object.keys(t);return class extends e{static get observedAttributes(){return n.map(e=>t[e].attribute)}constructor(){super(),this.__initialized=!1,this.__released=!1,this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props={};for(let e of n)this[e]=void 0}connectedCallback(){if(this.__initialized)return;this.__releaseCallbacks=[],this.__propertyChangedCallbacks=[],this.__updating={},this.props=Cx(this,t);let e=Sx(this.props),n=this.Component,r=Ax;try{Ax=this,this.__initialized=!0,kx(n)?new n(e,{element:this}):n(e,{element:this})}finally{Ax=r}}async disconnectedCallback(){if(await Promise.resolve(),this.isConnected)return;this.__propertyChangedCallbacks.length=0;let e=null;for(;e=this.__releaseCallbacks.pop();)e(this);delete this.__initialized,this.__released=!0}attributeChangedCallback(e,n,r){if(this.__initialized&&!this.__updating[e]&&(e=this.lookupProp(e),e in t)){if(r==null&&!this[e])return;this[e]=t[e].parse?wx(r):r}}lookupProp(e){if(t)return n.find(n=>e===n||e===t[n].attribute)}get renderRoot(){return this.shadowRoot||this.attachShadow({mode:`open`})}addReleaseCallback(e){this.__releaseCallbacks.push(e)}addPropertyChangedCallback(e){this.__propertyChangedCallbacks.push(e)}}}function Mx(e,t={},n={}){let{BaseElement:r=HTMLElement,extension:i,customElements:a=window.customElements}=n;return n=>{if(!e)throw Error(`tag is required to register a Component`);let o=a.get(e);return o?(o.prototype.Component=n,o):(o=jx(r,xx(t)),o.prototype.Component=n,o.prototype.registeredTag=e,a.define(e,o,i),o)}}function Nx(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let[i,a]=w(e[t[r]]);Object.defineProperty(n,t[r],{get:i,set(e){a(()=>e)}})}return n}function Px(e){if(e.assignedSlot&&e.assignedSlot._$owner)return e.assignedSlot._$owner;let t=e.parentNode;for(;t&&!t._$owner&&!(t.assignedSlot&&t.assignedSlot._$owner);)t=t.parentNode;return t&&t.assignedSlot?t.assignedSlot._$owner:e._$owner}function Fx(e){return(t,n)=>{let{element:r}=n;return C(i=>{let a=Nx(t);r.addPropertyChangedCallback((e,t)=>a[e]=t),r.addReleaseCallback(()=>{r.renderRoot.textContent=``,i()});let o=e(a,n);return G(r.renderRoot,o)},Px(r))}}function Ix(e,t,n){return arguments.length===2&&(n=t,t={}),Mx(e,t)(Fx(n))}var Lx=V(`<style>`);function Rx(e){if(!e)return``;let t=e.trim();if(t.startsWith(`[`))try{let e=JSON.parse(t);if(Array.isArray(e))return e}catch{}return t}function zx(e){if(e)try{let t=JSON.parse(e.trim());if(Array.isArray(t))return t}catch{}}function Bx(e){if(e)try{let t=JSON.parse(e.trim());if(Array.isArray(t))return t}catch{}}function Vx(e){if(e)try{let t=JSON.parse(e.trim());if(typeof t==`object`&&t&&!Array.isArray(t)&&Object.values(t).every(e=>typeof e==`string`))return t}catch{}}function Hx(e){e&&nn(e),!(typeof customElements>`u`)&&(customElements.get(`tokenflight-widget`)||Ix(`tokenflight-widget`,{"api-endpoint":``,"fiat-api-endpoint":``,"to-token":``,"from-token":``,"trade-type":``,amount:``,recipient:``,icon:``,"lock-from-token":!1,"lock-to-token":!1,"fiat-currency":``,methods:``,"default-pay-method":``,"from-tokens":``,"to-tokens":``,"title-text":``,"title-image":``,theme:``,locale:``,"csp-nonce":``,"hide-title":!1,"hide-powered-by":!1,"no-background":!1,"no-border":!1,"recipient-editable":!1,"refund-to":``,"rpc-overrides":``},(e,{element:t})=>{let n={apiEndpoint:e[`api-endpoint`]||Mt()||void 0,fiatApiEndpoint:e[`fiat-api-endpoint`]||Pt()||void 0,toToken:Rx(e[`to-token`]),fromToken:e[`from-token`]||void 0,tradeType:e[`trade-type`]||void 0,amount:e.amount||void 0,recipient:e.recipient||void 0,recipientEditable:Tt(e[`recipient-editable`]),refundTo:e[`refund-to`]||void 0,icon:e.icon||void 0,lockFromToken:Tt(e[`lock-from-token`]),lockToToken:Tt(e[`lock-to-token`]),fiatCurrency:e[`fiat-currency`]||void 0,methods:Bx(e.methods)??Xt(),defaultPayMethod:e[`default-pay-method`]||void 0,fromTokens:zx(e[`from-tokens`]),toTokens:zx(e[`to-tokens`]),titleText:e[`title-text`]||void 0,titleImageUrl:e[`title-image`]||void 0,theme:e.theme||It()||`light`,locale:e.locale||Rt()||`en-US`,hideTitle:t.hasAttribute(`hide-title`)?Tt(e[`hide-title`])??!1:Ht(),hidePoweredBy:t.hasAttribute(`hide-powered-by`)?Tt(e[`hide-powered-by`])??!1:Wt(),noBackground:t.hasAttribute(`no-background`)?Tt(e[`no-background`])??!1:Kt(),noBorder:t.hasAttribute(`no-border`)?Tt(e[`no-border`])??!1:Jt(),rpcOverrides:Vx(e[`rpc-overrides`])??Qt()},r=e[`csp-nonce`]||void 0,[i,a]=w(typeof window<`u`&&window.matchMedia?.(`(prefers-color-scheme: dark)`).matches===!0);oe(os(e=>{a(e===is)}));let o=t.__customColors,s=D(()=>{let t=e.theme||It()||`light`,n=(t===`auto`?i():t===`dark`)?is:rs,r=At();return`${vx}\n:host { ${as(r||o?{...n,...r,...o}:n)} }`}),c=t.__walletAdapter,l=t.__callbacks;return[(()=>{var e=Lx();return H(e,`nonce`,r),G(e,s),e})(),A(Yo,{client:cs,get children(){return A(_x,{config:n,get walletAdapter(){return c??Et()},get callbacks(){return l?{...Ot(),...l}:Ot()}})}})]}))}export{Er as $,Nu as A,us as B,ob as C,dv as D,sv as E,Yc as F,os as G,as as H,Jc as I,H as J,Yo as K,Xc as L,Lu as M,Fu as N,lv as O,Pu as P,br as Q,qc as R,sb as S,rb as T,is as U,cs as V,rs as W,yr as X,V as Y,Tr as Z,fb as _,_x as a,Rt as at,lb as b,xb as c,Tt as ct,vb as d,A as dt,z as et,_b as f,D as ft,pb as g,mb as h,vx as i,At as it,Iu as j,km as k,bb as l,rn as lt,hb as m,oe as mt,Ix as n,Mt as nt,Cb as o,It as ot,gb as p,w as pt,G as q,yx as r,Ot as rt,Sb as s,Et as st,Hx as t,nn as tt,yb as u,wt as ut,db as v,ab as w,cb as x,ub as y,Kc as z};