@wix/form-elements 1.228.0 → 1.229.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/component/{appointment-rac-BOMSG3ur.js → appointment-rac-GPiMmJxP.js} +4 -4
- package/dist/component/{bookings-address-rac-2Iqd3heF.js → bookings-address-rac-_6H0cpOX.js} +1 -1
- package/dist/component/{bookings-email-rac-vmaFkS3r.js → bookings-email-rac-BXu7vlfv.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DToXUWLK.js → bookings-first-name-rac-B5EFteC7.js} +1 -1
- package/dist/component/{bookings-header-rac-DbGFMuV9.js → bookings-header-rac-BNpHdVDM.js} +1 -1
- package/dist/component/{bookings-last-name-rac-h6A50NGK.js → bookings-last-name-rac-39_YaErh.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BF6vZYgD.js → bookings-login-bar-rac-C2HiveJf.js} +1 -1
- package/dist/component/{bookings-phone-rac-NOzy382P.js → bookings-phone-rac-DUDjc-hx.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BRT8O9KI.js → bookings-rich-text-rac-C3gHsHqM.js} +1 -1
- package/dist/component/{checkbox-field-rac-BAbzQdm_.js → checkbox-field-rac-B1boTUAd.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-QKAVGheB.js → checkbox-group-field-headless-Bult4ASq.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-PQAdmVdS.js → checkbox-group-field-rac-C8X3HPwE.js} +4 -4
- package/dist/component/{checkbox-group-rac-DJwR71Aj.js → checkbox-group-rac-7Lqjo_yR.js} +1 -1
- package/dist/component/{checkbox-rac-DVTOVlds.js → checkbox-rac-syMEVhI-.js} +1 -1
- package/dist/component/{contacts-address-rac-BxRBeN43.js → contacts-address-rac-C0-tMLNC.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CKaPcju4.js → contacts-birthdate-rac-1cDTvHzJ.js} +1 -1
- package/dist/component/{contacts-company-rac-7FqfoZ37.js → contacts-company-rac-jBk0H-Px.js} +1 -1
- package/dist/component/{contacts-email-rac-Bi4ktv2C.js → contacts-email-rac-CoYOGP1q.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CM0wYXi8.js → contacts-first-name-rac-D3j38Wak.js} +1 -1
- package/dist/component/{contacts-last-name-rac-t3DRn23V.js → contacts-last-name-rac-BONsoL5A.js} +1 -1
- package/dist/component/{contacts-phone-rac-DheDoi4v.js → contacts-phone-rac-DEFAfwFw.js} +1 -1
- package/dist/component/{contacts-position-rac-D6wdlPMv.js → contacts-position-rac-KN_26yxw.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-L-S8pW12.js → contacts-subscribe-rac-BLCx2wUt.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D4dTB72V.js → contacts-tax-id-rac-DeEskHYJ.js} +1 -1
- package/dist/component/{date-availability-nLp28YJJ.js → date-availability-Dt_ccalt.js} +1 -1
- package/dist/component/{date-input-field-rac-3gJquXLV.js → date-input-field-rac-B-CpcccZ.js} +8 -8
- package/dist/component/{date-input-rac-DIVNbgAN.js → date-input-rac-C1m26mdc.js} +1 -1
- package/dist/component/{date-picker-field-rac-L5-jiuk9.js → date-picker-field-rac-BIUDi3_7.js} +8 -8
- package/dist/component/{date-picker-rac-DTJA96Wt.js → date-picker-rac-7-tC9pvJ.js} +1 -1
- package/dist/component/{date-time-input-field-rac-D9uxp4Ll.js → date-time-input-field-rac-5pVViPTl.js} +8 -8
- package/dist/component/{date-time-input-rac-BBDupf5A.js → date-time-input-rac-CJVXFHSK.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-AUofOKsf.js → dext-checkbox-group-rac-CQ95cLrs.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CJv0ZAL2.js → dext-checkbox-rac-Cv3-fvFw.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CbxqilcA.js → dext-date-picker-rac-Dgbzkk-Q.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CWJSNiKG.js → dext-date-time-input-rac-7vt7qkXQ.js} +1 -1
- package/dist/component/{dext-dropdown-rac-Cxhp3hQk.js → dext-dropdown-rac-COYjf4Uk.js} +1 -1
- package/dist/component/{dext-email-rac-CpA5hnSl.js → dext-email-rac-BO6Yskyl.js} +1 -1
- package/dist/component/{dext-number-input-rac-_0BhXJKn.js → dext-number-input-rac-BuJsFHQD.js} +1 -1
- package/dist/component/{dext-phone-rac-rzdoB5YJ.js → dext-phone-rac-DRhEZS0m.js} +1 -1
- package/dist/component/{dext-radio-group-rac-CQVwB4Ey.js → dext-radio-group-rac-B-SA0ITv.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D_CTi2xa.js → dext-rating-input-rac-BcpLyQSP.js} +1 -1
- package/dist/component/{dext-tags-rac-5HLAKnUE.js → dext-tags-rac-B1WsqTOk.js} +2 -2
- package/dist/component/{dext-text-area-rac-DSjq3lLs.js → dext-text-area-rac-CKmb1-ax.js} +1 -1
- package/dist/component/{dext-text-input-rac-B9bYNp4-.js → dext-text-input-rac-BuaASOlx.js} +1 -1
- package/dist/component/{dext-url-input-rac-BePEEdAf.js → dext-url-input-rac-CfgYYrVy.js} +1 -1
- package/dist/component/{dismiss-icon-CjOV4_J8.js → dismiss-icon-D3_Zzj5l.js} +1 -1
- package/dist/component/{donation-rac-mKjY256K.js → donation-rac-V5cUDRDx.js} +5 -5
- package/dist/component/{dropdown-field-rac-DOmL7_DY.js → dropdown-field-rac-CONU5tZT.js} +3 -3
- package/dist/component/{dropdown-rac-DmnP9Usg.js → dropdown-rac-C-cZX6Xk.js} +1 -1
- package/dist/component/{ecom-address-rac-CgtdxkRl.js → ecom-address-rac-Tyicsyps.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-C8qt8iqj.js → ecom-subscription-checkbox-rac-CbDEpoPe.js} +2 -2
- package/dist/component/{email-input-field-rac-D6ZmdvBn.js → email-input-field-rac-XB5amz6S.js} +3 -3
- package/dist/component/{events-repeater-rac-CNTAWLn5.js → events-repeater-rac-BJFbVm9p.js} +4 -4
- package/dist/component/{events-rsvp-rac-eVjqML27.js → events-rsvp-rac-D4cdZGgV.js} +3 -3
- package/dist/component/{field-error-headless-CBInIAMD.js → field-error-headless-BsV6YLEM.js} +1 -1
- package/dist/component/{field-label-headless-DV4KBQmG.js → field-label-headless-D-kBcceK.js} +1 -1
- package/dist/component/{file-upload-rac-CrrDfZSa.js → file-upload-rac-C43lnrDd.js} +4 -4
- package/dist/component/{fixed-payment-rac-Bkn5klPT.js → fixed-payment-rac-CEUGUzXs.js} +3 -3
- package/dist/component/{form-B1uAYoBy.js → form-CX77qB-O.js} +106 -106
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DSX3MNZb.js → header-field-rac-DMRhxDkn.js} +2 -2
- package/dist/component/{header-rac-BYn1jiFB.js → header-rac-CH6Japn4.js} +1 -1
- package/dist/component/{image-choice-rac-CMi9bw4W.js → image-choice-rac-D7B03yyE.js} +4 -4
- package/dist/component/{index-XnVV9Wkp.js → index-K1Qe5Lva.js} +2 -2
- package/dist/component/{index-DYQsCsW0.js → index-bEqqR2UB.js} +4 -4
- package/dist/component/{isObjectLike-D1IFTIp7.js → isObjectLike-B3s7YV-O.js} +1 -1
- package/dist/component/{messages_ar-Dhf97hZN.js → messages_ar-B6uCTgcN.js} +1 -0
- package/dist/component/{messages_bg-BeJMZnb1.js → messages_bg-BFuS7TPj.js} +1 -0
- package/dist/component/{messages_ca-FzoGNoi6.js → messages_ca-CvVD9mIv.js} +1 -0
- package/dist/component/{messages_cs-dJg-S-VV.js → messages_cs-CWmB4Kz9.js} +1 -0
- package/dist/component/{messages_da-C2-Fog1K.js → messages_da-B9s-tqCO.js} +1 -0
- package/dist/component/{messages_de-CrJmBBnw.js → messages_de-BY27LmJ4.js} +1 -0
- package/dist/component/{messages_el-C-h7hh9l.js → messages_el-J5LMcTZs.js} +1 -0
- package/dist/component/{messages_en-BoLHYzfk.js → messages_en-DDof8mV7.js} +1 -0
- package/dist/component/{messages_es-Bqncgrm3.js → messages_es-DKrlHNYT.js} +1 -0
- package/dist/component/{messages_fi-m9PtcTFj.js → messages_fi-CXk1cPhB.js} +1 -0
- package/dist/component/{messages_fr-DfJ58fol.js → messages_fr-C_lxUyul.js} +1 -0
- package/dist/component/{messages_he-CoclVWwo.js → messages_he-hc43rTsV.js} +1 -0
- package/dist/component/{messages_hi-Darb2Wre.js → messages_hi-ZrTPuaQM.js} +1 -0
- package/dist/component/{messages_hr-DCj--HTl.js → messages_hr-CroIWJjw.js} +1 -0
- package/dist/component/{messages_hu-_bnixMGc.js → messages_hu-CIPloTUq.js} +1 -0
- package/dist/component/{messages_id-yes_fXE1.js → messages_id-MozJSkHs.js} +1 -0
- package/dist/component/{messages_it-BudI37gU.js → messages_it-eBibvIY6.js} +1 -0
- package/dist/component/{messages_ja-CJTuWnh9.js → messages_ja-DiMta9AM.js} +1 -0
- package/dist/component/{messages_ko-DEaDT3oj.js → messages_ko-kaXc3Nbs.js} +1 -0
- package/dist/component/{messages_lt-BvUk2JkF.js → messages_lt-cCevoO30.js} +1 -0
- package/dist/component/{messages_lv-DCiE-_f6.js → messages_lv-BeNCa5qQ.js} +1 -0
- package/dist/component/{messages_ms-DvPCPAKs.js → messages_ms-xEnRDKOZ.js} +1 -0
- package/dist/component/{messages_nl-D65liJio.js → messages_nl-D6_hXFvr.js} +1 -0
- package/dist/component/{messages_no-Pe1StTZy.js → messages_no-BVaDEh--.js} +1 -0
- package/dist/component/{messages_pl-BNLtxXCG.js → messages_pl-C0exvdXI.js} +1 -0
- package/dist/component/{messages_pt-SO-GIQyK.js → messages_pt-Dkla49UJ.js} +1 -0
- package/dist/component/{messages_ro-JcT63Xu7.js → messages_ro-BpvEyVQv.js} +1 -0
- package/dist/component/{messages_ru-CPvSPih6.js → messages_ru-BT14xpfy.js} +1 -0
- package/dist/component/{messages_sk--ehi9Nro.js → messages_sk-wHlAmpoI.js} +1 -0
- package/dist/component/{messages_sl-B9P4YEyY.js → messages_sl-DGaP8nJp.js} +1 -0
- package/dist/component/{messages_sv-Bc10MHfh.js → messages_sv-XA33BRUx.js} +1 -0
- package/dist/component/{messages_th-CQ51IfmH.js → messages_th-B_INKeJ7.js} +1 -0
- package/dist/component/{messages_tl-B5dCLtFs.js → messages_tl-BK7JuHIh.js} +1 -0
- package/dist/component/{messages_tr-WJiUU0ct.js → messages_tr-C7dImceu.js} +1 -0
- package/dist/component/{messages_uk-Dg4znI3c.js → messages_uk-VTWRJdy2.js} +1 -0
- package/dist/component/{messages_vi-CUnl67kQ.js → messages_vi-C1M6Yv8J.js} +1 -0
- package/dist/component/{messages_zh-CV-gVrcI.js → messages_zh-Bi5Wx-Fv.js} +1 -0
- package/dist/component/multiline-address-field-rac-kV04oJUn.js +1828 -0
- package/dist/component/{multiline-address-rac-DL199k_x.js → multiline-address-rac-CLrhCkDN.js} +1 -1
- package/dist/component/{number-input-field-rac-JmonZiSz.js → number-input-field-rac-9p3pjh_D.js} +4 -4
- package/dist/component/{number-input-rac-CXXuNJv5.js → number-input-rac-BRWBLJxB.js} +1 -1
- package/dist/component/{password-rac-CCN-CJEe.js → password-rac-DVGgr_Mk.js} +4 -4
- package/dist/component/{payment-input-rac-C9hrBzZx.js → payment-input-rac-BX0d3hQr.js} +4 -4
- package/dist/component/phone-input-field-rac-BmZgXCpn.js +603 -0
- package/dist/component/{phone-rac-DUGx4mGi.js → phone-rac-B2RRuoqK.js} +1 -1
- package/dist/component/{product-list-rac-fxGEBQac.js → product-list-rac-D6c1IsnT.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-MPTXz8Cu.js → quiz-radio-group-rac-RnpAxtzg.js} +1 -1
- package/dist/component/{radio-button-module-classes-DyYUSl5o.js → radio-button-module-classes-bz-Ns1Ze.js} +3 -3
- package/dist/component/{radio-group-field-rac-CrmkbfuW.js → radio-group-field-rac-D_GV6yUr.js} +4 -4
- package/dist/component/{radio-group-rac-CsowZhl8.js → radio-group-rac-Cd8Qs8ot.js} +1 -1
- package/dist/component/{rating-input-field-rac-SiHlMtly.js → rating-input-field-rac-BtkAsxnV.js} +4 -4
- package/dist/component/{rating-input-rac-DXRb8Hjv.js → rating-input-rac-BRbonnej.js} +1 -1
- package/dist/component/{rich-content-rac.module-BcqSpi17.js → rich-content-rac.module-pbp1zCM5.js} +1 -1
- package/dist/component/{rich-text-field-rac-Ik1cWY9H.js → rich-text-field-rac-1L72ZPhI.js} +2 -2
- package/dist/component/{rich-text-rac-BIAPuNWy.js → rich-text-rac-DobfXm_8.js} +1 -1
- package/dist/component/{service-dropdown-rac-C-ivm8sd.js → service-dropdown-rac-BMhCmTAX.js} +4 -4
- package/dist/component/{services-multi-choice-rac-BaFFFJpX.js → services-multi-choice-rac-D7lRSVJl.js} +5 -5
- package/dist/component/{signature-rac-BZBC-nmD.js → signature-rac-Bco76ERn.js} +4 -4
- package/dist/component/{submit-button-rac-DHylWJnK.js → submit-button-rac-DQ17YXxg.js} +2 -2
- package/dist/component/{tags-field-rac-FMK19M5h.js → tags-field-rac-C1yKETDx.js} +5 -5
- package/dist/component/{tags-rac-CH6YHlp4.js → tags-rac-BcCspqlQ.js} +1 -1
- package/dist/component/{text-area-field-rac-r8O6HyU3.js → text-area-field-rac-C3XojWXx.js} +4 -4
- package/dist/component/{text-area-rac-BD100QYM.js → text-area-rac-C0JcRjAe.js} +1 -1
- package/dist/component/{text-input-field-rac-DDRG3cfb.js → text-input-field-rac-CHTVRczd.js} +3 -3
- package/dist/component/{text-input-headless-TEmX8piX.js → text-input-headless-B2tCTuxV.js} +3 -3
- package/dist/component/{text-input-rac-Va4l5vzg.js → text-input-rac-CfTBffAi.js} +1 -1
- package/dist/component/{time-input-rac-wchwGOoj.js → time-input-rac-BWE01iMt.js} +6 -6
- package/dist/component/{url-input-field-rac-BzABcDX7.js → url-input-field-rac-C-8qKrsK.js} +4 -4
- package/dist/component/{url-input-rac-C8AI9XyZ.js → url-input-rac-C0638Rq7.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-CWzaXzXZ.js → use-dropdown-option-class-name-CpJ8B7ag.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-Ul2EwQ_0.js → use-dropdown-trigger-class-name-yVvlOwvq.js} +7 -7
- package/dist/component/{use-element-state-class-name-BDRRB7Xj.js → use-element-state-class-name-Dn2rGGPS.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-Cls93_JF.js → use-hoverable-input-class-name-P-qLEa8M.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-BG3ujqxx.js → use-is-forced-open-dropdown-COLJ2DzU.js} +1 -1
- package/dist/component/{use-native-mobile-input-CThbfprl.js → use-native-mobile-input-CFCIHZiu.js} +1 -1
- package/dist/component/{use-service-options-base-DYUrMRXR.js → use-service-options-base-D8BHHfgi.js} +1 -1
- package/dist/component/use-text-input-class-name-D7eW2Lkq.js +6 -0
- package/package.json +2 -2
- package/dist/component/multiline-address-field-rac-DWasVZf-.js +0 -1818
- package/dist/component/phone-input-field-rac-vxg49cas.js +0 -558
- package/dist/component/use-text-input-class-name-CvP3SARU.js +0 -6
|
@@ -0,0 +1,1828 @@
|
|
|
1
|
+
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
|
+
import L from "classnames";
|
|
3
|
+
import n, { useMemo as x, createContext as je, useContext as ye, useState as fe, useRef as B, useCallback as A, useEffect as we } from "react";
|
|
4
|
+
import { bI as Je, d as Xe, bD as Wt, bF as gt, bf as Yt, bg as Ht, b8 as jt, be as X, F as z, bY as Me, bv as Et, bN as _, bK as P, bP as G, bW as Ce, bJ as Dt, bk as Jt, C as Se, bt as Xt, bx as Qt, bU as zt, bO as Gt, bT as Zt, bB as en, bA as tn, bp as nn, bz as rn, bQ as on, aP as sn, Y as an, _ as te, am as ne, $ as Oe, M as re, I as oe, Z as bt, a0 as ln, a1 as cn } from "./form-CX77qB-O.js";
|
|
5
|
+
import { mergeProps as ht, UNSAFE_PortalProvider as dn } from "react-aria";
|
|
6
|
+
import { f as b, a as h } from "./find-child-C60k4CxG.js";
|
|
7
|
+
import { F as un, V as mn } from "./headless-styles-CmcyA_pi.js";
|
|
8
|
+
import { c as pn } from "./use-is-forced-open-dropdown-COLJ2DzU.js";
|
|
9
|
+
import { TextField as Ie, Input as de, ComboBoxStateContext as Be, ComboBox as he, Popover as Fe, ListBox as qe, ListBoxItem as Ae, Group as Ft, Button as At } from "react-aria-components";
|
|
10
|
+
import { D as ue, E as me } from "./field-error-headless-BsV6YLEM.js";
|
|
11
|
+
import { L as pe } from "./field-label-headless-D-kBcceK.js";
|
|
12
|
+
import { e as En, c as bn, a as fn, r as _t } from "./isObjectLike-B3s7YV-O.js";
|
|
13
|
+
import { u as Rt, N as Pt } from "./use-native-mobile-input-CFCIHZiu.js";
|
|
14
|
+
import { N as Tt } from "./native-select-BbxBpe3S.js";
|
|
15
|
+
import { u as wt } from "./use-native-state-class-name-B0m2ghbS.js";
|
|
16
|
+
import { V as yn, a as Cn } from "./use-dropdown-option-class-name-CpJ8B7ag.js";
|
|
17
|
+
import { u as In } from "./use-invoke-callback-UH73A_J3.js";
|
|
18
|
+
import { C as Pe } from "./chevron-down-icon-CcpVm6B-.js";
|
|
19
|
+
import { E as se } from "./error-icon-hZxQ6DEy.js";
|
|
20
|
+
import { H as xe } from "./custom-focus-class-_483Pkwp.js";
|
|
21
|
+
import { s as I } from "./field-rac.module-D0QzJXUv.js";
|
|
22
|
+
import { u as ke } from "./use-hoverable-input-class-name-P-qLEa8M.js";
|
|
23
|
+
const Nn = (e, t, r) => {
|
|
24
|
+
var s, a, i, l;
|
|
25
|
+
const o = (s = e.steps) == null ? void 0 : s.map((u) => {
|
|
26
|
+
var d, m, C, y, p, E;
|
|
27
|
+
return {
|
|
28
|
+
...u,
|
|
29
|
+
layout: {
|
|
30
|
+
...u.layout,
|
|
31
|
+
large: {
|
|
32
|
+
...(d = u.layout) == null ? void 0 : d.large,
|
|
33
|
+
items: ((y = (C = (m = u.layout) == null ? void 0 : m.large) == null ? void 0 : C.items) == null ? void 0 : y.map((f) => ({
|
|
34
|
+
...f,
|
|
35
|
+
row: r.row <= f.row ? (f.row || 0) + 1 : f.row
|
|
36
|
+
}))) || ((E = (p = u.layout) == null ? void 0 : p.large) == null ? void 0 : E.items)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
return (l = (i = (a = o == null ? void 0 : o[0].layout) == null ? void 0 : a.large) == null ? void 0 : i.items) == null || l.unshift(r), {
|
|
42
|
+
...e,
|
|
43
|
+
fields: [
|
|
44
|
+
t,
|
|
45
|
+
...e.fields || []
|
|
46
|
+
],
|
|
47
|
+
steps: o || e.steps
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
var Ne = /* @__PURE__ */ (function(e) {
|
|
51
|
+
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;
|
|
52
|
+
})({});
|
|
53
|
+
function Ln(e, t, r = !1) {
|
|
54
|
+
const { country: o, subdivision: s, city: a, addressLine: i, streetAddress: l, addressLine2: u, postalCode: d } = e, m = {};
|
|
55
|
+
return t ? (o && (m.country = o), s && (m.subdivision = s), a && (m.city = a), i ? m.addressLine = i : l != null && l.formattedAddressLine && (m.addressLine = l == null ? void 0 : l.formattedAddressLine), u && (m.addressLine = u), d && (m.postalCode = d), l != null && l.apt && (m.apartment = l == null ? void 0 : l.apt), l != null && l.name ? m.streetName = l == null ? void 0 : l.name : r && (l != null && l.formattedAddressLine) && (m.streetName = l == null ? void 0 : l.formattedAddressLine), l != null && l.number && (m.streetNumber = l.number)) : (o && (m.country = o), s && (m.subdivision = s), a && (m.city = a), i ? m.address_line = i : l != null && l.formattedAddressLine && (m.address_line = l == null ? void 0 : l.formattedAddressLine), u && (m.address_line = u), d && (m.postal_code = d), l != null && l.apt && (m.apartment = l == null ? void 0 : l.apt), l != null && l.name ? m.street_name = l == null ? void 0 : l.name : r && (l != null && l.formattedAddressLine) && (m.street_name = l == null ? void 0 : l.formattedAddressLine), l != null && l.number && (m.street_number = l.number)), m;
|
|
56
|
+
}
|
|
57
|
+
const Mt = /* @__PURE__ */ je({
|
|
58
|
+
onAddressSelect: () => {
|
|
59
|
+
}
|
|
60
|
+
}), vn = ({ children: e, onAddressSelect: t, autocompleteEnabled: r }) => {
|
|
61
|
+
const o = x(() => ({
|
|
62
|
+
onAddressSelect: t,
|
|
63
|
+
autocompleteEnabled: r
|
|
64
|
+
}), [
|
|
65
|
+
t,
|
|
66
|
+
r
|
|
67
|
+
]);
|
|
68
|
+
return /* @__PURE__ */ n.createElement(Mt.Provider, {
|
|
69
|
+
value: o
|
|
70
|
+
}, e);
|
|
71
|
+
};
|
|
72
|
+
function Le() {
|
|
73
|
+
return ye(Mt);
|
|
74
|
+
}
|
|
75
|
+
const Bt = /* @__PURE__ */ je(void 0), On = ({ children: e, countryCode: t }) => {
|
|
76
|
+
const r = x(() => ({
|
|
77
|
+
countryCode: t
|
|
78
|
+
}), [
|
|
79
|
+
t
|
|
80
|
+
]);
|
|
81
|
+
return /* @__PURE__ */ n.createElement(Bt.Provider, {
|
|
82
|
+
value: r
|
|
83
|
+
}, e);
|
|
84
|
+
};
|
|
85
|
+
function ve() {
|
|
86
|
+
const e = ye(Bt);
|
|
87
|
+
return e == null ? void 0 : e.countryCode;
|
|
88
|
+
}
|
|
89
|
+
function Ue(e) {
|
|
90
|
+
return e != null;
|
|
91
|
+
}
|
|
92
|
+
function Sn(e, t, r) {
|
|
93
|
+
return !t || !r ? e : {
|
|
94
|
+
...e,
|
|
95
|
+
fields: (e.fields ?? []).map((o) => {
|
|
96
|
+
const { show: s, ...a } = t[o.target] || {}, { required: i } = r[o.target] || {};
|
|
97
|
+
return {
|
|
98
|
+
...o,
|
|
99
|
+
view: {
|
|
100
|
+
...o.view,
|
|
101
|
+
...a
|
|
102
|
+
},
|
|
103
|
+
...Ue(s) && {
|
|
104
|
+
hidden: !s
|
|
105
|
+
},
|
|
106
|
+
...Ue(i) && Ue(o.validation) && {
|
|
107
|
+
validation: {
|
|
108
|
+
...o.validation,
|
|
109
|
+
required: i
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
})
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
const gn = (e, t) => e.map((r) => ({
|
|
117
|
+
...r,
|
|
118
|
+
id: ("target" in r ? t[r.target] : void 0) ?? r.id
|
|
119
|
+
})), qt = 12, Dn = (e) => {
|
|
120
|
+
const t = e.filter((o) => !o.properties.hidden), r = e.filter((o) => o.properties.hidden);
|
|
121
|
+
return {
|
|
122
|
+
visibleFields: t,
|
|
123
|
+
hiddenFields: r
|
|
124
|
+
};
|
|
125
|
+
}, hn = (e) => {
|
|
126
|
+
const t = {};
|
|
127
|
+
return e.forEach((r) => {
|
|
128
|
+
const o = r.layout.row;
|
|
129
|
+
t[o] || (t[o] = []), t[o].push(r);
|
|
130
|
+
}), t;
|
|
131
|
+
}, Fn = (e) => {
|
|
132
|
+
const t = {};
|
|
133
|
+
return Object.keys(e).forEach((r) => {
|
|
134
|
+
const o = parseInt(r, 10), s = e[o];
|
|
135
|
+
s.reduce((i, l) => i + l.layout.width, 0) !== qt && (t[o] = s);
|
|
136
|
+
}), t;
|
|
137
|
+
}, An = (e, t) => e.map((r) => {
|
|
138
|
+
const o = r.layout.row;
|
|
139
|
+
if (t[o] && !r.properties.hidden) {
|
|
140
|
+
const s = t[o], a = s.length, i = qt / a, l = s.findIndex((d) => d.id === r.id), u = i * l;
|
|
141
|
+
return {
|
|
142
|
+
...r,
|
|
143
|
+
layout: {
|
|
144
|
+
...r.layout,
|
|
145
|
+
width: i,
|
|
146
|
+
column: u
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
return r;
|
|
151
|
+
}), _n = (e, t, r) => {
|
|
152
|
+
const o = Math.max(...t.map((s) => s.layout.row), -1);
|
|
153
|
+
return e.map((s) => {
|
|
154
|
+
if (s.properties.hidden) {
|
|
155
|
+
const a = r.findIndex((i) => i.id === s.id);
|
|
156
|
+
return {
|
|
157
|
+
...s,
|
|
158
|
+
layout: {
|
|
159
|
+
...s.layout,
|
|
160
|
+
row: o + 1 + a
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return s;
|
|
165
|
+
});
|
|
166
|
+
}, Rn = (e) => {
|
|
167
|
+
const { visibleFields: t, hiddenFields: r } = Dn(e.fields), o = hn(t), s = Fn(o), a = An(e.fields, s), i = _n(a, t, r);
|
|
168
|
+
return {
|
|
169
|
+
...e,
|
|
170
|
+
fields: i
|
|
171
|
+
};
|
|
172
|
+
}, Pn = () => ({
|
|
173
|
+
country: X(),
|
|
174
|
+
subdivision: X(),
|
|
175
|
+
city: X(),
|
|
176
|
+
address_line: X(),
|
|
177
|
+
address_line_2: X(),
|
|
178
|
+
postal_code: X(),
|
|
179
|
+
street_name: X(),
|
|
180
|
+
street_number: X(),
|
|
181
|
+
apartment: X()
|
|
182
|
+
}), Tn = ({ id: e, target: t, fieldType: r, form: o, country: s, fieldSettings: a, validation: i, required: l }) => {
|
|
183
|
+
const [u] = fe(Pn), { isExperimentEnabled: d } = Je(), m = d(Xe.USE_FIELDS_V2), { getCountryAddressForm: C } = Wt(), { isMobile: y, breakpoint: p } = gt(), E = C(s), f = r === z.MULTILINE_ADDRESS || r === z.BOOKINGS_ADDRESS, N = x(() => {
|
|
184
|
+
var O;
|
|
185
|
+
return Yt(l, (O = i == null ? void 0 : i.predefined) == null ? void 0 : O.multilineAddressOptions);
|
|
186
|
+
}, [
|
|
187
|
+
i,
|
|
188
|
+
l
|
|
189
|
+
]), v = x(() => Ht(), []);
|
|
190
|
+
return {
|
|
191
|
+
form: x(() => {
|
|
192
|
+
var T, S;
|
|
193
|
+
if (!f || !E)
|
|
194
|
+
return o && {
|
|
195
|
+
...o,
|
|
196
|
+
fields: gn(o.fields, u)
|
|
197
|
+
};
|
|
198
|
+
const O = jt({
|
|
199
|
+
useFieldsV2: m,
|
|
200
|
+
path: t,
|
|
201
|
+
parentId: e,
|
|
202
|
+
includeHiddenFields: !0,
|
|
203
|
+
isMobile: y,
|
|
204
|
+
breakpoint: p,
|
|
205
|
+
form: Sn(Nn(E, N, v), a, (S = (T = i == null ? void 0 : i.predefined) == null ? void 0 : T.multilineAddressOptions) == null ? void 0 : S.fields)
|
|
206
|
+
});
|
|
207
|
+
if (!O.fields.some((F) => F.properties.hidden))
|
|
208
|
+
return O;
|
|
209
|
+
const w = Rn(O);
|
|
210
|
+
return {
|
|
211
|
+
...w,
|
|
212
|
+
fields: w.fields.filter((F) => !F.properties.hidden)
|
|
213
|
+
};
|
|
214
|
+
}, [
|
|
215
|
+
E,
|
|
216
|
+
o,
|
|
217
|
+
u,
|
|
218
|
+
a,
|
|
219
|
+
i,
|
|
220
|
+
t,
|
|
221
|
+
N,
|
|
222
|
+
v,
|
|
223
|
+
f,
|
|
224
|
+
m,
|
|
225
|
+
e,
|
|
226
|
+
y,
|
|
227
|
+
p
|
|
228
|
+
]),
|
|
229
|
+
isMultilineAddressField: f
|
|
230
|
+
};
|
|
231
|
+
}, xt = /* @__PURE__ */ je(void 0), wn = ({ children: e, fields: t }) => {
|
|
232
|
+
const r = x(() => ({
|
|
233
|
+
fields: t
|
|
234
|
+
}), [
|
|
235
|
+
t
|
|
236
|
+
]);
|
|
237
|
+
return /* @__PURE__ */ n.createElement(xt.Provider, {
|
|
238
|
+
value: r
|
|
239
|
+
}, e);
|
|
240
|
+
};
|
|
241
|
+
function Ee(e) {
|
|
242
|
+
const t = ye(xt);
|
|
243
|
+
if (!t)
|
|
244
|
+
throw new Error("useAddressFields must be used within AddressFieldsProvider");
|
|
245
|
+
return t.fields[e];
|
|
246
|
+
}
|
|
247
|
+
function be(e) {
|
|
248
|
+
const { t } = Me(), r = ve(), o = r && Et.getCountryByShortKey(r), a = (o ? o.addressPartDisplayNames : Et.getDefaultAddressDisplayNames())[e];
|
|
249
|
+
return a ? t(a) : "";
|
|
250
|
+
}
|
|
251
|
+
const ae = ({ children: e }) => {
|
|
252
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m } = _(), { labelId: C } = P(), y = be("addressLine2"), p = b(e, ae.Label), E = b(e, ae.Input), f = b(e, ae.Description), N = b(e, ae.Error);
|
|
253
|
+
return /* @__PURE__ */ n.createElement(m, {
|
|
254
|
+
fieldId: t,
|
|
255
|
+
renderLabel: () => h(p, {
|
|
256
|
+
label: y
|
|
257
|
+
}),
|
|
258
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
259
|
+
"aria-labelledby": C,
|
|
260
|
+
value: r ?? "",
|
|
261
|
+
onChange: o,
|
|
262
|
+
isDisabled: s,
|
|
263
|
+
isReadOnly: a,
|
|
264
|
+
isRequired: i,
|
|
265
|
+
isInvalid: l,
|
|
266
|
+
onBlur: u,
|
|
267
|
+
onFocus: d
|
|
268
|
+
}, E),
|
|
269
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
270
|
+
});
|
|
271
|
+
}, Mn = ({ className: e }) => {
|
|
272
|
+
const { id: t, placeholder: r } = _(), { inputId: o, ariaDescribedBy: s } = P(), a = B(null);
|
|
273
|
+
return G(() => {
|
|
274
|
+
var i;
|
|
275
|
+
(i = a.current) == null || i.focus({
|
|
276
|
+
preventScroll: !0
|
|
277
|
+
});
|
|
278
|
+
}, t), Ce(a), /* @__PURE__ */ n.createElement(de, {
|
|
279
|
+
ref: a,
|
|
280
|
+
id: o,
|
|
281
|
+
autoComplete: "address-line2",
|
|
282
|
+
"aria-describedby": s,
|
|
283
|
+
className: e,
|
|
284
|
+
placeholder: r
|
|
285
|
+
});
|
|
286
|
+
};
|
|
287
|
+
ae.Label = pe;
|
|
288
|
+
ae.Input = Mn;
|
|
289
|
+
ae.Description = ue;
|
|
290
|
+
ae.Error = me;
|
|
291
|
+
const Bn = "route", qn = (e) => {
|
|
292
|
+
var t;
|
|
293
|
+
return ((t = e.types) == null ? void 0 : t.includes(Bn)) ?? !1;
|
|
294
|
+
}, xn = /[\s,]+/, ft = (e) => e ? e.toLowerCase().split(xn) : [], kt = (e, t, r) => {
|
|
295
|
+
if (!e || !t)
|
|
296
|
+
return !1;
|
|
297
|
+
const o = ft(r);
|
|
298
|
+
return ft(e).filter((s) => !o.includes(s)).includes(t.toLowerCase());
|
|
299
|
+
}, yt = (e) => e.split("-")[0], kn = (e, t) => !e.postalCode || !t.postalCode || yt(e.postalCode) === yt(t.postalCode), Un = (e, t) => {
|
|
300
|
+
var r, o, s, a, i;
|
|
301
|
+
return !!((r = e.streetAddress) != null && r.name) && ((s = (o = e.streetAddress) == null ? void 0 : o.name) == null ? void 0 : s.toLowerCase()) === ((i = (a = t.streetAddress) == null ? void 0 : a.name) == null ? void 0 : i.toLowerCase());
|
|
302
|
+
}, Kn = (e, t) => t.country === e.country && t.subdivision === e.subdivision && kn(e, t) && Un(e, t), $n = async (e, t, r) => {
|
|
303
|
+
var o, s;
|
|
304
|
+
try {
|
|
305
|
+
const a = await r({
|
|
306
|
+
query: e,
|
|
307
|
+
countryCode: t.country ?? void 0
|
|
308
|
+
});
|
|
309
|
+
return (s = (o = a == null ? void 0 : a.find((i) => {
|
|
310
|
+
var l, u;
|
|
311
|
+
return Kn(t, i) && kt(e, (l = i.streetAddress) == null ? void 0 : l.number, (u = t.streetAddress) == null ? void 0 : u.name);
|
|
312
|
+
})) == null ? void 0 : o.streetAddress) == null ? void 0 : s.number;
|
|
313
|
+
} catch {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
}, Vn = (e, t, r) => {
|
|
317
|
+
const o = {
|
|
318
|
+
...e.streetAddress,
|
|
319
|
+
number: t
|
|
320
|
+
};
|
|
321
|
+
return kt(r, t) ? {
|
|
322
|
+
...e,
|
|
323
|
+
...e.addressLine ? {
|
|
324
|
+
addressLine: r
|
|
325
|
+
} : {},
|
|
326
|
+
streetAddress: {
|
|
327
|
+
...o,
|
|
328
|
+
formattedAddressLine: r
|
|
329
|
+
}
|
|
330
|
+
} : {
|
|
331
|
+
...e,
|
|
332
|
+
streetAddress: o
|
|
333
|
+
};
|
|
334
|
+
}, Wn = async ({ searchId: e, prediction: t, getPlace: r, searchByQuery: o }) => {
|
|
335
|
+
var i, l;
|
|
336
|
+
const s = await r({
|
|
337
|
+
searchId: e
|
|
338
|
+
});
|
|
339
|
+
if (!s || (i = s.streetAddress) != null && i.number || !(t != null && t.description) || !qn(t) || !o)
|
|
340
|
+
return s;
|
|
341
|
+
const a = await $n(t.description, s, o);
|
|
342
|
+
return a ? Vn(s, a, (l = t.textStructure) == null ? void 0 : l.mainText) : s;
|
|
343
|
+
}, Qe = ({ enabled: e }) => {
|
|
344
|
+
const { actions: t } = Dt(), { isExperimentEnabled: r } = Je(), o = r(Xe.ADDRESS_HOUSE_NUMBER_FALLBACK), [s, a] = fe(X()), i = A(() => a(X()), []), l = B(0);
|
|
345
|
+
return x(() => {
|
|
346
|
+
const { predict: u, getPlace: d, searchByPostalCode: m, searchByQuery: C } = t ?? {};
|
|
347
|
+
if (!e || !u || !d || !m)
|
|
348
|
+
return;
|
|
349
|
+
const y = (p) => d({
|
|
350
|
+
...p,
|
|
351
|
+
sessionToken: s,
|
|
352
|
+
refreshSessionToken: i
|
|
353
|
+
});
|
|
354
|
+
return {
|
|
355
|
+
predict: (p) => u({
|
|
356
|
+
...p,
|
|
357
|
+
sessionToken: s
|
|
358
|
+
}),
|
|
359
|
+
getPlace: y,
|
|
360
|
+
searchByPostalCode: (p) => m({
|
|
361
|
+
...p,
|
|
362
|
+
sessionToken: s
|
|
363
|
+
}),
|
|
364
|
+
resolvePlace: async (p) => {
|
|
365
|
+
const E = ++l.current, f = await Wn({
|
|
366
|
+
...p,
|
|
367
|
+
getPlace: y,
|
|
368
|
+
searchByQuery: o ? C : void 0
|
|
369
|
+
});
|
|
370
|
+
return E === l.current ? f : void 0;
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
}, [
|
|
374
|
+
e,
|
|
375
|
+
t,
|
|
376
|
+
s,
|
|
377
|
+
i,
|
|
378
|
+
o
|
|
379
|
+
]);
|
|
380
|
+
};
|
|
381
|
+
var Ke, Ct;
|
|
382
|
+
function Yn() {
|
|
383
|
+
if (Ct) return Ke;
|
|
384
|
+
Ct = 1;
|
|
385
|
+
var e = En(), t = function() {
|
|
386
|
+
return e.Date.now();
|
|
387
|
+
};
|
|
388
|
+
return Ke = t, Ke;
|
|
389
|
+
}
|
|
390
|
+
var $e, It;
|
|
391
|
+
function Hn() {
|
|
392
|
+
if (It) return $e;
|
|
393
|
+
It = 1;
|
|
394
|
+
var e = /\s/;
|
|
395
|
+
function t(r) {
|
|
396
|
+
for (var o = r.length; o-- && e.test(r.charAt(o)); )
|
|
397
|
+
;
|
|
398
|
+
return o;
|
|
399
|
+
}
|
|
400
|
+
return $e = t, $e;
|
|
401
|
+
}
|
|
402
|
+
var Ve, Nt;
|
|
403
|
+
function jn() {
|
|
404
|
+
if (Nt) return Ve;
|
|
405
|
+
Nt = 1;
|
|
406
|
+
var e = Hn(), t = /^\s+/;
|
|
407
|
+
function r(o) {
|
|
408
|
+
return o && o.slice(0, e(o) + 1).replace(t, "");
|
|
409
|
+
}
|
|
410
|
+
return Ve = r, Ve;
|
|
411
|
+
}
|
|
412
|
+
var We, Lt;
|
|
413
|
+
function Jn() {
|
|
414
|
+
if (Lt) return We;
|
|
415
|
+
Lt = 1;
|
|
416
|
+
var e = bn(), t = fn(), r = "[object Symbol]";
|
|
417
|
+
function o(s) {
|
|
418
|
+
return typeof s == "symbol" || t(s) && e(s) == r;
|
|
419
|
+
}
|
|
420
|
+
return We = o, We;
|
|
421
|
+
}
|
|
422
|
+
var Ye, vt;
|
|
423
|
+
function Xn() {
|
|
424
|
+
if (vt) return Ye;
|
|
425
|
+
vt = 1;
|
|
426
|
+
var e = jn(), t = _t(), r = Jn(), o = NaN, s = /^[-+]0x[0-9a-f]+$/i, a = /^0b[01]+$/i, i = /^0o[0-7]+$/i, l = parseInt;
|
|
427
|
+
function u(d) {
|
|
428
|
+
if (typeof d == "number")
|
|
429
|
+
return d;
|
|
430
|
+
if (r(d))
|
|
431
|
+
return o;
|
|
432
|
+
if (t(d)) {
|
|
433
|
+
var m = typeof d.valueOf == "function" ? d.valueOf() : d;
|
|
434
|
+
d = t(m) ? m + "" : m;
|
|
435
|
+
}
|
|
436
|
+
if (typeof d != "string")
|
|
437
|
+
return d === 0 ? d : +d;
|
|
438
|
+
d = e(d);
|
|
439
|
+
var C = a.test(d);
|
|
440
|
+
return C || i.test(d) ? l(d.slice(2), C ? 2 : 8) : s.test(d) ? o : +d;
|
|
441
|
+
}
|
|
442
|
+
return Ye = u, Ye;
|
|
443
|
+
}
|
|
444
|
+
var He, Ot;
|
|
445
|
+
function Qn() {
|
|
446
|
+
if (Ot) return He;
|
|
447
|
+
Ot = 1;
|
|
448
|
+
var e = _t(), t = Yn(), r = Xn(), o = "Expected a function", s = Math.max, a = Math.min;
|
|
449
|
+
function i(l, u, d) {
|
|
450
|
+
var m, C, y, p, E, f, N = 0, v = !1, D = !1, O = !0;
|
|
451
|
+
if (typeof l != "function")
|
|
452
|
+
throw new TypeError(o);
|
|
453
|
+
u = r(u) || 0, e(d) && (v = !!d.leading, D = "maxWait" in d, y = D ? s(r(d.maxWait) || 0, u) : y, O = "trailing" in d ? !!d.trailing : O);
|
|
454
|
+
function g(R) {
|
|
455
|
+
var k = m, M = C;
|
|
456
|
+
return m = C = void 0, N = R, p = l.apply(M, k), p;
|
|
457
|
+
}
|
|
458
|
+
function w(R) {
|
|
459
|
+
return N = R, E = setTimeout(F, u), v ? g(R) : p;
|
|
460
|
+
}
|
|
461
|
+
function T(R) {
|
|
462
|
+
var k = R - f, M = R - N, $ = u - k;
|
|
463
|
+
return D ? a($, y - M) : $;
|
|
464
|
+
}
|
|
465
|
+
function S(R) {
|
|
466
|
+
var k = R - f, M = R - N;
|
|
467
|
+
return f === void 0 || k >= u || k < 0 || D && M >= y;
|
|
468
|
+
}
|
|
469
|
+
function F() {
|
|
470
|
+
var R = t();
|
|
471
|
+
if (S(R))
|
|
472
|
+
return q(R);
|
|
473
|
+
E = setTimeout(F, T(R));
|
|
474
|
+
}
|
|
475
|
+
function q(R) {
|
|
476
|
+
return E = void 0, O && m ? g(R) : (m = C = void 0, p);
|
|
477
|
+
}
|
|
478
|
+
function Q() {
|
|
479
|
+
E !== void 0 && clearTimeout(E), N = 0, m = f = C = E = void 0;
|
|
480
|
+
}
|
|
481
|
+
function Z() {
|
|
482
|
+
return E === void 0 ? p : q(t());
|
|
483
|
+
}
|
|
484
|
+
function U() {
|
|
485
|
+
var R = t(), k = S(R);
|
|
486
|
+
if (m = arguments, C = this, f = R, k) {
|
|
487
|
+
if (E === void 0)
|
|
488
|
+
return w(f);
|
|
489
|
+
if (D)
|
|
490
|
+
return clearTimeout(E), E = setTimeout(F, u), g(f);
|
|
491
|
+
}
|
|
492
|
+
return E === void 0 && (E = setTimeout(F, u)), p;
|
|
493
|
+
}
|
|
494
|
+
return U.cancel = Q, U.flush = Z, U;
|
|
495
|
+
}
|
|
496
|
+
return He = i, He;
|
|
497
|
+
}
|
|
498
|
+
var zn = Qn();
|
|
499
|
+
const Gn = /* @__PURE__ */ Jt(zn), Zn = (e, t, r = 200) => {
|
|
500
|
+
const o = B(e), s = A(Gn((...a) => {
|
|
501
|
+
o.current(...a);
|
|
502
|
+
}, r), [
|
|
503
|
+
r
|
|
504
|
+
]);
|
|
505
|
+
return we(() => {
|
|
506
|
+
o.current = e;
|
|
507
|
+
}, [
|
|
508
|
+
e,
|
|
509
|
+
t
|
|
510
|
+
]), s;
|
|
511
|
+
}, er = () => {
|
|
512
|
+
const e = B(!0);
|
|
513
|
+
return we(() => () => {
|
|
514
|
+
e.current = !1;
|
|
515
|
+
}, []), () => e.current;
|
|
516
|
+
}, St = {
|
|
517
|
+
loading: !1,
|
|
518
|
+
predictions: []
|
|
519
|
+
}, Ut = ({ atlas: e, onError: t }) => {
|
|
520
|
+
const [{ loading: o, predictions: s }, a] = fe(St), i = B(0), l = er(), u = A(() => {
|
|
521
|
+
i.current++, a(St);
|
|
522
|
+
}, []), d = Zn(async ({ input: m, countryCodes: C }) => {
|
|
523
|
+
if (!e || !l())
|
|
524
|
+
return;
|
|
525
|
+
if (!m) {
|
|
526
|
+
u();
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
const y = ++i.current;
|
|
530
|
+
a((E) => ({
|
|
531
|
+
...E,
|
|
532
|
+
loading: !0
|
|
533
|
+
}));
|
|
534
|
+
let p;
|
|
535
|
+
try {
|
|
536
|
+
p = await e.predict({
|
|
537
|
+
input: m,
|
|
538
|
+
countryCodes: C
|
|
539
|
+
});
|
|
540
|
+
} catch (E) {
|
|
541
|
+
t ? t(E) : console.error(E);
|
|
542
|
+
} finally {
|
|
543
|
+
const E = y === i.current;
|
|
544
|
+
l() && E && a((f) => ({
|
|
545
|
+
loading: !1,
|
|
546
|
+
// set new predictions if fetched properly, else keep current predictions
|
|
547
|
+
predictions: p || f.predictions
|
|
548
|
+
}));
|
|
549
|
+
}
|
|
550
|
+
}, [
|
|
551
|
+
e,
|
|
552
|
+
t
|
|
553
|
+
], 200);
|
|
554
|
+
return {
|
|
555
|
+
predictions: s,
|
|
556
|
+
loading: o,
|
|
557
|
+
updatePredictions: d,
|
|
558
|
+
clearPredictions: u
|
|
559
|
+
};
|
|
560
|
+
}, ze = ({ optionCount: e }) => {
|
|
561
|
+
const t = ye(Be), r = B(t);
|
|
562
|
+
r.current = t;
|
|
563
|
+
const o = B(e);
|
|
564
|
+
return we(() => {
|
|
565
|
+
const s = e > 0 && o.current === 0;
|
|
566
|
+
o.current = e;
|
|
567
|
+
const a = r.current;
|
|
568
|
+
s && (a != null && a.isFocused) && !a.isOpen && a.open(null, "manual");
|
|
569
|
+
}, [
|
|
570
|
+
e
|
|
571
|
+
]), null;
|
|
572
|
+
}, _e = () => {
|
|
573
|
+
const e = ye(Be);
|
|
574
|
+
return (t) => {
|
|
575
|
+
t.key === "ArrowDown" && (e != null && e.isOpen) && t.stopPropagation();
|
|
576
|
+
};
|
|
577
|
+
}, H = ({ children: e }) => {
|
|
578
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m, autocomplete: C } = _(), { labelId: y } = P(), { autocompleteEnabled: p } = Le(), E = C || p, f = be("addressLine1"), N = b(e, H.Label), v = b(e, H.Input), D = b(e, H.Options), O = b(e, H.Description), g = b(e, H.Error);
|
|
579
|
+
return E ? /* @__PURE__ */ n.createElement(m, {
|
|
580
|
+
fieldId: t,
|
|
581
|
+
renderLabel: () => h(N, {
|
|
582
|
+
label: f
|
|
583
|
+
}),
|
|
584
|
+
renderInput: () => /* @__PURE__ */ n.createElement(tr, {
|
|
585
|
+
value: r,
|
|
586
|
+
onChange: o,
|
|
587
|
+
disabled: s,
|
|
588
|
+
readOnly: a,
|
|
589
|
+
required: i,
|
|
590
|
+
hasError: l,
|
|
591
|
+
onBlur: u,
|
|
592
|
+
onFocus: d
|
|
593
|
+
}, v, D),
|
|
594
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, g, O)
|
|
595
|
+
}) : /* @__PURE__ */ n.createElement(m, {
|
|
596
|
+
fieldId: t,
|
|
597
|
+
renderLabel: () => h(N, {
|
|
598
|
+
label: f
|
|
599
|
+
}),
|
|
600
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
601
|
+
"aria-labelledby": y,
|
|
602
|
+
value: r ?? "",
|
|
603
|
+
onChange: o,
|
|
604
|
+
isDisabled: s,
|
|
605
|
+
isReadOnly: a,
|
|
606
|
+
isRequired: i,
|
|
607
|
+
isInvalid: l,
|
|
608
|
+
onBlur: u,
|
|
609
|
+
onFocus: d
|
|
610
|
+
}, v),
|
|
611
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, g, O)
|
|
612
|
+
});
|
|
613
|
+
}, tr = ({ children: e, value: t, onChange: r, disabled: o, readOnly: s, required: a, hasError: i, onBlur: l, onFocus: u }) => {
|
|
614
|
+
const { labelId: d } = P(), { onAddressSelect: m } = Le(), C = ve(), y = Qe({
|
|
615
|
+
enabled: !0
|
|
616
|
+
}), { predictions: p, updatePredictions: E, clearPredictions: f } = Ut({
|
|
617
|
+
atlas: y
|
|
618
|
+
}), N = x(() => p.map((S) => ({
|
|
619
|
+
id: S.searchId || "",
|
|
620
|
+
label: S.description || ""
|
|
621
|
+
})), [
|
|
622
|
+
p
|
|
623
|
+
]), v = A((S) => {
|
|
624
|
+
E({
|
|
625
|
+
input: S,
|
|
626
|
+
countryCodes: C ? [
|
|
627
|
+
C
|
|
628
|
+
] : void 0
|
|
629
|
+
}), r(S);
|
|
630
|
+
}, [
|
|
631
|
+
r,
|
|
632
|
+
E,
|
|
633
|
+
C
|
|
634
|
+
]), D = A(async (S) => {
|
|
635
|
+
if (!S)
|
|
636
|
+
return;
|
|
637
|
+
f();
|
|
638
|
+
const F = String(S), q = await (y == null ? void 0 : y.resolvePlace({
|
|
639
|
+
searchId: F,
|
|
640
|
+
prediction: p.find((Q) => Q.searchId === F)
|
|
641
|
+
}));
|
|
642
|
+
q && m && m(q);
|
|
643
|
+
}, [
|
|
644
|
+
m,
|
|
645
|
+
f,
|
|
646
|
+
y,
|
|
647
|
+
p
|
|
648
|
+
]), O = A(() => {
|
|
649
|
+
f(), l == null || l();
|
|
650
|
+
}, [
|
|
651
|
+
l,
|
|
652
|
+
f
|
|
653
|
+
]), g = A(() => {
|
|
654
|
+
u == null || u();
|
|
655
|
+
}, [
|
|
656
|
+
u
|
|
657
|
+
]), w = b(e, H.Input), T = b(e, H.Options);
|
|
658
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
659
|
+
"aria-labelledby": d,
|
|
660
|
+
inputValue: t ?? "",
|
|
661
|
+
onInputChange: v,
|
|
662
|
+
value: null,
|
|
663
|
+
onChange: D,
|
|
664
|
+
isDisabled: o,
|
|
665
|
+
isReadOnly: s,
|
|
666
|
+
isRequired: a,
|
|
667
|
+
isInvalid: i,
|
|
668
|
+
onBlur: O,
|
|
669
|
+
onFocus: g,
|
|
670
|
+
allowsCustomValue: !0,
|
|
671
|
+
menuTrigger: "input",
|
|
672
|
+
items: N
|
|
673
|
+
}, h(w, {
|
|
674
|
+
onFocus: g
|
|
675
|
+
}), h(T, {
|
|
676
|
+
options: N
|
|
677
|
+
}), /* @__PURE__ */ n.createElement(ze, {
|
|
678
|
+
optionCount: N.length
|
|
679
|
+
}));
|
|
680
|
+
}, nr = ({ className: e, ...t }) => {
|
|
681
|
+
const { id: r, placeholder: o } = _(), { inputId: s, ariaDescribedBy: a } = P(), { onFocus: i } = t, l = B(null), u = _e();
|
|
682
|
+
return G(() => {
|
|
683
|
+
var d;
|
|
684
|
+
(d = l.current) == null || d.focus({
|
|
685
|
+
preventScroll: !0
|
|
686
|
+
});
|
|
687
|
+
}, r), Ce(l), /* @__PURE__ */ n.createElement(de, {
|
|
688
|
+
ref: l,
|
|
689
|
+
onKeyUpCapture: u,
|
|
690
|
+
id: s,
|
|
691
|
+
autoComplete: "address-line1",
|
|
692
|
+
"aria-describedby": a,
|
|
693
|
+
className: e,
|
|
694
|
+
placeholder: o,
|
|
695
|
+
onFocus: i
|
|
696
|
+
});
|
|
697
|
+
}, Ge = ({ children: e, className: t }) => {
|
|
698
|
+
const r = b(e, Ge.Option);
|
|
699
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
700
|
+
className: t,
|
|
701
|
+
containerPadding: 0,
|
|
702
|
+
offset: 0
|
|
703
|
+
}, /* @__PURE__ */ n.createElement(qe, {
|
|
704
|
+
renderEmptyState: () => null
|
|
705
|
+
}, (o) => h(r, {
|
|
706
|
+
id: o.id,
|
|
707
|
+
label: o.label
|
|
708
|
+
})));
|
|
709
|
+
}, rr = ({ className: e, ...t }) => {
|
|
710
|
+
const { id: r, label: o } = t;
|
|
711
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
712
|
+
className: e,
|
|
713
|
+
id: r,
|
|
714
|
+
textValue: o
|
|
715
|
+
}, o);
|
|
716
|
+
};
|
|
717
|
+
Ge.Option = rr;
|
|
718
|
+
H.Label = pe;
|
|
719
|
+
H.Input = nr;
|
|
720
|
+
H.Options = Ge;
|
|
721
|
+
H.Description = ue;
|
|
722
|
+
H.Error = me;
|
|
723
|
+
const le = ({ children: e }) => {
|
|
724
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m } = _(), { labelId: C } = P(), { t: y } = Me(), p = y("field.mla-apartment.label"), E = b(e, le.Label), f = b(e, le.Input), N = b(e, le.Description), v = b(e, le.Error);
|
|
725
|
+
return /* @__PURE__ */ n.createElement(m, {
|
|
726
|
+
fieldId: t,
|
|
727
|
+
renderLabel: () => h(E, {
|
|
728
|
+
label: p
|
|
729
|
+
}),
|
|
730
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
731
|
+
"aria-labelledby": C,
|
|
732
|
+
value: r ?? "",
|
|
733
|
+
onChange: o,
|
|
734
|
+
isDisabled: s,
|
|
735
|
+
isReadOnly: a,
|
|
736
|
+
isRequired: i,
|
|
737
|
+
isInvalid: l,
|
|
738
|
+
onBlur: u,
|
|
739
|
+
onFocus: d
|
|
740
|
+
}, f),
|
|
741
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, v, N)
|
|
742
|
+
});
|
|
743
|
+
}, or = ({ className: e }) => {
|
|
744
|
+
const { id: t, placeholder: r } = _(), { inputId: o, ariaDescribedBy: s } = P(), a = B(null);
|
|
745
|
+
return G(() => {
|
|
746
|
+
var i;
|
|
747
|
+
(i = a.current) == null || i.focus({
|
|
748
|
+
preventScroll: !0
|
|
749
|
+
});
|
|
750
|
+
}, t), Ce(a), /* @__PURE__ */ n.createElement(de, {
|
|
751
|
+
ref: a,
|
|
752
|
+
id: o,
|
|
753
|
+
autoComplete: "address-line2",
|
|
754
|
+
"aria-describedby": s,
|
|
755
|
+
className: e,
|
|
756
|
+
placeholder: r
|
|
757
|
+
});
|
|
758
|
+
};
|
|
759
|
+
le.Label = pe;
|
|
760
|
+
le.Input = or;
|
|
761
|
+
le.Description = ue;
|
|
762
|
+
le.Error = me;
|
|
763
|
+
const ie = ({ children: e }) => {
|
|
764
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m } = _(), { labelId: C } = P(), y = be("city"), p = b(e, ie.Label), E = b(e, ie.Input), f = b(e, ie.Description), N = b(e, ie.Error);
|
|
765
|
+
return /* @__PURE__ */ n.createElement(m, {
|
|
766
|
+
fieldId: t,
|
|
767
|
+
renderLabel: () => h(p, {
|
|
768
|
+
label: y
|
|
769
|
+
}),
|
|
770
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
771
|
+
"aria-labelledby": C,
|
|
772
|
+
value: r ?? "",
|
|
773
|
+
onChange: o,
|
|
774
|
+
isDisabled: s,
|
|
775
|
+
isReadOnly: a,
|
|
776
|
+
isRequired: i,
|
|
777
|
+
isInvalid: l,
|
|
778
|
+
onBlur: u,
|
|
779
|
+
onFocus: d
|
|
780
|
+
}, E),
|
|
781
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
782
|
+
});
|
|
783
|
+
}, sr = ({ className: e }) => {
|
|
784
|
+
const { id: t, placeholder: r } = _(), { inputId: o, ariaDescribedBy: s } = P(), a = B(null);
|
|
785
|
+
return G(() => {
|
|
786
|
+
var i;
|
|
787
|
+
(i = a.current) == null || i.focus({
|
|
788
|
+
preventScroll: !0
|
|
789
|
+
});
|
|
790
|
+
}, t), Ce(a), /* @__PURE__ */ n.createElement(de, {
|
|
791
|
+
ref: a,
|
|
792
|
+
id: o,
|
|
793
|
+
autoComplete: "address-level2",
|
|
794
|
+
"aria-describedby": s,
|
|
795
|
+
className: e,
|
|
796
|
+
placeholder: r
|
|
797
|
+
});
|
|
798
|
+
};
|
|
799
|
+
ie.Label = pe;
|
|
800
|
+
ie.Input = sr;
|
|
801
|
+
ie.Description = ue;
|
|
802
|
+
ie.Error = me;
|
|
803
|
+
const ar = ({ isOpen: e }) => {
|
|
804
|
+
const t = ye(Be), r = B(!1);
|
|
805
|
+
return we(() => {
|
|
806
|
+
e && t && !t.isOpen && t.open(null, "manual"), e && (t == null ? void 0 : t.selectionManager.focusedKey) != null && t.selectionManager.setFocusedKey(null), !e && r.current && (t == null || t.close()), r.current = e;
|
|
807
|
+
}, [
|
|
808
|
+
e,
|
|
809
|
+
t
|
|
810
|
+
]), null;
|
|
811
|
+
}, Kt = ({ readOnly: e, disabled: t } = {}) => {
|
|
812
|
+
const r = ye(Be);
|
|
813
|
+
return A(() => {
|
|
814
|
+
!r || r.isOpen || e || t || r.open(null, "manual");
|
|
815
|
+
}, [
|
|
816
|
+
r,
|
|
817
|
+
e,
|
|
818
|
+
t
|
|
819
|
+
]);
|
|
820
|
+
}, lr = (e, t) => e.find((r) => r.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), $t = ({ options: e, value: t, commit: r, clear: o, onBlur: s }) => {
|
|
821
|
+
const [a, i] = fe(null), l = In(s), u = x(() => {
|
|
822
|
+
var p;
|
|
823
|
+
return t ? ((p = e.find((E) => E.value === t)) == null ? void 0 : p.label) ?? "" : "";
|
|
824
|
+
}, [
|
|
825
|
+
t,
|
|
826
|
+
e
|
|
827
|
+
]), d = A((p) => {
|
|
828
|
+
typeof p != "string" || p === "" || p === t || (i(null), r(p));
|
|
829
|
+
}, [
|
|
830
|
+
r,
|
|
831
|
+
t
|
|
832
|
+
]), m = A((p) => {
|
|
833
|
+
if (i(p), p === "")
|
|
834
|
+
return;
|
|
835
|
+
const E = lr(e, p);
|
|
836
|
+
E && E.value !== t && r(E.value);
|
|
837
|
+
}, [
|
|
838
|
+
r,
|
|
839
|
+
e,
|
|
840
|
+
t
|
|
841
|
+
]), C = A((p) => {
|
|
842
|
+
p.key !== "Enter" && p.key !== "Escape" || (i(null), p.key === "Enter" && a === "" && t && o());
|
|
843
|
+
}, [
|
|
844
|
+
a,
|
|
845
|
+
t,
|
|
846
|
+
o
|
|
847
|
+
]), y = A(() => {
|
|
848
|
+
a === "" && t && o(), i(null), l();
|
|
849
|
+
}, [
|
|
850
|
+
a,
|
|
851
|
+
t,
|
|
852
|
+
o,
|
|
853
|
+
l
|
|
854
|
+
]);
|
|
855
|
+
return {
|
|
856
|
+
value: t ?? null,
|
|
857
|
+
inputValue: a ?? u,
|
|
858
|
+
onChange: d,
|
|
859
|
+
onInputChange: m,
|
|
860
|
+
onBlur: y,
|
|
861
|
+
onInputKeyDown: C
|
|
862
|
+
};
|
|
863
|
+
}, W = ({ children: e, ...t }) => {
|
|
864
|
+
const { isForcedOpen: r = !1 } = t, { id: o, value: s, onChange: a, disabled: i, readOnly: l, required: u, hasError: d, onBlur: m, onFocus: C, FieldLayout: y, options: p } = _(), { labelId: E } = P(), { t: f } = Me(), { language: N } = gt(), v = x(() => (p || []).reduce((M, $) => ($.value && Se.hasOwnProperty($.value) && M.push({
|
|
865
|
+
value: $.value,
|
|
866
|
+
label: f(`locale-dataset.countries.${Se[$.value].toUpperCase()}`)
|
|
867
|
+
}), M), []).sort((M, $) => M.label.localeCompare($.label, N)), [
|
|
868
|
+
p,
|
|
869
|
+
f,
|
|
870
|
+
N
|
|
871
|
+
]), D = A((M) => a(M), [
|
|
872
|
+
a
|
|
873
|
+
]), O = A(() => D(""), [
|
|
874
|
+
D
|
|
875
|
+
]), { onInputKeyDown: g, ...w } = $t({
|
|
876
|
+
options: v,
|
|
877
|
+
value: s,
|
|
878
|
+
commit: D,
|
|
879
|
+
clear: O,
|
|
880
|
+
onBlur: m
|
|
881
|
+
}), T = be("country"), S = b(e, W.Label), F = b(e, W.Control), q = b(e, W.Options), Q = b(e, W.Description), Z = b(e, W.Error), U = b(e, W.NativeSelect), k = Rt() ? h(U, {
|
|
882
|
+
options: v
|
|
883
|
+
}) : /* @__PURE__ */ n.createElement(he, {
|
|
884
|
+
"aria-labelledby": E,
|
|
885
|
+
...w,
|
|
886
|
+
isDisabled: i,
|
|
887
|
+
isReadOnly: l,
|
|
888
|
+
isRequired: u,
|
|
889
|
+
isInvalid: d,
|
|
890
|
+
onFocus: C,
|
|
891
|
+
menuTrigger: "input"
|
|
892
|
+
}, h(F, {
|
|
893
|
+
onKeyDown: g
|
|
894
|
+
}), h(q, {
|
|
895
|
+
options: v,
|
|
896
|
+
isForcedOpen: r
|
|
897
|
+
}), /* @__PURE__ */ n.createElement(ar, {
|
|
898
|
+
isOpen: r
|
|
899
|
+
}));
|
|
900
|
+
return /* @__PURE__ */ n.createElement(y, {
|
|
901
|
+
fieldId: o,
|
|
902
|
+
renderLabel: () => h(S, {
|
|
903
|
+
label: T
|
|
904
|
+
}),
|
|
905
|
+
renderInput: () => k,
|
|
906
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, Z, Q)
|
|
907
|
+
});
|
|
908
|
+
}, ge = ({ children: e, className: t, ...r }) => {
|
|
909
|
+
const { disabled: o, hasError: s } = _(), { onKeyDown: a } = r, i = b(e, ge.Input), l = b(e, ge.Trigger);
|
|
910
|
+
return /* @__PURE__ */ n.createElement(Ft, {
|
|
911
|
+
className: t,
|
|
912
|
+
isDisabled: o,
|
|
913
|
+
isInvalid: s
|
|
914
|
+
}, h(i, {
|
|
915
|
+
onKeyDown: a
|
|
916
|
+
}), l);
|
|
917
|
+
}, ir = ({ className: e, ...t }) => {
|
|
918
|
+
const { id: r, placeholder: o, readOnly: s, disabled: a } = _(), { inputId: i, ariaDescribedBy: l } = P(), { onKeyDown: u } = t, d = B(null), m = _e(), C = Kt({
|
|
919
|
+
readOnly: s,
|
|
920
|
+
disabled: a
|
|
921
|
+
});
|
|
922
|
+
return G(() => {
|
|
923
|
+
var y;
|
|
924
|
+
(y = d.current) == null || y.focus({
|
|
925
|
+
preventScroll: !0
|
|
926
|
+
});
|
|
927
|
+
}, r), /* @__PURE__ */ n.createElement(de, {
|
|
928
|
+
ref: d,
|
|
929
|
+
onKeyUpCapture: m,
|
|
930
|
+
id: i,
|
|
931
|
+
autoComplete: "country-name",
|
|
932
|
+
"aria-describedby": l,
|
|
933
|
+
className: e,
|
|
934
|
+
placeholder: o,
|
|
935
|
+
onClick: C,
|
|
936
|
+
onKeyDown: u
|
|
937
|
+
});
|
|
938
|
+
}, cr = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(At, {
|
|
939
|
+
className: t
|
|
940
|
+
}, e);
|
|
941
|
+
ge.Input = ir;
|
|
942
|
+
ge.Trigger = cr;
|
|
943
|
+
const Ze = ({ children: e, className: t, ...r }) => {
|
|
944
|
+
const { options: o, isForcedOpen: s } = r, a = b(e, Ze.Option);
|
|
945
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
946
|
+
className: t,
|
|
947
|
+
containerPadding: 0,
|
|
948
|
+
offset: 0
|
|
949
|
+
}, /* @__PURE__ */ n.createElement(yn, {
|
|
950
|
+
isForcedOpen: s
|
|
951
|
+
}, o.map((i) => h(a, {
|
|
952
|
+
key: i.value,
|
|
953
|
+
value: i.value,
|
|
954
|
+
label: i.label
|
|
955
|
+
}))));
|
|
956
|
+
}, dr = ({ className: e, ...t }) => {
|
|
957
|
+
const { value: r, label: o } = t;
|
|
958
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
959
|
+
className: e,
|
|
960
|
+
id: r,
|
|
961
|
+
textValue: o
|
|
962
|
+
}, o);
|
|
963
|
+
};
|
|
964
|
+
Ze.Option = dr;
|
|
965
|
+
const ur = ({ className: e, children: t, ...r }) => {
|
|
966
|
+
const { options: o } = r, { id: s, value: a, onChange: i, disabled: l, readOnly: u, required: d, hasError: m, placeholder: C, onBlur: y, onFocus: p } = _(), { inputId: E, labelId: f, ariaDescribedBy: N } = P(), v = B(null);
|
|
967
|
+
G(() => {
|
|
968
|
+
var g;
|
|
969
|
+
(g = v.current) == null || g.focus({
|
|
970
|
+
preventScroll: !0
|
|
971
|
+
});
|
|
972
|
+
}, s);
|
|
973
|
+
const { className: D, stateProps: O } = wt(e);
|
|
974
|
+
return /* @__PURE__ */ n.createElement(Pt, null, /* @__PURE__ */ n.createElement(Tt, {
|
|
975
|
+
ref: v,
|
|
976
|
+
id: E,
|
|
977
|
+
className: D,
|
|
978
|
+
...ht(O, {
|
|
979
|
+
onFocus: p,
|
|
980
|
+
onBlur: y
|
|
981
|
+
}),
|
|
982
|
+
"aria-labelledby": f,
|
|
983
|
+
"aria-describedby": N,
|
|
984
|
+
"aria-invalid": m || void 0,
|
|
985
|
+
autoComplete: "country",
|
|
986
|
+
value: a,
|
|
987
|
+
options: o,
|
|
988
|
+
placeholder: C,
|
|
989
|
+
onChange: (g) => i(g),
|
|
990
|
+
disabled: l,
|
|
991
|
+
readOnly: u,
|
|
992
|
+
required: d
|
|
993
|
+
}), t);
|
|
994
|
+
};
|
|
995
|
+
W.Label = pe;
|
|
996
|
+
W.NativeSelect = ur;
|
|
997
|
+
W.Control = ge;
|
|
998
|
+
W.Options = Ze;
|
|
999
|
+
W.Description = ue;
|
|
1000
|
+
W.Error = me;
|
|
1001
|
+
const mr = /(\d{7})|(\d{3}-\d{4})/;
|
|
1002
|
+
function pr(e) {
|
|
1003
|
+
var t;
|
|
1004
|
+
return (t = e.match(mr)) == null ? void 0 : t[0];
|
|
1005
|
+
}
|
|
1006
|
+
function Er({ isAutocompleteEnabled: e }) {
|
|
1007
|
+
const t = B({
|
|
1008
|
+
hasAddress: !1
|
|
1009
|
+
}), r = Qe({
|
|
1010
|
+
enabled: e
|
|
1011
|
+
});
|
|
1012
|
+
return {
|
|
1013
|
+
searchByPostalCode: A(async (s) => {
|
|
1014
|
+
const a = pr(s);
|
|
1015
|
+
if (a) {
|
|
1016
|
+
if (t.current.postalCode === a && t.current.hasAddress)
|
|
1017
|
+
return t.current.address;
|
|
1018
|
+
t.current = {
|
|
1019
|
+
postalCode: a,
|
|
1020
|
+
address: void 0,
|
|
1021
|
+
hasAddress: !1
|
|
1022
|
+
};
|
|
1023
|
+
try {
|
|
1024
|
+
const i = await (r == null ? void 0 : r.searchByPostalCode({
|
|
1025
|
+
countryCode: "JP",
|
|
1026
|
+
postalCode: a
|
|
1027
|
+
}));
|
|
1028
|
+
return t.current.hasAddress = !0, t.current.address = void 0, i != null && i.formattedAddress ? (t.current.address = i, i) : void 0;
|
|
1029
|
+
} catch (i) {
|
|
1030
|
+
console.error(i);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}, [
|
|
1034
|
+
r
|
|
1035
|
+
])
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
const j = ({ children: e }) => {
|
|
1039
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m, autocomplete: C } = _(), { labelId: y } = P(), p = ve(), { autocompleteEnabled: E } = Le(), f = !!(p && Se[p] === Se.JP), N = (C || E) && f, v = be("zipCode"), D = b(e, j.Label), O = b(e, j.Control), g = b(e, j.Options), w = b(e, j.Description), T = b(e, j.Error);
|
|
1040
|
+
return N ? /* @__PURE__ */ n.createElement(m, {
|
|
1041
|
+
fieldId: t,
|
|
1042
|
+
renderLabel: () => h(D, {
|
|
1043
|
+
label: v
|
|
1044
|
+
}),
|
|
1045
|
+
renderInput: () => /* @__PURE__ */ n.createElement(br, {
|
|
1046
|
+
value: r,
|
|
1047
|
+
onChange: o,
|
|
1048
|
+
disabled: s,
|
|
1049
|
+
readOnly: a,
|
|
1050
|
+
required: i,
|
|
1051
|
+
hasError: l,
|
|
1052
|
+
onBlur: u,
|
|
1053
|
+
onFocus: d
|
|
1054
|
+
}, O, g),
|
|
1055
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, w)
|
|
1056
|
+
}) : /* @__PURE__ */ n.createElement(m, {
|
|
1057
|
+
fieldId: t,
|
|
1058
|
+
renderLabel: () => h(D, {
|
|
1059
|
+
label: v
|
|
1060
|
+
}),
|
|
1061
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
1062
|
+
"aria-labelledby": y,
|
|
1063
|
+
value: r ?? "",
|
|
1064
|
+
onChange: o,
|
|
1065
|
+
isDisabled: s,
|
|
1066
|
+
isReadOnly: a,
|
|
1067
|
+
isRequired: i,
|
|
1068
|
+
isInvalid: l,
|
|
1069
|
+
onBlur: u,
|
|
1070
|
+
onFocus: d
|
|
1071
|
+
}, O),
|
|
1072
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, w)
|
|
1073
|
+
});
|
|
1074
|
+
}, br = ({ children: e, value: t, onChange: r, disabled: o, readOnly: s, required: a, hasError: i, onBlur: l, onFocus: u }) => {
|
|
1075
|
+
const { labelId: d } = P(), { onAddressSelect: m } = Le(), [C, y] = fe(!1), { searchByPostalCode: p } = Er({
|
|
1076
|
+
isAutocompleteEnabled: C
|
|
1077
|
+
}), [E, f] = fe(), N = x(() => E ? [
|
|
1078
|
+
{
|
|
1079
|
+
id: X(),
|
|
1080
|
+
label: E.formattedAddress || ""
|
|
1081
|
+
}
|
|
1082
|
+
] : [], [
|
|
1083
|
+
E
|
|
1084
|
+
]), v = A(async (S) => {
|
|
1085
|
+
r(S);
|
|
1086
|
+
const F = await p(S ?? "");
|
|
1087
|
+
f(F);
|
|
1088
|
+
}, [
|
|
1089
|
+
r,
|
|
1090
|
+
p
|
|
1091
|
+
]), D = A(async (S) => {
|
|
1092
|
+
S && (f(void 0), E && m && m(E));
|
|
1093
|
+
}, [
|
|
1094
|
+
m,
|
|
1095
|
+
E
|
|
1096
|
+
]), O = A(() => {
|
|
1097
|
+
f(void 0), l == null || l();
|
|
1098
|
+
}, [
|
|
1099
|
+
l
|
|
1100
|
+
]), g = A(() => {
|
|
1101
|
+
y(!0), u == null || u();
|
|
1102
|
+
}, [
|
|
1103
|
+
u
|
|
1104
|
+
]), w = b(e, j.Control), T = b(e, j.Options);
|
|
1105
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
1106
|
+
"aria-labelledby": d,
|
|
1107
|
+
inputValue: t ?? "",
|
|
1108
|
+
onInputChange: v,
|
|
1109
|
+
value: null,
|
|
1110
|
+
onChange: D,
|
|
1111
|
+
isDisabled: o,
|
|
1112
|
+
isReadOnly: s,
|
|
1113
|
+
isRequired: a,
|
|
1114
|
+
isInvalid: i,
|
|
1115
|
+
onBlur: O,
|
|
1116
|
+
onFocus: g,
|
|
1117
|
+
allowsCustomValue: !0,
|
|
1118
|
+
menuTrigger: "input",
|
|
1119
|
+
items: N
|
|
1120
|
+
}, h(w, {
|
|
1121
|
+
onFocus: g
|
|
1122
|
+
}), h(T, {
|
|
1123
|
+
options: N
|
|
1124
|
+
}), /* @__PURE__ */ n.createElement(ze, {
|
|
1125
|
+
optionCount: N.length
|
|
1126
|
+
}));
|
|
1127
|
+
}, et = ({ children: e, className: t, ...r }) => {
|
|
1128
|
+
const { disabled: o, hasError: s } = _(), { onFocus: a } = r, i = ve(), l = b(e, et.Input);
|
|
1129
|
+
return /* @__PURE__ */ n.createElement("div", {
|
|
1130
|
+
className: t,
|
|
1131
|
+
"data-country": i || void 0,
|
|
1132
|
+
"data-disabled": o || void 0,
|
|
1133
|
+
"data-invalid": s || void 0
|
|
1134
|
+
}, h(l, {
|
|
1135
|
+
onFocus: a
|
|
1136
|
+
}));
|
|
1137
|
+
}, fr = ({ className: e, ...t }) => {
|
|
1138
|
+
const { id: r, placeholder: o } = _(), { inputId: s, ariaDescribedBy: a } = P(), { onFocus: i } = t, l = B(null), u = _e();
|
|
1139
|
+
return G(() => {
|
|
1140
|
+
var d;
|
|
1141
|
+
(d = l.current) == null || d.focus({
|
|
1142
|
+
preventScroll: !0
|
|
1143
|
+
});
|
|
1144
|
+
}, r), Ce(l), /* @__PURE__ */ n.createElement(de, {
|
|
1145
|
+
ref: l,
|
|
1146
|
+
onKeyUpCapture: u,
|
|
1147
|
+
id: s,
|
|
1148
|
+
autoComplete: "postal-code",
|
|
1149
|
+
"aria-describedby": a,
|
|
1150
|
+
className: e,
|
|
1151
|
+
placeholder: o,
|
|
1152
|
+
onFocus: i
|
|
1153
|
+
});
|
|
1154
|
+
}, tt = ({ children: e, className: t }) => {
|
|
1155
|
+
const r = b(e, tt.Option);
|
|
1156
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
1157
|
+
className: t,
|
|
1158
|
+
containerPadding: 0,
|
|
1159
|
+
offset: 0
|
|
1160
|
+
}, /* @__PURE__ */ n.createElement(qe, {
|
|
1161
|
+
renderEmptyState: () => null
|
|
1162
|
+
}, (o) => h(r, {
|
|
1163
|
+
id: o.id,
|
|
1164
|
+
label: o.label
|
|
1165
|
+
})));
|
|
1166
|
+
}, yr = ({ className: e, ...t }) => {
|
|
1167
|
+
const { id: r, label: o } = t;
|
|
1168
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1169
|
+
className: e,
|
|
1170
|
+
id: r,
|
|
1171
|
+
textValue: o
|
|
1172
|
+
}, o);
|
|
1173
|
+
};
|
|
1174
|
+
tt.Option = yr;
|
|
1175
|
+
et.Input = fr;
|
|
1176
|
+
j.Label = pe;
|
|
1177
|
+
j.Control = et;
|
|
1178
|
+
j.Options = tt;
|
|
1179
|
+
j.Description = ue;
|
|
1180
|
+
j.Error = me;
|
|
1181
|
+
const J = ({ children: e }) => {
|
|
1182
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m, autocomplete: C } = _(), { labelId: y } = P(), { autocompleteEnabled: p } = Le(), E = C || p, f = be("streetName"), N = b(e, J.Label), v = b(e, J.Input), D = b(e, J.Options), O = b(e, J.Description), g = b(e, J.Error);
|
|
1183
|
+
return E ? /* @__PURE__ */ n.createElement(m, {
|
|
1184
|
+
fieldId: t,
|
|
1185
|
+
renderLabel: () => h(N, {
|
|
1186
|
+
label: f
|
|
1187
|
+
}),
|
|
1188
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Cr, {
|
|
1189
|
+
value: r,
|
|
1190
|
+
onChange: o,
|
|
1191
|
+
disabled: s,
|
|
1192
|
+
readOnly: a,
|
|
1193
|
+
required: i,
|
|
1194
|
+
hasError: l,
|
|
1195
|
+
onBlur: u,
|
|
1196
|
+
onFocus: d
|
|
1197
|
+
}, v, D),
|
|
1198
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, g, O)
|
|
1199
|
+
}) : /* @__PURE__ */ n.createElement(m, {
|
|
1200
|
+
fieldId: t,
|
|
1201
|
+
renderLabel: () => h(N, {
|
|
1202
|
+
label: f
|
|
1203
|
+
}),
|
|
1204
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
1205
|
+
"aria-labelledby": y,
|
|
1206
|
+
value: r ?? "",
|
|
1207
|
+
onChange: o,
|
|
1208
|
+
isDisabled: s,
|
|
1209
|
+
isReadOnly: a,
|
|
1210
|
+
isRequired: i,
|
|
1211
|
+
isInvalid: l,
|
|
1212
|
+
onBlur: u,
|
|
1213
|
+
onFocus: d
|
|
1214
|
+
}, v),
|
|
1215
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, g, O)
|
|
1216
|
+
});
|
|
1217
|
+
}, Cr = ({ children: e, value: t, onChange: r, disabled: o, readOnly: s, required: a, hasError: i, onBlur: l, onFocus: u }) => {
|
|
1218
|
+
const { labelId: d } = P(), { onAddressSelect: m } = Le(), C = ve(), y = Qe({
|
|
1219
|
+
enabled: !0
|
|
1220
|
+
}), { predictions: p, updatePredictions: E, clearPredictions: f } = Ut({
|
|
1221
|
+
atlas: y
|
|
1222
|
+
}), N = b(e, J.Input), v = b(e, J.Options), D = x(() => p.reduce((S, F) => (F.searchId && F.description && S.push({
|
|
1223
|
+
id: F.searchId,
|
|
1224
|
+
label: F.description
|
|
1225
|
+
}), S), []), [
|
|
1226
|
+
p
|
|
1227
|
+
]), O = A((S) => {
|
|
1228
|
+
E({
|
|
1229
|
+
input: S,
|
|
1230
|
+
countryCodes: C ? [
|
|
1231
|
+
C
|
|
1232
|
+
] : void 0
|
|
1233
|
+
}), r(S);
|
|
1234
|
+
}, [
|
|
1235
|
+
r,
|
|
1236
|
+
E,
|
|
1237
|
+
C
|
|
1238
|
+
]), g = A(async (S) => {
|
|
1239
|
+
if (f(), !S)
|
|
1240
|
+
return;
|
|
1241
|
+
const F = String(S), q = await (y == null ? void 0 : y.resolvePlace({
|
|
1242
|
+
searchId: F,
|
|
1243
|
+
prediction: p.find((Q) => Q.searchId === F)
|
|
1244
|
+
}));
|
|
1245
|
+
q && m && m(q);
|
|
1246
|
+
}, [
|
|
1247
|
+
m,
|
|
1248
|
+
f,
|
|
1249
|
+
y,
|
|
1250
|
+
p
|
|
1251
|
+
]), w = A(() => {
|
|
1252
|
+
f(), l == null || l();
|
|
1253
|
+
}, [
|
|
1254
|
+
l,
|
|
1255
|
+
f
|
|
1256
|
+
]), T = A(() => {
|
|
1257
|
+
u == null || u();
|
|
1258
|
+
}, [
|
|
1259
|
+
u
|
|
1260
|
+
]);
|
|
1261
|
+
return /* @__PURE__ */ n.createElement(he, {
|
|
1262
|
+
"aria-labelledby": d,
|
|
1263
|
+
inputValue: t ?? "",
|
|
1264
|
+
onInputChange: O,
|
|
1265
|
+
value: null,
|
|
1266
|
+
onChange: g,
|
|
1267
|
+
isDisabled: o,
|
|
1268
|
+
isReadOnly: s,
|
|
1269
|
+
isRequired: a,
|
|
1270
|
+
isInvalid: i,
|
|
1271
|
+
onBlur: w,
|
|
1272
|
+
onFocus: T,
|
|
1273
|
+
allowsCustomValue: !0,
|
|
1274
|
+
menuTrigger: "input",
|
|
1275
|
+
items: D
|
|
1276
|
+
}, h(N, {
|
|
1277
|
+
onFocus: T
|
|
1278
|
+
}), h(v, {
|
|
1279
|
+
options: D
|
|
1280
|
+
}), /* @__PURE__ */ n.createElement(ze, {
|
|
1281
|
+
optionCount: D.length
|
|
1282
|
+
}));
|
|
1283
|
+
}, Ir = ({ className: e, ...t }) => {
|
|
1284
|
+
const { id: r, placeholder: o } = _(), { inputId: s, ariaDescribedBy: a } = P(), { onFocus: i } = t, l = B(null), u = _e();
|
|
1285
|
+
return G(() => {
|
|
1286
|
+
var d;
|
|
1287
|
+
(d = l.current) == null || d.focus({
|
|
1288
|
+
preventScroll: !0
|
|
1289
|
+
});
|
|
1290
|
+
}, r), Ce(l), /* @__PURE__ */ n.createElement(de, {
|
|
1291
|
+
ref: l,
|
|
1292
|
+
onKeyUpCapture: u,
|
|
1293
|
+
id: s,
|
|
1294
|
+
autoComplete: "address-line1",
|
|
1295
|
+
"aria-describedby": a,
|
|
1296
|
+
className: e,
|
|
1297
|
+
placeholder: o,
|
|
1298
|
+
onFocus: i
|
|
1299
|
+
});
|
|
1300
|
+
}, nt = ({ children: e, className: t }) => {
|
|
1301
|
+
const r = b(e, nt.Option);
|
|
1302
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
1303
|
+
className: t,
|
|
1304
|
+
containerPadding: 0,
|
|
1305
|
+
offset: 0
|
|
1306
|
+
}, /* @__PURE__ */ n.createElement(qe, {
|
|
1307
|
+
renderEmptyState: () => null
|
|
1308
|
+
}, (o) => h(r, {
|
|
1309
|
+
id: o.id,
|
|
1310
|
+
label: o.label
|
|
1311
|
+
})));
|
|
1312
|
+
}, Nr = ({ className: e, ...t }) => {
|
|
1313
|
+
const { id: r, label: o } = t;
|
|
1314
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1315
|
+
className: e,
|
|
1316
|
+
id: r,
|
|
1317
|
+
textValue: o
|
|
1318
|
+
}, o);
|
|
1319
|
+
};
|
|
1320
|
+
nt.Option = Nr;
|
|
1321
|
+
J.Label = pe;
|
|
1322
|
+
J.Input = Ir;
|
|
1323
|
+
J.Options = nt;
|
|
1324
|
+
J.Description = ue;
|
|
1325
|
+
J.Error = me;
|
|
1326
|
+
const ce = ({ children: e }) => {
|
|
1327
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m } = _(), { labelId: C } = P(), y = be("streetNumber"), p = b(e, ce.Label), E = b(e, ce.Input), f = b(e, ce.Description), N = b(e, ce.Error);
|
|
1328
|
+
return /* @__PURE__ */ n.createElement(m, {
|
|
1329
|
+
fieldId: t,
|
|
1330
|
+
renderLabel: () => h(p, {
|
|
1331
|
+
label: y
|
|
1332
|
+
}),
|
|
1333
|
+
renderInput: () => /* @__PURE__ */ n.createElement(Ie, {
|
|
1334
|
+
"aria-labelledby": C,
|
|
1335
|
+
value: r ?? "",
|
|
1336
|
+
onChange: o,
|
|
1337
|
+
isDisabled: s,
|
|
1338
|
+
isReadOnly: a,
|
|
1339
|
+
isRequired: i,
|
|
1340
|
+
isInvalid: l,
|
|
1341
|
+
onBlur: u,
|
|
1342
|
+
onFocus: d
|
|
1343
|
+
}, E),
|
|
1344
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
|
|
1345
|
+
});
|
|
1346
|
+
}, Lr = ({ className: e }) => {
|
|
1347
|
+
const { id: t, placeholder: r } = _(), { inputId: o, ariaDescribedBy: s } = P(), a = B(null);
|
|
1348
|
+
return G(() => {
|
|
1349
|
+
var i;
|
|
1350
|
+
(i = a.current) == null || i.focus({
|
|
1351
|
+
preventScroll: !0
|
|
1352
|
+
});
|
|
1353
|
+
}, t), Ce(a), /* @__PURE__ */ n.createElement(de, {
|
|
1354
|
+
ref: a,
|
|
1355
|
+
id: o,
|
|
1356
|
+
"aria-describedby": s,
|
|
1357
|
+
className: e,
|
|
1358
|
+
placeholder: r
|
|
1359
|
+
});
|
|
1360
|
+
};
|
|
1361
|
+
ce.Label = pe;
|
|
1362
|
+
ce.Input = Lr;
|
|
1363
|
+
ce.Description = ue;
|
|
1364
|
+
ce.Error = me;
|
|
1365
|
+
const Y = ({ children: e }) => {
|
|
1366
|
+
const { id: t, value: r, onChange: o, disabled: s, readOnly: a, required: i, hasError: l, onBlur: u, onFocus: d, FieldLayout: m } = _(), { labelId: C } = P(), { t: y } = Me(), p = ve(), E = p ? Se[p] : void 0, f = p && Xt.getCountryByShortKey(p), N = x(() => {
|
|
1367
|
+
var k;
|
|
1368
|
+
return (Qt(((k = f == null ? void 0 : f.subdivisions) == null ? void 0 : k.list) || [], E) || []).map((M) => ({
|
|
1369
|
+
value: M.key,
|
|
1370
|
+
label: y(M.displayName)
|
|
1371
|
+
})).sort((M, $) => M.label.localeCompare($.label));
|
|
1372
|
+
}, [
|
|
1373
|
+
E,
|
|
1374
|
+
y,
|
|
1375
|
+
f
|
|
1376
|
+
]), v = A(() => o(""), [
|
|
1377
|
+
o
|
|
1378
|
+
]), { onInputKeyDown: D, ...O } = $t({
|
|
1379
|
+
options: N,
|
|
1380
|
+
value: r,
|
|
1381
|
+
commit: o,
|
|
1382
|
+
clear: v,
|
|
1383
|
+
onBlur: u
|
|
1384
|
+
}), g = be("subdivision"), w = b(e, Y.Label), T = b(e, Y.Control), S = b(e, Y.Options), F = b(e, Y.Description), q = b(e, Y.Error), Q = b(e, Y.NativeSelect), U = Rt() && N.length > 0 ? h(Q, {
|
|
1385
|
+
options: N
|
|
1386
|
+
}) : /* @__PURE__ */ n.createElement(he, {
|
|
1387
|
+
"aria-labelledby": C,
|
|
1388
|
+
...O,
|
|
1389
|
+
isDisabled: s,
|
|
1390
|
+
isReadOnly: a,
|
|
1391
|
+
isRequired: i,
|
|
1392
|
+
isInvalid: l,
|
|
1393
|
+
onFocus: d,
|
|
1394
|
+
menuTrigger: "input"
|
|
1395
|
+
}, h(T, {
|
|
1396
|
+
onKeyDown: D
|
|
1397
|
+
}), h(S, {
|
|
1398
|
+
options: N
|
|
1399
|
+
}));
|
|
1400
|
+
return /* @__PURE__ */ n.createElement(m, {
|
|
1401
|
+
fieldId: t,
|
|
1402
|
+
renderLabel: () => h(w, {
|
|
1403
|
+
label: g
|
|
1404
|
+
}),
|
|
1405
|
+
renderInput: () => U,
|
|
1406
|
+
renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, q, F)
|
|
1407
|
+
});
|
|
1408
|
+
}, De = ({ children: e, className: t, ...r }) => {
|
|
1409
|
+
const { disabled: o, hasError: s } = _(), { onKeyDown: a } = r, i = b(e, De.Input), l = b(e, De.Trigger);
|
|
1410
|
+
return /* @__PURE__ */ n.createElement(Ft, {
|
|
1411
|
+
className: t,
|
|
1412
|
+
isDisabled: o,
|
|
1413
|
+
isInvalid: s
|
|
1414
|
+
}, h(i, {
|
|
1415
|
+
onKeyDown: a
|
|
1416
|
+
}), l);
|
|
1417
|
+
}, vr = ({ className: e, ...t }) => {
|
|
1418
|
+
const { id: r, placeholder: o, readOnly: s, disabled: a } = _(), { inputId: i, ariaDescribedBy: l } = P(), { onKeyDown: u } = t, d = B(null), m = _e(), C = Kt({
|
|
1419
|
+
readOnly: s,
|
|
1420
|
+
disabled: a
|
|
1421
|
+
});
|
|
1422
|
+
return G(() => {
|
|
1423
|
+
var y;
|
|
1424
|
+
(y = d.current) == null || y.focus({
|
|
1425
|
+
preventScroll: !0
|
|
1426
|
+
});
|
|
1427
|
+
}, r), /* @__PURE__ */ n.createElement(de, {
|
|
1428
|
+
ref: d,
|
|
1429
|
+
onKeyUpCapture: m,
|
|
1430
|
+
id: i,
|
|
1431
|
+
autoComplete: "address-level1",
|
|
1432
|
+
"aria-describedby": l,
|
|
1433
|
+
className: e,
|
|
1434
|
+
placeholder: o,
|
|
1435
|
+
onClick: C,
|
|
1436
|
+
onKeyDown: u
|
|
1437
|
+
});
|
|
1438
|
+
}, Or = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(At, {
|
|
1439
|
+
className: t
|
|
1440
|
+
}, e);
|
|
1441
|
+
De.Input = vr;
|
|
1442
|
+
De.Trigger = Or;
|
|
1443
|
+
const rt = ({ children: e, className: t, ...r }) => {
|
|
1444
|
+
const { options: o } = r, s = b(e, rt.Option);
|
|
1445
|
+
return /* @__PURE__ */ n.createElement(Fe, {
|
|
1446
|
+
className: t,
|
|
1447
|
+
containerPadding: 0,
|
|
1448
|
+
offset: 0
|
|
1449
|
+
}, /* @__PURE__ */ n.createElement(qe, null, o.map((a) => h(s, {
|
|
1450
|
+
key: a.value,
|
|
1451
|
+
value: a.value,
|
|
1452
|
+
label: a.label
|
|
1453
|
+
}))));
|
|
1454
|
+
}, Sr = ({ className: e, ...t }) => {
|
|
1455
|
+
const { value: r, label: o } = t;
|
|
1456
|
+
return /* @__PURE__ */ n.createElement(Ae, {
|
|
1457
|
+
className: e,
|
|
1458
|
+
id: r,
|
|
1459
|
+
textValue: o
|
|
1460
|
+
}, o);
|
|
1461
|
+
};
|
|
1462
|
+
rt.Option = Sr;
|
|
1463
|
+
const gr = ({ className: e, children: t, ...r }) => {
|
|
1464
|
+
const { options: o } = r, { id: s, value: a, onChange: i, disabled: l, readOnly: u, required: d, hasError: m, placeholder: C, onBlur: y, onFocus: p } = _(), { inputId: E, labelId: f, ariaDescribedBy: N } = P(), v = B(null);
|
|
1465
|
+
G(() => {
|
|
1466
|
+
var g;
|
|
1467
|
+
(g = v.current) == null || g.focus({
|
|
1468
|
+
preventScroll: !0
|
|
1469
|
+
});
|
|
1470
|
+
}, s);
|
|
1471
|
+
const { className: D, stateProps: O } = wt(e);
|
|
1472
|
+
return /* @__PURE__ */ n.createElement(Pt, null, /* @__PURE__ */ n.createElement(Tt, {
|
|
1473
|
+
ref: v,
|
|
1474
|
+
id: E,
|
|
1475
|
+
className: D,
|
|
1476
|
+
...ht(O, {
|
|
1477
|
+
onFocus: p,
|
|
1478
|
+
onBlur: y
|
|
1479
|
+
}),
|
|
1480
|
+
"aria-labelledby": f,
|
|
1481
|
+
"aria-describedby": N,
|
|
1482
|
+
"aria-invalid": m || void 0,
|
|
1483
|
+
autoComplete: "address-level1",
|
|
1484
|
+
value: a,
|
|
1485
|
+
options: o,
|
|
1486
|
+
placeholder: C,
|
|
1487
|
+
onChange: i,
|
|
1488
|
+
disabled: l,
|
|
1489
|
+
readOnly: u,
|
|
1490
|
+
required: d
|
|
1491
|
+
}), t);
|
|
1492
|
+
};
|
|
1493
|
+
Y.Label = pe;
|
|
1494
|
+
Y.NativeSelect = gr;
|
|
1495
|
+
Y.Control = De;
|
|
1496
|
+
Y.Options = rt;
|
|
1497
|
+
Y.Description = ue;
|
|
1498
|
+
Y.Error = me;
|
|
1499
|
+
const Dr = () => Ee("country"), hr = () => Ee("subdivision"), Fr = () => Ee("city"), Ar = () => Ee("addressLine"), _r = () => Ee("addressLine2"), Rr = () => Ee("postalCode"), Pr = () => Ee("streetName"), Tr = () => Ee("streetNumber"), wr = () => Ee("apartment"), Mr = {
|
|
1500
|
+
[z.MLA_COUNTRY]: Dr,
|
|
1501
|
+
[z.MLA_SUBDIVISION]: hr,
|
|
1502
|
+
[z.MLA_CITY]: Fr,
|
|
1503
|
+
[z.MLA_ADDRESS_LINE]: Ar,
|
|
1504
|
+
[z.MLA_ADDRESS_LINE_2]: _r,
|
|
1505
|
+
[z.MLA_POSTAL_CODE]: Rr,
|
|
1506
|
+
[z.MLA_STREET_NAME]: Pr,
|
|
1507
|
+
[z.MLA_STREET_NUMBER]: Tr,
|
|
1508
|
+
[z.MLA_APARTMENT]: wr
|
|
1509
|
+
}, Br = {}, qr = [], c = ({ children: e, className: t }) => {
|
|
1510
|
+
const { id: r, form: o, value: s, onChange: a, onFieldBlur: i, onFieldFocus: l, errors: u, FieldLayout: d, fieldSettings: m, label: C, validation: y, target: p, autocompleteEnabled: E, required: f, fieldType: N } = _(), [v, D] = fe(null), O = zt(), g = x(() => ({
|
|
1511
|
+
...O,
|
|
1512
|
+
...Mr
|
|
1513
|
+
}), [
|
|
1514
|
+
O
|
|
1515
|
+
]), { isExperimentEnabled: w } = Je(), T = w(Xe.STREETLESS_LOCALITY_FALLBACK), { validateFields: S } = Gt(), F = Zt(), q = Dt(), Q = x(() => {
|
|
1516
|
+
var V;
|
|
1517
|
+
const K = !!((V = q.actions) != null && V.getPlace);
|
|
1518
|
+
return {
|
|
1519
|
+
...q,
|
|
1520
|
+
actions: {
|
|
1521
|
+
predict: rn,
|
|
1522
|
+
getPlace: nn,
|
|
1523
|
+
searchByPostalCode: tn,
|
|
1524
|
+
...K ? {} : {
|
|
1525
|
+
searchByQuery: en
|
|
1526
|
+
},
|
|
1527
|
+
...q.actions
|
|
1528
|
+
}
|
|
1529
|
+
};
|
|
1530
|
+
}, [
|
|
1531
|
+
q
|
|
1532
|
+
]), { form: Z, isMultilineAddressField: U } = Tn({
|
|
1533
|
+
id: r,
|
|
1534
|
+
target: p,
|
|
1535
|
+
fieldType: N,
|
|
1536
|
+
form: o,
|
|
1537
|
+
country: s == null ? void 0 : s.country,
|
|
1538
|
+
fieldSettings: m,
|
|
1539
|
+
validation: y,
|
|
1540
|
+
required: f
|
|
1541
|
+
}), R = A((K) => {
|
|
1542
|
+
if (!s)
|
|
1543
|
+
return;
|
|
1544
|
+
const V = Ln(K, U, T), Re = {
|
|
1545
|
+
...V,
|
|
1546
|
+
[Ne.COUNTRY]: V[Ne.COUNTRY] ?? s[Ne.COUNTRY]
|
|
1547
|
+
};
|
|
1548
|
+
a == null || a(Re);
|
|
1549
|
+
}, [
|
|
1550
|
+
a,
|
|
1551
|
+
s,
|
|
1552
|
+
U,
|
|
1553
|
+
T
|
|
1554
|
+
]), k = A((K, V) => {
|
|
1555
|
+
if (U && K === Ne.COUNTRY && (s == null ? void 0 : s[K]) !== V) {
|
|
1556
|
+
a == null || a({
|
|
1557
|
+
[Ne.COUNTRY]: V
|
|
1558
|
+
});
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
a == null || a({
|
|
1562
|
+
...s,
|
|
1563
|
+
[K]: V
|
|
1564
|
+
});
|
|
1565
|
+
}, [
|
|
1566
|
+
a,
|
|
1567
|
+
s,
|
|
1568
|
+
U
|
|
1569
|
+
]), M = A(async (K) => S(U ? [
|
|
1570
|
+
...K,
|
|
1571
|
+
{
|
|
1572
|
+
path: `${p}/${Ne.COUNTRY}`,
|
|
1573
|
+
value: s == null ? void 0 : s.country
|
|
1574
|
+
}
|
|
1575
|
+
] : K), [
|
|
1576
|
+
s,
|
|
1577
|
+
p,
|
|
1578
|
+
S,
|
|
1579
|
+
U
|
|
1580
|
+
]);
|
|
1581
|
+
on(r, () => {
|
|
1582
|
+
var Re;
|
|
1583
|
+
const K = u == null ? void 0 : u[0], V = (Re = Z == null ? void 0 : Z.fields) == null ? void 0 : Re.find((pt) => "target" in pt && pt.target === (K == null ? void 0 : K.errorPath));
|
|
1584
|
+
return V == null ? void 0 : V.id;
|
|
1585
|
+
});
|
|
1586
|
+
const $ = pn(r), ot = h(b(e, c.Country), {
|
|
1587
|
+
isForcedOpen: $
|
|
1588
|
+
}), st = b(e, c.Subdivision), at = b(e, c.City), lt = b(e, c.AddressLine), it = b(e, c.AddressLine2), ct = b(e, c.PostalCode), dt = b(e, c.StreetName), ut = b(e, c.StreetNumber), mt = b(e, c.Apartment), Vt = x(() => ({
|
|
1589
|
+
country: ot,
|
|
1590
|
+
subdivision: st,
|
|
1591
|
+
city: at,
|
|
1592
|
+
addressLine: lt,
|
|
1593
|
+
addressLine2: it,
|
|
1594
|
+
postalCode: ct,
|
|
1595
|
+
streetName: dt,
|
|
1596
|
+
streetNumber: ut,
|
|
1597
|
+
apartment: mt
|
|
1598
|
+
}), [
|
|
1599
|
+
ot,
|
|
1600
|
+
st,
|
|
1601
|
+
at,
|
|
1602
|
+
lt,
|
|
1603
|
+
it,
|
|
1604
|
+
ct,
|
|
1605
|
+
dt,
|
|
1606
|
+
ut,
|
|
1607
|
+
mt
|
|
1608
|
+
]);
|
|
1609
|
+
return Z ? /* @__PURE__ */ n.createElement(d, {
|
|
1610
|
+
fieldId: r
|
|
1611
|
+
}, /* @__PURE__ */ n.createElement(On, {
|
|
1612
|
+
countryCode: s == null ? void 0 : s.country
|
|
1613
|
+
}, /* @__PURE__ */ n.createElement(vn, {
|
|
1614
|
+
autocompleteEnabled: E,
|
|
1615
|
+
onAddressSelect: R
|
|
1616
|
+
}, /* @__PURE__ */ n.createElement(wn, {
|
|
1617
|
+
fields: Vt
|
|
1618
|
+
}, /* @__PURE__ */ n.createElement("div", {
|
|
1619
|
+
ref: D,
|
|
1620
|
+
style: {
|
|
1621
|
+
display: "contents"
|
|
1622
|
+
}
|
|
1623
|
+
}), /* @__PURE__ */ n.createElement(dn, {
|
|
1624
|
+
getContainer: () => v
|
|
1625
|
+
}, /* @__PURE__ */ n.createElement("fieldset", {
|
|
1626
|
+
className: t,
|
|
1627
|
+
style: un
|
|
1628
|
+
}, /* @__PURE__ */ n.createElement("legend", {
|
|
1629
|
+
style: mn
|
|
1630
|
+
}, C), /* @__PURE__ */ n.createElement(sn, {
|
|
1631
|
+
formSchema: F,
|
|
1632
|
+
form: Z,
|
|
1633
|
+
values: s ?? Br,
|
|
1634
|
+
onFieldChange: k,
|
|
1635
|
+
onBlur: i,
|
|
1636
|
+
onFocus: l,
|
|
1637
|
+
errors: u ?? qr,
|
|
1638
|
+
validateFields: M,
|
|
1639
|
+
fields: g,
|
|
1640
|
+
fieldActions: Q
|
|
1641
|
+
}))))))) : null;
|
|
1642
|
+
};
|
|
1643
|
+
c.Country = W;
|
|
1644
|
+
c.Subdivision = Y;
|
|
1645
|
+
c.City = ie;
|
|
1646
|
+
c.AddressLine = H;
|
|
1647
|
+
c.AddressLine2 = ae;
|
|
1648
|
+
c.PostalCode = j;
|
|
1649
|
+
c.StreetName = J;
|
|
1650
|
+
c.StreetNumber = ce;
|
|
1651
|
+
c.Apartment = le;
|
|
1652
|
+
const xr = "_postalCodeControl_1tire_1", kr = "_comboControl_1tire_5", Ur = "_comboTrigger_1tire_19", Te = {
|
|
1653
|
+
postalCodeControl: xr,
|
|
1654
|
+
comboControl: kr,
|
|
1655
|
+
comboTrigger: Ur
|
|
1656
|
+
}, co = () => {
|
|
1657
|
+
const e = ke(bt, [
|
|
1658
|
+
Te.comboControl
|
|
1659
|
+
]), t = ke(bt, [
|
|
1660
|
+
I.nativeInput,
|
|
1661
|
+
I.nativeSelect
|
|
1662
|
+
]), r = ke(cn, []), o = Cn(ln, xe);
|
|
1663
|
+
return /* @__PURE__ */ n.createElement(c, {
|
|
1664
|
+
className: an
|
|
1665
|
+
}, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
|
|
1666
|
+
className: L(te, I.label)
|
|
1667
|
+
}, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
|
|
1668
|
+
className: L(ne, I.requiredMark)
|
|
1669
|
+
})), /* @__PURE__ */ n.createElement(c.Country.Control, {
|
|
1670
|
+
className: e
|
|
1671
|
+
}, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
|
|
1672
|
+
className: L(I.innerInput, xe)
|
|
1673
|
+
}), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
|
|
1674
|
+
className: Te.comboTrigger
|
|
1675
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
1676
|
+
className: I.dropdownIcon
|
|
1677
|
+
}))), /* @__PURE__ */ n.createElement(c.Country.NativeSelect, {
|
|
1678
|
+
className: t
|
|
1679
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
1680
|
+
className: L(I.dropdownIcon, I.nativeDecoration)
|
|
1681
|
+
})), /* @__PURE__ */ n.createElement(c.Country.Options, {
|
|
1682
|
+
className: L(Oe, I.selectPopover, I.dropdownPopover)
|
|
1683
|
+
}, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
|
|
1684
|
+
className: o
|
|
1685
|
+
})), /* @__PURE__ */ n.createElement(c.Country.Error, {
|
|
1686
|
+
className: L(re, I.error)
|
|
1687
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
|
|
1688
|
+
className: L(oe, I.description)
|
|
1689
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1690
|
+
content: s,
|
|
1691
|
+
locale: a
|
|
1692
|
+
}))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
|
|
1693
|
+
className: L(te, I.label)
|
|
1694
|
+
}, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
|
|
1695
|
+
className: L(ne, I.requiredMark)
|
|
1696
|
+
})), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
|
|
1697
|
+
className: r
|
|
1698
|
+
}), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
|
|
1699
|
+
className: L(Oe, I.selectPopover, I.dropdownPopover)
|
|
1700
|
+
}, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
|
|
1701
|
+
className: o
|
|
1702
|
+
})), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
|
|
1703
|
+
className: L(re, I.error)
|
|
1704
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
|
|
1705
|
+
className: L(oe, I.description)
|
|
1706
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1707
|
+
content: s,
|
|
1708
|
+
locale: a
|
|
1709
|
+
}))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
|
|
1710
|
+
className: L(te, I.label)
|
|
1711
|
+
}, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
|
|
1712
|
+
className: L(ne, I.requiredMark)
|
|
1713
|
+
})), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
|
|
1714
|
+
className: r
|
|
1715
|
+
}), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
|
|
1716
|
+
className: L(re, I.error)
|
|
1717
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
|
|
1718
|
+
className: L(oe, I.description)
|
|
1719
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1720
|
+
content: s,
|
|
1721
|
+
locale: a
|
|
1722
|
+
}))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
|
|
1723
|
+
className: L(te, I.label)
|
|
1724
|
+
}, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
|
|
1725
|
+
className: L(ne, I.requiredMark)
|
|
1726
|
+
})), /* @__PURE__ */ n.createElement(c.City.Input, {
|
|
1727
|
+
className: r
|
|
1728
|
+
}), /* @__PURE__ */ n.createElement(c.City.Error, {
|
|
1729
|
+
className: L(re, I.error)
|
|
1730
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
|
|
1731
|
+
className: L(oe, I.description)
|
|
1732
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1733
|
+
content: s,
|
|
1734
|
+
locale: a
|
|
1735
|
+
}))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
|
|
1736
|
+
className: L(te, I.label)
|
|
1737
|
+
}, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
|
|
1738
|
+
className: L(ne, I.requiredMark)
|
|
1739
|
+
})), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
|
|
1740
|
+
className: Te.postalCodeControl
|
|
1741
|
+
}, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
|
|
1742
|
+
className: r
|
|
1743
|
+
})), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
|
|
1744
|
+
className: L(Oe, I.selectPopover, I.dropdownPopover)
|
|
1745
|
+
}, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
|
|
1746
|
+
className: o
|
|
1747
|
+
})), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
|
|
1748
|
+
className: L(re, I.error)
|
|
1749
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
|
|
1750
|
+
className: L(oe, I.description)
|
|
1751
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1752
|
+
content: s,
|
|
1753
|
+
locale: a
|
|
1754
|
+
}))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
|
|
1755
|
+
className: L(te, I.label)
|
|
1756
|
+
}, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
|
|
1757
|
+
className: L(ne, I.requiredMark)
|
|
1758
|
+
})), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
|
|
1759
|
+
className: e
|
|
1760
|
+
}, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
|
|
1761
|
+
className: L(I.innerInput, xe)
|
|
1762
|
+
}), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
|
|
1763
|
+
className: Te.comboTrigger
|
|
1764
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
1765
|
+
className: I.dropdownIcon
|
|
1766
|
+
}))), /* @__PURE__ */ n.createElement(c.Subdivision.NativeSelect, {
|
|
1767
|
+
className: t
|
|
1768
|
+
}, /* @__PURE__ */ n.createElement(Pe, {
|
|
1769
|
+
className: L(I.dropdownIcon, I.nativeDecoration)
|
|
1770
|
+
})), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
|
|
1771
|
+
className: L(Oe, I.selectPopover, I.dropdownPopover)
|
|
1772
|
+
}, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
|
|
1773
|
+
className: o
|
|
1774
|
+
})), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
|
|
1775
|
+
className: L(re, I.error)
|
|
1776
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
|
|
1777
|
+
className: L(oe, I.description)
|
|
1778
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1779
|
+
content: s,
|
|
1780
|
+
locale: a
|
|
1781
|
+
}))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
|
|
1782
|
+
className: L(te, I.label)
|
|
1783
|
+
}, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
|
|
1784
|
+
className: L(ne, I.requiredMark)
|
|
1785
|
+
})), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
|
|
1786
|
+
className: r
|
|
1787
|
+
}), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
|
|
1788
|
+
className: L(Oe, I.selectPopover, I.dropdownPopover)
|
|
1789
|
+
}, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
|
|
1790
|
+
className: o
|
|
1791
|
+
})), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
|
|
1792
|
+
className: L(re, I.error)
|
|
1793
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
|
|
1794
|
+
className: L(oe, I.description)
|
|
1795
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1796
|
+
content: s,
|
|
1797
|
+
locale: a
|
|
1798
|
+
}))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
|
|
1799
|
+
className: L(te, I.label)
|
|
1800
|
+
}, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
|
|
1801
|
+
className: L(ne, I.requiredMark)
|
|
1802
|
+
})), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
|
|
1803
|
+
className: r
|
|
1804
|
+
}), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
|
|
1805
|
+
className: L(re, I.error)
|
|
1806
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
|
|
1807
|
+
className: L(oe, I.description)
|
|
1808
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1809
|
+
content: s,
|
|
1810
|
+
locale: a
|
|
1811
|
+
}))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
|
|
1812
|
+
className: L(te, I.label)
|
|
1813
|
+
}, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
|
|
1814
|
+
className: L(ne, I.requiredMark)
|
|
1815
|
+
})), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
|
|
1816
|
+
className: r
|
|
1817
|
+
}), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
|
|
1818
|
+
className: L(re, I.error)
|
|
1819
|
+
}, /* @__PURE__ */ n.createElement(se, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
|
|
1820
|
+
className: L(oe, I.description)
|
|
1821
|
+
}, ({ content: s, locale: a }) => /* @__PURE__ */ n.createElement(ee, {
|
|
1822
|
+
content: s,
|
|
1823
|
+
locale: a
|
|
1824
|
+
}))));
|
|
1825
|
+
};
|
|
1826
|
+
export {
|
|
1827
|
+
co as M
|
|
1828
|
+
};
|