@alviere/ui 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,13 +11,15 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
12
  var _a, _commit_callbacks, _discard_callbacks, _pending, _blocking_pending, _deferred, _dirty_effects, _maybe_dirty_effects, _Batch_instances, traverse_effect_tree_fn, defer_effects_fn, clear_marked_fn, resolve_fn, commit_fn, _pending2, _anchor, _hydrate_open, _props, _children, _effect, _main_effect, _pending_effect, _failed_effect, _offscreen_fragment, _pending_anchor, _local_pending_count, _pending_count, _is_creating_fallback, _effect_pending, _effect_pending_subscriber, _Boundary_instances, hydrate_resolved_content_fn, hydrate_pending_content_fn, get_anchor_fn, run_fn, show_pending_snippet_fn, update_pending_count_fn, _batches, _onscreen, _offscreen, _outroing, _transition, _commit, _discard, _events, _instance;
13
13
  import { AlviereCore, AlcoreApiError, AlcoreErrorCodes, isCriticalError } from "@alviere/core";
14
- import { onMount, untrack as untrack$1, createEventDispatcher } from "svelte";
14
+ import { onMount, createEventDispatcher, untrack as untrack$1 } from "svelte";
15
15
  const PUBLIC_VERSION = "5";
16
16
  if (typeof window !== "undefined") {
17
17
  ((_a = window.__svelte ?? (window.__svelte = {})).v ?? (_a.v = /* @__PURE__ */ new Set())).add(PUBLIC_VERSION);
18
18
  }
19
19
  const EACH_ITEM_REACTIVE = 1;
20
20
  const EACH_INDEX_REACTIVE = 1 << 1;
21
+ const EACH_IS_CONTROLLED = 1 << 2;
22
+ const EACH_IS_ANIMATED = 1 << 3;
21
23
  const EACH_ITEM_IMMUTABLE = 1 << 4;
22
24
  const PROPS_IS_IMMUTABLE = 1;
23
25
  const PROPS_IS_UPDATED = 1 << 2;
@@ -1285,7 +1287,10 @@ function each(node, flags2, get_collection, get_key, render_fn, fallback_fn = nu
1285
1287
  var anchor = node;
1286
1288
  var items = /* @__PURE__ */ new Map();
1287
1289
  var first = null;
1288
- {
1290
+ var is_controlled = (flags2 & EACH_IS_CONTROLLED) !== 0;
1291
+ var is_reactive_value = (flags2 & EACH_ITEM_REACTIVE) !== 0;
1292
+ var is_reactive_index = (flags2 & EACH_INDEX_REACTIVE) !== 0;
1293
+ if (is_controlled) {
1289
1294
  var parent_node = (
1290
1295
  /** @type {Element} */
1291
1296
  node
@@ -1356,10 +1361,16 @@ function each(node, flags2, get_collection, get_key, render_fn, fallback_fn = nu
1356
1361
  var key = get_key(value, i);
1357
1362
  var item = first_run ? null : items.get(key);
1358
1363
  if (item) {
1359
- {
1364
+ if (is_reactive_value) {
1360
1365
  internal_set(item.v, value);
1361
1366
  }
1362
- {
1367
+ if (is_reactive_index) {
1368
+ internal_set(
1369
+ /** @type {Value<number>} */
1370
+ item.i,
1371
+ i
1372
+ );
1373
+ } else {
1363
1374
  item.i = i;
1364
1375
  }
1365
1376
  if (defer) {
@@ -1434,17 +1445,32 @@ function each(node, flags2, get_collection, get_key, render_fn, fallback_fn = nu
1434
1445
  }
1435
1446
  }
1436
1447
  function reconcile(state2, array, anchor, flags2, get_key) {
1448
+ var _a2, _b, _c, _d;
1449
+ var is_animated = (flags2 & EACH_IS_ANIMATED) !== 0;
1437
1450
  var length = array.length;
1438
1451
  var items = state2.items;
1439
1452
  var current = state2.first;
1440
1453
  var seen;
1441
1454
  var prev = null;
1455
+ var to_animate;
1442
1456
  var matched = [];
1443
1457
  var stashed = [];
1444
1458
  var value;
1445
1459
  var key;
1446
1460
  var item;
1447
1461
  var i;
1462
+ if (is_animated) {
1463
+ for (i = 0; i < length; i += 1) {
1464
+ value = array[i];
1465
+ key = get_key(value, i);
1466
+ item = /** @type {EachItem} */
1467
+ items.get(key);
1468
+ if (item.o) {
1469
+ (_a2 = item.a) == null ? void 0 : _a2.measure();
1470
+ (to_animate ?? (to_animate = /* @__PURE__ */ new Set())).add(item);
1471
+ }
1472
+ }
1473
+ }
1448
1474
  for (i = 0; i < length; i += 1) {
1449
1475
  value = array[i];
1450
1476
  key = get_key(value, i);
@@ -1465,6 +1491,10 @@ function reconcile(state2, array, anchor, flags2, get_key) {
1465
1491
  }
1466
1492
  if ((item.e.f & INERT) !== 0) {
1467
1493
  resume_effect(item.e);
1494
+ if (is_animated) {
1495
+ (_b = item.a) == null ? void 0 : _b.unfix();
1496
+ (to_animate ?? (to_animate = /* @__PURE__ */ new Set())).delete(item);
1497
+ }
1468
1498
  }
1469
1499
  if (item !== current) {
1470
1500
  if (seen !== void 0 && seen.has(item)) {
@@ -1526,10 +1556,27 @@ function reconcile(state2, array, anchor, flags2, get_key) {
1526
1556
  }
1527
1557
  var destroy_length = to_destroy.length;
1528
1558
  if (destroy_length > 0) {
1529
- var controlled_anchor = length === 0 ? anchor : null;
1559
+ var controlled_anchor = (flags2 & EACH_IS_CONTROLLED) !== 0 && length === 0 ? anchor : null;
1560
+ if (is_animated) {
1561
+ for (i = 0; i < destroy_length; i += 1) {
1562
+ (_c = to_destroy[i].a) == null ? void 0 : _c.measure();
1563
+ }
1564
+ for (i = 0; i < destroy_length; i += 1) {
1565
+ (_d = to_destroy[i].a) == null ? void 0 : _d.fix();
1566
+ }
1567
+ }
1530
1568
  pause_effects(state2, to_destroy, controlled_anchor);
1531
1569
  }
1532
1570
  }
1571
+ if (is_animated) {
1572
+ queue_micro_task(() => {
1573
+ var _a3;
1574
+ if (to_animate === void 0) return;
1575
+ for (item of to_animate) {
1576
+ (_a3 = item.a) == null ? void 0 : _a3.apply();
1577
+ }
1578
+ });
1579
+ }
1533
1580
  }
1534
1581
  function create_item(anchor, prev, value, key, index2, render_fn, flags2, get_collection) {
1535
1582
  var reactive = (flags2 & EACH_ITEM_REACTIVE) !== 0;
@@ -6295,18 +6342,18 @@ const amexLogo = '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2
6295
6342
  const discoverLogo = '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Discover</title><path d="M14.58 12a2.023 2.023 0 1 1-2.025-2.023h.002c1.118 0 2.023.906 2.023 2.023zm-5.2-2.001c-1.124 0-2.025.884-2.025 1.99 0 1.118.878 1.984 2.007 1.984.319 0 .593-.063.93-.221v-.873c-.296.297-.559.416-.895.416-.747 0-1.277-.542-1.277-1.312 0-.73.547-1.306 1.243-1.306.354 0 .622.126.93.428v-.873a1.898 1.898 0 0 0-.913-.233zm-3.352 1.545c-.445-.165-.576-.273-.576-.479 0-.239.233-.422.553-.422.222 0 .405.091.598.308l.388-.508a1.665 1.665 0 0 0-1.117-.422c-.673 0-1.186.467-1.186 1.089 0 .524.239.792.936 1.043.291.103.438.171.513.217a.456.456 0 0 1 .222.394c0 .308-.245.536-.576.536-.354 0-.639-.177-.809-.507l-.479.461c.342.502.752.724 1.317.724.771 0 1.311-.513 1.311-1.249-.002-.603-.252-.876-1.095-1.185zM24 10.3a.29.29 0 0 1-.288.291.29.29 0 0 1-.291-.291v-.003A.29.29 0 1 1 24 10.3zm-.059.001a.235.235 0 0 0-.231-.239.234.234 0 0 0-.232.239c0 .132.104.239.232.239a.235.235 0 0 0 .231-.239zM3.472 13.887h.742v-3.803h-.742v3.803zm12.702-1.248l-1.014-2.554h-.81l1.614 3.9h.399l1.643-3.9h-.804l-1.028 2.554zm2.166 1.248h2.104v-.644h-1.362v-1.027h1.312v-.644h-1.312v-.844h1.362v-.644H18.34v3.803zm5.409-3.557l.11.138h-.097l-.094-.13v.13h-.08v-.334h.107c.081 0 .126.036.126.103.001.046-.025.08-.072.093zm-.006-.092c0-.029-.021-.043-.06-.043h-.014v.087h.014c.039 0 .06-.014.06-.044zm-1.228 2.047l1.197 1.602H22.8l-1.027-1.528h-.097v1.528h-.741v-3.803h1.1c.855 0 1.346.411 1.346 1.123 0 .583-.308.965-.866 1.078zm.103-1.038c0-.37-.251-.563-.713-.563h-.228v1.152h.217c.473-.001.724-.207.724-.589zm-19.487.742a1.91 1.91 0 0 1-.69 1.46c-.365.303-.781.439-1.357.439H.001v-3.803H1.09c1.202 0 2.041.781 2.041 1.904zm-.764-.006c0-.364-.154-.718-.411-.947-.245-.222-.536-.308-1.015-.308H.742v2.515h.199c.479 0 .782-.092 1.015-.302.256-.228.411-.593.411-.958z"/></svg>';
6296
6343
  const dinersLogo = '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Diners Club</title><path d="M16.506 11.982a6.026 6.026 0 0 0-3.866-5.618V17.6a6.025 6.025 0 0 0 3.866-5.618zM8.33 17.598V6.365a6.03 6.03 0 0 0-3.863 5.617 6.028 6.028 0 0 0 3.863 5.616zm2.156-15.113A9.497 9.497 0 0 0 .99 11.982a9.495 9.495 0 0 0 9.495 9.494c5.245 0 9.495-4.25 9.496-9.494a9.499 9.499 0 0 0-9.496-9.497Zm-.023 19.888C4.723 22.4 0 17.75 0 12.09 0 5.905 4.723 1.626 10.463 1.627h2.69C18.822 1.627 24 5.903 24 12.09c0 5.658-5.176 10.283-10.848 10.283"/></svg>';
6297
6344
  const jcbLogo = '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>JCB</title><path d="M13.05 9.8643c.9723.0736 1.7257.3671 2.3545.6843v-1.31s-1.2577-.3162-2.4408-.368c-4.1256-.1849-5.295 1.4344-5.295 3.1292 0 1.6947 1.1694 3.3145 5.295 3.1296 1.1831-.0536 2.4408-.3694 2.4408-.3694v-1.3086c-.6193.3081-1.3826.6107-2.3545.683-1.6793.1272-2.6898-.6907-2.6898-2.1342 0-1.4448 1.0105-2.2613 2.6898-2.1354m7.685 4.1223c-.0513.0105-.1581.02-.215.02h-1.8005V12.376H20.52c.0568 0 .1636.01.2149.02a.8056.8056 0 01.6325.7951c0 .4162-.2872.721-.6325.796zm-2.0155-4.0374h1.6325c.059 0 .1454.0077.1772.0137.3376.0572.6256.3307.6256.7392 0 .409-.288.6815-.626.7392a1.571 1.571 0 01-.1773.0137h-1.6311V9.9506zm3.4994 1.9856v-.0364c.9133-.1331 1.4149-.726 1.4149-1.4199 0-.8828-.7343-1.3916-1.7293-1.4416-.0772-.0032-.203-.011-.3044-.011h-5.3323v5.9467h5.7548c1.13 0 1.9774-.6043 1.9774-1.5466 0-.8701-.7724-1.4222-1.781-1.4917zm-17.8644.6788c0 .8787-.5906 1.5311-1.6656 1.5311-.917 0-1.8174-.2726-2.6889-.6938V14.76s1.4021.383 3.191.383c2.9714 0 3.8374-1.125 3.8374-2.529V9.0266H4.3541v3.5876Z"/></svg>';
6298
- var root_2$b = /* @__PURE__ */ from_html(`<span class="alviere-card-pan-input__required svelte-36vkx7">*</span>`);
6299
- var root_1$g = /* @__PURE__ */ from_html(`<label class="alviere-card-pan-input__label svelte-36vkx7"> <!></label>`);
6300
- var root_3$b = /* @__PURE__ */ from_html(`<div class="alviere-card-pan-input__card-icon svelte-36vkx7"><!></div>`);
6301
- var root_4$8 = /* @__PURE__ */ from_html(`<div class="alviere-card-pan-input__error svelte-36vkx7" role="alert"> </div>`);
6302
- var root$g = /* @__PURE__ */ from_html(`<div><!> <div><input type="text" inputmode="numeric" class="alviere-card-pan-input__input svelte-36vkx7" spellcheck="false" maxlength="23"/> <!></div> <!></div>`);
6303
- const $$css$i = {
6345
+ var root_2$c = /* @__PURE__ */ from_html(`<span class="alviere-card-pan-input__required svelte-36vkx7">*</span>`);
6346
+ var root_1$h = /* @__PURE__ */ from_html(`<label class="alviere-card-pan-input__label svelte-36vkx7"> <!></label>`);
6347
+ var root_3$c = /* @__PURE__ */ from_html(`<div class="alviere-card-pan-input__card-icon svelte-36vkx7"><!></div>`);
6348
+ var root_4$9 = /* @__PURE__ */ from_html(`<div class="alviere-card-pan-input__error svelte-36vkx7" role="alert"> </div>`);
6349
+ var root$h = /* @__PURE__ */ from_html(`<div><!> <div><input type="text" inputmode="numeric" class="alviere-card-pan-input__input svelte-36vkx7" spellcheck="false" maxlength="23"/> <!></div> <!></div>`);
6350
+ const $$css$j = {
6304
6351
  hash: "svelte-36vkx7",
6305
6352
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-card-pan-input.svelte-36vkx7 {position:relative;width:100%;}.alviere-card-pan-input__label.svelte-36vkx7 {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-card-pan-input__required.svelte-36vkx7 {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-card-pan-input__error.svelte-36vkx7 {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-card-pan-input__wrapper.svelte-36vkx7 {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-card-pan-input__wrapper--focused.svelte-36vkx7 {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-card-pan-input__wrapper--disabled.svelte-36vkx7 {background:#f4f4f5;cursor:not-allowed;}.alviere-card-pan-input__wrapper--readonly.svelte-36vkx7 {background:#f4f4f5;cursor:default;}.alviere-card-pan-input__wrapper--valid.svelte-36vkx7 {border-color:#436b1d;}.alviere-card-pan-input__wrapper--invalid.svelte-36vkx7 {border-color:#b3311f;}.alviere-card-pan-input__input.svelte-36vkx7 {flex:1;width:100%;height:100%;min-height:2.25rem;padding:1rem 0.75rem 0;border:none;background:transparent;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;font-size:1.25rem;line-height:1.5rem;color:#18181b;outline:none;}.alviere-card-pan-input__input.svelte-36vkx7::placeholder {color:#71717a;opacity:0;transition:opacity 150ms ease-in-out;transition-delay:0.15s;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;}.alviere-card-pan-input__input.svelte-36vkx7:disabled {cursor:not-allowed;color:#52525b;}.alviere-card-pan-input__input.svelte-36vkx7:read-only {cursor:default;color:#3f3f46;}.alviere-card-pan-input__validation-messages.svelte-36vkx7 {min-height:1.40625rem;display:flex;justify-content:space-between;align-items:center;padding-top:0.25rem;}.alviere-card-pan-input--sm.svelte-36vkx7 .alviere-card-pan-input__wrapper:where(.svelte-36vkx7) {min-height:2.5rem;}.alviere-card-pan-input--sm.svelte-36vkx7 .alviere-card-pan-input__input:where(.svelte-36vkx7) {font-size:1.125rem;padding:0.25rem 0.75rem;}.alviere-card-pan-input--sm.svelte-36vkx7 .alviere-card-pan-input__label:where(.svelte-36vkx7) {font-size:1rem;}.alviere-card-pan-input--md.svelte-36vkx7 .alviere-card-pan-input__wrapper:where(.svelte-36vkx7) {min-height:3.25rem;}.alviere-card-pan-input--md.svelte-36vkx7 .alviere-card-pan-input__input:where(.svelte-36vkx7) {font-size:1rem;}.alviere-card-pan-input--lg.svelte-36vkx7 .alviere-card-pan-input__wrapper:where(.svelte-36vkx7) {min-height:3.75rem;}.alviere-card-pan-input--lg.svelte-36vkx7 .alviere-card-pan-input__input:where(.svelte-36vkx7) {font-size:1.5rem;padding:0.875rem 0.75rem;}.alviere-card-pan-input--lg.svelte-36vkx7 .alviere-card-pan-input__label:where(.svelte-36vkx7) {font-size:1.25rem;}.alviere-card-pan-input.svelte-36vkx7:focus-within .alviere-card-pan-input__wrapper:where(.svelte-36vkx7):not(--disabled):not(--readonly) {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-card-pan-input__input.svelte-36vkx7::placeholder {font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;}.alviere-card-pan-input__card-icon.svelte-36vkx7 {display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;margin-right:2rem;opacity:0.8;}.alviere-card-pan-input__card-icon.svelte-36vkx7 svg {width:100%;height:100%;fill:currentColor;display:block;}`
6306
6353
  };
6307
6354
  function CardPanInput($$anchor, $$props) {
6308
6355
  push($$props, true);
6309
- append_styles$1($$anchor, $$css$i);
6356
+ append_styles$1($$anchor, $$css$j);
6310
6357
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, "Card Number"), placeholder = prop($$props, "placeholder", 15, "Card number"), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, "cc-number"), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({}));
6311
6358
  const baseInput = createEnhancedBaseInputMixin({
6312
6359
  value: value(),
@@ -6623,16 +6670,16 @@ function CardPanInput($$anchor, $$props) {
6623
6670
  flushSync();
6624
6671
  }
6625
6672
  };
6626
- var div = root$g();
6673
+ var div = root$h();
6627
6674
  var node = child(div);
6628
6675
  {
6629
6676
  var consequent_1 = ($$anchor2) => {
6630
- var label_1 = root_1$g();
6677
+ var label_1 = root_1$h();
6631
6678
  var text2 = child(label_1);
6632
6679
  var node_1 = sibling(text2);
6633
6680
  {
6634
6681
  var consequent = ($$anchor3) => {
6635
- var span = root_2$b();
6682
+ var span = root_2$c();
6636
6683
  append($$anchor3, span);
6637
6684
  };
6638
6685
  if_block(node_1, ($$render) => {
@@ -6663,7 +6710,7 @@ function CardPanInput($$anchor, $$props) {
6663
6710
  var node_2 = sibling(input_1, 2);
6664
6711
  {
6665
6712
  var consequent_2 = ($$anchor2) => {
6666
- var div_2 = root_3$b();
6713
+ var div_2 = root_3$c();
6667
6714
  var node_3 = child(div_2);
6668
6715
  html(node_3, () => get$1(detectedCardType).icon);
6669
6716
  reset(div_2);
@@ -6678,7 +6725,7 @@ function CardPanInput($$anchor, $$props) {
6678
6725
  var node_4 = sibling(div_1, 2);
6679
6726
  {
6680
6727
  var consequent_3 = ($$anchor2) => {
6681
- var div_3 = root_4$8();
6728
+ var div_3 = root_4$9();
6682
6729
  var text_1 = child(div_3, true);
6683
6730
  reset(div_3);
6684
6731
  template_effect(() => {
@@ -6750,18 +6797,18 @@ customElements.define("alviere-card-pan-input", create_custom_element(
6750
6797
  ],
6751
6798
  true
6752
6799
  ));
6753
- var root_2$a = /* @__PURE__ */ from_html(`<span class="alviere-cvv-input__required svelte-15mfii7">*</span>`);
6754
- var root_1$f = /* @__PURE__ */ from_html(`<label class="alviere-cvv-input__label svelte-15mfii7"> <!></label>`);
6755
- var root_3$a = /* @__PURE__ */ from_html(`<div class="alviere-cvv-input__code-type svelte-15mfii7"> </div>`);
6756
- var root_4$7 = /* @__PURE__ */ from_html(`<div class="alviere-cvv-input__error svelte-15mfii7" role="alert"> </div>`);
6757
- var root$f = /* @__PURE__ */ from_html(`<div><!> <div><input type="text" inputmode="numeric" class="alviere-cvv-input__input svelte-15mfii7" spellcheck="false"/> <!></div> <!></div>`);
6758
- const $$css$h = {
6800
+ var root_2$b = /* @__PURE__ */ from_html(`<span class="alviere-cvv-input__required svelte-15mfii7">*</span>`);
6801
+ var root_1$g = /* @__PURE__ */ from_html(`<label class="alviere-cvv-input__label svelte-15mfii7"> <!></label>`);
6802
+ var root_3$b = /* @__PURE__ */ from_html(`<div class="alviere-cvv-input__code-type svelte-15mfii7"> </div>`);
6803
+ var root_4$8 = /* @__PURE__ */ from_html(`<div class="alviere-cvv-input__error svelte-15mfii7" role="alert"> </div>`);
6804
+ var root$g = /* @__PURE__ */ from_html(`<div><!> <div><input type="text" inputmode="numeric" class="alviere-cvv-input__input svelte-15mfii7" spellcheck="false"/> <!></div> <!></div>`);
6805
+ const $$css$i = {
6759
6806
  hash: "svelte-15mfii7",
6760
6807
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-cvv-input.svelte-15mfii7 {position:relative;width:100%;}.alviere-cvv-input__label.svelte-15mfii7 {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-cvv-input__required.svelte-15mfii7 {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-cvv-input__error.svelte-15mfii7 {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-cvv-input__wrapper.svelte-15mfii7 {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-cvv-input__wrapper--focused.svelte-15mfii7 {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-cvv-input__wrapper--disabled.svelte-15mfii7 {background:#f4f4f5;cursor:not-allowed;}.alviere-cvv-input__wrapper--readonly.svelte-15mfii7 {background:#f4f4f5;cursor:default;}.alviere-cvv-input__wrapper--valid.svelte-15mfii7 {border-color:#436b1d;}.alviere-cvv-input__wrapper--invalid.svelte-15mfii7 {border-color:#b3311f;}.alviere-cvv-input__input.svelte-15mfii7 {flex:1;width:100%;height:100%;min-height:2.25rem;padding:1rem 0.75rem 0;border:none;background:transparent;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;font-size:1.25rem;line-height:1.5rem;color:#18181b;outline:none;}.alviere-cvv-input__input.svelte-15mfii7::placeholder {color:#71717a;opacity:0;transition:opacity 150ms ease-in-out;transition-delay:0.15s;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;}.alviere-cvv-input__input.svelte-15mfii7:disabled {cursor:not-allowed;color:#52525b;}.alviere-cvv-input__input.svelte-15mfii7:read-only {cursor:default;color:#3f3f46;}.alviere-cvv-input__validation-messages.svelte-15mfii7 {min-height:1.40625rem;display:flex;justify-content:space-between;align-items:center;padding-top:0.25rem;}.alviere-cvv-input--sm.svelte-15mfii7 .alviere-cvv-input__wrapper:where(.svelte-15mfii7) {min-height:2.5rem;}.alviere-cvv-input--sm.svelte-15mfii7 .alviere-cvv-input__input:where(.svelte-15mfii7) {font-size:1.125rem;padding:0.25rem 0.75rem;}.alviere-cvv-input--sm.svelte-15mfii7 .alviere-cvv-input__label:where(.svelte-15mfii7) {font-size:1rem;}.alviere-cvv-input--md.svelte-15mfii7 .alviere-cvv-input__wrapper:where(.svelte-15mfii7) {min-height:3.25rem;}.alviere-cvv-input--md.svelte-15mfii7 .alviere-cvv-input__input:where(.svelte-15mfii7) {font-size:1rem;}.alviere-cvv-input--lg.svelte-15mfii7 .alviere-cvv-input__wrapper:where(.svelte-15mfii7) {min-height:3.75rem;}.alviere-cvv-input--lg.svelte-15mfii7 .alviere-cvv-input__input:where(.svelte-15mfii7) {font-size:1.5rem;padding:0.875rem 0.75rem;}.alviere-cvv-input--lg.svelte-15mfii7 .alviere-cvv-input__label:where(.svelte-15mfii7) {font-size:1.25rem;}.alviere-cvv-input.svelte-15mfii7:focus-within .alviere-cvv-input__wrapper:where(.svelte-15mfii7):not(--disabled):not(--readonly) {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-cvv-input__input.svelte-15mfii7 {text-align:center;letter-spacing:0.125em;}.alviere-cvv-input__input.svelte-15mfii7::placeholder {letter-spacing:0.125em;}.alviere-cvv-input__code-type.svelte-15mfii7 {display:flex;align-items:center;justify-content:center;padding:0.25rem 0.5rem;margin-right:1.5rem;background:#f4f4f5;border-radius:0.125rem;font-size:1rem;font-weight:500;color:#3f3f46;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;}.alviere-cvv-input--sm.svelte-15mfii7 .alviere-cvv-input__code-type:where(.svelte-15mfii7) {font-size:1rem;padding:0.125rem 0.375rem;}.alviere-cvv-input--lg.svelte-15mfii7 .alviere-cvv-input__code-type:where(.svelte-15mfii7) {font-size:1.125rem;padding:0.375rem 0.625rem;}.alviere-cvv-input.svelte-15mfii7 .alviere-cvv-input__input:where(.svelte-15mfii7) {user-select:none;}`
6761
6808
  };
6762
6809
  function CardCVVInput($$anchor, $$props) {
6763
6810
  push($$props, true);
6764
- append_styles$1($$anchor, $$css$h);
6811
+ append_styles$1($$anchor, $$css$i);
6765
6812
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, "Security Code"), placeholder = prop($$props, "placeholder", 15, "123"), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, "cc-csc"), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({})), cardType = prop($$props, "cardType", 15, "");
6766
6813
  const baseInput = createEnhancedBaseInputMixin({
6767
6814
  value: value(),
@@ -7056,16 +7103,16 @@ function CardCVVInput($$anchor, $$props) {
7056
7103
  flushSync();
7057
7104
  }
7058
7105
  };
7059
- var div = root$f();
7106
+ var div = root$g();
7060
7107
  var node = child(div);
7061
7108
  {
7062
7109
  var consequent_1 = ($$anchor2) => {
7063
- var label_1 = root_1$f();
7110
+ var label_1 = root_1$g();
7064
7111
  var text2 = child(label_1);
7065
7112
  var node_1 = sibling(text2);
7066
7113
  {
7067
7114
  var consequent = ($$anchor3) => {
7068
- var span = root_2$a();
7115
+ var span = root_2$b();
7069
7116
  append($$anchor3, span);
7070
7117
  };
7071
7118
  if_block(node_1, ($$render) => {
@@ -7096,7 +7143,7 @@ function CardCVVInput($$anchor, $$props) {
7096
7143
  var node_2 = sibling(input, 2);
7097
7144
  {
7098
7145
  var consequent_2 = ($$anchor2) => {
7099
- var div_2 = root_3$a();
7146
+ var div_2 = root_3$b();
7100
7147
  var text_1 = child(div_2, true);
7101
7148
  reset(div_2);
7102
7149
  template_effect(
@@ -7116,7 +7163,7 @@ function CardCVVInput($$anchor, $$props) {
7116
7163
  var node_3 = sibling(div_1, 2);
7117
7164
  {
7118
7165
  var consequent_3 = ($$anchor2) => {
7119
- var div_3 = root_4$7();
7166
+ var div_3 = root_4$8();
7120
7167
  var text_2 = child(div_3, true);
7121
7168
  reset(div_3);
7122
7169
  template_effect(() => {
@@ -7195,11 +7242,11 @@ customElements.define("alviere-card-cvv-input", create_custom_element(
7195
7242
  ],
7196
7243
  true
7197
7244
  ));
7198
- var root_2$9 = /* @__PURE__ */ from_html(`<span class="alviere-exp-input__required svelte-1i578bj">*</span>`);
7199
- var root_1$e = /* @__PURE__ */ from_html(`<label class="alviere-exp-input__label svelte-1i578bj"> <!></label>`);
7200
- var root_3$9 = /* @__PURE__ */ from_html(`<div class="alviere-exp-input__error svelte-1i578bj" role="alert"> </div>`);
7201
- var root$e = /* @__PURE__ */ from_html(`<div><!> <div><input type="text" inputmode="numeric" maxlength="5" class="alviere-exp-input__input svelte-1i578bj" spellcheck="false" aria-label="Card expiry date (MM/YY format)"/> <div class="alviere-exp-input__format-hint svelte-1i578bj" title="MM/YY format">MM/YY</div></div> <!></div>`);
7202
- const $$css$g = {
7245
+ var root_2$a = /* @__PURE__ */ from_html(`<span class="alviere-exp-input__required svelte-1i578bj">*</span>`);
7246
+ var root_1$f = /* @__PURE__ */ from_html(`<label class="alviere-exp-input__label svelte-1i578bj"> <!></label>`);
7247
+ var root_3$a = /* @__PURE__ */ from_html(`<div class="alviere-exp-input__error svelte-1i578bj" role="alert"> </div>`);
7248
+ var root$f = /* @__PURE__ */ from_html(`<div><!> <div><input type="text" inputmode="numeric" maxlength="5" class="alviere-exp-input__input svelte-1i578bj" spellcheck="false" aria-label="Card expiry date (MM/YY format)"/> <div class="alviere-exp-input__format-hint svelte-1i578bj" title="MM/YY format">MM/YY</div></div> <!></div>`);
7249
+ const $$css$h = {
7203
7250
  hash: "svelte-1i578bj",
7204
7251
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-exp-input.svelte-1i578bj {position:relative;width:100%;}.alviere-exp-input__label.svelte-1i578bj {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-exp-input__required.svelte-1i578bj {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-exp-input__error.svelte-1i578bj {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-exp-input__wrapper.svelte-1i578bj {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-exp-input__wrapper--focused.svelte-1i578bj {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-exp-input__wrapper--disabled.svelte-1i578bj {background:#f4f4f5;cursor:not-allowed;}.alviere-exp-input__wrapper--readonly.svelte-1i578bj {background:#f4f4f5;cursor:default;}.alviere-exp-input__wrapper--valid.svelte-1i578bj {border-color:#436b1d;}.alviere-exp-input__wrapper--invalid.svelte-1i578bj {border-color:#b3311f;}.alviere-exp-input__input.svelte-1i578bj {flex:1;width:100%;height:100%;min-height:2.25rem;padding:1rem 0.75rem 0;border:none;background:transparent;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;font-size:1.25rem;line-height:1.5rem;color:#18181b;outline:none;}.alviere-exp-input__input.svelte-1i578bj::placeholder {color:#71717a;opacity:0;transition:opacity 150ms ease-in-out;transition-delay:0.15s;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;}.alviere-exp-input__input.svelte-1i578bj:disabled {cursor:not-allowed;color:#52525b;}.alviere-exp-input__input.svelte-1i578bj:read-only {cursor:default;color:#3f3f46;}.alviere-exp-input__validation-messages.svelte-1i578bj {min-height:1.40625rem;display:flex;justify-content:space-between;align-items:center;padding-top:0.25rem;}.alviere-exp-input--sm.svelte-1i578bj .alviere-exp-input__wrapper:where(.svelte-1i578bj) {min-height:2.5rem;}.alviere-exp-input--sm.svelte-1i578bj .alviere-exp-input__input:where(.svelte-1i578bj) {font-size:1.125rem;padding:0.25rem 0.75rem;}.alviere-exp-input--sm.svelte-1i578bj .alviere-exp-input__label:where(.svelte-1i578bj) {font-size:1rem;}.alviere-exp-input--md.svelte-1i578bj .alviere-exp-input__wrapper:where(.svelte-1i578bj) {min-height:3.25rem;}.alviere-exp-input--md.svelte-1i578bj .alviere-exp-input__input:where(.svelte-1i578bj) {font-size:1rem;}.alviere-exp-input--lg.svelte-1i578bj .alviere-exp-input__wrapper:where(.svelte-1i578bj) {min-height:3.75rem;}.alviere-exp-input--lg.svelte-1i578bj .alviere-exp-input__input:where(.svelte-1i578bj) {font-size:1.5rem;padding:0.875rem 0.75rem;}.alviere-exp-input--lg.svelte-1i578bj .alviere-exp-input__label:where(.svelte-1i578bj) {font-size:1.25rem;}.alviere-exp-input.svelte-1i578bj:focus-within .alviere-exp-input__wrapper:where(.svelte-1i578bj):not(--disabled):not(--readonly) {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-exp-input__input.svelte-1i578bj {text-align:center;letter-spacing:0.1em;min-width:4rem;}.alviere-exp-input__input.svelte-1i578bj::placeholder {letter-spacing:0.1em;opacity:0.7;}.alviere-exp-input__format-hint.svelte-1i578bj {display:flex;align-items:center;justify-content:center;padding:0.25rem 0.5rem;margin-right:1.5rem;background:#f4f4f5;border-radius:0.125rem;font-size:1rem;font-weight:500;color:#3f3f46;color:#52525b;font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;letter-spacing:0.05em;opacity:0.8;}.alviere-exp-input--sm.svelte-1i578bj .alviere-exp-input__format-hint:where(.svelte-1i578bj) {font-size:1rem;padding:0.125rem 0.375rem;}.alviere-exp-input--lg.svelte-1i578bj .alviere-exp-input__format-hint:where(.svelte-1i578bj) {font-size:1.125rem;padding:0.375rem 0.625rem;}.alviere-exp-input__wrapper--focused.svelte-1i578bj .alviere-exp-input__format-hint:where(.svelte-1i578bj) {opacity:0.5;transform:scale(0.9);transition:opacity 150ms ease-in-out, transform 150ms ease-in-out;}.alviere-exp-input__validation-icon.svelte-1i578bj {
7205
7252
  animation: svelte-1i578bj-fadeIn 0.2s ease-in-out;}
@@ -7216,7 +7263,7 @@ const $$css$g = {
7216
7263
  };
7217
7264
  function CardExpInput($$anchor, $$props) {
7218
7265
  push($$props, true);
7219
- append_styles$1($$anchor, $$css$g);
7266
+ append_styles$1($$anchor, $$css$h);
7220
7267
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, "Expiry Date"), placeholder = prop($$props, "placeholder", 15, "MM/YY"), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, "cc-exp"), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({}));
7221
7268
  const baseInput = createEnhancedBaseInputMixin({
7222
7269
  value: value(),
@@ -7518,16 +7565,16 @@ function CardExpInput($$anchor, $$props) {
7518
7565
  flushSync();
7519
7566
  }
7520
7567
  };
7521
- var div = root$e();
7568
+ var div = root$f();
7522
7569
  var node = child(div);
7523
7570
  {
7524
7571
  var consequent_1 = ($$anchor2) => {
7525
- var label_1 = root_1$e();
7572
+ var label_1 = root_1$f();
7526
7573
  var text2 = child(label_1);
7527
7574
  var node_1 = sibling(text2);
7528
7575
  {
7529
7576
  var consequent = ($$anchor3) => {
7530
- var span = root_2$9();
7577
+ var span = root_2$a();
7531
7578
  append($$anchor3, span);
7532
7579
  };
7533
7580
  if_block(node_1, ($$render) => {
@@ -7561,7 +7608,7 @@ function CardExpInput($$anchor, $$props) {
7561
7608
  var node_2 = sibling(div_1, 2);
7562
7609
  {
7563
7610
  var consequent_2 = ($$anchor2) => {
7564
- var div_2 = root_3$9();
7611
+ var div_2 = root_3$a();
7565
7612
  var text_1 = child(div_2, true);
7566
7613
  reset(div_2);
7567
7614
  template_effect(() => {
@@ -7757,6 +7804,13 @@ const ArrowRight = [
7757
7804
  * See the LICENSE file in the root directory of this source tree.
7758
7805
  */
7759
7806
  const Check = [["path", { d: "M20 6 9 17l-5-5" }]];
7807
+ /**
7808
+ * @license lucide v0.544.0 - ISC
7809
+ *
7810
+ * This source code is licensed under the ISC license.
7811
+ * See the LICENSE file in the root directory of this source tree.
7812
+ */
7813
+ const ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
7760
7814
  /**
7761
7815
  * @license lucide v0.544.0 - ISC
7762
7816
  *
@@ -7801,24 +7855,24 @@ const X = [
7801
7855
  ["path", { d: "M18 6 6 18" }],
7802
7856
  ["path", { d: "m6 6 12 12" }]
7803
7857
  ];
7804
- var root_1$d = /* @__PURE__ */ from_html(`<label class="alviere-text-input__label svelte-1auzwdn"> </label>`);
7805
- var root_2$8 = /* @__PURE__ */ from_html(`<textarea class="alviere-text-input__textarea svelte-1auzwdn" spellcheck="true"></textarea>`);
7806
- var root_3$8 = /* @__PURE__ */ from_html(`<input class="alviere-text-input__input svelte-1auzwdn" spellcheck="true"/>`);
7807
- var root_5$3 = /* @__PURE__ */ from_svg(`<svg height="1.5em" width="1.5em" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><path d="m2.707 1.293 7.17 7.17.002.002 1.504 1.504 7.21 7.21-.001-.001 4.115 4.115-1.414 1.414-4.297-4.296C15.485 19.434 13.82 20 12 20c-2.959 0-5.461-1.46-7.51-3.85a16.59 16.59 0 0 1-1.796-2.56 12.546 12.546 0 0 1-.613-1.197L1.91 12l.17-.395c.11-.252.315-.668.618-1.195.5-.872 1.1-1.743 1.803-2.56.3-.349.614-.68.94-.993l-4.15-4.149zM6.856 8.27l-.256.252c-.199.2-.393.411-.581.63a14.7 14.7 0 0 0-1.843 2.718l-.069.13.145.275.179.322c.439.768.966 1.538 1.578 2.252C7.711 16.835 9.71 18 12 18c1.222 0 2.358-.334 3.426-.962l.123-.076-1.517-1.516A4 4 0 0 1 8.553 9.97zM12 4c2.959 0 5.461 1.46 7.51 3.849a16.59 16.59 0 0 1 1.796 2.56l.208.375c.126.234.228.437.306.603l.1.219.169.395-.17.395a12.7 12.7 0 0 1-.548 1.073c-.37.655-.8 1.318-1.292 1.963l-.302.385-1.553-1.26a14.947 14.947 0 0 0 1.404-2.07l.16-.289.104-.201-.144-.273-.178-.322a14.613 14.613 0 0 0-1.58-2.252C16.289 7.165 14.291 6 12.001 6c-.478 0-.942.05-1.395.151l-.337.085-.537-1.927A8.409 8.409 0 0 1 12 4zm-1.933 7.482-.036.166a2 2 0 0 0 2.321 2.321l.164-.038z" fill="currentcolor" fill-rule="evenodd"></path></svg>`);
7858
+ var root_1$e = /* @__PURE__ */ from_html(`<label class="alviere-text-input__label svelte-1auzwdn"> </label>`);
7859
+ var root_2$9 = /* @__PURE__ */ from_html(`<textarea class="alviere-text-input__textarea svelte-1auzwdn" spellcheck="true"></textarea>`);
7860
+ var root_3$9 = /* @__PURE__ */ from_html(`<input class="alviere-text-input__input svelte-1auzwdn" spellcheck="true"/>`);
7861
+ var root_5$4 = /* @__PURE__ */ from_svg(`<svg height="1.5em" width="1.5em" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><path d="m2.707 1.293 7.17 7.17.002.002 1.504 1.504 7.21 7.21-.001-.001 4.115 4.115-1.414 1.414-4.297-4.296C15.485 19.434 13.82 20 12 20c-2.959 0-5.461-1.46-7.51-3.85a16.59 16.59 0 0 1-1.796-2.56 12.546 12.546 0 0 1-.613-1.197L1.91 12l.17-.395c.11-.252.315-.668.618-1.195.5-.872 1.1-1.743 1.803-2.56.3-.349.614-.68.94-.993l-4.15-4.149zM6.856 8.27l-.256.252c-.199.2-.393.411-.581.63a14.7 14.7 0 0 0-1.843 2.718l-.069.13.145.275.179.322c.439.768.966 1.538 1.578 2.252C7.711 16.835 9.71 18 12 18c1.222 0 2.358-.334 3.426-.962l.123-.076-1.517-1.516A4 4 0 0 1 8.553 9.97zM12 4c2.959 0 5.461 1.46 7.51 3.849a16.59 16.59 0 0 1 1.796 2.56l.208.375c.126.234.228.437.306.603l.1.219.169.395-.17.395a12.7 12.7 0 0 1-.548 1.073c-.37.655-.8 1.318-1.292 1.963l-.302.385-1.553-1.26a14.947 14.947 0 0 0 1.404-2.07l.16-.289.104-.201-.144-.273-.178-.322a14.613 14.613 0 0 0-1.58-2.252C16.289 7.165 14.291 6 12.001 6c-.478 0-.942.05-1.395.151l-.337.085-.537-1.927A8.409 8.409 0 0 1 12 4zm-1.933 7.482-.036.166a2 2 0 0 0 2.321 2.321l.164-.038z" fill="currentcolor" fill-rule="evenodd"></path></svg>`);
7808
7862
  var root_6$2 = /* @__PURE__ */ from_svg(`<svg height="1.5em" width="1.5em" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><path d="M12 4c4.278 0 7.61 2.667 10 8-2.39 5.333-5.722 8-10 8s-7.61-2.667-10-8c2.39-5.333 5.722-8 10-8zm0 2c-4.41 0-6.707 4.479-7.699 5.999C5.295 13.518 7.604 18 12 18c4.41 0 6.707-4.479 7.699-5.999C18.705 10.482 16.396 6 12 6zm0 2c2.176 0 3.945 1.794 3.945 4s-1.77 4-3.945 4c-2.176 0-3.945-1.794-3.945-4S9.825 8 12 8zm0 2c-1.088 0-1.973.897-1.973 2s.885 2 1.973 2 1.973-.897 1.973-2-.885-2-1.973-2z" fill="currentcolor" fill-rule="evenodd"></path></svg>`);
7809
- var root_4$6 = /* @__PURE__ */ from_html(`<button type="button" class="alviere-text-input__reveal-button svelte-1auzwdn"><!></button>`);
7810
- var root_7$2 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__character-count svelte-1auzwdn"> </div>`);
7863
+ var root_4$7 = /* @__PURE__ */ from_html(`<button type="button" class="alviere-text-input__reveal-button svelte-1auzwdn"><!></button>`);
7864
+ var root_7$3 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__character-count svelte-1auzwdn"> </div>`);
7811
7865
  var root_8$2 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__required svelte-1auzwdn">Required</div>`);
7812
- var root_9$2 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__help svelte-1auzwdn"><!> </div>`);
7813
- var root_10$1 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__error svelte-1auzwdn" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
7814
- var root$d = /* @__PURE__ */ from_html(`<div><div><!> <!> <!> <!> <!></div> <div class="alviere-text-input__validation-messages svelte-1auzwdn"><!> <!></div></div>`);
7815
- const $$css$f = {
7866
+ var root_9$3 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__help svelte-1auzwdn"><!> </div>`);
7867
+ var root_10$2 = /* @__PURE__ */ from_html(`<div class="alviere-text-input__error svelte-1auzwdn" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
7868
+ var root$e = /* @__PURE__ */ from_html(`<div><div><!> <!> <!> <!> <!></div> <div class="alviere-text-input__validation-messages svelte-1auzwdn"><!> <!></div></div>`);
7869
+ const $$css$g = {
7816
7870
  hash: "svelte-1auzwdn",
7817
7871
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-text-input.svelte-1auzwdn {position:relative;width:100%;}.alviere-text-input__label.svelte-1auzwdn {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-text-input__required.svelte-1auzwdn {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-text-input__error.svelte-1auzwdn {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-text-input__wrapper.svelte-1auzwdn {position:relative;display:flex;align-items:flex-start;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-text-input__wrapper--focused.svelte-1auzwdn {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-text-input__wrapper--focused.svelte-1auzwdn .alviere-text-input__label:where(.svelte-1auzwdn) {transform:translateY(calc(-50% - 0.75rem));font-size:0.75rem;}.alviere-text-input__wrapper--focused.svelte-1auzwdn .alviere-text-input__input:where(.svelte-1auzwdn)::placeholder {opacity:1;}.alviere-text-input__wrapper--dirty.svelte-1auzwdn .alviere-text-input__label:where(.svelte-1auzwdn) {transform:translateY(calc(-50% - 0.75rem));font-size:0.75rem;}.alviere-text-input__wrapper--disabled.svelte-1auzwdn {background:#f4f4f5;cursor:not-allowed;}.alviere-text-input__wrapper--readonly.svelte-1auzwdn {background:#f4f4f5;cursor:default;}.alviere-text-input__wrapper--valid.svelte-1auzwdn {border-color:#436b1d;}.alviere-text-input__wrapper--invalid.svelte-1auzwdn {border-color:#b3311f;}.alviere-text-input__input.svelte-1auzwdn {flex:1;width:100%;height:100%;min-height:2.25rem;padding:1rem 0.75rem 0;border:none;background:transparent;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:1.25rem;line-height:1.5rem;color:#18181b;outline:none;}.alviere-text-input__input.svelte-1auzwdn::placeholder {color:#71717a;opacity:0;transition:opacity 150ms ease-in-out;transition-delay:0.15s;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;}.alviere-text-input__input.svelte-1auzwdn:disabled {cursor:not-allowed;color:#52525b;}.alviere-text-input__input.svelte-1auzwdn:read-only {cursor:default;color:#3f3f46;}.alviere-text-input__validation-messages.svelte-1auzwdn {min-height:1.40625rem;display:flex;justify-content:space-between;align-items:center;padding-top:0.25rem;}.alviere-text-input--sm.svelte-1auzwdn .alviere-text-input__wrapper:where(.svelte-1auzwdn) {min-height:2.5rem;}.alviere-text-input--sm.svelte-1auzwdn .alviere-text-input__input:where(.svelte-1auzwdn) {font-size:1.125rem;padding:0.25rem 0.75rem;}.alviere-text-input--sm.svelte-1auzwdn .alviere-text-input__textarea:where(.svelte-1auzwdn) {font-size:1.125rem;padding:0.25rem 0.75rem;}.alviere-text-input--sm.svelte-1auzwdn .alviere-text-input__label:where(.svelte-1auzwdn) {font-size:1rem;}.alviere-text-input--md.svelte-1auzwdn .alviere-text-input__wrapper:where(.svelte-1auzwdn) {min-height:3.25rem;}.alviere-text-input--md.svelte-1auzwdn .alviere-text-input__input:where(.svelte-1auzwdn) {font-size:1rem;}.alviere-text-input--md.svelte-1auzwdn .alviere-text-input__textarea:where(.svelte-1auzwdn) {font-size:1.25rem;}.alviere-text-input--lg.svelte-1auzwdn .alviere-text-input__wrapper:where(.svelte-1auzwdn) {min-height:3.75rem;}.alviere-text-input--lg.svelte-1auzwdn .alviere-text-input__input:where(.svelte-1auzwdn) {font-size:1.5rem;padding:0.875rem 0.75rem;}.alviere-text-input--lg.svelte-1auzwdn .alviere-text-input__textarea:where(.svelte-1auzwdn) {font-size:1.5rem;padding:0.875rem 0.75rem;}.alviere-text-input--lg.svelte-1auzwdn .alviere-text-input__label:where(.svelte-1auzwdn) {font-size:1.25rem;}.alviere-text-input.svelte-1auzwdn:focus-within .alviere-text-input__wrapper:where(.svelte-1auzwdn):not(--disabled):not(--readonly) {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-text-input__wrapper--textarea.svelte-1auzwdn {align-items:stretch;}.alviere-text-input__input.svelte-1auzwdn, .alviere-text-input__textarea.svelte-1auzwdn {resize:none;}.alviere-text-input__textarea.svelte-1auzwdn {min-height:2.5rem;line-height:1.75rem;resize:vertical;}.alviere-text-input__character-count.svelte-1auzwdn {position:absolute;bottom:0.25rem;right:0.25rem;font-size:1rem;color:#71717a;background:rgba(255, 255, 255, 0.9);padding:0.125rem 0.25rem;border-radius:0.125rem;pointer-events:none;}.alviere-text-input__help.svelte-1auzwdn {margin-top:0.25rem;font-size:0.75rem;color:#71717a;line-height:1.25;display:flex;align-items:flex-start;gap:0.25rem;}.alviere-text-input__help.svelte-1auzwdn svg {width:1rem;height:1rem;}.alviere-text-input__wrapper--textarea.svelte-1auzwdn .alviere-text-input__textarea:where(.svelte-1auzwdn) {min-height:3rem;padding-bottom:1.5rem;}.alviere-text-input__wrapper--textarea.alviere-text-input--sm.svelte-1auzwdn .alviere-text-input__textarea:where(.svelte-1auzwdn) {min-height:2.5rem;}.alviere-text-input__wrapper--textarea.alviere-text-input--lg.svelte-1auzwdn .alviere-text-input__textarea:where(.svelte-1auzwdn) {min-height:4rem;}.alviere-text-input__character-count.svelte-1auzwdn {font-family:"Monaco", "Menlo", "Ubuntu Mono", monospace;font-weight:500;opacity:0.8;transition:opacity 150ms ease-in-out;}.alviere-text-input__wrapper--focused.svelte-1auzwdn .alviere-text-input__character-count:where(.svelte-1auzwdn) {opacity:1;}.alviere-text-input__wrapper--textarea--valid.svelte-1auzwdn::after, .alviere-text-input__wrapper--textarea--invalid.svelte-1auzwdn::after {top:0.5rem;transform:none;}.alviere-text-input__reveal-button.svelte-1auzwdn {background:transparent;border:none;cursor:pointer;padding:0;margin:0;position:absolute;right:0.5rem;top:50%;transform:translateY(-50%);color:#71717a;}`
7818
7872
  };
7819
7873
  function TextInput($$anchor, $$props) {
7820
7874
  push($$props, true);
7821
- append_styles$1($$anchor, $$css$f);
7875
+ append_styles$1($$anchor, $$css$g);
7822
7876
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, ""), placeholder = prop($$props, "placeholder", 15, ""), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, ""), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({})), sensitive = prop($$props, "sensitive", 15, false), maxlength = prop($$props, "maxlength", 15, void 0), minlength = prop($$props, "minlength", 15, void 0), oninput = prop($$props, "oninput", 15), onchange = prop($$props, "onchange", 15), onfocus = prop($$props, "onfocus", 15), onblur = prop($$props, "onblur", 15), type = prop($$props, "type", 15, "text"), rows = prop($$props, "rows", 15, 3), cols = prop($$props, "cols", 15, void 0), resize = prop($$props, "resize", 15, "vertical"), blockPaste = prop($$props, "blockPaste", 15, false);
7823
7877
  const baseInput = createEnhancedBaseInputMixin({
7824
7878
  get value() {
@@ -8279,13 +8333,13 @@ function TextInput($$anchor, $$props) {
8279
8333
  flushSync();
8280
8334
  }
8281
8335
  };
8282
- var div = root$d();
8336
+ var div = root$e();
8283
8337
  var div_1 = child(div);
8284
8338
  let classes;
8285
8339
  var node = child(div_1);
8286
8340
  {
8287
8341
  var consequent = ($$anchor2) => {
8288
- var label_1 = root_1$d();
8342
+ var label_1 = root_1$e();
8289
8343
  var text2 = child(label_1, true);
8290
8344
  reset(label_1);
8291
8345
  template_effect(() => {
@@ -8301,7 +8355,7 @@ function TextInput($$anchor, $$props) {
8301
8355
  var node_1 = sibling(node, 2);
8302
8356
  {
8303
8357
  var consequent_1 = ($$anchor2) => {
8304
- var textarea = root_2$8();
8358
+ var textarea = root_2$9();
8305
8359
  remove_textarea_child(textarea);
8306
8360
  textarea.__input = handleInput;
8307
8361
  textarea.__change = handleChange;
@@ -8332,7 +8386,7 @@ function TextInput($$anchor, $$props) {
8332
8386
  append($$anchor2, textarea);
8333
8387
  };
8334
8388
  var alternate = ($$anchor2) => {
8335
- var input = root_3$8();
8389
+ var input = root_3$9();
8336
8390
  remove_input_defaults(input);
8337
8391
  input.__input = handleInput;
8338
8392
  input.__change = handleChange;
@@ -8368,7 +8422,7 @@ function TextInput($$anchor, $$props) {
8368
8422
  var node_2 = sibling(node_1, 2);
8369
8423
  {
8370
8424
  var consequent_3 = ($$anchor2) => {
8371
- var button = root_4$6();
8425
+ var button = root_4$7();
8372
8426
  button.__click = (e) => {
8373
8427
  e.stopPropagation();
8374
8428
  set(reveal, !get$1(reveal));
@@ -8376,7 +8430,7 @@ function TextInput($$anchor, $$props) {
8376
8430
  var node_3 = child(button);
8377
8431
  {
8378
8432
  var consequent_2 = ($$anchor3) => {
8379
- var svg = root_5$3();
8433
+ var svg = root_5$4();
8380
8434
  append($$anchor3, svg);
8381
8435
  };
8382
8436
  var alternate_1 = ($$anchor3) => {
@@ -8398,7 +8452,7 @@ function TextInput($$anchor, $$props) {
8398
8452
  var node_4 = sibling(node_2, 2);
8399
8453
  {
8400
8454
  var consequent_4 = ($$anchor2) => {
8401
- var div_2 = root_7$2();
8455
+ var div_2 = root_7$3();
8402
8456
  var text_1 = child(div_2);
8403
8457
  reset(div_2);
8404
8458
  template_effect(() => set_text(text_1, `${get$1(characterCount) ?? ""}/${maxlength() ?? ""}`));
@@ -8423,7 +8477,7 @@ function TextInput($$anchor, $$props) {
8423
8477
  var node_6 = child(div_4);
8424
8478
  {
8425
8479
  var consequent_6 = ($$anchor2) => {
8426
- var div_5 = root_9$2();
8480
+ var div_5 = root_9$3();
8427
8481
  var node_7 = child(div_5);
8428
8482
  html(node_7, () => infoIcon.outerHTML);
8429
8483
  var text_2 = sibling(node_7);
@@ -8441,7 +8495,7 @@ function TextInput($$anchor, $$props) {
8441
8495
  var node_8 = sibling(node_6, 2);
8442
8496
  {
8443
8497
  var consequent_7 = ($$anchor2) => {
8444
- var div_6 = root_10$1();
8498
+ var div_6 = root_10$2();
8445
8499
  var text_3 = sibling(child(div_6));
8446
8500
  reset(div_6);
8447
8501
  template_effect(() => {
@@ -8517,16 +8571,16 @@ customElements.define("alviere-text-input", create_custom_element(
8517
8571
  ],
8518
8572
  true
8519
8573
  ));
8520
- var root_1$c = /* @__PURE__ */ from_html(`<div class="success-message svelte-1aekat9">✅ Payment instrument created successfully! <br/> <small class="svelte-1aekat9"> </small></div>`);
8521
- var root_2$7 = /* @__PURE__ */ from_html(`<div class="error-message svelte-1aekat9"> </div>`);
8522
- var root$c = /* @__PURE__ */ from_html(`<div class="alviere-payment-instrument-form svelte-1aekat9"><h2 class="svelte-1aekat9">Add Payment Instrument</h2> <!> <!> <form novalidate=""><fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Card Information</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-row svelte-1aekat9"><div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div></div> <div class="form-group svelte-1aekat9"><!></div></fieldset> <fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Contact Information</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div></fieldset> <fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Billing Address</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div> <div class="form-row svelte-1aekat9"><div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><label for="country" class="svelte-1aekat9">Country *</label> <select id="country" required class="svelte-1aekat9"><option>United States</option><option>Canada</option><option>Mexico</option></select></div></div></fieldset> <fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Additional Information</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div></fieldset> <div class="form-actions svelte-1aekat9"><button type="submit" class="submit-button svelte-1aekat9"> </button></div></form></div>`);
8523
- const $$css$e = {
8574
+ var root_1$d = /* @__PURE__ */ from_html(`<div class="success-message svelte-1aekat9">✅ Payment instrument created successfully! <br/> <small class="svelte-1aekat9"> </small></div>`);
8575
+ var root_2$8 = /* @__PURE__ */ from_html(`<div class="error-message svelte-1aekat9"> </div>`);
8576
+ var root$d = /* @__PURE__ */ from_html(`<div class="alviere-payment-instrument-form svelte-1aekat9"><h2 class="svelte-1aekat9">Add Payment Instrument</h2> <!> <!> <form novalidate=""><fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Card Information</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-row svelte-1aekat9"><div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div></div> <div class="form-group svelte-1aekat9"><!></div></fieldset> <fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Contact Information</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div></fieldset> <fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Billing Address</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div> <div class="form-row svelte-1aekat9"><div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><label for="country" class="svelte-1aekat9">Country *</label> <select id="country" required class="svelte-1aekat9"><option>United States</option><option>Canada</option><option>Mexico</option></select></div></div></fieldset> <fieldset class="svelte-1aekat9"><legend class="svelte-1aekat9">Additional Information</legend> <div class="form-group svelte-1aekat9"><!></div> <div class="form-group svelte-1aekat9"><!></div></fieldset> <div class="form-actions svelte-1aekat9"><button type="submit" class="submit-button svelte-1aekat9"> </button></div></form></div>`);
8577
+ const $$css$f = {
8524
8578
  hash: "svelte-1aekat9",
8525
8579
  code: '@charset "UTF-8";.alviere-payment-instrument-form.svelte-1aekat9 {max-width:100%;margin:0 auto;font-family:"Darker Grotesque", sans-serif;line-height:1;}.alviere-payment-instrument-form.svelte-1aekat9 h2:where(.svelte-1aekat9) {color:#27272a;margin-bottom:2rem;text-align:center;}.alviere-payment-instrument-form.svelte-1aekat9 fieldset:where(.svelte-1aekat9) {border:1px solid #d4d4d8;border-radius:0.25rem;padding:1.5rem;margin-bottom:2rem;background:#ffffff;}.alviere-payment-instrument-form.svelte-1aekat9 legend:where(.svelte-1aekat9) {font-weight:600;color:#3f3f46;padding:0 0.5rem;}.alviere-payment-instrument-form.svelte-1aekat9 .form-group:where(.svelte-1aekat9) {margin-bottom:1rem;}.alviere-payment-instrument-form.svelte-1aekat9 .form-row:where(.svelte-1aekat9) {display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:1rem;padding-bottom:1rem;}.alviere-payment-instrument-form.svelte-1aekat9 .form-actions:where(.svelte-1aekat9) {margin-top:24px;text-align:center;}.alviere-payment-instrument-form.svelte-1aekat9 .form-actions:where(.svelte-1aekat9) button:where(.svelte-1aekat9):disabled {opacity:0.6;cursor:not-allowed;}.alviere-payment-instrument-form.svelte-1aekat9 .success-message:where(.svelte-1aekat9) {padding:1rem;border-radius:0.25rem;margin-bottom:2rem;text-align:center;background:#d4edda;border:1px solid #c3e6cb;color:#155724;}.alviere-payment-instrument-form.svelte-1aekat9 .error-message:where(.svelte-1aekat9) {padding:1rem;border-radius:0.25rem;margin-bottom:2rem;text-align:center;background:#f8d7da;border:1px solid #f5c6cb;color:#721c24;}.alviere-payment-instrument-form.svelte-1aekat9 .submit-button:where(.svelte-1aekat9) {border:none;border-radius:0.25rem;font-family:"Darker Grotesque", sans-serif;font-size:1rem;font-weight:600;line-height:1;cursor:pointer;transition:background-color 150ms ease-in-out;background:#27272a;color:#ffffff;}.alviere-payment-instrument-form.svelte-1aekat9 .submit-button:where(.svelte-1aekat9):hover:not(:disabled) {background:#3f3f46;}.alviere-payment-instrument-form.svelte-1aekat9 .submit-button:where(.svelte-1aekat9):disabled {background:#52525b;cursor:not-allowed;} .alviere-payment-instrument-form.svelte-1aekat9 select:where(.svelte-1aekat9) {width:100%;padding:0.75rem;border:1px solid #d4d4d8;border-radius:0.25rem;font-size:1.25rem;line-height:1.5rem;transition:border-color 150ms ease-in-out;} .alviere-payment-instrument-form.svelte-1aekat9 select:where(.svelte-1aekat9):focus {outline:none;border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;} .alviere-payment-instrument-form.svelte-1aekat9 select:where(.svelte-1aekat9):disabled {background:#f4f4f5;cursor:not-allowed;}.alviere-payment-instrument-form.svelte-1aekat9 label:where(.svelte-1aekat9) {display:block;margin-bottom:0.5rem;font-weight:500;color:#3f3f46;}.alviere-payment-instrument-form.svelte-1aekat9 small:where(.svelte-1aekat9) {display:block;margin-top:4px;color:#52525b;font-size:1rem;}'
8526
8580
  };
8527
8581
  function AddPaymentInstrument($$anchor, $$props) {
8528
8582
  push($$props, true);
8529
- append_styles$1($$anchor, $$css$e);
8583
+ append_styles$1($$anchor, $$css$f);
8530
8584
  let jwt = prop($$props, "jwt", 15, ""), accountUuid = prop($$props, "accountUuid", 15, ""), debug = prop($$props, "debug", 15, false), onsuccess = prop($$props, "onsuccess", 15), onerror = prop($$props, "onerror", 15);
8531
8585
  let formData = /* @__PURE__ */ state(proxy({
8532
8586
  pan: "",
@@ -8694,11 +8748,11 @@ function AddPaymentInstrument($$anchor, $$props) {
8694
8748
  flushSync();
8695
8749
  }
8696
8750
  };
8697
- var div = root$c();
8751
+ var div = root$d();
8698
8752
  var node = sibling(child(div), 2);
8699
8753
  {
8700
8754
  var consequent = ($$anchor2) => {
8701
- var div_1 = root_1$c();
8755
+ var div_1 = root_1$d();
8702
8756
  var small = sibling(child(div_1), 3);
8703
8757
  var text2 = child(small);
8704
8758
  reset(small);
@@ -8716,7 +8770,7 @@ function AddPaymentInstrument($$anchor, $$props) {
8716
8770
  var node_1 = sibling(node, 2);
8717
8771
  {
8718
8772
  var consequent_1 = ($$anchor2) => {
8719
- var div_2 = root_2$7();
8773
+ var div_2 = root_2$8();
8720
8774
  var text_1 = child(div_2);
8721
8775
  reset(div_2);
8722
8776
  template_effect(() => set_text(text_1, `❌ ${get$1(error) ?? ""}`));
@@ -9051,12 +9105,12 @@ customElements.define("alviere-add-payment-instrument", create_custom_element(
9051
9105
  [],
9052
9106
  true
9053
9107
  ));
9054
- var root_1$b = /* @__PURE__ */ from_html(`<label class="alviere-phone-input__label svelte-15yozux"> </label>`);
9055
- var root_2$6 = /* @__PURE__ */ from_html(`<span class="alviere-phone-input__character-count svelte-15yozux"> </span>`);
9056
- var root_3$7 = /* @__PURE__ */ from_html(`<div class="alviere-phone-input__required svelte-15yozux">Required</div>`);
9057
- var root_4$5 = /* @__PURE__ */ from_html(`<div class="alviere-phone-input__error svelte-15yozux" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
9058
- var root$b = /* @__PURE__ */ from_html(`<div><div><!> <input type="tel"/> <!></div> <div class="alviere-phone-input__validation-messages svelte-15yozux"><!> <!></div></div>`);
9059
- const $$css$d = {
9108
+ var root_1$c = /* @__PURE__ */ from_html(`<label class="alviere-phone-input__label svelte-15yozux"> </label>`);
9109
+ var root_2$7 = /* @__PURE__ */ from_html(`<span class="alviere-phone-input__character-count svelte-15yozux"> </span>`);
9110
+ var root_3$8 = /* @__PURE__ */ from_html(`<div class="alviere-phone-input__required svelte-15yozux">Required</div>`);
9111
+ var root_4$6 = /* @__PURE__ */ from_html(`<div class="alviere-phone-input__error svelte-15yozux" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
9112
+ var root$c = /* @__PURE__ */ from_html(`<div><div><!> <input type="tel"/> <!></div> <div class="alviere-phone-input__validation-messages svelte-15yozux"><!> <!></div></div>`);
9113
+ const $$css$e = {
9060
9114
  hash: "svelte-15yozux",
9061
9115
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-phone-input.svelte-15yozux {position:relative;width:100%;}.alviere-phone-input__label.svelte-15yozux {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-phone-input__required.svelte-15yozux {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-phone-input__error.svelte-15yozux {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-phone-input__wrapper.svelte-15yozux {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-phone-input__wrapper--focused.svelte-15yozux {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-phone-input__wrapper--focused.svelte-15yozux .alviere-text-input__label:where(.svelte-15yozux),
9062
9116
  .alviere-phone-input__wrapper--focused.svelte-15yozux .alviere-phone-input__label:where(.svelte-15yozux),
@@ -9074,7 +9128,7 @@ const $$css$d = {
9074
9128
  };
9075
9129
  function PhoneInput($$anchor, $$props) {
9076
9130
  push($$props, true);
9077
- append_styles$1($$anchor, $$css$d);
9131
+ append_styles$1($$anchor, $$css$e);
9078
9132
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, "Phone Number"), placeholder = prop($$props, "placeholder", 15, "Enter phone number"), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, "tel"), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({})), oninput = prop($$props, "oninput", 15), onchange = prop($$props, "onchange", 15), onfocus = prop($$props, "onfocus", 15), onblur = prop($$props, "onblur", 15);
9079
9133
  const baseInput = createEnhancedBaseInputMixin({
9080
9134
  get value() {
@@ -9406,12 +9460,12 @@ function PhoneInput($$anchor, $$props) {
9406
9460
  flushSync();
9407
9461
  }
9408
9462
  };
9409
- var div = root$b();
9463
+ var div = root$c();
9410
9464
  var div_1 = child(div);
9411
9465
  var node = child(div_1);
9412
9466
  {
9413
9467
  var consequent = ($$anchor2) => {
9414
- var label_1 = root_1$b();
9468
+ var label_1 = root_1$c();
9415
9469
  var text2 = child(label_1, true);
9416
9470
  reset(label_1);
9417
9471
  template_effect(() => {
@@ -9436,7 +9490,7 @@ function PhoneInput($$anchor, $$props) {
9436
9490
  var node_1 = sibling(input, 2);
9437
9491
  {
9438
9492
  var consequent_1 = ($$anchor2) => {
9439
- var span = root_2$6();
9493
+ var span = root_2$7();
9440
9494
  var text_1 = child(span);
9441
9495
  reset(span);
9442
9496
  template_effect(() => set_text(text_1, `${get$1(characterCount) ?? ""}/20`));
@@ -9451,7 +9505,7 @@ function PhoneInput($$anchor, $$props) {
9451
9505
  var node_2 = child(div_2);
9452
9506
  {
9453
9507
  var consequent_2 = ($$anchor2) => {
9454
- var div_3 = root_3$7();
9508
+ var div_3 = root_3$8();
9455
9509
  append($$anchor2, div_3);
9456
9510
  };
9457
9511
  if_block(node_2, ($$render) => {
@@ -9461,7 +9515,7 @@ function PhoneInput($$anchor, $$props) {
9461
9515
  var node_3 = sibling(node_2, 2);
9462
9516
  {
9463
9517
  var consequent_3 = ($$anchor2) => {
9464
- var div_4 = root_4$5();
9518
+ var div_4 = root_4$6();
9465
9519
  var text_2 = sibling(child(div_4));
9466
9520
  reset(div_4);
9467
9521
  template_effect(() => {
@@ -9535,11 +9589,11 @@ customElements.define("alviere-phone-input", create_custom_element(
9535
9589
  ],
9536
9590
  true
9537
9591
  ));
9538
- var root_1$a = /* @__PURE__ */ from_html(`<label class="alviere-date-of-birth-input__label svelte-1ooun91"> </label>`);
9539
- var root_2$5 = /* @__PURE__ */ from_html(`<div class="alviere-date-of-birth-input__required svelte-1ooun91">Required</div>`);
9540
- var root_3$6 = /* @__PURE__ */ from_html(`<div class="alviere-date-of-birth-input__error svelte-1ooun91" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
9541
- var root$a = /* @__PURE__ */ from_html(`<div><div><!> <input type="text" maxlength="10"/></div> <div class="alviere-date-of-birth-input__validation-messages svelte-1ooun91"><!> <!></div></div>`);
9542
- const $$css$c = {
9592
+ var root_1$b = /* @__PURE__ */ from_html(`<label class="alviere-date-of-birth-input__label svelte-1ooun91"> </label>`);
9593
+ var root_2$6 = /* @__PURE__ */ from_html(`<div class="alviere-date-of-birth-input__required svelte-1ooun91">Required</div>`);
9594
+ var root_3$7 = /* @__PURE__ */ from_html(`<div class="alviere-date-of-birth-input__error svelte-1ooun91" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
9595
+ var root$b = /* @__PURE__ */ from_html(`<div><div><!> <input type="text" maxlength="10"/></div> <div class="alviere-date-of-birth-input__validation-messages svelte-1ooun91"><!> <!></div></div>`);
9596
+ const $$css$d = {
9543
9597
  hash: "svelte-1ooun91",
9544
9598
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-date-of-birth-input.svelte-1ooun91 {position:relative;width:100%;}.alviere-date-of-birth-input__label.svelte-1ooun91 {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-date-of-birth-input__required.svelte-1ooun91 {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-date-of-birth-input__error.svelte-1ooun91 {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-date-of-birth-input__wrapper.svelte-1ooun91 {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-date-of-birth-input__wrapper--focused.svelte-1ooun91 {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-date-of-birth-input__wrapper--focused.svelte-1ooun91 .alviere-text-input__label:where(.svelte-1ooun91),
9545
9599
  .alviere-date-of-birth-input__wrapper--focused.svelte-1ooun91 .alviere-phone-input__label:where(.svelte-1ooun91),
@@ -9557,7 +9611,7 @@ const $$css$c = {
9557
9611
  };
9558
9612
  function DateOfBirthInput($$anchor, $$props) {
9559
9613
  push($$props, true);
9560
- append_styles$1($$anchor, $$css$c);
9614
+ append_styles$1($$anchor, $$css$d);
9561
9615
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, "Date of Birth"), placeholder = prop($$props, "placeholder", 15, "YYYY-MM-DD"), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, "bday"), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({})), oninput = prop($$props, "oninput", 15), onchange = prop($$props, "onchange", 15), onfocus = prop($$props, "onfocus", 15), onblur = prop($$props, "onblur", 15);
9562
9616
  const baseInput = createEnhancedBaseInputMixin({
9563
9617
  get value() {
@@ -9899,12 +9953,12 @@ function DateOfBirthInput($$anchor, $$props) {
9899
9953
  flushSync();
9900
9954
  }
9901
9955
  };
9902
- var div = root$a();
9956
+ var div = root$b();
9903
9957
  var div_1 = child(div);
9904
9958
  var node = child(div_1);
9905
9959
  {
9906
9960
  var consequent = ($$anchor2) => {
9907
- var label_1 = root_1$a();
9961
+ var label_1 = root_1$b();
9908
9962
  var text2 = child(label_1, true);
9909
9963
  reset(label_1);
9910
9964
  template_effect(() => {
@@ -9931,7 +9985,7 @@ function DateOfBirthInput($$anchor, $$props) {
9931
9985
  var node_1 = child(div_2);
9932
9986
  {
9933
9987
  var consequent_1 = ($$anchor2) => {
9934
- var div_3 = root_2$5();
9988
+ var div_3 = root_2$6();
9935
9989
  append($$anchor2, div_3);
9936
9990
  };
9937
9991
  if_block(node_1, ($$render) => {
@@ -9941,7 +9995,7 @@ function DateOfBirthInput($$anchor, $$props) {
9941
9995
  var node_2 = sibling(node_1, 2);
9942
9996
  {
9943
9997
  var consequent_2 = ($$anchor2) => {
9944
- var div_4 = root_3$6();
9998
+ var div_4 = root_3$7();
9945
9999
  var text_1 = sibling(child(div_4));
9946
10000
  reset(div_4);
9947
10001
  template_effect(() => {
@@ -10015,12 +10069,12 @@ customElements.define("alviere-date-of-birth-input", create_custom_element(
10015
10069
  ],
10016
10070
  true
10017
10071
  ));
10018
- var root_1$9 = /* @__PURE__ */ from_html(`<label class="alviere-currency-input__label svelte-qcuhgv"> </label>`);
10019
- var root_2$4 = /* @__PURE__ */ from_html(`<div class="alviere-currency-input__required svelte-qcuhgv">Required</div>`);
10020
- var root_3$5 = /* @__PURE__ */ from_html(`<div class="alviere-currency-input__error svelte-qcuhgv" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
10021
- var root_4$4 = /* @__PURE__ */ from_html(`<div class="alviere-currency-input__help-text"> </div>`);
10022
- var root$9 = /* @__PURE__ */ from_html(`<div><div><!> <input type="text" inputmode="numeric"/></div> <div class="alviere-currency-input__validation-messages svelte-qcuhgv"><!> <!> <!></div></div>`);
10023
- const $$css$b = {
10072
+ var root_1$a = /* @__PURE__ */ from_html(`<label class="alviere-currency-input__label svelte-qcuhgv"> </label>`);
10073
+ var root_2$5 = /* @__PURE__ */ from_html(`<div class="alviere-currency-input__required svelte-qcuhgv">Required</div>`);
10074
+ var root_3$6 = /* @__PURE__ */ from_html(`<div class="alviere-currency-input__error svelte-qcuhgv" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
10075
+ var root_4$5 = /* @__PURE__ */ from_html(`<div class="alviere-currency-input__help-text"> </div>`);
10076
+ var root$a = /* @__PURE__ */ from_html(`<div><div><!> <input type="text" inputmode="numeric"/></div> <div class="alviere-currency-input__validation-messages svelte-qcuhgv"><!> <!> <!></div></div>`);
10077
+ const $$css$c = {
10024
10078
  hash: "svelte-qcuhgv",
10025
10079
  code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-currency-input.svelte-qcuhgv {position:relative;width:100%;}.alviere-currency-input__label.svelte-qcuhgv {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-currency-input__required.svelte-qcuhgv {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-currency-input__error.svelte-qcuhgv {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-currency-input__wrapper.svelte-qcuhgv {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-currency-input__wrapper--focused.svelte-qcuhgv {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-currency-input__wrapper--focused.svelte-qcuhgv .alviere-text-input__label:where(.svelte-qcuhgv),
10026
10080
  .alviere-currency-input__wrapper--focused.svelte-qcuhgv .alviere-phone-input__label:where(.svelte-qcuhgv),
@@ -10038,7 +10092,7 @@ const $$css$b = {
10038
10092
  };
10039
10093
  function CurrencyInput($$anchor, $$props) {
10040
10094
  push($$props, true);
10041
- append_styles$1($$anchor, $$css$b);
10095
+ append_styles$1($$anchor, $$css$c);
10042
10096
  let value = prop($$props, "value", 15, ""), label = prop($$props, "label", 15, "Amount"), placeholder = prop($$props, "placeholder", 15, "0.00"), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), autocomplete = prop($$props, "autocomplete", 15, ""), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), validationSchema = prop($$props, "validationSchema", 31, () => proxy({})), oninput = prop($$props, "oninput", 15), onchange = prop($$props, "onchange", 15), onfocus = prop($$props, "onfocus", 15), onblur = prop($$props, "onblur", 15), currency = prop($$props, "currency", 15, "USD"), locale = prop($$props, "locale", 15, "en-US");
10043
10097
  let rawNumericValue = /* @__PURE__ */ state(0);
10044
10098
  function getCurrencySymbol() {
@@ -10493,12 +10547,12 @@ function CurrencyInput($$anchor, $$props) {
10493
10547
  flushSync();
10494
10548
  }
10495
10549
  };
10496
- var div = root$9();
10550
+ var div = root$a();
10497
10551
  var div_1 = child(div);
10498
10552
  var node = child(div_1);
10499
10553
  {
10500
10554
  var consequent = ($$anchor2) => {
10501
- var label_1 = root_1$9();
10555
+ var label_1 = root_1$a();
10502
10556
  var text2 = child(label_1, true);
10503
10557
  reset(label_1);
10504
10558
  template_effect(() => {
@@ -10525,7 +10579,7 @@ function CurrencyInput($$anchor, $$props) {
10525
10579
  var node_1 = child(div_2);
10526
10580
  {
10527
10581
  var consequent_1 = ($$anchor2) => {
10528
- var div_3 = root_2$4();
10582
+ var div_3 = root_2$5();
10529
10583
  append($$anchor2, div_3);
10530
10584
  };
10531
10585
  if_block(node_1, ($$render) => {
@@ -10535,7 +10589,7 @@ function CurrencyInput($$anchor, $$props) {
10535
10589
  var node_2 = sibling(node_1, 2);
10536
10590
  {
10537
10591
  var consequent_2 = ($$anchor2) => {
10538
- var div_4 = root_3$5();
10592
+ var div_4 = root_3$6();
10539
10593
  var text_1 = sibling(child(div_4));
10540
10594
  reset(div_4);
10541
10595
  template_effect(() => {
@@ -10551,7 +10605,7 @@ function CurrencyInput($$anchor, $$props) {
10551
10605
  var node_3 = sibling(node_2, 2);
10552
10606
  {
10553
10607
  var consequent_3 = ($$anchor2) => {
10554
- var div_5 = root_4$4();
10608
+ var div_5 = root_4$5();
10555
10609
  var text_2 = child(div_5, true);
10556
10610
  reset(div_5);
10557
10611
  template_effect(() => set_text(text_2, helpText()));
@@ -10639,145 +10693,896 @@ function fade(node, { delay = 0, duration = 400, easing = linear } = {}) {
10639
10693
  css: (t) => `opacity: ${t * o}`
10640
10694
  };
10641
10695
  }
10642
- const createFlowCoreStore = () => {
10643
- const { subscribe, set: set2, update: update2 } = writable({ core: null, isInitialized: false, config: null });
10644
- return {
10645
- subscribe,
10646
- /**
10647
- * Initialize the shared AlviereCore instance
10648
- */
10649
- init: async (config) => {
10650
- const debug = config.debug || false;
10651
- if (!config.jwt) {
10652
- debug && uiLogger.warn("⚠️ Cannot initialize AlviereCore - missing JWT");
10653
- return;
10654
- }
10655
- try {
10656
- debug && uiLogger.info("🔐 Initializing shared AlviereCore instance in store...");
10657
- const { getAlviereCore: getAlviereCore2 } = await Promise.resolve().then(() => alviereCoreManager);
10658
- const core = getAlviereCore2(config);
10659
- update2((state2) => ({ ...state2, core, isInitialized: true, config }));
10660
- debug && uiLogger.info("✅ Shared AlviereCore instance created in store:", {
10661
- accountUuid: core.getAccountUuid(),
10662
- businessUuid: core.getBusinessUuid(),
10663
- isFirstTimeUser: core.isFirstTimeUser()
10664
- });
10665
- } catch (error) {
10666
- uiLogger.error("❌ Failed to initialize AlviereCore in store:", error);
10667
- }
10696
+ var root_1$9 = /* @__PURE__ */ from_html(`<label class="alviere-search-select__label svelte-roni7d"> </label>`);
10697
+ var root_2$4 = /* @__PURE__ */ from_html(`<div class="alviere-search-select__display-value svelte-roni7d"> </div>`);
10698
+ var root_3$5 = /* @__PURE__ */ from_html(`<button type="button" class="alviere-search-select__clear-button svelte-roni7d" aria-label="Clear selection"><!></button>`);
10699
+ var root_5$3 = /* @__PURE__ */ from_html(`<div class="alviere-search-select__loading-message svelte-roni7d"> </div>`);
10700
+ var root_7$2 = /* @__PURE__ */ from_html(`<div class="alviere-search-select__no-options-message svelte-roni7d"> </div>`);
10701
+ var root_9$2 = /* @__PURE__ */ from_html(`<div role="option" tabindex="0"> </div>`);
10702
+ var root_4$4 = /* @__PURE__ */ from_html(`<div id="search-select-dropdown" class="alviere-search-select__dropdown svelte-roni7d" role="listbox"><div class="alviere-search-select__options-list svelte-roni7d"><!></div></div>`);
10703
+ var root_10$1 = /* @__PURE__ */ from_html(`<div class="alviere-search-select__required svelte-roni7d">Required</div>`);
10704
+ var root_11$2 = /* @__PURE__ */ from_html(`<div class="alviere-search-select__help svelte-roni7d"> </div>`);
10705
+ var root_12$2 = /* @__PURE__ */ from_html(`<div class="alviere-search-select__error svelte-roni7d" role="alert"><svg height="1rem" width="1rem" viewBox="0 0 24 24" class="IconStyle_currentColor__sdo2n67" style="font-size: 1em;"><g fill="none"><path d="M2 12c0 5.523 4.477 10 10 10s10-4.477 10-10S17.523 2 12 2 2 6.477 2 12zm5.293-3.293 1.414-1.414 8 8-1.414 1.414z" fill="currentcolor"></path></g></svg> </div>`);
10706
+ var root$9 = /* @__PURE__ */ from_html(`<div><div class="alviere-search-select__container svelte-roni7d"><div><!> <input type="text" class="alviere-search-select__input svelte-roni7d" autocomplete="off" role="combobox" aria-haspopup="listbox" aria-controls="search-select-dropdown"/> <!> <div class="alviere-search-select__actions svelte-roni7d"><!> <div><!></div></div></div> <!></div> <div class="alviere-search-select__validation-messages svelte-roni7d"><!> <!> <!></div></div>`);
10707
+ const $$css$b = {
10708
+ hash: "svelte-roni7d",
10709
+ code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-search-select.svelte-roni7d {position:relative;width:100%;}.alviere-search-select__label.svelte-roni7d {position:absolute;max-width:calc(100% - 1.5rem);inset-inline-start:0.75rem;top:calc(50% + 1px);transform:translateY(-50%);transition:all 250ms ease-in-out;transition-delay:0.1s;display:block;font-size:1rem;font-weight:500;color:#3f3f46;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.alviere-search-select__required.svelte-roni7d {font-size:0.75rem;color:#3f3f46;text-align:end;position:absolute;right:1rem;top:calc(50% + 1px);transform:translateY(-50%);}.alviere-search-select__error.svelte-roni7d {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}.alviere-search-select__wrapper.svelte-roni7d {position:relative;display:flex;align-items:center;background:#ffffff;border:1px solid #52525b;border-radius:0.25rem;transition:border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;}.alviere-search-select__wrapper--focused.svelte-roni7d {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}
10710
+ .alviere-search-select__wrapper--focused.svelte-roni7d .alviere-search-select__label:where(.svelte-roni7d) {transform:translateY(calc(-50% - 0.75rem));font-size:0.75rem;}
10711
+ .alviere-search-select__wrapper--focused.svelte-roni7d .alviere-search-select__input:where(.svelte-roni7d)::placeholder {opacity:1;}
10712
+ .alviere-search-select__wrapper--dirty.svelte-roni7d .alviere-search-select__label:where(.svelte-roni7d) {transform:translateY(calc(-50% - 0.75rem));font-size:0.75rem;}.alviere-search-select__wrapper--disabled.svelte-roni7d {background:#f4f4f5;cursor:not-allowed;}.alviere-search-select__wrapper--readonly.svelte-roni7d {background:#f4f4f5;cursor:default;}.alviere-search-select__wrapper--valid.svelte-roni7d {border-color:#436b1d;}.alviere-search-select__wrapper--invalid.svelte-roni7d {border-color:#b3311f;}.alviere-search-select__input.svelte-roni7d {flex:1;width:100%;height:100%;min-height:2.25rem;padding:1rem 0.75rem 0;border:none;background:transparent;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:1.25rem;line-height:1.5rem;color:#18181b;outline:none;}.alviere-search-select__input.svelte-roni7d::placeholder {color:#71717a;opacity:0;transition:opacity 150ms ease-in-out;transition-delay:0.15s;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;}.alviere-search-select__input.svelte-roni7d:disabled {cursor:not-allowed;color:#52525b;}.alviere-search-select__input.svelte-roni7d:read-only {cursor:default;color:#3f3f46;}.alviere-search-select__validation-messages.svelte-roni7d {min-height:1.40625rem;display:flex;justify-content:space-between;align-items:center;padding-top:0.25rem;}.alviere-search-select--sm.svelte-roni7d .alviere-search-select__wrapper:where(.svelte-roni7d) {min-height:2.5rem;}.alviere-search-select--sm.svelte-roni7d .alviere-search-select__input:where(.svelte-roni7d) {font-size:1.125rem;padding:0.25rem 0.75rem;}.alviere-search-select--sm.svelte-roni7d .alviere-search-select__label:where(.svelte-roni7d) {font-size:1rem;}.alviere-search-select--md.svelte-roni7d .alviere-search-select__wrapper:where(.svelte-roni7d) {min-height:3.25rem;}.alviere-search-select--md.svelte-roni7d .alviere-search-select__input:where(.svelte-roni7d) {font-size:1rem;}.alviere-search-select--lg.svelte-roni7d .alviere-search-select__wrapper:where(.svelte-roni7d) {min-height:3.75rem;}.alviere-search-select--lg.svelte-roni7d .alviere-search-select__input:where(.svelte-roni7d) {font-size:1.5rem;padding:0.875rem 0.75rem;}.alviere-search-select--lg.svelte-roni7d .alviere-search-select__label:where(.svelte-roni7d) {font-size:1.25rem;}.alviere-search-select.svelte-roni7d:focus-within .alviere-search-select__wrapper:where(.svelte-roni7d):not(--disabled):not(--readonly) {border-color:#227e9e;box-shadow:0 0 0 1px #227e9e inset;}.alviere-search-select__container.svelte-roni7d {position:relative;}.alviere-search-select__wrapper.svelte-roni7d {position:relative;display:flex;align-items:center;}.alviere-search-select__wrapper.svelte-roni7d:hover:not(.alviere-search-select__wrapper--disabled) {border-color:#3f3f46;}.alviere-search-select__wrapper--focused.svelte-roni7d {border-color:#227e9e;box-shadow:0 0 0 2px rgba(34, 126, 158, 0.15);}.alviere-search-select__wrapper--disabled.svelte-roni7d {cursor:not-allowed;opacity:0.7;}.alviere-search-select__wrapper--disabled.alviere-search-select__wrapper--valid.svelte-roni7d {border-color:#52525b;}.alviere-search-select__input.svelte-roni7d {flex:1;width:100%;height:100%;min-height:2.25rem;padding:1rem 0.75rem 0;border:none;background:transparent;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:1.25rem;line-height:1.5rem;color:#18181b;outline:none;}.alviere-search-select__input.svelte-roni7d::placeholder {color:#71717a;opacity:0;transition:opacity 150ms ease-in-out;transition-delay:0.15s;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;}.alviere-search-select__input.svelte-roni7d:disabled {cursor:not-allowed;color:#52525b;}.alviere-search-select__input.svelte-roni7d:read-only {cursor:default;color:#3f3f46;}.alviere-search-select__input.svelte-roni7d {flex:1;border:none;outline:none;background:transparent;margin:0;width:100%;height:100%;}.alviere-search-select__input.svelte-roni7d::placeholder {color:#71717a;opacity:0;transition:opacity 0.2s ease;}.alviere-search-select__input.svelte-roni7d:focus::placeholder {opacity:1;}.alviere-search-select__input.svelte-roni7d:disabled {cursor:not-allowed;color:#52525b;}.alviere-search-select__display-value.svelte-roni7d {position:absolute;left:0.75rem;right:3rem;padding-top:1rem;top:50%;transform:translateY(-50%);color:#18181b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:1;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;}.alviere-search-select__actions.svelte-roni7d {position:absolute;right:0.75rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:0.25rem;z-index:2;}.alviere-search-select__clear-button.svelte-roni7d {display:flex;align-items:center;justify-content:center;padding:0.25rem 0.5rem;margin-right:1.5rem;background:#e4e4e7;border-radius:0.125rem;font-size:1rem;font-weight:500;color:#3f3f46;padding-left:0.25rem;padding-right:0.25rem;border-radius:50%;cursor:pointer;transition:all 150ms ease-in-out;margin-right:0.5rem;appearance:none;border:none;}.alviere-search-select__clear-button.svelte-roni7d svg {width:0.75rem;height:0.75rem;}.alviere-search-select__clear-button.svelte-roni7d:hover {background-color:#d4d4d8;color:#27272a;}.alviere-search-select__clear-button.svelte-roni7d:focus {outline:none;box-shadow:0 0 0 2px rgba(34, 126, 158, 0.25);}.alviere-search-select__dropdown-arrow.svelte-roni7d {color:#71717a;font-size:1rem;transition:transform 150ms ease-in-out;display:flex;flex-direction:column;align-items:center;justify-content:center;}.alviere-search-select__dropdown-arrow.open.svelte-roni7d {transform:rotate(180deg);}.alviere-search-select__dropdown.svelte-roni7d {position:absolute;top:100%;left:0;right:0;z-index:1000;background-color:#ffffff;border:1px solid #52525b;border-top:none;border-radius:0 0 0.25rem 0.25rem;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);overflow:hidden;
10713
+ animation: svelte-roni7d-dropdownFadeIn 150ms ease-in-out ease;}.alviere-search-select__options-list.svelte-roni7d {max-height:12.5rem;overflow-y:auto;}.alviere-search-select__option-item.svelte-roni7d {padding:0.5rem 1rem;cursor:pointer;transition:background-color 150ms ease-in-out;border-bottom:1px solid #f4f4f5;}.alviere-search-select__option-item.svelte-roni7d:hover {background-color:#fafafa;}.alviere-search-select__option-item.selected.svelte-roni7d {background-color:rgba(34, 126, 158, 0.1);color:#227e9e;font-weight:500;}.alviere-search-select__option-item.highlighted.svelte-roni7d {background-color:rgba(34, 126, 158, 0.1);}.alviere-search-select__option-item.svelte-roni7d:last-child {border-bottom:none;}.alviere-search-select__loading-message.svelte-roni7d, .alviere-search-select__no-options-message.svelte-roni7d {padding:1.5rem 1rem;text-align:center;color:#71717a;font-style:italic;}.alviere-search-select__help.svelte-roni7d {margin-top:0.25rem;font-size:0.75rem;color:#71717a;line-height:1.25;display:flex;align-items:flex-start;gap:0.25rem;}.alviere-search-select__help.svelte-roni7d svg {width:1rem;height:1rem;}.alviere-search-select__error.svelte-roni7d {display:flex;align-items:center;gap:0.25rem;font-size:0.75rem;color:#b3311f;line-height:1.25;}
10714
+
10715
+ @keyframes svelte-roni7d-dropdownFadeIn {
10716
+ from {
10717
+ opacity: 0;
10718
+ transform: translateY(-10px);
10719
+ }
10720
+ to {
10721
+ opacity: 1;
10722
+ transform: translateY(0);
10723
+ }
10724
+ }
10725
+ @media (max-width: 768px) {.alviere-search-select__dropdown.svelte-roni7d {max-height:15.625rem;}.alviere-search-select__option-item.svelte-roni7d {padding:1rem 0.5rem;}
10726
+ }`
10727
+ };
10728
+ function SearchSelect($$anchor, $$props) {
10729
+ push($$props, true);
10730
+ append_styles$1($$anchor, $$css$b);
10731
+ let value = prop($$props, "value", 15, ""), options = prop($$props, "options", 31, () => proxy([])), placeholder = prop($$props, "placeholder", 15, "Search..."), disabled = prop($$props, "disabled", 15, false), required = prop($$props, "required", 15, false), readonly = prop($$props, "readonly", 15, false), size = prop($$props, "size", 15, "md"), id = prop($$props, "id", 15, ""), name = prop($$props, "name", 15, ""), validationState = prop($$props, "validationState", 15, "neutral"), errorMessage = prop($$props, "errorMessage", 15, ""), helpText = prop($$props, "helpText", 15, ""), label = prop($$props, "label", 15, ""), searchPlaceholder = prop($$props, "searchPlaceholder", 15, ""), noOptionsMessage = prop($$props, "noOptionsMessage", 15, "No options found"), loadingMessage = prop($$props, "loadingMessage", 15, "Loading..."), isLoading = prop($$props, "isLoading", 15, false), maxHeight = prop($$props, "maxHeight", 15, "300px"), validationSchema = prop($$props, "validationSchema", 31, () => proxy({})), onchange = prop($$props, "onchange", 15), onfocus = prop($$props, "onfocus", 15), onblur = prop($$props, "onblur", 15);
10732
+ const dispatch = createEventDispatcher();
10733
+ const ChevronDownIcon = createElement(ChevronDown);
10734
+ const CrossIcon = createElement(X);
10735
+ const baseInput = createEnhancedBaseInputMixin({
10736
+ get value() {
10737
+ return value();
10668
10738
  },
10669
- /**
10670
- * Update JWT in the shared AlviereCore instance
10671
- */
10672
- updateJwt: (newJwt) => {
10673
- update2((state2) => {
10674
- var _a2;
10675
- if (!state2.core || !state2.config) {
10676
- ((_a2 = state2.config) == null ? void 0 : _a2.debug) && uiLogger.warn("⚠️ Cannot update JWT - core not initialized");
10677
- return state2;
10678
- }
10679
- const debug = state2.config.debug || false;
10680
- debug && uiLogger.info("🔄 Updating JWT in shared AlviereCore instance (store)...");
10681
- state2.core.configure({ ...state2.config, jwt: newJwt });
10682
- debug && uiLogger.info("✅ Shared AlviereCore updated with new JWT (store):", {
10683
- accountUuid: state2.core.getAccountUuid(),
10684
- businessUuid: state2.core.getBusinessUuid(),
10685
- isFirstTimeUser: state2.core.isFirstTimeUser()
10686
- });
10687
- return { ...state2, config: { ...state2.config, jwt: newJwt } };
10688
- });
10739
+ // ← Make value reactive!
10740
+ required: required(),
10741
+ disabled: disabled(),
10742
+ readonly: readonly(),
10743
+ get validationState() {
10744
+ return validationState();
10689
10745
  },
10690
- /**
10691
- * Reset the store (cleanup)
10692
- */
10693
- reset: () => {
10694
- set2({ core: null, isInitialized: false, config: null });
10746
+ get errorMessage() {
10747
+ return errorMessage();
10695
10748
  },
10696
- /**
10697
- * Get the current core instance (for non-reactive access)
10698
- */
10699
- getCore: () => {
10700
- let currentCore = null;
10701
- subscribe((state2) => {
10702
- currentCore = state2.core;
10703
- })();
10704
- return currentCore;
10705
- }
10706
- };
10707
- };
10708
- const flowCoreStore = createFlowCoreStore();
10709
- const initFlowCore = flowCoreStore.init;
10710
- flowCoreStore.updateJwt;
10711
- const resetFlowCore = flowCoreStore.reset;
10712
- flowCoreStore.getCore;
10713
- function createBaseFormMixin(options) {
10714
- const {
10715
- jwt: initialJwt = "",
10716
- businessUuid = "",
10717
- // Business UUID (merchant account UUID) for user state comparison
10718
- publicCertificate: initialPublicCertificate = "",
10719
- publicCertificateId: initialPublicCertificateId = "",
10720
- debug = false,
10721
- isInFlow = false,
10722
- disabled = false,
10723
- readonly = false,
10724
- initialData = {},
10725
- submitHandler,
10726
- customValidator,
10727
- fieldSchemas = {},
10728
- formName = "UnknownForm",
10729
- stepType = "FORM_STEP",
10730
- stepIndex,
10731
- enableAlviereCore = true,
10732
- resultTransformer,
10733
- onSuccessCallback
10734
- } = options;
10735
- let isLoading = /* @__PURE__ */ state(false);
10736
- let isSubmitting = /* @__PURE__ */ state(false);
10737
- let isPolling = /* @__PURE__ */ state(false);
10738
- let hasSubmitted = /* @__PURE__ */ state(false);
10739
- let totalSubmissions = /* @__PURE__ */ state(0);
10740
- let successCount = /* @__PURE__ */ state(0);
10741
- let errorCount = /* @__PURE__ */ state(0);
10742
- let lastResponse = /* @__PURE__ */ state(null);
10743
- let lastError = /* @__PURE__ */ state(null);
10744
- let formElement = /* @__PURE__ */ state(null);
10745
- let formData = /* @__PURE__ */ state(proxy({ ...initialData }));
10746
- let fields = /* @__PURE__ */ state(proxy({}));
10747
- let validationErrors = /* @__PURE__ */ state(proxy({}));
10748
- let isDirty = /* @__PURE__ */ state(false);
10749
- let hasUnsavedChanges = /* @__PURE__ */ state(false);
10750
- let jwt = /* @__PURE__ */ state(proxy(initialJwt));
10751
- const publicCertificate = proxy(initialPublicCertificate);
10752
- const publicCertificateId = proxy(initialPublicCertificateId);
10753
- let alviereCore = /* @__PURE__ */ state(null);
10754
- user_effect(() => {
10755
- if (enableAlviereCore && get$1(jwt) && get$1(jwt).trim() !== "") {
10756
- const storeState = flowCoreStore.getCore();
10757
- if (storeState) {
10758
- set(alviereCore, storeState, true);
10759
- debug && uiLogger.info(`[${formName}] ✅ Using shared AlviereCore instance from flow store`);
10760
- } else {
10761
- debug && uiLogger.info(`[${formName}] 🔍 Creating standalone AlviereCore instance...`);
10762
- set(
10763
- alviereCore,
10764
- getAlviereCore({
10765
- jwt: get$1(jwt),
10766
- debug,
10767
- publicCertificate,
10768
- publicCertificateId,
10769
- business_uuid: businessUuid
10770
- }),
10771
- true
10772
- );
10749
+ helpText: helpText(),
10750
+ label: label(),
10751
+ validationSchema: validationSchema(),
10752
+ componentName: "SearchSelect",
10753
+ componentType: "select",
10754
+ customValidator: (val) => {
10755
+ if (required() && (!val || val === "")) {
10756
+ return { isValid: false, error: "Please select an option" };
10773
10757
  }
10774
- if (businessUuid && get$1(alviereCore)) {
10775
- debug && uiLogger.info(`[${formName}] 🔍 User state check:`, {
10776
- accountUuid: get$1(alviereCore).getAccountUuid(),
10777
- businessUuid: get$1(alviereCore).getBusinessUuid(),
10778
- isFirstTimeUser: get$1(alviereCore).isFirstTimeUser(),
10779
- isScopedToPayee: get$1(alviereCore).isScopedToPayee()
10780
- });
10758
+ if (val && options().length > 0) {
10759
+ const exists = options().some((option) => option.value === val);
10760
+ if (!exists) {
10761
+ return { isValid: false, error: "Selected value is not valid" };
10762
+ }
10763
+ }
10764
+ const result = validateWithSchema(val, validationSchema(), label());
10765
+ return { isValid: result.isValid, error: result.firstError };
10766
+ }
10767
+ });
10768
+ let containerElement = /* @__PURE__ */ state(null);
10769
+ let searchInputElement = /* @__PURE__ */ state(null);
10770
+ let isOpen = /* @__PURE__ */ state(false);
10771
+ let searchTerm = /* @__PURE__ */ state("");
10772
+ let selectedIndex = /* @__PURE__ */ state(-1);
10773
+ let eventDispatcher = /* @__PURE__ */ user_derived(() => useEventDispatcher(get$1(containerElement)));
10774
+ function createEventDetail() {
10775
+ const selectedOption = options().find((option) => option.value === value());
10776
+ return {
10777
+ value: value() ? String(value()) : "",
10778
+ rawValue: value() ? String(value()) : "",
10779
+ isValid: baseInput.state.isValid,
10780
+ validationState: baseInput.state.validationState,
10781
+ errorMessage: baseInput.state.errorMessage,
10782
+ hasInteracted: baseInput.state.hasInteracted,
10783
+ selectedOption: selectedOption || null,
10784
+ options: options(),
10785
+ searchQuery: get$1(searchTerm)
10786
+ };
10787
+ }
10788
+ let filteredOptions = /* @__PURE__ */ user_derived(() => () => {
10789
+ if (!get$1(searchTerm)) return options();
10790
+ return options().filter((option) => option.label.toLowerCase().includes(get$1(searchTerm).toLowerCase()));
10791
+ });
10792
+ let displayValue = /* @__PURE__ */ user_derived(() => () => {
10793
+ if (!value()) return "";
10794
+ const selectedOption = options().find((option) => option.value === value());
10795
+ return selectedOption ? selectedOption.label : "";
10796
+ });
10797
+ function openDropdown() {
10798
+ uiLogger.info("SearchSelect: openDropdown", disabled(), readonly());
10799
+ if (disabled() || readonly()) return;
10800
+ set(isOpen, true);
10801
+ set(selectedIndex, -1);
10802
+ setTimeout(
10803
+ () => {
10804
+ get$1(searchInputElement) === null || get$1(searchInputElement) === void 0 ? void 0 : get$1(searchInputElement).focus();
10805
+ },
10806
+ 0
10807
+ );
10808
+ get$1(eventDispatcher).dispatch(ComponentEvents.SEARCH_SELECT_OPEN, createEventDetail());
10809
+ }
10810
+ function closeDropdown() {
10811
+ uiLogger.info("SearchSelect: closeDropdown", disabled(), readonly());
10812
+ set(isOpen, false);
10813
+ set(searchTerm, "");
10814
+ set(selectedIndex, -1);
10815
+ get$1(eventDispatcher).dispatch(ComponentEvents.SEARCH_SELECT_CLOSE, createEventDetail());
10816
+ }
10817
+ function selectOption(option) {
10818
+ uiLogger.info("SearchSelect: selectOption called with:", { option, currentValue: value(), required: required() });
10819
+ value(option.value);
10820
+ uiLogger.info("SearchSelect: After setting value:", { newValue: value(), type: typeof value() });
10821
+ baseInput.actions.markAsInteracted();
10822
+ uiLogger.info("SearchSelect: After markAsInteracted, hasInteracted:", baseInput.state.hasInteracted);
10823
+ closeDropdown();
10824
+ get$1(searchInputElement) === null || get$1(searchInputElement) === void 0 ? void 0 : get$1(searchInputElement).blur();
10825
+ dispatch("change", { value: option.value, label: option.label });
10826
+ get$1(eventDispatcher).dispatch(ComponentEvents.SEARCH_SELECT_CHANGE, createEventDetail());
10827
+ if (onchange()) {
10828
+ onchange()({ detail: { value: option.value, label: option.label } });
10829
+ }
10830
+ }
10831
+ function handleKeydown(event2) {
10832
+ if (!get$1(isOpen)) return;
10833
+ switch (event2.key) {
10834
+ case "ArrowDown":
10835
+ event2.preventDefault();
10836
+ set(selectedIndex, Math.min(get$1(selectedIndex) + 1, get$1(filteredOptions)().length - 1), true);
10837
+ break;
10838
+ case "ArrowUp":
10839
+ event2.preventDefault();
10840
+ set(selectedIndex, Math.max(get$1(selectedIndex) - 1, -1), true);
10841
+ break;
10842
+ case "Enter":
10843
+ event2.preventDefault();
10844
+ if (get$1(selectedIndex) >= 0 && get$1(selectedIndex) < get$1(filteredOptions)().length) {
10845
+ selectOption(get$1(filteredOptions)()[get$1(selectedIndex)]);
10846
+ }
10847
+ break;
10848
+ case "Escape":
10849
+ event2.preventDefault();
10850
+ closeDropdown();
10851
+ break;
10852
+ }
10853
+ }
10854
+ function handleSearchInput(event2) {
10855
+ const target = event2.target;
10856
+ set(searchTerm, target.value, true);
10857
+ set(selectedIndex, -1);
10858
+ get$1(eventDispatcher).dispatch(ComponentEvents.SEARCH_SELECT_INPUT, createEventDetail());
10859
+ }
10860
+ function handleInputFocus(event2) {
10861
+ baseInput.handlers.handleFocus(event2);
10862
+ openDropdown();
10863
+ if (get$1(displayValue)()) {
10864
+ set(searchTerm, get$1(displayValue)(), true);
10865
+ }
10866
+ if (onfocus()) {
10867
+ onfocus()(event2);
10868
+ }
10869
+ }
10870
+ function handleInputBlur(event2) {
10871
+ baseInput.handlers.handleBlur(event2);
10872
+ setTimeout(
10873
+ () => {
10874
+ if (!(get$1(containerElement) === null || get$1(containerElement) === void 0 ? void 0 : get$1(containerElement).contains(document.activeElement))) {
10875
+ closeDropdown();
10876
+ set(searchTerm, "");
10877
+ }
10878
+ },
10879
+ 150
10880
+ );
10881
+ if (onblur()) {
10882
+ onblur()(event2);
10883
+ }
10884
+ }
10885
+ function clearSelection() {
10886
+ uiLogger.info("SearchSelect: clearSelection called, current value:", value());
10887
+ value("");
10888
+ set(searchTerm, "");
10889
+ set(selectedIndex, -1);
10890
+ uiLogger.info("SearchSelect: After clearing value:", { value: value(), required: required() });
10891
+ baseInput.actions.markAsInteracted();
10892
+ uiLogger.info("SearchSelect: After markAsInteracted in clear, hasInteracted:", baseInput.state.hasInteracted);
10893
+ dispatch("change", { value: "", label: "" });
10894
+ get$1(eventDispatcher).dispatch(ComponentEvents.SEARCH_SELECT_CHANGE, createEventDetail());
10895
+ if (onchange()) {
10896
+ onchange()({ detail: { value: "", label: "" } });
10897
+ }
10898
+ }
10899
+ function handleClickOutside(event2) {
10900
+ var _a2;
10901
+ if (!get$1(isOpen) || !get$1(containerElement)) return;
10902
+ const path = ((_a2 = event2.composedPath) === null || _a2 === void 0 ? void 0 : _a2.call(event2)) || [];
10903
+ const rootNode = get$1(containerElement).getRootNode();
10904
+ const currentElement = rootNode === null || rootNode === void 0 ? void 0 : rootNode.host;
10905
+ const isInside = path.includes(get$1(containerElement)) || currentElement && path.includes(currentElement);
10906
+ if (!isInside) closeDropdown();
10907
+ }
10908
+ user_effect(() => {
10909
+ if (typeof window !== "undefined") {
10910
+ document.addEventListener("click", handleClickOutside);
10911
+ return () => {
10912
+ document.removeEventListener("click", handleClickOutside);
10913
+ };
10914
+ }
10915
+ });
10916
+ user_effect(() => {
10917
+ if (baseInput.state.hasInteracted) {
10918
+ baseInput.actions.forceValidation();
10919
+ }
10920
+ });
10921
+ user_effect(() => {
10922
+ if (typeof window !== "undefined" && window.customElements) {
10923
+ const rootNode = get$1(containerElement) === null || get$1(containerElement) === void 0 ? void 0 : get$1(containerElement).getRootNode();
10924
+ const element2 = rootNode === null || rootNode === void 0 ? void 0 : rootNode.host;
10925
+ if (element2) {
10926
+ const attributes = element2.getAttributeNames();
10927
+ if (attributes.includes("required")) {
10928
+ required(element2.hasAttribute("required"));
10929
+ }
10930
+ if (attributes.includes("disabled")) {
10931
+ disabled(element2.hasAttribute("disabled"));
10932
+ }
10933
+ if (attributes.includes("readonly")) {
10934
+ readonly(element2.hasAttribute("readonly"));
10935
+ }
10936
+ }
10937
+ }
10938
+ });
10939
+ function focus() {
10940
+ get$1(searchInputElement) === null || get$1(searchInputElement) === void 0 ? void 0 : get$1(searchInputElement).focus();
10941
+ }
10942
+ function blur() {
10943
+ get$1(searchInputElement) === null || get$1(searchInputElement) === void 0 ? void 0 : get$1(searchInputElement).blur();
10944
+ }
10945
+ function isValid() {
10946
+ return baseInput.state.isValid;
10947
+ }
10948
+ function getValidationError() {
10949
+ return baseInput.state.errorMessage || null;
10950
+ }
10951
+ function getValidationSchema() {
10952
+ return validationSchema();
10953
+ }
10954
+ function setValidationSchema(schema) {
10955
+ validationSchema(schema);
10956
+ }
10957
+ function clear() {
10958
+ value("");
10959
+ set(searchTerm, "");
10960
+ set(selectedIndex, -1);
10961
+ set(isOpen, false);
10962
+ }
10963
+ function select() {
10964
+ if (get$1(searchInputElement)) {
10965
+ get$1(searchInputElement).focus();
10966
+ get$1(searchInputElement).select();
10967
+ } else {
10968
+ focus();
10969
+ }
10970
+ }
10971
+ function setSelectionRange(start, end) {
10972
+ if (get$1(searchInputElement) && "setSelectionRange" in get$1(searchInputElement)) {
10973
+ get$1(searchInputElement).setSelectionRange(start, end);
10974
+ }
10975
+ }
10976
+ function getSelectedOption() {
10977
+ return get$1(filteredOptions).find((option) => option.value === value()) || null;
10978
+ }
10979
+ function getFilteredOptions() {
10980
+ return get$1(filteredOptions);
10981
+ }
10982
+ function selectOptionByIndex(index2) {
10983
+ if (index2 >= 0 && index2 < get$1(filteredOptions).length) {
10984
+ selectOption(get$1(filteredOptions)[index2]);
10985
+ }
10986
+ }
10987
+ function getComponentMetadata() {
10988
+ return {
10989
+ name: "SearchSelect",
10990
+ type: "select",
10991
+ standardsVersion: "1.0.0",
10992
+ hasStandardizedAPI: true,
10993
+ capabilities: {
10994
+ hasTextManipulation: true,
10995
+ hasSpecializedMethods: true,
10996
+ methodNames: [
10997
+ "focus",
10998
+ "blur",
10999
+ "isValid",
11000
+ "getValidationError",
11001
+ "getValidationSchema",
11002
+ "setValidationSchema",
11003
+ "clear",
11004
+ "select",
11005
+ "setSelectionRange",
11006
+ "openDropdown",
11007
+ "closeDropdown",
11008
+ "getSelectedOption",
11009
+ "getFilteredOptions",
11010
+ "selectOptionByIndex"
11011
+ ]
11012
+ }
11013
+ };
11014
+ }
11015
+ var $$exports = {
11016
+ focus,
11017
+ blur,
11018
+ isValid,
11019
+ getValidationError,
11020
+ getValidationSchema,
11021
+ setValidationSchema,
11022
+ clear,
11023
+ select,
11024
+ setSelectionRange,
11025
+ openDropdown,
11026
+ closeDropdown,
11027
+ getSelectedOption,
11028
+ getFilteredOptions,
11029
+ selectOptionByIndex,
11030
+ getComponentMetadata,
11031
+ get value() {
11032
+ return value();
11033
+ },
11034
+ set value($$value = "") {
11035
+ value($$value);
11036
+ flushSync();
11037
+ },
11038
+ get options() {
11039
+ return options();
11040
+ },
11041
+ set options($$value = []) {
11042
+ options($$value);
11043
+ flushSync();
11044
+ },
11045
+ get placeholder() {
11046
+ return placeholder();
11047
+ },
11048
+ set placeholder($$value = "Search...") {
11049
+ placeholder($$value);
11050
+ flushSync();
11051
+ },
11052
+ get disabled() {
11053
+ return disabled();
11054
+ },
11055
+ set disabled($$value = false) {
11056
+ disabled($$value);
11057
+ flushSync();
11058
+ },
11059
+ get required() {
11060
+ return required();
11061
+ },
11062
+ set required($$value = false) {
11063
+ required($$value);
11064
+ flushSync();
11065
+ },
11066
+ get readonly() {
11067
+ return readonly();
11068
+ },
11069
+ set readonly($$value = false) {
11070
+ readonly($$value);
11071
+ flushSync();
11072
+ },
11073
+ get size() {
11074
+ return size();
11075
+ },
11076
+ set size($$value = "md") {
11077
+ size($$value);
11078
+ flushSync();
11079
+ },
11080
+ get id() {
11081
+ return id();
11082
+ },
11083
+ set id($$value = "") {
11084
+ id($$value);
11085
+ flushSync();
11086
+ },
11087
+ get name() {
11088
+ return name();
11089
+ },
11090
+ set name($$value = "") {
11091
+ name($$value);
11092
+ flushSync();
11093
+ },
11094
+ get validationState() {
11095
+ return validationState();
11096
+ },
11097
+ set validationState($$value = "neutral") {
11098
+ validationState($$value);
11099
+ flushSync();
11100
+ },
11101
+ get errorMessage() {
11102
+ return errorMessage();
11103
+ },
11104
+ set errorMessage($$value = "") {
11105
+ errorMessage($$value);
11106
+ flushSync();
11107
+ },
11108
+ get helpText() {
11109
+ return helpText();
11110
+ },
11111
+ set helpText($$value = "") {
11112
+ helpText($$value);
11113
+ flushSync();
11114
+ },
11115
+ get label() {
11116
+ return label();
11117
+ },
11118
+ set label($$value = "") {
11119
+ label($$value);
11120
+ flushSync();
11121
+ },
11122
+ get searchPlaceholder() {
11123
+ return searchPlaceholder();
11124
+ },
11125
+ set searchPlaceholder($$value = "") {
11126
+ searchPlaceholder($$value);
11127
+ flushSync();
11128
+ },
11129
+ get noOptionsMessage() {
11130
+ return noOptionsMessage();
11131
+ },
11132
+ set noOptionsMessage($$value = "No options found") {
11133
+ noOptionsMessage($$value);
11134
+ flushSync();
11135
+ },
11136
+ get loadingMessage() {
11137
+ return loadingMessage();
11138
+ },
11139
+ set loadingMessage($$value = "Loading...") {
11140
+ loadingMessage($$value);
11141
+ flushSync();
11142
+ },
11143
+ get isLoading() {
11144
+ return isLoading();
11145
+ },
11146
+ set isLoading($$value = false) {
11147
+ isLoading($$value);
11148
+ flushSync();
11149
+ },
11150
+ get maxHeight() {
11151
+ return maxHeight();
11152
+ },
11153
+ set maxHeight($$value = "300px") {
11154
+ maxHeight($$value);
11155
+ flushSync();
11156
+ },
11157
+ get validationSchema() {
11158
+ return validationSchema();
11159
+ },
11160
+ set validationSchema($$value = {}) {
11161
+ validationSchema($$value);
11162
+ flushSync();
11163
+ },
11164
+ get onchange() {
11165
+ return onchange();
11166
+ },
11167
+ set onchange($$value) {
11168
+ onchange($$value);
11169
+ flushSync();
11170
+ },
11171
+ get onfocus() {
11172
+ return onfocus();
11173
+ },
11174
+ set onfocus($$value) {
11175
+ onfocus($$value);
11176
+ flushSync();
11177
+ },
11178
+ get onblur() {
11179
+ return onblur();
11180
+ },
11181
+ set onblur($$value) {
11182
+ onblur($$value);
11183
+ flushSync();
11184
+ }
11185
+ };
11186
+ var div = root$9();
11187
+ var div_1 = child(div);
11188
+ var div_2 = child(div_1);
11189
+ let classes;
11190
+ var node = child(div_2);
11191
+ {
11192
+ var consequent = ($$anchor2) => {
11193
+ var label_1 = root_1$9();
11194
+ var text2 = child(label_1, true);
11195
+ reset(label_1);
11196
+ template_effect(() => {
11197
+ set_attribute(label_1, "for", id() || name());
11198
+ set_text(text2, label());
11199
+ });
11200
+ append($$anchor2, label_1);
11201
+ };
11202
+ if_block(node, ($$render) => {
11203
+ if (label()) $$render(consequent);
11204
+ });
11205
+ }
11206
+ var input = sibling(node, 2);
11207
+ remove_input_defaults(input);
11208
+ input.__input = handleSearchInput;
11209
+ input.__keydown = handleKeydown;
11210
+ bind_this(input, ($$value) => set(searchInputElement, $$value), () => get$1(searchInputElement));
11211
+ var node_1 = sibling(input, 2);
11212
+ {
11213
+ var consequent_1 = ($$anchor2) => {
11214
+ var div_3 = root_2$4();
11215
+ var text_1 = child(div_3, true);
11216
+ reset(div_3);
11217
+ template_effect(($0) => set_text(text_1, $0), [() => get$1(displayValue)()]);
11218
+ append($$anchor2, div_3);
11219
+ };
11220
+ if_block(node_1, ($$render) => {
11221
+ if (!get$1(isOpen) && !baseInput.state.isFocused && get$1(displayValue)()) $$render(consequent_1);
11222
+ });
11223
+ }
11224
+ var div_4 = sibling(node_1, 2);
11225
+ var node_2 = child(div_4);
11226
+ {
11227
+ var consequent_2 = ($$anchor2) => {
11228
+ var button = root_3$5();
11229
+ button.__click = (e) => {
11230
+ e.stopPropagation();
11231
+ clearSelection();
11232
+ };
11233
+ var node_3 = child(button);
11234
+ html(node_3, () => CrossIcon.outerHTML);
11235
+ reset(button);
11236
+ append($$anchor2, button);
11237
+ };
11238
+ if_block(node_2, ($$render) => {
11239
+ if (value() && !disabled() && !readonly()) $$render(consequent_2);
11240
+ });
11241
+ }
11242
+ var div_5 = sibling(node_2, 2);
11243
+ let classes_1;
11244
+ var node_4 = child(div_5);
11245
+ html(node_4, () => ChevronDownIcon.outerHTML);
11246
+ reset(div_5);
11247
+ reset(div_4);
11248
+ reset(div_2);
11249
+ var node_5 = sibling(div_2, 2);
11250
+ {
11251
+ var consequent_5 = ($$anchor2) => {
11252
+ var div_6 = root_4$4();
11253
+ var div_7 = child(div_6);
11254
+ var node_6 = child(div_7);
11255
+ {
11256
+ var consequent_3 = ($$anchor3) => {
11257
+ var div_8 = root_5$3();
11258
+ var text_2 = child(div_8, true);
11259
+ reset(div_8);
11260
+ template_effect(() => set_text(text_2, loadingMessage()));
11261
+ append($$anchor3, div_8);
11262
+ };
11263
+ var alternate_1 = ($$anchor3) => {
11264
+ var fragment = comment();
11265
+ var node_7 = first_child(fragment);
11266
+ {
11267
+ var consequent_4 = ($$anchor4) => {
11268
+ var div_9 = root_7$2();
11269
+ var text_3 = child(div_9, true);
11270
+ reset(div_9);
11271
+ template_effect(() => set_text(text_3, noOptionsMessage()));
11272
+ append($$anchor4, div_9);
11273
+ };
11274
+ var alternate = ($$anchor4) => {
11275
+ var fragment_1 = comment();
11276
+ var node_8 = first_child(fragment_1);
11277
+ each(node_8, 17, () => get$1(filteredOptions)(), index, ($$anchor5, option, index2) => {
11278
+ var div_10 = root_9$2();
11279
+ let classes_2;
11280
+ div_10.__click = () => selectOption(get$1(option));
11281
+ div_10.__keydown = (e) => {
11282
+ if (e.key === "Enter" || e.key === " ") {
11283
+ e.preventDefault();
11284
+ selectOption(get$1(option));
11285
+ }
11286
+ };
11287
+ var text_4 = child(div_10, true);
11288
+ reset(div_10);
11289
+ template_effect(() => {
11290
+ classes_2 = set_class(div_10, 1, "alviere-search-select__option-item svelte-roni7d", null, classes_2, {
11291
+ selected: get$1(option).value === value(),
11292
+ highlighted: index2 === get$1(selectedIndex)
11293
+ });
11294
+ set_attribute(div_10, "aria-selected", get$1(option).value === value());
11295
+ set_attribute(div_10, "aria-label", get$1(option).label);
11296
+ set_text(text_4, get$1(option).label);
11297
+ });
11298
+ event$1("mouseenter", div_10, () => set(selectedIndex, index2, true));
11299
+ append($$anchor5, div_10);
11300
+ });
11301
+ append($$anchor4, fragment_1);
11302
+ };
11303
+ if_block(
11304
+ node_7,
11305
+ ($$render) => {
11306
+ if (get$1(filteredOptions)().length === 0) $$render(consequent_4);
11307
+ else $$render(alternate, false);
11308
+ },
11309
+ true
11310
+ );
11311
+ }
11312
+ append($$anchor3, fragment);
11313
+ };
11314
+ if_block(node_6, ($$render) => {
11315
+ if (isLoading()) $$render(consequent_3);
11316
+ else $$render(alternate_1, false);
11317
+ });
11318
+ }
11319
+ reset(div_7);
11320
+ reset(div_6);
11321
+ template_effect(() => set_style(div_6, `max-height: ${maxHeight() ?? ""}`));
11322
+ append($$anchor2, div_6);
11323
+ };
11324
+ if_block(node_5, ($$render) => {
11325
+ if (get$1(isOpen)) $$render(consequent_5);
11326
+ });
11327
+ }
11328
+ reset(div_1);
11329
+ var div_11 = sibling(div_1, 2);
11330
+ var node_9 = child(div_11);
11331
+ {
11332
+ var consequent_6 = ($$anchor2) => {
11333
+ var div_12 = root_10$1();
11334
+ append($$anchor2, div_12);
11335
+ };
11336
+ if_block(node_9, ($$render) => {
11337
+ if (required() && baseInput.state.validationState === "neutral") $$render(consequent_6);
11338
+ });
11339
+ }
11340
+ var node_10 = sibling(node_9, 2);
11341
+ {
11342
+ var consequent_7 = ($$anchor2) => {
11343
+ var div_13 = root_11$2();
11344
+ var text_5 = child(div_13, true);
11345
+ reset(div_13);
11346
+ template_effect(() => set_text(text_5, helpText()));
11347
+ append($$anchor2, div_13);
11348
+ };
11349
+ if_block(node_10, ($$render) => {
11350
+ if (helpText() && baseInput.state.validationState !== "invalid") $$render(consequent_7);
11351
+ });
11352
+ }
11353
+ var node_11 = sibling(node_10, 2);
11354
+ {
11355
+ var consequent_8 = ($$anchor2) => {
11356
+ var div_14 = root_12$2();
11357
+ var text_6 = sibling(child(div_14));
11358
+ reset(div_14);
11359
+ template_effect(() => {
11360
+ set_attribute(div_14, "id", `${id() ?? ""}-error`);
11361
+ set_text(text_6, ` ${baseInput.state.errorMessage ?? ""}`);
11362
+ });
11363
+ append($$anchor2, div_14);
11364
+ };
11365
+ if_block(node_11, ($$render) => {
11366
+ if (baseInput.state.validationState === "invalid") $$render(consequent_8);
11367
+ });
11368
+ }
11369
+ reset(div_11);
11370
+ reset(div);
11371
+ bind_this(div, ($$value) => set(containerElement, $$value), () => get$1(containerElement));
11372
+ template_effect(
11373
+ ($0) => {
11374
+ set_class(div, 1, `alviere-search-select alviere-search-select--${size() ?? ""}`, "svelte-roni7d");
11375
+ classes = set_class(div_2, 1, "alviere-search-select__wrapper svelte-roni7d", null, classes, $0);
11376
+ set_attribute(input, "placeholder", get$1(isOpen) || baseInput.state.isFocused ? searchPlaceholder() || `Search ${label() || "options"}...` : "");
11377
+ set_attribute(input, "id", id());
11378
+ set_attribute(input, "name", name());
11379
+ input.disabled = disabled();
11380
+ input.readOnly = readonly();
11381
+ set_attribute(input, "aria-expanded", get$1(isOpen));
11382
+ classes_1 = set_class(div_5, 1, "alviere-search-select__dropdown-arrow svelte-roni7d", null, classes_1, { open: get$1(isOpen) });
11383
+ },
11384
+ [
11385
+ () => ({
11386
+ "alviere-search-select__wrapper--focused": baseInput.state.isFocused,
11387
+ "alviere-search-select__wrapper--valid": baseInput.state.validationState === "valid",
11388
+ "alviere-search-select__wrapper--invalid": baseInput.state.validationState === "invalid",
11389
+ "alviere-search-select__wrapper--disabled": disabled(),
11390
+ "alviere-search-select__wrapper--dirty": !!get$1(displayValue)()
11391
+ })
11392
+ ]
11393
+ );
11394
+ event$1("focus", input, handleInputFocus);
11395
+ event$1("blur", input, handleInputBlur);
11396
+ bind_value(input, () => get$1(searchTerm), ($$value) => set(searchTerm, $$value));
11397
+ append($$anchor, div);
11398
+ return pop($$exports);
11399
+ }
11400
+ delegate(["input", "keydown", "click"]);
11401
+ customElements.define("alviere-search-select", create_custom_element(
11402
+ SearchSelect,
11403
+ {
11404
+ value: {},
11405
+ options: {},
11406
+ placeholder: {},
11407
+ disabled: {},
11408
+ required: {},
11409
+ readonly: {},
11410
+ size: {},
11411
+ id: {},
11412
+ name: {},
11413
+ validationState: {},
11414
+ errorMessage: {},
11415
+ helpText: {},
11416
+ label: {},
11417
+ searchPlaceholder: {},
11418
+ noOptionsMessage: {},
11419
+ loadingMessage: {},
11420
+ isLoading: {},
11421
+ maxHeight: {},
11422
+ validationSchema: {},
11423
+ onchange: {},
11424
+ onfocus: {},
11425
+ onblur: {}
11426
+ },
11427
+ [],
11428
+ [
11429
+ "focus",
11430
+ "blur",
11431
+ "isValid",
11432
+ "getValidationError",
11433
+ "getValidationSchema",
11434
+ "setValidationSchema",
11435
+ "clear",
11436
+ "select",
11437
+ "setSelectionRange",
11438
+ "openDropdown",
11439
+ "closeDropdown",
11440
+ "getSelectedOption",
11441
+ "getFilteredOptions",
11442
+ "selectOptionByIndex",
11443
+ "getComponentMetadata"
11444
+ ],
11445
+ true
11446
+ ));
11447
+ const createFlowCoreStore = () => {
11448
+ const { subscribe, set: set2, update: update2 } = writable({ core: null, isInitialized: false, config: null });
11449
+ return {
11450
+ subscribe,
11451
+ /**
11452
+ * Initialize the shared AlviereCore instance
11453
+ */
11454
+ init: async (config) => {
11455
+ const debug = config.debug || false;
11456
+ if (!config.jwt) {
11457
+ debug && uiLogger.warn("⚠️ Cannot initialize AlviereCore - missing JWT");
11458
+ return;
11459
+ }
11460
+ try {
11461
+ debug && uiLogger.info("🔐 Initializing shared AlviereCore instance in store...");
11462
+ const { getAlviereCore: getAlviereCore2 } = await Promise.resolve().then(() => alviereCoreManager);
11463
+ const core = getAlviereCore2(config);
11464
+ update2((state2) => ({ ...state2, core, isInitialized: true, config }));
11465
+ debug && uiLogger.info("✅ Shared AlviereCore instance created in store:", {
11466
+ accountUuid: core.getAccountUuid(),
11467
+ businessUuid: core.getBusinessUuid(),
11468
+ isFirstTimeUser: core.isFirstTimeUser()
11469
+ });
11470
+ } catch (error) {
11471
+ uiLogger.error("❌ Failed to initialize AlviereCore in store:", error);
11472
+ }
11473
+ },
11474
+ /**
11475
+ * Update JWT in the shared AlviereCore instance
11476
+ */
11477
+ updateJwt: (newJwt) => {
11478
+ update2((state2) => {
11479
+ var _a2;
11480
+ if (!state2.core || !state2.config) {
11481
+ ((_a2 = state2.config) == null ? void 0 : _a2.debug) && uiLogger.warn("⚠️ Cannot update JWT - core not initialized");
11482
+ return state2;
11483
+ }
11484
+ const debug = state2.config.debug || false;
11485
+ debug && uiLogger.info("🔄 Updating JWT in shared AlviereCore instance (store)...");
11486
+ state2.core.configure({ ...state2.config, jwt: newJwt });
11487
+ debug && uiLogger.info("✅ Shared AlviereCore updated with new JWT (store):", {
11488
+ accountUuid: state2.core.getAccountUuid(),
11489
+ businessUuid: state2.core.getBusinessUuid(),
11490
+ isFirstTimeUser: state2.core.isFirstTimeUser()
11491
+ });
11492
+ return { ...state2, config: { ...state2.config, jwt: newJwt } };
11493
+ });
11494
+ },
11495
+ /**
11496
+ * Reset the store (cleanup)
11497
+ */
11498
+ reset: () => {
11499
+ set2({ core: null, isInitialized: false, config: null });
11500
+ },
11501
+ /**
11502
+ * Get the current core instance (for non-reactive access)
11503
+ */
11504
+ getCore: () => {
11505
+ let currentCore = null;
11506
+ subscribe((state2) => {
11507
+ currentCore = state2.core;
11508
+ })();
11509
+ return currentCore;
11510
+ }
11511
+ };
11512
+ };
11513
+ const flowCoreStore = createFlowCoreStore();
11514
+ const initFlowCore = flowCoreStore.init;
11515
+ flowCoreStore.updateJwt;
11516
+ const resetFlowCore = flowCoreStore.reset;
11517
+ flowCoreStore.getCore;
11518
+ function createBaseFormMixin(options) {
11519
+ const {
11520
+ jwt: initialJwt = "",
11521
+ businessUuid = "",
11522
+ // Business UUID (merchant account UUID) for user state comparison
11523
+ publicCertificate: initialPublicCertificate = "",
11524
+ publicCertificateId: initialPublicCertificateId = "",
11525
+ debug = false,
11526
+ isInFlow = false,
11527
+ disabled = false,
11528
+ readonly = false,
11529
+ initialData = {},
11530
+ submitHandler,
11531
+ customValidator,
11532
+ fieldSchemas = {},
11533
+ formName = "UnknownForm",
11534
+ stepType = "FORM_STEP",
11535
+ stepIndex,
11536
+ enableAlviereCore = true,
11537
+ resultTransformer,
11538
+ onSuccessCallback
11539
+ } = options;
11540
+ let isLoading = /* @__PURE__ */ state(false);
11541
+ let isSubmitting = /* @__PURE__ */ state(false);
11542
+ let isPolling = /* @__PURE__ */ state(false);
11543
+ let hasSubmitted = /* @__PURE__ */ state(false);
11544
+ let totalSubmissions = /* @__PURE__ */ state(0);
11545
+ let successCount = /* @__PURE__ */ state(0);
11546
+ let errorCount = /* @__PURE__ */ state(0);
11547
+ let lastResponse = /* @__PURE__ */ state(null);
11548
+ let lastError = /* @__PURE__ */ state(null);
11549
+ let formElement = /* @__PURE__ */ state(null);
11550
+ let formData = /* @__PURE__ */ state(proxy({ ...initialData }));
11551
+ let fields = /* @__PURE__ */ state(proxy({}));
11552
+ let validationErrors = /* @__PURE__ */ state(proxy({}));
11553
+ let isDirty = /* @__PURE__ */ state(false);
11554
+ let hasUnsavedChanges = /* @__PURE__ */ state(false);
11555
+ let jwt = /* @__PURE__ */ state(proxy(initialJwt));
11556
+ const publicCertificate = proxy(initialPublicCertificate);
11557
+ const publicCertificateId = proxy(initialPublicCertificateId);
11558
+ let alviereCore = /* @__PURE__ */ state(null);
11559
+ user_effect(() => {
11560
+ if (enableAlviereCore && get$1(jwt) && get$1(jwt).trim() !== "") {
11561
+ const storeState = flowCoreStore.getCore();
11562
+ if (storeState) {
11563
+ set(alviereCore, storeState, true);
11564
+ debug && uiLogger.info(`[${formName}] ✅ Using shared AlviereCore instance from flow store`);
11565
+ } else {
11566
+ debug && uiLogger.info(`[${formName}] 🔍 Creating standalone AlviereCore instance...`);
11567
+ set(
11568
+ alviereCore,
11569
+ getAlviereCore({
11570
+ jwt: get$1(jwt),
11571
+ debug,
11572
+ publicCertificate,
11573
+ publicCertificateId,
11574
+ business_uuid: businessUuid
11575
+ }),
11576
+ true
11577
+ );
11578
+ }
11579
+ if (businessUuid && get$1(alviereCore)) {
11580
+ debug && uiLogger.info(`[${formName}] 🔍 User state check:`, {
11581
+ accountUuid: get$1(alviereCore).getAccountUuid(),
11582
+ businessUuid: get$1(alviereCore).getBusinessUuid(),
11583
+ isFirstTimeUser: get$1(alviereCore).isFirstTimeUser(),
11584
+ isScopedToPayee: get$1(alviereCore).isScopedToPayee()
11585
+ });
10781
11586
  }
10782
11587
  }
10783
11588
  });
@@ -11100,60 +11905,564 @@ function createBaseFormMixin(options) {
11100
11905
  }
11101
11906
  };
11102
11907
  }
11103
- var root_1$8 = /* @__PURE__ */ from_html(`<h2 class="svelte-1tz2qyj">Create Consumer Account</h2>`);
11908
+ const INDIVIDUAL_PAYER = { "profileId": "INDIVIDUAL_PAYER", "config": { "labels": { "finalText": "Payment in process" } }, "steps": [{ "type": "CREATE_CONSUMER_ACCOUNT", "fields": { "first_name": { "required": "First Name is required", "alphabetic": true }, "last_name": { "required": "Last Name is required", "alphabetic": true }, "email_address": { "required": "Email Address is required", "email": true } }, "fieldMeta": { "first_name": { "label": "First Name" }, "last_name": { "label": "Last Name" }, "email_address": { "label": "Email Address" }, "line_1": { "label": "Address Line 1" }, "line_2": { "label": "Address Line 2" }, "city": { "label": "City" }, "state": { "label": "State/Province" }, "postal_code": { "label": "Postal Code" }, "country": { "label": "Country" } }, "config": { "groups": { "information": "consumer_information" }, "layout": [{ "label": "Peronal Information", "group": "consumer_information", "rows": [{ "fields": ["first_name", "last_name"] }, { "fields": ["email_address"] }] }], "statusPolicy": { "allowedStatusesForNextStep": ["ACTIVE"], "polling": { "enabled": true, "intervalMs": 2e3, "maxRetries": 5, "terminalStatuses": ["FAILED", "REJECTED"], "onTerminal": "error" } } } }, { "type": "ADD_BANK_ACCOUNT" }] };
11909
+ const BUSINESS_PAYER = { "profileId": "BUSINESS_PAYER", "config": { "labels": { "finalText": "Payment in process" } }, "steps": [{ "type": "CREATE_BUSINESS_ACCOUNT", "fields": { "business_name": { "required": "Business Name is required", "alphabetic": true }, "business_type": { "required": "Business Type is required" }, "country_of_incorporation": { "required": "Country of Incorporation is required" }, "state_of_incorporation": { "required": "State of Incorporation is required" }, "ein": {} }, "fieldMeta": { "business_name": { "label": "Business Name" }, "business_type": { "label": "Business Type" }, "country_of_incorporation": { "label": "Country of Incorporation" }, "state_of_incorporation": { "label": "State of Incorporation" }, "ein": { "label": "EIN" }, "email_address": { "label": "Email Address" }, "line_1": { "label": "Address Line 1" }, "line_2": { "label": "Address Line 2" }, "city": { "label": "City" }, "state": { "label": "State/Province" }, "postal_code": { "label": "Postal Code" }, "country": { "label": "Country" } }, "config": { "groups": { "information": "business_information" }, "layout": [{ "label": "Business Information", "group": "business_information", "rows": [{ "fields": ["business_name", "business_type"] }, { "fields": ["country_of_incorporation", "state_of_incorporation"] }, { "fields": ["ein"] }] }], "statusPolicy": { "allowedStatusesForNextStep": ["ACTIVE"], "polling": { "enabled": true, "intervalMs": 3e3, "maxRetries": 5, "terminalStatuses": ["FAILED", "REJECTED"], "onTerminal": "error" } } } }, { "type": "ADD_BANK_ACCOUNT" }] };
11910
+ const PAYEE = { "profileId": "PAYEE", "config": { "labels": { "finalText": "Onboarding in Process" } }, "steps": [{ "type": "CREATE_BUSINESS_ACCOUNT", "fields": { "business_type": { "required": "Business Type is required" }, "business_name": { "required": "Business Name is required", "alphabetic": true }, "country_of_incorporation": { "required": "Country of Incorporation is required" }, "state_of_incorporation": { "required": "State of Incorporation is required" }, "nature_of_business": { "required": "Nature of Business is required" }, "ein": { "required": "EIN is required" }, "line_1": { "required": "Address Line 1 is required" }, "city": { "required": "City is required" }, "state": { "required": "State is required" }, "postal_code": { "required": "Postal Code is required" } }, "fieldsMeta": { "business_name": { "label": "Business Name" }, "business_type": { "label": "Business Type" }, "country_of_incorporation": { "label": "Country of Incorporation" }, "state_of_incorporation": { "label": "State of Incorporation" }, "nature_of_business": { "label": "Nature of Business (NAICS)" }, "ein": { "label": "EIN" }, "line_1": { "label": "Address Line 1" }, "city": { "label": "City" }, "state": { "label": "State" }, "postal_code": { "label": "Postal Code" } }, "config": { "labels": { "createAccountLabel": "Create Account", "creatingAccountLabel": "Creating Account..." }, "groups": { "information": "business_information", "primary_address": "primary_address" }, "layout": [{ "label": "Business Information", "group": "business_information", "rows": [{ "fields": ["business_name", "business_type"] }, { "fields": ["country_of_incorporation", "state_of_incorporation"] }, { "fields": ["nature_of_business", "ein"] }] }, { "label": "Address", "group": "primary_address", "rows": [{ "fields": ["line_1"] }, { "fields": ["city", "state"] }, { "fields": ["postal_code"] }] }], "statusPolicy": { "allowedStatusesForNextStep": ["ACTIVE", "CREATED"] } } }, { "type": "START_ONBOARDING", "config": { "terms": { "required": true, "label": "I agree to the Terms and Conditions", "text": "Test Terms and Conditions" }, "statusPolicy": { "allowedStatusesForNextStep": ["ACTIVE"], "polling": { "enabled": true, "intervalMs": 3e3, "maxRetries": 5, "terminalStatuses": ["FAILED", "REJECTED"], "onTerminal": "error" } } } }, { "type": "ADD_BANK_ACCOUNT", "config": { "labels": { "finalizeButton": "Finalize Onboarding" } } }] };
11911
+ const recipesJson = {
11912
+ INDIVIDUAL_PAYER,
11913
+ BUSINESS_PAYER,
11914
+ PAYEE
11915
+ };
11916
+ function normalizeValidationSchema(schema) {
11917
+ var _a2;
11918
+ if (!schema) return {};
11919
+ const normalized = { ...schema };
11920
+ if ((_a2 = schema.pattern) == null ? void 0 : _a2.regex) {
11921
+ normalized.pattern = {
11922
+ message: schema.pattern.message,
11923
+ regex: new RegExp(schema.pattern.regex)
11924
+ };
11925
+ }
11926
+ return normalized;
11927
+ }
11928
+ function normalizeRecipe(raw, profileId) {
11929
+ Object.entries(raw.fields || {}).forEach(([key, schema]) => {
11930
+ normalizeValidationSchema(schema);
11931
+ });
11932
+ return {
11933
+ profileId: raw.profileId || profileId,
11934
+ steps: raw.steps,
11935
+ config: raw.config
11936
+ };
11937
+ }
11938
+ const recipes = Object.fromEntries(
11939
+ Object.entries(recipesJson).map(([key, raw]) => [
11940
+ key,
11941
+ normalizeRecipe(raw, key)
11942
+ ])
11943
+ );
11944
+ function getRecipe(profileId) {
11945
+ if (!profileId) return void 0;
11946
+ return recipes[profileId];
11947
+ }
11948
+ function resolveProfileRecipe({
11949
+ profile,
11950
+ prefillProfile
11951
+ }) {
11952
+ const resolvedProfile = profile || prefillProfile || "";
11953
+ const recipe = getRecipe(resolvedProfile);
11954
+ return { profile: resolvedProfile, recipe };
11955
+ }
11956
+ function getNestedValue(obj, path) {
11957
+ return path.split(".").reduce((current, key) => current == null ? void 0 : current[key], obj);
11958
+ }
11959
+ function getPrefillPath(fieldKey, accountType) {
11960
+ const addressFields = ["line_1", "line_2", "city", "state", "postal_code", "country"];
11961
+ if (addressFields.includes(fieldKey)) {
11962
+ return `primary_address.${fieldKey}`;
11963
+ } else {
11964
+ return `information.${accountType}_information.${fieldKey}`;
11965
+ }
11966
+ }
11967
+ function getPrefillValueForKey(key, prefillInfo, accountType) {
11968
+ const path = getPrefillPath(key, accountType);
11969
+ return getNestedValue(prefillInfo, path) ?? "";
11970
+ }
11971
+ const businessTypeOptions = [
11972
+ { value: "SOLE_PROPRIETORSHIP", label: "Sole Proprietorship" },
11973
+ { value: "LLC", label: "LLC" },
11974
+ { value: "LLP", label: "LLP" },
11975
+ { value: "CORPORATION_C", label: "Corporation C" },
11976
+ { value: "CORPORATION_S", label: "Corporation S" }
11977
+ ];
11978
+ const countryOptions = [
11979
+ { value: "USA", label: "United States" },
11980
+ { value: "CAN", label: "Canada" },
11981
+ { value: "MEX", label: "Mexico" },
11982
+ { value: "GBR", label: "United Kingdom" }
11983
+ ];
11984
+ const professionOptions = [
11985
+ { value: "ACCOUNTANT", label: "Accountant" },
11986
+ { value: "ACTOR", label: "Actor" },
11987
+ { value: "ADMINISTRATIVE_ASSISTANT", label: "Administrative Assistant" },
11988
+ { value: "ANALYST", label: "Analyst" },
11989
+ { value: "ARCHITECT", label: "Architect" },
11990
+ { value: "ARTIST", label: "Artist" },
11991
+ { value: "CARPENTER", label: "Carpenter" },
11992
+ { value: "CASHIER", label: "Cashier" },
11993
+ { value: "CHILDCARE", label: "Childcare" },
11994
+ { value: "COOK", label: "Cook" },
11995
+ { value: "CLEANER", label: "Cleaner" },
11996
+ { value: "COACH", label: "Coach" },
11997
+ { value: "CONSTRUCTION_WORKER", label: "Construction Worker" },
11998
+ { value: "CONSULTANT", label: "Consultant" },
11999
+ { value: "CONTENT_CREATOR", label: "Content Creator" },
12000
+ { value: "COUNSELOR", label: "Counselor" },
12001
+ { value: "CUSTOMER_SERVICE", label: "Customer Service" },
12002
+ { value: "DATA_ENTRY", label: "Data Entry" },
12003
+ { value: "DESIGNER", label: "Designer" },
12004
+ { value: "DENTIST", label: "Dentist" },
12005
+ { value: "DEVELOPER", label: "Developer" },
12006
+ { value: "DIETITIAN", label: "Dietitian" },
12007
+ { value: "DOCTOR", label: "Doctor" },
12008
+ { value: "DRIVER", label: "Driver" },
12009
+ { value: "EDITOR", label: "Editor" },
12010
+ { value: "ELECTRICIAN", label: "Electrician" },
12011
+ { value: "ENGINEER", label: "Engineer" },
12012
+ { value: "ESTHETICIAN", label: "Esthetician" },
12013
+ { value: "EXECUTIVE", label: "Executive" },
12014
+ { value: "EXECUTIVE_ASSISTANT", label: "Executive Assistant" },
12015
+ { value: "FARMER", label: "Farmer" },
12016
+ { value: "FINANCIAL_ADVISOR", label: "Financial Advisor" },
12017
+ { value: "FIREFIGHTER", label: "Firefighter" },
12018
+ { value: "GRAPHIC_DESIGNER", label: "Graphic Designer" },
12019
+ { value: "HAIRDRESSER", label: "Hairdresser" },
12020
+ { value: "HUMAN_RESOURCES", label: "Human Resources" },
12021
+ { value: "IT_SUPPORT", label: "IT Support" },
12022
+ { value: "JANITOR", label: "Janitor" },
12023
+ { value: "JUDGE", label: "Judge" },
12024
+ { value: "LAWYER", label: "Lawyer" },
12025
+ { value: "LIBRARIAN", label: "Librarian" },
12026
+ { value: "MAINTENANCE_WORKER", label: "Maintenance Worker" },
12027
+ { value: "MANAGER", label: "Manager" },
12028
+ { value: "MEDICAL_ASSISTANT", label: "Medical Assistant" },
12029
+ { value: "MECHANIC", label: "Mechanic" },
12030
+ { value: "MILITARY", label: "Military" },
12031
+ { value: "MUSICIAN", label: "Musician" },
12032
+ { value: "NURSE", label: "Nurse" },
12033
+ { value: "PARALEGAL", label: "Paralegal" },
12034
+ { value: "PHOTOGRAPHER", label: "Photographer" },
12035
+ { value: "PHYSICIAN", label: "Physician" },
12036
+ { value: "PILOT", label: "Pilot" },
12037
+ { value: "PLUMBER", label: "Plumber" },
12038
+ { value: "POLICE_OFFICER", label: "Police Officer" },
12039
+ { value: "PROFESSOR", label: "Professor" },
12040
+ { value: "PROJECT_MANAGER", label: "Project Manager" },
12041
+ { value: "PSYCHOLOGIST", label: "Psychologist" },
12042
+ { value: "REAL_ESTATE_AGENT", label: "Real Estate Agent" },
12043
+ { value: "RESEARCHER", label: "Researcher" },
12044
+ { value: "RETAIL_ASSOCIATE", label: "Retail Associate" },
12045
+ { value: "SALES_REPRESENTATIVE", label: "Sales Representative" },
12046
+ { value: "SCIENTIST", label: "Scientist" },
12047
+ { value: "SECURITY_GUARD", label: "Security Guard" },
12048
+ { value: "SOCIAL_WORKER", label: "Social Worker" },
12049
+ { value: "TEACHER", label: "Teacher" },
12050
+ { value: "TECHNICIAN", label: "Technician" },
12051
+ { value: "TRANSLATOR", label: "Translator" },
12052
+ { value: "VETERINARIAN", label: "Veterinarian" },
12053
+ { value: "WAREHOUSE_WORKER", label: "Warehouse Worker" },
12054
+ { value: "WELDER", label: "Welder" },
12055
+ { value: "WRITER", label: "Writer" }
12056
+ ];
12057
+ const usStates = [
12058
+ { value: "AL", label: "Alabama" },
12059
+ { value: "AK", label: "Alaska" },
12060
+ { value: "AZ", label: "Arizona" },
12061
+ { value: "AR", label: "Arkansas" },
12062
+ { value: "CA", label: "California" },
12063
+ { value: "CO", label: "Colorado" },
12064
+ { value: "CT", label: "Connecticut" },
12065
+ { value: "DE", label: "Delaware" },
12066
+ { value: "FL", label: "Florida" },
12067
+ { value: "GA", label: "Georgia" },
12068
+ { value: "HI", label: "Hawaii" },
12069
+ { value: "ID", label: "Idaho" },
12070
+ { value: "IL", label: "Illinois" },
12071
+ { value: "IN", label: "Indiana" },
12072
+ { value: "IA", label: "Iowa" },
12073
+ { value: "KS", label: "Kansas" },
12074
+ { value: "KY", label: "Kentucky" },
12075
+ { value: "LA", label: "Louisiana" },
12076
+ { value: "ME", label: "Maine" },
12077
+ { value: "MD", label: "Maryland" },
12078
+ { value: "MA", label: "Massachusetts" },
12079
+ { value: "MI", label: "Michigan" },
12080
+ { value: "MN", label: "Minnesota" },
12081
+ { value: "MS", label: "Mississippi" },
12082
+ { value: "MO", label: "Missouri" },
12083
+ { value: "MT", label: "Montana" },
12084
+ { value: "NE", label: "Nebraska" },
12085
+ { value: "NV", label: "Nevada" },
12086
+ { value: "NH", label: "New Hampshire" },
12087
+ { value: "NJ", label: "New Jersey" },
12088
+ { value: "NM", label: "New Mexico" },
12089
+ { value: "NY", label: "New York" },
12090
+ { value: "NC", label: "North Carolina" },
12091
+ { value: "ND", label: "North Dakota" },
12092
+ { value: "OH", label: "Ohio" },
12093
+ { value: "OK", label: "Oklahoma" },
12094
+ { value: "OR", label: "Oregon" },
12095
+ { value: "PA", label: "Pennsylvania" },
12096
+ { value: "RI", label: "Rhode Island" },
12097
+ { value: "SC", label: "South Carolina" },
12098
+ { value: "SD", label: "South Dakota" },
12099
+ { value: "TN", label: "Tennessee" },
12100
+ { value: "TX", label: "Texas" },
12101
+ { value: "UT", label: "Utah" },
12102
+ { value: "VT", label: "Vermont" },
12103
+ { value: "VA", label: "Virginia" },
12104
+ { value: "WA", label: "Washington" },
12105
+ { value: "WV", label: "West Virginia" },
12106
+ { value: "WI", label: "Wisconsin" },
12107
+ { value: "WY", label: "Wyoming" },
12108
+ { value: "DC", label: "District of Columbia" },
12109
+ { value: "AS", label: "American Samoa" },
12110
+ { value: "GU", label: "Guam" },
12111
+ { value: "MP", label: "Northern Mariana Islands" },
12112
+ { value: "PR", label: "Puerto Rico" },
12113
+ { value: "VI", label: "U.S. Virgin Islands" }
12114
+ ];
12115
+ const accountConfigs = {
12116
+ business: {
12117
+ type: "business",
12118
+ typeUpper: "BUSINESS",
12119
+ stepType: "CREATE_BUSINESS_ACCOUNT",
12120
+ formName: "CreateBusinessAccount",
12121
+ fieldSchemas: {
12122
+ business_name: { required: "Business Name is required", alphabetic: true },
12123
+ business_type: { required: "Business Type is required" },
12124
+ country_of_incorporation: { required: "Country of Incorporation is required" },
12125
+ state_of_incorporation: { required: "State of Incorporation is required" }
12126
+ },
12127
+ fieldLabels: {
12128
+ business_name: "Business Name",
12129
+ business_type: "Business Type",
12130
+ country_of_incorporation: "Country of Incorporation",
12131
+ state_of_incorporation: "State of Incorporation",
12132
+ nature_of_business: "Nature of Business (NAICS)",
12133
+ ein: "EIN",
12134
+ incorporation_date: "Incorporation Date",
12135
+ line_1: "Address Line 1",
12136
+ city: "City",
12137
+ state: "State",
12138
+ postal_code: "Postal Code",
12139
+ country: "Country"
12140
+ },
12141
+ fieldPlaceholders: {
12142
+ business_name: "Enter business name",
12143
+ business_type: "Select business type",
12144
+ country_of_incorporation: "Select country of incorporation",
12145
+ state_of_incorporation: "Select state of incorporation",
12146
+ nature_of_business: "Enter nature of business",
12147
+ ein: "Enter EIN",
12148
+ incorporation_date: "YYYY-MM-DD",
12149
+ line_1: "Enter address line 1",
12150
+ city: "Enter city",
12151
+ state: "Enter state",
12152
+ postal_code: "Enter postal code",
12153
+ country: "Enter country"
12154
+ },
12155
+ fieldRenderRegistry: {
12156
+ business_type: { component: "select", options: businessTypeOptions },
12157
+ business_name: { component: "text" },
12158
+ country_of_incorporation: { component: "select", options: countryOptions },
12159
+ state_of_incorporation: { component: "select", options: usStates },
12160
+ nature_of_business: { component: "text" },
12161
+ ein: { component: "text" },
12162
+ incorporation_date: { component: "dob" },
12163
+ line_1: { component: "text" },
12164
+ city: { component: "text" },
12165
+ state: { component: "select", options: usStates },
12166
+ postal_code: { component: "text" },
12167
+ country: { component: "select", options: countryOptions }
12168
+ }
12169
+ },
12170
+ consumer: {
12171
+ type: "consumer",
12172
+ typeUpper: "CONSUMER",
12173
+ stepType: "CREATE_CONSUMER_ACCOUNT",
12174
+ formName: "CreateConsumerAccount",
12175
+ fieldSchemas: {
12176
+ first_name: { required: "First Name is required", alphabetic: true },
12177
+ last_name: { required: "Last Name is required", alphabetic: true },
12178
+ email_address: { required: "Email Address is required", email: true },
12179
+ phone_number: { phone: true },
12180
+ date_of_birth: { date: true },
12181
+ ssn: { pattern: { regex: /^\d{3}-?\d{2}-?\d{4}$/, message: "Please enter a valid SSN" } }
12182
+ },
12183
+ fieldLabels: {
12184
+ first_name: "First Name",
12185
+ last_name: "Last Name",
12186
+ email_address: "Email Address",
12187
+ phone_number: "Phone Number",
12188
+ date_of_birth: "Date of Birth",
12189
+ ssn: "SSN",
12190
+ occupation: "Profession"
12191
+ },
12192
+ fieldPlaceholders: {
12193
+ first_name: "Enter first name",
12194
+ last_name: "Enter last name",
12195
+ email_address: "Enter email address",
12196
+ phone_number: "+1 202 647 4000",
12197
+ date_of_birth: "YYYY-MM-DD",
12198
+ ssn: "Enter SSN",
12199
+ occupation: "Select profession",
12200
+ line_1: "Enter address line 1",
12201
+ line_2: "Enter address line 2",
12202
+ city: "Enter city",
12203
+ state: "Enter state",
12204
+ postal_code: "Enter postal code",
12205
+ country: "Enter country"
12206
+ },
12207
+ fieldRenderRegistry: {
12208
+ first_name: { component: "text" },
12209
+ last_name: { component: "text" },
12210
+ email_address: { component: "text", inputType: "email" },
12211
+ phone_number: { component: "phone" },
12212
+ date_of_birth: { component: "dob" },
12213
+ ssn: { component: "text" },
12214
+ occupation: { component: "select", options: professionOptions },
12215
+ line_1: { component: "text" },
12216
+ line_2: { component: "text" },
12217
+ city: { component: "text" },
12218
+ state: { component: "select", options: usStates },
12219
+ postal_code: { component: "text" },
12220
+ country: { component: "select", options: countryOptions }
12221
+ }
12222
+ }
12223
+ };
12224
+ var root_1$8 = /* @__PURE__ */ from_html(`<h2 class="svelte-oq2xej"> </h2>`);
11104
12225
  var root_2$3 = /* @__PURE__ */ from_html(`<div><alviere-spinner><span slot="message"><!></span></alviere-spinner></div>`, 2);
11105
- var root_11$1 = /* @__PURE__ */ from_html(`<span class="validation-hint svelte-1tz2qyj">Please fill in all required fields to continue</span>`);
11106
- var root_12$2 = /* @__PURE__ */ from_html(`<span class="validation-error">Please fix the errors above</span>`);
11107
- var root$8 = /* @__PURE__ */ from_html(`<div class="alviere-create-consumer-account svelte-1tz2qyj"><!> <!> <form novalidate=""><div class="form-section svelte-1tz2qyj"><h3 class="svelte-1tz2qyj">Personal Information</h3> <div class="form-row svelte-1tz2qyj"><!> <!></div> <div class="form-row svelte-1tz2qyj"><!></div></div> <div class="form-actions svelte-1tz2qyj"><div class="form-status svelte-1tz2qyj"><!> <!></div> <alviere-button><!></alviere-button></div></form></div>`, 2);
12226
+ var root_13$2 = /* @__PURE__ */ from_html(`<div class="form-row svelte-oq2xej"></div>`);
12227
+ var root_11$1 = /* @__PURE__ */ from_html(`<div class="form-section svelte-oq2xej"><h3 class="svelte-oq2xej"> </h3> <!></div>`);
12228
+ var root_22 = /* @__PURE__ */ from_html(`<span class="validation-hint svelte-oq2xej">Please fill in all required fields to continue</span>`);
12229
+ var root_23 = /* @__PURE__ */ from_html(`<span class="validation-error">Please fix the errors above</span>`);
12230
+ var root$8 = /* @__PURE__ */ from_html(`<div class="alviere-create-account svelte-oq2xej"><!> <!> <form novalidate=""><!> <div class="form-actions svelte-oq2xej"><div class="form-status svelte-oq2xej"><!> <!></div> <alviere-button><!></alviere-button></div></form></div>`, 2);
11108
12231
  const $$css$a = {
11109
- hash: "svelte-1tz2qyj",
11110
- code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-create-consumer-account.svelte-1tz2qyj {max-width:100%;margin:0 auto;font-family:"Darker Grotesque", sans-serif;line-height:1;position:relative;}.spinner-container.svelte-1tz2qyj {position:absolute;display:flex;justify-content:center;align-items:center;height:100%;width:100%;background-color:rgba(255, 255, 255, 0.2);backdrop-filter:blur(3px);z-index:1000;}.spinner-standalone.svelte-1tz2qyj {position:relative !important;min-height:200px;display:flex;align-items:center;justify-content:center;}h2.svelte-1tz2qyj {color:#333;margin-bottom:20px;text-align:center;}h3.svelte-1tz2qyj {color:#555;margin-bottom:15px;border-bottom:2px solid #eee;padding-bottom:5px;}.form-section.svelte-1tz2qyj {margin-bottom:30px;padding:20px;background:#f9f9f9;border-radius:8px;}.form-row.svelte-1tz2qyj {display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:1rem;padding-bottom:1rem;}.form-status.svelte-1tz2qyj {margin-bottom:1rem;text-align:center;font-size:1.125rem;}.validation-hint.svelte-1tz2qyj {color:#6b7280;font-size:0.875rem;font-style:italic;}.form-actions.svelte-1tz2qyj {margin-top:24px;text-align:center;}`
12232
+ hash: "svelte-oq2xej",
12233
+ code: `:root {--alv-color-primary: #227e9e;--alv-color-primary-hover: #1b6680;--alv-color-primary-active: #145164;--alv-color-primary-light: #e8f4f8;--alv-color-primary-light-hover: #d1e8f0;--alv-color-on-primary: #ffffff;--alv-color-success: #436b1d;--alv-color-success-light: #d4edda;--alv-color-success-border: #c3e6cb;--alv-color-success-text: #155724;--alv-color-on-success: #ffffff;--alv-color-success-rgb: 67, 107, 29;--alv-color-error: #b3311f;--alv-color-error-light: #f8d7da;--alv-color-error-border: #f5c6cb;--alv-color-error-text: #721c24;--alv-color-on-error: #ffffff;--alv-color-error-rgb: 179, 49, 31;--alv-color-warning: #ffc107;--alv-color-warning-light: #fff3cd;--alv-color-warning-border: #ffeaa7;--alv-color-warning-text: #856404;--alv-color-on-warning: #000000;--alv-color-info: #175db8;--alv-color-info-light: #d1ecf1;--alv-color-info-border: #bee5eb;--alv-color-info-text: #0c5460;--alv-color-on-info: #ffffff;--alv-color-gray-50: #fafafa;--alv-color-gray-100: #f4f4f5;--alv-color-gray-200: #e4e4e7;--alv-color-gray-300: #d4d4d8;--alv-color-gray-400: #a1a1aa;--alv-color-gray-500: #71717a;--alv-color-gray-600: #52525b;--alv-color-gray-700: #3f3f46;--alv-color-gray-800: #27272a;--alv-color-gray-900: #18181b;--alv-color-surface: #ffffff;--alv-color-surface-secondary: #f9fafb;--alv-color-surface-tertiary: #f4f4f5;--alv-color-surface-elevated: #ffffff;--alv-color-text-primary: #18181b;--alv-color-text-secondary: #52525b;--alv-color-text-tertiary: #71717a;--alv-color-text-disabled: #a1a1aa;--alv-color-text-on-primary: #ffffff;--alv-color-text-on-surface: #18181b;--alv-color-border: #e4e4e7;--alv-color-border-hover: #d4d4d8;--alv-color-border-focus: #227e9e;--alv-color-border-error: #b3311f;--alv-color-border-success: #436b1d;--alv-color-background: #ffffff;--alv-color-background-disabled: #f4f4f5;--alv-color-background-hover: #f9fafb;--alv-color-background-active: #f4f4f5;}:root {--alv-font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;--alv-font-family-grotesque: 'Darker Grotesque', sans-serif;--alv-font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;--alv-font-size-3xs: 0.625rem;--alv-font-size-2xs: 0.75rem;--alv-font-size-xs: 1rem;--alv-font-size-sm: 1.125rem;--alv-font-size-base: 1.25rem;--alv-font-size-lg: 1.5rem;--alv-font-size-xl: 1.75rem;--alv-font-weight-light: 300;--alv-font-weight-normal: 400;--alv-font-weight-medium: 500;--alv-font-weight-semibold: 600;--alv-font-weight-bold: 700;--alv-line-height-tight: 1.25;--alv-line-height-normal: 1.5;--alv-line-height-relaxed: 1.75;}:root {--alv-spacing-xs: 0.25rem;--alv-spacing-sm: 0.5rem;--alv-spacing-md: 1rem;--alv-spacing-lg: 1.5rem;--alv-spacing-xl: 2rem;--alv-spacing-2xl: 3rem;--alv-spacing-3xl: 4rem;}:root {--alv-border-radius-none: 0;--alv-border-radius-sm: 0.125rem;--alv-border-radius: 0.25rem;--alv-border-radius-md: 0.375rem;--alv-border-radius-lg: 0.5rem;--alv-border-radius-xl: 0.75rem;--alv-border-radius-2xl: 1rem;--alv-border-radius-full: 9999px;}:root {--alv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);--alv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);--alv-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);--alv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);--alv-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);--alv-shadow-none: none;}:root {--alv-transition-fast: 150ms ease-in-out;--alv-transition-normal: 250ms ease-in-out;--alv-transition-slow: 350ms ease-in-out;--alv-transition-none: none;}:root {--alv-input-height-sm: 2.5rem;--alv-input-height: 3.25rem;--alv-input-height-lg: 3.75rem;--alv-input-padding-x: 0.75rem;--alv-input-padding-y: 0.5rem;--alv-input-border-color: var(--alv-color-border);--alv-input-border-hover: var(--alv-color-border-hover);--alv-input-border-focus: var(--alv-color-border-focus);--alv-input-bg: var(--alv-color-background);--alv-input-bg-disabled: var(--alv-color-background-disabled);}:root {--alv-z-dropdown: 1000;--alv-z-sticky: 1020;--alv-z-fixed: 1030;--alv-z-modal-backdrop: 1040;--alv-z-modal: 1050;--alv-z-popover: 1060;--alv-z-tooltip: 1070;}:root {--alv-button-primary-bg: var(--alv-color-primary);--alv-button-primary-bg-hover: var(--alv-color-primary-hover);--alv-button-primary-bg-active: var(--alv-color-primary-active);--alv-button-primary-text: var(--alv-color-on-primary);--alv-button-primary-border: var(--alv-color-primary);--alv-button-secondary-bg: transparent;--alv-button-secondary-bg-hover: var(--alv-color-primary-light);--alv-button-secondary-bg-active: var(--alv-color-primary-light-hover);--alv-button-secondary-text: var(--alv-color-primary);--alv-button-secondary-border: var(--alv-color-primary);--alv-button-tertiary-bg: transparent;--alv-button-tertiary-bg-hover: var(--alv-color-gray-100);--alv-button-tertiary-bg-active: var(--alv-color-gray-200);--alv-button-tertiary-text: var(--alv-color-text-primary);--alv-button-tertiary-border: transparent;--alv-button-link-bg: transparent;--alv-button-link-bg-hover: transparent;--alv-button-link-bg-active: transparent;--alv-button-link-text: var(--alv-color-primary);--alv-button-link-text-hover: var(--alv-color-primary-hover);--alv-button-link-border: transparent;}:root {--alv-spinner-color: var(--alv-color-text-primary);--alv-spinner-size-sm: 1rem;--alv-spinner-size-md: 1.5rem;--alv-spinner-size-lg: 4rem;--alv-spinner-stroke-width: 2px;}:root {--alv-timeline-color: var(--alv-color-gray-600);--alv-timeline-completed-color: var(--alv-color-success);--alv-timeline-error-color: var(--alv-color-error);--alv-timeline-pending-color: var(--alv-color-gray-400);--alv-timeline-step-size-sm: 1.25rem;--alv-timeline-step-size-md: 2rem;--alv-timeline-step-size-lg: 2.5rem;--alv-timeline-connector-width: 3px;--alv-timeline-font-size: var(--alv-font-size-base);}:root {--alv-badge-primary-bg: var(--alv-color-primary);--alv-badge-primary-text: var(--alv-color-on-primary);--alv-badge-secondary-bg: var(--alv-color-gray-200);--alv-badge-secondary-text: var(--alv-color-text-primary);--alv-badge-success-bg: var(--alv-color-success);--alv-badge-success-text: var(--alv-color-on-success);--alv-badge-error-bg: var(--alv-color-error);--alv-badge-error-text: var(--alv-color-on-error);--alv-badge-warning-bg: var(--alv-color-warning);--alv-badge-warning-text: var(--alv-color-on-warning);--alv-badge-info-bg: var(--alv-color-info);--alv-badge-info-text: var(--alv-color-on-info);}:root {--alv-list-bg: var(--alv-color-surface);--alv-list-border: var(--alv-color-border);--alv-list-item-bg: transparent;--alv-list-item-bg-hover: var(--alv-color-background-hover);--alv-list-item-bg-active: var(--alv-color-background-active);--alv-list-item-text: var(--alv-color-text-primary);--alv-list-item-text-secondary: var(--alv-color-text-secondary);}:root {--alv-radio-border: var(--alv-color-border);--alv-radio-border-hover: var(--alv-color-border-hover);--alv-radio-border-focus: var(--alv-color-border-focus);--alv-radio-bg: var(--alv-color-background);--alv-radio-checked-bg: var(--alv-color-primary);--alv-radio-checked-border: var(--alv-color-primary);--alv-radio-text: var(--alv-color-text-primary);--alv-radio-text-disabled: var(--alv-color-text-disabled);}.alviere-create-account.svelte-oq2xej {max-width:100%;margin:0 auto;font-family:"Darker Grotesque", sans-serif;line-height:1;position:relative;}.spinner-container.svelte-oq2xej {position:absolute;display:flex;justify-content:center;align-items:center;height:100%;width:100%;background-color:rgba(255, 255, 255, 0.2);backdrop-filter:blur(3px);z-index:1000;}.spinner-standalone.svelte-oq2xej {position:relative !important;min-height:200px;display:flex;align-items:center;justify-content:center;}h2.svelte-oq2xej {color:#333;margin-bottom:20px;text-align:center;}h3.svelte-oq2xej {color:#555;margin-bottom:15px;border-bottom:2px solid #eee;padding-bottom:5px;}.form-section.svelte-oq2xej {margin-bottom:30px;padding:20px;background:#f9f9f9;border-radius:8px;}.form-row.svelte-oq2xej {display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));gap:1rem;padding-bottom:1rem;}.form-status.svelte-oq2xej {margin-bottom:1rem;text-align:center;font-size:1.125rem;}.validation-hint.svelte-oq2xej {color:#6b7280;font-size:0.875rem;font-style:italic;}.form-actions.svelte-oq2xej {margin-top:24px;text-align:center;}`
11111
12234
  };
11112
- function CreateConsumerAccount($$anchor, $$props) {
12235
+ function CreateAccount($$anchor, $$props) {
11113
12236
  push($$props, true);
11114
12237
  append_styles$1($$anchor, $$css$a);
11115
- let jwt = prop(
11116
- $$props,
11117
- "jwt",
11118
- 7,
11119
- ""
11120
- // Business UUID (merchant account UUID) for user state comparison
11121
- ), businessUuid = prop($$props, "businessUuid", 15, ""), isInFlow = prop($$props, "isInFlow", 15, false), debug = prop($$props, "debug", 15, true), prefillData = prop($$props, "prefillData", 31, () => proxy({})), publicCertificate = prop($$props, "publicCertificate", 15, ""), publicCertificateId = prop($$props, "publicCertificateId", 15, "");
12238
+ var _a2;
12239
+ var _b;
12240
+ var _c;
12241
+ var _d;
12242
+ var _e;
12243
+ var _f;
12244
+ var _g;
12245
+ var _h;
12246
+ var _j;
12247
+ var _k;
12248
+ var _l;
12249
+ let config = prop($$props, "config", 31, () => proxy({})), jwt = prop($$props, "jwt", 7, ""), debug = prop($$props, "debug", 7, false), publicCertificate = prop($$props, "publicCertificate", 7, ""), publicCertificateId = prop($$props, "publicCertificateId", 7, ""), businessUuid = prop($$props, "businessUuid", 7, ""), isInFlow = prop($$props, "isInFlow", 15, false), _profile = prop($$props, "profile", 15, ""), stepConfig = prop($$props, "stepConfig", 31, () => proxy({}));
12250
+ uiLogger.info("config", config());
12251
+ let isBusinessAccount = /* @__PURE__ */ state(proxy(((_b = (_a2 = config().formData) === null || _a2 === void 0 ? void 0 : _a2.information) === null || _b === void 0 ? void 0 : _b.business_information) ? true : false));
12252
+ let prefillData = /* @__PURE__ */ state(proxy(config().formData));
12253
+ user_effect(() => {
12254
+ uiLogger.info("prefillData", get$1(prefillData));
12255
+ });
12256
+ const currentAccountConfig = /* @__PURE__ */ user_derived(() => accountConfigs[get$1(isBusinessAccount) ? "business" : "consumer"]);
12257
+ const accountType = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).type);
12258
+ const accountTypeUpper = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).typeUpper);
12259
+ const stepType = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).stepType);
12260
+ const formName = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).formName);
11122
12261
  let initialized = /* @__PURE__ */ state(false);
11123
- const initialFormData = {
11124
- externalId: "",
11125
- firstName: "",
11126
- middleName: "",
11127
- lastName: "",
11128
- email: "",
11129
- phone: "",
11130
- dateOfBirth: "",
11131
- ssn: "",
11132
- employmentStatus: "FULL_TIME",
11133
- profession: "",
11134
- addressLabel: "Primary Address",
11135
- addressLine1: "",
11136
- addressLine2: "",
11137
- addressCity: "",
11138
- addressState: "",
11139
- addressPostalCode: "",
11140
- addressCountry: "USA"
12262
+ let resolvedProfileData = /* @__PURE__ */ user_derived(() => resolveProfileRecipe({
12263
+ profile: _profile(),
12264
+ prefillProfile: get$1(prefillData) === null || get$1(prefillData) === void 0 ? void 0 : get$1(prefillData).profile
12265
+ }));
12266
+ let resolvedProfileRecipe = /* @__PURE__ */ user_derived(() => () => {
12267
+ var _a3, _b2;
12268
+ const config2 = (_b2 = (_a3 = get$1(resolvedProfileData).recipe) === null || _a3 === void 0 ? void 0 : _a3.steps) === null || _b2 === void 0 ? void 0 : _b2.find((step) => step.type === get$1(stepType));
12269
+ return config2;
12270
+ });
12271
+ let resolvedProfileFields = /* @__PURE__ */ user_derived(() => () => {
12272
+ var _a3;
12273
+ return ((_a3 = get$1(resolvedProfileRecipe)()) === null || _a3 === void 0 ? void 0 : _a3.fields) || {};
12274
+ });
12275
+ const baseInitialFormData = {};
12276
+ const buildInitialFormData = () => {
12277
+ const data = Object.assign({}, baseInitialFormData);
12278
+ const config2 = get$1(resolvedProfileRecipe)();
12279
+ const recipeFields = (config2 === null || config2 === void 0 ? void 0 : config2.fields) ? Object.keys(config2.fields) : [];
12280
+ const prefillInfo = get$1(prefillData) || {};
12281
+ if (!recipeFields.length) {
12282
+ return Object.assign({}, baseInitialFormData);
12283
+ }
12284
+ recipeFields.forEach((key) => {
12285
+ data[key] = getPrefillValueForKey(key, prefillInfo, get$1(accountType));
12286
+ });
12287
+ return data;
12288
+ };
12289
+ let initialFormData = /* @__PURE__ */ user_derived(buildInitialFormData);
12290
+ const defaultFieldSchemas = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).fieldSchemas);
12291
+ const fieldSchemas = /* @__PURE__ */ user_derived(() => Object.assign(Object.assign({}, get$1(defaultFieldSchemas)), (stepConfig() === null || stepConfig() === void 0 ? void 0 : stepConfig().fields) || get$1(resolvedProfileFields)() || {}));
12292
+ const defaultStatusPolicy = {
12293
+ allowedStatusesForNextStep: ["ACTIVE"]
12294
+ };
12295
+ const statusPolicy = /* @__PURE__ */ user_derived(() => ({
12296
+ allowedStatusesForNextStep: ((_e = (_d = (_c = get$1(resolvedProfileRecipe)()) === null || _c === void 0 ? void 0 : _c.config) === null || _d === void 0 ? void 0 : _d.statusPolicy) === null || _e === void 0 ? void 0 : _e.allowedStatusesForNextStep) || defaultStatusPolicy.allowedStatusesForNextStep,
12297
+ polling: Object.assign(Object.assign({}, ((_h = (_g = (_f = get$1(resolvedProfileRecipe)()) === null || _f === void 0 ? void 0 : _f.config) === null || _g === void 0 ? void 0 : _g.statusPolicy) === null || _h === void 0 ? void 0 : _h.polling) || {}), ((_k = (_j = stepConfig() === null || stepConfig() === void 0 ? void 0 : stepConfig().config) === null || _j === void 0 ? void 0 : _j.statusPolicy) === null || _k === void 0 ? void 0 : _k.polling) || {})
12298
+ }));
12299
+ const allowedStatuses = /* @__PURE__ */ user_derived(() => get$1(statusPolicy).allowedStatusesForNextStep);
12300
+ const pollingConfig = /* @__PURE__ */ user_derived(() => get$1(statusPolicy).polling);
12301
+ const fieldMeta = /* @__PURE__ */ user_derived(() => ((_l = get$1(resolvedProfileRecipe)()) === null || _l === void 0 ? void 0 : _l.fieldMeta) || {});
12302
+ const defaultFieldLabels = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).fieldLabels);
12303
+ const defaultFieldPlaceholders = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).fieldPlaceholders);
12304
+ const isFieldRequired = (fieldKey) => {
12305
+ var _a3, _b2, _c2;
12306
+ const schemaRequired = (_c2 = (_b2 = (_a3 = get$1(resolvedProfileRecipe)()) === null || _a3 === void 0 ? void 0 : _a3.fields) === null || _b2 === void 0 ? void 0 : _b2[fieldKey]) === null || _c2 === void 0 ? void 0 : _c2.required;
12307
+ if (schemaRequired !== void 0) return !!schemaRequired;
12308
+ return false;
12309
+ };
12310
+ const getFieldLabel = (fieldKey) => {
12311
+ var _a3;
12312
+ return ((_a3 = get$1(fieldMeta)[fieldKey]) === null || _a3 === void 0 ? void 0 : _a3.label) || get$1(defaultFieldLabels)[fieldKey] || fieldKey;
12313
+ };
12314
+ const getFieldHelp = (fieldKey) => {
12315
+ var _a3;
12316
+ return ((_a3 = get$1(fieldMeta)[fieldKey]) === null || _a3 === void 0 ? void 0 : _a3.helpText) || "";
11141
12317
  };
11142
- const fieldSchemas = {
11143
- firstName: { required: "First Name is required", alphabetic: true },
11144
- lastName: { required: "Last Name is required", alphabetic: true },
11145
- email: { required: "Email Address is required", email: true },
11146
- phone: { phone: true },
11147
- dateOfBirth: { date: true },
11148
- ssn: {
11149
- pattern: {
11150
- regex: /^\d{3}-?\d{2}-?\d{4}$/,
11151
- message: "Please enter a valid SSN"
11152
- }
11153
- },
11154
- addressCity: { alphabetic: true },
11155
- addressPostalCode: { postalCode: true }
12318
+ const getPlaceholder = (fieldKey) => get$1(defaultFieldPlaceholders)[fieldKey] || "";
12319
+ const fieldRenderRegistry = /* @__PURE__ */ user_derived(() => get$1(currentAccountConfig).fieldRenderRegistry);
12320
+ const fieldConfigs = /* @__PURE__ */ user_derived(() => () => {
12321
+ const order = Object.keys(get$1(resolvedProfileFields)()) || [];
12322
+ return order.map((key) => {
12323
+ const renderer = get$1(fieldRenderRegistry)[key];
12324
+ if (!renderer) return null;
12325
+ const required = isFieldRequired(key);
12326
+ const label = getFieldLabel(key);
12327
+ const placeholder = getPlaceholder(key);
12328
+ const helpText = getFieldHelp(key);
12329
+ return {
12330
+ key,
12331
+ component: renderer.component,
12332
+ options: renderer.options,
12333
+ inputType: renderer.inputType,
12334
+ label,
12335
+ placeholder,
12336
+ required,
12337
+ helpText
12338
+ };
12339
+ }).filter(Boolean);
12340
+ });
12341
+ const fieldGroups = /* @__PURE__ */ user_derived(() => () => {
12342
+ var _a3, _b2;
12343
+ return ((_b2 = (_a3 = get$1(resolvedProfileRecipe)()) === null || _a3 === void 0 ? void 0 : _a3.config) === null || _b2 === void 0 ? void 0 : _b2.layout) || [];
12344
+ });
12345
+ const getField = (fieldKey) => {
12346
+ return get$1(fieldConfigs)().find((f) => (f === null || f === void 0 ? void 0 : f.key) === fieldKey);
11156
12347
  };
12348
+ const statusIsAllowed = (status) => !!status && (get$1(allowedStatuses) === null || get$1(allowedStatuses) === void 0 ? void 0 : get$1(allowedStatuses).length) ? get$1(allowedStatuses).includes(status) : status === "ACTIVE";
12349
+ const ADDRESS_FIELD_KEYS = [
12350
+ "line_1",
12351
+ "line_2",
12352
+ "city",
12353
+ "state",
12354
+ "postal_code",
12355
+ "country"
12356
+ ];
12357
+ function getRequiredFieldKeys() {
12358
+ const profileFields = get$1(resolvedProfileFields)() || {};
12359
+ return Object.keys(profileFields).filter((key) => {
12360
+ var _a3, _b2;
12361
+ const schema = get$1(fieldSchemas) === null || get$1(fieldSchemas) === void 0 ? void 0 : get$1(fieldSchemas)[key];
12362
+ const required = (_a3 = schema === null || schema === void 0 ? void 0 : schema.required) !== null && _a3 !== void 0 ? _a3 : (_b2 = profileFields[key]) === null || _b2 === void 0 ? void 0 : _b2.required;
12363
+ return required !== void 0 && required !== false;
12364
+ });
12365
+ }
12366
+ function isValuePresent(value) {
12367
+ if (value === null || value === void 0) return false;
12368
+ if (typeof value === "string") return value.trim().length > 0;
12369
+ if (Array.isArray(value)) return value.length > 0;
12370
+ if (typeof value === "object") {
12371
+ return Object.values(value).some(isValuePresent);
12372
+ }
12373
+ return true;
12374
+ }
12375
+ function coerceNatureOfBusiness(value) {
12376
+ if (value === null || value === void 0) return value;
12377
+ if (typeof value === "number") return value;
12378
+ if (typeof value === "string") {
12379
+ const trimmed = value.trim();
12380
+ if (trimmed === "") return value;
12381
+ if (/^\d+$/.test(trimmed)) {
12382
+ return Number(trimmed);
12383
+ }
12384
+ }
12385
+ return value;
12386
+ }
12387
+ function buildAccountInformationPayload(formData) {
12388
+ const payload = Object.fromEntries(Object.entries(formData).filter(([key, value]) => !ADDRESS_FIELD_KEYS.includes(key) && isValuePresent(value)));
12389
+ if ("nature_of_business" in payload) {
12390
+ payload.nature_of_business = coerceNatureOfBusiness(payload.nature_of_business);
12391
+ }
12392
+ return payload;
12393
+ }
12394
+ function buildAddressPayload(formData) {
12395
+ var _a3;
12396
+ const addressEntries = Object.entries(formData).filter(([key, value]) => {
12397
+ return ADDRESS_FIELD_KEYS.includes(key) && isValuePresent(value);
12398
+ });
12399
+ if (addressEntries.length === 0) {
12400
+ return null;
12401
+ }
12402
+ const payload = Object.fromEntries(addressEntries);
12403
+ const country = payload.country || ((_a3 = get$1(prefillData) === null || get$1(prefillData) === void 0 ? void 0 : get$1(prefillData).primary_address) === null || _a3 === void 0 ? void 0 : _a3.country) || "USA";
12404
+ return {
12405
+ label: "Primary Address",
12406
+ line_1: payload.line_1,
12407
+ line_2: payload.line_2,
12408
+ city: payload.city,
12409
+ state: payload.state,
12410
+ postal_code: payload.postal_code,
12411
+ country,
12412
+ primary: true
12413
+ };
12414
+ }
12415
+ function buildPrefillDataFromAccount(account) {
12416
+ var _a3, _b2;
12417
+ const primaryAddress = ((_a3 = account.addresses) === null || _a3 === void 0 ? void 0 : _a3.find((address) => address.primary)) || ((_b2 = account.addresses) === null || _b2 === void 0 ? void 0 : _b2[0]);
12418
+ return {
12419
+ information: account.information || {},
12420
+ primary_address: primaryAddress ? {
12421
+ line_1: primaryAddress.line_1,
12422
+ line_2: primaryAddress.line_2,
12423
+ city: primaryAddress.city,
12424
+ state: primaryAddress.state,
12425
+ postal_code: primaryAddress.postal_code,
12426
+ country: primaryAddress.country
12427
+ } : {},
12428
+ profile: account.profile
12429
+ };
12430
+ }
12431
+ function mergePrefillData(accountPrefill) {
12432
+ const currentPrefill = get$1(prefillData) || {};
12433
+ set(
12434
+ prefillData,
12435
+ Object.assign(Object.assign(Object.assign({}, accountPrefill), currentPrefill), {
12436
+ information: Object.assign(Object.assign({}, accountPrefill.information || {}), currentPrefill.information || {}),
12437
+ primary_address: Object.assign(Object.assign({}, accountPrefill.primary_address || {}), currentPrefill.primary_address || {}),
12438
+ profile: currentPrefill.profile || accountPrefill.profile
12439
+ }),
12440
+ true
12441
+ );
12442
+ }
12443
+ function getMissingRequiredFields(account) {
12444
+ var _a3, _b2;
12445
+ const requiredKeys = getRequiredFieldKeys();
12446
+ if (!requiredKeys.length) {
12447
+ return [];
12448
+ }
12449
+ const accountPrefill = buildPrefillDataFromAccount(account);
12450
+ const accountTypeForCheck = ((_a3 = accountPrefill.information) === null || _a3 === void 0 ? void 0 : _a3.business_information) ? "business" : ((_b2 = accountPrefill.information) === null || _b2 === void 0 ? void 0 : _b2.consumer_information) ? "consumer" : get$1(accountType);
12451
+ return requiredKeys.filter((key) => {
12452
+ const value = getPrefillValueForKey(key, accountPrefill, accountTypeForCheck);
12453
+ return !isValuePresent(value);
12454
+ });
12455
+ }
12456
+ user_effect(() => {
12457
+ const initData = get$1(initialFormData);
12458
+ const configs = Array.isArray(get$1(fieldConfigs)) ? get$1(fieldConfigs) : [];
12459
+ if (configs.length === 0 || Object.keys(initData).length === 0) {
12460
+ return;
12461
+ }
12462
+ Object.entries(initData).forEach(([key, value]) => {
12463
+ baseForm.handlers.handleFieldChange(key, value);
12464
+ });
12465
+ });
11157
12466
  const baseForm = createBaseFormMixin({
11158
12467
  jwt: jwt(),
11159
12468
  businessUuid: businessUuid(),
@@ -11162,34 +12471,57 @@ function CreateConsumerAccount($$anchor, $$props) {
11162
12471
  publicCertificateId: publicCertificateId(),
11163
12472
  debug: debug(),
11164
12473
  isInFlow: isInFlow(),
11165
- initialData: initialFormData,
11166
- fieldSchemas,
11167
- formName: "CreateConsumerAccount",
11168
- stepType: "CREATE_CONSUMER_ACCOUNT",
12474
+ // eslint-disable-next-line svelte/valid-compile
12475
+ initialData: get$1(initialFormData),
12476
+ // eslint-disable-next-line svelte/valid-compile
12477
+ fieldSchemas: get$1(fieldSchemas),
12478
+ // eslint-disable-next-line svelte/valid-compile
12479
+ formName: get$1(formName),
12480
+ // eslint-disable-next-line svelte/valid-compile
12481
+ stepType: get$1(stepType),
11169
12482
  stepIndex: isInFlow() ? 0 : void 0,
11170
12483
  enableAlviereCore: true,
11171
12484
  submitHandler: async (formData) => {
11172
- var _a2, _b;
11173
- const consumerInfo = {
11174
- first_name: formData.firstName,
11175
- // middle_name: formData.middleName || undefined,
11176
- last_name: formData.lastName,
11177
- // date_of_birth: formData.dateOfBirth,
11178
- // ssn: formData.ssn || undefined,
11179
- // phone_number: formData.phone,
11180
- email_address: formData.email
11181
- };
11182
- const accountRequest = {
11183
- external_id: formData.externalId || `consumer-${Date.now()}`,
11184
- information: { consumer_information: consumerInfo },
11185
- profile: prefillData().profile || void 0,
11186
- //primary_address: primaryAddress,
11187
- account_type: "CONSUMER",
11188
- parent_account_uuid: businessUuid()
11189
- };
11190
- (_b = (_a2 = baseForm.state.alviereCore) === null || _a2 === void 0 ? void 0 : _a2.getLogger()) === null || _b === void 0 ? void 0 : _b.info("🔍 Creating account using AlviereCore...");
12485
+ var _a3, _b2, _c2, _d2, _e2, _f2;
12486
+ if (!baseForm.state.alviereCore) {
12487
+ throw new AlcoreApiError(AlcoreErrorCodes.ALVIERE_CORE_NOT_INITIALIZED, "AlviereCore not initialized");
12488
+ }
12489
+ baseForm.actions.setLoading(true);
11191
12490
  const accountsService = baseForm.state.alviereCore.createAccountsService();
12491
+ uiLogger.info("Account to UPDATE", get$1(accountToUpdate));
11192
12492
  try {
12493
+ if (get$1(accountToUpdate) === null || get$1(accountToUpdate) === void 0 ? void 0 : get$1(accountToUpdate).account_uuid) {
12494
+ const updateAccountType = ((_a3 = get$1(accountToUpdate).information) === null || _a3 === void 0 ? void 0 : _a3.business_information) ? "business" : "consumer";
12495
+ const accountInfo2 = buildAccountInformationPayload(formData);
12496
+ const updateRequest = {
12497
+ information: { [`${updateAccountType}_information`]: accountInfo2 }
12498
+ /**
12499
+ * Profile updates are currently disabled during account update because the Backend throws an error, even when the passed profile is the same that already exists.
12500
+ */
12501
+ //profile: prefillData.profile || accountToUpdate.profile || undefined,
12502
+ };
12503
+ (_c2 = (_b2 = baseForm.state.alviereCore) === null || _b2 === void 0 ? void 0 : _b2.getLogger()) === null || _c2 === void 0 ? void 0 : _c2.info(`🔍 Updating ${updateAccountType} account using AlviereCore...`);
12504
+ const response2 = await accountsService.updateAccount(get$1(accountToUpdate).account_uuid, updateRequest);
12505
+ const addressPayload = buildAddressPayload(formData);
12506
+ const shouldCreateAddress = addressPayload && (get$1(missingRequiredFields).some((key) => ADDRESS_FIELD_KEYS.includes(key)) || !((_d2 = get$1(accountToUpdate).addresses) === null || _d2 === void 0 ? void 0 : _d2.length));
12507
+ uiLogger.info("SHOULD CREATE ADDRESS", shouldCreateAddress, addressPayload);
12508
+ if (shouldCreateAddress && addressPayload) {
12509
+ await accountsService.createAddress(get$1(accountToUpdate).account_uuid, addressPayload);
12510
+ }
12511
+ return response2;
12512
+ }
12513
+ const accountInfo = get$1(isBusinessAccount) ? Object.assign({}, formData) : Object.assign({}, formData);
12514
+ if (get$1(isBusinessAccount) && "nature_of_business" in accountInfo) {
12515
+ accountInfo.nature_of_business = coerceNatureOfBusiness(accountInfo.nature_of_business);
12516
+ }
12517
+ const accountRequest = {
12518
+ external_id: formData.externalId || `${get$1(accountType)}-${Date.now()}`,
12519
+ information: { [`${get$1(accountType)}_information`]: accountInfo },
12520
+ profile: get$1(prefillData).profile || void 0,
12521
+ account_type: get$1(accountTypeUpper),
12522
+ parent_account_uuid: businessUuid()
12523
+ };
12524
+ (_f2 = (_e2 = baseForm.state.alviereCore) === null || _e2 === void 0 ? void 0 : _e2.getLogger()) === null || _f2 === void 0 ? void 0 : _f2.info(`🔍 Creating ${get$1(accountType)} account using AlviereCore...`);
11193
12525
  const response = await accountsService.createAccount(accountRequest);
11194
12526
  if (response.account.account_uuid && get$1(hostElement)) {
11195
12527
  const createdEvent = new CustomEvent(ComponentEvents.ACCOUNT, {
@@ -11203,17 +12535,23 @@ function CreateConsumerAccount($$anchor, $$props) {
11203
12535
  get$1(hostElement).dispatchEvent(createdEvent);
11204
12536
  uiLogger.info("🚀 Dispatched account CREATED event:", createdEvent.detail);
11205
12537
  }
11206
- if (response.account.account_uuid) {
11207
- baseForm.actions.setPolling(true);
11208
- try {
11209
- const activeAccount = await pollAccountStatus(response.account.account_uuid);
11210
- return activeAccount;
11211
- } finally {
11212
- baseForm.actions.setPolling(false);
11213
- }
12538
+ const isAllowedToProceed = statusIsAllowed(response.account.status);
12539
+ const shouldPoll = (get$1(pollingConfig) === null || get$1(pollingConfig) === void 0 ? void 0 : get$1(pollingConfig).enabled) === true;
12540
+ if (isAllowedToProceed || !shouldPoll || !response.account.account_uuid) {
12541
+ return response;
12542
+ }
12543
+ baseForm.actions.setPolling(true);
12544
+ try {
12545
+ const polledAccount = await pollAccountStatus(response.account.account_uuid, get$1(allowedStatuses), get$1(pollingConfig));
12546
+ return polledAccount;
12547
+ } catch (pollError) {
12548
+ baseForm.actions.setPolling(false);
12549
+ baseForm.actions.setLoading(false);
12550
+ throw pollError;
11214
12551
  }
11215
- return response;
11216
12552
  } catch (error) {
12553
+ baseForm.actions.setPolling(false);
12554
+ baseForm.actions.setLoading(false);
11217
12555
  if (error instanceof AlcoreApiError) {
11218
12556
  if (error.isErrorCode(AlcoreErrorCodes.INVALID_JWT)) {
11219
12557
  uiLogger.info("🔍 Error creating account:", "Invalid JWT");
@@ -11233,21 +12571,51 @@ function CreateConsumerAccount($$anchor, $$props) {
11233
12571
  });
11234
12572
  }
11235
12573
  });
11236
- let isCheckingAccount = /* @__PURE__ */ state(false);
11237
- let isAutoSubmitting = /* @__PURE__ */ state(false);
11238
- let isSkippingStep = /* @__PURE__ */ state(false);
12574
+ function handleFieldChangeWithDebug(fieldName, value) {
12575
+ baseForm.handlers.handleFieldChange(fieldName, value);
12576
+ if (!debug()) {
12577
+ return;
12578
+ }
12579
+ const validationErrors = baseForm.state.validationErrors;
12580
+ uiLogger.info("🧪 Form validation state:", {
12581
+ fieldName,
12582
+ value,
12583
+ errors: validationErrors,
12584
+ errorKeys: Object.keys(validationErrors),
12585
+ isValid: baseForm.state.isValid,
12586
+ hasErrors: baseForm.computed.hasErrors,
12587
+ canSubmit: baseForm.computed.canSubmit,
12588
+ validationProgress: baseForm.computed.validationProgress
12589
+ });
12590
+ }
12591
+ let isCheckingAccount = /* @__PURE__ */ state(
12592
+ false
12593
+ // Shows spinner while checking existing account
12594
+ );
12595
+ let isAutoSubmitting = /* @__PURE__ */ state(
12596
+ false
12597
+ // Shows spinner during auto-submission
12598
+ );
12599
+ let isSkippingStep = /* @__PURE__ */ state(
12600
+ false
12601
+ // Shows spinner when skipping due to existing account
12602
+ );
12603
+ let missingRequiredFields = /* @__PURE__ */ state(proxy([]));
12604
+ let shouldSkipExistingAccount = /* @__PURE__ */ state(false);
12605
+ let accountToUpdate = /* @__PURE__ */ state(null);
11239
12606
  let hostElement = /* @__PURE__ */ state(null);
11240
12607
  onMount(async () => {
11241
- var _a2, _b;
12608
+ var _a3, _b2;
11242
12609
  set(isCheckingAccount, true);
11243
- if ((_a2 = baseForm.state.alviereCore) === null || _a2 === void 0 ? void 0 : _a2.isScopedToPayee()) {
12610
+ if ((_a3 = baseForm.state.alviereCore) === null || _a3 === void 0 ? void 0 : _a3.isScopedToPayee()) {
11244
12611
  const accountUuidFromJWT = baseForm.state.alviereCore.getAccountUuid();
11245
- uiLogger.info("🔄 Returning user detected - JWT already scoped to consumer account:", accountUuidFromJWT);
12612
+ uiLogger.info("🔄 Returning user detected - JWT already scoped to payor account:", accountUuidFromJWT);
11246
12613
  if (accountUuidFromJWT && accountUuidFromJWT !== "862a2524-ce32-4fa7-b138-e7ac7e93c022") {
11247
12614
  try {
11248
12615
  const account = await checkIfAccountExistsAndIsActive(accountUuidFromJWT);
11249
12616
  if (account) {
11250
- uiLogger.info("✅ Consumer account already exists and is active - skipping creation:", account);
12617
+ uiLogger.info("✅ Account already exists and is active - skipping creation:", account);
12618
+ set(shouldSkipExistingAccount, true);
11251
12619
  set(isSkippingStep, true);
11252
12620
  setTimeout(
11253
12621
  () => {
@@ -11267,7 +12635,7 @@ function CreateConsumerAccount($$anchor, $$props) {
11267
12635
  const customEvent = new CustomEvent(ComponentEvents.FORM_SUCCESS, {
11268
12636
  detail: {
11269
12637
  account_uuid: account.account.account_uuid,
11270
- stepType: "CREATE_CONSUMER_ACCOUNT",
12638
+ stepType: get$1(stepType),
11271
12639
  stepIndex: isInFlow() ? 0 : void 0,
11272
12640
  success: true,
11273
12641
  skipped: true
@@ -11290,7 +12658,7 @@ function CreateConsumerAccount($$anchor, $$props) {
11290
12658
  const errorEvent = new CustomEvent(ComponentEvents.FORM_ERROR, {
11291
12659
  detail: {
11292
12660
  error,
11293
- stepType: "CREATE_CONSUMER_ACCOUNT",
12661
+ stepType: get$1(stepType),
11294
12662
  stepIndex: isInFlow() ? 0 : void 0
11295
12663
  },
11296
12664
  bubbles: true,
@@ -11304,9 +12672,12 @@ function CreateConsumerAccount($$anchor, $$props) {
11304
12672
  uiLogger.warn("⚠️ Failed to fetch existing account, will show form:", error);
11305
12673
  }
11306
12674
  }
11307
- } else if ((_b = baseForm.state.alviereCore) === null || _b === void 0 ? void 0 : _b.isFirstTimeUser()) {
12675
+ } else if ((_b2 = baseForm.state.alviereCore) === null || _b2 === void 0 ? void 0 : _b2.isFirstTimeUser()) {
11308
12676
  uiLogger.info("👤 First-time user detected - showing account creation form");
11309
12677
  }
12678
+ if (get$1(prefillData) && Object.keys(get$1(prefillData)).some((key) => key !== "profile")) {
12679
+ validateAndAutoSubmit();
12680
+ }
11310
12681
  setTimeout(
11311
12682
  () => {
11312
12683
  set(isCheckingAccount, false);
@@ -11321,13 +12692,6 @@ function CreateConsumerAccount($$anchor, $$props) {
11321
12692
  const element2 = rootNode === null || rootNode === void 0 ? void 0 : rootNode.host;
11322
12693
  if (element2) {
11323
12694
  const attributes = element2.getAttributeNames();
11324
- if (attributes.includes("prefill-data")) {
11325
- const prefillDataAttr = element2.getAttribute("prefill-data");
11326
- if (prefillDataAttr) {
11327
- prefillData(JSON.parse(prefillDataAttr));
11328
- prefillFormData();
11329
- }
11330
- }
11331
12695
  if (attributes.includes("public-certificate")) {
11332
12696
  const publicCertificateAttr = element2.getAttribute("public-certificate");
11333
12697
  if (publicCertificateAttr) {
@@ -11344,34 +12708,27 @@ function CreateConsumerAccount($$anchor, $$props) {
11344
12708
  }
11345
12709
  set(initialized, true);
11346
12710
  });
11347
- async function prefillFormData() {
11348
- var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
11349
- const toString = (value) => {
11350
- if (value === null || value === void 0) return "";
11351
- return String(value);
11352
- };
11353
- baseForm.state.formData.firstName = toString((_b = (_a2 = prefillData().information) === null || _a2 === void 0 ? void 0 : _a2.consumer_information) === null || _b === void 0 ? void 0 : _b.first_name);
11354
- baseForm.state.formData.middleName = toString((_d = (_c = prefillData().information) === null || _c === void 0 ? void 0 : _c.consumer_information) === null || _d === void 0 ? void 0 : _d.middle_name);
11355
- baseForm.state.formData.lastName = toString((_f = (_e = prefillData().information) === null || _e === void 0 ? void 0 : _e.consumer_information) === null || _f === void 0 ? void 0 : _f.last_name);
11356
- baseForm.state.formData.email = toString((_h = (_g = prefillData().information) === null || _g === void 0 ? void 0 : _g.consumer_information) === null || _h === void 0 ? void 0 : _h.email_address);
11357
- baseForm.state.formData.phone = toString((_k = (_j = prefillData().information) === null || _j === void 0 ? void 0 : _j.consumer_information) === null || _k === void 0 ? void 0 : _k.phone_number);
11358
- baseForm.state.formData.dateOfBirth = toString((_m = (_l = prefillData().information) === null || _l === void 0 ? void 0 : _l.consumer_information) === null || _m === void 0 ? void 0 : _m.date_of_birth);
11359
- baseForm.state.formData.ssn = toString((_p = (_o = prefillData().information) === null || _o === void 0 ? void 0 : _o.consumer_information) === null || _p === void 0 ? void 0 : _p.ssn);
11360
- baseForm.state.formData.addressLine1 = toString((_q = prefillData().primary_address) === null || _q === void 0 ? void 0 : _q.address_line_1);
11361
- baseForm.state.formData.addressLine2 = toString((_r = prefillData().primary_address) === null || _r === void 0 ? void 0 : _r.address_line_2);
11362
- baseForm.state.formData.addressCity = toString((_s = prefillData().primary_address) === null || _s === void 0 ? void 0 : _s.city);
11363
- baseForm.state.formData.addressState = toString((_t = prefillData().primary_address) === null || _t === void 0 ? void 0 : _t.state);
11364
- baseForm.state.formData.addressPostalCode = toString((_u = prefillData().primary_address) === null || _u === void 0 ? void 0 : _u.postal_code);
11365
- baseForm.state.formData.addressCountry = toString((_v = prefillData().primary_address) === null || _v === void 0 ? void 0 : _v.country) || "USA";
12711
+ async function validateAndAutoSubmit() {
12712
+ var _a3;
12713
+ const recipeFields = get$1(resolvedProfileFields)() ? Object.keys(get$1(resolvedProfileFields)()) : [];
12714
+ if (recipeFields.length === 0) {
12715
+ return;
12716
+ }
11366
12717
  const isValid = baseForm.actions.validateAllFields();
11367
- if ((_w = baseForm.state.alviereCore) === null || _w === void 0 ? void 0 : _w.isScopedToPayee()) {
11368
- uiLogger.info("🔄 Skipping auto-submit - returning user detected, checking existing account...");
12718
+ if ((_a3 = baseForm.state.alviereCore) === null || _a3 === void 0 ? void 0 : _a3.isScopedToPayee()) {
12719
+ if (get$1(missingRequiredFields).length) {
12720
+ uiLogger.info("🔄 Returning user missing required fields, showing form:", get$1(missingRequiredFields));
12721
+ set(isAutoSubmitting, false);
12722
+ return;
12723
+ }
12724
+ if (get$1(shouldSkipExistingAccount)) {
12725
+ uiLogger.info("🔄 Skipping auto-submit - returning user detected, account already verified");
12726
+ set(isAutoSubmitting, false);
12727
+ set(isSkippingStep, true);
12728
+ return;
12729
+ }
12730
+ uiLogger.info("🔄 Returning user detected - waiting for manual input");
11369
12731
  set(isAutoSubmitting, false);
11370
- set(
11371
- isSkippingStep,
11372
- true
11373
- // Also mark as skipping to prevent form flash
11374
- );
11375
12732
  return;
11376
12733
  }
11377
12734
  if (isValid) {
@@ -11389,33 +12746,68 @@ function CreateConsumerAccount($$anchor, $$props) {
11389
12746
  }
11390
12747
  }
11391
12748
  async function checkIfAccountExistsAndIsActive(accountUuidToCheck) {
12749
+ var _a3;
11392
12750
  uiLogger.info("🔍 Checking if account exists and is active...", accountUuidToCheck);
11393
12751
  uiLogger.warn("🔍 Debug:", debug());
12752
+ set(missingRequiredFields, [], true);
12753
+ set(shouldSkipExistingAccount, false);
12754
+ set(accountToUpdate, null);
11394
12755
  if (!baseForm.state.alviereCore) {
11395
12756
  throw new Error("AlviereCore not initialized");
11396
12757
  }
11397
12758
  const accountsService = baseForm.state.alviereCore.createAccountsService();
11398
12759
  const result = await accountsService.getAccount(accountUuidToCheck);
12760
+ try {
12761
+ const addressResult = await accountsService.getAddresses(accountUuidToCheck);
12762
+ if ((_a3 = addressResult === null || addressResult === void 0 ? void 0 : addressResult.addresses) === null || _a3 === void 0 ? void 0 : _a3.length) {
12763
+ result.account.addresses = [addressResult.addresses[0]];
12764
+ } else if (!result.account.addresses) {
12765
+ result.account.addresses = [];
12766
+ }
12767
+ } catch (error) {
12768
+ uiLogger.warn("⚠️ Failed to fetch account addresses, continuing with account data:", error);
12769
+ }
11399
12770
  uiLogger.info("🔍 Account result:", result.account);
11400
- if (result.account.status === "ACTIVE") {
12771
+ if (statusIsAllowed(result.account.status)) {
12772
+ const missingFields = getMissingRequiredFields(result.account);
12773
+ if (missingFields.length) {
12774
+ set(missingRequiredFields, missingFields, true);
12775
+ uiLogger.info("⚠️ Account missing required fields, showing form:", missingFields);
12776
+ mergePrefillData(buildPrefillDataFromAccount(result.account));
12777
+ set(accountToUpdate, result.account, true);
12778
+ return null;
12779
+ }
11401
12780
  return result;
11402
12781
  }
11403
- uiLogger.error(`❌ Account exists but is not active. Status: ${result.account.status}`, result.account);
11404
- throw new AlcoreApiError(AlcoreErrorCodes.ACCOUNT_STATUS_NOT_ACTIVE, `Account exists but is not active. Current status: ${result.account.status}`);
12782
+ uiLogger.error(`❌ Account exists but is not in an allowed status. Status: ${result.account.status}`, result.account);
12783
+ throw new AlcoreApiError(AlcoreErrorCodes.ACCOUNT_STATUS_NOT_ACTIVE, `Account exists but is not in an allowed status. Current status: ${result.account.status}`);
11405
12784
  }
11406
- async function pollAccountStatus(accountUuid, maxRetries = 5, intervalMs = 6e3) {
12785
+ async function pollAccountStatus(accountUuid, allowed, policy) {
12786
+ var _a3, _b2;
11407
12787
  if (!baseForm.state.alviereCore) {
11408
12788
  throw new Error("AlviereCore not initialized");
11409
12789
  }
11410
12790
  const accountsService = baseForm.state.alviereCore.createAccountsService();
12791
+ const allowedList = (allowed === null || allowed === void 0 ? void 0 : allowed.length) ? allowed : ["ACTIVE"];
12792
+ const maxRetries = (_a3 = policy === null || policy === void 0 ? void 0 : policy.maxRetries) !== null && _a3 !== void 0 ? _a3 : 5;
12793
+ const intervalMs = (_b2 = policy === null || policy === void 0 ? void 0 : policy.intervalMs) !== null && _b2 !== void 0 ? _b2 : 6e3;
12794
+ const terminalStatuses = (policy === null || policy === void 0 ? void 0 : policy.terminalStatuses) || [];
12795
+ const onTerminal = (policy === null || policy === void 0 ? void 0 : policy.onTerminal) || "error";
11411
12796
  for (let attempt = 1; attempt <= maxRetries; attempt++) {
11412
12797
  try {
11413
12798
  uiLogger.info(`🔍 Polling account status (attempt ${attempt}/${maxRetries})...`);
11414
12799
  const result = await accountsService.getAccount(accountUuid);
11415
- if (result.account.status === "ACTIVE") {
11416
- uiLogger.info("✅ Account is now ACTIVE");
12800
+ if (allowedList.includes(result.account.status)) {
12801
+ uiLogger.info("✅ Account reached allowed status:", result.account.status);
11417
12802
  return result;
11418
12803
  }
12804
+ if (terminalStatuses.includes(result.account.status)) {
12805
+ uiLogger.error("❌ Account reached terminal status:", result.account.status);
12806
+ if (onTerminal === "continue") {
12807
+ return result;
12808
+ }
12809
+ throw new AlcoreApiError(AlcoreErrorCodes.ACCOUNT_STATUS_NOT_ACTIVE, `Account reached terminal status: ${result.account.status}`);
12810
+ }
11419
12811
  uiLogger.info(`⏳ Account status: ${result.account.status}, waiting...`);
11420
12812
  if (attempt < maxRetries) {
11421
12813
  await new Promise((resolve) => setTimeout(resolve, intervalMs));
@@ -11427,9 +12819,16 @@ function CreateConsumerAccount($$anchor, $$props) {
11427
12819
  }
11428
12820
  }
11429
12821
  }
11430
- throw new AlcoreApiError("115001", `Account did not become active after ${maxRetries} polling attempts`);
12822
+ throw new AlcoreApiError("115001", `Account did not reach allowed status (${allowedList.join(", ")}) after ${maxRetries} polling attempts`);
11431
12823
  }
11432
12824
  var $$exports = {
12825
+ get config() {
12826
+ return config();
12827
+ },
12828
+ set config($$value = {}) {
12829
+ config($$value);
12830
+ flushSync();
12831
+ },
11433
12832
  get jwt() {
11434
12833
  return jwt();
11435
12834
  },
@@ -11437,34 +12836,13 @@ function CreateConsumerAccount($$anchor, $$props) {
11437
12836
  jwt($$value);
11438
12837
  flushSync();
11439
12838
  },
11440
- get businessUuid() {
11441
- return businessUuid();
11442
- },
11443
- set businessUuid($$value = "") {
11444
- businessUuid($$value);
11445
- flushSync();
11446
- },
11447
- get isInFlow() {
11448
- return isInFlow();
11449
- },
11450
- set isInFlow($$value = false) {
11451
- isInFlow($$value);
11452
- flushSync();
11453
- },
11454
12839
  get debug() {
11455
12840
  return debug();
11456
12841
  },
11457
- set debug($$value = true) {
12842
+ set debug($$value = false) {
11458
12843
  debug($$value);
11459
12844
  flushSync();
11460
12845
  },
11461
- get prefillData() {
11462
- return prefillData();
11463
- },
11464
- set prefillData($$value = {}) {
11465
- prefillData($$value);
11466
- flushSync();
11467
- },
11468
12846
  get publicCertificate() {
11469
12847
  return publicCertificate();
11470
12848
  },
@@ -11478,6 +12856,34 @@ function CreateConsumerAccount($$anchor, $$props) {
11478
12856
  set publicCertificateId($$value = "") {
11479
12857
  publicCertificateId($$value);
11480
12858
  flushSync();
12859
+ },
12860
+ get businessUuid() {
12861
+ return businessUuid();
12862
+ },
12863
+ set businessUuid($$value = "") {
12864
+ businessUuid($$value);
12865
+ flushSync();
12866
+ },
12867
+ get isInFlow() {
12868
+ return isInFlow();
12869
+ },
12870
+ set isInFlow($$value = false) {
12871
+ isInFlow($$value);
12872
+ flushSync();
12873
+ },
12874
+ get profile() {
12875
+ return _profile();
12876
+ },
12877
+ set profile($$value = "") {
12878
+ _profile($$value);
12879
+ flushSync();
12880
+ },
12881
+ get stepConfig() {
12882
+ return stepConfig();
12883
+ },
12884
+ set stepConfig($$value = {}) {
12885
+ stepConfig($$value);
12886
+ flushSync();
11481
12887
  }
11482
12888
  };
11483
12889
  var div = root$8();
@@ -11485,6 +12891,9 @@ function CreateConsumerAccount($$anchor, $$props) {
11485
12891
  {
11486
12892
  var consequent = ($$anchor2) => {
11487
12893
  var h2 = root_1$8();
12894
+ var text2 = child(h2);
12895
+ reset(h2);
12896
+ template_effect(() => set_text(text2, `Create ${get$1(isBusinessAccount) ? "Business" : "Consumer"} Account`));
11488
12897
  append($$anchor2, h2);
11489
12898
  };
11490
12899
  if_block(node, ($$render) => {
@@ -11503,36 +12912,37 @@ function CreateConsumerAccount($$anchor, $$props) {
11503
12912
  var node_2 = child(span);
11504
12913
  {
11505
12914
  var consequent_1 = ($$anchor3) => {
11506
- var text$1 = text("Account verified, proceeding...");
11507
- append($$anchor3, text$1);
12915
+ var text_1 = text("Account verified, proceeding...");
12916
+ append($$anchor3, text_1);
11508
12917
  };
11509
12918
  var alternate_3 = ($$anchor3) => {
11510
12919
  var fragment = comment();
11511
12920
  var node_3 = first_child(fragment);
11512
12921
  {
11513
12922
  var consequent_2 = ($$anchor4) => {
11514
- var text_1 = text("Checking account status...");
11515
- append($$anchor4, text_1);
12923
+ var text_2 = text("Checking account status...");
12924
+ append($$anchor4, text_2);
11516
12925
  };
11517
12926
  var alternate_2 = ($$anchor4) => {
11518
12927
  var fragment_1 = comment();
11519
12928
  var node_4 = first_child(fragment_1);
11520
12929
  {
11521
12930
  var consequent_3 = ($$anchor5) => {
11522
- var text_2 = text("Your account is being validated...");
11523
- append($$anchor5, text_2);
12931
+ var text_3 = text("Your account is being validated...");
12932
+ append($$anchor5, text_3);
11524
12933
  };
11525
12934
  var alternate_1 = ($$anchor5) => {
11526
12935
  var fragment_2 = comment();
11527
12936
  var node_5 = first_child(fragment_2);
11528
12937
  {
11529
12938
  var consequent_4 = ($$anchor6) => {
11530
- var text_3 = text("Waiting for account activation...");
11531
- append($$anchor6, text_3);
12939
+ var text_4 = text("Waiting for account activation...");
12940
+ append($$anchor6, text_4);
11532
12941
  };
11533
12942
  var alternate = ($$anchor6) => {
11534
- var text_4 = text("Creating consumer account...");
11535
- append($$anchor6, text_4);
12943
+ var text_5 = text();
12944
+ template_effect(() => set_text(text_5, `Creating ${get$1(isBusinessAccount) ? "business" : "consumer"} account...`));
12945
+ append($$anchor6, text_5);
11536
12946
  };
11537
12947
  if_block(
11538
12948
  node_5,
@@ -11565,174 +12975,438 @@ function CreateConsumerAccount($$anchor, $$props) {
11565
12975
  true
11566
12976
  );
11567
12977
  }
11568
- append($$anchor3, fragment);
11569
- };
11570
- if_block(node_2, ($$render) => {
11571
- if (get$1(isSkippingStep)) $$render(consequent_1);
11572
- else $$render(alternate_3, false);
11573
- });
11574
- }
11575
- reset(span);
11576
- reset(alviere_spinner);
11577
- reset(div_1);
11578
- template_effect(() => classes = set_class(div_1, 1, "spinner-container svelte-1tz2qyj", null, classes, {
11579
- "spinner-standalone": get$1(isCheckingAccount) || get$1(isAutoSubmitting) || get$1(isSkippingStep)
11580
- }));
11581
- transition(1, div_1, () => fade, () => ({ duration: 300 }));
11582
- transition(2, div_1, () => fade, () => ({ duration: 200 }));
11583
- append($$anchor2, div_1);
11584
- };
11585
- if_block(node_1, ($$render) => {
11586
- if (baseForm.state.isLoading || baseForm.state.isPolling || get$1(isAutoSubmitting) || get$1(isCheckingAccount) || get$1(isSkippingStep)) $$render(consequent_5);
11587
- });
11588
- }
11589
- var form = sibling(node_1, 2);
11590
- let styles;
11591
- var div_2 = child(form);
11592
- var div_3 = sibling(child(div_2), 2);
11593
- var node_6 = child(div_3);
11594
- {
11595
- let $0 = /* @__PURE__ */ user_derived(() => baseForm.state.validationErrors.firstName ? "invalid" : "neutral");
11596
- let $1 = /* @__PURE__ */ user_derived(() => baseForm.state.validationErrors.firstName || "");
11597
- TextInput(node_6, {
11598
- label: "First Name",
11599
- placeholder: "Enter first name",
11600
- required: true,
11601
- oninput: (e) => baseForm.handlers.handleFieldChange("firstName", e.target.value),
11602
- get validationState() {
11603
- return get$1($0);
11604
- },
11605
- get errorMessage() {
11606
- return get$1($1);
11607
- },
11608
- get value() {
11609
- return baseForm.state.formData.firstName;
11610
- },
11611
- set value($$value) {
11612
- baseForm.state.formData.firstName = $$value;
11613
- }
11614
- });
11615
- }
11616
- var node_7 = sibling(node_6, 2);
11617
- {
11618
- let $0 = /* @__PURE__ */ user_derived(() => baseForm.state.validationErrors.lastName ? "invalid" : "neutral");
11619
- let $1 = /* @__PURE__ */ user_derived(() => baseForm.state.validationErrors.lastName || "");
11620
- TextInput(node_7, {
11621
- label: "Last Name",
11622
- placeholder: "Enter last name",
11623
- required: true,
11624
- oninput: (e) => baseForm.handlers.handleFieldChange("lastName", e.target.value),
11625
- get validationState() {
11626
- return get$1($0);
11627
- },
11628
- get errorMessage() {
11629
- return get$1($1);
11630
- },
11631
- get value() {
11632
- return baseForm.state.formData.lastName;
11633
- },
11634
- set value($$value) {
11635
- baseForm.state.formData.lastName = $$value;
11636
- }
11637
- });
11638
- }
11639
- reset(div_3);
11640
- var div_4 = sibling(div_3, 2);
11641
- var node_8 = child(div_4);
11642
- {
11643
- let $0 = /* @__PURE__ */ user_derived(() => baseForm.state.validationErrors.email ? "invalid" : "neutral");
11644
- let $1 = /* @__PURE__ */ user_derived(() => baseForm.state.validationErrors.email || "");
11645
- TextInput(node_8, {
11646
- label: "Email Address",
11647
- placeholder: "Enter email address",
11648
- type: "email",
11649
- required: true,
11650
- oninput: (e) => baseForm.handlers.handleFieldChange("email", e.target.value),
11651
- get validationState() {
11652
- return get$1($0);
11653
- },
11654
- get errorMessage() {
11655
- return get$1($1);
11656
- },
11657
- get value() {
11658
- return baseForm.state.formData.email;
11659
- },
11660
- set value($$value) {
11661
- baseForm.state.formData.email = $$value;
12978
+ append($$anchor3, fragment);
12979
+ };
12980
+ if_block(node_2, ($$render) => {
12981
+ if (get$1(isSkippingStep)) $$render(consequent_1);
12982
+ else $$render(alternate_3, false);
12983
+ });
11662
12984
  }
12985
+ reset(span);
12986
+ reset(alviere_spinner);
12987
+ reset(div_1);
12988
+ template_effect(() => classes = set_class(div_1, 1, "spinner-container svelte-oq2xej", null, classes, {
12989
+ "spinner-standalone": get$1(isCheckingAccount) || get$1(isAutoSubmitting) || get$1(isSkippingStep)
12990
+ }));
12991
+ transition(1, div_1, () => fade, () => ({ duration: 300 }));
12992
+ transition(2, div_1, () => fade, () => ({ duration: 200 }));
12993
+ append($$anchor2, div_1);
12994
+ };
12995
+ if_block(node_1, ($$render) => {
12996
+ if (baseForm.state.isLoading || baseForm.state.isPolling || get$1(isAutoSubmitting) || get$1(isCheckingAccount) || get$1(isSkippingStep)) $$render(consequent_5);
11663
12997
  });
11664
12998
  }
11665
- reset(div_4);
11666
- reset(div_2);
11667
- var div_5 = sibling(div_2, 2);
11668
- var div_6 = child(div_5);
11669
- var node_9 = child(div_6);
12999
+ var form = sibling(node_1, 2);
13000
+ let styles;
13001
+ var node_6 = child(form);
13002
+ each(node_6, 17, () => get$1(fieldGroups)(), index, ($$anchor2, group) => {
13003
+ var div_2 = root_11$1();
13004
+ var h3 = child(div_2);
13005
+ var text_6 = child(h3, true);
13006
+ reset(h3);
13007
+ var node_7 = sibling(h3, 2);
13008
+ {
13009
+ var consequent_10 = ($$anchor3) => {
13010
+ var fragment_4 = comment();
13011
+ var node_8 = first_child(fragment_4);
13012
+ each(node_8, 17, () => get$1(group).rows, index, ($$anchor4, row) => {
13013
+ var div_3 = root_13$2();
13014
+ each(div_3, 21, () => get$1(row).fields, index, ($$anchor5, fieldKey) => {
13015
+ var fragment_5 = comment();
13016
+ var node_9 = first_child(fragment_5);
13017
+ {
13018
+ var consequent_6 = ($$anchor6) => {
13019
+ {
13020
+ let $0 = /* @__PURE__ */ user_derived(() => {
13021
+ var _a3;
13022
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.label;
13023
+ });
13024
+ let $1 = /* @__PURE__ */ user_derived(() => {
13025
+ var _a3;
13026
+ return baseForm.state.formData[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key];
13027
+ });
13028
+ let $2 = /* @__PURE__ */ user_derived(() => {
13029
+ var _a3;
13030
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.placeholder;
13031
+ });
13032
+ let $3 = /* @__PURE__ */ user_derived(() => {
13033
+ var _a3;
13034
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.required;
13035
+ });
13036
+ let $4 = /* @__PURE__ */ user_derived(() => {
13037
+ var _a3;
13038
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.helpText;
13039
+ });
13040
+ let $5 = /* @__PURE__ */ user_derived(() => {
13041
+ var _a3;
13042
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.inputType;
13043
+ });
13044
+ let $6 = /* @__PURE__ */ user_derived(() => {
13045
+ var _a3;
13046
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] ? "invalid" : "neutral";
13047
+ });
13048
+ let $7 = /* @__PURE__ */ user_derived(() => {
13049
+ var _a3;
13050
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] || "";
13051
+ });
13052
+ TextInput($$anchor6, {
13053
+ get label() {
13054
+ return get$1($0);
13055
+ },
13056
+ get value() {
13057
+ return get$1($1);
13058
+ },
13059
+ get placeholder() {
13060
+ return get$1($2);
13061
+ },
13062
+ get required() {
13063
+ return get$1($3);
13064
+ },
13065
+ get helpText() {
13066
+ return get$1($4);
13067
+ },
13068
+ get type() {
13069
+ return get$1($5);
13070
+ },
13071
+ oninput: (e) => {
13072
+ var _a3;
13073
+ return handleFieldChangeWithDebug((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key, e.target.value);
13074
+ },
13075
+ get validationState() {
13076
+ return get$1($6);
13077
+ },
13078
+ get errorMessage() {
13079
+ return get$1($7);
13080
+ }
13081
+ });
13082
+ }
13083
+ };
13084
+ var alternate_6 = ($$anchor6) => {
13085
+ var fragment_7 = comment();
13086
+ var node_10 = first_child(fragment_7);
13087
+ {
13088
+ var consequent_7 = ($$anchor7) => {
13089
+ {
13090
+ let $0 = /* @__PURE__ */ user_derived(() => {
13091
+ var _a3;
13092
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.label;
13093
+ });
13094
+ let $1 = /* @__PURE__ */ user_derived(() => {
13095
+ var _a3;
13096
+ return baseForm.state.formData[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key];
13097
+ });
13098
+ let $2 = /* @__PURE__ */ user_derived(() => {
13099
+ var _a3;
13100
+ return ((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.options) || [];
13101
+ });
13102
+ let $3 = /* @__PURE__ */ user_derived(() => {
13103
+ var _a3;
13104
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.placeholder;
13105
+ });
13106
+ let $4 = /* @__PURE__ */ user_derived(() => {
13107
+ var _a3;
13108
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] ? "invalid" : "neutral";
13109
+ });
13110
+ let $5 = /* @__PURE__ */ user_derived(() => {
13111
+ var _a3;
13112
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] || "";
13113
+ });
13114
+ let $6 = /* @__PURE__ */ user_derived(() => {
13115
+ var _a3;
13116
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.helpText;
13117
+ });
13118
+ SearchSelect($$anchor7, {
13119
+ get label() {
13120
+ return get$1($0);
13121
+ },
13122
+ get value() {
13123
+ return get$1($1);
13124
+ },
13125
+ get options() {
13126
+ return get$1($2);
13127
+ },
13128
+ get placeholder() {
13129
+ return get$1($3);
13130
+ },
13131
+ onchange: (e) => {
13132
+ var _a3;
13133
+ return handleFieldChangeWithDebug((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key, e.detail.value);
13134
+ },
13135
+ get validationState() {
13136
+ return get$1($4);
13137
+ },
13138
+ get errorMessage() {
13139
+ return get$1($5);
13140
+ },
13141
+ get helpText() {
13142
+ return get$1($6);
13143
+ }
13144
+ });
13145
+ }
13146
+ };
13147
+ var alternate_5 = ($$anchor7) => {
13148
+ var fragment_9 = comment();
13149
+ var node_11 = first_child(fragment_9);
13150
+ {
13151
+ var consequent_8 = ($$anchor8) => {
13152
+ {
13153
+ let $0 = /* @__PURE__ */ user_derived(() => {
13154
+ var _a3;
13155
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.label;
13156
+ });
13157
+ let $1 = /* @__PURE__ */ user_derived(() => {
13158
+ var _a3;
13159
+ return baseForm.state.formData[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key];
13160
+ });
13161
+ let $2 = /* @__PURE__ */ user_derived(() => {
13162
+ var _a3;
13163
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.placeholder;
13164
+ });
13165
+ let $3 = /* @__PURE__ */ user_derived(() => {
13166
+ var _a3;
13167
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.required;
13168
+ });
13169
+ let $4 = /* @__PURE__ */ user_derived(() => {
13170
+ var _a3;
13171
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.helpText;
13172
+ });
13173
+ let $5 = /* @__PURE__ */ user_derived(() => {
13174
+ var _a3;
13175
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] ? "invalid" : "neutral";
13176
+ });
13177
+ let $6 = /* @__PURE__ */ user_derived(() => {
13178
+ var _a3;
13179
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] || "";
13180
+ });
13181
+ PhoneInput($$anchor8, {
13182
+ get label() {
13183
+ return get$1($0);
13184
+ },
13185
+ get value() {
13186
+ return get$1($1);
13187
+ },
13188
+ get placeholder() {
13189
+ return get$1($2);
13190
+ },
13191
+ get required() {
13192
+ return get$1($3);
13193
+ },
13194
+ get helpText() {
13195
+ return get$1($4);
13196
+ },
13197
+ oninput: (e) => {
13198
+ var _a3;
13199
+ return handleFieldChangeWithDebug((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key, e.target.value);
13200
+ },
13201
+ get validationState() {
13202
+ return get$1($5);
13203
+ },
13204
+ get errorMessage() {
13205
+ return get$1($6);
13206
+ }
13207
+ });
13208
+ }
13209
+ };
13210
+ var alternate_4 = ($$anchor8) => {
13211
+ var fragment_11 = comment();
13212
+ var node_12 = first_child(fragment_11);
13213
+ {
13214
+ var consequent_9 = ($$anchor9) => {
13215
+ {
13216
+ let $0 = /* @__PURE__ */ user_derived(() => {
13217
+ var _a3;
13218
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.label;
13219
+ });
13220
+ let $1 = /* @__PURE__ */ user_derived(() => {
13221
+ var _a3;
13222
+ return baseForm.state.formData[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key];
13223
+ });
13224
+ let $2 = /* @__PURE__ */ user_derived(() => {
13225
+ var _a3;
13226
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.placeholder;
13227
+ });
13228
+ let $3 = /* @__PURE__ */ user_derived(() => {
13229
+ var _a3;
13230
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.required;
13231
+ });
13232
+ let $4 = /* @__PURE__ */ user_derived(() => {
13233
+ var _a3;
13234
+ return (_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.helpText;
13235
+ });
13236
+ let $5 = /* @__PURE__ */ user_derived(() => {
13237
+ var _a3;
13238
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] ? "invalid" : "neutral";
13239
+ });
13240
+ let $6 = /* @__PURE__ */ user_derived(() => {
13241
+ var _a3;
13242
+ return baseForm.state.validationErrors[(_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key] || "";
13243
+ });
13244
+ DateOfBirthInput($$anchor9, {
13245
+ get label() {
13246
+ return get$1($0);
13247
+ },
13248
+ get value() {
13249
+ return get$1($1);
13250
+ },
13251
+ get placeholder() {
13252
+ return get$1($2);
13253
+ },
13254
+ get required() {
13255
+ return get$1($3);
13256
+ },
13257
+ get helpText() {
13258
+ return get$1($4);
13259
+ },
13260
+ oninput: (e) => {
13261
+ var _a3;
13262
+ return handleFieldChangeWithDebug((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.key, e.target.value);
13263
+ },
13264
+ get validationState() {
13265
+ return get$1($5);
13266
+ },
13267
+ get errorMessage() {
13268
+ return get$1($6);
13269
+ }
13270
+ });
13271
+ }
13272
+ };
13273
+ if_block(
13274
+ node_12,
13275
+ ($$render) => {
13276
+ var _a3;
13277
+ if (((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.component) === "dob") $$render(consequent_9);
13278
+ },
13279
+ true
13280
+ );
13281
+ }
13282
+ append($$anchor8, fragment_11);
13283
+ };
13284
+ if_block(
13285
+ node_11,
13286
+ ($$render) => {
13287
+ var _a3;
13288
+ if (((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.component) === "phone") $$render(consequent_8);
13289
+ else $$render(alternate_4, false);
13290
+ },
13291
+ true
13292
+ );
13293
+ }
13294
+ append($$anchor7, fragment_9);
13295
+ };
13296
+ if_block(
13297
+ node_10,
13298
+ ($$render) => {
13299
+ var _a3;
13300
+ if (((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.component) === "select") $$render(consequent_7);
13301
+ else $$render(alternate_5, false);
13302
+ },
13303
+ true
13304
+ );
13305
+ }
13306
+ append($$anchor6, fragment_7);
13307
+ };
13308
+ if_block(node_9, ($$render) => {
13309
+ var _a3;
13310
+ if (((_a3 = getField(get$1(fieldKey))) == null ? void 0 : _a3.component) === "text") $$render(consequent_6);
13311
+ else $$render(alternate_6, false);
13312
+ });
13313
+ }
13314
+ append($$anchor5, fragment_5);
13315
+ });
13316
+ reset(div_3);
13317
+ append($$anchor4, div_3);
13318
+ });
13319
+ append($$anchor3, fragment_4);
13320
+ };
13321
+ if_block(node_7, ($$render) => {
13322
+ if (get$1(group).rows) $$render(consequent_10);
13323
+ });
13324
+ }
13325
+ reset(div_2);
13326
+ template_effect(() => set_text(text_6, get$1(group).label));
13327
+ append($$anchor2, div_2);
13328
+ });
13329
+ var div_4 = sibling(node_6, 2);
13330
+ var div_5 = child(div_4);
13331
+ var node_13 = child(div_5);
11670
13332
  {
11671
- var consequent_6 = ($$anchor2) => {
11672
- var span_1 = root_11$1();
13333
+ var consequent_11 = ($$anchor2) => {
13334
+ var span_1 = root_22();
11673
13335
  append($$anchor2, span_1);
11674
13336
  };
11675
- if_block(node_9, ($$render) => {
11676
- if (!baseForm.computed.canSubmit) $$render(consequent_6);
13337
+ if_block(node_13, ($$render) => {
13338
+ if (!baseForm.computed.canSubmit) $$render(consequent_11);
11677
13339
  });
11678
13340
  }
11679
- var node_10 = sibling(node_9, 2);
13341
+ var node_14 = sibling(node_13, 2);
11680
13342
  {
11681
- var consequent_7 = ($$anchor2) => {
11682
- var span_2 = root_12$2();
13343
+ var consequent_12 = ($$anchor2) => {
13344
+ var span_2 = root_23();
11683
13345
  append($$anchor2, span_2);
11684
13346
  };
11685
- if_block(node_10, ($$render) => {
11686
- if (baseForm.computed.hasErrors && baseForm.computed.canSubmit) $$render(consequent_7);
13347
+ if_block(node_14, ($$render) => {
13348
+ if (baseForm.computed.hasErrors) $$render(consequent_12);
11687
13349
  });
11688
13350
  }
11689
- reset(div_6);
11690
- var alviere_button = sibling(div_6, 2);
13351
+ reset(div_5);
13352
+ var alviere_button = sibling(div_5, 2);
11691
13353
  set_custom_element_data(alviere_button, "type", "submit");
11692
13354
  template_effect(() => set_custom_element_data(alviere_button, "disabled", !baseForm.computed.canSubmit));
11693
13355
  set_custom_element_data(alviere_button, "variant", "primary");
11694
13356
  set_custom_element_data(alviere_button, "size", "md");
11695
13357
  template_effect(() => set_custom_element_data(alviere_button, "handler", baseForm.handlers.handleSubmit));
11696
- var node_11 = child(alviere_button);
13358
+ var node_15 = child(alviere_button);
11697
13359
  {
11698
- var consequent_8 = ($$anchor2) => {
11699
- var text_5 = text("Creating Consumer Account...");
11700
- append($$anchor2, text_5);
13360
+ var consequent_13 = ($$anchor2) => {
13361
+ var text_7 = text();
13362
+ template_effect(($0) => set_text(text_7, $0), [
13363
+ () => {
13364
+ var _a3, _b2, _c2;
13365
+ return ((_c2 = (_b2 = (_a3 = get$1(resolvedProfileRecipe)()) == null ? void 0 : _a3.config) == null ? void 0 : _b2.labels) == null ? void 0 : _c2.creatingAccountLabel) || `Creating ${get$1(isBusinessAccount) ? "Business" : "Consumer"} Account...`;
13366
+ }
13367
+ ]);
13368
+ append($$anchor2, text_7);
11701
13369
  };
11702
- var alternate_5 = ($$anchor2) => {
11703
- var fragment_3 = comment();
11704
- var node_12 = first_child(fragment_3);
13370
+ var alternate_8 = ($$anchor2) => {
13371
+ var fragment_14 = comment();
13372
+ var node_16 = first_child(fragment_14);
11705
13373
  {
11706
- var consequent_9 = ($$anchor3) => {
11707
- var text_6 = text("Waiting for Account Activation...");
11708
- append($$anchor3, text_6);
13374
+ var consequent_14 = ($$anchor3) => {
13375
+ var text_8 = text("Waiting for Account Activation...");
13376
+ append($$anchor3, text_8);
11709
13377
  };
11710
- var alternate_4 = ($$anchor3) => {
11711
- var text_7 = text("Create Consumer Account");
11712
- append($$anchor3, text_7);
13378
+ var alternate_7 = ($$anchor3) => {
13379
+ var text_9 = text();
13380
+ template_effect(($0) => set_text(text_9, $0), [
13381
+ () => {
13382
+ var _a3, _b2, _c2;
13383
+ return ((_c2 = (_b2 = (_a3 = get$1(resolvedProfileRecipe)()) == null ? void 0 : _a3.config) == null ? void 0 : _b2.labels) == null ? void 0 : _c2.createAccountLabel) || `Create ${get$1(isBusinessAccount) ? "Business" : "Consumer"} Account`;
13384
+ }
13385
+ ]);
13386
+ append($$anchor3, text_9);
11713
13387
  };
11714
13388
  if_block(
11715
- node_12,
13389
+ node_16,
11716
13390
  ($$render) => {
11717
- if (baseForm.state.isPolling) $$render(consequent_9);
11718
- else $$render(alternate_4, false);
13391
+ if (baseForm.state.isPolling) $$render(consequent_14);
13392
+ else $$render(alternate_7, false);
11719
13393
  },
11720
13394
  true
11721
13395
  );
11722
13396
  }
11723
- append($$anchor2, fragment_3);
13397
+ append($$anchor2, fragment_14);
11724
13398
  };
11725
- if_block(node_11, ($$render) => {
11726
- if (baseForm.state.isLoading) $$render(consequent_8);
11727
- else $$render(alternate_5, false);
13399
+ if_block(node_15, ($$render) => {
13400
+ if (baseForm.state.isLoading) $$render(consequent_13);
13401
+ else $$render(alternate_8, false);
11728
13402
  });
11729
13403
  }
11730
13404
  reset(alviere_button);
11731
- reset(div_5);
13405
+ reset(div_4);
11732
13406
  reset(form);
11733
13407
  bind_this(form, ($$value) => baseForm.state.formElement = $$value, () => {
11734
- var _a2;
11735
- return (_a2 = baseForm == null ? void 0 : baseForm.state) == null ? void 0 : _a2.formElement;
13408
+ var _a3;
13409
+ return (_a3 = baseForm == null ? void 0 : baseForm.state) == null ? void 0 : _a3.formElement;
11736
13410
  });
11737
13411
  reset(div);
11738
13412
  bind_this(div, ($$value) => set(hostElement, $$value), () => get$1(hostElement));
@@ -11740,12 +13414,136 @@ function CreateConsumerAccount($$anchor, $$props) {
11740
13414
  display: get$1(isCheckingAccount) || get$1(isAutoSubmitting) || get$1(isSkippingStep) ? "none" : "block"
11741
13415
  }));
11742
13416
  event$1("submit", form, function(...$$args) {
11743
- var _a2;
11744
- (_a2 = baseForm.handlers.handleSubmit) == null ? void 0 : _a2.apply(this, $$args);
13417
+ var _a3;
13418
+ (_a3 = baseForm.handlers.handleSubmit) == null ? void 0 : _a3.apply(this, $$args);
11745
13419
  });
11746
13420
  append($$anchor, div);
11747
13421
  return pop($$exports);
11748
13422
  }
13423
+ customElements.define("alviere-create-account", create_custom_element(
13424
+ CreateAccount,
13425
+ {
13426
+ config: {},
13427
+ jwt: {},
13428
+ debug: {},
13429
+ publicCertificate: {},
13430
+ publicCertificateId: {},
13431
+ businessUuid: {},
13432
+ isInFlow: {},
13433
+ profile: {},
13434
+ stepConfig: {}
13435
+ },
13436
+ [],
13437
+ [],
13438
+ true
13439
+ ));
13440
+ function CreateConsumerAccount($$anchor, $$props) {
13441
+ push($$props, true);
13442
+ let jwt = prop($$props, "jwt", 7, ""), businessUuid = prop($$props, "businessUuid", 15, ""), isInFlow = prop($$props, "isInFlow", 15, false), debug = prop($$props, "debug", 15, true), prefillData = prop($$props, "prefillData", 31, () => proxy({})), publicCertificate = prop($$props, "publicCertificate", 15, ""), publicCertificateId = prop($$props, "publicCertificateId", 15, ""), _profile = prop($$props, "profile", 15, ""), profileRecipe = prop($$props, "profileRecipe", 15, void 0), stepConfig = prop($$props, "stepConfig", 31, () => proxy({}));
13443
+ const config = /* @__PURE__ */ user_derived(() => ({ formData: prefillData() }));
13444
+ var $$exports = {
13445
+ get jwt() {
13446
+ return jwt();
13447
+ },
13448
+ set jwt($$value = "") {
13449
+ jwt($$value);
13450
+ flushSync();
13451
+ },
13452
+ get businessUuid() {
13453
+ return businessUuid();
13454
+ },
13455
+ set businessUuid($$value = "") {
13456
+ businessUuid($$value);
13457
+ flushSync();
13458
+ },
13459
+ get isInFlow() {
13460
+ return isInFlow();
13461
+ },
13462
+ set isInFlow($$value = false) {
13463
+ isInFlow($$value);
13464
+ flushSync();
13465
+ },
13466
+ get debug() {
13467
+ return debug();
13468
+ },
13469
+ set debug($$value = true) {
13470
+ debug($$value);
13471
+ flushSync();
13472
+ },
13473
+ get prefillData() {
13474
+ return prefillData();
13475
+ },
13476
+ set prefillData($$value = {}) {
13477
+ prefillData($$value);
13478
+ flushSync();
13479
+ },
13480
+ get publicCertificate() {
13481
+ return publicCertificate();
13482
+ },
13483
+ set publicCertificate($$value = "") {
13484
+ publicCertificate($$value);
13485
+ flushSync();
13486
+ },
13487
+ get publicCertificateId() {
13488
+ return publicCertificateId();
13489
+ },
13490
+ set publicCertificateId($$value = "") {
13491
+ publicCertificateId($$value);
13492
+ flushSync();
13493
+ },
13494
+ get profile() {
13495
+ return _profile();
13496
+ },
13497
+ set profile($$value = "") {
13498
+ _profile($$value);
13499
+ flushSync();
13500
+ },
13501
+ get profileRecipe() {
13502
+ return profileRecipe();
13503
+ },
13504
+ set profileRecipe($$value = void 0) {
13505
+ profileRecipe($$value);
13506
+ flushSync();
13507
+ },
13508
+ get stepConfig() {
13509
+ return stepConfig();
13510
+ },
13511
+ set stepConfig($$value = {}) {
13512
+ stepConfig($$value);
13513
+ flushSync();
13514
+ }
13515
+ };
13516
+ CreateAccount($$anchor, {
13517
+ get config() {
13518
+ return get$1(config);
13519
+ },
13520
+ get jwt() {
13521
+ return jwt();
13522
+ },
13523
+ get businessUuid() {
13524
+ return businessUuid();
13525
+ },
13526
+ get isInFlow() {
13527
+ return isInFlow();
13528
+ },
13529
+ get debug() {
13530
+ return debug();
13531
+ },
13532
+ get publicCertificate() {
13533
+ return publicCertificate();
13534
+ },
13535
+ get publicCertificateId() {
13536
+ return publicCertificateId();
13537
+ },
13538
+ get profile() {
13539
+ return _profile();
13540
+ },
13541
+ get stepConfig() {
13542
+ return stepConfig();
13543
+ }
13544
+ });
13545
+ return pop($$exports);
13546
+ }
11749
13547
  customElements.define("alviere-create-consumer-account", create_custom_element(
11750
13548
  CreateConsumerAccount,
11751
13549
  {
@@ -11755,7 +13553,10 @@ customElements.define("alviere-create-consumer-account", create_custom_element(
11755
13553
  debug: {},
11756
13554
  prefillData: {},
11757
13555
  publicCertificate: {},
11758
- publicCertificateId: {}
13556
+ publicCertificateId: {},
13557
+ profile: {},
13558
+ profileRecipe: {},
13559
+ stepConfig: {}
11759
13560
  },
11760
13561
  [],
11761
13562
  [],
@@ -11949,13 +13750,34 @@ function formatRoutingNumber(routingNumber) {
11949
13750
  }
11950
13751
  return routingNumber;
11951
13752
  }
13753
+ const createFlowRecipeStore = () => {
13754
+ const { subscribe, set: set2 } = writable({ profile: "", recipe: null });
13755
+ return {
13756
+ subscribe,
13757
+ setRecipe: (profile, recipe) => {
13758
+ set2({ profile, recipe });
13759
+ },
13760
+ reset: () => {
13761
+ set2({ profile: "", recipe: null });
13762
+ },
13763
+ getRecipe: () => {
13764
+ let currentState = { profile: "", recipe: null };
13765
+ subscribe((state2) => {
13766
+ currentState = state2;
13767
+ })();
13768
+ return currentState;
13769
+ }
13770
+ };
13771
+ };
13772
+ const flowRecipeStore = createFlowRecipeStore();
13773
+ const resetFlowRecipe = flowRecipeStore.reset;
11952
13774
  var root_1$7 = /* @__PURE__ */ from_html(`<div class="spinner-container svelte-t9z8bl"><alviere-spinner></alviere-spinner></div>`, 2);
11953
13775
  var root_5$2 = /* @__PURE__ */ from_html(`<div class="bank-accounts-section__card-content__info-row svelte-t9z8bl"><span class="label svelte-t9z8bl">Region:</span> <span class="value svelte-t9z8bl"> </span></div>`);
11954
13776
  var root_6$1 = /* @__PURE__ */ from_html(`<div class="bank-accounts-section__card-content__info-row svelte-t9z8bl"><span class="label svelte-t9z8bl">Description:</span> <span class="value description svelte-t9z8bl"> </span></div>`);
11955
13777
  var root_4$3 = /* @__PURE__ */ from_html(`<div class="bank-accounts-section__card-content__info-row svelte-t9z8bl"><span class="label svelte-t9z8bl">Bank:</span> <span class="value svelte-t9z8bl"> </span></div> <!> <!>`, 1);
11956
13778
  var root_7$1 = /* @__PURE__ */ from_html(`<div class="bank-accounts-section__card-content__info-row svelte-t9z8bl"><span class="label svelte-t9z8bl">Account Type:</span> <span class="value svelte-t9z8bl"> </span></div>`);
11957
13779
  var root_3$4 = /* @__PURE__ */ from_html(`<alviere-list-item><div slot="leading"><alviere-badge> </alviere-badge></div> <div slot="primary-text"><span> </span></div> <div slot="secondary-text"><span> </span></div> <div slot="tertiary-text"><span> </span></div> <div slot="actions"><alviere-button></alviere-button></div> <div slot="expanded-content"><div class="bank-accounts-section__card-content svelte-t9z8bl"><div class="bank-accounts-section__card-content__info-row svelte-t9z8bl"><span class="label svelte-t9z8bl">Account Number:</span> <span class="value svelte-t9z8bl"> </span></div> <div class="bank-accounts-section__card-content__info-row svelte-t9z8bl"><span class="label svelte-t9z8bl">Routing/SWIFT:</span> <span class="value svelte-t9z8bl"> </span></div> <!> <!></div></div></alviere-list-item>`, 2);
11958
- var root_2$2 = /* @__PURE__ */ from_html(`<div class="bank-accounts-section svelte-t9z8bl"><div class="alviere-add-bank-account__header svelte-t9z8bl"><h2 class="svelte-t9z8bl"> </h2> <alviere-button>Add New Bank Account</alviere-button></div> <alviere-list></alviere-list> <div class="alviere-add-bank-account__footer svelte-t9z8bl"><alviere-button>Continue to Payment</alviere-button></div></div>`, 2);
13780
+ var root_2$2 = /* @__PURE__ */ from_html(`<div class="bank-accounts-section svelte-t9z8bl"><div class="alviere-add-bank-account__header svelte-t9z8bl"><h2 class="svelte-t9z8bl"> </h2> <alviere-button>Add New Bank Account</alviere-button></div> <alviere-list></alviere-list> <div class="alviere-add-bank-account__footer svelte-t9z8bl"><alviere-button> </alviere-button></div></div>`, 2);
11959
13781
  var root_9$1 = /* @__PURE__ */ from_html(`<alviere-button><span class="alviere-add-bank-account__button__label">Back to Bank Accounts</span></alviere-button>`, 2);
11960
13782
  var root_13$1 = /* @__PURE__ */ from_html(`<span class="bank-region svelte-t9z8bl"> </span>`);
11961
13783
  var root_12$1 = /* @__PURE__ */ from_html(`<div class="routing-info svelte-t9z8bl"><div class="routing-info-header svelte-t9z8bl"><span class="bank-name svelte-t9z8bl"> </span> <!></div></div>`);
@@ -11978,7 +13800,25 @@ const $$css$9 = {
11978
13800
  function AddBankAccount($$anchor, $$props) {
11979
13801
  push($$props, true);
11980
13802
  append_styles$1($$anchor, $$css$9);
11981
- let jwt = prop($$props, "jwt", 7, ""), accountUuid = prop($$props, "accountUuid", 7, ""), debug = prop($$props, "debug", 7, true), onsuccess = prop($$props, "onsuccess", 15), publicCertificate = prop($$props, "publicCertificate", 7, ""), publicCertificateId = prop($$props, "publicCertificateId", 7, ""), requireRoutingAndAccountConfirmation = prop($$props, "requireRoutingAndAccountConfirmation", 7, false);
13803
+ const $flowRecipeStore = () => store_get(flowRecipeStore, "$flowRecipeStore", $$stores);
13804
+ const [$$stores, $$cleanup] = setup_stores();
13805
+ let jwt = prop($$props, "jwt", 7, ""), accountUuid = prop($$props, "accountUuid", 7, ""), debug = prop($$props, "debug", 7, true), _profile = prop($$props, "profile", 15, ""), config = prop($$props, "config", 31, () => proxy({})), onsuccess = prop($$props, "onsuccess", 15), publicCertificate = prop($$props, "publicCertificate", 7, ""), publicCertificateId = prop($$props, "publicCertificateId", 7, ""), requireRoutingAndAccountConfirmation = prop($$props, "requireRoutingAndAccountConfirmation", 7, false);
13806
+ const stepType = "ADD_BANK_ACCOUNT";
13807
+ let prefillData = /* @__PURE__ */ state(proxy(config().formData));
13808
+ let resolvedProfileData = /* @__PURE__ */ user_derived(() => () => {
13809
+ const storeRecipe = $flowRecipeStore().recipe;
13810
+ if (storeRecipe) {
13811
+ return { profile: $flowRecipeStore().profile, recipe: storeRecipe };
13812
+ }
13813
+ return resolveProfileRecipe({
13814
+ profile: _profile(),
13815
+ prefillProfile: get$1(prefillData) === null || get$1(prefillData) === void 0 ? void 0 : get$1(prefillData).profile
13816
+ });
13817
+ });
13818
+ let resolvedProfileRecipe = /* @__PURE__ */ user_derived(() => () => {
13819
+ var _a2, _b;
13820
+ return (_b = (_a2 = get$1(resolvedProfileData)().recipe) === null || _a2 === void 0 ? void 0 : _a2.steps) === null || _b === void 0 ? void 0 : _b.find((step) => step.type === stepType);
13821
+ });
11982
13822
  const initialFormData = {
11983
13823
  external_id: "",
11984
13824
  country: "USA",
@@ -12239,6 +14079,20 @@ function AddBankAccount($$anchor, $$props) {
12239
14079
  debug($$value);
12240
14080
  flushSync();
12241
14081
  },
14082
+ get profile() {
14083
+ return _profile();
14084
+ },
14085
+ set profile($$value = "") {
14086
+ _profile($$value);
14087
+ flushSync();
14088
+ },
14089
+ get config() {
14090
+ return config();
14091
+ },
14092
+ set config($$value = {}) {
14093
+ config($$value);
14094
+ flushSync();
14095
+ },
12242
14096
  get onsuccess() {
12243
14097
  return onsuccess();
12244
14098
  },
@@ -12462,9 +14316,22 @@ function AddBankAccount($$anchor, $$props) {
12462
14316
  uiLogger.warn("⚠️ Host element not available for event dispatch");
12463
14317
  }
12464
14318
  });
14319
+ var text_11 = child(alviere_button_2, true);
14320
+ reset(alviere_button_2);
12465
14321
  reset(div_17);
12466
14322
  reset(div_2);
12467
- template_effect(() => set_text(text2, `Your Bank Accounts (${get$1(bankAccounts).bank_accounts.length ?? ""})`));
14323
+ template_effect(
14324
+ ($0) => {
14325
+ set_text(text2, `Your Bank Accounts (${get$1(bankAccounts).bank_accounts.length ?? ""})`);
14326
+ set_text(text_11, $0);
14327
+ },
14328
+ [
14329
+ () => {
14330
+ var _a2, _b, _c;
14331
+ return ((_c = (_b = (_a2 = get$1(resolvedProfileRecipe)()) == null ? void 0 : _a2.config) == null ? void 0 : _b.labels) == null ? void 0 : _c.finalizeButton) || "Continue to Payment";
14332
+ }
14333
+ ]
14334
+ );
12468
14335
  append($$anchor2, div_2);
12469
14336
  };
12470
14337
  if_block(node_1, ($$render) => {
@@ -12510,15 +14377,15 @@ function AddBankAccount($$anchor, $$props) {
12510
14377
  var div_21 = root_12$1();
12511
14378
  var div_22 = child(div_21);
12512
14379
  var span_9 = child(div_22);
12513
- var text_11 = child(span_9, true);
14380
+ var text_12 = child(span_9, true);
12514
14381
  reset(span_9);
12515
14382
  var node_11 = sibling(span_9, 2);
12516
14383
  {
12517
14384
  var consequent_7 = ($$anchor6) => {
12518
14385
  var span_10 = root_13$1();
12519
- var text_12 = child(span_10);
14386
+ var text_13 = child(span_10);
12520
14387
  reset(span_10);
12521
- template_effect(() => set_text(text_12, `(${get$1(bankInfo).city ?? ""})`));
14388
+ template_effect(() => set_text(text_13, `(${get$1(bankInfo).city ?? ""})`));
12522
14389
  append($$anchor6, span_10);
12523
14390
  };
12524
14391
  if_block(node_11, ($$render) => {
@@ -12530,7 +14397,7 @@ function AddBankAccount($$anchor, $$props) {
12530
14397
  reset(div_21);
12531
14398
  template_effect(() => {
12532
14399
  var _a2;
12533
- return set_text(text_11, (_a2 = get$1(bankInfo)) == null ? void 0 : _a2.name);
14400
+ return set_text(text_12, (_a2 = get$1(bankInfo)) == null ? void 0 : _a2.name);
12534
14401
  });
12535
14402
  append($$anchor5, div_21);
12536
14403
  };
@@ -12727,9 +14594,9 @@ function AddBankAccount($$anchor, $$props) {
12727
14594
  {
12728
14595
  var consequent_16 = ($$anchor3) => {
12729
14596
  var span_13 = root_19$1();
12730
- var text_13 = child(span_13, true);
14597
+ var text_14 = child(span_13, true);
12731
14598
  reset(span_13);
12732
- template_effect(() => set_text(text_13, get$1(formError)));
14599
+ template_effect(() => set_text(text_14, get$1(formError)));
12733
14600
  append($$anchor3, span_13);
12734
14601
  };
12735
14602
  if_block(node_19, ($$render) => {
@@ -12743,7 +14610,7 @@ function AddBankAccount($$anchor, $$props) {
12743
14610
  set_custom_element_data(alviere_button_4, "size", "md");
12744
14611
  template_effect(() => set_custom_element_data(alviere_button_4, "disabled", !baseForm.computed.canSubmit || get$1(isSubmitting)));
12745
14612
  set_custom_element_data(alviere_button_4, "handler", handleAddBankAccount);
12746
- var text_14 = child(alviere_button_4, true);
14613
+ var text_15 = child(alviere_button_4, true);
12747
14614
  reset(alviere_button_4);
12748
14615
  reset(div_25);
12749
14616
  reset(form);
@@ -12751,7 +14618,7 @@ function AddBankAccount($$anchor, $$props) {
12751
14618
  var _a2;
12752
14619
  return (_a2 = baseForm == null ? void 0 : baseForm.state) == null ? void 0 : _a2.formElement;
12753
14620
  });
12754
- template_effect(() => set_text(text_14, get$1(isSubmitting) ? "Adding..." : "Add Bank Account"));
14621
+ template_effect(() => set_text(text_15, get$1(isSubmitting) ? "Adding..." : "Add Bank Account"));
12755
14622
  event$1("submit", form, handleAddBankAccount);
12756
14623
  append($$anchor2, form);
12757
14624
  };
@@ -12762,7 +14629,9 @@ function AddBankAccount($$anchor, $$props) {
12762
14629
  reset(div);
12763
14630
  bind_this(div, ($$value) => set(hostElement, $$value), () => get$1(hostElement));
12764
14631
  append($$anchor, div);
12765
- return pop($$exports);
14632
+ var $$pop = pop($$exports);
14633
+ $$cleanup();
14634
+ return $$pop;
12766
14635
  }
12767
14636
  customElements.define("alviere-add-bank-account", create_custom_element(
12768
14637
  AddBankAccount,
@@ -12770,6 +14639,8 @@ customElements.define("alviere-add-bank-account", create_custom_element(
12770
14639
  jwt: {},
12771
14640
  accountUuid: {},
12772
14641
  debug: {},
14642
+ profile: {},
14643
+ config: {},
12773
14644
  onsuccess: {},
12774
14645
  publicCertificate: {},
12775
14646
  publicCertificateId: {},
@@ -14106,8 +15977,10 @@ function getStepComponentTag(stepType) {
14106
15977
  CREATE_BUSINESS_ACCOUNT: "alviere-create-business-account",
14107
15978
  CREATE_ACCOUNT: "alviere-create-account",
14108
15979
  ADD_BANK_ACCOUNT: "alviere-add-bank-account",
15980
+ ADD_DOSSIER: "alviere-add-dossier",
14109
15981
  ADD_PAYMENT_INSTRUMENT: "alviere-add-payment-instrument",
14110
- CHECKOUT_CONFIRM: "alviere-checkout-confirm"
15982
+ CHECKOUT_CONFIRM: "alviere-checkout-confirm",
15983
+ START_ONBOARDING: "alviere-start-onboarding"
14111
15984
  };
14112
15985
  return tagMap[stepType] || null;
14113
15986
  }
@@ -14120,7 +15993,9 @@ function buildStepProps(stepType, config) {
14120
15993
  debug,
14121
15994
  amount,
14122
15995
  stepConfig,
14123
- previousStepResult
15996
+ previousStepResult,
15997
+ profile,
15998
+ profileRecipe
14124
15999
  } = config;
14125
16000
  const baseProps = {
14126
16001
  jwt,
@@ -14130,7 +16005,9 @@ function buildStepProps(stepType, config) {
14130
16005
  isInFlow: true,
14131
16006
  debug,
14132
16007
  amount,
14133
- config: stepConfig
16008
+ config: stepConfig,
16009
+ profile,
16010
+ profileRecipe
14134
16011
  // Note: AlviereCore is automatically available via the flow store
14135
16012
  // Components access it through base-form-mixin which checks the store first
14136
16013
  };
@@ -14148,10 +16025,19 @@ function buildStepProps(stepType, config) {
14148
16025
  requireRoutingAndAccountConfirmation: true
14149
16026
  };
14150
16027
  }
16028
+ case "ADD_DOSSIER": {
16029
+ const accountUuid = (previousStepResult == null ? void 0 : previousStepResult.account_uuid) || "";
16030
+ return {
16031
+ ...baseProps,
16032
+ accountUuid,
16033
+ stepConfig
16034
+ };
16035
+ }
14151
16036
  case "CREATE_CONSUMER_ACCOUNT":
14152
16037
  case "CREATE_BUSINESS_ACCOUNT":
14153
16038
  case "CREATE_ACCOUNT":
14154
16039
  case "CHECKOUT_CONFIRM":
16040
+ case "START_ONBOARDING":
14155
16041
  default:
14156
16042
  return baseProps;
14157
16043
  }
@@ -14218,7 +16104,7 @@ var root_5 = /* @__PURE__ */ from_html(`<div class="alviere-multi-step-flow__ste
14218
16104
  var root_12 = /* @__PURE__ */ from_html(`<div class="error-message svelte-qf1k5k"> </div>`);
14219
16105
  var root_13 = /* @__PURE__ */ from_html(`<div class="error-message svelte-qf1k5k">No step type specified</div>`);
14220
16106
  var root_9 = /* @__PURE__ */ from_html(`<div class="alviere-multi-step-flow__step-content svelte-qf1k5k"><div class="alviere-multi-step-flow__step-content__header svelte-qf1k5k"><h3 class="svelte-qf1k5k"> </h3></div> <div class="alviere-multi-step-flow__step-content__component"><!></div></div>`);
14221
- var root_14 = /* @__PURE__ */ from_html(`<div class="alviere-multi-step-flow__flow-complete svelte-qf1k5k"><div class="alviere-multi-step-flow__flow-complete__header svelte-qf1k5k"><div class="alviere-multi-step-flow__flow-complete__header__icon svelte-qf1k5k"><!></div></div> <div class="alviere-multi-step-flow__flow-complete__content svelte-qf1k5k"><p>Payment in process.</p></div></div>`);
16107
+ var root_14 = /* @__PURE__ */ from_html(`<div class="alviere-multi-step-flow__flow-complete svelte-qf1k5k"><div class="alviere-multi-step-flow__flow-complete__header svelte-qf1k5k"><div class="alviere-multi-step-flow__flow-complete__header__icon svelte-qf1k5k"><!></div></div> <div class="alviere-multi-step-flow__flow-complete__content svelte-qf1k5k"><p> </p></div></div>`);
14222
16108
  var root_16 = /* @__PURE__ */ from_html(`<p class="flow-error-code svelte-qf1k5k"> </p>`);
14223
16109
  var root_17 = /* @__PURE__ */ from_html(`<p class="flow-error-description svelte-qf1k5k"> </p>`);
14224
16110
  var root_15 = /* @__PURE__ */ from_html(`<div class="alviere-multi-step-flow__flow-error svelte-qf1k5k"><div class="alviere-multi-step-flow__flow-error__header svelte-qf1k5k"><div class="alviere-multi-step-flow__flow-error__header__icon svelte-qf1k5k"><!></div></div> <div class="alviere-multi-step-flow__flow-error__content svelte-qf1k5k"><h3 class="svelte-qf1k5k">Unable to Continue</h3> <p class="flow-error-message svelte-qf1k5k"> </p> <!> <!></div></div>`);
@@ -14258,6 +16144,7 @@ function MultiStepFlow($$anchor, $$props) {
14258
16144
  push($$props, true);
14259
16145
  append_styles$1($$anchor, $$css);
14260
16146
  const $flowCoreStore = () => store_get(flowCoreStore, "$flowCoreStore", $$stores);
16147
+ const $flowRecipeStore = () => store_get(flowRecipeStore, "$flowRecipeStore", $$stores);
14261
16148
  const [$$stores, $$cleanup] = setup_stores();
14262
16149
  var _a2;
14263
16150
  var _b;
@@ -14293,7 +16180,31 @@ function MultiStepFlow($$anchor, $$props) {
14293
16180
  onsteperror: onsteperror(),
14294
16181
  onreset: onreset()
14295
16182
  });
16183
+ function extractProfileFromConfig(flowConfig) {
16184
+ var _a3, _b2, _c, _d;
16185
+ if (!((_a3 = flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.steps) === null || _a3 === void 0 ? void 0 : _a3.length)) return flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.profile;
16186
+ for (const step of flowConfig.steps) {
16187
+ const candidate = ((_b2 = step === null || step === void 0 ? void 0 : step.config) === null || _b2 === void 0 ? void 0 : _b2.profile) || ((_d = (_c = step === null || step === void 0 ? void 0 : step.config) === null || _c === void 0 ? void 0 : _c.formData) === null || _d === void 0 ? void 0 : _d.profile) || (step === null || step === void 0 ? void 0 : step.profile);
16188
+ if (candidate && typeof candidate === "string") {
16189
+ return candidate;
16190
+ }
16191
+ }
16192
+ return flowConfig === null || flowConfig === void 0 ? void 0 : flowConfig.profile;
16193
+ }
14296
16194
  let currentStep = /* @__PURE__ */ user_derived(() => flowManager.getCurrentStep());
16195
+ let effectiveProfile = /* @__PURE__ */ state("");
16196
+ let profileRecipe = /* @__PURE__ */ user_derived(() => getRecipe(get$1(effectiveProfile)));
16197
+ user_effect(() => {
16198
+ const profile = extractProfileFromConfig(config());
16199
+ if (profile !== get$1(effectiveProfile)) {
16200
+ debug() && uiLogger.info("🔍 Derived profile from config:", profile);
16201
+ set(effectiveProfile, profile || "", true);
16202
+ uiLogger.info("🍽️ Profile recipe updated:", get$1(profileRecipe));
16203
+ }
16204
+ });
16205
+ user_effect(() => {
16206
+ flowRecipeStore.setRecipe(get$1(effectiveProfile), get$1(profileRecipe) || null);
16207
+ });
14297
16208
  user_effect(() => {
14298
16209
  flowManager.getCurrentStepIndex();
14299
16210
  jwtManager.updateStepSnapshot();
@@ -14306,6 +16217,8 @@ function MultiStepFlow($$anchor, $$props) {
14306
16217
  debug: debug(),
14307
16218
  amount: amount(),
14308
16219
  stepConfig: ((_b = (_a2 = config().steps) === null || _a2 === void 0 ? void 0 : _a2[flowManager.getCurrentStepIndex()]) === null || _b === void 0 ? void 0 : _b.config) || {},
16220
+ profile: get$1(effectiveProfile),
16221
+ profileRecipe: get$1(profileRecipe),
14309
16222
  previousStepResult: flowManager.getStepResult(flowManager.getCurrentStepIndex() - 1)
14310
16223
  // Note: alviereCore is not needed - components get it from the store via base-form-mixin
14311
16224
  }) : {});
@@ -14338,6 +16251,11 @@ function MultiStepFlow($$anchor, $$props) {
14338
16251
  amount(parsedConfig.amount);
14339
16252
  }
14340
16253
  config(Object.assign(Object.assign(Object.assign({}, config()), parsedConfig), { steps: parsedConfig.steps || config().steps || [] }));
16254
+ const parsedProfile = extractProfileFromConfig(config());
16255
+ if (parsedProfile) {
16256
+ set(effectiveProfile, parsedProfile, true);
16257
+ set(profileRecipe, getRecipe(parsedProfile));
16258
+ }
14341
16259
  debug() && uiLogger.info("✅ Config loaded from attribute:", parsedConfig);
14342
16260
  } catch (error2) {
14343
16261
  debug() && uiLogger.error("❌ Failed to parse config:", error2);
@@ -14425,6 +16343,7 @@ function MultiStepFlow($$anchor, $$props) {
14425
16343
  return () => {
14426
16344
  debug() && uiLogger.info("🧹 Cleaning up flow - resetting AlviereCore store");
14427
16345
  resetFlowCore();
16346
+ resetFlowRecipe();
14428
16347
  };
14429
16348
  });
14430
16349
  async function handleStepSuccess(event2) {
@@ -14759,8 +16678,16 @@ function MultiStepFlow($$anchor, $$props) {
14759
16678
  html(node_12, () => checkIcon.outerHTML);
14760
16679
  reset(div_11);
14761
16680
  reset(div_10);
14762
- next(2);
16681
+ var div_12 = sibling(div_10, 2);
16682
+ var p_1 = child(div_12);
16683
+ var text_5 = child(p_1, true);
16684
+ reset(p_1);
16685
+ reset(div_12);
14763
16686
  reset(div_9);
16687
+ template_effect(() => {
16688
+ var _a3, _b2;
16689
+ return set_text(text_5, ((_b2 = (_a3 = $flowRecipeStore().recipe) == null ? void 0 : _a3.config) == null ? void 0 : _b2.labels.finalText) || "Payment in process.");
16690
+ });
14764
16691
  transition(1, div_9, () => fade, () => ({ duration: 300, delay: 300 }));
14765
16692
  transition(2, div_9, () => fade, () => ({ duration: 200 }));
14766
16693
  append($$anchor2, div_9);
@@ -14772,25 +16699,25 @@ function MultiStepFlow($$anchor, $$props) {
14772
16699
  var node_13 = sibling(node_11, 2);
14773
16700
  {
14774
16701
  var consequent_13 = ($$anchor2) => {
14775
- var div_12 = root_15();
14776
- var div_13 = child(div_12);
16702
+ var div_13 = root_15();
14777
16703
  var div_14 = child(div_13);
14778
- var node_14 = child(div_14);
16704
+ var div_15 = child(div_14);
16705
+ var node_14 = child(div_15);
14779
16706
  html(node_14, () => errorIcon.outerHTML);
16707
+ reset(div_15);
14780
16708
  reset(div_14);
14781
- reset(div_13);
14782
- var div_15 = sibling(div_13, 2);
14783
- var p_1 = sibling(child(div_15), 2);
14784
- var text_5 = child(p_1, true);
14785
- reset(p_1);
14786
- var node_15 = sibling(p_1, 2);
16709
+ var div_16 = sibling(div_14, 2);
16710
+ var p_2 = sibling(child(div_16), 2);
16711
+ var text_6 = child(p_2, true);
16712
+ reset(p_2);
16713
+ var node_15 = sibling(p_2, 2);
14787
16714
  {
14788
16715
  var consequent_11 = ($$anchor3) => {
14789
- var p_2 = root_16();
14790
- var text_6 = child(p_2);
14791
- reset(p_2);
14792
- template_effect(() => set_text(text_6, `Error Code: ${get$1(flowError).errorCode ?? ""}`));
14793
- append($$anchor3, p_2);
16716
+ var p_3 = root_16();
16717
+ var text_7 = child(p_3);
16718
+ reset(p_3);
16719
+ template_effect(() => set_text(text_7, `Error Code: ${get$1(flowError).errorCode ?? ""}`));
16720
+ append($$anchor3, p_3);
14794
16721
  };
14795
16722
  if_block(node_15, ($$render) => {
14796
16723
  if (debug() && get$1(flowError).errorCode) $$render(consequent_11);
@@ -14799,22 +16726,22 @@ function MultiStepFlow($$anchor, $$props) {
14799
16726
  var node_16 = sibling(node_15, 2);
14800
16727
  {
14801
16728
  var consequent_12 = ($$anchor3) => {
14802
- var p_3 = root_17();
14803
- var text_7 = child(p_3, true);
14804
- reset(p_3);
14805
- template_effect(() => set_text(text_7, get$1(flowError).description));
14806
- append($$anchor3, p_3);
16729
+ var p_4 = root_17();
16730
+ var text_8 = child(p_4, true);
16731
+ reset(p_4);
16732
+ template_effect(() => set_text(text_8, get$1(flowError).description));
16733
+ append($$anchor3, p_4);
14807
16734
  };
14808
16735
  if_block(node_16, ($$render) => {
14809
16736
  if (debug() && get$1(flowError).description) $$render(consequent_12);
14810
16737
  });
14811
16738
  }
14812
- reset(div_15);
14813
- reset(div_12);
14814
- template_effect(() => set_text(text_5, get$1(flowError).message));
14815
- transition(1, div_12, () => fade, () => ({ duration: 300, delay: 100 }));
14816
- transition(2, div_12, () => fade, () => ({ duration: 200 }));
14817
- append($$anchor2, div_12);
16739
+ reset(div_16);
16740
+ reset(div_13);
16741
+ template_effect(() => set_text(text_6, get$1(flowError).message));
16742
+ transition(1, div_13, () => fade, () => ({ duration: 300, delay: 100 }));
16743
+ transition(2, div_13, () => fade, () => ({ duration: 200 }));
16744
+ append($$anchor2, div_13);
14818
16745
  };
14819
16746
  if_block(node_13, ($$render) => {
14820
16747
  if (get$1(flowError)) $$render(consequent_13);
@@ -14823,14 +16750,14 @@ function MultiStepFlow($$anchor, $$props) {
14823
16750
  var node_17 = sibling(node_13, 2);
14824
16751
  {
14825
16752
  var consequent_14 = ($$anchor2) => {
14826
- var div_16 = root_18();
14827
- var button_1 = child(div_16);
16753
+ var div_17 = root_18();
16754
+ var button_1 = child(div_17);
14828
16755
  button_1.__click = previousStep;
14829
16756
  var button_2 = sibling(button_1, 2);
14830
16757
  button_2.__click = nextStep;
14831
16758
  var button_3 = sibling(button_2, 2);
14832
16759
  button_3.__click = resetFlow;
14833
- reset(div_16);
16760
+ reset(div_17);
14834
16761
  template_effect(
14835
16762
  ($0) => {
14836
16763
  button_1.disabled = !get$1(canGoPrevious);
@@ -14840,7 +16767,7 @@ function MultiStepFlow($$anchor, $$props) {
14840
16767
  () => !get$1(canGoNext) || flowManager.stepStatuses[flowManager.getCurrentStepIndex()] !== "COMPLETE"
14841
16768
  ]
14842
16769
  );
14843
- append($$anchor2, div_16);
16770
+ append($$anchor2, div_17);
14844
16771
  };
14845
16772
  if_block(node_17, ($$render) => {
14846
16773
  if (config().showNavigation !== false && !get$1(flowError) && !flowManager.isComplete()) $$render(consequent_14);
@@ -14849,11 +16776,11 @@ function MultiStepFlow($$anchor, $$props) {
14849
16776
  var node_18 = sibling(node_17, 2);
14850
16777
  {
14851
16778
  var consequent_15 = ($$anchor2) => {
14852
- var div_17 = root_19();
14853
- var text_8 = child(div_17, true);
14854
- reset(div_17);
14855
- template_effect(() => set_text(text_8, get$1(error)));
14856
- append($$anchor2, div_17);
16779
+ var div_18 = root_19();
16780
+ var text_9 = child(div_18, true);
16781
+ reset(div_18);
16782
+ template_effect(() => set_text(text_9, get$1(error)));
16783
+ append($$anchor2, div_18);
14857
16784
  };
14858
16785
  if_block(node_18, ($$render) => {
14859
16786
  if (get$1(error)) $$render(consequent_15);