@nowramp/form 0.1.54 → 0.1.56

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.
package/dist/index.js CHANGED
@@ -4,106 +4,106 @@
4
4
  if(document.getElementById(id))return;
5
5
  var s=document.createElement('style');
6
6
  s.id=id;
7
- s.textContent=`@layer nowramp-form{.theme-dark{--t-bg: #000000;--t-surface: rgba(255,255,255,.1);--t-surface-hover: rgba(255,255,255,.14);--t-text: #ffffff;--t-text-secondary: rgba(255,255,255,.4);--t-text-tertiary: rgba(255,255,255,.3);--t-text-muted: rgba(255,255,255,.5);--t-border: rgba(255,255,255,.2);--t-border-focus: rgba(255,255,255,.5);--t-pill-bg: rgba(255,255,255,.1);--t-pill-hover: rgba(255,255,255,.15);--t-badge-bg: rgba(255,255,255,.15);--t-divider: rgba(255,255,255,.2);--t-close-bg: rgba(255,255,255,.1);--t-close-hover: rgba(255,255,255,.2);--t-icon-stroke: rgba(255,255,255,.4);--t-icon-close: rgba(255,255,255,.6);--t-accent: #0077FF;--t-cta-bg: var(--t-accent);--t-cta-text: #ffffff;--t-cta-hover: rgba(255,255,255,.9);--t-cta-active: rgba(255,255,255,.8);--t-modal-bg: #000000;--t-chain-border: #000000;--t-skeleton-from: rgba(255,255,255,.06);--t-skeleton-mid: rgba(255,255,255,.12);--t-scrollbar: rgba(255,255,255,.15);--t-card-icon-bg: rgba(255,255,255,.1);--t-card-icon-stroke: rgba(255,255,255,.6);--t-success: #10b981;--t-error: #EF4444}.theme-light{--t-bg: #F2F3F5;--t-surface: rgba(0,0,0,.05);--t-surface-hover: rgba(0,0,0,.08);--t-text: #111111;--t-text-secondary: rgba(0,0,0,.45);--t-text-tertiary: rgba(0,0,0,.3);--t-text-muted: rgba(0,0,0,.5);--t-border: rgba(0,0,0,.12);--t-border-focus: rgba(0,0,0,.3);--t-pill-bg: rgba(0,0,0,.06);--t-pill-hover: rgba(0,0,0,.1);--t-badge-bg: rgba(0,0,0,.08);--t-divider: rgba(0,0,0,.1);--t-close-bg: rgba(0,0,0,.06);--t-close-hover: rgba(0,0,0,.12);--t-icon-stroke: rgba(0,0,0,.35);--t-icon-close: rgba(0,0,0,.5);--t-accent: #0077FF;--t-cta-bg: var(--t-accent);--t-cta-text: #ffffff;--t-cta-hover: #222222;--t-cta-active: #333333;--t-modal-bg: #F2F3F5;--t-chain-border: #F2F3F5;--t-skeleton-from: rgba(0,0,0,.04);--t-skeleton-mid: rgba(0,0,0,.08);--t-scrollbar: rgba(0,0,0,.12);--t-card-icon-bg: rgba(0,0,0,.06);--t-card-icon-stroke: rgba(0,0,0,.5);--t-success: #10b981;--t-error: #EF4444}.custom-scroll::-webkit-scrollbar{width:4px}.custom-scroll::-webkit-scrollbar-track{background:transparent}.custom-scroll::-webkit-scrollbar-thumb{background:var(--t-scrollbar);border-radius:2px}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.skeleton{background:linear-gradient(90deg,var(--t-skeleton-from) 25%,var(--t-skeleton-mid) 50%,var(--t-skeleton-from) 75%);background-size:200% 100%;animation:shimmer 1.5s ease-in-out infinite;border-radius:4px}@keyframes fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.tab-fade-in{animation:fadeIn .3s ease-out both}.digit-slot{display:inline-block;overflow:hidden;vertical-align:top}.digit-slot-inner{transition:transform .35s cubic-bezier(.33,1,.68,1)}@keyframes nramp-spin{to{transform:rotate(360deg)}}.nramp-spinner{width:40px;height:40px;border:3px solid var(--t-border);border-top-color:var(--t-accent);border-radius:50%;animation:nramp-spin .8s linear infinite;margin:0 auto}.nramp-spinner-large{width:60px;height:60px;border-width:4px}.nramp-spinner-inline{width:16px;height:16px;border-width:2px;display:inline-block}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[3px\\]{top:3px}.z-20{z-index:20}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mr-0\\.5{margin-right:.125rem}.mr-3{margin-right:.75rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\\[2px\\]{margin-top:2px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-\\[640px\\]{height:640px}.h-full{height:100%}.min-h-\\[640px\\]{min-height:640px}.w-0{width:0px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[390px\\]{max-width:390px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-3\\.5{gap:.875rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-12{padding:3rem}.p-8{padding:2rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[2px\\]{padding-left:2px;padding-right:2px}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-1{padding-bottom:.25rem}.pb-2\\.5{padding-bottom:.625rem}.pb-5{padding-bottom:1.25rem}.pb-\\[14px\\]{padding-bottom:14px}.pb-\\[18px\\]{padding-bottom:18px}.pt-3{padding-top:.75rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\\[12px\\]{padding-top:12px}.pt-\\[14px\\]{padding-top:14px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-\\[17px\\]{font-size:17px}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[48px\\]{font-size:48px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover-item{transition:background-color .15s ease}.hover-item:hover{background-color:var(--t-hover-bg, rgba(255, 255, 255, .05))}.hover\\:opacity-70:hover{opacity:.7}
7
+ s.textContent=`@layer nowramp-form{.theme-dark{--t-bg: #000000;--t-surface: rgba(255,255,255,.1);--t-surface-hover: rgba(255,255,255,.14);--t-text: #ffffff;--t-text-secondary: rgba(255,255,255,.4);--t-text-tertiary: rgba(255,255,255,.3);--t-text-muted: rgba(255,255,255,.5);--t-border: rgba(255,255,255,.2);--t-border-focus: rgba(255,255,255,.5);--t-pill-bg: rgba(255,255,255,.1);--t-pill-hover: rgba(255,255,255,.15);--t-badge-bg: rgba(255,255,255,.15);--t-divider: rgba(255,255,255,.2);--t-close-bg: rgba(255,255,255,.1);--t-close-hover: rgba(255,255,255,.2);--t-icon-stroke: rgba(255,255,255,.4);--t-icon-close: rgba(255,255,255,.6);--t-accent: #0077FF;--t-cta-bg: var(--t-accent);--t-cta-text: #ffffff;--t-cta-hover: rgba(255,255,255,.9);--t-cta-active: rgba(255,255,255,.8);--t-modal-bg: #000000;--t-chain-border: #000000;--t-skeleton-from: rgba(255,255,255,.06);--t-skeleton-mid: rgba(255,255,255,.12);--t-scrollbar: rgba(255,255,255,.15);--t-card-icon-bg: rgba(255,255,255,.1);--t-card-icon-stroke: rgba(255,255,255,.6);--t-success: #10b981;--t-error: #EF4444}.theme-light{--t-bg: #F2F3F5;--t-surface: rgba(0,0,0,.05);--t-surface-hover: rgba(0,0,0,.08);--t-text: #111111;--t-text-secondary: rgba(0,0,0,.45);--t-text-tertiary: rgba(0,0,0,.3);--t-text-muted: rgba(0,0,0,.5);--t-border: rgba(0,0,0,.12);--t-border-focus: rgba(0,0,0,.3);--t-pill-bg: rgba(0,0,0,.06);--t-pill-hover: rgba(0,0,0,.1);--t-badge-bg: rgba(0,0,0,.08);--t-divider: rgba(0,0,0,.1);--t-close-bg: rgba(0,0,0,.06);--t-close-hover: rgba(0,0,0,.12);--t-icon-stroke: rgba(0,0,0,.35);--t-icon-close: rgba(0,0,0,.5);--t-accent: #0077FF;--t-cta-bg: var(--t-accent);--t-cta-text: #ffffff;--t-cta-hover: #222222;--t-cta-active: #333333;--t-modal-bg: #F2F3F5;--t-chain-border: #F2F3F5;--t-skeleton-from: rgba(0,0,0,.04);--t-skeleton-mid: rgba(0,0,0,.08);--t-scrollbar: rgba(0,0,0,.12);--t-card-icon-bg: rgba(0,0,0,.06);--t-card-icon-stroke: rgba(0,0,0,.5);--t-success: #10b981;--t-error: #EF4444}.custom-scroll::-webkit-scrollbar{width:4px}.custom-scroll::-webkit-scrollbar-track{background:transparent}.custom-scroll::-webkit-scrollbar-thumb{background:var(--t-scrollbar);border-radius:2px}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.skeleton{background:linear-gradient(90deg,var(--t-skeleton-from) 25%,var(--t-skeleton-mid) 50%,var(--t-skeleton-from) 75%);background-size:200% 100%;animation:shimmer 1.5s ease-in-out infinite;border-radius:4px}@keyframes fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.tab-fade-in{animation:fadeIn .3s ease-out both}.digit-slot{display:inline-block;overflow:hidden;vertical-align:top}.digit-slot-inner{transition:transform .35s cubic-bezier(.33,1,.68,1)}@keyframes nramp-spin{to{transform:rotate(360deg)}}.nramp-spinner{width:40px;height:40px;border:3px solid var(--t-border);border-top-color:var(--t-accent);border-radius:50%;animation:nramp-spin .8s linear infinite;margin:0 auto}.nramp-spinner-large{width:60px;height:60px;border-width:4px}.nramp-spinner-inline{width:16px;height:16px;border-width:2px;display:inline-block}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-0{left:0}.right-3{right:.75rem}.top-0{top:0}.top-1\\/2{top:50%}.top-\\[3px\\]{top:3px}.z-20{z-index:20}.mx-5{margin-left:1.25rem;margin-right:1.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-2\\.5{margin-bottom:.625rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mr-0\\.5{margin-right:.125rem}.mr-3{margin-right:.75rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-\\[2px\\]{margin-top:2px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-\\[640px\\]{height:640px}.h-full{height:100%}.min-h-\\[640px\\]{min-height:640px}.w-0{width:0px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[390px\\]{max-width:390px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-3\\.5{gap:.875rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-12{padding:3rem}.p-8{padding:2rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.px-\\[18px\\]{padding-left:18px;padding-right:18px}.px-\\[2px\\]{padding-left:2px;padding-right:2px}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-\\[10px\\]{padding-top:10px;padding-bottom:10px}.pb-1{padding-bottom:.25rem}.pb-2\\.5{padding-bottom:.625rem}.pb-5{padding-bottom:1.25rem}.pb-\\[14px\\]{padding-bottom:14px}.pb-\\[18px\\]{padding-bottom:18px}.pt-3{padding-top:.75rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-\\[12px\\]{padding-top:12px}.pt-\\[14px\\]{padding-top:14px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-\\[17px\\]{font-size:17px}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[48px\\]{font-size:48px}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover-item{transition:background-color .15s ease}.hover-item:hover{background-color:var(--t-hover-bg, rgba(255, 255, 255, .05))}.hover\\:opacity-70:hover{opacity:.7}
8
8
  }`;
9
9
  document.head.appendChild(s);
10
10
  })();
11
- import { jsx as e, jsxs as o, Fragment as te } from "react/jsx-runtime";
12
- import De, { useState as C, useRef as V, useCallback as H, useEffect as _, useMemo as j, useReducer as Xt, useContext as $t, createContext as jt } from "react";
13
- import { RampApi as Ke } from "@nowramp/sdk";
14
- import { createPortal as yt } from "react-dom";
15
- function Wt(t, n) {
16
- const [a, r] = C(null), [l, u] = C(!0), [m, i] = C(null), s = V(null);
17
- (!s.current || s.current !== t) && (s.current = new Ke({ apiKey: "", ...t }));
18
- const p = H(async () => {
11
+ import { jsx as e, jsxs as r, Fragment as ae } from "react/jsx-runtime";
12
+ import _e, { useState as b, useRef as _, useCallback as B, useEffect as K, useMemo as W, useReducer as Qt, useContext as zt, createContext as Jt } from "react";
13
+ import { RampApi as $e } from "@nowramp/sdk";
14
+ import { createPortal as bt } from "react-dom";
15
+ function qt(t, n) {
16
+ const [a, o] = b(null), [l, c] = b(!0), [m, s] = b(null), u = _(null);
17
+ (!u.current || u.current !== t) && (u.current = new $e({ apiKey: "", ...t }));
18
+ const p = B(async () => {
19
19
  if (!t.projectId) {
20
- i(new Error("projectId is required")), u(!1);
20
+ s(new Error("projectId is required")), c(!1);
21
21
  return;
22
22
  }
23
- u(!0), i(null);
23
+ c(!0), s(null);
24
24
  try {
25
- const h = await s.current.getSupported(n);
26
- r(h);
25
+ const h = await u.current.getSupported(n);
26
+ o(h);
27
27
  } catch (h) {
28
- i(h instanceof Error ? h : new Error("Failed to fetch config"));
28
+ s(h instanceof Error ? h : new Error("Failed to fetch config"));
29
29
  } finally {
30
- u(!1);
30
+ c(!1);
31
31
  }
32
32
  }, [t.projectId, n]);
33
- return _(() => {
33
+ return K(() => {
34
34
  p();
35
35
  }, [p]), { config: a, loading: l, error: m, refetch: p };
36
36
  }
37
- function Gt(t, n) {
38
- const [a, r] = C(null), [l, u] = C(!1), [m, i] = C(null), s = V(null), p = V(""), h = `${t.apiUrl}|${t.projectId}`;
39
- (!s.current || p.current !== h) && (s.current = new Ke({ apiKey: "", ...t }), p.current = h);
40
- const d = V(0);
41
- _(() => {
42
- const y = ++d.current;
37
+ function en(t, n) {
38
+ const [a, o] = b(null), [l, c] = b(!1), [m, s] = b(null), u = _(null), p = _(""), h = `${t.apiUrl}|${t.projectId}`;
39
+ (!u.current || p.current !== h) && (u.current = new $e({ apiKey: "", ...t }), p.current = h);
40
+ const d = _(0);
41
+ K(() => {
42
+ const x = ++d.current;
43
43
  if (!n || !t.projectId) {
44
- r(null), u(!1);
44
+ o(null), c(!1);
45
45
  return;
46
46
  }
47
- u(!0), i(null), s.current.getQuotes(n).then(
48
- (A) => {
49
- d.current === y && (r(A), u(!1));
47
+ c(!0), s(null), u.current.getQuotes(n).then(
48
+ (E) => {
49
+ d.current === x && (o(E), c(!1));
50
50
  },
51
- (A) => {
52
- d.current === y && (i(A instanceof Error ? A : new Error("Failed to fetch quotes")), r(null), u(!1));
51
+ (E) => {
52
+ d.current === x && (s(E instanceof Error ? E : new Error("Failed to fetch quotes")), o(null), c(!1));
53
53
  }
54
54
  );
55
55
  }, [t.projectId, n == null ? void 0 : n.fiatCurrency, n == null ? void 0 : n.fiatAmount, n == null ? void 0 : n.cryptoAmount, n == null ? void 0 : n.cryptoCurrency, n == null ? void 0 : n.network, n == null ? void 0 : n.paymentMethodId, n == null ? void 0 : n.country, n == null ? void 0 : n.orderType]);
56
- const f = H(async () => {
56
+ const f = B(async () => {
57
57
  if (!(!n || !t.projectId)) {
58
- u(!0), i(null);
58
+ c(!0), s(null);
59
59
  try {
60
- const y = await s.current.getQuotes(n);
61
- r(y);
62
- } catch (y) {
63
- i(y instanceof Error ? y : new Error("Failed to fetch quotes"));
60
+ const x = await u.current.getQuotes(n);
61
+ o(x);
62
+ } catch (x) {
63
+ s(x instanceof Error ? x : new Error("Failed to fetch quotes"));
64
64
  } finally {
65
- u(!1);
65
+ c(!1);
66
66
  }
67
67
  }
68
68
  }, [t.projectId, n]);
69
69
  return { quotes: a, loading: l, error: m, refetch: f };
70
70
  }
71
- function Yt(t) {
72
- const [n, a] = C(null), [r, l] = C(!1), [u, m] = C(null), i = V(null), s = V(""), p = `${t.apiUrl}|${t.projectId}`;
73
- (!i.current || s.current !== p) && (i.current = new Ke({ apiKey: "", ...t }), s.current = p);
74
- const h = H(async (f) => {
71
+ function tn(t) {
72
+ const [n, a] = b(null), [o, l] = b(!1), [c, m] = b(null), s = _(null), u = _(""), p = `${t.apiUrl}|${t.projectId}`;
73
+ (!s.current || u.current !== p) && (s.current = new $e({ apiKey: "", ...t }), u.current = p);
74
+ const h = B(async (f) => {
75
75
  l(!0), m(null);
76
76
  try {
77
- const y = await i.current.createCheckoutIntent(f);
78
- return a(y), y;
79
- } catch (y) {
80
- const A = y instanceof Error ? y : new Error("Failed to create checkout intent");
81
- throw m(A), A;
77
+ const x = await s.current.createCheckoutIntent(f);
78
+ return a(x), x;
79
+ } catch (x) {
80
+ const E = x instanceof Error ? x : new Error("Failed to create checkout intent");
81
+ throw m(E), E;
82
82
  } finally {
83
83
  l(!1);
84
84
  }
85
- }, []), d = H(() => {
85
+ }, []), d = B(() => {
86
86
  a(null), m(null);
87
87
  }, []);
88
- return { order: n, loading: r, error: u, createOrder: h, reset: d };
88
+ return { order: n, loading: o, error: c, createOrder: h, reset: d };
89
89
  }
90
- function Zt(t, n, a) {
91
- const [r, l] = C(null), [u, m] = C(!1), [i, s] = C(null), p = V(null);
92
- p.current || (p.current = new Ke({ apiKey: "", projectId: "", ...t }));
93
- const h = H(async () => {
90
+ function nn(t, n, a) {
91
+ const [o, l] = b(null), [c, m] = b(!1), [s, u] = b(null), p = _(null);
92
+ p.current || (p.current = new $e({ apiKey: "", projectId: "", ...t }));
93
+ const h = B(async () => {
94
94
  if (n) {
95
- m(!0), s(null);
95
+ m(!0), u(null);
96
96
  try {
97
97
  const d = await p.current.getTransaction(n);
98
98
  l(d);
99
99
  } catch (d) {
100
- s(d instanceof Error ? d : new Error("Failed to fetch status"));
100
+ u(d instanceof Error ? d : new Error("Failed to fetch status"));
101
101
  } finally {
102
102
  m(!1);
103
103
  }
104
104
  }
105
105
  }, [n]);
106
- return _(() => {
106
+ return K(() => {
107
107
  if (!n) return;
108
108
  const d = (a == null ? void 0 : a.initialDelay) ?? 0;
109
109
  if (d > 0) {
@@ -111,21 +111,21 @@ function Zt(t, n, a) {
111
111
  return () => clearTimeout(f);
112
112
  }
113
113
  h();
114
- }, [h, n, a == null ? void 0 : a.initialDelay]), _(() => {
115
- if (!n || !(a != null && a.pollInterval) || !r || ["completed", "failed", "cancelled", "expired", "refunded"].includes(r.status))
114
+ }, [h, n, a == null ? void 0 : a.initialDelay]), K(() => {
115
+ if (!n || !(a != null && a.pollInterval) || !o || ["completed", "failed", "cancelled", "expired", "refunded"].includes(o.status))
116
116
  return;
117
117
  const f = setInterval(h, a.pollInterval);
118
118
  return () => clearInterval(f);
119
- }, [n, a == null ? void 0 : a.pollInterval, r == null ? void 0 : r.status, h]), { status: r, loading: u, error: i, refetch: h };
119
+ }, [n, a == null ? void 0 : a.pollInterval, o == null ? void 0 : o.status, h]), { status: o, loading: c, error: s, refetch: h };
120
120
  }
121
- function xt(t, n) {
121
+ function Nt(t, n) {
122
122
  if (!t) return t;
123
123
  const a = t.indexOf(".");
124
124
  if (a === -1) return t;
125
- let r = t;
126
- return r.length - a - 1 > n && (r = r.slice(0, a + n + 1)), r = r.replace(/0+$/, "").replace(/\.$/, ""), r;
125
+ let o = t;
126
+ return o.length - a - 1 > n && (o = o.slice(0, a + n + 1)), o = o.replace(/0+$/, "").replace(/\.$/, ""), o;
127
127
  }
128
- const St = {
128
+ const It = {
129
129
  step: "amount",
130
130
  flowType: "buy",
131
131
  fiatCurrency: "USD",
@@ -143,7 +143,7 @@ const St = {
143
143
  country: "",
144
144
  errorMessage: null
145
145
  };
146
- function Qt(t, n) {
146
+ function an(t, n) {
147
147
  switch (n.type) {
148
148
  case "SET_STEP":
149
149
  return { ...t, step: n.step, errorMessage: null };
@@ -193,199 +193,199 @@ function Qt(t, n) {
193
193
  case "CLEAR_ERROR":
194
194
  return { ...t, errorMessage: null };
195
195
  case "RESET":
196
- return St;
196
+ return It;
197
197
  default:
198
198
  return t;
199
199
  }
200
200
  }
201
- const Rt = jt(null);
202
- function zt({
201
+ const Mt = Jt(null);
202
+ function rn({
203
203
  projectId: t,
204
204
  apiUrl: n = "https://api.nowramp.com",
205
205
  assetBaseUrl: a = "",
206
- flowType: r = "buy",
206
+ flowType: o = "buy",
207
207
  customerId: l = "",
208
- brandId: u,
208
+ brandId: c,
209
209
  defaultFiatCurrency: m = "USD",
210
- defaultCryptoCurrency: i = "BTC",
211
- defaultNetwork: s = "",
210
+ defaultCryptoCurrency: s = "BTC",
211
+ defaultNetwork: u = "",
212
212
  defaultFiatAmount: p = "",
213
213
  defaultCryptoAmount: h = "",
214
214
  defaultWalletAddress: d = "",
215
215
  defaultGateway: f,
216
- fieldLocks: y,
217
- statusPollInterval: A = 5e3,
218
- onComplete: b,
219
- onError: T,
220
- children: Z
216
+ fieldLocks: x,
217
+ statusPollInterval: E = 5e3,
218
+ onComplete: v,
219
+ onError: S,
220
+ children: U
221
221
  }) {
222
- const Q = j(() => ({ apiUrl: n, projectId: t }), [n, t]), q = s || (i ? i.toLowerCase() : ""), ee = r === "sell", ie = ee ? !!h : !!p, L = (ee ? !!(ie && i && q) : !!(ie && i && q && d)) && f ? "confirm" : "amount", S = p || (r === "buy" ? "250" : ""), [c, N] = Xt(Qt, {
223
- ...St,
224
- step: L,
225
- flowType: r,
222
+ const D = W(() => ({ apiUrl: n, projectId: t }), [n, t]), G = u || (s ? s.toLowerCase() : ""), V = o === "sell", X = V ? !!h : !!p, ve = (V ? !!(X && s && G) : !!(X && s && G && d)) && f ? "confirm" : "amount", y = p || (o === "buy" ? "250" : ""), [i, w] = Qt(an, {
223
+ ...It,
224
+ step: ve,
225
+ flowType: o,
226
226
  fiatCurrency: m,
227
- cryptoCurrency: i,
228
- network: q,
229
- fiatAmount: xt(S, 2),
230
- cryptoAmount: xt(h, 6),
227
+ cryptoCurrency: s,
228
+ network: G,
229
+ fiatAmount: Nt(y, 2),
230
+ cryptoAmount: Nt(h, 6),
231
231
  walletAddress: d,
232
232
  customerId: l
233
- }), O = c.flowType === "sell", {
234
- config: I,
235
- loading: Se,
236
- error: se
237
- } = Wt(Q, c.flowType);
238
- De.useEffect(() => {
239
- var U, F, M;
240
- if (!I || !c.cryptoCurrency || c.network) return;
241
- const v = (U = I.cryptos) == null ? void 0 : U.find((K) => K.code === c.cryptoCurrency), w = ((F = v == null ? void 0 : v.networks) == null ? void 0 : F.find((K) => K.isDefault)) || ((M = v == null ? void 0 : v.networks) == null ? void 0 : M[0]);
242
- w != null && w.id && N({ type: "SET_NETWORK", network: w.id });
243
- }, [I, c.cryptoCurrency, c.network]), De.useEffect(() => {
244
- var M, K;
245
- if (!((M = I == null ? void 0 : I.paymentMethods) != null && M.length)) return;
246
- const v = c.fiatCurrency, w = I.paymentMethods;
247
- if (c.paymentMethodId && w.some(
248
- (P) => P.id === c.paymentMethodId && P.supportedFiats.includes(v)
233
+ }), O = i.flowType === "sell", {
234
+ config: C,
235
+ loading: he,
236
+ error: re
237
+ } = qt(D, i.flowType);
238
+ _e.useEffect(() => {
239
+ var Z, L, I;
240
+ if (!C || !i.cryptoCurrency || i.network) return;
241
+ const N = (Z = C.cryptos) == null ? void 0 : Z.find((Q) => Q.code === i.cryptoCurrency), T = ((L = N == null ? void 0 : N.networks) == null ? void 0 : L.find((Q) => Q.isDefault)) || ((I = N == null ? void 0 : N.networks) == null ? void 0 : I[0]);
242
+ T != null && T.id && w({ type: "SET_NETWORK", network: T.id });
243
+ }, [C, i.cryptoCurrency, i.network]), _e.useEffect(() => {
244
+ var I, Q;
245
+ if (!((I = C == null ? void 0 : C.paymentMethods) != null && I.length)) return;
246
+ const N = i.fiatCurrency, T = C.paymentMethods;
247
+ if (i.paymentMethodId && T.some(
248
+ (we) => we.id === i.paymentMethodId && we.supportedFiats.includes(N)
249
249
  ))
250
250
  return;
251
- const F = w.find(
252
- ($) => $.supportedFiats.includes(v) && ($.id.includes("card") || $.id.includes("debit"))
253
- ) || w.find(($) => $.supportedFiats.includes(v));
254
- N({ type: "SET_PAYMENT_METHOD", methodId: (F == null ? void 0 : F.id) || ((K = w[0]) == null ? void 0 : K.id) || "" });
255
- }, [I, c.fiatCurrency, c.paymentMethodId]);
256
- const X = j(() => {
251
+ const L = T.find(
252
+ (te) => te.supportedFiats.includes(N) && (te.id.includes("card") || te.id.includes("debit"))
253
+ ) || T.find((te) => te.supportedFiats.includes(N));
254
+ w({ type: "SET_PAYMENT_METHOD", methodId: (L == null ? void 0 : L.id) || ((Q = T[0]) == null ? void 0 : Q.id) || "" });
255
+ }, [C, i.fiatCurrency, i.paymentMethodId]);
256
+ const q = W(() => {
257
257
  if (O) {
258
- if (!c.cryptoAmount) return null;
259
- const M = parseFloat(c.cryptoAmount);
260
- return isNaN(M) || M <= 0 ? "Enter a valid amount" : null;
258
+ if (!i.cryptoAmount) return null;
259
+ const I = parseFloat(i.cryptoAmount);
260
+ return isNaN(I) || I <= 0 ? "Enter a valid amount" : null;
261
261
  }
262
- if (!I || !c.fiatAmount) return null;
263
- const v = parseFloat(c.fiatAmount);
264
- if (isNaN(v)) return null;
265
- const w = I.fiats.find((M) => M.code === c.fiatCurrency);
266
- if (!w) return null;
267
- const U = parseFloat(w.minAmount), F = parseFloat(w.maxAmount);
268
- return !isNaN(U) && v < U ? `Minimum amount is ${w.minAmount} ${c.fiatCurrency}` : !isNaN(F) && v > F ? `Maximum amount is ${w.maxAmount} ${c.fiatCurrency}` : null;
269
- }, [I, c.fiatAmount, c.fiatCurrency, c.cryptoAmount, O]), ue = j(() => {
270
- const v = O ? !!c.cryptoAmount : !!c.fiatAmount;
271
- return !I || !v || !c.cryptoCurrency || !c.network || X ? null : {
272
- fiatCurrency: c.fiatCurrency,
273
- ...O ? { cryptoAmount: c.cryptoAmount } : { fiatAmount: c.fiatAmount },
274
- cryptoCurrency: c.cryptoCurrency,
275
- network: c.network,
276
- paymentMethodId: c.paymentMethodId || void 0,
277
- country: c.country || void 0,
278
- orderType: c.flowType
262
+ if (!C || !i.fiatAmount) return null;
263
+ const N = parseFloat(i.fiatAmount);
264
+ if (isNaN(N)) return null;
265
+ const T = C.fiats.find((I) => I.code === i.fiatCurrency);
266
+ if (!T) return null;
267
+ const Z = parseFloat(T.minAmount), L = parseFloat(T.maxAmount);
268
+ return !isNaN(Z) && N < Z ? `Minimum amount is ${T.minAmount} ${i.fiatCurrency}` : !isNaN(L) && N > L ? `Maximum amount is ${T.maxAmount} ${i.fiatCurrency}` : null;
269
+ }, [C, i.fiatAmount, i.fiatCurrency, i.cryptoAmount, O]), be = W(() => {
270
+ const N = O ? !!i.cryptoAmount : !!i.fiatAmount;
271
+ return !C || !N || !i.cryptoCurrency || !i.network || q ? null : {
272
+ fiatCurrency: i.fiatCurrency,
273
+ ...O ? { cryptoAmount: i.cryptoAmount } : { fiatAmount: i.fiatAmount },
274
+ cryptoCurrency: i.cryptoCurrency,
275
+ network: i.network,
276
+ paymentMethodId: i.paymentMethodId || void 0,
277
+ country: i.country || void 0,
278
+ orderType: i.flowType
279
279
  };
280
- }, [I, c.fiatCurrency, c.fiatAmount, c.cryptoAmount, c.cryptoCurrency, c.network, c.paymentMethodId, c.country, X, O, c.flowType]), {
281
- quotes: k,
282
- loading: xe,
283
- error: W,
284
- refetch: ne
285
- } = Gt(Q, ue), {
286
- order: ae,
287
- loading: ge,
288
- error: Re,
289
- createOrder: me
290
- } = Yt(Q), G = 15e3, {
291
- status: Y,
292
- loading: Be
293
- } = Zt(
280
+ }, [C, i.fiatCurrency, i.fiatAmount, i.cryptoAmount, i.cryptoCurrency, i.network, i.paymentMethodId, i.country, q, O, i.flowType]), {
281
+ quotes: ee,
282
+ loading: pe,
283
+ error: k,
284
+ refetch: Ne
285
+ } = en(D, be), {
286
+ order: P,
287
+ loading: oe,
288
+ error: de,
289
+ createOrder: fe
290
+ } = tn(D), We = 15e3, {
291
+ status: $,
292
+ loading: Y
293
+ } = nn(
294
294
  { apiUrl: n },
295
- (ae == null ? void 0 : ae.orderId) ?? null,
296
- { pollInterval: A, initialDelay: G }
295
+ (P == null ? void 0 : P.orderId) ?? null,
296
+ { pollInterval: E, initialDelay: We }
297
297
  );
298
- De.useEffect(() => {
299
- (Y == null ? void 0 : Y.status) === "completed" && b && b(Y);
300
- }, [Y == null ? void 0 : Y.status, b]), De.useEffect(() => {
301
- const v = se || Re;
302
- v && T && T(v);
303
- }, [se, Re, T]);
304
- const Ce = f || (I == null ? void 0 : I.defaultGateway) || null, Te = V(Ce);
305
- Te.current = Ce;
306
- const ve = V(k);
307
- ve.current = k;
308
- const be = V(u);
309
- be.current = u;
310
- const Ve = H(async () => {
311
- var w, U, F;
312
- const v = ((w = c.selectedQuote) == null ? void 0 : w.gatewayId) || ((F = (U = ve.current) == null ? void 0 : U.bestQuote) == null ? void 0 : F.gatewayId) || Te.current;
313
- if (!v || !c.walletAddress) {
314
- const M = [!v && "gateway", !c.walletAddress && "walletAddress"].filter(Boolean).join(", ");
315
- N({ type: "SET_ERROR", message: `Missing required fields: ${M}` });
298
+ _e.useEffect(() => {
299
+ ($ == null ? void 0 : $.status) === "completed" && v && v($);
300
+ }, [$ == null ? void 0 : $.status, v]), _e.useEffect(() => {
301
+ const N = re || de;
302
+ N && S && S(N);
303
+ }, [re, de, S]);
304
+ const ye = f || (C == null ? void 0 : C.defaultGateway) || null, ke = _(ye);
305
+ ke.current = ye;
306
+ const Le = _(ee);
307
+ Le.current = ee;
308
+ const Ee = _(c);
309
+ Ee.current = c;
310
+ const Ie = B(async () => {
311
+ var T, Z, L;
312
+ const N = ((T = i.selectedQuote) == null ? void 0 : T.gatewayId) || ((L = (Z = Le.current) == null ? void 0 : Z.bestQuote) == null ? void 0 : L.gatewayId) || ke.current;
313
+ if (!N || !i.walletAddress) {
314
+ const I = [!N && "gateway", !i.walletAddress && "walletAddress"].filter(Boolean).join(", ");
315
+ w({ type: "SET_ERROR", message: `Missing required fields: ${I}` });
316
316
  return;
317
317
  }
318
318
  try {
319
- await me({
320
- gateway: v,
321
- customerId: c.customerId || void 0,
322
- fiatCurrency: c.fiatCurrency,
323
- ...O ? { cryptoAmount: c.cryptoAmount } : { fiatAmount: c.fiatAmount },
324
- cryptoCurrency: c.cryptoCurrency,
325
- network: c.network,
326
- walletAddress: c.walletAddress,
327
- paymentMethodId: c.paymentMethodId || void 0,
328
- email: c.email || void 0,
329
- orderType: c.flowType,
330
- ...be.current ? { metadata: { brand: be.current } } : {}
331
- }), N({ type: "SET_STEP", step: "checkout" });
332
- } catch (M) {
333
- const K = M instanceof Error ? M.message : "Failed to create order";
334
- /wallet|address/i.test(K) ? N({ type: "SET_WALLET_ERROR", message: K.replace(/^Failed to create checkout intent:\s*/i, "") }) : N({ type: "SET_ERROR", message: K });
319
+ await fe({
320
+ gateway: N,
321
+ customerId: i.customerId || void 0,
322
+ fiatCurrency: i.fiatCurrency,
323
+ ...O ? { cryptoAmount: i.cryptoAmount } : { fiatAmount: i.fiatAmount },
324
+ cryptoCurrency: i.cryptoCurrency,
325
+ network: i.network,
326
+ walletAddress: i.walletAddress,
327
+ paymentMethodId: i.paymentMethodId || void 0,
328
+ email: i.email || void 0,
329
+ orderType: i.flowType,
330
+ ...Ee.current ? { metadata: { brand: Ee.current } } : {}
331
+ }), w({ type: "SET_STEP", step: "checkout" });
332
+ } catch (I) {
333
+ const Q = I instanceof Error ? I.message : "Failed to create order";
334
+ /wallet|address/i.test(Q) ? w({ type: "SET_WALLET_ERROR", message: Q.replace(/^Failed to create checkout intent:\s*/i, "") }) : w({ type: "SET_ERROR", message: Q });
335
335
  }
336
- }, [c, me, O]), he = H((v) => {
337
- N({ type: "SET_STEP", step: v });
338
- }, []), ke = H(() => {
339
- const v = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], w = v.indexOf(c.step);
340
- w > 0 && N({ type: "SET_STEP", step: v[w - 1] });
341
- }, [c.step, O]), Xe = j(() => {
342
- const v = O ? !!c.cryptoAmount : !!c.fiatAmount;
343
- switch (c.step) {
336
+ }, [i, fe, O]), De = B((N) => {
337
+ w({ type: "SET_STEP", step: N });
338
+ }, []), Ge = B(() => {
339
+ const N = ["confirm", "amount", "quotes", "wallet", "checkout", "processing", "complete"], T = N.indexOf(i.step);
340
+ T > 0 && w({ type: "SET_STEP", step: N[T - 1] });
341
+ }, [i.step, O]), xe = W(() => {
342
+ const N = O ? !!i.cryptoAmount : !!i.fiatAmount;
343
+ switch (i.step) {
344
344
  case "confirm":
345
- return !!(v && c.cryptoCurrency && c.network && c.walletAddress && !X);
345
+ return !!(N && i.cryptoCurrency && i.network && i.walletAddress && !q);
346
346
  case "amount":
347
- return !!(v && c.cryptoCurrency && c.network && !X);
347
+ return !!(N && i.cryptoCurrency && i.network && !q);
348
348
  case "quotes":
349
- return !!c.selectedQuote;
349
+ return !!i.selectedQuote;
350
350
  case "wallet":
351
- return !!c.walletAddress;
351
+ return !!i.walletAddress;
352
352
  default:
353
353
  return !1;
354
354
  }
355
- }, [c, X, O]), $e = {
356
- apiConfig: Q,
355
+ }, [i, q, O]), Me = {
356
+ apiConfig: D,
357
357
  assetBaseUrl: a,
358
- config: I,
359
- configLoading: Se,
360
- configError: se,
361
- state: c,
362
- dispatch: N,
363
- quotes: k,
364
- quotesLoading: xe,
365
- quotesError: W,
366
- fetchQuotes: ne,
367
- order: ae,
368
- orderLoading: ge,
369
- orderError: Re,
370
- createOrder: Ve,
371
- orderStatus: Y,
372
- orderStatusLoading: Be,
373
- fieldLocks: y || null,
374
- defaultGateway: Ce,
375
- amountError: X,
376
- goToStep: he,
377
- goBack: ke,
378
- canProceed: Xe
358
+ config: C,
359
+ configLoading: he,
360
+ configError: re,
361
+ state: i,
362
+ dispatch: w,
363
+ quotes: ee,
364
+ quotesLoading: pe,
365
+ quotesError: k,
366
+ fetchQuotes: Ne,
367
+ order: P,
368
+ orderLoading: oe,
369
+ orderError: de,
370
+ createOrder: Ie,
371
+ orderStatus: $,
372
+ orderStatusLoading: Y,
373
+ fieldLocks: x || null,
374
+ defaultGateway: ye,
375
+ amountError: q,
376
+ goToStep: De,
377
+ goBack: Ge,
378
+ canProceed: xe
379
379
  };
380
- return /* @__PURE__ */ e(Rt.Provider, { value: $e, children: Z });
380
+ return /* @__PURE__ */ e(Mt.Provider, { value: Me, children: U });
381
381
  }
382
- function Ae() {
383
- const t = $t(Rt);
382
+ function Te() {
383
+ const t = zt(Mt);
384
384
  if (!t)
385
385
  throw new Error("useRamp must be used within a RampProvider");
386
386
  return t;
387
387
  }
388
- const Le = {
388
+ const Be = {
389
389
  // Canonical IDs (returned by the API — lowercase full names)
390
390
  // These cover cases where the canonical ID differs from the legacy uppercase key
391
391
  ethereum: { name: "Ethereum (ERC20)", shortName: "Ethereum", icon: "eth" },
@@ -547,7 +547,7 @@ const Le = {
547
547
  OKC: { name: "OKX Chain", icon: "eth" },
548
548
  UNI_CHAIN: { name: "UNI", icon: "uni" },
549
549
  ZEC: { name: "ZCash", icon: "zec" }
550
- }, Tt = [
550
+ }, Bt = [
551
551
  // --- Popular / Top coins ---
552
552
  { code: "BTC", name: "Bitcoin", chains: ["BTC", "LN"], popular: !0 },
553
553
  { code: "ETH", name: "Ethereum", chains: ["ETH", "ARB", "BASE", "BSC", "OPTIMISM", "LINEA", "ZKSYNC", "LRC", "STARK", "APE", "ECLIPSE", "FUEL", "INK", "SOPHON", "UNICHAIN", "WLD"], popular: !0 },
@@ -740,9 +740,9 @@ const Le = {
740
740
  { code: "ZCHF", name: "Frankencoin", chains: ["ETH"], popular: !1 },
741
741
  { code: "ZETA", name: "Zeta", chains: ["ETH", "ZETACHAIN"], popular: !1 },
742
742
  { code: "ZTG", name: "Zeitgeist", chains: ["ZTG"], popular: !1 }
743
- ], Jt = Object.fromEntries(
744
- Tt.map((t) => [t.code, t.name])
745
- ), qt = {
743
+ ], on = Object.fromEntries(
744
+ Bt.map((t) => [t.code, t.name])
745
+ ), ln = {
746
746
  AED: "ae",
747
747
  ALL: "al",
748
748
  ARS: "ar",
@@ -777,21 +777,21 @@ const Le = {
777
777
  VND: "vn",
778
778
  ZAR: "za"
779
779
  };
780
- function kt(t, n = "") {
780
+ function Ot(t, n = "") {
781
781
  return `${n}/crypto-icons/${t.toLowerCase()}.svg`;
782
782
  }
783
- function en(t, n = "") {
784
- const a = qt[t] || "us";
783
+ function cn(t, n = "") {
784
+ const a = ln[t] || "us";
785
785
  return `${n}/flags/${a}.svg`;
786
786
  }
787
- function Fe(t) {
788
- return Le[t] || Le[t.toLowerCase()] || Le[t.toUpperCase()] || Le[t.toUpperCase().replace(/-/g, "_")] || Le[t.toLowerCase().replace(/-/g, "_")];
787
+ function Xe(t) {
788
+ return Be[t] || Be[t.toLowerCase()] || Be[t.toUpperCase()] || Be[t.toUpperCase().replace(/-/g, "_")] || Be[t.toLowerCase().replace(/-/g, "_")];
789
789
  }
790
- function ze(t, n = "") {
791
- const a = Fe(t);
790
+ function tt(t, n = "") {
791
+ const a = Xe(t);
792
792
  return a ? `${n}/crypto-icons/${a.icon}.svg` : `${n}/crypto-icons/${t.toLowerCase()}.svg`;
793
793
  }
794
- const gt = [
794
+ const Et = [
795
795
  { code: "ALL", name: "Albania Lek" },
796
796
  { code: "ARS", name: "Argentina Peso" },
797
797
  { code: "AUD", name: "Australian Dollar" },
@@ -804,14 +804,14 @@ const gt = [
804
804
  { code: "CHF", name: "Swiss Franc" },
805
805
  { code: "MXN", name: "Mexican Peso" },
806
806
  { code: "INR", name: "Indian Rupee" }
807
- ], Ct = [
807
+ ], wt = [
808
808
  { id: "blue", name: "Blue", accent: "#0077FF" },
809
809
  { id: "violet", name: "Violet", accent: "#7C3AED" },
810
810
  { id: "green", name: "Green", accent: "#10B981" },
811
811
  { id: "orange", name: "Orange", accent: "#F59E0B" },
812
812
  { id: "rose", name: "Rose", accent: "#F43F5E" },
813
813
  { id: "mono", name: "Mono", accent: null }
814
- ], vt = {
814
+ ], At = {
815
815
  USDC: { USD: 0.9962, EUR: 1.0814, GBP: 1.2573, JPY: 667e-5, CAD: 0.7198, AUD: 0.6384, BRL: 0.1726, CHF: 1.1306, MXN: 0.0487, INR: 0.01187, ARS: 855e-6, ALL: 0.01058 },
816
816
  USDT: { USD: 0.9958, EUR: 1.081, GBP: 1.2568, JPY: 666e-5, CAD: 0.7194, AUD: 0.638, BRL: 0.1724, CHF: 1.1301, MXN: 0.0486, INR: 0.01186, ARS: 854e-6, ALL: 0.01057 },
817
817
  BTC: { USD: 104e-7, EUR: 1129e-8, GBP: 1313e-8, JPY: 696e-10, CAD: 751e-8, AUD: 666e-8, BRL: 18e-7, CHF: 118e-7, MXN: 508e-9, INR: 124e-9, ARS: 892e-11, ALL: 11e-8 },
@@ -820,15 +820,44 @@ const gt = [
820
820
  XRP: { USD: 0.4081, EUR: 0.4432, GBP: 0.5153, JPY: 273e-5, CAD: 0.2948, AUD: 0.2614, BRL: 0.0707, CHF: 0.463, MXN: 0.01992, INR: 486e-5, ARS: 35e-5, ALL: 433e-5 },
821
821
  DOGE: { USD: 3.896, EUR: 4.232, GBP: 4.92, JPY: 0.02607, CAD: 2.815, AUD: 2.496, BRL: 0.675, CHF: 4.421, MXN: 0.1902, INR: 0.04641, ARS: 3345e-6, ALL: 0.04134 },
822
822
  ADA: { USD: 1.333, EUR: 1.448, GBP: 1.683, JPY: 892e-5, CAD: 0.963, AUD: 0.854, BRL: 0.2309, CHF: 1.512, MXN: 0.0651, INR: 0.01588, ARS: 1145e-6, ALL: 0.01414 }
823
- };
824
- function $n(t, n) {
825
- var a, r;
826
- return ((a = vt[t]) == null ? void 0 : a[n]) ?? ((r = vt.USDC) == null ? void 0 : r[n]) ?? 1;
827
- }
828
- function tn(t) {
823
+ }, sn = /* @__PURE__ */ new Set([
824
+ "USDC",
825
+ "USDT",
826
+ "DAI",
827
+ "BUSD",
828
+ "TUSD",
829
+ "FDUSD",
830
+ "PYUSD",
831
+ "USDP",
832
+ "USDE",
833
+ "USDQ",
834
+ "USDR",
835
+ "USDT0",
836
+ "RLUSD",
837
+ "CUSD",
838
+ "EUSD",
839
+ "OMUSD",
840
+ "MEZOUSD",
841
+ "METAMASKUSD",
842
+ "USD0",
843
+ "USD1",
844
+ "AUDD",
845
+ "EUROC",
846
+ "EURQ",
847
+ "EURR",
848
+ "ZCHF"
849
+ ]);
850
+ function Ht(t) {
851
+ return sn.has(t.toUpperCase());
852
+ }
853
+ function Jn(t, n) {
854
+ var a, o;
855
+ return ((a = At[t]) == null ? void 0 : a[n]) ?? ((o = At.USDC) == null ? void 0 : o[n]) ?? 1;
856
+ }
857
+ function dn(t) {
829
858
  return parseFloat(t.replace(/,/g, "")) || 0;
830
859
  }
831
- function jn(t) {
860
+ function Dt(t) {
832
861
  if (t === 0) return "0";
833
862
  if (t >= 1e3) return t.toLocaleString("en-US", { maximumFractionDigits: 2 });
834
863
  if (t >= 1) return t.toFixed(2);
@@ -836,35 +865,35 @@ function jn(t) {
836
865
  const n = t.toPrecision(4);
837
866
  return parseFloat(n).toString();
838
867
  }
839
- const le = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), bt = 10, Nt = 1e-4, nn = (() => {
868
+ const se = (t) => /^#([0-9A-Fa-f]{3}){1,2}$/.test(t), St = 10, Rt = 1e-4, un = (() => {
840
869
  const t = [];
841
- for (const n of Tt)
870
+ for (const n of Bt)
842
871
  for (const a of n.chains)
843
872
  t.push({ code: n.code, name: n.name, chain: a, popular: n.popular });
844
873
  return t;
845
874
  })();
846
- function Lt({
875
+ function Pt({
847
876
  src: t,
848
877
  alt: n,
849
878
  size: a,
850
- className: r = "",
879
+ className: o = "",
851
880
  background: l
852
881
  }) {
853
- const [u, m] = C(!1), [i, s] = C(!1), p = H(() => m(!0), []), h = H(() => s(!0), []);
854
- return /* @__PURE__ */ o(
882
+ const [c, m] = b(!1), [s, u] = b(!1), p = B(() => m(!0), []), h = B(() => u(!0), []);
883
+ return /* @__PURE__ */ r(
855
884
  "div",
856
885
  {
857
- className: `relative rounded-full shrink-0 ${r}`,
886
+ className: `relative rounded-full shrink-0 ${o}`,
858
887
  style: { width: a, height: a, background: l },
859
888
  children: [
860
- !u && !i && /* @__PURE__ */ e(
889
+ !c && !s && /* @__PURE__ */ e(
861
890
  "div",
862
891
  {
863
892
  className: "absolute inset-0 rounded-full animate-pulse",
864
893
  style: { background: "var(--t-pill-bg, #333)" }
865
894
  }
866
895
  ),
867
- i ? /* @__PURE__ */ e(
896
+ s ? /* @__PURE__ */ e(
868
897
  "div",
869
898
  {
870
899
  className: "absolute inset-0 rounded-full flex items-center justify-center font-bold",
@@ -885,7 +914,7 @@ function Lt({
885
914
  loading: "lazy",
886
915
  onLoad: p,
887
916
  onError: h,
888
- className: `rounded-full ${u ? "opacity-100" : "opacity-0"}`,
917
+ className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
889
918
  style: { width: a, height: a, transition: "opacity 0.15s ease-in" }
890
919
  }
891
920
  )
@@ -893,40 +922,40 @@ function Lt({
893
922
  }
894
923
  );
895
924
  }
896
- function Et({ ticker: t, size: n = 32, baseUrl: a = "" }) {
925
+ function Tt({ ticker: t, size: n = 32, baseUrl: a = "" }) {
897
926
  return /* @__PURE__ */ e(
898
- Lt,
927
+ Pt,
899
928
  {
900
- src: kt(t, a),
929
+ src: Ot(t, a),
901
930
  alt: t,
902
931
  size: n,
903
932
  background: "#ffffff"
904
933
  }
905
934
  );
906
935
  }
907
- function Je({ currencyCode: t, size: n = 16, baseUrl: a = "" }) {
936
+ function nt({ currencyCode: t, size: n = 16, baseUrl: a = "" }) {
908
937
  return /* @__PURE__ */ e(
909
- Lt,
938
+ Pt,
910
939
  {
911
- src: en(t, a),
940
+ src: cn(t, a),
912
941
  alt: t,
913
942
  size: n
914
943
  }
915
944
  );
916
945
  }
917
- function qe({ size: t = 32, color: n = "#888" }) {
918
- return /* @__PURE__ */ o("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
946
+ function at({ size: t = 32, color: n = "#888" }) {
947
+ return /* @__PURE__ */ r("svg", { width: t, height: t, viewBox: "0 0 32 32", fill: "none", children: [
919
948
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "16", fill: n }),
920
949
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "8", stroke: "white", strokeWidth: "1.5", fill: "none" })
921
950
  ] });
922
951
  }
923
- function an({ size: t = 24 }) {
952
+ function mn({ size: t = 24 }) {
924
953
  return /* @__PURE__ */ e(
925
954
  "div",
926
955
  {
927
956
  className: "rounded-full flex items-center justify-center shrink-0",
928
957
  style: { width: t, height: t, background: "var(--t-card-icon-bg)" },
929
- children: /* @__PURE__ */ o("svg", { width: t * 0.6, height: t * 0.58, viewBox: "0 0 25 24", fill: "none", children: [
958
+ children: /* @__PURE__ */ r("svg", { width: t * 0.6, height: t * 0.58, viewBox: "0 0 25 24", fill: "none", children: [
930
959
  /* @__PURE__ */ e("path", { d: "M23.292 7.5H1.70801L12.5 0.592773L23.292 7.5Z", stroke: "var(--t-card-icon-stroke)", strokeWidth: "1" }),
931
960
  /* @__PURE__ */ e("rect", { x: "3", y: "10", width: "1.5", height: "11", fill: "var(--t-card-icon-stroke)" }),
932
961
  /* @__PURE__ */ e("rect", { x: "9", y: "10", width: "1.5", height: "11", fill: "var(--t-card-icon-stroke)" }),
@@ -937,7 +966,7 @@ function an({ size: t = 24 }) {
937
966
  }
938
967
  );
939
968
  }
940
- function rn({ size: t = 32 }) {
969
+ function hn({ size: t = 32 }) {
941
970
  return /* @__PURE__ */ e(
942
971
  "div",
943
972
  {
@@ -947,7 +976,7 @@ function rn({ size: t = 32 }) {
947
976
  }
948
977
  );
949
978
  }
950
- function on({ size: t = 32 }) {
979
+ function pn({ size: t = 32 }) {
951
980
  return /* @__PURE__ */ e(
952
981
  "div",
953
982
  {
@@ -963,13 +992,13 @@ function on({ size: t = 32 }) {
963
992
  }
964
993
  );
965
994
  }
966
- function ln({ size: t = 32 }) {
995
+ function fn({ size: t = 32 }) {
967
996
  return /* @__PURE__ */ e(
968
997
  "div",
969
998
  {
970
999
  className: "flex items-center justify-center shrink-0",
971
1000
  style: { width: t, height: t, background: "#3C4043", borderRadius: t * 0.2 },
972
- children: /* @__PURE__ */ o("svg", { width: t * 0.72, height: t * 0.296, viewBox: "0 0 51 21", fill: "none", children: [
1001
+ children: /* @__PURE__ */ r("svg", { width: t * 0.72, height: t * 0.296, viewBox: "0 0 51 21", fill: "none", children: [
973
1002
  /* @__PURE__ */ e("path", { d: "M50.9156 5.87122L44.6406 20.2837H42.6992L45.0289 15.2416L40.9009 5.87122H42.9451L45.929 13.0573H45.9689L48.8714 5.87122H50.9156Z", fill: "white" }),
974
1003
  /* @__PURE__ */ e("path", { d: "M39.3906 6.65832C38.5866 5.91563 37.4895 5.54547 36.0995 5.54547C34.314 5.54547 32.9657 6.19816 32.0513 7.50532L33.7084 8.54664C34.3211 7.66089 35.1512 7.21951 36.2011 7.21951C36.8967 7.21951 37.5008 7.44661 38.0194 7.9023C38.538 8.35948 38.7964 8.91352 38.7964 9.5665V9.99507C38.0751 9.58796 37.1536 9.38381 36.0366 9.38381C34.7297 9.38381 33.6839 9.68959 32.8998 10.3023C32.1172 10.9151 31.7256 11.738 31.7256 12.7706C31.7256 13.8033 32.0969 14.5675 32.8396 15.2216C33.5808 15.8758 34.5065 16.2016 35.6092 16.2016C36.9033 16.2016 37.9389 15.6302 38.7147 14.4876H38.7976V15.8761H40.5944V9.70955C40.5944 8.4167 40.1944 7.39982 39.3903 6.65862L39.3906 6.65832ZM37.8665 13.6501C37.2451 14.2343 36.5424 14.5272 35.7511 14.5272C35.1926 14.5272 34.7068 14.3645 34.2913 14.0387C33.8741 13.7103 33.6673 13.3032 33.6673 12.8132C33.6673 12.2675 33.923 11.8134 34.4344 11.4462C34.9443 11.079 35.5815 10.8948 36.3442 10.8948C37.3926 10.8948 38.211 11.1249 38.7967 11.5889C38.7967 12.3775 38.4867 13.0645 37.8668 13.6501H37.8665Z", fill: "white" }),
975
1004
  /* @__PURE__ */ e("path", { d: "M30.4166 2.52282C29.5296 1.67999 28.4552 1.25739 27.1883 1.25739H22.2017V15.8758H24.0813V9.95362H27.188C28.4678 9.95362 29.5448 9.53936 30.4163 8.70815C31.3175 7.87962 31.7661 6.84397 31.7661 5.60565C31.7661 4.36733 31.3175 3.36744 30.4163 2.52312L30.4166 2.52282ZM29.0895 7.40248C28.598 7.90525 27.9781 8.15798 27.2297 8.15798H24.0816V3.05272H27.2297C27.9781 3.05272 28.5983 3.31141 29.0895 3.82849C29.5937 4.33276 29.845 4.92554 29.845 5.60535C29.845 6.28516 29.5934 6.8994 29.0895 7.40218V7.40248Z", fill: "white" }),
@@ -978,7 +1007,7 @@ function ln({ size: t = 32 }) {
978
1007
  }
979
1008
  );
980
1009
  }
981
- function sn({ size: t = 32 }) {
1010
+ function yn({ size: t = 32 }) {
982
1011
  return /* @__PURE__ */ e(
983
1012
  "div",
984
1013
  {
@@ -988,13 +1017,13 @@ function sn({ size: t = 32 }) {
988
1017
  }
989
1018
  );
990
1019
  }
991
- function cn({ size: t = 32 }) {
1020
+ function xn({ size: t = 32 }) {
992
1021
  return /* @__PURE__ */ e(
993
1022
  "div",
994
1023
  {
995
1024
  className: "flex items-center justify-center shrink-0",
996
1025
  style: { width: t, height: t, background: "#1A1F71", borderRadius: t * 0.2 },
997
- children: /* @__PURE__ */ o("svg", { width: t * 0.72, height: t * 0.234, viewBox: "0 0 43 14", fill: "none", children: [
1026
+ children: /* @__PURE__ */ r("svg", { width: t * 0.72, height: t * 0.234, viewBox: "0 0 43 14", fill: "none", children: [
998
1027
  /* @__PURE__ */ e("path", { d: "M18.3629 13.5165H14.9302L17.0772 0.240662H20.5097L18.3629 13.5165Z", fill: "white" }),
999
1028
  /* @__PURE__ */ e("path", { d: "M30.806 0.565203C30.1289 0.296586 29.055 0 27.7271 0C24.3372 0 21.95 1.80767 21.9354 4.3921C21.9072 6.29889 23.6445 7.35796 24.9439 7.99375C26.2719 8.64342 26.7234 9.06747 26.7234 9.64656C26.7099 10.5359 25.6502 10.9459 24.6619 10.9459C23.2914 10.9459 22.5571 10.7345 21.4412 10.2397L20.9891 10.0276L20.5088 13.0077C21.3139 13.3745 22.7972 13.7 24.3372 13.7143C27.939 13.7143 30.2839 11.9346 30.3117 9.18047C30.3254 7.66919 29.4081 6.51119 27.4303 5.56493C26.2297 4.95749 25.4944 4.54791 25.4944 3.92639C25.5085 3.36137 26.1163 2.78265 27.4716 2.78265C28.5876 2.75431 29.4075 3.02255 30.0286 3.29098L30.3391 3.43195L30.806 0.565203Z", fill: "white" }),
1000
1029
  /* @__PURE__ */ e("path", { d: "M35.3681 8.81332C35.6508 8.05064 36.7386 5.09886 36.7386 5.09886C36.7243 5.1272 37.0207 4.3221 37.1902 3.82785L37.4301 4.97178C37.4301 4.97178 38.0802 8.14956 38.2213 8.81332C37.6848 8.81332 36.0461 8.81332 35.3681 8.81332ZM39.6053 0.240662H36.9501C36.1313 0.240662 35.5092 0.480559 35.156 1.34216L30.0571 13.5163H33.659C33.659 13.5163 34.2519 11.8777 34.3794 11.5248C34.7745 11.5248 38.2784 11.5248 38.7867 11.5248C38.8853 11.9909 39.1963 13.5163 39.1963 13.5163H42.3747L39.6053 0.240662Z", fill: "white" }),
@@ -1004,14 +1033,14 @@ function cn({ size: t = 32 }) {
1004
1033
  }
1005
1034
  );
1006
1035
  }
1007
- function dn({ size: t = 32 }) {
1036
+ function gn({ size: t = 32 }) {
1008
1037
  const n = t * 0.8;
1009
1038
  return /* @__PURE__ */ e(
1010
1039
  "div",
1011
1040
  {
1012
1041
  className: "flex items-center justify-center shrink-0",
1013
1042
  style: { width: t, height: t },
1014
- children: /* @__PURE__ */ o("svg", { width: n, height: n * 0.625, viewBox: "0 0 48 30", fill: "none", children: [
1043
+ children: /* @__PURE__ */ r("svg", { width: n, height: n * 0.625, viewBox: "0 0 48 30", fill: "none", children: [
1015
1044
  /* @__PURE__ */ e("circle", { cx: "18", cy: "15", r: "14", fill: "#EB001B" }),
1016
1045
  /* @__PURE__ */ e("circle", { cx: "30", cy: "15", r: "14", fill: "#F79E1B" }),
1017
1046
  /* @__PURE__ */ e("path", { d: "M24 2.35A14 14 0 0 1 24 27.65A14 14 0 0 1 24 2.35Z", fill: "#FF5F00" })
@@ -1019,9 +1048,9 @@ function dn({ size: t = 32 }) {
1019
1048
  }
1020
1049
  );
1021
1050
  }
1022
- function un({ size: t = 32 }) {
1023
- const n = t * 0.56, a = n * 0.65, r = Math.max(2, n * 0.1), l = n * 0.2;
1024
- return /* @__PURE__ */ o("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1051
+ function Cn({ size: t = 32 }) {
1052
+ const n = t * 0.56, a = n * 0.65, o = Math.max(2, n * 0.1), l = n * 0.2;
1053
+ return /* @__PURE__ */ r("div", { className: "flex items-center justify-center shrink-0", style: { width: t, height: t }, children: [
1025
1054
  /* @__PURE__ */ e(
1026
1055
  "div",
1027
1056
  {
@@ -1029,14 +1058,14 @@ function un({ size: t = 32 }) {
1029
1058
  width: n,
1030
1059
  height: a,
1031
1060
  background: "#1A1F71",
1032
- borderRadius: r,
1061
+ borderRadius: o,
1033
1062
  position: "relative",
1034
1063
  zIndex: 2,
1035
1064
  display: "flex",
1036
1065
  alignItems: "center",
1037
1066
  justifyContent: "center"
1038
1067
  },
1039
- children: /* @__PURE__ */ o("svg", { width: n * 0.7, height: a * 0.35, viewBox: "0 0 43 14", fill: "none", children: [
1068
+ children: /* @__PURE__ */ r("svg", { width: n * 0.7, height: a * 0.35, viewBox: "0 0 43 14", fill: "none", children: [
1040
1069
  /* @__PURE__ */ e("path", { d: "M18.3629 13.5165H14.9302L17.0772 0.240662H20.5097L18.3629 13.5165Z", fill: "white" }),
1041
1070
  /* @__PURE__ */ e("path", { d: "M12.0629 0.240662L8.70119 9.29349L8.33383 7.45747C7.71232 5.33894 5.76311 3.03721 3.58789 1.89272L6.66713 13.5024H10.2971L15.6927 0.240662H12.0629Z", fill: "white" }),
1042
1071
  /* @__PURE__ */ e("path", { d: "M5.57939 0.240662H0.0565013L0 0.508903C4.3082 1.61059 7.16143 4.26616 8.3337 7.45803L7.13309 1.35661C6.93542 0.508715 6.32798 0.268631 5.57939 0.240662Z", fill: "white" }),
@@ -1052,7 +1081,7 @@ function un({ size: t = 32 }) {
1052
1081
  width: n,
1053
1082
  height: a,
1054
1083
  background: "#252525",
1055
- borderRadius: r,
1084
+ borderRadius: o,
1056
1085
  marginLeft: -l,
1057
1086
  position: "relative",
1058
1087
  zIndex: 1,
@@ -1061,7 +1090,7 @@ function un({ size: t = 32 }) {
1061
1090
  justifyContent: "center",
1062
1091
  overflow: "hidden"
1063
1092
  },
1064
- children: /* @__PURE__ */ o("svg", { width: a * 0.85, height: a * 0.6, viewBox: "0 0 48 30", fill: "none", children: [
1093
+ children: /* @__PURE__ */ r("svg", { width: a * 0.85, height: a * 0.6, viewBox: "0 0 48 30", fill: "none", children: [
1065
1094
  /* @__PURE__ */ e("circle", { cx: "18", cy: "15", r: "14", fill: "#EB001B" }),
1066
1095
  /* @__PURE__ */ e("circle", { cx: "30", cy: "15", r: "14", fill: "#F79E1B" }),
1067
1096
  /* @__PURE__ */ e("path", { d: "M24 2.35A14 14 0 0 1 24 27.65A14 14 0 0 1 24 2.35Z", fill: "#FF5F00" })
@@ -1070,7 +1099,7 @@ function un({ size: t = 32 }) {
1070
1099
  )
1071
1100
  ] });
1072
1101
  }
1073
- function Wn({ size: t = 18 }) {
1102
+ function qn({ size: t = 18 }) {
1074
1103
  return /* @__PURE__ */ e(
1075
1104
  "div",
1076
1105
  {
@@ -1080,13 +1109,13 @@ function Wn({ size: t = 18 }) {
1080
1109
  }
1081
1110
  );
1082
1111
  }
1083
- function Ie() {
1112
+ function Oe() {
1084
1113
  return /* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ e("path", { d: "M3 4.5L6 7.5L9 4.5", stroke: "var(--t-text-secondary)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
1085
1114
  }
1086
- function mn() {
1115
+ function vn() {
1087
1116
  return /* @__PURE__ */ e("svg", { width: "8", height: "14", viewBox: "0 0 8 14", fill: "none", children: /* @__PURE__ */ e("path", { d: "M1 1L7 7L1 13", stroke: "var(--t-icon-stroke)", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
1088
1117
  }
1089
- function hn({ onClick: t }) {
1118
+ function bn({ onClick: t }) {
1090
1119
  return /* @__PURE__ */ e("button", { onClick: t, className: "hover:opacity-70 transition-opacity", children: /* @__PURE__ */ e("svg", { width: "24", height: "16", viewBox: "0 0 24 16", fill: "none", children: /* @__PURE__ */ e(
1091
1120
  "path",
1092
1121
  {
@@ -1095,42 +1124,42 @@ function hn({ onClick: t }) {
1095
1124
  }
1096
1125
  ) }) });
1097
1126
  }
1098
- function pn({ size: t = 40 }) {
1127
+ function Nn({ size: t = 40 }) {
1099
1128
  return /* @__PURE__ */ e(
1100
1129
  "div",
1101
1130
  {
1102
1131
  className: "rounded-full flex items-center justify-center shrink-0",
1103
1132
  style: { width: t, height: t, background: "var(--t-surface)" },
1104
- children: /* @__PURE__ */ o("svg", { width: t * 0.5, height: t * 0.5, viewBox: "0 0 20 20", fill: "none", children: [
1133
+ children: /* @__PURE__ */ r("svg", { width: t * 0.5, height: t * 0.5, viewBox: "0 0 20 20", fill: "none", children: [
1105
1134
  /* @__PURE__ */ e("circle", { cx: "10", cy: "10", r: "7.5", stroke: "var(--t-text)", strokeWidth: "1.5" }),
1106
1135
  /* @__PURE__ */ e("path", { d: "M10 2.5A7.5 7.5 0 0 1 10 17.5", fill: "var(--t-text)" })
1107
1136
  ] })
1108
1137
  }
1109
1138
  );
1110
1139
  }
1111
- function fn(t, n = 32) {
1140
+ function En(t, n = 32) {
1112
1141
  switch (t) {
1113
1142
  case "revolut":
1114
- return /* @__PURE__ */ e(rn, { size: n });
1143
+ return /* @__PURE__ */ e(hn, { size: n });
1115
1144
  case "applepay":
1116
- return /* @__PURE__ */ e(on, { size: n });
1145
+ return /* @__PURE__ */ e(pn, { size: n });
1117
1146
  case "card":
1118
- return /* @__PURE__ */ e(un, { size: n });
1147
+ return /* @__PURE__ */ e(Cn, { size: n });
1119
1148
  case "googlepay":
1120
- return /* @__PURE__ */ e(ln, { size: n });
1149
+ return /* @__PURE__ */ e(fn, { size: n });
1121
1150
  case "paypal":
1122
- return /* @__PURE__ */ e(sn, { size: n });
1151
+ return /* @__PURE__ */ e(yn, { size: n });
1123
1152
  case "bank":
1124
- return /* @__PURE__ */ e(an, { size: n });
1153
+ return /* @__PURE__ */ e(mn, { size: n });
1125
1154
  case "visa":
1126
- return /* @__PURE__ */ e(cn, { size: n });
1155
+ return /* @__PURE__ */ e(xn, { size: n });
1127
1156
  case "mastercard":
1128
- return /* @__PURE__ */ e(dn, { size: n });
1157
+ return /* @__PURE__ */ e(gn, { size: n });
1129
1158
  default:
1130
- return /* @__PURE__ */ e(qe, { size: n });
1159
+ return /* @__PURE__ */ e(at, { size: n });
1131
1160
  }
1132
1161
  }
1133
- const yn = {
1162
+ const wn = {
1134
1163
  "debit-credit-card": "card",
1135
1164
  "bank-transfer": "bank",
1136
1165
  "ach-bank-transfer": "bank",
@@ -1141,7 +1170,7 @@ const yn = {
1141
1170
  "google-pay": "googlepay",
1142
1171
  paypal: "paypal",
1143
1172
  revolut: "revolut"
1144
- }, xn = {
1173
+ }, An = {
1145
1174
  "debit-credit-card": "Card",
1146
1175
  "bank-transfer": "Bank Transfer",
1147
1176
  "ach-bank-transfer": "ACH",
@@ -1151,23 +1180,23 @@ const yn = {
1151
1180
  paypal: "PayPal",
1152
1181
  revolut: "Revolut"
1153
1182
  };
1154
- function It(t, n) {
1155
- return xn[t] || n;
1183
+ function Ut(t, n) {
1184
+ return An[t] || n;
1156
1185
  }
1157
- function Mt(t, n, a = 24) {
1158
- const r = yn[t];
1159
- return r ? fn(r, a) : n ? /* @__PURE__ */ e("img", { src: n, alt: "", width: a, height: a, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(qe, { size: a });
1186
+ function Ft(t, n, a = 24) {
1187
+ const o = wn[t];
1188
+ return o ? En(o, a) : n ? /* @__PURE__ */ e("img", { src: n, alt: "", width: a, height: a, style: { borderRadius: "50%" } }) : /* @__PURE__ */ e(at, { size: a });
1160
1189
  }
1161
- function gn({
1190
+ function Sn({
1162
1191
  methods: t,
1163
1192
  selectedId: n,
1164
1193
  onOpenModal: a,
1165
- fiatCurrency: r
1194
+ fiatCurrency: o
1166
1195
  }) {
1167
- const l = j(
1168
- () => t.filter((m) => m.supportedFiats.includes(r)),
1169
- [t, r]
1170
- ), u = l.find((m) => m.id === n) || l[0];
1196
+ const l = W(
1197
+ () => t.filter((m) => m.supportedFiats.includes(o)),
1198
+ [t, o]
1199
+ ), c = l.find((m) => m.id === n) || l[0];
1171
1200
  return l.length === 0 ? /* @__PURE__ */ e(
1172
1201
  "div",
1173
1202
  {
@@ -1177,12 +1206,12 @@ function gn({
1177
1206
  borderBottomLeftRadius: 5,
1178
1207
  borderBottomRightRadius: 5
1179
1208
  },
1180
- children: /* @__PURE__ */ o("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: [
1209
+ children: /* @__PURE__ */ r("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: [
1181
1210
  "No payment methods available for ",
1182
- r
1211
+ o
1183
1212
  ] })
1184
1213
  }
1185
- ) : /* @__PURE__ */ e(te, { children: /* @__PURE__ */ o(
1214
+ ) : /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(
1186
1215
  "div",
1187
1216
  {
1188
1217
  role: "button",
@@ -1201,38 +1230,38 @@ function gn({
1201
1230
  },
1202
1231
  children: [
1203
1232
  /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Payment method" }),
1204
- /* @__PURE__ */ o("span", { className: "flex items-center gap-2", children: [
1205
- /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: u && Mt(u.id, u.icon, 20) }),
1206
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: u ? It(u.id, u.name) : "Select" }),
1207
- /* @__PURE__ */ e(Ie, {})
1233
+ /* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
1234
+ /* @__PURE__ */ e("span", { className: "flex items-center justify-center", style: { width: 20, height: 20 }, children: c && Ft(c.id, c.icon, 20) }),
1235
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: c ? Ut(c.id, c.name) : "Select" }),
1236
+ /* @__PURE__ */ e(Oe, {})
1208
1237
  ] })
1209
1238
  ]
1210
1239
  }
1211
1240
  ) });
1212
1241
  }
1213
- function Cn({
1242
+ function Rn({
1214
1243
  className: t = "",
1215
1244
  autoRedirect: n = !1,
1216
1245
  redirectDelay: a = 3e3
1217
1246
  }) {
1218
1247
  var f;
1219
- const { order: r, orderStatus: l, goToStep: u, goBack: m } = Ae(), [i, s] = C(!1), [p, h] = C(null), d = r != null && r.checkout.expiresAt ? Date.now() > r.checkout.expiresAt : !1;
1220
- if (_(() => {
1221
- if ((r == null ? void 0 : r.checkout.method) === "redirect" && n && !d) {
1248
+ const { order: o, orderStatus: l, goToStep: c, goBack: m } = Te(), [s, u] = b(!1), [p, h] = b(null), d = o != null && o.checkout.expiresAt ? Date.now() > o.checkout.expiresAt : !1;
1249
+ if (K(() => {
1250
+ if ((o == null ? void 0 : o.checkout.method) === "redirect" && n && !d) {
1222
1251
  h(Math.ceil(a / 1e3));
1223
- const y = setTimeout(() => {
1224
- window.location.href = r.checkout.url;
1225
- }, a), A = setInterval(() => {
1226
- h((b) => b && b > 1 ? b - 1 : null);
1252
+ const x = setTimeout(() => {
1253
+ window.location.href = o.checkout.url;
1254
+ }, a), E = setInterval(() => {
1255
+ h((v) => v && v > 1 ? v - 1 : null);
1227
1256
  }, 1e3);
1228
1257
  return () => {
1229
- clearTimeout(y), clearInterval(A);
1258
+ clearTimeout(x), clearInterval(E);
1230
1259
  };
1231
1260
  }
1232
- }, [r, n, a, d]), _(() => {
1233
- l && (l.status === "completed" ? u("complete") : ["failed", "cancelled", "expired"].includes(l.status) && u("error"));
1234
- }, [l == null ? void 0 : l.status, u]), !r)
1235
- return /* @__PURE__ */ o(
1261
+ }, [o, n, a, d]), K(() => {
1262
+ l && (l.status === "completed" ? c("complete") : ["failed", "cancelled", "expired"].includes(l.status) && c("error"));
1263
+ }, [l == null ? void 0 : l.status, c]), !o)
1264
+ return /* @__PURE__ */ r(
1236
1265
  "div",
1237
1266
  {
1238
1267
  className: `flex flex-col items-center justify-center p-8 ${t}`,
@@ -1259,7 +1288,7 @@ function Cn({
1259
1288
  }
1260
1289
  );
1261
1290
  if (d)
1262
- return /* @__PURE__ */ o(
1291
+ return /* @__PURE__ */ r(
1263
1292
  "div",
1264
1293
  {
1265
1294
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
@@ -1284,10 +1313,10 @@ function Cn({
1284
1313
  ]
1285
1314
  }
1286
1315
  );
1287
- if (r.checkout.method === "iframe") {
1288
- const y = r.checkout.url, A = ((f = r.checkout.allowedFeatures) == null ? void 0 : f.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1289
- return yt(
1290
- /* @__PURE__ */ o(
1316
+ if (o.checkout.method === "iframe") {
1317
+ const x = o.checkout.url, E = ((f = o.checkout.allowedFeatures) == null ? void 0 : f.join("; ")) || "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share";
1318
+ return bt(
1319
+ /* @__PURE__ */ r(
1291
1320
  "div",
1292
1321
  {
1293
1322
  style: {
@@ -1311,7 +1340,7 @@ function Cn({
1311
1340
  background: "#111",
1312
1341
  flexShrink: 0
1313
1342
  },
1314
- children: /* @__PURE__ */ o(
1343
+ children: /* @__PURE__ */ r(
1315
1344
  "button",
1316
1345
  {
1317
1346
  onClick: m,
@@ -1336,8 +1365,8 @@ function Cn({
1336
1365
  )
1337
1366
  }
1338
1367
  ),
1339
- /* @__PURE__ */ o("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1340
- !i && /* @__PURE__ */ o(
1368
+ /* @__PURE__ */ r("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1369
+ !s && /* @__PURE__ */ r(
1341
1370
  "div",
1342
1371
  {
1343
1372
  style: {
@@ -1357,15 +1386,15 @@ function Cn({
1357
1386
  /* @__PURE__ */ e(
1358
1387
  "iframe",
1359
1388
  {
1360
- src: y,
1389
+ src: x,
1361
1390
  style: {
1362
- display: i ? "block" : "none",
1391
+ display: s ? "block" : "none",
1363
1392
  width: "100%",
1364
1393
  height: "100%",
1365
1394
  border: "none"
1366
1395
  },
1367
- allow: A,
1368
- onLoad: () => s(!0),
1396
+ allow: E,
1397
+ onLoad: () => u(!0),
1369
1398
  title: "Provider Checkout"
1370
1399
  }
1371
1400
  )
@@ -1376,8 +1405,8 @@ function Cn({
1376
1405
  document.body
1377
1406
  );
1378
1407
  }
1379
- if (r.checkout.method === "redirect")
1380
- return /* @__PURE__ */ o(
1408
+ if (o.checkout.method === "redirect")
1409
+ return /* @__PURE__ */ r(
1381
1410
  "div",
1382
1411
  {
1383
1412
  className: `flex flex-col items-center justify-center p-8 text-center ${t}`,
@@ -1385,20 +1414,20 @@ function Cn({
1385
1414
  children: [
1386
1415
  /* @__PURE__ */ e("div", { className: "text-[48px] mb-4", children: "🔗" }),
1387
1416
  /* @__PURE__ */ e("h3", { className: "text-[18px] font-semibold mb-2", children: "Complete Payment" }),
1388
- /* @__PURE__ */ o("p", { className: "text-[14px] mb-4", style: { color: "var(--t-text-secondary)" }, children: [
1417
+ /* @__PURE__ */ r("p", { className: "text-[14px] mb-4", style: { color: "var(--t-text-secondary)" }, children: [
1389
1418
  "You'll be redirected to ",
1390
- r.gateway,
1419
+ o.gateway,
1391
1420
  " to complete your payment."
1392
1421
  ] }),
1393
- p !== null && /* @__PURE__ */ o("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: [
1422
+ p !== null && /* @__PURE__ */ r("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: [
1394
1423
  "Redirecting in ",
1395
1424
  p,
1396
1425
  "..."
1397
1426
  ] }),
1398
- /* @__PURE__ */ o(
1427
+ /* @__PURE__ */ r(
1399
1428
  "a",
1400
1429
  {
1401
- href: r.checkout.url,
1430
+ href: o.checkout.url,
1402
1431
  className: "w-full font-semibold text-[16px] flex items-center justify-center transition-all",
1403
1432
  style: {
1404
1433
  height: 60,
@@ -1411,7 +1440,7 @@ function Cn({
1411
1440
  rel: "noopener noreferrer",
1412
1441
  children: [
1413
1442
  "Continue to ",
1414
- r.gateway
1443
+ o.gateway
1415
1444
  ]
1416
1445
  }
1417
1446
  ),
@@ -1432,10 +1461,10 @@ function Cn({
1432
1461
  ]
1433
1462
  }
1434
1463
  );
1435
- if (r.checkout.method === "widget" && r.widgetConfig) {
1436
- const y = vn(r.checkout.url, r.widgetConfig);
1437
- return yt(
1438
- /* @__PURE__ */ o(
1464
+ if (o.checkout.method === "widget" && o.widgetConfig) {
1465
+ const x = Tn(o.checkout.url, o.widgetConfig);
1466
+ return bt(
1467
+ /* @__PURE__ */ r(
1439
1468
  "div",
1440
1469
  {
1441
1470
  style: {
@@ -1459,7 +1488,7 @@ function Cn({
1459
1488
  background: "#111",
1460
1489
  flexShrink: 0
1461
1490
  },
1462
- children: /* @__PURE__ */ o(
1491
+ children: /* @__PURE__ */ r(
1463
1492
  "button",
1464
1493
  {
1465
1494
  onClick: m,
@@ -1484,8 +1513,8 @@ function Cn({
1484
1513
  )
1485
1514
  }
1486
1515
  ),
1487
- /* @__PURE__ */ o("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1488
- !i && /* @__PURE__ */ o(
1516
+ /* @__PURE__ */ r("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: [
1517
+ !s && /* @__PURE__ */ r(
1489
1518
  "div",
1490
1519
  {
1491
1520
  style: {
@@ -1505,15 +1534,15 @@ function Cn({
1505
1534
  /* @__PURE__ */ e(
1506
1535
  "iframe",
1507
1536
  {
1508
- src: y,
1537
+ src: x,
1509
1538
  style: {
1510
- display: i ? "block" : "none",
1539
+ display: s ? "block" : "none",
1511
1540
  width: "100%",
1512
1541
  height: "100%",
1513
1542
  border: "none"
1514
1543
  },
1515
1544
  allow: "payment; camera; microphone; geolocation; clipboard-read; clipboard-write; accelerometer; gyroscope; magnetometer; fullscreen; autoplay; encrypted-media; web-share",
1516
- onLoad: () => s(!0),
1545
+ onLoad: () => u(!0),
1517
1546
  title: "Payment Checkout"
1518
1547
  }
1519
1548
  )
@@ -1524,7 +1553,7 @@ function Cn({
1524
1553
  document.body
1525
1554
  );
1526
1555
  }
1527
- return /* @__PURE__ */ o(
1556
+ return /* @__PURE__ */ r(
1528
1557
  "div",
1529
1558
  {
1530
1559
  className: `flex flex-col items-center justify-center p-8 ${t}`,
@@ -1551,17 +1580,17 @@ function Cn({
1551
1580
  }
1552
1581
  );
1553
1582
  }
1554
- function vn(t, n) {
1583
+ function Tn(t, n) {
1555
1584
  const a = new URL("/en/partner/widget", t);
1556
- for (const [r, l] of Object.entries(n))
1557
- l != null && l !== "" && a.searchParams.set(r, String(l));
1585
+ for (const [o, l] of Object.entries(n))
1586
+ l != null && l !== "" && a.searchParams.set(o, String(l));
1558
1587
  return a.toString();
1559
1588
  }
1560
- function bn({ className: t = "" }) {
1561
- const { orderStatus: n, orderStatusLoading: a, goToStep: r } = Ae();
1562
- _(() => {
1563
- n && (n.status === "completed" ? r("complete") : ["failed", "cancelled", "expired", "refunded"].includes(n.status) && r("error"));
1564
- }, [n == null ? void 0 : n.status, r]);
1589
+ function kn({ className: t = "" }) {
1590
+ const { orderStatus: n, orderStatusLoading: a, goToStep: o } = Te();
1591
+ K(() => {
1592
+ n && (n.status === "completed" ? o("complete") : ["failed", "cancelled", "expired", "refunded"].includes(n.status) && o("error"));
1593
+ }, [n == null ? void 0 : n.status, o]);
1565
1594
  const l = () => {
1566
1595
  if (!n) return "Processing your order...";
1567
1596
  switch (n.status) {
@@ -1573,30 +1602,30 @@ function bn({ className: t = "" }) {
1573
1602
  return "Processing...";
1574
1603
  }
1575
1604
  };
1576
- return /* @__PURE__ */ o("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
1605
+ return /* @__PURE__ */ r("div", { className: `flex flex-col items-center justify-center px-8 py-12 text-center ${t}`, children: [
1577
1606
  /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ e("div", { className: "nramp-spinner-large nramp-spinner" }) }),
1578
1607
  /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-3", style: { color: "var(--t-text)" }, children: l() }),
1579
1608
  a && /* @__PURE__ */ e("p", { className: "text-[13px] mb-4", style: { color: "var(--t-text-muted)" }, children: "Checking status..." }),
1580
- n && /* @__PURE__ */ o("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1581
- /* @__PURE__ */ e(we, { label: "Order ID", value: n.orderId, mono: !0 }),
1582
- /* @__PURE__ */ e(we, { label: "Provider", value: n.gateway }),
1609
+ n && /* @__PURE__ */ r("div", { className: "w-full mt-6 text-left", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1610
+ /* @__PURE__ */ e(Re, { label: "Order ID", value: n.orderId, mono: !0 }),
1611
+ /* @__PURE__ */ e(Re, { label: "Provider", value: n.gateway }),
1583
1612
  /* @__PURE__ */ e(
1584
- we,
1613
+ Re,
1585
1614
  {
1586
1615
  label: "Amount",
1587
1616
  value: `${n.fiatAmount} ${n.fiatCurrency}`
1588
1617
  }
1589
1618
  ),
1590
1619
  /* @__PURE__ */ e(
1591
- we,
1620
+ Re,
1592
1621
  {
1593
1622
  label: "Receiving",
1594
1623
  value: `${n.cryptoAmount || "..."} ${n.cryptoCurrency}`
1595
1624
  }
1596
1625
  ),
1597
- /* @__PURE__ */ e(we, { label: "Network", value: n.network }),
1626
+ /* @__PURE__ */ e(Re, { label: "Network", value: n.network }),
1598
1627
  /* @__PURE__ */ e(
1599
- we,
1628
+ Re,
1600
1629
  {
1601
1630
  label: "To Address",
1602
1631
  value: `${n.walletAddress.slice(0, 10)}...${n.walletAddress.slice(-8)}`,
@@ -1604,14 +1633,14 @@ function bn({ className: t = "" }) {
1604
1633
  }
1605
1634
  )
1606
1635
  ] }),
1607
- /* @__PURE__ */ o("div", { className: "mt-6", children: [
1636
+ /* @__PURE__ */ r("div", { className: "mt-6", children: [
1608
1637
  /* @__PURE__ */ e("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "This usually takes a few minutes." }),
1609
1638
  /* @__PURE__ */ e("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: "You can safely close this page - we'll send you an email when complete." })
1610
1639
  ] })
1611
1640
  ] });
1612
1641
  }
1613
- function we({ label: t, value: n, mono: a }) {
1614
- return /* @__PURE__ */ o(
1642
+ function Re({ label: t, value: n, mono: a }) {
1643
+ return /* @__PURE__ */ r(
1615
1644
  "div",
1616
1645
  {
1617
1646
  className: "flex justify-between items-center py-2",
@@ -1630,13 +1659,13 @@ function we({ label: t, value: n, mono: a }) {
1630
1659
  }
1631
1660
  );
1632
1661
  }
1633
- function Nn({
1662
+ function Ln({
1634
1663
  className: t = "",
1635
1664
  explorerUrl: n,
1636
1665
  onDone: a,
1637
- doneButtonText: r = "Done"
1666
+ doneButtonText: o = "Done"
1638
1667
  }) {
1639
- const { orderStatus: l, state: u, dispatch: m } = Ae(), i = u.flowType === "sell", s = () => {
1668
+ const { orderStatus: l, state: c, dispatch: m } = Te(), s = c.flowType === "sell", u = () => {
1640
1669
  if (!(l != null && l.transactionHash)) return null;
1641
1670
  if (!n) {
1642
1671
  const d = {
@@ -1650,13 +1679,13 @@ function Nn({
1650
1679
  avalanche: "https://snowtrace.io/tx/{txHash}",
1651
1680
  fantom: "https://ftmscan.com/tx/{txHash}"
1652
1681
  };
1653
- return (d[u.network] || d.ethereum).replace("{txHash}", l.transactionHash);
1682
+ return (d[c.network] || d.ethereum).replace("{txHash}", l.transactionHash);
1654
1683
  }
1655
1684
  return n.replace("{txHash}", l.transactionHash);
1656
1685
  }, p = () => {
1657
1686
  a ? a() : m({ type: "RESET" });
1658
- }, h = s();
1659
- return /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1687
+ }, h = u();
1688
+ return /* @__PURE__ */ r("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1660
1689
  /* @__PURE__ */ e(
1661
1690
  "div",
1662
1691
  {
@@ -1665,27 +1694,27 @@ function Nn({
1665
1694
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z" }) })
1666
1695
  }
1667
1696
  ),
1668
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: i ? "Sale Complete!" : "Purchase Complete!" }),
1669
- /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: i ? `Your ${(l == null ? void 0 : l.fiatCurrency) || u.fiatCurrency} payout is being processed.` : `Your ${(l == null ? void 0 : l.cryptoCurrency) || u.cryptoCurrency} has been sent to your wallet.` }),
1670
- l && /* @__PURE__ */ o("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1697
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: s ? "Sale Complete!" : "Purchase Complete!" }),
1698
+ /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: s ? `Your ${(l == null ? void 0 : l.fiatCurrency) || c.fiatCurrency} payout is being processed.` : `Your ${(l == null ? void 0 : l.cryptoCurrency) || c.cryptoCurrency} has been sent to your wallet.` }),
1699
+ l && /* @__PURE__ */ r("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1671
1700
  /* @__PURE__ */ e(
1672
- de,
1701
+ me,
1673
1702
  {
1674
- label: i ? "Amount Sold" : "Amount Received",
1703
+ label: s ? "Amount Sold" : "Amount Received",
1675
1704
  value: `${l.cryptoAmount} ${l.cryptoCurrency}`,
1676
1705
  highlight: !0
1677
1706
  }
1678
1707
  ),
1679
1708
  /* @__PURE__ */ e(
1680
- de,
1709
+ me,
1681
1710
  {
1682
- label: i ? "Payout Amount" : "Amount Paid",
1711
+ label: s ? "Payout Amount" : "Amount Paid",
1683
1712
  value: `${l.fiatAmount} ${l.fiatCurrency}`
1684
1713
  }
1685
1714
  ),
1686
- /* @__PURE__ */ e(de, { label: "Network", value: l.network }),
1715
+ /* @__PURE__ */ e(me, { label: "Network", value: l.network }),
1687
1716
  /* @__PURE__ */ e(
1688
- de,
1717
+ me,
1689
1718
  {
1690
1719
  label: "Wallet",
1691
1720
  value: `${l.walletAddress.slice(0, 10)}...${l.walletAddress.slice(-8)}`,
@@ -1693,24 +1722,24 @@ function Nn({
1693
1722
  }
1694
1723
  ),
1695
1724
  l.transactionHash && /* @__PURE__ */ e(
1696
- de,
1725
+ me,
1697
1726
  {
1698
1727
  label: "Transaction",
1699
1728
  value: `${l.transactionHash.slice(0, 10)}...${l.transactionHash.slice(-8)}`,
1700
1729
  mono: !0
1701
1730
  }
1702
1731
  ),
1703
- /* @__PURE__ */ e(de, { label: "Provider", value: l.gateway }),
1704
- /* @__PURE__ */ e(de, { label: "Order ID", value: l.orderId, mono: !0 }),
1732
+ /* @__PURE__ */ e(me, { label: "Provider", value: l.gateway }),
1733
+ /* @__PURE__ */ e(me, { label: "Order ID", value: l.orderId, mono: !0 }),
1705
1734
  l.completedAt && /* @__PURE__ */ e(
1706
- de,
1735
+ me,
1707
1736
  {
1708
1737
  label: "Completed",
1709
1738
  value: new Date(l.completedAt).toLocaleString()
1710
1739
  }
1711
1740
  )
1712
1741
  ] }),
1713
- /* @__PURE__ */ o("div", { className: "w-full flex flex-col gap-2", children: [
1742
+ /* @__PURE__ */ r("div", { className: "w-full flex flex-col gap-2", children: [
1714
1743
  h && /* @__PURE__ */ e(
1715
1744
  "a",
1716
1745
  {
@@ -1728,14 +1757,14 @@ function Nn({
1728
1757
  className: "w-full font-semibold text-[16px] transition-all",
1729
1758
  style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)" },
1730
1759
  onClick: p,
1731
- children: r
1760
+ children: o
1732
1761
  }
1733
1762
  )
1734
1763
  ] })
1735
1764
  ] });
1736
1765
  }
1737
- function de({ label: t, value: n, mono: a, highlight: r }) {
1738
- return /* @__PURE__ */ o(
1766
+ function me({ label: t, value: n, mono: a, highlight: o }) {
1767
+ return /* @__PURE__ */ r(
1739
1768
  "div",
1740
1769
  {
1741
1770
  className: "flex justify-between items-center py-2",
@@ -1746,7 +1775,7 @@ function de({ label: t, value: n, mono: a, highlight: r }) {
1746
1775
  "span",
1747
1776
  {
1748
1777
  className: `text-[13px] font-medium ${a ? "font-mono" : ""}`,
1749
- style: { color: r ? "var(--t-success, #10b981)" : "var(--t-text)" },
1778
+ style: { color: o ? "var(--t-success, #10b981)" : "var(--t-text)" },
1750
1779
  children: n
1751
1780
  }
1752
1781
  )
@@ -1754,12 +1783,12 @@ function de({ label: t, value: n, mono: a, highlight: r }) {
1754
1783
  }
1755
1784
  );
1756
1785
  }
1757
- function En({
1786
+ function In({
1758
1787
  className: t = "",
1759
1788
  onRetry: n,
1760
1789
  supportEmail: a = "support@nowramp.com"
1761
1790
  }) {
1762
- const { state: r, orderStatus: l, dispatch: u, goToStep: m } = Ae(), i = r.flowType === "sell", s = () => {
1791
+ const { state: o, orderStatus: l, dispatch: c, goToStep: m } = Te(), s = o.flowType === "sell", u = () => {
1763
1792
  if (l)
1764
1793
  switch (l.status) {
1765
1794
  case "failed":
@@ -1775,27 +1804,27 @@ function En({
1775
1804
  }
1776
1805
  return "Something Went Wrong";
1777
1806
  }, p = () => {
1778
- if (r.errorMessage) return r.errorMessage;
1807
+ if (o.errorMessage) return o.errorMessage;
1779
1808
  if (l)
1780
1809
  switch (l.status) {
1781
1810
  case "failed":
1782
- return i ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
1811
+ return s ? "Your sale could not be processed. Please try again." : "Your payment could not be processed. Please try again or use a different payment method.";
1783
1812
  case "cancelled":
1784
- return i ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
1813
+ return s ? "Your sale was cancelled. No crypto was transferred." : "Your order was cancelled. No payment was processed.";
1785
1814
  case "expired":
1786
- return i ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
1815
+ return s ? "Your order has expired. Please start a new sale." : "Your order has expired. Please start a new purchase.";
1787
1816
  case "refunded":
1788
- return i ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
1817
+ return s ? "Your crypto has been returned. The funds should appear in your wallet shortly." : "Your payment has been refunded. The funds should appear in your account within 5-10 business days.";
1789
1818
  default:
1790
1819
  return "An unexpected error occurred. Please try again.";
1791
1820
  }
1792
1821
  return "An unexpected error occurred. Please try again.";
1793
1822
  }, h = () => {
1794
- u({ type: "CLEAR_ERROR" }), n ? n() : (u({ type: "RESET" }), m("amount"));
1823
+ c({ type: "CLEAR_ERROR" }), n ? n() : (c({ type: "RESET" }), m("amount"));
1795
1824
  }, d = () => {
1796
- u({ type: "RESET" }), m("amount");
1825
+ c({ type: "RESET" }), m("amount");
1797
1826
  };
1798
- return /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1827
+ return /* @__PURE__ */ r("div", { className: `flex flex-col items-center px-8 py-12 text-center ${t}`, children: [
1799
1828
  /* @__PURE__ */ e(
1800
1829
  "div",
1801
1830
  {
@@ -1804,13 +1833,13 @@ function En({
1804
1833
  children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: "32", height: "32", fill: "white", children: /* @__PURE__ */ e("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" }) })
1805
1834
  }
1806
1835
  ),
1807
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: s() }),
1836
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-2", style: { color: "var(--t-text)" }, children: u() }),
1808
1837
  /* @__PURE__ */ e("p", { className: "text-[14px] mb-6", style: { color: "var(--t-text-secondary)" }, children: p() }),
1809
- l && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", children: [
1838
+ l && /* @__PURE__ */ e("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: /* @__PURE__ */ r("div", { className: "flex justify-between items-center py-2", children: [
1810
1839
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Order ID" }),
1811
1840
  /* @__PURE__ */ e("span", { className: "text-[13px] font-medium font-mono", style: { color: "var(--t-text)" }, children: l.orderId })
1812
1841
  ] }) }),
1813
- /* @__PURE__ */ o("div", { className: "w-full flex flex-col gap-2", children: [
1842
+ /* @__PURE__ */ r("div", { className: "w-full flex flex-col gap-2", children: [
1814
1843
  /* @__PURE__ */ e(
1815
1844
  "button",
1816
1845
  {
@@ -1830,8 +1859,8 @@ function En({
1830
1859
  }
1831
1860
  )
1832
1861
  ] }),
1833
- /* @__PURE__ */ o("div", { className: "mt-6", children: [
1834
- /* @__PURE__ */ o("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
1862
+ /* @__PURE__ */ r("div", { className: "mt-6", children: [
1863
+ /* @__PURE__ */ r("p", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: [
1835
1864
  "Need help? Contact",
1836
1865
  " ",
1837
1866
  /* @__PURE__ */ e(
@@ -1844,176 +1873,189 @@ function En({
1844
1873
  }
1845
1874
  )
1846
1875
  ] }),
1847
- l && /* @__PURE__ */ o("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: [
1876
+ l && /* @__PURE__ */ r("p", { className: "text-[12px] mt-1", style: { color: "var(--t-text-muted)" }, children: [
1848
1877
  "Reference: ",
1849
1878
  l.orderId
1850
1879
  ] })
1851
1880
  ] })
1852
1881
  ] });
1853
1882
  }
1854
- function wt(t) {
1883
+ function kt(t) {
1855
1884
  return t.length <= 12 ? t : `${t.slice(0, 6)}...${t.slice(-6)}`;
1856
1885
  }
1857
- function wn({ className: t = "" }) {
1886
+ function Mn({ className: t = "", stablecoinParity: n, partnerName: a }) {
1887
+ var V;
1858
1888
  const {
1859
- config: n,
1860
- configLoading: a,
1861
- state: r,
1862
- defaultGateway: l,
1889
+ config: o,
1890
+ configLoading: l,
1891
+ state: c,
1892
+ defaultGateway: m,
1893
+ quotes: s,
1863
1894
  fetchQuotes: u,
1864
- createOrder: m,
1865
- orderLoading: i
1866
- } = Ae(), s = r.flowType === "sell", [p, h] = C(null), d = n == null ? void 0 : n.gateways.find((y) => y.id === l), f = async () => {
1867
- h(null);
1895
+ createOrder: p,
1896
+ orderLoading: h
1897
+ } = Te(), d = c.flowType === "sell", [f, x] = b(null), E = o == null ? void 0 : o.gateways.find((X) => X.id === m), v = (V = s == null ? void 0 : s.bestQuote) != null && V.exchangeRate ? parseFloat(s.bestQuote.exchangeRate) : null, S = parseFloat(c.fiatAmount) || 0, U = !!(n && a && !d && Ht(c.cryptoCurrency) && v), D = U && S > 0 && v ? Dt(S / v) : null, G = async () => {
1898
+ x(null);
1868
1899
  try {
1869
- u(), await m();
1870
- } catch (y) {
1871
- const A = y instanceof Error ? y.message : "Failed to create order";
1872
- h(A);
1900
+ u(), await p();
1901
+ } catch (X) {
1902
+ const J = X instanceof Error ? X.message : "Failed to create order";
1903
+ x(J);
1873
1904
  }
1874
1905
  };
1875
- return a ? /* @__PURE__ */ o("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
1906
+ return l ? /* @__PURE__ */ r("div", { className: `flex flex-col items-center justify-center p-12 ${t}`, children: [
1876
1907
  /* @__PURE__ */ e("div", { className: "nramp-spinner" }),
1877
1908
  /* @__PURE__ */ e("p", { className: "text-[14px] mt-4", style: { color: "var(--t-text-secondary)" }, children: "Loading..." })
1878
- ] }) : /* @__PURE__ */ o("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
1879
- /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: s ? "Confirm Sale" : "Confirm Purchase" }),
1880
- /* @__PURE__ */ o("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1881
- d && /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
1909
+ ] }) : /* @__PURE__ */ r("div", { className: `flex flex-col items-center px-8 py-12 ${t}`, children: [
1910
+ /* @__PURE__ */ e("h2", { className: "text-[20px] font-semibold mb-6", style: { color: "var(--t-text)" }, children: d ? "Confirm Sale" : "Confirm Purchase" }),
1911
+ /* @__PURE__ */ r("div", { className: "w-full text-left mb-6", style: { background: "var(--t-surface)", borderRadius: 5, padding: 16 }, children: [
1912
+ E && /* @__PURE__ */ r("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
1882
1913
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: "Provider" }),
1883
- /* @__PURE__ */ o("span", { className: "flex items-center gap-2", children: [
1884
- d.logo && /* @__PURE__ */ e("img", { src: d.logo, alt: d.name, width: 20, height: 20, style: { borderRadius: 4 } }),
1885
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: d.name })
1914
+ /* @__PURE__ */ r("span", { className: "flex items-center gap-2", children: [
1915
+ E.logo && /* @__PURE__ */ e("img", { src: E.logo, alt: E.name, width: 20, height: 20, style: { borderRadius: 4 } }),
1916
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: E.name })
1886
1917
  ] })
1887
1918
  ] }),
1888
- s ? /* @__PURE__ */ o(te, { children: [
1889
- /* @__PURE__ */ e(ye, { label: "You sell", value: `${r.cryptoAmount} ${r.cryptoCurrency}`, highlight: !0 }),
1890
- /* @__PURE__ */ e(ye, { label: "You receive", value: `${r.fiatCurrency} payout` })
1891
- ] }) : /* @__PURE__ */ o(te, { children: [
1892
- /* @__PURE__ */ e(ye, { label: "You pay", value: `${r.fiatAmount} ${r.fiatCurrency}`, highlight: !0 }),
1893
- /* @__PURE__ */ e(ye, { label: "You receive", value: `${r.cryptoCurrency} on ${r.network}` }),
1894
- /* @__PURE__ */ e(ye, { label: "Wallet", value: wt(r.walletAddress), mono: !0 })
1919
+ d ? /* @__PURE__ */ r(ae, { children: [
1920
+ /* @__PURE__ */ e(Ce, { label: "You sell", value: `${c.cryptoAmount} ${c.cryptoCurrency}`, highlight: !0 }),
1921
+ /* @__PURE__ */ e(Ce, { label: "You receive", value: `${c.fiatCurrency} payout` })
1922
+ ] }) : /* @__PURE__ */ r(ae, { children: [
1923
+ /* @__PURE__ */ e(Ce, { label: "You pay", value: `${c.fiatAmount} ${c.fiatCurrency}`, highlight: !0 }),
1924
+ /* @__PURE__ */ e(
1925
+ Ce,
1926
+ {
1927
+ label: "You receive",
1928
+ value: D ? `${D} ${c.cryptoCurrency}` : `${c.cryptoCurrency} on ${c.network}`
1929
+ }
1930
+ ),
1931
+ /* @__PURE__ */ e(Ce, { label: "Wallet", value: kt(c.walletAddress), mono: !0 }),
1932
+ U && D && /* @__PURE__ */ r("div", { className: "py-2 text-[11px]", style: { color: "var(--t-text-muted)", lineHeight: "15px" }, children: [
1933
+ "Charged amount from provider may differ. The rest will be credited to your ",
1934
+ a,
1935
+ " account."
1936
+ ] })
1895
1937
  ] }),
1896
- /* @__PURE__ */ e(ye, { label: "Network", value: r.network }),
1897
- s && r.walletAddress && /* @__PURE__ */ e(ye, { label: "Refund address", value: wt(r.walletAddress), mono: !0 })
1938
+ /* @__PURE__ */ e(Ce, { label: "Network", value: c.network }),
1939
+ d && c.walletAddress && /* @__PURE__ */ e(Ce, { label: "Refund address", value: kt(c.walletAddress), mono: !0 })
1898
1940
  ] }),
1899
- p && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: p }),
1941
+ f && /* @__PURE__ */ e("p", { className: "text-[12px] mb-4", style: { color: "#EF4444" }, children: f }),
1900
1942
  /* @__PURE__ */ e(
1901
1943
  "button",
1902
1944
  {
1903
1945
  className: "w-full font-semibold text-[16px] transition-all flex items-center justify-center gap-2",
1904
- style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: i ? 0.7 : 1 },
1905
- disabled: i,
1906
- onClick: f,
1907
- children: i ? /* @__PURE__ */ o(te, { children: [
1946
+ style: { height: 60, borderRadius: 5, background: "var(--t-cta-bg)", color: "var(--t-cta-text)", opacity: h ? 0.7 : 1 },
1947
+ disabled: h,
1948
+ onClick: G,
1949
+ children: h ? /* @__PURE__ */ r(ae, { children: [
1908
1950
  /* @__PURE__ */ e("span", { className: "nramp-spinner-inline" }),
1909
1951
  "Processing..."
1910
- ] }) : s ? "Confirm & Sell" : "Confirm & Pay"
1952
+ ] }) : d ? "Confirm & Sell" : "Confirm & Pay"
1911
1953
  }
1912
1954
  )
1913
1955
  ] });
1914
1956
  }
1915
- function ye({ label: t, value: n, mono: a, highlight: r }) {
1916
- return /* @__PURE__ */ o("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
1957
+ function Ce({ label: t, value: n, mono: a, highlight: o }) {
1958
+ return /* @__PURE__ */ r("div", { className: "flex justify-between items-center py-2", style: { borderBottom: "1px solid var(--t-divider)" }, children: [
1917
1959
  /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: t }),
1918
1960
  /* @__PURE__ */ e(
1919
1961
  "span",
1920
1962
  {
1921
1963
  className: `text-[13px] font-medium ${a ? "font-mono" : ""}`,
1922
- style: { color: r ? "var(--t-success, #10b981)" : "var(--t-text)" },
1964
+ style: { color: o ? "var(--t-success, #10b981)" : "var(--t-text)" },
1923
1965
  children: n
1924
1966
  }
1925
1967
  )
1926
1968
  ] });
1927
1969
  }
1928
- function Ue({
1970
+ function Ve({
1929
1971
  isOpen: t,
1930
1972
  onClose: n,
1931
1973
  children: a
1932
1974
  }) {
1933
- const [r, l] = C(!1), [u, m] = C(!1);
1934
- _(() => {
1975
+ const [o, l] = b(!1), [c, m] = b(!1);
1976
+ K(() => {
1935
1977
  if (t)
1936
1978
  l(!0), requestAnimationFrame(() => requestAnimationFrame(() => m(!0)));
1937
- else if (r) {
1979
+ else if (o) {
1938
1980
  m(!1);
1939
- const s = setTimeout(() => l(!1), 250);
1940
- return () => clearTimeout(s);
1981
+ const u = setTimeout(() => l(!1), 250);
1982
+ return () => clearTimeout(u);
1941
1983
  }
1942
1984
  }, [t]);
1943
- const i = H(() => {
1985
+ const s = B(() => {
1944
1986
  m(!1), setTimeout(() => n(), 250);
1945
1987
  }, [n]);
1946
- return _(() => {
1988
+ return K(() => {
1947
1989
  if (!t) return;
1948
- const s = (p) => {
1949
- p.key === "Escape" && i();
1990
+ const u = (p) => {
1991
+ p.key === "Escape" && s();
1950
1992
  };
1951
- return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
1952
- }, [t, i]), r ? /* @__PURE__ */ e(
1993
+ return window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u);
1994
+ }, [t, s]), o ? /* @__PURE__ */ e(
1953
1995
  "div",
1954
1996
  {
1955
1997
  className: "absolute inset-0 z-20 transition-opacity duration-250",
1956
- style: { opacity: u ? 1 : 0 },
1998
+ style: { opacity: c ? 1 : 0 },
1957
1999
  children: /* @__PURE__ */ e(
1958
2000
  "div",
1959
2001
  {
1960
2002
  className: "absolute inset-0 flex flex-col transition-transform duration-250 ease-out",
1961
- style: { background: "var(--t-modal-bg)", transform: u ? "translateY(0)" : "translateY(24px)" },
1962
- children: typeof a == "function" ? a(i) : a
2003
+ style: { background: "var(--t-modal-bg)", transform: c ? "translateY(0)" : "translateY(24px)" },
2004
+ children: typeof a == "function" ? a(s) : a
1963
2005
  }
1964
2006
  )
1965
2007
  }
1966
2008
  ) : null;
1967
2009
  }
1968
- function An({ char: t, height: n = 38 }) {
1969
- const a = "0123456789", r = a.indexOf(t);
1970
- return r === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: n, lineHeight: `${n}px` }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${r * n}px)` }, children: a.split("").map((l) => /* @__PURE__ */ e("span", { className: "block", style: { height: n, lineHeight: `${n}px` }, children: l }, l)) }) });
2010
+ function Bn({ char: t, height: n = 38 }) {
2011
+ const a = "0123456789", o = a.indexOf(t);
2012
+ return o === -1 ? /* @__PURE__ */ e("span", { children: t }) : /* @__PURE__ */ e("span", { className: "digit-slot", style: { height: n, lineHeight: `${n}px` }, children: /* @__PURE__ */ e("span", { className: "digit-slot-inner block", style: { transform: `translateY(-${o * n}px)` }, children: a.split("").map((l) => /* @__PURE__ */ e("span", { className: "block", style: { height: n, lineHeight: `${n}px` }, children: l }, l)) }) });
1971
2013
  }
1972
- function Sn({
2014
+ function On({
1973
2015
  value: t,
1974
2016
  height: n = 38,
1975
2017
  className: a = "",
1976
- style: r = {}
2018
+ style: o = {}
1977
2019
  }) {
1978
- return /* @__PURE__ */ e("span", { className: a, style: { display: "inline-flex", ...r }, children: t.split("").map((l, u) => /* @__PURE__ */ e(An, { char: l, height: n }, u)) });
2020
+ return /* @__PURE__ */ e("span", { className: a, style: { display: "inline-flex", ...o }, children: t.split("").map((l, c) => /* @__PURE__ */ e(Bn, { char: l, height: n }, c)) });
1979
2021
  }
1980
- function B({
2022
+ function M({
1981
2023
  w: t,
1982
2024
  h: n,
1983
2025
  className: a = ""
1984
2026
  }) {
1985
2027
  return /* @__PURE__ */ e("div", { className: `skeleton ${a}`, style: { width: t, height: n } });
1986
2028
  }
1987
- function Rn() {
1988
- return /* @__PURE__ */ o("div", { className: "flex-1 px-5 flex flex-col", children: [
1989
- /* @__PURE__ */ o("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
1990
- /* @__PURE__ */ e(B, { w: 70, h: 14, className: "mb-3" }),
1991
- /* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
1992
- /* @__PURE__ */ e(B, { w: 120, h: 32 }),
1993
- /* @__PURE__ */ e(B, { w: 75, h: 32 })
2029
+ function Hn() {
2030
+ return /* @__PURE__ */ r("div", { className: "flex-1 px-5 flex flex-col", children: [
2031
+ /* @__PURE__ */ r("div", { className: "px-[18px] pt-[14px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5 }, children: [
2032
+ /* @__PURE__ */ e(M, { w: 70, h: 14, className: "mb-3" }),
2033
+ /* @__PURE__ */ r("div", { className: "flex justify-between items-center", children: [
2034
+ /* @__PURE__ */ e(M, { w: 120, h: 32 }),
2035
+ /* @__PURE__ */ e(M, { w: 75, h: 32 })
1994
2036
  ] })
1995
2037
  ] }),
1996
- /* @__PURE__ */ o("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
1997
- /* @__PURE__ */ e(B, { w: 50, h: 14, className: "mb-3" }),
1998
- /* @__PURE__ */ o("div", { className: "flex justify-between items-center", children: [
1999
- /* @__PURE__ */ e(B, { w: 180, h: 32 }),
2000
- /* @__PURE__ */ e(B, { w: 85, h: 32 })
2038
+ /* @__PURE__ */ r("div", { className: "px-[18px] pt-[12px] pb-[18px]", style: { background: "var(--t-surface)", borderRadius: 5, marginTop: 4 }, children: [
2039
+ /* @__PURE__ */ e(M, { w: 50, h: 14, className: "mb-3" }),
2040
+ /* @__PURE__ */ r("div", { className: "flex justify-between items-center", children: [
2041
+ /* @__PURE__ */ e(M, { w: 180, h: 32 }),
2042
+ /* @__PURE__ */ e(M, { w: 85, h: 32 })
2001
2043
  ] })
2002
2044
  ] }),
2003
- /* @__PURE__ */ o("div", { className: "flex justify-between mt-3 px-[2px]", children: [
2004
- /* @__PURE__ */ e(B, { w: 140, h: 12 }),
2005
- /* @__PURE__ */ e(B, { w: 90, h: 12 })
2045
+ /* @__PURE__ */ r("div", { className: "flex justify-between mt-3 px-[2px]", children: [
2046
+ /* @__PURE__ */ e(M, { w: 140, h: 12 }),
2047
+ /* @__PURE__ */ e(M, { w: 90, h: 12 })
2006
2048
  ] }),
2007
- /* @__PURE__ */ o("div", { className: "mt-8", children: [
2008
- /* @__PURE__ */ e(B, { w: 65, h: 14, className: "mb-2.5" }),
2009
- /* @__PURE__ */ e(B, { w: "100%", h: 47 })
2049
+ /* @__PURE__ */ r("div", { className: "mt-8", children: [
2050
+ /* @__PURE__ */ e(M, { w: 65, h: 14, className: "mb-2.5" }),
2051
+ /* @__PURE__ */ e(M, { w: "100%", h: 47 })
2010
2052
  ] }),
2011
2053
  /* @__PURE__ */ e("div", { className: "flex-1" }),
2012
- /* @__PURE__ */ e(B, { w: "100%", h: 60, className: "mb-2" }),
2054
+ /* @__PURE__ */ e(M, { w: "100%", h: 60, className: "mb-2" }),
2013
2055
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
2014
2056
  ] });
2015
2057
  }
2016
- function Me({ onClick: t }) {
2058
+ function He({ onClick: t }) {
2017
2059
  return /* @__PURE__ */ e(
2018
2060
  "button",
2019
2061
  {
@@ -2026,18 +2068,18 @@ function Me({ onClick: t }) {
2026
2068
  }
2027
2069
  );
2028
2070
  }
2029
- function _e({
2071
+ function je({
2030
2072
  value: t,
2031
2073
  onChange: n,
2032
2074
  placeholder: a = ""
2033
2075
  }) {
2034
- return /* @__PURE__ */ o("div", { className: "relative mx-5 mb-5", children: [
2076
+ return /* @__PURE__ */ r("div", { className: "relative mx-5 mb-5", children: [
2035
2077
  /* @__PURE__ */ e(
2036
2078
  "input",
2037
2079
  {
2038
2080
  type: "text",
2039
2081
  value: t,
2040
- onChange: (r) => n(r.target.value),
2082
+ onChange: (o) => n(o.target.value),
2041
2083
  placeholder: a,
2042
2084
  style: { height: 47, borderRadius: 4.5, border: "1px solid var(--t-border)", color: "var(--t-text)", padding: `0 ${t ? 40 : 14}px 0 14px`, fontSize: 14, backgroundColor: "transparent" },
2043
2085
  className: "w-full outline-none transition-colors"
@@ -2054,38 +2096,38 @@ function _e({
2054
2096
  )
2055
2097
  ] });
2056
2098
  }
2057
- function Tn({
2099
+ function Dn({
2058
2100
  onClose: t,
2059
2101
  onSelect: n,
2060
2102
  currencies: a,
2061
- assetBaseUrl: r = "",
2103
+ assetBaseUrl: o = "",
2062
2104
  selectedCode: l
2063
2105
  }) {
2064
- const [u, m] = C(""), i = j(() => {
2065
- if (!a || a.length === 0) return gt;
2066
- const p = new Map(gt.map((h) => [h.code, h.name]));
2106
+ const [c, m] = b(""), s = W(() => {
2107
+ if (!a || a.length === 0) return Et;
2108
+ const p = new Map(Et.map((h) => [h.code, h.name]));
2067
2109
  return a.map((h) => ({
2068
2110
  code: h.code,
2069
2111
  name: h.name || p.get(h.code) || h.code
2070
2112
  }));
2071
- }, [a]), s = j(() => {
2072
- const p = u.trim().toLowerCase();
2113
+ }, [a]), u = W(() => {
2114
+ const p = c.trim().toLowerCase();
2073
2115
  if (!p) {
2074
2116
  if (l) {
2075
- const h = i.find((d) => d.code === l);
2117
+ const h = s.find((d) => d.code === l);
2076
2118
  if (h) {
2077
- const d = i.filter((f) => f.code !== l);
2119
+ const d = s.filter((f) => f.code !== l);
2078
2120
  return [h, ...d];
2079
2121
  }
2080
2122
  }
2081
- return i;
2123
+ return s;
2082
2124
  }
2083
- return i.filter(
2125
+ return s.filter(
2084
2126
  (h) => h.code.toLowerCase().includes(p) || h.name.toLowerCase().includes(p)
2085
2127
  );
2086
- }, [i, u, l]);
2087
- return /* @__PURE__ */ o(te, { children: [
2088
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Me, { onClick: t }) }),
2128
+ }, [s, c, l]);
2129
+ return /* @__PURE__ */ r(ae, { children: [
2130
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(He, { onClick: t }) }),
2089
2131
  /* @__PURE__ */ e(
2090
2132
  "h2",
2091
2133
  {
@@ -2100,20 +2142,20 @@ function Tn({
2100
2142
  children: "Select fiat currency"
2101
2143
  }
2102
2144
  ),
2103
- /* @__PURE__ */ e(_e, { value: u, onChange: m }),
2104
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2105
- s.map((p, h) => {
2145
+ /* @__PURE__ */ e(je, { value: c, onChange: m }),
2146
+ /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2147
+ u.map((p, h) => {
2106
2148
  const d = p.name !== p.code ? p.name : "", f = l === p.code;
2107
- return /* @__PURE__ */ o("div", { children: [
2108
- /* @__PURE__ */ o(
2149
+ return /* @__PURE__ */ r("div", { children: [
2150
+ /* @__PURE__ */ r(
2109
2151
  "button",
2110
2152
  {
2111
2153
  onClick: () => n(p.code),
2112
2154
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2113
2155
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2114
2156
  children: [
2115
- /* @__PURE__ */ e(Je, { currencyCode: p.code, size: 32, baseUrl: r }),
2116
- /* @__PURE__ */ o("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2157
+ /* @__PURE__ */ e(nt, { currencyCode: p.code, size: 32, baseUrl: o }),
2158
+ /* @__PURE__ */ r("div", { className: "text-left flex-1 flex items-center gap-2", children: [
2117
2159
  /* @__PURE__ */ e("span", { className: "font-semibold text-[15px]", children: p.code }),
2118
2160
  d && /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: d })
2119
2161
  ] }),
@@ -2130,7 +2172,7 @@ function Tn({
2130
2172
  ]
2131
2173
  }
2132
2174
  ),
2133
- h < s.length - 1 && /* @__PURE__ */ e(
2175
+ h < u.length - 1 && /* @__PURE__ */ e(
2134
2176
  "div",
2135
2177
  {
2136
2178
  style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" }
@@ -2138,21 +2180,21 @@ function Tn({
2138
2180
  )
2139
2181
  ] }, p.code);
2140
2182
  }),
2141
- s.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2183
+ u.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No currencies found" })
2142
2184
  ] })
2143
2185
  ] });
2144
2186
  }
2145
- function At({ src: t, alt: n, size: a, className: r, style: l }) {
2146
- const [u, m] = C(!1), [i, s] = C(!1), p = H(() => m(!0), []), h = H(() => s(!0), []);
2147
- return /* @__PURE__ */ o("div", { className: r, style: { ...l, width: a, height: a, position: "relative" }, children: [
2148
- !u && !i && /* @__PURE__ */ e(
2187
+ function Lt({ src: t, alt: n, size: a, className: o, style: l }) {
2188
+ const [c, m] = b(!1), [s, u] = b(!1), p = B(() => m(!0), []), h = B(() => u(!0), []);
2189
+ return /* @__PURE__ */ r("div", { className: o, style: { ...l, width: a, height: a, position: "relative" }, children: [
2190
+ !c && !s && /* @__PURE__ */ e(
2149
2191
  "div",
2150
2192
  {
2151
2193
  className: "absolute inset-0 rounded-full animate-pulse",
2152
2194
  style: { background: "var(--t-pill-bg, #333)" }
2153
2195
  }
2154
2196
  ),
2155
- i ? /* @__PURE__ */ e(
2197
+ s ? /* @__PURE__ */ e(
2156
2198
  "div",
2157
2199
  {
2158
2200
  className: "absolute inset-0 rounded-full flex items-center justify-center text-[10px] font-bold",
@@ -2169,57 +2211,57 @@ function At({ src: t, alt: n, size: a, className: r, style: l }) {
2169
2211
  loading: "lazy",
2170
2212
  onLoad: p,
2171
2213
  onError: h,
2172
- className: `rounded-full ${u ? "opacity-100" : "opacity-0"}`,
2214
+ className: `rounded-full ${c ? "opacity-100" : "opacity-0"}`,
2173
2215
  style: { width: a, height: a, transition: "opacity 0.15s ease-in" }
2174
2216
  }
2175
2217
  )
2176
2218
  ] });
2177
2219
  }
2178
- function kn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: r = "", selectedCode: l, selectedChain: u }) {
2179
- const [m, i] = C(""), s = j(() => {
2180
- if (!a || a.length === 0) return nn;
2220
+ function Pn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: o = "", selectedCode: l, selectedChain: c }) {
2221
+ const [m, s] = b(""), u = W(() => {
2222
+ if (!a || a.length === 0) return un;
2181
2223
  const d = [];
2182
2224
  for (const f of a) {
2183
- const y = f.networks || [], A = f.name || Jt[f.code] || f.code;
2184
- if (y.length === 0)
2185
- d.push({ code: f.code, name: A, chain: f.code, popular: !1 });
2225
+ const x = f.networks || [], E = f.name || on[f.code] || f.code;
2226
+ if (x.length === 0)
2227
+ d.push({ code: f.code, name: E, chain: f.code, popular: !1 });
2186
2228
  else
2187
- for (const b of y) {
2188
- const T = b.code || b.id || b.name || f.code;
2229
+ for (const v of x) {
2230
+ const S = v.code || v.id || v.name || f.code;
2189
2231
  d.push({
2190
2232
  code: f.code,
2191
- name: A,
2192
- chain: T,
2193
- chainName: b.name,
2233
+ name: E,
2234
+ chain: S,
2235
+ chainName: v.name,
2194
2236
  popular: !1
2195
2237
  });
2196
2238
  }
2197
2239
  }
2198
2240
  return d;
2199
- }, [a]), p = H((d, f) => l === d && u === f, [l, u]), h = j(() => {
2200
- var A;
2241
+ }, [a]), p = B((d, f) => l === d && c === f, [l, c]), h = W(() => {
2242
+ var E;
2201
2243
  const d = m.trim().toLowerCase();
2202
2244
  if (!d) {
2203
- if (l && u) {
2204
- const b = s.find((T) => T.code === l && T.chain === u);
2205
- if (b) {
2206
- const T = s.filter((Z) => !(Z.code === l && Z.chain === u));
2207
- return [b, ...T];
2245
+ if (l && c) {
2246
+ const v = u.find((S) => S.code === l && S.chain === c);
2247
+ if (v) {
2248
+ const S = u.filter((U) => !(U.code === l && U.chain === c));
2249
+ return [v, ...S];
2208
2250
  }
2209
2251
  }
2210
- return s;
2252
+ return u;
2211
2253
  }
2212
- const f = d.split(/\s+/), y = [];
2213
- for (const b of s) {
2214
- const T = Fe(b.chain), Z = T ? T.name.toLowerCase() : "", Q = ((A = T == null ? void 0 : T.shortName) == null ? void 0 : A.toLowerCase()) || "", q = b.chain.toLowerCase(), ee = b.code.toLowerCase(), ie = b.name.toLowerCase(), g = [ee, ie, Z, Q, q];
2215
- if (!f.every((c) => g.some((N) => N.includes(c)))) continue;
2216
- let S = 0;
2217
- ee === d ? S += 100 : ee.startsWith(f[0]) && (S += 50), b.popular && (S += 10), f.length > 1 && (Z.includes(f[1]) || Q.includes(f[1]) || q.includes(f[1])) && (S += 25), y.push({ item: b, score: S });
2254
+ const f = d.split(/\s+/), x = [];
2255
+ for (const v of u) {
2256
+ const S = Xe(v.chain), U = S ? S.name.toLowerCase() : "", D = ((E = S == null ? void 0 : S.shortName) == null ? void 0 : E.toLowerCase()) || "", G = v.chain.toLowerCase(), V = v.code.toLowerCase(), X = v.name.toLowerCase(), J = [V, X, U, D, G];
2257
+ if (!f.every((i) => J.some((w) => w.includes(i)))) continue;
2258
+ let y = 0;
2259
+ V === d ? y += 100 : V.startsWith(f[0]) && (y += 50), v.popular && (y += 10), f.length > 1 && (U.includes(f[1]) || D.includes(f[1]) || G.includes(f[1])) && (y += 25), x.push({ item: v, score: y });
2218
2260
  }
2219
- return y.sort((b, T) => T.score - b.score), y.map((b) => b.item);
2220
- }, [s, m, l, u]);
2221
- return /* @__PURE__ */ o(te, { children: [
2222
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Me, { onClick: t }) }),
2261
+ return x.sort((v, S) => S.score - v.score), x.map((v) => v.item);
2262
+ }, [u, m, l, c]);
2263
+ return /* @__PURE__ */ r(ae, { children: [
2264
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(He, { onClick: t }) }),
2223
2265
  /* @__PURE__ */ e(
2224
2266
  "h2",
2225
2267
  {
@@ -2228,28 +2270,28 @@ function kn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: r = "", selecte
2228
2270
  children: "Select crypto currency"
2229
2271
  }
2230
2272
  ),
2231
- /* @__PURE__ */ e(_e, { value: m, onChange: i }),
2232
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2273
+ /* @__PURE__ */ e(je, { value: m, onChange: s }),
2274
+ /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2233
2275
  h.map((d, f) => {
2234
- const y = Fe(d.chain), A = (y == null ? void 0 : y.name) || d.chainName || d.chain, b = d.name !== d.code ? d.name : "", T = p(d.code, d.chain);
2235
- return /* @__PURE__ */ o("div", { children: [
2236
- /* @__PURE__ */ o(
2276
+ const x = Xe(d.chain), E = (x == null ? void 0 : x.name) || d.chainName || d.chain, v = d.name !== d.code ? d.name : "", S = p(d.code, d.chain);
2277
+ return /* @__PURE__ */ r("div", { children: [
2278
+ /* @__PURE__ */ r(
2237
2279
  "button",
2238
2280
  {
2239
2281
  onClick: () => n(d.code, d.chain),
2240
2282
  className: "flex items-center w-full transition-colors rounded-lg hover-item",
2241
2283
  style: { gap: 14, padding: "18px 8px", margin: "0 -8px" },
2242
2284
  children: [
2243
- /* @__PURE__ */ o("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
2285
+ /* @__PURE__ */ r("div", { className: "relative shrink-0", style: { width: 40, height: 40 }, children: [
2244
2286
  /* @__PURE__ */ e(
2245
2287
  "div",
2246
2288
  {
2247
2289
  className: "absolute top-0 left-0",
2248
2290
  style: { background: "#ffffff", borderRadius: "50%" },
2249
2291
  children: /* @__PURE__ */ e(
2250
- At,
2292
+ Lt,
2251
2293
  {
2252
- src: kt(d.code, r),
2294
+ src: Ot(d.code, o),
2253
2295
  alt: d.code,
2254
2296
  size: 32
2255
2297
  }
@@ -2268,9 +2310,9 @@ function kn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: r = "", selecte
2268
2310
  background: "#ffffff"
2269
2311
  },
2270
2312
  children: /* @__PURE__ */ e(
2271
- At,
2313
+ Lt,
2272
2314
  {
2273
- src: ze(d.chain, r),
2315
+ src: tt(d.chain, o),
2274
2316
  alt: d.chain,
2275
2317
  size: 16
2276
2318
  }
@@ -2278,7 +2320,7 @@ function kn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: r = "", selecte
2278
2320
  }
2279
2321
  )
2280
2322
  ] }),
2281
- /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
2323
+ /* @__PURE__ */ e("div", { className: "text-left flex-1 min-w-0", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2282
2324
  /* @__PURE__ */ e(
2283
2325
  "span",
2284
2326
  {
@@ -2287,18 +2329,18 @@ function kn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: r = "", selecte
2287
2329
  children: d.code
2288
2330
  }
2289
2331
  ),
2290
- b && /* @__PURE__ */ e(
2332
+ v && /* @__PURE__ */ e(
2291
2333
  "span",
2292
2334
  {
2293
2335
  className: "text-[13px]",
2294
2336
  style: { color: "var(--t-text-secondary)" },
2295
- children: b
2337
+ children: v
2296
2338
  }
2297
2339
  )
2298
2340
  ] }) }),
2299
- /* @__PURE__ */ o("div", { className: "flex items-center gap-2 shrink-0", children: [
2300
- /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: A }),
2301
- T && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
2341
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-2 shrink-0", children: [
2342
+ /* @__PURE__ */ e("span", { className: "text-[13px]", style: { color: "var(--t-text-secondary)" }, children: E }),
2343
+ S && /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ e(
2302
2344
  "path",
2303
2345
  {
2304
2346
  d: "M13.5 4.5L6 12L2.5 8.5",
@@ -2319,30 +2361,30 @@ function kn({ onClose: t, onSelect: n, cryptos: a, assetBaseUrl: r = "", selecte
2319
2361
  ] })
2320
2362
  ] });
2321
2363
  }
2322
- function Ln({
2364
+ function Un({
2323
2365
  methods: t,
2324
2366
  selectedId: n,
2325
2367
  onSelect: a,
2326
- onClose: r
2368
+ onClose: o
2327
2369
  }) {
2328
- const [l, u] = C(""), m = j(() => {
2329
- const i = l.trim().toLowerCase();
2330
- if (!i) {
2370
+ const [l, c] = b(""), m = W(() => {
2371
+ const s = l.trim().toLowerCase();
2372
+ if (!s) {
2331
2373
  if (n) {
2332
- const s = t.find((p) => p.id === n);
2333
- if (s) {
2374
+ const u = t.find((p) => p.id === n);
2375
+ if (u) {
2334
2376
  const p = t.filter((h) => h.id !== n);
2335
- return [s, ...p];
2377
+ return [u, ...p];
2336
2378
  }
2337
2379
  }
2338
2380
  return t;
2339
2381
  }
2340
2382
  return t.filter(
2341
- (s) => s.id.toLowerCase().includes(i) || s.name.toLowerCase().includes(i) || s.description && s.description.toLowerCase().includes(i)
2383
+ (u) => u.id.toLowerCase().includes(s) || u.name.toLowerCase().includes(s) || u.description && u.description.toLowerCase().includes(s)
2342
2384
  );
2343
2385
  }, [t, l, n]);
2344
- return /* @__PURE__ */ o(te, { children: [
2345
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Me, { onClick: r }) }),
2386
+ return /* @__PURE__ */ r(ae, { children: [
2387
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(He, { onClick: o }) }),
2346
2388
  /* @__PURE__ */ e(
2347
2389
  "h2",
2348
2390
  {
@@ -2351,27 +2393,27 @@ function Ln({
2351
2393
  children: "Choose payment method"
2352
2394
  }
2353
2395
  ),
2354
- /* @__PURE__ */ e(_e, { value: l, onChange: u }),
2355
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2356
- m.map((i, s) => {
2357
- const p = i.id === n, h = It(i.id, i.name);
2358
- return /* @__PURE__ */ o("div", { children: [
2359
- /* @__PURE__ */ o(
2396
+ /* @__PURE__ */ e(je, { value: l, onChange: c }),
2397
+ /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5", children: [
2398
+ m.map((s, u) => {
2399
+ const p = s.id === n, h = Ut(s.id, s.name);
2400
+ return /* @__PURE__ */ r("div", { children: [
2401
+ /* @__PURE__ */ r(
2360
2402
  "button",
2361
2403
  {
2362
- onClick: () => a(i.id),
2363
- className: `flex w-full transition-colors rounded-lg hover-item ${i.description ? "items-start" : "items-center"}`,
2404
+ onClick: () => a(s.id),
2405
+ className: `flex w-full transition-colors rounded-lg hover-item ${s.description ? "items-start" : "items-center"}`,
2364
2406
  style: { color: "var(--t-text)", gap: 14, padding: "18px 8px", margin: "0 -8px" },
2365
2407
  children: [
2366
2408
  /* @__PURE__ */ e(
2367
2409
  "span",
2368
2410
  {
2369
- className: `flex items-center justify-center shrink-0 ${i.description ? "mt-0.5" : ""}`,
2411
+ className: `flex items-center justify-center shrink-0 ${s.description ? "mt-0.5" : ""}`,
2370
2412
  style: { width: 32, height: 32 },
2371
- children: Mt(i.id, i.icon, 32)
2413
+ children: Ft(s.id, s.icon, 32)
2372
2414
  }
2373
2415
  ),
2374
- /* @__PURE__ */ o("div", { className: "text-left flex-1", children: [
2416
+ /* @__PURE__ */ r("div", { className: "text-left flex-1", children: [
2375
2417
  /* @__PURE__ */ e(
2376
2418
  "div",
2377
2419
  {
@@ -2380,12 +2422,12 @@ function Ln({
2380
2422
  children: h
2381
2423
  }
2382
2424
  ),
2383
- i.description && /* @__PURE__ */ e(
2425
+ s.description && /* @__PURE__ */ e(
2384
2426
  "div",
2385
2427
  {
2386
2428
  className: "text-[13px] leading-snug mt-1",
2387
2429
  style: { color: "var(--t-text-secondary)" },
2388
- children: i.description
2430
+ children: s.description
2389
2431
  }
2390
2432
  )
2391
2433
  ] }),
@@ -2402,14 +2444,14 @@ function Ln({
2402
2444
  ]
2403
2445
  }
2404
2446
  ),
2405
- s < m.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2406
- ] }, i.id);
2447
+ u < m.length - 1 && /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider, rgba(255,255,255,0.08))" } })
2448
+ ] }, s.id);
2407
2449
  }),
2408
2450
  m.length === 0 && /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: "No payment methods found" })
2409
2451
  ] })
2410
2452
  ] });
2411
2453
  }
2412
- function In({
2454
+ function Fn({
2413
2455
  checked: t,
2414
2456
  onChange: n,
2415
2457
  accentColor: a = "var(--t-accent)"
@@ -2439,25 +2481,25 @@ function In({
2439
2481
  }
2440
2482
  );
2441
2483
  }
2442
- const Mn = [
2484
+ const Kn = [
2443
2485
  { label: "Privacy policy", href: "https://nowramp.com/privacy-policy" },
2444
2486
  { label: "Terms of use", href: "https://nowramp.com/terms-and-conditions" }
2445
2487
  ];
2446
- function Bn({
2488
+ function _n({
2447
2489
  onClose: t,
2448
2490
  darkMode: n,
2449
2491
  onToggleDarkMode: a,
2450
- skinId: r,
2492
+ skinId: o,
2451
2493
  onSelectSkin: l,
2452
- showThemeToggle: u = !0
2494
+ showThemeToggle: c = !0
2453
2495
  }) {
2454
- return /* @__PURE__ */ o(te, { children: [
2455
- /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(Me, { onClick: t }) }),
2456
- /* @__PURE__ */ o("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2457
- u && /* @__PURE__ */ o(te, { children: [
2458
- /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between w-full py-5", children: [
2459
- /* @__PURE__ */ o("div", { className: "flex items-center gap-3.5", children: [
2460
- /* @__PURE__ */ e(pn, { size: 40 }),
2496
+ return /* @__PURE__ */ r(ae, { children: [
2497
+ /* @__PURE__ */ e("div", { className: "flex justify-end items-center px-5 pt-5", children: /* @__PURE__ */ e(He, { onClick: t }) }),
2498
+ /* @__PURE__ */ r("div", { className: "px-5 flex-1 pt-6 overflow-y-auto custom-scroll", children: [
2499
+ c && /* @__PURE__ */ r(ae, { children: [
2500
+ /* @__PURE__ */ e("div", { style: { borderTop: "1px solid var(--t-divider)" }, children: /* @__PURE__ */ r("div", { className: "flex items-center justify-between w-full py-5", children: [
2501
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-3.5", children: [
2502
+ /* @__PURE__ */ e(Nn, { size: 40 }),
2461
2503
  /* @__PURE__ */ e(
2462
2504
  "span",
2463
2505
  {
@@ -2467,12 +2509,12 @@ function Bn({
2467
2509
  }
2468
2510
  )
2469
2511
  ] }),
2470
- /* @__PURE__ */ e(In, { checked: n, onChange: a, accentColor: "#4CD964" })
2512
+ /* @__PURE__ */ e(Fn, { checked: n, onChange: a, accentColor: "#4CD964" })
2471
2513
  ] }) }),
2472
2514
  /* @__PURE__ */ e("div", { style: { height: 1, background: "var(--t-divider)" } })
2473
2515
  ] }),
2474
- Mn.map((m) => /* @__PURE__ */ o("div", { children: [
2475
- /* @__PURE__ */ o(
2516
+ Kn.map((m) => /* @__PURE__ */ r("div", { children: [
2517
+ /* @__PURE__ */ r(
2476
2518
  "a",
2477
2519
  {
2478
2520
  href: m.href,
@@ -2489,7 +2531,7 @@ function Bn({
2489
2531
  children: m.label
2490
2532
  }
2491
2533
  ),
2492
- /* @__PURE__ */ e(mn, {})
2534
+ /* @__PURE__ */ e(vn, {})
2493
2535
  ]
2494
2536
  }
2495
2537
  ),
@@ -2498,206 +2540,208 @@ function Bn({
2498
2540
  ] })
2499
2541
  ] });
2500
2542
  }
2501
- function Hn({
2543
+ function Vn({
2502
2544
  className: t = "",
2503
2545
  theme: n = "dark",
2504
2546
  skinId: a = "mono",
2505
- accentColor: r,
2547
+ accentColor: o,
2506
2548
  bgColor: l,
2507
- bgImage: u,
2549
+ bgImage: c,
2508
2550
  borderColor: m,
2509
- borderRadius: i,
2510
- surfaceColor: s,
2551
+ borderRadius: s,
2552
+ surfaceColor: u,
2511
2553
  inputBgColor: p,
2512
2554
  textColor: h,
2513
2555
  textSecondaryColor: d,
2514
2556
  textMutedColor: f,
2515
- successColor: y,
2516
- showFlowToggle: A = !0,
2517
- showSettings: b = !0,
2518
- showThemeToggle: T = !0,
2519
- autoRedirect: Z = !1,
2520
- explorerUrl: Q,
2521
- doneButtonText: q = "Done",
2522
- supportEmail: ee,
2523
- onDone: ie
2557
+ successColor: x,
2558
+ showFlowToggle: E = !0,
2559
+ showSettings: v = !0,
2560
+ showThemeToggle: S = !0,
2561
+ autoRedirect: U = !1,
2562
+ explorerUrl: D,
2563
+ doneButtonText: G = "Done",
2564
+ supportEmail: V,
2565
+ stablecoinParity: X,
2566
+ partnerName: J,
2567
+ onDone: ve
2524
2568
  }) {
2525
- var st, ct, dt, ut, mt, ht, pt, ft;
2569
+ var ht, pt, ft, yt, xt, gt, Ct, vt;
2526
2570
  const {
2527
- state: g,
2528
- dispatch: L,
2529
- config: S,
2530
- configLoading: c,
2531
- quotes: N,
2532
- quotesLoading: O,
2533
- quotesError: I,
2534
- fetchQuotes: Se,
2535
- createOrder: se,
2536
- orderLoading: X,
2537
- amountError: ue,
2571
+ state: y,
2572
+ dispatch: i,
2573
+ config: w,
2574
+ configLoading: O,
2575
+ quotes: C,
2576
+ quotesLoading: he,
2577
+ quotesError: re,
2578
+ fetchQuotes: q,
2579
+ createOrder: be,
2580
+ orderLoading: ee,
2581
+ amountError: pe,
2538
2582
  fieldLocks: k,
2539
- apiConfig: xe,
2540
- assetBaseUrl: W
2541
- } = Ae(), [ne, ae] = C(n === "dark"), [ge, Re] = C(a), [me, G] = C(null), [Y, Be] = C(!1), [Ce, Te] = C(!1), [ve, be] = C(!1), [Ve, he] = C(null), [ke, Xe] = C(!0), [$e, v] = C(!1), [w, U] = C(!1), F = V(null), M = V(), K = V(g.flowType);
2542
- _(() => {
2543
- ae(n === "dark");
2544
- }, [n]), _(() => {
2545
- const x = setTimeout(() => Xe(!1), c ? 0 : 800);
2546
- return () => clearTimeout(x);
2547
- }, [c]), _(() => {
2548
- if (K.current !== g.flowType && !ke) {
2549
- K.current = g.flowType, v(!0), Be(!1), Te(!1);
2550
- const x = setTimeout(() => v(!1), 350);
2551
- return () => clearTimeout(x);
2583
+ apiConfig: Ne,
2584
+ assetBaseUrl: P
2585
+ } = Te(), [oe, de] = b(n === "dark"), [fe, We] = b(a), [$, Y] = b(null), [ye, ke] = b(!1), [Le, Ee] = b(!1), [Ie, De] = b(!1), [Ge, xe] = b(null), [Me, N] = b(!0), [T, Z] = b(!1), [L, I] = b(!1), Q = _(null), te = _(), we = _(y.flowType);
2586
+ K(() => {
2587
+ de(n === "dark");
2588
+ }, [n]), K(() => {
2589
+ const g = setTimeout(() => N(!1), O ? 0 : 800);
2590
+ return () => clearTimeout(g);
2591
+ }, [O]), K(() => {
2592
+ if (we.current !== y.flowType && !Me) {
2593
+ we.current = y.flowType, Z(!0), ke(!1), Ee(!1);
2594
+ const g = setTimeout(() => Z(!1), 350);
2595
+ return () => clearTimeout(g);
2552
2596
  }
2553
- K.current = g.flowType;
2554
- }, [g.flowType, ke]);
2555
- const $ = g.flowType, P = $ === "buy", z = g.cryptoCurrency || "BTC", re = g.fiatCurrency || "USD", je = P ? g.fiatAmount : g.cryptoAmount, pe = tn(je), Ne = (st = N == null ? void 0 : N.bestQuote) != null && st.exchangeRate ? parseFloat(N.bestQuote.exchangeRate) : null, He = V(null);
2556
- Ne && z && re && (He.current = { rate: Ne, crypto: z, fiat: re });
2557
- const Bt = j(() => {
2558
- if (N != null && N.bestQuote) {
2559
- const x = P ? N.bestQuote.cryptoAmount : N.bestQuote.fiatAmount;
2560
- if (x) return x;
2597
+ we.current = y.flowType;
2598
+ }, [y.flowType, Me]);
2599
+ const Ae = y.flowType, F = Ae === "buy", j = y.cryptoCurrency || "BTC", le = y.fiatCurrency || "USD", Ye = F ? y.fiatAmount : y.cryptoAmount, ne = dn(Ye), ie = (ht = C == null ? void 0 : C.bestQuote) != null && ht.exchangeRate ? parseFloat(C.bestQuote.exchangeRate) : null, Pe = _(null);
2600
+ ie && j && le && (Pe.current = { rate: ie, crypto: j, fiat: le });
2601
+ const rt = W(() => {
2602
+ if (C != null && C.bestQuote) {
2603
+ const g = F ? C.bestQuote.cryptoAmount : C.bestQuote.fiatAmount;
2604
+ if (g) return g;
2561
2605
  }
2562
2606
  return "0";
2563
- }, [N, P]), Ht = j(() => {
2564
- var D, ce, Ye;
2565
- const x = Ne || ((D = He.current) == null ? void 0 : D.rate), E = Ne ? z : (ce = He.current) == null ? void 0 : ce.crypto, R = Ne ? re : (Ye = He.current) == null ? void 0 : Ye.fiat;
2566
- return !x || !E || !R ? "" : `1 ${E} ≈ ${x.toFixed(2)} ${R}`;
2567
- }, [z, re, Ne]);
2568
- _(() => {
2569
- const x = g.walletAddress.trim(), E = g.network;
2570
- if (!x || x.length < 10) {
2571
- he(null), L({ type: "SET_WALLET_ERROR", message: "" });
2607
+ }, [C, F]), Ue = !!(X && J && F && Ht(j) && ie), Ze = Ue && ne > 0 && ie ? Dt(ne / ie) : null, Kt = Ue && Ze ? Ze : rt, _t = W(() => {
2608
+ var H, ue, Je;
2609
+ const g = ie || ((H = Pe.current) == null ? void 0 : H.rate), A = ie ? j : (ue = Pe.current) == null ? void 0 : ue.crypto, R = ie ? le : (Je = Pe.current) == null ? void 0 : Je.fiat;
2610
+ return !g || !A || !R ? "" : `1 ${A} ≈ ${g.toFixed(2)} ${R}`;
2611
+ }, [j, le, ie]);
2612
+ K(() => {
2613
+ const g = y.walletAddress.trim(), A = y.network;
2614
+ if (!g || g.length < 10) {
2615
+ xe(null), i({ type: "SET_WALLET_ERROR", message: "" });
2572
2616
  return;
2573
2617
  }
2574
- return be(!0), he(null), clearTimeout(M.current), M.current = setTimeout(async () => {
2575
- var R, D, ce;
2618
+ return De(!0), xe(null), clearTimeout(te.current), te.current = setTimeout(async () => {
2619
+ var R, H, ue;
2576
2620
  try {
2577
- const Ze = await (await fetch(`${xe.apiUrl}/public/validate/address`, {
2621
+ const qe = await (await fetch(`${Ne.apiUrl}/public/validate/address`, {
2578
2622
  method: "POST",
2579
2623
  headers: { "Content-Type": "application/json" },
2580
- body: JSON.stringify({ address: x, ...E ? { network: E } : {} })
2581
- })).json(), Qe = ((R = Ze.data) == null ? void 0 : R.attributes) || Ze.data || Ze;
2582
- if (Qe.isValid)
2583
- he(!0), L({ type: "SET_WALLET_ERROR", message: "" });
2624
+ body: JSON.stringify({ address: g, ...A ? { network: A } : {} })
2625
+ })).json(), et = ((R = qe.data) == null ? void 0 : R.attributes) || qe.data || qe;
2626
+ if (et.isValid)
2627
+ xe(!0), i({ type: "SET_WALLET_ERROR", message: "" });
2584
2628
  else {
2585
- he(!1);
2586
- const Vt = ((D = Qe.errors) == null ? void 0 : D[0]) || ((ce = Qe.details) == null ? void 0 : ce.formatMessage) || "Invalid wallet address";
2587
- L({ type: "SET_WALLET_ERROR", message: Vt });
2629
+ xe(!1);
2630
+ const Zt = ((H = et.errors) == null ? void 0 : H[0]) || ((ue = et.details) == null ? void 0 : ue.formatMessage) || "Invalid wallet address";
2631
+ i({ type: "SET_WALLET_ERROR", message: Zt });
2588
2632
  }
2589
2633
  } catch {
2590
- he(null);
2634
+ xe(null);
2591
2635
  } finally {
2592
- be(!1);
2636
+ De(!1);
2593
2637
  }
2594
- }, 500), () => clearTimeout(M.current);
2595
- }, [g.walletAddress, g.network, xe.apiUrl]);
2596
- const et = !je || pe === 0, tt = pe > 0 && (P ? pe < bt : pe < Nt), nt = !!ue || tt || Y && et, Ot = pe > 0 && !ue && !tt, We = g.walletAddress.trim().length >= 10 && Ve !== !1 && !ve, Oe = Ot && We && !!g.cryptoCurrency && !!g.network, Pt = (x) => {
2597
- let E = x.target.value.replace(/[^0-9.,]/g, "");
2598
- const R = P ? 2 : 6, D = E.indexOf(".");
2599
- D !== -1 && E.length - D - 1 > R && (E = E.slice(0, D + R + 1)), L(P ? { type: "SET_FIAT_AMOUNT", amount: E } : { type: "SET_CRYPTO_AMOUNT", amount: E });
2600
- }, at = (x) => {
2601
- x !== $ && L({ type: "SET_FLOW_TYPE", flowType: x });
2602
- }, Dt = H(
2603
- (x) => {
2604
- L({ type: "SET_FIAT_CURRENCY", currency: x });
2638
+ }, 500), () => clearTimeout(te.current);
2639
+ }, [y.walletAddress, y.network, Ne.apiUrl]);
2640
+ const ot = !Ye || ne === 0, lt = ne > 0 && (F ? ne < St : ne < Rt), it = !!pe || lt || ye && ot, Vt = ne > 0 && !pe && !lt, Qe = y.walletAddress.trim().length >= 10 && Ge !== !1 && !Ie, Fe = Vt && Qe && !!y.cryptoCurrency && !!y.network, Xt = (g) => {
2641
+ let A = g.target.value.replace(/[^0-9.,]/g, "");
2642
+ const R = F ? 2 : 6, H = A.indexOf(".");
2643
+ H !== -1 && A.length - H - 1 > R && (A = A.slice(0, H + R + 1)), i(F ? { type: "SET_FIAT_AMOUNT", amount: A } : { type: "SET_CRYPTO_AMOUNT", amount: A });
2644
+ }, ct = (g) => {
2645
+ g !== Ae && i({ type: "SET_FLOW_TYPE", flowType: g });
2646
+ }, $t = B(
2647
+ (g) => {
2648
+ i({ type: "SET_FIAT_CURRENCY", currency: g });
2605
2649
  },
2606
- [L]
2607
- ), Ut = H(
2608
- (x, E) => {
2609
- L({ type: "SET_CRYPTO_CURRENCY", currency: x }), L({ type: "SET_CRYPTO_CHAIN", chain: E });
2650
+ [i]
2651
+ ), jt = B(
2652
+ (g, A) => {
2653
+ i({ type: "SET_CRYPTO_CURRENCY", currency: g }), i({ type: "SET_CRYPTO_CHAIN", chain: A });
2610
2654
  },
2611
- [L]
2612
- ), Ft = H(
2613
- (x) => {
2614
- L({ type: "SET_PAYMENT_METHOD", methodId: x });
2655
+ [i]
2656
+ ), Wt = B(
2657
+ (g) => {
2658
+ i({ type: "SET_PAYMENT_METHOD", methodId: g });
2615
2659
  },
2616
- [L]
2617
- ), Kt = () => {
2618
- Oe && (U(!0), Se());
2660
+ [i]
2661
+ ), Gt = () => {
2662
+ Fe && (I(!0), q());
2619
2663
  };
2620
- _(() => {
2621
- var x;
2622
- if (!(!w || O)) {
2623
- if (N != null && N.bestQuote)
2624
- U(!1), L({ type: "SELECT_QUOTE", quote: N.bestQuote }), se().catch(() => {
2664
+ K(() => {
2665
+ var g;
2666
+ if (!(!L || he)) {
2667
+ if (C != null && C.bestQuote)
2668
+ I(!1), i({ type: "SELECT_QUOTE", quote: C.bestQuote }), be().catch(() => {
2625
2669
  });
2626
- else if (I)
2627
- U(!1), L({ type: "SET_ERROR", message: I.message || "No quotes available" });
2628
- else if (N && !N.bestQuote) {
2629
- U(!1);
2630
- const E = (x = N.unavailableGateways) == null ? void 0 : x.map((D) => D.reason).filter(Boolean), R = E != null && E.length ? `No providers available: ${E.join("; ")}` : "No providers available for this currency/network combination";
2631
- L({ type: "SET_ERROR", message: R });
2670
+ else if (re)
2671
+ I(!1), i({ type: "SET_ERROR", message: re.message || "No quotes available" });
2672
+ else if (C && !C.bestQuote) {
2673
+ I(!1);
2674
+ const A = (g = C.unavailableGateways) == null ? void 0 : g.map((H) => H.reason).filter(Boolean), R = A != null && A.length ? `No providers available: ${A.join("; ")}` : "No providers available for this currency/network combination";
2675
+ i({ type: "SET_ERROR", message: R });
2632
2676
  }
2633
2677
  }
2634
- }, [w, N, O, I, L, se]);
2635
- const rt = ne ? "theme-dark" : "theme-light", Ge = Ct.find((x) => x.id === ge) || Ct[0], _t = Ge.accent === null, ot = (r ? le(r) : !1) ? { "--t-accent": r, "--t-cta-bg": r, "--t-cta-text": "#ffffff" } : _t ? {
2636
- "--t-accent": ne ? "#ffffff" : "#111111",
2637
- "--t-cta-bg": ne ? "#ffffff" : "#111111",
2638
- "--t-cta-text": ne ? "#000000" : "#ffffff"
2678
+ }, [L, C, he, re, i, be]);
2679
+ const st = oe ? "theme-dark" : "theme-light", ze = wt.find((g) => g.id === fe) || wt[0], Yt = ze.accent === null, dt = (o ? se(o) : !1) ? { "--t-accent": o, "--t-cta-bg": o, "--t-cta-text": "#ffffff" } : Yt ? {
2680
+ "--t-accent": oe ? "#ffffff" : "#111111",
2681
+ "--t-cta-bg": oe ? "#ffffff" : "#111111",
2682
+ "--t-cta-text": oe ? "#000000" : "#ffffff"
2639
2683
  } : {
2640
- "--t-accent": Ge.accent,
2641
- "--t-cta-bg": Ge.accent,
2684
+ "--t-accent": ze.accent,
2685
+ "--t-cta-bg": ze.accent,
2642
2686
  "--t-cta-text": "#ffffff"
2643
- }, J = {};
2644
- s && le(s) && (J["--t-surface"] = s, J["--t-modal-bg"] = s), p && le(p) && (J["--t-pill-bg"] = p, J["--t-close-bg"] = p), h && le(h) && (J["--t-text"] = h), d && le(d) && (J["--t-text-secondary"] = d), f && le(f) && (J["--t-text-muted"] = f, J["--t-text-tertiary"] = f), y && le(y) && (J["--t-success"] = y);
2645
- const fe = {};
2646
- l && le(l) ? fe.backgroundColor = l : fe.backgroundColor = "var(--t-bg)", u && (fe.backgroundImage = `url(${u})`, fe.backgroundSize = "cover", fe.backgroundPosition = "center");
2647
- const Pe = {};
2648
- m && le(m) && (Pe.border = `1px solid ${m}`), i && (Pe.borderRadius = i);
2649
- const lt = g.step === "checkout" ? /* @__PURE__ */ e(Cn, { autoRedirect: Z }) : g.step === "processing" ? /* @__PURE__ */ e(bn, {}) : g.step === "complete" ? /* @__PURE__ */ e(Nn, { explorerUrl: Q, doneButtonText: q, onDone: ie }) : g.step === "error" ? /* @__PURE__ */ e(En, { supportEmail: ee }) : g.step === "confirm" ? /* @__PURE__ */ e(wn, {}) : null;
2650
- if (lt)
2687
+ }, z = {};
2688
+ u && se(u) && (z["--t-surface"] = u, z["--t-modal-bg"] = u), p && se(p) && (z["--t-pill-bg"] = p, z["--t-close-bg"] = p), h && se(h) && (z["--t-text"] = h), d && se(d) && (z["--t-text-secondary"] = d), f && se(f) && (z["--t-text-muted"] = f, z["--t-text-tertiary"] = f), x && se(x) && (z["--t-success"] = x);
2689
+ const ge = {};
2690
+ l && se(l) ? ge.backgroundColor = l : ge.backgroundColor = "var(--t-bg)", c && (ge.backgroundImage = `url(${c})`, ge.backgroundSize = "cover", ge.backgroundPosition = "center");
2691
+ const Ke = {};
2692
+ m && se(m) && (Ke.border = `1px solid ${m}`), s && (Ke.borderRadius = s);
2693
+ const ut = y.step === "checkout" ? /* @__PURE__ */ e(Rn, { autoRedirect: U }) : y.step === "processing" ? /* @__PURE__ */ e(kn, {}) : y.step === "complete" ? /* @__PURE__ */ e(Ln, { explorerUrl: D, doneButtonText: G, onDone: ve }) : y.step === "error" ? /* @__PURE__ */ e(In, { supportEmail: V }) : y.step === "confirm" ? /* @__PURE__ */ e(Mn, { stablecoinParity: Ue, partnerName: J }) : null;
2694
+ if (ut)
2651
2695
  return /* @__PURE__ */ e(
2652
2696
  "div",
2653
2697
  {
2654
- className: `${rt} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2698
+ className: `${st} relative w-full max-w-[390px] h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2655
2699
  style: {
2656
2700
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
2657
- ...fe,
2658
- ...ot,
2659
- ...J,
2660
- ...Pe
2701
+ ...ge,
2702
+ ...dt,
2703
+ ...z,
2704
+ ...Ke
2661
2705
  },
2662
- children: lt
2706
+ children: ut
2663
2707
  }
2664
2708
  );
2665
- const oe = g.network, Ee = oe ? Fe(oe) : null, it = (Ee == null ? void 0 : Ee.shortName) || (Ee == null ? void 0 : Ee.name) || oe;
2666
- return /* @__PURE__ */ o(
2709
+ const ce = y.network, Se = ce ? Xe(ce) : null, mt = (Se == null ? void 0 : Se.shortName) || (Se == null ? void 0 : Se.name) || ce;
2710
+ return /* @__PURE__ */ r(
2667
2711
  "div",
2668
2712
  {
2669
- className: `${rt} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2713
+ className: `${st} relative w-full max-w-[390px] min-h-[640px] overflow-hidden flex flex-col select-none transition-colors duration-300 ${t}`,
2670
2714
  style: {
2671
2715
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
2672
- ...fe,
2673
- ...ot,
2674
- ...J,
2675
- ...Pe
2716
+ ...ge,
2717
+ ...dt,
2718
+ ...z,
2719
+ ...Ke
2676
2720
  },
2677
2721
  children: [
2678
- b && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${A ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(hn, { onClick: () => G("settings") }) }),
2679
- A ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
2680
- /* @__PURE__ */ o("div", { className: "flex", style: { width: 165 }, children: [
2722
+ v && /* @__PURE__ */ e("div", { className: `flex justify-end items-center px-5 pt-3 ${E ? "pb-1" : "pb-5"}`, children: /* @__PURE__ */ e(bn, { onClick: () => Y("settings") }) }),
2723
+ E ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center pt-3 pb-5", children: [
2724
+ /* @__PURE__ */ r("div", { className: "flex", style: { width: 165 }, children: [
2681
2725
  /* @__PURE__ */ e(
2682
2726
  "button",
2683
2727
  {
2684
- onClick: () => at("buy"),
2728
+ onClick: () => ct("buy"),
2685
2729
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
2686
- style: { color: $ === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
2730
+ style: { color: Ae === "buy" ? "var(--t-text)" : "var(--t-text-secondary)" },
2687
2731
  children: "Buy"
2688
2732
  }
2689
2733
  ),
2690
2734
  /* @__PURE__ */ e(
2691
2735
  "button",
2692
2736
  {
2693
- onClick: () => at("sell"),
2737
+ onClick: () => ct("sell"),
2694
2738
  className: "flex-1 pb-2.5 text-[16px] font-medium text-center transition-colors duration-200",
2695
- style: { color: $ === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
2739
+ style: { color: Ae === "sell" ? "var(--t-text)" : "var(--t-text-secondary)" },
2696
2740
  children: "Sell"
2697
2741
  }
2698
2742
  )
2699
2743
  ] }),
2700
- /* @__PURE__ */ o("div", { className: "relative", style: { width: 165, height: 1 }, children: [
2744
+ /* @__PURE__ */ r("div", { className: "relative", style: { width: 165, height: 1 }, children: [
2701
2745
  /* @__PURE__ */ e("div", { className: "absolute inset-0", style: { background: "var(--t-divider)" } }),
2702
2746
  /* @__PURE__ */ e(
2703
2747
  "div",
@@ -2705,46 +2749,46 @@ function Hn({
2705
2749
  className: "absolute top-0 h-full transition-all duration-300 ease-in-out",
2706
2750
  style: {
2707
2751
  width: "50%",
2708
- left: $ === "buy" ? "0%" : "50%",
2752
+ left: Ae === "buy" ? "0%" : "50%",
2709
2753
  background: "var(--t-accent)"
2710
2754
  }
2711
2755
  }
2712
2756
  )
2713
2757
  ] })
2714
2758
  ] }) : null,
2715
- ke || $e || c ? /* @__PURE__ */ e(Rn, {}) : /* @__PURE__ */ o("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
2716
- /* @__PURE__ */ o(
2759
+ Me || T || O ? /* @__PURE__ */ e(Hn, {}) : /* @__PURE__ */ r("div", { className: "flex-1 overflow-hidden px-5 flex flex-col tab-fade-in", children: [
2760
+ /* @__PURE__ */ r(
2717
2761
  "div",
2718
2762
  {
2719
2763
  className: "px-[18px] pt-[14px] pb-[18px]",
2720
2764
  style: {
2721
2765
  background: "var(--t-surface)",
2722
2766
  borderRadius: 5,
2723
- border: Y && nt ? "1px solid #EF4444" : "1px solid transparent",
2767
+ border: ye && it ? "1px solid #EF4444" : "1px solid transparent",
2724
2768
  minHeight: 102
2725
2769
  },
2726
2770
  children: [
2727
2771
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You spend" }),
2728
- /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
2772
+ /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
2729
2773
  /* @__PURE__ */ e(
2730
2774
  "input",
2731
2775
  {
2732
- ref: F,
2776
+ ref: Q,
2733
2777
  type: "text",
2734
- value: je,
2735
- onChange: Pt,
2736
- onBlur: () => Be(!0),
2737
- placeholder: P ? "250" : "0.01",
2778
+ value: Ye,
2779
+ onChange: Xt,
2780
+ onBlur: () => ke(!0),
2781
+ placeholder: F ? "250" : "0.01",
2738
2782
  className: "bg-transparent outline-none w-0 flex-1 mr-3",
2739
2783
  style: { color: "var(--t-text)", fontSize: 24, fontWeight: 600, lineHeight: "32px", padding: 0, border: "none", borderRadius: 0, backgroundColor: "transparent", height: "auto", width: 0 },
2740
2784
  inputMode: "decimal",
2741
- disabled: !!((ct = k == null ? void 0 : k.sourceAmount) != null && ct.locked)
2785
+ disabled: !!((pt = k == null ? void 0 : k.sourceAmount) != null && pt.locked)
2742
2786
  }
2743
2787
  ),
2744
- P ? /* @__PURE__ */ o(
2788
+ F ? /* @__PURE__ */ r(
2745
2789
  "button",
2746
2790
  {
2747
- onClick: () => G("fiat"),
2791
+ onClick: () => Y("fiat"),
2748
2792
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
2749
2793
  style: {
2750
2794
  background: "var(--t-pill-bg)",
@@ -2753,18 +2797,18 @@ function Hn({
2753
2797
  paddingLeft: 10,
2754
2798
  paddingRight: 10
2755
2799
  },
2756
- disabled: !!((dt = k == null ? void 0 : k.sourceCurrency) != null && dt.locked),
2800
+ disabled: !!((ft = k == null ? void 0 : k.sourceCurrency) != null && ft.locked),
2757
2801
  children: [
2758
- /* @__PURE__ */ e(Je, { currencyCode: re, size: 16, baseUrl: W }),
2759
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: re }),
2760
- /* @__PURE__ */ e(Ie, {})
2802
+ /* @__PURE__ */ e(nt, { currencyCode: le, size: 16, baseUrl: P }),
2803
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: le }),
2804
+ /* @__PURE__ */ e(Oe, {})
2761
2805
  ]
2762
2806
  }
2763
- ) : /* @__PURE__ */ o("div", { className: "flex flex-col items-end shrink-0", children: [
2764
- /* @__PURE__ */ o(
2807
+ ) : /* @__PURE__ */ r("div", { className: "flex flex-col items-end shrink-0", children: [
2808
+ /* @__PURE__ */ r(
2765
2809
  "button",
2766
2810
  {
2767
- onClick: () => G("crypto"),
2811
+ onClick: () => Y("crypto"),
2768
2812
  className: "flex items-center gap-1.5 transition-colors",
2769
2813
  style: {
2770
2814
  background: "var(--t-pill-bg)",
@@ -2773,35 +2817,35 @@ function Hn({
2773
2817
  paddingLeft: 10,
2774
2818
  paddingRight: 10
2775
2819
  },
2776
- disabled: !!((ut = k == null ? void 0 : k.destinationCurrency) != null && ut.locked),
2820
+ disabled: !!((yt = k == null ? void 0 : k.destinationCurrency) != null && yt.locked),
2777
2821
  children: [
2778
- /* @__PURE__ */ e(Et, { ticker: z, size: 16, baseUrl: W }),
2779
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: z }),
2780
- /* @__PURE__ */ e(Ie, {})
2822
+ /* @__PURE__ */ e(Tt, { ticker: j, size: 16, baseUrl: P }),
2823
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: j }),
2824
+ /* @__PURE__ */ e(Oe, {})
2781
2825
  ]
2782
2826
  }
2783
2827
  ),
2784
- oe && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
2828
+ ce && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
2785
2829
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
2786
2830
  "img",
2787
2831
  {
2788
- src: ze(oe, W),
2789
- alt: oe,
2832
+ src: tt(ce, P),
2833
+ alt: ce,
2790
2834
  width: 14,
2791
2835
  height: 14,
2792
2836
  className: "rounded-full",
2793
2837
  style: { width: 14, height: 14 }
2794
2838
  }
2795
2839
  ) }),
2796
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: it })
2840
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: mt })
2797
2841
  ] })
2798
2842
  ] })
2799
2843
  ] })
2800
2844
  ]
2801
2845
  }
2802
2846
  ),
2803
- Y && nt && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: ue || (et ? "Amount should be more than 0" : P ? `Minimum amount is ${bt} ${re}` : `Minimum amount is ${Nt} ${z}`) }),
2804
- /* @__PURE__ */ o(
2847
+ ye && it && /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5 px-[2px]", style: { color: "#EF4444" }, children: pe || (ot ? "Amount should be more than 0" : F ? `Minimum amount is ${St} ${le}` : `Minimum amount is ${Rt} ${j}`) }),
2848
+ /* @__PURE__ */ r(
2805
2849
  "div",
2806
2850
  {
2807
2851
  className: "px-[18px] pt-[12px] pb-[14px]",
@@ -2816,21 +2860,21 @@ function Hn({
2816
2860
  },
2817
2861
  children: [
2818
2862
  /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
2819
- /* @__PURE__ */ o("div", { className: "flex items-start justify-between", children: [
2820
- O && !w ? /* @__PURE__ */ e(B, { w: 180, h: 32 }) : /* @__PURE__ */ e(
2821
- Sn,
2863
+ /* @__PURE__ */ r("div", { className: "flex items-start justify-between", children: [
2864
+ he && !L ? /* @__PURE__ */ e(M, { w: 180, h: 32 }) : /* @__PURE__ */ e(
2865
+ On,
2822
2866
  {
2823
- value: pe > 0 ? Bt : "0",
2867
+ value: ne > 0 ? Kt : "0",
2824
2868
  height: 32,
2825
2869
  className: "font-semibold",
2826
- style: { color: pe > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
2870
+ style: { color: ne > 0 ? "var(--t-text)" : "var(--t-text-muted)", fontSize: 24 }
2827
2871
  }
2828
2872
  ),
2829
- P ? /* @__PURE__ */ o("div", { className: "flex flex-col items-end shrink-0", children: [
2830
- /* @__PURE__ */ o(
2873
+ F ? /* @__PURE__ */ r("div", { className: "flex flex-col items-end shrink-0", children: [
2874
+ /* @__PURE__ */ r(
2831
2875
  "button",
2832
2876
  {
2833
- onClick: () => G("crypto"),
2877
+ onClick: () => Y("crypto"),
2834
2878
  className: "flex items-center gap-1.5 transition-colors",
2835
2879
  style: {
2836
2880
  background: "var(--t-pill-bg)",
@@ -2839,32 +2883,32 @@ function Hn({
2839
2883
  paddingLeft: 10,
2840
2884
  paddingRight: 10
2841
2885
  },
2842
- disabled: !!((mt = k == null ? void 0 : k.destinationCurrency) != null && mt.locked),
2886
+ disabled: !!((xt = k == null ? void 0 : k.destinationCurrency) != null && xt.locked),
2843
2887
  children: [
2844
- /* @__PURE__ */ e(Et, { ticker: z, size: 16, baseUrl: W }),
2845
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: z }),
2846
- /* @__PURE__ */ e(Ie, {})
2888
+ /* @__PURE__ */ e(Tt, { ticker: j, size: 16, baseUrl: P }),
2889
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: j }),
2890
+ /* @__PURE__ */ e(Oe, {})
2847
2891
  ]
2848
2892
  }
2849
2893
  ),
2850
- oe && /* @__PURE__ */ o("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
2894
+ ce && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 mt-1.5 mr-0.5", children: [
2851
2895
  /* @__PURE__ */ e("div", { className: "rounded-full", style: { width: 14, height: 14, background: "#ffffff" }, children: /* @__PURE__ */ e(
2852
2896
  "img",
2853
2897
  {
2854
- src: ze(oe, W),
2855
- alt: oe,
2898
+ src: tt(ce, P),
2899
+ alt: ce,
2856
2900
  width: 14,
2857
2901
  height: 14,
2858
2902
  className: "rounded-full",
2859
2903
  style: { width: 14, height: 14 }
2860
2904
  }
2861
2905
  ) }),
2862
- /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: it })
2906
+ /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: "var(--t-text-muted)" }, children: mt })
2863
2907
  ] })
2864
- ] }) : /* @__PURE__ */ o(
2908
+ ] }) : /* @__PURE__ */ r(
2865
2909
  "button",
2866
2910
  {
2867
- onClick: () => G("fiat"),
2911
+ onClick: () => Y("fiat"),
2868
2912
  className: "flex items-center gap-1.5 shrink-0 transition-colors",
2869
2913
  style: {
2870
2914
  background: "var(--t-pill-bg)",
@@ -2873,11 +2917,11 @@ function Hn({
2873
2917
  paddingLeft: 10,
2874
2918
  paddingRight: 10
2875
2919
  },
2876
- disabled: !!((ht = k == null ? void 0 : k.sourceCurrency) != null && ht.locked),
2920
+ disabled: !!((gt = k == null ? void 0 : k.sourceCurrency) != null && gt.locked),
2877
2921
  children: [
2878
- /* @__PURE__ */ e(Je, { currencyCode: re, size: 16, baseUrl: W }),
2879
- /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: re }),
2880
- /* @__PURE__ */ e(Ie, {})
2922
+ /* @__PURE__ */ e(nt, { currencyCode: le, size: 16, baseUrl: P }),
2923
+ /* @__PURE__ */ e("span", { className: "text-[13px] font-medium", style: { color: "var(--t-text)" }, children: le }),
2924
+ /* @__PURE__ */ e(Oe, {})
2881
2925
  ]
2882
2926
  }
2883
2927
  )
@@ -2885,41 +2929,65 @@ function Hn({
2885
2929
  ]
2886
2930
  }
2887
2931
  ),
2932
+ Ue && ne > 0 && (C == null ? void 0 : C.bestQuote) && /* @__PURE__ */ r(
2933
+ "div",
2934
+ {
2935
+ className: "flex items-start gap-2 mt-[2px] px-[14px] py-[10px]",
2936
+ style: { background: "var(--t-surface)", fontSize: 12, color: "var(--t-text-secondary)", lineHeight: "16px" },
2937
+ children: [
2938
+ /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", style: { flexShrink: 0, marginTop: 1 }, children: [
2939
+ /* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "7", stroke: "currentColor", strokeWidth: "1.5" }),
2940
+ /* @__PURE__ */ e("path", { d: "M8 7v4M8 5.5v-.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
2941
+ ] }),
2942
+ /* @__PURE__ */ r("span", { children: [
2943
+ "You will be charged for ",
2944
+ rt,
2945
+ " ",
2946
+ j,
2947
+ ", the rest up to ",
2948
+ Ze,
2949
+ " will be credited to your ",
2950
+ J,
2951
+ " account"
2952
+ ] })
2953
+ ]
2954
+ }
2955
+ ),
2888
2956
  /* @__PURE__ */ e(
2889
2957
  "div",
2890
2958
  {
2891
2959
  className: "flex items-center justify-between mt-[2px] px-[18px] pt-[12px] pb-[14px]",
2892
2960
  style: {
2893
2961
  background: "var(--t-surface)",
2894
- ...(pt = S == null ? void 0 : S.paymentMethods) != null && pt.length ? {} : { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 }
2962
+ ...(Ct = w == null ? void 0 : w.paymentMethods) != null && Ct.length ? {} : { borderBottomLeftRadius: 5, borderBottomRightRadius: 5 }
2895
2963
  },
2896
- children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: y ? "var(--t-success)" : "var(--t-text-secondary)" }, children: Ht || " " })
2964
+ children: /* @__PURE__ */ e("span", { className: "text-[12px]", style: { color: x ? "var(--t-success)" : "var(--t-text-secondary)" }, children: _t || " " })
2897
2965
  }
2898
2966
  ),
2899
- (S == null ? void 0 : S.paymentMethods) && S.paymentMethods.length > 0 && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: /* @__PURE__ */ e(
2900
- gn,
2967
+ (w == null ? void 0 : w.paymentMethods) && w.paymentMethods.length > 0 && /* @__PURE__ */ e("div", { className: "mt-[2px]", children: /* @__PURE__ */ e(
2968
+ Sn,
2901
2969
  {
2902
- methods: S.paymentMethods,
2903
- selectedId: g.paymentMethodId,
2904
- onOpenModal: () => G("payment"),
2905
- fiatCurrency: g.fiatCurrency
2970
+ methods: w.paymentMethods,
2971
+ selectedId: y.paymentMethodId,
2972
+ onOpenModal: () => Y("payment"),
2973
+ fiatCurrency: y.fiatCurrency
2906
2974
  }
2907
2975
  ) }),
2908
- /* @__PURE__ */ o("div", { className: "mt-8", children: [
2909
- /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: P ? "Receiving wallet address" : "Sending wallet address" }),
2976
+ /* @__PURE__ */ r("div", { className: "mt-8", children: [
2977
+ /* @__PURE__ */ e("div", { className: "text-[13px] mb-2.5", style: { color: "var(--t-text-secondary)" }, children: F ? "Receiving wallet address" : "Sending wallet address" }),
2910
2978
  /* @__PURE__ */ e(
2911
2979
  "input",
2912
2980
  {
2913
2981
  type: "text",
2914
- value: g.walletAddress,
2915
- onChange: (x) => L({ type: "SET_WALLET_ADDRESS", address: x.target.value }),
2916
- onBlur: () => Te(!0),
2917
- placeholder: P ? "Enter your receiving address" : "Enter your sending address",
2982
+ value: y.walletAddress,
2983
+ onChange: (g) => i({ type: "SET_WALLET_ADDRESS", address: g.target.value }),
2984
+ onBlur: () => Ee(!0),
2985
+ placeholder: F ? "Enter your receiving address" : "Enter your sending address",
2918
2986
  spellCheck: !1,
2919
2987
  autoComplete: "off",
2920
2988
  className: "w-full bg-transparent text-[13px] outline-none transition-colors",
2921
2989
  style: {
2922
- border: g.walletError || Ce && !We ? "1px solid #EF4444" : "1px solid var(--t-border)",
2990
+ border: y.walletError || Le && !Qe ? "1px solid #EF4444" : "1px solid var(--t-border)",
2923
2991
  borderRadius: 3.5,
2924
2992
  height: 47,
2925
2993
  padding: "0 14px",
@@ -2927,219 +2995,223 @@ function Hn({
2927
2995
  fontSize: 13,
2928
2996
  backgroundColor: "transparent"
2929
2997
  },
2930
- disabled: !!((ft = k == null ? void 0 : k.destinationAddress) != null && ft.locked)
2998
+ disabled: !!((vt = k == null ? void 0 : k.destinationAddress) != null && vt.locked)
2931
2999
  }
2932
3000
  ),
2933
- g.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: g.walletError }) : Ce && !We && !ve ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : ve && g.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
3001
+ y.walletError ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: y.walletError }) : Le && !Qe && !Ie ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "#EF4444" }, children: "Enter a valid wallet address" }) : Ie && y.walletAddress.trim().length >= 10 ? /* @__PURE__ */ e("div", { className: "text-[12px] mt-1.5", style: { color: "var(--t-text-muted)" }, children: "Validating address..." }) : null
2934
3002
  ] }),
2935
3003
  /* @__PURE__ */ e("div", { className: "flex-1" }),
2936
3004
  /* @__PURE__ */ e(
2937
3005
  "button",
2938
3006
  {
2939
- disabled: !Oe || X || w,
2940
- onClick: Kt,
3007
+ disabled: !Fe || ee || L,
3008
+ onClick: Gt,
2941
3009
  className: "w-full font-semibold text-[16px] transition-all",
2942
3010
  style: {
2943
3011
  height: 60,
2944
3012
  borderRadius: 5,
2945
3013
  background: "var(--t-cta-bg)",
2946
3014
  color: "var(--t-cta-text)",
2947
- opacity: Oe && !X && !w ? 1 : 0.4,
2948
- cursor: Oe && !X && !w ? "pointer" : "not-allowed"
3015
+ opacity: Fe && !ee && !L ? 1 : 0.4,
3016
+ cursor: Fe && !ee && !L ? "pointer" : "not-allowed"
2949
3017
  },
2950
- children: w ? "Getting best price..." : X ? "Processing..." : P ? `Buy ${z}` : `Sell ${z}`
3018
+ children: L ? "Getting best price..." : ee ? "Processing..." : F ? `Buy ${j}` : `Sell ${j}`
2951
3019
  }
2952
3020
  ),
2953
3021
  /* @__PURE__ */ e("div", { className: "text-center py-3", children: /* @__PURE__ */ e("span", { className: "text-[11px]", style: { color: "var(--t-text-tertiary)" }, children: "Powered by NowRamp" }) })
2954
- ] }, $),
2955
- /* @__PURE__ */ e(Ue, { isOpen: me === "fiat", onClose: () => G(null), children: (x) => {
2956
- var E;
3022
+ ] }, Ae),
3023
+ /* @__PURE__ */ e(Ve, { isOpen: $ === "fiat", onClose: () => Y(null), children: (g) => {
3024
+ var A;
2957
3025
  return /* @__PURE__ */ e(
2958
- Tn,
3026
+ Dn,
2959
3027
  {
2960
- onClose: x,
3028
+ onClose: g,
2961
3029
  onSelect: (R) => {
2962
- Dt(R), x();
3030
+ $t(R), g();
2963
3031
  },
2964
- currencies: (E = S == null ? void 0 : S.fiats) == null ? void 0 : E.map((R) => ({ code: R.code, name: R.code })),
2965
- assetBaseUrl: W,
2966
- selectedCode: g.fiatCurrency
3032
+ currencies: (A = w == null ? void 0 : w.fiats) == null ? void 0 : A.map((R) => ({ code: R.code, name: R.code })),
3033
+ assetBaseUrl: P,
3034
+ selectedCode: y.fiatCurrency
2967
3035
  }
2968
3036
  );
2969
3037
  } }),
2970
- /* @__PURE__ */ e(Ue, { isOpen: me === "crypto", onClose: () => G(null), children: (x) => {
2971
- var E;
3038
+ /* @__PURE__ */ e(Ve, { isOpen: $ === "crypto", onClose: () => Y(null), children: (g) => {
3039
+ var A;
2972
3040
  return /* @__PURE__ */ e(
2973
- kn,
3041
+ Pn,
2974
3042
  {
2975
- onClose: x,
2976
- onSelect: (R, D) => {
2977
- Ut(R, D), x();
3043
+ onClose: g,
3044
+ onSelect: (R, H) => {
3045
+ jt(R, H), g();
2978
3046
  },
2979
- cryptos: (E = S == null ? void 0 : S.cryptos) == null ? void 0 : E.map((R) => {
2980
- var D;
3047
+ cryptos: (A = w == null ? void 0 : w.cryptos) == null ? void 0 : A.map((R) => {
3048
+ var H;
2981
3049
  return {
2982
3050
  code: R.code,
2983
3051
  name: R.code,
2984
- networks: (D = R.networks) == null ? void 0 : D.map((ce) => ({ code: ce.id, name: ce.name }))
3052
+ networks: (H = R.networks) == null ? void 0 : H.map((ue) => ({ code: ue.id, name: ue.name }))
2985
3053
  };
2986
3054
  }),
2987
- assetBaseUrl: W,
2988
- selectedCode: g.cryptoCurrency,
2989
- selectedChain: g.network
3055
+ assetBaseUrl: P,
3056
+ selectedCode: y.cryptoCurrency,
3057
+ selectedChain: y.network
2990
3058
  }
2991
3059
  );
2992
3060
  } }),
2993
- /* @__PURE__ */ e(Ue, { isOpen: me === "payment", onClose: () => G(null), children: (x) => {
2994
- var E;
3061
+ /* @__PURE__ */ e(Ve, { isOpen: $ === "payment", onClose: () => Y(null), children: (g) => {
3062
+ var A;
2995
3063
  return /* @__PURE__ */ e(
2996
- Ln,
3064
+ Un,
2997
3065
  {
2998
- methods: ((E = S == null ? void 0 : S.paymentMethods) == null ? void 0 : E.filter((R) => R.supportedFiats.includes(g.fiatCurrency))) || [],
2999
- selectedId: g.paymentMethodId,
3066
+ methods: ((A = w == null ? void 0 : w.paymentMethods) == null ? void 0 : A.filter((R) => R.supportedFiats.includes(y.fiatCurrency))) || [],
3067
+ selectedId: y.paymentMethodId,
3000
3068
  onSelect: (R) => {
3001
- Ft(R), x();
3069
+ Wt(R), g();
3002
3070
  },
3003
- onClose: x
3071
+ onClose: g
3004
3072
  }
3005
3073
  );
3006
3074
  } }),
3007
- /* @__PURE__ */ e(Ue, { isOpen: me === "settings", onClose: () => G(null), children: (x) => /* @__PURE__ */ e(
3008
- Bn,
3075
+ /* @__PURE__ */ e(Ve, { isOpen: $ === "settings", onClose: () => Y(null), children: (g) => /* @__PURE__ */ e(
3076
+ _n,
3009
3077
  {
3010
- onClose: x,
3011
- darkMode: ne,
3012
- onToggleDarkMode: ae,
3013
- skinId: ge,
3014
- onSelectSkin: (E) => {
3015
- Re(E);
3078
+ onClose: g,
3079
+ darkMode: oe,
3080
+ onToggleDarkMode: de,
3081
+ skinId: fe,
3082
+ onSelectSkin: (A) => {
3083
+ We(A);
3016
3084
  },
3017
- showThemeToggle: T
3085
+ showThemeToggle: S
3018
3086
  }
3019
3087
  ) })
3020
3088
  ]
3021
3089
  }
3022
3090
  );
3023
3091
  }
3024
- function On({
3092
+ function Xn({
3025
3093
  projectId: t,
3026
3094
  apiUrl: n,
3027
3095
  assetBaseUrl: a,
3028
- flowType: r,
3096
+ flowType: o,
3029
3097
  customerId: l,
3030
- brandId: u,
3098
+ brandId: c,
3031
3099
  defaultFiatCurrency: m,
3032
- defaultCryptoCurrency: i,
3033
- defaultNetwork: s,
3100
+ defaultCryptoCurrency: s,
3101
+ defaultNetwork: u,
3034
3102
  defaultFiatAmount: p,
3035
3103
  defaultCryptoAmount: h,
3036
3104
  defaultWalletAddress: d,
3037
3105
  defaultGateway: f,
3038
- fieldLocks: y,
3039
- statusPollInterval: A,
3040
- onComplete: b,
3041
- onError: T,
3042
- className: Z,
3043
- theme: Q,
3044
- skinId: q,
3045
- accentColor: ee,
3046
- bgColor: ie,
3047
- bgImage: g,
3048
- borderColor: L,
3049
- borderRadius: S,
3050
- surfaceColor: c,
3051
- inputBgColor: N,
3106
+ fieldLocks: x,
3107
+ statusPollInterval: E,
3108
+ onComplete: v,
3109
+ onError: S,
3110
+ className: U,
3111
+ theme: D,
3112
+ skinId: G,
3113
+ accentColor: V,
3114
+ bgColor: X,
3115
+ bgImage: J,
3116
+ borderColor: ve,
3117
+ borderRadius: y,
3118
+ surfaceColor: i,
3119
+ inputBgColor: w,
3052
3120
  textColor: O,
3053
- textSecondaryColor: I,
3054
- textMutedColor: Se,
3055
- successColor: se,
3056
- showFlowToggle: X,
3057
- showSettings: ue,
3058
- showThemeToggle: k,
3059
- autoRedirect: xe,
3060
- explorerUrl: W,
3061
- doneButtonText: ne,
3062
- supportEmail: ae,
3063
- onDone: ge
3121
+ textSecondaryColor: C,
3122
+ textMutedColor: he,
3123
+ successColor: re,
3124
+ showFlowToggle: q,
3125
+ showSettings: be,
3126
+ showThemeToggle: ee,
3127
+ autoRedirect: pe,
3128
+ explorerUrl: k,
3129
+ doneButtonText: Ne,
3130
+ supportEmail: P,
3131
+ stablecoinParity: oe,
3132
+ partnerName: de,
3133
+ onDone: fe
3064
3134
  }) {
3065
3135
  return /* @__PURE__ */ e(
3066
- zt,
3136
+ rn,
3067
3137
  {
3068
3138
  projectId: t,
3069
3139
  apiUrl: n,
3070
3140
  assetBaseUrl: a,
3071
- flowType: r,
3141
+ flowType: o,
3072
3142
  customerId: l,
3073
- brandId: u,
3143
+ brandId: c,
3074
3144
  defaultFiatCurrency: m,
3075
- defaultCryptoCurrency: i,
3076
- defaultNetwork: s,
3145
+ defaultCryptoCurrency: s,
3146
+ defaultNetwork: u,
3077
3147
  defaultFiatAmount: p,
3078
3148
  defaultCryptoAmount: h,
3079
3149
  defaultWalletAddress: d,
3080
3150
  defaultGateway: f,
3081
- fieldLocks: y,
3082
- statusPollInterval: A,
3083
- onComplete: b,
3084
- onError: T,
3151
+ fieldLocks: x,
3152
+ statusPollInterval: E,
3153
+ onComplete: v,
3154
+ onError: S,
3085
3155
  children: /* @__PURE__ */ e(
3086
- Hn,
3156
+ Vn,
3087
3157
  {
3088
- className: Z,
3089
- theme: Q,
3090
- skinId: q,
3091
- accentColor: ee,
3092
- bgColor: ie,
3093
- bgImage: g,
3094
- borderColor: L,
3095
- borderRadius: S,
3096
- surfaceColor: c,
3097
- inputBgColor: N,
3158
+ className: U,
3159
+ theme: D,
3160
+ skinId: G,
3161
+ accentColor: V,
3162
+ bgColor: X,
3163
+ bgImage: J,
3164
+ borderColor: ve,
3165
+ borderRadius: y,
3166
+ surfaceColor: i,
3167
+ inputBgColor: w,
3098
3168
  textColor: O,
3099
- textSecondaryColor: I,
3100
- textMutedColor: Se,
3101
- successColor: se,
3102
- showFlowToggle: X,
3103
- showSettings: ue,
3104
- showThemeToggle: k,
3105
- autoRedirect: xe,
3106
- explorerUrl: W,
3107
- doneButtonText: ne,
3108
- supportEmail: ae,
3109
- onDone: ge
3169
+ textSecondaryColor: C,
3170
+ textMutedColor: he,
3171
+ successColor: re,
3172
+ showFlowToggle: q,
3173
+ showSettings: be,
3174
+ showThemeToggle: ee,
3175
+ autoRedirect: pe,
3176
+ explorerUrl: k,
3177
+ doneButtonText: Ne,
3178
+ supportEmail: P,
3179
+ stablecoinParity: oe,
3180
+ partnerName: de,
3181
+ onDone: fe
3110
3182
  }
3111
3183
  )
3112
3184
  }
3113
3185
  );
3114
3186
  }
3115
- function Gn({
3187
+ function ea({
3116
3188
  submitButtonText: t,
3117
3189
  rateRefreshInterval: n,
3118
3190
  ...a
3119
3191
  }) {
3120
- return /* @__PURE__ */ e(On, { ...a });
3192
+ return /* @__PURE__ */ e(Xn, { ...a });
3121
3193
  }
3122
- function Yn({
3194
+ function ta({
3123
3195
  skin: t,
3124
3196
  active: n,
3125
3197
  onClick: a,
3126
- darkMode: r,
3198
+ darkMode: o,
3127
3199
  dimmed: l
3128
3200
  }) {
3129
- const u = t.accent === null, m = 32;
3130
- return /* @__PURE__ */ o(
3201
+ const c = t.accent === null, m = 32;
3202
+ return /* @__PURE__ */ r(
3131
3203
  "button",
3132
3204
  {
3133
3205
  onClick: a,
3134
3206
  className: "relative shrink-0",
3135
3207
  style: { width: m, height: m, opacity: l ? 0.4 : 1, transition: "opacity 0.2s" },
3136
3208
  children: [
3137
- u ? /* @__PURE__ */ o("svg", { width: m, height: m, viewBox: "0 0 32 32", children: [
3209
+ c ? /* @__PURE__ */ r("svg", { width: m, height: m, viewBox: "0 0 32 32", children: [
3138
3210
  /* @__PURE__ */ e("clipPath", { id: "mono-left", children: /* @__PURE__ */ e("rect", { x: "0", y: "0", width: "16", height: "32" }) }),
3139
3211
  /* @__PURE__ */ e("clipPath", { id: "mono-right", children: /* @__PURE__ */ e("rect", { x: "16", y: "0", width: "16", height: "32" }) }),
3140
3212
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#111111", clipPath: "url(#mono-left)" }),
3141
3213
  /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "#ffffff", clipPath: "url(#mono-right)" }),
3142
- /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "none", stroke: r ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.1)", strokeWidth: "1" })
3214
+ /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: "none", stroke: o ? "rgba(255,255,255,0.15)" : "rgba(0,0,0,0.1)", strokeWidth: "1" })
3143
3215
  ] }) : /* @__PURE__ */ e("svg", { width: m, height: m, viewBox: "0 0 32 32", children: /* @__PURE__ */ e("circle", { cx: "16", cy: "16", r: "15", fill: t.accent }) }),
3144
3216
  n && !l && /* @__PURE__ */ e(
3145
3217
  "div",
@@ -3152,13 +3224,13 @@ function Yn({
3152
3224
  }
3153
3225
  );
3154
3226
  }
3155
- function Pn({ quote: t }) {
3156
- return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ o("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3227
+ function $n({ quote: t }) {
3228
+ return t.isBestRate ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Best price" }) : t.isRecommended ? /* @__PURE__ */ e("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: "Recommended" }) : t.rank && t.rank <= 3 ? /* @__PURE__ */ r("div", { className: "text-[12px]", style: { color: "var(--t-text-secondary)" }, children: [
3157
3229
  "#",
3158
3230
  t.rank
3159
3231
  ] }) : null;
3160
3232
  }
3161
- function Dn({ quote: t }) {
3233
+ function jn({ quote: t }) {
3162
3234
  return t.gatewayLogo ? /* @__PURE__ */ e(
3163
3235
  "img",
3164
3236
  {
@@ -3169,10 +3241,10 @@ function Dn({ quote: t }) {
3169
3241
  className: "rounded-full shrink-0",
3170
3242
  style: { width: 36, height: 36 }
3171
3243
  }
3172
- ) : /* @__PURE__ */ e(qe, { size: 36 });
3244
+ ) : /* @__PURE__ */ e(at, { size: 36 });
3173
3245
  }
3174
- function Un() {
3175
- return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ o(
3246
+ function Wn() {
3247
+ return /* @__PURE__ */ e("div", { className: "space-y-2", children: [0, 1, 2].map((t) => /* @__PURE__ */ r(
3176
3248
  "div",
3177
3249
  {
3178
3250
  className: "w-full flex items-center gap-3.5",
@@ -3184,34 +3256,34 @@ function Un() {
3184
3256
  background: "var(--t-surface)"
3185
3257
  },
3186
3258
  children: [
3187
- /* @__PURE__ */ e(B, { w: 36, h: 36, className: "rounded-full shrink-0" }),
3188
- /* @__PURE__ */ o("div", { className: "flex-1", children: [
3189
- /* @__PURE__ */ e(B, { w: 90, h: 14, className: "mb-1.5" }),
3190
- /* @__PURE__ */ e(B, { w: 60, h: 12 })
3259
+ /* @__PURE__ */ e(M, { w: 36, h: 36, className: "rounded-full shrink-0" }),
3260
+ /* @__PURE__ */ r("div", { className: "flex-1", children: [
3261
+ /* @__PURE__ */ e(M, { w: 90, h: 14, className: "mb-1.5" }),
3262
+ /* @__PURE__ */ e(M, { w: 60, h: 12 })
3191
3263
  ] }),
3192
- /* @__PURE__ */ o("div", { className: "text-right", children: [
3193
- /* @__PURE__ */ e(B, { w: 40, h: 10, className: "mb-1.5" }),
3194
- /* @__PURE__ */ e(B, { w: 80, h: 14 })
3264
+ /* @__PURE__ */ r("div", { className: "text-right", children: [
3265
+ /* @__PURE__ */ e(M, { w: 40, h: 10, className: "mb-1.5" }),
3266
+ /* @__PURE__ */ e(M, { w: 80, h: 14 })
3195
3267
  ] })
3196
3268
  ]
3197
3269
  },
3198
3270
  t
3199
3271
  )) });
3200
3272
  }
3201
- function Zn({
3273
+ function na({
3202
3274
  onClose: t,
3203
3275
  onSelect: n,
3204
3276
  quotes: a,
3205
- quotesLoading: r,
3277
+ quotesLoading: o,
3206
3278
  cryptoCurrency: l
3207
3279
  }) {
3208
- const [u, m] = C(""), i = j(() => {
3280
+ const [c, m] = b(""), s = W(() => {
3209
3281
  if (!(a != null && a.quotes)) return [];
3210
- const s = u.trim().toLowerCase();
3211
- return s ? a.quotes.filter((p) => p.gatewayName.toLowerCase().includes(s)) : a.quotes;
3212
- }, [a, u]);
3213
- return /* @__PURE__ */ o(te, { children: [
3214
- /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(Me, { onClick: t }) }),
3282
+ const u = c.trim().toLowerCase();
3283
+ return u ? a.quotes.filter((p) => p.gatewayName.toLowerCase().includes(u)) : a.quotes;
3284
+ }, [a, c]);
3285
+ return /* @__PURE__ */ r(ae, { children: [
3286
+ /* @__PURE__ */ e("div", { className: "flex justify-end px-5 pt-5", children: /* @__PURE__ */ e(He, { onClick: t }) }),
3215
3287
  /* @__PURE__ */ e(
3216
3288
  "h2",
3217
3289
  {
@@ -3220,14 +3292,14 @@ function Zn({
3220
3292
  children: "Choose Ramp"
3221
3293
  }
3222
3294
  ),
3223
- /* @__PURE__ */ e(_e, { value: u, onChange: m }),
3224
- /* @__PURE__ */ o("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3225
- r ? /* @__PURE__ */ e(Un, {}) : i.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: a && a.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : i.map((s, p) => {
3226
- const h = p === 0, d = parseFloat(s.cryptoAmount), f = d >= 1 ? d.toFixed(4) : d.toPrecision(6);
3227
- return /* @__PURE__ */ o(
3295
+ /* @__PURE__ */ e(je, { value: c, onChange: m }),
3296
+ /* @__PURE__ */ r("div", { className: "flex-1 overflow-y-auto custom-scroll px-5 space-y-2", children: [
3297
+ o ? /* @__PURE__ */ e(Wn, {}) : s.length === 0 ? /* @__PURE__ */ e("div", { className: "text-center py-10 text-[14px]", style: { color: "var(--t-text-muted)" }, children: a && a.quotes.length === 0 ? "No quotes available for this request" : "No providers found" }) : s.map((u, p) => {
3298
+ const h = p === 0, d = parseFloat(u.cryptoAmount), f = d >= 1 ? d.toFixed(4) : d.toPrecision(6);
3299
+ return /* @__PURE__ */ r(
3228
3300
  "button",
3229
3301
  {
3230
- onClick: () => n(s),
3302
+ onClick: () => n(u),
3231
3303
  className: "w-full flex items-center gap-3.5 transition-colors",
3232
3304
  style: {
3233
3305
  borderRadius: h ? 4.5 : 5,
@@ -3238,14 +3310,14 @@ function Zn({
3238
3310
  background: h ? "transparent" : "var(--t-surface)"
3239
3311
  },
3240
3312
  children: [
3241
- /* @__PURE__ */ e(Dn, { quote: s }),
3242
- /* @__PURE__ */ o("div", { className: "text-left flex-1 min-w-0", children: [
3243
- /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: s.gatewayName }),
3244
- /* @__PURE__ */ e(Pn, { quote: s })
3313
+ /* @__PURE__ */ e(jn, { quote: u }),
3314
+ /* @__PURE__ */ r("div", { className: "text-left flex-1 min-w-0", children: [
3315
+ /* @__PURE__ */ e("div", { className: "font-medium text-[15px]", style: { color: "var(--t-text)" }, children: u.gatewayName }),
3316
+ /* @__PURE__ */ e($n, { quote: u })
3245
3317
  ] }),
3246
- /* @__PURE__ */ o("div", { className: "text-right shrink-0", children: [
3318
+ /* @__PURE__ */ r("div", { className: "text-right shrink-0", children: [
3247
3319
  /* @__PURE__ */ e("div", { className: "text-[11px]", style: { color: "var(--t-text-secondary)" }, children: "You get" }),
3248
- /* @__PURE__ */ o("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
3320
+ /* @__PURE__ */ r("div", { className: "font-medium text-[14px]", style: { color: "var(--t-text)" }, children: [
3249
3321
  l,
3250
3322
  " ",
3251
3323
  f
@@ -3253,79 +3325,80 @@ function Zn({
3253
3325
  ] })
3254
3326
  ]
3255
3327
  },
3256
- s.gatewayId
3328
+ u.gatewayId
3257
3329
  );
3258
3330
  }),
3259
- !r && (a == null ? void 0 : a.unavailableGateways) && a.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: a.unavailableGateways.map((s) => /* @__PURE__ */ o(
3331
+ !o && (a == null ? void 0 : a.unavailableGateways) && a.unavailableGateways.length > 0 && /* @__PURE__ */ e("div", { className: "pt-3", children: a.unavailableGateways.map((u) => /* @__PURE__ */ r(
3260
3332
  "div",
3261
3333
  {
3262
3334
  className: "flex items-center justify-between py-2 text-[12px]",
3263
3335
  style: { color: "var(--t-text-muted)" },
3264
3336
  children: [
3265
- /* @__PURE__ */ e("span", { children: s.gatewayName }),
3266
- /* @__PURE__ */ e("span", { children: s.reason })
3337
+ /* @__PURE__ */ e("span", { children: u.gatewayName }),
3338
+ /* @__PURE__ */ e("span", { children: u.reason })
3267
3339
  ]
3268
3340
  },
3269
- s.gatewayId
3341
+ u.gatewayId
3270
3342
  )) })
3271
3343
  ] })
3272
3344
  ] });
3273
3345
  }
3274
3346
  export {
3275
- An as AnimatedDigit,
3276
- Sn as AnimatedNumber,
3277
- on as ApplePayIcon,
3278
- Le as BLOCKCHAINS,
3279
- an as BankIcon,
3280
- nn as CRYPTO_CHAIN_COMBOS,
3281
- Tt as CRYPTO_CURRENCIES,
3282
- un as CardIcon,
3283
- Gn as CheckoutForm,
3284
- Cn as CheckoutStep,
3285
- Ie as ChevronDown,
3286
- mn as ChevronRight,
3287
- Zn as ChooseRampModal,
3288
- Me as CloseButton,
3289
- Wn as CoinifyIcon,
3290
- Nn as CompleteStep,
3291
- wn as ConfirmStep,
3292
- kn as CryptoCurrencyModal,
3293
- Et as CryptoIcon,
3294
- pn as DarkModeIcon,
3295
- En as ErrorStep,
3296
- gt as FIAT_CURRENCIES,
3297
- qt as FIAT_TO_COUNTRY,
3298
- Tn as FiatCurrencyModal,
3299
- Je as FiatFlag,
3300
- Rn as FormSkeleton,
3301
- qe as GenericCoinIcon,
3302
- ln as GooglePayIcon,
3303
- vt as MOCK_RATES,
3304
- hn as MenuIcon,
3305
- Ue as Modal,
3306
- sn as PayPalIcon,
3307
- gn as PaymentMethodSelector,
3308
- bn as ProcessingStep,
3309
- On as RampForm,
3310
- zt as RampProvider,
3311
- rn as RevolutIcon,
3312
- Ct as SKINS,
3313
- _e as SearchInput,
3314
- Bn as SettingsScreen,
3315
- B as Skeleton,
3316
- Yn as SkinSwatch,
3317
- In as ToggleSwitch,
3318
- jn as formatOutput,
3319
- ze as getChainIconUrl,
3320
- kt as getCryptoIconUrl,
3321
- en as getFiatFlagUrl,
3322
- $n as getMockRate,
3323
- fn as getPaymentIcon,
3324
- tn as parseAmount,
3325
- Yt as useCheckoutIntent,
3326
- Gt as useQuotes,
3327
- Ae as useRamp,
3328
- Wt as useRampConfig,
3329
- Zt as useTransaction
3347
+ Bn as AnimatedDigit,
3348
+ On as AnimatedNumber,
3349
+ pn as ApplePayIcon,
3350
+ Be as BLOCKCHAINS,
3351
+ mn as BankIcon,
3352
+ un as CRYPTO_CHAIN_COMBOS,
3353
+ Bt as CRYPTO_CURRENCIES,
3354
+ Cn as CardIcon,
3355
+ ea as CheckoutForm,
3356
+ Rn as CheckoutStep,
3357
+ Oe as ChevronDown,
3358
+ vn as ChevronRight,
3359
+ na as ChooseRampModal,
3360
+ He as CloseButton,
3361
+ qn as CoinifyIcon,
3362
+ Ln as CompleteStep,
3363
+ Mn as ConfirmStep,
3364
+ Pn as CryptoCurrencyModal,
3365
+ Tt as CryptoIcon,
3366
+ Nn as DarkModeIcon,
3367
+ In as ErrorStep,
3368
+ Et as FIAT_CURRENCIES,
3369
+ ln as FIAT_TO_COUNTRY,
3370
+ Dn as FiatCurrencyModal,
3371
+ nt as FiatFlag,
3372
+ Hn as FormSkeleton,
3373
+ at as GenericCoinIcon,
3374
+ fn as GooglePayIcon,
3375
+ At as MOCK_RATES,
3376
+ bn as MenuIcon,
3377
+ Ve as Modal,
3378
+ yn as PayPalIcon,
3379
+ Sn as PaymentMethodSelector,
3380
+ kn as ProcessingStep,
3381
+ Xn as RampForm,
3382
+ rn as RampProvider,
3383
+ hn as RevolutIcon,
3384
+ wt as SKINS,
3385
+ je as SearchInput,
3386
+ _n as SettingsScreen,
3387
+ M as Skeleton,
3388
+ ta as SkinSwatch,
3389
+ Fn as ToggleSwitch,
3390
+ Dt as formatOutput,
3391
+ tt as getChainIconUrl,
3392
+ Ot as getCryptoIconUrl,
3393
+ cn as getFiatFlagUrl,
3394
+ Jn as getMockRate,
3395
+ En as getPaymentIcon,
3396
+ Ht as isStablecoin,
3397
+ dn as parseAmount,
3398
+ tn as useCheckoutIntent,
3399
+ en as useQuotes,
3400
+ Te as useRamp,
3401
+ qt as useRampConfig,
3402
+ nn as useTransaction
3330
3403
  };
3331
3404
  //# sourceMappingURL=index.js.map