@wix/form-elements 1.91.0 → 1.93.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.
Files changed (110) hide show
  1. package/dist/component/{appointment-rac-CDZ0Gdin.js → appointment-rac-bw0pvoxP.js} +4 -4
  2. package/dist/component/{bookings-address-rac-pmQyMw-1.js → bookings-address-rac-DECq7eWR.js} +1 -1
  3. package/dist/component/{bookings-email-rac-CzDEYpBV.js → bookings-email-rac-DTLjh6Zw.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-qg7T37FZ.js → bookings-first-name-rac-DObRe-Gq.js} +1 -1
  5. package/dist/component/{bookings-header-rac-Dmwmt_Cp.js → bookings-header-rac-DjpmYRJG.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-CXTtlnYI.js → bookings-last-name-rac-Ds3o0ABM.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DTs9s6hU.js → bookings-login-bar-rac-DPUL2jWj.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-C7AEVZA-.js → bookings-phone-rac-DIIHPxEP.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CBGVMqOn.js → bookings-rich-text-rac-BrcQO9xx.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BggtF6cZ.js → checkbox-field-rac-CD1MP1LT.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-O2ZsF7An.js → checkbox-group-field-headless-C0V6zq0u.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-OC3W4Taz.js → checkbox-group-field-rac-B-MYpz53.js} +3 -3
  13. package/dist/component/{checkbox-group-rac-CZuEXWgx.js → checkbox-group-rac-BejQjiO2.js} +1 -1
  14. package/dist/component/{checkbox-rac-W-a8Z0ht.js → checkbox-rac-B0YgCj29.js} +1 -1
  15. package/dist/component/{contacts-address-rac-DtG9NDgw.js → contacts-address-rac-B1QNl3Lb.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DS7uNjKO.js → contacts-birthdate-rac-Cp-gh3P-.js} +1 -1
  17. package/dist/component/{contacts-company-rac-CQX5azvs.js → contacts-company-rac-CSCU7JGm.js} +1 -1
  18. package/dist/component/{contacts-email-rac-QgYLfH6e.js → contacts-email-rac-B1Oov6-3.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-BrlHl2Uj.js → contacts-first-name-rac-rsHIOcjr.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-ieDtRIbl.js → contacts-last-name-rac-Csgq53Wm.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-LTjC8k7e.js → contacts-phone-rac-r9SwjDZ4.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CxbAUzIc.js → contacts-position-rac-D7VcCM7v.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-H0dNjYV8.js → contacts-subscribe-rac-8Nu9ncZW.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-uhTEMEwl.js → contacts-tax-id-rac-CL_JSl_W.js} +1 -1
  25. package/dist/component/{date-availability-eRjWauCz.js → date-availability-DLOKY9C4.js} +1 -1
  26. package/dist/component/date-input-field-rac-D23Al-Mr.js +292 -0
  27. package/dist/component/{date-input-rac-BBllT9pM.js → date-input-rac-B6zgkw-L.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-CSXVWmGL.js → date-picker-field-rac-BqdzPPzK.js} +4 -4
  29. package/dist/component/{date-picker-rac-CwEFOSSe.js → date-picker-rac-C7g6aceb.js} +1 -1
  30. package/dist/component/date-time-input-field-rac-BENzf6gc.js +428 -0
  31. package/dist/component/{date-time-input-rac-DsGlyO8x.js → date-time-input-rac-CVpK3mgw.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-Bs9tVVXo.js → dext-checkbox-group-rac-CbEFDD3H.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-FEjZejl7.js → dext-checkbox-rac-BdtZvn6I.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-Mdbuq1mu.js → dext-date-picker-rac-BAhFvUEx.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-B4dRBObU.js → dext-date-time-input-rac-iXMKMwQY.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-QVngfb7K.js → dext-dropdown-rac-D-NPziZS.js} +1 -1
  37. package/dist/component/{dext-email-rac-cURI3VuR.js → dext-email-rac-DYSwyB80.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-CovkZ8Ey.js → dext-number-input-rac-DXx8hgFg.js} +1 -1
  39. package/dist/component/{dext-phone-rac-C8GjKZnH.js → dext-phone-rac-BtuLROzm.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-BlrJmIH3.js → dext-radio-group-rac-MdKNiJ2i.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-jIJisfdp.js → dext-rating-input-rac-d998xond.js} +1 -1
  42. package/dist/component/{dext-tags-rac-BXjCLX6y.js → dext-tags-rac-DnSpOM9T.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-CD_x4meg.js → dext-text-area-rac-KqjeDDWe.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-Du51Nj6q.js → dext-text-input-rac-CtCnClfX.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-_W6CW5hp.js → dext-url-input-rac-DSJQcLLr.js} +1 -1
  46. package/dist/component/{donation-rac-9njvq8HE.js → donation-rac-B_KGkBgo.js} +5 -5
  47. package/dist/component/dropdown-field-headless-BUilB8wZ.js +89 -0
  48. package/dist/component/{dropdown-field-rac-BYRb3VEI.js → dropdown-field-rac-COupYC1a.js} +2 -2
  49. package/dist/component/{dropdown-rac-BBrPWiSg.js → dropdown-rac-Dj0UZrE0.js} +1 -1
  50. package/dist/component/{ecom-address-rac-CDJ46mdt.js → ecom-address-rac-C0xnn86e.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-DItvmxzX.js → ecom-subscription-checkbox-rac-D-ekxwUE.js} +2 -2
  52. package/dist/component/{email-input-field-rac-aeRdkPOh.js → email-input-field-rac-DVj1qz_R.js} +3 -3
  53. package/dist/component/{events-repeater-rac-CzVycetd.js → events-repeater-rac-U0aq9Z4Q.js} +3 -3
  54. package/dist/component/{events-rsvp-rac-BhLYlH1V.js → events-rsvp-rac-C7J58_5q.js} +2 -2
  55. package/dist/component/{field-error-headless-T9JfqiMS.js → field-error-headless-2nYJ2792.js} +1 -1
  56. package/dist/component/{field-label-headless-bDWQszAb.js → field-label-headless-D97ACnmc.js} +1 -1
  57. package/dist/component/{file-upload-rac-Dk-delp2.js → file-upload-rac-BR7QpuPW.js} +3 -3
  58. package/dist/component/{fixed-payment-rac-Bj8RMj1w.js → fixed-payment-rac-COl18wW1.js} +3 -3
  59. package/dist/component/{form-C7cB75mm.js → form-DKKTSAj1.js} +69 -69
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/{header-field-rac-RzI5owwx.js → header-field-rac-B6DyMG3U.js} +2 -2
  63. package/dist/component/{header-rac-DQgyaMDA.js → header-rac-x4H2qMky.js} +1 -1
  64. package/dist/component/{image-choice-rac-DOs1eI0_.js → image-choice-rac-BVgmKTKk.js} +4 -4
  65. package/dist/component/{index-DlPclNOa.js → index-C47UMGhd.js} +4 -4
  66. package/dist/component/{index-C90Q2rfK.js → index-DnpqBcg5.js} +2 -2
  67. package/dist/component/{isObjectLike-DLz0WtlZ.js → isObjectLike-BrrFBP4f.js} +1 -1
  68. package/dist/component/multiline-address-field-rac-B6ka-2Wy.js +1630 -0
  69. package/dist/component/{multiline-address-rac-7sUhPDFM.js → multiline-address-rac-Bh58qUEe.js} +1 -1
  70. package/dist/component/{number-input-field-rac-DMHSUbYN.js → number-input-field-rac-pAmxvk3A.js} +4 -4
  71. package/dist/component/{number-input-rac-CF5271QD.js → number-input-rac-mKA2njIU.js} +1 -1
  72. package/dist/component/{password-rac-CxQRcSEb.js → password-rac-BbD7PQXO.js} +4 -4
  73. package/dist/component/{payment-input-rac-C20HS9QN.js → payment-input-rac-UdkwC1ek.js} +4 -4
  74. package/dist/component/phone-input-field-rac-BVLVVDTq.js +487 -0
  75. package/dist/component/{phone-rac-pGbG3Cu0.js → phone-rac-LixcB9WV.js} +1 -1
  76. package/dist/component/{product-list-rac-CxyJaRQ6.js → product-list-rac-B_dL1Ov-.js} +4 -4
  77. package/dist/component/{quiz-radio-group-rac-CCddKnuf.js → quiz-radio-group-rac-Bj5XfqNf.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-uyJAJMZn.js → radio-button-module-classes-y_PtsZPP.js} +3 -3
  79. package/dist/component/{radio-group-field-rac-VwR2FlNg.js → radio-group-field-rac-C8OElNAQ.js} +3 -3
  80. package/dist/component/{radio-group-rac-D8pzwSCS.js → radio-group-rac-BqJFboHE.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-C4ohOgX0.js → rating-input-field-rac-C9_ITvEh.js} +4 -4
  82. package/dist/component/{rating-input-rac-NpCggSGK.js → rating-input-rac-CvTpEUoU.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-B9HHqJL4.js → rich-content-rac.module-D4pEN-TY.js} +1 -1
  84. package/dist/component/{rich-text-field-rac-C3qKHitl.js → rich-text-field-rac-B8cqCmaf.js} +2 -2
  85. package/dist/component/{rich-text-rac-BJkS9CGE.js → rich-text-rac-C1o-tfXG.js} +1 -1
  86. package/dist/component/{service-dropdown-rac-BTdBTfeg.js → service-dropdown-rac-BOXqB2aq.js} +4 -4
  87. package/dist/component/{services-multi-choice-rac-Nl74A8jo.js → services-multi-choice-rac-Dk4rz-fw.js} +5 -5
  88. package/dist/component/{signature-rac-BAVXA-5Q.js → signature-rac-h9GWVdez.js} +3 -3
  89. package/dist/component/{submit-button-rac-DlmeZjy_.js → submit-button-rac-qNaTyCxd.js} +1 -1
  90. package/dist/component/{tags-field-rac-BFBSf5mt.js → tags-field-rac-NMRn0YnW.js} +5 -5
  91. package/dist/component/{tags-rac-S_GJQpwJ.js → tags-rac-DGx4KxEn.js} +1 -1
  92. package/dist/component/{text-area-field-rac-D1qLXh4K.js → text-area-field-rac-C7u0D4l3.js} +4 -4
  93. package/dist/component/{text-area-rac-DejqDYR0.js → text-area-rac-Yo-RIyLm.js} +1 -1
  94. package/dist/component/{text-input-field-rac-DwPTWyiR.js → text-input-field-rac-CvU-1clq.js} +2 -2
  95. package/dist/component/{text-input-headless-BUljrxVJ.js → text-input-headless-DLRwVmwf.js} +3 -3
  96. package/dist/component/{text-input-rac-CCWkAOVG.js → text-input-rac-CWh5xjZA.js} +1 -1
  97. package/dist/component/{time-input-rac-b09-o8Uw.js → time-input-rac-BZlso9qK.js} +4 -4
  98. package/dist/component/{url-input-field-rac-DYGAFldc.js → url-input-field-rac-Bax0TB4Q.js} +4 -4
  99. package/dist/component/{url-input-rac-CsAWnWt5.js → url-input-rac-Bw2nfybR.js} +1 -1
  100. package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +57 -0
  101. package/dist/component/{use-element-state-class-name-DZhlOoWK.js → use-element-state-class-name-C0zLrsDR.js} +1 -1
  102. package/dist/component/{use-service-options-base-JNSCsxxz.js → use-service-options-base-Bkj6BSQL.js} +1 -1
  103. package/dist/component/{use-text-input-class-name-CgCYHOMw.js → use-text-input-class-name-Biu89Ma7.js} +2 -2
  104. package/package.json +2 -2
  105. package/dist/component/date-input-field-rac-BKb019gB.js +0 -288
  106. package/dist/component/date-time-input-field-rac-C4yIIebr.js +0 -424
  107. package/dist/component/dropdown-field-headless-BBc5oicg.js +0 -101
  108. package/dist/component/multiline-address-field-rac-DHYRZxtJ.js +0 -1618
  109. package/dist/component/phone-input-field-rac-BDF_4RJE.js +0 -474
  110. package/dist/component/use-dropdown-option-class-name-CruN_y12.js +0 -28
@@ -1,1618 +0,0 @@
1
- import { RicosViewer as X } from "@wix/ricos/viewer";
2
- import L from "classnames";
3
- import n, { useMemo as w, createContext as Ue, useContext as Fe, useState as be, useRef as B, useCallback as D, useEffect as We } from "react";
4
- import { UNSAFE_PortalProvider as _t } from "react-aria";
5
- import { af as bt, c as ft, aa as Pt, ac as yt, H as Tt, J as qt, v as Mt, G as V, F as K, au as Pe, a3 as st, ak as P, ah as T, am as ae, ag as Ct, T as wt, C as Oe, a1 as xt, a5 as Bt, ar as kt, al as $t, aq as Ut, a8 as Wt, Z as Vt, a7 as Kt, an as Yt, j as Ht } from "./form-C7cB75mm.js";
6
- import { f as E, a as h } from "./find-child-C60k4CxG.js";
7
- import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
8
- import { TextField as fe, Input as le, ComboBoxStateContext as It, ComboBox as Se, Popover as De, ListBox as Re, ListBoxItem as Ae, Group as Lt, Button as Nt } from "react-aria-components";
9
- import { D as ie, E as ce } from "./field-error-headless-T9JfqiMS.js";
10
- import { L as de } from "./field-label-headless-bDWQszAb.js";
11
- import { e as Gt, c as Xt, a as zt, r as gt } from "./isObjectLike-DLz0WtlZ.js";
12
- import { u as Qt } from "./use-invoke-callback-UH73A_J3.js";
13
- import { C as at } from "./chevron-down-icon-CcpVm6B-.js";
14
- import { E as z } from "./error-icon-hZxQ6DEy.js";
15
- import { H as Te } from "./custom-focus-class-_483Pkwp.js";
16
- import { s as C } from "./field-rac.module-BUvPquav.js";
17
- import { B as Q, R as Z, z as lt, D as Ne, q as ee, i as te } from "./form-element-classes-CLZXu-91.js";
18
- import { g as Zt } from "./use-dropdown-option-class-name-CruN_y12.js";
19
- import { u as en } from "./use-text-input-class-name-CgCYHOMw.js";
20
- const tn = (e, r, o) => {
21
- var a, l, i, s;
22
- const t = (a = e.steps) == null ? void 0 : a.map((d) => {
23
- var m, u, y, I, b, p;
24
- return {
25
- ...d,
26
- layout: {
27
- ...d.layout,
28
- large: {
29
- ...(m = d.layout) == null ? void 0 : m.large,
30
- items: ((I = (y = (u = d.layout) == null ? void 0 : u.large) == null ? void 0 : y.items) == null ? void 0 : I.map((f) => ({
31
- ...f,
32
- row: o.row <= f.row ? (f.row || 0) + 1 : f.row
33
- }))) || ((p = (b = d.layout) == null ? void 0 : b.large) == null ? void 0 : p.items)
34
- }
35
- }
36
- };
37
- });
38
- return (s = (i = (l = t == null ? void 0 : t[0].layout) == null ? void 0 : l.large) == null ? void 0 : i.items) == null || s.unshift(o), {
39
- ...e,
40
- fields: [
41
- r,
42
- ...e.fields || []
43
- ],
44
- steps: t || e.steps
45
- };
46
- };
47
- var ye = /* @__PURE__ */ (function(e) {
48
- return e.COUNTRY = "country", e.SUBDIVISION = "subdivision", e.CITY = "city", e.ADDRESS_LINE = "addressLine", e.ADDRESS_LINE_2 = "addressLine2", e.POSTAL_CODE = "postalCode", e.STREET_NAME = "streetName", e.STREET_NUMBER = "streetNumber", e.APARTMENT = "apartment", e;
49
- })({});
50
- function nn(e, r, o = !1) {
51
- const { country: t, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
52
- return r ? (t && (u.country = t), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (t && (u.country = t), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
53
- }
54
- const Ot = /* @__PURE__ */ Ue({
55
- onAddressSelect: () => {
56
- }
57
- }), rn = ({ children: e, onAddressSelect: r, autocompleteEnabled: o }) => {
58
- const t = w(() => ({
59
- onAddressSelect: r,
60
- autocompleteEnabled: o
61
- }), [
62
- r,
63
- o
64
- ]);
65
- return /* @__PURE__ */ n.createElement(Ot.Provider, {
66
- value: t
67
- }, e);
68
- };
69
- function Ce() {
70
- return Fe(Ot);
71
- }
72
- const vt = /* @__PURE__ */ Ue(void 0), on = ({ children: e, countryCode: r }) => {
73
- const o = w(() => ({
74
- countryCode: r
75
- }), [
76
- r
77
- ]);
78
- return /* @__PURE__ */ n.createElement(vt.Provider, {
79
- value: o
80
- }, e);
81
- };
82
- function Ie() {
83
- const e = Fe(vt);
84
- return e == null ? void 0 : e.countryCode;
85
- }
86
- function qe(e) {
87
- return e != null;
88
- }
89
- function sn(e, r, o) {
90
- return !r || !o ? e : {
91
- ...e,
92
- fields: (e.fields ?? []).map((t) => {
93
- const { show: a, ...l } = r[t.target] || {}, { required: i } = o[t.target] || {};
94
- return {
95
- ...t,
96
- view: {
97
- ...t.view,
98
- ...l
99
- },
100
- ...qe(a) && {
101
- hidden: !a
102
- },
103
- ...qe(i) && qe(t.validation) && {
104
- validation: {
105
- ...t.validation,
106
- required: i
107
- }
108
- }
109
- };
110
- })
111
- };
112
- }
113
- const an = (e, r) => e.map((o) => ({
114
- ...o,
115
- id: ("target" in o ? r[o.target] : void 0) ?? o.id
116
- })), ht = 12, ln = (e) => {
117
- const r = e.filter((t) => !t.properties.hidden), o = e.filter((t) => t.properties.hidden);
118
- return {
119
- visibleFields: r,
120
- hiddenFields: o
121
- };
122
- }, cn = (e) => {
123
- const r = {};
124
- return e.forEach((o) => {
125
- const t = o.layout.row;
126
- r[t] || (r[t] = []), r[t].push(o);
127
- }), r;
128
- }, dn = (e) => {
129
- const r = {};
130
- return Object.keys(e).forEach((o) => {
131
- const t = parseInt(o, 10), a = e[t];
132
- a.reduce((i, s) => i + s.layout.width, 0) !== ht && (r[t] = a);
133
- }), r;
134
- }, un = (e, r) => e.map((o) => {
135
- const t = o.layout.row;
136
- if (r[t] && !o.properties.hidden) {
137
- const a = r[t], l = a.length, i = ht / l, s = a.findIndex((m) => m.id === o.id), d = i * s;
138
- return {
139
- ...o,
140
- layout: {
141
- ...o.layout,
142
- width: i,
143
- column: d
144
- }
145
- };
146
- }
147
- return o;
148
- }), mn = (e, r, o) => {
149
- const t = Math.max(...r.map((a) => a.layout.row), -1);
150
- return e.map((a) => {
151
- if (a.properties.hidden) {
152
- const l = o.findIndex((i) => i.id === a.id);
153
- return {
154
- ...a,
155
- layout: {
156
- ...a.layout,
157
- row: t + 1 + l
158
- }
159
- };
160
- }
161
- return a;
162
- });
163
- }, pn = (e) => {
164
- const { visibleFields: r, hiddenFields: o } = ln(e.fields), t = cn(r), a = dn(t), l = un(e.fields, a), i = mn(l, r, o);
165
- return {
166
- ...e,
167
- fields: i
168
- };
169
- }, En = () => ({
170
- country: V(),
171
- subdivision: V(),
172
- city: V(),
173
- address_line: V(),
174
- address_line_2: V(),
175
- postal_code: V(),
176
- street_name: V(),
177
- street_number: V(),
178
- apartment: V()
179
- }), bn = ({ id: e, target: r, fieldType: o, form: t, country: a, fieldSettings: l, validation: i, required: s }) => {
180
- const [d] = be(En), { isExperimentEnabled: m } = bt(), u = m(ft.USE_FIELDS_V2), { getCountryAddressForm: y } = Pt(), { isMobile: I, breakpoint: b } = yt(), p = y(a), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = w(() => {
181
- var O;
182
- return Tt(s, (O = i == null ? void 0 : i.predefined) == null ? void 0 : O.multilineAddressOptions);
183
- }, [
184
- i,
185
- s
186
- ]), F = w(() => qt(), []);
187
- return {
188
- form: w(() => {
189
- var _, g;
190
- if (!f || !p)
191
- return t && {
192
- ...t,
193
- fields: an(t.fields, d)
194
- };
195
- const O = Mt({
196
- useFieldsV2: u,
197
- path: r,
198
- parentId: e,
199
- includeHiddenFields: !0,
200
- isMobile: I,
201
- breakpoint: b,
202
- form: sn(tn(p, N, F), l, (g = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : g.fields)
203
- });
204
- if (!O.fields.some((v) => v.properties.hidden))
205
- return O;
206
- const q = pn(O);
207
- return {
208
- ...q,
209
- fields: q.fields.filter((v) => !v.properties.hidden)
210
- };
211
- }, [
212
- p,
213
- t,
214
- d,
215
- l,
216
- i,
217
- r,
218
- N,
219
- F,
220
- f,
221
- u,
222
- e,
223
- I,
224
- b
225
- ]),
226
- isMultilineAddressField: f
227
- };
228
- }, Ft = /* @__PURE__ */ Ue(void 0), fn = ({ children: e, fields: r }) => {
229
- const o = w(() => ({
230
- fields: r
231
- }), [
232
- r
233
- ]);
234
- return /* @__PURE__ */ n.createElement(Ft.Provider, {
235
- value: o
236
- }, e);
237
- };
238
- function ue(e) {
239
- const r = Fe(Ft);
240
- if (!r)
241
- throw new Error("useAddressFields must be used within AddressFieldsProvider");
242
- return r.fields[e];
243
- }
244
- function Ee(e) {
245
- const { t: r } = Pe(), o = Ie(), t = o && st.getCountryByShortKey(o), l = (t ? t.addressPartDisplayNames : st.getDefaultAddressDisplayNames())[e];
246
- return l ? r(l) : "";
247
- }
248
- const ne = ({ children: e }) => {
249
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), I = Ee("addressLine2"), b = E(e, ne.Label), p = E(e, ne.Input), f = E(e, ne.Description), N = E(e, ne.Error);
250
- return /* @__PURE__ */ n.createElement(u, {
251
- fieldId: r,
252
- renderLabel: () => h(b, {
253
- label: I
254
- }),
255
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
256
- "aria-labelledby": y,
257
- value: o ?? "",
258
- onChange: t,
259
- isDisabled: a,
260
- isReadOnly: l,
261
- isRequired: i,
262
- isInvalid: s,
263
- onBlur: d,
264
- onFocus: m
265
- }, p),
266
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
267
- });
268
- }, yn = ({ className: e }) => {
269
- const { id: r, placeholder: o } = P(), { inputId: t, ariaDescribedBy: a } = T(), l = B(null);
270
- return ae(() => {
271
- var i;
272
- (i = l.current) == null || i.focus();
273
- }, r), /* @__PURE__ */ n.createElement(le, {
274
- ref: l,
275
- id: t,
276
- "aria-describedby": a,
277
- className: e,
278
- placeholder: o
279
- });
280
- };
281
- ne.Label = de;
282
- ne.Input = yn;
283
- ne.Description = ie;
284
- ne.Error = ce;
285
- const Ve = ({ enabled: e }) => {
286
- const { actions: r } = Ct(), [o, t] = be(V()), a = D(() => t(V()), []);
287
- return w(() => {
288
- const { predict: l, getPlace: i, searchByPostalCode: s } = r ?? {};
289
- if (!(!e || !l || !i || !s))
290
- return {
291
- predict: (d) => l({
292
- ...d,
293
- sessionToken: o
294
- }),
295
- getPlace: (d) => i({
296
- ...d,
297
- sessionToken: o,
298
- refreshSessionToken: a
299
- }),
300
- searchByPostalCode: (d) => s({
301
- ...d,
302
- sessionToken: o
303
- })
304
- };
305
- }, [
306
- e,
307
- r,
308
- o,
309
- a
310
- ]);
311
- };
312
- var Me, it;
313
- function Cn() {
314
- if (it) return Me;
315
- it = 1;
316
- var e = Gt(), r = function() {
317
- return e.Date.now();
318
- };
319
- return Me = r, Me;
320
- }
321
- var we, ct;
322
- function In() {
323
- if (ct) return we;
324
- ct = 1;
325
- var e = /\s/;
326
- function r(o) {
327
- for (var t = o.length; t-- && e.test(o.charAt(t)); )
328
- ;
329
- return t;
330
- }
331
- return we = r, we;
332
- }
333
- var xe, dt;
334
- function Ln() {
335
- if (dt) return xe;
336
- dt = 1;
337
- var e = In(), r = /^\s+/;
338
- function o(t) {
339
- return t && t.slice(0, e(t) + 1).replace(r, "");
340
- }
341
- return xe = o, xe;
342
- }
343
- var Be, ut;
344
- function Nn() {
345
- if (ut) return Be;
346
- ut = 1;
347
- var e = Xt(), r = zt(), o = "[object Symbol]";
348
- function t(a) {
349
- return typeof a == "symbol" || r(a) && e(a) == o;
350
- }
351
- return Be = t, Be;
352
- }
353
- var ke, mt;
354
- function gn() {
355
- if (mt) return ke;
356
- mt = 1;
357
- var e = Ln(), r = gt(), o = Nn(), t = NaN, a = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, s = parseInt;
358
- function d(m) {
359
- if (typeof m == "number")
360
- return m;
361
- if (o(m))
362
- return t;
363
- if (r(m)) {
364
- var u = typeof m.valueOf == "function" ? m.valueOf() : m;
365
- m = r(u) ? u + "" : u;
366
- }
367
- if (typeof m != "string")
368
- return m === 0 ? m : +m;
369
- m = e(m);
370
- var y = l.test(m);
371
- return y || i.test(m) ? s(m.slice(2), y ? 2 : 8) : a.test(m) ? t : +m;
372
- }
373
- return ke = d, ke;
374
- }
375
- var $e, pt;
376
- function On() {
377
- if (pt) return $e;
378
- pt = 1;
379
- var e = gt(), r = Cn(), o = gn(), t = "Expected a function", a = Math.max, l = Math.min;
380
- function i(s, d, m) {
381
- var u, y, I, b, p, f, N = 0, F = !1, S = !1, O = !0;
382
- if (typeof s != "function")
383
- throw new TypeError(t);
384
- d = o(d) || 0, e(m) && (F = !!m.leading, S = "maxWait" in m, I = S ? a(o(m.maxWait) || 0, d) : I, O = "trailing" in m ? !!m.trailing : O);
385
- function R(A) {
386
- var J = u, pe = y;
387
- return u = y = void 0, N = A, b = s.apply(pe, J), b;
388
- }
389
- function q(A) {
390
- return N = A, p = setTimeout(v, d), F ? R(A) : b;
391
- }
392
- function _(A) {
393
- var J = A - f, pe = A - N, Le = d - J;
394
- return S ? l(Le, I - pe) : Le;
395
- }
396
- function g(A) {
397
- var J = A - f, pe = A - N;
398
- return f === void 0 || J >= d || J < 0 || S && pe >= I;
399
- }
400
- function v() {
401
- var A = r();
402
- if (g(A))
403
- return me(A);
404
- p = setTimeout(v, _(A));
405
- }
406
- function me(A) {
407
- return p = void 0, O && u ? R(A) : (u = y = void 0, b);
408
- }
409
- function x() {
410
- p !== void 0 && clearTimeout(p), N = 0, u = f = y = p = void 0;
411
- }
412
- function M() {
413
- return p === void 0 ? b : me(r());
414
- }
415
- function j() {
416
- var A = r(), J = g(A);
417
- if (u = arguments, y = this, f = A, J) {
418
- if (p === void 0)
419
- return q(f);
420
- if (S)
421
- return clearTimeout(p), p = setTimeout(v, d), R(f);
422
- }
423
- return p === void 0 && (p = setTimeout(v, d)), b;
424
- }
425
- return j.cancel = x, j.flush = M, j;
426
- }
427
- return $e = i, $e;
428
- }
429
- var vn = On();
430
- const hn = /* @__PURE__ */ wt(vn), Fn = (e, r, o = 200) => {
431
- const t = B(e), a = D(hn((...l) => {
432
- t.current(...l);
433
- }, o), [
434
- o
435
- ]);
436
- return We(() => {
437
- t.current = e;
438
- }, [
439
- e,
440
- r
441
- ]), a;
442
- }, Sn = () => {
443
- const e = B(!0);
444
- return We(() => () => {
445
- e.current = !1;
446
- }, []), () => e.current;
447
- }, Et = {
448
- loading: !1,
449
- predictions: []
450
- }, St = ({ atlas: e, onError: r }) => {
451
- const [{ loading: t, predictions: a }, l] = be(Et), i = B(0), s = Sn(), d = D(() => {
452
- i.current++, l(Et);
453
- }, []), m = Fn(async ({ input: u, countryCodes: y }) => {
454
- if (!e || !s())
455
- return;
456
- if (!u) {
457
- d();
458
- return;
459
- }
460
- const I = ++i.current;
461
- l((p) => ({
462
- ...p,
463
- loading: !0
464
- }));
465
- let b;
466
- try {
467
- b = await e.predict({
468
- input: u,
469
- countryCodes: y
470
- });
471
- } catch (p) {
472
- r ? r(p) : console.error(p);
473
- } finally {
474
- const p = I === i.current;
475
- s() && p && l((f) => ({
476
- loading: !1,
477
- // set new predictions if fetched properly, else keep current predictions
478
- predictions: b || f.predictions
479
- }));
480
- }
481
- }, [
482
- e,
483
- r
484
- ], 200);
485
- return {
486
- predictions: a,
487
- loading: t,
488
- updatePredictions: m,
489
- clearPredictions: d
490
- };
491
- }, Ke = ({ optionCount: e }) => {
492
- const r = Fe(It), o = B(r);
493
- o.current = r;
494
- const t = B(e);
495
- return We(() => {
496
- const a = e > 0 && t.current === 0;
497
- t.current = e;
498
- const l = o.current;
499
- a && (l != null && l.isFocused) && !l.isOpen && l.open(null, "manual");
500
- }, [
501
- e
502
- ]), null;
503
- }, k = ({ children: e }) => {
504
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ce(), p = y || b, f = Ee("addressLine1"), N = E(e, k.Label), F = E(e, k.Input), S = E(e, k.Options), O = E(e, k.Description), R = E(e, k.Error);
505
- return p ? /* @__PURE__ */ n.createElement(u, {
506
- fieldId: r,
507
- renderLabel: () => h(N, {
508
- label: f
509
- }),
510
- renderInput: () => /* @__PURE__ */ n.createElement(Dn, {
511
- value: o,
512
- onChange: t,
513
- disabled: a,
514
- readOnly: l,
515
- required: i,
516
- hasError: s,
517
- onBlur: d,
518
- onFocus: m
519
- }, F, S),
520
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
521
- }) : /* @__PURE__ */ n.createElement(u, {
522
- fieldId: r,
523
- renderLabel: () => h(N, {
524
- label: f
525
- }),
526
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
527
- "aria-labelledby": I,
528
- value: o ?? "",
529
- onChange: t,
530
- isDisabled: a,
531
- isReadOnly: l,
532
- isRequired: i,
533
- isInvalid: s,
534
- onBlur: d,
535
- onFocus: m
536
- }, F),
537
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
538
- });
539
- }, Dn = ({ children: e, value: r, onChange: o, disabled: t, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
540
- const { labelId: m } = T(), { onAddressSelect: u } = Ce(), y = Ie(), I = Ve({
541
- enabled: !0
542
- }), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
543
- atlas: I
544
- }), N = w(() => b.map((g) => ({
545
- id: g.searchId || "",
546
- label: g.description || ""
547
- })), [
548
- b
549
- ]), F = D((g) => {
550
- p({
551
- input: g,
552
- countryCodes: y ? [
553
- y
554
- ] : void 0
555
- }), o(g);
556
- }, [
557
- o,
558
- p,
559
- y
560
- ]), S = D(async (g) => {
561
- if (!g)
562
- return;
563
- f();
564
- const v = await (I == null ? void 0 : I.getPlace({
565
- searchId: String(g)
566
- }));
567
- v && u && u(v);
568
- }, [
569
- u,
570
- f,
571
- I
572
- ]), O = D(() => {
573
- f(), s == null || s();
574
- }, [
575
- s,
576
- f
577
- ]), R = D(() => {
578
- d == null || d();
579
- }, [
580
- d
581
- ]), q = E(e, k.Input), _ = E(e, k.Options);
582
- return /* @__PURE__ */ n.createElement(Se, {
583
- "aria-labelledby": m,
584
- inputValue: r ?? "",
585
- onInputChange: F,
586
- value: null,
587
- onChange: S,
588
- isDisabled: t,
589
- isReadOnly: a,
590
- isRequired: l,
591
- isInvalid: i,
592
- onBlur: O,
593
- onFocus: R,
594
- allowsCustomValue: !0,
595
- menuTrigger: "input",
596
- items: N
597
- }, h(q, {
598
- onFocus: R
599
- }), h(_, {
600
- options: N
601
- }), /* @__PURE__ */ n.createElement(Ke, {
602
- optionCount: N.length
603
- }));
604
- }, Rn = ({ className: e, ...r }) => {
605
- const { id: o, placeholder: t } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = r, s = B(null);
606
- return ae(() => {
607
- var d;
608
- (d = s.current) == null || d.focus();
609
- }, o), /* @__PURE__ */ n.createElement(le, {
610
- ref: s,
611
- id: a,
612
- "aria-describedby": l,
613
- className: e,
614
- placeholder: t,
615
- onFocus: i
616
- });
617
- }, Ye = ({ children: e, className: r }) => {
618
- const o = E(e, Ye.Option);
619
- return /* @__PURE__ */ n.createElement(De, {
620
- className: r,
621
- containerPadding: 0,
622
- offset: 0
623
- }, /* @__PURE__ */ n.createElement(Re, {
624
- renderEmptyState: () => null
625
- }, (t) => h(o, {
626
- id: t.id,
627
- label: t.label
628
- })));
629
- }, An = ({ className: e, ...r }) => {
630
- const { id: o, label: t } = r;
631
- return /* @__PURE__ */ n.createElement(Ae, {
632
- className: e,
633
- id: o,
634
- textValue: t
635
- }, t);
636
- };
637
- Ye.Option = An;
638
- k.Label = de;
639
- k.Input = Rn;
640
- k.Options = Ye;
641
- k.Description = ie;
642
- k.Error = ce;
643
- const re = ({ children: e }) => {
644
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: I } = Pe(), b = I("field.mla-apartment.label"), p = E(e, re.Label), f = E(e, re.Input), N = E(e, re.Description), F = E(e, re.Error);
645
- return /* @__PURE__ */ n.createElement(u, {
646
- fieldId: r,
647
- renderLabel: () => h(p, {
648
- label: b
649
- }),
650
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
651
- "aria-labelledby": y,
652
- value: o ?? "",
653
- onChange: t,
654
- isDisabled: a,
655
- isReadOnly: l,
656
- isRequired: i,
657
- isInvalid: s,
658
- onBlur: d,
659
- onFocus: m
660
- }, f),
661
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, F, N)
662
- });
663
- }, _n = ({ className: e }) => {
664
- const { id: r, placeholder: o } = P(), { inputId: t, ariaDescribedBy: a } = T(), l = B(null);
665
- return ae(() => {
666
- var i;
667
- (i = l.current) == null || i.focus();
668
- }, r), /* @__PURE__ */ n.createElement(le, {
669
- ref: l,
670
- id: t,
671
- "aria-describedby": a,
672
- className: e,
673
- placeholder: o
674
- });
675
- };
676
- re.Label = de;
677
- re.Input = _n;
678
- re.Description = ie;
679
- re.Error = ce;
680
- const oe = ({ children: e }) => {
681
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), I = Ee("city"), b = E(e, oe.Label), p = E(e, oe.Input), f = E(e, oe.Description), N = E(e, oe.Error);
682
- return /* @__PURE__ */ n.createElement(u, {
683
- fieldId: r,
684
- renderLabel: () => h(b, {
685
- label: I
686
- }),
687
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
688
- "aria-labelledby": y,
689
- value: o ?? "",
690
- onChange: t,
691
- isDisabled: a,
692
- isReadOnly: l,
693
- isRequired: i,
694
- isInvalid: s,
695
- onBlur: d,
696
- onFocus: m
697
- }, p),
698
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
699
- });
700
- }, Pn = ({ className: e }) => {
701
- const { id: r, placeholder: o } = P(), { inputId: t, ariaDescribedBy: a } = T(), l = B(null);
702
- return ae(() => {
703
- var i;
704
- (i = l.current) == null || i.focus();
705
- }, r), /* @__PURE__ */ n.createElement(le, {
706
- ref: l,
707
- id: t,
708
- "aria-describedby": a,
709
- className: e,
710
- placeholder: o
711
- });
712
- };
713
- oe.Label = de;
714
- oe.Input = Pn;
715
- oe.Description = ie;
716
- oe.Error = ce;
717
- const Dt = ({ readOnly: e, disabled: r } = {}) => {
718
- const o = Fe(It);
719
- return D(() => {
720
- !o || o.isOpen || e || r || o.open(null, "manual");
721
- }, [
722
- o,
723
- e,
724
- r
725
- ]);
726
- }, Tn = (e, r) => e.find((o) => o.label.toLocaleLowerCase() === r.toLocaleLowerCase().trim()), Rt = ({ options: e, value: r, commit: o, clear: t, onBlur: a }) => {
727
- const [l, i] = be(null), s = Qt(a), d = w(() => {
728
- var b;
729
- return r ? ((b = e.find((p) => p.value === r)) == null ? void 0 : b.label) ?? "" : "";
730
- }, [
731
- r,
732
- e
733
- ]), m = D((b) => {
734
- typeof b != "string" || b === "" || b === r || (i(null), o(b));
735
- }, [
736
- o,
737
- r
738
- ]), u = D((b) => {
739
- if (i(b), b === "")
740
- return;
741
- const p = Tn(e, b);
742
- p && p.value !== r && o(p.value);
743
- }, [
744
- o,
745
- e,
746
- r
747
- ]), y = D((b) => {
748
- b.key !== "Enter" && b.key !== "Escape" || (i(null), b.key === "Enter" && l === "" && r && t());
749
- }, [
750
- l,
751
- r,
752
- t
753
- ]), I = D(() => {
754
- l === "" && r && t(), i(null), s();
755
- }, [
756
- l,
757
- r,
758
- t,
759
- s
760
- ]);
761
- return {
762
- value: r ?? null,
763
- inputValue: l ?? d,
764
- onChange: m,
765
- onInputChange: u,
766
- onBlur: I,
767
- onInputKeyDown: y
768
- };
769
- }, Y = ({ children: e }) => {
770
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: y } = P(), { labelId: I } = T(), { t: b } = Pe(), { language: p } = yt(), f = w(() => (y || []).reduce((x, M) => (M.value && Oe.hasOwnProperty(M.value) && x.push({
771
- value: M.value,
772
- label: b(`locale-dataset.countries.${Oe[M.value].toUpperCase()}`)
773
- }), x), []).sort((x, M) => x.label.localeCompare(M.label, p)), [
774
- y,
775
- b,
776
- p
777
- ]), N = D((x) => t(x), [
778
- t
779
- ]), F = D(() => N(""), [
780
- N
781
- ]), { onInputKeyDown: S, ...O } = Rt({
782
- options: f,
783
- value: o,
784
- commit: N,
785
- clear: F,
786
- onBlur: d
787
- }), R = Ee("country"), q = E(e, Y.Label), _ = E(e, Y.Control), g = E(e, Y.Options), v = E(e, Y.Description), me = E(e, Y.Error);
788
- return /* @__PURE__ */ n.createElement(u, {
789
- fieldId: r,
790
- renderLabel: () => h(q, {
791
- label: R
792
- }),
793
- renderInput: () => /* @__PURE__ */ n.createElement(Se, {
794
- "aria-labelledby": I,
795
- ...O,
796
- isDisabled: a,
797
- isReadOnly: l,
798
- isRequired: i,
799
- isInvalid: s,
800
- onFocus: m,
801
- menuTrigger: "input"
802
- }, h(_, {
803
- onKeyDown: S
804
- }), h(g, {
805
- options: f
806
- })),
807
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, me, v)
808
- });
809
- }, ve = ({ children: e, className: r, ...o }) => {
810
- const { disabled: t, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, ve.Input), s = E(e, ve.Trigger);
811
- return /* @__PURE__ */ n.createElement(Lt, {
812
- className: r,
813
- isDisabled: t,
814
- isInvalid: a
815
- }, h(i, {
816
- onKeyDown: l
817
- }), s);
818
- }, qn = ({ className: e, ...r }) => {
819
- const { id: o, placeholder: t, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = r, m = B(null), u = Dt({
820
- readOnly: a,
821
- disabled: l
822
- });
823
- return ae(() => {
824
- var y;
825
- (y = m.current) == null || y.focus();
826
- }, o), /* @__PURE__ */ n.createElement(le, {
827
- ref: m,
828
- id: i,
829
- "aria-describedby": s,
830
- className: e,
831
- placeholder: t,
832
- onClick: u,
833
- onKeyDown: d
834
- });
835
- }, Mn = ({ children: e, className: r }) => /* @__PURE__ */ n.createElement(Nt, {
836
- className: r
837
- }, e);
838
- ve.Input = qn;
839
- ve.Trigger = Mn;
840
- const He = ({ children: e, className: r, ...o }) => {
841
- const { options: t } = o, a = E(e, He.Option);
842
- return /* @__PURE__ */ n.createElement(De, {
843
- className: r,
844
- containerPadding: 0,
845
- offset: 0
846
- }, /* @__PURE__ */ n.createElement(Re, null, t.map((l) => h(a, {
847
- key: l.value,
848
- value: l.value,
849
- label: l.label
850
- }))));
851
- }, wn = ({ className: e, ...r }) => {
852
- const { value: o, label: t } = r;
853
- return /* @__PURE__ */ n.createElement(Ae, {
854
- className: e,
855
- id: o,
856
- textValue: t
857
- }, t);
858
- };
859
- He.Option = wn;
860
- Y.Label = de;
861
- Y.Control = ve;
862
- Y.Options = He;
863
- Y.Description = ie;
864
- Y.Error = ce;
865
- const xn = /(\d{7})|(\d{3}-\d{4})/;
866
- function Bn(e) {
867
- var r;
868
- return (r = e.match(xn)) == null ? void 0 : r[0];
869
- }
870
- function kn({ isAutocompleteEnabled: e }) {
871
- const r = B({
872
- hasAddress: !1
873
- }), o = Ve({
874
- enabled: e
875
- });
876
- return {
877
- searchByPostalCode: D(async (a) => {
878
- const l = Bn(a);
879
- if (l) {
880
- if (r.current.postalCode === l && r.current.hasAddress)
881
- return r.current.address;
882
- r.current = {
883
- postalCode: l,
884
- address: void 0,
885
- hasAddress: !1
886
- };
887
- try {
888
- const i = await (o == null ? void 0 : o.searchByPostalCode({
889
- countryCode: "JP",
890
- postalCode: l
891
- }));
892
- return r.current.hasAddress = !0, r.current.address = void 0, i != null && i.formattedAddress ? (r.current.address = i, i) : void 0;
893
- } catch (i) {
894
- console.error(i);
895
- }
896
- }
897
- }, [
898
- o
899
- ])
900
- };
901
- }
902
- const $ = ({ children: e }) => {
903
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), b = Ie(), { autocompleteEnabled: p } = Ce(), f = !!(b && Oe[b] === Oe.JP), N = (y || p) && f, F = Ee("zipCode"), S = E(e, $.Label), O = E(e, $.Control), R = E(e, $.Options), q = E(e, $.Description), _ = E(e, $.Error);
904
- return N ? /* @__PURE__ */ n.createElement(u, {
905
- fieldId: r,
906
- renderLabel: () => h(S, {
907
- label: F
908
- }),
909
- renderInput: () => /* @__PURE__ */ n.createElement($n, {
910
- value: o,
911
- onChange: t,
912
- disabled: a,
913
- readOnly: l,
914
- required: i,
915
- hasError: s,
916
- onBlur: d,
917
- onFocus: m
918
- }, O, R),
919
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
920
- }) : /* @__PURE__ */ n.createElement(u, {
921
- fieldId: r,
922
- renderLabel: () => h(S, {
923
- label: F
924
- }),
925
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
926
- "aria-labelledby": I,
927
- value: o ?? "",
928
- onChange: t,
929
- isDisabled: a,
930
- isReadOnly: l,
931
- isRequired: i,
932
- isInvalid: s,
933
- onBlur: d,
934
- onFocus: m
935
- }, O),
936
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, q)
937
- });
938
- }, $n = ({ children: e, value: r, onChange: o, disabled: t, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
939
- const { labelId: m } = T(), { onAddressSelect: u } = Ce(), [y, I] = be(!1), { searchByPostalCode: b } = kn({
940
- isAutocompleteEnabled: y
941
- }), [p, f] = be(), N = w(() => p ? [
942
- {
943
- id: V(),
944
- label: p.formattedAddress || ""
945
- }
946
- ] : [], [
947
- p
948
- ]), F = D(async (g) => {
949
- o(g);
950
- const v = await b(g ?? "");
951
- f(v);
952
- }, [
953
- o,
954
- b
955
- ]), S = D(async (g) => {
956
- g && (f(void 0), p && u && u(p));
957
- }, [
958
- u,
959
- p
960
- ]), O = D(() => {
961
- f(void 0), s == null || s();
962
- }, [
963
- s
964
- ]), R = D(() => {
965
- I(!0), d == null || d();
966
- }, [
967
- d
968
- ]), q = E(e, $.Control), _ = E(e, $.Options);
969
- return /* @__PURE__ */ n.createElement(Se, {
970
- "aria-labelledby": m,
971
- inputValue: r ?? "",
972
- onInputChange: F,
973
- value: null,
974
- onChange: S,
975
- isDisabled: t,
976
- isReadOnly: a,
977
- isRequired: l,
978
- isInvalid: i,
979
- onBlur: O,
980
- onFocus: R,
981
- allowsCustomValue: !0,
982
- menuTrigger: "input",
983
- items: N
984
- }, h(q, {
985
- onFocus: R
986
- }), h(_, {
987
- options: N
988
- }), /* @__PURE__ */ n.createElement(Ke, {
989
- optionCount: N.length
990
- }));
991
- }, je = ({ children: e, className: r, ...o }) => {
992
- const { disabled: t, hasError: a } = P(), { onFocus: l } = o, i = Ie(), s = E(e, je.Input);
993
- return /* @__PURE__ */ n.createElement("div", {
994
- className: r,
995
- "data-country": i || void 0,
996
- "data-disabled": t || void 0,
997
- "data-invalid": a || void 0
998
- }, h(s, {
999
- onFocus: l
1000
- }));
1001
- }, Un = ({ className: e, ...r }) => {
1002
- const { id: o, placeholder: t } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = r, s = B(null);
1003
- return ae(() => {
1004
- var d;
1005
- (d = s.current) == null || d.focus();
1006
- }, o), /* @__PURE__ */ n.createElement(le, {
1007
- ref: s,
1008
- id: a,
1009
- "aria-describedby": l,
1010
- className: e,
1011
- placeholder: t,
1012
- onFocus: i
1013
- });
1014
- }, Je = ({ children: e, className: r }) => {
1015
- const o = E(e, Je.Option);
1016
- return /* @__PURE__ */ n.createElement(De, {
1017
- className: r,
1018
- containerPadding: 0,
1019
- offset: 0
1020
- }, /* @__PURE__ */ n.createElement(Re, {
1021
- renderEmptyState: () => null
1022
- }, (t) => h(o, {
1023
- id: t.id,
1024
- label: t.label
1025
- })));
1026
- }, Wn = ({ className: e, ...r }) => {
1027
- const { id: o, label: t } = r;
1028
- return /* @__PURE__ */ n.createElement(Ae, {
1029
- className: e,
1030
- id: o,
1031
- textValue: t
1032
- }, t);
1033
- };
1034
- Je.Option = Wn;
1035
- je.Input = Un;
1036
- $.Label = de;
1037
- $.Control = je;
1038
- $.Options = Je;
1039
- $.Description = ie;
1040
- $.Error = ce;
1041
- const U = ({ children: e }) => {
1042
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = T(), { autocompleteEnabled: b } = Ce(), p = y || b, f = Ee("streetName"), N = E(e, U.Label), F = E(e, U.Input), S = E(e, U.Options), O = E(e, U.Description), R = E(e, U.Error);
1043
- return p ? /* @__PURE__ */ n.createElement(u, {
1044
- fieldId: r,
1045
- renderLabel: () => h(N, {
1046
- label: f
1047
- }),
1048
- renderInput: () => /* @__PURE__ */ n.createElement(Vn, {
1049
- value: o,
1050
- onChange: t,
1051
- disabled: a,
1052
- readOnly: l,
1053
- required: i,
1054
- hasError: s,
1055
- onBlur: d,
1056
- onFocus: m
1057
- }, F, S),
1058
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
1059
- }) : /* @__PURE__ */ n.createElement(u, {
1060
- fieldId: r,
1061
- renderLabel: () => h(N, {
1062
- label: f
1063
- }),
1064
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
1065
- "aria-labelledby": I,
1066
- value: o ?? "",
1067
- onChange: t,
1068
- isDisabled: a,
1069
- isReadOnly: l,
1070
- isRequired: i,
1071
- isInvalid: s,
1072
- onBlur: d,
1073
- onFocus: m
1074
- }, F),
1075
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, O)
1076
- });
1077
- }, Vn = ({ children: e, value: r, onChange: o, disabled: t, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
1078
- const { labelId: m } = T(), { onAddressSelect: u } = Ce(), y = Ie(), I = Ve({
1079
- enabled: !0
1080
- }), { predictions: b, updatePredictions: p, clearPredictions: f } = St({
1081
- atlas: I
1082
- }), N = E(e, U.Input), F = E(e, U.Options), S = w(() => b.reduce((g, v) => (v.searchId && v.description && g.push({
1083
- id: v.searchId,
1084
- label: v.description
1085
- }), g), []), [
1086
- b
1087
- ]), O = D((g) => {
1088
- p({
1089
- input: g,
1090
- countryCodes: y ? [
1091
- y
1092
- ] : void 0
1093
- }), o(g);
1094
- }, [
1095
- o,
1096
- p,
1097
- y
1098
- ]), R = D(async (g) => {
1099
- if (f(), !g)
1100
- return;
1101
- const v = await (I == null ? void 0 : I.getPlace({
1102
- searchId: String(g)
1103
- }));
1104
- v && u && u(v);
1105
- }, [
1106
- u,
1107
- f,
1108
- I
1109
- ]), q = D(() => {
1110
- f(), s == null || s();
1111
- }, [
1112
- s,
1113
- f
1114
- ]), _ = D(() => {
1115
- d == null || d();
1116
- }, [
1117
- d
1118
- ]);
1119
- return /* @__PURE__ */ n.createElement(Se, {
1120
- "aria-labelledby": m,
1121
- inputValue: r ?? "",
1122
- onInputChange: O,
1123
- value: null,
1124
- onChange: R,
1125
- isDisabled: t,
1126
- isReadOnly: a,
1127
- isRequired: l,
1128
- isInvalid: i,
1129
- onBlur: q,
1130
- onFocus: _,
1131
- allowsCustomValue: !0,
1132
- menuTrigger: "input",
1133
- items: S
1134
- }, h(N, {
1135
- onFocus: _
1136
- }), h(F, {
1137
- options: S
1138
- }), /* @__PURE__ */ n.createElement(Ke, {
1139
- optionCount: S.length
1140
- }));
1141
- }, Kn = ({ className: e, ...r }) => {
1142
- const { id: o, placeholder: t } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = r, s = B(null);
1143
- return ae(() => {
1144
- var d;
1145
- (d = s.current) == null || d.focus();
1146
- }, o), /* @__PURE__ */ n.createElement(le, {
1147
- ref: s,
1148
- id: a,
1149
- "aria-describedby": l,
1150
- className: e,
1151
- placeholder: t,
1152
- onFocus: i
1153
- });
1154
- }, Ge = ({ children: e, className: r }) => {
1155
- const o = E(e, Ge.Option);
1156
- return /* @__PURE__ */ n.createElement(De, {
1157
- className: r,
1158
- containerPadding: 0,
1159
- offset: 0
1160
- }, /* @__PURE__ */ n.createElement(Re, {
1161
- renderEmptyState: () => null
1162
- }, (t) => h(o, {
1163
- id: t.id,
1164
- label: t.label
1165
- })));
1166
- }, Yn = ({ className: e, ...r }) => {
1167
- const { id: o, label: t } = r;
1168
- return /* @__PURE__ */ n.createElement(Ae, {
1169
- className: e,
1170
- id: o,
1171
- textValue: t
1172
- }, t);
1173
- };
1174
- Ge.Option = Yn;
1175
- U.Label = de;
1176
- U.Input = Kn;
1177
- U.Options = Ge;
1178
- U.Description = ie;
1179
- U.Error = ce;
1180
- const se = ({ children: e }) => {
1181
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), I = Ee("streetNumber"), b = E(e, se.Label), p = E(e, se.Input), f = E(e, se.Description), N = E(e, se.Error);
1182
- return /* @__PURE__ */ n.createElement(u, {
1183
- fieldId: r,
1184
- renderLabel: () => h(b, {
1185
- label: I
1186
- }),
1187
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
1188
- "aria-labelledby": y,
1189
- value: o ?? "",
1190
- onChange: t,
1191
- isDisabled: a,
1192
- isReadOnly: l,
1193
- isRequired: i,
1194
- isInvalid: s,
1195
- onBlur: d,
1196
- onFocus: m
1197
- }, p),
1198
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
1199
- });
1200
- }, Hn = ({ className: e }) => {
1201
- const { id: r, placeholder: o } = P(), { inputId: t, ariaDescribedBy: a } = T(), l = B(null);
1202
- return ae(() => {
1203
- var i;
1204
- (i = l.current) == null || i.focus();
1205
- }, r), /* @__PURE__ */ n.createElement(le, {
1206
- ref: l,
1207
- id: t,
1208
- "aria-describedby": a,
1209
- className: e,
1210
- placeholder: o
1211
- });
1212
- };
1213
- se.Label = de;
1214
- se.Input = Hn;
1215
- se.Description = ie;
1216
- se.Error = ce;
1217
- const H = ({ children: e }) => {
1218
- const { id: r, value: o, onChange: t, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = T(), { t: I } = Pe(), b = Ie(), p = b ? Oe[b] : void 0, f = b && xt.getCountryByShortKey(b), N = w(() => {
1219
- var M;
1220
- return (Bt(((M = f == null ? void 0 : f.subdivisions) == null ? void 0 : M.list) || [], p) || []).map((j) => ({
1221
- value: j.key,
1222
- label: I(j.displayName)
1223
- })).sort((j, A) => j.label.localeCompare(A.label));
1224
- }, [
1225
- p,
1226
- I,
1227
- f
1228
- ]), F = D(() => t(""), [
1229
- t
1230
- ]), { onInputKeyDown: S, ...O } = Rt({
1231
- options: N,
1232
- value: o,
1233
- commit: t,
1234
- clear: F,
1235
- onBlur: d
1236
- }), R = Ee("subdivision"), q = E(e, H.Label), _ = E(e, H.Control), g = E(e, H.Options), v = E(e, H.Description), me = E(e, H.Error);
1237
- return /* @__PURE__ */ n.createElement(u, {
1238
- fieldId: r,
1239
- renderLabel: () => h(q, {
1240
- label: R
1241
- }),
1242
- renderInput: () => /* @__PURE__ */ n.createElement(Se, {
1243
- "aria-labelledby": y,
1244
- ...O,
1245
- isDisabled: a,
1246
- isReadOnly: l,
1247
- isRequired: i,
1248
- isInvalid: s,
1249
- onFocus: m,
1250
- menuTrigger: "input"
1251
- }, h(_, {
1252
- onKeyDown: S
1253
- }), h(g, {
1254
- options: N
1255
- })),
1256
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, me, v)
1257
- });
1258
- }, he = ({ children: e, className: r, ...o }) => {
1259
- const { disabled: t, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, he.Input), s = E(e, he.Trigger);
1260
- return /* @__PURE__ */ n.createElement(Lt, {
1261
- className: r,
1262
- isDisabled: t,
1263
- isInvalid: a
1264
- }, h(i, {
1265
- onKeyDown: l
1266
- }), s);
1267
- }, jn = ({ className: e, ...r }) => {
1268
- const { id: o, placeholder: t, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = r, m = B(null), u = Dt({
1269
- readOnly: a,
1270
- disabled: l
1271
- });
1272
- return ae(() => {
1273
- var y;
1274
- (y = m.current) == null || y.focus();
1275
- }, o), /* @__PURE__ */ n.createElement(le, {
1276
- ref: m,
1277
- id: i,
1278
- "aria-describedby": s,
1279
- className: e,
1280
- placeholder: t,
1281
- onClick: u,
1282
- onKeyDown: d
1283
- });
1284
- }, Jn = ({ children: e, className: r }) => /* @__PURE__ */ n.createElement(Nt, {
1285
- className: r
1286
- }, e);
1287
- he.Input = jn;
1288
- he.Trigger = Jn;
1289
- const Xe = ({ children: e, className: r, ...o }) => {
1290
- const { options: t } = o, a = E(e, Xe.Option);
1291
- return /* @__PURE__ */ n.createElement(De, {
1292
- className: r,
1293
- containerPadding: 0,
1294
- offset: 0
1295
- }, /* @__PURE__ */ n.createElement(Re, null, t.map((l) => h(a, {
1296
- key: l.value,
1297
- value: l.value,
1298
- label: l.label
1299
- }))));
1300
- }, Gn = ({ className: e, ...r }) => {
1301
- const { value: o, label: t } = r;
1302
- return /* @__PURE__ */ n.createElement(Ae, {
1303
- className: e,
1304
- id: o,
1305
- textValue: t
1306
- }, t);
1307
- };
1308
- Xe.Option = Gn;
1309
- H.Label = de;
1310
- H.Control = he;
1311
- H.Options = Xe;
1312
- H.Description = ie;
1313
- H.Error = ce;
1314
- const Xn = () => ue("country"), zn = () => ue("subdivision"), Qn = () => ue("city"), Zn = () => ue("addressLine"), er = () => ue("addressLine2"), tr = () => ue("postalCode"), nr = () => ue("streetName"), rr = () => ue("streetNumber"), or = () => ue("apartment"), sr = {
1315
- [K.MLA_COUNTRY]: Xn,
1316
- [K.MLA_SUBDIVISION]: zn,
1317
- [K.MLA_CITY]: Qn,
1318
- [K.MLA_ADDRESS_LINE]: Zn,
1319
- [K.MLA_ADDRESS_LINE_2]: er,
1320
- [K.MLA_POSTAL_CODE]: tr,
1321
- [K.MLA_STREET_NAME]: nr,
1322
- [K.MLA_STREET_NUMBER]: rr,
1323
- [K.MLA_APARTMENT]: or
1324
- }, ar = {}, lr = [], c = ({ children: e }) => {
1325
- const { id: r, form: o, value: t, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: y, target: I, autocompleteEnabled: b, required: p, fieldType: f } = P(), [N, F] = be(null), S = kt(), O = w(() => ({
1326
- ...S,
1327
- ...sr
1328
- }), [
1329
- S
1330
- ]), { isExperimentEnabled: R } = bt(), q = R(ft.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), g = Ut(), v = Ct(), me = w(() => ({
1331
- ...v,
1332
- actions: {
1333
- predict: Kt,
1334
- getPlace: Vt,
1335
- searchByPostalCode: Wt,
1336
- ...v.actions
1337
- }
1338
- }), [
1339
- v
1340
- ]), { form: x, isMultilineAddressField: M } = bn({
1341
- id: r,
1342
- target: I,
1343
- fieldType: f,
1344
- form: o,
1345
- country: t == null ? void 0 : t.country,
1346
- fieldSettings: m,
1347
- validation: y,
1348
- required: p
1349
- }), j = D((W) => {
1350
- if (!t)
1351
- return;
1352
- const G = nn(W, M, q), _e = {
1353
- ...G,
1354
- [ye.COUNTRY]: G[ye.COUNTRY] ?? t[ye.COUNTRY]
1355
- };
1356
- a == null || a(_e);
1357
- }, [
1358
- a,
1359
- t,
1360
- M,
1361
- q
1362
- ]), A = D((W, G) => {
1363
- if (M && W === ye.COUNTRY && (t == null ? void 0 : t[W]) !== G) {
1364
- a == null || a({
1365
- [ye.COUNTRY]: G
1366
- });
1367
- return;
1368
- }
1369
- a == null || a({
1370
- ...t,
1371
- [W]: G
1372
- });
1373
- }, [
1374
- a,
1375
- t,
1376
- M
1377
- ]), J = D(async (W) => _(M ? [
1378
- ...W,
1379
- {
1380
- path: `${I}/${ye.COUNTRY}`,
1381
- value: t == null ? void 0 : t.country
1382
- }
1383
- ] : W), [
1384
- t,
1385
- I,
1386
- _,
1387
- M
1388
- ]);
1389
- Yt(r, () => {
1390
- var _e;
1391
- const W = s == null ? void 0 : s[0], G = (_e = x == null ? void 0 : x.fields) == null ? void 0 : _e.find((ot) => "target" in ot && ot.target === (W == null ? void 0 : W.errorPath));
1392
- return G == null ? void 0 : G.id;
1393
- });
1394
- const pe = E(e, c.Country), Le = E(e, c.Subdivision), ze = E(e, c.City), Qe = E(e, c.AddressLine), Ze = E(e, c.AddressLine2), et = E(e, c.PostalCode), tt = E(e, c.StreetName), nt = E(e, c.StreetNumber), rt = E(e, c.Apartment), At = w(() => ({
1395
- country: pe,
1396
- subdivision: Le,
1397
- city: ze,
1398
- addressLine: Qe,
1399
- addressLine2: Ze,
1400
- postalCode: et,
1401
- streetName: tt,
1402
- streetNumber: nt,
1403
- apartment: rt
1404
- }), [
1405
- pe,
1406
- Le,
1407
- ze,
1408
- Qe,
1409
- Ze,
1410
- et,
1411
- tt,
1412
- nt,
1413
- rt
1414
- ]);
1415
- return x ? /* @__PURE__ */ n.createElement(d, {
1416
- fieldId: r
1417
- }, /* @__PURE__ */ n.createElement(on, {
1418
- countryCode: t == null ? void 0 : t.country
1419
- }, /* @__PURE__ */ n.createElement(rn, {
1420
- autocompleteEnabled: b,
1421
- onAddressSelect: j
1422
- }, /* @__PURE__ */ n.createElement(fn, {
1423
- fields: At
1424
- }, /* @__PURE__ */ n.createElement("div", {
1425
- ref: F,
1426
- style: {
1427
- display: "contents"
1428
- }
1429
- }), /* @__PURE__ */ n.createElement(_t, {
1430
- getContainer: () => N
1431
- }, /* @__PURE__ */ n.createElement("fieldset", {
1432
- style: jt
1433
- }, /* @__PURE__ */ n.createElement("legend", {
1434
- style: Jt
1435
- }, u), /* @__PURE__ */ n.createElement(Ht, {
1436
- formSchema: g,
1437
- form: x,
1438
- values: t ?? ar,
1439
- onFieldChange: A,
1440
- onBlur: l,
1441
- onFocus: i,
1442
- errors: s ?? lr,
1443
- validateFields: J,
1444
- fields: O,
1445
- fieldActions: me
1446
- }))))))) : null;
1447
- };
1448
- c.Country = Y;
1449
- c.Subdivision = H;
1450
- c.City = oe;
1451
- c.AddressLine = k;
1452
- c.AddressLine2 = ne;
1453
- c.PostalCode = $;
1454
- c.StreetName = U;
1455
- c.StreetNumber = se;
1456
- c.Apartment = re;
1457
- const ir = "_postalCodeControl_1tire_1", cr = "_comboControl_1tire_5", dr = "_comboTrigger_1tire_19", ge = {
1458
- postalCodeControl: ir,
1459
- comboControl: cr,
1460
- comboTrigger: dr
1461
- }, Ar = () => {
1462
- const e = en(), r = Zt(Te);
1463
- return /* @__PURE__ */ n.createElement(c, null, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
1464
- className: L(Q, C.label)
1465
- }, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
1466
- className: L(Z, C.requiredMark)
1467
- })), /* @__PURE__ */ n.createElement(c.Country.Control, {
1468
- className: L(lt, C.input, ge.comboControl)
1469
- }, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
1470
- className: L(C.innerInput, Te)
1471
- }), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
1472
- className: ge.comboTrigger
1473
- }, /* @__PURE__ */ n.createElement(at, {
1474
- className: C.dropdownIcon
1475
- }))), /* @__PURE__ */ n.createElement(c.Country.Options, {
1476
- className: L(Ne, C.selectPopover, C.dropdownPopover)
1477
- }, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
1478
- className: r
1479
- })), /* @__PURE__ */ n.createElement(c.Country.Error, {
1480
- className: L(ee, C.error)
1481
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
1482
- className: L(te, C.description)
1483
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1484
- content: o,
1485
- locale: t
1486
- }))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
1487
- className: L(Q, C.label)
1488
- }, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
1489
- className: L(Z, C.requiredMark)
1490
- })), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
1491
- className: e
1492
- }), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
1493
- className: L(Ne, C.selectPopover, C.dropdownPopover)
1494
- }, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
1495
- className: r
1496
- })), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
1497
- className: L(ee, C.error)
1498
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
1499
- className: L(te, C.description)
1500
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1501
- content: o,
1502
- locale: t
1503
- }))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
1504
- className: L(Q, C.label)
1505
- }, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
1506
- className: L(Z, C.requiredMark)
1507
- })), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
1508
- className: e
1509
- }), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
1510
- className: L(ee, C.error)
1511
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
1512
- className: L(te, C.description)
1513
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1514
- content: o,
1515
- locale: t
1516
- }))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
1517
- className: L(Q, C.label)
1518
- }, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
1519
- className: L(Z, C.requiredMark)
1520
- })), /* @__PURE__ */ n.createElement(c.City.Input, {
1521
- className: e
1522
- }), /* @__PURE__ */ n.createElement(c.City.Error, {
1523
- className: L(ee, C.error)
1524
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
1525
- className: L(te, C.description)
1526
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1527
- content: o,
1528
- locale: t
1529
- }))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
1530
- className: L(Q, C.label)
1531
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
1532
- className: L(Z, C.requiredMark)
1533
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
1534
- className: ge.postalCodeControl
1535
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
1536
- className: e
1537
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
1538
- className: L(Ne, C.selectPopover, C.dropdownPopover)
1539
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
1540
- className: r
1541
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
1542
- className: L(ee, C.error)
1543
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
1544
- className: L(te, C.description)
1545
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1546
- content: o,
1547
- locale: t
1548
- }))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
1549
- className: L(Q, C.label)
1550
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
1551
- className: L(Z, C.requiredMark)
1552
- })), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
1553
- className: L(lt, C.input, ge.comboControl)
1554
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
1555
- className: L(C.innerInput, Te)
1556
- }), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
1557
- className: ge.comboTrigger
1558
- }, /* @__PURE__ */ n.createElement(at, {
1559
- className: C.dropdownIcon
1560
- }))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
1561
- className: L(Ne, C.selectPopover, C.dropdownPopover)
1562
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
1563
- className: r
1564
- })), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
1565
- className: L(ee, C.error)
1566
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
1567
- className: L(te, C.description)
1568
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1569
- content: o,
1570
- locale: t
1571
- }))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
1572
- className: L(Q, C.label)
1573
- }, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
1574
- className: L(Z, C.requiredMark)
1575
- })), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
1576
- className: e
1577
- }), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
1578
- className: L(Ne, C.selectPopover, C.dropdownPopover)
1579
- }, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
1580
- className: r
1581
- })), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
1582
- className: L(ee, C.error)
1583
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
1584
- className: L(te, C.description)
1585
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1586
- content: o,
1587
- locale: t
1588
- }))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
1589
- className: L(Q, C.label)
1590
- }, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
1591
- className: L(Z, C.requiredMark)
1592
- })), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
1593
- className: e
1594
- }), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
1595
- className: L(ee, C.error)
1596
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
1597
- className: L(te, C.description)
1598
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1599
- content: o,
1600
- locale: t
1601
- }))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
1602
- className: L(Q, C.label)
1603
- }, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
1604
- className: L(Z, C.requiredMark)
1605
- })), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
1606
- className: e
1607
- }), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
1608
- className: L(ee, C.error)
1609
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
1610
- className: L(te, C.description)
1611
- }, ({ content: o, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1612
- content: o,
1613
- locale: t
1614
- }))));
1615
- };
1616
- export {
1617
- Ar as M
1618
- };