formica-ui-lib 1.0.341 → 1.0.342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -8292,7 +8292,22 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8292
8292
|
})]
|
|
8293
8293
|
}, e.id))
|
|
8294
8294
|
})
|
|
8295
|
-
}) : null, rl = (e) => [e.title, e.subtitle].filter(Boolean).join(" "), il = (
|
|
8295
|
+
}) : null, rl = (e) => [e.title, e.subtitle].filter(Boolean).join(" "), il = (e) => e.variant === "document" ? /* @__PURE__ */ l("span", {
|
|
8296
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center",
|
|
8297
|
+
children: /* @__PURE__ */ l(S, {
|
|
8298
|
+
iconType: "fa-regular",
|
|
8299
|
+
iconName: "file-pdf",
|
|
8300
|
+
size: "2xl"
|
|
8301
|
+
})
|
|
8302
|
+
}) : e.imageSrc ? /* @__PURE__ */ l(L, {
|
|
8303
|
+
src: e.imageSrc,
|
|
8304
|
+
alt: e.imageAlt ?? "",
|
|
8305
|
+
className: "h-10 w-10 shrink-0 rounded-sm object-cover",
|
|
8306
|
+
quality: 80
|
|
8307
|
+
}) : /* @__PURE__ */ l("span", {
|
|
8308
|
+
"aria-hidden": "true",
|
|
8309
|
+
className: "h-10 w-10 shrink-0 rounded-sm bg-gray-100"
|
|
8310
|
+
}), al = ({ id: e, items: t = [], viewAllLabel: n = "View all results", ariaLabel: r = "Search results", layoutVariant: i = "popover", onResultClick: a, onViewAllClick: o }) => t.length ? /* @__PURE__ */ u("div", {
|
|
8296
8311
|
id: e,
|
|
8297
8312
|
className: `${i === "contained" ? "w-full" : "w-80"} overflow-hidden rounded-md border border-gray-200 bg-white text-primary shadow-lg`,
|
|
8298
8313
|
role: "region",
|
|
@@ -8303,15 +8318,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8303
8318
|
ariaLabel: rl(e),
|
|
8304
8319
|
className: "flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-gray-50 focus:bg-gray-50 focus:outline-none",
|
|
8305
8320
|
onCardClick: () => a?.({ item: e }),
|
|
8306
|
-
children: [e
|
|
8307
|
-
src: e.imageSrc,
|
|
8308
|
-
alt: e.imageAlt ?? "",
|
|
8309
|
-
className: "h-10 w-10 shrink-0 rounded-sm object-cover",
|
|
8310
|
-
quality: 80
|
|
8311
|
-
}) : /* @__PURE__ */ l("span", {
|
|
8312
|
-
"aria-hidden": "true",
|
|
8313
|
-
className: "h-10 w-10 shrink-0 rounded-sm bg-gray-100"
|
|
8314
|
-
}), /* @__PURE__ */ u("span", {
|
|
8321
|
+
children: [il(e), /* @__PURE__ */ u("span", {
|
|
8315
8322
|
className: "min-w-0",
|
|
8316
8323
|
children: [
|
|
8317
8324
|
/* @__PURE__ */ l("span", {
|
|
@@ -8322,7 +8329,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8322
8329
|
className: "mt-0.5 block text-xs leading-snug break-words text-secondary",
|
|
8323
8330
|
children: e.subtitle
|
|
8324
8331
|
}) : null,
|
|
8325
|
-
e.variant === "article" && e.description ? /* @__PURE__ */ l("span", {
|
|
8332
|
+
(e.variant === "article" || e.variant === "document") && e.description ? /* @__PURE__ */ l("span", {
|
|
8326
8333
|
className: "mt-0.5 block text-xs leading-snug break-words text-secondary",
|
|
8327
8334
|
children: e.description
|
|
8328
8335
|
}) : null
|
|
@@ -8338,7 +8345,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8338
8345
|
onClick: o
|
|
8339
8346
|
})
|
|
8340
8347
|
})]
|
|
8341
|
-
}) : null,
|
|
8348
|
+
}) : null, ol = 300, sl = ({ Countries: e, countries: t, selectedCountry: r, Login: i, Account: a, Cart: c = {
|
|
8342
8349
|
hasCart: !1,
|
|
8343
8350
|
itemCount: 0
|
|
8344
8351
|
}, showCart: d = !0, showFavorites: f = !0, showLogin: p = !0, searchPlaceholder: m = "Search", searchLabel: h = "Search", searchResultsAriaLabel: g = "Search results", clearSearchLabel: _ = "Clear search", searchResultItems: v = [], searchViewAllLabel: y, onSearchClick: b, onSearchChange: x, onSearchSubmit: S, onSearchResultClick: C, onSearchViewAllClick: w, onCartClick: T, onLoginClick: E, onAccountClick: D, onFavoritesClick: O, onCountrySelect: k }) => {
|
|
@@ -8347,7 +8354,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8347
8354
|
if (!F.current) return;
|
|
8348
8355
|
let e = window.setTimeout(() => {
|
|
8349
8356
|
x?.({ query: M });
|
|
8350
|
-
},
|
|
8357
|
+
}, ol);
|
|
8351
8358
|
return () => {
|
|
8352
8359
|
window.clearTimeout(e);
|
|
8353
8360
|
};
|
|
@@ -8405,7 +8412,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8405
8412
|
}),
|
|
8406
8413
|
A && B ? /* @__PURE__ */ l("div", {
|
|
8407
8414
|
className: "absolute top-full right-0 z-30 mt-2",
|
|
8408
|
-
children: /* @__PURE__ */ l(
|
|
8415
|
+
children: /* @__PURE__ */ l(al, {
|
|
8409
8416
|
id: "top-nav-search-results",
|
|
8410
8417
|
items: v,
|
|
8411
8418
|
viewAllLabel: y,
|
|
@@ -8471,11 +8478,11 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8471
8478
|
}) }) : null
|
|
8472
8479
|
]
|
|
8473
8480
|
});
|
|
8474
|
-
},
|
|
8481
|
+
}, cl = 750, ll = "\n @keyframes top-nav-account-drawer-slide-in {\n from { transform: translate3d(100%, 0, 0); }\n to { transform: translate3d(0, 0, 0); }\n }\n\n @keyframes top-nav-account-drawer-slide-out {\n from { transform: translate3d(0, 0, 0); }\n to { transform: translate3d(100%, 0, 0); }\n }\n\n @keyframes top-nav-account-backdrop-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes top-nav-account-backdrop-out {\n from { opacity: 1; }\n to { opacity: 0; }\n }\n\n .top-nav-account-drawer-panel[data-phase=\"opening\"] {\n animation: top-nav-account-drawer-slide-in 500ms cubic-bezier(0.4, 0, 0.2, 1) both;\n }\n\n .top-nav-account-drawer-panel[data-phase=\"open\"] {\n transform: translate3d(0, 0, 0);\n }\n\n .top-nav-account-drawer-panel[data-phase=\"closing\"] {\n animation: top-nav-account-drawer-slide-out 500ms cubic-bezier(0.4, 0, 0.2, 1) both;\n }\n\n .top-nav-account-drawer-backdrop[data-phase=\"opening\"] {\n animation: top-nav-account-backdrop-in 500ms cubic-bezier(0.4, 0, 0.2, 1) both;\n }\n\n .top-nav-account-drawer-backdrop[data-phase=\"open\"] {\n opacity: 1;\n }\n\n .top-nav-account-drawer-backdrop[data-phase=\"closing\"] {\n animation: top-nav-account-backdrop-out 500ms cubic-bezier(0.4, 0, 0.2, 1) both;\n }\n\n @media (min-width: 768px) {\n .top-nav-account-drawer-panel[data-phase=\"opening\"],\n .top-nav-account-drawer-panel[data-phase=\"closing\"] {\n animation-duration: 700ms;\n }\n }\n\n", ul = ({ isOpen: e, customerName: t, title: r = "Account", orderHistoryLabel: i = "Order History", favoritesLabel: a = "Favorites", profileLabel: o = "Profile & Addresses", logoutLabel: c = "Log Out", onClose: f, onOrderHistoryClick: p, onFavoritesClick: m, onProfileClick: h, onLogoutClick: g }) => {
|
|
8475
8482
|
let [_, y] = s(e), [b, x] = s(e ? "opening" : "open");
|
|
8476
8483
|
if (n(() => {
|
|
8477
8484
|
let t;
|
|
8478
|
-
return e ? (y(!0), x("opening")) : _ && (x("closing"), t = window.setTimeout(() => y(!1),
|
|
8485
|
+
return e ? (y(!0), x("opening")) : _ && (x("closing"), t = window.setTimeout(() => y(!1), cl)), () => window.clearTimeout(t);
|
|
8479
8486
|
}, [e, _]), n(() => {
|
|
8480
8487
|
if (!_) return;
|
|
8481
8488
|
let e = document.body.style.overflow, t = document.body.style.paddingRight, n = window.innerWidth - document.documentElement.clientWidth, r = (e) => {
|
|
@@ -8495,7 +8502,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8495
8502
|
return d(/* @__PURE__ */ u("div", {
|
|
8496
8503
|
className: `fixed inset-0 z-60 ${e ? "" : "pointer-events-none"}`,
|
|
8497
8504
|
children: [
|
|
8498
|
-
/* @__PURE__ */ l("style", { children:
|
|
8505
|
+
/* @__PURE__ */ l("style", { children: ll }),
|
|
8499
8506
|
/* @__PURE__ */ l("button", {
|
|
8500
8507
|
type: "button",
|
|
8501
8508
|
"aria-label": "Close account overlay",
|
|
@@ -8612,7 +8619,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8612
8619
|
})
|
|
8613
8620
|
]
|
|
8614
8621
|
}), document.body);
|
|
8615
|
-
},
|
|
8622
|
+
}, dl = "__mobile-menu-open__", fl = 300, pl = ({ NavMenuWithSubItems: e = [], countries: t, selectedCountry: r, Login: i, Account: a, Cart: c, showCart: d = !0, showFavorites: f = !0, showLogin: p = !0, Logo: m, searchPlaceholder: h = "Search", searchLabel: g = "Search", searchResultsAriaLabel: _ = "Search results", clearSearchLabel: v = "Clear search", closeSearchLabel: y = "Close search", searchResultItems: b, searchViewAllLabel: x, onLogoClick: S, onNavItemClick: C, onMegaMenuLinkClick: w, onSearchClick: T, onSearchChange: E, onSearchSubmit: D, onSearchResultClick: O, onSearchViewAllClick: k, onCartClick: A, onLoginClick: j, onAccountClick: M, onOrderHistoryClick: N, onProfileClick: F, onLogoutClick: I, onFavoritesClick: R, onCountrySelect: z }) => {
|
|
8616
8623
|
let B = o(null), [V, ee] = s(null), [te, ne] = s(null), [re, ie] = s(!1), [ae, H] = s(!1), [oe, U] = s(""), se = o(!1), W = te !== null, ce = e.find((e) => e.id === V), le = t ?? [], ue = i ?? {
|
|
8617
8624
|
label: "Log In",
|
|
8618
8625
|
href: "/login"
|
|
@@ -8634,7 +8641,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8634
8641
|
if (!se.current) return;
|
|
8635
8642
|
let e = window.setTimeout(() => {
|
|
8636
8643
|
E?.({ query: oe });
|
|
8637
|
-
},
|
|
8644
|
+
}, fl);
|
|
8638
8645
|
return () => window.clearTimeout(e);
|
|
8639
8646
|
}, [oe, E]);
|
|
8640
8647
|
let Se = () => {
|
|
@@ -8661,7 +8668,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8661
8668
|
}, ke = (e, t = {}) => {
|
|
8662
8669
|
ee(null), t.closeMobile && Ee(), w?.(e);
|
|
8663
8670
|
}, Ae = (e) => {
|
|
8664
|
-
ne((t) => t === e ?
|
|
8671
|
+
ne((t) => t === e ? dl : e);
|
|
8665
8672
|
};
|
|
8666
8673
|
return /* @__PURE__ */ u("header", {
|
|
8667
8674
|
ref: B,
|
|
@@ -8730,7 +8737,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8730
8737
|
className: "h-9 w-9 p-0",
|
|
8731
8738
|
"aria-label": W ? "Close menu" : "Open menu",
|
|
8732
8739
|
onClick: () => {
|
|
8733
|
-
ne((e) => e === null ?
|
|
8740
|
+
ne((e) => e === null ? dl : null);
|
|
8734
8741
|
},
|
|
8735
8742
|
"aria-expanded": W
|
|
8736
8743
|
})
|
|
@@ -8815,7 +8822,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8815
8822
|
active: V === t
|
|
8816
8823
|
}, t);
|
|
8817
8824
|
})
|
|
8818
|
-
}), /* @__PURE__ */ l(
|
|
8825
|
+
}), /* @__PURE__ */ l(sl, {
|
|
8819
8826
|
Countries: le,
|
|
8820
8827
|
selectedCountry: r,
|
|
8821
8828
|
Login: ue,
|
|
@@ -8862,7 +8869,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8862
8869
|
})
|
|
8863
8870
|
})
|
|
8864
8871
|
}),
|
|
8865
|
-
/* @__PURE__ */ l(
|
|
8872
|
+
/* @__PURE__ */ l(ul, {
|
|
8866
8873
|
...fe,
|
|
8867
8874
|
isOpen: re,
|
|
8868
8875
|
onClose: () => ie(!1),
|
|
@@ -8894,7 +8901,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8894
8901
|
se.current = !0, U(e.target.value);
|
|
8895
8902
|
},
|
|
8896
8903
|
onSearchSubmit: q
|
|
8897
|
-
}), /* @__PURE__ */ l(
|
|
8904
|
+
}), /* @__PURE__ */ l(al, {
|
|
8898
8905
|
id: "top-nav-mobile-search-results",
|
|
8899
8906
|
items: b,
|
|
8900
8907
|
viewAllLabel: x,
|
|
@@ -8908,7 +8915,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8908
8915
|
})
|
|
8909
8916
|
]
|
|
8910
8917
|
});
|
|
8911
|
-
},
|
|
8918
|
+
}, ml = ({ message: e, buttonLabel: t, onButtonClick: n, children: r }) => {
|
|
8912
8919
|
let i = e?.trim();
|
|
8913
8920
|
return i ? /* @__PURE__ */ l("div", {
|
|
8914
8921
|
className: "w-full bg-primary",
|
|
@@ -8938,7 +8945,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8938
8945
|
]
|
|
8939
8946
|
})
|
|
8940
8947
|
}) : null;
|
|
8941
|
-
},
|
|
8948
|
+
}, hl = ({ Breadcrumbs: e = [], onBreadcrumbClick: t }) => {
|
|
8942
8949
|
if (!e.length) return null;
|
|
8943
8950
|
let n = e.at(-1), r = e.slice(0, -1), i = (e, n) => {
|
|
8944
8951
|
!t || !n.href || (e.preventDefault(), t(n.href, n));
|
|
@@ -8981,7 +8988,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
8981
8988
|
})
|
|
8982
8989
|
})
|
|
8983
8990
|
});
|
|
8984
|
-
},
|
|
8991
|
+
}, gl = ({ img: e, size: t = "default" }) => {
|
|
8985
8992
|
let n = {
|
|
8986
8993
|
default: "h-10 w-auto",
|
|
8987
8994
|
primary: "h-24 w-auto mb-3",
|
|
@@ -9006,12 +9013,12 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9006
9013
|
className: "inline-flex",
|
|
9007
9014
|
children: c
|
|
9008
9015
|
});
|
|
9009
|
-
},
|
|
9016
|
+
}, _l = ({ primaryLogo: e, phoneLine: t, socials: n = [] }) => {
|
|
9010
9017
|
let r = t ? Zc(t) : "";
|
|
9011
9018
|
return /* @__PURE__ */ u("div", {
|
|
9012
9019
|
className: "space-y-6",
|
|
9013
9020
|
children: [
|
|
9014
|
-
/* @__PURE__ */ l(
|
|
9021
|
+
/* @__PURE__ */ l(gl, {
|
|
9015
9022
|
img: e,
|
|
9016
9023
|
size: "primary"
|
|
9017
9024
|
}),
|
|
@@ -9043,7 +9050,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9043
9050
|
}) : null
|
|
9044
9051
|
]
|
|
9045
9052
|
});
|
|
9046
|
-
},
|
|
9053
|
+
}, vl = ({ item: e, variant: t = "default" }) => {
|
|
9047
9054
|
let n = {
|
|
9048
9055
|
default: "text-xs mt-4 text-secondary/85 hover:underline",
|
|
9049
9056
|
mobile: "text-sm text-secondary hover:underline",
|
|
@@ -9062,7 +9069,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9062
9069
|
className: n,
|
|
9063
9070
|
children: r
|
|
9064
9071
|
});
|
|
9065
|
-
},
|
|
9072
|
+
}, yl = ({ columns: e }) => /* @__PURE__ */ l("div", {
|
|
9066
9073
|
className: "w-fit",
|
|
9067
9074
|
children: /* @__PURE__ */ l("div", {
|
|
9068
9075
|
className: "grid grid-cols-3 gap-y-8 gap-x-20",
|
|
@@ -9074,22 +9081,22 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9074
9081
|
children: n
|
|
9075
9082
|
}), /* @__PURE__ */ l("ul", {
|
|
9076
9083
|
className: "space-y-2",
|
|
9077
|
-
children: e.links.map((e, t) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
9084
|
+
children: e.links.map((e, t) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(vl, { item: e }) }, `${n}-${Zc(e.label)}-${t}`))
|
|
9078
9085
|
})] }, `${n}-${t}`);
|
|
9079
9086
|
})
|
|
9080
9087
|
})
|
|
9081
|
-
}),
|
|
9088
|
+
}), bl = ({ links: e = [], utilityLink: t, disclaimerLines: n = [], copyrightLine: r }) => {
|
|
9082
9089
|
let i = r ? Zc(r) : "", a = n.length || i;
|
|
9083
9090
|
return /* @__PURE__ */ u("div", {
|
|
9084
9091
|
className: "border-t border-white/15 mt-4 pt-2 space-y-4",
|
|
9085
9092
|
children: [/* @__PURE__ */ u("div", {
|
|
9086
9093
|
className: "flex flex-wrap items-center gap-x-5 gap-y-2",
|
|
9087
|
-
children: [e.map((e, t) => /* @__PURE__ */ l(
|
|
9094
|
+
children: [e.map((e, t) => /* @__PURE__ */ l(vl, {
|
|
9088
9095
|
item: e,
|
|
9089
9096
|
variant: "legal"
|
|
9090
9097
|
}, `${Zc(e.label)}-${t}`)), t ? /* @__PURE__ */ l("div", {
|
|
9091
9098
|
className: "ml-auto",
|
|
9092
|
-
children: /* @__PURE__ */ l(
|
|
9099
|
+
children: /* @__PURE__ */ l(vl, {
|
|
9093
9100
|
item: t,
|
|
9094
9101
|
variant: "legal"
|
|
9095
9102
|
})
|
|
@@ -9107,12 +9114,12 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9107
9114
|
}) : null]
|
|
9108
9115
|
}) : null]
|
|
9109
9116
|
});
|
|
9110
|
-
},
|
|
9117
|
+
}, xl = ({ affiliateLogos: e = [], parentLogo: t, phoneLine: n }) => {
|
|
9111
9118
|
let r = n ? Zc(n) : "";
|
|
9112
9119
|
if (!e.length && !t && !r) return null;
|
|
9113
9120
|
let i = t ? /* @__PURE__ */ l("div", {
|
|
9114
9121
|
className: "ml-6 shrink-0",
|
|
9115
|
-
children: /* @__PURE__ */ l(
|
|
9122
|
+
children: /* @__PURE__ */ l(gl, {
|
|
9116
9123
|
img: t,
|
|
9117
9124
|
size: "parent"
|
|
9118
9125
|
})
|
|
@@ -9128,7 +9135,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9128
9135
|
children: [
|
|
9129
9136
|
/* @__PURE__ */ l("div", {
|
|
9130
9137
|
className: "flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
9131
|
-
children: e.map((e, t) => /* @__PURE__ */ l(
|
|
9138
|
+
children: e.map((e, t) => /* @__PURE__ */ l(gl, {
|
|
9132
9139
|
img: e,
|
|
9133
9140
|
size: "affiliate"
|
|
9134
9141
|
}, `${e.label ? Zc(e.label) : ""}|${Zc(e.alt)}|${Qc(e.href)}|${Zc(e.src)}|${t}`))
|
|
@@ -9138,7 +9145,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9138
9145
|
]
|
|
9139
9146
|
})
|
|
9140
9147
|
});
|
|
9141
|
-
},
|
|
9148
|
+
}, Sl = ({ brand: e, columns: t, parentLogo: n, phoneLinePlacement: r = "brand", legal: i }) => {
|
|
9142
9149
|
let a = r === "logosBar";
|
|
9143
9150
|
return /* @__PURE__ */ l("footer", {
|
|
9144
9151
|
className: "bg-footBackground text-secondary pt-6",
|
|
@@ -9150,7 +9157,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9150
9157
|
children: [
|
|
9151
9158
|
/* @__PURE__ */ l("div", {
|
|
9152
9159
|
className: "md:col-span-4",
|
|
9153
|
-
children: /* @__PURE__ */ l(
|
|
9160
|
+
children: /* @__PURE__ */ l(_l, { ...a ? {
|
|
9154
9161
|
...e,
|
|
9155
9162
|
phoneLine: void 0
|
|
9156
9163
|
} : e })
|
|
@@ -9159,7 +9166,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9159
9166
|
className: "hidden md:col-span-8 md:block",
|
|
9160
9167
|
children: [/* @__PURE__ */ l("div", {
|
|
9161
9168
|
className: "flex justify-end",
|
|
9162
|
-
children: /* @__PURE__ */ l(
|
|
9169
|
+
children: /* @__PURE__ */ l(yl, { columns: t })
|
|
9163
9170
|
}), /* @__PURE__ */ l("div", { className: "block col-span-3" })]
|
|
9164
9171
|
}),
|
|
9165
9172
|
/* @__PURE__ */ l("div", {
|
|
@@ -9173,7 +9180,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9173
9180
|
children: n
|
|
9174
9181
|
}), /* @__PURE__ */ l("ul", {
|
|
9175
9182
|
className: "mt-3 space-y-2",
|
|
9176
|
-
children: e.links.map((e, t) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(
|
|
9183
|
+
children: e.links.map((e, t) => /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(vl, {
|
|
9177
9184
|
item: e,
|
|
9178
9185
|
variant: "mobile"
|
|
9179
9186
|
}) }, `${n}-${Zc(e.label)}-${t}`))
|
|
@@ -9183,21 +9190,21 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9183
9190
|
})
|
|
9184
9191
|
]
|
|
9185
9192
|
}),
|
|
9186
|
-
/* @__PURE__ */ l(
|
|
9193
|
+
/* @__PURE__ */ l(xl, {
|
|
9187
9194
|
affiliateLogos: e.affiliateLogos,
|
|
9188
9195
|
parentLogo: n,
|
|
9189
9196
|
phoneLine: a ? e.phoneLine : void 0
|
|
9190
9197
|
}),
|
|
9191
|
-
/* @__PURE__ */ l(
|
|
9198
|
+
/* @__PURE__ */ l(bl, { ...i })
|
|
9192
9199
|
]
|
|
9193
9200
|
})
|
|
9194
9201
|
});
|
|
9195
|
-
},
|
|
9202
|
+
}, Cl = (...e) => e.filter(Boolean).join(" "), wl = ({ imageSrc: e, imageAlt: t = "Banner image", children: n, sectionClassName: r = "w-full flex justify-center", bannerClassName: i = "relative h-80 md:h-119.25 w-full max-w-6xl overflow-hidden", imageClassName: a = "h-full w-full object-cover", overlayClassName: o = "absolute inset-0 flex", imageQuality: s = 90 }) => {
|
|
9196
9203
|
let c = e?.trim() ? e : "https://picsum.photos/1600/900";
|
|
9197
9204
|
return /* @__PURE__ */ l("section", {
|
|
9198
9205
|
className: r,
|
|
9199
9206
|
children: /* @__PURE__ */ u("div", {
|
|
9200
|
-
className:
|
|
9207
|
+
className: Cl("relative", i),
|
|
9201
9208
|
children: [/* @__PURE__ */ l(L, {
|
|
9202
9209
|
src: c,
|
|
9203
9210
|
alt: t,
|
|
@@ -9209,7 +9216,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9209
9216
|
})]
|
|
9210
9217
|
})
|
|
9211
9218
|
});
|
|
9212
|
-
},
|
|
9219
|
+
}, Tl = ({ imageSrc: t, imageAlt: n = "Where to buy", heading: r, productDropdownProps: i, searchInputProps: a, searchButtonLabel: o = "Search", onProductChange: s, onSearchSubmit: c }) => {
|
|
9213
9220
|
let d = !!i?.options?.length, [f, p] = e.useState(i?.value ?? ""), [m, h] = e.useState(a.value ?? "");
|
|
9214
9221
|
e.useEffect(() => {
|
|
9215
9222
|
p(i?.value ?? "");
|
|
@@ -9220,7 +9227,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9220
9227
|
let t = e.target.value;
|
|
9221
9228
|
p(t), s?.({ productValue: t });
|
|
9222
9229
|
};
|
|
9223
|
-
return /* @__PURE__ */ l(
|
|
9230
|
+
return /* @__PURE__ */ l(wl, {
|
|
9224
9231
|
imageSrc: t,
|
|
9225
9232
|
imageAlt: n,
|
|
9226
9233
|
bannerClassName: "relative h-80 w-full overflow-hidden md:h-96",
|
|
@@ -9270,7 +9277,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9270
9277
|
})]
|
|
9271
9278
|
})
|
|
9272
9279
|
});
|
|
9273
|
-
},
|
|
9280
|
+
}, El = ({ imageSrc: e, imageAlt: t = "Call To Action Hero", heading: n, subheading: r, body: i, eyebrow: a, ctas: o = [] }) => /* @__PURE__ */ l(wl, {
|
|
9274
9281
|
imageSrc: e,
|
|
9275
9282
|
imageAlt: t,
|
|
9276
9283
|
sectionClassName: "w-full",
|
|
@@ -9283,7 +9290,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9283
9290
|
eyebrow: a,
|
|
9284
9291
|
ctas: o
|
|
9285
9292
|
})
|
|
9286
|
-
}),
|
|
9293
|
+
}), Dl = ({ imageSrc: e, imageAlt: t = "Featured article banner", heading: n, subheading: r, articleCategory: i, ctaLabel: a, onCtaClick: o }) => /* @__PURE__ */ l(wl, {
|
|
9287
9294
|
imageSrc: e,
|
|
9288
9295
|
imageAlt: t,
|
|
9289
9296
|
sectionClassName: "px-4 md:px-0 md:mx-auto mb-16 md:mb-20 flex w-full max-w-6xl",
|
|
@@ -9297,7 +9304,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9297
9304
|
ctaLabel: a,
|
|
9298
9305
|
onCtaClick: o
|
|
9299
9306
|
})
|
|
9300
|
-
}),
|
|
9307
|
+
}), Ol = ({ items: e, value: t, onChange: n, renderTab: r, className: c = "", durationMs: d = 700, thicknessClassName: f = "h-[3px]", baselineClassName: p = "h-px" }) => {
|
|
9301
9308
|
let m = o(null), h = o([]), [g, _] = s({
|
|
9302
9309
|
left: 0,
|
|
9303
9310
|
width: 0
|
|
@@ -9373,7 +9380,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9373
9380
|
]
|
|
9374
9381
|
})
|
|
9375
9382
|
});
|
|
9376
|
-
},
|
|
9383
|
+
}, kl = (e) => e.id || e.href || e.label, Al = ({ items: e, startIndex: t, desktopVisibleCount: n = e.length, activeIndex: r, setActiveIndex: i, canPrev: a, canNext: o, onPrev: s, onNext: c, loadedIds: d, favoriteIds: f, showFavorites: p = !0, onLoaded: m, onToggleFav: h, onItemClick: g, getItemId: _ = kl }) => e.length ? /* @__PURE__ */ u("div", {
|
|
9377
9384
|
className: "mt-4 relative",
|
|
9378
9385
|
children: [
|
|
9379
9386
|
/* @__PURE__ */ l("button", {
|
|
@@ -9436,13 +9443,13 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9436
9443
|
})
|
|
9437
9444
|
})
|
|
9438
9445
|
]
|
|
9439
|
-
}) : null,
|
|
9446
|
+
}) : null, jl = 4, Ml = (e) => {
|
|
9440
9447
|
e.forEach((e) => {
|
|
9441
9448
|
if (!e) return;
|
|
9442
9449
|
let t = new window.Image();
|
|
9443
9450
|
t.decoding = "async", t.src = e;
|
|
9444
9451
|
});
|
|
9445
|
-
},
|
|
9452
|
+
}, Nl = ({ heading: t, body: n, TabsWithColumns: r = [], favoriteIds: i = [], showFavorites: o = !0, onFavoriteToggle: c, onItemClick: d }) => {
|
|
9446
9453
|
let [f, p] = s(r?.[0]?.label ?? null);
|
|
9447
9454
|
e.useEffect(() => {
|
|
9448
9455
|
if (!r?.length) {
|
|
@@ -9458,7 +9465,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9458
9465
|
e.useEffect(() => {
|
|
9459
9466
|
_(0), b(null);
|
|
9460
9467
|
}, [f]);
|
|
9461
|
-
let x = g > 0, S = g +
|
|
9468
|
+
let x = g > 0, S = g + jl < h.length, C = () => _((e) => Math.max(0, e - 1)), w = () => _((e) => Math.min(Math.max(h.length - jl, 0), e + 1)), [T, E] = s(/* @__PURE__ */ new Set()), D = (e) => {
|
|
9462
9469
|
E((t) => {
|
|
9463
9470
|
if (t.has(e)) return t;
|
|
9464
9471
|
let n = new Set(t);
|
|
@@ -9468,7 +9475,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9468
9475
|
e.useEffect(() => {
|
|
9469
9476
|
E(/* @__PURE__ */ new Set());
|
|
9470
9477
|
}, [f]), e.useEffect(() => {
|
|
9471
|
-
|
|
9478
|
+
Ml(h.slice(g, g + jl * 2).map((e) => e.source).filter(Boolean));
|
|
9472
9479
|
}, [h, g]);
|
|
9473
9480
|
let O = e.useMemo(() => new Set(i), [i]);
|
|
9474
9481
|
return /* @__PURE__ */ l("section", {
|
|
@@ -9494,16 +9501,16 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9494
9501
|
})
|
|
9495
9502
|
}) : null, /* @__PURE__ */ u("div", {
|
|
9496
9503
|
className: "mx-auto w-full px-4 md:px-0",
|
|
9497
|
-
children: [/* @__PURE__ */ l(
|
|
9504
|
+
children: [/* @__PURE__ */ l(Ol, {
|
|
9498
9505
|
items: m,
|
|
9499
9506
|
value: f ?? m[0]?.label ?? "",
|
|
9500
9507
|
onChange: (e) => p(e),
|
|
9501
9508
|
className: "mb-2",
|
|
9502
9509
|
durationMs: 700
|
|
9503
|
-
}), /* @__PURE__ */ l(
|
|
9510
|
+
}), /* @__PURE__ */ l(Al, {
|
|
9504
9511
|
items: h,
|
|
9505
9512
|
startIndex: g,
|
|
9506
|
-
desktopVisibleCount:
|
|
9513
|
+
desktopVisibleCount: jl,
|
|
9507
9514
|
activeIndex: y,
|
|
9508
9515
|
setActiveIndex: b,
|
|
9509
9516
|
canPrev: x,
|
|
@@ -9524,16 +9531,16 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9524
9531
|
})
|
|
9525
9532
|
})
|
|
9526
9533
|
});
|
|
9527
|
-
},
|
|
9534
|
+
}, Pl = (e) => e === 1 ? "md:grid-cols-1" : e === 2 ? "md:grid-cols-2" : "md:grid-cols-3", Fl = (e, t) => e === "vertical" && t === 2 ? "grid-cols-2" : e === "vertical" && t === 3 ? "grid-cols-3" : "grid-cols-1", Il = (e) => e === "underBanner" ? "mt-10 md:mt-16" : "", Ll = ({ title: e, body: t, cards: n = [], spacing: r = "default", footerBlurb: i, footerButtonLabel: a, footerButtonHref: o, onFooterButtonClick: s }) => {
|
|
9528
9535
|
if (!n.length && !e && !t && !i && !a) return null;
|
|
9529
9536
|
let c = () => {
|
|
9530
9537
|
a && s?.({
|
|
9531
9538
|
buttonLabel: a,
|
|
9532
9539
|
buttonHref: o
|
|
9533
9540
|
});
|
|
9534
|
-
}, d =
|
|
9541
|
+
}, d = Pl(n.length), f = Fl(n[0]?.cardStyle, n.length);
|
|
9535
9542
|
return /* @__PURE__ */ l("section", {
|
|
9536
|
-
className: `flex justify-center ${
|
|
9543
|
+
className: `flex justify-center ${Il(r)}`,
|
|
9537
9544
|
children: /* @__PURE__ */ u("div", {
|
|
9538
9545
|
className: "w-full max-w-6xl px-4 mb-16 md:mb-20 md:px-0",
|
|
9539
9546
|
children: [
|
|
@@ -9574,7 +9581,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9574
9581
|
]
|
|
9575
9582
|
})
|
|
9576
9583
|
});
|
|
9577
|
-
},
|
|
9584
|
+
}, Rl = ({ heading: e, body: t, cards: n, className: r = "" }) => /* @__PURE__ */ l("section", {
|
|
9578
9585
|
className: `w-full bg-white ${r}`,
|
|
9579
9586
|
children: /* @__PURE__ */ u("div", {
|
|
9580
9587
|
className: "mx-auto max-w-6xl mb-16 md:mb-30 px-4 md:px-0",
|
|
@@ -9595,7 +9602,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9595
9602
|
children: n.map((e, t) => /* @__PURE__ */ l(sc, { ...e }, `${e.title}-${t}`))
|
|
9596
9603
|
})]
|
|
9597
9604
|
})
|
|
9598
|
-
}),
|
|
9605
|
+
}), zl = ({ title: e = "Sample Order Summary", items: t, sampleCountLabel: n, note: r = "No payment is required for sample requests." }) => {
|
|
9599
9606
|
let i = n ?? `${t.length} ${t.length === 1 ? "sample" : "samples"}`;
|
|
9600
9607
|
return /* @__PURE__ */ u("aside", {
|
|
9601
9608
|
className: "rounded-lg border border-secondaryActive bg-white p-6",
|
|
@@ -9672,7 +9679,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9672
9679
|
}) : null
|
|
9673
9680
|
]
|
|
9674
9681
|
});
|
|
9675
|
-
},
|
|
9682
|
+
}, Bl = ({ title: e = "Personal & Project Information", idPrefix: t = "salesforce-customer", firstName: n = "", lastName: r = "", profession: i = "", companyName: a = "", projectType: o = "", projectSquareMetres: s = "", projectName: c = "", projectDetails: d = "", phoneNumber: f = "", email: p = "", confirmEmail: m = "", firstNamePlaceholder: h = "First Name*", lastNamePlaceholder: g = "Last Name*", professionPlaceholder: _ = "Profession*", companyNamePlaceholder: y = "Company Name*", projectTypePlaceholder: b = "Project Type", projectSquareMetresPlaceholder: x = "Project Square Metres", projectNamePlaceholder: S = "Project Name", projectDetailsPlaceholder: C = "Project Details", phoneNumberPlaceholder: w = "Phone Number*", emailPlaceholder: T = "Email*", confirmEmailPlaceholder: E = "Confirm Email*", professionOptions: D = [], projectTypeOptions: O = [], projectSquareMetresOptions: k = [], errors: A = {}, onFirstNameChange: j, onLastNameChange: M, onProfessionChange: N, onCompanyNameChange: P, onProjectTypeChange: F, onProjectSquareMetresChange: I, onProjectNameChange: L, onProjectDetailsChange: R, onPhoneNumberChange: z, onEmailChange: B, onConfirmEmailChange: V }) => /* @__PURE__ */ u("section", {
|
|
9676
9683
|
className: "flex flex-col gap-6",
|
|
9677
9684
|
children: [/* @__PURE__ */ l(v, {
|
|
9678
9685
|
as: "h2",
|
|
@@ -9798,17 +9805,17 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9798
9805
|
})
|
|
9799
9806
|
]
|
|
9800
9807
|
})]
|
|
9801
|
-
}),
|
|
9802
|
-
let [_, y] = e.useState(() =>
|
|
9808
|
+
}), Vl = (e, t, n) => Math.max(t, Math.min(n, e)), Hl = (e) => ["h-12 w-12 border-secondaryActive!", e ? "text-primary! hover:text-accent!" : "border-secondaryHover! text-tertiary!"].join(" "), Ul = ({ initialQuantity: t = 1, errorMessage: n, minQuantity: r = 1, maxQuantity: i = 99, onAddToWishlist: a, onAddToCart: o, onQuantityChange: s, wishlistLabel: d = "Add To Wishlist", cartLabel: f = "Add to Cart", decreaseQuantityLabel: p = "Decrease quantity", increaseQuantityLabel: m = "Increase quantity", showFavorites: h = !0, className: g = "" }) => {
|
|
9809
|
+
let [_, y] = e.useState(() => Vl(t, r, i));
|
|
9803
9810
|
e.useEffect(() => {
|
|
9804
|
-
y(
|
|
9811
|
+
y(Vl(t, r, i));
|
|
9805
9812
|
}, [
|
|
9806
9813
|
t,
|
|
9807
9814
|
r,
|
|
9808
9815
|
i
|
|
9809
9816
|
]);
|
|
9810
9817
|
let b = (e) => {
|
|
9811
|
-
let t =
|
|
9818
|
+
let t = Vl(e, r, i);
|
|
9812
9819
|
y(t), s?.(t);
|
|
9813
9820
|
}, x = () => b(_ - 1), S = () => b(_ + 1), C = _ > r, w = _ < i, T = () => o(_), E = /* @__PURE__ */ u("div", {
|
|
9814
9821
|
className: "flex shrink-0 items-stretch gap-3",
|
|
@@ -9822,7 +9829,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9822
9829
|
type: "button",
|
|
9823
9830
|
disabled: !C,
|
|
9824
9831
|
onClick: x,
|
|
9825
|
-
className:
|
|
9832
|
+
className: Hl(C)
|
|
9826
9833
|
}),
|
|
9827
9834
|
/* @__PURE__ */ l("div", {
|
|
9828
9835
|
className: "flex min-w-10 items-center justify-center",
|
|
@@ -9841,7 +9848,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9841
9848
|
type: "button",
|
|
9842
9849
|
disabled: !w,
|
|
9843
9850
|
onClick: S,
|
|
9844
|
-
className:
|
|
9851
|
+
className: Hl(w)
|
|
9845
9852
|
})
|
|
9846
9853
|
]
|
|
9847
9854
|
}), D = /* @__PURE__ */ l(P, {
|
|
@@ -9889,7 +9896,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9889
9896
|
})]
|
|
9890
9897
|
})]
|
|
9891
9898
|
});
|
|
9892
|
-
},
|
|
9899
|
+
}, Wl = ({ heading: e, items: t, value: n, onChange: r }) => {
|
|
9893
9900
|
if (!t?.length) return null;
|
|
9894
9901
|
let i = (e) => {
|
|
9895
9902
|
e.disabled || r(e.value, e);
|
|
@@ -9922,7 +9929,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9922
9929
|
}, e.id))
|
|
9923
9930
|
})]
|
|
9924
9931
|
});
|
|
9925
|
-
},
|
|
9932
|
+
}, Gl = (e) => {
|
|
9926
9933
|
let { title: t, decor: n, description: r, colourMatching: i, colourMatchingLabel: a, patternRepeat: o, onDownloadSwatch: s, onDownloadFullSheet: c, downloadSwatchLabel: d = "Download Swatch", downloadFullSheetLabel: f = "Download Full Sheet", tabs: p = ["Sample", "Buy Now"], tabLabels: m, labels: h, activeTab: g, onTabChange: _, productOptions: y = [], gradeOptions: b = [], textureOptions: x = [], sizeOptions: S = [], selectedProduct: C, selectedGrade: w, selectedTexture: T, selectedSize: E, onQuantityChange: D, availabilityHref: O, availabilityLabel: k = "View full product availability and information", notReturnableText: A = "This item is not returnable.", returnPolicyHref: j, returnPolicyLabel: M = "View return policy", onPurchaseInfoLinkClick: N, priceLabel: F, initialQuantity: I = 1, errorMessage: L, minQuantity: R = 1, maxQuantity: z = 99, showCartActions: B = !0, showFavorites: V = !0, actionMode: ee = "cart", contactActions: te, onAddToWishlist: ne, onAddToCart: re, onContactActionClick: ie, mobileMediaSlot: ae } = e, H = p.map((e) => ({
|
|
9927
9934
|
label: m?.[e] ?? e,
|
|
9928
9935
|
value: e
|
|
@@ -9998,7 +10005,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9998
10005
|
}) : null,
|
|
9999
10006
|
se ? /* @__PURE__ */ l("div", {
|
|
10000
10007
|
className: "mb-5",
|
|
10001
|
-
children: /* @__PURE__ */ l(
|
|
10008
|
+
children: /* @__PURE__ */ l(Ol, {
|
|
10002
10009
|
items: H,
|
|
10003
10010
|
value: g,
|
|
10004
10011
|
onChange: _,
|
|
@@ -10021,7 +10028,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10021
10028
|
variant: "bold",
|
|
10022
10029
|
className: "mb-2 text-sm md:text-base md:font-medium!",
|
|
10023
10030
|
children: [h?.product ?? "Product", ":"]
|
|
10024
|
-
}), /* @__PURE__ */ l(
|
|
10031
|
+
}), /* @__PURE__ */ l(Wl, {
|
|
10025
10032
|
items: y,
|
|
10026
10033
|
value: C ?? void 0,
|
|
10027
10034
|
onChange: W(y)
|
|
@@ -10031,7 +10038,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10031
10038
|
variant: "bold",
|
|
10032
10039
|
className: "mb-2 text-sm md:text-base md:font-medium!",
|
|
10033
10040
|
children: [h?.grade ?? "Grade", ":"]
|
|
10034
|
-
}), /* @__PURE__ */ l(
|
|
10041
|
+
}), /* @__PURE__ */ l(Wl, {
|
|
10035
10042
|
items: b,
|
|
10036
10043
|
value: w ?? void 0,
|
|
10037
10044
|
onChange: W(b)
|
|
@@ -10041,7 +10048,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10041
10048
|
variant: "bold",
|
|
10042
10049
|
className: "mb-2 text-sm md:text-base md:font-medium!",
|
|
10043
10050
|
children: [h?.texture ?? "Texture", ":"]
|
|
10044
|
-
}), /* @__PURE__ */ l(
|
|
10051
|
+
}), /* @__PURE__ */ l(Wl, {
|
|
10045
10052
|
items: x,
|
|
10046
10053
|
value: T ?? void 0,
|
|
10047
10054
|
onChange: W(x)
|
|
@@ -10051,7 +10058,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10051
10058
|
variant: "bold",
|
|
10052
10059
|
className: "mb-2 text-sm md:text-base md:font-medium!",
|
|
10053
10060
|
children: [h?.size ?? "Size", ":"]
|
|
10054
|
-
}), /* @__PURE__ */ l(
|
|
10061
|
+
}), /* @__PURE__ */ l(Wl, {
|
|
10055
10062
|
items: S,
|
|
10056
10063
|
value: E ?? void 0,
|
|
10057
10064
|
onChange: W(S)
|
|
@@ -10085,7 +10092,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10085
10092
|
}) : null
|
|
10086
10093
|
]
|
|
10087
10094
|
}),
|
|
10088
|
-
oe ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
10095
|
+
oe ? /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(Ul, {
|
|
10089
10096
|
errorMessage: L,
|
|
10090
10097
|
initialQuantity: I,
|
|
10091
10098
|
minQuantity: R,
|
|
@@ -10124,16 +10131,16 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10124
10131
|
})
|
|
10125
10132
|
}) : null]
|
|
10126
10133
|
});
|
|
10127
|
-
},
|
|
10128
|
-
let h = t?.length ?? 0, [g, _] = e.useState(() =>
|
|
10134
|
+
}, Kl = (e, t) => Math.max(0, Math.min(e, t - 1)), ql = ({ items: t, initialIndex: n = 0, loop: r = !0, showArrows: i = !0, arrowPosition: a = "sides", onSelect: o, renderItem: s, className: d = "", trackClassName: f = "", ariaLabel: p = "Carousel", header: m }) => {
|
|
10135
|
+
let h = t?.length ?? 0, [g, _] = e.useState(() => Kl(n, h || 1)), [v, y] = e.useState(() => Kl(n, h || 1));
|
|
10129
10136
|
if (e.useEffect(() => {
|
|
10130
|
-
h > 0 && (_((e) =>
|
|
10137
|
+
h > 0 && (_((e) => Kl(e, h)), y((e) => Kl(e, h)));
|
|
10131
10138
|
}, [h]), h === 0) return null;
|
|
10132
10139
|
let b = (e) => {
|
|
10133
|
-
let n =
|
|
10140
|
+
let n = Kl(e, h);
|
|
10134
10141
|
_(n), o?.(n, t[n]);
|
|
10135
10142
|
}, x = (e) => {
|
|
10136
|
-
y(r ? (e + h) % h :
|
|
10143
|
+
y(r ? (e + h) % h : Kl(e, h));
|
|
10137
10144
|
}, C = () => x(v - 1), w = () => x(v + 1), T = h > 1, E = i && T && a === "top-right", D = i && T && a === "sides";
|
|
10138
10145
|
return /* @__PURE__ */ u("div", {
|
|
10139
10146
|
className: ["relative w-full", d].join(" "),
|
|
@@ -10226,25 +10233,25 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10226
10233
|
})
|
|
10227
10234
|
]
|
|
10228
10235
|
});
|
|
10229
|
-
},
|
|
10236
|
+
}, Jl = (e, t) => Math.max(0, Math.min(e, t - 1)), Yl = (e) => typeof e == "string" ? e.replace(/^http:\/\//i, "https://") : "", Xl = ({ slides: t, initialIndex: n = 0, text: r, fallbackImage: i }) => {
|
|
10230
10237
|
let a = t ?? [], o = i ? {
|
|
10231
10238
|
id: "fallback-image",
|
|
10232
10239
|
image: i
|
|
10233
10240
|
} : null, s = a;
|
|
10234
10241
|
!s.length && o && (s = [o]);
|
|
10235
|
-
let c = s.length, [d, f] = e.useState(() =>
|
|
10242
|
+
let c = s.length, [d, f] = e.useState(() => Jl(n, c || 1)), [p, m] = e.useState(() => /* @__PURE__ */ new Set());
|
|
10236
10243
|
if (e.useEffect(() => {
|
|
10237
|
-
c > 0 && f((e) =>
|
|
10244
|
+
c > 0 && f((e) => Jl(e, c));
|
|
10238
10245
|
}, [c]), c === 0) return null;
|
|
10239
10246
|
let h = s[d];
|
|
10240
10247
|
if (!h?.image?.src && !i?.src) return null;
|
|
10241
|
-
let g = (e, t) => (!e || p.has(e) || p.has(
|
|
10248
|
+
let g = (e, t) => (!e || p.has(e) || p.has(Yl(e))) && i?.src ? i : {
|
|
10242
10249
|
src: e ?? "",
|
|
10243
10250
|
alt: t ?? ""
|
|
10244
|
-
}, _ = g(h?.image?.src, h?.image?.alt), y =
|
|
10251
|
+
}, _ = g(h?.image?.src, h?.image?.alt), y = Yl(_.src), b = _.alt ?? "", x = (e) => {
|
|
10245
10252
|
!e || i?.src === e || m((t) => {
|
|
10246
10253
|
let n = new Set(t);
|
|
10247
|
-
return n.add(e), n.add(
|
|
10254
|
+
return n.add(e), n.add(Yl(e)), n;
|
|
10248
10255
|
});
|
|
10249
10256
|
};
|
|
10250
10257
|
return /* @__PURE__ */ u("section", {
|
|
@@ -10264,7 +10271,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10264
10271
|
}),
|
|
10265
10272
|
/* @__PURE__ */ l("div", {
|
|
10266
10273
|
className: "mt-4",
|
|
10267
|
-
children: /* @__PURE__ */ l(
|
|
10274
|
+
children: /* @__PURE__ */ l(ql, {
|
|
10268
10275
|
items: s,
|
|
10269
10276
|
initialIndex: d,
|
|
10270
10277
|
loop: !0,
|
|
@@ -10272,7 +10279,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10272
10279
|
ariaLabel: "Thumbnail carousel",
|
|
10273
10280
|
onSelect: (e) => f(e),
|
|
10274
10281
|
renderItem: ({ item: e, isActive: t, select: n, index: r }) => {
|
|
10275
|
-
let i = g(e.thumbnail?.src ?? e.image?.src, e.thumbnail?.alt ?? e.image?.alt), a =
|
|
10282
|
+
let i = g(e.thumbnail?.src ?? e.image?.src, e.thumbnail?.alt ?? e.image?.alt), a = Yl(i.src), o = i.alt ?? "";
|
|
10276
10283
|
return a ? /* @__PURE__ */ l("button", {
|
|
10277
10284
|
type: "button",
|
|
10278
10285
|
onClick: n,
|
|
@@ -10310,7 +10317,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10310
10317
|
})
|
|
10311
10318
|
]
|
|
10312
10319
|
});
|
|
10313
|
-
},
|
|
10320
|
+
}, Zl = ({ carousel: e }) => {
|
|
10314
10321
|
let t = !!e?.slides?.length, n = e?.fallbackImage;
|
|
10315
10322
|
if (!t && !n?.src) return /* @__PURE__ */ l("div", {
|
|
10316
10323
|
className: "w-full min-h-96",
|
|
@@ -10319,30 +10326,30 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10319
10326
|
let { slides: r = [], initialIndex: i = 0, text: a } = e ?? {};
|
|
10320
10327
|
return /* @__PURE__ */ l("div", {
|
|
10321
10328
|
className: "w-full h-full min-h-0 md:min-h-96",
|
|
10322
|
-
children: /* @__PURE__ */ l(
|
|
10329
|
+
children: /* @__PURE__ */ l(Xl, {
|
|
10323
10330
|
slides: r,
|
|
10324
10331
|
initialIndex: i,
|
|
10325
10332
|
text: a,
|
|
10326
10333
|
fallbackImage: n
|
|
10327
10334
|
})
|
|
10328
10335
|
});
|
|
10329
|
-
},
|
|
10336
|
+
}, Ql = (e) => {
|
|
10330
10337
|
let t = e.find((e) => e.active);
|
|
10331
10338
|
if (t) return t.value ?? t.id ?? null;
|
|
10332
10339
|
let n = e[0];
|
|
10333
10340
|
return n ? n.value ?? n.id ?? null : null;
|
|
10334
|
-
},
|
|
10341
|
+
}, $l = (e, t) => !!(t && e.some((e) => (e.value ?? e.id) === t)), eu = (e) => {
|
|
10335
10342
|
let t = /* @__PURE__ */ new Set();
|
|
10336
10343
|
return e.reduce((e, n) => !n.value || t.has(n.value) ? e : (t.add(n.value), e.push({
|
|
10337
10344
|
id: n.value,
|
|
10338
10345
|
value: n.value,
|
|
10339
10346
|
label: n.label || n.value
|
|
10340
10347
|
}), e), []);
|
|
10341
|
-
},
|
|
10348
|
+
}, tu = (e, t) => !e || !t ? null : `${e}x${t}`, nu = (e, t, n) => Math.max(t, Math.min(n, e)), ru = (e, t = "USD") => new Intl.NumberFormat("en-US", {
|
|
10342
10349
|
style: "currency",
|
|
10343
10350
|
currency: t
|
|
10344
|
-
}).format(e),
|
|
10345
|
-
let { sku: n, decor: r, title: i, description: a, colourMatching: o, colourMatchingLabel: s, patternRepeat: c, onDownloadSwatch: d, onDownloadFullSheet: f, downloadSwatchLabel: p, downloadFullSheetLabel: m, carousel: h, tabs: g = ["Sample", "Buy Now"], tabLabels: _, labels: v, initialTab: y = "Sample", tabOptions: b, productOptions: x = [], sizeOptions: S = [], variants: C = [], currency: w, initialQuantity: T = 1, errorMessage: E, minQuantity: D = 1, maxQuantity: O = 99, showFavorites: k = !0, actionMode: A = "cart", contactActions: j, onAddToWishlist: M, onAddToCart: N, onSelectionChange: P, onContactActionClick: F, availabilityHref: I, availabilityLabel: L = "View full product availability and information", returnPolicyHref: R, returnPolicyLabel: z = "View return policy", notReturnableText: B = "This item is not returnable.", onPurchaseInfoLinkClick: V } = t, ee = Array.isArray(g) && g.length ? g : ["Sample", "Buy Now"], te = b?.Sample, ne = b?.["Buy Now"], re = te?.productOptions ?? x ?? [], ie = te?.sizeOptions ?? S ?? [], ae = ne?.productOptions ?? x ?? [], H =
|
|
10351
|
+
}).format(e), iu = (e) => !!e?.length, au = (e, t) => iu(e) && iu(t), ou = (e = []) => e.some((e) => !!e.sku && !!e.rangeId && !!e.grade && !!e.texture && !!e.widthIn && !!e.lengthIn), su = (t) => {
|
|
10352
|
+
let { sku: n, decor: r, title: i, description: a, colourMatching: o, colourMatchingLabel: s, patternRepeat: c, onDownloadSwatch: d, onDownloadFullSheet: f, downloadSwatchLabel: p, downloadFullSheetLabel: m, carousel: h, tabs: g = ["Sample", "Buy Now"], tabLabels: _, labels: v, initialTab: y = "Sample", tabOptions: b, productOptions: x = [], sizeOptions: S = [], variants: C = [], currency: w, initialQuantity: T = 1, errorMessage: E, minQuantity: D = 1, maxQuantity: O = 99, showFavorites: k = !0, actionMode: A = "cart", contactActions: j, onAddToWishlist: M, onAddToCart: N, onSelectionChange: P, onContactActionClick: F, availabilityHref: I, availabilityLabel: L = "View full product availability and information", returnPolicyHref: R, returnPolicyLabel: z = "View return policy", notReturnableText: B = "This item is not returnable.", onPurchaseInfoLinkClick: V } = t, ee = Array.isArray(g) && g.length ? g : ["Sample", "Buy Now"], te = b?.Sample, ne = b?.["Buy Now"], re = te?.productOptions ?? x ?? [], ie = te?.sizeOptions ?? S ?? [], ae = ne?.productOptions ?? x ?? [], H = au(re, ie), oe = iu(ae) && ou(C), U = ee.filter((e) => e === "Sample" ? H : e === "Buy Now" ? oe : !0), se = U[0] ?? "Sample", [W, ce] = e.useState(U.includes(y) ? y : se);
|
|
10346
10353
|
e.useEffect(() => {
|
|
10347
10354
|
if (!U.length) {
|
|
10348
10355
|
ce("Sample");
|
|
@@ -10355,37 +10362,37 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10355
10362
|
se
|
|
10356
10363
|
]);
|
|
10357
10364
|
let le = b?.[W], ue = !!le, de = le?.minQuantity ?? D, fe = le?.maxQuantity ?? O, pe = le?.productOptions ?? (ue ? [] : x) ?? [], me = W === "Buy Now", [G, he] = e.useState(() => ({
|
|
10358
|
-
product:
|
|
10365
|
+
product: Ql(pe),
|
|
10359
10366
|
grade: null,
|
|
10360
10367
|
texture: null,
|
|
10361
10368
|
size: null
|
|
10362
|
-
})), ge = e.useRef(!1), K =
|
|
10369
|
+
})), ge = e.useRef(!1), K = $l(pe, G.product) ? G.product : Ql(pe), _e = me && K ? C.filter((e) => e.rangeId === K) : [], ve = eu(_e.map((e) => ({
|
|
10363
10370
|
value: e.grade,
|
|
10364
10371
|
label: e.grade
|
|
10365
|
-
}))), ye = me ? ve : le?.gradeOptions ?? [], be =
|
|
10372
|
+
}))), ye = me ? ve : le?.gradeOptions ?? [], be = $l(ye, G.grade) ? G.grade : Ql(ye), xe = be ? _e.filter((e) => e.grade === be) : _e, Se = eu(xe.map((e) => ({
|
|
10366
10373
|
value: e.texture,
|
|
10367
10374
|
label: e.finish || e.texture
|
|
10368
|
-
}))), Ce = me ? Se : le?.textureOptions ?? [], q =
|
|
10369
|
-
let t =
|
|
10375
|
+
}))), Ce = me ? Se : le?.textureOptions ?? [], q = $l(Ce, G.texture) ? G.texture : Ql(Ce), we = q ? xe.filter((e) => e.texture === q) : xe, Te = new Map((le?.sizeOptions ?? S ?? []).map((e) => [e.value ?? e.id, e.label])), Ee = eu(we.map((e) => {
|
|
10376
|
+
let t = tu(e.widthIn, e.lengthIn) ?? void 0;
|
|
10370
10377
|
return {
|
|
10371
10378
|
value: t,
|
|
10372
10379
|
label: t ? Te.get(t) ?? t : void 0
|
|
10373
10380
|
};
|
|
10374
|
-
})), De = me ? Ee : le?.sizeOptions ?? (ue ? [] : S) ?? [], Oe =
|
|
10381
|
+
})), De = me ? Ee : le?.sizeOptions ?? (ue ? [] : S) ?? [], Oe = $l(De, G.size) ? G.size : Ql(De);
|
|
10375
10382
|
e.useEffect(() => {
|
|
10376
10383
|
if (!ge.current) {
|
|
10377
10384
|
ge.current = !0;
|
|
10378
10385
|
return;
|
|
10379
10386
|
}
|
|
10380
10387
|
he({
|
|
10381
|
-
product:
|
|
10382
|
-
grade:
|
|
10383
|
-
texture:
|
|
10384
|
-
size:
|
|
10388
|
+
product: Ql(pe),
|
|
10389
|
+
grade: Ql(ye),
|
|
10390
|
+
texture: Ql(Ce),
|
|
10391
|
+
size: Ql(De)
|
|
10385
10392
|
});
|
|
10386
10393
|
}, [W]), e.useEffect(() => {
|
|
10387
10394
|
he((e) => {
|
|
10388
|
-
let t = e.product && pe.some((t) => (t.value ?? t.id) === e.product) ? e.product :
|
|
10395
|
+
let t = e.product && pe.some((t) => (t.value ?? t.id) === e.product) ? e.product : Ql(pe), n = e.grade && ye.some((t) => (t.value ?? t.id) === e.grade) ? e.grade : Ql(ye), r = e.texture && Ce.some((t) => (t.value ?? t.id) === e.texture) ? e.texture : Ql(Ce), i = e.size && De.some((t) => (t.value ?? t.id) === e.size) ? e.size : Ql(De);
|
|
10389
10396
|
return e.product === t && e.grade === n && e.texture === r && e.size === i ? e : {
|
|
10390
10397
|
product: t,
|
|
10391
10398
|
grade: n,
|
|
@@ -10407,7 +10414,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10407
10414
|
texture: q,
|
|
10408
10415
|
size: Oe
|
|
10409
10416
|
}, t = C.filter((t) => {
|
|
10410
|
-
let n =
|
|
10417
|
+
let n = tu(t.widthIn, t.lengthIn);
|
|
10411
10418
|
return (t.rangeId ?? null) === e.product && (t.grade ?? null) === e.grade && (t.texture ?? null) === e.texture && n === e.size;
|
|
10412
10419
|
});
|
|
10413
10420
|
return t.length ? t.find((e) => e.isWebEnabled) ?? t[0] ?? null : null;
|
|
@@ -10418,7 +10425,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10418
10425
|
be,
|
|
10419
10426
|
q,
|
|
10420
10427
|
Oe
|
|
10421
|
-
]), Ae = W !== "Buy Now" || !!ke, je = W === "Buy Now" && ke ? ke.price?.label ??
|
|
10428
|
+
]), Ae = W !== "Buy Now" || !!ke, je = W === "Buy Now" && ke ? ke.price?.label ?? ru(ke.price?.value ?? 0, w) : "", Me = W === "Buy Now" && ke ? ke.price?.value ?? 0 : 0, Ne = W === "Buy Now" ? ke?.sku ?? n : n, [Pe, Fe] = e.useState(() => nu(T, de, fe)), J = e.useRef(W), Ie = e.useRef(P);
|
|
10422
10429
|
e.useEffect(() => {
|
|
10423
10430
|
Ie.current = P;
|
|
10424
10431
|
}, [P]), e.useEffect(() => {
|
|
@@ -10430,7 +10437,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10430
10437
|
grade: be,
|
|
10431
10438
|
texture: q,
|
|
10432
10439
|
size: Oe,
|
|
10433
|
-
quantity:
|
|
10440
|
+
quantity: nu(Pe, de, fe)
|
|
10434
10441
|
});
|
|
10435
10442
|
}, [
|
|
10436
10443
|
W,
|
|
@@ -10444,7 +10451,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10444
10451
|
de,
|
|
10445
10452
|
fe
|
|
10446
10453
|
]), e.useEffect(() => {
|
|
10447
|
-
Fe(
|
|
10454
|
+
Fe(nu(T, de, fe));
|
|
10448
10455
|
}, [
|
|
10449
10456
|
T,
|
|
10450
10457
|
de,
|
|
@@ -10545,7 +10552,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10545
10552
|
},
|
|
10546
10553
|
onQuantityChange: (e) => Fe(e),
|
|
10547
10554
|
onPurchaseInfoLinkClick: V,
|
|
10548
|
-
mobileMediaSlot: /* @__PURE__ */ l(
|
|
10555
|
+
mobileMediaSlot: /* @__PURE__ */ l(Zl, { carousel: h })
|
|
10549
10556
|
};
|
|
10550
10557
|
return /* @__PURE__ */ l("section", {
|
|
10551
10558
|
className: "w-full flex justify-center",
|
|
@@ -10555,12 +10562,12 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10555
10562
|
className: "grid grid-cols-1 md:grid-cols-2 gap-8",
|
|
10556
10563
|
children: [/* @__PURE__ */ l("div", {
|
|
10557
10564
|
className: "hidden md:block",
|
|
10558
|
-
children: /* @__PURE__ */ l(
|
|
10559
|
-
}), /* @__PURE__ */ l(
|
|
10565
|
+
children: /* @__PURE__ */ l(Zl, { carousel: h })
|
|
10566
|
+
}), /* @__PURE__ */ l(Gl, { ...Re })]
|
|
10560
10567
|
})
|
|
10561
10568
|
})
|
|
10562
10569
|
});
|
|
10563
|
-
},
|
|
10570
|
+
}, cu = ({ imageSrc: e, imageAlt: t = "Standard Copy Hero", heading: n, subheading: r, body: i, linkLabel: a, onLinkClick: o }) => /* @__PURE__ */ l(wl, {
|
|
10564
10571
|
imageSrc: e,
|
|
10565
10572
|
imageAlt: t,
|
|
10566
10573
|
bannerClassName: "relative h-80 md:h-119.25 w-full mb-10 md:mb-16 overflow-hidden",
|
|
@@ -10575,7 +10582,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10575
10582
|
onLinkClick: o
|
|
10576
10583
|
})
|
|
10577
10584
|
})
|
|
10578
|
-
}),
|
|
10585
|
+
}), lu = ({ categoryText: e, imageSrc: t, imageAlt: n = "Article Header", tags: r = [], onTagClick: i }) => /* @__PURE__ */ l(wl, {
|
|
10579
10586
|
imageSrc: t,
|
|
10580
10587
|
imageAlt: n,
|
|
10581
10588
|
sectionClassName: "w-full",
|
|
@@ -10586,7 +10593,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10586
10593
|
tags: r,
|
|
10587
10594
|
onTagClick: i
|
|
10588
10595
|
})
|
|
10589
|
-
}),
|
|
10596
|
+
}), uu = ({ slides: t, initialIndex: n = 0, ...r }) => {
|
|
10590
10597
|
let [i, a] = e.useState(n);
|
|
10591
10598
|
if (e.useEffect(() => {
|
|
10592
10599
|
a(n);
|
|
@@ -10616,7 +10623,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10616
10623
|
]
|
|
10617
10624
|
})
|
|
10618
10625
|
});
|
|
10619
|
-
},
|
|
10626
|
+
}, du = (e) => {
|
|
10620
10627
|
let { imageSrc: t = "", imageAlt: n = "" } = e;
|
|
10621
10628
|
return /* @__PURE__ */ l("section", {
|
|
10622
10629
|
className: "h-56 w-full overflow-hidden md:h-190",
|
|
@@ -10627,16 +10634,16 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10627
10634
|
quality: 90
|
|
10628
10635
|
})
|
|
10629
10636
|
});
|
|
10630
|
-
},
|
|
10637
|
+
}, fu = {
|
|
10631
10638
|
left: "text-left",
|
|
10632
10639
|
center: "text-center",
|
|
10633
10640
|
right: "text-right"
|
|
10634
|
-
},
|
|
10641
|
+
}, pu = {
|
|
10635
10642
|
small: "text-xl md:text-4xl",
|
|
10636
10643
|
medium: "text-2xl md:text-4xl",
|
|
10637
10644
|
large: "text-3xl md:text-5xl"
|
|
10638
|
-
},
|
|
10639
|
-
let { heading: t, align: n = "left", headingAlign: r = n, subheading: i, body: a, datetimeStamp: o, headingLevel: s = "h1", headingSize: c = "large", addTopMargin: d = !1 } = e, f =
|
|
10645
|
+
}, mu = (e) => {
|
|
10646
|
+
let { heading: t, align: n = "left", headingAlign: r = n, subheading: i, body: a, datetimeStamp: o, headingLevel: s = "h1", headingSize: c = "large", addTopMargin: d = !1 } = e, f = fu[n], p = fu[r], m = d ? "mt-10 md:mt-20" : "", h = o ? "mb-1" : "mb-4 md:mb-6", g = `${p} ${pu[c]} text-primary ${h}`;
|
|
10640
10647
|
return /* @__PURE__ */ u("section", {
|
|
10641
10648
|
className: `w-full ${m}`.trim(),
|
|
10642
10649
|
children: [
|
|
@@ -10663,24 +10670,24 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10663
10670
|
}) : null
|
|
10664
10671
|
]
|
|
10665
10672
|
});
|
|
10666
|
-
},
|
|
10673
|
+
}, hu = (e) => {
|
|
10667
10674
|
let { body: t, heading: n, headingAlign: r = "center", headingSize: i = "small", ...a } = e;
|
|
10668
10675
|
return /* @__PURE__ */ u("section", {
|
|
10669
10676
|
className: "w-full md:mt-10",
|
|
10670
|
-
children: [n ? /* @__PURE__ */ l(
|
|
10677
|
+
children: [n ? /* @__PURE__ */ l(mu, {
|
|
10671
10678
|
...a,
|
|
10672
10679
|
heading: n,
|
|
10673
10680
|
headingAlign: r,
|
|
10674
10681
|
headingSize: i
|
|
10675
10682
|
}) : null, /* @__PURE__ */ l("div", {
|
|
10676
10683
|
className: "w-full rounded-lg border-2 border-secondaryActive p-6 md:p-8",
|
|
10677
|
-
children: /* @__PURE__ */ l(
|
|
10684
|
+
children: /* @__PURE__ */ l(mu, {
|
|
10678
10685
|
...a,
|
|
10679
10686
|
body: t
|
|
10680
10687
|
})
|
|
10681
10688
|
})]
|
|
10682
10689
|
});
|
|
10683
|
-
},
|
|
10690
|
+
}, gu = ({ title: e = "Featured Products", body: t, headerAlign: n = "center", headerVariant: r = "default", items: i, onItemClick: a }) => {
|
|
10684
10691
|
if (!i?.length) return null;
|
|
10685
10692
|
let o = n === "left" ? "text-left md:mx-0" : "text-center", s = r === "compact" ? "text-tertiary text-base font-bold" : "text-primary text-2xl md:text-4xl", c = r === "compact" ? "text-tertiary text-base font-bold" : "text-primary text-xl font-bold md:font-normal md:text-2xl", d = r === "compact" ? "max-w-6xl w-full mb-8 md:mb-10 mx-auto px-4 md:px-0" : "max-w-6xl w-full mb-16 md:mb-20 mx-auto px-4 md:px-0", f = i.length < 4, p = f ? "justify-evenly" : "";
|
|
10686
10693
|
return /* @__PURE__ */ u("section", {
|
|
@@ -10697,7 +10704,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10697
10704
|
className: "mt-4 text-primary",
|
|
10698
10705
|
children: t
|
|
10699
10706
|
})]
|
|
10700
|
-
}) : null, /* @__PURE__ */ l(
|
|
10707
|
+
}) : null, /* @__PURE__ */ l(ql, {
|
|
10701
10708
|
items: i,
|
|
10702
10709
|
ariaLabel: e,
|
|
10703
10710
|
arrowPosition: "top-right",
|
|
@@ -10718,7 +10725,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10718
10725
|
}, e.id)
|
|
10719
10726
|
})]
|
|
10720
10727
|
});
|
|
10721
|
-
},
|
|
10728
|
+
}, _u = ({ title: t, headerVariant: n = "default", items: r = [] }) => r.length ? /* @__PURE__ */ l("section", {
|
|
10722
10729
|
className: "w-full py-16 mb-10",
|
|
10723
10730
|
children: /* @__PURE__ */ u("div", {
|
|
10724
10731
|
className: "mx-auto w-full max-w-6xl px-4 md:px-0",
|
|
@@ -10732,7 +10739,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10732
10739
|
children: r.map((t, n) => /* @__PURE__ */ l(e.Fragment, { children: /* @__PURE__ */ l(bc, { ...t }) }, `${t.title}-${n}`))
|
|
10733
10740
|
})]
|
|
10734
10741
|
})
|
|
10735
|
-
}) : null,
|
|
10742
|
+
}) : null, vu = ({ title: e, body: t, faqCards: n = [] }) => /* @__PURE__ */ l("section", {
|
|
10736
10743
|
className: "w-full flex justify-center mb-16 md:mt-12 md:mb-20",
|
|
10737
10744
|
children: /* @__PURE__ */ u("div", {
|
|
10738
10745
|
className: "max-w-6xl md:px-6 px-4 flex flex-col items-center justify-center w-full",
|
|
@@ -10757,11 +10764,11 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10757
10764
|
}, e.id))
|
|
10758
10765
|
})]
|
|
10759
10766
|
})
|
|
10760
|
-
}),
|
|
10767
|
+
}), yu = (e, t) => e.id ?? [
|
|
10761
10768
|
e.label,
|
|
10762
10769
|
e.imageSrc,
|
|
10763
10770
|
t
|
|
10764
|
-
].join("-"),
|
|
10771
|
+
].join("-"), bu = (e) => {
|
|
10765
10772
|
let t = [], n = 0, r = 0;
|
|
10766
10773
|
for (; n < e.length;) {
|
|
10767
10774
|
let i = r % 2 == 0 ? 2 : 3;
|
|
@@ -10771,7 +10778,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10771
10778
|
}), n += i, r += 1;
|
|
10772
10779
|
}
|
|
10773
10780
|
return t;
|
|
10774
|
-
},
|
|
10781
|
+
}, xu = ({ items: e = [], onImageOverlayCardClick: t, layoutVariant: n = "uniform" }) => {
|
|
10775
10782
|
if (!e.length) return null;
|
|
10776
10783
|
let r = e.map((e, t) => ({
|
|
10777
10784
|
item: e,
|
|
@@ -10790,10 +10797,10 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10790
10797
|
item: e,
|
|
10791
10798
|
index: n
|
|
10792
10799
|
}) : void 0
|
|
10793
|
-
},
|
|
10800
|
+
}, yu(e, n)))
|
|
10794
10801
|
}) }) : /* @__PURE__ */ l("section", {
|
|
10795
10802
|
className: "px-4 py-20 md:px-4",
|
|
10796
|
-
children:
|
|
10803
|
+
children: bu(r).map((e, n, r) => {
|
|
10797
10804
|
let i = e.columns === 3;
|
|
10798
10805
|
return /* @__PURE__ */ l(se, {
|
|
10799
10806
|
className: n < r.length - 1 ? "mb-6" : "",
|
|
@@ -10809,18 +10816,18 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10809
10816
|
item: e,
|
|
10810
10817
|
index: n
|
|
10811
10818
|
}) : void 0
|
|
10812
|
-
},
|
|
10819
|
+
}, yu(e, n)))
|
|
10813
10820
|
}, `image-overlay-grid-row-${n}`);
|
|
10814
10821
|
})
|
|
10815
10822
|
});
|
|
10816
|
-
},
|
|
10823
|
+
}, Su = {
|
|
10817
10824
|
2: "md:grid-cols-2",
|
|
10818
10825
|
3: "md:grid-cols-3",
|
|
10819
10826
|
4: "md:grid-cols-4"
|
|
10820
|
-
},
|
|
10827
|
+
}, Cu = ({ locations: e, selectedLocationId: t, desktopColumns: n = 4, stockedProductsLabel: r, preferredLabel: i, websiteLabel: a, directionsLabel: o, emailLabel: s, onWebsiteClick: c, onDirectionsClick: u, onPhoneClick: d, onEmailClick: f }) => e.length ? /* @__PURE__ */ l(se, {
|
|
10821
10828
|
columns: 1,
|
|
10822
10829
|
gap: "lg",
|
|
10823
|
-
gridClassName:
|
|
10830
|
+
gridClassName: Su[n],
|
|
10824
10831
|
children: e.map((e) => /* @__PURE__ */ l("div", {
|
|
10825
10832
|
"aria-current": e.id === t ? "true" : void 0,
|
|
10826
10833
|
className: "h-full",
|
|
@@ -10837,7 +10844,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10837
10844
|
onEmailClick: f
|
|
10838
10845
|
})
|
|
10839
10846
|
}, e.id))
|
|
10840
|
-
}) : null,
|
|
10847
|
+
}) : null, wu = ({ title: e = "Markets & Languages", markets: t, selectedLocalizationId: n, saveAndNextLabel: r = "Save and Next", saveAndNextHelpText: i, saveAndNextDisabled: a = !1, localizationSelectionDisabled: o = !1, onLocalizationSelect: s, onSaveAndNext: c }) => /* @__PURE__ */ u("section", {
|
|
10841
10848
|
"aria-labelledby": "localization-market-collection-heading",
|
|
10842
10849
|
children: [
|
|
10843
10850
|
/* @__PURE__ */ l(v, {
|
|
@@ -10893,27 +10900,27 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10893
10900
|
}) : null]
|
|
10894
10901
|
}) : null
|
|
10895
10902
|
]
|
|
10896
|
-
}),
|
|
10903
|
+
}), Tu = {
|
|
10897
10904
|
left: "text-left",
|
|
10898
10905
|
center: "text-center",
|
|
10899
10906
|
right: "text-right"
|
|
10900
|
-
},
|
|
10907
|
+
}, Eu = {
|
|
10901
10908
|
left: "justify-start text-left",
|
|
10902
10909
|
center: "justify-center text-center",
|
|
10903
10910
|
right: "justify-end text-right"
|
|
10904
|
-
},
|
|
10911
|
+
}, Du = {
|
|
10905
10912
|
xs: "w-24",
|
|
10906
10913
|
sm: "w-32",
|
|
10907
10914
|
md: "w-48",
|
|
10908
10915
|
lg: "w-64",
|
|
10909
10916
|
xl: "w-80"
|
|
10910
|
-
},
|
|
10917
|
+
}, Ou = (e) => e == null || e === "" ? "-" : String(e), ku = (e) => e == null ? "" : String(e), Au = (e) => e == null || String(e).trim() === "", ju = (e) => e.reduce((e, t) => (e[t.id] = {
|
|
10911
10918
|
...t,
|
|
10912
10919
|
values: { ...t.values }
|
|
10913
|
-
}, e), {}),
|
|
10914
|
-
let g = o(null), [_, y] = s(
|
|
10920
|
+
}, e), {}), Mu = ({ title: e, description: t, columns: r, rows: i, rowCountLabel: a, updateLabel: d = "Update", updateDisabled: f = !1, emptyMessage: p = "No report data available.", ariaLabel: m, onRowUpdate: h }) => {
|
|
10921
|
+
let g = o(null), [_, y] = s(ju(i)), [b, x] = s(null), S = t?.trim() ?? "", C = a?.trim() ?? (i.length === 1 ? "1 row" : `${i.length.toLocaleString()} rows`), w = i.length > 0;
|
|
10915
10922
|
n(() => {
|
|
10916
|
-
y(
|
|
10923
|
+
y(ju(i)), x(null);
|
|
10917
10924
|
}, [i]), n(() => {
|
|
10918
10925
|
if (!b) return;
|
|
10919
10926
|
let e = (e) => {
|
|
@@ -10946,19 +10953,19 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10946
10953
|
});
|
|
10947
10954
|
}, D = (e, t) => !!(t.required || t.requiredWhen && e.values[t.requiredWhen.columnId] === t.requiredWhen.value), O = (e) => {
|
|
10948
10955
|
let t = _[e.id] ?? e;
|
|
10949
|
-
return r.some((e) => D(t, e) &&
|
|
10956
|
+
return r.some((e) => D(t, e) && Au(t.values[e.id]));
|
|
10950
10957
|
}, k = (e, t) => {
|
|
10951
10958
|
let n = (_[e.id] ?? e).values[t.id];
|
|
10952
|
-
return
|
|
10959
|
+
return Au(n) ? t.placeholder ?? "-" : t.editor === "select" ? t.options?.find((e) => e.value === String(n))?.label ?? Ou(n) : Ou(n);
|
|
10953
10960
|
}, A = (e, t, n, r, i) => {
|
|
10954
|
-
let a = _[e.id] ?? e, o = b === n, s = t.editable !== !1, c = D(a, t), u = c &&
|
|
10961
|
+
let a = _[e.id] ?? e, o = b === n, s = t.editable !== !1, c = D(a, t), u = c && Au(a.values[t.id]);
|
|
10955
10962
|
return o ? t.editor === "select" ? /* @__PURE__ */ l("div", {
|
|
10956
10963
|
"data-data-report-cell-editor": "true",
|
|
10957
10964
|
children: /* @__PURE__ */ l(os, {
|
|
10958
10965
|
id: `${n}-editor`,
|
|
10959
10966
|
name: t.id,
|
|
10960
10967
|
ariaLabel: `${t.label} for row ${e.id}`,
|
|
10961
|
-
value:
|
|
10968
|
+
value: ku(a.values[t.id]),
|
|
10962
10969
|
options: t.options,
|
|
10963
10970
|
placeholder: t.placeholder,
|
|
10964
10971
|
disabled: f,
|
|
@@ -10974,7 +10981,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
10974
10981
|
disabled: f,
|
|
10975
10982
|
required: c,
|
|
10976
10983
|
"aria-invalid": u || void 0,
|
|
10977
|
-
value:
|
|
10984
|
+
value: ku(a.values[t.id]),
|
|
10978
10985
|
onBlur: () => x(null),
|
|
10979
10986
|
onChange: (n) => T(e.id, t.id, n.target.value),
|
|
10980
10987
|
onKeyDown: (e) => {
|
|
@@ -11021,12 +11028,12 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11021
11028
|
children: /* @__PURE__ */ u("table", {
|
|
11022
11029
|
className: "min-w-full table-fixed border-collapse",
|
|
11023
11030
|
children: [
|
|
11024
|
-
/* @__PURE__ */ u("colgroup", { children: [r.map((e) => /* @__PURE__ */ l("col", { className:
|
|
11031
|
+
/* @__PURE__ */ u("colgroup", { children: [r.map((e) => /* @__PURE__ */ l("col", { className: Du[e.width ?? "md"] }, e.id)), /* @__PURE__ */ l("col", { className: "w-20" })] }),
|
|
11025
11032
|
/* @__PURE__ */ l("thead", {
|
|
11026
11033
|
className: "bg-tertiaryActive",
|
|
11027
11034
|
children: /* @__PURE__ */ u("tr", { children: [r.map((e) => /* @__PURE__ */ l("th", {
|
|
11028
11035
|
scope: "col",
|
|
11029
|
-
className: `whitespace-nowrap px-4 py-3 text-xs font-bold uppercase text-tertiary ${
|
|
11036
|
+
className: `whitespace-nowrap px-4 py-3 text-xs font-bold uppercase text-tertiary ${Du[e.width ?? "md"]} ${Tu[e.alignment ?? "left"]}`,
|
|
11030
11037
|
children: e.label
|
|
11031
11038
|
}, e.id)), /* @__PURE__ */ l("th", {
|
|
11032
11039
|
scope: "col",
|
|
@@ -11041,8 +11048,8 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11041
11048
|
children: [r.map((t) => {
|
|
11042
11049
|
let n = `${e.id}-${t.id}`, r = t.alignment ?? "left";
|
|
11043
11050
|
return /* @__PURE__ */ l("td", {
|
|
11044
|
-
className: `whitespace-nowrap px-4 py-3 text-sm text-primary ${
|
|
11045
|
-
children: A(e, t, n, `block w-full min-w-0 truncate rounded border border-borderTertiary bg-secondary px-2 py-1 text-sm text-primary outline-none focus:border-primary ${
|
|
11051
|
+
className: `whitespace-nowrap px-4 py-3 text-sm text-primary ${Du[t.width ?? "md"]} ${Tu[r]}`,
|
|
11052
|
+
children: A(e, t, n, `block w-full min-w-0 truncate rounded border border-borderTertiary bg-secondary px-2 py-1 text-sm text-primary outline-none focus:border-primary ${Tu[r]}`, `flex w-full min-w-0 cursor-pointer rounded px-2 py-1 text-sm text-primary hover:bg-tertiaryActive focus:bg-tertiaryActive focus:outline-none ${Eu[r]}`)
|
|
11046
11053
|
}, n);
|
|
11047
11054
|
}), /* @__PURE__ */ l("td", {
|
|
11048
11055
|
className: "whitespace-nowrap px-4 py-3 text-center",
|
|
@@ -11101,7 +11108,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11101
11108
|
})
|
|
11102
11109
|
})]
|
|
11103
11110
|
});
|
|
11104
|
-
},
|
|
11111
|
+
}, Nu = ({ groups: e, itemLabel: t = "decors", emptyMessage: n = "No decors are available.", showGroupHeaders: i = !0, onDecorClick: a, onDeleteDecorRequest: o }) => {
|
|
11105
11112
|
let s = r();
|
|
11106
11113
|
return e.some((e) => e.items.length > 0) ? /* @__PURE__ */ l("div", {
|
|
11107
11114
|
className: "space-y-8",
|
|
@@ -11143,7 +11150,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11143
11150
|
className: "text-sm text-primary",
|
|
11144
11151
|
children: n
|
|
11145
11152
|
});
|
|
11146
|
-
},
|
|
11153
|
+
}, Pu = ({ ranges: e, emptyMessage: t = "No ranges are available.", onRangeClick: n, onDeleteRangeRequest: r }) => e.length ? /* @__PURE__ */ l("section", {
|
|
11147
11154
|
"aria-label": "Ranges",
|
|
11148
11155
|
className: "space-y-3",
|
|
11149
11156
|
children: e.map((e) => /* @__PURE__ */ l(ze, {
|
|
@@ -11155,7 +11162,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11155
11162
|
variant: "free",
|
|
11156
11163
|
className: "text-sm text-primary",
|
|
11157
11164
|
children: t
|
|
11158
|
-
}),
|
|
11165
|
+
}), Fu = ({ layoutVariant: e = "table", documentTitleLabel: t = "Document Title", documentRangeLabel: n = "Range", documentTypeLabel: r = "Type", documentSubtypeLabel: i = "Subtype", emptyMessage: a = "No Documents Are Available", downloadLabelTemplate: o, documentInfoCards: s, onDownloadClick: c, onRangeClick: d }) => s.length === 0 ? /* @__PURE__ */ l(v, {
|
|
11159
11166
|
variant: "free",
|
|
11160
11167
|
className: "pt-6 text-center text-sm text-primary",
|
|
11161
11168
|
children: a
|
|
@@ -11191,20 +11198,20 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11191
11198
|
onRangeClick: d
|
|
11192
11199
|
}, t.id))]
|
|
11193
11200
|
})
|
|
11194
|
-
}),
|
|
11201
|
+
}), Iu = {
|
|
11195
11202
|
lat: 39.9612,
|
|
11196
11203
|
lng: -82.9988
|
|
11197
|
-
},
|
|
11198
|
-
let t =
|
|
11204
|
+
}, Lu = () => window, Ru = () => Lu().google, zu = (e) => {
|
|
11205
|
+
let t = Lu();
|
|
11199
11206
|
return t.google?.maps ? Promise.resolve() : (t.formicaGoogleMapsPromise ||= new Promise((t, n) => {
|
|
11200
11207
|
let r = document.createElement("script");
|
|
11201
11208
|
r.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(e)}`, r.async = !0, r.defer = !0, r.onload = () => t(), r.onerror = () => n(/* @__PURE__ */ Error("Google Maps script failed to load")), document.head.appendChild(r);
|
|
11202
11209
|
}), t.formicaGoogleMapsPromise);
|
|
11203
|
-
},
|
|
11210
|
+
}, Bu = ({ center: e, locations: t, selectedLocationId: n }) => {
|
|
11204
11211
|
let r = t.find((e) => e.id === n);
|
|
11205
|
-
return e ?? r?.coordinates ?? t[0]?.coordinates ??
|
|
11206
|
-
},
|
|
11207
|
-
let f = e.useRef(null), p = e.useRef(null), m = e.useRef([]), [h, g] = e.useState(t ? "loading" : "missing-key"), _ = e.useMemo(() =>
|
|
11212
|
+
return e ?? r?.coordinates ?? t[0]?.coordinates ?? Iu;
|
|
11213
|
+
}, Vu = ({ googleMapsApiKey: t, mapId: n, locations: r, center: i, zoom: a = 10, selectedLocationId: o, ariaLabel: s = "Locations map", legendLabel: c, onLocationSelect: d }) => {
|
|
11214
|
+
let f = e.useRef(null), p = e.useRef(null), m = e.useRef([]), [h, g] = e.useState(t ? "loading" : "missing-key"), _ = e.useMemo(() => Bu({
|
|
11208
11215
|
center: i,
|
|
11209
11216
|
locations: r,
|
|
11210
11217
|
selectedLocationId: o
|
|
@@ -11216,7 +11223,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11216
11223
|
e.useEffect(() => {
|
|
11217
11224
|
if (!t) return g("missing-key"), () => void 0;
|
|
11218
11225
|
let e = !0;
|
|
11219
|
-
return g("loading"),
|
|
11226
|
+
return g("loading"), zu(t).then(() => {
|
|
11220
11227
|
e && g("loaded");
|
|
11221
11228
|
}).catch(() => {
|
|
11222
11229
|
e && g("error");
|
|
@@ -11225,7 +11232,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11225
11232
|
};
|
|
11226
11233
|
}, [t]), e.useEffect(() => {
|
|
11227
11234
|
if (h !== "loaded" || !f.current) return;
|
|
11228
|
-
let e =
|
|
11235
|
+
let e = Ru();
|
|
11229
11236
|
e && (p.current ? (p.current.setCenter(_), p.current.setZoom(a)) : p.current = new e.maps.Map(f.current, {
|
|
11230
11237
|
center: _,
|
|
11231
11238
|
zoom: a,
|
|
@@ -11242,7 +11249,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11242
11249
|
a
|
|
11243
11250
|
]), e.useEffect(() => {
|
|
11244
11251
|
if (h !== "loaded" || !p.current) return;
|
|
11245
|
-
let e =
|
|
11252
|
+
let e = Ru();
|
|
11246
11253
|
e && (m.current.forEach((e) => e.setMap(null)), m.current = r.map((t, n) => {
|
|
11247
11254
|
let r = new e.maps.Marker({
|
|
11248
11255
|
position: t.coordinates,
|
|
@@ -11307,7 +11314,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11307
11314
|
})]
|
|
11308
11315
|
}) : null]
|
|
11309
11316
|
});
|
|
11310
|
-
},
|
|
11317
|
+
}, Hu = {
|
|
11311
11318
|
synced: {
|
|
11312
11319
|
iconName: "check",
|
|
11313
11320
|
className: "border-saleGreen bg-saleGreen/10 text-saleGreen"
|
|
@@ -11328,11 +11335,11 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11328
11335
|
iconName: "minus",
|
|
11329
11336
|
className: "border-borderTertiary bg-adminSideNavBackground text-tertiary"
|
|
11330
11337
|
}
|
|
11331
|
-
},
|
|
11338
|
+
}, Uu = {
|
|
11332
11339
|
match: "text-saleGreen",
|
|
11333
11340
|
mismatch: "text-accent",
|
|
11334
11341
|
neutral: "text-tertiary"
|
|
11335
|
-
},
|
|
11342
|
+
}, Wu = (e) => {
|
|
11336
11343
|
let t = e.detail?.trim() ?? "", n = e.status ?? "neutral";
|
|
11337
11344
|
return /* @__PURE__ */ u("div", {
|
|
11338
11345
|
className: "flex items-start justify-between gap-4 border-t border-borderTertiary py-3 first:border-t-0 first:pt-0 last:pb-0",
|
|
@@ -11345,13 +11352,13 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11345
11352
|
className: "text-sm font-bold text-primary",
|
|
11346
11353
|
children: e.value
|
|
11347
11354
|
}), t ? /* @__PURE__ */ l("div", {
|
|
11348
|
-
className: `mt-1 text-xs ${
|
|
11355
|
+
className: `mt-1 text-xs ${Uu[n]}`,
|
|
11349
11356
|
children: t
|
|
11350
11357
|
}) : null]
|
|
11351
11358
|
})]
|
|
11352
11359
|
}, e.id);
|
|
11353
|
-
},
|
|
11354
|
-
let r = e.description?.trim() ?? "", i = e.actionHelpText?.trim() ?? "", a =
|
|
11360
|
+
}, Gu = (e, t, n) => {
|
|
11361
|
+
let r = e.description?.trim() ?? "", i = e.actionHelpText?.trim() ?? "", a = Hu[e.status];
|
|
11355
11362
|
return /* @__PURE__ */ u("article", {
|
|
11356
11363
|
className: "flex h-full flex-col rounded-lg border border-borderTertiary bg-adminSideNavBackground p-4 shadow-sm",
|
|
11357
11364
|
children: [
|
|
@@ -11386,7 +11393,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11386
11393
|
] }),
|
|
11387
11394
|
/* @__PURE__ */ l("dl", {
|
|
11388
11395
|
className: "mt-5",
|
|
11389
|
-
children: e.fields.map(
|
|
11396
|
+
children: e.fields.map(Wu)
|
|
11390
11397
|
}),
|
|
11391
11398
|
e.actionLabel ? /* @__PURE__ */ u("footer", {
|
|
11392
11399
|
className: "mt-auto pt-5",
|
|
@@ -11408,8 +11415,8 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11408
11415
|
}) : null
|
|
11409
11416
|
]
|
|
11410
11417
|
});
|
|
11411
|
-
},
|
|
11412
|
-
let m = n?.trim() ?? "", h =
|
|
11418
|
+
}, Ku = ({ title: e = "Commerce Sync", summary: t, detail: n, overallStatus: r, overallStatusLabel: i, lxStage: a, salsifyStage: o, bigCommerceStage: s, refreshLabel: c = "Check Again", onLxSyncClick: d, onBigCommerceSyncClick: f, onRefreshClick: p }) => {
|
|
11419
|
+
let m = n?.trim() ?? "", h = Hu[r], g = [
|
|
11413
11420
|
{
|
|
11414
11421
|
stage: a,
|
|
11415
11422
|
onActionClick: void 0
|
|
@@ -11482,7 +11489,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11482
11489
|
className: "mt-5 grid gap-4 md:grid-cols-3 md:gap-6",
|
|
11483
11490
|
children: g.map((e, t) => /* @__PURE__ */ u("div", {
|
|
11484
11491
|
className: "relative min-w-0",
|
|
11485
|
-
children: [
|
|
11492
|
+
children: [Gu(e.stage, t + 1, e.onActionClick), t < g.length - 1 ? /* @__PURE__ */ l("span", {
|
|
11486
11493
|
"aria-hidden": "true",
|
|
11487
11494
|
className: "absolute -right-6 top-1/2 z-10 hidden h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full border border-borderTertiary bg-secondary text-tertiary shadow-sm md:flex",
|
|
11488
11495
|
children: /* @__PURE__ */ l(S, {
|
|
@@ -11495,7 +11502,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11495
11502
|
}, e.stage.title))
|
|
11496
11503
|
})]
|
|
11497
11504
|
});
|
|
11498
|
-
},
|
|
11505
|
+
}, qu = ({ header: e = "", clearAllLabel: t = "Clear All", emptyStateLabel: n = "No filters selected", optionsList: r = [], onRemoveAll: i, onRemoveOption: a }) => {
|
|
11499
11506
|
let o = (e) => {
|
|
11500
11507
|
a?.({ id: e });
|
|
11501
11508
|
};
|
|
@@ -11538,7 +11545,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11538
11545
|
})
|
|
11539
11546
|
})]
|
|
11540
11547
|
}) });
|
|
11541
|
-
},
|
|
11548
|
+
}, Ju = ({ sections: e = [], header: t, headerIcon: n, appliedOptions: r, resetLabel: i = "Reset", applyFiltersLabel: a = "Apply Filters", onResetClick: o, onApplyFiltersClick: s, onCheckboxChange: c, onColorSelect: d }) => /* @__PURE__ */ u("section", {
|
|
11542
11549
|
className: "relative pb-20 md:pb-0 w-full md:ml-2 md:w-52",
|
|
11543
11550
|
children: [
|
|
11544
11551
|
/* @__PURE__ */ u("div", {
|
|
@@ -11553,7 +11560,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11553
11560
|
children: t
|
|
11554
11561
|
}) : null]
|
|
11555
11562
|
}),
|
|
11556
|
-
r && /* @__PURE__ */ l(
|
|
11563
|
+
r && /* @__PURE__ */ l(qu, {
|
|
11557
11564
|
header: r.header,
|
|
11558
11565
|
clearAllLabel: r.clearAllLabel,
|
|
11559
11566
|
emptyStateLabel: r.emptyStateLabel,
|
|
@@ -11595,7 +11602,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11595
11602
|
})
|
|
11596
11603
|
})
|
|
11597
11604
|
]
|
|
11598
|
-
}),
|
|
11605
|
+
}), Yu = [
|
|
11599
11606
|
{
|
|
11600
11607
|
label: "Architect or Designer",
|
|
11601
11608
|
value: "architectDesigner"
|
|
@@ -11636,13 +11643,13 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11636
11643
|
label: "Postformer",
|
|
11637
11644
|
value: "postformer"
|
|
11638
11645
|
}
|
|
11639
|
-
],
|
|
11646
|
+
], Xu = ({ htmlFor: e, label: t, errorMessage: n }) => /* @__PURE__ */ l(v, {
|
|
11640
11647
|
as: "label",
|
|
11641
11648
|
htmlFor: e,
|
|
11642
11649
|
className: `text-sm ${n ? "text-accent!" : "text-primary"}`,
|
|
11643
11650
|
children: n || t
|
|
11644
|
-
}),
|
|
11645
|
-
let T = e.mode ?? "signIn", E = T === "createAccount", D = e.errors ?? {}, O = e.userTypeOptions ??
|
|
11651
|
+
}), Zu = ({ data: e, actionLabels: t, labels: n, onModeChange: r, onEmailChange: i, onPasswordChange: a, onFirstNameChange: o, onLastNameChange: s, onPhoneNumberChange: d, onUserTypeChange: f, onConfirmPasswordChange: p, onMarketingOptInChange: m, onTermsAcceptedChange: h, onEmailBlur: g, onPasswordBlur: _, onForgotPasswordClick: y, onTermsClick: b, onPrivacyClick: x, onSignInClick: S, onCreateAccountClick: C, onSecondaryClick: w }) => {
|
|
11652
|
+
let T = e.mode ?? "signIn", E = T === "createAccount", D = e.errors ?? {}, O = e.userTypeOptions ?? Yu, k = [{
|
|
11646
11653
|
id: "createAccount",
|
|
11647
11654
|
label: n?.createAccountMode ?? "Create Account"
|
|
11648
11655
|
}, {
|
|
@@ -11710,7 +11717,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11710
11717
|
onChange: d
|
|
11711
11718
|
}), /* @__PURE__ */ u("div", {
|
|
11712
11719
|
className: "flex w-full flex-col gap-2",
|
|
11713
|
-
children: [/* @__PURE__ */ l(
|
|
11720
|
+
children: [/* @__PURE__ */ l(Xu, {
|
|
11714
11721
|
htmlFor: "account-access-user-type",
|
|
11715
11722
|
label: n?.userType ?? "I am a*",
|
|
11716
11723
|
errorMessage: D.userType
|
|
@@ -11842,7 +11849,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11842
11849
|
})
|
|
11843
11850
|
]
|
|
11844
11851
|
});
|
|
11845
|
-
},
|
|
11852
|
+
}, Qu = ({ customerName: e, children: t, tabs: n, activeTabId: r, greeting: i = "Welcome back,", logoutLabel: a = "Log out", onTabClick: o, onLogoutClick: s }) => /* @__PURE__ */ l("section", {
|
|
11846
11853
|
className: "w-full bg-white",
|
|
11847
11854
|
children: /* @__PURE__ */ u("div", {
|
|
11848
11855
|
className: "mx-auto w-full max-w-6xl px-4 pb-16 pt-6 md:px-0 md:pt-10",
|
|
@@ -11886,7 +11893,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11886
11893
|
"aria-label": "Customer account sections",
|
|
11887
11894
|
children: /* @__PURE__ */ l("div", {
|
|
11888
11895
|
role: "tablist",
|
|
11889
|
-
children: /* @__PURE__ */ l(
|
|
11896
|
+
children: /* @__PURE__ */ l(Ol, {
|
|
11890
11897
|
items: n.map((e) => ({
|
|
11891
11898
|
label: e.label,
|
|
11892
11899
|
value: e.id
|
|
@@ -11913,7 +11920,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11913
11920
|
})
|
|
11914
11921
|
]
|
|
11915
11922
|
})
|
|
11916
|
-
}),
|
|
11923
|
+
}), $u = ({ items: e, value: t, onChange: n }) => {
|
|
11917
11924
|
if (!e?.length) return null;
|
|
11918
11925
|
let r = (e) => {
|
|
11919
11926
|
e.disabled || n(e.id, e);
|
|
@@ -11938,7 +11945,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11938
11945
|
}, e.id);
|
|
11939
11946
|
})
|
|
11940
11947
|
});
|
|
11941
|
-
},
|
|
11948
|
+
}, ed = ({ data: e }) => e ? /* @__PURE__ */ u("div", {
|
|
11942
11949
|
className: "flex flex-col gap-4 md:gap-6",
|
|
11943
11950
|
children: [
|
|
11944
11951
|
!!e?.summary && /* @__PURE__ */ l(v, {
|
|
@@ -11953,7 +11960,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11953
11960
|
label: e.colourMatchingLabel
|
|
11954
11961
|
})
|
|
11955
11962
|
]
|
|
11956
|
-
}) : null,
|
|
11963
|
+
}) : null, td = ({ data: e }) => e?.groups?.length ? /* @__PURE__ */ l("div", {
|
|
11957
11964
|
className: "flex flex-col gap-6 md:gap-10 scrollbar-none overflow-x-auto",
|
|
11958
11965
|
children: e.groups.map((e, t) => /* @__PURE__ */ u("div", {
|
|
11959
11966
|
className: ["flex flex-col gap-2 md:gap-8", t > 0 ? "pt-2 md:pt-10 border-t border-black/10" : ""].join(" "),
|
|
@@ -11992,12 +11999,12 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
11992
11999
|
}, e.key))
|
|
11993
12000
|
})]
|
|
11994
12001
|
}, e.id))
|
|
11995
|
-
}) : null,
|
|
12002
|
+
}) : null, nd = (e, t = !1) => {
|
|
11996
12003
|
let n = "";
|
|
11997
12004
|
typeof e == "string" ? n = e : typeof e?.label == "string" && (n = e.label);
|
|
11998
12005
|
let r = n.replace(/\bin\b/g, "IN");
|
|
11999
12006
|
return t ? `${r} (MTO)` : r;
|
|
12000
|
-
},
|
|
12007
|
+
}, rd = ({ data: e, selectedGrade: t }) => e ? /* @__PURE__ */ u("div", {
|
|
12001
12008
|
className: "flex flex-col gap-8",
|
|
12002
12009
|
children: [
|
|
12003
12010
|
!!e.cards?.length && /* @__PURE__ */ l("div", {
|
|
@@ -12027,7 +12034,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12027
12034
|
as: "span",
|
|
12028
12035
|
variant: "free",
|
|
12029
12036
|
className: "text-xs text-nowrap",
|
|
12030
|
-
children:
|
|
12037
|
+
children: nd(e)
|
|
12031
12038
|
}, e))
|
|
12032
12039
|
}), /* @__PURE__ */ l("div", {
|
|
12033
12040
|
className: "flex flex-col gap-2",
|
|
@@ -12035,7 +12042,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12035
12042
|
as: "span",
|
|
12036
12043
|
variant: "free",
|
|
12037
12044
|
className: "text-xs text-nowrap",
|
|
12038
|
-
children:
|
|
12045
|
+
children: nd(e, !0)
|
|
12039
12046
|
}, e))
|
|
12040
12047
|
})]
|
|
12041
12048
|
})
|
|
@@ -12062,7 +12069,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12062
12069
|
}, e.id))
|
|
12063
12070
|
})
|
|
12064
12071
|
]
|
|
12065
|
-
}) : null,
|
|
12072
|
+
}) : null, id = [
|
|
12066
12073
|
{
|
|
12067
12074
|
label: "Product Details",
|
|
12068
12075
|
value: "details"
|
|
@@ -12075,21 +12082,21 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12075
12082
|
label: "Size & Grade Guide",
|
|
12076
12083
|
value: "sizeAndGrade"
|
|
12077
12084
|
}
|
|
12078
|
-
],
|
|
12085
|
+
], ad = (e, t) => e?.length ? t && e.some((e) => e.id === t) ? t : e[0].id : "", od = (e) => {
|
|
12079
12086
|
typeof window > "u" || e.forEach((e) => {
|
|
12080
12087
|
if (!e) return;
|
|
12081
12088
|
let t = new window.Image();
|
|
12082
12089
|
t.src = e;
|
|
12083
12090
|
});
|
|
12084
|
-
},
|
|
12085
|
-
let [o, s] = e.useState(n), [c, d] = e.useState(
|
|
12091
|
+
}, sd = ({ ranges: t, defaultTab: n = "details", tabLabels: r, defaultRangeId: i, selectedGrade: a }) => {
|
|
12092
|
+
let [o, s] = e.useState(n), [c, d] = e.useState(ad(t, i));
|
|
12086
12093
|
if (e.useEffect(() => {
|
|
12087
|
-
d(
|
|
12094
|
+
d(ad(t, i));
|
|
12088
12095
|
}, [t, i]), e.useEffect(() => {
|
|
12089
12096
|
let e = t?.flatMap((e) => e.texture?.groups ?? []).flatMap((e) => e.items ?? []).map((e) => e.imageSrc).filter((e) => !!e) ?? [];
|
|
12090
|
-
|
|
12097
|
+
od([...new Set(e)]);
|
|
12091
12098
|
}, [t]), !t?.length) return null;
|
|
12092
|
-
let f =
|
|
12099
|
+
let f = id.map((e) => ({
|
|
12093
12100
|
...e,
|
|
12094
12101
|
label: r?.[e.value] ?? e.label
|
|
12095
12102
|
})), p = t.find((e) => e.id === c) ?? t[0];
|
|
@@ -12101,7 +12108,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12101
12108
|
className: "max-w-6xl w-full mx-auto px-4 md:px-6",
|
|
12102
12109
|
children: /* @__PURE__ */ l("div", {
|
|
12103
12110
|
className: "flex justify-start",
|
|
12104
|
-
children: /* @__PURE__ */ l(
|
|
12111
|
+
children: /* @__PURE__ */ l(Ol, {
|
|
12105
12112
|
items: f.map((e) => ({
|
|
12106
12113
|
label: e.label,
|
|
12107
12114
|
value: e.value,
|
|
@@ -12118,7 +12125,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12118
12125
|
className: "grid grid-cols-1 md:grid-cols-[240px_minmax(0,1fr)] gap-6 md:gap-10",
|
|
12119
12126
|
children: [/* @__PURE__ */ l("div", {
|
|
12120
12127
|
className: "md:pr-8 md:border-r border-black/10 md:min-h-40",
|
|
12121
|
-
children: /* @__PURE__ */ l(
|
|
12128
|
+
children: /* @__PURE__ */ l($u, {
|
|
12122
12129
|
items: t.map((e) => ({
|
|
12123
12130
|
id: e.id,
|
|
12124
12131
|
label: e.label
|
|
@@ -12128,9 +12135,9 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12128
12135
|
})
|
|
12129
12136
|
}), /* @__PURE__ */ l("div", { children: (() => {
|
|
12130
12137
|
switch (o) {
|
|
12131
|
-
case "details": return /* @__PURE__ */ l(
|
|
12132
|
-
case "texture": return /* @__PURE__ */ l(
|
|
12133
|
-
case "sizeAndGrade": return /* @__PURE__ */ l(
|
|
12138
|
+
case "details": return /* @__PURE__ */ l(ed, { data: p.details });
|
|
12139
|
+
case "texture": return /* @__PURE__ */ l(td, { data: p.texture });
|
|
12140
|
+
case "sizeAndGrade": return /* @__PURE__ */ l(rd, {
|
|
12134
12141
|
data: p.sizeAndGrade,
|
|
12135
12142
|
selectedGrade: a
|
|
12136
12143
|
});
|
|
@@ -12140,7 +12147,7 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12140
12147
|
})
|
|
12141
12148
|
})]
|
|
12142
12149
|
});
|
|
12143
|
-
},
|
|
12150
|
+
}, cd = ({ isOpen: e, title: t = "My Cart", projectName: n = "", projectNamePlaceholder: r = "Enter project name", emptyCartText: i = "Your cart is empty.", goToCartLabel: a = "Go to Cart", clearCartLabel: o = "Clear Cart", freeLabel: s = "Free", closeOverlayLabel: c = "Close cart overlay", closeCartLabel: d = "Close cart", flyoutAriaLabel: f = "Shopping cart flyout", removeItemLabel: p = "Remove item", decreaseQuantityLabel: m = "Decrease quantity", increaseQuantityLabel: h = "Increase quantity", items: g = [], className: _ = "", onClose: y, onProjectNameChange: b, onQuantityChange: x, onRemoveItem: S, onClearCart: C, onGoToCart: w }) => {
|
|
12144
12151
|
if (!e) return null;
|
|
12145
12152
|
let T = g.length > 0;
|
|
12146
12153
|
return /* @__PURE__ */ u("div", {
|
|
@@ -12242,15 +12249,15 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
12242
12249
|
};
|
|
12243
12250
|
//#endregion
|
|
12244
12251
|
//#region src/stories/templates/productdetailpagetemplate/ProductDetailPageTemplate.tsx
|
|
12245
|
-
function
|
|
12252
|
+
function ld(e = []) {
|
|
12246
12253
|
return e.reduce((e, t) => (e[t.id] = t, e[t.value] = t, e), {});
|
|
12247
12254
|
}
|
|
12248
|
-
var
|
|
12255
|
+
var ud = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e) => ({
|
|
12249
12256
|
id: e.id,
|
|
12250
12257
|
label: e.label,
|
|
12251
12258
|
value: e.value,
|
|
12252
12259
|
active: n === e.id || n === e.value
|
|
12253
|
-
})),
|
|
12260
|
+
})), dd = (e = []) => {
|
|
12254
12261
|
let t = /* @__PURE__ */ new Set();
|
|
12255
12262
|
return (e ?? []).filter((e) => typeof e.grade == "string" && !!e.grade).filter((e) => !e.grade || t.has(e.grade) ? !1 : (t.add(e.grade), !0)).map((e) => ({
|
|
12256
12263
|
id: e.grade,
|
|
@@ -12258,7 +12265,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12258
12265
|
value: e.grade,
|
|
12259
12266
|
active: !1
|
|
12260
12267
|
}));
|
|
12261
|
-
},
|
|
12268
|
+
}, fd = (e = [], t = null) => {
|
|
12262
12269
|
let n = /* @__PURE__ */ new Set();
|
|
12263
12270
|
return e.reduce((e, r) => {
|
|
12264
12271
|
if (!r.isSample && !r.sampleAvailable) return e;
|
|
@@ -12270,13 +12277,13 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12270
12277
|
active: t === i
|
|
12271
12278
|
}), e);
|
|
12272
12279
|
}, []);
|
|
12273
|
-
},
|
|
12280
|
+
}, pd = (e = []) => {
|
|
12274
12281
|
let t = /* @__PURE__ */ new Set();
|
|
12275
12282
|
return e.reduce((e, n) => {
|
|
12276
12283
|
let r = n.rangeId;
|
|
12277
12284
|
return !r || t.has(r) || (n.isSample || n.sampleAvailable) && (t.add(r), e.push(r)), e;
|
|
12278
12285
|
}, []);
|
|
12279
|
-
},
|
|
12286
|
+
}, md = (e) => (e ?? []).map((e) => ({
|
|
12280
12287
|
id: e.id,
|
|
12281
12288
|
title: e.title,
|
|
12282
12289
|
subtitle: e.subtitle,
|
|
@@ -12284,19 +12291,19 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12284
12291
|
thickness: e.thickness,
|
|
12285
12292
|
items: e.items ?? [],
|
|
12286
12293
|
mtoItems: e.mtoItems ?? []
|
|
12287
|
-
})),
|
|
12288
|
-
let h = n ?? {}, g = h.images ?? [], _ = h.product, v = h.content, y = h.optionSets, b = h.purchase, x = h.downloads, S = h.ranges ?? [], C = h.standardCopyHero, w = h.featuredProducts ?? [], T = _?.colourMatching, E = y?.ranges ?? [], D = y?.textures ?? [], O = y?.sizes ?? [], k = y?.sampleSizes ?? [], A =
|
|
12294
|
+
})), hd = (e) => e ? `Grade ${e}` : "", gd = ({ breadcrumbsProps: t, productData: n, errorMessage: r, showFavorites: i = !0, onDownloadSwatch: a, onDownloadFullSheet: o, onAddToWishlist: s, onAddToCart: c, onSelectionChange: d, onContactActionClick: f, onProductNavigate: p, cartFlyoutProps: m }) => {
|
|
12295
|
+
let h = n ?? {}, g = h.images ?? [], _ = h.product, v = h.content, y = h.optionSets, b = h.purchase, x = h.downloads, S = h.ranges ?? [], C = h.standardCopyHero, w = h.featuredProducts ?? [], T = _?.colourMatching, E = y?.ranges ?? [], D = y?.textures ?? [], O = y?.sizes ?? [], k = y?.sampleSizes ?? [], A = ld(E), j = ld(D), M = ld(O), N = ld(k), P = b?.tabOptions?.Sample ?? {}, F = b?.tabOptions?.["Buy Now"] ?? {}, I = b?.defaults ?? {}, L = dd(h.variants ?? []), R = h.variants?.[0]?.grade ?? null, [z, B] = e.useState(hd(R));
|
|
12289
12296
|
e.useEffect(() => {
|
|
12290
|
-
B(
|
|
12297
|
+
B(hd(R));
|
|
12291
12298
|
}, [R]);
|
|
12292
12299
|
let V = L.map((e) => {
|
|
12293
|
-
let t =
|
|
12300
|
+
let t = hd(e.value);
|
|
12294
12301
|
return {
|
|
12295
12302
|
...e,
|
|
12296
12303
|
active: t === z,
|
|
12297
12304
|
onOptionClick: () => B(t)
|
|
12298
12305
|
};
|
|
12299
|
-
}), ee = P.productOptionIds, te = ee?.filter((e) => !!A[e]) ?? [], ne = ee?.length ? te :
|
|
12306
|
+
}), ee = P.productOptionIds, te = ee?.filter((e) => !!A[e]) ?? [], ne = ee?.length ? te : pd(h.variants ?? []), re = P.textureOptionIds, ie = re?.filter((e) => !!j[e]) ?? [], ae = re?.length ? ud(j, ie, I.texture ?? null) : fd(h.variants ?? [], I.texture ?? null), H = F.productOptionIds, oe = H?.filter((e) => !!A[e]) ?? [], U = H ? oe : E.map((e) => e.id), se = {
|
|
12300
12307
|
sku: _?.sku ?? "",
|
|
12301
12308
|
decor: _?.decor ?? "",
|
|
12302
12309
|
title: _?.title ?? "",
|
|
@@ -12336,25 +12343,25 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12336
12343
|
Sample: {
|
|
12337
12344
|
minQuantity: P.minQuantity,
|
|
12338
12345
|
maxQuantity: P.maxQuantity,
|
|
12339
|
-
productOptions:
|
|
12346
|
+
productOptions: ud(A, ne, v?.defaultRangeId ?? E[0]?.value ?? null),
|
|
12340
12347
|
gradeOptions: [],
|
|
12341
12348
|
textureOptions: ae,
|
|
12342
|
-
sizeOptions:
|
|
12349
|
+
sizeOptions: ud(N, P.sizeOptionIds ?? [], null)
|
|
12343
12350
|
},
|
|
12344
12351
|
"Buy Now": {
|
|
12345
12352
|
minQuantity: F.minQuantity,
|
|
12346
12353
|
maxQuantity: F.maxQuantity,
|
|
12347
|
-
productOptions:
|
|
12354
|
+
productOptions: ud(A, U, v?.defaultRangeId ?? E[0]?.value ?? null),
|
|
12348
12355
|
gradeOptions: V,
|
|
12349
|
-
textureOptions:
|
|
12350
|
-
sizeOptions:
|
|
12356
|
+
textureOptions: ud(j, F.textureOptionIds ?? [], I.texture ?? null),
|
|
12357
|
+
sizeOptions: ud(M, F.sizeOptionIds ?? [], I.size ?? null)
|
|
12351
12358
|
}
|
|
12352
12359
|
},
|
|
12353
|
-
productOptions:
|
|
12360
|
+
productOptions: ud(A, U, v?.defaultRangeId ?? E[0]?.value ?? null),
|
|
12354
12361
|
gradeOptions: V,
|
|
12355
12362
|
selectedGrade: z,
|
|
12356
|
-
textureOptions:
|
|
12357
|
-
sizeOptions:
|
|
12363
|
+
textureOptions: ud(j, F.textureOptionIds ?? [], I.texture ?? null),
|
|
12364
|
+
sizeOptions: ud(M, F.sizeOptionIds ?? [], I.size ?? null),
|
|
12358
12365
|
availabilityHref: v?.availabilityHref ?? "#",
|
|
12359
12366
|
availabilityLabel: v?.availabilityLabel ?? "View full product availability and information",
|
|
12360
12367
|
returnPolicyHref: v?.returnPolicyHref ?? "#",
|
|
@@ -12383,7 +12390,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12383
12390
|
onPurchaseInfoLinkClick: p
|
|
12384
12391
|
}, W = {
|
|
12385
12392
|
ranges: S.map((e) => {
|
|
12386
|
-
let t = e.sizeAndGrade?.definitions ?? [], n =
|
|
12393
|
+
let t = e.sizeAndGrade?.definitions ?? [], n = md(e.sizeAndGrade?.cards);
|
|
12387
12394
|
return {
|
|
12388
12395
|
id: e.id,
|
|
12389
12396
|
label: e.label,
|
|
@@ -12422,12 +12429,12 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12422
12429
|
children: [/* @__PURE__ */ u("div", {
|
|
12423
12430
|
className: "flex flex-col gap-4",
|
|
12424
12431
|
children: [
|
|
12425
|
-
t && /* @__PURE__ */ l(
|
|
12426
|
-
/* @__PURE__ */ l(
|
|
12427
|
-
/* @__PURE__ */ l(
|
|
12432
|
+
t && /* @__PURE__ */ l(hl, { ...t }),
|
|
12433
|
+
/* @__PURE__ */ l(su, { ...se }),
|
|
12434
|
+
/* @__PURE__ */ l(sd, { ...W }),
|
|
12428
12435
|
/* @__PURE__ */ l("div", {
|
|
12429
12436
|
className: "hidden md:block",
|
|
12430
|
-
children: C && /* @__PURE__ */ l(
|
|
12437
|
+
children: C && /* @__PURE__ */ l(cu, {
|
|
12431
12438
|
imageSrc: C.imageSrc ?? "",
|
|
12432
12439
|
imageAlt: C.imageAlt ?? "",
|
|
12433
12440
|
heading: C.heading ?? "",
|
|
@@ -12437,15 +12444,15 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12437
12444
|
linkHref: C.linkHref ?? "#"
|
|
12438
12445
|
})
|
|
12439
12446
|
}),
|
|
12440
|
-
w.length > 0 && /* @__PURE__ */ l(
|
|
12447
|
+
w.length > 0 && /* @__PURE__ */ l(gu, {
|
|
12441
12448
|
title: n.featuredProductsTitle ?? "",
|
|
12442
12449
|
items: w,
|
|
12443
12450
|
onItemClick: ce
|
|
12444
12451
|
})
|
|
12445
12452
|
]
|
|
12446
|
-
}), m ? /* @__PURE__ */ l(
|
|
12453
|
+
}), m ? /* @__PURE__ */ l(cd, { ...m }) : null]
|
|
12447
12454
|
});
|
|
12448
|
-
},
|
|
12455
|
+
}, _d = ({ options: e, selectedValue: t, onSelect: n }) => {
|
|
12449
12456
|
let r = e[0]?.value, i = t ?? r, a = (e) => {
|
|
12450
12457
|
let t = {
|
|
12451
12458
|
value: e.value,
|
|
@@ -12473,19 +12480,19 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12473
12480
|
})
|
|
12474
12481
|
})
|
|
12475
12482
|
});
|
|
12476
|
-
},
|
|
12477
|
-
/* @__PURE__ */ l(
|
|
12478
|
-
/* @__PURE__ */ l(
|
|
12479
|
-
/* @__PURE__ */ l(
|
|
12480
|
-
/* @__PURE__ */ l(
|
|
12481
|
-
] }),
|
|
12483
|
+
}, vd = ({ standardCopyHeroProps: e, multiButtonBarProps: t, featuredArticleBannerProps: n, featureCardCollectionProps: r }) => /* @__PURE__ */ u(c, { children: [
|
|
12484
|
+
/* @__PURE__ */ l(cu, { ...e }),
|
|
12485
|
+
/* @__PURE__ */ l(_d, { ...t }),
|
|
12486
|
+
/* @__PURE__ */ l(Dl, { ...n }),
|
|
12487
|
+
/* @__PURE__ */ l(Ll, { ...r })
|
|
12488
|
+
] }), yd = (e, t) => e.id ?? [
|
|
12482
12489
|
e.decorNumber,
|
|
12483
12490
|
e.title,
|
|
12484
12491
|
e.brand,
|
|
12485
12492
|
e.product,
|
|
12486
12493
|
e.status ?? "standard",
|
|
12487
12494
|
t
|
|
12488
|
-
].join("-"),
|
|
12495
|
+
].join("-"), bd = ({ swatches: e = [], onSwatchClick: t }) => /* @__PURE__ */ l(se, {
|
|
12489
12496
|
className: "mb-16 px-4 md:my-12 md:px-0",
|
|
12490
12497
|
gridClassName: "md:grid-cols-4",
|
|
12491
12498
|
columns: 2,
|
|
@@ -12502,51 +12509,51 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12502
12509
|
decorNumber: String(e.decorNumber),
|
|
12503
12510
|
onSwatchClick: r,
|
|
12504
12511
|
status: e.status
|
|
12505
|
-
},
|
|
12512
|
+
}, yd(e, n));
|
|
12506
12513
|
})
|
|
12507
|
-
}),
|
|
12514
|
+
}), xd = (e) => e.flatMap((e) => e.options.filter((e) => e.checked).map((e) => ({
|
|
12508
12515
|
id: e.id,
|
|
12509
12516
|
label: e.label
|
|
12510
|
-
}))),
|
|
12517
|
+
}))), Sd = (e, t, n) => e.map((e) => ({
|
|
12511
12518
|
...e,
|
|
12512
12519
|
options: e.options.map((e) => e.id === t ? {
|
|
12513
12520
|
...e,
|
|
12514
12521
|
checked: n
|
|
12515
12522
|
} : e)
|
|
12516
|
-
})),
|
|
12523
|
+
})), Cd = (e) => e.map((e) => ({
|
|
12517
12524
|
...e,
|
|
12518
12525
|
options: e.options.map((e) => ({
|
|
12519
12526
|
...e,
|
|
12520
12527
|
checked: !1
|
|
12521
12528
|
}))
|
|
12522
|
-
})),
|
|
12523
|
-
let [d, f] = e.useState(!1), [p, m] = e.useState(() =>
|
|
12529
|
+
})), wd = (e) => e.tabs?.selectedValue ?? e.tabs?.options[0]?.value ?? "", Td = (e) => e.filters.sort?.value ?? e.filters.sort?.options?.[0]?.value ?? e.filters.sort?.options?.[0]?.label ?? "", Ed = (e) => e.filters.search?.value ?? "", Dd = (e) => e.filters.panel ? e.filters.toggleButton?.initiallyVisible ?? !0 : !1, Od = ({ categoryData: t, className: n = "", onHeroLinkClick: r, onTabChange: i, onSortChange: a, onSearchChange: o, onFilterChange: s, onSwatchClick: c }) => {
|
|
12530
|
+
let [d, f] = e.useState(!1), [p, m] = e.useState(() => Dd(t)), h = t.filters.panel?.sections ?? [], g = wd(t), _ = Td(t), v = Ed(t), y = t.tabs, b = t.filters.sort, x = t.filters.search, S = t.filters.panel, C = !!(S || b || x), w = e.useMemo(() => xd(h), [h]), T = t.filters.labels, E = T?.panelHeader ?? S?.header, D = T?.clearAllLabel ?? S?.clearAllLabel, O = T?.applyFiltersLabel ?? S?.applyFiltersLabel, k = T?.appliedOptionsHeader ?? S?.appliedOptionsHeader, A = p ? T?.hideFiltersLabel ?? t.filters.toggleButton?.hideLabel ?? "Hide Filters" : T?.showFiltersLabel ?? t.filters.toggleButton?.showLabel ?? "Show Filters", j = T?.mobileFiltersLabel ?? t.filters.toggleButton?.mobileLabel ?? E ?? "Filters", M = e.useCallback((e, n) => {
|
|
12524
12531
|
s?.(e, n, t);
|
|
12525
12532
|
}, [t, s]), N = e.useCallback((e) => {
|
|
12526
|
-
M(
|
|
12533
|
+
M(Sd(h, e.id, e.checked), {
|
|
12527
12534
|
action: "toggle",
|
|
12528
12535
|
optionId: e.id,
|
|
12529
12536
|
checked: e.checked,
|
|
12530
12537
|
sectionType: "checkbox"
|
|
12531
12538
|
});
|
|
12532
12539
|
}, [M, h]), P = e.useCallback((e) => {
|
|
12533
|
-
M(
|
|
12540
|
+
M(Sd(h, e.id, e.checked), {
|
|
12534
12541
|
action: "toggle",
|
|
12535
12542
|
optionId: e.id,
|
|
12536
12543
|
checked: e.checked,
|
|
12537
12544
|
sectionType: "colorSwatch"
|
|
12538
12545
|
});
|
|
12539
12546
|
}, [M, h]), F = e.useCallback(() => {
|
|
12540
|
-
M(
|
|
12547
|
+
M(Cd(h), { action: "clear-all" });
|
|
12541
12548
|
}, [M, h]);
|
|
12542
12549
|
return /* @__PURE__ */ u("section", {
|
|
12543
12550
|
className: n,
|
|
12544
12551
|
children: [
|
|
12545
|
-
/* @__PURE__ */ l(
|
|
12552
|
+
/* @__PURE__ */ l(cu, {
|
|
12546
12553
|
...t.hero,
|
|
12547
12554
|
onLinkClick: () => r?.(t)
|
|
12548
12555
|
}),
|
|
12549
|
-
y ? /* @__PURE__ */ l(
|
|
12556
|
+
y ? /* @__PURE__ */ l(_d, {
|
|
12550
12557
|
options: y.options,
|
|
12551
12558
|
selectedValue: g,
|
|
12552
12559
|
onSelect: (e) => {
|
|
@@ -12600,7 +12607,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12600
12607
|
children: [
|
|
12601
12608
|
p && S ? /* @__PURE__ */ l("div", {
|
|
12602
12609
|
className: "hidden md:block md:shrink-0",
|
|
12603
|
-
children: /* @__PURE__ */ l(
|
|
12610
|
+
children: /* @__PURE__ */ l(Ju, {
|
|
12604
12611
|
header: E,
|
|
12605
12612
|
headerIcon: S.headerIcon,
|
|
12606
12613
|
resetLabel: D,
|
|
@@ -12612,7 +12619,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12612
12619
|
emptyStateLabel: T?.emptyStateLabel,
|
|
12613
12620
|
optionsList: w,
|
|
12614
12621
|
onRemoveOption: (e) => {
|
|
12615
|
-
M(
|
|
12622
|
+
M(Sd(h, e.id, !1), {
|
|
12616
12623
|
action: "remove",
|
|
12617
12624
|
optionId: e.id
|
|
12618
12625
|
});
|
|
@@ -12630,7 +12637,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12630
12637
|
"aria-modal": "true",
|
|
12631
12638
|
"aria-label": E ?? j,
|
|
12632
12639
|
className: "md:hidden",
|
|
12633
|
-
children: /* @__PURE__ */ l(
|
|
12640
|
+
children: /* @__PURE__ */ l(Ju, {
|
|
12634
12641
|
header: E,
|
|
12635
12642
|
headerIcon: S.headerIcon,
|
|
12636
12643
|
resetLabel: D,
|
|
@@ -12642,7 +12649,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12642
12649
|
emptyStateLabel: T?.emptyStateLabel,
|
|
12643
12650
|
optionsList: w,
|
|
12644
12651
|
onRemoveOption: (e) => {
|
|
12645
|
-
M(
|
|
12652
|
+
M(Sd(h, e.id, !1), {
|
|
12646
12653
|
action: "remove",
|
|
12647
12654
|
optionId: e.id
|
|
12648
12655
|
});
|
|
@@ -12657,7 +12664,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12657
12664
|
}) : null,
|
|
12658
12665
|
/* @__PURE__ */ l("div", {
|
|
12659
12666
|
className: `${d ? "hidden" : "block"} my-8 md:my-0 md:block md:min-w-0 md:flex-1`,
|
|
12660
|
-
children: /* @__PURE__ */ l(
|
|
12667
|
+
children: /* @__PURE__ */ l(bd, {
|
|
12661
12668
|
swatches: t.decorGrid.swatches,
|
|
12662
12669
|
onSwatchClick: (e, n) => c?.(e, n, t)
|
|
12663
12670
|
})
|
|
@@ -12666,7 +12673,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12666
12673
|
})
|
|
12667
12674
|
]
|
|
12668
12675
|
});
|
|
12669
|
-
},
|
|
12676
|
+
}, kd = ({ images: e = [], onImageClick: t }) => /* @__PURE__ */ l(se, {
|
|
12670
12677
|
className: "mb-16 px-4 md:my-12 md:px-0",
|
|
12671
12678
|
gridClassName: "md:grid-cols-4",
|
|
12672
12679
|
columns: 2,
|
|
@@ -12685,12 +12692,12 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12685
12692
|
className: "aspect-square rounded-lg object-cover"
|
|
12686
12693
|
})
|
|
12687
12694
|
}) }, `${e.alt}-${n}`))
|
|
12688
|
-
}),
|
|
12689
|
-
/* @__PURE__ */ l(
|
|
12690
|
-
/* @__PURE__ */ l(
|
|
12695
|
+
}), Ad = ({ standardCopyHeroProps: e, multiButtonBarProps: t, imageGridProps: n }) => /* @__PURE__ */ u(c, { children: [
|
|
12696
|
+
/* @__PURE__ */ l(cu, { ...e }),
|
|
12697
|
+
/* @__PURE__ */ l(_d, { ...t }),
|
|
12691
12698
|
/* @__PURE__ */ l(As, { layoutVariant: "separator" }),
|
|
12692
|
-
/* @__PURE__ */ l(
|
|
12693
|
-
] }),
|
|
12699
|
+
/* @__PURE__ */ l(kd, { ...n })
|
|
12700
|
+
] }), jd = ({ title: e, documentLinkCards: t }) => /* @__PURE__ */ l("section", {
|
|
12694
12701
|
className: "w-full flex justify-center mb-16 md:mt-12 md:mb-20",
|
|
12695
12702
|
children: /* @__PURE__ */ u("div", {
|
|
12696
12703
|
className: "flex flex-col items-center justify-center w-full",
|
|
@@ -12709,37 +12716,37 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12709
12716
|
}, e.id))
|
|
12710
12717
|
})]
|
|
12711
12718
|
})
|
|
12712
|
-
}),
|
|
12719
|
+
}), Md = (e) => !!e?.replace(/<[^>]*>/g, "").replace(/ | | /gi, " ").trim(), Nd = ({ standardCopyHeroProps: e, multiButtonBarProps: t, warrantyCardProps: n, documentLinkCollectionProps: r, infoCardProps: i, faqCardCollectionProps: a }) => /* @__PURE__ */ u(c, { children: [
|
|
12713
12720
|
e && [
|
|
12714
12721
|
e.imageSrc,
|
|
12715
12722
|
e.heading,
|
|
12716
12723
|
e.subheading,
|
|
12717
12724
|
e.body,
|
|
12718
12725
|
e.linkLabel
|
|
12719
|
-
].some(
|
|
12720
|
-
t && !!t.options?.length && /* @__PURE__ */ l(
|
|
12721
|
-
n &&
|
|
12726
|
+
].some(Md) && /* @__PURE__ */ l(cu, { ...e }),
|
|
12727
|
+
t && !!t.options?.length && /* @__PURE__ */ l(_d, { ...t }),
|
|
12728
|
+
n && Md(n.body) && /* @__PURE__ */ l(H, {
|
|
12722
12729
|
spacing: "section",
|
|
12723
|
-
children: /* @__PURE__ */ l(
|
|
12730
|
+
children: /* @__PURE__ */ l(hu, { ...n })
|
|
12724
12731
|
}),
|
|
12725
|
-
r && !!r.documentLinkCards?.length && /* @__PURE__ */ l(
|
|
12732
|
+
r && !!r.documentLinkCards?.length && /* @__PURE__ */ l(jd, { ...r }),
|
|
12726
12733
|
i && ([
|
|
12727
12734
|
i.imageSrc,
|
|
12728
12735
|
i.headline,
|
|
12729
12736
|
i.body
|
|
12730
|
-
].some(
|
|
12737
|
+
].some(Md) || i.buttons?.some((e) => Md(e.buttonLabel))) && /* @__PURE__ */ l(H, {
|
|
12731
12738
|
spacing: "section",
|
|
12732
12739
|
children: /* @__PURE__ */ l(oc, { ...i })
|
|
12733
12740
|
}),
|
|
12734
|
-
a && !!a.faqCards?.length && /* @__PURE__ */ l(
|
|
12735
|
-
] }),
|
|
12741
|
+
a && !!a.faqCards?.length && /* @__PURE__ */ l(vu, { ...a })
|
|
12742
|
+
] }), Pd = (e, t) => e.id ?? [
|
|
12736
12743
|
e.decorNumber,
|
|
12737
12744
|
e.title,
|
|
12738
12745
|
e.brand,
|
|
12739
12746
|
e.rangeCode,
|
|
12740
12747
|
t
|
|
12741
|
-
].join("-"),
|
|
12742
|
-
let o = n?.items ?? [], s = r?.items ?? [], d = i?.items ?? [], f =
|
|
12748
|
+
].join("-"), Fd = (e, t) => e.slice(0, Math.max(0, Math.min(t ?? e.length, e.length))), Id = (e, t, n) => n ?? `View ${e} more ${t}`, Ld = ({ searchFilterProps: e, resultsHeading: t, decorResultsProps: n, resourceResultsProps: r, documentResultsProps: i, noResultsMessage: a }) => {
|
|
12749
|
+
let o = n?.items ?? [], s = r?.items ?? [], d = i?.items ?? [], f = Fd(d, i?.visibleItemCount), p = d.length - f.length, m = Fd(o, n?.visibleItemCount), h = Fd(s, r?.visibleItemCount), g = o.length - m.length, _ = s.length - h.length, y = e.searchBarProps.value?.trim(), b = y ? `Showing results for "${y}"` : "Search Results", x = t ?? b, S = o.length > 0, C = s.length > 0, w = d.length > 0, T = S || C || w;
|
|
12743
12750
|
return /* @__PURE__ */ u(c, { children: [
|
|
12744
12751
|
/* @__PURE__ */ u(H, {
|
|
12745
12752
|
isFirst: !0,
|
|
@@ -12773,7 +12780,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12773
12780
|
product: e.rangeCode,
|
|
12774
12781
|
decorNumber: e.decorNumber ?? "",
|
|
12775
12782
|
onSwatchClick: n.onItemClick ? () => n.onItemClick?.(e) : void 0
|
|
12776
|
-
},
|
|
12783
|
+
}, Pd(e, t)))
|
|
12777
12784
|
}),
|
|
12778
12785
|
g > 0 ? /* @__PURE__ */ l("div", {
|
|
12779
12786
|
className: "mt-8",
|
|
@@ -12781,7 +12788,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12781
12788
|
variant: "outline",
|
|
12782
12789
|
intent: "accent",
|
|
12783
12790
|
size: "sm",
|
|
12784
|
-
label:
|
|
12791
|
+
label: Id(g, "decor results", n.viewMoreLabel),
|
|
12785
12792
|
onClick: n.onViewMoreClick
|
|
12786
12793
|
})
|
|
12787
12794
|
}) : null
|
|
@@ -12812,7 +12819,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12812
12819
|
variant: "outline",
|
|
12813
12820
|
intent: "accent",
|
|
12814
12821
|
size: "sm",
|
|
12815
|
-
label:
|
|
12822
|
+
label: Id(p, "documents", i.viewMoreLabel),
|
|
12816
12823
|
onClick: i.onViewMoreClick
|
|
12817
12824
|
})
|
|
12818
12825
|
}) : null
|
|
@@ -12837,7 +12844,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12837
12844
|
variant: "outline",
|
|
12838
12845
|
intent: "accent",
|
|
12839
12846
|
size: "sm",
|
|
12840
|
-
label:
|
|
12847
|
+
label: Id(_, "resources", r.viewMoreLabel),
|
|
12841
12848
|
onClick: r.onViewMoreClick
|
|
12842
12849
|
})
|
|
12843
12850
|
}) : null
|
|
@@ -12851,7 +12858,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12851
12858
|
})
|
|
12852
12859
|
})
|
|
12853
12860
|
] });
|
|
12854
|
-
},
|
|
12861
|
+
}, Rd = ({ loginImage: e, onCancelClick: t, ...n }) => /* @__PURE__ */ l("section", {
|
|
12855
12862
|
className: "flex w-full justify-center px-4 py-10 md:py-16",
|
|
12856
12863
|
children: /* @__PURE__ */ u("div", {
|
|
12857
12864
|
className: `${e ? "md:grid md:max-w-5xl md:grid-cols-2 md:gap-12" : "max-w-lg"} w-full md:items-stretch`,
|
|
@@ -12867,21 +12874,21 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12867
12874
|
})
|
|
12868
12875
|
}) : null, /* @__PURE__ */ l("div", {
|
|
12869
12876
|
className: "mx-auto w-full max-w-lg md:self-center",
|
|
12870
|
-
children: /* @__PURE__ */ l(
|
|
12877
|
+
children: /* @__PURE__ */ l(Zu, {
|
|
12871
12878
|
...n,
|
|
12872
12879
|
onSecondaryClick: t
|
|
12873
12880
|
})
|
|
12874
12881
|
})]
|
|
12875
12882
|
})
|
|
12876
|
-
}),
|
|
12883
|
+
}), zd = (e) => {
|
|
12877
12884
|
let t = e.options.find((t) => t.value === e.selectedValue) ?? e.options[0];
|
|
12878
12885
|
return t?.value ?? t?.label ?? "";
|
|
12879
|
-
},
|
|
12880
|
-
let f = e.locations.length > 0, p = e.results.selectedLocationId ?? e.map.selectedLocationId, m =
|
|
12886
|
+
}, Bd = ({ data: e, className: t = "", onProductChange: n, onSearchSubmit: r, onTabChange: i, onLocationSelect: a, onWebsiteClick: o, onDirectionsClick: s, onPhoneClick: c, onEmailClick: d }) => {
|
|
12887
|
+
let f = e.locations.length > 0, p = e.results.selectedLocationId ?? e.map.selectedLocationId, m = zd(e.tabs);
|
|
12881
12888
|
return /* @__PURE__ */ u("section", {
|
|
12882
12889
|
className: t,
|
|
12883
12890
|
children: [
|
|
12884
|
-
/* @__PURE__ */ l(
|
|
12891
|
+
/* @__PURE__ */ l(Tl, {
|
|
12885
12892
|
...e.banner,
|
|
12886
12893
|
onProductChange: (t) => n?.(t, e),
|
|
12887
12894
|
onSearchSubmit: (t) => r?.(t, e)
|
|
@@ -12890,7 +12897,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12890
12897
|
spacing: "none",
|
|
12891
12898
|
className: "mb-8 pt-10",
|
|
12892
12899
|
innerClassName: "flex justify-center",
|
|
12893
|
-
children: /* @__PURE__ */ l(
|
|
12900
|
+
children: /* @__PURE__ */ l(Ol, {
|
|
12894
12901
|
className: "w-full",
|
|
12895
12902
|
items: e.tabs.options.map((e) => ({
|
|
12896
12903
|
label: e.label,
|
|
@@ -12910,14 +12917,14 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12910
12917
|
/* @__PURE__ */ l(H, {
|
|
12911
12918
|
spacing: "none",
|
|
12912
12919
|
className: "mb-8 pb-10 md:mb-10",
|
|
12913
|
-
children: /* @__PURE__ */ l(
|
|
12920
|
+
children: /* @__PURE__ */ l(Vu, {
|
|
12914
12921
|
...e.map,
|
|
12915
12922
|
locations: e.locations,
|
|
12916
12923
|
selectedLocationId: e.map.selectedLocationId ?? p,
|
|
12917
12924
|
onLocationSelect: (t) => a?.(t, e)
|
|
12918
12925
|
})
|
|
12919
12926
|
}),
|
|
12920
|
-
f ? /* @__PURE__ */ l(
|
|
12927
|
+
f ? /* @__PURE__ */ l(Cu, {
|
|
12921
12928
|
...e.results,
|
|
12922
12929
|
locations: e.locations,
|
|
12923
12930
|
selectedLocationId: p,
|
|
@@ -12941,7 +12948,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12941
12948
|
})
|
|
12942
12949
|
]
|
|
12943
12950
|
});
|
|
12944
|
-
},
|
|
12951
|
+
}, Vd = ({ title: e = "Order Confirmed", message: t = "Thank you for your purchase! Your order has been confirmed and will be shipped soon.", buttonLabel: n = "Return to Home", onButtonClick: r }) => /* @__PURE__ */ l("section", {
|
|
12945
12952
|
className: "w-full bg-white",
|
|
12946
12953
|
children: /* @__PURE__ */ u("div", {
|
|
12947
12954
|
className: "mx-auto flex max-w-6xl flex-col items-center px-6 py-20 text-center",
|
|
@@ -12978,7 +12985,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
12978
12985
|
})
|
|
12979
12986
|
]
|
|
12980
12987
|
})
|
|
12981
|
-
}),
|
|
12988
|
+
}), Hd = ({ shippingTitle: e = "Shipping Method", paymentTitle: t = "Payment Summary", shippingMethod: n = {}, paymentRows: r = [] }) => {
|
|
12982
12989
|
let i = r.length > 0;
|
|
12983
12990
|
return /* @__PURE__ */ l("section", {
|
|
12984
12991
|
className: "w-full mt-10",
|
|
@@ -13041,7 +13048,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13041
13048
|
}) : null]
|
|
13042
13049
|
})
|
|
13043
13050
|
});
|
|
13044
|
-
},
|
|
13051
|
+
}, Ud = (e) => /* @__PURE__ */ u("div", {
|
|
13045
13052
|
className: "min-w-0 flex flex-col gap-1",
|
|
13046
13053
|
children: [
|
|
13047
13054
|
/* @__PURE__ */ l(v, {
|
|
@@ -13075,7 +13082,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13075
13082
|
children: e.country
|
|
13076
13083
|
}) : null
|
|
13077
13084
|
]
|
|
13078
|
-
}),
|
|
13085
|
+
}), Wd = ({ sectionTitle: e = "Order Receipt", orderDetails: t = {}, shippingAddress: n = {}, billingAddress: r = {}, className: i = "" }) => /* @__PURE__ */ l("section", {
|
|
13079
13086
|
className: `w-full ${i}`,
|
|
13080
13087
|
children: /* @__PURE__ */ u("div", {
|
|
13081
13088
|
className: "w-full",
|
|
@@ -13146,18 +13153,18 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13146
13153
|
})
|
|
13147
13154
|
]
|
|
13148
13155
|
}),
|
|
13149
|
-
|
|
13156
|
+
Ud({
|
|
13150
13157
|
title: n.title || "Shipping Address",
|
|
13151
13158
|
...n
|
|
13152
13159
|
}),
|
|
13153
|
-
|
|
13160
|
+
Ud({
|
|
13154
13161
|
title: r.title || "Billing Address",
|
|
13155
13162
|
...r
|
|
13156
13163
|
})
|
|
13157
13164
|
]
|
|
13158
13165
|
})]
|
|
13159
13166
|
})
|
|
13160
|
-
}),
|
|
13167
|
+
}), Gd = ({ sectionTitle: e = "Order Summary", showPricing: t = !0, columnLabels: n = {}, items: r = [] }) => {
|
|
13161
13168
|
let { orderDetails: i = "Order Details", quantity: a = "Quantity", unitPrice: o = "Unit Price", total: s = "Total" } = n;
|
|
13162
13169
|
return /* @__PURE__ */ l("section", {
|
|
13163
13170
|
className: "w-full",
|
|
@@ -13220,29 +13227,29 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13220
13227
|
]
|
|
13221
13228
|
})
|
|
13222
13229
|
});
|
|
13223
|
-
},
|
|
13230
|
+
}, Kd = ({ cartConfirmedHeroProps: e, cartReceiptSectionProps: t, cartSummarySectionProps: n, cartOrderSummaryProps: r }) => /* @__PURE__ */ l("section", {
|
|
13224
13231
|
className: "w-full flex justify-center",
|
|
13225
13232
|
children: /* @__PURE__ */ u("div", {
|
|
13226
13233
|
className: "w-full max-w-6xl",
|
|
13227
|
-
children: [/* @__PURE__ */ l(
|
|
13234
|
+
children: [/* @__PURE__ */ l(Vd, { ...e }), /* @__PURE__ */ u("div", {
|
|
13228
13235
|
className: "px-12 pb-16",
|
|
13229
13236
|
children: [
|
|
13230
13237
|
/* @__PURE__ */ l("div", {
|
|
13231
13238
|
className: "mt-10",
|
|
13232
|
-
children: /* @__PURE__ */ l(
|
|
13239
|
+
children: /* @__PURE__ */ l(Wd, { ...t })
|
|
13233
13240
|
}),
|
|
13234
13241
|
/* @__PURE__ */ l("div", {
|
|
13235
13242
|
className: "mt-14",
|
|
13236
|
-
children: /* @__PURE__ */ l(
|
|
13243
|
+
children: /* @__PURE__ */ l(Gd, { ...n })
|
|
13237
13244
|
}),
|
|
13238
13245
|
/* @__PURE__ */ l("div", {
|
|
13239
13246
|
className: "mt-14",
|
|
13240
|
-
children: /* @__PURE__ */ l(
|
|
13247
|
+
children: /* @__PURE__ */ l(Hd, { ...r })
|
|
13241
13248
|
})
|
|
13242
13249
|
]
|
|
13243
13250
|
})]
|
|
13244
13251
|
})
|
|
13245
|
-
}),
|
|
13252
|
+
}), qd = ({ title: e = "Ship To", idPrefix: t = "shipping", firstName: n = "", lastName: r = "", email: i = "", phoneNumber: a = "", companyName: o = "", userType: s = "", address: d = "", apartment: f = "", postalCode: p = "", city: m = "", country: h = "united-states", countryLabel: g, stateProvince: _ = "", addressRegionVariant: y = "default", countryDisplayMode: b = "select", countryOptions: x = [], stateProvinceOptions: C = [], userTypeOptions: w = [], firstNamePlaceholder: T = "First Name", lastNamePlaceholder: E = "Last Name", emailPlaceholder: D = "Email", phoneNumberPlaceholder: O = "Phone Number", companyNamePlaceholder: k = "Company Name (Optional)", userTypePlaceholder: A = "I am a*", addressPlaceholder: j = "Address", apartmentPlaceholder: M = "Apartment/Suite/Building (Optional)", cityPlaceholder: N, postalCodePlaceholder: P, stateProvincePlaceholder: F, countryPlaceholder: I = "Country", showCompanyName: L = !0, showContactFields: R = !0, addressErrorMessage: z, errors: B = {}, onFirstNameChange: V, onLastNameChange: ee, onEmailChange: te, onPhoneNumberChange: ne, onCompanyNameChange: re, onUserTypeChange: ie, onAddressChange: ae, onApartmentChange: H, onPostalCodeChange: oe, onCityChange: U, onCountryChange: se, onStateProvinceChange: W, onFirstNameBlur: ce, onLastNameBlur: le, onEmailBlur: ue, onPhoneNumberBlur: de, onCompanyNameBlur: fe, onUserTypeBlur: pe, onAddressBlur: me, onApartmentBlur: G, onPostalCodeBlur: he, onCityBlur: ge, onCountryBlur: K, onStateProvinceBlur: _e }) => {
|
|
13246
13253
|
let ve = y === "ca" || y === "mx", ye = y === "uk", be = N ?? "City", xe = P ?? "Postal Code", Se = F ?? (y === "ca" ? "Province" : "State/Province"), Ce = g ?? x.find((e) => e.value === h)?.label ?? h, q = `${t}-address-error`, we = !!z, Te = /* @__PURE__ */ l($, {
|
|
13247
13254
|
id: `${t}-city`,
|
|
13248
13255
|
name: "city",
|
|
@@ -13440,7 +13447,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13440
13447
|
]
|
|
13441
13448
|
})]
|
|
13442
13449
|
});
|
|
13443
|
-
},
|
|
13450
|
+
}, Jd = ({ title: e, options: t = [], selectedValue: n, name: r, className: i = "", onChange: a }) => /* @__PURE__ */ u("section", {
|
|
13444
13451
|
className: `flex w-full flex-col gap-4 ${i}`,
|
|
13445
13452
|
children: [e ? /* @__PURE__ */ l(v, {
|
|
13446
13453
|
as: "h3",
|
|
@@ -13460,7 +13467,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13460
13467
|
onChange: (e) => a?.(e)
|
|
13461
13468
|
}, e.id))
|
|
13462
13469
|
})]
|
|
13463
|
-
}),
|
|
13470
|
+
}), Yd = ({ steps: t = [], currentStep: n = 0, onStepClick: r, className: i = "", completedColorClass: a = "text-accent!", upcomingColorClass: o = "text-primary", connectorCompletedClass: s = "bg-accent!", connectorUpcomingClass: c = "bg-primary" }) => {
|
|
13464
13471
|
if (!t.length) return null;
|
|
13465
13472
|
let d = typeof n == "number" ? n : t.findIndex((e) => e === n), f = d >= 0 ? d : 0, p = (e, t) => e < t ? {
|
|
13466
13473
|
left: s,
|
|
@@ -13513,20 +13520,20 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13513
13520
|
})] }, `${n}-${r}`);
|
|
13514
13521
|
})
|
|
13515
13522
|
});
|
|
13516
|
-
},
|
|
13523
|
+
}, Xd = ({ shippingAddressFormProps: e, shippingOptionSelectorProps: t, checkoutProgressIndicatorProps: n, sampleOrderSummaryPanelProps: r, submitLabel: i = "Submit Sample Order", onSubmitSampleOrder: a }) => /* @__PURE__ */ l("section", {
|
|
13517
13524
|
className: "flex w-full justify-center px-4 py-10 pb-24 md:py-16 md:pb-28",
|
|
13518
13525
|
children: /* @__PURE__ */ l("div", {
|
|
13519
13526
|
className: "w-full max-w-6xl",
|
|
13520
13527
|
children: /* @__PURE__ */ u("div", {
|
|
13521
13528
|
className: "grid w-full grid-cols-1 gap-8 md:grid-cols-2",
|
|
13522
|
-
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(
|
|
13529
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(qd, { ...e }), /* @__PURE__ */ l("div", {
|
|
13523
13530
|
className: "mt-8",
|
|
13524
|
-
children: /* @__PURE__ */ l(
|
|
13531
|
+
children: /* @__PURE__ */ l(Jd, { ...t })
|
|
13525
13532
|
})] }), /* @__PURE__ */ u("div", { children: [
|
|
13526
|
-
/* @__PURE__ */ l(
|
|
13533
|
+
/* @__PURE__ */ l(Yd, { ...n }),
|
|
13527
13534
|
/* @__PURE__ */ l("div", {
|
|
13528
13535
|
className: "mt-8",
|
|
13529
|
-
children: /* @__PURE__ */ l(
|
|
13536
|
+
children: /* @__PURE__ */ l(zl, { ...r })
|
|
13530
13537
|
}),
|
|
13531
13538
|
/* @__PURE__ */ l("div", {
|
|
13532
13539
|
className: "mt-8",
|
|
@@ -13540,7 +13547,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13540
13547
|
] })]
|
|
13541
13548
|
})
|
|
13542
13549
|
})
|
|
13543
|
-
}),
|
|
13550
|
+
}), Zd = ({ title: e = "Ordered Samples", items: t, checkoutProgressIndicatorProps: n, sampleOrderSummaryPanelProps: r, proceedToShippingLabel: i = "Proceed to Shipping", browseMoreSamplesLabel: a = "Browse More Samples", onQuantityChange: o, onRemoveItem: s, onProceedToShipping: c, onBrowseMoreSamples: d }) => /* @__PURE__ */ l("section", {
|
|
13544
13551
|
className: "flex w-full justify-center px-4 py-10 pb-24 md:py-16 md:pb-28",
|
|
13545
13552
|
children: /* @__PURE__ */ l("div", {
|
|
13546
13553
|
className: "w-full max-w-6xl",
|
|
@@ -13576,10 +13583,10 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13576
13583
|
})
|
|
13577
13584
|
})]
|
|
13578
13585
|
}), /* @__PURE__ */ u("div", { children: [
|
|
13579
|
-
/* @__PURE__ */ l(
|
|
13586
|
+
/* @__PURE__ */ l(Yd, { ...n }),
|
|
13580
13587
|
/* @__PURE__ */ l("div", {
|
|
13581
13588
|
className: "mt-8",
|
|
13582
|
-
children: /* @__PURE__ */ l(
|
|
13589
|
+
children: /* @__PURE__ */ l(zl, { ...r })
|
|
13583
13590
|
}),
|
|
13584
13591
|
/* @__PURE__ */ u("div", {
|
|
13585
13592
|
className: "mt-8 flex flex-col gap-3 bg-white",
|
|
@@ -13599,17 +13606,17 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13599
13606
|
] })]
|
|
13600
13607
|
})
|
|
13601
13608
|
})
|
|
13602
|
-
}),
|
|
13609
|
+
}), Qd = ({ customerDetailsFormProps: e, shippingAddressFormProps: t, shippingOptionSelectorProps: n, checkoutProgressIndicatorProps: r, sampleOrderSummaryPanelProps: i, privacyConsentLabel: a = "I have read and agree to the", privacyPolicyLabel: o = "Privacy Policy", privacyConsentChecked: s = !1, privacyConsentErrorMessage: c, submitLabel: d = "Submit Sample Order", isSubmitting: f = !1, submittingLabel: p = "Submitting order…", onPrivacyConsentChange: m, onPrivacyPolicyClick: h, onSubmitSampleOrder: g }) => /* @__PURE__ */ l("section", {
|
|
13603
13610
|
className: "flex w-full justify-center px-4 py-10 pb-24 md:py-16 md:pb-28",
|
|
13604
13611
|
children: /* @__PURE__ */ l("div", {
|
|
13605
13612
|
className: "w-full max-w-6xl",
|
|
13606
13613
|
children: /* @__PURE__ */ u("div", {
|
|
13607
13614
|
className: "grid w-full grid-cols-1 gap-8 md:grid-cols-2",
|
|
13608
13615
|
children: [/* @__PURE__ */ u("div", { children: [
|
|
13609
|
-
/* @__PURE__ */ l(
|
|
13616
|
+
/* @__PURE__ */ l(Bl, { ...e }),
|
|
13610
13617
|
/* @__PURE__ */ l("div", {
|
|
13611
13618
|
className: "mt-8",
|
|
13612
|
-
children: /* @__PURE__ */ l(
|
|
13619
|
+
children: /* @__PURE__ */ l(qd, {
|
|
13613
13620
|
...t,
|
|
13614
13621
|
addressRegionVariant: "uk",
|
|
13615
13622
|
showContactFields: !1
|
|
@@ -13617,13 +13624,13 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13617
13624
|
}),
|
|
13618
13625
|
/* @__PURE__ */ l("div", {
|
|
13619
13626
|
className: "mt-8",
|
|
13620
|
-
children: /* @__PURE__ */ l(
|
|
13627
|
+
children: /* @__PURE__ */ l(Jd, { ...n })
|
|
13621
13628
|
})
|
|
13622
13629
|
] }), /* @__PURE__ */ u("div", { children: [
|
|
13623
|
-
/* @__PURE__ */ l(
|
|
13630
|
+
/* @__PURE__ */ l(Yd, { ...r }),
|
|
13624
13631
|
/* @__PURE__ */ l("div", {
|
|
13625
13632
|
className: "mt-8",
|
|
13626
|
-
children: /* @__PURE__ */ l(
|
|
13633
|
+
children: /* @__PURE__ */ l(zl, { ...i })
|
|
13627
13634
|
}),
|
|
13628
13635
|
/* @__PURE__ */ u("div", {
|
|
13629
13636
|
className: "mt-8 flex flex-wrap items-center gap-x-1 gap-y-2",
|
|
@@ -13665,29 +13672,29 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13665
13672
|
] })]
|
|
13666
13673
|
})
|
|
13667
13674
|
})
|
|
13668
|
-
}),
|
|
13675
|
+
}), $d = ({ cartConfirmedHeroProps: e, cartReceiptSectionProps: t, cartSummarySectionProps: n, cartOrderSummaryProps: r }) => /* @__PURE__ */ l("section", {
|
|
13669
13676
|
className: "w-full flex justify-center",
|
|
13670
13677
|
children: /* @__PURE__ */ u("div", {
|
|
13671
13678
|
className: "w-full max-w-6xl",
|
|
13672
|
-
children: [/* @__PURE__ */ l(
|
|
13679
|
+
children: [/* @__PURE__ */ l(Vd, { ...e }), /* @__PURE__ */ u("div", {
|
|
13673
13680
|
className: "px-12 pb-16",
|
|
13674
13681
|
children: [
|
|
13675
13682
|
/* @__PURE__ */ l("div", {
|
|
13676
13683
|
className: "mt-10",
|
|
13677
|
-
children: /* @__PURE__ */ l(
|
|
13684
|
+
children: /* @__PURE__ */ l(Wd, { ...t })
|
|
13678
13685
|
}),
|
|
13679
13686
|
/* @__PURE__ */ l("div", {
|
|
13680
13687
|
className: "mt-14",
|
|
13681
|
-
children: /* @__PURE__ */ l(
|
|
13688
|
+
children: /* @__PURE__ */ l(Gd, { ...n })
|
|
13682
13689
|
}),
|
|
13683
13690
|
/* @__PURE__ */ l("div", {
|
|
13684
13691
|
className: "mt-14",
|
|
13685
|
-
children: /* @__PURE__ */ l(
|
|
13692
|
+
children: /* @__PURE__ */ l(Hd, { ...r })
|
|
13686
13693
|
})
|
|
13687
13694
|
]
|
|
13688
13695
|
})]
|
|
13689
13696
|
})
|
|
13690
|
-
}),
|
|
13697
|
+
}), ef = ({ discountCode: t = "", discountCodeStatus: n = "idle", discountCodeMessage: r = "", subtotalLabel: i = "Sub total", discountLabel: a = "Discount", taxLabel: o = "Tax", shippingLabel: s = "Shipping", totalLabel: c = "Total", subtotal: d = "$0.00", discount: f = "", tax: p = "Not calculated", shipping: m = "Not calculated", total: h = "$0.00", continueLabel: g = "Continue", discountCodePlaceholder: _ = "Enter discount code", applyDiscountLabel: y = "Apply", notCalculatedLabel: b = "Not calculated", showDiscountCode: x = !0, onDiscountCodeChange: C, onApplyDiscount: w, onContinue: T, className: E = "" }) => {
|
|
13691
13698
|
let D = !!(t.trim() && f), O = !!(p.trim() && p !== "Not calculated" && p !== b), k = O ? p : b, A = !!(m.trim() && m !== "Not calculated" && m !== b), j = A ? m : b, [M, N] = e.useState(!0), F = n !== "idle" && !!r && (n !== "success" || M), I = n === "success";
|
|
13692
13699
|
return e.useEffect(() => {
|
|
13693
13700
|
if (N(!0), n !== "success") return;
|
|
@@ -13807,7 +13814,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13807
13814
|
})
|
|
13808
13815
|
]
|
|
13809
13816
|
});
|
|
13810
|
-
},
|
|
13817
|
+
}, tf = ({ paymentTypeTitle: e = "Select Payment Type", paymentTypeSelectorProps: t, cardNumber: n = "", expirationDate: r = "", securityCode: i = "", errors: a = {}, submitError: o, onCardNumberChange: s, onExpirationDateChange: c, onSecurityCodeChange: d, onCardNumberBlur: f, onExpirationDateBlur: p, onSecurityCodeBlur: m }) => /* @__PURE__ */ u("section", {
|
|
13811
13818
|
className: "flex w-full flex-col gap-6",
|
|
13812
13819
|
children: [
|
|
13813
13820
|
/* @__PURE__ */ u("div", {
|
|
@@ -13817,7 +13824,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13817
13824
|
variant: "bold",
|
|
13818
13825
|
className: "text-primary",
|
|
13819
13826
|
children: e
|
|
13820
|
-
}), /* @__PURE__ */ l(
|
|
13827
|
+
}), /* @__PURE__ */ l(Jd, { ...t })]
|
|
13821
13828
|
}),
|
|
13822
13829
|
/* @__PURE__ */ u("div", {
|
|
13823
13830
|
className: "mt-10 flex flex-col gap-4",
|
|
@@ -13870,19 +13877,19 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13870
13877
|
children: o
|
|
13871
13878
|
}) : null
|
|
13872
13879
|
]
|
|
13873
|
-
}),
|
|
13880
|
+
}), nf = ({ requiresPayment: e = !0, shippingMethodSelectorProps: t, cartPaymentPanelProps: n, checkoutProgressIndicatorProps: r, cartTotalsPanelProps: i }) => /* @__PURE__ */ l("section", {
|
|
13874
13881
|
className: "w-full flex justify-center mt-10 pb-16",
|
|
13875
13882
|
children: /* @__PURE__ */ u("div", {
|
|
13876
13883
|
className: "grid w-full max-w-6xl grid-cols-2 gap-8",
|
|
13877
|
-
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(
|
|
13884
|
+
children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(Jd, { ...t }), e ? /* @__PURE__ */ l("div", {
|
|
13878
13885
|
className: "mt-8",
|
|
13879
|
-
children: /* @__PURE__ */ l(
|
|
13880
|
-
}) : null] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(
|
|
13886
|
+
children: /* @__PURE__ */ l(tf, { ...n })
|
|
13887
|
+
}) : null] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(Yd, { ...r }), /* @__PURE__ */ l("div", {
|
|
13881
13888
|
className: "mt-8",
|
|
13882
|
-
children: /* @__PURE__ */ l(
|
|
13889
|
+
children: /* @__PURE__ */ l(ef, { ...i })
|
|
13883
13890
|
})] })]
|
|
13884
13891
|
})
|
|
13885
|
-
}),
|
|
13892
|
+
}), rf = ({ shippingAddressFormProps: t, billingAddressFormProps: n = {}, checkoutProgressIndicatorProps: r, cartTotalsPanelProps: i, billingSectionTitle: a = "Billing Information", sameAsShipping: o = !0, sameAsShippingLabel: s = "My billing address is the same as my shipping address", onSameAsShippingChange: c }) => {
|
|
13886
13893
|
let [d, f] = e.useState(o);
|
|
13887
13894
|
e.useEffect(() => {
|
|
13888
13895
|
f(o);
|
|
@@ -13893,7 +13900,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13893
13900
|
children: /* @__PURE__ */ u("div", {
|
|
13894
13901
|
className: "grid w-full max-w-6xl grid-cols-2 gap-8",
|
|
13895
13902
|
children: [/* @__PURE__ */ u("div", { children: [
|
|
13896
|
-
/* @__PURE__ */ l(
|
|
13903
|
+
/* @__PURE__ */ l(qd, { ...t }),
|
|
13897
13904
|
/* @__PURE__ */ u("div", {
|
|
13898
13905
|
className: "mt-8 flex flex-col gap-4",
|
|
13899
13906
|
children: [/* @__PURE__ */ l(v, {
|
|
@@ -13913,7 +13920,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13913
13920
|
}),
|
|
13914
13921
|
d ? null : /* @__PURE__ */ l("div", {
|
|
13915
13922
|
className: "mt-6",
|
|
13916
|
-
children: /* @__PURE__ */ l(
|
|
13923
|
+
children: /* @__PURE__ */ l(qd, {
|
|
13917
13924
|
...n,
|
|
13918
13925
|
idPrefix: n.idPrefix ?? "billing",
|
|
13919
13926
|
title: n.title ?? "",
|
|
@@ -13921,16 +13928,16 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13921
13928
|
stateProvinceOptions: m
|
|
13922
13929
|
})
|
|
13923
13930
|
})
|
|
13924
|
-
] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(
|
|
13931
|
+
] }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l(Yd, { ...r }), /* @__PURE__ */ l("div", {
|
|
13925
13932
|
className: "mt-8",
|
|
13926
|
-
children: /* @__PURE__ */ l(
|
|
13933
|
+
children: /* @__PURE__ */ l(ef, { ...i })
|
|
13927
13934
|
})] })]
|
|
13928
13935
|
})
|
|
13929
13936
|
});
|
|
13930
|
-
},
|
|
13937
|
+
}, af = (e, t, n) => new Intl.NumberFormat(t, {
|
|
13931
13938
|
style: "currency",
|
|
13932
13939
|
currency: n
|
|
13933
|
-
}).format(e),
|
|
13940
|
+
}).format(e), of = ({ subtotal: e, shippingCost: t, items: n = [], title: r = "Order Summary", totalLabel: i = "Total", locale: a = "en-US", currency: o = "USD", removeItemLabel: s = "Remove item", decreaseQuantityLabel: c = "Decrease quantity", increaseQuantityLabel: d = "Increase quantity", onQuantityChange: f, onRemoveItem: p }) => {
|
|
13934
13941
|
if (n.length === 0) return null;
|
|
13935
13942
|
let m = e + t;
|
|
13936
13943
|
return /* @__PURE__ */ l("section", {
|
|
@@ -13979,23 +13986,23 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13979
13986
|
}), /* @__PURE__ */ l(v, {
|
|
13980
13987
|
variant: "free",
|
|
13981
13988
|
className: "text-right font-bold pr-7",
|
|
13982
|
-
children:
|
|
13989
|
+
children: af(m, a, o)
|
|
13983
13990
|
})]
|
|
13984
13991
|
})
|
|
13985
13992
|
})
|
|
13986
13993
|
]
|
|
13987
13994
|
})
|
|
13988
13995
|
});
|
|
13989
|
-
},
|
|
13996
|
+
}, sf = ({ currentStep: e = 0, steps: t = [
|
|
13990
13997
|
"Account",
|
|
13991
13998
|
"Shipping",
|
|
13992
13999
|
"Payment"
|
|
13993
14000
|
], activeMode: n = "signIn", email: r = "", password: i = "", firstName: a = "", lastName: o = "", phoneNumber: s = "", userType: c = "", confirmPassword: d = "", marketingOptIn: f = !1, termsAccepted: p = !1, passwordRequirementsText: m, emailError: h = "", passwordError: g = "", firstNameError: _ = "", phoneNumberError: v = "", userTypeError: y = "", confirmPasswordError: b = "", termsAcceptedError: x = "", emailHasError: S = !1, passwordHasError: C = !1, firstNameHasError: w = !1, phoneNumberHasError: T = !1, userTypeHasError: E = !1, confirmPasswordHasError: D = !1, termsAcceptedHasError: O = !1, actionLabels: k, labels: A, onModeChange: j, onEmailChange: M, onPasswordChange: N, onFirstNameChange: P, onLastNameChange: F, onPhoneNumberChange: I, onUserTypeChange: L, onConfirmPasswordChange: R, onMarketingOptInChange: z, onTermsAcceptedChange: B, onEmailBlur: V, onPasswordBlur: ee, onForgotPasswordClick: te, onTermsClick: ne, onPrivacyClick: re, onContinue: ie, onContinueAsGuest: ae }) => /* @__PURE__ */ u("div", {
|
|
13994
14001
|
className: "flex w-full flex-col gap-8",
|
|
13995
|
-
children: [/* @__PURE__ */ l(
|
|
14002
|
+
children: [/* @__PURE__ */ l(Yd, {
|
|
13996
14003
|
steps: t,
|
|
13997
14004
|
currentStep: e
|
|
13998
|
-
}), /* @__PURE__ */ l(
|
|
14005
|
+
}), /* @__PURE__ */ l(Zu, {
|
|
13999
14006
|
data: {
|
|
14000
14007
|
mode: n,
|
|
14001
14008
|
email: r,
|
|
@@ -14043,15 +14050,15 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14043
14050
|
onCreateAccountClick: ie,
|
|
14044
14051
|
onSecondaryClick: ae
|
|
14045
14052
|
})]
|
|
14046
|
-
}),
|
|
14053
|
+
}), cf = (e) => e.customerState === "authenticated" ? /* @__PURE__ */ l("section", {
|
|
14047
14054
|
className: "mt-10 flex w-full justify-center px-4 pb-16 md:px-6",
|
|
14048
14055
|
children: /* @__PURE__ */ u("div", {
|
|
14049
14056
|
className: "w-full max-w-3xl",
|
|
14050
14057
|
children: [
|
|
14051
|
-
/* @__PURE__ */ l(
|
|
14058
|
+
/* @__PURE__ */ l(Yd, { ...e.checkoutProgressIndicatorProps }),
|
|
14052
14059
|
/* @__PURE__ */ l("div", {
|
|
14053
14060
|
className: "mt-8",
|
|
14054
|
-
children: /* @__PURE__ */ l(
|
|
14061
|
+
children: /* @__PURE__ */ l(of, { ...e.cartSummaryProps })
|
|
14055
14062
|
}),
|
|
14056
14063
|
/* @__PURE__ */ l("div", {
|
|
14057
14064
|
className: "mt-6 flex justify-end",
|
|
@@ -14074,9 +14081,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14074
14081
|
className: "mt-10 flex w-full justify-center px-4 pb-16 md:px-6",
|
|
14075
14082
|
children: /* @__PURE__ */ u("div", {
|
|
14076
14083
|
className: "grid w-full max-w-6xl grid-cols-1 gap-8 md:grid-cols-2",
|
|
14077
|
-
children: [/* @__PURE__ */ l(
|
|
14084
|
+
children: [/* @__PURE__ */ l(of, { ...e.cartSummaryProps }), /* @__PURE__ */ l(sf, { ...e.checkoutAccountStepProps })]
|
|
14078
14085
|
})
|
|
14079
|
-
}),
|
|
14086
|
+
}), lf = ({ pageTitle: e, pageDescription: t, sideNavProps: n, headerLeading: r, headerActions: i, backgroundJobTrayProps: a, children: o }) => {
|
|
14080
14087
|
let s = t?.trim() ?? "";
|
|
14081
14088
|
return /* @__PURE__ */ l("div", {
|
|
14082
14089
|
className: "min-h-screen bg-secondary",
|
|
@@ -14117,7 +14124,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14117
14124
|
]
|
|
14118
14125
|
})
|
|
14119
14126
|
});
|
|
14120
|
-
},
|
|
14127
|
+
}, uf = {
|
|
14121
14128
|
loading: {
|
|
14122
14129
|
iconName: "spinner",
|
|
14123
14130
|
iconClassName: "text-tertiary",
|
|
@@ -14133,14 +14140,14 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14133
14140
|
iconClassName: "text-accent",
|
|
14134
14141
|
defaultTitle: "Unable to load data"
|
|
14135
14142
|
}
|
|
14136
|
-
},
|
|
14143
|
+
}, df = (e) => {
|
|
14137
14144
|
if (e === "loading") return "status";
|
|
14138
14145
|
if (e === "error") return "alert";
|
|
14139
|
-
},
|
|
14146
|
+
}, ff = ({ status: e, action: t, onRetryClick: n }) => {
|
|
14140
14147
|
if (e.state === "ready") return null;
|
|
14141
|
-
let r =
|
|
14148
|
+
let r = uf[e.state], i = e.title?.trim() || r.defaultTitle, a = e.message?.trim() ?? "", o = e.detail?.trim() ?? "";
|
|
14142
14149
|
return /* @__PURE__ */ l("section", {
|
|
14143
|
-
role:
|
|
14150
|
+
role: df(e.state),
|
|
14144
14151
|
"aria-live": e.state === "loading" ? "polite" : void 0,
|
|
14145
14152
|
className: "mt-5 flex min-h-64 items-center justify-center rounded-lg border border-borderTertiary bg-secondary p-6 text-center shadow-sm",
|
|
14146
14153
|
children: /* @__PURE__ */ u("div", {
|
|
@@ -14191,7 +14198,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14191
14198
|
]
|
|
14192
14199
|
})
|
|
14193
14200
|
});
|
|
14194
|
-
},
|
|
14201
|
+
}, pf = (e) => e === "error" ? "border-accent bg-accent/10" : e === "warning" ? "border-yellow-500 bg-yellow-50" : e === "success" ? "border-saleGreen bg-green-50" : "border-borderTertiary bg-adminSideNavBackground", mf = (e) => {
|
|
14195
14202
|
let t = e.onBackClick ? /* @__PURE__ */ l(P, {
|
|
14196
14203
|
label: e.backLabel ?? "Back to browse",
|
|
14197
14204
|
iconType: "fa-solid",
|
|
@@ -14205,14 +14212,14 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14205
14212
|
}) : void 0;
|
|
14206
14213
|
if (!("data" in e)) {
|
|
14207
14214
|
let n = e.state === "notFound" || e.state === "empty" ? "empty" : e.state;
|
|
14208
|
-
return /* @__PURE__ */ u(
|
|
14215
|
+
return /* @__PURE__ */ u(lf, {
|
|
14209
14216
|
pageTitle: e.pageTitle,
|
|
14210
14217
|
sideNavProps: e.sideNavProps,
|
|
14211
14218
|
backgroundJobTrayProps: e.backgroundJobTrayProps,
|
|
14212
14219
|
children: [t ? /* @__PURE__ */ l("div", {
|
|
14213
14220
|
className: "mt-5",
|
|
14214
14221
|
children: t
|
|
14215
|
-
}) : null, /* @__PURE__ */ l(
|
|
14222
|
+
}) : null, /* @__PURE__ */ l(ff, {
|
|
14216
14223
|
status: {
|
|
14217
14224
|
state: n,
|
|
14218
14225
|
message: e.message,
|
|
@@ -14230,7 +14237,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14230
14237
|
], D = (n.availableTabs ?? E).filter((e) => e !== "availability" || T.length), O = n.mode === "create", k = n.region === "north-america", A = n.lxImport?.state === "loading", j = k && !O && !!n.lxImport, M = x.name.trim() || "New decor", N = `Decor ${x.decorCode} · Range ${x.rangeCode}`;
|
|
14231
14238
|
O && (N = "Enter a decor code to begin", x.decorCode.trim() && (N = `Decor ${x.decorCode}`, x.rangeCode.trim() && (N += ` · Range ${x.rangeCode}`)));
|
|
14232
14239
|
let F = C.activeLocalization.saveStatus === "saving", I = C.searchColorFieldId ? [...C.sharedFields, ...C.localizedFields].filter((e) => e.id === C.searchColorFieldId) : [], R = C.decorFlagFieldId ? C.sharedFields.filter((e) => e.id === C.decorFlagFieldId) : [], z = C.sharedFields.filter((e) => e.id !== C.searchColorFieldId && e.id !== C.decorFlagFieldId), B = C.localizedFields.filter((e) => e.id !== C.searchColorFieldId);
|
|
14233
|
-
return /* @__PURE__ */ u(
|
|
14240
|
+
return /* @__PURE__ */ u(lf, {
|
|
14234
14241
|
pageTitle: n.pageTitle,
|
|
14235
14242
|
pageDescription: n.pageDescription,
|
|
14236
14243
|
sideNavProps: r,
|
|
@@ -14271,7 +14278,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14271
14278
|
}) : null,
|
|
14272
14279
|
n.notice ? /* @__PURE__ */ u("section", {
|
|
14273
14280
|
role: n.notice.tone === "error" ? "alert" : "status",
|
|
14274
|
-
className: `mt-4 rounded-lg border p-4 ${
|
|
14281
|
+
className: `mt-4 rounded-lg border p-4 ${pf(n.notice.tone)}`,
|
|
14275
14282
|
children: [
|
|
14276
14283
|
n.notice.title ? /* @__PURE__ */ l(v, {
|
|
14277
14284
|
variant: "free",
|
|
@@ -14486,7 +14493,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14486
14493
|
})
|
|
14487
14494
|
}), /* @__PURE__ */ l("aside", {
|
|
14488
14495
|
className: "rounded-lg border border-borderTertiary bg-secondary p-4 shadow-sm",
|
|
14489
|
-
children: /* @__PURE__ */ l(
|
|
14496
|
+
children: /* @__PURE__ */ l(wu, {
|
|
14490
14497
|
title: "Decor localizations",
|
|
14491
14498
|
markets: C.markets,
|
|
14492
14499
|
selectedLocalizationId: C.activeLocalization.id,
|
|
@@ -14524,7 +14531,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14524
14531
|
}) : null
|
|
14525
14532
|
]
|
|
14526
14533
|
});
|
|
14527
|
-
},
|
|
14534
|
+
}, hf = ({ pageTitle: e, welcomeTitle: t, welcomeMessage: n, aboutTitle: r, aboutDescription: i, sideNavProps: a }) => /* @__PURE__ */ l("div", {
|
|
14528
14535
|
className: "min-h-screen bg-secondary",
|
|
14529
14536
|
children: /* @__PURE__ */ u("div", {
|
|
14530
14537
|
className: "flex min-h-screen overflow-hidden bg-secondary",
|
|
@@ -14584,21 +14591,21 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14584
14591
|
})]
|
|
14585
14592
|
})]
|
|
14586
14593
|
})
|
|
14587
|
-
}),
|
|
14594
|
+
}), gf = (e) => e === "admin" ? "Admin" : "User", _f = ({ message: e, tone: t = "default" }) => /* @__PURE__ */ l("section", {
|
|
14588
14595
|
className: "rounded-lg border border-borderTertiary bg-secondary p-5",
|
|
14589
14596
|
children: /* @__PURE__ */ l(v, {
|
|
14590
14597
|
variant: "free",
|
|
14591
14598
|
className: `text-sm ${t === "error" ? "text-accent" : "text-primary"}`,
|
|
14592
14599
|
children: e
|
|
14593
14600
|
})
|
|
14594
|
-
}),
|
|
14601
|
+
}), vf = ({ message: e }) => {
|
|
14595
14602
|
let t = e?.trim() ?? "";
|
|
14596
14603
|
return t ? /* @__PURE__ */ l(v, {
|
|
14597
14604
|
variant: "free",
|
|
14598
14605
|
className: "text-sm text-accent",
|
|
14599
14606
|
children: t
|
|
14600
14607
|
}) : null;
|
|
14601
|
-
},
|
|
14608
|
+
}, yf = ({ pageTitle: e, pageDescription: t, sideNavProps: n, hasAdminAccess: r, accessRequiredTitle: i = "Admin Access Required", accessRequiredMessage: a = "Your account can use Data Forge, but only admins can manage the allow list.", state: o, loadingMessage: s = "Loading authorization users...", errorMessage: c = "Data Forge could not load the allow list.", createUserDraft: d, roleOptions: f, regionOptions: p, users: m, defaultRegionLabel: h = "Default Region", defaultRegionPlaceholder: g = "Select region", createMessage: _, updateMessage: y, deleteMessage: b, createPending: x = !1, updatePending: S = !1, deletePending: C = !1, deleteUserEmail: w, addUserLabel: T = "Add User", addingUserLabel: E = "Adding...", updateLabel: D = "Update", updatingLabel: O = "Updating...", activateLabel: k = "Activate", suspendLabel: A = "Suspend", removeLabel: j = "Remove", removingLabel: M = "Removing...", cancelLabel: N = "Cancel", onNewUserEmailChange: F, onNewUserRoleChange: I, onNewUserActiveChange: L, onNewUserDefaultRegionChange: R, onCreateUser: z, onRowUpdate: B, onUserActiveToggle: V, onDeleteUserRequest: ee, onDeleteModalClose: te, onDeleteUserConfirm: ne }) => {
|
|
14602
14609
|
let re = t?.trim() ?? "", ie = d.active && !d.defaultRegion.trim(), ae = m.map((e) => ({
|
|
14603
14610
|
id: e.email,
|
|
14604
14611
|
values: {
|
|
@@ -14619,7 +14626,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14619
14626
|
variant: "free",
|
|
14620
14627
|
className: "mt-1 text-xs text-tertiary",
|
|
14621
14628
|
children: [
|
|
14622
|
-
|
|
14629
|
+
gf(e.role),
|
|
14623
14630
|
" - ",
|
|
14624
14631
|
e.active ? "Active" : "Inactive",
|
|
14625
14632
|
e.isCurrentUser ? " - Current user" : ""
|
|
@@ -14766,13 +14773,13 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14766
14773
|
})
|
|
14767
14774
|
]
|
|
14768
14775
|
}),
|
|
14769
|
-
/* @__PURE__ */ l(
|
|
14770
|
-
o === "loading" ? /* @__PURE__ */ l(
|
|
14771
|
-
o === "error" ? /* @__PURE__ */ l(
|
|
14776
|
+
/* @__PURE__ */ l(vf, { message: _ }),
|
|
14777
|
+
o === "loading" ? /* @__PURE__ */ l(_f, { message: s }) : null,
|
|
14778
|
+
o === "error" ? /* @__PURE__ */ l(_f, {
|
|
14772
14779
|
message: c,
|
|
14773
14780
|
tone: "error"
|
|
14774
14781
|
}) : null,
|
|
14775
|
-
/* @__PURE__ */ l(
|
|
14782
|
+
/* @__PURE__ */ l(Mu, {
|
|
14776
14783
|
ariaLabel: "Authorization users",
|
|
14777
14784
|
columns: [
|
|
14778
14785
|
{
|
|
@@ -14825,7 +14832,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14825
14832
|
updateDisabled: S,
|
|
14826
14833
|
onRowUpdate: B
|
|
14827
14834
|
}),
|
|
14828
|
-
/* @__PURE__ */ l(
|
|
14835
|
+
/* @__PURE__ */ l(vf, { message: y }),
|
|
14829
14836
|
/* @__PURE__ */ u("section", {
|
|
14830
14837
|
"aria-label": "Authorization user actions",
|
|
14831
14838
|
className: "grid gap-3 rounded-lg border border-borderTertiary bg-secondary p-4 shadow-sm",
|
|
@@ -14847,7 +14854,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14847
14854
|
className: "grid gap-2",
|
|
14848
14855
|
children: m.map(oe)
|
|
14849
14856
|
}),
|
|
14850
|
-
/* @__PURE__ */ l(
|
|
14857
|
+
/* @__PURE__ */ l(vf, { message: b })
|
|
14851
14858
|
]
|
|
14852
14859
|
})
|
|
14853
14860
|
]
|
|
@@ -14909,7 +14916,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14909
14916
|
})
|
|
14910
14917
|
})]
|
|
14911
14918
|
});
|
|
14912
|
-
},
|
|
14919
|
+
}, bf = {
|
|
14913
14920
|
loading: {
|
|
14914
14921
|
iconName: "spinner",
|
|
14915
14922
|
iconClassName: "text-tertiary",
|
|
@@ -14930,11 +14937,11 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14930
14937
|
iconClassName: "text-accent",
|
|
14931
14938
|
iconSurfaceClassName: "bg-accent/10"
|
|
14932
14939
|
}
|
|
14933
|
-
},
|
|
14940
|
+
}, xf = (e) => {
|
|
14934
14941
|
if (e === "loading") return "status";
|
|
14935
14942
|
if (e === "error") return "alert";
|
|
14936
|
-
},
|
|
14937
|
-
let d = e?.trim() ?? "", f = r?.trim() ?? "", p =
|
|
14943
|
+
}, Sf = ({ eyebrow: e, title: t, description: n, detail: r, tone: i, primaryAction: a, secondaryAction: o, informationGroups: s = [], onActionClick: c }) => {
|
|
14944
|
+
let d = e?.trim() ?? "", f = r?.trim() ?? "", p = bf[i], m = (e, t) => /* @__PURE__ */ l(P, {
|
|
14938
14945
|
label: e.label,
|
|
14939
14946
|
iconAlt: "",
|
|
14940
14947
|
iconName: e.loading ? "spinner" : e.iconName,
|
|
@@ -14948,7 +14955,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
14948
14955
|
return /* @__PURE__ */ l("main", {
|
|
14949
14956
|
className: "flex min-h-screen items-center justify-center bg-tertiaryActive px-4 py-10",
|
|
14950
14957
|
children: /* @__PURE__ */ u("section", {
|
|
14951
|
-
role:
|
|
14958
|
+
role: xf(i),
|
|
14952
14959
|
"aria-live": i === "loading" ? "polite" : void 0,
|
|
14953
14960
|
"aria-busy": i === "loading" || void 0,
|
|
14954
14961
|
className: "w-full max-w-2xl rounded-lg border border-borderTertiary bg-secondary p-6 text-center shadow-sm md:p-10",
|
|
@@ -15015,7 +15022,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15015
15022
|
]
|
|
15016
15023
|
})
|
|
15017
15024
|
});
|
|
15018
|
-
},
|
|
15025
|
+
}, Cf = ({ pageTitle: e, pageDescription: t, sideNavProps: r, regionOptions: i, regionValue: a, regionLabel: s = "Region", regionPlaceholder: d = "Select region", regionHelpText: f = "Searches and changes will use product data from this region.", regionDisabled: p = !1, searchValue: m, searchLabel: h = "Search decors", searchPlaceholder: g, searchDisabled: _ = !1, browseMode: y = "decors", manageRangesLabel: b = "Manage ranges", rangeOptions: x, rangeResults: S = [], rangeResultCount: C = 0, selectedRangeId: T, rangePromptTitle: E = "Select a range to view its decors", rangePromptMessage: D = "Choose a range above to load its market-readiness records.", emptyRangeTitle: O = "No decors found", emptyRangeMessage: k = "Click the button to add the first decor to this range.", resultCount: A, resultLabel: j = "decors", addDecorLabel: M = "Add a new decor", addFirstDecorLabel: N = "Add the first decor", addRangeLabel: F = "New Range", groups: I, status: L = { state: "ready" }, hasMore: R = !1, loadingMore: z = !1, loadMoreLabel: B, deleteDecorTarget: V, deleteDecorConfirmationValue: ee = "", deleteDecorPending: te = !1, deleteDecorErrorMessage: ne, deleteDecorTitle: re = "Delete decor?", deleteDecorLabel: ie = "Delete decor", deletingDecorLabel: ae = "Deleting...", deleteDecorCancelLabel: H = "Cancel", deleteDecorCloseLabel: oe = "Close delete decor dialog", deleteRangeTarget: U, deleteRangeConfirmationValue: se = "", deleteRangePending: W = !1, deleteRangeErrorMessage: ce, deleteRangeTitle: le = "Delete range?", deleteRangeLabel: ue = "Delete range", deletingRangeLabel: de = "Deleting...", deleteRangeCancelLabel: fe = "Cancel", deleteRangeCloseLabel: pe = "Close delete range dialog", onRegionChange: me, onSearchChange: G, onSearchSubmit: he, onRangeSelect: ge, onManageRangesClick: K, onAddDecorClick: _e, onAddRangeClick: ve, onRangeClick: ye, onDeleteRangeRequest: be, onDeleteRangeConfirmationChange: xe, onDeleteRangeCancel: Se, onDeleteRangeConfirm: Ce, onDecorClick: we, onDeleteDecorRequest: Te, onDeleteDecorConfirmationChange: Ee, onDeleteDecorCancel: De, onDeleteDecorConfirm: Oe, onLoadMore: ke, onRetryClick: Ae }) => {
|
|
15019
15026
|
let je = o(null), Me = o({
|
|
15020
15027
|
options: x,
|
|
15021
15028
|
selectedRangeId: T
|
|
@@ -15054,7 +15061,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15054
15061
|
disabled: !ke,
|
|
15055
15062
|
onClick: ke
|
|
15056
15063
|
})), /* @__PURE__ */ u(c, { children: [
|
|
15057
|
-
/* @__PURE__ */ l(
|
|
15064
|
+
/* @__PURE__ */ l(lf, {
|
|
15058
15065
|
pageTitle: e,
|
|
15059
15066
|
pageDescription: t,
|
|
15060
15067
|
sideNavProps: r,
|
|
@@ -15145,11 +15152,11 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15145
15152
|
})]
|
|
15146
15153
|
})
|
|
15147
15154
|
}) : null,
|
|
15148
|
-
L.state !== "ready" && L.state !== "loading" ? /* @__PURE__ */ l(
|
|
15155
|
+
L.state !== "ready" && L.state !== "loading" ? /* @__PURE__ */ l(ff, {
|
|
15149
15156
|
status: L,
|
|
15150
15157
|
onRetryClick: Ae
|
|
15151
15158
|
}) : null,
|
|
15152
|
-
L.state === "ready" && !J && !He && !Ue ? /* @__PURE__ */ l(
|
|
15159
|
+
L.state === "ready" && !J && !He && !Ue ? /* @__PURE__ */ l(ff, { status: {
|
|
15153
15160
|
state: "empty",
|
|
15154
15161
|
title: E,
|
|
15155
15162
|
message: D
|
|
@@ -15168,7 +15175,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15168
15175
|
})]
|
|
15169
15176
|
}), /* @__PURE__ */ l("div", {
|
|
15170
15177
|
className: "mt-5",
|
|
15171
|
-
children: /* @__PURE__ */ l(
|
|
15178
|
+
children: /* @__PURE__ */ l(Pu, {
|
|
15172
15179
|
ranges: S,
|
|
15173
15180
|
emptyMessage: "No ranges are available.",
|
|
15174
15181
|
onRangeClick: Fe ? void 0 : ye,
|
|
@@ -15200,7 +15207,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15200
15207
|
onClick: () => _e?.({ rangeId: Pe })
|
|
15201
15208
|
})]
|
|
15202
15209
|
})]
|
|
15203
|
-
}), Je ? /* @__PURE__ */ l(
|
|
15210
|
+
}), Je ? /* @__PURE__ */ l(ff, {
|
|
15204
15211
|
status: {
|
|
15205
15212
|
state: "empty",
|
|
15206
15213
|
title: O,
|
|
@@ -15218,7 +15225,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15218
15225
|
})
|
|
15219
15226
|
}) : /* @__PURE__ */ l("div", {
|
|
15220
15227
|
className: "mt-5",
|
|
15221
|
-
children: /* @__PURE__ */ l(
|
|
15228
|
+
children: /* @__PURE__ */ l(Nu, {
|
|
15222
15229
|
groups: I,
|
|
15223
15230
|
itemLabel: j,
|
|
15224
15231
|
showGroupHeaders: !1,
|
|
@@ -15423,7 +15430,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15423
15430
|
}) : null
|
|
15424
15431
|
})
|
|
15425
15432
|
] });
|
|
15426
|
-
},
|
|
15433
|
+
}, wf = ({ pageTitle: e, pageDescription: t, sideNavProps: n, mode: r, rangeId: i, name: a, bynderName: o, rangeCode: s, productFamilyCode: d = "", company: f, companyCode: p, region: m, subRegion: h = "", companyOptions: g, productFamilyOptions: _ = [], regionOptions: y, subRegionOptions: b, status: x = { state: "ready" }, fieldErrors: C = {}, formDisabled: w = !1, saveDisabled: T = !1, savePending: E = !1, saveErrorMessage: D, deleteDialogOpen: O = !1, deleteConfirmationValue: k = "", deletePending: A = !1, deleteErrorMessage: j, detailsTitle: M = "Range details", detailsDescription: N = "These details determine where the range appears in Market Readiness.", saveLabel: F = r === "create" ? "Create range" : "Save changes", savingLabel: I = "Saving...", cancelLabel: R = "Cancel", deleteTitle: z = "Delete range?", deleteLabel: B = "Delete range", deletingLabel: V = "Deleting...", deleteCancelLabel: ee = "Cancel", deleteCloseLabel: te = "Close delete range dialog", onNameChange: ne, onBynderNameChange: re, onRangeCodeChange: ie, onProductFamilyCodeChange: ae, onCompanyChange: H, onCompanyCodeChange: oe, onRegionChange: U, onSubRegionChange: se, onSaveClick: W, onCancelClick: ce, onDeleteRequest: le, onDeleteConfirmationChange: ue, onDeleteCancel: de, onDeleteConfirm: fe, onRetryClick: pe }) => {
|
|
15427
15434
|
let me = Le(f), G = w || E, he = !!b?.length, ge = m === "europe" || m === "asia", K = m === "europe" ? "Product Family (EU)" : "Product Family (AS)", _e = b ?? [], ve = ge && !h.trim() ? "ALL" : h, ye = a.trim() || "New range", be = g.find((e) => e.value === f)?.label ?? f, xe = y.find((e) => e.value === m)?.label ?? m, Se = _e.find((e) => e.value === ve)?.label ?? ve, Ce = p.trim() ? `${be} (${p})` : be, q = [
|
|
15428
15435
|
s.trim() ? `Range ${s}` : "",
|
|
15429
15436
|
Ce,
|
|
@@ -15433,7 +15440,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15433
15440
|
rangeId: i,
|
|
15434
15441
|
rangeCode: s
|
|
15435
15442
|
} : void 0, Ee = !!(Te && s.trim() && k.trim() === s.trim());
|
|
15436
|
-
return /* @__PURE__ */ u(
|
|
15443
|
+
return /* @__PURE__ */ u(lf, {
|
|
15437
15444
|
pageTitle: e,
|
|
15438
15445
|
pageDescription: t,
|
|
15439
15446
|
sideNavProps: n,
|
|
@@ -15773,7 +15780,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15773
15780
|
]
|
|
15774
15781
|
})
|
|
15775
15782
|
]
|
|
15776
|
-
})] }) : /* @__PURE__ */ l(
|
|
15783
|
+
})] }) : /* @__PURE__ */ l(ff, {
|
|
15777
15784
|
status: x,
|
|
15778
15785
|
onRetryClick: pe
|
|
15779
15786
|
}), /* @__PURE__ */ l(Hc, {
|
|
@@ -15853,7 +15860,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15853
15860
|
}) : null
|
|
15854
15861
|
})]
|
|
15855
15862
|
});
|
|
15856
|
-
},
|
|
15863
|
+
}, Tf = ({ pageTitle: e, pageDescription: t, backLabel: n, sideNavProps: r, report: i, status: a = { state: "ready" }, pagination: o, onBackClick: s, onRetryClick: d, onPreviousPageClick: f, onNextPageClick: p }) => /* @__PURE__ */ l(lf, {
|
|
15857
15864
|
pageTitle: e,
|
|
15858
15865
|
pageDescription: t,
|
|
15859
15866
|
sideNavProps: r,
|
|
@@ -15870,7 +15877,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15870
15877
|
}) : void 0,
|
|
15871
15878
|
children: a.state === "ready" ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", {
|
|
15872
15879
|
className: "mt-5",
|
|
15873
|
-
children: /* @__PURE__ */ l(
|
|
15880
|
+
children: /* @__PURE__ */ l(Mu, { ...i })
|
|
15874
15881
|
}), o ? /* @__PURE__ */ u("nav", {
|
|
15875
15882
|
"aria-label": "Report pagination",
|
|
15876
15883
|
className: "mt-5 flex justify-end gap-3",
|
|
@@ -15894,11 +15901,11 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15894
15901
|
disabled: o.nextDisabled,
|
|
15895
15902
|
onClick: p
|
|
15896
15903
|
})]
|
|
15897
|
-
}) : null] }) : /* @__PURE__ */ l(
|
|
15904
|
+
}) : null] }) : /* @__PURE__ */ l(ff, {
|
|
15898
15905
|
status: a,
|
|
15899
15906
|
onRetryClick: d
|
|
15900
15907
|
})
|
|
15901
|
-
}),
|
|
15908
|
+
}), Ef = (e) => new Intl.NumberFormat("en-US").format(e), Df = ({ title: e, description: t, iconName: n, children: r }) => /* @__PURE__ */ u("article", {
|
|
15902
15909
|
className: "flex w-full flex-col rounded-lg border border-borderTertiary bg-secondary p-5 shadow-sm md:flex-row md:items-start md:gap-6",
|
|
15903
15910
|
children: [/* @__PURE__ */ u("div", {
|
|
15904
15911
|
className: "flex items-start gap-3",
|
|
@@ -15927,7 +15934,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15927
15934
|
className: "mt-5 flex flex-1 flex-col md:mt-0",
|
|
15928
15935
|
children: r
|
|
15929
15936
|
})]
|
|
15930
|
-
}),
|
|
15937
|
+
}), Of = ({ status: e, message: t }) => {
|
|
15931
15938
|
let n = t?.trim() ?? "";
|
|
15932
15939
|
if (!n || e === "idle") return null;
|
|
15933
15940
|
let r = "text-primary";
|
|
@@ -15937,7 +15944,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15937
15944
|
className: `mt-3 text-sm ${r}`,
|
|
15938
15945
|
children: n
|
|
15939
15946
|
});
|
|
15940
|
-
},
|
|
15947
|
+
}, kf = ({ dataSource: e }) => /* @__PURE__ */ u("dl", {
|
|
15941
15948
|
className: "grid gap-3 rounded-md border border-borderTertiary bg-adminSideNavBackground p-3",
|
|
15942
15949
|
children: [
|
|
15943
15950
|
/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("dt", {
|
|
@@ -15960,7 +15967,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15960
15967
|
children: "Records"
|
|
15961
15968
|
}), /* @__PURE__ */ l("dd", {
|
|
15962
15969
|
className: "mt-1 text-sm text-primary",
|
|
15963
|
-
children:
|
|
15970
|
+
children: Ef(e.recordCount)
|
|
15964
15971
|
})] })]
|
|
15965
15972
|
}),
|
|
15966
15973
|
/* @__PURE__ */ u("div", {
|
|
@@ -15987,9 +15994,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15987
15994
|
children: e.latestReport.label
|
|
15988
15995
|
})] }) : null
|
|
15989
15996
|
]
|
|
15990
|
-
}),
|
|
15997
|
+
}), Af = ({ pageTitle: e, pageDescription: t, sideNavProps: n, status: r = { state: "ready" }, dataSource: i, existingDataTitle: a = "Continue with saved data", existingDataEmptyTitle: s = "No saved data set yet", existingDataEmptyDescription: d = "Start by uploading a Salsify report or downloading the latest data directly from Salsify.", useExistingDataLabel: f = "Use Saved Data", uploadTitle: p = "Upload a Salsify report", uploadDescription: m = "Use a report exported from Salsify when you already have the file ready.", uploadDropLabel: h = "Drag a report file here", uploadBrowseLabel: g = "Select File", uploadHelpText: _ = "JSON exports from Salsify are supported.", selectedFile: y, uploadStatus: b = "idle", uploadStatusMessage: x, uploadLabel: C = "Upload Report", uploadDisabled: w = !1, clearFileLabel: T = "Clear File", directDownloadTitle: E = "Download from Salsify", directDownloadDescription: D = "Choose a product range and Data Forge will request the latest records for you.", rangeLabel: O = "Product Range", rangePlaceholder: k = "Select a range", rangeOptions: A, selectedRangeValue: j = "", directDownloadLabel: M = "Download Latest Data", downloadStatus: N = "idle", downloadStatusMessage: F, downloadDisabled: I = !1, onUseExistingDataClick: L, onReportFileSelect: R, onUploadClick: z, onClearSelectedFileClick: B, onRangeChange: V, onDirectDownloadClick: ee, onRetryClick: te }) => {
|
|
15991
15998
|
let ne = o(null), re = b === "pending", ie = N === "pending", ae = (e) => R?.({ files: Array.from(e ?? []) });
|
|
15992
|
-
return /* @__PURE__ */ l(
|
|
15999
|
+
return /* @__PURE__ */ l(lf, {
|
|
15993
16000
|
pageTitle: e,
|
|
15994
16001
|
pageDescription: t,
|
|
15995
16002
|
sideNavProps: n,
|
|
@@ -15997,11 +16004,11 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
15997
16004
|
"aria-label": "Choose data source",
|
|
15998
16005
|
className: "mt-6 flex flex-col gap-4",
|
|
15999
16006
|
children: [
|
|
16000
|
-
/* @__PURE__ */ l(
|
|
16007
|
+
/* @__PURE__ */ l(Df, {
|
|
16001
16008
|
title: i ? a : s,
|
|
16002
16009
|
description: i ? "Review the saved data set and continue if it is the right source for this review." : d,
|
|
16003
16010
|
iconName: i ? "database" : "circle-info",
|
|
16004
|
-
children: i ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(
|
|
16011
|
+
children: i ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(kf, { dataSource: i }), /* @__PURE__ */ l("div", {
|
|
16005
16012
|
className: "mt-auto pt-5",
|
|
16006
16013
|
children: /* @__PURE__ */ l(P, {
|
|
16007
16014
|
label: f,
|
|
@@ -16023,7 +16030,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16023
16030
|
})
|
|
16024
16031
|
})
|
|
16025
16032
|
}),
|
|
16026
|
-
/* @__PURE__ */ u(
|
|
16033
|
+
/* @__PURE__ */ u(Df, {
|
|
16027
16034
|
title: p,
|
|
16028
16035
|
description: m,
|
|
16029
16036
|
iconName: "file-arrow-up",
|
|
@@ -16126,13 +16133,13 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16126
16133
|
})]
|
|
16127
16134
|
})]
|
|
16128
16135
|
}) : null,
|
|
16129
|
-
/* @__PURE__ */ l(
|
|
16136
|
+
/* @__PURE__ */ l(Of, {
|
|
16130
16137
|
status: b,
|
|
16131
16138
|
message: x
|
|
16132
16139
|
})
|
|
16133
16140
|
]
|
|
16134
16141
|
}),
|
|
16135
|
-
/* @__PURE__ */ u(
|
|
16142
|
+
/* @__PURE__ */ u(Df, {
|
|
16136
16143
|
title: E,
|
|
16137
16144
|
description: D,
|
|
16138
16145
|
iconName: "cloud-arrow-down",
|
|
@@ -16168,19 +16175,19 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16168
16175
|
onClick: ee
|
|
16169
16176
|
})
|
|
16170
16177
|
}),
|
|
16171
|
-
/* @__PURE__ */ l(
|
|
16178
|
+
/* @__PURE__ */ l(Of, {
|
|
16172
16179
|
status: N,
|
|
16173
16180
|
message: F
|
|
16174
16181
|
})
|
|
16175
16182
|
]
|
|
16176
16183
|
})
|
|
16177
16184
|
]
|
|
16178
|
-
}) : /* @__PURE__ */ l(
|
|
16185
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
16179
16186
|
status: r,
|
|
16180
16187
|
onRetryClick: te
|
|
16181
16188
|
})
|
|
16182
16189
|
});
|
|
16183
|
-
},
|
|
16190
|
+
}, jf = (e, t, n) => `${e.toLocaleString()} ${e === 1 ? t : n}`, Mf = ({ status: e, message: t }) => {
|
|
16184
16191
|
let n = t?.trim() ?? "";
|
|
16185
16192
|
return !n || e === "idle" ? null : /* @__PURE__ */ l(v, {
|
|
16186
16193
|
role: e === "error" ? "alert" : "status",
|
|
@@ -16188,7 +16195,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16188
16195
|
className: `mt-3 text-sm ${e === "error" ? "text-accent" : "text-primary"}`,
|
|
16189
16196
|
children: n
|
|
16190
16197
|
});
|
|
16191
|
-
},
|
|
16198
|
+
}, Nf = ({ label: e, options: t, value: n, disabled: r = !1, onSelect: i }) => /* @__PURE__ */ u("fieldset", { children: [/* @__PURE__ */ u("legend", {
|
|
16192
16199
|
className: "text-sm font-bold text-primary",
|
|
16193
16200
|
children: [e, n ? null : /* @__PURE__ */ u("span", {
|
|
16194
16201
|
className: "ml-3 text-xs font-normal text-accent",
|
|
@@ -16217,9 +16224,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16217
16224
|
onClick: () => i(e.value)
|
|
16218
16225
|
}, e.value);
|
|
16219
16226
|
})
|
|
16220
|
-
})] }),
|
|
16227
|
+
})] }), Pf = ({ pageTitle: e, pageDescription: t, sideNavProps: n, status: i = { state: "ready" }, existingImportSet: a, regionOptions: s, selectedRegion: c, localityOptions: d, selectedLocality: f, localityDisabled: p = !1, intentOptions: m, selectedIntent: h, selectedFile: g, uploadStatus: _ = "idle", uploadStatusMessage: y, uploadDisabled: b = !1, continueExistingLabel: x = "Continue Import Set", uploadLabel: C = "Upload and Continue", clearFileLabel: w = "Clear File", onContinueExistingClick: T, onRegionChange: E, onLocalityChange: D, onIntentChange: O, onFileSelect: k, onClearSelectedFileClick: A, onUploadClick: j, onRetryClick: M }) => {
|
|
16221
16228
|
let N = o(null), F = r(), I = _ === "pending", L = I || !c.trim() || !f.trim() || !h, R = (e) => k?.({ files: Array.from(e ?? []).slice(0, 1) });
|
|
16222
|
-
return /* @__PURE__ */ l(
|
|
16229
|
+
return /* @__PURE__ */ l(lf, {
|
|
16223
16230
|
pageTitle: e,
|
|
16224
16231
|
pageDescription: t,
|
|
16225
16232
|
sideNavProps: n,
|
|
@@ -16265,9 +16272,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16265
16272
|
variant: "free",
|
|
16266
16273
|
className: "mt-1 text-sm text-tertiary",
|
|
16267
16274
|
children: [
|
|
16268
|
-
a.rangeCount === void 0 ? null :
|
|
16269
|
-
a.decorCount === void 0 ? null :
|
|
16270
|
-
a.skuCount === void 0 ? null :
|
|
16275
|
+
a.rangeCount === void 0 ? null : jf(a.rangeCount, "range", "ranges"),
|
|
16276
|
+
a.decorCount === void 0 ? null : jf(a.decorCount, "decor", "decors"),
|
|
16277
|
+
a.skuCount === void 0 ? null : jf(a.skuCount, "SKU", "SKUs")
|
|
16271
16278
|
].filter(Boolean).join(" · ")
|
|
16272
16279
|
})
|
|
16273
16280
|
] }), /* @__PURE__ */ l(v, {
|
|
@@ -16318,14 +16325,14 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16318
16325
|
onChange: E
|
|
16319
16326
|
})
|
|
16320
16327
|
})] }),
|
|
16321
|
-
/* @__PURE__ */ l(
|
|
16328
|
+
/* @__PURE__ */ l(Nf, {
|
|
16322
16329
|
label: "Locality",
|
|
16323
16330
|
options: d,
|
|
16324
16331
|
value: f,
|
|
16325
16332
|
disabled: p,
|
|
16326
16333
|
onSelect: (e) => D({ locality: e })
|
|
16327
16334
|
}),
|
|
16328
|
-
/* @__PURE__ */ l(
|
|
16335
|
+
/* @__PURE__ */ l(Nf, {
|
|
16329
16336
|
label: "Import Intent",
|
|
16330
16337
|
options: m,
|
|
16331
16338
|
value: h,
|
|
@@ -16426,7 +16433,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16426
16433
|
})]
|
|
16427
16434
|
})]
|
|
16428
16435
|
}) : null,
|
|
16429
|
-
/* @__PURE__ */ l(
|
|
16436
|
+
/* @__PURE__ */ l(Mf, {
|
|
16430
16437
|
status: _,
|
|
16431
16438
|
message: y
|
|
16432
16439
|
})
|
|
@@ -16434,12 +16441,12 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16434
16441
|
]
|
|
16435
16442
|
})]
|
|
16436
16443
|
})]
|
|
16437
|
-
}) : /* @__PURE__ */ l(
|
|
16444
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
16438
16445
|
status: i,
|
|
16439
16446
|
onRetryClick: M
|
|
16440
16447
|
})
|
|
16441
16448
|
});
|
|
16442
|
-
},
|
|
16449
|
+
}, Ff = {
|
|
16443
16450
|
error: {
|
|
16444
16451
|
iconName: "circle-exclamation",
|
|
16445
16452
|
label: "Error",
|
|
@@ -16455,7 +16462,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16455
16462
|
label: "Information",
|
|
16456
16463
|
className: "text-primary"
|
|
16457
16464
|
}
|
|
16458
|
-
},
|
|
16465
|
+
}, If = ({ pageTitle: e, pageDescription: t, sideNavProps: n, status: r = { state: "ready" }, fileName: i, scopeLabel: a, summary: o, groups: s, backLabel: c = "Back to Upload", continueLabel: d = "Continue to Review", continueDisabled: f = !1, onBackClick: p, onContinueClick: m, onRetryClick: h }) => /* @__PURE__ */ l(lf, {
|
|
16459
16466
|
pageTitle: e,
|
|
16460
16467
|
pageDescription: t,
|
|
16461
16468
|
sideNavProps: n,
|
|
@@ -16553,7 +16560,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16553
16560
|
}), /* @__PURE__ */ l("ul", {
|
|
16554
16561
|
className: "mt-4 divide-y divide-borderTertiary rounded-md border border-borderTertiary",
|
|
16555
16562
|
children: e.issues.map((e) => {
|
|
16556
|
-
let t =
|
|
16563
|
+
let t = Ff[e.severity];
|
|
16557
16564
|
return /* @__PURE__ */ u("li", {
|
|
16558
16565
|
className: "flex items-start gap-3 p-4",
|
|
16559
16566
|
children: [/* @__PURE__ */ l(S, {
|
|
@@ -16610,16 +16617,16 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16610
16617
|
})]
|
|
16611
16618
|
})
|
|
16612
16619
|
]
|
|
16613
|
-
}) : /* @__PURE__ */ l(
|
|
16620
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
16614
16621
|
status: r,
|
|
16615
16622
|
onRetryClick: h
|
|
16616
16623
|
})
|
|
16617
|
-
}),
|
|
16624
|
+
}), Lf = {
|
|
16618
16625
|
added: "Added",
|
|
16619
16626
|
updated: "Updated",
|
|
16620
16627
|
unchanged: "Unchanged"
|
|
16621
|
-
},
|
|
16622
|
-
let t =
|
|
16628
|
+
}, Rf = ({ changeType: e }) => {
|
|
16629
|
+
let t = Lf[e];
|
|
16623
16630
|
return /* @__PURE__ */ l("span", {
|
|
16624
16631
|
"aria-label": t,
|
|
16625
16632
|
title: t,
|
|
@@ -16631,7 +16638,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16631
16638
|
size: "xs"
|
|
16632
16639
|
})
|
|
16633
16640
|
});
|
|
16634
|
-
},
|
|
16641
|
+
}, zf = ({ row: e }) => {
|
|
16635
16642
|
let t = e.currentValue?.trim() || "—", n = e.afterValue?.trim() || "—";
|
|
16636
16643
|
return /* @__PURE__ */ u("div", {
|
|
16637
16644
|
className: "grid border-t border-borderTertiary md:grid-cols-2",
|
|
@@ -16675,7 +16682,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16675
16682
|
]
|
|
16676
16683
|
})]
|
|
16677
16684
|
});
|
|
16678
|
-
},
|
|
16685
|
+
}, Bf = ({ pageTitle: e, pageDescription: t, sideNavProps: n, status: r = { state: "ready" }, fileName: i, scopeLabel: a, ranges: o, cancelLabel: s = "Cancel Import", continueLabel: d = "Apply Import", continueDisabled: f = !1, cancelConfirmation: p, onCancelClick: m, onCancelConfirm: h, onCancelClose: g, onContinueClick: _, onRetryClick: y }) => /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(lf, {
|
|
16679
16686
|
pageTitle: e,
|
|
16680
16687
|
pageDescription: t,
|
|
16681
16688
|
sideNavProps: n,
|
|
@@ -16726,7 +16733,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16726
16733
|
variant: "free",
|
|
16727
16734
|
className: "mt-1 text-lg font-bold text-primary",
|
|
16728
16735
|
children: [e.name, e.code ? ` · ${e.code}` : ""]
|
|
16729
|
-
})] }), /* @__PURE__ */ l(
|
|
16736
|
+
})] }), /* @__PURE__ */ l(Rf, { changeType: e.changeType })]
|
|
16730
16737
|
}), /* @__PURE__ */ l("div", {
|
|
16731
16738
|
className: "grid gap-5 p-5",
|
|
16732
16739
|
children: e.decors.map((e) => /* @__PURE__ */ u("section", {
|
|
@@ -16744,7 +16751,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16744
16751
|
variant: "free",
|
|
16745
16752
|
className: "mt-1 text-base font-bold text-primary",
|
|
16746
16753
|
children: [e.code, e.name ? ` · ${e.name}` : ""]
|
|
16747
|
-
})] }), /* @__PURE__ */ l(
|
|
16754
|
+
})] }), /* @__PURE__ */ l(Rf, { changeType: e.changeType })]
|
|
16748
16755
|
}), /* @__PURE__ */ l("div", {
|
|
16749
16756
|
className: "grid gap-5 p-4",
|
|
16750
16757
|
children: e.sections.map((e) => /* @__PURE__ */ u("section", {
|
|
@@ -16768,7 +16775,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16768
16775
|
className: "border-l border-borderTertiary px-4 py-3 text-xs font-bold uppercase text-tertiary",
|
|
16769
16776
|
children: "After"
|
|
16770
16777
|
})]
|
|
16771
|
-
}), e.rows.map((e) => /* @__PURE__ */ l(
|
|
16778
|
+
}), e.rows.map((e) => /* @__PURE__ */ l(zf, { row: e }, e.id))]
|
|
16772
16779
|
})]
|
|
16773
16780
|
}, e.id))
|
|
16774
16781
|
})]
|
|
@@ -16793,7 +16800,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16793
16800
|
})]
|
|
16794
16801
|
})
|
|
16795
16802
|
]
|
|
16796
|
-
}) : /* @__PURE__ */ l(
|
|
16803
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
16797
16804
|
status: r,
|
|
16798
16805
|
onRetryClick: y
|
|
16799
16806
|
})
|
|
@@ -16825,15 +16832,15 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
16825
16832
|
})]
|
|
16826
16833
|
})]
|
|
16827
16834
|
}) : null
|
|
16828
|
-
})] }),
|
|
16835
|
+
})] }), Vf = (e) => e === "error" ? "text-accent" : e === "success" ? "text-saleGreen" : "text-primary", Hf = ({ status: e, message: t }) => {
|
|
16829
16836
|
let n = t?.trim() ?? "";
|
|
16830
16837
|
return !n || e === "idle" ? null : /* @__PURE__ */ l(v, {
|
|
16831
16838
|
role: e === "error" ? "alert" : "status",
|
|
16832
16839
|
variant: "free",
|
|
16833
|
-
className: `mt-3 text-sm ${
|
|
16840
|
+
className: `mt-3 text-sm ${Vf(e)}`,
|
|
16834
16841
|
children: n
|
|
16835
16842
|
});
|
|
16836
|
-
},
|
|
16843
|
+
}, Uf = ({ guide: e, uploadDropLabel: t, uploadBrowseLabel: n, uploadLabel: i, clearFileLabel: a, completeLabel: s, onGuideFileSelect: d, onUploadClick: f, onClearSelectedFileClick: p }) => {
|
|
16837
16844
|
let m = o(null), h = r(), g = e.actionStatus ?? "idle", _ = g === "validating" || g === "pending", y = (e.availability ?? "available") === "available", b = e.uploadDropLabel ?? t, x = e.uploadBrowseLabel ?? n, C = e.uploadLabel ?? i, w = e.completeLabel ?? s, T = (t) => d?.({
|
|
16838
16845
|
guideId: e.id,
|
|
16839
16846
|
files: Array.from(t ?? [])
|
|
@@ -17006,7 +17013,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17006
17013
|
}, `${e.path}-${e.message}-${t}`))
|
|
17007
17014
|
})]
|
|
17008
17015
|
}) : null,
|
|
17009
|
-
g === "success" ? null : /* @__PURE__ */ l(
|
|
17016
|
+
g === "success" ? null : /* @__PURE__ */ l(Hf, {
|
|
17010
17017
|
status: g,
|
|
17011
17018
|
message: e.actionStatusMessage
|
|
17012
17019
|
})
|
|
@@ -17027,7 +17034,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17027
17034
|
})
|
|
17028
17035
|
})]
|
|
17029
17036
|
});
|
|
17030
|
-
},
|
|
17037
|
+
}, Wf = ({ pageTitle: e, pageDescription: t, sideNavProps: n, status: r = { state: "ready" }, guides: i, emptyTitle: a = "No product guides configured", emptyDescription: o = "Add a product-guide configuration before uploading data.", uploadDropLabel: s = "Drag a product guide PDF file here", uploadBrowseLabel: c = "Select PDF File", uploadLabel: d = "Replace Active Guide", clearFileLabel: f = "Clear File", completeLabel: p = "Complete", onGuideFileSelect: m, onUploadClick: h, onClearSelectedFileClick: g, onRetryClick: _ }) => {
|
|
17031
17038
|
let y;
|
|
17032
17039
|
return y = r.state === "ready" ? i.length === 0 ? /* @__PURE__ */ u("section", {
|
|
17033
17040
|
className: "mt-6 rounded-lg border border-borderTertiary bg-secondary p-6 text-center shadow-sm",
|
|
@@ -17054,7 +17061,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17054
17061
|
}) : /* @__PURE__ */ l("section", {
|
|
17055
17062
|
"aria-label": "Product guides",
|
|
17056
17063
|
className: "mt-6 grid gap-4",
|
|
17057
|
-
children: i.map((e) => /* @__PURE__ */ l(
|
|
17064
|
+
children: i.map((e) => /* @__PURE__ */ l(Uf, {
|
|
17058
17065
|
guide: e,
|
|
17059
17066
|
uploadDropLabel: s,
|
|
17060
17067
|
uploadBrowseLabel: c,
|
|
@@ -17065,16 +17072,16 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17065
17072
|
onUploadClick: h,
|
|
17066
17073
|
onClearSelectedFileClick: g
|
|
17067
17074
|
}, e.id))
|
|
17068
|
-
}) : /* @__PURE__ */ l(
|
|
17075
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
17069
17076
|
status: r,
|
|
17070
17077
|
onRetryClick: _
|
|
17071
|
-
}), /* @__PURE__ */ l(
|
|
17078
|
+
}), /* @__PURE__ */ l(lf, {
|
|
17072
17079
|
pageTitle: e,
|
|
17073
17080
|
pageDescription: t,
|
|
17074
17081
|
sideNavProps: n,
|
|
17075
17082
|
children: y
|
|
17076
17083
|
});
|
|
17077
|
-
},
|
|
17084
|
+
}, Gf = ({ scopeDescription: e, importDescription: t, acceptedExtensions: n, maxFileSizeBytes: i, fileName: a, state: c, message: d, errors: f = [], disabled: p = !1, onFileSelect: m, onFileRemove: h, onImportClick: g, onTemplateDownloadClick: _, mode: y, targetLabel: b, onModeChange: x, modeLabels: C }) => {
|
|
17078
17085
|
let w = r(), T = o(null), [E, D] = s(!1), [O, k] = s(""), A = c === "processing" || c === "importing", j = p || A, M = {
|
|
17079
17086
|
add: {
|
|
17080
17087
|
label: "Add or update current data",
|
|
@@ -17220,7 +17227,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17220
17227
|
}),
|
|
17221
17228
|
/* @__PURE__ */ l("div", {
|
|
17222
17229
|
className: "mt-5",
|
|
17223
|
-
children: /* @__PURE__ */ l(
|
|
17230
|
+
children: /* @__PURE__ */ l(Jd, {
|
|
17224
17231
|
title: "How should this upload change the data?",
|
|
17225
17232
|
name: `${w}-mode`,
|
|
17226
17233
|
selectedValue: y,
|
|
@@ -17281,9 +17288,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17281
17288
|
})
|
|
17282
17289
|
]
|
|
17283
17290
|
});
|
|
17284
|
-
},
|
|
17291
|
+
}, Kf = ({ sideNavProps: e, regionSelectorProps: t, localities: n, status: r = { state: "ready" }, onLocalitySelect: i, onRetryClick: a, importProps: o }) => {
|
|
17285
17292
|
let s = n.filter((e) => e.region === t.value);
|
|
17286
|
-
return /* @__PURE__ */ u(
|
|
17293
|
+
return /* @__PURE__ */ u(lf, {
|
|
17287
17294
|
pageTitle: "Where to Buy",
|
|
17288
17295
|
pageDescription: "Manage the vendors customers see in each sub-region and language.",
|
|
17289
17296
|
sideNavProps: e,
|
|
@@ -17342,21 +17349,21 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17342
17349
|
})
|
|
17343
17350
|
]
|
|
17344
17351
|
}, e.id))
|
|
17345
|
-
}) : /* @__PURE__ */ l(
|
|
17352
|
+
}) : /* @__PURE__ */ l(ff, { status: {
|
|
17346
17353
|
state: "empty",
|
|
17347
17354
|
title: t.value ? "No localities in this region" : "Select a region",
|
|
17348
17355
|
message: "Choose a region above to browse its localities."
|
|
17349
17356
|
} })
|
|
17350
17357
|
]
|
|
17351
|
-
}) : /* @__PURE__ */ l(
|
|
17358
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
17352
17359
|
status: r,
|
|
17353
17360
|
onRetryClick: a
|
|
17354
17361
|
}), r.state === "ready" && o && /* @__PURE__ */ l("div", {
|
|
17355
17362
|
className: "mt-8 max-w-6xl",
|
|
17356
|
-
children: /* @__PURE__ */ l(
|
|
17363
|
+
children: /* @__PURE__ */ l(Gf, { ...o }, t.value)
|
|
17357
17364
|
})]
|
|
17358
17365
|
});
|
|
17359
|
-
},
|
|
17366
|
+
}, qf = (e, t = {}) => [
|
|
17360
17367
|
{
|
|
17361
17368
|
id: "name",
|
|
17362
17369
|
label: "Vendor name",
|
|
@@ -17445,14 +17452,14 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17445
17452
|
...e,
|
|
17446
17453
|
state: t[e.id] ? "error" : "neutral",
|
|
17447
17454
|
message: t[e.id]
|
|
17448
|
-
})),
|
|
17455
|
+
})), Jf = (e) => {
|
|
17449
17456
|
let { locality: t, vendors: n, editor: r, selectedVendorId: i, isCreating: a = !1, saveState: o, lookup: s, status: c = { state: "ready" } } = e, d = r ?? (i ? n.find((e) => e.id === i) : n[0]), f = o === "saving" || e.deletePending || s.state === "resolving", p = o === "unsaved" || o === "error" || a, m = !!(f || p), h = "No matching addresses.";
|
|
17450
17457
|
s.state === "loading" ? h = "Finding addresses..." : s.state === "error" && (h = "Address suggestions are unavailable. Try again.");
|
|
17451
17458
|
let g = {
|
|
17452
17459
|
localityId: t.id,
|
|
17453
17460
|
vendorId: d?.id ?? ""
|
|
17454
17461
|
}, _ = n.filter((t) => `${t.name} ${t.city}`.toLowerCase().includes(e.searchValue.trim().toLowerCase())), y = d && d.latitude !== null && d.longitude !== null && Number.isFinite(d.latitude) && Number.isFinite(d.longitude) && Math.abs(d.latitude) <= 90 && Math.abs(d.longitude) <= 180;
|
|
17455
|
-
return /* @__PURE__ */ u(
|
|
17462
|
+
return /* @__PURE__ */ u(lf, {
|
|
17456
17463
|
pageTitle: "Where to Buy",
|
|
17457
17464
|
pageDescription: `${t.subRegion} · ${t.language} · ${t.locale}`,
|
|
17458
17465
|
sideNavProps: e.sideNavProps,
|
|
@@ -17532,7 +17539,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17532
17539
|
}) : null,
|
|
17533
17540
|
y ? /* @__PURE__ */ l("div", {
|
|
17534
17541
|
className: "mt-4",
|
|
17535
|
-
children: /* @__PURE__ */ l(
|
|
17542
|
+
children: /* @__PURE__ */ l(Vu, {
|
|
17536
17543
|
googleMapsApiKey: e.googleMapsApiKey,
|
|
17537
17544
|
selectedLocationId: d.id,
|
|
17538
17545
|
zoom: 14,
|
|
@@ -17576,7 +17583,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17576
17583
|
children: "Vendor details"
|
|
17577
17584
|
}),
|
|
17578
17585
|
/* @__PURE__ */ l(xs, {
|
|
17579
|
-
fields:
|
|
17586
|
+
fields: qf(d, e.fieldErrors),
|
|
17580
17587
|
density: "compact",
|
|
17581
17588
|
showActions: !1,
|
|
17582
17589
|
fieldGroups: [
|
|
@@ -17696,7 +17703,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17696
17703
|
})]
|
|
17697
17704
|
})
|
|
17698
17705
|
]
|
|
17699
|
-
}) : /* @__PURE__ */ l(
|
|
17706
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
17700
17707
|
status: {
|
|
17701
17708
|
state: "empty",
|
|
17702
17709
|
title: "No vendor selected",
|
|
@@ -17775,7 +17782,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17775
17782
|
})
|
|
17776
17783
|
]
|
|
17777
17784
|
})]
|
|
17778
|
-
}) : /* @__PURE__ */ l(
|
|
17785
|
+
}) : /* @__PURE__ */ l(ff, {
|
|
17779
17786
|
status: c,
|
|
17780
17787
|
onRetryClick: e.onRetryClick
|
|
17781
17788
|
}),
|
|
@@ -17819,7 +17826,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17819
17826
|
})
|
|
17820
17827
|
]
|
|
17821
17828
|
});
|
|
17822
|
-
},
|
|
17829
|
+
}, Yf = ({ shellProps: e, items: t, emptyTitle: n = "No favorite products yet", emptyMessage: r = "Save products you love and they will appear here.", browseLabel: i = "Browse products", onFavoriteClick: a, onBrowseClick: o }) => /* @__PURE__ */ u(Qu, {
|
|
17823
17830
|
...e,
|
|
17824
17831
|
activeTabId: "favorites",
|
|
17825
17832
|
children: [
|
|
@@ -17875,9 +17882,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
17875
17882
|
]
|
|
17876
17883
|
})
|
|
17877
17884
|
]
|
|
17878
|
-
}),
|
|
17885
|
+
}), Xf = ({ shellProps: e, personalInformation: t, password: n, shippingAddresses: r, billingAddresses: i, onAddAddressClick: a, onEditAddressClick: o, onRemoveAddressClick: s }) => {
|
|
17879
17886
|
let c = t.errors ?? {}, d = n.errors ?? {};
|
|
17880
|
-
return /* @__PURE__ */ u(
|
|
17887
|
+
return /* @__PURE__ */ u(Qu, {
|
|
17881
17888
|
...e,
|
|
17882
17889
|
activeTabId: "account-settings",
|
|
17883
17890
|
children: [
|
|
@@ -18095,9 +18102,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18095
18102
|
})
|
|
18096
18103
|
]
|
|
18097
18104
|
});
|
|
18098
|
-
},
|
|
18105
|
+
}, Zf = ({ shellProps: e, status: t, period: n, statusOptions: r, periodOptions: i, orders: a, totalOrderCount: o, hasMoreOrders: s = !1, isLoadingMore: c = !1, seeMoreLabel: d = "See more orders", searchDisabled: f = !1, emptyMessage: p = "No orders match your current filters.", onStatusChange: m, onPeriodChange: h, onSearchClick: g, onOrderClick: _, onSeeMoreClick: y }) => {
|
|
18099
18106
|
let b = s && !!y;
|
|
18100
|
-
return /* @__PURE__ */ u(
|
|
18107
|
+
return /* @__PURE__ */ u(Qu, {
|
|
18101
18108
|
...e,
|
|
18102
18109
|
activeTabId: "order-history",
|
|
18103
18110
|
children: [
|
|
@@ -18215,7 +18222,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18215
18222
|
})
|
|
18216
18223
|
]
|
|
18217
18224
|
});
|
|
18218
|
-
},
|
|
18225
|
+
}, Qf = (e, t) => /* @__PURE__ */ u("section", {
|
|
18219
18226
|
"aria-label": e,
|
|
18220
18227
|
children: [/* @__PURE__ */ l(v, {
|
|
18221
18228
|
as: "h3",
|
|
@@ -18234,7 +18241,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18234
18241
|
children: e
|
|
18235
18242
|
}, `${e}-${t}`))]
|
|
18236
18243
|
})]
|
|
18237
|
-
}),
|
|
18244
|
+
}), $f = ({ shellProps: e, orderNumber: t, orderDate: n, status: r, statusTone: i = "neutral", projectName: a, fulfillmentGroups: o, shippingAddress: s, billingAddress: c, paymentMethod: d, summaryRows: f, backLabel: p = "Back to order history", invoiceLabel: m = "Download invoice", helpLabel: h = "Get help with this order", onBackClick: g, onInvoiceClick: _, onHelpClick: y, onProductClick: b, onTrackingClick: x }) => /* @__PURE__ */ u(Qu, {
|
|
18238
18245
|
...e,
|
|
18239
18246
|
activeTabId: "order-history",
|
|
18240
18247
|
children: [
|
|
@@ -18325,11 +18332,11 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18325
18332
|
}),
|
|
18326
18333
|
/* @__PURE__ */ l("div", {
|
|
18327
18334
|
className: "mt-5",
|
|
18328
|
-
children:
|
|
18335
|
+
children: Qf("Shipping address", s)
|
|
18329
18336
|
}),
|
|
18330
18337
|
c || d ? /* @__PURE__ */ u("div", {
|
|
18331
18338
|
className: "mt-6 grid grid-cols-1 gap-6 border-t border-borderTertiary pt-6 md:grid-cols-2",
|
|
18332
|
-
children: [c ?
|
|
18339
|
+
children: [c ? Qf("Billing address", c) : null, d ? /* @__PURE__ */ u("section", {
|
|
18333
18340
|
"aria-label": "Payment method",
|
|
18334
18341
|
children: [/* @__PURE__ */ l(v, {
|
|
18335
18342
|
as: "h3",
|
|
@@ -18375,13 +18382,13 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18375
18382
|
})
|
|
18376
18383
|
}) : null
|
|
18377
18384
|
]
|
|
18378
|
-
}),
|
|
18385
|
+
}), ep = (e, t, n) => e.map((e) => ({
|
|
18379
18386
|
...e,
|
|
18380
18387
|
options: e.options.map((e) => e.id === t ? {
|
|
18381
18388
|
...e,
|
|
18382
18389
|
checked: n
|
|
18383
18390
|
} : e)
|
|
18384
|
-
})),
|
|
18391
|
+
})), tp = ({ title: t, resultsHeading: n = "Documents", description: r, documentInfoCollectionProps: i, filterSections: a, searchBarProps: o, filterPanelHeader: s = "Filters", appliedOptionsHeader: c = "Applied Filters", appliedOptionsEmptyLabel: d = "No filters selected", clearAllLabel: f = "Clear All", applyFiltersLabel: p = "Apply Filters", mobileFilterLabel: m = "Filters", onFilterChange: h, optInModalProps: g }) => {
|
|
18385
18392
|
let [_, y] = e.useState(!1), b = e.useId(), x = a.flatMap((e) => e.options.filter((e) => e.checked).map((e) => ({
|
|
18386
18393
|
id: e.id,
|
|
18387
18394
|
label: e.label
|
|
@@ -18403,7 +18410,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18403
18410
|
emptyStateLabel: d,
|
|
18404
18411
|
clearAllLabel: f,
|
|
18405
18412
|
optionsList: x,
|
|
18406
|
-
onRemoveOption: ({ id: e }) => S(
|
|
18413
|
+
onRemoveOption: ({ id: e }) => S(ep(a, e, !1), {
|
|
18407
18414
|
action: "remove",
|
|
18408
18415
|
optionId: e,
|
|
18409
18416
|
checked: !1
|
|
@@ -18444,9 +18451,9 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18444
18451
|
a.length > 0 ? /* @__PURE__ */ l("aside", {
|
|
18445
18452
|
className: "hidden md:block md:shrink-0",
|
|
18446
18453
|
"aria-label": s,
|
|
18447
|
-
children: /* @__PURE__ */ l(
|
|
18454
|
+
children: /* @__PURE__ */ l(Ju, {
|
|
18448
18455
|
...w,
|
|
18449
|
-
onCheckboxChange: ({ id: e, checked: t }) => S(
|
|
18456
|
+
onCheckboxChange: ({ id: e, checked: t }) => S(ep(a, e, t), {
|
|
18450
18457
|
action: "toggle",
|
|
18451
18458
|
optionId: e,
|
|
18452
18459
|
checked: t
|
|
@@ -18459,7 +18466,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18459
18466
|
"aria-modal": "true",
|
|
18460
18467
|
"aria-label": m,
|
|
18461
18468
|
className: "md:hidden",
|
|
18462
|
-
children: /* @__PURE__ */ l(
|
|
18469
|
+
children: /* @__PURE__ */ l(Ju, {
|
|
18463
18470
|
...w,
|
|
18464
18471
|
sections: a.map((e) => ({
|
|
18465
18472
|
...e,
|
|
@@ -18471,7 +18478,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18471
18478
|
})),
|
|
18472
18479
|
onCheckboxChange: ({ id: e, checked: t }) => {
|
|
18473
18480
|
let n = e.slice(b.length + 1);
|
|
18474
|
-
S(
|
|
18481
|
+
S(ep(a, n, t), {
|
|
18475
18482
|
action: "toggle",
|
|
18476
18483
|
optionId: n,
|
|
18477
18484
|
checked: t
|
|
@@ -18506,7 +18513,7 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18506
18513
|
children: n
|
|
18507
18514
|
})
|
|
18508
18515
|
}),
|
|
18509
|
-
/* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(
|
|
18516
|
+
/* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(Fu, {
|
|
18510
18517
|
...i,
|
|
18511
18518
|
layoutVariant: "compact"
|
|
18512
18519
|
}) })
|
|
@@ -18519,4 +18526,4 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
18519
18526
|
});
|
|
18520
18527
|
};
|
|
18521
18528
|
//#endregion
|
|
18522
|
-
export {
|
|
18529
|
+
export { Zu as AccountAccessPanel, Sf as AdminAuthStatusTemplate, Bc as AdminBackgroundJobTray, hf as AdminDashboardTemplate, Af as AdminDataIssuesSourceTemplate, Tf as AdminDataReportTemplate, If as AdminImportDataIssuesTemplate, Bf as AdminImportDataReviewTemplate, Pf as AdminImportDataSourceTemplate, lf as AdminPageTemplateShell, Wf as AdminProductGuidesTemplate, Ko as AdminRegionSelector, Nc as AdminSideNav, yf as AdminUsersTemplate, ml as AnnouncementBar, lu as ArticleBanner, Xs as ArticleBannerContent, vd as ArticleLandingPageTemplate, Kd as BpcsCartConfirmationTemplate, Zd as BpcsCartSamplesTemplate, Xd as BpcsCartShippingTemplate, tl as BrandNavBar, hl as Breadcrumbs, pe as BusinessInfoCard, P as Button, El as CallToActionHero, Zs as CallToActionHeroContent, Fs as CarouselArrowControls, Is as CarouselDots, he as CartItemCard, Od as CategoryPageTemplate, K as ClickableCard, uc as ColourMatchingChart, Nl as ColumnBanner, Lo as ColumnCarouselCard, Ku as CommerceSyncPanel, uu as ContentCarousel, H as ContentContainer, se as ContentGrid, Wo as CountrySelector, Yf as CustomerAccountFavoritesTemplate, $f as CustomerAccountOrderDetailTemplate, Zf as CustomerAccountOrderHistoryTemplate, Xf as CustomerAccountSettingsTemplate, Qu as CustomerAccountShell, Dc as CustomerAddressCard, Mu as DataReportCollection, we as DecorSummaryCard, Nu as DecorSummaryCollection, rc as DocumentInfoCard, Fu as DocumentInfoCollection, ic as DocumentLinkCard, tp as DocumentResultsTemplate, Ms as DropdownFilter, xs as DynamicForm, $d as EcommCartConfirmationTemplate, nf as EcommCartPaymentTemplate, rf as EcommCartShippingTemplate, cf as EcommCartSummaryTemplate, B as EmbeddedVideo, nc as EmbeddedVideoCard, ac as FaqCard, vu as FaqCardCollection, Ro as FeatureCard, Ll as FeatureCardCollection, Dl as FeaturedArticleBanner, Qs as FeaturedArticleBannerContent, zo as FeaturedProductCard, gu as FeaturedProductsCarousel, As as FilterBar, js as FilterBarButton, ue as FlowRow, Sl as Footer, v as FormicaText, Ad as GalleryTemplate, S as Icon, L as Image, du as ImageCard, tc as ImageOverlayCard, xu as ImageOverlayGrid, oc as InfoCard, V as Interactive3DViewer, wu as LocalizationMarketCollection, Cc as LocalizationStatusCard, Uo as LocationCard, Cu as LocationCardCollection, Vu as LocationMap, Rd as LoginTemplate, Cf as MarketReadinessBrowseTemplate, Os as MarketReadinessItemSkuSection, qo as MarketReadinessRangeSelector, wf as MarketReadinessRangeTemplate, ye as MarketReadinessSampleCard, Ce as MarketReadinessSaveStatusIndicator, xe as MarketReadinessSkuCard, _e as MarketReadinessStatusDots, mf as MarketReadinessTemplate, ks as MarketReadinessVariantAvailabilitySection, Jo as MarketReadinessVariantOptions, Hc as Modal, sc as MoreInfoHighlightsCard, Rl as MoreInfoHighlightsCollection, Wc as OptInModal, kc as OrderDetailHeaderCard, jc as OrderItemDetailCard, Nd as ProResourceTemplate, ge as ProductContactActions, gd as ProductDetailPageTemplate, fc as QuantityCheckoutCard, ze as RangeSummaryCard, Pu as RangeSummaryCollection, bc as RecentArticleCard, _u as RecentArticleCollection, te as ResilientImage, Qd as SalesforceCartShippingTemplate, Bl as SalesforceCustomerDetailsForm, zl as SampleOrderSummaryPanel, $o as SearchCombobox, Ps as SearchFilter, Ld as SearchResultsTemplate, xc as SingleButtonCard, ec as SocialLinkRow, w as Spinner, wl as StandardBannerContainer, qs as StandardCarousel, $s as StandardCopyBannerContent, cu as StandardCopyHero, Ec as SwatchCard, su as SwatchPurchasePanel, mu as TextCard, ne as Textarea, ul as TopNavAccountDrawer, sl as TopNavActions, pl as TopNavBar, nl as TopNavMegaMenu, al as TopNavSearchResults, Gf as VendorImportSection, Ju as VerticalCheckboxListCollection, Ys as VerticalColorSwatchList, hu as WarrantyCard, Jf as WhereToBuyDetailPage, Kf as WhereToBuyLandingPage, Tl as WhereToBuySearchBanner, Bd as WhereToBuyTemplate, h as applySketchfabTexture, _ as connectSketchfabViewer, p as setSketchfabAppearance, Yu as userTypeOptions };
|