@volr/react-ui 0.1.55 → 0.1.58
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/README.md +122 -124
- package/dist/index.cjs +309 -314
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +237 -242
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React9 = require('react');
|
|
4
4
|
var reactDom = require('react-dom');
|
|
5
5
|
var react = require('@volr/react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -9,7 +9,7 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
9
9
|
|
|
10
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var React9__default = /*#__PURE__*/_interopDefault(React9);
|
|
13
13
|
|
|
14
14
|
var __defProp = Object.defineProperty;
|
|
15
15
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -76,6 +76,12 @@ var en = {
|
|
|
76
76
|
title: "Success!",
|
|
77
77
|
message: "You're all set. Redirecting..."
|
|
78
78
|
},
|
|
79
|
+
account: {
|
|
80
|
+
title: "My Account",
|
|
81
|
+
walletAddress: "Wallet Address",
|
|
82
|
+
email: "Email",
|
|
83
|
+
logout: "Log out"
|
|
84
|
+
},
|
|
79
85
|
deposit: {
|
|
80
86
|
selectTitle: "Select asset to deposit",
|
|
81
87
|
qrTitle: "Deposit",
|
|
@@ -169,6 +175,12 @@ var ko = {
|
|
|
169
175
|
title: "\uC644\uB8CC!",
|
|
170
176
|
message: "\uBAA8\uB4E0 \uC124\uC815\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB9AC\uB2E4\uC774\uB809\uD2B8 \uC911..."
|
|
171
177
|
},
|
|
178
|
+
account: {
|
|
179
|
+
title: "\uB0B4 \uACC4\uC815",
|
|
180
|
+
walletAddress: "\uC9C0\uAC11 \uC8FC\uC18C",
|
|
181
|
+
email: "\uC774\uBA54\uC77C",
|
|
182
|
+
logout: "\uB85C\uADF8\uC544\uC6C3"
|
|
183
|
+
},
|
|
172
184
|
deposit: {
|
|
173
185
|
selectTitle: "\uCDA9\uC804\uD560 \uC790\uC0B0\uC744 \uC120\uD0DD\uD558\uC138\uC694",
|
|
174
186
|
qrTitle: "\uC785\uAE08\uD558\uAE30",
|
|
@@ -209,13 +221,13 @@ var translations = {
|
|
|
209
221
|
function getTranslations(locale = "en") {
|
|
210
222
|
return translations[locale] || translations.en;
|
|
211
223
|
}
|
|
212
|
-
var I18nContext =
|
|
224
|
+
var I18nContext = React9.createContext(null);
|
|
213
225
|
function interpolate(text, params) {
|
|
214
226
|
if (!params) return text;
|
|
215
227
|
return text.replace(/\{\{(\w+)\}\}/g, (_, key) => params[key] ?? `{{${key}}}`);
|
|
216
228
|
}
|
|
217
229
|
function useI18n() {
|
|
218
|
-
const context =
|
|
230
|
+
const context = React9.useContext(I18nContext);
|
|
219
231
|
if (!context) {
|
|
220
232
|
return {
|
|
221
233
|
locale: "en",
|
|
@@ -250,9 +262,9 @@ function detectLocale() {
|
|
|
250
262
|
return lang.startsWith("ko") ? "ko" : "en";
|
|
251
263
|
}
|
|
252
264
|
function I18nProvider({ children }) {
|
|
253
|
-
const [locale, setLocale] =
|
|
254
|
-
const translations2 =
|
|
255
|
-
const t =
|
|
265
|
+
const [locale, setLocale] = React9.useState(detectLocale());
|
|
266
|
+
const translations2 = React9.useMemo(() => getTranslations(locale), [locale]);
|
|
267
|
+
const t = React9.useMemo(() => {
|
|
256
268
|
return (key, params) => {
|
|
257
269
|
const keys = key.split(".");
|
|
258
270
|
let value2 = translations2;
|
|
@@ -269,7 +281,7 @@ function I18nProvider({ children }) {
|
|
|
269
281
|
return typeof value2 === "string" ? interpolate(value2, params) : key;
|
|
270
282
|
};
|
|
271
283
|
}, [translations2]);
|
|
272
|
-
const value =
|
|
284
|
+
const value = React9.useMemo(
|
|
273
285
|
() => ({
|
|
274
286
|
locale,
|
|
275
287
|
translations: translations2,
|
|
@@ -281,9 +293,9 @@ function I18nProvider({ children }) {
|
|
|
281
293
|
return /* @__PURE__ */ jsxRuntime.jsx(I18nContext.Provider, { value, children });
|
|
282
294
|
}
|
|
283
295
|
var useTranslation = useI18n;
|
|
284
|
-
var VolrModalContext =
|
|
296
|
+
var VolrModalContext = React9.createContext(null);
|
|
285
297
|
var useVolrModal = () => {
|
|
286
|
-
const context =
|
|
298
|
+
const context = React9.useContext(VolrModalContext);
|
|
287
299
|
if (!context) {
|
|
288
300
|
throw new Error("useVolrModal must be used within VolrUIProvider");
|
|
289
301
|
}
|
|
@@ -292,20 +304,19 @@ var useVolrModal = () => {
|
|
|
292
304
|
var VolrModalProvider = ({
|
|
293
305
|
children
|
|
294
306
|
}) => {
|
|
295
|
-
const [isOpen, setIsOpen] =
|
|
296
|
-
const [mode, setMode] =
|
|
297
|
-
const
|
|
298
|
-
const open =
|
|
299
|
-
setMode(
|
|
307
|
+
const [isOpen, setIsOpen] = React9.useState(false);
|
|
308
|
+
const [mode, setMode] = React9.useState("account");
|
|
309
|
+
const [asset, setAsset] = React9.useState(null);
|
|
310
|
+
const open = React9.useCallback((options) => {
|
|
311
|
+
setMode(options?.mode ?? "account");
|
|
312
|
+
setAsset(options?.asset ?? null);
|
|
300
313
|
setIsOpen(true);
|
|
301
|
-
}, [user]);
|
|
302
|
-
const close = React5.useCallback(() => {
|
|
303
|
-
setIsOpen(false);
|
|
304
314
|
}, []);
|
|
305
|
-
const
|
|
306
|
-
setIsOpen(
|
|
315
|
+
const close = React9.useCallback(() => {
|
|
316
|
+
setIsOpen(false);
|
|
317
|
+
setAsset(null);
|
|
307
318
|
}, []);
|
|
308
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VolrModalContext.Provider, { value: { isOpen, mode, open, close
|
|
319
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VolrModalContext.Provider, { value: { isOpen, mode, asset, open, close }, children });
|
|
309
320
|
};
|
|
310
321
|
var twMerge = tailwindMerge.extendTailwindMerge({
|
|
311
322
|
prefix: "volr:"
|
|
@@ -314,11 +325,11 @@ function cn(...inputs) {
|
|
|
314
325
|
return twMerge(clsx.clsx(inputs));
|
|
315
326
|
}
|
|
316
327
|
function useMediaQuery(query) {
|
|
317
|
-
const [matches, setMatches] =
|
|
328
|
+
const [matches, setMatches] = React9.useState(() => {
|
|
318
329
|
if (typeof window === "undefined") return false;
|
|
319
330
|
return window.matchMedia(query).matches;
|
|
320
331
|
});
|
|
321
|
-
|
|
332
|
+
React9.useEffect(() => {
|
|
322
333
|
if (typeof window === "undefined") return;
|
|
323
334
|
const mql = window.matchMedia(query);
|
|
324
335
|
const handler = (event) => setMatches(event.matches);
|
|
@@ -330,11 +341,11 @@ function useMediaQuery(query) {
|
|
|
330
341
|
}
|
|
331
342
|
|
|
332
343
|
// src/generated/volr-sdk-css.ts
|
|
333
|
-
var VOLR_SDK_CSS = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--volr-tw-translate-x:0;--volr-tw-translate-y:0;--volr-tw-translate-z:0;--volr-tw-space-y-reverse:0;--volr-tw-border-style:solid;--volr-tw-gradient-position:initial;--volr-tw-gradient-from:#0000;--volr-tw-gradient-via:#0000;--volr-tw-gradient-to:#0000;--volr-tw-gradient-stops:initial;--volr-tw-gradient-via-stops:initial;--volr-tw-gradient-from-position:0%;--volr-tw-gradient-via-position:50%;--volr-tw-gradient-to-position:100%;--volr-tw-leading:initial;--volr-tw-font-weight:initial;--volr-tw-shadow:0 0 #0000;--volr-tw-shadow-color:initial;--volr-tw-shadow-alpha:100%;--volr-tw-inset-shadow:0 0 #0000;--volr-tw-inset-shadow-color:initial;--volr-tw-inset-shadow-alpha:100%;--volr-tw-ring-color:initial;--volr-tw-ring-shadow:0 0 #0000;--volr-tw-inset-ring-color:initial;--volr-tw-inset-ring-shadow:0 0 #0000;--volr-tw-ring-inset:initial;--volr-tw-ring-offset-width:0px;--volr-tw-ring-offset-color:#fff;--volr-tw-ring-offset-shadow:0 0 #0000;--volr-tw-blur:initial;--volr-tw-brightness:initial;--volr-tw-contrast:initial;--volr-tw-grayscale:initial;--volr-tw-hue-rotate:initial;--volr-tw-invert:initial;--volr-tw-opacity:initial;--volr-tw-saturate:initial;--volr-tw-sepia:initial;--volr-tw-drop-shadow:initial;--volr-tw-drop-shadow-color:initial;--volr-tw-drop-shadow-alpha:100%;--volr-tw-drop-shadow-size:initial;--volr-tw-duration:initial;--volr-tw-ease:initial}}}@layer theme{:root,:host{--volr-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--volr-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--volr-color-red-50:oklch(97.1% .013 17.38);--volr-color-red-200:oklch(88.5% .062 18.334);--volr-color-red-500:oklch(63.7% .237 25.331);--volr-color-red-600:oklch(57.7% .245 27.325);--volr-color-red-700:oklch(50.5% .213 27.518);--volr-color-green-600:oklch(62.7% .194 149.214);--volr-color-emerald-300:oklch(84.5% .143 164.978);--volr-color-emerald-400:oklch(76.5% .177 163.223);--volr-color-emerald-500:oklch(69.6% .17 162.48);--volr-color-teal-400:oklch(77.7% .152 181.912);--volr-color-teal-500:oklch(70.4% .14 182.503);--volr-color-cyan-400:oklch(78.9% .154 211.53);--volr-color-blue-500:oklch(62.3% .214 259.815);--volr-color-purple-600:oklch(55.8% .288 302.321);--volr-color-rose-50:oklch(96.9% .015 12.422);--volr-color-rose-200:oklch(89.2% .058 10.001);--volr-color-rose-700:oklch(51.4% .222 16.935);--volr-color-rose-800:oklch(45.5% .188 13.697);--volr-color-slate-50:oklch(98.4% .003 247.858);--volr-color-slate-100:oklch(96.8% .007 247.896);--volr-color-slate-200:oklch(92.9% .013 255.508);--volr-color-slate-300:oklch(86.9% .022 252.894);--volr-color-slate-400:oklch(70.4% .04 256.788);--volr-color-slate-500:oklch(55.4% .046 257.417);--volr-color-slate-600:oklch(44.6% .043 257.281);--volr-color-slate-700:oklch(37.2% .044 257.287);--volr-color-slate-900:oklch(20.8% .042 265.755);--volr-color-gray-100:oklch(96.7% .003 264.542);--volr-color-gray-400:oklch(70.7% .022 261.325);--volr-color-gray-500:oklch(55.1% .027 264.364);--volr-color-gray-900:oklch(21% .034 264.665);--volr-color-black:#000;--volr-color-white:#fff;--volr-spacing:.25rem;--volr-container-md:28rem;--volr-container-4xl:56rem;--volr-text-xs:.75rem;--volr-text-xs--line-height:calc(1/.75);--volr-text-sm:.875rem;--volr-text-sm--line-height:calc(1.25/.875);--volr-text-base:1rem;--volr-text-base--line-height:calc(1.5/1);--volr-text-lg:1.125rem;--volr-text-lg--line-height:calc(1.75/1.125);--volr-text-xl:1.25rem;--volr-text-xl--line-height:calc(1.75/1.25);--volr-text-2xl:1.5rem;--volr-text-2xl--line-height:calc(2/1.5);--volr-text-8xl:6rem;--volr-text-8xl--line-height:1;--volr-font-weight-medium:500;--volr-font-weight-semibold:600;--volr-font-weight-bold:700;--volr-leading-relaxed:1.625;--volr-radius-md:.375rem;--volr-radius-lg:.5rem;--volr-radius-xl:.75rem;--volr-radius-2xl:1rem;--volr-radius-3xl:1.5rem;--volr-ease-out:cubic-bezier(0,0,.2,1);--volr-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--volr-blur-2xl:40px;--volr-default-transition-duration:.15s;--volr-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--volr-default-font-family:var(--volr-font-sans);--volr-default-mono-font-family:var(--volr-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--volr-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--volr-default-font-feature-settings,normal);font-variation-settings:var(--volr-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--volr-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--volr-default-mono-font-feature-settings,normal);font-variation-settings:var(--volr-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{--volr-primary-color:var(--volr-accent-color,#303030);--volr-font-family:var(--volr-custom-font,inherit)}*,:before,:after{box-sizing:border-box}*{font-family:var(--volr-font-family)}button,input,select,textarea{color:inherit;background-color:#0000}button{cursor:pointer;background-color:#0000}input::placeholder{color:#94a3b8}h1,h2,h3{color:#0f172a;margin:0;font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem;line-height:1.75rem}p{margin:0}}@layer components{.volr-dialog-overlay{inset:calc(var(--volr-spacing)*0);z-index:40;background-color:var(--volr-color-black);position:fixed}@supports (color:color-mix(in lab, red, red)){.volr-dialog-overlay{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr-dialog-content{z-index:50;border-radius:var(--volr-radius-2xl);border-style:var(--volr-tw-border-style);border-width:1px;border-color:var(--volr-color-slate-300);background-color:var(--volr-color-white);padding:calc(var(--volr-spacing)*7);--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow);width:calc(100% - 2rem);max-width:28rem;max-height:85vh;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}@media (max-width:640px){.volr-dialog-content{top:auto;right:calc(var(--volr-spacing)*0);bottom:calc(var(--volr-spacing)*0);left:calc(var(--volr-spacing)*0);border-radius:1.25rem 1.25rem 0 0;width:100%;max-width:100%;margin:0 auto;transform:translateY(0)}}.volr-dialog-close{top:calc(var(--volr-spacing)*4);right:calc(var(--volr-spacing)*4);height:calc(var(--volr-spacing)*8);width:calc(var(--volr-spacing)*8);color:var(--volr-color-slate-400);cursor:pointer;background-color:#0000;border:none;border-radius:3.40282e38px;justify-content:center;align-items:center;display:inline-flex;position:absolute}.volr-dialog-close:hover{color:#475569;background-color:#f1f5f9}.volr-dialog-close:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}.volr-dialog-close-icon{height:calc(var(--volr-spacing)*4);width:calc(var(--volr-spacing)*4)}.volr-email-input{width:100%;color:inherit;background-color:#fff;border:1px solid #cbd5e1;border-radius:.5rem;outline:none;padding:.75rem .75rem .75rem 2.75rem;font-size:1rem;line-height:1.5}.volr-email-input::placeholder{color:#94a3b8}.volr-email-input:focus{border-color:#cbd5e1;box-shadow:0 0 0 2px #94a3b8b3}.volr-option-button{cursor:pointer;background-color:#fff;border:1px solid #e2e8f0;border-radius:.5rem;align-items:center;gap:.75rem;width:100%;padding:.75rem;transition:background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;display:flex}.volr-option-button:hover{background-color:#f8fafc;border-color:#e2e8f0}.volr-option-button:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}}@layer utilities{.volr\\:pointer-events-none{pointer-events:none}.volr\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.volr\\:absolute{position:absolute}.volr\\:fixed{position:fixed}.volr\\:relative{position:relative}.volr\\:inset-0{inset:calc(var(--volr-spacing)*0)}.volr\\:-top-3{top:calc(var(--volr-spacing)*-3)}.volr\\:top-1\\/2{top:50%}.volr\\:-right-3{right:calc(var(--volr-spacing)*-3)}.volr\\:right-0{right:calc(var(--volr-spacing)*0)}.volr\\:right-2{right:calc(var(--volr-spacing)*2)}.volr\\:bottom-0{bottom:calc(var(--volr-spacing)*0)}.volr\\:left-0{left:calc(var(--volr-spacing)*0)}.volr\\:left-3{left:calc(var(--volr-spacing)*3)}.volr\\:-z-10{z-index:calc(10*-1)}.volr\\:z-10{z-index:10}.volr\\:z-20{z-index:20}.volr\\:z-40{z-index:40}.volr\\:z-50{z-index:50}.volr\\:mx-auto{margin-inline:auto}.volr\\:my-6{margin-block:calc(var(--volr-spacing)*6)}.volr\\:my-8{margin-block:calc(var(--volr-spacing)*8)}.volr\\:mt-0\\.5{margin-top:calc(var(--volr-spacing)*.5)}.volr\\:mt-1{margin-top:calc(var(--volr-spacing)*1)}.volr\\:mt-2{margin-top:calc(var(--volr-spacing)*2)}.volr\\:mt-3{margin-top:calc(var(--volr-spacing)*3)}.volr\\:mt-6{margin-top:calc(var(--volr-spacing)*6)}.volr\\:mt-8{margin-top:calc(var(--volr-spacing)*8)}.volr\\:mb-1{margin-bottom:calc(var(--volr-spacing)*1)}.volr\\:mb-2{margin-bottom:calc(var(--volr-spacing)*2)}.volr\\:mb-3{margin-bottom:calc(var(--volr-spacing)*3)}.volr\\:mb-4{margin-bottom:calc(var(--volr-spacing)*4)}.volr\\:mb-5{margin-bottom:calc(var(--volr-spacing)*5)}.volr\\:mb-6{margin-bottom:calc(var(--volr-spacing)*6)}.volr\\:mb-8{margin-bottom:calc(var(--volr-spacing)*8)}.volr\\:-ml-2{margin-left:calc(var(--volr-spacing)*-2)}.volr\\:flex{display:flex}.volr\\:grid{display:grid}.volr\\:inline-block{display:inline-block}.volr\\:inline-flex{display:inline-flex}.volr\\:h-1\\.5{height:calc(var(--volr-spacing)*1.5)}.volr\\:h-2{height:calc(var(--volr-spacing)*2)}.volr\\:h-8{height:calc(var(--volr-spacing)*8)}.volr\\:h-10{height:calc(var(--volr-spacing)*10)}.volr\\:h-14{height:calc(var(--volr-spacing)*14)}.volr\\:h-24{height:calc(var(--volr-spacing)*24)}.volr\\:h-40{height:calc(var(--volr-spacing)*40)}.volr\\:h-44{height:calc(var(--volr-spacing)*44)}.volr\\:h-48{height:calc(var(--volr-spacing)*48)}.volr\\:h-full{height:100%}.volr\\:h-px{height:1px}.volr\\:max-h-24{max-height:calc(var(--volr-spacing)*24)}.volr\\:max-h-96{max-height:calc(var(--volr-spacing)*96)}.volr\\:max-h-\\[85vh\\]{max-height:85vh}.volr\\:max-h-\\[90vh\\]{max-height:90vh}.volr\\:min-h-\\[120px\\]{min-height:120px}.volr\\:w-1\\.5{width:calc(var(--volr-spacing)*1.5)}.volr\\:w-2{width:calc(var(--volr-spacing)*2)}.volr\\:w-8{width:calc(var(--volr-spacing)*8)}.volr\\:w-10{width:calc(var(--volr-spacing)*10)}.volr\\:w-12{width:calc(var(--volr-spacing)*12)}.volr\\:w-24{width:calc(var(--volr-spacing)*24)}.volr\\:w-40{width:calc(var(--volr-spacing)*40)}.volr\\:w-44{width:calc(var(--volr-spacing)*44)}.volr\\:w-48{width:calc(var(--volr-spacing)*48)}.volr\\:w-full{width:100%}.volr\\:max-w-4xl{max-width:var(--volr-container-4xl)}.volr\\:max-w-full{max-width:100%}.volr\\:max-w-md{max-width:var(--volr-container-md)}.volr\\:max-w-none{max-width:none}.volr\\:min-w-0{min-width:calc(var(--volr-spacing)*0)}.volr\\:flex-1{flex:1}.volr\\:flex-shrink-0{flex-shrink:0}.volr\\:-translate-y-1\\/2{--volr-tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--volr-tw-translate-x)var(--volr-tw-translate-y)}.volr\\:animate-\\[volrFadeIn_0\\.2s_ease-out\\]{animation:.2s ease-out volrFadeIn}.volr\\:animate-pulse{animation:var(--volr-animate-pulse)}.volr\\:cursor-not-allowed{cursor:not-allowed}.volr\\:cursor-pointer{cursor:pointer}.volr\\:grid-cols-\\[minmax\\(0\\,1\\.1fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.volr\\:flex-col{flex-direction:column}.volr\\:items-baseline{align-items:baseline}.volr\\:items-center{align-items:center}.volr\\:items-end{align-items:flex-end}.volr\\:items-start{align-items:flex-start}.volr\\:justify-between{justify-content:space-between}.volr\\:justify-center{justify-content:center}.volr\\:gap-1{gap:calc(var(--volr-spacing)*1)}.volr\\:gap-2{gap:calc(var(--volr-spacing)*2)}.volr\\:gap-3{gap:calc(var(--volr-spacing)*3)}.volr\\:gap-4{gap:calc(var(--volr-spacing)*4)}:where(.volr\\:space-y-2>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*2)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*2)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-3>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*3)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*3)*calc(1 - var(--volr-tw-space-y-reverse)))}.volr\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.volr\\:overflow-hidden{overflow:hidden}.volr\\:overflow-visible{overflow:visible}.volr\\:overflow-y-auto{overflow-y:auto}.volr\\:rounded-2xl{border-radius:var(--volr-radius-2xl)}.volr\\:rounded-full{border-radius:3.40282e38px}.volr\\:rounded-lg{border-radius:var(--volr-radius-lg)}.volr\\:rounded-md{border-radius:var(--volr-radius-md)}.volr\\:rounded-xl{border-radius:var(--volr-radius-xl)}.volr\\:rounded-t-3xl{border-top-left-radius:var(--volr-radius-3xl);border-top-right-radius:var(--volr-radius-3xl)}.volr\\:border{border-style:var(--volr-tw-border-style);border-width:1px}.volr\\:border-2{border-style:var(--volr-tw-border-style);border-width:2px}.volr\\:border-4{border-style:var(--volr-tw-border-style);border-width:4px}.volr\\:border-t{border-top-style:var(--volr-tw-border-style);border-top-width:1px}.volr\\:border-none{--volr-tw-border-style:none;border-style:none}.volr\\:border-red-200{border-color:var(--volr-color-red-200)}.volr\\:border-rose-200{border-color:var(--volr-color-rose-200)}.volr\\:border-slate-100{border-color:var(--volr-color-slate-100)}.volr\\:border-slate-200,.volr\\:border-slate-200\\/50{border-color:var(--volr-color-slate-200)}@supports (color:color-mix(in lab, red, red)){.volr\\:border-slate-200\\/50{border-color:color-mix(in oklab,var(--volr-color-slate-200)50%,transparent)}}.volr\\:border-slate-300{border-color:var(--volr-color-slate-300)}.volr\\:border-white{border-color:var(--volr-color-white)}.volr\\:bg-black\\/45{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-black\\/45{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr\\:bg-blue-500{background-color:var(--volr-color-blue-500)}.volr\\:bg-cyan-400{background-color:var(--volr-color-cyan-400)}.volr\\:bg-emerald-300{background-color:var(--volr-color-emerald-300)}.volr\\:bg-emerald-400{background-color:var(--volr-color-emerald-400)}.volr\\:bg-gray-100{background-color:var(--volr-color-gray-100)}.volr\\:bg-gray-400{background-color:var(--volr-color-gray-400)}.volr\\:bg-red-50{background-color:var(--volr-color-red-50)}.volr\\:bg-rose-50{background-color:var(--volr-color-rose-50)}.volr\\:bg-slate-50,.volr\\:bg-slate-50\\/50{background-color:var(--volr-color-slate-50)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-slate-50\\/50{background-color:color-mix(in oklab,var(--volr-color-slate-50)50%,transparent)}}.volr\\:bg-slate-100{background-color:var(--volr-color-slate-100)}.volr\\:bg-slate-200{background-color:var(--volr-color-slate-200)}.volr\\:bg-teal-400{background-color:var(--volr-color-teal-400)}.volr\\:bg-transparent{background-color:#0000}.volr\\:bg-white{background-color:var(--volr-color-white)}.volr\\:bg-gradient-to-br{--volr-tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:from-blue-500{--volr-tw-gradient-from:var(--volr-color-blue-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-400{--volr-tw-gradient-from:var(--volr-color-emerald-400);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-500{--volr-tw-gradient-from:var(--volr-color-emerald-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-purple-600{--volr-tw-gradient-to:var(--volr-color-purple-600);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-teal-500{--volr-tw-gradient-to:var(--volr-color-teal-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:p-1{padding:calc(var(--volr-spacing)*1)}.volr\\:p-1\\.5{padding:calc(var(--volr-spacing)*1.5)}.volr\\:p-2{padding:calc(var(--volr-spacing)*2)}.volr\\:p-3{padding:calc(var(--volr-spacing)*3)}.volr\\:p-4{padding:calc(var(--volr-spacing)*4)}.volr\\:p-5{padding:calc(var(--volr-spacing)*5)}.volr\\:p-8{padding:calc(var(--volr-spacing)*8)}.volr\\:px-2{padding-inline:calc(var(--volr-spacing)*2)}.volr\\:px-3{padding-inline:calc(var(--volr-spacing)*3)}.volr\\:px-4{padding-inline:calc(var(--volr-spacing)*4)}.volr\\:px-5{padding-inline:calc(var(--volr-spacing)*5)}.volr\\:px-6{padding-inline:calc(var(--volr-spacing)*6)}.volr\\:py-0\\.5{padding-block:calc(var(--volr-spacing)*.5)}.volr\\:py-1\\.5{padding-block:calc(var(--volr-spacing)*1.5)}.volr\\:py-2{padding-block:calc(var(--volr-spacing)*2)}.volr\\:py-3{padding-block:calc(var(--volr-spacing)*3)}.volr\\:py-6{padding-block:calc(var(--volr-spacing)*6)}.volr\\:py-8{padding-block:calc(var(--volr-spacing)*8)}.volr\\:py-12{padding-block:calc(var(--volr-spacing)*12)}.volr\\:pt-4{padding-top:calc(var(--volr-spacing)*4)}.volr\\:pb-5{padding-bottom:calc(var(--volr-spacing)*5)}.volr\\:pb-6{padding-bottom:calc(var(--volr-spacing)*6)}.volr\\:text-center{text-align:center}.volr\\:text-left{text-align:left}.volr\\:font-mono{font-family:var(--volr-font-mono)}.volr\\:text-2xl{font-size:var(--volr-text-2xl);line-height:var(--volr-tw-leading,var(--volr-text-2xl--line-height))}.volr\\:text-8xl{font-size:var(--volr-text-8xl);line-height:var(--volr-tw-leading,var(--volr-text-8xl--line-height))}.volr\\:text-base{font-size:var(--volr-text-base);line-height:var(--volr-tw-leading,var(--volr-text-base--line-height))}.volr\\:text-lg{font-size:var(--volr-text-lg);line-height:var(--volr-tw-leading,var(--volr-text-lg--line-height))}.volr\\:text-sm{font-size:var(--volr-text-sm);line-height:var(--volr-tw-leading,var(--volr-text-sm--line-height))}.volr\\:text-xl{font-size:var(--volr-text-xl);line-height:var(--volr-tw-leading,var(--volr-text-xl--line-height))}.volr\\:text-xs{font-size:var(--volr-text-xs);line-height:var(--volr-tw-leading,var(--volr-text-xs--line-height))}.volr\\:leading-relaxed{--volr-tw-leading:var(--volr-leading-relaxed);line-height:var(--volr-leading-relaxed)}.volr\\:font-bold{--volr-tw-font-weight:var(--volr-font-weight-bold);font-weight:var(--volr-font-weight-bold)}.volr\\:font-medium{--volr-tw-font-weight:var(--volr-font-weight-medium);font-weight:var(--volr-font-weight-medium)}.volr\\:font-semibold{--volr-tw-font-weight:var(--volr-font-weight-semibold);font-weight:var(--volr-font-weight-semibold)}.volr\\:break-all{word-break:break-all}.volr\\:text-gray-500{color:var(--volr-color-gray-500)}.volr\\:text-gray-900{color:var(--volr-color-gray-900)}.volr\\:text-green-600{color:var(--volr-color-green-600)}.volr\\:text-red-500{color:var(--volr-color-red-500)}.volr\\:text-red-600{color:var(--volr-color-red-600)}.volr\\:text-red-700{color:var(--volr-color-red-700)}.volr\\:text-rose-700{color:var(--volr-color-rose-700)}.volr\\:text-rose-800{color:var(--volr-color-rose-800)}.volr\\:text-slate-400{color:var(--volr-color-slate-400)}.volr\\:text-slate-500{color:var(--volr-color-slate-500)}.volr\\:text-slate-600{color:var(--volr-color-slate-600)}.volr\\:text-slate-700{color:var(--volr-color-slate-700)}.volr\\:text-slate-900{color:var(--volr-color-slate-900)}.volr\\:text-white{color:var(--volr-color-white)}.volr\\:capitalize{text-transform:capitalize}.volr\\:underline{text-decoration-line:underline}.volr\\:opacity-0{opacity:0}.volr\\:opacity-30{opacity:.3}.volr\\:shadow-2xl{--volr-tw-shadow:0 25px 50px -12px var(--volr-tw-shadow-color,#00000040);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-lg{--volr-tw-shadow:0 10px 15px -3px var(--volr-tw-shadow-color,#0000001a),0 4px 6px -4px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-sm{--volr-tw-shadow:0 1px 3px 0 var(--volr-tw-shadow-color,#0000001a),0 1px 2px -1px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-xl{--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:var(--volr-color-emerald-500)}@supports (color:color-mix(in lab, red, red)){.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--volr-color-emerald-500)50%,transparent)var(--volr-tw-shadow-alpha),transparent)}}.volr\\:blur-2xl{--volr-tw-blur:blur(var(--volr-blur-2xl));filter:var(--volr-tw-blur,)var(--volr-tw-brightness,)var(--volr-tw-contrast,)var(--volr-tw-grayscale,)var(--volr-tw-hue-rotate,)var(--volr-tw-invert,)var(--volr-tw-saturate,)var(--volr-tw-sepia,)var(--volr-tw-drop-shadow,)}.volr\\:transition-all{transition-property:all;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--volr-tw-gradient-from,--volr-tw-gradient-via,--volr-tw-gradient-to;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:duration-200{--volr-tw-duration:.2s;transition-duration:.2s}.volr\\:duration-300{--volr-tw-duration:.3s;transition-duration:.3s}.volr\\:duration-500{--volr-tw-duration:.5s;transition-duration:.5s}.volr\\:ease-out{--volr-tw-ease:var(--volr-ease-out);transition-timing-function:var(--volr-ease-out)}.volr\\:outline-none{--volr-tw-outline-style:none;outline-style:none}@media (hover:hover){.volr\\:hover\\:border-slate-200:hover{border-color:var(--volr-color-slate-200)}.volr\\:hover\\:bg-slate-50:hover{background-color:var(--volr-color-slate-50)}}.volr\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.volr\\:disabled\\:bg-slate-50:disabled{background-color:var(--volr-color-slate-50)}.volr-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}}@property --volr-tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --volr-tw-gradient-position{syntax:"*";inherits:false}@property --volr-tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-via-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --volr-tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --volr-tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --volr-tw-leading{syntax:"*";inherits:false}@property --volr-tw-font-weight{syntax:"*";inherits:false}@property --volr-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-shadow-color{syntax:"*";inherits:false}@property --volr-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-shadow-color{syntax:"*";inherits:false}@property --volr-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-ring-color{syntax:"*";inherits:false}@property --volr-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-ring-color{syntax:"*";inherits:false}@property --volr-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-ring-inset{syntax:"*";inherits:false}@property --volr-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --volr-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --volr-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-blur{syntax:"*";inherits:false}@property --volr-tw-brightness{syntax:"*";inherits:false}@property --volr-tw-contrast{syntax:"*";inherits:false}@property --volr-tw-grayscale{syntax:"*";inherits:false}@property --volr-tw-hue-rotate{syntax:"*";inherits:false}@property --volr-tw-invert{syntax:"*";inherits:false}@property --volr-tw-opacity{syntax:"*";inherits:false}@property --volr-tw-saturate{syntax:"*";inherits:false}@property --volr-tw-sepia{syntax:"*";inherits:false}@property --volr-tw-drop-shadow{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-color{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-drop-shadow-size{syntax:"*";inherits:false}@property --volr-tw-duration{syntax:"*";inherits:false}@property --volr-tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
|
|
344
|
+
var VOLR_SDK_CSS = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--volr-tw-translate-x:0;--volr-tw-translate-y:0;--volr-tw-translate-z:0;--volr-tw-space-y-reverse:0;--volr-tw-border-style:solid;--volr-tw-gradient-position:initial;--volr-tw-gradient-from:#0000;--volr-tw-gradient-via:#0000;--volr-tw-gradient-to:#0000;--volr-tw-gradient-stops:initial;--volr-tw-gradient-via-stops:initial;--volr-tw-gradient-from-position:0%;--volr-tw-gradient-via-position:50%;--volr-tw-gradient-to-position:100%;--volr-tw-leading:initial;--volr-tw-font-weight:initial;--volr-tw-shadow:0 0 #0000;--volr-tw-shadow-color:initial;--volr-tw-shadow-alpha:100%;--volr-tw-inset-shadow:0 0 #0000;--volr-tw-inset-shadow-color:initial;--volr-tw-inset-shadow-alpha:100%;--volr-tw-ring-color:initial;--volr-tw-ring-shadow:0 0 #0000;--volr-tw-inset-ring-color:initial;--volr-tw-inset-ring-shadow:0 0 #0000;--volr-tw-ring-inset:initial;--volr-tw-ring-offset-width:0px;--volr-tw-ring-offset-color:#fff;--volr-tw-ring-offset-shadow:0 0 #0000;--volr-tw-blur:initial;--volr-tw-brightness:initial;--volr-tw-contrast:initial;--volr-tw-grayscale:initial;--volr-tw-hue-rotate:initial;--volr-tw-invert:initial;--volr-tw-opacity:initial;--volr-tw-saturate:initial;--volr-tw-sepia:initial;--volr-tw-drop-shadow:initial;--volr-tw-drop-shadow-color:initial;--volr-tw-drop-shadow-alpha:100%;--volr-tw-drop-shadow-size:initial;--volr-tw-duration:initial;--volr-tw-ease:initial}}}@layer theme{:root,:host{--volr-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--volr-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--volr-color-red-50:oklch(97.1% .013 17.38);--volr-color-red-200:oklch(88.5% .062 18.334);--volr-color-red-500:oklch(63.7% .237 25.331);--volr-color-red-600:oklch(57.7% .245 27.325);--volr-color-red-700:oklch(50.5% .213 27.518);--volr-color-green-600:oklch(62.7% .194 149.214);--volr-color-emerald-300:oklch(84.5% .143 164.978);--volr-color-emerald-400:oklch(76.5% .177 163.223);--volr-color-emerald-500:oklch(69.6% .17 162.48);--volr-color-teal-400:oklch(77.7% .152 181.912);--volr-color-teal-500:oklch(70.4% .14 182.503);--volr-color-cyan-400:oklch(78.9% .154 211.53);--volr-color-rose-50:oklch(96.9% .015 12.422);--volr-color-rose-200:oklch(89.2% .058 10.001);--volr-color-rose-700:oklch(51.4% .222 16.935);--volr-color-rose-800:oklch(45.5% .188 13.697);--volr-color-slate-50:oklch(98.4% .003 247.858);--volr-color-slate-100:oklch(96.8% .007 247.896);--volr-color-slate-200:oklch(92.9% .013 255.508);--volr-color-slate-300:oklch(86.9% .022 252.894);--volr-color-slate-400:oklch(70.4% .04 256.788);--volr-color-slate-500:oklch(55.4% .046 257.417);--volr-color-slate-600:oklch(44.6% .043 257.281);--volr-color-slate-700:oklch(37.2% .044 257.287);--volr-color-slate-900:oklch(20.8% .042 265.755);--volr-color-gray-100:oklch(96.7% .003 264.542);--volr-color-gray-400:oklch(70.7% .022 261.325);--volr-color-gray-500:oklch(55.1% .027 264.364);--volr-color-gray-900:oklch(21% .034 264.665);--volr-color-black:#000;--volr-color-white:#fff;--volr-spacing:.25rem;--volr-container-md:28rem;--volr-container-4xl:56rem;--volr-text-xs:.75rem;--volr-text-xs--line-height:calc(1/.75);--volr-text-sm:.875rem;--volr-text-sm--line-height:calc(1.25/.875);--volr-text-base:1rem;--volr-text-base--line-height:calc(1.5/1);--volr-text-lg:1.125rem;--volr-text-lg--line-height:calc(1.75/1.125);--volr-text-xl:1.25rem;--volr-text-xl--line-height:calc(1.75/1.25);--volr-text-2xl:1.5rem;--volr-text-2xl--line-height:calc(2/1.5);--volr-text-8xl:6rem;--volr-text-8xl--line-height:1;--volr-font-weight-medium:500;--volr-font-weight-semibold:600;--volr-font-weight-bold:700;--volr-leading-relaxed:1.625;--volr-radius-lg:.5rem;--volr-radius-xl:.75rem;--volr-radius-2xl:1rem;--volr-radius-3xl:1.5rem;--volr-ease-out:cubic-bezier(0,0,.2,1);--volr-animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--volr-blur-2xl:40px;--volr-default-transition-duration:.15s;--volr-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--volr-default-font-family:var(--volr-font-sans);--volr-default-mono-font-family:var(--volr-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--volr-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--volr-default-font-feature-settings,normal);font-variation-settings:var(--volr-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--volr-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--volr-default-mono-font-feature-settings,normal);font-variation-settings:var(--volr-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:host{--volr-primary-color:var(--volr-accent-color,#303030);--volr-font-family:var(--volr-custom-font,inherit)}*,:before,:after{box-sizing:border-box}*{font-family:var(--volr-font-family)}button,input,select,textarea{color:inherit;background-color:#0000}button{cursor:pointer;background-color:#0000}input::placeholder{color:#94a3b8}h1,h2,h3{color:#0f172a;margin:0;font-weight:700}h1{font-size:1.875rem;line-height:2.25rem}h2{font-size:1.5rem;line-height:2rem}h3{font-size:1.25rem;line-height:1.75rem}p{margin:0}}@layer components{.volr-dialog-overlay{inset:calc(var(--volr-spacing)*0);z-index:40;background-color:var(--volr-color-black);position:fixed}@supports (color:color-mix(in lab, red, red)){.volr-dialog-overlay{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr-dialog-content{z-index:50;border-radius:var(--volr-radius-2xl);border-style:var(--volr-tw-border-style);border-width:1px;border-color:var(--volr-color-slate-300);background-color:var(--volr-color-white);padding:calc(var(--volr-spacing)*7);--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow);width:calc(100% - 2rem);max-width:28rem;max-height:85vh;position:fixed;top:50%;left:50%;overflow-y:auto;transform:translate(-50%,-50%)}@media (max-width:640px){.volr-dialog-content{top:auto;right:calc(var(--volr-spacing)*0);bottom:calc(var(--volr-spacing)*0);left:calc(var(--volr-spacing)*0);border-radius:1.25rem 1.25rem 0 0;width:100%;max-width:100%;margin:0 auto;transform:translateY(0)}}.volr-dialog-close{top:calc(var(--volr-spacing)*4);right:calc(var(--volr-spacing)*4);height:calc(var(--volr-spacing)*8);width:calc(var(--volr-spacing)*8);color:var(--volr-color-slate-400);cursor:pointer;background-color:#0000;border:none;border-radius:3.40282e38px;justify-content:center;align-items:center;display:inline-flex;position:absolute}.volr-dialog-close:hover{color:#475569;background-color:#f1f5f9}.volr-dialog-close:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}.volr-dialog-close-icon{height:calc(var(--volr-spacing)*4);width:calc(var(--volr-spacing)*4)}.volr-email-input{width:100%;color:inherit;background-color:#fff;border:1px solid #cbd5e1;border-radius:.5rem;outline:none;padding:.75rem .75rem .75rem 2.75rem;font-size:1rem;line-height:1.5}.volr-email-input::placeholder{color:#94a3b8}.volr-email-input:focus{border-color:#cbd5e1;box-shadow:0 0 0 2px #94a3b8b3}.volr-option-button{cursor:pointer;background-color:#fff;border:1px solid #e2e8f0;border-radius:.5rem;align-items:center;gap:.75rem;width:100%;padding:.75rem;transition:background-color .15s ease-out,border-color .15s ease-out,box-shadow .15s ease-out;display:flex}.volr-option-button:hover{background-color:#f8fafc;border-color:#e2e8f0}.volr-option-button:focus-visible{outline:none;box-shadow:0 0 0 2px #94a3b8b3}}@layer utilities{.volr\\:pointer-events-none{pointer-events:none}.volr\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.volr\\:absolute{position:absolute}.volr\\:fixed{position:fixed}.volr\\:relative{position:relative}.volr\\:inset-0{inset:calc(var(--volr-spacing)*0)}.volr\\:-top-3{top:calc(var(--volr-spacing)*-3)}.volr\\:top-1\\/2{top:50%}.volr\\:-right-3{right:calc(var(--volr-spacing)*-3)}.volr\\:right-0{right:calc(var(--volr-spacing)*0)}.volr\\:right-2{right:calc(var(--volr-spacing)*2)}.volr\\:bottom-0{bottom:calc(var(--volr-spacing)*0)}.volr\\:left-0{left:calc(var(--volr-spacing)*0)}.volr\\:left-3{left:calc(var(--volr-spacing)*3)}.volr\\:-z-10{z-index:calc(10*-1)}.volr\\:z-10{z-index:10}.volr\\:z-20{z-index:20}.volr\\:z-40{z-index:40}.volr\\:z-50{z-index:50}.volr\\:mx-auto{margin-inline:auto}.volr\\:my-6{margin-block:calc(var(--volr-spacing)*6)}.volr\\:my-8{margin-block:calc(var(--volr-spacing)*8)}.volr\\:mt-0\\.5{margin-top:calc(var(--volr-spacing)*.5)}.volr\\:mt-1{margin-top:calc(var(--volr-spacing)*1)}.volr\\:mt-2{margin-top:calc(var(--volr-spacing)*2)}.volr\\:mt-3{margin-top:calc(var(--volr-spacing)*3)}.volr\\:mt-4{margin-top:calc(var(--volr-spacing)*4)}.volr\\:mt-6{margin-top:calc(var(--volr-spacing)*6)}.volr\\:mt-8{margin-top:calc(var(--volr-spacing)*8)}.volr\\:mb-1{margin-bottom:calc(var(--volr-spacing)*1)}.volr\\:mb-2{margin-bottom:calc(var(--volr-spacing)*2)}.volr\\:mb-3{margin-bottom:calc(var(--volr-spacing)*3)}.volr\\:mb-4{margin-bottom:calc(var(--volr-spacing)*4)}.volr\\:mb-5{margin-bottom:calc(var(--volr-spacing)*5)}.volr\\:mb-6{margin-bottom:calc(var(--volr-spacing)*6)}.volr\\:mb-8{margin-bottom:calc(var(--volr-spacing)*8)}.volr\\:-ml-2{margin-left:calc(var(--volr-spacing)*-2)}.volr\\:flex{display:flex}.volr\\:grid{display:grid}.volr\\:inline-block{display:inline-block}.volr\\:inline-flex{display:inline-flex}.volr\\:h-1\\.5{height:calc(var(--volr-spacing)*1.5)}.volr\\:h-2{height:calc(var(--volr-spacing)*2)}.volr\\:h-8{height:calc(var(--volr-spacing)*8)}.volr\\:h-10{height:calc(var(--volr-spacing)*10)}.volr\\:h-14{height:calc(var(--volr-spacing)*14)}.volr\\:h-24{height:calc(var(--volr-spacing)*24)}.volr\\:h-40{height:calc(var(--volr-spacing)*40)}.volr\\:h-44{height:calc(var(--volr-spacing)*44)}.volr\\:h-48{height:calc(var(--volr-spacing)*48)}.volr\\:h-full{height:100%}.volr\\:h-px{height:1px}.volr\\:max-h-24{max-height:calc(var(--volr-spacing)*24)}.volr\\:max-h-96{max-height:calc(var(--volr-spacing)*96)}.volr\\:max-h-\\[85vh\\]{max-height:85vh}.volr\\:max-h-\\[90vh\\]{max-height:90vh}.volr\\:min-h-\\[120px\\]{min-height:120px}.volr\\:w-1\\.5{width:calc(var(--volr-spacing)*1.5)}.volr\\:w-2{width:calc(var(--volr-spacing)*2)}.volr\\:w-8{width:calc(var(--volr-spacing)*8)}.volr\\:w-10{width:calc(var(--volr-spacing)*10)}.volr\\:w-12{width:calc(var(--volr-spacing)*12)}.volr\\:w-24{width:calc(var(--volr-spacing)*24)}.volr\\:w-40{width:calc(var(--volr-spacing)*40)}.volr\\:w-44{width:calc(var(--volr-spacing)*44)}.volr\\:w-48{width:calc(var(--volr-spacing)*48)}.volr\\:w-full{width:100%}.volr\\:max-w-4xl{max-width:var(--volr-container-4xl)}.volr\\:max-w-full{max-width:100%}.volr\\:max-w-md{max-width:var(--volr-container-md)}.volr\\:max-w-none{max-width:none}.volr\\:min-w-0{min-width:calc(var(--volr-spacing)*0)}.volr\\:flex-1{flex:1}.volr\\:flex-shrink-0{flex-shrink:0}.volr\\:-translate-y-1\\/2{--volr-tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--volr-tw-translate-x)var(--volr-tw-translate-y)}.volr\\:animate-\\[volrFadeIn_0\\.2s_ease-out\\]{animation:.2s ease-out volrFadeIn}.volr\\:animate-pulse{animation:var(--volr-animate-pulse)}.volr\\:cursor-not-allowed{cursor:not-allowed}.volr\\:cursor-pointer{cursor:pointer}.volr\\:grid-cols-\\[minmax\\(0\\,1\\.1fr\\)_minmax\\(0\\,1fr\\)\\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.volr\\:flex-col{flex-direction:column}.volr\\:items-baseline{align-items:baseline}.volr\\:items-center{align-items:center}.volr\\:items-end{align-items:flex-end}.volr\\:items-start{align-items:flex-start}.volr\\:justify-between{justify-content:space-between}.volr\\:justify-center{justify-content:center}.volr\\:gap-1{gap:calc(var(--volr-spacing)*1)}.volr\\:gap-2{gap:calc(var(--volr-spacing)*2)}.volr\\:gap-3{gap:calc(var(--volr-spacing)*3)}.volr\\:gap-4{gap:calc(var(--volr-spacing)*4)}:where(.volr\\:space-y-2>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*2)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*2)*calc(1 - var(--volr-tw-space-y-reverse)))}:where(.volr\\:space-y-3>:not(:last-child)){--volr-tw-space-y-reverse:0;margin-block-start:calc(calc(var(--volr-spacing)*3)*var(--volr-tw-space-y-reverse));margin-block-end:calc(calc(var(--volr-spacing)*3)*calc(1 - var(--volr-tw-space-y-reverse)))}.volr\\:truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.volr\\:overflow-hidden{overflow:hidden}.volr\\:overflow-visible{overflow:visible}.volr\\:overflow-y-auto{overflow-y:auto}.volr\\:rounded-2xl{border-radius:var(--volr-radius-2xl)}.volr\\:rounded-full{border-radius:3.40282e38px}.volr\\:rounded-lg{border-radius:var(--volr-radius-lg)}.volr\\:rounded-xl{border-radius:var(--volr-radius-xl)}.volr\\:rounded-t-3xl{border-top-left-radius:var(--volr-radius-3xl);border-top-right-radius:var(--volr-radius-3xl)}.volr\\:border{border-style:var(--volr-tw-border-style);border-width:1px}.volr\\:border-2{border-style:var(--volr-tw-border-style);border-width:2px}.volr\\:border-4{border-style:var(--volr-tw-border-style);border-width:4px}.volr\\:border-t{border-top-style:var(--volr-tw-border-style);border-top-width:1px}.volr\\:border-none{--volr-tw-border-style:none;border-style:none}.volr\\:border-red-200{border-color:var(--volr-color-red-200)}.volr\\:border-rose-200{border-color:var(--volr-color-rose-200)}.volr\\:border-slate-100{border-color:var(--volr-color-slate-100)}.volr\\:border-slate-200,.volr\\:border-slate-200\\/50{border-color:var(--volr-color-slate-200)}@supports (color:color-mix(in lab, red, red)){.volr\\:border-slate-200\\/50{border-color:color-mix(in oklab,var(--volr-color-slate-200)50%,transparent)}}.volr\\:border-slate-300{border-color:var(--volr-color-slate-300)}.volr\\:border-white{border-color:var(--volr-color-white)}.volr\\:bg-black\\/45{background-color:var(--volr-color-black)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-black\\/45{background-color:color-mix(in oklab,var(--volr-color-black)45%,transparent)}}.volr\\:bg-cyan-400{background-color:var(--volr-color-cyan-400)}.volr\\:bg-emerald-300{background-color:var(--volr-color-emerald-300)}.volr\\:bg-emerald-400{background-color:var(--volr-color-emerald-400)}.volr\\:bg-gray-100{background-color:var(--volr-color-gray-100)}.volr\\:bg-gray-400{background-color:var(--volr-color-gray-400)}.volr\\:bg-red-50{background-color:var(--volr-color-red-50)}.volr\\:bg-rose-50{background-color:var(--volr-color-rose-50)}.volr\\:bg-slate-50,.volr\\:bg-slate-50\\/50{background-color:var(--volr-color-slate-50)}@supports (color:color-mix(in lab, red, red)){.volr\\:bg-slate-50\\/50{background-color:color-mix(in oklab,var(--volr-color-slate-50)50%,transparent)}}.volr\\:bg-slate-100{background-color:var(--volr-color-slate-100)}.volr\\:bg-slate-200{background-color:var(--volr-color-slate-200)}.volr\\:bg-slate-500{background-color:var(--volr-color-slate-500)}.volr\\:bg-slate-700{background-color:var(--volr-color-slate-700)}.volr\\:bg-teal-400{background-color:var(--volr-color-teal-400)}.volr\\:bg-transparent{background-color:#0000}.volr\\:bg-white{background-color:var(--volr-color-white)}.volr\\:bg-gradient-to-br{--volr-tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--volr-tw-gradient-stops))}.volr\\:from-emerald-400{--volr-tw-gradient-from:var(--volr-color-emerald-400);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:from-emerald-500{--volr-tw-gradient-from:var(--volr-color-emerald-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:to-teal-500{--volr-tw-gradient-to:var(--volr-color-teal-500);--volr-tw-gradient-stops:var(--volr-tw-gradient-via-stops,var(--volr-tw-gradient-position),var(--volr-tw-gradient-from)var(--volr-tw-gradient-from-position),var(--volr-tw-gradient-to)var(--volr-tw-gradient-to-position))}.volr\\:fill-slate-500{fill:var(--volr-color-slate-500)}.volr\\:p-1{padding:calc(var(--volr-spacing)*1)}.volr\\:p-2{padding:calc(var(--volr-spacing)*2)}.volr\\:p-3{padding:calc(var(--volr-spacing)*3)}.volr\\:p-4{padding:calc(var(--volr-spacing)*4)}.volr\\:p-5{padding:calc(var(--volr-spacing)*5)}.volr\\:p-8{padding:calc(var(--volr-spacing)*8)}.volr\\:px-2{padding-inline:calc(var(--volr-spacing)*2)}.volr\\:px-3{padding-inline:calc(var(--volr-spacing)*3)}.volr\\:px-4{padding-inline:calc(var(--volr-spacing)*4)}.volr\\:px-6{padding-inline:calc(var(--volr-spacing)*6)}.volr\\:py-0\\.5{padding-block:calc(var(--volr-spacing)*.5)}.volr\\:py-1\\.5{padding-block:calc(var(--volr-spacing)*1.5)}.volr\\:py-2{padding-block:calc(var(--volr-spacing)*2)}.volr\\:py-3{padding-block:calc(var(--volr-spacing)*3)}.volr\\:py-6{padding-block:calc(var(--volr-spacing)*6)}.volr\\:py-8{padding-block:calc(var(--volr-spacing)*8)}.volr\\:py-12{padding-block:calc(var(--volr-spacing)*12)}.volr\\:pt-3{padding-top:calc(var(--volr-spacing)*3)}.volr\\:pt-4{padding-top:calc(var(--volr-spacing)*4)}.volr\\:text-center{text-align:center}.volr\\:text-left{text-align:left}.volr\\:font-mono{font-family:var(--volr-font-mono)}.volr\\:text-2xl{font-size:var(--volr-text-2xl);line-height:var(--volr-tw-leading,var(--volr-text-2xl--line-height))}.volr\\:text-8xl{font-size:var(--volr-text-8xl);line-height:var(--volr-tw-leading,var(--volr-text-8xl--line-height))}.volr\\:text-base{font-size:var(--volr-text-base);line-height:var(--volr-tw-leading,var(--volr-text-base--line-height))}.volr\\:text-lg{font-size:var(--volr-text-lg);line-height:var(--volr-tw-leading,var(--volr-text-lg--line-height))}.volr\\:text-sm{font-size:var(--volr-text-sm);line-height:var(--volr-tw-leading,var(--volr-text-sm--line-height))}.volr\\:text-xl{font-size:var(--volr-text-xl);line-height:var(--volr-tw-leading,var(--volr-text-xl--line-height))}.volr\\:text-xs{font-size:var(--volr-text-xs);line-height:var(--volr-tw-leading,var(--volr-text-xs--line-height))}.volr\\:leading-relaxed{--volr-tw-leading:var(--volr-leading-relaxed);line-height:var(--volr-leading-relaxed)}.volr\\:font-bold{--volr-tw-font-weight:var(--volr-font-weight-bold);font-weight:var(--volr-font-weight-bold)}.volr\\:font-medium{--volr-tw-font-weight:var(--volr-font-weight-medium);font-weight:var(--volr-font-weight-medium)}.volr\\:font-semibold{--volr-tw-font-weight:var(--volr-font-weight-semibold);font-weight:var(--volr-font-weight-semibold)}.volr\\:break-all{word-break:break-all}.volr\\:text-gray-500{color:var(--volr-color-gray-500)}.volr\\:text-gray-900{color:var(--volr-color-gray-900)}.volr\\:text-green-600{color:var(--volr-color-green-600)}.volr\\:text-red-500{color:var(--volr-color-red-500)}.volr\\:text-red-600{color:var(--volr-color-red-600)}.volr\\:text-red-700{color:var(--volr-color-red-700)}.volr\\:text-rose-700{color:var(--volr-color-rose-700)}.volr\\:text-rose-800{color:var(--volr-color-rose-800)}.volr\\:text-slate-400{color:var(--volr-color-slate-400)}.volr\\:text-slate-500{color:var(--volr-color-slate-500)}.volr\\:text-slate-600{color:var(--volr-color-slate-600)}.volr\\:text-slate-700{color:var(--volr-color-slate-700)}.volr\\:text-slate-900{color:var(--volr-color-slate-900)}.volr\\:text-white{color:var(--volr-color-white)}.volr\\:capitalize{text-transform:capitalize}.volr\\:underline{text-decoration-line:underline}.volr\\:opacity-0{opacity:0}.volr\\:opacity-30{opacity:.3}.volr\\:shadow-2xl{--volr-tw-shadow:0 25px 50px -12px var(--volr-tw-shadow-color,#00000040);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-lg{--volr-tw-shadow:0 10px 15px -3px var(--volr-tw-shadow-color,#0000001a),0 4px 6px -4px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-sm{--volr-tw-shadow:0 1px 3px 0 var(--volr-tw-shadow-color,#0000001a),0 1px 2px -1px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-xl{--volr-tw-shadow:0 20px 25px -5px var(--volr-tw-shadow-color,#0000001a),0 8px 10px -6px var(--volr-tw-shadow-color,#0000001a);box-shadow:var(--volr-tw-inset-shadow),var(--volr-tw-inset-ring-shadow),var(--volr-tw-ring-offset-shadow),var(--volr-tw-ring-shadow),var(--volr-tw-shadow)}.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:var(--volr-color-emerald-500)}@supports (color:color-mix(in lab, red, red)){.volr\\:shadow-emerald-500\\/50{--volr-tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--volr-color-emerald-500)50%,transparent)var(--volr-tw-shadow-alpha),transparent)}}.volr\\:blur-2xl{--volr-tw-blur:blur(var(--volr-blur-2xl));filter:var(--volr-tw-blur,)var(--volr-tw-brightness,)var(--volr-tw-contrast,)var(--volr-tw-grayscale,)var(--volr-tw-hue-rotate,)var(--volr-tw-invert,)var(--volr-tw-saturate,)var(--volr-tw-sepia,)var(--volr-tw-drop-shadow,)}.volr\\:transition-all{transition-property:all;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--volr-tw-gradient-from,--volr-tw-gradient-via,--volr-tw-gradient-to;transition-timing-function:var(--volr-tw-ease,var(--volr-default-transition-timing-function));transition-duration:var(--volr-tw-duration,var(--volr-default-transition-duration))}.volr\\:duration-200{--volr-tw-duration:.2s;transition-duration:.2s}.volr\\:duration-300{--volr-tw-duration:.3s;transition-duration:.3s}.volr\\:duration-500{--volr-tw-duration:.5s;transition-duration:.5s}.volr\\:ease-out{--volr-tw-ease:var(--volr-ease-out);transition-timing-function:var(--volr-ease-out)}.volr\\:outline-none{--volr-tw-outline-style:none;outline-style:none}@media (hover:hover){.volr\\:hover\\:border-slate-200:hover{border-color:var(--volr-color-slate-200)}.volr\\:hover\\:bg-slate-50:hover{background-color:var(--volr-color-slate-50)}}.volr\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.volr\\:disabled\\:bg-slate-50:disabled{background-color:var(--volr-color-slate-50)}.volr-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}}@property --volr-tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --volr-tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --volr-tw-gradient-position{syntax:"*";inherits:false}@property --volr-tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --volr-tw-gradient-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-via-stops{syntax:"*";inherits:false}@property --volr-tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --volr-tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --volr-tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --volr-tw-leading{syntax:"*";inherits:false}@property --volr-tw-font-weight{syntax:"*";inherits:false}@property --volr-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-shadow-color{syntax:"*";inherits:false}@property --volr-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-shadow-color{syntax:"*";inherits:false}@property --volr-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-ring-color{syntax:"*";inherits:false}@property --volr-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-inset-ring-color{syntax:"*";inherits:false}@property --volr-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-ring-inset{syntax:"*";inherits:false}@property --volr-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --volr-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --volr-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --volr-tw-blur{syntax:"*";inherits:false}@property --volr-tw-brightness{syntax:"*";inherits:false}@property --volr-tw-contrast{syntax:"*";inherits:false}@property --volr-tw-grayscale{syntax:"*";inherits:false}@property --volr-tw-hue-rotate{syntax:"*";inherits:false}@property --volr-tw-invert{syntax:"*";inherits:false}@property --volr-tw-opacity{syntax:"*";inherits:false}@property --volr-tw-saturate{syntax:"*";inherits:false}@property --volr-tw-sepia{syntax:"*";inherits:false}@property --volr-tw-drop-shadow{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-color{syntax:"*";inherits:false}@property --volr-tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --volr-tw-drop-shadow-size{syntax:"*";inherits:false}@property --volr-tw-duration{syntax:"*";inherits:false}@property --volr-tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
|
|
334
345
|
function ShadowPortal({ children }) {
|
|
335
|
-
const [shadowHost, setShadowHost] =
|
|
336
|
-
const [mountNode, setMountNode] =
|
|
337
|
-
|
|
346
|
+
const [shadowHost, setShadowHost] = React9.useState(null);
|
|
347
|
+
const [mountNode, setMountNode] = React9.useState(null);
|
|
348
|
+
React9.useEffect(() => {
|
|
338
349
|
const host = document.createElement("div");
|
|
339
350
|
host.id = "volr-shadow-portal";
|
|
340
351
|
host.style.position = "fixed";
|
|
@@ -361,7 +372,7 @@ function ShadowPortal({ children }) {
|
|
|
361
372
|
return reactDom.createPortal(children, mountNode);
|
|
362
373
|
}
|
|
363
374
|
function useFocusTrap(isActive, containerRef) {
|
|
364
|
-
const previousActiveElement =
|
|
375
|
+
const previousActiveElement = React9.useRef(null);
|
|
365
376
|
const focusableSelector = [
|
|
366
377
|
"button:not([disabled])",
|
|
367
378
|
"input:not([disabled])",
|
|
@@ -370,7 +381,7 @@ function useFocusTrap(isActive, containerRef) {
|
|
|
370
381
|
"a[href]",
|
|
371
382
|
'[tabindex]:not([tabindex="-1"])'
|
|
372
383
|
].join(", ");
|
|
373
|
-
const getFocusableElements =
|
|
384
|
+
const getFocusableElements = React9.useCallback(() => {
|
|
374
385
|
if (!containerRef.current) return [];
|
|
375
386
|
return Array.from(
|
|
376
387
|
containerRef.current.querySelectorAll(focusableSelector)
|
|
@@ -378,7 +389,7 @@ function useFocusTrap(isActive, containerRef) {
|
|
|
378
389
|
return el.offsetParent !== null;
|
|
379
390
|
});
|
|
380
391
|
}, [containerRef, focusableSelector]);
|
|
381
|
-
const handleKeyDown =
|
|
392
|
+
const handleKeyDown = React9.useCallback(
|
|
382
393
|
(event) => {
|
|
383
394
|
if (event.key !== "Tab") return;
|
|
384
395
|
const focusableElements = getFocusableElements();
|
|
@@ -399,7 +410,7 @@ function useFocusTrap(isActive, containerRef) {
|
|
|
399
410
|
},
|
|
400
411
|
[getFocusableElements]
|
|
401
412
|
);
|
|
402
|
-
|
|
413
|
+
React9.useEffect(() => {
|
|
403
414
|
if (!isActive) return;
|
|
404
415
|
previousActiveElement.current = document.activeElement;
|
|
405
416
|
const focusableElements = getFocusableElements();
|
|
@@ -430,10 +441,10 @@ var Modal = ({
|
|
|
430
441
|
}) => {
|
|
431
442
|
const isMobile = useMediaQuery("(max-width: 500px)");
|
|
432
443
|
const variant = explicitVariant ?? (isMobile ? "bottom-sheet" : "centered");
|
|
433
|
-
const dialogRef =
|
|
434
|
-
const dialogId =
|
|
444
|
+
const dialogRef = React9.useRef(null);
|
|
445
|
+
const dialogId = React9.useId();
|
|
435
446
|
useFocusTrap(open, dialogRef);
|
|
436
|
-
|
|
447
|
+
React9.useEffect(() => {
|
|
437
448
|
const handleEscape = (e) => {
|
|
438
449
|
if (e.key === "Escape" && open) {
|
|
439
450
|
if (onEscapeKeyDown) {
|
|
@@ -932,12 +943,12 @@ function PasskeyEnrollView({
|
|
|
932
943
|
isEnrolling,
|
|
933
944
|
error: enrollmentError
|
|
934
945
|
} = react.usePasskeyEnrollment();
|
|
935
|
-
const [hasStarted, setHasStarted] =
|
|
936
|
-
const [errorMessage, setErrorMessage] =
|
|
937
|
-
const [isRefreshing, setIsRefreshing] =
|
|
946
|
+
const [hasStarted, setHasStarted] = React9.useState(false);
|
|
947
|
+
const [errorMessage, setErrorMessage] = React9.useState(null);
|
|
948
|
+
const [isRefreshing, setIsRefreshing] = React9.useState(false);
|
|
938
949
|
const biometricType = getBiometricType();
|
|
939
950
|
const hasPasskey = user?.keyStorageType === "passkey";
|
|
940
|
-
|
|
951
|
+
React9.useEffect(() => {
|
|
941
952
|
console.log("[PasskeyEnrollView] User state:", {
|
|
942
953
|
user,
|
|
943
954
|
keyStorageType: user?.keyStorageType,
|
|
@@ -945,7 +956,7 @@ function PasskeyEnrollView({
|
|
|
945
956
|
hasPasskey
|
|
946
957
|
});
|
|
947
958
|
}, [user, hasPasskey]);
|
|
948
|
-
|
|
959
|
+
React9.useEffect(() => {
|
|
949
960
|
if (hasPasskey && !user?.evmAddress && !isRefreshing) {
|
|
950
961
|
const refreshUserData = async () => {
|
|
951
962
|
try {
|
|
@@ -976,7 +987,7 @@ function PasskeyEnrollView({
|
|
|
976
987
|
refreshUserData();
|
|
977
988
|
}
|
|
978
989
|
}, [hasPasskey, user?.evmAddress, isRefreshing, client, setUser, user]);
|
|
979
|
-
|
|
990
|
+
React9.useEffect(() => {
|
|
980
991
|
if (!user?.id) {
|
|
981
992
|
const error = new Error("User ID is required for passkey enrollment");
|
|
982
993
|
setErrorMessage(getUserFriendlyError(error, t));
|
|
@@ -992,7 +1003,7 @@ function PasskeyEnrollView({
|
|
|
992
1003
|
}
|
|
993
1004
|
}
|
|
994
1005
|
}, [user, onError, t]);
|
|
995
|
-
|
|
1006
|
+
React9.useEffect(() => {
|
|
996
1007
|
if (enrollmentError) {
|
|
997
1008
|
const friendlyMessage = getUserFriendlyError(enrollmentError, t);
|
|
998
1009
|
setErrorMessage(friendlyMessage);
|
|
@@ -1147,8 +1158,8 @@ function MpcConnectView({
|
|
|
1147
1158
|
isConnecting,
|
|
1148
1159
|
error: connectionError
|
|
1149
1160
|
} = react.useMpcConnection();
|
|
1150
|
-
const [errorMessage, setErrorMessage] =
|
|
1151
|
-
|
|
1161
|
+
const [errorMessage, setErrorMessage] = React9.useState(null);
|
|
1162
|
+
React9.useEffect(() => {
|
|
1152
1163
|
if (connectionError) {
|
|
1153
1164
|
setErrorMessage(connectionError.message);
|
|
1154
1165
|
if (onError) {
|
|
@@ -1156,7 +1167,7 @@ function MpcConnectView({
|
|
|
1156
1167
|
}
|
|
1157
1168
|
}
|
|
1158
1169
|
}, [connectionError, onError]);
|
|
1159
|
-
|
|
1170
|
+
React9.useEffect(() => {
|
|
1160
1171
|
handleConnect();
|
|
1161
1172
|
}, []);
|
|
1162
1173
|
const handleConnect = async () => {
|
|
@@ -1216,6 +1227,34 @@ function MpcConnectView({
|
|
|
1216
1227
|
}
|
|
1217
1228
|
);
|
|
1218
1229
|
}
|
|
1230
|
+
var CopyButton = ({ text, className, onCopy }) => {
|
|
1231
|
+
const [copied, setCopied] = React9.useState(false);
|
|
1232
|
+
const handleCopy = async () => {
|
|
1233
|
+
try {
|
|
1234
|
+
await navigator.clipboard.writeText(text);
|
|
1235
|
+
setCopied(true);
|
|
1236
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
1237
|
+
onCopy?.();
|
|
1238
|
+
} catch (error) {
|
|
1239
|
+
console.error("Copy failed:", error);
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1243
|
+
"button",
|
|
1244
|
+
{
|
|
1245
|
+
onClick: handleCopy,
|
|
1246
|
+
className: cn(
|
|
1247
|
+
"volr:p-2 volr:rounded-lg volr:text-slate-400 hover:volr:text-slate-700 hover:volr:bg-white volr:transition-all",
|
|
1248
|
+
className
|
|
1249
|
+
),
|
|
1250
|
+
"aria-label": "Copy",
|
|
1251
|
+
children: copied ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1252
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1253
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1254
|
+
] })
|
|
1255
|
+
}
|
|
1256
|
+
);
|
|
1257
|
+
};
|
|
1219
1258
|
function OptionButton({
|
|
1220
1259
|
icon,
|
|
1221
1260
|
title,
|
|
@@ -1378,7 +1417,7 @@ function PoweredBy() {
|
|
|
1378
1417
|
"path",
|
|
1379
1418
|
{
|
|
1380
1419
|
d: "M138.4 284L-0.00019535 0H87.1998L184.4 208L281.2 0H363.6L225.2 284H138.4ZM471.931 288.8C453.531 288.8 435.931 286.533 419.131 282C402.331 277.2 387.264 270.267 373.931 261.2C360.864 252.133 350.464 240.933 342.731 227.6C335.264 214.267 331.531 198.8 331.531 181.2C331.531 157.733 337.664 138 349.931 122C362.464 106 379.398 94 400.731 86C422.064 77.7333 445.798 73.6 471.931 73.6C498.064 73.6 521.664 77.7333 542.731 86C564.064 94 580.864 106 593.131 122C605.664 138 611.931 157.733 611.931 181.2C611.931 198.8 608.064 214.267 600.331 227.6C592.864 240.933 582.464 252.133 569.131 261.2C556.064 270.267 541.131 277.2 524.331 282C507.531 286.533 490.064 288.8 471.931 288.8ZM471.931 236C490.598 236 505.531 231.2 516.731 221.6C528.198 211.733 533.931 198.933 533.931 183.2V179.2C533.931 163.2 528.198 150.4 516.731 140.8C505.531 131.2 490.598 126.4 471.931 126.4C453.264 126.4 438.198 131.2 426.731 140.8C415.264 150.4 409.531 163.2 409.531 179.2V183.2C409.531 198.933 415.264 211.733 426.731 221.6C438.198 231.2 453.264 236 471.931 236ZM643.865 284V0H721.465V284H643.865ZM763.006 284V78.4H839.406V106.8C848.739 95.3333 860.473 86.9333 874.606 81.6C888.739 76.2667 903.406 73.6 918.606 73.6C921.539 73.6 925.006 73.7333 929.006 74C933.006 74.2667 937.406 74.8 942.206 75.6V135.2C935.006 134.4 926.873 133.733 917.806 133.2C909.006 132.667 900.073 132.8 891.006 133.6C881.939 134.4 873.539 136.4 865.806 139.6C858.339 142.533 852.206 147.333 847.406 154C842.873 160.667 840.606 169.733 840.606 181.2V284H763.006Z",
|
|
1381
|
-
|
|
1420
|
+
className: "volr:fill-slate-500"
|
|
1382
1421
|
}
|
|
1383
1422
|
)
|
|
1384
1423
|
}
|
|
@@ -1396,7 +1435,7 @@ var variantMap = {
|
|
|
1396
1435
|
ghost: { backgroundColor: "transparent", color: "#475569", border: "none" },
|
|
1397
1436
|
outline: { backgroundColor: "transparent", color: "#475569", border: "1px solid #e2e8f0" }
|
|
1398
1437
|
};
|
|
1399
|
-
var Button =
|
|
1438
|
+
var Button = React.forwardRef(
|
|
1400
1439
|
({ variant = "primary", size = "md", fullWidth, className, style, disabled, children, ...props }, ref) => {
|
|
1401
1440
|
const { accentColor } = useVolrUI();
|
|
1402
1441
|
const sizeStyle = sizeMap[size];
|
|
@@ -1470,9 +1509,9 @@ var EmailIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
|
1470
1509
|
);
|
|
1471
1510
|
function EmailInlineInput({ onSubmit, accentColor }) {
|
|
1472
1511
|
const { t } = useI18n();
|
|
1473
|
-
const [email, setEmail] =
|
|
1474
|
-
const [error, setError] =
|
|
1475
|
-
const [isLoading, setIsLoading] =
|
|
1512
|
+
const [email, setEmail] = React9.useState("");
|
|
1513
|
+
const [error, setError] = React9.useState(null);
|
|
1514
|
+
const [isLoading, setIsLoading] = React9.useState(false);
|
|
1476
1515
|
const handleSubmit = async (e) => {
|
|
1477
1516
|
e.preventDefault();
|
|
1478
1517
|
setError(null);
|
|
@@ -1595,14 +1634,14 @@ function SigninSelectScreen({
|
|
|
1595
1634
|
function CodeInputScreen({ email, onSubmit, onResend }) {
|
|
1596
1635
|
const { t } = useI18n();
|
|
1597
1636
|
const { accentColor } = useVolrUI();
|
|
1598
|
-
const [digits, setDigits] =
|
|
1599
|
-
const [error, setError] =
|
|
1600
|
-
const [isLoading, setIsLoading] =
|
|
1601
|
-
const inputRefs =
|
|
1602
|
-
|
|
1637
|
+
const [digits, setDigits] = React9.useState(Array(6).fill(""));
|
|
1638
|
+
const [error, setError] = React9.useState(null);
|
|
1639
|
+
const [isLoading, setIsLoading] = React9.useState(false);
|
|
1640
|
+
const inputRefs = React9.useRef([]);
|
|
1641
|
+
React9.useEffect(() => {
|
|
1603
1642
|
inputRefs.current[0]?.focus();
|
|
1604
1643
|
}, []);
|
|
1605
|
-
|
|
1644
|
+
React9.useEffect(() => {
|
|
1606
1645
|
const code = digits.join("");
|
|
1607
1646
|
if (code.length === 6 && !isLoading) {
|
|
1608
1647
|
handleSubmit(code);
|
|
@@ -1714,34 +1753,6 @@ function CodeInputScreen({ email, onSubmit, onResend }) {
|
|
|
1714
1753
|
)
|
|
1715
1754
|
] });
|
|
1716
1755
|
}
|
|
1717
|
-
var CopyButton = ({ text, className, onCopy }) => {
|
|
1718
|
-
const [copied, setCopied] = React5.useState(false);
|
|
1719
|
-
const handleCopy = async () => {
|
|
1720
|
-
try {
|
|
1721
|
-
await navigator.clipboard.writeText(text);
|
|
1722
|
-
setCopied(true);
|
|
1723
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
1724
|
-
onCopy?.();
|
|
1725
|
-
} catch (error) {
|
|
1726
|
-
console.error("Copy failed:", error);
|
|
1727
|
-
}
|
|
1728
|
-
};
|
|
1729
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
|
-
"button",
|
|
1731
|
-
{
|
|
1732
|
-
onClick: handleCopy,
|
|
1733
|
-
className: cn(
|
|
1734
|
-
"volr:p-2 volr:rounded-lg volr:text-slate-400 hover:volr:text-slate-700 hover:volr:bg-white volr:transition-all",
|
|
1735
|
-
className
|
|
1736
|
-
),
|
|
1737
|
-
"aria-label": "Copy",
|
|
1738
|
-
children: copied ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1739
|
-
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
1740
|
-
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
1741
|
-
] })
|
|
1742
|
-
}
|
|
1743
|
-
);
|
|
1744
|
-
};
|
|
1745
1756
|
|
|
1746
1757
|
// node_modules/@noble/hashes/_u64.js
|
|
1747
1758
|
var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
@@ -2053,11 +2064,11 @@ function SiweLoginScreen({
|
|
|
2053
2064
|
const { t } = useI18n();
|
|
2054
2065
|
const { accentColor } = useVolrUI();
|
|
2055
2066
|
const { requestSiweNonce, verifySiweSignature } = react.useVolrLogin();
|
|
2056
|
-
const [isLoading, setIsLoading] =
|
|
2057
|
-
const [step, setStep] =
|
|
2058
|
-
const [account, setAccount] =
|
|
2059
|
-
const [error, setError] =
|
|
2060
|
-
const [walletConnector, setWalletConnector] =
|
|
2067
|
+
const [isLoading, setIsLoading] = React9.useState(false);
|
|
2068
|
+
const [step, setStep] = React9.useState("connect");
|
|
2069
|
+
const [account, setAccount] = React9.useState(null);
|
|
2070
|
+
const [error, setError] = React9.useState(null);
|
|
2071
|
+
const [walletConnector, setWalletConnector] = React9.useState(
|
|
2061
2072
|
void 0
|
|
2062
2073
|
);
|
|
2063
2074
|
const detectWalletConnector = () => {
|
|
@@ -2076,7 +2087,7 @@ function SiweLoginScreen({
|
|
|
2076
2087
|
if (provider.isBraveWallet) return "com.brave.wallet";
|
|
2077
2088
|
return "unknown";
|
|
2078
2089
|
};
|
|
2079
|
-
|
|
2090
|
+
React9.useEffect(() => {
|
|
2080
2091
|
if (typeof window !== "undefined" && window.ethereum) {
|
|
2081
2092
|
window.ethereum.request({ method: "eth_accounts" }).then((accounts) => {
|
|
2082
2093
|
if (accounts.length > 0) {
|
|
@@ -2183,13 +2194,7 @@ Issued At: ${issuedAt}`;
|
|
|
2183
2194
|
account.slice(-4)
|
|
2184
2195
|
] })
|
|
2185
2196
|
] }),
|
|
2186
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2187
|
-
CopyButton,
|
|
2188
|
-
{
|
|
2189
|
-
text: account,
|
|
2190
|
-
className: "volr:p-1.5 volr:bg-white volr:rounded-md volr:shadow-sm"
|
|
2191
|
-
}
|
|
2192
|
-
)
|
|
2197
|
+
/* @__PURE__ */ jsxRuntime.jsx(CopyButton, { text: account })
|
|
2193
2198
|
] }),
|
|
2194
2199
|
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:mb-4 volr:p-3 volr:bg-red-50 volr:border volr:border-red-200 volr:rounded-lg volr:text-red-700 volr:text-sm", children: error }),
|
|
2195
2200
|
step === "connect" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2231,149 +2236,17 @@ Issued At: ${issuedAt}`;
|
|
|
2231
2236
|
}
|
|
2232
2237
|
);
|
|
2233
2238
|
}
|
|
2234
|
-
function LoginSuccessScreen({
|
|
2235
|
-
onClose,
|
|
2236
|
-
delay = 1500
|
|
2237
|
-
}) {
|
|
2238
|
-
const { t } = useI18n();
|
|
2239
|
-
const { accentColor } = useVolrUI();
|
|
2240
|
-
React5.useEffect(() => {
|
|
2241
|
-
const timer = setTimeout(() => {
|
|
2242
|
-
onClose();
|
|
2243
|
-
}, delay);
|
|
2244
|
-
return () => {
|
|
2245
|
-
clearTimeout(timer);
|
|
2246
|
-
};
|
|
2247
|
-
}, [onClose, delay]);
|
|
2248
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:flex-col volr:items-center volr:justify-center volr:py-12 volr:px-4", children: [
|
|
2249
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:relative volr:mb-8", children: [
|
|
2250
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2251
|
-
"div",
|
|
2252
|
-
{
|
|
2253
|
-
className: "volr:absolute volr:inset-0 volr:rounded-full volr:blur-2xl volr:opacity-30",
|
|
2254
|
-
style: {
|
|
2255
|
-
backgroundColor: accentColor,
|
|
2256
|
-
animation: "volr-pulse 2s ease-in-out infinite"
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
),
|
|
2260
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2261
|
-
"div",
|
|
2262
|
-
{
|
|
2263
|
-
className: "volr:relative volr:w-24 volr:h-24 volr:rounded-full volr:flex volr:items-center volr:justify-center volr:shadow-lg",
|
|
2264
|
-
style: {
|
|
2265
|
-
backgroundColor: accentColor + "c0",
|
|
2266
|
-
animation: "volr-scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"
|
|
2267
|
-
},
|
|
2268
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2269
|
-
"svg",
|
|
2270
|
-
{
|
|
2271
|
-
width: "48",
|
|
2272
|
-
height: "48",
|
|
2273
|
-
viewBox: "0 0 24 24",
|
|
2274
|
-
fill: "none",
|
|
2275
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2276
|
-
style: {
|
|
2277
|
-
animation: "volr-fade-in 0.3s ease-out 0.3s both"
|
|
2278
|
-
},
|
|
2279
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2280
|
-
"path",
|
|
2281
|
-
{
|
|
2282
|
-
d: "M5 13L9 17L19 7",
|
|
2283
|
-
stroke: "white",
|
|
2284
|
-
strokeWidth: "2.5",
|
|
2285
|
-
strokeLinecap: "round",
|
|
2286
|
-
strokeLinejoin: "round",
|
|
2287
|
-
style: {
|
|
2288
|
-
strokeDasharray: "24",
|
|
2289
|
-
strokeDashoffset: "24",
|
|
2290
|
-
animation: "volr-check-draw 0.4s ease-out 0.3s forwards"
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
)
|
|
2294
|
-
}
|
|
2295
|
-
)
|
|
2296
|
-
}
|
|
2297
|
-
)
|
|
2298
|
-
] }),
|
|
2299
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2300
|
-
"div",
|
|
2301
|
-
{
|
|
2302
|
-
className: "volr:text-center volr:space-y-2",
|
|
2303
|
-
style: {
|
|
2304
|
-
animation: "volr-fade-in-up 0.5s ease-out 0.5s both"
|
|
2305
|
-
},
|
|
2306
|
-
children: [
|
|
2307
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-2xl volr:font-semibold volr:text-slate-900 volr:mb-3", children: t("success.title") }),
|
|
2308
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-base volr:text-slate-600", children: t("success.message") || "You're all set. Redirecting..." })
|
|
2309
|
-
]
|
|
2310
|
-
}
|
|
2311
|
-
),
|
|
2312
|
-
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
2313
|
-
@keyframes volr-scale-in {
|
|
2314
|
-
0% {
|
|
2315
|
-
transform: scale(0);
|
|
2316
|
-
opacity: 0;
|
|
2317
|
-
}
|
|
2318
|
-
100% {
|
|
2319
|
-
transform: scale(1);
|
|
2320
|
-
opacity: 1;
|
|
2321
|
-
}
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
@keyframes volr-check-draw {
|
|
2325
|
-
0% {
|
|
2326
|
-
stroke-dashoffset: 24;
|
|
2327
|
-
}
|
|
2328
|
-
100% {
|
|
2329
|
-
stroke-dashoffset: 0;
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
@keyframes volr-fade-in {
|
|
2334
|
-
0% {
|
|
2335
|
-
opacity: 0;
|
|
2336
|
-
}
|
|
2337
|
-
100% {
|
|
2338
|
-
opacity: 1;
|
|
2339
|
-
}
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
@keyframes volr-fade-in-up {
|
|
2343
|
-
0% {
|
|
2344
|
-
opacity: 0;
|
|
2345
|
-
transform: translateY(10px);
|
|
2346
|
-
}
|
|
2347
|
-
100% {
|
|
2348
|
-
opacity: 1;
|
|
2349
|
-
transform: translateY(0);
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
|
|
2353
|
-
@keyframes volr-pulse {
|
|
2354
|
-
0%, 100% {
|
|
2355
|
-
transform: scale(1);
|
|
2356
|
-
opacity: 0.3;
|
|
2357
|
-
}
|
|
2358
|
-
50% {
|
|
2359
|
-
transform: scale(1.1);
|
|
2360
|
-
opacity: 0.2;
|
|
2361
|
-
}
|
|
2362
|
-
}
|
|
2363
|
-
` })
|
|
2364
|
-
] });
|
|
2365
|
-
}
|
|
2366
2239
|
function SigninModal({ isOpen, onClose, onError }) {
|
|
2367
2240
|
const { logout, user } = react.useVolrContext();
|
|
2368
2241
|
const { appName, branding } = useVolrUI();
|
|
2369
2242
|
const { requestEmailCode, verifyEmailCode, handleSocialLogin } = react.useVolrLogin();
|
|
2370
|
-
const [currentScreen, setCurrentScreen] =
|
|
2371
|
-
const [email, setEmail] =
|
|
2243
|
+
const [currentScreen, setCurrentScreen] = React9.useState("method-select");
|
|
2244
|
+
const [email, setEmail] = React9.useState("");
|
|
2372
2245
|
const hasPasskey = user?.keyStorageType === "passkey";
|
|
2373
2246
|
const isMobile = useMediaQuery("(max-width: 500px)");
|
|
2374
2247
|
const isWideViewport = useMediaQuery("(min-width: 864px)");
|
|
2375
2248
|
const shouldUseWideLayout = !isMobile && isWideViewport && Boolean(branding) && currentScreen === "method-select";
|
|
2376
|
-
|
|
2249
|
+
React9.useEffect(() => {
|
|
2377
2250
|
if (!isOpen) {
|
|
2378
2251
|
setCurrentScreen("method-select");
|
|
2379
2252
|
setEmail("");
|
|
@@ -2397,20 +2270,20 @@ function SigninModal({ isOpen, onClose, onError }) {
|
|
|
2397
2270
|
const handleCodeSubmit = async (code) => {
|
|
2398
2271
|
const result = await verifyEmailCode(email, code);
|
|
2399
2272
|
if (result.keyStorageType) {
|
|
2400
|
-
|
|
2273
|
+
onClose();
|
|
2401
2274
|
return;
|
|
2402
2275
|
}
|
|
2403
2276
|
setCurrentScreen("passkey-setup");
|
|
2404
2277
|
};
|
|
2405
2278
|
const handleSiweSuccess = (data) => {
|
|
2406
2279
|
if (data.keyStorageType) {
|
|
2407
|
-
|
|
2280
|
+
onClose();
|
|
2408
2281
|
return;
|
|
2409
2282
|
}
|
|
2410
2283
|
setCurrentScreen("passkey-setup");
|
|
2411
2284
|
};
|
|
2412
2285
|
const handlePasskeyComplete = () => {
|
|
2413
|
-
|
|
2286
|
+
onClose();
|
|
2414
2287
|
};
|
|
2415
2288
|
const handlePasskeyError = (error) => {
|
|
2416
2289
|
if (onError) {
|
|
@@ -2429,11 +2302,6 @@ function SigninModal({ isOpen, onClose, onError }) {
|
|
|
2429
2302
|
}
|
|
2430
2303
|
}
|
|
2431
2304
|
};
|
|
2432
|
-
const handleSuccessClose = () => {
|
|
2433
|
-
setCurrentScreen("method-select");
|
|
2434
|
-
setEmail("");
|
|
2435
|
-
onClose();
|
|
2436
|
-
};
|
|
2437
2305
|
const handleBackdropClick = (_e) => {
|
|
2438
2306
|
if (currentScreen !== "passkey-setup" || hasPasskey) {
|
|
2439
2307
|
setCurrentScreen("method-select");
|
|
@@ -2498,12 +2366,10 @@ function SigninModal({ isOpen, onClose, onError }) {
|
|
|
2498
2366
|
onComplete: handlePasskeyComplete,
|
|
2499
2367
|
onError: handlePasskeyError,
|
|
2500
2368
|
onLogout: handleLogout,
|
|
2501
|
-
onClose
|
|
2369
|
+
onClose
|
|
2502
2370
|
},
|
|
2503
2371
|
"passkey-setup"
|
|
2504
2372
|
);
|
|
2505
|
-
case "success":
|
|
2506
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LoginSuccessScreen, { onClose: handleSuccessClose }, "success");
|
|
2507
2373
|
default:
|
|
2508
2374
|
return null;
|
|
2509
2375
|
}
|
|
@@ -2538,14 +2404,70 @@ function SigninModal({ isOpen, onClose, onError }) {
|
|
|
2538
2404
|
}
|
|
2539
2405
|
);
|
|
2540
2406
|
}
|
|
2407
|
+
function AccountModal({ isOpen, onClose, onError }) {
|
|
2408
|
+
const { user, logout } = react.useVolrContext();
|
|
2409
|
+
const { t } = useI18n();
|
|
2410
|
+
const [isLoggingOut, setIsLoggingOut] = React9.useState(false);
|
|
2411
|
+
if (!user) {
|
|
2412
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SigninModal, { isOpen, onClose, onError });
|
|
2413
|
+
}
|
|
2414
|
+
const handleLogout = async () => {
|
|
2415
|
+
setIsLoggingOut(true);
|
|
2416
|
+
try {
|
|
2417
|
+
await logout();
|
|
2418
|
+
onClose();
|
|
2419
|
+
} catch (error) {
|
|
2420
|
+
if (onError) {
|
|
2421
|
+
onError(error instanceof Error ? error : new Error("Logout failed"));
|
|
2422
|
+
}
|
|
2423
|
+
} finally {
|
|
2424
|
+
setIsLoggingOut(false);
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
const displayAddress = user.evmAddress ? `${user.evmAddress.slice(0, 6)}...${user.evmAddress.slice(-4)}` : null;
|
|
2428
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Modal, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: [
|
|
2429
|
+
/* @__PURE__ */ jsxRuntime.jsx(ModalHeader, { onClose }),
|
|
2430
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2431
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-xl volr:font-semibold volr:text-slate-900 volr:mb-4 volr:text-center", children: t("account.title") }),
|
|
2432
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:bg-slate-50 volr:rounded-xl volr:p-4 volr:mb-4", children: [
|
|
2433
|
+
user.evmAddress && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:items-center volr:justify-between volr:gap-3", children: [
|
|
2434
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex-1 volr:min-w-0", children: [
|
|
2435
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-xs volr:text-slate-500 volr:mb-1", children: t("account.walletAddress") }),
|
|
2436
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:font-mono volr:text-sm volr:font-medium volr:text-slate-900", children: displayAddress })
|
|
2437
|
+
] }),
|
|
2438
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2439
|
+
CopyButton,
|
|
2440
|
+
{
|
|
2441
|
+
text: user.evmAddress,
|
|
2442
|
+
className: "volr:flex-shrink-0"
|
|
2443
|
+
}
|
|
2444
|
+
)
|
|
2445
|
+
] }),
|
|
2446
|
+
user.email && !user.email.includes("@wallet.") && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:mt-4 volr:pt-4 volr:border-t volr:border-slate-200", children: [
|
|
2447
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-xs volr:text-slate-500 volr:mb-1", children: t("account.email") }),
|
|
2448
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:font-medium volr:text-slate-900", children: user.email })
|
|
2449
|
+
] })
|
|
2450
|
+
] }),
|
|
2451
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2452
|
+
"button",
|
|
2453
|
+
{
|
|
2454
|
+
onClick: handleLogout,
|
|
2455
|
+
disabled: isLoggingOut,
|
|
2456
|
+
className: "volr:w-full volr:py-3 volr:px-4 volr:rounded-lg volr:border volr:border-slate-200 volr:text-slate-700 volr:font-medium volr:text-sm volr:transition-colors hover:volr:bg-slate-50 hover:volr:border-slate-300 disabled:volr:opacity-50 disabled:volr:cursor-not-allowed",
|
|
2457
|
+
children: isLoggingOut ? t("common.loading") : t("account.logout")
|
|
2458
|
+
}
|
|
2459
|
+
)
|
|
2460
|
+
] })
|
|
2461
|
+
] });
|
|
2462
|
+
}
|
|
2541
2463
|
function AssetSelectView({
|
|
2542
2464
|
assets,
|
|
2543
2465
|
onSelect
|
|
2544
2466
|
}) {
|
|
2545
2467
|
const { t } = useI18n();
|
|
2546
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
2547
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-
|
|
2548
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-500 volr:mb-
|
|
2468
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2469
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-xl volr:font-semibold volr:text-slate-900 volr:mb-1 volr:text-center", children: t("deposit.selectTitle") }),
|
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-500 volr:mb-4 volr:text-center", children: "Supported token" }),
|
|
2549
2471
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:space-y-3", children: assets.map((a, idx) => {
|
|
2550
2472
|
const isNative = a.token === "native";
|
|
2551
2473
|
const tokenSymbol = isNative ? "ETH" : a.token.symbol;
|
|
@@ -2568,7 +2490,7 @@ function AssetSelectView({
|
|
|
2568
2490
|
src: a.token.iconUrl,
|
|
2569
2491
|
className: "volr:w-10 volr:h-10 volr:rounded-full volr:border volr:border-slate-200"
|
|
2570
2492
|
}
|
|
2571
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:w-10 volr:h-10 volr:rounded-full volr:bg-
|
|
2493
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:w-10 volr:h-10 volr:rounded-full volr:bg-slate-700 volr:flex volr:items-center volr:justify-center volr:text-white volr:font-bold volr:text-sm", children: tokenSymbol.slice(0, 2) }) }),
|
|
2572
2494
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex-1 volr:min-w-0", children: [
|
|
2573
2495
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:items-center volr:gap-2 volr:mb-1", children: [
|
|
2574
2496
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-base volr:font-semibold volr:text-slate-900", children: tokenSymbol }),
|
|
@@ -2588,7 +2510,7 @@ function AssetSelectView({
|
|
|
2588
2510
|
}) })
|
|
2589
2511
|
] });
|
|
2590
2512
|
}
|
|
2591
|
-
var TextLinkButton =
|
|
2513
|
+
var TextLinkButton = React.forwardRef(({ showArrow = false, className, children, ...props }, ref) => {
|
|
2592
2514
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2593
2515
|
"button",
|
|
2594
2516
|
{
|
|
@@ -2613,8 +2535,8 @@ var OtherTokenModal = ({
|
|
|
2613
2535
|
}) => {
|
|
2614
2536
|
return /* @__PURE__ */ jsxRuntime.jsxs(Modal, { open, onOpenChange, children: [
|
|
2615
2537
|
/* @__PURE__ */ jsxRuntime.jsx(ModalHeader, { onClose: () => onOpenChange(false) }),
|
|
2616
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:
|
|
2617
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-
|
|
2538
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:text-center", children: [
|
|
2539
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-lg volr:font-semibold volr:text-slate-900 volr:mb-2", children: "Coming Soon" }),
|
|
2618
2540
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-600", children: "Swap and bridge recommendations will be available here soon." })
|
|
2619
2541
|
] })
|
|
2620
2542
|
] });
|
|
@@ -2847,7 +2769,7 @@ var DepositCompletedToast = ({
|
|
|
2847
2769
|
symbol
|
|
2848
2770
|
}) => {
|
|
2849
2771
|
const { t } = useI18n();
|
|
2850
|
-
const [expanded, setExpanded] =
|
|
2772
|
+
const [expanded, setExpanded] = React9.useState(false);
|
|
2851
2773
|
const formatAmount = (amount) => {
|
|
2852
2774
|
const divisor = BigInt(10 ** decimals);
|
|
2853
2775
|
const whole = amount / divisor;
|
|
@@ -2976,10 +2898,10 @@ function DepositQRView(props) {
|
|
|
2976
2898
|
const { t } = useI18n();
|
|
2977
2899
|
const { config } = react.useVolrContext();
|
|
2978
2900
|
const { client } = react.useInternalAuth();
|
|
2979
|
-
const [chainName, setChainName] =
|
|
2980
|
-
const [showOtherTokenModal, setShowOtherTokenModal] =
|
|
2981
|
-
const [showToast, setShowToast] =
|
|
2982
|
-
const eip681 =
|
|
2901
|
+
const [chainName, setChainName] = React9.useState(null);
|
|
2902
|
+
const [showOtherTokenModal, setShowOtherTokenModal] = React9.useState(false);
|
|
2903
|
+
const [showToast, setShowToast] = React9.useState(false);
|
|
2904
|
+
const eip681 = React9.useMemo(() => {
|
|
2983
2905
|
return `ethereum:${props.address}`;
|
|
2984
2906
|
}, [props.address]);
|
|
2985
2907
|
const status = react.useDepositListener({
|
|
@@ -2993,17 +2915,17 @@ function DepositQRView(props) {
|
|
|
2993
2915
|
},
|
|
2994
2916
|
address: props.address
|
|
2995
2917
|
});
|
|
2996
|
-
|
|
2918
|
+
React9.useEffect(() => {
|
|
2997
2919
|
console.log("[DepositQRView] Status changed:", status);
|
|
2998
2920
|
if (status.state === "detected") {
|
|
2999
2921
|
setShowToast(true);
|
|
3000
2922
|
}
|
|
3001
2923
|
}, [status.state]);
|
|
3002
|
-
const getNetworkInfo =
|
|
2924
|
+
const getNetworkInfo = React9.useCallback(
|
|
3003
2925
|
react.createGetNetworkInfo({ client, rpcOverrides: config.rpcOverrides }),
|
|
3004
2926
|
[client, config.rpcOverrides]
|
|
3005
2927
|
);
|
|
3006
|
-
|
|
2928
|
+
React9.useEffect(() => {
|
|
3007
2929
|
let cancelled = false;
|
|
3008
2930
|
const loadChainName = async () => {
|
|
3009
2931
|
try {
|
|
@@ -3025,23 +2947,23 @@ function DepositQRView(props) {
|
|
|
3025
2947
|
const tokenSymbol = props.asset === "native" ? "ETH" : props.asset.symbol;
|
|
3026
2948
|
const displayChainName = chainName || `Chain ${props.chainId}`;
|
|
3027
2949
|
const decimals = props.asset === "native" ? 18 : props.asset.decimals;
|
|
3028
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:relative
|
|
3029
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:mb-
|
|
3030
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-
|
|
2950
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:relative", children: [
|
|
2951
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:mb-4", children: [
|
|
2952
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-xl volr:font-semibold volr:text-slate-900 volr:mb-2", children: t("deposit.qrTitle") }),
|
|
3031
2953
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:inline-flex volr:items-center volr:gap-2 volr:px-3 volr:py-1.5 volr:rounded-lg volr:bg-slate-100", children: [
|
|
3032
2954
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-sm volr:font-medium volr:text-slate-700", children: tokenSymbol }),
|
|
3033
2955
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-slate-400", children: "\u2022" }),
|
|
3034
2956
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-sm volr:text-slate-500", children: displayChainName })
|
|
3035
2957
|
] })
|
|
3036
2958
|
] }),
|
|
3037
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:flex volr:justify-center volr:mb-
|
|
3038
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:relative volr:rounded-
|
|
2959
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:flex volr:justify-center volr:mb-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:relative", children: [
|
|
2960
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:relative volr:rounded-xl volr:bg-white volr:p-3 volr:shadow-sm volr:border volr:border-slate-200/50 volr:z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3039
2961
|
"img",
|
|
3040
2962
|
{
|
|
3041
2963
|
alt: "Deposit QR",
|
|
3042
|
-
width:
|
|
3043
|
-
height:
|
|
3044
|
-
src: `https://api.qrserver.com/v1/create-qr-code/?size=
|
|
2964
|
+
width: 200,
|
|
2965
|
+
height: 200,
|
|
2966
|
+
src: `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(
|
|
3045
2967
|
eip681
|
|
3046
2968
|
)}`,
|
|
3047
2969
|
className: "volr:rounded-lg volr:relative volr:z-10"
|
|
@@ -3049,12 +2971,12 @@ function DepositQRView(props) {
|
|
|
3049
2971
|
) }),
|
|
3050
2972
|
/* @__PURE__ */ jsxRuntime.jsx(DepositQRStatusOverlay, { status: status.state })
|
|
3051
2973
|
] }) }),
|
|
3052
|
-
status.state === "listening" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:items-center volr:justify-center volr:gap-2 volr:mb-
|
|
3053
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:w-1.5 volr:h-1.5 volr:bg-
|
|
3054
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-xs volr:text-slate-
|
|
2974
|
+
status.state === "listening" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:flex volr:items-center volr:justify-center volr:gap-2 volr:mb-3", children: [
|
|
2975
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:w-1.5 volr:h-1.5 volr:bg-slate-500 volr:rounded-full volr:animate-pulse" }),
|
|
2976
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "volr:text-xs volr:text-slate-500", children: t("deposit.listening") })
|
|
3055
2977
|
] }),
|
|
3056
|
-
status.state === "idle" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-xs volr:text-slate-500 volr:text-center volr:mb-
|
|
3057
|
-
status.state === "error" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:text-xs volr:text-red-500 volr:text-center volr:mb-
|
|
2978
|
+
status.state === "idle" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-xs volr:text-slate-500 volr:text-center volr:mb-3", children: "Initializing..." }),
|
|
2979
|
+
status.state === "error" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "volr:text-xs volr:text-red-500 volr:text-center volr:mb-3", children: [
|
|
3058
2980
|
"Error: ",
|
|
3059
2981
|
status.message
|
|
3060
2982
|
] }),
|
|
@@ -3071,7 +2993,7 @@ function DepositQRView(props) {
|
|
|
3071
2993
|
] }) }) }),
|
|
3072
2994
|
status.state === "error" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-xs volr:text-red-500 volr:text-center volr:mb-4", children: status.message })
|
|
3073
2995
|
] }),
|
|
3074
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:pt-
|
|
2996
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:pt-3 volr:border-t volr:border-slate-100", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "volr:text-xs volr:text-slate-500", children: [
|
|
3075
2997
|
t("deposit.noToken"),
|
|
3076
2998
|
" ",
|
|
3077
2999
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3105,33 +3027,78 @@ function DepositQRView(props) {
|
|
|
3105
3027
|
}
|
|
3106
3028
|
var DepositModal = ({
|
|
3107
3029
|
open,
|
|
3108
|
-
onOpenChange
|
|
3030
|
+
onOpenChange,
|
|
3031
|
+
asset
|
|
3109
3032
|
}) => {
|
|
3110
|
-
const {
|
|
3111
|
-
const
|
|
3112
|
-
const
|
|
3113
|
-
const [
|
|
3114
|
-
|
|
3115
|
-
)
|
|
3116
|
-
|
|
3117
|
-
()
|
|
3118
|
-
|
|
3033
|
+
const { user } = react.useVolrContext();
|
|
3034
|
+
const { client } = react.useInternalAuth();
|
|
3035
|
+
const [depositAssets, setDepositAssets] = React9.useState([]);
|
|
3036
|
+
const [isLoading, setIsLoading] = React9.useState(true);
|
|
3037
|
+
const [error, setError] = React9.useState(null);
|
|
3038
|
+
React9.useEffect(() => {
|
|
3039
|
+
if (!open) return;
|
|
3040
|
+
setIsLoading(true);
|
|
3041
|
+
setError(null);
|
|
3042
|
+
client.get("/auth/branding").then((response) => {
|
|
3043
|
+
setDepositAssets(response.depositAssets ?? []);
|
|
3044
|
+
}).catch((err) => {
|
|
3045
|
+
console.error("Failed to fetch deposit assets:", err);
|
|
3046
|
+
setError("Failed to load deposit options");
|
|
3047
|
+
}).finally(() => {
|
|
3048
|
+
setIsLoading(false);
|
|
3049
|
+
});
|
|
3050
|
+
}, [open, client]);
|
|
3051
|
+
const hasAssets = depositAssets.length > 0;
|
|
3052
|
+
const findAssetIndex = (targetAsset) => {
|
|
3053
|
+
if (!targetAsset) return -1;
|
|
3054
|
+
return depositAssets.findIndex(
|
|
3055
|
+
(a) => a.chainId === targetAsset.chainId && (a.token === "native" ? targetAsset.symbol.toUpperCase() === "ETH" : a.token.symbol.toUpperCase() === targetAsset.symbol.toUpperCase())
|
|
3056
|
+
);
|
|
3057
|
+
};
|
|
3058
|
+
const getInitialIndex = () => {
|
|
3059
|
+
if (asset) {
|
|
3060
|
+
const idx = findAssetIndex(asset);
|
|
3061
|
+
if (idx >= 0) return idx;
|
|
3062
|
+
}
|
|
3063
|
+
if (depositAssets.length === 1) return 0;
|
|
3064
|
+
return -1;
|
|
3065
|
+
};
|
|
3066
|
+
const [selectedIdx, setSelectedIdx] = React9.useState(-1);
|
|
3067
|
+
React9.useEffect(() => {
|
|
3068
|
+
if (open && !isLoading && depositAssets.length > 0) {
|
|
3069
|
+
setSelectedIdx(getInitialIndex());
|
|
3070
|
+
}
|
|
3071
|
+
}, [open, isLoading, depositAssets.length, asset]);
|
|
3072
|
+
React9.useEffect(() => {
|
|
3073
|
+
if (!open) {
|
|
3074
|
+
setSelectedIdx(-1);
|
|
3075
|
+
}
|
|
3076
|
+
}, [open]);
|
|
3077
|
+
const selected = React9.useMemo(
|
|
3078
|
+
() => depositAssets[selectedIdx],
|
|
3079
|
+
[depositAssets, selectedIdx]
|
|
3119
3080
|
);
|
|
3120
|
-
const showSelector = hasAssets &&
|
|
3081
|
+
const showSelector = hasAssets && depositAssets.length > 1 && selectedIdx === -1;
|
|
3121
3082
|
const showQR = hasAssets && user?.evmAddress && selectedIdx >= 0;
|
|
3122
|
-
const body =
|
|
3083
|
+
const body = React9.useMemo(() => {
|
|
3084
|
+
if (isLoading) {
|
|
3085
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:py-8", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-500", children: "Loading..." }) });
|
|
3086
|
+
}
|
|
3087
|
+
if (error) {
|
|
3088
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:py-8", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-red-600", children: error }) });
|
|
3089
|
+
}
|
|
3123
3090
|
if (!hasAssets) {
|
|
3124
3091
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:py-8", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-600", children: "No deposit assets configured. Please contact the app developer." }) });
|
|
3125
3092
|
}
|
|
3126
3093
|
if (!user?.evmAddress) {
|
|
3127
3094
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "volr:text-center volr:py-8", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "volr:text-sm volr:text-slate-600", children: "Wallet address is not ready. Please finish wallet setup first." }) });
|
|
3128
3095
|
}
|
|
3129
|
-
if (
|
|
3096
|
+
if (depositAssets.length === 1) {
|
|
3130
3097
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3131
3098
|
DepositQRView,
|
|
3132
3099
|
{
|
|
3133
|
-
chainId:
|
|
3134
|
-
asset:
|
|
3100
|
+
chainId: depositAssets[0].chainId,
|
|
3101
|
+
asset: depositAssets[0].token,
|
|
3135
3102
|
address: user.evmAddress,
|
|
3136
3103
|
onBack: void 0
|
|
3137
3104
|
}
|
|
@@ -3141,7 +3108,7 @@ var DepositModal = ({
|
|
|
3141
3108
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3142
3109
|
AssetSelectView,
|
|
3143
3110
|
{
|
|
3144
|
-
assets:
|
|
3111
|
+
assets: depositAssets,
|
|
3145
3112
|
onSelect: (idx) => setSelectedIdx(idx)
|
|
3146
3113
|
}
|
|
3147
3114
|
);
|
|
@@ -3156,18 +3123,20 @@ var DepositModal = ({
|
|
|
3156
3123
|
}
|
|
3157
3124
|
);
|
|
3158
3125
|
}, [
|
|
3126
|
+
isLoading,
|
|
3127
|
+
error,
|
|
3159
3128
|
hasAssets,
|
|
3160
3129
|
selected,
|
|
3161
3130
|
selectedIdx,
|
|
3162
3131
|
showSelector,
|
|
3163
|
-
|
|
3132
|
+
depositAssets,
|
|
3164
3133
|
user?.evmAddress
|
|
3165
3134
|
]);
|
|
3166
3135
|
return /* @__PURE__ */ jsxRuntime.jsxs(Modal, { open, onOpenChange, children: [
|
|
3167
3136
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3168
3137
|
ModalHeader,
|
|
3169
3138
|
{
|
|
3170
|
-
back: showQR &&
|
|
3139
|
+
back: showQR && depositAssets.length > 1,
|
|
3171
3140
|
onBack: showQR ? () => setSelectedIdx(-1) : void 0,
|
|
3172
3141
|
onClose: () => onOpenChange(false)
|
|
3173
3142
|
}
|
|
@@ -3175,9 +3144,9 @@ var DepositModal = ({
|
|
|
3175
3144
|
body
|
|
3176
3145
|
] });
|
|
3177
3146
|
};
|
|
3178
|
-
var VolrUIContext =
|
|
3147
|
+
var VolrUIContext = React9__default.default.createContext(null);
|
|
3179
3148
|
var useVolrUI = () => {
|
|
3180
|
-
const context =
|
|
3149
|
+
const context = React9.useContext(VolrUIContext);
|
|
3181
3150
|
if (!context) {
|
|
3182
3151
|
throw new Error("useVolrUI must be used within VolrUIProvider");
|
|
3183
3152
|
}
|
|
@@ -3232,16 +3201,15 @@ var VolrUIProvider = ({
|
|
|
3232
3201
|
socialProviders = ["google", "twitter", "apple"],
|
|
3233
3202
|
branding,
|
|
3234
3203
|
keyStorageType = "passkey"
|
|
3235
|
-
// Default to passkey if not specified
|
|
3236
3204
|
} = config;
|
|
3237
3205
|
const providerPolicy = config.providerPolicy ?? {
|
|
3238
3206
|
enforceOnFirstLogin: true
|
|
3239
3207
|
};
|
|
3240
|
-
const [showOnboarding, setShowOnboarding] =
|
|
3241
|
-
const [keyStorageTypeError, setKeyStorageTypeError] =
|
|
3208
|
+
const [showOnboarding, setShowOnboarding] = React9.useState(false);
|
|
3209
|
+
const [keyStorageTypeError, setKeyStorageTypeError] = React9.useState(
|
|
3242
3210
|
null
|
|
3243
3211
|
);
|
|
3244
|
-
|
|
3212
|
+
React9.useEffect(() => {
|
|
3245
3213
|
if (providerPolicy.enforceOnFirstLogin !== false && !keyStorageType) {
|
|
3246
3214
|
const errorMessage = "keyStorageType must be specified in VolrUIProvider props. Please set keyStorageType prop in VolrUIProvider.";
|
|
3247
3215
|
console.error(errorMessage);
|
|
@@ -3278,7 +3246,7 @@ var VolrUIProvider = ({
|
|
|
3278
3246
|
onHideOnboarding: () => setShowOnboarding(false)
|
|
3279
3247
|
}
|
|
3280
3248
|
),
|
|
3281
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3249
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccountModalPortal, {}),
|
|
3282
3250
|
/* @__PURE__ */ jsxRuntime.jsx(DepositModalPortal, {}),
|
|
3283
3251
|
showOnboarding && keyStorageType && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3284
3252
|
Modal,
|
|
@@ -3303,11 +3271,11 @@ var VolrUIProvider = ({
|
|
|
3303
3271
|
}
|
|
3304
3272
|
) }) });
|
|
3305
3273
|
};
|
|
3306
|
-
function
|
|
3274
|
+
function AccountModalPortal() {
|
|
3307
3275
|
const { isOpen, mode, close } = useVolrModal();
|
|
3308
|
-
const [portalRoot, setPortalRoot] =
|
|
3309
|
-
const [error, setError] =
|
|
3310
|
-
|
|
3276
|
+
const [portalRoot, setPortalRoot] = React9.useState(null);
|
|
3277
|
+
const [error, setError] = React9.useState(null);
|
|
3278
|
+
React9.useEffect(() => {
|
|
3311
3279
|
if (typeof window === "undefined") return;
|
|
3312
3280
|
let root = document.getElementById("volr-modal-root");
|
|
3313
3281
|
if (!root) {
|
|
@@ -3323,21 +3291,20 @@ function LoginModalPortal() {
|
|
|
3323
3291
|
};
|
|
3324
3292
|
}, []);
|
|
3325
3293
|
const handleClose = () => {
|
|
3326
|
-
console.log("[LoginModalPortal] handleClose called");
|
|
3327
3294
|
setError(null);
|
|
3328
3295
|
close();
|
|
3329
3296
|
};
|
|
3330
3297
|
const handleError = (err) => {
|
|
3331
|
-
console.error("[
|
|
3298
|
+
console.error("[AccountModal] Error:", err);
|
|
3332
3299
|
setError(err);
|
|
3333
3300
|
};
|
|
3334
3301
|
if (!portalRoot) return null;
|
|
3335
3302
|
return reactDom.createPortal(
|
|
3336
3303
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3337
3304
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3338
|
-
|
|
3305
|
+
AccountModal,
|
|
3339
3306
|
{
|
|
3340
|
-
isOpen: isOpen && mode === "
|
|
3307
|
+
isOpen: isOpen && mode === "account",
|
|
3341
3308
|
onClose: handleClose,
|
|
3342
3309
|
onError: handleError
|
|
3343
3310
|
}
|
|
@@ -3365,9 +3332,11 @@ function LoginModalPortal() {
|
|
|
3365
3332
|
);
|
|
3366
3333
|
}
|
|
3367
3334
|
function DepositModalPortal() {
|
|
3368
|
-
const { isOpen, mode, close } = useVolrModal();
|
|
3369
|
-
const
|
|
3370
|
-
|
|
3335
|
+
const { isOpen, mode, asset, close } = useVolrModal();
|
|
3336
|
+
const { user } = react.useVolrContext();
|
|
3337
|
+
const [portalRoot, setPortalRoot] = React9.useState(null);
|
|
3338
|
+
const [showLogin, setShowLogin] = React9.useState(false);
|
|
3339
|
+
React9.useEffect(() => {
|
|
3371
3340
|
if (typeof window === "undefined") return;
|
|
3372
3341
|
let root = document.getElementById("volr-modal-root");
|
|
3373
3342
|
if (!root) {
|
|
@@ -3382,9 +3351,35 @@ function DepositModalPortal() {
|
|
|
3382
3351
|
}
|
|
3383
3352
|
};
|
|
3384
3353
|
}, []);
|
|
3354
|
+
React9.useEffect(() => {
|
|
3355
|
+
if (isOpen && mode === "deposit" && !user) {
|
|
3356
|
+
setShowLogin(true);
|
|
3357
|
+
} else {
|
|
3358
|
+
setShowLogin(false);
|
|
3359
|
+
}
|
|
3360
|
+
}, [isOpen, mode, user]);
|
|
3385
3361
|
if (!portalRoot) return null;
|
|
3362
|
+
if (showLogin) {
|
|
3363
|
+
return reactDom.createPortal(
|
|
3364
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3365
|
+
AccountModal,
|
|
3366
|
+
{
|
|
3367
|
+
isOpen: isOpen && mode === "deposit",
|
|
3368
|
+
onClose: close
|
|
3369
|
+
}
|
|
3370
|
+
),
|
|
3371
|
+
portalRoot
|
|
3372
|
+
);
|
|
3373
|
+
}
|
|
3386
3374
|
return reactDom.createPortal(
|
|
3387
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3375
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3376
|
+
DepositModal,
|
|
3377
|
+
{
|
|
3378
|
+
open: isOpen && mode === "deposit",
|
|
3379
|
+
onOpenChange: (open) => !open && close(),
|
|
3380
|
+
asset
|
|
3381
|
+
}
|
|
3382
|
+
),
|
|
3388
3383
|
portalRoot
|
|
3389
3384
|
);
|
|
3390
3385
|
}
|
|
@@ -3395,12 +3390,12 @@ function OnboardingChecker({
|
|
|
3395
3390
|
onHideOnboarding
|
|
3396
3391
|
}) {
|
|
3397
3392
|
const { user, provider, isLoading } = react.useVolrContext();
|
|
3398
|
-
const { isOpen:
|
|
3399
|
-
|
|
3393
|
+
const { isOpen: isModalOpen } = useVolrModal();
|
|
3394
|
+
React9.useEffect(() => {
|
|
3400
3395
|
if (isLoading) {
|
|
3401
3396
|
return;
|
|
3402
3397
|
}
|
|
3403
|
-
if (
|
|
3398
|
+
if (isModalOpen) {
|
|
3404
3399
|
onHideOnboarding();
|
|
3405
3400
|
return;
|
|
3406
3401
|
}
|
|
@@ -3412,7 +3407,7 @@ function OnboardingChecker({
|
|
|
3412
3407
|
if (enforceSelection) {
|
|
3413
3408
|
if (!keyStorageType) {
|
|
3414
3409
|
console.error(
|
|
3415
|
-
"keyStorageType must be specified in VolrUIProvider props.
|
|
3410
|
+
"keyStorageType must be specified in VolrUIProvider props."
|
|
3416
3411
|
);
|
|
3417
3412
|
return;
|
|
3418
3413
|
}
|
|
@@ -3425,7 +3420,7 @@ function OnboardingChecker({
|
|
|
3425
3420
|
user,
|
|
3426
3421
|
provider,
|
|
3427
3422
|
isLoading,
|
|
3428
|
-
|
|
3423
|
+
isModalOpen,
|
|
3429
3424
|
enforceSelection,
|
|
3430
3425
|
keyStorageType,
|
|
3431
3426
|
onShowOnboarding,
|
|
@@ -3435,7 +3430,7 @@ function OnboardingChecker({
|
|
|
3435
3430
|
}
|
|
3436
3431
|
function useSwitchNetwork() {
|
|
3437
3432
|
const { client } = react.useInternalAuth();
|
|
3438
|
-
return
|
|
3433
|
+
return React9.useCallback(
|
|
3439
3434
|
async (chainId) => {
|
|
3440
3435
|
if (typeof window === "undefined" || !window.ethereum) {
|
|
3441
3436
|
throw new Error("No wallet found");
|