@planetaexo/design-system 0.37.3 → 0.37.4

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.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React8 = require('react');
3
+ var React28 = require('react');
4
4
  var classVarianceAuthority = require('class-variance-authority');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
@@ -37,7 +37,7 @@ function _interopNamespace(e) {
37
37
  return Object.freeze(n);
38
38
  }
39
39
 
40
- var React8__namespace = /*#__PURE__*/_interopNamespace(React8);
40
+ var React28__namespace = /*#__PURE__*/_interopNamespace(React28);
41
41
 
42
42
  var __defProp = Object.defineProperty;
43
43
  var __defProps = Object.defineProperties;
@@ -102,7 +102,7 @@ var buttonVariants = classVarianceAuthority.cva(
102
102
  }
103
103
  }
104
104
  );
105
- var Button = React8__namespace.forwardRef(
105
+ var Button = React28__namespace.forwardRef(
106
106
  (_a, ref) => {
107
107
  var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
108
108
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -186,6 +186,10 @@ function Dialog(_a) {
186
186
  var props = __objRest(_a, []);
187
187
  return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
188
188
  }
189
+ function DialogTrigger(_a) {
190
+ var props = __objRest(_a, []);
191
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
192
+ }
189
193
  function DialogPortal(_a) {
190
194
  var props = __objRest(_a, []);
191
195
  return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
@@ -323,10 +327,10 @@ function DialogDescription(_a) {
323
327
  }, props)
324
328
  );
325
329
  }
326
- var FloatingInput = React8__namespace.forwardRef(
330
+ var FloatingInput = React28__namespace.forwardRef(
327
331
  (_a, ref) => {
328
332
  var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
329
- const inputId = id != null ? id : React8__namespace.useId();
333
+ const inputId = id != null ? id : React28__namespace.useId();
330
334
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
331
335
  /* @__PURE__ */ jsxRuntime.jsx(
332
336
  "input",
@@ -366,10 +370,10 @@ var FloatingInput = React8__namespace.forwardRef(
366
370
  }
367
371
  );
368
372
  FloatingInput.displayName = "FloatingInput";
369
- var FloatingSelect = React8__namespace.forwardRef(
373
+ var FloatingSelect = React28__namespace.forwardRef(
370
374
  (_a, ref) => {
371
375
  var _b = _a, { label, error, id, className, required, children, value } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children", "value"]);
372
- const inputId = id != null ? id : React8__namespace.useId();
376
+ const inputId = id != null ? id : React28__namespace.useId();
373
377
  const hasValue = typeof value === "string" ? value !== "" : value !== void 0 && value !== null;
374
378
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
375
379
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -633,11 +637,11 @@ function PhoneCountrySelect({
633
637
  disabled
634
638
  }) {
635
639
  var _a;
636
- const [open, setOpen] = React8__namespace.useState(false);
637
- const containerRef = React8__namespace.useRef(null);
638
- const listRef = React8__namespace.useRef(null);
640
+ const [open, setOpen] = React28__namespace.useState(false);
641
+ const containerRef = React28__namespace.useRef(null);
642
+ const listRef = React28__namespace.useRef(null);
639
643
  const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
640
- React8__namespace.useEffect(() => {
644
+ React28__namespace.useEffect(() => {
641
645
  if (!open) return;
642
646
  const handler = (e) => {
643
647
  var _a2;
@@ -648,7 +652,7 @@ function PhoneCountrySelect({
648
652
  document.addEventListener("mousedown", handler);
649
653
  return () => document.removeEventListener("mousedown", handler);
650
654
  }, [open]);
651
- React8__namespace.useEffect(() => {
655
+ React28__namespace.useEffect(() => {
652
656
  if (!open || !listRef.current) return;
653
657
  const activeEl = listRef.current.querySelector("[data-selected=true]");
654
658
  activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
@@ -918,8 +922,8 @@ function CalendarDayButton(_a) {
918
922
  "locale"
919
923
  ]);
920
924
  const defaultClassNames = reactDayPicker.getDefaultClassNames();
921
- const ref = React8__namespace.useRef(null);
922
- React8__namespace.useEffect(() => {
925
+ const ref = React28__namespace.useRef(null);
926
+ React28__namespace.useEffect(() => {
923
927
  var _a2;
924
928
  if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
925
929
  }, [modifiers.focused]);
@@ -950,16 +954,16 @@ function BirthDateField({
950
954
  className,
951
955
  disabled
952
956
  }) {
953
- const [open, setOpen] = React8__namespace.useState(false);
954
- const [text, setText] = React8__namespace.useState(
957
+ const [open, setOpen] = React28__namespace.useState(false);
958
+ const [text, setText] = React28__namespace.useState(
955
959
  value ? dateFns.format(value, "dd/MM/yyyy") : ""
956
960
  );
957
- const containerRef = React8__namespace.useRef(null);
958
- const inputId = React8__namespace.useId();
959
- React8__namespace.useEffect(() => {
961
+ const containerRef = React28__namespace.useRef(null);
962
+ const inputId = React28__namespace.useId();
963
+ React28__namespace.useEffect(() => {
960
964
  setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
961
965
  }, [value]);
962
- React8__namespace.useEffect(() => {
966
+ React28__namespace.useEffect(() => {
963
967
  if (!open) return;
964
968
  const handler = (e) => {
965
969
  var _a;
@@ -1168,14 +1172,14 @@ function CountrySearchField({
1168
1172
  }) {
1169
1173
  var _a;
1170
1174
  const list = countries != null ? countries : COUNTRIES;
1171
- const [query, setQuery] = React8__namespace.useState("");
1172
- const [open, setOpen] = React8__namespace.useState(false);
1173
- const containerRef = React8__namespace.useRef(null);
1174
- const searchRef = React8__namespace.useRef(null);
1175
+ const [query, setQuery] = React28__namespace.useState("");
1176
+ const [open, setOpen] = React28__namespace.useState(false);
1177
+ const containerRef = React28__namespace.useRef(null);
1178
+ const searchRef = React28__namespace.useRef(null);
1175
1179
  const selected = list.find((c) => c.code === value);
1176
1180
  const isFloated = open || !!selected;
1177
1181
  const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
1178
- React8__namespace.useEffect(() => {
1182
+ React28__namespace.useEffect(() => {
1179
1183
  if (!open) return;
1180
1184
  const handler = (e) => {
1181
1185
  var _a2;
@@ -1289,7 +1293,7 @@ function AdventureCard({
1289
1293
  }) {
1290
1294
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1291
1295
  const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
1292
- const [checkedInternal, setCheckedInternal] = React8__namespace.useState(
1296
+ const [checkedInternal, setCheckedInternal] = React28__namespace.useState(
1293
1297
  new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
1294
1298
  );
1295
1299
  const isChecked = (opt) => {
@@ -1687,7 +1691,7 @@ function BookingShell({
1687
1691
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
1688
1692
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
1689
1693
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
1690
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React8__namespace.Fragment, { children: [
1694
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
1691
1695
  /* @__PURE__ */ jsxRuntime.jsx(
1692
1696
  "span",
1693
1697
  {
@@ -1886,7 +1890,7 @@ function TermsSection({
1886
1890
  termsContent
1887
1891
  }) {
1888
1892
  var _a;
1889
- const [modalOpen, setModalOpen] = React8__namespace.useState(false);
1893
+ const [modalOpen, setModalOpen] = React28__namespace.useState(false);
1890
1894
  const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
1891
1895
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
1892
1896
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
@@ -2024,9 +2028,9 @@ function BookingWizard({
2024
2028
  }) {
2025
2029
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
2026
2030
  const wizardSteps = WIZARD_STEPS_FN(labels);
2027
- const [step, setStep] = React8__namespace.useState("responsible");
2028
- const [error, setError] = React8__namespace.useState(null);
2029
- const [responsible, setResponsible] = React8__namespace.useState({
2031
+ const [step, setStep] = React28__namespace.useState("responsible");
2032
+ const [error, setError] = React28__namespace.useState(null);
2033
+ const [responsible, setResponsible] = React28__namespace.useState({
2030
2034
  firstName: "",
2031
2035
  lastName: "",
2032
2036
  email: "",
@@ -2045,7 +2049,7 @@ function BookingWizard({
2045
2049
  return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
2046
2050
  }, 0);
2047
2051
  const totalPax = totalAdults + totalChildren;
2048
- const [travellers, setTravellers] = React8__namespace.useState(
2052
+ const [travellers, setTravellers] = React28__namespace.useState(
2049
2053
  Array.from({ length: Math.max(totalPax, 1) }, () => ({
2050
2054
  firstName: "",
2051
2055
  lastName: "",
@@ -2053,9 +2057,9 @@ function BookingWizard({
2053
2057
  email: ""
2054
2058
  }))
2055
2059
  );
2056
- const [payAmount, setPayAmount] = React8__namespace.useState("full");
2057
- const [payMethod, setPayMethod] = React8__namespace.useState("stripe");
2058
- const [termsAccepted, setTermsAccepted] = React8__namespace.useState(false);
2060
+ const [payAmount, setPayAmount] = React28__namespace.useState("full");
2061
+ const [payMethod, setPayMethod] = React28__namespace.useState("stripe");
2062
+ const [termsAccepted, setTermsAccepted] = React28__namespace.useState(false);
2059
2063
  const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
2060
2064
  const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
2061
2065
  const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
@@ -2283,7 +2287,7 @@ function Offer({
2283
2287
  className
2284
2288
  }) {
2285
2289
  var _a, _b, _c;
2286
- const [showBooking, setShowBooking] = React8__namespace.useState(false);
2290
+ const [showBooking, setShowBooking] = React28__namespace.useState(false);
2287
2291
  const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
2288
2292
  const handleBook = () => {
2289
2293
  if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
@@ -2650,7 +2654,7 @@ function AdventureSection({
2650
2654
  labels
2651
2655
  }) {
2652
2656
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
2653
- const [detailsOpen, setDetailsOpen] = React8__namespace.useState(false);
2657
+ const [detailsOpen, setDetailsOpen] = React28__namespace.useState(false);
2654
2658
  const handleCopyUrl = (url) => {
2655
2659
  if (onCopyFormLink) {
2656
2660
  onCopyFormLink(url);
@@ -3162,8 +3166,8 @@ function AddTravellerDialog({
3162
3166
  errorMessage
3163
3167
  }) {
3164
3168
  var _a, _b, _c, _d, _e;
3165
- const [form, setForm] = React8__namespace.useState(() => createInitialAddFormData(config));
3166
- React8__namespace.useEffect(() => {
3169
+ const [form, setForm] = React28__namespace.useState(() => createInitialAddFormData(config));
3170
+ React28__namespace.useEffect(() => {
3167
3171
  if (open) {
3168
3172
  setForm(createInitialAddFormData(config));
3169
3173
  }
@@ -3223,7 +3227,7 @@ function EditTravellerDialog({
3223
3227
  errorMessage
3224
3228
  }) {
3225
3229
  var _a, _b, _c, _d, _e;
3226
- const [form, setForm] = React8__namespace.useState(() => ({
3230
+ const [form, setForm] = React28__namespace.useState(() => ({
3227
3231
  firstName: "",
3228
3232
  lastName: "",
3229
3233
  email: "",
@@ -3232,7 +3236,7 @@ function EditTravellerDialog({
3232
3236
  birthDate: "",
3233
3237
  personType: "ADULT"
3234
3238
  }));
3235
- React8__namespace.useEffect(() => {
3239
+ React28__namespace.useEffect(() => {
3236
3240
  var _a2, _b2, _c2, _d2, _e2, _f;
3237
3241
  if (open && traveller) {
3238
3242
  setForm({
@@ -3567,48 +3571,48 @@ function BookingDetails({
3567
3571
  const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3568
3572
  const hasSubmitEditTraveller = !!onSubmitEditTraveller;
3569
3573
  const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
3570
- const [addModalState, setAddModalState] = React8__namespace.useState({
3574
+ const [addModalState, setAddModalState] = React28__namespace.useState({
3571
3575
  open: false,
3572
3576
  adventureId: null
3573
3577
  });
3574
- const [editModalState, setEditModalState] = React8__namespace.useState({ open: false, adventureId: null, traveller: null });
3575
- const [deleteModalState, setDeleteModalState] = React8__namespace.useState({ open: false, adventureId: null, traveller: null });
3576
- const [resendInviteDialogState, setResendInviteDialogState] = React8__namespace.useState({ open: false, traveller: null });
3577
- const handleRequestOpenAddModal = React8__namespace.useCallback((adventureId) => {
3578
+ const [editModalState, setEditModalState] = React28__namespace.useState({ open: false, adventureId: null, traveller: null });
3579
+ const [deleteModalState, setDeleteModalState] = React28__namespace.useState({ open: false, adventureId: null, traveller: null });
3580
+ const [resendInviteDialogState, setResendInviteDialogState] = React28__namespace.useState({ open: false, traveller: null });
3581
+ const handleRequestOpenAddModal = React28__namespace.useCallback((adventureId) => {
3578
3582
  setAddModalState({ open: true, adventureId });
3579
3583
  }, []);
3580
- const handleRequestOpenEditModal = React8__namespace.useCallback(
3584
+ const handleRequestOpenEditModal = React28__namespace.useCallback(
3581
3585
  (adventureId, traveller) => {
3582
3586
  setEditModalState({ open: true, adventureId, traveller });
3583
3587
  },
3584
3588
  []
3585
3589
  );
3586
- const handleRequestOpenDeleteModal = React8__namespace.useCallback(
3590
+ const handleRequestOpenDeleteModal = React28__namespace.useCallback(
3587
3591
  (adventureId, traveller) => {
3588
3592
  setDeleteModalState({ open: true, adventureId, traveller });
3589
3593
  },
3590
3594
  []
3591
3595
  );
3592
- const handleRequestOpenResendInviteDialog = React8__namespace.useCallback(
3596
+ const handleRequestOpenResendInviteDialog = React28__namespace.useCallback(
3593
3597
  (traveller) => {
3594
3598
  setResendInviteDialogState({ open: true, traveller });
3595
3599
  },
3596
3600
  []
3597
3601
  );
3598
- const closeAddModal = React8__namespace.useCallback(() => {
3602
+ const closeAddModal = React28__namespace.useCallback(() => {
3599
3603
  setAddModalState({ open: false, adventureId: null });
3600
3604
  }, []);
3601
- const closeEditModal = React8__namespace.useCallback(() => {
3605
+ const closeEditModal = React28__namespace.useCallback(() => {
3602
3606
  setEditModalState({ open: false, adventureId: null, traveller: null });
3603
3607
  }, []);
3604
- const closeDeleteModal = React8__namespace.useCallback(() => {
3608
+ const closeDeleteModal = React28__namespace.useCallback(() => {
3605
3609
  setDeleteModalState({ open: false, adventureId: null, traveller: null });
3606
3610
  }, []);
3607
- const closeResendInviteDialog = React8__namespace.useCallback(() => {
3611
+ const closeResendInviteDialog = React28__namespace.useCallback(() => {
3608
3612
  setResendInviteDialogState({ open: false, traveller: null });
3609
3613
  }, []);
3610
- const submitInFlightRef = React8__namespace.useRef(false);
3611
- const handleAddSubmit = React8__namespace.useCallback(
3614
+ const submitInFlightRef = React28__namespace.useRef(false);
3615
+ const handleAddSubmit = React28__namespace.useCallback(
3612
3616
  async (adventureId, data) => {
3613
3617
  if (!onSubmitAddTraveller) return;
3614
3618
  if (submitInFlightRef.current) return;
@@ -3623,7 +3627,7 @@ function BookingDetails({
3623
3627
  },
3624
3628
  [onSubmitAddTraveller, closeAddModal]
3625
3629
  );
3626
- const handleEditSubmit = React8__namespace.useCallback(
3630
+ const handleEditSubmit = React28__namespace.useCallback(
3627
3631
  async (adventureId, travellerId, data) => {
3628
3632
  if (!onSubmitEditTraveller) return;
3629
3633
  if (submitInFlightRef.current) return;
@@ -3638,7 +3642,7 @@ function BookingDetails({
3638
3642
  },
3639
3643
  [onSubmitEditTraveller, closeEditModal]
3640
3644
  );
3641
- const handleDeleteConfirm = React8__namespace.useCallback(
3645
+ const handleDeleteConfirm = React28__namespace.useCallback(
3642
3646
  async (adventureId, travellerId) => {
3643
3647
  if (!onConfirmRemoveTraveller) return;
3644
3648
  if (submitInFlightRef.current) return;
@@ -5112,7 +5116,7 @@ function BookingCreatedEmail({
5112
5116
  }, children: i + 1 }) }),
5113
5117
  /* @__PURE__ */ jsxRuntime.jsx("td", { style: { verticalAlign: "top" }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.6", margin: 0 }, children: step }) })
5114
5118
  ] }) }) }, i)) }),
5115
- nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxRuntime.jsxs(React8__namespace.Fragment, { children: [
5119
+ nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
5116
5120
  idx === 0 ? /* @__PURE__ */ jsxRuntime.jsx("strong", { children: line }) : line,
5117
5121
  idx < arr.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
5118
5122
  ] }, idx)) })
@@ -6481,11 +6485,11 @@ function DatePickerField({
6481
6485
  fromDate,
6482
6486
  className
6483
6487
  }) {
6484
- const [open, setOpen] = React8__namespace.useState(false);
6485
- const containerRef = React8__namespace.useRef(null);
6486
- const [calendarWidth, setCalendarWidth] = React8__namespace.useState();
6488
+ const [open, setOpen] = React28__namespace.useState(false);
6489
+ const containerRef = React28__namespace.useRef(null);
6490
+ const [calendarWidth, setCalendarWidth] = React28__namespace.useState();
6487
6491
  const hasValue = !!value;
6488
- React8__namespace.useEffect(() => {
6492
+ React28__namespace.useEffect(() => {
6489
6493
  if (!containerRef.current) return;
6490
6494
  const observer = new ResizeObserver(([entry]) => {
6491
6495
  setCalendarWidth(entry.contentRect.width);
@@ -6594,7 +6598,7 @@ function BookingForm({
6594
6598
  subtitle = "Free enquiry \u2013 no commitment",
6595
6599
  className
6596
6600
  }) {
6597
- const [values, setValues] = React8__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
6601
+ const [values, setValues] = React28__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
6598
6602
  const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
6599
6603
  const handleSubmit = (e) => {
6600
6604
  e.preventDefault();
@@ -7131,11 +7135,11 @@ function FloatingTextarea({
7131
7135
  }
7132
7136
  function SelectField({ field, value, onChange, error, disabled }) {
7133
7137
  var _a, _b, _c;
7134
- const [open, setOpen] = React8__namespace.useState(false);
7135
- const containerRef = React8__namespace.useRef(null);
7138
+ const [open, setOpen] = React28__namespace.useState(false);
7139
+ const containerRef = React28__namespace.useRef(null);
7136
7140
  const options = (_a = field.options) != null ? _a : [];
7137
7141
  const selectedOpt = (_b = options.find((o) => o.value === value)) != null ? _b : null;
7138
- React8__namespace.useEffect(() => {
7142
+ React28__namespace.useEffect(() => {
7139
7143
  if (!open) return;
7140
7144
  const handleOutside = (e) => {
7141
7145
  if (containerRef.current && !containerRef.current.contains(e.target)) {
@@ -7524,11 +7528,11 @@ function RegistrationForm({
7524
7528
  readOnly = false
7525
7529
  }) {
7526
7530
  var _a;
7527
- const L = React8__namespace.useMemo(
7531
+ const L = React28__namespace.useMemo(
7528
7532
  () => __spreadValues(__spreadValues({}, DEFAULT_LABELS9), labels != null ? labels : {}),
7529
7533
  [labels]
7530
7534
  );
7531
- const sortedFields = React8__namespace.useMemo(
7535
+ const sortedFields = React28__namespace.useMemo(
7532
7536
  () => [...fields].sort((a, b) => {
7533
7537
  var _a2, _b;
7534
7538
  return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
@@ -7536,7 +7540,7 @@ function RegistrationForm({
7536
7540
  [fields]
7537
7541
  );
7538
7542
  const isControlled = values !== void 0;
7539
- const [internal, setInternal] = React8__namespace.useState(
7543
+ const [internal, setInternal] = React28__namespace.useState(
7540
7544
  () => initializeValues(
7541
7545
  sortedFields,
7542
7546
  defaultValues != null ? defaultValues : {},
@@ -7544,9 +7548,9 @@ function RegistrationForm({
7544
7548
  includeTerms
7545
7549
  )
7546
7550
  );
7547
- const [submitAttempted, setSubmitAttempted] = React8__namespace.useState(false);
7548
- const [validationErrors, setValidationErrors] = React8__namespace.useState({});
7549
- React8__namespace.useEffect(() => {
7551
+ const [submitAttempted, setSubmitAttempted] = React28__namespace.useState(false);
7552
+ const [validationErrors, setValidationErrors] = React28__namespace.useState({});
7553
+ React28__namespace.useEffect(() => {
7550
7554
  if (isControlled) return;
7551
7555
  setInternal((prev) => {
7552
7556
  const next = initializeValues(
@@ -7603,7 +7607,7 @@ function RegistrationForm({
7603
7607
  const termsError = submitAttempted && termsEnabled && !termsAccepted;
7604
7608
  const firstErrorFieldId = Object.keys(fieldErrors)[0];
7605
7609
  const scrollTargetId = firstErrorFieldId ? `rf-${firstErrorFieldId}` : termsError ? "rf-terms" : null;
7606
- React8__namespace.useEffect(() => {
7610
+ React28__namespace.useEffect(() => {
7607
7611
  if (!submitAttempted || !scrollTargetId) return;
7608
7612
  const timer = setTimeout(() => {
7609
7613
  const elem = document.getElementById(scrollTargetId);
@@ -8065,10 +8069,10 @@ var OTPCodeInput = ({
8065
8069
  id,
8066
8070
  required
8067
8071
  }) => {
8068
- const baseId = id != null ? id : React8__namespace.useId();
8069
- const inputRef = React8__namespace.useRef(null);
8070
- const [focused, setFocused] = React8__namespace.useState(false);
8071
- const digits = React8__namespace.useMemo(() => {
8072
+ const baseId = id != null ? id : React28__namespace.useId();
8073
+ const inputRef = React28__namespace.useRef(null);
8074
+ const [focused, setFocused] = React28__namespace.useState(false);
8075
+ const digits = React28__namespace.useMemo(() => {
8072
8076
  const arr = value.split("").slice(0, length);
8073
8077
  while (arr.length < length) arr.push("");
8074
8078
  return arr;
@@ -8166,7 +8170,7 @@ function Checkbox(_a) {
8166
8170
  __spreadProps(__spreadValues({
8167
8171
  "data-slot": "checkbox",
8168
8172
  className: cn(
8169
- "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
8173
+ "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-checked:bg-primary",
8170
8174
  className
8171
8175
  )
8172
8176
  }, props), {
@@ -8175,16 +8179,13 @@ function Checkbox(_a) {
8175
8179
  {
8176
8180
  "data-slot": "checkbox-indicator",
8177
8181
  className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
8178
- children: /* @__PURE__ */ jsxRuntime.jsx(
8179
- lucideReact.CheckIcon,
8180
- {}
8181
- )
8182
+ children: props.indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {})
8182
8183
  }
8183
8184
  )
8184
8185
  })
8185
8186
  );
8186
8187
  }
8187
- var AccordionVariantContext = React8__namespace.createContext("default");
8188
+ var AccordionVariantContext = React28__namespace.createContext("default");
8188
8189
  function Accordion(_a) {
8189
8190
  var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
8190
8191
  return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -8202,7 +8203,7 @@ function Accordion(_a) {
8202
8203
  }
8203
8204
  function AccordionItem(_a) {
8204
8205
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8205
- const variant = React8__namespace.useContext(AccordionVariantContext);
8206
+ const variant = React28__namespace.useContext(AccordionVariantContext);
8206
8207
  return /* @__PURE__ */ jsxRuntime.jsx(
8207
8208
  accordion.Accordion.Item,
8208
8209
  __spreadValues({
@@ -8223,7 +8224,7 @@ function AccordionTrigger(_a) {
8223
8224
  "className",
8224
8225
  "children"
8225
8226
  ]);
8226
- const variant = React8__namespace.useContext(AccordionVariantContext);
8227
+ const variant = React28__namespace.useContext(AccordionVariantContext);
8227
8228
  return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
8228
8229
  accordion.Accordion.Trigger,
8229
8230
  __spreadProps(__spreadValues({
@@ -8277,7 +8278,7 @@ function AccordionContent(_a) {
8277
8278
  "className",
8278
8279
  "children"
8279
8280
  ]);
8280
- const variant = React8__namespace.useContext(AccordionVariantContext);
8281
+ const variant = React28__namespace.useContext(AccordionVariantContext);
8281
8282
  return /* @__PURE__ */ jsxRuntime.jsx(
8282
8283
  accordion.Accordion.Panel,
8283
8284
  __spreadProps(__spreadValues({
@@ -8300,6 +8301,187 @@ function AccordionContent(_a) {
8300
8301
  })
8301
8302
  );
8302
8303
  }
8304
+ function getLeafIds(item) {
8305
+ var _a;
8306
+ if (!((_a = item.children) == null ? void 0 : _a.length)) return [item.id];
8307
+ return item.children.flatMap(getLeafIds);
8308
+ }
8309
+ function getDefaultExpandedIds(items) {
8310
+ const out = [];
8311
+ const walk = (list) => {
8312
+ var _a;
8313
+ for (const i of list) {
8314
+ if ((_a = i.children) == null ? void 0 : _a.length) {
8315
+ if (i.defaultExpanded) out.push(i.id);
8316
+ walk(i.children);
8317
+ }
8318
+ }
8319
+ };
8320
+ walk(items);
8321
+ return out;
8322
+ }
8323
+ function getAllItemIds(items) {
8324
+ return items.flatMap(
8325
+ (i) => {
8326
+ var _a;
8327
+ return ((_a = i.children) == null ? void 0 : _a.length) ? [i.id, ...getAllItemIds(i.children)] : [i.id];
8328
+ }
8329
+ );
8330
+ }
8331
+ function findItemById(items, id) {
8332
+ var _a;
8333
+ for (const item of items) {
8334
+ if (item.id === id) return item;
8335
+ if ((_a = item.children) == null ? void 0 : _a.length) {
8336
+ const found = findItemById(item.children, id);
8337
+ if (found) return found;
8338
+ }
8339
+ }
8340
+ return void 0;
8341
+ }
8342
+ function resolveGroups(groups) {
8343
+ return groups.map((g) => {
8344
+ var _a;
8345
+ if (!g.scopeItemId) return g;
8346
+ const node = findItemById(g.items, g.scopeItemId);
8347
+ return __spreadProps(__spreadValues({}, g), { items: (_a = node == null ? void 0 : node.children) != null ? _a : [] });
8348
+ }).filter((g) => g.items.length > 0);
8349
+ }
8350
+ function FilterItemsList({
8351
+ items,
8352
+ groupId,
8353
+ groupSelected,
8354
+ onToggle,
8355
+ onBulkToggle,
8356
+ idPrefix,
8357
+ depth = 0,
8358
+ parentAsHeader = false,
8359
+ expandedItems,
8360
+ onToggleExpanded
8361
+ }) {
8362
+ return /* @__PURE__ */ jsxRuntime.jsx(
8363
+ "ul",
8364
+ {
8365
+ className: cn(
8366
+ "flex flex-col gap-0.5",
8367
+ !parentAsHeader && depth > 0 && "mt-0.5 ml-6 border-l border-border pl-3"
8368
+ ),
8369
+ children: items.map((item) => {
8370
+ var _a, _b;
8371
+ const isParent = !!((_a = item.children) == null ? void 0 : _a.length);
8372
+ const checkboxId = `${idPrefix}-${groupId}-${item.id}`;
8373
+ if (!isParent) {
8374
+ const checked = groupSelected.includes(item.id);
8375
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
8376
+ "label",
8377
+ {
8378
+ htmlFor: checkboxId,
8379
+ className: "flex cursor-pointer items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50",
8380
+ children: [
8381
+ /* @__PURE__ */ jsxRuntime.jsx(
8382
+ Checkbox,
8383
+ {
8384
+ id: checkboxId,
8385
+ checked,
8386
+ onCheckedChange: () => onToggle(item.id),
8387
+ className: "shrink-0"
8388
+ }
8389
+ ),
8390
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-foreground font-ui", children: item.label }),
8391
+ item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
8392
+ "(",
8393
+ item.count,
8394
+ ")"
8395
+ ] })
8396
+ ]
8397
+ }
8398
+ ) }, item.id);
8399
+ }
8400
+ if (parentAsHeader) {
8401
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: cn(depth > 0 && "mt-1"), children: [
8402
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 pt-2 pb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: item.label }),
8403
+ /* @__PURE__ */ jsxRuntime.jsx(
8404
+ FilterItemsList,
8405
+ {
8406
+ items: item.children,
8407
+ groupId,
8408
+ groupSelected,
8409
+ onToggle,
8410
+ onBulkToggle,
8411
+ idPrefix,
8412
+ depth: depth + 1,
8413
+ parentAsHeader: true,
8414
+ expandedItems,
8415
+ onToggleExpanded
8416
+ }
8417
+ )
8418
+ ] }, item.id);
8419
+ }
8420
+ const leafIds = item.children.flatMap(getLeafIds);
8421
+ const selectedLeaves = leafIds.filter((id) => groupSelected.includes(id));
8422
+ const allSelected = leafIds.length > 0 && selectedLeaves.length === leafIds.length;
8423
+ const someSelected = selectedLeaves.length > 0 && !allSelected;
8424
+ const isExpanded = (_b = expandedItems == null ? void 0 : expandedItems.has(item.id)) != null ? _b : false;
8425
+ const panelId = `${checkboxId}-children`;
8426
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8427
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group/parent flex items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50", children: [
8428
+ /* @__PURE__ */ jsxRuntime.jsx(
8429
+ Checkbox,
8430
+ {
8431
+ id: checkboxId,
8432
+ checked: allSelected,
8433
+ indeterminate: someSelected,
8434
+ onCheckedChange: () => onBulkToggle(leafIds, !allSelected),
8435
+ className: "shrink-0"
8436
+ }
8437
+ ),
8438
+ /* @__PURE__ */ jsxRuntime.jsxs(
8439
+ "button",
8440
+ {
8441
+ type: "button",
8442
+ onClick: () => onToggleExpanded == null ? void 0 : onToggleExpanded(item.id),
8443
+ "aria-expanded": isExpanded,
8444
+ "aria-controls": panelId,
8445
+ className: "flex flex-1 items-center gap-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm cursor-pointer",
8446
+ children: [
8447
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm font-bold text-foreground font-ui", children: item.label }),
8448
+ item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
8449
+ "(",
8450
+ item.count,
8451
+ ")"
8452
+ ] }),
8453
+ /* @__PURE__ */ jsxRuntime.jsx(
8454
+ lucideReact.ChevronDownIcon,
8455
+ {
8456
+ className: cn(
8457
+ "h-4 w-4 text-muted-foreground transition-transform",
8458
+ isExpanded && "rotate-180"
8459
+ )
8460
+ }
8461
+ )
8462
+ ]
8463
+ }
8464
+ )
8465
+ ] }),
8466
+ isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { id: panelId, children: /* @__PURE__ */ jsxRuntime.jsx(
8467
+ FilterItemsList,
8468
+ {
8469
+ items: item.children,
8470
+ groupId,
8471
+ groupSelected,
8472
+ onToggle,
8473
+ onBulkToggle,
8474
+ idPrefix,
8475
+ depth: depth + 1,
8476
+ expandedItems,
8477
+ onToggleExpanded
8478
+ }
8479
+ ) })
8480
+ ] }, item.id);
8481
+ })
8482
+ }
8483
+ );
8484
+ }
8303
8485
  function FilterPanel({
8304
8486
  groups,
8305
8487
  value,
@@ -8307,15 +8489,32 @@ function FilterPanel({
8307
8489
  onClearAll,
8308
8490
  alwaysShowClear = false,
8309
8491
  title = "Filters",
8310
- className
8492
+ className,
8493
+ variant = "sidebar",
8494
+ sortOptions,
8495
+ sort,
8496
+ onSortChange
8311
8497
  }) {
8312
- const [internalValue, setInternalValue] = React8__namespace.useState(
8498
+ var _a, _b;
8499
+ const resolvedGroups = React28__namespace.useMemo(() => resolveGroups(groups), [groups]);
8500
+ const [internalValue, setInternalValue] = React28__namespace.useState(
8313
8501
  () => Object.fromEntries(groups.map((g) => [g.id, []]))
8314
8502
  );
8315
8503
  const selected = value != null ? value : internalValue;
8504
+ const [expandedItems, setExpandedItems] = React28__namespace.useState(
8505
+ () => new Set(groups.flatMap((g) => getDefaultExpandedIds(g.items)))
8506
+ );
8507
+ const toggleExpanded = React28__namespace.useCallback((id) => {
8508
+ setExpandedItems((prev) => {
8509
+ const next = new Set(prev);
8510
+ if (next.has(id)) next.delete(id);
8511
+ else next.add(id);
8512
+ return next;
8513
+ });
8514
+ }, []);
8316
8515
  const handleToggle = (groupId, itemId) => {
8317
- var _a;
8318
- const current = (_a = selected[groupId]) != null ? _a : [];
8516
+ var _a2;
8517
+ const current = (_a2 = selected[groupId]) != null ? _a2 : [];
8319
8518
  const next = current.includes(itemId) ? current.filter((id) => id !== itemId) : [...current, itemId];
8320
8519
  const nextValue = __spreadProps(__spreadValues({}, selected), { [groupId]: next });
8321
8520
  if (onChange) {
@@ -8324,8 +8523,24 @@ function FilterPanel({
8324
8523
  setInternalValue(nextValue);
8325
8524
  }
8326
8525
  };
8526
+ const handleBulkToggle = (groupId, itemIds, select) => {
8527
+ var _a2;
8528
+ const current = (_a2 = selected[groupId]) != null ? _a2 : [];
8529
+ const next = select ? Array.from(/* @__PURE__ */ new Set([...current, ...itemIds])) : current.filter((id) => !itemIds.includes(id));
8530
+ const nextValue = __spreadProps(__spreadValues({}, selected), { [groupId]: next });
8531
+ if (onChange) {
8532
+ onChange(nextValue);
8533
+ } else {
8534
+ setInternalValue(nextValue);
8535
+ }
8536
+ };
8327
8537
  const handleClearAll = () => {
8328
- const cleared = Object.fromEntries(groups.map((g) => [g.id, []]));
8538
+ var _a2;
8539
+ const cleared = __spreadValues({}, selected);
8540
+ for (const g of resolvedGroups) {
8541
+ const visible = new Set(getAllItemIds(g.items));
8542
+ cleared[g.id] = ((_a2 = selected[g.id]) != null ? _a2 : []).filter((id) => !visible.has(id));
8543
+ }
8329
8544
  if (onChange) {
8330
8545
  onChange(cleared);
8331
8546
  } else {
@@ -8333,9 +8548,289 @@ function FilterPanel({
8333
8548
  }
8334
8549
  onClearAll == null ? void 0 : onClearAll();
8335
8550
  };
8336
- const totalSelected = Object.values(selected).flat().length;
8551
+ const totalSelected = resolvedGroups.reduce((sum, g) => {
8552
+ var _a2;
8553
+ const visible = new Set(getAllItemIds(g.items));
8554
+ return sum + ((_a2 = selected[g.id]) != null ? _a2 : []).filter((id) => visible.has(id)).length;
8555
+ }, 0);
8337
8556
  const showClear = alwaysShowClear || totalSelected > 0;
8338
- const defaultOpenValues = groups.filter((g) => g.defaultOpen).map((g) => g.id);
8557
+ const defaultOpenValues = resolvedGroups.filter((g) => g.defaultOpen).map((g) => g.id);
8558
+ if (resolvedGroups.length === 0) return null;
8559
+ if (variant === "horizontal") {
8560
+ const activeSort = (_a = sortOptions == null ? void 0 : sortOptions.find((o) => o.id === sort)) != null ? _a : sortOptions == null ? void 0 : sortOptions[0];
8561
+ const drawerGroups = /* @__PURE__ */ jsxRuntime.jsx(Accordion, { defaultValue: defaultOpenValues, className: "flex flex-col gap-2", children: resolvedGroups.map((group) => {
8562
+ var _a2;
8563
+ const groupSelected = (_a2 = selected[group.id]) != null ? _a2 : [];
8564
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8565
+ AccordionItem,
8566
+ {
8567
+ value: group.id,
8568
+ className: "border-0 border-b border-border last:border-b-0",
8569
+ children: [
8570
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "px-0 py-3.5 hover:no-underline transition-colors", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5", children: [
8571
+ group.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary shrink-0", children: group.icon }),
8572
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
8573
+ groupSelected.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-primary-foreground", children: groupSelected.length })
8574
+ ] }) }),
8575
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
8576
+ FilterItemsList,
8577
+ {
8578
+ items: group.items,
8579
+ groupId: group.id,
8580
+ groupSelected,
8581
+ onToggle: (id) => handleToggle(group.id, id),
8582
+ onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
8583
+ idPrefix: "mobile-filter",
8584
+ expandedItems,
8585
+ onToggleExpanded: toggleExpanded
8586
+ }
8587
+ ) })
8588
+ ]
8589
+ },
8590
+ group.id
8591
+ );
8592
+ }) });
8593
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("contents", className), children: [
8594
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex sm:hidden items-center gap-2", children: [
8595
+ /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { children: [
8596
+ /* @__PURE__ */ jsxRuntime.jsxs(
8597
+ DialogTrigger,
8598
+ {
8599
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8600
+ "button",
8601
+ {
8602
+ type: "button",
8603
+ className: cn(
8604
+ "flex-1 inline-flex items-center justify-between gap-2 rounded-xl border-2 border-foreground bg-background px-4 py-3",
8605
+ "text-sm font-ui font-bold text-foreground transition-colors hover:bg-muted",
8606
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8607
+ )
8608
+ }
8609
+ ),
8610
+ children: [
8611
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
8612
+ title,
8613
+ totalSelected > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-bold text-primary-foreground", children: totalSelected })
8614
+ ] }),
8615
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SlidersHorizontalIcon, { className: "h-4 w-4 text-foreground" })
8616
+ ]
8617
+ }
8618
+ ),
8619
+ /* @__PURE__ */ jsxRuntime.jsx(
8620
+ DialogContent,
8621
+ {
8622
+ className: cn(
8623
+ "p-0 sm:max-w-md",
8624
+ "max-w-none w-screen h-screen sm:h-auto sm:max-h-[90vh] rounded-none sm:rounded-2xl"
8625
+ ),
8626
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full max-h-[90vh]", children: [
8627
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "px-5 py-4 text-lg font-bold font-heading border-b border-border", children: title }),
8628
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-5 py-3", children: drawerGroups }),
8629
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 px-5 py-4 border-t border-border", children: [
8630
+ /* @__PURE__ */ jsxRuntime.jsx(
8631
+ "button",
8632
+ {
8633
+ type: "button",
8634
+ onClick: handleClearAll,
8635
+ className: "text-sm font-ui font-semibold text-muted-foreground underline underline-offset-2 hover:text-foreground",
8636
+ children: "Clear all"
8637
+ }
8638
+ ),
8639
+ /* @__PURE__ */ jsxRuntime.jsxs(
8640
+ DialogClose,
8641
+ {
8642
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8643
+ "button",
8644
+ {
8645
+ type: "button",
8646
+ className: "inline-flex items-center justify-center rounded-full bg-foreground text-background px-6 py-2.5 text-sm font-ui font-bold hover:bg-foreground/90 transition-colors"
8647
+ }
8648
+ ),
8649
+ children: [
8650
+ "Show ",
8651
+ totalSelected > 0 ? `(${totalSelected})` : "",
8652
+ " results"
8653
+ ]
8654
+ }
8655
+ )
8656
+ ] })
8657
+ ] })
8658
+ }
8659
+ )
8660
+ ] }),
8661
+ sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8662
+ /* @__PURE__ */ jsxRuntime.jsxs(
8663
+ PopoverTrigger,
8664
+ {
8665
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8666
+ "button",
8667
+ {
8668
+ type: "button",
8669
+ className: cn(
8670
+ "inline-flex items-center gap-1.5 rounded-xl border border-border bg-background px-4 py-3",
8671
+ "text-sm font-ui font-bold text-foreground transition-colors hover:bg-muted",
8672
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8673
+ )
8674
+ }
8675
+ ),
8676
+ children: [
8677
+ "Sort",
8678
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" })
8679
+ ]
8680
+ }
8681
+ ),
8682
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { align: "end", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5 p-0.5", children: sortOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
8683
+ "button",
8684
+ {
8685
+ type: "button",
8686
+ onClick: () => onSortChange == null ? void 0 : onSortChange(opt.id),
8687
+ className: cn(
8688
+ "flex items-center px-2 py-1.5 rounded-md text-sm text-left",
8689
+ opt.id === (activeSort == null ? void 0 : activeSort.id) ? "bg-muted text-foreground font-semibold" : "text-foreground/80 hover:bg-muted"
8690
+ ),
8691
+ children: opt.label
8692
+ },
8693
+ opt.id
8694
+ )) }) })
8695
+ ] })
8696
+ ] }),
8697
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:flex items-center gap-2 flex-wrap", children: [
8698
+ resolvedGroups.map((group) => {
8699
+ var _a2, _b2;
8700
+ const selectedCount = ((_a2 = selected[group.id]) != null ? _a2 : []).length;
8701
+ const isActive = selectedCount > 0;
8702
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8703
+ /* @__PURE__ */ jsxRuntime.jsxs(
8704
+ PopoverTrigger,
8705
+ {
8706
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8707
+ "button",
8708
+ {
8709
+ type: "button",
8710
+ className: cn(
8711
+ "inline-flex items-center gap-1.5 rounded-full border px-3.5 py-1.5",
8712
+ "text-sm font-ui font-semibold transition-colors",
8713
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8714
+ isActive ? "border-foreground bg-foreground text-background" : "border-border bg-background text-foreground hover:bg-muted"
8715
+ )
8716
+ }
8717
+ ),
8718
+ children: [
8719
+ group.icon && /* @__PURE__ */ jsxRuntime.jsx(
8720
+ "span",
8721
+ {
8722
+ className: cn(
8723
+ "[&>svg]:h-3.5 [&>svg]:w-3.5",
8724
+ isActive ? "" : "text-muted-foreground"
8725
+ ),
8726
+ children: group.icon
8727
+ }
8728
+ ),
8729
+ group.label,
8730
+ selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
8731
+ "span",
8732
+ {
8733
+ className: cn(
8734
+ "inline-flex items-center justify-center rounded-full text-[10px] font-bold px-1.5 min-w-[18px] h-[18px]",
8735
+ isActive ? "bg-background text-foreground" : "bg-foreground text-background"
8736
+ ),
8737
+ children: selectedCount
8738
+ }
8739
+ ),
8740
+ /* @__PURE__ */ jsxRuntime.jsx(
8741
+ lucideReact.ChevronDownIcon,
8742
+ {
8743
+ className: cn(
8744
+ "h-3.5 w-3.5",
8745
+ isActive ? "text-background/70" : "text-muted-foreground"
8746
+ )
8747
+ }
8748
+ )
8749
+ ]
8750
+ }
8751
+ ),
8752
+ /* @__PURE__ */ jsxRuntime.jsx(
8753
+ PopoverContent,
8754
+ {
8755
+ align: "start",
8756
+ sideOffset: 6,
8757
+ className: "w-72 max-h-[60vh] overflow-y-auto",
8758
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 p-2", children: [
8759
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: group.label }),
8760
+ /* @__PURE__ */ jsxRuntime.jsx(
8761
+ FilterItemsList,
8762
+ {
8763
+ items: group.items,
8764
+ groupId: group.id,
8765
+ groupSelected: (_b2 = selected[group.id]) != null ? _b2 : [],
8766
+ onToggle: (id) => handleToggle(group.id, id),
8767
+ onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
8768
+ idPrefix: "popover-filter",
8769
+ parentAsHeader: true,
8770
+ expandedItems,
8771
+ onToggleExpanded: toggleExpanded
8772
+ }
8773
+ )
8774
+ ] })
8775
+ }
8776
+ )
8777
+ ] }, group.id);
8778
+ }),
8779
+ totalSelected > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
8780
+ "button",
8781
+ {
8782
+ type: "button",
8783
+ onClick: handleClearAll,
8784
+ className: "inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-xs font-ui font-semibold text-muted-foreground hover:text-foreground transition-colors",
8785
+ children: [
8786
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "h-3 w-3" }),
8787
+ "Clear all (",
8788
+ totalSelected,
8789
+ ")"
8790
+ ]
8791
+ }
8792
+ ),
8793
+ sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
8794
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-ui hidden sm:inline", children: "Sort by" }),
8795
+ /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8796
+ /* @__PURE__ */ jsxRuntime.jsxs(
8797
+ PopoverTrigger,
8798
+ {
8799
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8800
+ "button",
8801
+ {
8802
+ type: "button",
8803
+ className: cn(
8804
+ "inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-3.5 py-1.5",
8805
+ "text-sm font-ui font-semibold text-foreground hover:bg-muted transition-colors",
8806
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8807
+ )
8808
+ }
8809
+ ),
8810
+ children: [
8811
+ (_b = activeSort == null ? void 0 : activeSort.label) != null ? _b : "Default",
8812
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-3.5 w-3.5 text-muted-foreground" })
8813
+ ]
8814
+ }
8815
+ ),
8816
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { align: "end", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5 p-0.5", children: sortOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
8817
+ "button",
8818
+ {
8819
+ type: "button",
8820
+ onClick: () => onSortChange == null ? void 0 : onSortChange(opt.id),
8821
+ className: cn(
8822
+ "flex items-center px-2 py-1.5 rounded-md text-sm text-left",
8823
+ opt.id === (activeSort == null ? void 0 : activeSort.id) ? "bg-muted text-foreground font-semibold" : "text-foreground/80 hover:bg-muted"
8824
+ ),
8825
+ children: opt.label
8826
+ },
8827
+ opt.id
8828
+ )) }) })
8829
+ ] })
8830
+ ] })
8831
+ ] })
8832
+ ] });
8833
+ }
8339
8834
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
8340
8835
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8341
8836
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-ui", children: title }),
@@ -8346,9 +8841,9 @@ function FilterPanel({
8346
8841
  {
8347
8842
  defaultValue: defaultOpenValues,
8348
8843
  className: "flex flex-col gap-2",
8349
- children: groups.map((group) => {
8350
- var _a;
8351
- const groupSelected = (_a = selected[group.id]) != null ? _a : [];
8844
+ children: resolvedGroups.map((group) => {
8845
+ var _a2;
8846
+ const groupSelected = (_a2 = selected[group.id]) != null ? _a2 : [];
8352
8847
  return /* @__PURE__ */ jsxRuntime.jsxs(
8353
8848
  AccordionItem,
8354
8849
  {
@@ -8360,34 +8855,19 @@ function FilterPanel({
8360
8855
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
8361
8856
  groupSelected.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-primary-foreground", children: groupSelected.length })
8362
8857
  ] }) }),
8363
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => {
8364
- const checked = groupSelected.includes(item.id);
8365
- const checkboxId = `filter-${group.id}-${item.id}`;
8366
- return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
8367
- "label",
8368
- {
8369
- htmlFor: checkboxId,
8370
- className: "flex cursor-pointer items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50",
8371
- children: [
8372
- /* @__PURE__ */ jsxRuntime.jsx(
8373
- Checkbox,
8374
- {
8375
- id: checkboxId,
8376
- checked,
8377
- onCheckedChange: () => handleToggle(group.id, item.id),
8378
- className: "shrink-0"
8379
- }
8380
- ),
8381
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-foreground font-ui", children: item.label }),
8382
- item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
8383
- "(",
8384
- item.count,
8385
- ")"
8386
- ] })
8387
- ]
8388
- }
8389
- ) }, item.id);
8390
- }) }) })
8858
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
8859
+ FilterItemsList,
8860
+ {
8861
+ items: group.items,
8862
+ groupId: group.id,
8863
+ groupSelected,
8864
+ onToggle: (id) => handleToggle(group.id, id),
8865
+ onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
8866
+ idPrefix: "filter",
8867
+ expandedItems,
8868
+ onToggleExpanded: toggleExpanded
8869
+ }
8870
+ ) })
8391
8871
  ]
8392
8872
  },
8393
8873
  group.id
@@ -8408,70 +8888,182 @@ function FilterPanel({
8408
8888
  var TRUSTPILOT_SCRIPT_SRC = "https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js";
8409
8889
  function TrustpilotEmbed({ config }) {
8410
8890
  var _a, _b, _c, _d, _e, _f;
8411
- const ref = React8__namespace.useRef(null);
8412
- React8__namespace.useEffect(() => {
8891
+ const ref = React28__namespace.useRef(null);
8892
+ const [widgetReady, setWidgetReady] = React28__namespace.useState(false);
8893
+ const [delayPassed, setDelayPassed] = React28__namespace.useState(false);
8894
+ const showFallback = delayPassed && !widgetReady;
8895
+ React28__namespace.useEffect(() => {
8896
+ var _a2;
8413
8897
  if (typeof document === "undefined" || !ref.current) return;
8898
+ const node = ref.current;
8414
8899
  let cancelled = false;
8900
+ const checkRendered = () => {
8901
+ if (!node) return false;
8902
+ if (node.querySelector("iframe")) return true;
8903
+ if (node.innerHTML.length > 200) return true;
8904
+ return false;
8905
+ };
8906
+ const observer = new MutationObserver(() => {
8907
+ if (cancelled) return;
8908
+ if (checkRendered()) setWidgetReady(true);
8909
+ });
8910
+ observer.observe(node, { childList: true, subtree: true });
8911
+ if (checkRendered()) setWidgetReady(true);
8415
8912
  const initWidget = () => {
8416
- if (cancelled || !ref.current) return;
8913
+ if (cancelled || !node) return;
8417
8914
  const tp = window.Trustpilot;
8418
8915
  if (tp == null ? void 0 : tp.loadFromElement) {
8419
- tp.loadFromElement(ref.current, true);
8916
+ tp.loadFromElement(node, true);
8420
8917
  }
8421
8918
  };
8422
8919
  const existing = document.querySelector(
8423
8920
  `script[src="${TRUSTPILOT_SCRIPT_SRC}"]`
8424
8921
  );
8922
+ let cleanupScriptListener;
8425
8923
  if (existing) {
8426
8924
  const tp = window.Trustpilot;
8427
8925
  if (tp == null ? void 0 : tp.loadFromElement) {
8428
8926
  initWidget();
8429
8927
  } else {
8430
8928
  existing.addEventListener("load", initWidget, { once: true });
8929
+ cleanupScriptListener = () => existing.removeEventListener("load", initWidget);
8431
8930
  }
8432
- return () => {
8433
- cancelled = true;
8434
- existing.removeEventListener("load", initWidget);
8435
- };
8931
+ } else {
8932
+ const s = document.createElement("script");
8933
+ s.src = TRUSTPILOT_SCRIPT_SRC;
8934
+ s.async = true;
8935
+ s.addEventListener("load", initWidget, { once: true });
8936
+ document.body.appendChild(s);
8937
+ cleanupScriptListener = () => s.removeEventListener("load", initWidget);
8436
8938
  }
8437
- const s = document.createElement("script");
8438
- s.src = TRUSTPILOT_SCRIPT_SRC;
8439
- s.async = true;
8440
- s.addEventListener("load", initWidget, { once: true });
8441
- document.body.appendChild(s);
8939
+ const delay = (_a2 = config.fallbackDelayMs) != null ? _a2 : 3e3;
8940
+ const timeout = setTimeout(() => {
8941
+ if (!cancelled) setDelayPassed(true);
8942
+ }, delay);
8442
8943
  return () => {
8443
8944
  cancelled = true;
8444
- s.removeEventListener("load", initWidget);
8945
+ clearTimeout(timeout);
8946
+ observer.disconnect();
8947
+ cleanupScriptListener == null ? void 0 : cleanupScriptListener();
8445
8948
  };
8446
8949
  }, [config]);
8447
8950
  const sku = Array.isArray(config.sku) ? config.sku.join(",") : config.sku;
8448
- return /* @__PURE__ */ jsxRuntime.jsx(
8449
- "div",
8951
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8952
+ /* @__PURE__ */ jsxRuntime.jsx(
8953
+ "div",
8954
+ {
8955
+ ref,
8956
+ className: "trustpilot-widget",
8957
+ "data-locale": (_a = config.locale) != null ? _a : "en-US",
8958
+ "data-template-id": (_b = config.templateId) != null ? _b : "5763bccae0a06d08e809ecbb",
8959
+ "data-businessunit-id": config.businessUnitId,
8960
+ "data-style-height": (_c = config.styleHeight) != null ? _c : "700px",
8961
+ "data-style-width": (_d = config.styleWidth) != null ? _d : "100%",
8962
+ "data-sku": sku,
8963
+ "data-no-reviews": (_e = config.noReviews) != null ? _e : "hide",
8964
+ "data-fullwidth": "true",
8965
+ "data-theme": config.theme,
8966
+ "data-token": config.token,
8967
+ "data-scroll-to-list": config.scrollToList ? "true" : void 0,
8968
+ "data-style-alignment": config.styleAlignment,
8969
+ "data-star-color": config.starColor,
8970
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8971
+ "a",
8972
+ {
8973
+ href: (_f = config.fallbackHref) != null ? _f : "https://www.trustpilot.com/",
8974
+ target: "_blank",
8975
+ rel: "noopener noreferrer",
8976
+ children: "Trustpilot"
8977
+ }
8978
+ )
8979
+ }
8980
+ ),
8981
+ showFallback && /* @__PURE__ */ jsxRuntime.jsx(TrustpilotFallback, { config })
8982
+ ] });
8983
+ }
8984
+ function FallbackStar({ filled, className }) {
8985
+ return /* @__PURE__ */ jsxRuntime.jsx(
8986
+ "span",
8450
8987
  {
8451
- ref,
8452
- className: "trustpilot-widget",
8453
- "data-locale": (_a = config.locale) != null ? _a : "en-US",
8454
- "data-template-id": (_b = config.templateId) != null ? _b : "5763bccae0a06d08e809ecbb",
8455
- "data-businessunit-id": config.businessUnitId,
8456
- "data-style-height": (_c = config.styleHeight) != null ? _c : "700px",
8457
- "data-style-width": (_d = config.styleWidth) != null ? _d : "100%",
8458
- "data-sku": sku,
8459
- "data-no-reviews": (_e = config.noReviews) != null ? _e : "hide",
8460
- "data-fullwidth": "true",
8461
- "data-theme": config.theme,
8462
- "data-token": config.token,
8463
- "data-scroll-to-list": config.scrollToList ? "true" : void 0,
8464
- "data-style-alignment": config.styleAlignment,
8465
- "data-star-color": config.starColor,
8466
- children: /* @__PURE__ */ jsxRuntime.jsx(
8467
- "a",
8468
- {
8469
- href: (_f = config.fallbackHref) != null ? _f : "https://www.trustpilot.com/",
8470
- target: "_blank",
8471
- rel: "noopener noreferrer",
8472
- children: "Trustpilot"
8473
- }
8474
- )
8988
+ "aria-hidden": true,
8989
+ className: cn(
8990
+ "inline-flex items-center justify-center",
8991
+ filled ? "bg-[#00b67a] text-white" : "bg-muted text-muted-foreground",
8992
+ className
8993
+ ),
8994
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-[60%] w-[60%]", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }) })
8995
+ }
8996
+ );
8997
+ }
8998
+ function TrustpilotFallback({ config }) {
8999
+ var _a, _b, _c, _d, _e, _f;
9000
+ const score = (_a = config.fallbackScore) != null ? _a : 4.8;
9001
+ const count = (_b = config.fallbackCount) != null ? _b : 0;
9002
+ const label = (_c = config.fallbackLabel) != null ? _c : "Excellent";
9003
+ const href = (_d = config.fallbackHref) != null ? _d : "https://www.trustpilot.com/";
9004
+ const isDark = config.theme === "dark";
9005
+ const styleHeightPx = parseInt((_e = config.styleHeight) != null ? _e : "", 10);
9006
+ const autoVariant = Number.isFinite(styleHeightPx) && styleHeightPx > 0 && styleHeightPx < 120 ? "mini" : "card";
9007
+ const variant = (_f = config.fallbackVariant) != null ? _f : autoVariant;
9008
+ const filledStars = Math.round(score);
9009
+ if (variant === "mini") {
9010
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9011
+ "a",
9012
+ {
9013
+ href,
9014
+ target: "_blank",
9015
+ rel: "noopener noreferrer",
9016
+ className: cn(
9017
+ "inline-flex items-center gap-2 text-sm font-ui no-underline hover:opacity-80 transition-opacity",
9018
+ isDark ? "text-white" : "text-foreground"
9019
+ ),
9020
+ children: [
9021
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(FallbackStar, { filled: i < filledStars, className: "h-4 w-4 rounded-[2px]" }, i)) }),
9022
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold", children: score.toFixed(1) }),
9023
+ count > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9024
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(isDark ? "text-white/60" : "text-muted-foreground"), children: "\xB7" }),
9025
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("text-xs", isDark ? "text-white/80" : "text-muted-foreground"), children: [
9026
+ count.toLocaleString(),
9027
+ " reviews"
9028
+ ] })
9029
+ ] }),
9030
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs", isDark ? "text-white/60" : "text-muted-foreground"), children: "on Trustpilot" })
9031
+ ]
9032
+ }
9033
+ );
9034
+ }
9035
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9036
+ "a",
9037
+ {
9038
+ href,
9039
+ target: "_blank",
9040
+ rel: "noopener noreferrer",
9041
+ className: "block max-w-md mx-auto rounded-2xl border border-border bg-card p-8 text-center no-underline shadow-sm hover:shadow-md transition-shadow",
9042
+ children: [
9043
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center gap-1 mb-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(FallbackStar, { filled: i < filledStars, className: "h-7 w-7 rounded-[3px]" }, i)) }),
9044
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-2xl font-bold text-foreground font-heading", children: [
9045
+ label,
9046
+ " ",
9047
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-normal", children: [
9048
+ "\xB7 ",
9049
+ score.toFixed(1),
9050
+ " / 5"
9051
+ ] })
9052
+ ] }),
9053
+ count > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-2", children: [
9054
+ "Based on ",
9055
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: count.toLocaleString() }),
9056
+ " reviews"
9057
+ ] }),
9058
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-4", children: "Reviews powered by Trustpilot" }),
9059
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-5 inline-flex items-center gap-1.5 text-sm font-semibold text-primary border-b border-primary/40 pb-0.5", children: [
9060
+ "Read all reviews on Trustpilot",
9061
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
9062
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
9063
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 5 19 12 12 19" })
9064
+ ] })
9065
+ ] })
9066
+ ]
8475
9067
  }
8476
9068
  );
8477
9069
  }
@@ -8541,11 +9133,11 @@ function ItineraryModal({
8541
9133
  onNext
8542
9134
  }) {
8543
9135
  var _a, _b, _c;
8544
- const [imgIndex, setImgIndex] = React8__namespace.useState(0);
9136
+ const [imgIndex, setImgIndex] = React28__namespace.useState(0);
8545
9137
  const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
8546
9138
  const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
8547
9139
  const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
8548
- React8__namespace.useEffect(() => {
9140
+ React28__namespace.useEffect(() => {
8549
9141
  setImgIndex(0);
8550
9142
  }, [stop == null ? void 0 : stop.dayNumber]);
8551
9143
  if (!stop) return null;
@@ -8672,8 +9264,8 @@ function ItineraryModal({
8672
9264
  ) });
8673
9265
  }
8674
9266
  function Itinerary({ title, subtitle, stops, className }) {
8675
- const [activeIndex, setActiveIndex] = React8__namespace.useState(null);
8676
- const scrollRef = React8__namespace.useRef(null);
9267
+ const [activeIndex, setActiveIndex] = React28__namespace.useState(null);
9268
+ const scrollRef = React28__namespace.useRef(null);
8677
9269
  const activeStop = activeIndex !== null ? stops[activeIndex] : null;
8678
9270
  const scrollBy = (dir) => {
8679
9271
  if (!scrollRef.current) return;
@@ -8765,18 +9357,18 @@ function Lightbox({
8765
9357
  onClose
8766
9358
  }) {
8767
9359
  var _a;
8768
- const [index, setIndex] = React8__namespace.useState(initialIndex);
9360
+ const [index, setIndex] = React28__namespace.useState(initialIndex);
8769
9361
  const total = photos.length;
8770
9362
  const photo = photos[index];
8771
- const prev = React8__namespace.useCallback(
9363
+ const prev = React28__namespace.useCallback(
8772
9364
  () => setIndex((i) => (i - 1 + total) % total),
8773
9365
  [total]
8774
9366
  );
8775
- const next = React8__namespace.useCallback(
9367
+ const next = React28__namespace.useCallback(
8776
9368
  () => setIndex((i) => (i + 1) % total),
8777
9369
  [total]
8778
9370
  );
8779
- React8__namespace.useEffect(() => {
9371
+ React28__namespace.useEffect(() => {
8780
9372
  const onKey = (e) => {
8781
9373
  if (e.key === "Escape") onClose();
8782
9374
  if (e.key === "ArrowLeft") prev();
@@ -8942,7 +9534,7 @@ function GridGallery({
8942
9534
  initialVisible,
8943
9535
  onOpen
8944
9536
  }) {
8945
- const [expanded, setExpanded] = React8__namespace.useState(false);
9537
+ const [expanded, setExpanded] = React28__namespace.useState(false);
8946
9538
  const cols = gridCols(photos.length);
8947
9539
  const hasMore = photos.length > initialVisible;
8948
9540
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
@@ -8967,12 +9559,41 @@ function GridGallery({
8967
9559
  )
8968
9560
  ] });
8969
9561
  }
9562
+ function CompactGridGallery({
9563
+ photos,
9564
+ initialVisible,
9565
+ onOpen
9566
+ }) {
9567
+ const [expanded, setExpanded] = React28__namespace.useState(false);
9568
+ const hasMore = photos.length > initialVisible;
9569
+ const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
9570
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9571
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4", children: visible.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
9572
+ PhotoTile,
9573
+ {
9574
+ photo: p,
9575
+ index: i,
9576
+ className: "aspect-[4/3]",
9577
+ onClick: () => onOpen(i)
9578
+ },
9579
+ i
9580
+ )) }),
9581
+ hasMore && /* @__PURE__ */ jsxRuntime.jsx(
9582
+ ShowMoreButton,
9583
+ {
9584
+ count: photos.length - initialVisible,
9585
+ expanded,
9586
+ onClick: () => setExpanded((v) => !v)
9587
+ }
9588
+ )
9589
+ ] });
9590
+ }
8970
9591
  function MasonryGallery({
8971
9592
  photos,
8972
9593
  initialVisible,
8973
9594
  onOpen
8974
9595
  }) {
8975
- const [expanded, setExpanded] = React8__namespace.useState(false);
9596
+ const [expanded, setExpanded] = React28__namespace.useState(false);
8976
9597
  const hasMore = photos.length > initialVisible;
8977
9598
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
8978
9599
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -9045,7 +9666,7 @@ function FeaturedGallery({
9045
9666
  photos,
9046
9667
  onOpen
9047
9668
  }) {
9048
- const [expanded, setExpanded] = React8__namespace.useState(false);
9669
+ const [expanded, setExpanded] = React28__namespace.useState(false);
9049
9670
  const featured = photos.slice(0, 3);
9050
9671
  const extra = photos.slice(3);
9051
9672
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -9212,9 +9833,9 @@ function PhotoGallery({
9212
9833
  onPhotoClick,
9213
9834
  className
9214
9835
  }) {
9215
- const [lightboxIndex, setLightboxIndex] = React8__namespace.useState(null);
9216
- const [carouselIndex, setCarouselIndex] = React8__namespace.useState(0);
9217
- const normalised = React8__namespace.useMemo(() => photos.map(normalise), [photos]);
9836
+ const [lightboxIndex, setLightboxIndex] = React28__namespace.useState(null);
9837
+ const [carouselIndex, setCarouselIndex] = React28__namespace.useState(0);
9838
+ const normalised = React28__namespace.useMemo(() => photos.map(normalise), [photos]);
9218
9839
  const handleOpen = (index) => {
9219
9840
  setLightboxIndex(index);
9220
9841
  onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
@@ -9256,6 +9877,14 @@ function PhotoGallery({
9256
9877
  onOpen: handleOpen
9257
9878
  }
9258
9879
  ),
9880
+ variant === "gridCompact" && /* @__PURE__ */ jsxRuntime.jsx(
9881
+ CompactGridGallery,
9882
+ {
9883
+ photos: normalised,
9884
+ initialVisible,
9885
+ onOpen: handleOpen
9886
+ }
9887
+ ),
9259
9888
  variant === "masonry" && /* @__PURE__ */ jsxRuntime.jsx(
9260
9889
  MasonryGallery,
9261
9890
  {
@@ -9290,7 +9919,7 @@ function ItineraryDay({
9290
9919
  photoLayout = "rounded",
9291
9920
  className
9292
9921
  }) {
9293
- const photoList = React8__namespace.useMemo(() => normalisePhotos(photos), [photos]);
9922
+ const photoList = React28__namespace.useMemo(() => normalisePhotos(photos), [photos]);
9294
9923
  const isFullBleed = photoLayout === "fullBleed" || photoLayout === "fullBleedBottom";
9295
9924
  const photoPosition = photoLayout === "fullBleedBottom" ? "bottom" : "top";
9296
9925
  const gallery = photoList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9309,13 +9938,16 @@ function ItineraryDay({
9309
9938
  specs && specs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-3 sm:gap-2.5", children: specs.map((spec, i) => /* @__PURE__ */ jsxRuntime.jsxs(
9310
9939
  "li",
9311
9940
  {
9312
- className: "flex flex-col text-base text-foreground font-ui",
9941
+ className: "flex items-start gap-3 text-base text-foreground font-ui",
9313
9942
  children: [
9314
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
9315
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
9316
- spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
9317
- ] }),
9318
- spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
9943
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0 text-foreground", "aria-hidden": true, children: spec.icon }),
9944
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
9945
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
9946
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
9947
+ spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
9948
+ ] }),
9949
+ spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
9950
+ ] })
9319
9951
  ]
9320
9952
  },
9321
9953
  i
@@ -9342,8 +9974,8 @@ function MenuTrip({
9342
9974
  bold = true,
9343
9975
  className
9344
9976
  }) {
9345
- const scrollRef = React8__namespace.useRef(null);
9346
- React8__namespace.useEffect(() => {
9977
+ const scrollRef = React28__namespace.useRef(null);
9978
+ React28__namespace.useEffect(() => {
9347
9979
  if (!scrollRef.current || !activeSection) return;
9348
9980
  const container = scrollRef.current;
9349
9981
  const btn = container.querySelector(
@@ -9534,8 +10166,8 @@ function PricingTrip({
9534
10166
  className
9535
10167
  }) {
9536
10168
  const rOuter = sharp ? "rounded-none" : "rounded-2xl";
9537
- const [showEstimates, setShowEstimates] = React8__namespace.useState(false);
9538
- const [showPriceInfo, setShowPriceInfo] = React8__namespace.useState(false);
10169
+ const [showEstimates, setShowEstimates] = React28__namespace.useState(false);
10170
+ const [showPriceInfo, setShowPriceInfo] = React28__namespace.useState(false);
9539
10171
  if (variant === "compact") {
9540
10172
  const showOverlay = showPriceInfo && (!!priceInfo || !!currencyEstimates && currencyEstimates.length > 0);
9541
10173
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
@@ -9819,8 +10451,7 @@ var VARIANT = {
9819
10451
  mobileLink: "text-white hover:text-primary-400 border-b border-white/10",
9820
10452
  mobileSub: "text-white/70 font-bold hover:text-primary-400 border-b border-white/8",
9821
10453
  mobileLangActive: "text-primary-400 font-semibold",
9822
- mobileLangIdle: "text-white/40 hover:text-primary-400",
9823
- logoBlend: "mix-blend-screen"
10454
+ mobileLangIdle: "text-white/40 hover:text-primary-400"
9824
10455
  },
9825
10456
  white: {
9826
10457
  header: "bg-white border-b border-border shadow-sm",
@@ -9836,8 +10467,7 @@ var VARIANT = {
9836
10467
  mobileLink: "text-foreground/80 hover:text-foreground border-b border-border",
9837
10468
  mobileSub: "text-foreground/50 font-bold hover:text-foreground border-b border-border/40",
9838
10469
  mobileLangActive: "text-primary font-semibold",
9839
- mobileLangIdle: "text-muted-foreground hover:text-foreground",
9840
- logoBlend: "invert mix-blend-multiply"
10470
+ mobileLangIdle: "text-muted-foreground hover:text-foreground"
9841
10471
  },
9842
10472
  dark: {
9843
10473
  header: "bg-neutral-950 border-b border-white/10",
@@ -9853,8 +10483,7 @@ var VARIANT = {
9853
10483
  mobileLink: "text-white/80 hover:text-white border-b border-white/8",
9854
10484
  mobileSub: "text-white/45 font-bold hover:text-white border-b border-white/5",
9855
10485
  mobileLangActive: "text-white font-semibold",
9856
- mobileLangIdle: "text-white/35 hover:text-white/60",
9857
- logoBlend: "mix-blend-screen"
10486
+ mobileLangIdle: "text-white/35 hover:text-white/60"
9858
10487
  }
9859
10488
  };
9860
10489
  var DEFAULT_HEADER_LINKS = [
@@ -9964,7 +10593,9 @@ function LangDropdown({
9964
10593
  function SiteHeader({
9965
10594
  variant = "transparent",
9966
10595
  links = DEFAULT_HEADER_LINKS,
9967
- logoSrc = "/logo-planetaexo.png",
10596
+ logoSrcLight = "/logo-planetaexo-white.png",
10597
+ logoSrcDark = "/logo-planetaexo-green.png",
10598
+ logoSrc,
9968
10599
  logoAlt = "Planeta Exo",
9969
10600
  languages = DEFAULT_LANGUAGES,
9970
10601
  currentLanguage = "EN",
@@ -9975,14 +10606,15 @@ function SiteHeader({
9975
10606
  className
9976
10607
  }) {
9977
10608
  const t = VARIANT[variant];
9978
- const [openMenu, setOpenMenu] = React8__namespace.useState(null);
9979
- const [langOpen, setLangOpen] = React8__namespace.useState(false);
9980
- const [mobileOpen, setMobileOpen] = React8__namespace.useState(false);
9981
- const [openMobileSection, setOpenMobileSection] = React8__namespace.useState(null);
9982
- const [activeLang, setActiveLang] = React8__namespace.useState(currentLanguage);
10609
+ const resolvedLogo = logoSrc != null ? logoSrc : variant === "white" ? logoSrcDark : logoSrcLight;
10610
+ const [openMenu, setOpenMenu] = React28__namespace.useState(null);
10611
+ const [langOpen, setLangOpen] = React28__namespace.useState(false);
10612
+ const [mobileOpen, setMobileOpen] = React28__namespace.useState(false);
10613
+ const [openMobileSection, setOpenMobileSection] = React28__namespace.useState(null);
10614
+ const [activeLang, setActiveLang] = React28__namespace.useState(currentLanguage);
9983
10615
  const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
9984
- const menuCloseTimer = React8__namespace.useRef(void 0);
9985
- const langCloseTimer = React8__namespace.useRef(void 0);
10616
+ const menuCloseTimer = React28__namespace.useRef(void 0);
10617
+ const langCloseTimer = React28__namespace.useRef(void 0);
9986
10618
  const handleMenuEnter = (label) => {
9987
10619
  clearTimeout(menuCloseTimer.current);
9988
10620
  setOpenMenu(label);
@@ -10003,7 +10635,7 @@ function SiteHeader({
10003
10635
  setOpenMenu(null);
10004
10636
  setLangOpen(false);
10005
10637
  };
10006
- React8__namespace.useEffect(() => () => {
10638
+ React28__namespace.useEffect(() => () => {
10007
10639
  clearTimeout(menuCloseTimer.current);
10008
10640
  clearTimeout(langCloseTimer.current);
10009
10641
  }, []);
@@ -10023,17 +10655,41 @@ function SiteHeader({
10023
10655
  className
10024
10656
  ),
10025
10657
  children: [
10026
- variant === "transparent" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-52 bg-gradient-to-b from-black/55 via-black/20 to-transparent pointer-events-none" }),
10658
+ variant === "transparent" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-52 bg-gradient-to-b from-black/70 via-black/30 to-transparent pointer-events-none" }),
10027
10659
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center gap-2 px-6 sm:px-10 h-[72px]", children: [
10028
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "shrink-0 flex items-center mr-4", children: /* @__PURE__ */ jsxRuntime.jsx(
10029
- "img",
10660
+ /* @__PURE__ */ jsxRuntime.jsx(
10661
+ "button",
10030
10662
  {
10031
- src: logoSrc,
10032
- alt: logoAlt,
10033
- className: cn("h-11 w-auto select-none", t.logoBlend),
10034
- draggable: false
10663
+ type: "button",
10664
+ onClick: () => setMobileOpen(true),
10665
+ "aria-label": "Open menu",
10666
+ className: cn(
10667
+ "flex lg:hidden h-9 w-9 items-center justify-center rounded-full transition-colors -ml-1.5",
10668
+ t.mobileTrigger
10669
+ ),
10670
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MenuIcon, { className: "h-[18px] w-[18px]" })
10035
10671
  }
10036
- ) }),
10672
+ ),
10673
+ /* @__PURE__ */ jsxRuntime.jsx(
10674
+ "a",
10675
+ {
10676
+ href: "#",
10677
+ className: cn(
10678
+ "shrink-0 flex items-center",
10679
+ "absolute left-1/2 -translate-x-1/2",
10680
+ "lg:static lg:translate-x-0 lg:mr-4"
10681
+ ),
10682
+ children: /* @__PURE__ */ jsxRuntime.jsx(
10683
+ "img",
10684
+ {
10685
+ src: resolvedLogo,
10686
+ alt: logoAlt,
10687
+ className: "h-14 w-auto select-none",
10688
+ draggable: false
10689
+ }
10690
+ )
10691
+ }
10692
+ ),
10037
10693
  /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "hidden lg:flex items-center gap-0.5 mx-auto", children: links.map((link) => {
10038
10694
  var _a, _b;
10039
10695
  const hasDropdown = !!((_a = link.items) == null ? void 0 : _a.length);
@@ -10157,19 +10813,6 @@ function SiteHeader({
10157
10813
  ),
10158
10814
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserIcon, { className: "h-[18px] w-[18px]" })
10159
10815
  }
10160
- ),
10161
- /* @__PURE__ */ jsxRuntime.jsx(
10162
- "button",
10163
- {
10164
- type: "button",
10165
- onClick: () => setMobileOpen(true),
10166
- "aria-label": "Open menu",
10167
- className: cn(
10168
- "flex lg:hidden h-9 w-9 items-center justify-center rounded-full transition-colors ml-0.5",
10169
- t.mobileTrigger
10170
- ),
10171
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MenuIcon, { className: "h-[18px] w-[18px]" })
10172
- }
10173
10816
  )
10174
10817
  ] })
10175
10818
  ] }),
@@ -10185,9 +10828,9 @@ function SiteHeader({
10185
10828
  /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "shrink-0 flex items-center", onClick: () => setMobileOpen(false), children: /* @__PURE__ */ jsxRuntime.jsx(
10186
10829
  "img",
10187
10830
  {
10188
- src: logoSrc,
10831
+ src: resolvedLogo,
10189
10832
  alt: logoAlt,
10190
- className: cn("h-11 w-auto select-none", t.logoBlend),
10833
+ className: "h-14 w-auto select-none",
10191
10834
  draggable: false
10192
10835
  }
10193
10836
  ) }),
@@ -10268,7 +10911,7 @@ function SiteHeader({
10268
10911
  ), children: [
10269
10912
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
10270
10913
  const isActive = lang.code === activeLang;
10271
- return /* @__PURE__ */ jsxRuntime.jsxs(React8__namespace.Fragment, { children: [
10914
+ return /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
10272
10915
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
10273
10916
  "text-xs select-none",
10274
10917
  variant === "white" ? "text-border" : "text-white/15"
@@ -10330,8 +10973,8 @@ function SiteHeader({
10330
10973
  );
10331
10974
  }
10332
10975
  function ThemeToggle({ className }) {
10333
- const [dark, setDark] = React8__namespace.useState(false);
10334
- React8__namespace.useEffect(() => {
10976
+ const [dark, setDark] = React28__namespace.useState(false);
10977
+ React28__namespace.useEffect(() => {
10335
10978
  const saved = localStorage.getItem("theme");
10336
10979
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
10337
10980
  const isDark = saved === "dark" || !saved && prefersDark;
@@ -10360,6 +11003,44 @@ function ThemeToggle({ className }) {
10360
11003
  }
10361
11004
  );
10362
11005
  }
11006
+ var chipVariants = classVarianceAuthority.cva(
11007
+ "inline-flex items-center rounded-full font-ui font-medium transition-colors whitespace-nowrap",
11008
+ {
11009
+ variants: {
11010
+ variant: {
11011
+ glass: "border border-white/15 bg-black/30 text-white/85 backdrop-blur-sm hover:bg-white/10 hover:border-white/50 hover:text-white",
11012
+ solid: "bg-muted text-foreground/80 hover:bg-primary hover:text-primary-foreground",
11013
+ outline: "border border-border text-foreground/80 hover:bg-primary hover:border-primary hover:text-primary-foreground"
11014
+ },
11015
+ size: {
11016
+ sm: "px-2.5 py-0.5 text-[11px] leading-5",
11017
+ md: "px-3 py-1 text-xs leading-5",
11018
+ lg: "px-4 py-1.5 text-sm leading-5"
11019
+ }
11020
+ },
11021
+ defaultVariants: {
11022
+ variant: "glass",
11023
+ size: "sm"
11024
+ }
11025
+ }
11026
+ );
11027
+ var Chip = React28__namespace.forwardRef(function Chip2(_a, ref) {
11028
+ var _b = _a, { className, variant, size, href, children } = _b, props = __objRest(_b, ["className", "variant", "size", "href", "children"]);
11029
+ const classes = cn(chipVariants({ variant, size }), className);
11030
+ if (href) {
11031
+ return /* @__PURE__ */ jsxRuntime.jsx(
11032
+ "a",
11033
+ __spreadProps(__spreadValues({
11034
+ ref,
11035
+ href,
11036
+ className: classes
11037
+ }, props), {
11038
+ children
11039
+ })
11040
+ );
11041
+ }
11042
+ return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({ ref, className: classes }, props), { children }));
11043
+ });
10363
11044
  function CalendarIcon6() {
10364
11045
  return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
10365
11046
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
@@ -10410,19 +11091,125 @@ var statusConfig = {
10410
11091
  icon: /* @__PURE__ */ jsxRuntime.jsx(TrendingIcon, {})
10411
11092
  }
10412
11093
  };
10413
- function TripCard({
10414
- image,
10415
- imageAlt = "",
10416
- status,
10417
- nights,
10418
- period,
10419
- title,
10420
- description,
10421
- cta,
10422
- price,
10423
- size = "md",
10424
- className
10425
- }) {
11094
+ function HeartIcon({ filled = false }) {
11095
+ return /* @__PURE__ */ jsxRuntime.jsx(
11096
+ "svg",
11097
+ {
11098
+ width: "16",
11099
+ height: "16",
11100
+ viewBox: "0 0 24 24",
11101
+ fill: filled ? "currentColor" : "none",
11102
+ stroke: "currentColor",
11103
+ strokeWidth: "2",
11104
+ strokeLinecap: "round",
11105
+ strokeLinejoin: "round",
11106
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
11107
+ }
11108
+ );
11109
+ }
11110
+ function TripCardEditorial(props) {
11111
+ const {
11112
+ image,
11113
+ imageAlt = "",
11114
+ title,
11115
+ description,
11116
+ nights,
11117
+ price,
11118
+ href,
11119
+ className,
11120
+ favoritable,
11121
+ favorited: favoritedProp,
11122
+ onFavoriteToggle,
11123
+ location,
11124
+ difficulty,
11125
+ tag
11126
+ } = props;
11127
+ const [internalFav, setInternalFav] = React28__namespace.useState(false);
11128
+ const favorited = favoritedProp != null ? favoritedProp : internalFav;
11129
+ const handleFav = (e) => {
11130
+ e.preventDefault();
11131
+ e.stopPropagation();
11132
+ const next = !favorited;
11133
+ if (favoritedProp === void 0) setInternalFav(next);
11134
+ onFavoriteToggle == null ? void 0 : onFavoriteToggle(next);
11135
+ };
11136
+ const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11137
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative aspect-[4/3] overflow-hidden bg-muted", children: [
11138
+ /* @__PURE__ */ jsxRuntime.jsx(
11139
+ "img",
11140
+ {
11141
+ src: image,
11142
+ alt: imageAlt,
11143
+ loading: "lazy",
11144
+ className: "absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
11145
+ }
11146
+ ),
11147
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent" }),
11148
+ tag && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-3 left-3 z-10 max-w-[calc(100%-4.5rem)]", children: /* @__PURE__ */ jsxRuntime.jsx(Chip, { variant: "glass", size: "sm", children: tag }) }),
11149
+ favoritable && /* @__PURE__ */ jsxRuntime.jsx(
11150
+ "button",
11151
+ {
11152
+ type: "button",
11153
+ "aria-label": favorited ? "Remove from favorites" : "Add to favorites",
11154
+ "aria-pressed": favorited,
11155
+ onClick: handleFav,
11156
+ className: cn(
11157
+ "absolute top-3 right-3 flex h-9 w-9 items-center justify-center rounded-full",
11158
+ "border border-white/15 bg-black/30 backdrop-blur-sm",
11159
+ "transition-colors hover:bg-white/10 hover:border-white/50",
11160
+ favorited ? "text-white" : "text-white/85 hover:text-white"
11161
+ ),
11162
+ children: /* @__PURE__ */ jsxRuntime.jsx(HeartIcon, { filled: favorited })
11163
+ }
11164
+ ),
11165
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 p-5 text-white", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg sm:text-xl font-bold font-heading leading-tight", children: title }) })
11166
+ ] }),
11167
+ (description || price || nights || location || difficulty) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 bg-card p-6", children: [
11168
+ (location || difficulty) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
11169
+ location ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-foreground/85", children: [
11170
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPinIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
11171
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-ui font-semibold", children: location })
11172
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
11173
+ difficulty && /* @__PURE__ */ jsxRuntime.jsx(Chip, { variant: "outline", size: "sm", className: "capitalize text-muted-foreground", children: difficulty })
11174
+ ] }),
11175
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed line-clamp-3", children: description }),
11176
+ (nights || price) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-auto flex items-center justify-between gap-3", children: [
11177
+ nights ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-foreground/80", children: [
11178
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoonIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
11179
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-ui font-semibold", children: [
11180
+ nights,
11181
+ " ",
11182
+ nights === 1 ? "night" : "nights"
11183
+ ] })
11184
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
11185
+ price && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-bold text-foreground font-ui", children: price })
11186
+ ] })
11187
+ ] })
11188
+ ] });
11189
+ const baseClasses = cn(
11190
+ "group relative flex flex-col overflow-hidden rounded-2xl bg-card border border-border/50",
11191
+ "shadow-md transition-shadow duration-300 hover:shadow-xl",
11192
+ className
11193
+ );
11194
+ return href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: baseClasses, "aria-label": title, children: body }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: baseClasses, children: body });
11195
+ }
11196
+ function TripCard(props) {
11197
+ if (props.variant === "editorial") {
11198
+ return /* @__PURE__ */ jsxRuntime.jsx(TripCardEditorial, __spreadValues({}, props));
11199
+ }
11200
+ const {
11201
+ image,
11202
+ imageAlt = "",
11203
+ status,
11204
+ nights,
11205
+ period,
11206
+ title,
11207
+ description,
11208
+ cta,
11209
+ price,
11210
+ size = "md",
11211
+ className
11212
+ } = props;
10426
11213
  const s = sizeConfig[size];
10427
11214
  const statusInfo = status ? statusConfig[status] : null;
10428
11215
  const meta = [
@@ -10482,7 +11269,7 @@ function TripCard({
10482
11269
  );
10483
11270
  }
10484
11271
  function useHlsVideo(videoRef, src) {
10485
- React8__namespace.useEffect(() => {
11272
+ React28__namespace.useEffect(() => {
10486
11273
  if (!src || !videoRef.current) return;
10487
11274
  const video = videoRef.current;
10488
11275
  if (!src.includes(".m3u8")) return;
@@ -10519,17 +11306,18 @@ function TripHeader({
10519
11306
  destination,
10520
11307
  duration,
10521
11308
  tagline,
11309
+ chips,
10522
11310
  belowMeta,
10523
11311
  siteHeader,
10524
11312
  uiVariant = "v1",
10525
11313
  className
10526
11314
  }) {
10527
11315
  var _a;
10528
- const [heroIndex, setHeroIndex] = React8__namespace.useState(0);
10529
- const [videoReady, setVideoReady] = React8__namespace.useState(false);
10530
- const videoRef = React8__namespace.useRef(null);
11316
+ const [heroIndex, setHeroIndex] = React28__namespace.useState(0);
11317
+ const [videoReady, setVideoReady] = React28__namespace.useState(false);
11318
+ const videoRef = React28__namespace.useRef(null);
10531
11319
  const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
10532
- const validImages = React8__namespace.useMemo(
11320
+ const validImages = React28__namespace.useMemo(
10533
11321
  () => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
10534
11322
  [images]
10535
11323
  );
@@ -10544,7 +11332,7 @@ function TripHeader({
10544
11332
  const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
10545
11333
  const hasMeta = !!(destination || duration);
10546
11334
  useHlsVideo(videoRef, isHls ? videoUrl : void 0);
10547
- React8__namespace.useEffect(() => {
11335
+ React28__namespace.useEffect(() => {
10548
11336
  if (!videoUrl) return;
10549
11337
  const el = videoRef.current;
10550
11338
  if (!el) return;
@@ -10678,15 +11466,15 @@ function TripHeader({
10678
11466
  ]
10679
11467
  }
10680
11468
  ),
10681
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-5xl px-4 sm:px-6", children: /* @__PURE__ */ jsxRuntime.jsxs(
11469
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-6xl px-6 sm:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs(
10682
11470
  "div",
10683
11471
  {
10684
11472
  className: cn(
10685
11473
  "relative z-10 pb-10",
10686
- siteHeader ? "-mt-44" : "-mt-36"
11474
+ chips && chips.length > 0 ? siteHeader ? "-mt-[200px] sm:-mt-[214px]" : "-mt-[168px] sm:-mt-[182px]" : siteHeader ? "-mt-44" : "-mt-36"
10687
11475
  ),
10688
11476
  children: [
10689
- breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(React8__namespace.Fragment, { children: [
11477
+ breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
10690
11478
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
10691
11479
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
10692
11480
  ] }, i)) }),
@@ -10712,6 +11500,7 @@ function TripHeader({
10712
11500
  ] })
10713
11501
  ] })
10714
11502
  ] }) : tagline ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm sm:text-base text-white/80 font-ui", children: tagline }) : null,
11503
+ chips && chips.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: chips.map((chip, i) => /* @__PURE__ */ jsxRuntime.jsx(Chip, { href: chip.href, children: chip.label }, i)) }),
10715
11504
  belowMeta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: belowMeta })
10716
11505
  ]
10717
11506
  }
@@ -10720,6 +11509,427 @@ function TripHeader({
10720
11509
  }
10721
11510
  );
10722
11511
  }
11512
+ var VARIANT2 = {
11513
+ light: {
11514
+ footer: "bg-primary-50 text-foreground",
11515
+ heading: "text-foreground",
11516
+ body: "text-foreground/75",
11517
+ muted: "text-foreground/60",
11518
+ link: "text-foreground/85 hover:text-primary-800 underline decoration-foreground/25 underline-offset-4 hover:decoration-primary-800",
11519
+ badgeStroke: "text-foreground/80",
11520
+ /** Inverts white logos so they read on the light background. */
11521
+ badgeFilter: "[filter:invert(1)_brightness(0.2)]",
11522
+ socialBtn: "bg-foreground text-white hover:bg-primary-800",
11523
+ langTrigger: "text-foreground hover:bg-white",
11524
+ langOpen: "text-foreground bg-white",
11525
+ langChevron: "text-foreground/40",
11526
+ bottomBar: "border-t border-foreground/10",
11527
+ bottomText: "text-foreground/60",
11528
+ bottomLink: "text-foreground/80 hover:text-foreground underline decoration-foreground/20 underline-offset-4 hover:decoration-foreground"
11529
+ },
11530
+ dark: {
11531
+ footer: "bg-brand-charcoal text-white",
11532
+ heading: "text-white",
11533
+ body: "text-white/75",
11534
+ muted: "text-white/55",
11535
+ link: "text-white/85 hover:text-primary-400 underline decoration-white/20 underline-offset-4 hover:decoration-primary-400",
11536
+ badgeStroke: "text-white",
11537
+ badgeFilter: "",
11538
+ socialBtn: "bg-white/10 text-white hover:bg-primary-400 hover:text-primary-900",
11539
+ langTrigger: "text-white/85 hover:bg-white/10",
11540
+ langOpen: "text-white bg-white/10",
11541
+ langChevron: "text-white/40",
11542
+ bottomBar: "border-t border-white/10",
11543
+ bottomText: "text-white/55",
11544
+ bottomLink: "text-white/80 hover:text-white underline decoration-white/20 underline-offset-4 hover:decoration-white"
11545
+ }
11546
+ };
11547
+ var DEFAULT_FOOTER_THEMES = [
11548
+ { label: "Roadtrips", href: "#" },
11549
+ { label: "Saf\xE1ri", href: "#" },
11550
+ { label: "Trilhas", href: "#" },
11551
+ { label: "Caiaque & Canoa", href: "#" },
11552
+ { label: "Aurora boreal", href: "#" },
11553
+ { label: "Micro-aventuras", href: "#" },
11554
+ { label: "Packrafting", href: "#" },
11555
+ { label: "Glamping", href: "#" },
11556
+ { label: "Surf", href: "#" },
11557
+ { label: "Viagens em fam\xEDlia", href: "#" }
11558
+ ];
11559
+ var DEFAULT_FOOTER_DESTINATIONS = [
11560
+ { label: "Brasil", href: "#" },
11561
+ { label: "Patag\xF4nia", href: "#" },
11562
+ { label: "Argentina", href: "#" },
11563
+ { label: "Chile", href: "#" },
11564
+ { label: "Bol\xEDvia", href: "#" },
11565
+ { label: "Peru", href: "#" },
11566
+ { label: "Equador", href: "#" },
11567
+ { label: "Col\xF4mbia", href: "#" },
11568
+ { label: "Costa Rica", href: "#" },
11569
+ { label: "Filipinas", href: "#" }
11570
+ ];
11571
+ var DEFAULT_FOOTER_PAGES = [
11572
+ { label: "Contato", href: "#" },
11573
+ { label: "Pol\xEDtica de cookies", href: "#" },
11574
+ { label: "FAQ", href: "#" },
11575
+ { label: "Sobre n\xF3s", href: "#" }
11576
+ ];
11577
+ var DEFAULT_FOOTER_LEGAL = [
11578
+ { label: "Termos e condi\xE7\xF5es", href: "#" },
11579
+ { label: "Mapa do site", href: "#" }
11580
+ ];
11581
+ var DEFAULT_FOOTER_LANGUAGES = [
11582
+ { code: "PT", label: "Portugu\xEAs" },
11583
+ { code: "EN", label: "English" },
11584
+ { code: "NL", label: "Nederlands" },
11585
+ { code: "DE", label: "Deutsch" },
11586
+ { code: "FR", label: "Fran\xE7ais" },
11587
+ { code: "ES", label: "Espa\xF1ol" }
11588
+ ];
11589
+ var DEFAULT_FOOTER_SOCIALS = [
11590
+ { network: "facebook", href: "#" },
11591
+ { network: "instagram", href: "#" },
11592
+ { network: "linkedin", href: "#" }
11593
+ ];
11594
+ var DEFAULT_FOOTER_BADGES = [
11595
+ {
11596
+ src: "https://static.planetaexo.com/trips/wp-content/uploads/2025/04/member_of_TLR-white-1.png",
11597
+ alt: "Member of The Long Run",
11598
+ height: 80
11599
+ },
11600
+ {
11601
+ src: "https://static.planetaexo.com/trips/wp-content/uploads/2025/04/atta-member_white.png",
11602
+ alt: "Member \xB7 Adventure Travel Trade Association",
11603
+ height: 56
11604
+ }
11605
+ ];
11606
+ var SOCIAL_ICON = {
11607
+ facebook: lucideReact.FacebookIcon,
11608
+ instagram: lucideReact.InstagramIcon,
11609
+ linkedin: lucideReact.LinkedinIcon,
11610
+ youtube: lucideReact.YoutubeIcon,
11611
+ twitter: lucideReact.TwitterIcon
11612
+ };
11613
+ var SOCIAL_LABEL = {
11614
+ facebook: "Facebook",
11615
+ instagram: "Instagram",
11616
+ linkedin: "LinkedIn",
11617
+ youtube: "YouTube",
11618
+ twitter: "Twitter"
11619
+ };
11620
+ function ColumnHeading({
11621
+ children,
11622
+ className
11623
+ }) {
11624
+ return /* @__PURE__ */ jsxRuntime.jsx(
11625
+ "h3",
11626
+ {
11627
+ className: cn(
11628
+ "font-heading font-black text-base mb-5 tracking-tight",
11629
+ className
11630
+ ),
11631
+ children
11632
+ }
11633
+ );
11634
+ }
11635
+ function LanguagePicker({
11636
+ variant,
11637
+ languages,
11638
+ currentLanguage,
11639
+ onChange
11640
+ }) {
11641
+ var _a;
11642
+ const t = VARIANT2[variant];
11643
+ const [open, setOpen] = React28__namespace.useState(false);
11644
+ const ref = React28__namespace.useRef(null);
11645
+ const active = (_a = languages.find((l) => l.code === currentLanguage)) != null ? _a : languages[0];
11646
+ React28__namespace.useEffect(() => {
11647
+ if (!open) return;
11648
+ const onDocClick = (e) => {
11649
+ if (ref.current && !ref.current.contains(e.target)) {
11650
+ setOpen(false);
11651
+ }
11652
+ };
11653
+ document.addEventListener("mousedown", onDocClick);
11654
+ return () => document.removeEventListener("mousedown", onDocClick);
11655
+ }, [open]);
11656
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "relative inline-block", children: [
11657
+ /* @__PURE__ */ jsxRuntime.jsxs(
11658
+ "button",
11659
+ {
11660
+ type: "button",
11661
+ onClick: () => setOpen((v) => !v),
11662
+ "aria-haspopup": "listbox",
11663
+ "aria-expanded": open,
11664
+ className: cn(
11665
+ "inline-flex items-center gap-1 px-3 py-1.5 rounded-full text-sm font-ui transition-colors",
11666
+ t.langTrigger,
11667
+ open && t.langOpen
11668
+ ),
11669
+ children: [
11670
+ active == null ? void 0 : active.code,
11671
+ /* @__PURE__ */ jsxRuntime.jsx(
11672
+ lucideReact.ChevronDownIcon,
11673
+ {
11674
+ className: cn(
11675
+ "h-3 w-3 transition-transform duration-150",
11676
+ t.langChevron,
11677
+ open && "rotate-180"
11678
+ )
11679
+ }
11680
+ )
11681
+ ]
11682
+ }
11683
+ ),
11684
+ open && /* @__PURE__ */ jsxRuntime.jsx(
11685
+ "div",
11686
+ {
11687
+ role: "listbox",
11688
+ className: "absolute left-0 bottom-[calc(100%+8px)] min-w-[180px] rounded-xl bg-white shadow-2xl border border-black/8 py-1.5 z-10",
11689
+ children: languages.map((lang) => {
11690
+ const isActive = lang.code === (active == null ? void 0 : active.code);
11691
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11692
+ "button",
11693
+ {
11694
+ type: "button",
11695
+ role: "option",
11696
+ "aria-selected": isActive,
11697
+ onClick: () => {
11698
+ onChange == null ? void 0 : onChange(lang.code);
11699
+ setOpen(false);
11700
+ },
11701
+ className: cn(
11702
+ "flex items-center gap-3 w-full px-5 py-2.5 text-sm font-ui text-left transition-colors hover:bg-muted",
11703
+ isActive ? "text-primary font-semibold" : "text-foreground"
11704
+ ),
11705
+ children: [
11706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold w-8 shrink-0", children: lang.code }),
11707
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: lang.label })
11708
+ ]
11709
+ },
11710
+ lang.code
11711
+ );
11712
+ })
11713
+ }
11714
+ )
11715
+ ] });
11716
+ }
11717
+ function SiteFooter({
11718
+ variant = "dark",
11719
+ brandTitle = "PlanetaEXO",
11720
+ logoSrcLight = "/logo-planetaexo-white.png",
11721
+ logoSrcDark = "/logo-planetaexo-green.png",
11722
+ logoSrc,
11723
+ logoAlt = "PlanetaEXO",
11724
+ logoHref = "#",
11725
+ brandDescription = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11726
+ "A PlanetaEXO \xE9 uma ag\xEAncia brasileira especializada em viagens de ecoturismo e aventura. Operamos com guias locais credenciados e parceiros que respeitam comunidades e ecossistemas.",
11727
+ " ",
11728
+ /* @__PURE__ */ jsxRuntime.jsx(
11729
+ "a",
11730
+ {
11731
+ href: "#",
11732
+ className: "font-bold underline decoration-current/30 underline-offset-4 hover:decoration-current",
11733
+ children: "Pol\xEDtica de privacidade"
11734
+ }
11735
+ )
11736
+ ] }),
11737
+ badges = DEFAULT_FOOTER_BADGES,
11738
+ languages = DEFAULT_FOOTER_LANGUAGES,
11739
+ currentLanguage = "PT",
11740
+ onLanguageChange,
11741
+ address = {
11742
+ title: "Basecamp S\xE3o Paulo",
11743
+ lines: ["Av. Paulista, 1234", "01310-100 S\xE3o Paulo \xB7 Brasil"]
11744
+ },
11745
+ phone = "+55 11 9999-0000",
11746
+ email = "ola@planetaexo.com",
11747
+ socials = DEFAULT_FOOTER_SOCIALS,
11748
+ themesTitle = "Temas",
11749
+ themes = DEFAULT_FOOTER_THEMES,
11750
+ destinationsTitle = "Destinos",
11751
+ destinations = DEFAULT_FOOTER_DESTINATIONS,
11752
+ destinationsMore = { label: "Ver todos os destinos", href: "#" },
11753
+ pagesTitle = "P\xE1ginas",
11754
+ pages = DEFAULT_FOOTER_PAGES,
11755
+ cta = {
11756
+ title: "Colaborar?",
11757
+ label: "parceiros@planetaexo.com",
11758
+ href: "mailto:parceiros@planetaexo.com"
11759
+ },
11760
+ copyright,
11761
+ legalLinks = DEFAULT_FOOTER_LEGAL,
11762
+ className
11763
+ }) {
11764
+ const t = VARIANT2[variant];
11765
+ const resolvedLogo = logoSrc != null ? logoSrc : variant === "light" ? logoSrcDark : logoSrcLight;
11766
+ const year = (/* @__PURE__ */ new Date()).getFullYear();
11767
+ const copy = copyright != null ? copyright : `\xA9 ${year} ${brandTitle}. Todos os direitos reservados.`;
11768
+ return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: cn(t.footer, className), children: [
11769
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-6 sm:px-10 pt-16 pb-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-x-8 gap-y-12", children: [
11770
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-4 space-y-6", children: [
11771
+ /* @__PURE__ */ jsxRuntime.jsx(
11772
+ "a",
11773
+ {
11774
+ href: logoHref,
11775
+ className: "inline-flex items-center",
11776
+ "aria-label": logoAlt,
11777
+ children: /* @__PURE__ */ jsxRuntime.jsx(
11778
+ "img",
11779
+ {
11780
+ src: resolvedLogo,
11781
+ alt: logoAlt,
11782
+ className: "h-16 w-auto select-none",
11783
+ draggable: false
11784
+ }
11785
+ )
11786
+ }
11787
+ ),
11788
+ brandDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("font-sans text-sm leading-relaxed", t.body), children: brandDescription }),
11789
+ address && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
11790
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: cn("font-heading font-black text-base", t.heading), children: address.title }),
11791
+ /* @__PURE__ */ jsxRuntime.jsx("address", { className: cn("not-italic text-sm leading-relaxed font-sans", t.body), children: address.lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: line }, i)) })
11792
+ ] }),
11793
+ (phone || email) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 text-sm font-ui font-bold", children: [
11794
+ phone && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `tel:${phone.replace(/\s+/g, "")}`, className: t.link, children: phone }) }),
11795
+ email && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${email}`, className: t.link, children: email }) })
11796
+ ] }),
11797
+ socials.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: socials.map((s) => {
11798
+ var _a;
11799
+ const Icon = SOCIAL_ICON[s.network];
11800
+ const label = (_a = s.label) != null ? _a : SOCIAL_LABEL[s.network];
11801
+ return /* @__PURE__ */ jsxRuntime.jsx(
11802
+ "a",
11803
+ {
11804
+ href: s.href,
11805
+ "aria-label": label,
11806
+ className: cn(
11807
+ "flex h-9 w-9 items-center justify-center rounded-full transition-colors",
11808
+ t.socialBtn
11809
+ ),
11810
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4", strokeWidth: 2.25 })
11811
+ },
11812
+ s.network + s.href
11813
+ );
11814
+ }) }),
11815
+ badges && badges.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-5 pt-2", children: badges.map((b, i) => {
11816
+ var _a, _b;
11817
+ const content = (_b = b.node) != null ? _b : /* @__PURE__ */ jsxRuntime.jsx(
11818
+ "img",
11819
+ {
11820
+ src: b.src,
11821
+ alt: b.alt,
11822
+ style: { height: (_a = b.height) != null ? _a : 56 },
11823
+ className: "block w-auto object-contain",
11824
+ draggable: false
11825
+ }
11826
+ );
11827
+ const wrapper = /* @__PURE__ */ jsxRuntime.jsx(
11828
+ "span",
11829
+ {
11830
+ className: cn(
11831
+ "inline-flex items-center",
11832
+ t.badgeStroke,
11833
+ t.badgeFilter
11834
+ ),
11835
+ children: content
11836
+ }
11837
+ );
11838
+ return b.href ? /* @__PURE__ */ jsxRuntime.jsx(
11839
+ "a",
11840
+ {
11841
+ href: b.href,
11842
+ "aria-label": b.alt,
11843
+ className: "hover:opacity-80 transition-opacity",
11844
+ children: wrapper
11845
+ },
11846
+ b.alt + i
11847
+ ) : /* @__PURE__ */ jsxRuntime.jsx(React28__namespace.Fragment, { children: wrapper }, b.alt + i);
11848
+ }) })
11849
+ ] }),
11850
+ themes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
11851
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: themesTitle }),
11852
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: themes.map((c) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11853
+ "a",
11854
+ {
11855
+ href: c.href,
11856
+ className: cn("text-sm font-ui font-bold", t.link),
11857
+ children: c.label
11858
+ }
11859
+ ) }, c.label)) })
11860
+ ] }),
11861
+ destinations.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
11862
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: destinationsTitle }),
11863
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: destinations.map((c) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11864
+ "a",
11865
+ {
11866
+ href: c.href,
11867
+ className: cn("text-sm font-ui font-bold", t.link),
11868
+ children: c.label
11869
+ }
11870
+ ) }, c.label)) }),
11871
+ destinationsMore && /* @__PURE__ */ jsxRuntime.jsxs(
11872
+ "a",
11873
+ {
11874
+ href: destinationsMore.href,
11875
+ className: cn(
11876
+ "inline-flex items-center gap-1.5 mt-5 text-sm font-ui font-bold",
11877
+ t.link
11878
+ ),
11879
+ children: [
11880
+ destinationsMore.label,
11881
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightIcon, { className: "h-3.5 w-3.5 no-underline" })
11882
+ ]
11883
+ }
11884
+ )
11885
+ ] }),
11886
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-2 space-y-8", children: [
11887
+ pages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11888
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: pagesTitle }),
11889
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: pages.map((p) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11890
+ "a",
11891
+ {
11892
+ href: p.href,
11893
+ className: cn("text-sm font-ui font-bold", t.link),
11894
+ children: p.label
11895
+ }
11896
+ ) }, p.label)) })
11897
+ ] }),
11898
+ cta && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11899
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: cta.title }),
11900
+ /* @__PURE__ */ jsxRuntime.jsx(
11901
+ "a",
11902
+ {
11903
+ href: cta.href,
11904
+ className: cn("text-sm font-ui font-bold break-all", t.link),
11905
+ children: cta.label
11906
+ }
11907
+ )
11908
+ ] })
11909
+ ] })
11910
+ ] }) }),
11911
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(t.bottomBar), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-6 sm:px-10 py-4 flex flex-wrap items-center gap-x-6 gap-y-3", children: [
11912
+ languages.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
11913
+ LanguagePicker,
11914
+ {
11915
+ variant,
11916
+ languages,
11917
+ currentLanguage,
11918
+ onChange: onLanguageChange
11919
+ }
11920
+ ),
11921
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs font-ui", t.bottomText), children: copy }),
11922
+ legalLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-wrap items-center gap-x-6 gap-y-2", children: legalLinks.map((l) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11923
+ "a",
11924
+ {
11925
+ href: l.href,
11926
+ className: cn("text-xs font-ui font-bold", t.bottomLink),
11927
+ children: l.label
11928
+ }
11929
+ ) }, l.label)) })
11930
+ ] }) })
11931
+ ] });
11932
+ }
10723
11933
  function Stars({ count = 5 }) {
10724
11934
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
10725
11935
  lucideReact.StarIcon,
@@ -10763,9 +11973,9 @@ function TripPage({
10763
11973
  images,
10764
11974
  videoUrl,
10765
11975
  breadcrumb,
11976
+ chips,
10766
11977
  highlights,
10767
- infoGroups,
10768
- keyInfo,
11978
+ howToGetThere,
10769
11979
  recommendedFor,
10770
11980
  overview,
10771
11981
  overviewHighlights,
@@ -10783,6 +11993,7 @@ function TripPage({
10783
11993
  meetingPoints,
10784
11994
  meetingPoint,
10785
11995
  faqs,
11996
+ faqInitialCount = 5,
10786
11997
  sectionIcons,
10787
11998
  reviews,
10788
11999
  trustpilot,
@@ -10802,11 +12013,12 @@ function TripPage({
10802
12013
  features,
10803
12014
  className
10804
12015
  }) {
10805
- const [activeSection, setActiveSection] = React8__namespace.useState("");
10806
- const [accordionValue, setAccordionValue] = React8__namespace.useState([]);
10807
- const accordionSectionIds = React8__namespace.useMemo(
12016
+ const [activeSection, setActiveSection] = React28__namespace.useState("");
12017
+ const [accordionValue, setAccordionValue] = React28__namespace.useState([]);
12018
+ const [faqsExpanded, setFaqsExpanded] = React28__namespace.useState(false);
12019
+ const accordionSectionIds = React28__namespace.useMemo(
10808
12020
  () => /* @__PURE__ */ new Set([
10809
- "key-info",
12021
+ "how-to-get-there",
10810
12022
  "what-to-bring",
10811
12023
  "weather",
10812
12024
  "optional-extras",
@@ -10817,18 +12029,18 @@ function TripPage({
10817
12029
  ]),
10818
12030
  []
10819
12031
  );
10820
- const [navFloating, setNavFloating] = React8__namespace.useState(false);
10821
- const [navHidden, setNavHidden] = React8__namespace.useState(false);
10822
- const [isFloating, setIsFloating] = React8__namespace.useState(false);
10823
- const [sidebarPos, setSidebarPos] = React8__namespace.useState(null);
10824
- const [pricingBarVisible, setPricingBarVisible] = React8__namespace.useState(false);
10825
- const navRef = React8__namespace.useRef(null);
10826
- const navSentinelRef = React8__namespace.useRef(null);
10827
- const sentinelRef = React8__namespace.useRef(null);
10828
- const sidebarPlaceholderRef = React8__namespace.useRef(null);
10829
- const pricingBarRef = React8__namespace.useRef(null);
10830
- const galleryRef = React8__namespace.useRef(null);
10831
- const sections = React8__namespace.useMemo(
12032
+ const [navFloating, setNavFloating] = React28__namespace.useState(false);
12033
+ const [navHidden, setNavHidden] = React28__namespace.useState(false);
12034
+ const [isFloating, setIsFloating] = React28__namespace.useState(false);
12035
+ const [sidebarPos, setSidebarPos] = React28__namespace.useState(null);
12036
+ const [pricingBarVisible, setPricingBarVisible] = React28__namespace.useState(false);
12037
+ const navRef = React28__namespace.useRef(null);
12038
+ const navSentinelRef = React28__namespace.useRef(null);
12039
+ const sentinelRef = React28__namespace.useRef(null);
12040
+ const sidebarPlaceholderRef = React28__namespace.useRef(null);
12041
+ const pricingBarRef = React28__namespace.useRef(null);
12042
+ const galleryRef = React28__namespace.useRef(null);
12043
+ const sections = React28__namespace.useMemo(
10832
12044
  () => [
10833
12045
  { id: "overview", label: "Overview", show: !!(overview || (overviewHighlights == null ? void 0 : overviewHighlights.length)) },
10834
12046
  {
@@ -10846,7 +12058,7 @@ function TripPage({
10846
12058
  // eslint-disable-next-line react-hooks/exhaustive-deps
10847
12059
  []
10848
12060
  );
10849
- React8__namespace.useEffect(() => {
12061
+ React28__namespace.useEffect(() => {
10850
12062
  const sentinel = navSentinelRef.current;
10851
12063
  if (!sentinel) return;
10852
12064
  const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
@@ -10854,7 +12066,7 @@ function TripPage({
10854
12066
  update();
10855
12067
  return () => document.removeEventListener("scroll", update, { capture: true });
10856
12068
  }, []);
10857
- React8__namespace.useEffect(() => {
12069
+ React28__namespace.useEffect(() => {
10858
12070
  const sentinel = sentinelRef.current;
10859
12071
  if (!sentinel) return;
10860
12072
  const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
@@ -10862,7 +12074,7 @@ function TripPage({
10862
12074
  update();
10863
12075
  return () => document.removeEventListener("scroll", update, { capture: true });
10864
12076
  }, []);
10865
- React8__namespace.useEffect(() => {
12077
+ React28__namespace.useEffect(() => {
10866
12078
  const measure = () => {
10867
12079
  if (!sidebarPlaceholderRef.current) return;
10868
12080
  const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
@@ -10872,7 +12084,7 @@ function TripPage({
10872
12084
  window.addEventListener("resize", measure);
10873
12085
  return () => window.removeEventListener("resize", measure);
10874
12086
  }, [isFloating]);
10875
- React8__namespace.useEffect(() => {
12087
+ React28__namespace.useEffect(() => {
10876
12088
  const check = () => {
10877
12089
  var _a;
10878
12090
  const target = (_a = galleryRef.current) != null ? _a : pricingBarRef.current;
@@ -10883,7 +12095,7 @@ function TripPage({
10883
12095
  check();
10884
12096
  return () => document.removeEventListener("scroll", check, { capture: true });
10885
12097
  }, []);
10886
- React8__namespace.useEffect(() => {
12098
+ React28__namespace.useEffect(() => {
10887
12099
  const check = () => {
10888
12100
  if (!pricingBarRef.current) return;
10889
12101
  setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
@@ -10892,7 +12104,7 @@ function TripPage({
10892
12104
  check();
10893
12105
  return () => document.removeEventListener("scroll", check, { capture: true });
10894
12106
  }, []);
10895
- React8__namespace.useEffect(() => {
12107
+ React28__namespace.useEffect(() => {
10896
12108
  if (sections.length === 0) return;
10897
12109
  setActiveSection(sections[0].id);
10898
12110
  const update = () => {
@@ -10967,6 +12179,7 @@ function TripPage({
10967
12179
  destination,
10968
12180
  duration,
10969
12181
  tagline,
12182
+ chips,
10970
12183
  siteHeader,
10971
12184
  uiVariant,
10972
12185
  belowMeta: trustpilotHero ? /* @__PURE__ */ jsxRuntime.jsx(TrustpilotEmbed, { config: trustpilotHero }) : void 0
@@ -11000,10 +12213,7 @@ function TripPage({
11000
12213
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-8 mt-4", children: [
11001
12214
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 space-y-12 pb-12", children: [
11002
12215
  (overview || (overviewHighlights == null ? void 0 : overviewHighlights.length)) && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-overview", className: "scroll-mt-20", children: [
11003
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-xl font-bold text-foreground font-heading mb-4 flex items-center gap-2", children: [
11004
- (sectionIcons == null ? void 0 : sectionIcons.overview) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.overview }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-5 w-5 text-primary" }),
11005
- "Overview"
11006
- ] }),
12216
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-4", children: "Overview" }),
11007
12217
  overview && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: overview }),
11008
12218
  overviewHighlights && overviewHighlights.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("flex flex-col gap-5", overview && "mt-8"), children: overviewHighlights.map((h, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-4", children: [
11009
12219
  h.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center text-foreground [&_svg]:h-8 [&_svg]:w-8", children: h.icon }),
@@ -11050,7 +12260,7 @@ function TripPage({
11050
12260
  }
11051
12261
  )
11052
12262
  ] }),
11053
- ((infoGroups == null ? void 0 : infoGroups.length) || keyInfo || (whatToBring == null ? void 0 : whatToBring.length) || weather || optionalExtras || accommodation || food || (meetingPoints == null ? void 0 : meetingPoints.length) || meetingPoint || termsAndConditions) && /* @__PURE__ */ jsxRuntime.jsxs(
12263
+ (howToGetThere || (whatToBring == null ? void 0 : whatToBring.length) || weather || optionalExtras || accommodation || food || (meetingPoints == null ? void 0 : meetingPoints.length) || meetingPoint || termsAndConditions) && /* @__PURE__ */ jsxRuntime.jsxs(
11054
12264
  Accordion,
11055
12265
  {
11056
12266
  multiple: false,
@@ -11058,25 +12268,33 @@ function TripPage({
11058
12268
  onValueChange: setAccordionValue,
11059
12269
  className: "border-t border-border",
11060
12270
  children: [
11061
- (keyInfo || infoGroups && infoGroups.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs(
12271
+ accommodation && /* @__PURE__ */ jsxRuntime.jsxs(
12272
+ AccordionItem,
12273
+ {
12274
+ value: "accommodation",
12275
+ id: "trip-section-accommodation",
12276
+ className: "scroll-mt-20 border-b border-border",
12277
+ children: [
12278
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
12279
+ (sectionIcons == null ? void 0 : sectionIcons.accommodation) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.accommodation }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BedDoubleIcon, { className: "h-5 w-5 text-primary" }),
12280
+ "Accommodation"
12281
+ ] }) }),
12282
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: accommodation }) })
12283
+ ]
12284
+ }
12285
+ ),
12286
+ food && /* @__PURE__ */ jsxRuntime.jsxs(
11062
12287
  AccordionItem,
11063
12288
  {
11064
- value: "key-info",
11065
- id: "trip-section-key-info",
12289
+ value: "food",
12290
+ id: "trip-section-food",
11066
12291
  className: "scroll-mt-20 border-b border-border",
11067
12292
  children: [
11068
12293
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11069
- (sectionIcons == null ? void 0 : sectionIcons.keyInfo) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.keyInfo }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-5 w-5 text-primary" }),
11070
- "Key info"
12294
+ (sectionIcons == null ? void 0 : sectionIcons.food) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.food }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UtensilsIcon, { className: "h-5 w-5 text-primary" }),
12295
+ "Food"
11071
12296
  ] }) }),
11072
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: keyInfo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: keyInfo }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: infoGroups.map((group, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11073
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
11074
- group.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: group.icon }),
11075
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading", children: group.title })
11076
- ] }),
11077
- /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: group.items }),
11078
- i < infoGroups.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mt-6" })
11079
- ] }, i)) }) })
12297
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: food }) })
11080
12298
  ]
11081
12299
  }
11082
12300
  ),
@@ -11102,78 +12320,63 @@ function TripPage({
11102
12320
  ]
11103
12321
  }
11104
12322
  ),
11105
- optionalExtras && /* @__PURE__ */ jsxRuntime.jsxs(
12323
+ howToGetThere && /* @__PURE__ */ jsxRuntime.jsxs(
11106
12324
  AccordionItem,
11107
12325
  {
11108
- value: "optional-extras",
11109
- id: "trip-section-optional-extras",
12326
+ value: "how-to-get-there",
12327
+ id: "trip-section-how-to-get-there",
11110
12328
  className: "scroll-mt-20 border-b border-border",
11111
12329
  children: [
11112
12330
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11113
- (sectionIcons == null ? void 0 : sectionIcons.optionalExtras) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.optionalExtras }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SparklesIcon, { className: "h-5 w-5 text-primary" }),
11114
- "Optional extras"
12331
+ (sectionIcons == null ? void 0 : sectionIcons.howToGetThere) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.howToGetThere }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CompassIcon, { className: "h-5 w-5 text-primary" }),
12332
+ "How to get there"
11115
12333
  ] }) }),
11116
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: optionalExtras }) })
12334
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: howToGetThere }) })
11117
12335
  ]
11118
12336
  }
11119
12337
  ),
11120
- whatToBring && whatToBring.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
11121
- AccordionItem,
11122
- {
11123
- value: "what-to-bring",
11124
- id: "trip-section-what-to-bring",
11125
- className: "scroll-mt-20 border-b border-border",
11126
- children: [
11127
- /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11128
- (sectionIcons == null ? void 0 : sectionIcons.whatToBring) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.whatToBring }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BackpackIcon, { className: "h-5 w-5 text-primary" }),
11129
- "What to bring"
11130
- ] }) }),
11131
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: whatToBring, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }) })
11132
- ]
11133
- }
11134
- ),
11135
- accommodation && /* @__PURE__ */ jsxRuntime.jsxs(
12338
+ weather && /* @__PURE__ */ jsxRuntime.jsxs(
11136
12339
  AccordionItem,
11137
12340
  {
11138
- value: "accommodation",
11139
- id: "trip-section-accommodation",
12341
+ value: "weather",
12342
+ id: "trip-section-weather",
11140
12343
  className: "scroll-mt-20 border-b border-border",
11141
12344
  children: [
11142
12345
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11143
- (sectionIcons == null ? void 0 : sectionIcons.accommodation) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.accommodation }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BedDoubleIcon, { className: "h-5 w-5 text-primary" }),
11144
- "Accommodation"
12346
+ (sectionIcons == null ? void 0 : sectionIcons.weather) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.weather }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunIcon, { className: "h-5 w-5 text-primary" }),
12347
+ "Weather"
11145
12348
  ] }) }),
11146
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: accommodation }) })
12349
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-3 rounded-xl bg-muted/60 border border-border p-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-2 [&_strong]:font-semibold", children: weather }) }) })
11147
12350
  ]
11148
12351
  }
11149
12352
  ),
11150
- food && /* @__PURE__ */ jsxRuntime.jsxs(
12353
+ whatToBring && whatToBring.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
11151
12354
  AccordionItem,
11152
12355
  {
11153
- value: "food",
11154
- id: "trip-section-food",
12356
+ value: "what-to-bring",
12357
+ id: "trip-section-what-to-bring",
11155
12358
  className: "scroll-mt-20 border-b border-border",
11156
12359
  children: [
11157
12360
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11158
- (sectionIcons == null ? void 0 : sectionIcons.food) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.food }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UtensilsIcon, { className: "h-5 w-5 text-primary" }),
11159
- "Food"
12361
+ (sectionIcons == null ? void 0 : sectionIcons.whatToBring) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.whatToBring }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BackpackIcon, { className: "h-5 w-5 text-primary" }),
12362
+ "What to bring"
11160
12363
  ] }) }),
11161
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: food }) })
12364
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: whatToBring, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }) })
11162
12365
  ]
11163
12366
  }
11164
12367
  ),
11165
- weather && /* @__PURE__ */ jsxRuntime.jsxs(
12368
+ optionalExtras && /* @__PURE__ */ jsxRuntime.jsxs(
11166
12369
  AccordionItem,
11167
12370
  {
11168
- value: "weather",
11169
- id: "trip-section-weather",
12371
+ value: "optional-extras",
12372
+ id: "trip-section-optional-extras",
11170
12373
  className: "scroll-mt-20 border-b border-border",
11171
12374
  children: [
11172
12375
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11173
- (sectionIcons == null ? void 0 : sectionIcons.weather) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.weather }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunIcon, { className: "h-5 w-5 text-primary" }),
11174
- "Weather"
12376
+ (sectionIcons == null ? void 0 : sectionIcons.optionalExtras) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.optionalExtras }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CherryIcon, { className: "h-5 w-5 text-primary" }),
12377
+ "Optional extras"
11175
12378
  ] }) }),
11176
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-3 rounded-xl bg-muted/60 border border-border p-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-2 [&_strong]:font-semibold", children: weather }) }) })
12379
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: optionalExtras }) })
11177
12380
  ]
11178
12381
  }
11179
12382
  ),
@@ -11195,13 +12398,39 @@ function TripPage({
11195
12398
  ]
11196
12399
  }
11197
12400
  ),
11198
- faqs && faqs.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-faq", className: "scroll-mt-20", children: [
11199
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "FAQ" }),
11200
- /* @__PURE__ */ jsxRuntime.jsx(Accordion, { variant: "faq", children: faqs.map((faq, i) => /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: `faq-${i}`, children: [
11201
- /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: faq.question }),
11202
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: faq.answer })
11203
- ] }, i)) })
11204
- ] }),
12401
+ faqs && faqs.length > 0 && (() => {
12402
+ const visibleFaqs = faqsExpanded ? faqs : faqs.slice(0, faqInitialCount);
12403
+ const hiddenCount = faqs.length - visibleFaqs.length;
12404
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-faq", className: "scroll-mt-20", children: [
12405
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "FAQ" }),
12406
+ /* @__PURE__ */ jsxRuntime.jsx(Accordion, { variant: "faq", children: visibleFaqs.map((faq, i) => /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: `faq-${i}`, children: [
12407
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: faq.question }),
12408
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: faq.answer })
12409
+ ] }, i)) }),
12410
+ faqs.length > faqInitialCount && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
12411
+ "button",
12412
+ {
12413
+ type: "button",
12414
+ onClick: () => setFaqsExpanded((v) => !v),
12415
+ className: cn(
12416
+ "inline-flex items-center gap-2 rounded-full border border-border bg-background px-5 py-2.5",
12417
+ "text-sm font-semibold text-foreground shadow-sm",
12418
+ "hover:bg-muted transition-colors duration-150",
12419
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
12420
+ ),
12421
+ children: faqsExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12422
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "h-4 w-4 text-muted-foreground" }),
12423
+ "Show less"
12424
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12425
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" }),
12426
+ "See more (",
12427
+ hiddenCount,
12428
+ ")"
12429
+ ] })
12430
+ }
12431
+ ) })
12432
+ ] });
12433
+ })(),
11205
12434
  trustpilot ? /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-reviews", className: "scroll-mt-20", children: [
11206
12435
  /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mb-10" }),
11207
12436
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-5", children: "What our guests think" }),
@@ -11290,8 +12519,8 @@ function TripPage({
11290
12519
  PhotoGallery,
11291
12520
  {
11292
12521
  photos: gallery,
11293
- variant: "grid",
11294
- initialVisible: 6
12522
+ variant: "gridCompact",
12523
+ initialVisible: 8
11295
12524
  }
11296
12525
  ) }),
11297
12526
  gallery && gallery.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { ref: pricingBarRef, className: "mx-auto w-full max-w-6xl px-6 sm:px-8 py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { id: "trip-booking-form", className: "rounded-2xl border border-border bg-card p-8 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(BookingForm, { onSubmit: onBook ? (values) => onBook() : void 0 }) }) }),
@@ -11308,7 +12537,8 @@ function TripPage({
11308
12537
  currencyEstimates
11309
12538
  }
11310
12539
  ) }),
11311
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 lg:hidden" })
12540
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 lg:hidden" }),
12541
+ /* @__PURE__ */ jsxRuntime.jsx(SiteFooter, {})
11312
12542
  ]
11313
12543
  }
11314
12544
  );
@@ -11414,12 +12644,12 @@ function Toast({
11414
12644
  duration = 6e3,
11415
12645
  className
11416
12646
  }) {
11417
- const [mounted, setMounted] = React8__namespace.useState(false);
11418
- const [visible, setVisible] = React8__namespace.useState(true);
11419
- React8__namespace.useEffect(() => {
12647
+ const [mounted, setMounted] = React28__namespace.useState(false);
12648
+ const [visible, setVisible] = React28__namespace.useState(true);
12649
+ React28__namespace.useEffect(() => {
11420
12650
  setMounted(true);
11421
12651
  }, []);
11422
- React8__namespace.useEffect(() => {
12652
+ React28__namespace.useEffect(() => {
11423
12653
  if (duration === 0) return;
11424
12654
  const t = setTimeout(() => {
11425
12655
  setVisible(false);
@@ -11826,21 +13056,21 @@ function LeadCapturePopup({
11826
13056
  }) {
11827
13057
  var _a;
11828
13058
  const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
11829
- const [open, setOpen] = React8.useState(false);
11830
- const [closing, setClosing] = React8.useState(false);
11831
- const [submitted, setSubmitted] = React8.useState(false);
11832
- const [submitting, setSubmitting] = React8.useState(false);
11833
- const [error, setError] = React8.useState(null);
11834
- const [name, setName] = React8.useState("");
11835
- const [email, setEmail] = React8.useState("");
11836
- const [travelDate, setTravelDate] = React8.useState("");
11837
- const panelRef = React8.useRef(null);
11838
- const nameRef = React8.useRef(null);
11839
- const show = React8.useCallback(() => {
13059
+ const [open, setOpen] = React28.useState(false);
13060
+ const [closing, setClosing] = React28.useState(false);
13061
+ const [submitted, setSubmitted] = React28.useState(false);
13062
+ const [submitting, setSubmitting] = React28.useState(false);
13063
+ const [error, setError] = React28.useState(null);
13064
+ const [name, setName] = React28.useState("");
13065
+ const [email, setEmail] = React28.useState("");
13066
+ const [travelDate, setTravelDate] = React28.useState("");
13067
+ const panelRef = React28.useRef(null);
13068
+ const nameRef = React28.useRef(null);
13069
+ const show = React28.useCallback(() => {
11840
13070
  if (isDismissed()) return;
11841
13071
  setOpen(true);
11842
13072
  }, []);
11843
- React8.useEffect(() => {
13073
+ React28.useEffect(() => {
11844
13074
  var _a2;
11845
13075
  if (isDismissed()) return;
11846
13076
  if (config.trigger === "delay") {
@@ -11867,7 +13097,7 @@ function LeadCapturePopup({
11867
13097
  return () => window.removeEventListener("scroll", handler);
11868
13098
  }
11869
13099
  }, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
11870
- React8.useEffect(() => {
13100
+ React28.useEffect(() => {
11871
13101
  if (open && !submitted) {
11872
13102
  requestAnimationFrame(() => {
11873
13103
  var _a2;
@@ -11875,7 +13105,7 @@ function LeadCapturePopup({
11875
13105
  });
11876
13106
  }
11877
13107
  }, [open, submitted]);
11878
- const close = React8.useCallback(() => {
13108
+ const close = React28.useCallback(() => {
11879
13109
  setClosing(true);
11880
13110
  setDismissed(config.dismissDays);
11881
13111
  setTimeout(() => {
@@ -11883,7 +13113,7 @@ function LeadCapturePopup({
11883
13113
  setClosing(false);
11884
13114
  }, 250);
11885
13115
  }, [config.dismissDays]);
11886
- React8.useEffect(() => {
13116
+ React28.useEffect(() => {
11887
13117
  if (!open) return;
11888
13118
  const handler = (e) => {
11889
13119
  if (e.key === "Escape") close();
@@ -11891,7 +13121,7 @@ function LeadCapturePopup({
11891
13121
  document.addEventListener("keydown", handler);
11892
13122
  return () => document.removeEventListener("keydown", handler);
11893
13123
  }, [open, close]);
11894
- const onOverlayClick = React8.useCallback(
13124
+ const onOverlayClick = React28.useCallback(
11895
13125
  (e) => {
11896
13126
  if (panelRef.current && !panelRef.current.contains(e.target)) {
11897
13127
  close();