@riverbankcms/sdk 0.171.0 → 0.172.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-xuFmD41p.d.ts → BlocksIslandsHydrator-DtrzTJ77.d.ts} +1 -1
- package/dist/_dts/{Page-4fzXy8H9.d.ts → Page-DViYbakk.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BlHgMsc8.d.ts → SdkPreviewMode-D-5OeDbT.d.ts} +2 -2
- package/dist/_dts/{client-BPoU758C.d.ts → client-DZBOzd3U.d.ts} +1 -2
- package/dist/_dts/{content-types-TnkhoSls.d.ts → content-types-DS3DrYn_.d.ts} +3 -3
- package/dist/_dts/{contracts-7wrMA79U.d.ts → contracts-C3QGPCUf.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DaOsPQ_Q.d.ts → footerPageOutline-D9Q7VIul.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9aDEzKK.d.ts → generatePageMetadata-R7NeFT1u.d.ts} +2 -2
- package/dist/_dts/{index-DDKJfaLY.d.ts → index-BnMavhoh.d.ts} +2 -2
- package/dist/_dts/{index-585vn6qb.d.ts → index-C0zjLMAW.d.ts} +49 -38
- package/dist/_dts/{index-W9R3Bnf2.d.ts → index-CpOkfBt1.d.ts} +3 -3
- package/dist/_dts/{index-Cbw0IiY7.d.ts → index-Da4UMgbs.d.ts} +2 -2
- package/dist/_dts/{index-DNCDENic.d.ts → index-DkFV_1Bc.d.ts} +1 -1
- package/dist/_dts/{index-ChNbrcgD.d.ts → index-Dns7OHyl.d.ts} +1 -1
- package/dist/_dts/{index-CZKSUcDs.d.ts → index-MuMYjetm.d.ts} +4 -4
- package/dist/_dts/{loadContent-DPyNAJym.d.ts → loadContent-DJmXHzfi.d.ts} +7 -7
- package/dist/_dts/{request-jXTRN1Y4.d.ts → request-wQ28JWbr.d.ts} +66983 -65876
- package/dist/_dts/{resolveBlockData-BbvE-gsZ.d.ts → resolveBlockData-C-IP53u9.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BBgih00D.d.ts → resolvePageContent-Cc4zqaEC.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +18 -1
- package/dist/_dts/{types-kWvBwYK6.d.ts → types-CpjyP5I4.d.ts} +7 -7
- package/dist/_dts/{types-DEAKoDNi.d.ts → types-DrinAfeW.d.ts} +3 -3
- package/dist/_dts/{types-BXuVxDYo.d.ts → types-ZuZoGsZV.d.ts} +2 -2
- package/dist/_dts/{validation-BAO0_ntM.d.ts → validation-CIZ_fP5l.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DfMsMIej.mjs → BlocksIslandsHydrator-UFmQB1BE.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-aaSicywS.mjs → BookingMailingListNote-VjRYhx1c.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-OgftZ9QC.mjs → BookingPanelArrangement-DpqnRo-t.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-CzOT8ZWo.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-iMWrY6Hz.mjs → CalendarNavigationChevron-CNckKZct.mjs} +7 -7
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BCumOTLY.mjs → DemoBookingPortalAccess-CmZLVXOy.mjs} +6 -6
- package/dist/client/{EventCalendar.client-kh7mkYnW.mjs → EventCalendar.client-BU-SxLCn.mjs} +9 -9
- package/dist/client/{EventCombined.client-DXD5i0Ar.mjs → EventCombined.client-f28VltfY.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-BnwcoFQN.mjs → EventItem-sKBofjiW.mjs} +40 -14
- package/dist/client/{EventListWeekNavigation-DuG6z02f.mjs → EventListWeekNavigation-IAcax47T.mjs} +1 -1
- package/dist/client/{EventListing.client-18yfHrcr.mjs → EventListing.client-BEtnRvZr.mjs} +3 -3
- package/dist/client/{EventListing.view-BM7rTVSL.mjs → EventListing.view-BZ4l_rmT.mjs} +189 -73
- package/dist/client/{EventRegistrationPayment-D5J3DR0x.mjs → EventRegistrationPayment-BWb295cD.mjs} +9 -9
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-Hsj2HC_1.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-C7E7Lyfa.mjs} +1 -1
- package/dist/client/{Page-DH2sm4Cf.mjs → Page-Ds1s3DuC.mjs} +1425 -490
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-CsRlU46Y.mjs → StepIndicator-CSCyAaKY.mjs} +6 -6
- package/dist/client/{TabBarFragment-CsAufYwT.mjs → TabBarFragment-BqfRLojo.mjs} +1 -1
- package/dist/client/{ThemedButton-BMDHwnM6.mjs → ThemedButton-DuaYtnvG.mjs} +1 -1
- package/dist/client/{accessibleSurfaces-Bbn1-jJ8.mjs → accessibleSurfaces-OsAseM7H.mjs} +57 -42
- package/dist/client/{accordion-DT4MD3Np.mjs → accordion-DgwFZJSx.mjs} +1 -1
- package/dist/client/{booking-form.client-DdqNQNCa.mjs → booking-form.client-CKY9oksp.mjs} +33 -29
- package/dist/client/{bookingForm-CLN396HU.mjs → bookingForm-CsHhcdSF.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-iLF_3KX9.mjs → boxStyleClassNames-B1Z_TGAe.mjs} +1 -1
- package/dist/client/{carousel-DFLomCGm.mjs → carousel-0sw2Kc3a.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-BozMM5NK.mjs → cart-CPfvMDGJ.mjs} +3 -3
- package/dist/client/{cart.client-CqOOxPbW.mjs → cart.client-BJBPUTmg.mjs} +1 -1
- package/dist/client/{checkout-CTWF5nbB.mjs → checkout-DU4JFjGT.mjs} +3 -3
- package/dist/client/{checkout.client-CpqxN8e0.mjs → checkout.client-BbNCO4xa.mjs} +1 -1
- package/dist/client/{checkoutUrls-Ccg6yfjq.mjs → checkoutUrls-BQ3OlWlM.mjs} +1 -1
- package/dist/client/client.mjs +151 -6
- package/dist/client/{context-Dzjv2CpA.mjs → context-xNC1Cyjw.mjs} +14 -1
- package/dist/client/{cta-pzQkBLgS.mjs → cta-CNVQHLKs.mjs} +53 -11
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-B6ea-egy.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-BhjGxhX3.mjs} +1 -1
- package/dist/client/{display-Cl6mgSJa.mjs → display-B5DfNb6A.mjs} +1869 -333
- package/dist/client/{enhanceHeaderSection-CJCl0HJC.mjs → enhanceHeaderSection-BFcHLuqk.mjs} +139 -16
- package/dist/client/{event-details.client-Pn9Kxh3I.mjs → event-details.client-WHT5GLn2.mjs} +1 -1
- package/dist/client/{event-registration.client-BAmBdWXE.mjs → event-registration.client-CmnRKELC.mjs} +11 -11
- package/dist/client/{eventCalendar-C5Bh2L8L.mjs → eventCalendar-2NbdCyov.mjs} +4 -4
- package/dist/client/{eventCombined-dELKxxIe.mjs → eventCombined-D1lH1n2T.mjs} +4 -4
- package/dist/client/{eventDetails-Do9D_fJ_.mjs → eventDetails-BHvnF2Tw.mjs} +2 -2
- package/dist/client/{eventListing-B2HTUWLq.mjs → eventListing-EhSDk4UL.mjs} +4 -4
- package/dist/client/{eventRegistration-ByOJnqGc.mjs → eventRegistration-z_0jN_KS.mjs} +4 -4
- package/dist/client/{form-DX70QG-J.mjs → form-BfChzSkS.mjs} +3 -3
- package/dist/client/{form.client-CJoqBrS6.mjs → form.client-D1zehtPk.mjs} +4 -4
- package/dist/client/{form.parts-DTof9pL3.mjs → form.parts-rMDlUQIv.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-ymSVT9Y5.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJuPX_1K.mjs → headerSection-BX9bQ84k.mjs} +2 -2
- package/dist/client/{newsletter-form.client-CqzNjOft.mjs → newsletter-form.client-DMbuJCtJ.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DjJsFms2.mjs → newsletter-form.parts-BxrVsoI0.mjs} +2 -2
- package/dist/client/{newsletterForm-D1MHoPbh.mjs → newsletterForm-B_I3FJFS.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CamIX2yK.mjs} +17 -1
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DOQ7El1d.mjs → product-detail.client-qxuiYCof.mjs} +1 -1
- package/dist/client/{product-list.client-CmxOZbzL.mjs → product-list.client-CDL-jihv.mjs} +1 -1
- package/dist/client/{productDetail-BN3zv5sa.mjs → productDetail-B97m0uZy.mjs} +3 -3
- package/dist/client/{productList-GN_Id4bF.mjs → productList-DE4vSSG_.mjs} +3 -3
- package/dist/client/{propsDecoder-BdmzM3D5.mjs → propsDecoder-BTde6Syh.mjs} +3 -3
- package/dist/client/{registry.server-BOyra8CA.mjs → registry.server-Cn8XjRte.mjs} +1464 -1183
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +22 -16
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-Bcl3vTb4.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DnaJ8PQc.mjs → routeIslandApiConfig-BjRoLoMD.mjs} +1 -1
- package/dist/client/{runtimeResponse-BN8PoIVp.mjs → runtimeResponse-B-lrAGhX.mjs} +1 -1
- package/dist/client/{runtimeResponse-B1-cyLXt.mjs → runtimeResponse-CPcA8xSm.mjs} +1 -1
- package/dist/client/{shop-LjBLDBqF.mjs → shop-BC4H0oYT.mjs} +3 -3
- package/dist/client/{shop-commerce-B8aZTdRJ.mjs → shop-commerce-BsY7a71m.mjs} +12 -12
- package/dist/client/{shop-commerce-store-C1FtHYl7.mjs → shop-commerce-store-BZ5j90HD.mjs} +1 -1
- package/dist/client/{shop.client-D0qZ3KZp.mjs → shop.client-WgGVGelc.mjs} +12 -12
- package/dist/client/{shop.interactive-DAKyWK1B.mjs → shop.interactive-Bb67gPLL.mjs} +187 -81
- package/dist/client/{shopShared-CztcSe9i.mjs → shopShared-BE6TEk2A.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{timetableModel-D1jDTbms.mjs → timetableModel-Bbz_ECL5.mjs} +10 -10
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-CdP14E_b.mjs} +2 -2
- package/dist/client/{useDiscountApply-CHGYDxdM.mjs → useDiscountApply-DvOSso2l.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Dew9UAEy.mjs → useDiscountCodeUi-B4fRd2jy.mjs} +1 -1
- package/dist/client/{useEventPagination-BpC7-ksE.mjs → useEventPagination-M3jC8lgP.mjs} +6 -6
- package/dist/client/{view-BxeiAL3c.mjs → view-B0TFnP4y.mjs} +198 -60
- package/dist/client/{view-ShYH3WXh.mjs → view-DNNNbnNj.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-lW2aLGWd.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-C9InQJpd.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs} +320 -395
- package/dist/preview-next/client/{PreviewEditorSidebar-BEEWzXnU.mjs → PreviewEditorSidebar-CjOIZlUk.mjs} +761 -416
- package/dist/preview-next/client/{PreviewEditorUI-C86Out4V.mjs → PreviewEditorUI--kS9Cwsc.mjs} +126 -137
- package/dist/preview-next/client/PreviewLayoutContext-Dy0LwcHc.mjs +26 -0
- package/dist/preview-next/client/PreviewQueryProvider-BgIucg_5.mjs +21 -0
- package/dist/preview-next/client/{PreviewShell-CBWYjBvQ.mjs → PreviewShell-Bi8-rclb.mjs} +312 -63
- package/dist/preview-next/client/{SdkPreviewModeRuntime-o-mVqWLx.mjs → SdkPreviewModeRuntime-CWTUw-3L.mjs} +308 -135
- package/dist/preview-next/client/{SiteChromeCustomizeButton-H_ciMNHA.mjs → SiteChromeCustomizeButton-CrgS3I8d.mjs} +1936 -320
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-DygTyy7K.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-CuOcsG_N.mjs → previewAssistantSlot-Caofnr1Z.mjs} +23441 -21340
- package/dist/preview-next/client/{previewChromeRoot-DPeV7KaP.mjs → previewChromeRoot-CbAI_jSH.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-DY65_hLk.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-DNA1Q4L1.mjs → useAutosaveStatus-CakNU3lp.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BdnMlHC6.mjs → useOpenBlockForSetup-CCEMkosU.mjs} +126 -11
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/editor-base.css +14 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CtSgU8UZ.mjs → route-contract-DsKDQoVW.mjs} +147 -2
- package/dist/server/{Block.shared-ifgaBglp.mjs → Block.shared-D7Qy9F4a.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DGDOH6OU.mjs → ThemeScopeCore-D1NTXZdX.mjs} +15 -10
- package/dist/server/{accessibleSurfaces-BuPNCWAK.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-CiYpie1M.mjs → bindings-Bp6OnR3n.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-ngWuFsmN.mjs → client-dROAfMRa.mjs} +149 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-DeLQeJAZ.mjs → loadContent-zOIrtqz-.mjs} +19 -14
- package/dist/server/{loadPage-D4J747FQ.mjs → loadPage-vwFiq1Rk.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-ukEz1BaM.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-DSuVkpqm.mjs → overrideResolution-DjboggbB.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-DFv3h4Ib.mjs → pageRenderPlan-BR4t1rOw.mjs} +954 -337
- package/dist/server/{pageRuntimeSupport-yHaRNWMj.mjs → pageRuntimeSupport-BKo6XVK-.mjs} +3 -2
- package/dist/server/{pageShared-CAZD0LcY.mjs → pageShared-BJjptSGp.mjs} +1039 -853
- package/dist/server/{parseThemeForPersistence-Dl7LIBJq.mjs → parseThemeForPersistence-B18KDEue.mjs} +2 -2
- package/dist/server/{prebuild-BKOCND3b.mjs → prebuild-CntSkZQI.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-GIoExi8A.mjs → prefetchBlockData-BM9Ds0OQ.mjs} +2 -2
- package/dist/server/{registry-BogXzcOD.mjs → registry-wYH0LH5f.mjs} +7269 -4975
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-CT4YSBve.mjs → resolveBlockData-Bu_p4HxZ.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-DVISOQD9.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +53 -33
- package/dist/server/{schema-C92Q8y0-.mjs → schema-BFOqYIMQ.mjs} +2 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-vSBCWU3w.mjs → validation-DAQdPDku.mjs} +4 -4
- package/dist/server/{version-Cw5vFmUY.mjs → version-DAB0O3yx.mjs} +1 -1
- package/dist/styles/index.css +1260 -15
- package/package.json +1 -1
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-zTTFZ4MM.mjs +0 -5
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as pageEvidenceEvents, $_ as generateUuidV4, $a as eventCalendarListGroupingDecision, $c as formatEventClockLabel, $d as inlineTextToPlainText, $f as formatSiteChromeBackgroundTokenLabel, $g as contrastThresholdByPolicy, $i as createInitialEventPaginationLoadState, $l as siteFooterManifest, $o as isEventRegistrationAvailable, $r as buildProductListInteractiveIslandProps, $s as formatCentsAsCurrencyInput, $v as parseLocalScheduleTime, Ac as decideBookingQuestionsRestoration, Ad as parseStoredVariant, Af as resolveEffectiveArrangement, Ag as serializeSurfaceTree, Al as canonicalUrl, Ao as registrationRoute, As as ok, Au as createInteractiveIslandCodec, Ba as EventQuickFacts, Bc as eventListWeekDays, Bf as surfaceResolutionContextFromTheme, Bg as BORDER_WIDTH_MAP, Bi as buildEventCollectionHydration, Bo as decideEventRegistrationPayment, Br as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, Bs as formatBookingWhen, Bu as itemRole, Cc as sweepExpiredSignInReturnDrafts, Cd as lookLeadSlotTransform, Cf as readHeaderNavFontSizePreference, Cg as textColorStyle, Ch as useControllableState, Ci as eventCalendarBlockDefinition, Cl as getRemainingPlaces, Cm as FIELD_CONTROL_CLASS, Co as bookingEntryProgress, Cs as resolveHeldTicketPlaces, Cu as staticHeaderChromeRuntime, Da as mediaImageHostProps, Dc as bookingQuestionsAnswerDraftSchema, Dd as createTransformRegistry, Dg as parseSurfaceTree, Dh as Primitive, Di as buildEventCalendarListingRender, Dl as blockSiteTermsSchema, Dm as FIELD_TEXTAREA_CLASS, Do as panelShouldOpen, Ds as validateFormData, Du as formBlockDefinition, Ea as computeMediaTransformStyle, Ec as applyBookingQuestionsAnswerEvent, Ed as asPartialObject, Ef as arrangementLookHooks, Eg as opaqueSurfaceDeclarations, Eh as composeEventHandlers, Ei as buildEventCalendarListingDisplay, El as selectMostOpenCapacitySource, Em as FIELD_SURFACE_CLASS, Eo as getEventSelectionMode, Es as registrationQuestionsMessage, Eu as formattingTransforms, Ey as parseUuidBrand, F_ as parseGradientPresetId, Fc as toBookingQuestionsAnswerDraft, Fd as RichTextDocSchema, Ff as headerStyleRecipeForTheme, Fg as buttonShadow, Fl as bookingPageKindSchema, Fo as decideEventChoice, Fp as MQ_MD_UP, Fs as confirmationPaymentRows, Fu as listItemPresentation, G_ as authoredValuesEqual, Ga as EVENT_BOOKING_ARRIVAL_QUERY, Gc as formatEventPriceDisplay, Gg as freezeOwnedThemeValue, Gh as bindingSchema, Gi as calendarMonthKey, Gl as FEATURE_CARD_ICON_TREATMENTS, Go as planRegistrationDetailsCheck, Gr as checkoutBlockDefinition, Gs as formatTime$3, Gv as resolveBookingDisplayContext, H_ as resolveAvailableBookingCollectionOptions, Ha as getContainerClass, Hc as resolveMonthSelectedDay, Hd as parseBlockIconValue, Hg as FONT_SIZE_MAP, Hi as eventCollectionDisplaySchemaShape, Hl as toBookingRequirementConsentField, Hm as DialogPortal, Ho as fullyBookedLabel, Hp as isRecord$14, Hr as newsletterBlockSubmissionMessage, Hs as formatEventDateTime, Hu as Grid, Hv as formatTime$2, I_ as siteChromeBackgroundOverrideOwner, Ic as toBookingQuestionsPaymentSnapshot, Ig as buttonStateAppearanceDeclarations, Ih as useComposedRefs, Ii as eventListingBlockDefinition, Il as groupPublicEventsByRun, Io as getDeclinedPass, Ip as MQ_SM_DOWN, Ir as normalizeLocationMapProps, Is as resolveFinishedPresentation, Iu as listLookControl, J_ as CANCELLED_SESSION_STATUS, Ja as buildEventRegistrationInteractiveIslandProps, Jc as buildCalendarViewport, Jd as coerceInlineTextWithFallback, Jf as generateDefaultCardSystem, Jg as safeTokenOr, Ji as calendarWindowBounds, Jn as planArrangementContent, Jo as resolveRegistrationAdmission, Jp as observeEditorAdmission, Jr as productListBlockDefinition, Js as getTicketTypeAvailabilityLabel, Jv as addLocalScheduleDays, K as createSessionJournalBindings, K_ as formatCreditProductBalance, Ka as eventRegistrationBlockDefinition, Kc as formatEventTeacherLine, Kg as ownedThemeSnapshot, Ki as calendarPageResponseError, Ko as planRegistrationDetailsContinuation, Kp as editorAdmissionRefusal, Kr as cartBlockDefinition, Ks as getImplicitSingleTicketType, Kv as formatBookingCompactEnglishTime, Lc as checkBookingQuestionsAnswered, Lg as buttonTypographyDeclarations, Lh as cn$1, Li as buildEventListingInteractiveIslandProps, Lm as Dialog, Lo as isRegistrationLocked, Lp as MQ_SM_UP, Ls as ENTITLEMENT_SINGLE_TICKET_TOOLTIP, Lu as listLookSlot, Lv as unsafeAsEditorBlockId, Ma as resolveMediaNodeResponsiveImage, Mc as isBookingQuestionsAnswerEvent, Mf as componentRuntimeRulesForTheme, Mg as actionVariableFallback, Ml as pageNavigationSchema, Mo as registrationStepLabelContext, Ms as clearWorkflowFeedback, Mu as createZodCodec, Nc as needsBookingQuestionsRefresh, Nf as designRuntimeRulesForTheme, Ng as buttonBorder, Nl as requestSignIn, No as areEventRegistrationPaymentSelectionsEqual, Np as MQ_LG_UP, Nr as getBlockDefinition, Ns as reportWorkflowError, Nu as defineClientOwnedBlockRuntime, O_ as indexRenderableMediaAssets, Oa as renderAudio, Oc as bookingQuestionsPaymentSnapshotSchema, Od as runTransforms, Of as arrangementManifestFromVariants, Og as prepareSurfaceIndex, Ol as verifiedSiteTermsAcceptanceSchema, Om as NATIVE_CHOICE_CLASS, Oo as registrationPaymentRoute, Os as assertNever$2, Ou as buildFormInteractiveIslandProps, P_ as surfaceCardRoleValues, Pa as resolvePublicMediaUrl, Pc as restoreBookingQuestionsAnswers, Pg as buttonRadius, Pl as closedRunCopy, Po as createInitialRegistrationFlowState, Pp as MQ_MD_DOWN, Ps as reportWorkflowSuccess, Pu as defineProgressiveBlockRuntime, Q_ as resolveWholeSeriesBookingPhase, Qa as previewStageSchema, Qc as formatDate$1, Qf as generateNavLinkCSS, Qg as certifyPaint, Qi as resolveCalendarReadProfile, Qo as visitorHoldsOwnPlace, Qp as calendarMonthDate, Qr as buildProductDetailInteractiveIslandProps, Qs as withOccurrenceTitle, Qv as parseBookingLocalDate, R_ as asDesignBlockId, Rc as getInitialFieldValue, Rd as sanitizeHref, Rf as requireCuratedSiteStyle, Rg as materializeRuntimeButtonAppearance, Ri as eventListingBlockRuntime, Rl as blockBookingPaymentTermsSchema, Rm as DialogClose, Ro as registrationFlowReducer, Rp as MQ_TABLET_ONLY, Rs as areEntitlementsDisabledForTicketCount, Ru as lookListPresentationSchemaShape, Sa as RichText, Sc as signInReturnPath, Sd as lookCarouselRegionTransform, Sf as mergeHeaderNavTypographyPreference, Sg as rgbColorValue, Sh as createCollection, Si as offeringsCatalogueShape, Sl as getEventAvailabilityStatus, So as bookingEntry, Ss as parseCurrencyInputToCents, Su as layoutTransforms, Sy as unsafeAsPositiveSeconds, T_ as runtimeMediaSchema, Ta as MediaPlaceholder, Tc as NO_BOOKING_QUESTIONS, Td as lookSkinSlotTransform, Tg as opaqueSurfaceContextFromTheme, Th as createContextScope, Ti as buildEventCalendarInteractiveIslandProps, Tl as selectEventCapacitySource, To as courseTitleOf, Ts as withRegistrationAvailability, Tu as uiTransforms, Tv as EDITOR_SESSION_GENERATION_HEADER, U_ as getBookingLaterInstalments, Ua as resolveEventSelection, Uc as formatEventPrice, Ud as resolveBlockIconRenderValue, Uf as getGradientPreset, Ug as generateShadowValue$1, Ui as eventCollectionHydrationSchema, Ul as beforeBookingQuestionsPresentationSchema, Um as DialogTitle, Uo as getTicketSelectionPurpose, Up as EDITOR_LOADING_NOTICE, Ur as giftingBlockDefinition, Us as formatPassCreditUsageLabel, Uu as BACKGROUND_POSITION_PRESET_VALUES, Uv as formatTimeZoneCityLabel, V_ as normalizeCurrencyCode, Va as getCardOrientation, Vc as buildMonthDay, Vf as gradientToCss, Vg as DEFAULT_BUTTON_SIZES, Vi as buildEventCollectionListingDisplay, Vl as isBookingRequirementConsentFieldId, Vo as shouldPromptForLogin, Vp as isObjectRecord, Vr as buildNewsletterFormInteractiveIslandProps, Vs as formatDate$3, Vv as formatDateTimeRange, W_ as journalReplayValue, Wa as publicPassProductCollectionSchema, Wc as formatEventPriceAmount, Wg as mapButtonVisualAppearances, Wh as unmanagedSurfaceEditability, Wi as eventCollectionSourceSchemaShape, Wm as DialogTrigger, Wo as placeCountCeiling, Wr as buildGiftingInteractiveIslandProps, Ws as formatRegistrationSchedule, Wt as ApiRequestError, Wu as getAnchorClasses, Wv as inferSiteDateLocale, X_ as nextLiveRunSessionStartMs, Xa as resolveEventRegistrationEventSource, Xc as eventDateOptions, Xf as generateFooterCss, Xg as solveSurfaceInks, Xi as calendarWindowPageSchema, Xl as shouldReserveFeatureCardIconZone, Xo as resolveRegistrationTicketContinuation, Xp as API_ENDPOINTS, Xr as buildCartInteractiveIslandProps, Xs as occurrenceTitleOverride, Xv as getBookingLocalDateKey, Y as SessionJournalProvider, Y_ as firstLiveRunSessionStartMs, Ya as displayButtonText, Yc as eventCalendarWeekStart, Yd as deriveInlineTextFieldChanges, Yg as surfaceInkPublication, Yi as calendarWindowMonths$1, Yl as resolveFeatureCardGeneratedIconSizePx, Yo as resolveRegistrationAvailabilityBlocker, Yr as shopBlockDefinition, Ys as getVisibleTicketTypes, Yv as formatLocalScheduleDate, Z_ as orderedLiveRunSessions, Za as bookingNowSchema, Zc as formatCalendarTitle, Zf as buildTextContrastShadow, Zg as HOVER_TEXT_THRESHOLD, Zi as planCalendarMonthRanges, Zo as settledRemainingPlaces, Zp as BEFORE_BOOKING_QUESTIONS_ROUTE, Zr as buildCheckoutInteractiveIslandProps, Zs as transformRegistrationOptionsResponse, Zv as getLocalScheduleDate, _ as applyBindingsToContent, _a as EventItem, _c as clearSignInReturnDrafts, _d as resolveBackgroundColorValue, _f as applyCompiledRuntimeFieldsToContent, _g as surfaceInkDeclarations, _i as productItemKey, _l as canJoinEventWaitlist, _m as usePrevious, _n as renderSourceFor, _o as resolveOfferingsPreviewGroups, _p as offeringsPreviewCompositionTreatmentValues, _s as getEligibilityFlowFlags, _u as readRuntimeNow, _y as unsafeAsAppointmentResourceId, a_ as expandPalette, aa as toEventPaginationLoadError, ac as getTicketTypeLineMax, ag as generateInteractiveChildInheritanceCSS, ah as Item$1, ai as buildProductDetailDisplay, al as formatTime$1, as as paymentChoiceDetails, ay as formatBookingPriceDisplay, ba as MapPinIcon, bc as nextSignInReturnExpiry, bd as el, bf as restoreCompiledRuntimeFieldsFromContent, bg as cssVarValue, bl as formatTotalCapacity, bo as bookingBarPlacement, bs as getSlidingScaleSelectionMessage, bu as headerRuntimeTransforms, bv as publishedContactDetails, c as usePreviewShownTheme, c_ as oklabToOklch, ca as getEventRuntimeFiltersKey, cc as setTicketLineQuantity, cd as boxStylesTransforms, cg as formatButtonColourContractError, ch as Presence, ci as formatValidity, cl as resolveEventCardBooking, co as buildOfferingsPreviewListing, cp as transitionCatalogueEntries, cr as EVENT_REGISTRATION_ANCHOR_ID, cs as resolveDiscountContext, cu as siteTopChromeMeasurementTargets$1, cv as parseMailingListVisitorSelection, cy as publicEventPricingDisplay, d_ as rgbToHex, da as normalizeOptionalId, dc as toWholeSeriesRegistrationEvents, dd as resolveCardRoleForBoxStyles, df as effectiveHeaderNavLinkStyle, dg as SURFACE_INK_CSS_VARS, di as passCardListContent, dl as resolveRuntimeEventDestination, dm as Select, dr as deriveEventScheduleSummary, ds as resolveRouteRequiresPayment, dt as JournalWriteRefused, du as markEditableSurfaceForwarding, dv as sameMailingListPlacementTargeting, dy as resolveExactOrFreePriceDisplay, e_ as inkReference, ea as eventPageOperationQuery, ec as formatPrice, ef as isInlineTextEmpty, ei as buildShopInteractiveIslandProps, el as formatEventCompactDateRail, em as pageCommitReasonMessage, eo as resolveEventCalendarReadPlan, ep as headerNeedsPhotoShade, es as normalizeEventRegistrationMaxTickets, eu as siteHeaderManifest, ey as resolveBookingBusinessTimeZone, f_ as srgbToOklab, fa as catalogueEventCardProps, fc as EVENT_SIGN_IN_FORM_ID, fd as parseBackgroundContent, ff as readOpeningToneProjection, fg as surfaceForegroundDeclarations, fi as EMPTY_COMMERCE_CART_STATE, fl as bookingPresentation, fm as SelectContent, fo as normalizeOfferingsPreviewItemLimit, fr as derivePreviewRunSchedule, fs as toRegistrationRequestSubject, ft as journalFailureReason, fu as splitPositioningClasses, fy as resolvePricingOptionsPriceDisplay, g_ as boxBackgroundSchema, ga as CardListItems, gc as toEventSignInDraft, gd as resolveSurfaceForegroundStyles, gg as surfaceForegroundValueWithOpacity, gh as useId$1, gi as parseStoredCommerceCartState, gl as shownVenue, gn as remoteDraftValues, gp as introCompositionTreatmentValues, gs as getCurrentTicketSelection, gu as teamMemberCardBiography, gv as knownSocialPlatformLabels, gy as assertNever$1, h as composePreviewTheme, h_ as customCssRuleSchema, ha as CardListCollection, hc as eventSignInRestoration, hd as resolveSectionSurfaceForeground, hg as surfaceForegroundValue, hh as useSize, hi as deriveCommerceCheckoutState, hl as placesLeftLabel, hm as SelectValue, ho as resolveOfferingsPreviewGroupCta, hp as featureCardCompositionTreatmentValues, hs as invitationSubmission, hu as teamMemberBiography, hy as formatCurrencyAmount, i_ as TokenResolver, ia as planEventPageOperation, ic as getTicketSelectionTotal, ig as generateEffectsCSS, ii as buildProductCardDisplay, il as formatEventTimeRange, im as unwrapResponse, ir as getAtPath, is as buildReviewedBookingPaymentViewModel, iy as toUtcIsoDateTimeString, jc as deriveBookingQuestions, jg as compositeHex, jh as useControlReadiness, jl as leavePage, jo as registrationStepLabel, js as okWith, ju as defineInteractiveIslandMetaKeys, ka as renderVideo, kc as bookingQuestionsRefusal, kg as resolveSurface, kh as Button, kl as PAGE_NAVIGATION, ko as registrationPresentation, ks as err, ku as buildInteractiveIslandProps, l_ as oklabToSrgb, la as normalizeCsvIds, lc as getRegistrationStartAt, ld as boxStyleClassNames, lf as selectItemSurfacePresentation, lg as DEFAULT_SURFACE_TEXT_COLOR, li as membershipCardListContent, ll as resolveEventCta, lp as resolveCompiledSectionContextFromContent, lr as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, ls as resolveEventRequiresPayment, lt as getEditorClientId, ly as publicEventPricingStrategy, m_ as blockCustomCssRuleSchema, ma as EmptyState, mc as eventSignInEnds, md as parseRuntimeBackgroundContent, mg as surfaceForegroundStyle, mi as buildProductCartItem, ml as getBlockApiReadStage, mm as SelectTrigger, mr as EventListingFrameView, ms as createRegistrationDraftData, mu as parseTeamMemberSpecialties, my as toNonNegativeCents, n_ as resolveOpaqueSurfaceHex, na as getEventIdentity, nc as getSingleSelectedPricingOptionId, ni as shopProductPresentation, nl as formatEventHourLabel, nm as ApiEnvelopeError, no as resolveEventRegistrationScopedEvents, np as boundaryRuntimeMetricsForDecorativeTransition, ns as calculateEventRegistrationPreviewTotal, nv as parseMailingListRuntimeContext, ny as toBookingTimeZone, o_ as contrastRatio, oa as toError, oc as hasValidPricingOptionSelection, od as isBlockButtonRole, og as compileButtonColourStates, oh as Root$1, oi as formatCommercePrice, ol as groupEventsByDate, or as withValueAtPath, os as paymentChoicePrice, ou as measureSiteTopChromeBottomPx, oy as isPublicEventPricingOptionDisplayable, pa as listingEventCardProps, pc as eventSignInDraftStore, pd as parseBackgroundOverlay, pg as surfaceForegroundInputFromResolved, pi as buildPassCartItem, pl as browserReadAuthoritySchema, pm as SelectItem, po as offeringsListingFor, pr as MonthLookView, ps as beginWaitlistInvitation, pt as sendPageCommand, pu as contentTransforms, py as parsePositiveCents, q_ as formatCreditProductUnits, qa as buildEventRegistrationDisplayFromScopedEvents, qc as formatEventDuration, qf as resolveCardRole, qg as resolveSurfaceForeground, qi as calendarQueryKey, qo as resolveGuestNextStepCheck, qp as editorAdmissionSession, qr as productDetailBlockDefinition, qs as getPortalSubjectEmail, qv as toScheduledBookingDateTime, ra as getEventPaginationView, rc as getTicketLineQuantity, rf as parseInlineTextFromUnknown, ri as buildCartDisplay, rl as formatEventNextDateFact, rm as extractApiEnvelopeErrorDetails, ro as offeringNounForEvent, rr as lookPartShown, rs as buildBookingPaymentSelectionViewModel, rv as resolveBookingSignupOffer, ry as parseUtcIsoDateTimeString, s as usePreviewPageDesignRenderState, s_ as hexToRgb, sa as buildEventRuntimeFilters, sc as normalizeTicketSelectionLines, sg as BUTTON_CONTRAST_POLICY, sh as createRovingFocusGroupScope, si as formatInterval, sl as resolveEventTimeZone, so as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, sp as anglePolygonCss, sr as EventHeader, ss as findPreSelectedEvent, sv as parseMailingListPlacementTargeting, sy as publicEventPricingCurrency, t_ as resolveConcreteColorHex, ta as eventPaginationLoadReducer, tc as canRequestTicketOption, ti as getShopDisplayForItems, tl as formatEventDateParts, tm as pageCommitReasonTag, tn as useOptionalEditorUiStoreInstance, to as normalizeEventRegistrationPageSurfaceSubject, tp as headerRootPaint, ts as resolveEventRegistrationSubmitPlan, tu as SITE_CHROME_VISIBLE_HEADER_SELECTOR, ty as resolveBookingTimeZoneId, u as useSiteChromeCustomizeOptional, u_ as oklchToHexGamut, ua as normalizeCsvString, uc as toRegistrationEvents, ud as normalizeBoxStylesBorder, uf as heroPhotoPaintsGround, ug as SURFACE_FOREGROUND_CSS_VARS, ui as membershipClassesLabel, ul as resolveEventLinkProps, um as trustedJournalState, ur as eventCardListContent, us as resolveRegistrationTarget, ut as createSessionJournal, uu as composeHeaderSectionWrapperClassName, uy as publicEventPricingType, va as eventCategoryBadge, vc as createSignInReturnDraftStore, vf as compileEditorModelRuntime, vg as surfaceInkStyle, vi as reduceCommerceCart, vl as canJoinEventWaitlistOnAnyMode, vo as resolveOfferingsRenderInput, vp as testimonialsCompositionTreatmentValues, vs as getRegistrationOccurrenceId, vu as resolveDateRuntimeContext, vy as unsafeAsAppointmentServiceId, wa as ImagePresets, wc as EMPTY_BOOKING_QUESTIONS_ANSWERS, wd as lookQuoteLimitTransform, wg as textColorValue, wh as useLayoutEffect2, wl as isEventFull, wm as FIELD_FOCUS_CLASS, wo as bookingPanelHeading, ws as shouldLoadRegistrationOptions, wy as unsafeAsSiteId, xa as MediaNodeServer, xc as readSignInReturn, xd as when, xf as skinTokenCssVars, xg as mergeStyles, xh as useDirection, xi as buildOfferingsCatalogueListing, xl as getEventAvailability, xo as bookingCardEntry, xp as PUBLIC_DOWNLOAD_MEDIA_TYPES, xs as getTicketSelectionRemainingPlaces, xu as chromeLogoTransforms, xy as unsafeAsPositiveByteCount, ya as CalendarIcon, yc as decideSignInReturn, yg as backgroundColorStyle, yl as formatEventRemainingPlaces, yn as resolveRenderedValues, yo as DEFAULT_BOOKING_BUTTON_TEXT, ys as getSlidingScaleForEvent, yu as mediaTransforms, zc as buildEventListWeek, zd as buildGeneratedBlockIconRenderAssetLookupFromUnknown, zf as compiledRuntimeStyleFieldNames, zg as paddingDeclarations, zi as buildEventCollectionDisplay, zl as blockBookingConsentSchema, zm as DialogContent, zo as buildEventRegistrationPaymentOptionsViewModel, zr as newsletterSignupBlockDefinition, zs as findSelectedTicketType, zu as resolvedItemSurfaceProps, zv as formatDate$2 } from "./previewAssistantSlot-CuOcsG_N.mjs";
|
|
3
|
-
import { A as MapPin, At as locationDistanceMetres, Bt as parseLocationValue, Ct as ArrowDown, Dt as decideLocationRelationship, E as Mountain, Et as confirmLocationPair, Ft as formatLocationAddress, It as locationAddressSchema, Jt as ok$1, Kt as mapDrawingSchema, Lt as locationPinSchema, Mt as sameMeaningfulAddress, O as Minus, Ot as decideLocationSave, Pt as decideLocationSourcePermission, T as Move, Tt as LOCATION_MATCH_THRESHOLDS_METRES, W as House, _ as Route, b as Plus, c as Trash2, ct as CirclePlus, d as Sparkles, h as Search, ht as ChevronDown, jt as sameLocationSpatialPair, kt as editLocationValue, lt as CircleMinus, mt as ChevronLeft, n as X, nt as Crosshair, pt as ChevronRight, qt as err$1, r as WifiOff, s as TriangleAlert, st as Circle, u as Store, ut as CircleCheck, v as RotateCcw, vt as Building2, x as Pencil, z as Info, zt as normalizeLocationAddressText } from "./lucide-react-DygTyy7K.mjs";
|
|
4
|
-
import {
|
|
2
|
+
import { n as useOptionalPreviewLayout } from "./PreviewLayoutContext-Dy0LwcHc.mjs";
|
|
3
|
+
import { $ as pageEvidenceEvents, $_ as authoredValuesEqual, $a as buildEventRegistrationDisplayFromScopedEvents, $c as selectQuickDateEvents, $f as componentRuntimeRulesForTheme, $g as freezeOwnedThemeValue, $i as EmptyState, $n as getAtPath, $o as planRegistrationDetailsCheck, $p as MQ_MD_DOWN, $r as buildShopInteractiveIslandProps, $s as formatTime$3, $u as publicPassProductCollectionSchema, $v as formatBookingCompactEnglishTime, Aa as eventReadinessLoaderKey, Ac as signInReturnPath, Ad as resolveCardRoleForBoxStyles, Af as readOpeningToneProjection, Ag as rgbColorValue, Ah as useControllableState, Al as getEventAvailability, Ao as bookingEntry, As as parseCurrencyInputToCents, Au as formBlockDefinition, Ba as normalizeCsvIds, Bc as isBookingQuestionsAnswerEvent, Bd as lookCarouselRegionTransform, Bf as skinTokenCssVars, Bg as actionVariableFallback, Bh as createSlot, Bi as eventCollectionDisplaySchemaShape, Bl as leavePage, Bo as registrationStepLabelContext, Bp as PUBLIC_DOWNLOAD_MEDIA_TYPES, Br as buildNewsletterFormInteractiveIslandProps, Bs as clearWorkflowFeedback, Bu as listLookSlot, C_ as customCssRuleSchema, Cc as eventSignInRestoration, Cg as surfaceForegroundValue, Ch as useId$1, Cl as getBlockApiReadStage, Cm as unwrapResponse, Co as resolveOfferingsPreviewGroupCta, Cs as invitationSubmission, Cu as chromeLogoTransforms, Cv as knownSocialPlatformLabels, Cy as assertNever$1, Da as EventQuickFacts, Dc as decideSignInReturn, Dd as boxStylesTransforms, Dg as backgroundColorStyle, Dh as useCallbackRef, Dl as canJoinEventWaitlistOnAnyMode, Do as DEFAULT_BOOKING_BUTTON_TEXT, Dp as transitionCatalogueEntries, Ds as getSlidingScaleForEvent, Dv as publishedContactDetails, Ec as createSignInReturnDraftStore, Eg as surfaceInkStyle, Eh as DismissableLayer, Ei as buildEventCalendarListingRender, El as canJoinEventWaitlist, Eo as resolveOfferingsRenderInput, Ep as anglePolygonCss, Es as getRegistrationOccurrenceId, Eu as staticHeaderChromeRuntime, Fa as eventScopeQuery, Fc as bookingQuestionsAnswerDraftSchema, Fd as resolveSurfaceForegroundStyles, Fg as parseSurfaceTree, Fi as buildEventListingInteractiveIslandProps, Fl as selectMostOpenCapacitySource, Fo as panelShouldOpen, Fp as introCompositionTreatmentValues, Fr as normalizeLocationMapProps, Fs as validateFormData, Fu as createZodCodec, Ga as calendarQueryKey, Gc as checkBookingQuestionsAnswered, Gd as createTransformRegistry, Gg as buttonTypographyDeclarations, Gi as eventPaginationLoadReducer, Gl as groupPublicEventsByRun, Gm as DialogClose, Gn as planArrangementContent, Go as isRegistrationLocked, Gr as cartBlockDefinition, Gs as ENTITLEMENT_SINGLE_TICKET_TOOLTIP, H_ as surfaceCardRoleValues, Ha as normalizeOptionalId, Hc as restoreBookingQuestionsAnswers, Hd as lookQuoteLimitTransform, Hf as readHeaderNavFontSizePreference, Hg as buttonRadius, Hi as eventCollectionSourceSchemaShape, Hl as requestSignIn, Ho as createInitialRegistrationFlowState, Hr as giftingBlockDefinition, Hs as reportWorkflowSuccess, Hu as resolvedItemSurfaceProps, I_ as indexRenderableMediaAssets, Ia as eventScopeQueryKeys, Ic as bookingQuestionsPaymentSnapshotSchema, Id as resolveBackgroundColorValue, If as applyCompiledRuntimeFieldsToContent, Ig as prepareSurfaceIndex, Ih as Button, Ii as eventListingBlockRuntime, Il as blockSiteTermsSchema, Io as registrationPaymentRoute, Ip as offeringsPreviewCompositionTreatmentValues, Is as assertNever$2, Iu as defineClientOwnedBlockRuntime, Ja as calendarWindowPageSchema, Jc as eventListWeekDays, Jd as when, Jg as BORDER_WIDTH_MAP, Ji as planEventPageOperation, Jo as decideEventRegistrationPayment, Jr as shopBlockDefinition, Js as formatBookingWhen, Ju as classPricesDataSchema, Jv as formatDateTimeRange, K as createSessionJournalBindings, K_ as asDesignBlockId, Ka as calendarWindowBounds, Kc as getInitialFieldValue, Kd as runTransforms, Kg as materializeRuntimeButtonAppearance, Ki as getEventIdentity, Km as DialogContent, Ko as registrationFlowReducer, Kr as productDetailBlockDefinition, Ks as areEntitlementsDisabledForTicketCount, Ku as Grid, Kv as formatDate$2, La as resolveEventScope, Lc as bookingQuestionsRefusal, Lf as compileEditorModelRuntime, Lg as resolveSurface, Li as buildEventCollectionDisplay, Ll as verifiedSiteTermsAcceptanceSchema, Lo as registrationPresentation, Lp as testimonialsCompositionTreatmentValues, Ls as err, Lu as defineProgressiveBlockRuntime, Ma as eventReadinessQueryKeys, Mc as EMPTY_BOOKING_QUESTIONS_ANSWERS, Md as parseBackgroundOverlay, Mf as heroPhotoPaintsGround, Mg as textColorValue, Mh as createContextScope, Ml as getRemainingPlaces, Mm as Callout, Mo as bookingPanelHeading, Mr as getBlockDefinition, Ms as shouldLoadRegistrationOptions, Mu as buildInteractiveIslandProps, Mv as EDITOR_SESSION_GENERATION_HEADER, N_ as runtimeMediaSchema, Na as eventDiscoveryFilterKeys, Nc as NO_BOOKING_QUESTIONS, Nd as parseRuntimeBackgroundContent, Ng as opaqueSurfaceContextFromTheme, Nh as composeEventHandlers, Nl as isEventFull, No as courseTitleOf, Ns as withRegistrationAvailability, Nu as createInteractiveIslandCodec, Ny as parseUuidBrand, Oa as getCardOrientation, Oc as nextSignInReturnExpiry, Od as boxStyleClassNames, Of as selectItemSurfacePresentation, Og as cssVarValue, Oh as useDirection, Ol as formatEventRemainingPlaces, Oo as bookingBarPlacement, Op as resolveCompiledSectionContextFromContent, Os as getSlidingScaleSelectionMessage, Ou as uiTransforms, Oy as unsafeAsPositiveByteCount, Pa as eventScopeLoaderParam, Pc as applyBookingQuestionsAnswerEvent, Pd as resolveSectionSurfaceForeground, Pg as opaqueSurfaceDeclarations, Ph as Primitive, Pi as eventListingBlockDefinition, Pl as selectEventCapacitySource, Po as getEventSelectionMode, Pp as featureCardCompositionTreatmentValues, Ps as registrationQuestionsMessage, Pu as defineInteractiveIslandMetaKeys, Q_ as journalReplayValue, Qa as eventRegistrationBlockDefinition, Qc as formatEventQuickDate, Qg as mapButtonVisualAppearances, Qh as bindingSchema, Qi as listingEventCardProps, Ql as shouldReserveFeatureCardIconZone, Qm as menuItemInteractionClassName, Qo as placeCountCeiling, Qp as MQ_LG_UP, Qr as buildProductListInteractiveIslandProps, Qs as formatRegistrationSchedule, Qt as useOptionalEditorUiStoreInstance, Qu as formatEventPriceDisplay, Qv as resolveBookingDisplayContext, Ra as buildEventRuntimeFilters, Rc as decideBookingQuestionsRestoration, Rg as serializeSurfaceTree, Rh as useControlReadiness, Ri as buildEventCollectionHydration, Rl as PAGE_NAVIGATION, Ro as registrationRoute, Rr as newsletterSignupBlockDefinition, Rs as ok, Ru as listItemPresentation, S_ as blockCustomCssRuleSchema, Sc as eventSignInEnds, Sf as parseInlineTextFromUnknown, Sg as surfaceForegroundStyle, Sh as useSize, Si as eventCalendarBlockDefinition, Sl as browserReadAuthoritySchema, Sm as extractApiEnvelopeErrorDetails, Ss as createRegistrationDraftData, Su as headerRuntimeTransforms, Sy as formatCurrencyAmount, Tc as clearSignInReturnDrafts, Td as isBlockButtonRole, Tg as surfaceInkDeclarations, Th as useFocusGuards, Ti as buildEventCalendarListingDisplay, Tl as shownVenue, To as resolveOfferingsPreviewGroups, Ts as getEligibilityFlowFlags, Tu as layoutTransforms, Ty as unsafeAsAppointmentServiceId, U_ as parseGradientPresetId, Ua as calendarMonthKey, Uc as toBookingQuestionsAnswerDraft, Ud as lookSkinSlotTransform, Ug as buttonShadow, Uh as useComposedRefs, Ui as createInitialEventPaginationLoadState, Ul as closedRunCopy, Uo as decideEventChoice, Ur as buildGiftingInteractiveIslandProps, Us as confirmationPaymentRows, Uu as itemRole, Va as normalizeCsvString, Vc as needsBookingQuestionsRefresh, Vd as lookLeadSlotTransform, Vf as mergeHeaderNavTypographyPreference, Vg as buttonBorder, Vi as eventCollectionHydrationSchema, Vl as pageNavigationSchema, Vo as areEventRegistrationPaymentSelectionsEqual, Vr as newsletterBlockSubmissionMessage, Vs as reportWorkflowError, Vt as ApiRequestError, Vu as lookListPresentationSchemaShape, W_ as siteChromeBackgroundOverrideOwner, Wa as calendarPageResponseError, Wc as toBookingQuestionsPaymentSnapshot, Wd as asPartialObject, Wg as buttonStateAppearanceDeclarations, Wh as cn$1, Wi as eventPageOperationQuery, Wl as bookingPageKindSchema, Wm as Dialog, Wo as getDeclinedPass, Wr as checkoutBlockDefinition, Ws as resolveFinishedPresentation, Wv as unsafeAsEditorBlockId, X_ as resolveAvailableBookingCollectionOptions, Xa as resolveCalendarReadProfile, Xc as buildMonthDay, Xg as FONT_SIZE_MAP, Xi as toError, Xm as DialogTitle, Xo as fullyBookedLabel, Xr as buildCheckoutInteractiveIslandProps, Xs as formatEventDateTime, Xu as formatEventPrice, Xv as formatTimeZoneCityLabel, Y as SessionJournalProvider, Y_ as normalizeCurrencyCode, Ya as planCalendarMonthRanges, Yc as eventWeekGroupingContext, Yd as parseStoredVariant, Yf as arrangementManifestFromVariants, Yg as DEFAULT_BUTTON_SIZES, Yi as toEventPaginationLoadError, Ym as DialogPortal, Yo as shouldPromptForLogin, Yr as buildCartInteractiveIslandProps, Ys as formatDate$3, Yu as resolveClassPriceItems, Yv as formatTime$2, Z_ as getBookingLaterInstalments, Zc as resolveMonthSelectedDay, Zf as resolveEffectiveArrangement, Zg as generateShadowValue$1, Zh as unmanagedSurfaceEditability, Zi as catalogueEventCardProps, Zl as resolveFeatureCardGeneratedIconSizePx, Zm as DialogTrigger, Zo as getTicketSelectionPurpose, Zr as buildProductDetailInteractiveIslandProps, Zs as formatPassCreditUsageLabel, Zu as formatEventPriceAmount, Zv as inferSiteDateLocale, _ as applyBindingsToContent, __ as oklabToSrgb, _c as getRegistrationStartAt, _g as DEFAULT_SURFACE_TEXT_COLOR, _h as Anchor, _i as reduceCommerceCart, _l as resolveEventCta, _m as calendarMonthDate, _p as generateNavLinkCSS, _s as resolveEventRequiresPayment, _u as teamMemberBiography, _y as publicEventPricingType, a_ as HOVER_TEXT_THRESHOLD, aa as MapPinIcon, ac as transformRegistrationOptionsResponse, ad as toBookingRequirementConsentField, ai as formatCommercePrice, al as formatCalendarTitle, ao as eventCalendarListGroupingDecision, ap as requireCuratedSiteStyle, ar as EVENT_REGISTRATION_ANCHOR_ID, as as settledRemainingPlaces, av as resolveWholeSeriesBookingPhase, ay as parseBookingLocalDate, b_ as srgbToOklab, bc as EVENT_SIGN_IN_FORM_ID, bg as surfaceForegroundDeclarations, bh as Root2$2, bi as buildOfferingsCatalogueListing, bl as isBookableEvent, bm as pageCommitReasonTag, bo as offeringRunLifecycle, bp as headerRootPaint, bs as toRegistrationRequestSubject, bu as resolveDateRuntimeContext, by as parsePositiveCents, c as usePreviewShownTheme, c_ as inkReference, ca as MediaNodeServer, cc as formatPrice, cd as BACKGROUND_POSITION_PRESET_VALUES, cf as resolveBlockIconRenderValue, ci as membershipCardListContent, cl as formatEventCompactDateRail, cm as EDITOR_LOADING_NOTICE, co as resolveEventRegistrationScopedEvents, cp as gradientToCss, cr as EventListingFrameView, cs as normalizeEventRegistrationMaxTickets, cu as measureSiteTopChromeBottomPx, cy as resolveBookingTimeZoneId, da as ImagePresets, dc as getTicketLineQuantity, dg as generateEffectsCSS, dh as hideOthers, di as EMPTY_COMMERCE_CART_STATE, dl as formatEventNextDateFact, dm as editorAdmissionRefusal, dr as offeringDatesBySeries, ds as buildBookingPaymentSelectionViewModel, dt as JournalWriteRefused, dy as toUtcIsoDateTimeString, e_ as ownedThemeSnapshot, ea as CardListCollection, ec as getImplicitSingleTicketType, ef as RichTextDocSchema, ei as getShopDisplayForItems, el as formatEventTeacherLine, em as MQ_MD_UP, eo as buildEventRegistrationInteractiveIslandProps, ep as designRuntimeRulesForTheme, es as planRegistrationDetailsContinuation, ev as formatCreditProductBalance, ey as toScheduledBookingDateTime, f_ as TokenResolver, fa as MediaPlaceholder, fc as getTicketSelectionTotal, fg as generateInteractiveChildInheritanceCSS, fh as Item$1, fi as buildPassCartItem, fl as formatEventTimeRange, fm as editorAdmissionSession, fp as resolveCardRole, fr as deriveEventScheduleSummary, fs as buildReviewedBookingPaymentViewModel, ft as journalFailureReason, fu as composeHeaderSectionWrapperClassName, fy as formatBookingPriceDisplay, g_ as oklabToOklch, ga as renderVideo, gc as setTicketLineQuantity, gg as formatButtonColourContractError, gh as Portal, gi as productItemKey, gl as resolveEventCardBooking, gm as BEFORE_BOOKING_QUESTIONS_ROUTE, gn as resolveRenderedValues, gp as buildTextContrastShadow, gs as resolveDiscountContext, gu as parseTeamMemberSpecialties, gy as publicEventPricingStrategy, h as composePreviewTheme, h_ as hexToRgb, ha as renderAudio, hc as normalizeTicketSelectionLines, hg as BUTTON_CONTRAST_POLICY, hh as Presence, hi as parseStoredCommerceCartState, hl as resolveEventTimeZone, hm as API_ENDPOINTS, hp as generateFooterCss, hs as findPreSelectedEvent, hu as contentTransforms, hv as parseMailingListVisitorSelection, hy as publicEventPricingDisplay, i_ as solveSurfaceInks, ia as CalendarIcon, ic as occurrenceTitleOverride, id as isBookingRequirementConsentFieldId, if as buildGeneratedBlockIconRenderAssetLookupFromUnknown, ii as buildProductDetailDisplay, il as eventDateOptions, io as previewStageSchema, ir as EventHeader, is as resolveRegistrationTicketContinuation, iv as orderedLiveRunSessions, iy as getLocalScheduleDate, ja as eventReadinessQuery, jc as sweepExpiredSignInReturnDrafts, jd as parseBackgroundContent, jg as textColorStyle, jh as useLayoutEffect2, jl as getEventAvailabilityStatus, jm as VISUALLY_HIDDEN_STYLES, jo as bookingEntryProgress, js as resolveHeldTicketPlaces, ju as buildFormInteractiveIslandProps, jy as unsafeAsSiteId, ka as getContainerClass, kc as readSignInReturn, kd as normalizeBoxStylesBorder, kf as effectiveHeaderNavLinkStyle, kg as mergeStyles, kh as createCollection, kl as formatTotalCapacity, km as trustedJournalState, ko as bookingCardEntry, ks as getTicketSelectionRemainingPlaces, ku as formattingTransforms, ky as unsafeAsPositiveSeconds, l_ as resolveConcreteColorHex, la as RichText, lc as canRequestTicketOption, ld as getAnchorClasses, li as membershipClassesLabel, ll as formatEventDateParts, lo as offeringNounForEvent, lr as OfferingCourseCards, ls as resolveEventRegistrationSubmitPlan, lt as getEditorClientId, lv as parseMailingListRuntimeContext, ly as toBookingTimeZone, m_ as contrastRatio, ma as mediaImageHostProps, mc as hasValidPricingOptionSelection, mf as deriveInlineTextFieldChanges, mg as resolveSolidButtonColour, mh as createRovingFocusGroupScope, mi as deriveCommerceCheckoutState, ml as groupEventsByDate, mn as renderSourceFor, mo as buildOfferingsPreviewListing, ms as paymentChoicePrice, mu as splitPositioningClasses, mv as parseMailingListPlacementTargeting, my as publicEventPricingCurrency, n_ as safeTokenOr, na as EventItem, nc as getTicketTypeAvailabilityLabel, nd as blockBookingConsentSchema, nh as ReactRemoveScroll, ni as buildCartDisplay, nl as buildCalendarViewport, nm as MQ_SM_UP, no as resolveEventRegistrationEventSource, np as headerStyleRecipeForTheme, ns as resolveRegistrationAdmission, nu as siteHeaderManifest, nv as CANCELLED_SESSION_STATUS, ny as formatLocalScheduleDate, o_ as certifyPaint, oa as CardListContentPart, oc as withOccurrenceTitle, od as beforeBookingQuestionsPresentationSchema, oi as formatInterval, ol as formatDate$1, om as isObjectRecord, oo as resolveEventCalendarReadPlan, op as compiledRuntimeStyleFieldNames, or as EVENT_REGISTRATION_CHECKOUT_ATTEMPT_PARAM, os as visitorHoldsOwnPlace, ov as generateUuidV4, oy as parseLocalScheduleTime, p_ as expandPalette, pa as computeMediaTransformStyle, pc as getTicketTypeLineMax, pf as coerceInlineTextWithFallback, pg as compileButtonColourStates, ph as Root$1, pi as buildProductCartItem, pl as formatTime$1, pm as observeEditorAdmission, pn as remoteDraftValues, po as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, pp as generateDefaultCardSystem, pr as derivePreviewRunSchedule, ps as paymentChoiceDetails, pt as sendPageCommand, pu as markEditableSurfaceForwarding, py as isPublicEventPricingOptionDisplayable, qa as calendarWindowMonths$1, qc as buildEventListWeek, qd as el, qf as arrangementLookHooks, qg as paddingDeclarations, qi as getEventPaginationView, ql as FEATURE_CARD_ICON_TREATMENTS, qo as buildEventRegistrationPaymentOptionsViewModel, qr as productListBlockDefinition, qs as findSelectedTicketType, qu as classPricesCopySchema, r_ as surfaceInkPublication, ra as eventCategoryBadge, rc as getVisibleTicketTypes, rf as sanitizeHref, ri as buildProductCardDisplay, rl as eventCalendarWeekStart, rm as MQ_TABLET_ONLY, ro as bookingNowSchema, rr as lookPartShown, rs as resolveRegistrationAvailabilityBlocker, ru as SITE_CHROME_VISIBLE_HEADER_SELECTOR, rv as firstLiveRunSessionStartMs, ry as getBookingLocalDateKey, s as usePreviewPageDesignRenderState, s_ as contrastThresholdByPolicy, sc as formatCentsAsCurrencyInput, sd as EVENT_BOOKING_ARRIVAL_QUERY, sf as parseBlockIconValue, si as formatValidity, sl as formatEventClockLabel, sm as isRecord$14, so as normalizeEventRegistrationPageSurfaceSubject, sp as surfaceResolutionContextFromTheme, sr as MonthLookView, ss as isEventRegistrationAvailable, sy as resolveBookingBusinessTimeZone, t_ as resolveSurfaceForeground, ta as CardListItems, tc as getPortalSubjectEmail, td as blockBookingPaymentTermsSchema, th as usePortalContainer, ti as shopProductPresentation, tl as formatEventDuration, tm as MQ_SM_DOWN, to as displayButtonText, tr as withValueAtPath, ts as resolveGuestNextStepCheck, tu as siteFooterManifest, tv as formatCreditProductUnits, ty as addLocalScheduleDays, u as useSiteChromeCustomizeOptional, u_ as resolveOpaqueSurfaceHex, uc as getSingleSelectedPricingOptionId, ui as passCardListContent, ul as formatEventHourLabel, up as getGradientPreset, ur as eventCardListContent, us as calculateEventRegistrationPreviewTotal, ut as createSessionJournal, uu as siteTopChromeMeasurementTargets$1, uv as resolveBookingSignupOffer, uy as parseUtcIsoDateTimeString, v_ as oklchToHexGamut, vc as toRegistrationEvents, vf as inlineTextToPlainText, vg as SURFACE_FOREGROUND_CSS_VARS, vh as Arrow, vl as resolveEventLinkProps, vp as formatSiteChromeBackgroundTokenLabel, vs as resolveRegistrationTarget, vu as teamMemberCardBiography, vv as sameMailingListPlacementTargeting, vy as resolveExactOrFreePriceDisplay, w_ as boxBackgroundSchema, wc as toEventSignInDraft, wg as surfaceForegroundValueWithOpacity, wh as FocusScope, wi as buildEventCalendarInteractiveIslandProps, wl as placesLeftLabel, ws as getCurrentTicketSelection, wu as headerLogoMayBeHardToSee, wy as unsafeAsAppointmentResourceId, xa as resolvePublicMediaUrl, xc as eventSignInDraftStore, xg as surfaceForegroundInputFromResolved, xh as createPopperScope, xi as offeringsCatalogueShape, xl as bookingPresentation, xm as ApiEnvelopeError, xo as offeringsListingFor, xp as boundaryRuntimeMetricsForDecorativeTransition, xs as beginWaitlistInvitation, xu as mediaTransforms, xy as toNonNegativeCents, y_ as rgbToHex, ya as resolveMediaNodeResponsiveImage, yc as toWholeSeriesRegistrationEvents, yf as isInlineTextEmpty, yg as SURFACE_INK_CSS_VARS, yh as Content$2, yl as resolveRuntimeEventDestination, ym as pageCommitReasonMessage, yo as normalizeOfferingsPreviewItemLimit, yp as headerNeedsPhotoShade, ys as resolveRouteRequiresPayment, yu as readRuntimeNow, yy as resolvePricingOptionsPriceDisplay, za as getEventRuntimeFiltersKey, zc as deriveBookingQuestions, zf as restoreCompiledRuntimeFieldsFromContent, zg as compositeHex, zi as buildEventCollectionListingDisplay, zl as canonicalUrl, zo as registrationStepLabel, zr as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, zs as okWith, zu as listLookControl } from "./previewAssistantSlot-Caofnr1Z.mjs";
|
|
4
|
+
import { At as sameMeaningfulAddress, C as Move, Ct as LOCATION_MATCH_THRESHOLDS_METRES, D as MapPin, Dt as editLocationValue, Et as decideLocationSave, Ft as locationPinSchema, Gt as err$1, I as Info, Kt as ok$1, Lt as normalizeLocationAddressText, Mt as decideLocationSourcePermission, Nt as formatLocationAddress, Ot as locationDistanceMetres, Pt as locationAddressSchema, Q as ExternalLink, Rt as parseLocationValue, T as Minus, Tt as decideLocationRelationship, V as House, Wt as mapDrawingSchema, at as Circle, c as Trash2, ct as CircleCheck, dt as ChevronRight, et as Crosshair, ft as ChevronLeft, g as RotateCcw, gt as Building2, h as Route, kt as sameLocationSpatialPair, l as Store, mt as Check, n as X, ot as CirclePlus, p as Search, pt as ChevronDown, r as WifiOff, s as TriangleAlert, st as CircleMinus, u as Sparkles, ut as ChevronUp, v as Plus, w as Mountain, wt as confirmLocationPair, xt as ArrowDown, y as Pencil } from "./lucide-react-BCNn8dEQ.mjs";
|
|
5
|
+
import { A as buttonSizeNameSchema, C as MinusIcon, D as AFFORDANCE_SUPPRESS_CLASS, E as themeButtonSelector, M as unsafeAsOpaqueButtonColourToken, O as DEFAULT_VARIANT_ALIAS_ID, S as FileTextIcon, T as parseThemeButtonVariantId, X as parseThemeColorToken, Y as parseColorTokenParts, _ as ClockIcon$1, a as ThemedDownloadLink, b as FileAudioIcon, g as CirclePlusIcon, h as CircleMinusIcon, j as createStandardButtonSurfacePolicy, m as ChevronDownIcon, n as ThemedButton, nt as SpinnerNode, o as getIconComponent, p as ArrowDownIcon, r as ThemedButtonLink, rt as clsx, t as ThemedAuthoredButton, w as PlusIcon, x as FileSpreadsheetIcon, y as FileArchiveIcon } from "./ThemedButton-CVYz7h68.mjs";
|
|
5
6
|
import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, f as formatDateKey, g as getWeekCalendarDayTuple, h as getOrderedDayNames, l as addMonths, p as getDayOfWeek, v as isSameCalendarDay, y as isToday } from "./src-DzXUmsyK.mjs";
|
|
6
|
-
import { a as NO_EDIT_MAP_OVERLAY, i as useOptionalLocationPickerEnvironment, l as EMPTY_EDIT_MAP_VIEW, r as useLocationPickerWidgetContext, t as LocationDashboardLink } from "./LocationPickerEnvironment-
|
|
7
|
+
import { a as NO_EDIT_MAP_OVERLAY, i as useOptionalLocationPickerEnvironment, l as EMPTY_EDIT_MAP_VIEW, r as useLocationPickerWidgetContext, t as LocationDashboardLink } from "./LocationPickerEnvironment-D4F_5rnr.mjs";
|
|
7
8
|
import * as React$1 from "react";
|
|
8
9
|
import React, { Suspense, cloneElement, createContext, createElement, forwardRef, isValidElement, lazy, startTransition, useCallback, useContext, useEffect, useEffectEvent, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
9
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { z } from "zod";
|
|
12
|
+
import * as ReactDOM$1 from "react-dom";
|
|
11
13
|
import ReactDOM, { createPortal } from "react-dom";
|
|
12
14
|
import deepEqual from "fast-deep-equal";
|
|
13
15
|
import { IslandDelivery } from "#island-delivery";
|
|
@@ -683,7 +685,7 @@ const defaultSections = (legacy, options) => {
|
|
|
683
685
|
id: unsafeAsFooterModuleId("legal-navigation"),
|
|
684
686
|
kind: "legal-navigation",
|
|
685
687
|
heading: null,
|
|
686
|
-
selected:
|
|
688
|
+
selected: footerVisible,
|
|
687
689
|
source: {
|
|
688
690
|
kind: "menu-role",
|
|
689
691
|
role: "legal-policy"
|
|
@@ -2291,10 +2293,10 @@ var Collapsible = React$1.forwardRef((props, forwardedRef) => {
|
|
|
2291
2293
|
});
|
|
2292
2294
|
});
|
|
2293
2295
|
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
2294
|
-
var TRIGGER_NAME$
|
|
2296
|
+
var TRIGGER_NAME$4 = "CollapsibleTrigger";
|
|
2295
2297
|
var CollapsibleTrigger = React$1.forwardRef((props, forwardedRef) => {
|
|
2296
2298
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
2297
|
-
const context = useCollapsibleContext(TRIGGER_NAME$
|
|
2299
|
+
const context = useCollapsibleContext(TRIGGER_NAME$4, __scopeCollapsible);
|
|
2298
2300
|
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
2299
2301
|
type: "button",
|
|
2300
2302
|
"aria-controls": context.open ? context.contentId : void 0,
|
|
@@ -2307,11 +2309,11 @@ var CollapsibleTrigger = React$1.forwardRef((props, forwardedRef) => {
|
|
|
2307
2309
|
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
2308
2310
|
});
|
|
2309
2311
|
});
|
|
2310
|
-
CollapsibleTrigger.displayName = TRIGGER_NAME$
|
|
2311
|
-
var CONTENT_NAME$
|
|
2312
|
+
CollapsibleTrigger.displayName = TRIGGER_NAME$4;
|
|
2313
|
+
var CONTENT_NAME$3 = "CollapsibleContent";
|
|
2312
2314
|
var CollapsibleContent = React$1.forwardRef((props, forwardedRef) => {
|
|
2313
2315
|
const { forceMount, ...contentProps } = props;
|
|
2314
|
-
const context = useCollapsibleContext(CONTENT_NAME$
|
|
2316
|
+
const context = useCollapsibleContext(CONTENT_NAME$3, props.__scopeCollapsible);
|
|
2315
2317
|
return /* @__PURE__ */ jsx(Presence, {
|
|
2316
2318
|
present: forceMount || context.open,
|
|
2317
2319
|
children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, {
|
|
@@ -2321,10 +2323,10 @@ var CollapsibleContent = React$1.forwardRef((props, forwardedRef) => {
|
|
|
2321
2323
|
})
|
|
2322
2324
|
});
|
|
2323
2325
|
});
|
|
2324
|
-
CollapsibleContent.displayName = CONTENT_NAME$
|
|
2326
|
+
CollapsibleContent.displayName = CONTENT_NAME$3;
|
|
2325
2327
|
var CollapsibleContentImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
2326
2328
|
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
2327
|
-
const context = useCollapsibleContext(CONTENT_NAME$
|
|
2329
|
+
const context = useCollapsibleContext(CONTENT_NAME$3, __scopeCollapsible);
|
|
2328
2330
|
const [isPresent, setIsPresent] = React$1.useState(present);
|
|
2329
2331
|
const ref = React$1.useRef(null);
|
|
2330
2332
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
@@ -2430,10 +2432,10 @@ var TabsList$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
|
2430
2432
|
});
|
|
2431
2433
|
});
|
|
2432
2434
|
TabsList$1.displayName = TAB_LIST_NAME;
|
|
2433
|
-
var TRIGGER_NAME$
|
|
2435
|
+
var TRIGGER_NAME$3 = "TabsTrigger";
|
|
2434
2436
|
var TabsTrigger$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
2435
2437
|
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
2436
|
-
const context = useTabsContext(TRIGGER_NAME$
|
|
2438
|
+
const context = useTabsContext(TRIGGER_NAME$3, __scopeTabs);
|
|
2437
2439
|
const rovingFocusGroupScope = useRovingFocusGroupScope$1(__scopeTabs);
|
|
2438
2440
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
2439
2441
|
const contentId = makeContentId(context.baseId, value);
|
|
@@ -2468,11 +2470,11 @@ var TabsTrigger$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
|
2468
2470
|
})
|
|
2469
2471
|
});
|
|
2470
2472
|
});
|
|
2471
|
-
TabsTrigger$1.displayName = TRIGGER_NAME$
|
|
2472
|
-
var CONTENT_NAME$
|
|
2473
|
+
TabsTrigger$1.displayName = TRIGGER_NAME$3;
|
|
2474
|
+
var CONTENT_NAME$2 = "TabsContent";
|
|
2473
2475
|
var TabsContent$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
2474
2476
|
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
2475
|
-
const context = useTabsContext(CONTENT_NAME$
|
|
2477
|
+
const context = useTabsContext(CONTENT_NAME$2, __scopeTabs);
|
|
2476
2478
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
2477
2479
|
const contentId = makeContentId(context.baseId, value);
|
|
2478
2480
|
const isSelected = value === context.value;
|
|
@@ -2501,7 +2503,7 @@ var TabsContent$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
|
2501
2503
|
})
|
|
2502
2504
|
});
|
|
2503
2505
|
});
|
|
2504
|
-
TabsContent$1.displayName = CONTENT_NAME$
|
|
2506
|
+
TabsContent$1.displayName = CONTENT_NAME$2;
|
|
2505
2507
|
function makeTriggerId(baseId, value) {
|
|
2506
2508
|
return `${baseId}-trigger-${value}`;
|
|
2507
2509
|
}
|
|
@@ -2513,17 +2515,40 @@ var List = TabsList$1;
|
|
|
2513
2515
|
var Trigger = TabsTrigger$1;
|
|
2514
2516
|
var Content = TabsContent$1;
|
|
2515
2517
|
//#endregion
|
|
2518
|
+
//#region ../ui/src/tab-underline.ts
|
|
2519
|
+
/**
|
|
2520
|
+
* The one underline tab style, shared by Tabs and NavigationTabs: a hairline
|
|
2521
|
+
* under the row of tabs, and a 2px green line on the open tab that sits over
|
|
2522
|
+
* the hairline. The hairline is an inset shadow on the list rather than a
|
|
2523
|
+
* border, so the open tab's own border paints over it without negative
|
|
2524
|
+
* margins, which a scrolling tab strip would clip. A caller that wants no
|
|
2525
|
+
* hairline passes `shadow-none`.
|
|
2526
|
+
*/
|
|
2527
|
+
/** The hairline under the row of tabs. */
|
|
2528
|
+
const TAB_HAIRLINE_CLASS = "shadow-[inset_0_-1px_0_var(--border)]";
|
|
2529
|
+
/** The space between tabs. */
|
|
2530
|
+
const TAB_GAP_CLASS = "gap-5";
|
|
2531
|
+
/** One tab. The open one is marked by `aria-selected`, which Radix Tabs and NavigationTabs both set. */
|
|
2532
|
+
const TAB_TRIGGER_CLASS = [
|
|
2533
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap",
|
|
2534
|
+
"border-b-2 border-transparent px-1 pt-1 pb-2 text-sm font-medium text-muted-foreground transition-colors",
|
|
2535
|
+
"hover:border-muted-foreground/30 hover:text-foreground",
|
|
2536
|
+
"aria-selected:border-primary aria-selected:text-foreground",
|
|
2537
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
2538
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
2539
|
+
].join(" ");
|
|
2540
|
+
//#endregion
|
|
2516
2541
|
//#region ../ui/src/tabs.tsx
|
|
2517
2542
|
const Tabs = Root2$1;
|
|
2518
2543
|
const TabsList = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(List, {
|
|
2519
2544
|
ref,
|
|
2520
|
-
className: cn$1("inline-flex w-fit max-w-full items-
|
|
2545
|
+
className: cn$1("inline-flex w-fit max-w-full items-end justify-start text-muted-foreground", TAB_GAP_CLASS, TAB_HAIRLINE_CLASS, className),
|
|
2521
2546
|
...props
|
|
2522
2547
|
}));
|
|
2523
2548
|
TabsList.displayName = List.displayName;
|
|
2524
2549
|
const TabsTrigger = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Trigger, {
|
|
2525
2550
|
ref,
|
|
2526
|
-
className: cn$1(
|
|
2551
|
+
className: cn$1(TAB_TRIGGER_CLASS, className),
|
|
2527
2552
|
...props
|
|
2528
2553
|
}));
|
|
2529
2554
|
TabsTrigger.displayName = Trigger.displayName;
|
|
@@ -2534,15 +2559,87 @@ const TabsContent = React$1.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
2534
2559
|
}));
|
|
2535
2560
|
TabsContent.displayName = Content.displayName;
|
|
2536
2561
|
//#endregion
|
|
2562
|
+
//#region ../ui/src/field-description.tsx
|
|
2563
|
+
const FieldDescriptionContext = React$1.createContext(null);
|
|
2564
|
+
function FieldDescriptionProvider({ value, children }) {
|
|
2565
|
+
return /* @__PURE__ */ jsx(FieldDescriptionContext.Provider, {
|
|
2566
|
+
value,
|
|
2567
|
+
children
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2570
|
+
/** Joins id lists for `aria-describedby`, dropping blanks and repeats. */
|
|
2571
|
+
function joinDescribedBy(...lists) {
|
|
2572
|
+
const ids = lists.flatMap((list) => list ? list.split(/\s+/u).filter(Boolean) : []);
|
|
2573
|
+
return [...new Set(ids)].join(" ") || void 0;
|
|
2574
|
+
}
|
|
2575
|
+
/**
|
|
2576
|
+
* A control's `aria-describedby`: its own ids, plus the surrounding field's
|
|
2577
|
+
* when the control is the one that field labels (the ids match). A control
|
|
2578
|
+
* nested deeper in the field, with a different id, keeps only its own.
|
|
2579
|
+
*/
|
|
2580
|
+
function useFieldDescribedBy(id, own) {
|
|
2581
|
+
const field = React$1.useContext(FieldDescriptionContext);
|
|
2582
|
+
if (!field || id === void 0 || id !== field.controlId) return own;
|
|
2583
|
+
return joinDescribedBy(field.describedBy, own);
|
|
2584
|
+
}
|
|
2585
|
+
//#endregion
|
|
2586
|
+
//#region ../ui/src/fieldControl.ts
|
|
2587
|
+
/**
|
|
2588
|
+
* The one field shape, as class strings, so Input, Textarea, SelectTrigger
|
|
2589
|
+
* and the date picker's trigger cannot drift apart. The sizes come from the
|
|
2590
|
+
* `--field-*` tokens in styles/editor-base.css (compact by default, roomy
|
|
2591
|
+
* under `data-field-size="roomy"`); the colours come from the surface's
|
|
2592
|
+
* palette.
|
|
2593
|
+
*
|
|
2594
|
+
* The focus glow and the placeholder are mixed from palette tokens here,
|
|
2595
|
+
* rather than in derived tokens on `:root`, so they follow a surface that
|
|
2596
|
+
* retunes its colours on an inner element.
|
|
2597
|
+
*/
|
|
2598
|
+
/** Keyboard focus on a field-like control: the focus border and a soft glow in its colour, no outline. */
|
|
2599
|
+
const FIELD_FOCUS_CLASS = "focus-visible:outline-none focus-visible:border-field-border-focus focus-visible:shadow-[0_0_0_4px_color-mix(in_srgb,var(--field-border-strong)_18%,transparent)]";
|
|
2600
|
+
/** The same focus for a wrapper that draws the border around an inner input (a composite field). */
|
|
2601
|
+
const FIELD_FOCUS_WITHIN_CLASS = "focus-within:border-field-border-focus focus-within:shadow-[0_0_0_4px_color-mix(in_srgb,var(--field-border-strong)_18%,transparent)]";
|
|
2602
|
+
/**
|
|
2603
|
+
* A native checkbox or radio, for the few places the shared Checkbox and
|
|
2604
|
+
* RadioGroup can't go (native `required`, a radio group split across
|
|
2605
|
+
* sections, packages/ui itself).
|
|
2606
|
+
*/
|
|
2607
|
+
const NATIVE_CHOICE_CLASS = "size-[1.125rem] shrink-0 cursor-pointer accent-[var(--primary)]";
|
|
2608
|
+
/**
|
|
2609
|
+
* The unchecked border of a checkbox or radio. The field border is too faint
|
|
2610
|
+
* for a small box on a cream page, so it's mixed from the muted text colour.
|
|
2611
|
+
*/
|
|
2612
|
+
const CHOICE_BORDER_CLASS = "border-[color:color-mix(in_srgb,var(--muted-foreground)_55%,var(--field-background))]";
|
|
2613
|
+
/**
|
|
2614
|
+
* Border, fill, radius, type, focus glow and the invalid state. No height or
|
|
2615
|
+
* padding. What's typed or chosen in a field is regular weight; the semibold
|
|
2616
|
+
* `--control-font-weight` is for buttons.
|
|
2617
|
+
*/
|
|
2618
|
+
const FIELD_SURFACE_CLASS = [
|
|
2619
|
+
"rounded-[var(--field-radius)] border border-input bg-field-background",
|
|
2620
|
+
"text-[length:var(--field-font-size)] font-normal tracking-[var(--control-letter-spacing)]",
|
|
2621
|
+
"placeholder:text-[color:color-mix(in_srgb,var(--muted-foreground)_78%,var(--field-background))]",
|
|
2622
|
+
"transition-[color,border-color,box-shadow] outline-none",
|
|
2623
|
+
FIELD_FOCUS_CLASS,
|
|
2624
|
+
"aria-invalid:border-destructive aria-invalid:focus-visible:shadow-[0_0_0_4px_color-mix(in_srgb,var(--destructive)_16%,transparent)]",
|
|
2625
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
2626
|
+
].join(" ");
|
|
2627
|
+
/** A single-line control: the surface at the field height. */
|
|
2628
|
+
const FIELD_CONTROL_CLASS = `${FIELD_SURFACE_CLASS} h-[var(--field-height)] px-[var(--field-padding-x)]`;
|
|
2629
|
+
/** A multi-line control: the surface with room to grow. */
|
|
2630
|
+
const FIELD_TEXTAREA_CLASS = `${FIELD_SURFACE_CLASS} min-h-[var(--field-textarea-min-height)] px-[var(--field-padding-x)] py-[calc(var(--field-padding-x)*0.8)] leading-[1.45]`;
|
|
2631
|
+
//#endregion
|
|
2537
2632
|
//#region ../ui/src/input.tsx
|
|
2538
|
-
const Input = React$1.forwardRef(({ className, type, disabled, ...props }, ref) => {
|
|
2633
|
+
const Input = React$1.forwardRef(({ className, type, disabled, "aria-describedby": ariaDescribedBy, ...props }, ref) => {
|
|
2539
2634
|
const readiness = useControlReadiness(disabled);
|
|
2635
|
+
const describedBy = useFieldDescribedBy(props.id, ariaDescribedBy);
|
|
2540
2636
|
return /* @__PURE__ */ jsx("input", {
|
|
2541
2637
|
ref,
|
|
2542
2638
|
type,
|
|
2543
2639
|
"data-slot": "input",
|
|
2544
2640
|
className: cn$1(FIELD_CONTROL_CLASS, "file:text-foreground selection:bg-primary selection:text-primary-foreground flex w-full min-w-0 py-1 file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none", className),
|
|
2545
2641
|
...props,
|
|
2642
|
+
"aria-describedby": describedBy,
|
|
2546
2643
|
...readiness
|
|
2547
2644
|
});
|
|
2548
2645
|
});
|
|
@@ -2569,6 +2666,45 @@ const NativeSelect = React$1.forwardRef(({ className, containerClassName, disabl
|
|
|
2569
2666
|
});
|
|
2570
2667
|
NativeSelect.displayName = "NativeSelect";
|
|
2571
2668
|
//#endregion
|
|
2669
|
+
//#region ../ui/src/field-trigger.tsx
|
|
2670
|
+
/**
|
|
2671
|
+
* A field that opens a list or calendar: the shared field surface (see
|
|
2672
|
+
* fieldControl.ts), laid out as a button with a value and an icon, so a
|
|
2673
|
+
* picker reads as a field beside the inputs around it rather than as a
|
|
2674
|
+
* button. `SelectTrigger` and `FieldTrigger` both build on it.
|
|
2675
|
+
*/
|
|
2676
|
+
const fieldTriggerClassName = [
|
|
2677
|
+
FIELD_SURFACE_CLASS,
|
|
2678
|
+
"flex items-center justify-between gap-2 px-[var(--field-padding-x)] py-2 text-left whitespace-nowrap cursor-pointer",
|
|
2679
|
+
"hover:border-field-border-focus disabled:hover:border-input",
|
|
2680
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
2681
|
+
].join(" ");
|
|
2682
|
+
/**
|
|
2683
|
+
* The button that opens a popover picker (a combobox, a multi-select, a date
|
|
2684
|
+
* picker), styled as a field. Spreads the props and ref a Radix trigger passes
|
|
2685
|
+
* through `asChild`.
|
|
2686
|
+
*/
|
|
2687
|
+
const FieldTrigger = forwardRef(function FieldTrigger({ children, isPlaceholder = false, leading, trailing = /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" }), active = false, size = "default", className, type = "button", "aria-describedby": ariaDescribedBy, ...props }, ref) {
|
|
2688
|
+
const describedBy = useFieldDescribedBy(props.id, ariaDescribedBy);
|
|
2689
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
2690
|
+
...props,
|
|
2691
|
+
"aria-describedby": describedBy,
|
|
2692
|
+
ref,
|
|
2693
|
+
type,
|
|
2694
|
+
"data-slot": "field-trigger",
|
|
2695
|
+
"data-size": size,
|
|
2696
|
+
"data-placeholder": isPlaceholder ? "" : void 0,
|
|
2697
|
+
className: cn$1(fieldTriggerClassName, size === "sm" ? "h-[2rem]" : "h-[var(--field-height)]", "w-fit", active ? "border-field-border-focus" : void 0, className),
|
|
2698
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
2699
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
2700
|
+
children: [leading, /* @__PURE__ */ jsx("span", {
|
|
2701
|
+
className: cn$1("truncate", isPlaceholder ? "text-muted-foreground" : void 0),
|
|
2702
|
+
children
|
|
2703
|
+
})]
|
|
2704
|
+
}), trailing]
|
|
2705
|
+
});
|
|
2706
|
+
});
|
|
2707
|
+
//#endregion
|
|
2572
2708
|
//#region ../ui/src/search-input.tsx
|
|
2573
2709
|
function SearchInput({ wrapperClassName, iconClassName, rightSlot, rightSlotClassName, className, placeholder = "Search…", "aria-label": ariaLabel, ...props }) {
|
|
2574
2710
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -2579,7 +2715,7 @@ function SearchInput({ wrapperClassName, iconClassName, rightSlot, rightSlotClas
|
|
|
2579
2715
|
type: "search",
|
|
2580
2716
|
placeholder,
|
|
2581
2717
|
"aria-label": ariaLabel ?? placeholder,
|
|
2582
|
-
className: cn$1("
|
|
2718
|
+
className: cn$1("pl-9", className),
|
|
2583
2719
|
...props
|
|
2584
2720
|
}),
|
|
2585
2721
|
/* @__PURE__ */ jsx(Search, {
|
|
@@ -4117,14 +4253,1095 @@ function useEmblaCarousel(options = {}, plugins = []) {
|
|
|
4117
4253
|
}
|
|
4118
4254
|
useEmblaCarousel.globalOptions = void 0;
|
|
4119
4255
|
//#endregion
|
|
4256
|
+
//#region ../../node_modules/.pnpm/@radix-ui+number@1.1.2/node_modules/@radix-ui/number/dist/index.mjs
|
|
4257
|
+
function clamp(value, [min, max]) {
|
|
4258
|
+
return Math.min(max, Math.max(min, value));
|
|
4259
|
+
}
|
|
4260
|
+
//#endregion
|
|
4261
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.2_@types+react@19.3.0_react@19.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
4262
|
+
function usePrevious(value) {
|
|
4263
|
+
const ref = React$1.useRef({
|
|
4264
|
+
value,
|
|
4265
|
+
previous: value
|
|
4266
|
+
});
|
|
4267
|
+
return React$1.useMemo(() => {
|
|
4268
|
+
if (ref.current.value !== value) {
|
|
4269
|
+
ref.current.previous = ref.current.value;
|
|
4270
|
+
ref.current.value = value;
|
|
4271
|
+
}
|
|
4272
|
+
return ref.current.previous;
|
|
4273
|
+
}, [value]);
|
|
4274
|
+
}
|
|
4275
|
+
//#endregion
|
|
4276
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-select@2.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@_68ca3d8e6bdaaaf66edd7a9f64ec79a6/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
4277
|
+
var OPEN_KEYS = [
|
|
4278
|
+
" ",
|
|
4279
|
+
"Enter",
|
|
4280
|
+
"ArrowUp",
|
|
4281
|
+
"ArrowDown"
|
|
4282
|
+
];
|
|
4283
|
+
var SELECTION_KEYS = [" ", "Enter"];
|
|
4284
|
+
var SELECT_NAME = "Select";
|
|
4285
|
+
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(SELECT_NAME);
|
|
4286
|
+
var [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [createCollectionScope$1, createPopperScope]);
|
|
4287
|
+
var usePopperScope = createPopperScope();
|
|
4288
|
+
var [SelectProviderImpl, useSelectContext] = createSelectContext(SELECT_NAME);
|
|
4289
|
+
var [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME);
|
|
4290
|
+
var PROVIDER_NAME = "SelectProvider";
|
|
4291
|
+
function SelectProvider(props) {
|
|
4292
|
+
const { __scopeSelect, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, dir, name, autoComplete, disabled, required, form, internal_do_not_use_render } = props;
|
|
4293
|
+
const popperScope = usePopperScope(__scopeSelect);
|
|
4294
|
+
const [trigger, setTrigger] = React$1.useState(null);
|
|
4295
|
+
const [valueNode, setValueNode] = React$1.useState(null);
|
|
4296
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React$1.useState(false);
|
|
4297
|
+
const direction = useDirection(dir);
|
|
4298
|
+
const [open, setOpen] = useControllableState({
|
|
4299
|
+
prop: openProp,
|
|
4300
|
+
defaultProp: defaultOpen ?? false,
|
|
4301
|
+
onChange: onOpenChange,
|
|
4302
|
+
caller: SELECT_NAME
|
|
4303
|
+
});
|
|
4304
|
+
const [value, setValue] = useControllableState({
|
|
4305
|
+
prop: valueProp,
|
|
4306
|
+
defaultProp: defaultValue,
|
|
4307
|
+
onChange: onValueChange,
|
|
4308
|
+
caller: SELECT_NAME
|
|
4309
|
+
});
|
|
4310
|
+
const triggerPointerDownPosRef = React$1.useRef(null);
|
|
4311
|
+
const isFormControl = trigger ? !!form || !!trigger.closest("form") : true;
|
|
4312
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React$1.useState(/* @__PURE__ */ new Set());
|
|
4313
|
+
const contentId = useId$1();
|
|
4314
|
+
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
4315
|
+
const handleNativeOptionAdd = React$1.useCallback((option) => {
|
|
4316
|
+
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
4317
|
+
}, []);
|
|
4318
|
+
const handleNativeOptionRemove = React$1.useCallback((option) => {
|
|
4319
|
+
setNativeOptionsSet((prev) => {
|
|
4320
|
+
const optionsSet = new Set(prev);
|
|
4321
|
+
optionsSet.delete(option);
|
|
4322
|
+
return optionsSet;
|
|
4323
|
+
});
|
|
4324
|
+
}, []);
|
|
4325
|
+
const context = {
|
|
4326
|
+
required,
|
|
4327
|
+
trigger,
|
|
4328
|
+
onTriggerChange: setTrigger,
|
|
4329
|
+
valueNode,
|
|
4330
|
+
onValueNodeChange: setValueNode,
|
|
4331
|
+
valueNodeHasChildren,
|
|
4332
|
+
onValueNodeHasChildrenChange: setValueNodeHasChildren,
|
|
4333
|
+
contentId,
|
|
4334
|
+
value,
|
|
4335
|
+
onValueChange: setValue,
|
|
4336
|
+
open,
|
|
4337
|
+
onOpenChange: setOpen,
|
|
4338
|
+
dir: direction,
|
|
4339
|
+
triggerPointerDownPosRef,
|
|
4340
|
+
disabled,
|
|
4341
|
+
name,
|
|
4342
|
+
autoComplete,
|
|
4343
|
+
form,
|
|
4344
|
+
nativeOptions: nativeOptionsSet,
|
|
4345
|
+
nativeSelectKey,
|
|
4346
|
+
isFormControl
|
|
4347
|
+
};
|
|
4348
|
+
return /* @__PURE__ */ jsx(Root2$2, {
|
|
4349
|
+
...popperScope,
|
|
4350
|
+
children: /* @__PURE__ */ jsx(SelectProviderImpl, {
|
|
4351
|
+
scope: __scopeSelect,
|
|
4352
|
+
...context,
|
|
4353
|
+
children: /* @__PURE__ */ jsx(Collection$1.Provider, {
|
|
4354
|
+
scope: __scopeSelect,
|
|
4355
|
+
children: /* @__PURE__ */ jsx(SelectNativeOptionsProvider, {
|
|
4356
|
+
scope: __scopeSelect,
|
|
4357
|
+
onNativeOptionAdd: handleNativeOptionAdd,
|
|
4358
|
+
onNativeOptionRemove: handleNativeOptionRemove,
|
|
4359
|
+
children: isFunction$1(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
|
|
4360
|
+
})
|
|
4361
|
+
})
|
|
4362
|
+
})
|
|
4363
|
+
});
|
|
4364
|
+
}
|
|
4365
|
+
SelectProvider.displayName = PROVIDER_NAME;
|
|
4366
|
+
var Select$1 = (props) => {
|
|
4367
|
+
const { __scopeSelect, children, ...providerProps } = props;
|
|
4368
|
+
return /* @__PURE__ */ jsx(SelectProvider, {
|
|
4369
|
+
__scopeSelect,
|
|
4370
|
+
...providerProps,
|
|
4371
|
+
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [children, isFormControl ? /* @__PURE__ */ jsx(SelectBubbleInput, { __scopeSelect }) : null] })
|
|
4372
|
+
});
|
|
4373
|
+
};
|
|
4374
|
+
Select$1.displayName = SELECT_NAME;
|
|
4375
|
+
var TRIGGER_NAME$2 = "SelectTrigger";
|
|
4376
|
+
var SelectTrigger$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
4377
|
+
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
4378
|
+
const popperScope = usePopperScope(__scopeSelect);
|
|
4379
|
+
const context = useSelectContext(TRIGGER_NAME$2, __scopeSelect);
|
|
4380
|
+
const isDisabled = context.disabled || disabled;
|
|
4381
|
+
const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);
|
|
4382
|
+
const getItems = useCollection$1(__scopeSelect);
|
|
4383
|
+
const pointerTypeRef = React$1.useRef("touch");
|
|
4384
|
+
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
4385
|
+
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
4386
|
+
const nextItem = findNextItem(enabledItems, search, enabledItems.find((item) => item.value === context.value));
|
|
4387
|
+
if (nextItem !== void 0) context.onValueChange(nextItem.value);
|
|
4388
|
+
});
|
|
4389
|
+
const handleOpen = (pointerEvent) => {
|
|
4390
|
+
if (!isDisabled) {
|
|
4391
|
+
context.onOpenChange(true);
|
|
4392
|
+
resetTypeahead();
|
|
4393
|
+
}
|
|
4394
|
+
if (pointerEvent) context.triggerPointerDownPosRef.current = {
|
|
4395
|
+
x: Math.round(pointerEvent.pageX),
|
|
4396
|
+
y: Math.round(pointerEvent.pageY)
|
|
4397
|
+
};
|
|
4398
|
+
};
|
|
4399
|
+
return /* @__PURE__ */ jsx(Anchor, {
|
|
4400
|
+
asChild: true,
|
|
4401
|
+
...popperScope,
|
|
4402
|
+
children: /* @__PURE__ */ jsx(Primitive.button, {
|
|
4403
|
+
type: "button",
|
|
4404
|
+
role: "combobox",
|
|
4405
|
+
"aria-controls": context.open ? context.contentId : void 0,
|
|
4406
|
+
"aria-expanded": context.open,
|
|
4407
|
+
"aria-required": context.required,
|
|
4408
|
+
"aria-autocomplete": "none",
|
|
4409
|
+
dir: context.dir,
|
|
4410
|
+
"data-state": context.open ? "open" : "closed",
|
|
4411
|
+
disabled: isDisabled,
|
|
4412
|
+
"data-disabled": isDisabled ? "" : void 0,
|
|
4413
|
+
"data-placeholder": shouldShowPlaceholder(context.value) ? "" : void 0,
|
|
4414
|
+
...triggerProps,
|
|
4415
|
+
ref: composedRefs,
|
|
4416
|
+
onClick: composeEventHandlers(triggerProps.onClick, (event) => {
|
|
4417
|
+
event.currentTarget.focus();
|
|
4418
|
+
if (pointerTypeRef.current !== "mouse") handleOpen(event);
|
|
4419
|
+
}),
|
|
4420
|
+
onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (event) => {
|
|
4421
|
+
pointerTypeRef.current = event.pointerType;
|
|
4422
|
+
const target = event.target;
|
|
4423
|
+
if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
|
|
4424
|
+
if (event.button === 0 && event.ctrlKey === false && event.pointerType === "mouse") {
|
|
4425
|
+
handleOpen(event);
|
|
4426
|
+
event.preventDefault();
|
|
4427
|
+
}
|
|
4428
|
+
}),
|
|
4429
|
+
onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event) => {
|
|
4430
|
+
const isTypingAhead = searchRef.current !== "";
|
|
4431
|
+
if (!(event.ctrlKey || event.altKey || event.metaKey) && event.key.length === 1) handleTypeaheadSearch(event.key);
|
|
4432
|
+
if (isTypingAhead && event.key === " ") return;
|
|
4433
|
+
if (OPEN_KEYS.includes(event.key)) {
|
|
4434
|
+
handleOpen();
|
|
4435
|
+
event.preventDefault();
|
|
4436
|
+
}
|
|
4437
|
+
})
|
|
4438
|
+
})
|
|
4439
|
+
});
|
|
4440
|
+
});
|
|
4441
|
+
SelectTrigger$1.displayName = TRIGGER_NAME$2;
|
|
4442
|
+
var VALUE_NAME = "SelectValue";
|
|
4443
|
+
var SelectValue$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
4444
|
+
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
4445
|
+
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
4446
|
+
const { onValueNodeHasChildrenChange } = context;
|
|
4447
|
+
const hasChildren = children !== void 0;
|
|
4448
|
+
const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange);
|
|
4449
|
+
useLayoutEffect2(() => {
|
|
4450
|
+
onValueNodeHasChildrenChange(hasChildren);
|
|
4451
|
+
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
4452
|
+
const showPlaceholder = shouldShowPlaceholder(context.value);
|
|
4453
|
+
return /* @__PURE__ */ jsx(Primitive.span, {
|
|
4454
|
+
...valueProps,
|
|
4455
|
+
asChild: showPlaceholder ? false : valueProps.asChild,
|
|
4456
|
+
ref: composedRefs,
|
|
4457
|
+
style: { pointerEvents: "none" },
|
|
4458
|
+
children: /* @__PURE__ */ jsx(React$1.Fragment, { children: showPlaceholder ? placeholder : children }, showPlaceholder ? "placeholder" : "value")
|
|
4459
|
+
});
|
|
4460
|
+
});
|
|
4461
|
+
SelectValue$1.displayName = VALUE_NAME;
|
|
4462
|
+
var ICON_NAME = "SelectIcon";
|
|
4463
|
+
var SelectIcon = React$1.forwardRef((props, forwardedRef) => {
|
|
4464
|
+
const { __scopeSelect, children, ...iconProps } = props;
|
|
4465
|
+
return /* @__PURE__ */ jsx(Primitive.span, {
|
|
4466
|
+
"aria-hidden": true,
|
|
4467
|
+
...iconProps,
|
|
4468
|
+
ref: forwardedRef,
|
|
4469
|
+
children: children || "▼"
|
|
4470
|
+
});
|
|
4471
|
+
});
|
|
4472
|
+
SelectIcon.displayName = ICON_NAME;
|
|
4473
|
+
var PORTAL_NAME = "SelectPortal";
|
|
4474
|
+
var [PortalProvider, usePortalContext] = createSelectContext(PORTAL_NAME, { forceMount: void 0 });
|
|
4475
|
+
var SelectPortal = (props) => {
|
|
4476
|
+
const { __scopeSelect, forceMount, ...portalProps } = props;
|
|
4477
|
+
return /* @__PURE__ */ jsx(PortalProvider, {
|
|
4478
|
+
scope: props.__scopeSelect,
|
|
4479
|
+
forceMount,
|
|
4480
|
+
children: /* @__PURE__ */ jsx(Portal, {
|
|
4481
|
+
asChild: true,
|
|
4482
|
+
...portalProps
|
|
4483
|
+
})
|
|
4484
|
+
});
|
|
4485
|
+
};
|
|
4486
|
+
SelectPortal.displayName = PORTAL_NAME;
|
|
4487
|
+
var CONTENT_NAME$1 = "SelectContent";
|
|
4488
|
+
var SelectContent$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
4489
|
+
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeSelect);
|
|
4490
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
4491
|
+
const context = useSelectContext(CONTENT_NAME$1, props.__scopeSelect);
|
|
4492
|
+
const [fragment, setFragment] = React$1.useState();
|
|
4493
|
+
useLayoutEffect2(() => {
|
|
4494
|
+
setFragment(new DocumentFragment());
|
|
4495
|
+
}, []);
|
|
4496
|
+
return /* @__PURE__ */ jsx(Presence, {
|
|
4497
|
+
present: forceMount || context.open,
|
|
4498
|
+
children: ({ present }) => present ? /* @__PURE__ */ jsx(SelectContentImpl, {
|
|
4499
|
+
...contentProps,
|
|
4500
|
+
ref: forwardedRef
|
|
4501
|
+
}) : /* @__PURE__ */ jsx(SelectContentFragment, {
|
|
4502
|
+
...contentProps,
|
|
4503
|
+
fragment
|
|
4504
|
+
})
|
|
4505
|
+
});
|
|
4506
|
+
});
|
|
4507
|
+
SelectContent$1.displayName = CONTENT_NAME$1;
|
|
4508
|
+
var SelectContentFragment = React$1.forwardRef((props, forwardedRef) => {
|
|
4509
|
+
const { __scopeSelect, children, fragment } = props;
|
|
4510
|
+
if (!fragment) return null;
|
|
4511
|
+
return ReactDOM$1.createPortal(/* @__PURE__ */ jsx(SelectContentProvider, {
|
|
4512
|
+
scope: __scopeSelect,
|
|
4513
|
+
children: /* @__PURE__ */ jsx(Collection$1.Slot, {
|
|
4514
|
+
scope: __scopeSelect,
|
|
4515
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4516
|
+
ref: forwardedRef,
|
|
4517
|
+
children
|
|
4518
|
+
})
|
|
4519
|
+
})
|
|
4520
|
+
}), fragment);
|
|
4521
|
+
});
|
|
4522
|
+
SelectContentFragment.displayName = "SelectContentFragment";
|
|
4523
|
+
var CONTENT_MARGIN = 10;
|
|
4524
|
+
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME$1);
|
|
4525
|
+
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
4526
|
+
var Slot = createSlot("SelectContent.RemoveScroll");
|
|
4527
|
+
var SelectContentImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
4528
|
+
const { __scopeSelect } = props;
|
|
4529
|
+
const { position = "item-aligned", onCloseAutoFocus, onEscapeKeyDown, onPointerDownOutside, side, sideOffset, align, alignOffset, arrowPadding, collisionBoundary, collisionPadding, sticky, hideWhenDetached, avoidCollisions, ...contentProps } = props;
|
|
4530
|
+
const context = useSelectContext(CONTENT_NAME$1, __scopeSelect);
|
|
4531
|
+
const [content, setContent] = React$1.useState(null);
|
|
4532
|
+
const [viewport, setViewport] = React$1.useState(null);
|
|
4533
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
4534
|
+
const [selectedItem, setSelectedItem] = React$1.useState(null);
|
|
4535
|
+
const [selectedItemText, setSelectedItemText] = React$1.useState(null);
|
|
4536
|
+
const getItems = useCollection$1(__scopeSelect);
|
|
4537
|
+
const [isPositioned, setIsPositioned] = React$1.useState(false);
|
|
4538
|
+
const firstValidItemFoundRef = React$1.useRef(false);
|
|
4539
|
+
React$1.useEffect(() => {
|
|
4540
|
+
if (content) return hideOthers(content);
|
|
4541
|
+
}, [content]);
|
|
4542
|
+
useFocusGuards();
|
|
4543
|
+
const focusFirst = React$1.useCallback((candidates) => {
|
|
4544
|
+
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
4545
|
+
const [lastItem] = restItems.slice(-1);
|
|
4546
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
4547
|
+
for (const candidate of candidates) {
|
|
4548
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
4549
|
+
candidate?.scrollIntoView({ block: "nearest" });
|
|
4550
|
+
if (candidate === firstItem && viewport) viewport.scrollTop = 0;
|
|
4551
|
+
if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;
|
|
4552
|
+
candidate?.focus();
|
|
4553
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
4554
|
+
}
|
|
4555
|
+
}, [getItems, viewport]);
|
|
4556
|
+
const focusSelectedItem = React$1.useCallback(() => focusFirst([selectedItem, content]), [
|
|
4557
|
+
focusFirst,
|
|
4558
|
+
selectedItem,
|
|
4559
|
+
content
|
|
4560
|
+
]);
|
|
4561
|
+
React$1.useEffect(() => {
|
|
4562
|
+
if (isPositioned) focusSelectedItem();
|
|
4563
|
+
}, [isPositioned, focusSelectedItem]);
|
|
4564
|
+
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
4565
|
+
React$1.useEffect(() => {
|
|
4566
|
+
if (content) {
|
|
4567
|
+
let pointerMoveDelta = {
|
|
4568
|
+
x: 0,
|
|
4569
|
+
y: 0
|
|
4570
|
+
};
|
|
4571
|
+
const handlePointerMove = (event) => {
|
|
4572
|
+
pointerMoveDelta = {
|
|
4573
|
+
x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),
|
|
4574
|
+
y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0))
|
|
4575
|
+
};
|
|
4576
|
+
};
|
|
4577
|
+
const handlePointerUp = (event) => {
|
|
4578
|
+
if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) event.preventDefault();
|
|
4579
|
+
else if (!event.composedPath().includes(content)) onOpenChange(false);
|
|
4580
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
4581
|
+
triggerPointerDownPosRef.current = null;
|
|
4582
|
+
};
|
|
4583
|
+
if (triggerPointerDownPosRef.current !== null) {
|
|
4584
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
4585
|
+
document.addEventListener("pointerup", handlePointerUp, {
|
|
4586
|
+
capture: true,
|
|
4587
|
+
once: true
|
|
4588
|
+
});
|
|
4589
|
+
}
|
|
4590
|
+
return () => {
|
|
4591
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
4592
|
+
document.removeEventListener("pointerup", handlePointerUp, { capture: true });
|
|
4593
|
+
};
|
|
4594
|
+
}
|
|
4595
|
+
}, [
|
|
4596
|
+
content,
|
|
4597
|
+
onOpenChange,
|
|
4598
|
+
triggerPointerDownPosRef
|
|
4599
|
+
]);
|
|
4600
|
+
React$1.useEffect(() => {
|
|
4601
|
+
const close = () => onOpenChange(false);
|
|
4602
|
+
window.addEventListener("blur", close);
|
|
4603
|
+
window.addEventListener("resize", close);
|
|
4604
|
+
return () => {
|
|
4605
|
+
window.removeEventListener("blur", close);
|
|
4606
|
+
window.removeEventListener("resize", close);
|
|
4607
|
+
};
|
|
4608
|
+
}, [onOpenChange]);
|
|
4609
|
+
const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {
|
|
4610
|
+
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
4611
|
+
const nextItem = findNextItem(enabledItems, search, enabledItems.find((item) => item.ref.current === document.activeElement));
|
|
4612
|
+
if (nextItem) setTimeout(() => nextItem.ref.current?.focus());
|
|
4613
|
+
});
|
|
4614
|
+
const itemRefCallback = React$1.useCallback((node, value, disabled) => {
|
|
4615
|
+
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4616
|
+
if (context.value !== void 0 && context.value === value || isFirstValidItem) {
|
|
4617
|
+
setSelectedItem(node);
|
|
4618
|
+
if (isFirstValidItem) firstValidItemFoundRef.current = true;
|
|
4619
|
+
}
|
|
4620
|
+
}, [context.value]);
|
|
4621
|
+
const handleItemLeave = React$1.useCallback(() => content?.focus(), [content]);
|
|
4622
|
+
const itemTextRefCallback = React$1.useCallback((node, value, disabled) => {
|
|
4623
|
+
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4624
|
+
if (context.value !== void 0 && context.value === value || isFirstValidItem) setSelectedItemText(node);
|
|
4625
|
+
}, [context.value]);
|
|
4626
|
+
const SelectPosition = position === "popper" ? SelectPopperPosition : SelectItemAlignedPosition;
|
|
4627
|
+
const popperContentProps = SelectPosition === SelectPopperPosition ? {
|
|
4628
|
+
side,
|
|
4629
|
+
sideOffset,
|
|
4630
|
+
align,
|
|
4631
|
+
alignOffset,
|
|
4632
|
+
arrowPadding,
|
|
4633
|
+
collisionBoundary,
|
|
4634
|
+
collisionPadding,
|
|
4635
|
+
sticky,
|
|
4636
|
+
hideWhenDetached,
|
|
4637
|
+
avoidCollisions
|
|
4638
|
+
} : {};
|
|
4639
|
+
return /* @__PURE__ */ jsx(SelectContentProvider, {
|
|
4640
|
+
scope: __scopeSelect,
|
|
4641
|
+
content,
|
|
4642
|
+
viewport,
|
|
4643
|
+
onViewportChange: setViewport,
|
|
4644
|
+
itemRefCallback,
|
|
4645
|
+
selectedItem,
|
|
4646
|
+
onItemLeave: handleItemLeave,
|
|
4647
|
+
itemTextRefCallback,
|
|
4648
|
+
focusSelectedItem,
|
|
4649
|
+
selectedItemText,
|
|
4650
|
+
position,
|
|
4651
|
+
isPositioned,
|
|
4652
|
+
searchRef,
|
|
4653
|
+
children: /* @__PURE__ */ jsx(ReactRemoveScroll, {
|
|
4654
|
+
as: Slot,
|
|
4655
|
+
allowPinchZoom: true,
|
|
4656
|
+
children: /* @__PURE__ */ jsx(FocusScope, {
|
|
4657
|
+
asChild: true,
|
|
4658
|
+
trapped: context.open,
|
|
4659
|
+
onMountAutoFocus: (event) => {
|
|
4660
|
+
event.preventDefault();
|
|
4661
|
+
},
|
|
4662
|
+
onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => {
|
|
4663
|
+
context.trigger?.focus({ preventScroll: true });
|
|
4664
|
+
event.preventDefault();
|
|
4665
|
+
}),
|
|
4666
|
+
children: /* @__PURE__ */ jsx(DismissableLayer, {
|
|
4667
|
+
asChild: true,
|
|
4668
|
+
disableOutsidePointerEvents: true,
|
|
4669
|
+
onEscapeKeyDown,
|
|
4670
|
+
onPointerDownOutside,
|
|
4671
|
+
onFocusOutside: (event) => event.preventDefault(),
|
|
4672
|
+
onDismiss: () => context.onOpenChange(false),
|
|
4673
|
+
children: /* @__PURE__ */ jsx(SelectPosition, {
|
|
4674
|
+
role: "listbox",
|
|
4675
|
+
id: context.contentId,
|
|
4676
|
+
"data-state": context.open ? "open" : "closed",
|
|
4677
|
+
dir: context.dir,
|
|
4678
|
+
onContextMenu: (event) => event.preventDefault(),
|
|
4679
|
+
...contentProps,
|
|
4680
|
+
...popperContentProps,
|
|
4681
|
+
onPlaced: () => setIsPositioned(true),
|
|
4682
|
+
ref: composedRefs,
|
|
4683
|
+
style: {
|
|
4684
|
+
display: "flex",
|
|
4685
|
+
flexDirection: "column",
|
|
4686
|
+
outline: "none",
|
|
4687
|
+
...contentProps.style
|
|
4688
|
+
},
|
|
4689
|
+
onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {
|
|
4690
|
+
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
4691
|
+
if (event.key === "Tab") event.preventDefault();
|
|
4692
|
+
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
|
|
4693
|
+
if ([
|
|
4694
|
+
"ArrowUp",
|
|
4695
|
+
"ArrowDown",
|
|
4696
|
+
"Home",
|
|
4697
|
+
"End"
|
|
4698
|
+
].includes(event.key)) {
|
|
4699
|
+
let candidateNodes = getItems().filter((item) => !item.disabled).map((item) => item.ref.current);
|
|
4700
|
+
if (["ArrowUp", "End"].includes(event.key)) candidateNodes = candidateNodes.slice().reverse();
|
|
4701
|
+
if (["ArrowUp", "ArrowDown"].includes(event.key)) {
|
|
4702
|
+
const currentElement = event.target;
|
|
4703
|
+
const currentIndex = candidateNodes.indexOf(currentElement);
|
|
4704
|
+
candidateNodes = candidateNodes.slice(currentIndex + 1);
|
|
4705
|
+
}
|
|
4706
|
+
setTimeout(() => focusFirst(candidateNodes));
|
|
4707
|
+
event.preventDefault();
|
|
4708
|
+
}
|
|
4709
|
+
})
|
|
4710
|
+
})
|
|
4711
|
+
})
|
|
4712
|
+
})
|
|
4713
|
+
})
|
|
4714
|
+
});
|
|
4715
|
+
});
|
|
4716
|
+
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
4717
|
+
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
4718
|
+
var SelectItemAlignedPosition = React$1.forwardRef((props, forwardedRef) => {
|
|
4719
|
+
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
4720
|
+
const context = useSelectContext(CONTENT_NAME$1, __scopeSelect);
|
|
4721
|
+
const contentContext = useSelectContentContext(CONTENT_NAME$1, __scopeSelect);
|
|
4722
|
+
const [contentWrapper, setContentWrapper] = React$1.useState(null);
|
|
4723
|
+
const [content, setContent] = React$1.useState(null);
|
|
4724
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));
|
|
4725
|
+
const getItems = useCollection$1(__scopeSelect);
|
|
4726
|
+
const shouldExpandOnScrollRef = React$1.useRef(false);
|
|
4727
|
+
const shouldRepositionRef = React$1.useRef(true);
|
|
4728
|
+
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
4729
|
+
const position = React$1.useCallback(() => {
|
|
4730
|
+
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
4731
|
+
const triggerRect = context.trigger.getBoundingClientRect();
|
|
4732
|
+
const contentRect = content.getBoundingClientRect();
|
|
4733
|
+
const valueNodeRect = context.valueNode.getBoundingClientRect();
|
|
4734
|
+
const itemTextRect = selectedItemText.getBoundingClientRect();
|
|
4735
|
+
if (context.dir !== "rtl") {
|
|
4736
|
+
const itemTextOffset = itemTextRect.left - contentRect.left;
|
|
4737
|
+
const left = valueNodeRect.left - itemTextOffset;
|
|
4738
|
+
const leftDelta = triggerRect.left - left;
|
|
4739
|
+
const minContentWidth = triggerRect.width + leftDelta;
|
|
4740
|
+
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
|
4741
|
+
const rightEdge = window.innerWidth - CONTENT_MARGIN;
|
|
4742
|
+
const clampedLeft = clamp(left, [CONTENT_MARGIN, Math.max(CONTENT_MARGIN, rightEdge - contentWidth)]);
|
|
4743
|
+
contentWrapper.style.minWidth = minContentWidth + "px";
|
|
4744
|
+
contentWrapper.style.left = clampedLeft + "px";
|
|
4745
|
+
} else {
|
|
4746
|
+
const itemTextOffset = contentRect.right - itemTextRect.right;
|
|
4747
|
+
const right = window.innerWidth - valueNodeRect.right - itemTextOffset;
|
|
4748
|
+
const rightDelta = window.innerWidth - triggerRect.right - right;
|
|
4749
|
+
const minContentWidth = triggerRect.width + rightDelta;
|
|
4750
|
+
const contentWidth = Math.max(minContentWidth, contentRect.width);
|
|
4751
|
+
const leftEdge = window.innerWidth - CONTENT_MARGIN;
|
|
4752
|
+
const clampedRight = clamp(right, [CONTENT_MARGIN, Math.max(CONTENT_MARGIN, leftEdge - contentWidth)]);
|
|
4753
|
+
contentWrapper.style.minWidth = minContentWidth + "px";
|
|
4754
|
+
contentWrapper.style.right = clampedRight + "px";
|
|
4755
|
+
}
|
|
4756
|
+
const items = getItems();
|
|
4757
|
+
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
4758
|
+
const itemsHeight = viewport.scrollHeight;
|
|
4759
|
+
const contentStyles = window.getComputedStyle(content);
|
|
4760
|
+
const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);
|
|
4761
|
+
const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);
|
|
4762
|
+
const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);
|
|
4763
|
+
const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);
|
|
4764
|
+
const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;
|
|
4765
|
+
const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);
|
|
4766
|
+
const viewportStyles = window.getComputedStyle(viewport);
|
|
4767
|
+
const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);
|
|
4768
|
+
const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);
|
|
4769
|
+
const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;
|
|
4770
|
+
const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;
|
|
4771
|
+
const selectedItemHalfHeight = selectedItem.offsetHeight / 2;
|
|
4772
|
+
const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;
|
|
4773
|
+
const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;
|
|
4774
|
+
const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;
|
|
4775
|
+
if (contentTopToItemMiddle <= topEdgeToTriggerMiddle) {
|
|
4776
|
+
const isLastItem = items.length > 0 && selectedItem === items[items.length - 1].ref.current;
|
|
4777
|
+
contentWrapper.style.bottom = "0px";
|
|
4778
|
+
const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;
|
|
4779
|
+
const height = contentTopToItemMiddle + Math.max(triggerMiddleToBottomEdge, selectedItemHalfHeight + (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth);
|
|
4780
|
+
contentWrapper.style.height = height + "px";
|
|
4781
|
+
} else {
|
|
4782
|
+
const isFirstItem = items.length > 0 && selectedItem === items[0].ref.current;
|
|
4783
|
+
contentWrapper.style.top = "0px";
|
|
4784
|
+
const height = Math.max(topEdgeToTriggerMiddle, contentBorderTopWidth + viewport.offsetTop + (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight) + itemMiddleToContentBottom;
|
|
4785
|
+
contentWrapper.style.height = height + "px";
|
|
4786
|
+
viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;
|
|
4787
|
+
}
|
|
4788
|
+
contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;
|
|
4789
|
+
contentWrapper.style.minHeight = minContentHeight + "px";
|
|
4790
|
+
contentWrapper.style.maxHeight = availableHeight + "px";
|
|
4791
|
+
onPlaced?.();
|
|
4792
|
+
requestAnimationFrame(() => shouldExpandOnScrollRef.current = true);
|
|
4793
|
+
}
|
|
4794
|
+
}, [
|
|
4795
|
+
getItems,
|
|
4796
|
+
context.trigger,
|
|
4797
|
+
context.valueNode,
|
|
4798
|
+
contentWrapper,
|
|
4799
|
+
content,
|
|
4800
|
+
viewport,
|
|
4801
|
+
selectedItem,
|
|
4802
|
+
selectedItemText,
|
|
4803
|
+
context.dir,
|
|
4804
|
+
onPlaced
|
|
4805
|
+
]);
|
|
4806
|
+
useLayoutEffect2(() => position(), [position]);
|
|
4807
|
+
const [contentZIndex, setContentZIndex] = React$1.useState();
|
|
4808
|
+
useLayoutEffect2(() => {
|
|
4809
|
+
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
4810
|
+
}, [content]);
|
|
4811
|
+
return /* @__PURE__ */ jsx(SelectViewportProvider, {
|
|
4812
|
+
scope: __scopeSelect,
|
|
4813
|
+
contentWrapper,
|
|
4814
|
+
shouldExpandOnScrollRef,
|
|
4815
|
+
onScrollButtonChange: React$1.useCallback((node) => {
|
|
4816
|
+
if (node && shouldRepositionRef.current === true) {
|
|
4817
|
+
position();
|
|
4818
|
+
focusSelectedItem?.();
|
|
4819
|
+
shouldRepositionRef.current = false;
|
|
4820
|
+
}
|
|
4821
|
+
}, [position, focusSelectedItem]),
|
|
4822
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4823
|
+
ref: setContentWrapper,
|
|
4824
|
+
style: {
|
|
4825
|
+
display: "flex",
|
|
4826
|
+
flexDirection: "column",
|
|
4827
|
+
position: "fixed",
|
|
4828
|
+
zIndex: contentZIndex
|
|
4829
|
+
},
|
|
4830
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
4831
|
+
...popperProps,
|
|
4832
|
+
ref: composedRefs,
|
|
4833
|
+
style: {
|
|
4834
|
+
boxSizing: "border-box",
|
|
4835
|
+
maxHeight: "100%",
|
|
4836
|
+
...popperProps.style
|
|
4837
|
+
}
|
|
4838
|
+
})
|
|
4839
|
+
})
|
|
4840
|
+
});
|
|
4841
|
+
});
|
|
4842
|
+
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
4843
|
+
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
4844
|
+
var SelectPopperPosition = React$1.forwardRef((props, forwardedRef) => {
|
|
4845
|
+
const { __scopeSelect, align = "start", collisionPadding = CONTENT_MARGIN, ...popperProps } = props;
|
|
4846
|
+
return /* @__PURE__ */ jsx(Content$2, {
|
|
4847
|
+
...usePopperScope(__scopeSelect),
|
|
4848
|
+
...popperProps,
|
|
4849
|
+
ref: forwardedRef,
|
|
4850
|
+
align,
|
|
4851
|
+
collisionPadding,
|
|
4852
|
+
style: {
|
|
4853
|
+
boxSizing: "border-box",
|
|
4854
|
+
...popperProps.style,
|
|
4855
|
+
"--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
4856
|
+
"--radix-select-content-available-width": "var(--radix-popper-available-width)",
|
|
4857
|
+
"--radix-select-content-available-height": "var(--radix-popper-available-height)",
|
|
4858
|
+
"--radix-select-trigger-width": "var(--radix-popper-anchor-width)",
|
|
4859
|
+
"--radix-select-trigger-height": "var(--radix-popper-anchor-height)"
|
|
4860
|
+
}
|
|
4861
|
+
});
|
|
4862
|
+
});
|
|
4863
|
+
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
4864
|
+
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME$1, {});
|
|
4865
|
+
var VIEWPORT_NAME = "SelectViewport";
|
|
4866
|
+
var SelectViewport = React$1.forwardRef((props, forwardedRef) => {
|
|
4867
|
+
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
4868
|
+
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
4869
|
+
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
4870
|
+
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
4871
|
+
const prevScrollTopRef = React$1.useRef(0);
|
|
4872
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("style", {
|
|
4873
|
+
dangerouslySetInnerHTML: { __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}` },
|
|
4874
|
+
nonce
|
|
4875
|
+
}), /* @__PURE__ */ jsx(Collection$1.Slot, {
|
|
4876
|
+
scope: __scopeSelect,
|
|
4877
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
4878
|
+
"data-radix-select-viewport": "",
|
|
4879
|
+
role: "presentation",
|
|
4880
|
+
...viewportProps,
|
|
4881
|
+
ref: composedRefs,
|
|
4882
|
+
style: {
|
|
4883
|
+
position: "relative",
|
|
4884
|
+
flex: 1,
|
|
4885
|
+
overflow: "hidden auto",
|
|
4886
|
+
...viewportProps.style
|
|
4887
|
+
},
|
|
4888
|
+
onScroll: composeEventHandlers(viewportProps.onScroll, (event) => {
|
|
4889
|
+
const viewport = event.currentTarget;
|
|
4890
|
+
const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
|
|
4891
|
+
if (shouldExpandOnScrollRef?.current && contentWrapper) {
|
|
4892
|
+
const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);
|
|
4893
|
+
if (scrolledBy > 0) {
|
|
4894
|
+
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
4895
|
+
const cssMinHeight = parseFloat(contentWrapper.style.minHeight);
|
|
4896
|
+
const cssHeight = parseFloat(contentWrapper.style.height);
|
|
4897
|
+
const prevHeight = Math.max(cssMinHeight, cssHeight);
|
|
4898
|
+
if (prevHeight < availableHeight) {
|
|
4899
|
+
const nextHeight = prevHeight + scrolledBy;
|
|
4900
|
+
const clampedNextHeight = Math.min(availableHeight, nextHeight);
|
|
4901
|
+
const heightDiff = nextHeight - clampedNextHeight;
|
|
4902
|
+
contentWrapper.style.height = clampedNextHeight + "px";
|
|
4903
|
+
if (contentWrapper.style.bottom === "0px") {
|
|
4904
|
+
viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;
|
|
4905
|
+
contentWrapper.style.justifyContent = "flex-end";
|
|
4906
|
+
}
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
}
|
|
4910
|
+
prevScrollTopRef.current = viewport.scrollTop;
|
|
4911
|
+
})
|
|
4912
|
+
})
|
|
4913
|
+
})] });
|
|
4914
|
+
});
|
|
4915
|
+
SelectViewport.displayName = VIEWPORT_NAME;
|
|
4916
|
+
var GROUP_NAME = "SelectGroup";
|
|
4917
|
+
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
4918
|
+
var SelectGroup = React$1.forwardRef((props, forwardedRef) => {
|
|
4919
|
+
const { __scopeSelect, ...groupProps } = props;
|
|
4920
|
+
const groupId = useId$1();
|
|
4921
|
+
return /* @__PURE__ */ jsx(SelectGroupContextProvider, {
|
|
4922
|
+
scope: __scopeSelect,
|
|
4923
|
+
id: groupId,
|
|
4924
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
4925
|
+
role: "group",
|
|
4926
|
+
"aria-labelledby": groupId,
|
|
4927
|
+
...groupProps,
|
|
4928
|
+
ref: forwardedRef
|
|
4929
|
+
})
|
|
4930
|
+
});
|
|
4931
|
+
});
|
|
4932
|
+
SelectGroup.displayName = GROUP_NAME;
|
|
4933
|
+
var LABEL_NAME = "SelectLabel";
|
|
4934
|
+
var SelectLabel = React$1.forwardRef((props, forwardedRef) => {
|
|
4935
|
+
const { __scopeSelect, ...labelProps } = props;
|
|
4936
|
+
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
4937
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
4938
|
+
id: groupContext.id,
|
|
4939
|
+
...labelProps,
|
|
4940
|
+
ref: forwardedRef
|
|
4941
|
+
});
|
|
4942
|
+
});
|
|
4943
|
+
SelectLabel.displayName = LABEL_NAME;
|
|
4944
|
+
var ITEM_NAME$2 = "SelectItem";
|
|
4945
|
+
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME$2);
|
|
4946
|
+
var SelectItem$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
4947
|
+
const { __scopeSelect, value, disabled = false, textValue: textValueProp, ...itemProps } = props;
|
|
4948
|
+
const context = useSelectContext(ITEM_NAME$2, __scopeSelect);
|
|
4949
|
+
const contentContext = useSelectContentContext(ITEM_NAME$2, __scopeSelect);
|
|
4950
|
+
const isSelected = context.value === value;
|
|
4951
|
+
const [textValue, setTextValue] = React$1.useState(textValueProp ?? "");
|
|
4952
|
+
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
4953
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
4954
|
+
const textId = useId$1();
|
|
4955
|
+
const pointerTypeRef = React$1.useRef("touch");
|
|
4956
|
+
const handleSelect = () => {
|
|
4957
|
+
if (!disabled) {
|
|
4958
|
+
context.onValueChange(value);
|
|
4959
|
+
context.onOpenChange(false);
|
|
4960
|
+
}
|
|
4961
|
+
};
|
|
4962
|
+
return /* @__PURE__ */ jsx(SelectItemContextProvider, {
|
|
4963
|
+
scope: __scopeSelect,
|
|
4964
|
+
value,
|
|
4965
|
+
disabled,
|
|
4966
|
+
textId,
|
|
4967
|
+
isSelected,
|
|
4968
|
+
onItemTextChange: React$1.useCallback((node) => {
|
|
4969
|
+
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
4970
|
+
}, []),
|
|
4971
|
+
children: /* @__PURE__ */ jsx(Collection$1.ItemSlot, {
|
|
4972
|
+
scope: __scopeSelect,
|
|
4973
|
+
value,
|
|
4974
|
+
disabled,
|
|
4975
|
+
textValue,
|
|
4976
|
+
children: /* @__PURE__ */ jsx(Primitive.div, {
|
|
4977
|
+
role: "option",
|
|
4978
|
+
"aria-labelledby": textId,
|
|
4979
|
+
"data-highlighted": isFocused ? "" : void 0,
|
|
4980
|
+
"aria-selected": isSelected && isFocused,
|
|
4981
|
+
"data-state": isSelected ? "checked" : "unchecked",
|
|
4982
|
+
"aria-disabled": disabled || void 0,
|
|
4983
|
+
"data-disabled": disabled ? "" : void 0,
|
|
4984
|
+
tabIndex: disabled ? void 0 : -1,
|
|
4985
|
+
...itemProps,
|
|
4986
|
+
ref: composedRefs,
|
|
4987
|
+
onFocus: composeEventHandlers(itemProps.onFocus, () => setIsFocused(true)),
|
|
4988
|
+
onBlur: composeEventHandlers(itemProps.onBlur, () => setIsFocused(false)),
|
|
4989
|
+
onClick: composeEventHandlers(itemProps.onClick, () => {
|
|
4990
|
+
if (pointerTypeRef.current !== "mouse") handleSelect();
|
|
4991
|
+
}),
|
|
4992
|
+
onPointerUp: composeEventHandlers(itemProps.onPointerUp, () => {
|
|
4993
|
+
if (pointerTypeRef.current === "mouse") handleSelect();
|
|
4994
|
+
}),
|
|
4995
|
+
onPointerDown: composeEventHandlers(itemProps.onPointerDown, (event) => {
|
|
4996
|
+
pointerTypeRef.current = event.pointerType;
|
|
4997
|
+
}),
|
|
4998
|
+
onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => {
|
|
4999
|
+
pointerTypeRef.current = event.pointerType;
|
|
5000
|
+
if (disabled) contentContext.onItemLeave?.();
|
|
5001
|
+
else if (pointerTypeRef.current === "mouse") event.currentTarget.focus({ preventScroll: true });
|
|
5002
|
+
}),
|
|
5003
|
+
onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => {
|
|
5004
|
+
if (event.currentTarget === document.activeElement) contentContext.onItemLeave?.();
|
|
5005
|
+
}),
|
|
5006
|
+
onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => {
|
|
5007
|
+
if (contentContext.searchRef?.current !== "" && event.key === " ") return;
|
|
5008
|
+
if (SELECTION_KEYS.includes(event.key)) handleSelect();
|
|
5009
|
+
if (event.key === " ") event.preventDefault();
|
|
5010
|
+
})
|
|
5011
|
+
})
|
|
5012
|
+
})
|
|
5013
|
+
});
|
|
5014
|
+
});
|
|
5015
|
+
SelectItem$1.displayName = ITEM_NAME$2;
|
|
5016
|
+
var ITEM_TEXT_NAME = "SelectItemText";
|
|
5017
|
+
var SelectItemText = React$1.forwardRef((props, forwardedRef) => {
|
|
5018
|
+
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
5019
|
+
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5020
|
+
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5021
|
+
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5022
|
+
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5023
|
+
const [itemTextNode, setItemTextNode] = React$1.useState(null);
|
|
5024
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
5025
|
+
const textContent = itemTextNode?.textContent;
|
|
5026
|
+
const nativeOption = React$1.useMemo(() => /* @__PURE__ */ jsx("option", {
|
|
5027
|
+
value: itemContext.value,
|
|
5028
|
+
disabled: itemContext.disabled,
|
|
5029
|
+
children: textContent
|
|
5030
|
+
}, itemContext.value), [
|
|
5031
|
+
itemContext.disabled,
|
|
5032
|
+
itemContext.value,
|
|
5033
|
+
textContent
|
|
5034
|
+
]);
|
|
5035
|
+
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
5036
|
+
useLayoutEffect2(() => {
|
|
5037
|
+
onNativeOptionAdd(nativeOption);
|
|
5038
|
+
return () => onNativeOptionRemove(nativeOption);
|
|
5039
|
+
}, [
|
|
5040
|
+
onNativeOptionAdd,
|
|
5041
|
+
onNativeOptionRemove,
|
|
5042
|
+
nativeOption
|
|
5043
|
+
]);
|
|
5044
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Primitive.span, {
|
|
5045
|
+
id: itemContext.textId,
|
|
5046
|
+
...itemTextProps,
|
|
5047
|
+
ref: composedRefs
|
|
5048
|
+
}), itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren && !shouldShowPlaceholder(context.value) ? ReactDOM$1.createPortal(itemTextProps.children, context.valueNode) : null] });
|
|
5049
|
+
});
|
|
5050
|
+
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
5051
|
+
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
5052
|
+
var SelectItemIndicator = React$1.forwardRef((props, forwardedRef) => {
|
|
5053
|
+
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
5054
|
+
return useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect).isSelected ? /* @__PURE__ */ jsx(Primitive.span, {
|
|
5055
|
+
"aria-hidden": true,
|
|
5056
|
+
...itemIndicatorProps,
|
|
5057
|
+
ref: forwardedRef
|
|
5058
|
+
}) : null;
|
|
5059
|
+
});
|
|
5060
|
+
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
5061
|
+
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
5062
|
+
var SelectScrollUpButton$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
5063
|
+
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5064
|
+
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5065
|
+
const [canScrollUp, setCanScrollUp] = React$1.useState(false);
|
|
5066
|
+
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5067
|
+
useLayoutEffect2(() => {
|
|
5068
|
+
if (contentContext.viewport && contentContext.isPositioned) {
|
|
5069
|
+
let handleScroll2 = function() {
|
|
5070
|
+
setCanScrollUp(viewport.scrollTop > 0);
|
|
5071
|
+
};
|
|
5072
|
+
const viewport = contentContext.viewport;
|
|
5073
|
+
handleScroll2();
|
|
5074
|
+
viewport.addEventListener("scroll", handleScroll2);
|
|
5075
|
+
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
5076
|
+
}
|
|
5077
|
+
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5078
|
+
return canScrollUp ? /* @__PURE__ */ jsx(SelectScrollButtonImpl, {
|
|
5079
|
+
...props,
|
|
5080
|
+
ref: composedRefs,
|
|
5081
|
+
onAutoScroll: () => {
|
|
5082
|
+
const { viewport, selectedItem } = contentContext;
|
|
5083
|
+
if (viewport && selectedItem) viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;
|
|
5084
|
+
}
|
|
5085
|
+
}) : null;
|
|
5086
|
+
});
|
|
5087
|
+
SelectScrollUpButton$1.displayName = SCROLL_UP_BUTTON_NAME;
|
|
5088
|
+
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
5089
|
+
var SelectScrollDownButton$1 = React$1.forwardRef((props, forwardedRef) => {
|
|
5090
|
+
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5091
|
+
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5092
|
+
const [canScrollDown, setCanScrollDown] = React$1.useState(false);
|
|
5093
|
+
const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5094
|
+
useLayoutEffect2(() => {
|
|
5095
|
+
if (contentContext.viewport && contentContext.isPositioned) {
|
|
5096
|
+
let handleScroll2 = function() {
|
|
5097
|
+
const maxScroll = viewport.scrollHeight - viewport.clientHeight;
|
|
5098
|
+
setCanScrollDown(Math.ceil(viewport.scrollTop) < maxScroll);
|
|
5099
|
+
};
|
|
5100
|
+
const viewport = contentContext.viewport;
|
|
5101
|
+
handleScroll2();
|
|
5102
|
+
viewport.addEventListener("scroll", handleScroll2);
|
|
5103
|
+
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
5104
|
+
}
|
|
5105
|
+
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5106
|
+
return canScrollDown ? /* @__PURE__ */ jsx(SelectScrollButtonImpl, {
|
|
5107
|
+
...props,
|
|
5108
|
+
ref: composedRefs,
|
|
5109
|
+
onAutoScroll: () => {
|
|
5110
|
+
const { viewport, selectedItem } = contentContext;
|
|
5111
|
+
if (viewport && selectedItem) viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;
|
|
5112
|
+
}
|
|
5113
|
+
}) : null;
|
|
5114
|
+
});
|
|
5115
|
+
SelectScrollDownButton$1.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
5116
|
+
var SelectScrollButtonImpl = React$1.forwardRef((props, forwardedRef) => {
|
|
5117
|
+
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
5118
|
+
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
5119
|
+
const autoScrollTimerRef = React$1.useRef(null);
|
|
5120
|
+
const getItems = useCollection$1(__scopeSelect);
|
|
5121
|
+
const clearAutoScrollTimer = React$1.useCallback(() => {
|
|
5122
|
+
if (autoScrollTimerRef.current !== null) {
|
|
5123
|
+
window.clearInterval(autoScrollTimerRef.current);
|
|
5124
|
+
autoScrollTimerRef.current = null;
|
|
5125
|
+
}
|
|
5126
|
+
}, []);
|
|
5127
|
+
React$1.useEffect(() => {
|
|
5128
|
+
return () => clearAutoScrollTimer();
|
|
5129
|
+
}, [clearAutoScrollTimer]);
|
|
5130
|
+
useLayoutEffect2(() => {
|
|
5131
|
+
getItems().find((item) => item.ref.current === document.activeElement)?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
5132
|
+
}, [getItems]);
|
|
5133
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
5134
|
+
"aria-hidden": true,
|
|
5135
|
+
...scrollIndicatorProps,
|
|
5136
|
+
ref: forwardedRef,
|
|
5137
|
+
style: {
|
|
5138
|
+
flexShrink: 0,
|
|
5139
|
+
...scrollIndicatorProps.style
|
|
5140
|
+
},
|
|
5141
|
+
onPointerDown: composeEventHandlers(scrollIndicatorProps.onPointerDown, () => {
|
|
5142
|
+
if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
5143
|
+
}),
|
|
5144
|
+
onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {
|
|
5145
|
+
contentContext.onItemLeave?.();
|
|
5146
|
+
if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
5147
|
+
}),
|
|
5148
|
+
onPointerLeave: composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {
|
|
5149
|
+
clearAutoScrollTimer();
|
|
5150
|
+
})
|
|
5151
|
+
});
|
|
5152
|
+
});
|
|
5153
|
+
var SEPARATOR_NAME = "SelectSeparator";
|
|
5154
|
+
var SelectSeparator = React$1.forwardRef((props, forwardedRef) => {
|
|
5155
|
+
const { __scopeSelect, ...separatorProps } = props;
|
|
5156
|
+
return /* @__PURE__ */ jsx(Primitive.div, {
|
|
5157
|
+
"aria-hidden": true,
|
|
5158
|
+
...separatorProps,
|
|
5159
|
+
ref: forwardedRef
|
|
5160
|
+
});
|
|
5161
|
+
});
|
|
5162
|
+
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
5163
|
+
var ARROW_NAME = "SelectArrow";
|
|
5164
|
+
var SelectArrow = React$1.forwardRef((props, forwardedRef) => {
|
|
5165
|
+
const { __scopeSelect, ...arrowProps } = props;
|
|
5166
|
+
const popperScope = usePopperScope(__scopeSelect);
|
|
5167
|
+
return useSelectContentContext(ARROW_NAME, __scopeSelect).position === "popper" ? /* @__PURE__ */ jsx(Arrow, {
|
|
5168
|
+
...popperScope,
|
|
5169
|
+
...arrowProps,
|
|
5170
|
+
ref: forwardedRef
|
|
5171
|
+
}) : null;
|
|
5172
|
+
});
|
|
5173
|
+
SelectArrow.displayName = ARROW_NAME;
|
|
5174
|
+
var BUBBLE_INPUT_NAME$1 = "SelectBubbleInput";
|
|
5175
|
+
var SelectBubbleInput = React$1.forwardRef(({ __scopeSelect, ...props }, forwardedRef) => {
|
|
5176
|
+
const context = useSelectContext(BUBBLE_INPUT_NAME$1, __scopeSelect);
|
|
5177
|
+
const { value, onValueChange, required, disabled, name, autoComplete, form } = context;
|
|
5178
|
+
const { nativeOptions, nativeSelectKey } = context;
|
|
5179
|
+
const ref = React$1.useRef(null);
|
|
5180
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5181
|
+
const selectValue = value ?? "";
|
|
5182
|
+
const prevValue = usePrevious(selectValue);
|
|
5183
|
+
const hasEmptyValueOption = Array.from(nativeOptions).some((option) => (option.props.value ?? "") === "");
|
|
5184
|
+
React$1.useEffect(() => {
|
|
5185
|
+
const select = ref.current;
|
|
5186
|
+
if (!select) return;
|
|
5187
|
+
const selectProto = window.HTMLSelectElement.prototype;
|
|
5188
|
+
const setValue = Object.getOwnPropertyDescriptor(selectProto, "value").set;
|
|
5189
|
+
if (prevValue !== selectValue && setValue) {
|
|
5190
|
+
const event = new Event("change", { bubbles: true });
|
|
5191
|
+
setValue.call(select, selectValue);
|
|
5192
|
+
select.dispatchEvent(event);
|
|
5193
|
+
}
|
|
5194
|
+
}, [prevValue, selectValue]);
|
|
5195
|
+
return /* @__PURE__ */ jsxs(Primitive.select, {
|
|
5196
|
+
"aria-hidden": true,
|
|
5197
|
+
required,
|
|
5198
|
+
tabIndex: -1,
|
|
5199
|
+
name,
|
|
5200
|
+
autoComplete,
|
|
5201
|
+
disabled,
|
|
5202
|
+
form,
|
|
5203
|
+
onChange: (event) => onValueChange(event.target.value),
|
|
5204
|
+
...props,
|
|
5205
|
+
style: {
|
|
5206
|
+
...VISUALLY_HIDDEN_STYLES,
|
|
5207
|
+
...props.style
|
|
5208
|
+
},
|
|
5209
|
+
ref: composedRefs,
|
|
5210
|
+
defaultValue: selectValue,
|
|
5211
|
+
children: [shouldShowPlaceholder(value) && !hasEmptyValueOption ? /* @__PURE__ */ jsx("option", { value: "" }) : null, Array.from(nativeOptions)]
|
|
5212
|
+
}, nativeSelectKey);
|
|
5213
|
+
});
|
|
5214
|
+
SelectBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
|
|
5215
|
+
function isFunction$1(value) {
|
|
5216
|
+
return typeof value === "function";
|
|
5217
|
+
}
|
|
5218
|
+
function shouldShowPlaceholder(value) {
|
|
5219
|
+
return value === "" || value === void 0;
|
|
5220
|
+
}
|
|
5221
|
+
function useTypeaheadSearch(onSearchChange) {
|
|
5222
|
+
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
5223
|
+
const searchRef = React$1.useRef("");
|
|
5224
|
+
const timerRef = React$1.useRef(0);
|
|
5225
|
+
const handleTypeaheadSearch = React$1.useCallback((key) => {
|
|
5226
|
+
const search = searchRef.current + key;
|
|
5227
|
+
handleSearchChange(search);
|
|
5228
|
+
(function updateSearch(value) {
|
|
5229
|
+
searchRef.current = value;
|
|
5230
|
+
window.clearTimeout(timerRef.current);
|
|
5231
|
+
if (value !== "") timerRef.current = window.setTimeout(() => updateSearch(""), 1e3);
|
|
5232
|
+
})(search);
|
|
5233
|
+
}, [handleSearchChange]);
|
|
5234
|
+
const resetTypeahead = React$1.useCallback(() => {
|
|
5235
|
+
searchRef.current = "";
|
|
5236
|
+
window.clearTimeout(timerRef.current);
|
|
5237
|
+
}, []);
|
|
5238
|
+
React$1.useEffect(() => {
|
|
5239
|
+
return () => window.clearTimeout(timerRef.current);
|
|
5240
|
+
}, []);
|
|
5241
|
+
return [
|
|
5242
|
+
searchRef,
|
|
5243
|
+
handleTypeaheadSearch,
|
|
5244
|
+
resetTypeahead
|
|
5245
|
+
];
|
|
5246
|
+
}
|
|
5247
|
+
function findNextItem(items, search, currentItem) {
|
|
5248
|
+
const normalizedSearch = search.length > 1 && Array.from(search).every((char) => char === search[0]) ? search[0] : search;
|
|
5249
|
+
const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;
|
|
5250
|
+
let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));
|
|
5251
|
+
if (normalizedSearch.length === 1) wrappedItems = wrappedItems.filter((v) => v !== currentItem);
|
|
5252
|
+
const nextItem = wrappedItems.find((item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase()));
|
|
5253
|
+
return nextItem !== currentItem ? nextItem : void 0;
|
|
5254
|
+
}
|
|
5255
|
+
function wrapArray(array, startIndex) {
|
|
5256
|
+
return array.map((_, index) => array[(startIndex + index) % array.length]);
|
|
5257
|
+
}
|
|
5258
|
+
//#endregion
|
|
5259
|
+
//#region ../ui/src/select.tsx
|
|
5260
|
+
function Select({ ...props }) {
|
|
5261
|
+
return /* @__PURE__ */ jsx(Select$1, {
|
|
5262
|
+
"data-slot": "select",
|
|
5263
|
+
...props
|
|
5264
|
+
});
|
|
5265
|
+
}
|
|
5266
|
+
function SelectValue({ ...props }) {
|
|
5267
|
+
return /* @__PURE__ */ jsx(SelectValue$1, {
|
|
5268
|
+
"data-slot": "select-value",
|
|
5269
|
+
...props
|
|
5270
|
+
});
|
|
5271
|
+
}
|
|
5272
|
+
function SelectTrigger({ className, size = "default", children, disabled, "aria-describedby": ariaDescribedBy, ...props }) {
|
|
5273
|
+
const readiness = useControlReadiness(disabled);
|
|
5274
|
+
const describedBy = useFieldDescribedBy(props.id, ariaDescribedBy);
|
|
5275
|
+
return /* @__PURE__ */ jsxs(SelectTrigger$1, {
|
|
5276
|
+
"data-slot": "select-trigger",
|
|
5277
|
+
"data-size": size,
|
|
5278
|
+
className: cn$1(fieldTriggerClassName, "data-[placeholder]:text-muted-foreground w-fit max-w-full data-[size=default]:h-[var(--field-height)] data-[size=sm]:h-[2rem] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:min-w-0 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2", className),
|
|
5279
|
+
...props,
|
|
5280
|
+
"aria-describedby": describedBy,
|
|
5281
|
+
...readiness,
|
|
5282
|
+
children: [children, /* @__PURE__ */ jsx(SelectIcon, {
|
|
5283
|
+
asChild: true,
|
|
5284
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4 opacity-50" })
|
|
5285
|
+
})]
|
|
5286
|
+
});
|
|
5287
|
+
}
|
|
5288
|
+
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
5289
|
+
return /* @__PURE__ */ jsx(SelectPortal, {
|
|
5290
|
+
container: usePortalContainer(),
|
|
5291
|
+
children: /* @__PURE__ */ jsxs(SelectContent$1, {
|
|
5292
|
+
"data-slot": "select-content",
|
|
5293
|
+
className: cn$1("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-[100] max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--item-radius)] border border-border/60 shadow-md", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
5294
|
+
position,
|
|
5295
|
+
...props,
|
|
5296
|
+
children: [
|
|
5297
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
5298
|
+
/* @__PURE__ */ jsx(SelectViewport, {
|
|
5299
|
+
className: cn$1("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
5300
|
+
children
|
|
5301
|
+
}),
|
|
5302
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
5303
|
+
]
|
|
5304
|
+
})
|
|
5305
|
+
});
|
|
5306
|
+
}
|
|
5307
|
+
function SelectItem({ className, children, ...props }) {
|
|
5308
|
+
return /* @__PURE__ */ jsxs(SelectItem$1, {
|
|
5309
|
+
"data-slot": "select-item",
|
|
5310
|
+
className: cn$1(`[&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full items-center gap-2 rounded-[var(--item-radius)] py-1.5 pr-8 pl-2 text-sm outline-hidden select-none ${menuItemInteractionClassName} data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`, className),
|
|
5311
|
+
...props,
|
|
5312
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
5313
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
5314
|
+
children: /* @__PURE__ */ jsx(SelectItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4" }) })
|
|
5315
|
+
}), /* @__PURE__ */ jsx(SelectItemText, { children })]
|
|
5316
|
+
});
|
|
5317
|
+
}
|
|
5318
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
5319
|
+
return /* @__PURE__ */ jsx(SelectScrollUpButton$1, {
|
|
5320
|
+
"data-slot": "select-scroll-up-button",
|
|
5321
|
+
className: cn$1("flex cursor-default items-center justify-center py-1", className),
|
|
5322
|
+
...props,
|
|
5323
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "size-4" })
|
|
5324
|
+
});
|
|
5325
|
+
}
|
|
5326
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
5327
|
+
return /* @__PURE__ */ jsx(SelectScrollDownButton$1, {
|
|
5328
|
+
"data-slot": "select-scroll-down-button",
|
|
5329
|
+
className: cn$1("flex cursor-default items-center justify-center py-1", className),
|
|
5330
|
+
...props,
|
|
5331
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "size-4" })
|
|
5332
|
+
});
|
|
5333
|
+
}
|
|
5334
|
+
//#endregion
|
|
4120
5335
|
//#region ../ui/src/textarea.tsx
|
|
4121
|
-
const Textarea = React$1.forwardRef(({ className, disabled, ...props }, ref) => {
|
|
5336
|
+
const Textarea = React$1.forwardRef(({ className, disabled, "aria-describedby": ariaDescribedBy, ...props }, ref) => {
|
|
4122
5337
|
const readiness = useControlReadiness(disabled);
|
|
5338
|
+
const describedBy = useFieldDescribedBy(props.id, ariaDescribedBy);
|
|
4123
5339
|
return /* @__PURE__ */ jsx("textarea", {
|
|
4124
5340
|
"data-slot": "textarea",
|
|
4125
5341
|
className: cn$1(FIELD_TEXTAREA_CLASS, "flex w-full", className),
|
|
4126
5342
|
ref,
|
|
4127
5343
|
...props,
|
|
5344
|
+
"aria-describedby": describedBy,
|
|
4128
5345
|
...readiness
|
|
4129
5346
|
});
|
|
4130
5347
|
});
|
|
@@ -5555,10 +6772,12 @@ var RadioGroupIndicator = React$1.forwardRef((props, forwardedRef) => {
|
|
|
5555
6772
|
RadioGroupIndicator.displayName = INDICATOR_NAME2;
|
|
5556
6773
|
//#endregion
|
|
5557
6774
|
//#region ../ui/src/radio-group.tsx
|
|
5558
|
-
const RadioGroup = React$1.forwardRef(({ className, ...props }, ref) => {
|
|
6775
|
+
const RadioGroup = React$1.forwardRef(({ className, "aria-describedby": ariaDescribedBy, ...props }, ref) => {
|
|
6776
|
+
const describedBy = useFieldDescribedBy(props.id, ariaDescribedBy);
|
|
5559
6777
|
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
5560
6778
|
className: cn$1("grid gap-2", className),
|
|
5561
6779
|
...props,
|
|
6780
|
+
"aria-describedby": describedBy,
|
|
5562
6781
|
ref
|
|
5563
6782
|
});
|
|
5564
6783
|
});
|
|
@@ -5567,7 +6786,7 @@ const RadioGroupItem = React$1.forwardRef(({ className, disabled, ...props }, re
|
|
|
5567
6786
|
const readiness = useControlReadiness(disabled);
|
|
5568
6787
|
return /* @__PURE__ */ jsx(RadioGroupItem$1, {
|
|
5569
6788
|
ref,
|
|
5570
|
-
className: cn$1(FIELD_FOCUS_CLASS, "aspect-square size-[1.125rem] rounded-full border
|
|
6789
|
+
className: cn$1(FIELD_FOCUS_CLASS, CHOICE_BORDER_CLASS, "aspect-square size-[1.125rem] rounded-full border bg-field-background text-primary transition-[border-color,box-shadow] focus:outline-none data-[state=checked]:border-primary disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
5571
6790
|
...props,
|
|
5572
6791
|
...readiness,
|
|
5573
6792
|
children: /* @__PURE__ */ jsx(RadioGroupIndicator, {
|
|
@@ -5578,6 +6797,62 @@ const RadioGroupItem = React$1.forwardRef(({ className, disabled, ...props }, re
|
|
|
5578
6797
|
});
|
|
5579
6798
|
RadioGroupItem.displayName = RadioGroupItem$1.displayName;
|
|
5580
6799
|
//#endregion
|
|
6800
|
+
//#region ../ui/src/choice-tile-group.tsx
|
|
6801
|
+
/**
|
|
6802
|
+
* The one marker for a chosen option: a green ring and a light green tint.
|
|
6803
|
+
* Tiles and rows that can't be a ChoiceTileGroup (swatches, previews,
|
|
6804
|
+
* thumbnails) add it to their own classes when chosen, through `cn` so the
|
|
6805
|
+
* tint wins over a base hover fill. The tiles below draw the same thing on
|
|
6806
|
+
* `data-[state=checked]`; Tailwind needs both spelled out, so change them
|
|
6807
|
+
* together.
|
|
6808
|
+
*/
|
|
6809
|
+
const CHOSEN_OPTION_CLASS = "border-primary bg-primary/5 ring-1 ring-primary hover:bg-primary/10";
|
|
6810
|
+
const TILE_CLASS = [
|
|
6811
|
+
"flex min-h-10 w-full cursor-pointer items-center justify-between gap-2 rounded-md border px-3 py-2 text-left text-xs font-medium leading-4 text-foreground transition-colors",
|
|
6812
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
6813
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
6814
|
+
"border-border bg-background hover:bg-muted",
|
|
6815
|
+
"data-[state=checked]:border-primary data-[state=checked]:bg-primary/5 data-[state=checked]:ring-1 data-[state=checked]:ring-primary data-[state=checked]:hover:bg-primary/10"
|
|
6816
|
+
].join(" ");
|
|
6817
|
+
/**
|
|
6818
|
+
* A short single choice drawn as a grid of text tiles, such as a block's
|
|
6819
|
+
* layout. The chosen tile has a green ring, a light tint and a tick, which is
|
|
6820
|
+
* the one way the editor marks "chosen". It's a radio group: Tab reaches the
|
|
6821
|
+
* chosen tile and the arrow keys move between tiles.
|
|
6822
|
+
*/
|
|
6823
|
+
function ChoiceTileGroup({ label, options, value, onValueChange, id, describedBy, columns = 2, disabled, className, "data-field-path": fieldPath }) {
|
|
6824
|
+
const readiness = useControlReadiness(disabled);
|
|
6825
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
6826
|
+
id,
|
|
6827
|
+
"aria-label": label,
|
|
6828
|
+
"aria-describedby": useFieldDescribedBy(id, describedBy),
|
|
6829
|
+
"data-field-path": fieldPath,
|
|
6830
|
+
value: value ?? "",
|
|
6831
|
+
onValueChange: (next) => {
|
|
6832
|
+
const chosen = options.find((option) => option.value === next);
|
|
6833
|
+
if (chosen) onValueChange(chosen.value);
|
|
6834
|
+
},
|
|
6835
|
+
...readiness,
|
|
6836
|
+
className: cn$1("grid gap-2", columns === 2 ? "grid-cols-2" : "grid-cols-1", className),
|
|
6837
|
+
children: options.map((option) => /* @__PURE__ */ jsxs(RadioGroupItem$1, {
|
|
6838
|
+
value: option.value,
|
|
6839
|
+
disabled: option.disabled,
|
|
6840
|
+
className: TILE_CLASS,
|
|
6841
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
6842
|
+
className: "min-w-0",
|
|
6843
|
+
children: option.label
|
|
6844
|
+
}), /* @__PURE__ */ jsx(RadioGroupIndicator, {
|
|
6845
|
+
asChild: true,
|
|
6846
|
+
children: /* @__PURE__ */ jsx(Check, {
|
|
6847
|
+
className: "size-3.5 shrink-0 text-primary",
|
|
6848
|
+
strokeWidth: 2.5,
|
|
6849
|
+
"aria-hidden": "true"
|
|
6850
|
+
})
|
|
6851
|
+
})]
|
|
6852
|
+
}, option.value))
|
|
6853
|
+
});
|
|
6854
|
+
}
|
|
6855
|
+
//#endregion
|
|
5581
6856
|
//#region ../site-contracts/src/siteData/eventCheckout.ts
|
|
5582
6857
|
const uuid = z.string().uuid();
|
|
5583
6858
|
const eventRegistrationStatusReferenceSchema = z.discriminatedUnion("scope", [z.object({
|
|
@@ -8037,26 +9312,22 @@ function generateHeaderNavLinkStyles(header, themeId, tokens, theme, contrastTre
|
|
|
8037
9312
|
//#endregion
|
|
8038
9313
|
//#region ../theme-core/src/header/generateHeaderLogoStyles.ts
|
|
8039
9314
|
function generateHeaderLogoStyles(input) {
|
|
8040
|
-
const { logo, themeId
|
|
9315
|
+
const { logo, themeId } = input;
|
|
8041
9316
|
return `\n${`:where([data-theme-scope="${themeId}"]) .header-logo-text`} {\n ${[
|
|
8042
9317
|
...logoTextColorRules(input),
|
|
8043
9318
|
logo?.fontFamily === "body" ? "font-family: var(--font-body);" : "font-family: var(--font-heading);",
|
|
8044
9319
|
...logoLetterSpacingRules(logo),
|
|
8045
|
-
...logoGradientRules(logo, tokens),
|
|
8046
9320
|
...logoContrastRules(input)
|
|
8047
9321
|
].join("\n ")}\n}\n${mobilePanelLogoColor(input)}`;
|
|
8048
9322
|
}
|
|
8049
9323
|
function mobilePanelLogoColor(input) {
|
|
8050
|
-
if (input.logo?.gradient) return "";
|
|
8051
9324
|
const { themeId, tokens, textColor, fallbackTextColor } = input;
|
|
8052
9325
|
const fallback = tokens.getColor(textColor ?? fallbackTextColor ?? "text");
|
|
8053
9326
|
return `\n${`:where([data-theme-scope="${themeId}"]) .nav-mobile-panel .header-logo-text`},\n${`:where(.nav-mobile-panel[data-theme-scope="${themeId}"]) .header-logo-text`} {\n color: ${surfaceForegroundValue("text", fallback)};\n}\n`;
|
|
8054
9327
|
}
|
|
8055
9328
|
function logoTextColorRules(input) {
|
|
8056
|
-
const {
|
|
8057
|
-
|
|
8058
|
-
const authoredColor = tokens.getColor(textColor ?? fallbackTextColor ?? "text");
|
|
8059
|
-
return [`color: ${useSurfaceTextColor ? surfaceForegroundValue("text", authoredColor) : authoredColor};`];
|
|
9329
|
+
const { textColor, fallbackTextColor, tokens } = input;
|
|
9330
|
+
return [`color: ${surfaceForegroundValue("text", tokens.getColor(textColor ?? fallbackTextColor ?? "text"))};`];
|
|
8060
9331
|
}
|
|
8061
9332
|
function logoLetterSpacingRules(logo) {
|
|
8062
9333
|
const spacing = logo?.letterSpacing;
|
|
@@ -8067,18 +9338,7 @@ function logoLetterSpacingRules(logo) {
|
|
|
8067
9338
|
widest: "0.15em"
|
|
8068
9339
|
}[spacing]};`];
|
|
8069
9340
|
}
|
|
8070
|
-
function logoGradientRules(logo, tokens) {
|
|
8071
|
-
if (!logo?.gradient) return [];
|
|
8072
|
-
return [
|
|
8073
|
-
`background: linear-gradient(to right, ${tokens.getColor("primary")}, ${tokens.getColor("accent")});`,
|
|
8074
|
-
"-webkit-background-clip: text;",
|
|
8075
|
-
"-webkit-text-fill-color: transparent;",
|
|
8076
|
-
"background-clip: text;",
|
|
8077
|
-
"color: transparent;"
|
|
8078
|
-
];
|
|
8079
|
-
}
|
|
8080
9341
|
function logoContrastRules(input) {
|
|
8081
|
-
if (input.logo?.gradient || input.useSurfaceTextColor) return [];
|
|
8082
9342
|
const colorToken = input.textColor?.trim() || input.fallbackTextColor?.trim() || "text";
|
|
8083
9343
|
const shadow = buildTextContrastShadow({
|
|
8084
9344
|
theme: input.theme,
|
|
@@ -8113,8 +9373,7 @@ function generateHeaderCss(options) {
|
|
|
8113
9373
|
theme,
|
|
8114
9374
|
textColor: header.textColor,
|
|
8115
9375
|
fallbackTextColor: header.navLinkStyle?.colorToken,
|
|
8116
|
-
contrastTreatment: headerContrastTreatment ?? void 0
|
|
8117
|
-
useSurfaceTextColor: header.background?.contentOwner === siteChromeBackgroundOverrideOwner
|
|
9376
|
+
contrastTreatment: header.background?.contentOwner === "site-chrome-editor" ? void 0 : headerContrastTreatment ?? void 0
|
|
8118
9377
|
}));
|
|
8119
9378
|
cssChunks.push(generateLogoTextBehaviorStyles(header.logoText, themeId));
|
|
8120
9379
|
cssChunks.push(generateHeaderNavLinkStyles(header, themeId, tokens, theme, headerContrastTreatment, headerNavTextSize));
|
|
@@ -8126,7 +9385,7 @@ function generateHeaderCss(options) {
|
|
|
8126
9385
|
cssChunks.push(generateMobilePanelStyles(themeId, dropdown));
|
|
8127
9386
|
if (header.variant === "floating" && header.container) cssChunks.push(generateFloatingContainerStyles(header, themeId, tokens, responsiveMode));
|
|
8128
9387
|
cssChunks.push(generateNavContainerStyles(header, themeId, tokens, theme, solvedInks));
|
|
8129
|
-
cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens));
|
|
9388
|
+
cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens, headerGroundButton(header, theme)));
|
|
8130
9389
|
cssChunks.push(generateCtaGapStyles(header, themeId));
|
|
8131
9390
|
return cssChunks.filter(Boolean).join("\n\n");
|
|
8132
9391
|
}
|
|
@@ -8458,10 +9717,10 @@ const HEADER_CTA_GAP_MAP = {
|
|
|
8458
9717
|
* Keep the shared button's structure/effects while making the header own the
|
|
8459
9718
|
* palette relationship for both desktop and mobile CTAs.
|
|
8460
9719
|
*/
|
|
8461
|
-
function generateHeaderCtaTreatmentStyles(header, themeId, tokens) {
|
|
9720
|
+
function generateHeaderCtaTreatmentStyles(header, themeId, tokens, groundButton) {
|
|
8462
9721
|
if (header.ctaTreatment !== "inverted") return "";
|
|
8463
9722
|
const desktopSelector = `:where([data-theme-scope="${themeId}"]) .header-cta`;
|
|
8464
|
-
const mobileSelector = `:where([data-theme-scope="${themeId}"]) .nav-mobile-cta`;
|
|
9723
|
+
const mobileSelector = `:where([data-theme-scope="${themeId}"]) :is(.nav-mobile-cta, .header-mobile-bar-cta)`;
|
|
8465
9724
|
const selectors = `${desktopSelector},\n${mobileSelector}`;
|
|
8466
9725
|
const hoverSelectors = [
|
|
8467
9726
|
`${desktopSelector}:hover`,
|
|
@@ -8472,10 +9731,10 @@ function generateHeaderCtaTreatmentStyles(header, themeId, tokens) {
|
|
|
8472
9731
|
const focusSelectors = [`${desktopSelector}:focus-visible`, `${mobileSelector}:focus-visible`].join(",\n");
|
|
8473
9732
|
return `
|
|
8474
9733
|
${selectors} {
|
|
8475
|
-
background-color: ${tokens.getColor("background")};
|
|
9734
|
+
background-color: ${groundButton?.backgroundCss ?? tokens.getColor("background")};
|
|
8476
9735
|
background-image: none;
|
|
8477
|
-
color: ${tokens.getColor("onBackground")};
|
|
8478
|
-
border-color: currentColor;
|
|
9736
|
+
color: ${groundButton?.foregroundCss ?? tokens.getColor("onBackground")};
|
|
9737
|
+
border-color: ${groundButton?.backgroundCss ?? "currentColor"};
|
|
8479
9738
|
}
|
|
8480
9739
|
|
|
8481
9740
|
${hoverSelectors} {
|
|
@@ -8492,6 +9751,24 @@ ${focusSelectors} {
|
|
|
8492
9751
|
`;
|
|
8493
9752
|
}
|
|
8494
9753
|
/**
|
|
9754
|
+
* A style that names the main button's label colour on the header's own
|
|
9755
|
+
* ground (issue 1713) dresses the inverted CTA as that button, with its fill
|
|
9756
|
+
* as the edge. The colours come from the shared solid-button resolution, so the
|
|
9757
|
+
* label falls back exactly as that button's would. Styles that name only a fill
|
|
9758
|
+
* keep the page-colour CTA with its outline.
|
|
9759
|
+
*/
|
|
9760
|
+
function headerGroundButton(header, theme) {
|
|
9761
|
+
const ground = header.background?.type === "color" ? header.background.color : void 0;
|
|
9762
|
+
const request = typeof ground === "string" ? theme.buttons?.surfaceContexts?.[ground] : void 0;
|
|
9763
|
+
if (!request?.primaryText) return null;
|
|
9764
|
+
const resolved = resolveSolidButtonColour({
|
|
9765
|
+
variantId: "primary",
|
|
9766
|
+
state: "base",
|
|
9767
|
+
palette: expandPalette(theme.palette)
|
|
9768
|
+
}, request.primary, request.primaryText);
|
|
9769
|
+
return resolved.ok ? resolved.colour : null;
|
|
9770
|
+
}
|
|
9771
|
+
/**
|
|
8495
9772
|
* Generate CTA button gap styles (left margin between nav links and CTA)
|
|
8496
9773
|
*/
|
|
8497
9774
|
function generateCtaGapStyles(header, themeId) {
|
|
@@ -8559,6 +9836,18 @@ const waveMaskSvgPaths = {
|
|
|
8559
9836
|
bold: "M0 72V44C90 14 270 14 360 44C450 74 630 74 720 44C810 14 990 14 1080 44C1170 74 1350 74 1440 44V72H0Z",
|
|
8560
9837
|
drift: "M0 72V39C115 31 205 54 340 48C505 41 610 16 760 33C920 51 1015 64 1160 44C1280 27 1375 35 1440 50V72H0Z"
|
|
8561
9838
|
};
|
|
9839
|
+
/**
|
|
9840
|
+
* The arc (issue 1713): the next section's colour rises to a shallow peak in the
|
|
9841
|
+
* middle. With echo, two lines follow the arc below it, cut part-way into the
|
|
9842
|
+
* shape so the colour behind shows through them; that keeps them a blend of the
|
|
9843
|
+
* two sections' colours, whatever the palette. They fade out towards the peak.
|
|
9844
|
+
*/
|
|
9845
|
+
const arcShapePath = "M0 110V60Q720 -30 1440 60V110Z";
|
|
9846
|
+
const arcEchoLinePaths = ["M0 84Q720 -6 1440 84", "M0 102Q720 12 1440 102"];
|
|
9847
|
+
function arcMaskDataUrl(echo) {
|
|
9848
|
+
const lines = arcEchoLinePaths.map((d) => `<path d='${d}' fill='none' stroke='url(#fade)' stroke-width='1.5' vector-effect='non-scaling-stroke'/>`).join("");
|
|
9849
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 110' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'>${echo ? `<defs><linearGradient id='fade' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='1440' y2='0'><stop offset='0' stop-color='black' stop-opacity='0.42'/><stop offset='0.5' stop-color='black' stop-opacity='0'/><stop offset='1' stop-color='black' stop-opacity='0.42'/></linearGradient><mask id='lines'><rect width='1440' height='110' fill='white'/>${lines}</mask></defs><path d='${arcShapePath}' fill='white' mask='url(#lines)'/>` : `<path d='${arcShapePath}' fill='white'/>`}</svg>`);
|
|
9850
|
+
}
|
|
8562
9851
|
function waveMaskDataUrl(mask) {
|
|
8563
9852
|
return svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${waveMaskSvgPaths[mask]}' fill='white'/></svg>`);
|
|
8564
9853
|
}
|
|
@@ -8638,18 +9927,8 @@ function shapeDeclarations(entry) {
|
|
|
8638
9927
|
"background: linear-gradient(to bottom, transparent 0%, var(--boundary-shape-paint) 100%);",
|
|
8639
9928
|
"background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--boundary-shape-paint) 16%, transparent) 34%, color-mix(in srgb, var(--boundary-shape-paint) 68%, transparent) 78%, var(--boundary-shape-paint) 100%);"
|
|
8640
9929
|
];
|
|
8641
|
-
case "wave":
|
|
8642
|
-
|
|
8643
|
-
return [
|
|
8644
|
-
"background: var(--boundary-shape-paint);",
|
|
8645
|
-
`mask-image: url("${mask}");`,
|
|
8646
|
-
"mask-repeat: no-repeat;",
|
|
8647
|
-
"mask-size: 100% 100%;",
|
|
8648
|
-
`-webkit-mask-image: url("${mask}");`,
|
|
8649
|
-
"-webkit-mask-repeat: no-repeat;",
|
|
8650
|
-
"-webkit-mask-size: 100% 100%;"
|
|
8651
|
-
];
|
|
8652
|
-
}
|
|
9930
|
+
case "wave": return maskDeclarations(waveMaskDataUrl(entry.shape.mask));
|
|
9931
|
+
case "arc": return [...maskDeclarations(arcMaskDataUrl(entry.shape.echo === true)), "height: calc(var(--boundary-height) + 2px);"];
|
|
8653
9932
|
case "angle": return [
|
|
8654
9933
|
"height: calc(var(--boundary-height) + 2px);",
|
|
8655
9934
|
"background: var(--boundary-shape-paint);",
|
|
@@ -8657,6 +9936,17 @@ function shapeDeclarations(entry) {
|
|
|
8657
9936
|
];
|
|
8658
9937
|
}
|
|
8659
9938
|
}
|
|
9939
|
+
function maskDeclarations(mask) {
|
|
9940
|
+
return [
|
|
9941
|
+
"background: var(--boundary-shape-paint);",
|
|
9942
|
+
`mask-image: url("${mask}");`,
|
|
9943
|
+
"mask-repeat: no-repeat;",
|
|
9944
|
+
"mask-size: 100% 100%;",
|
|
9945
|
+
`-webkit-mask-image: url("${mask}");`,
|
|
9946
|
+
"-webkit-mask-repeat: no-repeat;",
|
|
9947
|
+
"-webkit-mask-size: 100% 100%;"
|
|
9948
|
+
];
|
|
9949
|
+
}
|
|
8660
9950
|
function rule(selector, declarations) {
|
|
8661
9951
|
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
8662
9952
|
}
|
|
@@ -9060,7 +10350,8 @@ ${root} :where(h1.heading-display) {
|
|
|
9060
10350
|
font-size: var(--fs-h1-display-fluid, var(--fs-h1-display, calc(var(--fs-h1) * 1.5)));
|
|
9061
10351
|
}
|
|
9062
10352
|
|
|
9063
|
-
${root} :where(h2.heading-display)
|
|
10353
|
+
${root} :where(h2.heading-display),
|
|
10354
|
+
${root} :where(h1.rb-heading-level-2.heading-display) {
|
|
9064
10355
|
font-size: var(--fs-h2-display-fluid, var(--fs-h2-display, calc(var(--fs-h2) * 1.35)));
|
|
9065
10356
|
}`;
|
|
9066
10357
|
}
|
|
@@ -9074,7 +10365,8 @@ ${root} :where(h1.heading-compact) {
|
|
|
9074
10365
|
font-size: calc(var(--fs-h1) * 0.75);
|
|
9075
10366
|
}
|
|
9076
10367
|
|
|
9077
|
-
${root} :where(h2.heading-compact)
|
|
10368
|
+
${root} :where(h2.heading-compact),
|
|
10369
|
+
${root} :where(h1.rb-heading-level-2.heading-compact) {
|
|
9078
10370
|
font-size: calc(var(--fs-h2) * 0.8);
|
|
9079
10371
|
}
|
|
9080
10372
|
|
|
@@ -9101,15 +10393,18 @@ ${root} :where(p, li, td, th, label, span) {
|
|
|
9101
10393
|
}`;
|
|
9102
10394
|
}
|
|
9103
10395
|
function headingLevelsCss(root) {
|
|
9104
|
-
return `/* Heading level styles with fluid typography */\n${[
|
|
10396
|
+
return `/* Heading level styles with fluid typography */\n${[...[
|
|
9105
10397
|
1,
|
|
9106
10398
|
2,
|
|
9107
10399
|
3,
|
|
9108
10400
|
4,
|
|
9109
10401
|
5,
|
|
9110
10402
|
6
|
|
9111
|
-
].map((level) => {
|
|
9112
|
-
|
|
10403
|
+
].map((level) => headingLevelCss(root, level, `h${level}`)), headingLevelCss(root, 2, "h1.rb-heading-level-2")].join("\n\n")}`;
|
|
10404
|
+
}
|
|
10405
|
+
/** The semantic tag and visual heading role can differ for a promoted page title. */
|
|
10406
|
+
function headingLevelCss(root, level, selector) {
|
|
10407
|
+
return `${root} :where(${selector}) {
|
|
9113
10408
|
font-size: var(--fs-h${level}-fluid, ${level < 4 ? `var(--fs-h${level})` : `var(--fs-h${level}, ${level === 4 ? "var(--fs-h3)" : "var(--fs-body)"})`});
|
|
9114
10409
|
font-weight: var(--fw-h${level}, var(--font-weight-heading));
|
|
9115
10410
|
font-style: var(--fi-h${level}, var(--fi-heading, normal));
|
|
@@ -9117,7 +10412,6 @@ function headingLevelsCss(root) {
|
|
|
9117
10412
|
line-height: var(--lh-h${level}, var(--lh-heading));
|
|
9118
10413
|
color: ${surfaceForegroundValue("heading", globalHeadingColorFallback(level))};
|
|
9119
10414
|
}`;
|
|
9120
|
-
}).join("\n\n")}`;
|
|
9121
10415
|
}
|
|
9122
10416
|
/** Optional width rules leave the historical CSS bytes unchanged. */
|
|
9123
10417
|
function generateFontWidthCss(root, typography) {
|
|
@@ -9151,6 +10445,7 @@ function generateFontWidthCss(root, typography) {
|
|
|
9151
10445
|
"h5",
|
|
9152
10446
|
"h6"
|
|
9153
10447
|
].map((level) => rule(`${root} :where(${level})`, typography.headings[level]?.width)),
|
|
10448
|
+
rule(`${root} :where(h1.rb-heading-level-2)`, typography.headings.h2?.width ?? headingWidth),
|
|
9154
10449
|
`${root} :where(h1, h2, h3, h4, h5, h6) :where(span) { font-stretch: inherit; }`,
|
|
9155
10450
|
rule(`${root} :where(.rb-eyebrow)`, typography.eyebrow ? typography.eyebrow.width ?? 100 : bodyWidth)
|
|
9156
10451
|
].filter(Boolean).join("\n");
|
|
@@ -9354,7 +10649,7 @@ ${`:where([data-theme-scope="${themeId}"]) :where([data-block="event-calendar"])
|
|
|
9354
10649
|
/* Event items - solid style (default) */
|
|
9355
10650
|
--ec-event-solid-bg: rgb(var(--tb-primary));
|
|
9356
10651
|
--ec-event-solid-hover-bg: rgb(var(--tb-primary-600, var(--tb-primary)));
|
|
9357
|
-
--ec-event-solid-text: rgb(var(--tb-
|
|
10652
|
+
--ec-event-solid-text: rgb(var(--tb-onPrimary, 255 255 255));
|
|
9358
10653
|
|
|
9359
10654
|
/* Navigation */
|
|
9360
10655
|
--ec-nav-hover-bg: rgb(var(--tb-text) / 0.1);
|
|
@@ -10934,20 +12229,6 @@ function eventOccurrenceContext(event) {
|
|
|
10934
12229
|
};
|
|
10935
12230
|
}
|
|
10936
12231
|
//#endregion
|
|
10937
|
-
//#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
|
|
10938
|
-
/**
|
|
10939
|
-
* Whether a public event has a registration path a visitor can take.
|
|
10940
|
-
*
|
|
10941
|
-
* Lifecycle admission comes from the public booking-availability contract;
|
|
10942
|
-
* capacity comes from the shared event-domain helpers so uncapped, fallback,
|
|
10943
|
-
* and hybrid attendance-mode cases agree with the registration runtime.
|
|
10944
|
-
*/
|
|
10945
|
-
function isBookableEvent(event) {
|
|
10946
|
-
if (!event.requiresRegistration) return false;
|
|
10947
|
-
if (event.bookingAvailability.kind !== "open") return false;
|
|
10948
|
-
return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
|
|
10949
|
-
}
|
|
10950
|
-
//#endregion
|
|
10951
12232
|
//#region ../blocks/src/system/runtime/nodes/events/domain/location.ts
|
|
10952
12233
|
function formatEventLocation(event) {
|
|
10953
12234
|
switch (event.deliveryMode) {
|
|
@@ -10967,39 +12248,6 @@ function eventVenuePlace(venue) {
|
|
|
10967
12248
|
addressWithBooking: false
|
|
10968
12249
|
};
|
|
10969
12250
|
}
|
|
10970
|
-
/**
|
|
10971
|
-
* Select the next occurrence-targeted events for a quick-book rail.
|
|
10972
|
-
*
|
|
10973
|
-
* The API normally returns valid timestamps, but malformed values sort after
|
|
10974
|
-
* valid events so one bad record cannot displace an otherwise useful rail.
|
|
10975
|
-
* Sorting before deduplication means a duplicate occurrence keeps its earliest
|
|
10976
|
-
* deterministic representation.
|
|
10977
|
-
*/
|
|
10978
|
-
function selectQuickDateEvents(events) {
|
|
10979
|
-
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, 4);
|
|
10980
|
-
}
|
|
10981
|
-
/** Shared ordering and identity selection, independent of booking capacity. */
|
|
10982
|
-
function orderedUniqueEventOccurrences(events) {
|
|
10983
|
-
const sorted = [...events].sort(compareQuickDateEvents);
|
|
10984
|
-
return sorted.filter((event, index) => sorted.findIndex((candidate) => candidate.occurrenceId === event.occurrenceId) === index);
|
|
10985
|
-
}
|
|
10986
|
-
function formatEventQuickDate(event, style = "legacy") {
|
|
10987
|
-
const options = eventDateOptions(event);
|
|
10988
|
-
const dateRail = formatEventCompactDateRail(event.startsAt, options, style === "site" ? "as-written" : "capitals");
|
|
10989
|
-
return {
|
|
10990
|
-
dateTime: event.startsAt,
|
|
10991
|
-
label: `${dateRail.weekday} ${dateRail.day} ${dateRail.month}, ${formatTime$1(event.startsAt, options)}`
|
|
10992
|
-
};
|
|
10993
|
-
}
|
|
10994
|
-
function compareQuickDateEvents(left, right) {
|
|
10995
|
-
const startsAtOrder = compareTimestamp(left.startsAt, right.startsAt);
|
|
10996
|
-
return startsAtOrder === 0 ? left.occurrenceId.localeCompare(right.occurrenceId) : startsAtOrder;
|
|
10997
|
-
}
|
|
10998
|
-
function compareTimestamp(left, right) {
|
|
10999
|
-
const leftTime = Date.parse(left);
|
|
11000
|
-
const rightTime = Date.parse(right);
|
|
11001
|
-
return (Number.isNaN(leftTime) ? Number.POSITIVE_INFINITY : leftTime) - (Number.isNaN(rightTime) ? Number.POSITIVE_INFINITY : rightTime);
|
|
11002
|
-
}
|
|
11003
12251
|
//#endregion
|
|
11004
12252
|
//#region ../blocks/src/system/runtime/shared/utils/checkoutUrls.ts
|
|
11005
12253
|
/**
|
|
@@ -12211,7 +13459,7 @@ function cropHeightStyle(height, heightAs) {
|
|
|
12211
13459
|
*
|
|
12212
13460
|
* This component is server-safe (uses no client APIs like Intl).
|
|
12213
13461
|
*/
|
|
12214
|
-
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, lookSlots, surfacePresentation, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel, imageResolveContext }) => {
|
|
13462
|
+
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, lookSlots, surfacePresentation, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel, imageResolveContext, now }) => {
|
|
12215
13463
|
const { presentationClass, cardHeadingLevel, formattedDate, formattedTime, cta, cardClass, title, summary, image, category, categoryBadge, hasImage, dateFact, priceText, teacherLine, capacityText, orientationClass } = eventCardFacts({
|
|
12216
13464
|
event,
|
|
12217
13465
|
presentation,
|
|
@@ -12221,7 +13469,8 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
12221
13469
|
showCategory,
|
|
12222
13470
|
showImage,
|
|
12223
13471
|
showCapacity,
|
|
12224
|
-
orientation
|
|
13472
|
+
orientation,
|
|
13473
|
+
now
|
|
12225
13474
|
});
|
|
12226
13475
|
return /* @__PURE__ */ jsxs("article", {
|
|
12227
13476
|
...listLookSlot({
|
|
@@ -12473,13 +13722,13 @@ function EventLookDate({ event, ...presentation }) {
|
|
|
12473
13722
|
})]
|
|
12474
13723
|
});
|
|
12475
13724
|
}
|
|
12476
|
-
function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRole, showCategory, showImage, showCapacity, orientation }) {
|
|
13725
|
+
function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRole, showCategory, showImage, showCapacity, orientation, now }) {
|
|
12477
13726
|
const { presentation: cardPresentation, presentationClass, headingLevel: cardHeadingLevel } = resolveEventCardOptions({
|
|
12478
13727
|
presentation,
|
|
12479
13728
|
headingLevel
|
|
12480
13729
|
});
|
|
12481
13730
|
const { formattedDate, formattedTime } = formatEventCardWhen(event);
|
|
12482
|
-
const booking =
|
|
13731
|
+
const booking = eventCardBooking(event, presentation, buttonText, now);
|
|
12483
13732
|
const { cta } = booking;
|
|
12484
13733
|
const cardClass = boxStyleClassNames({ role: cardRole }, { baseClass: "event-card" });
|
|
12485
13734
|
const title = event.title;
|
|
@@ -12511,6 +13760,9 @@ function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRol
|
|
|
12511
13760
|
orientationClass: eventCardOrientationClass(orientation)
|
|
12512
13761
|
};
|
|
12513
13762
|
}
|
|
13763
|
+
function eventCardBooking(event, presentation, buttonText, now) {
|
|
13764
|
+
return resolveEventCardBooking(event, presentation === "catalogue" ? "series" : "occurrence", buttonText, { now: now ?? null });
|
|
13765
|
+
}
|
|
12514
13766
|
//#endregion
|
|
12515
13767
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCompactRow.tsx
|
|
12516
13768
|
/**
|
|
@@ -12628,6 +13880,7 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, s
|
|
|
12628
13880
|
* external events retain their canonical destination and target behaviour.
|
|
12629
13881
|
*/
|
|
12630
13882
|
function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyle }) {
|
|
13883
|
+
const headingId = React.useId();
|
|
12631
13884
|
const quickDateEvents = selectQuickDateEvents(events);
|
|
12632
13885
|
if (quickDateEvents.length === 0) return null;
|
|
12633
13886
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -12635,9 +13888,13 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
|
|
|
12635
13888
|
"data-event-quick-dates": "true",
|
|
12636
13889
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
12637
13890
|
className: "event-quick-dates-heading",
|
|
13891
|
+
id: headingId,
|
|
12638
13892
|
children: "Next few dates"
|
|
12639
13893
|
}), /* @__PURE__ */ jsx("div", {
|
|
12640
|
-
className: "event-quick-dates-rail rb-overflow-x-auto
|
|
13894
|
+
className: "event-quick-dates-rail rb-overflow-x-auto",
|
|
13895
|
+
role: "region",
|
|
13896
|
+
"aria-labelledby": headingId,
|
|
13897
|
+
tabIndex: 0,
|
|
12641
13898
|
children: quickDateEvents.map((event) => /* @__PURE__ */ jsx(EventQuickDateCard, {
|
|
12642
13899
|
event,
|
|
12643
13900
|
pathname,
|
|
@@ -12678,7 +13935,7 @@ function EventQuickDateCard(props) {
|
|
|
12678
13935
|
const { event } = props;
|
|
12679
13936
|
const { date, bookingLink } = quickDateCardPresentation(props);
|
|
12680
13937
|
return /* @__PURE__ */ jsxs("article", {
|
|
12681
|
-
className: "event-quick-date rb-flex rb-
|
|
13938
|
+
className: "event-quick-date rb-flex rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-p-4",
|
|
12682
13939
|
children: [
|
|
12683
13940
|
/* @__PURE__ */ jsx("time", {
|
|
12684
13941
|
className: "event-quick-date-when",
|
|
@@ -12765,6 +14022,18 @@ function OfferingTitle({ className, path, title }) {
|
|
|
12765
14022
|
});
|
|
12766
14023
|
}
|
|
12767
14024
|
//#endregion
|
|
14025
|
+
//#region ../blocks/src/system/transforms/registry/classPrices.ts
|
|
14026
|
+
const classPriceItemsTransform = {
|
|
14027
|
+
id: "events.classPriceItems",
|
|
14028
|
+
kind: "collection",
|
|
14029
|
+
summary: "Live class price items with editable copy",
|
|
14030
|
+
run(value, _options, context) {
|
|
14031
|
+
const data = classPricesDataSchema.safeParse(value);
|
|
14032
|
+
const copy = classPricesCopySchema.safeParse(context.viewModel?.content);
|
|
14033
|
+
return data.success ? resolveClassPriceItems(data.data, copy.success ? copy.data : {}) : [];
|
|
14034
|
+
}
|
|
14035
|
+
};
|
|
14036
|
+
//#endregion
|
|
12768
14037
|
//#region ../blocks/src/system/transforms/registry/eventRegistrationPageKind.ts
|
|
12769
14038
|
const eventRegistrationPageReadAdmission = {
|
|
12770
14039
|
id: "events.registrationPageReadAdmission",
|
|
@@ -13294,6 +14563,7 @@ const serviceDetailsSourceSchema = z.object({
|
|
|
13294
14563
|
pricing: publicAppointmentPricingSchema.optional(),
|
|
13295
14564
|
priceAmount: z.number().nullable(),
|
|
13296
14565
|
priceCurrency: z.string().nullable(),
|
|
14566
|
+
requiresApproval: z.boolean().optional(),
|
|
13297
14567
|
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
13298
14568
|
location: publicAppointmentLocationSchema,
|
|
13299
14569
|
cancellationPolicy: z.object({ refunds: z.object({
|
|
@@ -13321,6 +14591,10 @@ function serviceDetailsFacts(service) {
|
|
|
13321
14591
|
const location = formatAppointmentLocation(service.location);
|
|
13322
14592
|
const practitioners = service.practitioners ?? [];
|
|
13323
14593
|
return [
|
|
14594
|
+
...service.requiresApproval ? [{
|
|
14595
|
+
label: "Booking",
|
|
14596
|
+
value: "You ask for a time, and it’s booked once it’s accepted."
|
|
14597
|
+
}] : [],
|
|
13324
14598
|
{
|
|
13325
14599
|
label: "How long",
|
|
13326
14600
|
value: formatAppointmentDuration(service.durationMinutes)
|
|
@@ -13359,24 +14633,26 @@ const serviceDetailsFactsTransform = {
|
|
|
13359
14633
|
summary: "Read the facts shown for one appointment service",
|
|
13360
14634
|
run: (value) => readServiceDetailsFacts(value)
|
|
13361
14635
|
};
|
|
14636
|
+
/** Display props for the client: the section's scope in content-field shape. */
|
|
13362
14637
|
const eventCalendarSelectionParam = {
|
|
13363
14638
|
id: "events.calendarSelectionParam",
|
|
13364
14639
|
kind: "formatter",
|
|
13365
14640
|
summary: "Resolve selected events instead of discovery filters",
|
|
13366
|
-
schema: z.object({ key: z.enum([
|
|
13367
|
-
"seriesIds",
|
|
13368
|
-
"eventSurface",
|
|
13369
|
-
"filterEventPresets",
|
|
13370
|
-
"scheduleScope",
|
|
13371
|
-
"filterCategoryIds",
|
|
13372
|
-
"filterStaffMemberId",
|
|
13373
|
-
"filterVenueId"
|
|
13374
|
-
]) }),
|
|
14641
|
+
schema: z.object({ key: z.enum(["seriesIds", ...eventDiscoveryFilterKeys]) }),
|
|
13375
14642
|
run(value, { key }) {
|
|
13376
|
-
const
|
|
13377
|
-
|
|
13378
|
-
|
|
13379
|
-
|
|
14643
|
+
const scope = resolveEventScope(asPartialObject(value) ?? {});
|
|
14644
|
+
if (scope.kind === "selected") return key === "seriesIds" ? scope.seriesIds : void 0;
|
|
14645
|
+
return key === "seriesIds" ? void 0 : scope.filters[key];
|
|
14646
|
+
}
|
|
14647
|
+
};
|
|
14648
|
+
/** Public event query params for the section's scope, shared by render loaders and readiness. */
|
|
14649
|
+
const eventScopeParam = {
|
|
14650
|
+
id: "events.scopeParam",
|
|
14651
|
+
kind: "formatter",
|
|
14652
|
+
summary: "Public event query params for the section scope",
|
|
14653
|
+
schema: z.object({ key: z.enum(eventScopeQueryKeys) }),
|
|
14654
|
+
run(value, { key }) {
|
|
14655
|
+
return eventScopeLoaderParam(eventScopeQuery(resolveEventScope(asPartialObject(value) ?? {})), key);
|
|
13380
14656
|
}
|
|
13381
14657
|
};
|
|
13382
14658
|
const readJobSchema = z.object({ job: z.enum([
|
|
@@ -13402,7 +14678,41 @@ const eventCalendarReadEnabled = {
|
|
|
13402
14678
|
return plan.jobs === options.job || plan.jobs === "both" && options.job !== "schedule";
|
|
13403
14679
|
}
|
|
13404
14680
|
};
|
|
14681
|
+
/**
|
|
14682
|
+
* The week board's authored band paints `surfaceAlt` across the whole
|
|
14683
|
+
* section, under whatever foreground the section resolved. That foreground is
|
|
14684
|
+
* the page's only when the section paints nothing itself, so the band is
|
|
14685
|
+
* honoured on a plain section and dropped when a Look or override already
|
|
14686
|
+
* paints one (light band text on a pale board band otherwise).
|
|
14687
|
+
*/
|
|
14688
|
+
const eventCalendarBanded = {
|
|
14689
|
+
id: "events.calendarBanded",
|
|
14690
|
+
kind: "formatter",
|
|
14691
|
+
summary: "Paint the week-board band only on a section with no background of its own",
|
|
14692
|
+
run(value) {
|
|
14693
|
+
const content = asPartialObject(value) ?? {};
|
|
14694
|
+
const sectionStyles = asPartialObject(content._sectionStyles);
|
|
14695
|
+
return content.banded === true && parseBackgroundContent(sectionStyles?.background) === null;
|
|
14696
|
+
}
|
|
14697
|
+
};
|
|
14698
|
+
/** The list loader keeps its one request and adds bounds only for weekly lists. */
|
|
14699
|
+
const eventCalendarListWindow = {
|
|
14700
|
+
id: "events.calendarListWindow",
|
|
14701
|
+
kind: "formatter",
|
|
14702
|
+
schema: z.object({ key: z.enum(["from", "to"]) }),
|
|
14703
|
+
run(_value, { key }, context) {
|
|
14704
|
+
const content = context.data ?? {};
|
|
14705
|
+
if (eventCalendarListGroupingDecision({
|
|
14706
|
+
...content,
|
|
14707
|
+
arrangementLooks: content._lookSlots !== void 0
|
|
14708
|
+
}).grouping !== "week") return void 0;
|
|
14709
|
+
const timeZone = context.dateContext.timeZone;
|
|
14710
|
+
const startOfWeek = eventCalendarWeekStart(timeZone, content.startOfWeek === "sunday" || content.startOfWeek === "monday" ? content.startOfWeek : void 0);
|
|
14711
|
+
return buildEventListWeek(getLocalScheduleDate(new Date(readRuntimeNow(context.now)), timeZone), startOfWeek, timeZone)[key];
|
|
14712
|
+
}
|
|
14713
|
+
};
|
|
13405
14714
|
const defaultTransforms = createTransformRegistry([
|
|
14715
|
+
classPriceItemsTransform,
|
|
13406
14716
|
eventRegistrationPageReadAdmission,
|
|
13407
14717
|
offeringsPreviewDatesReadEnabled,
|
|
13408
14718
|
lookLeadSlotTransform,
|
|
@@ -13410,33 +14720,27 @@ const defaultTransforms = createTransformRegistry([
|
|
|
13410
14720
|
lookCarouselRegionTransform,
|
|
13411
14721
|
lookSkinSlotTransform,
|
|
13412
14722
|
{
|
|
13413
|
-
id: "events.
|
|
14723
|
+
id: "events.readinessEnabled",
|
|
13414
14724
|
kind: "formatter",
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
if (eventCalendarListGroupingDecision({
|
|
13419
|
-
...content,
|
|
13420
|
-
arrangementLooks: content._lookSlots !== void 0
|
|
13421
|
-
}).grouping !== "week") return void 0;
|
|
13422
|
-
const timeZone = context.dateContext.timeZone;
|
|
13423
|
-
const startOfWeek = eventCalendarWeekStart(timeZone, content.startOfWeek === "sunday" || content.startOfWeek === "monday" ? content.startOfWeek : void 0);
|
|
13424
|
-
return buildEventListWeek(getLocalScheduleDate(new Date(readRuntimeNow(context.now)), timeZone), startOfWeek, timeZone)[key];
|
|
14725
|
+
run(value) {
|
|
14726
|
+
const content = asPartialObject(value) ?? {};
|
|
14727
|
+
return content.emptyBehavior === "hide" && eventReadinessLoaderKey(content) !== "schedule";
|
|
13425
14728
|
}
|
|
13426
14729
|
},
|
|
13427
|
-
eventCalendarSelectionParam,
|
|
13428
|
-
eventCalendarReadEnabled,
|
|
13429
|
-
eventCalendarReadProfile,
|
|
13430
14730
|
{
|
|
13431
|
-
id: "events.
|
|
14731
|
+
id: "events.readinessParam",
|
|
13432
14732
|
kind: "formatter",
|
|
13433
|
-
|
|
13434
|
-
run(value) {
|
|
13435
|
-
|
|
13436
|
-
const sectionStyles = asPartialObject(content._sectionStyles);
|
|
13437
|
-
return content.banded === true && parseBackgroundContent(sectionStyles?.background) === null;
|
|
14733
|
+
schema: z.object({ key: z.enum(eventReadinessQueryKeys) }),
|
|
14734
|
+
run(value, { key }) {
|
|
14735
|
+
return eventScopeLoaderParam(eventReadinessQuery(asPartialObject(value) ?? {}), key);
|
|
13438
14736
|
}
|
|
13439
14737
|
},
|
|
14738
|
+
eventCalendarListWindow,
|
|
14739
|
+
eventCalendarSelectionParam,
|
|
14740
|
+
eventScopeParam,
|
|
14741
|
+
eventCalendarReadEnabled,
|
|
14742
|
+
eventCalendarReadProfile,
|
|
14743
|
+
eventCalendarBanded,
|
|
13440
14744
|
...formattingTransforms,
|
|
13441
14745
|
...layoutTransforms,
|
|
13442
14746
|
...chromeLogoTransforms,
|
|
@@ -14547,8 +15851,10 @@ const VideoEmbedNode = ({ value, className, style, aspectRatio, blockId: _blockI
|
|
|
14547
15851
|
});
|
|
14548
15852
|
const title = getVideoTitle(embedInfo);
|
|
14549
15853
|
const shouldDeferSrc = getVideoEmbedLoadingStrategy(embedInfo.provider) === "defer-until-near-viewport";
|
|
15854
|
+
const providerHook = "data-slot" in rest ? { "data-video-provider": embedInfo.provider } : {};
|
|
14550
15855
|
return /* @__PURE__ */ jsx("div", {
|
|
14551
15856
|
...rest,
|
|
15857
|
+
...providerHook,
|
|
14552
15858
|
children: /* @__PURE__ */ jsxs("div", {
|
|
14553
15859
|
className,
|
|
14554
15860
|
"data-rb-video-embed-wrapper": shouldDeferSrc ? "true" : void 0,
|
|
@@ -15021,7 +16327,7 @@ function listGroupPresentation(presentation) {
|
|
|
15021
16327
|
* Every renderer of grouped offerings frames its groups from this one answer.
|
|
15022
16328
|
*/
|
|
15023
16329
|
function listGroupFrames(presentation) {
|
|
15024
|
-
const panels = presentation.cardArrangement === "type-columns";
|
|
16330
|
+
const panels = presentation.cardArrangement === "type-columns" || presentation.cardArrangement === "next-cards";
|
|
15025
16331
|
return {
|
|
15026
16332
|
list: panels ? listLookSlot(presentation, "list") : {},
|
|
15027
16333
|
panel: panels ? listLookSlot(presentation, "panel") : {}
|
|
@@ -15631,13 +16937,13 @@ function bookingPackageRequestKey(enabled, serviceId, resourceId) {
|
|
|
15631
16937
|
return enabled && serviceId ? `${serviceId}:${resourceId ?? "any"}` : null;
|
|
15632
16938
|
}
|
|
15633
16939
|
/** Resolve form admission and existing holdings before any payment/resource consumer sees service offers. */
|
|
15634
|
-
function applyBookingPaymentAdmission(services,
|
|
16940
|
+
function applyBookingPaymentAdmission(services, unrestrictedHeldServiceId) {
|
|
15635
16941
|
return services.map((service) => {
|
|
15636
16942
|
const choices = service.onlinePaymentChoices;
|
|
15637
|
-
if (requiresApproval) return {
|
|
16943
|
+
if (service.requiresApproval) return {
|
|
15638
16944
|
...service,
|
|
15639
16945
|
onlinePaymentChoices: {
|
|
15640
|
-
perSession:
|
|
16946
|
+
perSession: true,
|
|
15641
16947
|
heldPackage: false,
|
|
15642
16948
|
buyPackage: false,
|
|
15643
16949
|
anyAvailable: true
|
|
@@ -15931,7 +17237,6 @@ function normalizeBookingSettings(value) {
|
|
|
15931
17237
|
serviceId: readOptionalString(value.serviceId),
|
|
15932
17238
|
serviceIds: readStringArray(value.serviceIds),
|
|
15933
17239
|
resourceId: readOptionalString(value.resourceId),
|
|
15934
|
-
requiresApproval: typeof value.requiresApproval === "boolean" ? value.requiresApproval : void 0,
|
|
15935
17240
|
successMessage: readOptionalString(value.successMessage)
|
|
15936
17241
|
};
|
|
15937
17242
|
}
|
|
@@ -16357,7 +17662,6 @@ const bookingSettingsSchema = z.object({
|
|
|
16357
17662
|
serviceId: z.string().optional(),
|
|
16358
17663
|
serviceIds: z.array(z.string()).optional(),
|
|
16359
17664
|
resourceId: z.string().optional(),
|
|
16360
|
-
requiresApproval: z.boolean().optional(),
|
|
16361
17665
|
successMessage: z.string().optional()
|
|
16362
17666
|
});
|
|
16363
17667
|
const bookingSourceFormSchema = z.object({
|
|
@@ -16395,6 +17699,14 @@ const bookingServiceSchema = z.object({
|
|
|
16395
17699
|
title: z.string(),
|
|
16396
17700
|
description: z.string().nullable().optional().transform((value) => value ?? void 0),
|
|
16397
17701
|
durationMinutes: z.number().optional(),
|
|
17702
|
+
requiresApproval: z.boolean().optional(),
|
|
17703
|
+
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
17704
|
+
onlinePaymentChoices: z.object({
|
|
17705
|
+
perSession: z.boolean(),
|
|
17706
|
+
heldPackage: z.boolean(),
|
|
17707
|
+
buyPackage: z.boolean(),
|
|
17708
|
+
anyAvailable: z.boolean()
|
|
17709
|
+
}).optional(),
|
|
16398
17710
|
pricing: z.custom().optional(),
|
|
16399
17711
|
priceAmount: z.number().nullable().optional(),
|
|
16400
17712
|
priceCurrency: z.string().nullable().optional(),
|
|
@@ -16990,10 +18302,13 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
16990
18302
|
children: [/* @__PURE__ */ jsx("div", {
|
|
16991
18303
|
className: "rb-label rb-mb-2",
|
|
16992
18304
|
children: "Places"
|
|
16993
|
-
}), /* @__PURE__ */ jsx("p", { children: formatTotalCapacity(selected.capacity) })]
|
|
18305
|
+
}), /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })]
|
|
16994
18306
|
}) : null,
|
|
16995
18307
|
pricing,
|
|
16996
|
-
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
18308
|
+
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
18309
|
+
phase: selection.bookingPhase,
|
|
18310
|
+
event: selected
|
|
18311
|
+
}) : null
|
|
16997
18312
|
]
|
|
16998
18313
|
});
|
|
16999
18314
|
}
|
|
@@ -17062,7 +18377,7 @@ function runLifecycleLabel(lifecycle) {
|
|
|
17062
18377
|
* the booking panel beside it says cancelled is the contradiction a visitor
|
|
17063
18378
|
* actually notices.
|
|
17064
18379
|
*/
|
|
17065
|
-
function BookingState({ phase }) {
|
|
18380
|
+
function BookingState({ phase, event }) {
|
|
17066
18381
|
return /* @__PURE__ */ jsxs("div", {
|
|
17067
18382
|
className: "rb-mt-6",
|
|
17068
18383
|
children: [
|
|
@@ -17070,7 +18385,7 @@ function BookingState({ phase }) {
|
|
|
17070
18385
|
className: "rb-label rb-mb-2",
|
|
17071
18386
|
children: "Booking"
|
|
17072
18387
|
}),
|
|
17073
|
-
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "
|
|
18388
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }),
|
|
17074
18389
|
phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
|
|
17075
18390
|
className: "rb-caption",
|
|
17076
18391
|
children: bookingClosedReason(phase.reason)
|
|
@@ -17684,39 +18999,6 @@ function buildLoadedOfferingsPreviewListing(input) {
|
|
|
17684
18999
|
});
|
|
17685
19000
|
}
|
|
17686
19001
|
//#endregion
|
|
17687
|
-
//#region ../blocks/src/system/runtime/nodes/events/shared/offeringNextDates.ts
|
|
17688
|
-
/** A bounded display sample only: capacity and booking admission belong to the booking destination. */
|
|
17689
|
-
function offeringDatesBySeries(events, now, booking) {
|
|
17690
|
-
const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
|
|
17691
|
-
return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event, booking))]));
|
|
17692
|
-
}
|
|
17693
|
-
/** Whole-series sessions share the run-level booking capacity, by contract. */
|
|
17694
|
-
function offeringRunDates(event, now) {
|
|
17695
|
-
if (event.bookingScope !== "whole_series") return [];
|
|
17696
|
-
const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
|
|
17697
|
-
return nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart).slice(0, 3).map((session) => offeringDateRow(session, event));
|
|
17698
|
-
}
|
|
17699
|
-
function offeringDateRow(session, event, booking) {
|
|
17700
|
-
const options = eventDateOptions({
|
|
17701
|
-
...event,
|
|
17702
|
-
timeZone: session.timeZone
|
|
17703
|
-
});
|
|
17704
|
-
const date = formatEventCompactDateRail(session.startsAt, options, "as-written");
|
|
17705
|
-
const capacity = getEventAvailability(event);
|
|
17706
|
-
const status = getEventAvailabilityStatus(event);
|
|
17707
|
-
const label = `${date.weekday} ${date.day} ${date.month}, ${formatTime$1(session.startsAt, options)}`;
|
|
17708
|
-
const bookingLink = booking?.(event, label) ?? null;
|
|
17709
|
-
return {
|
|
17710
|
-
startsAt: session.startsAt,
|
|
17711
|
-
label,
|
|
17712
|
-
...bookingLink ? { booking: bookingLink } : {},
|
|
17713
|
-
places: capacity.available === null ? null : {
|
|
17714
|
-
label: capacity.isFull ? "Sold out" : `${capacity.available} place${capacity.available === 1 ? "" : "s"} left`,
|
|
17715
|
-
status: capacity.isFull ? "full" : status.status === "filling" ? "low" : "available"
|
|
17716
|
-
}
|
|
17717
|
-
};
|
|
17718
|
-
}
|
|
17719
|
-
//#endregion
|
|
17720
19002
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview-catalogue.tsx
|
|
17721
19003
|
function OfferingsCatalogue(props) {
|
|
17722
19004
|
const input = resolveOfferingsRenderInput(props);
|
|
@@ -17746,6 +19028,7 @@ function OfferingsCatalogue(props) {
|
|
|
17746
19028
|
now,
|
|
17747
19029
|
shape
|
|
17748
19030
|
});
|
|
19031
|
+
case "by-course":
|
|
17749
19032
|
case "by-type": return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
17750
19033
|
...listLookSlot(props, "layout"),
|
|
17751
19034
|
children: [/* @__PURE__ */ jsx("header", {
|
|
@@ -17841,6 +19124,7 @@ function renderCatalogueItems({ props, items, shape, groupTitle }) {
|
|
|
17841
19124
|
style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 18rem), 1fr))" },
|
|
17842
19125
|
children: events.map((event) => /* @__PURE__ */ jsx(EventCard, {
|
|
17843
19126
|
event,
|
|
19127
|
+
now: props.now,
|
|
17844
19128
|
...catalogueEventCardProps(event, props.buttonVariant ?? "primary")
|
|
17845
19129
|
}, event.seriesId))
|
|
17846
19130
|
});
|
|
@@ -17851,14 +19135,15 @@ function catalogueDates(events, now, shape, pathname) {
|
|
|
17851
19135
|
}
|
|
17852
19136
|
function catalogueCardContent(item, now, dates, typeLabel) {
|
|
17853
19137
|
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
17854
|
-
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17861
|
-
|
|
19138
|
+
const content = eventCardListContent(event, {
|
|
19139
|
+
kind: "catalogue",
|
|
19140
|
+
now,
|
|
19141
|
+
nextStartMs: item.nextStartMs,
|
|
19142
|
+
typeLabel
|
|
19143
|
+
}, catalogueEventCardProps(event).buttonText);
|
|
19144
|
+
return event.bookingScope === "whole_series" ? content : {
|
|
19145
|
+
...content,
|
|
19146
|
+
dates: dates.get(event.seriesId)
|
|
17862
19147
|
};
|
|
17863
19148
|
}
|
|
17864
19149
|
function renderCatalogueEmpty({ props, failed }) {
|
|
@@ -17967,17 +19252,19 @@ const OFFERINGS_PREVIEW_GRID_STYLE = {
|
|
|
17967
19252
|
//#endregion
|
|
17968
19253
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview.tsx
|
|
17969
19254
|
const OFFERINGS_WHOLE_SERIES_CARD_CLASS = boxStyleClassNames({ role: "default" }, { baseClass: "group rb-flex rb-h-full rb-flex-col event-card offerings-preview-whole-series-card" });
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
return
|
|
17973
|
-
...
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
children: props.children
|
|
17977
|
-
}), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props) })]
|
|
17978
|
-
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [props.children, renderOfferingsPreview(props)] });
|
|
19255
|
+
/** An authored label is kept as typed; an absent one takes the default for the presentation. */
|
|
19256
|
+
function withButtonText(props) {
|
|
19257
|
+
return {
|
|
19258
|
+
...props,
|
|
19259
|
+
buttonText: props.buttonText ?? (props.displayMode !== "catalogue" && props.cardArrangement === "course-groups" ? "View course" : "Book")
|
|
19260
|
+
};
|
|
17979
19261
|
}
|
|
17980
|
-
function
|
|
19262
|
+
function OfferingsPreviewNode(authored) {
|
|
19263
|
+
const props = withButtonText(authored);
|
|
19264
|
+
if (props.displayMode === "catalogue") return OfferingsCatalogue(isPreviewOnlyArrangement(props.cardArrangement) ? {
|
|
19265
|
+
...props,
|
|
19266
|
+
cardArrangement: "cards"
|
|
19267
|
+
} : props);
|
|
17981
19268
|
const input = resolveOfferingsRenderInput(props);
|
|
17982
19269
|
const now = input.now;
|
|
17983
19270
|
const listing = input.kind === "prepared" ? input.listing : buildLoadedOfferingsPreviewListing({
|
|
@@ -17986,6 +19273,16 @@ function renderOfferingsPreview(props) {
|
|
|
17986
19273
|
listingMode: offeringsListingFor(props.cardArrangement ?? "legacy"),
|
|
17987
19274
|
now
|
|
17988
19275
|
});
|
|
19276
|
+
if (listing.kind === "no-groups" && listing.reason === "empty-hidden") return props.showHiddenPlaceholder || props.previewStage === "preview" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [props.children, /* @__PURE__ */ jsx(EmptyState, { message: "Visitors won't see this section at the moment, because none of its cards has anything coming up." })] }) : null;
|
|
19277
|
+
return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
19278
|
+
...listLookSlot(props, "layout"),
|
|
19279
|
+
children: [/* @__PURE__ */ jsx("header", {
|
|
19280
|
+
...listLookSlot(props, "head"),
|
|
19281
|
+
children: props.children
|
|
19282
|
+
}), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props, listing, now) })]
|
|
19283
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [props.children, renderOfferingsPreview(props, listing, now)] });
|
|
19284
|
+
}
|
|
19285
|
+
function renderOfferingsPreview(props, listing, now) {
|
|
17989
19286
|
switch (listing.kind) {
|
|
17990
19287
|
case "no-groups": return props.previewStage === "preview" ? /* @__PURE__ */ jsx(EmptyState, {
|
|
17991
19288
|
className: "offerings-preview-empty",
|
|
@@ -18007,6 +19304,7 @@ function renderOfferingsPreview(props) {
|
|
|
18007
19304
|
}, dates, group.singularLabel))
|
|
18008
19305
|
});
|
|
18009
19306
|
}
|
|
19307
|
+
case "by-course":
|
|
18010
19308
|
case "by-type": return props.lookSlots ? renderOfferingCardGroups({
|
|
18011
19309
|
...props,
|
|
18012
19310
|
states: listing.groups,
|
|
@@ -18197,6 +19495,7 @@ function renderSingleOfferingCard(item, options) {
|
|
|
18197
19495
|
switch (item.kind) {
|
|
18198
19496
|
case "event": return /* @__PURE__ */ jsx(EventCard, {
|
|
18199
19497
|
event: item.event,
|
|
19498
|
+
now: options.now,
|
|
18200
19499
|
buttonVariant: options.buttonVariant,
|
|
18201
19500
|
buttonText: options.buttonText,
|
|
18202
19501
|
showMap: false,
|
|
@@ -18450,8 +19749,10 @@ function RunWithoutLiveDates({ group, path }) {
|
|
|
18450
19749
|
function renderOfferingCardGroups(props) {
|
|
18451
19750
|
const datesBySeries = offeringDatesBySeries(props.quickDateEvents ?? [], props.now);
|
|
18452
19751
|
const frames = listGroupFrames(props);
|
|
19752
|
+
const nextCards = props.cardArrangement === "next-cards";
|
|
18453
19753
|
return /* @__PURE__ */ jsx("div", {
|
|
18454
|
-
className: "rb-flex rb-flex-col rb-gap-10",
|
|
19754
|
+
className: nextCards ? "rb-grid rb-gap-6" : "rb-flex rb-flex-col rb-gap-10",
|
|
19755
|
+
style: nextCards ? { gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))" } : void 0,
|
|
18455
19756
|
...frames.list,
|
|
18456
19757
|
children: props.states.map((state) => {
|
|
18457
19758
|
const cta = resolveOfferingsPreviewGroupCta({
|
|
@@ -18465,6 +19766,7 @@ function renderOfferingCardGroups(props) {
|
|
|
18465
19766
|
Heading: "h3",
|
|
18466
19767
|
sectionProps: {
|
|
18467
19768
|
...frames.panel,
|
|
19769
|
+
...nextCards ? { className: "rb-flex rb-flex-col rb-gap-4 rb-rounded-lg rb-border rb-border-border rb-p-5" } : {},
|
|
18468
19770
|
"data-offering-source": state.group.sourceKey
|
|
18469
19771
|
},
|
|
18470
19772
|
children: [offeringGroupCards(state, props, datesBySeries), cta ? /* @__PURE__ */ jsx("a", {
|
|
@@ -18489,27 +19791,24 @@ function previewCardContent(item, props, datesBySeries, typeLabel) {
|
|
|
18489
19791
|
...content,
|
|
18490
19792
|
dates: datesBySeries.get(event.seriesId) ?? offeringDatesBySeries([event], props.now).get(event.seriesId)
|
|
18491
19793
|
};
|
|
18492
|
-
const runContent = {
|
|
18493
|
-
...content,
|
|
18494
|
-
dates: offeringRunDates(event, props.now),
|
|
18495
|
-
id: item.run.eventSeriesId
|
|
18496
|
-
};
|
|
18497
|
-
return event.destination.kind === "external" ? runContent : nativeRunCardContent(item, runContent, props);
|
|
18498
|
-
}
|
|
18499
|
-
function nativeRunCardContent(item, content, props) {
|
|
18500
|
-
const open = resolveWholeSeriesBookingPhase(item.run.run, props.now).kind === "open";
|
|
18501
|
-
const path = content.titleLink?.href ?? null;
|
|
18502
19794
|
return {
|
|
18503
19795
|
...content,
|
|
18504
|
-
|
|
18505
|
-
label: open ? path ? props.buttonText || "Book" : "Details coming soon" : "Registration closed",
|
|
18506
|
-
...open && path ? { href: path } : {}
|
|
18507
|
-
}
|
|
19796
|
+
id: item.run.eventSeriesId
|
|
18508
19797
|
};
|
|
18509
19798
|
}
|
|
18510
19799
|
function offeringGroupCards(state, props, dates) {
|
|
18511
19800
|
switch (state.kind) {
|
|
18512
|
-
case "items": return
|
|
19801
|
+
case "items": return props.cardArrangement === "course-groups" ? /* @__PURE__ */ jsx(OfferingCourseCards, {
|
|
19802
|
+
Carousel: props.Carousel,
|
|
19803
|
+
items: state.items,
|
|
19804
|
+
presentation: props,
|
|
19805
|
+
now: props.now,
|
|
19806
|
+
buttonText: props.buttonText
|
|
19807
|
+
}) : props.cardArrangement === "next-cards" ? renderNextOfferingCard(state.items[0], {
|
|
19808
|
+
now: props.now,
|
|
19809
|
+
buttonVariant: props.buttonVariant ?? "primary",
|
|
19810
|
+
buttonText: props.buttonText ?? "Book"
|
|
19811
|
+
}, props) : CardListItems({
|
|
18513
19812
|
Carousel: props.Carousel,
|
|
18514
19813
|
Title: "h4",
|
|
18515
19814
|
presentation: props,
|
|
@@ -18520,6 +19819,74 @@ function offeringGroupCards(state, props, dates) {
|
|
|
18520
19819
|
default: return assertNever$1(state);
|
|
18521
19820
|
}
|
|
18522
19821
|
}
|
|
19822
|
+
/** The existing booking projection owns prices, availability and sold-out/waitlist actions. */
|
|
19823
|
+
function renderNextOfferingCard(item, options, presentation = {}) {
|
|
19824
|
+
const { content, inProgress } = nextOfferingCardContent(item, options);
|
|
19825
|
+
const cardPresentation = {
|
|
19826
|
+
...presentation,
|
|
19827
|
+
buttonVariant: options.buttonVariant
|
|
19828
|
+
};
|
|
19829
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
19830
|
+
...listLookSlot(cardPresentation, "item"),
|
|
19831
|
+
className: "offerings-preview-next-card rb-flex rb-flex-col rb-gap-3",
|
|
19832
|
+
children: [presentation.showPhotos !== false && content.media ? /* @__PURE__ */ jsx("div", {
|
|
19833
|
+
...listLookSlot(cardPresentation, "item-media"),
|
|
19834
|
+
style: {
|
|
19835
|
+
width: "min(100%, 14rem)",
|
|
19836
|
+
aspectRatio: "1",
|
|
19837
|
+
borderRadius: "50%",
|
|
19838
|
+
overflow: "hidden",
|
|
19839
|
+
marginInline: "auto"
|
|
19840
|
+
},
|
|
19841
|
+
children: /* @__PURE__ */ jsx(MediaNodeServer, {
|
|
19842
|
+
...listLookSlot(cardPresentation, "photo"),
|
|
19843
|
+
value: content.media,
|
|
19844
|
+
size: ImagePresets.card,
|
|
19845
|
+
style: {
|
|
19846
|
+
width: "100%",
|
|
19847
|
+
height: "100%",
|
|
19848
|
+
objectFit: "cover"
|
|
19849
|
+
}
|
|
19850
|
+
})
|
|
19851
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
19852
|
+
...listLookSlot(cardPresentation, "item-body"),
|
|
19853
|
+
className: "rb-flex rb-flex-col rb-gap-3",
|
|
19854
|
+
children: [inProgress ? /* @__PURE__ */ jsx("p", { children: "In progress" }) : null, [
|
|
19855
|
+
"title",
|
|
19856
|
+
"schedule",
|
|
19857
|
+
"facts",
|
|
19858
|
+
"action"
|
|
19859
|
+
].map((part) => /* @__PURE__ */ jsx(React.Fragment, { children: /* @__PURE__ */ jsx(CardListContentPart, {
|
|
19860
|
+
part,
|
|
19861
|
+
item: content,
|
|
19862
|
+
presentation: cardPresentation,
|
|
19863
|
+
Title: "h4"
|
|
19864
|
+
}) }, part))]
|
|
19865
|
+
})]
|
|
19866
|
+
});
|
|
19867
|
+
}
|
|
19868
|
+
function nextOfferingCardContent(item, options) {
|
|
19869
|
+
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
19870
|
+
const projected = eventCardListContent(event, {
|
|
19871
|
+
kind: "offering",
|
|
19872
|
+
now: options.now,
|
|
19873
|
+
nextStartMs: null
|
|
19874
|
+
}, options.buttonText);
|
|
19875
|
+
const inProgress = offeringRunLifecycle(event, options.now) === "in_progress";
|
|
19876
|
+
const course = item.kind === "run" ? item.run.run.listing?.course : void 0;
|
|
19877
|
+
return {
|
|
19878
|
+
content: course ? {
|
|
19879
|
+
...projected,
|
|
19880
|
+
title: course.title,
|
|
19881
|
+
eyebrowFacts: course.facts,
|
|
19882
|
+
quickFacts: void 0
|
|
19883
|
+
} : projected,
|
|
19884
|
+
inProgress
|
|
19885
|
+
};
|
|
19886
|
+
}
|
|
19887
|
+
function isPreviewOnlyArrangement(arrangement) {
|
|
19888
|
+
return arrangement === "next-cards" || arrangement === "course-groups";
|
|
19889
|
+
}
|
|
18523
19890
|
//#endregion
|
|
18524
19891
|
//#region ../blocks/src/system/runtime/nodes/weekly-slot-availability.view.tsx
|
|
18525
19892
|
function pluralizeWeeks(count) {
|
|
@@ -20114,10 +21481,10 @@ function renderCombinedSsr(display, prefetchedEvents) {
|
|
|
20114
21481
|
function renderListSsr(display, hydration) {
|
|
20115
21482
|
const { initialToday, timeZone } = hydration.calendarContext;
|
|
20116
21483
|
const week = display.listBy === "week" ? buildEventListWeek(initialToday, display.startOfWeek, timeZone) : null;
|
|
20117
|
-
const
|
|
20118
|
-
|
|
20119
|
-
|
|
20120
|
-
week: eventListWeekDays(week, initialToday, timeZone)
|
|
21484
|
+
const listDisplay = {
|
|
21485
|
+
...buildEventCalendarListingDisplay(display, hydration.prefetchedEvents),
|
|
21486
|
+
weekGrouping: eventWeekGroupingContext(initialToday, timeZone, display.startOfWeek),
|
|
21487
|
+
...week === null ? {} : { week: eventListWeekDays(week, initialToday, timeZone) }
|
|
20121
21488
|
};
|
|
20122
21489
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [week !== null ? /* @__PURE__ */ jsx(EventListWeekNavigation, {
|
|
20123
21490
|
...display,
|
|
@@ -22083,6 +23450,10 @@ const META_PATH_TO_STORE_KEY = {
|
|
|
22083
23450
|
function mapMetaPathToStoreKey(path) {
|
|
22084
23451
|
return META_PATH_TO_STORE_KEY[path] ?? path;
|
|
22085
23452
|
}
|
|
23453
|
+
/** Named bindings follow lexical scope: the nearest declaration wins. */
|
|
23454
|
+
function findNamedScope(context, name) {
|
|
23455
|
+
return [...context.scopes].reverse().find((entry) => entry.name === name);
|
|
23456
|
+
}
|
|
22086
23457
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
22087
23458
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
22088
23459
|
/**
|
|
@@ -22166,7 +23537,7 @@ function derivePreviewLinkedEntryFieldBinding(node, parsedBinding, context) {
|
|
|
22166
23537
|
const [scopeName, ...displaySegments] = splitPath(parsedBinding.from);
|
|
22167
23538
|
if (typeof scopeName !== "string") return null;
|
|
22168
23539
|
if (displaySegments.length === 0) return null;
|
|
22169
|
-
const scoped =
|
|
23540
|
+
const scoped = findNamedScope(context, scopeName);
|
|
22170
23541
|
if (!scoped) return null;
|
|
22171
23542
|
const displayPath = segmentsToPath(displaySegments);
|
|
22172
23543
|
if (!displayPath) return null;
|
|
@@ -22224,7 +23595,7 @@ function contentFieldSegments(fromPath, context) {
|
|
|
22224
23595
|
const [first, ...rest] = splitPath(fromPath);
|
|
22225
23596
|
if (typeof first !== "string" || first === "$root") return void 0;
|
|
22226
23597
|
if (first === "content") return rest;
|
|
22227
|
-
const named =
|
|
23598
|
+
const named = findNamedScope(context, first);
|
|
22228
23599
|
if (named) return scopedContentSegments(named, rest);
|
|
22229
23600
|
const innermost = [...context.scopes].reverse().find((entry) => isPlainObject(entry.value) || Array.isArray(entry.value));
|
|
22230
23601
|
if (!innermost || first in context.viewModel) return void 0;
|
|
@@ -22369,7 +23740,7 @@ function applyTransformsAndFallback(value, binding, context) {
|
|
|
22369
23740
|
function resolveTransformData(context, bindingPath) {
|
|
22370
23741
|
const [first] = splitPath(bindingPath);
|
|
22371
23742
|
if (typeof first === "string" && first !== "$root") {
|
|
22372
|
-
const namedScope = context
|
|
23743
|
+
const namedScope = findNamedScope(context, first);
|
|
22373
23744
|
if (namedScope && isPlainObject(namedScope.value)) return namedScope.value;
|
|
22374
23745
|
}
|
|
22375
23746
|
for (let i = context.scopes.length - 1; i >= 0; i -= 1) {
|
|
@@ -22537,7 +23908,7 @@ function resolveReadBindingValue(binding, context) {
|
|
|
22537
23908
|
source = currentScope.value;
|
|
22538
23909
|
const value = readFromSource(source, segments);
|
|
22539
23910
|
if (value !== void 0) return applyTransformsAndFallback(value, binding, context);
|
|
22540
|
-
const namedScope = context
|
|
23911
|
+
const namedScope = findNamedScope(context, first);
|
|
22541
23912
|
if (namedScope) {
|
|
22542
23913
|
source = namedScope.value;
|
|
22543
23914
|
const namedValue = readFromSource(source, rest);
|
|
@@ -22545,7 +23916,7 @@ function resolveReadBindingValue(binding, context) {
|
|
|
22545
23916
|
}
|
|
22546
23917
|
return applyTransformsAndFallback(readFromSource(context.viewModel, segments), binding, context);
|
|
22547
23918
|
}
|
|
22548
|
-
const namedScope = context
|
|
23919
|
+
const namedScope = findNamedScope(context, first);
|
|
22549
23920
|
if (namedScope) {
|
|
22550
23921
|
source = namedScope.value;
|
|
22551
23922
|
return applyTransformsAndFallback(readFromSource(source, rest), binding, context);
|
|
@@ -22634,9 +24005,11 @@ function resolveRepeater(node, context) {
|
|
|
22634
24005
|
...context,
|
|
22635
24006
|
scopes
|
|
22636
24007
|
};
|
|
24008
|
+
const itemKey = node.key === void 0 ? void 0 : `${node.key}-${idx}`;
|
|
22637
24009
|
const resolved = resolveNode({
|
|
22638
24010
|
...node,
|
|
22639
|
-
$repeat: void 0
|
|
24011
|
+
$repeat: void 0,
|
|
24012
|
+
key: itemKey
|
|
22640
24013
|
}, repeatedContext, idx);
|
|
22641
24014
|
if (resolved === null) return null;
|
|
22642
24015
|
const target = buildLinkedContentEditTarget({
|
|
@@ -22649,7 +24022,7 @@ function resolveRepeater(node, context) {
|
|
|
22649
24022
|
const frame = context.registry.linkedEntryEditFrame;
|
|
22650
24023
|
if (!frame) return resolved;
|
|
22651
24024
|
return React.createElement(frame, {
|
|
22652
|
-
key: idx,
|
|
24025
|
+
key: itemKey ?? idx,
|
|
22653
24026
|
target,
|
|
22654
24027
|
blockId: context.blockId,
|
|
22655
24028
|
blockKind: context.blockKind
|
|
@@ -23289,36 +24662,40 @@ function makeDefaultBlockComponent(args) {
|
|
|
23289
24662
|
}
|
|
23290
24663
|
function createDefaultBlockComponent(manifest) {
|
|
23291
24664
|
return function DefaultBlockComponent(props) {
|
|
23292
|
-
|
|
23293
|
-
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
|
|
23315
|
-
|
|
23316
|
-
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
|
|
24665
|
+
return resolveDefaultBlockTree(manifest, props);
|
|
24666
|
+
};
|
|
24667
|
+
}
|
|
24668
|
+
/** Resolve declarative markup once so page-wide semantics can inspect the same tree that renders. */
|
|
24669
|
+
function resolveDefaultBlockTree(manifest, props) {
|
|
24670
|
+
const perf = beginBlockRenderMeasurement();
|
|
24671
|
+
const prepared = prepareDefaultBlockRender(manifest, props);
|
|
24672
|
+
const result = resolveTree(prepared.layout, {
|
|
24673
|
+
registry: prepared.registry,
|
|
24674
|
+
viewModel: prepared.viewModel,
|
|
24675
|
+
dateContext: prepared.dateContext,
|
|
24676
|
+
now: prepared.now,
|
|
24677
|
+
transforms: props.transforms,
|
|
24678
|
+
theme: prepared.themeForTransforms,
|
|
24679
|
+
proseHoverCandidate: prepared.proseHoverCandidate,
|
|
24680
|
+
pathBase: props.pathBase,
|
|
24681
|
+
blockId: props.blockId,
|
|
24682
|
+
newsletterBlockSubmission: props.newsletterBlockSubmission,
|
|
24683
|
+
blockKind: props.blockKind,
|
|
24684
|
+
blockContent: prepared.mergedContent,
|
|
24685
|
+
blockBindings: props.blockBindings,
|
|
24686
|
+
editableRouteMetadataFieldIds: props.editableRouteMetadataFieldIds,
|
|
24687
|
+
fragmentRegistry: props.fragmentRegistry,
|
|
24688
|
+
fieldConstraints: prepared.fieldConstraints,
|
|
24689
|
+
imageResolveContext: props.imageResolveContext,
|
|
24690
|
+
previewAuthoring: props.previewAuthoring
|
|
24691
|
+
});
|
|
24692
|
+
reportSlowBlockRender(perf, {
|
|
24693
|
+
content: props.content,
|
|
24694
|
+
blockId: props.blockId,
|
|
24695
|
+
blockKind: props.blockKind ?? manifest.name,
|
|
24696
|
+
manifestName: manifest.name
|
|
24697
|
+
});
|
|
24698
|
+
return result;
|
|
23322
24699
|
}
|
|
23323
24700
|
function prepareBlockRender(input) {
|
|
23324
24701
|
const mergedContent = mergeContentWithBlockStyleOverrides(input.content, input.themeConfig, input.blockKind);
|
|
@@ -23707,6 +25084,7 @@ function FieldFrame(props) {
|
|
|
23707
25084
|
const marker = required ? "required" : optional ? "optional" : "none";
|
|
23708
25085
|
const descriptionId = description ? `${controlId}-description` : void 0;
|
|
23709
25086
|
const messageId = Boolean(error) || Boolean(hint) ? `${controlId}-message` : void 0;
|
|
25087
|
+
const describedBy = joinDescribedBy(descriptionId, messageId);
|
|
23710
25088
|
return /* @__PURE__ */ jsxs("div", {
|
|
23711
25089
|
"data-field-path": fieldPath,
|
|
23712
25090
|
className: cn$1("space-y-0 text-sm text-foreground", className),
|
|
@@ -23716,10 +25094,17 @@ function FieldFrame(props) {
|
|
|
23716
25094
|
beforeControl,
|
|
23717
25095
|
/* @__PURE__ */ jsx("div", {
|
|
23718
25096
|
className: "mt-2",
|
|
23719
|
-
children:
|
|
23720
|
-
|
|
23721
|
-
|
|
23722
|
-
|
|
25097
|
+
children: /* @__PURE__ */ jsx(FieldDescriptionProvider, {
|
|
25098
|
+
value: {
|
|
25099
|
+
controlId,
|
|
25100
|
+
describedBy
|
|
25101
|
+
},
|
|
25102
|
+
children: children({
|
|
25103
|
+
id: controlId,
|
|
25104
|
+
describedBy,
|
|
25105
|
+
descriptionId,
|
|
25106
|
+
messageId
|
|
25107
|
+
})
|
|
23723
25108
|
})
|
|
23724
25109
|
}),
|
|
23725
25110
|
afterControl,
|
|
@@ -24579,6 +25964,12 @@ const PORTAL = {
|
|
|
24579
25964
|
authScope: "portal",
|
|
24580
25965
|
skipPreviewStage: true
|
|
24581
25966
|
},
|
|
25967
|
+
resumeMembership: {
|
|
25968
|
+
path: "/portal/memberships/{customerMembershipId}/resume",
|
|
25969
|
+
method: "POST",
|
|
25970
|
+
authScope: "portal",
|
|
25971
|
+
skipPreviewStage: true
|
|
25972
|
+
},
|
|
24582
25973
|
sendMagicLink: {
|
|
24583
25974
|
path: "/portal/auth/send-magic-link",
|
|
24584
25975
|
method: "POST",
|
|
@@ -25334,6 +26725,13 @@ function createBlockApi(config) {
|
|
|
25334
26725
|
body: {}
|
|
25335
26726
|
})).result;
|
|
25336
26727
|
},
|
|
26728
|
+
async resumeMembership(customerMembershipId) {
|
|
26729
|
+
const path = buildPath(PORTAL.resumeMembership.path, { customerMembershipId });
|
|
26730
|
+
return (await request(PORTAL.resumeMembership, {
|
|
26731
|
+
path,
|
|
26732
|
+
body: {}
|
|
26733
|
+
})).result;
|
|
26734
|
+
},
|
|
25337
26735
|
async listEventRescheduleDates(registrationId, query) {
|
|
25338
26736
|
const path = buildPath(PORTAL.listEventRescheduleDates.path, { registrationId });
|
|
25339
26737
|
return request(PORTAL.listEventRescheduleDates, {
|
|
@@ -27521,7 +28919,7 @@ function resolveBookingStepVisibility(input, defaultServiceId, payment) {
|
|
|
27521
28919
|
};
|
|
27522
28920
|
}
|
|
27523
28921
|
function needsBookingPaymentStep(input, payment) {
|
|
27524
|
-
if (
|
|
28922
|
+
if (payment.service?.requiresApproval) return false;
|
|
27525
28923
|
return [
|
|
27526
28924
|
bookingHasPackagePaymentChoices(payment.service),
|
|
27527
28925
|
getBookingServiceSlidingScale(payment.service),
|
|
@@ -28400,6 +29798,8 @@ function useBookingFlowController(input) {
|
|
|
28400
29798
|
...latest,
|
|
28401
29799
|
direction
|
|
28402
29800
|
});
|
|
29801
|
+
latest.dispatch({ type: "feedback-cleared" });
|
|
29802
|
+
latest.clearFeedback();
|
|
28403
29803
|
plan.events.forEach(latest.dispatch);
|
|
28404
29804
|
return plan.result;
|
|
28405
29805
|
}, [latestRef]);
|
|
@@ -28758,16 +30158,15 @@ function useHeadlessBookingFlow(options) {
|
|
|
28758
30158
|
options.services
|
|
28759
30159
|
]);
|
|
28760
30160
|
const [state, dispatch] = useReducer((previous, event) => bookingFlowReducer(previous, event, {
|
|
28761
|
-
services: applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, previous.paymentChoices),
|
|
30161
|
+
services: applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, previous.paymentChoices), previous.unrestrictedHeldPackageServiceId),
|
|
28762
30162
|
defaultServiceId,
|
|
28763
30163
|
nowIso: bookingNowIso
|
|
28764
30164
|
}), initialState);
|
|
28765
30165
|
const api = useBlockApi();
|
|
28766
30166
|
const selectedServiceId = state.selectedServiceId ?? defaultServiceId;
|
|
28767
30167
|
const selectedResourceId = state.selectedResourceId ?? defaultResourceId;
|
|
28768
|
-
const services = useMemo(() => applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, state.paymentChoices),
|
|
30168
|
+
const services = useMemo(() => applyBookingPaymentAdmission(applyBookingPaymentChoices(options.services, state.paymentChoices), state.unrestrictedHeldPackageServiceId), [
|
|
28769
30169
|
options.services,
|
|
28770
|
-
options.form?.settings?.requiresApproval,
|
|
28771
30170
|
state.paymentChoices,
|
|
28772
30171
|
state.unrestrictedHeldPackageServiceId
|
|
28773
30172
|
]);
|
|
@@ -29828,9 +31227,18 @@ function BookingOfferReview({ review, booking }) {
|
|
|
29828
31227
|
});
|
|
29829
31228
|
}
|
|
29830
31229
|
function bookingPrimaryActionLabel(booking, isLastStep, summary) {
|
|
31230
|
+
if (isLastStep && booking.services.selected?.requiresApproval) return "Send request";
|
|
29831
31231
|
return isLastStep && booking.review ? reviewedActionLabel(booking.review) : resolvePrimaryActionLabel(isLastStep, Boolean(summary));
|
|
29832
31232
|
}
|
|
29833
31233
|
function BookingSubmissionSummary({ booking, isLastStep, summary }) {
|
|
31234
|
+
if (isLastStep && booking.services.selected?.requiresApproval) return /* @__PURE__ */ jsxs("p", {
|
|
31235
|
+
className: "ab-text",
|
|
31236
|
+
children: [
|
|
31237
|
+
"This is a request for ",
|
|
31238
|
+
booking.services.selected.title,
|
|
31239
|
+
". You’ll get an email once it’s accepted."
|
|
31240
|
+
]
|
|
31241
|
+
});
|
|
29834
31242
|
return isLastStep && booking.review ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(BookingReviewIdentity, { booking }), /* @__PURE__ */ jsx(BookingOfferReview, {
|
|
29835
31243
|
review: booking.review,
|
|
29836
31244
|
booking
|
|
@@ -31132,12 +32540,12 @@ function HeadlessBookingDefaultForm({ booking, onSubmit, pageKind }) {
|
|
|
31132
32540
|
errors: currentStep.errors,
|
|
31133
32541
|
id: errorSummaryId
|
|
31134
32542
|
}),
|
|
32543
|
+
/* @__PURE__ */ jsx(DefaultBookingDiscount, { booking }),
|
|
32544
|
+
/* @__PURE__ */ jsx(DefaultBookingFeedback, { booking }),
|
|
31135
32545
|
/* @__PURE__ */ jsx(BookingFormSubmitActions, {
|
|
31136
32546
|
booking,
|
|
31137
32547
|
onSubmit
|
|
31138
|
-
})
|
|
31139
|
-
/* @__PURE__ */ jsx(DefaultBookingDiscount, { booking }),
|
|
31140
|
-
/* @__PURE__ */ jsx(DefaultBookingFeedback, { booking })
|
|
32548
|
+
})
|
|
31141
32549
|
]
|
|
31142
32550
|
});
|
|
31143
32551
|
}
|
|
@@ -31564,20 +32972,14 @@ function DefaultBookingDiscount({ booking }) {
|
|
|
31564
32972
|
}
|
|
31565
32973
|
function DefaultBookingFeedback({ booking }) {
|
|
31566
32974
|
if (booking.feedback.kind !== "error") return null;
|
|
31567
|
-
return /* @__PURE__ */
|
|
32975
|
+
return /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
31568
32976
|
tone: "error",
|
|
31569
32977
|
className: "alert alert-error rb-mt-4",
|
|
31570
32978
|
role: "alert",
|
|
31571
|
-
children:
|
|
32979
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
31572
32980
|
className: "ab-text",
|
|
31573
32981
|
children: booking.feedback.message
|
|
31574
|
-
})
|
|
31575
|
-
type: "button",
|
|
31576
|
-
variant: "secondary",
|
|
31577
|
-
size: "sm",
|
|
31578
|
-
label: "Dismiss",
|
|
31579
|
-
onClick: booking.actions.clearFeedback
|
|
31580
|
-
})]
|
|
32982
|
+
})
|
|
31581
32983
|
});
|
|
31582
32984
|
}
|
|
31583
32985
|
/** Each field shows its own message, so the summary only says where to look. */
|
|
@@ -35704,7 +37106,7 @@ function EventRegistrationWizardActions(props) {
|
|
|
35704
37106
|
}
|
|
35705
37107
|
//#endregion
|
|
35706
37108
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.tsx
|
|
35707
|
-
const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-
|
|
37109
|
+
const Payment = lazy(() => import("./EventEmbeddedCheckoutStep-aRJjq4x8.mjs"));
|
|
35708
37110
|
/** The one Stripe mount, shared by the standard wizard and headless arrangements. */
|
|
35709
37111
|
function EventPaymentMount({ state, onComplete, onRetry, onBack, buttonVariant }) {
|
|
35710
37112
|
if (state.kind === "abandoning") return /* @__PURE__ */ jsx("p", {
|
|
@@ -41766,6 +43168,85 @@ function enhanceHeaderScrollBehavior(target, runtime) {
|
|
|
41766
43168
|
}];
|
|
41767
43169
|
}
|
|
41768
43170
|
//#endregion
|
|
43171
|
+
//#region ../blocks/src/system/runtime/header/headerNavFit.ts
|
|
43172
|
+
const HEADER_NAV_FIT_ATTRIBUTE = "data-nav-fit";
|
|
43173
|
+
const DESKTOP_BAR_SELECTOR = ".header-desktop-bar";
|
|
43174
|
+
const DENSITIES_TO_TRY = ["roomy", "tight"];
|
|
43175
|
+
/** Sub-pixel rounding can report one pixel of overflow on a row that fits. */
|
|
43176
|
+
const OVERFLOW_TOLERANCE_PX = 1;
|
|
43177
|
+
function showsMenu(fit) {
|
|
43178
|
+
return fit === null || fit === "menu";
|
|
43179
|
+
}
|
|
43180
|
+
function planHeaderNavFitTransition(from, to) {
|
|
43181
|
+
if (showsMenu(from) === showsMenu(to)) return { kind: "none" };
|
|
43182
|
+
return { kind: showsMenu(to) ? "row-hidden" : "menu-hidden" };
|
|
43183
|
+
}
|
|
43184
|
+
/** Pick the first density that fits, or the menu when none does. */
|
|
43185
|
+
function chooseHeaderNavFit(fitsAt) {
|
|
43186
|
+
return DENSITIES_TO_TRY.find(fitsAt) ?? "menu";
|
|
43187
|
+
}
|
|
43188
|
+
/**
|
|
43189
|
+
* Whether the row's items end inside its content box. The bar's side padding is
|
|
43190
|
+
* the page gutter, so items running into it count as not fitting even though
|
|
43191
|
+
* `scrollWidth` wouldn't report them.
|
|
43192
|
+
*/
|
|
43193
|
+
function measureDesktopBar(bar) {
|
|
43194
|
+
if (bar.clientWidth === 0) return { kind: "hidden" };
|
|
43195
|
+
const barRect = bar.getBoundingClientRect();
|
|
43196
|
+
const style = window.getComputedStyle(bar);
|
|
43197
|
+
const contentLeft = barRect.left + parseFloat(style.borderLeftWidth) + parseFloat(style.paddingLeft);
|
|
43198
|
+
const contentRight = barRect.right - parseFloat(style.borderRightWidth) - parseFloat(style.paddingRight);
|
|
43199
|
+
return {
|
|
43200
|
+
kind: "measured",
|
|
43201
|
+
fits: Array.from(bar.children).map((child) => child.getBoundingClientRect()).filter((rect) => rect.width > 0).every((rect) => rect.left >= contentLeft - OVERFLOW_TOLERANCE_PX && rect.right <= contentRight + OVERFLOW_TOLERANCE_PX)
|
|
43202
|
+
};
|
|
43203
|
+
}
|
|
43204
|
+
function measureFit(root, bar) {
|
|
43205
|
+
root.setAttribute(HEADER_NAV_FIT_ATTRIBUTE, "roomy");
|
|
43206
|
+
if (measureDesktopBar(bar).kind === "hidden") return null;
|
|
43207
|
+
return chooseHeaderNavFit((density) => {
|
|
43208
|
+
root.setAttribute(HEADER_NAV_FIT_ATTRIBUTE, density);
|
|
43209
|
+
const measurement = measureDesktopBar(bar);
|
|
43210
|
+
return measurement.kind === "measured" && measurement.fits;
|
|
43211
|
+
});
|
|
43212
|
+
}
|
|
43213
|
+
/**
|
|
43214
|
+
* Keep the header root's `data-nav-fit` matched to what fits now. Each density
|
|
43215
|
+
* is applied and measured in the same task, so only the final one is painted.
|
|
43216
|
+
* `onTransition` hears when the settled fit hides the menu or the row, after
|
|
43217
|
+
* the attribute is set, so the owners of menu state and focus can follow.
|
|
43218
|
+
*/
|
|
43219
|
+
function enhanceHeaderNavFit(root, onTransition = () => {}) {
|
|
43220
|
+
const bar = root.querySelector(DESKTOP_BAR_SELECTOR);
|
|
43221
|
+
if (!bar || typeof ResizeObserver === "undefined") return [];
|
|
43222
|
+
const settled = { fit: null };
|
|
43223
|
+
const fit = () => {
|
|
43224
|
+
const chosen = measureFit(root, bar);
|
|
43225
|
+
if (chosen === null) root.removeAttribute(HEADER_NAV_FIT_ATTRIBUTE);
|
|
43226
|
+
else root.setAttribute(HEADER_NAV_FIT_ATTRIBUTE, chosen);
|
|
43227
|
+
const transition = planHeaderNavFitTransition(settled.fit, chosen);
|
|
43228
|
+
settled.fit = chosen;
|
|
43229
|
+
if (transition.kind !== "none") onTransition(transition);
|
|
43230
|
+
};
|
|
43231
|
+
const pending = { frame: null };
|
|
43232
|
+
const scheduleFit = () => {
|
|
43233
|
+
if (pending.frame !== null) return;
|
|
43234
|
+
pending.frame = window.requestAnimationFrame(() => {
|
|
43235
|
+
pending.frame = null;
|
|
43236
|
+
fit();
|
|
43237
|
+
});
|
|
43238
|
+
};
|
|
43239
|
+
fit();
|
|
43240
|
+
const observer = new ResizeObserver(scheduleFit);
|
|
43241
|
+
observer.observe(root);
|
|
43242
|
+
Array.from(bar.children).forEach((child) => observer.observe(child));
|
|
43243
|
+
return [() => {
|
|
43244
|
+
observer.disconnect();
|
|
43245
|
+
if (pending.frame !== null) window.cancelAnimationFrame(pending.frame);
|
|
43246
|
+
root.removeAttribute(HEADER_NAV_FIT_ATTRIBUTE);
|
|
43247
|
+
}];
|
|
43248
|
+
}
|
|
43249
|
+
//#endregion
|
|
41769
43250
|
//#region ../blocks/src/system/runtime/header/enhanceHeaderSection.ts
|
|
41770
43251
|
const SELECTORS = {
|
|
41771
43252
|
dropdown: ".nav-dropdown",
|
|
@@ -41778,6 +43259,7 @@ const SELECTORS = {
|
|
|
41778
43259
|
mobileTrigger: "[data-nav-mobile-trigger]",
|
|
41779
43260
|
mobileDropdown: "[data-nav-mobile-dropdown]",
|
|
41780
43261
|
mobileChildren: "[data-nav-mobile-children]",
|
|
43262
|
+
desktopBar: ".header-desktop-bar",
|
|
41781
43263
|
cartPlaceholder: "[data-nav-cart-placeholder]"
|
|
41782
43264
|
};
|
|
41783
43265
|
const CLASSES = {
|
|
@@ -41785,6 +43267,21 @@ const CLASSES = {
|
|
|
41785
43267
|
mobileOpen: "nav-mobile-open"
|
|
41786
43268
|
};
|
|
41787
43269
|
const FOCUSABLE_SELECTOR = "a[href], button:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
43270
|
+
/** Whether a control is on screen now, so focus can land on it. */
|
|
43271
|
+
function isShown(element) {
|
|
43272
|
+
return typeof element.checkVisibility === "function" ? element.checkVisibility({ visibilityProperty: true }) : element.getClientRects().length > 0;
|
|
43273
|
+
}
|
|
43274
|
+
function focusWithoutScroll(element) {
|
|
43275
|
+
try {
|
|
43276
|
+
element.focus({ preventScroll: true });
|
|
43277
|
+
} catch {
|
|
43278
|
+
element.focus();
|
|
43279
|
+
}
|
|
43280
|
+
}
|
|
43281
|
+
/** The first control in the header, outside `skip`, that is on screen now. */
|
|
43282
|
+
function firstShownControl(root, skip) {
|
|
43283
|
+
return Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR)).find((element) => !skip?.contains(element) && isShown(element)) ?? null;
|
|
43284
|
+
}
|
|
41788
43285
|
function planDropdownViewportShift(input) {
|
|
41789
43286
|
const { left, right, viewportWidth, gutter } = input;
|
|
41790
43287
|
if (!Number.isFinite(left) || !Number.isFinite(right) || !Number.isFinite(viewportWidth) || !Number.isFinite(gutter)) return { kind: "unchanged" };
|
|
@@ -41937,7 +43434,10 @@ function enhanceMobileOverlay(root, resetMobileDropdowns) {
|
|
|
41937
43434
|
const toggles = Array.from(root.querySelectorAll(SELECTORS.mobileToggle));
|
|
41938
43435
|
const backdrop = root.querySelector(SELECTORS.mobileBackdrop);
|
|
41939
43436
|
const closeBtn = root.querySelector(SELECTORS.mobileClose);
|
|
41940
|
-
if (!overlay || toggles.length === 0) return {
|
|
43437
|
+
if (!overlay || toggles.length === 0) return {
|
|
43438
|
+
cleanups,
|
|
43439
|
+
close: () => {}
|
|
43440
|
+
};
|
|
41941
43441
|
overlay.classList.remove(CLASSES.hidden);
|
|
41942
43442
|
overlay.setAttribute("aria-hidden", "true");
|
|
41943
43443
|
overlay.setAttribute("inert", "");
|
|
@@ -41964,11 +43464,7 @@ function enhanceMobileOverlay(root, resetMobileDropdowns) {
|
|
|
41964
43464
|
document.body.style.overflow = "hidden";
|
|
41965
43465
|
state.lastActiveElement = document.activeElement;
|
|
41966
43466
|
const focusTarget = overlay.querySelector(SELECTORS.mobileToggle) ?? overlay.querySelector(FOCUSABLE_SELECTOR);
|
|
41967
|
-
if (focusTarget)
|
|
41968
|
-
focusTarget.focus({ preventScroll: true });
|
|
41969
|
-
} catch {
|
|
41970
|
-
focusTarget.focus();
|
|
41971
|
-
}
|
|
43467
|
+
if (focusTarget) focusWithoutScroll(focusTarget);
|
|
41972
43468
|
} else {
|
|
41973
43469
|
overlay.setAttribute("inert", "");
|
|
41974
43470
|
if (state.previousBodyOverflow !== null) {
|
|
@@ -41978,11 +43474,8 @@ function enhanceMobileOverlay(root, resetMobileDropdowns) {
|
|
|
41978
43474
|
document.body.style.paddingRight = state.previousBodyPaddingRight;
|
|
41979
43475
|
state.previousBodyPaddingRight = null;
|
|
41980
43476
|
}
|
|
41981
|
-
|
|
41982
|
-
|
|
41983
|
-
} catch {
|
|
41984
|
-
state.lastActiveElement.focus();
|
|
41985
|
-
}
|
|
43477
|
+
const returnTo = state.lastActiveElement && isShown(state.lastActiveElement) ? state.lastActiveElement : firstShownControl(root, overlay);
|
|
43478
|
+
if (returnTo) focusWithoutScroll(returnTo);
|
|
41986
43479
|
}
|
|
41987
43480
|
}
|
|
41988
43481
|
};
|
|
@@ -41990,6 +43483,9 @@ function enhanceMobileOverlay(root, resetMobileDropdowns) {
|
|
|
41990
43483
|
setOpen(false);
|
|
41991
43484
|
resetMobileDropdowns();
|
|
41992
43485
|
};
|
|
43486
|
+
const close = () => {
|
|
43487
|
+
if (state.isOpen) handleClose();
|
|
43488
|
+
};
|
|
41993
43489
|
const handleToggleClick = () => {
|
|
41994
43490
|
if (state.isOpen) {
|
|
41995
43491
|
handleClose();
|
|
@@ -42021,7 +43517,34 @@ function enhanceMobileOverlay(root, resetMobileDropdowns) {
|
|
|
42021
43517
|
if (state.previousBodyOverflow !== null) document.body.style.overflow = state.previousBodyOverflow;
|
|
42022
43518
|
if (state.previousBodyPaddingRight !== null) document.body.style.paddingRight = state.previousBodyPaddingRight;
|
|
42023
43519
|
});
|
|
42024
|
-
return {
|
|
43520
|
+
return {
|
|
43521
|
+
cleanups,
|
|
43522
|
+
close
|
|
43523
|
+
};
|
|
43524
|
+
}
|
|
43525
|
+
/**
|
|
43526
|
+
* Follow the desktop row's fit. When the menu button stops showing, an open
|
|
43527
|
+
* menu closes through its owner; when the row stops showing, focus on one of
|
|
43528
|
+
* its links moves to the menu button that replaced it.
|
|
43529
|
+
*/
|
|
43530
|
+
function followHeaderNavFit(root, overlay) {
|
|
43531
|
+
return (transition) => {
|
|
43532
|
+
switch (transition.kind) {
|
|
43533
|
+
case "none": return;
|
|
43534
|
+
case "menu-hidden":
|
|
43535
|
+
overlay.close();
|
|
43536
|
+
return;
|
|
43537
|
+
case "row-hidden": {
|
|
43538
|
+
const active = document.activeElement;
|
|
43539
|
+
const bar = root.querySelector(SELECTORS.desktopBar);
|
|
43540
|
+
if (!(active instanceof HTMLElement) || !bar?.contains(active)) return;
|
|
43541
|
+
const toggle = Array.from(root.querySelectorAll(SELECTORS.mobileToggle)).find(isShown);
|
|
43542
|
+
if (toggle) focusWithoutScroll(toggle);
|
|
43543
|
+
else active.blur();
|
|
43544
|
+
return;
|
|
43545
|
+
}
|
|
43546
|
+
}
|
|
43547
|
+
};
|
|
42025
43548
|
}
|
|
42026
43549
|
function getFirstParsedCartMount(mounts) {
|
|
42027
43550
|
return mounts[0] ?? null;
|
|
@@ -42063,6 +43586,7 @@ function enhanceCartMounts(root) {
|
|
|
42063
43586
|
* - Desktop dropdown ARIA state
|
|
42064
43587
|
* - Mobile overlay open/close + focus management
|
|
42065
43588
|
* - Mobile dropdown toggles
|
|
43589
|
+
* - Desktop row fitting (`data-nav-fit`: tighter spacing, then the menu button)
|
|
42066
43590
|
* - Optional scroll-aware styling (`header-scrolled`)
|
|
42067
43591
|
*/
|
|
42068
43592
|
function mountHeaderChromeRuntime(root, options = {}) {
|
|
@@ -42076,6 +43600,7 @@ function mountHeaderChromeRuntime(root, options = {}) {
|
|
|
42076
43600
|
cleanups.push(...overlay.cleanups);
|
|
42077
43601
|
const cartMounts = enhanceCartMounts(root);
|
|
42078
43602
|
cleanups.push(...cartMounts.cleanups);
|
|
43603
|
+
cleanups.push(...enhanceHeaderNavFit(root, followHeaderNavFit(root, overlay)));
|
|
42079
43604
|
const target = options.scrollTarget ?? getFirstNonScriptChild(root);
|
|
42080
43605
|
if (target) cleanups.push(...enhanceHeaderScrollBehavior(target, (options.runtime ?? staticHeaderChromeRuntime).scroll));
|
|
42081
43606
|
if (cleanups.length === 0) {
|
|
@@ -46496,6 +48021,21 @@ function renderSiteChromeBlock(model, surface, theme, options = {}) {
|
|
|
46496
48021
|
viewModelOverrides: spec.viewModelOverrides
|
|
46497
48022
|
});
|
|
46498
48023
|
}
|
|
48024
|
+
/**
|
|
48025
|
+
* Whether the rendered header's logo might be hard to see, judged from the
|
|
48026
|
+
* same content and theme `renderSiteChromeBlock` draws with. `palette` is the
|
|
48027
|
+
* expanded palette of that theme's runtime (`buildThemeRuntime(theme).tokens.palette`).
|
|
48028
|
+
*/
|
|
48029
|
+
function siteChromeHeaderLogoMayBeHardToSee(model, theme, palette, options = {}) {
|
|
48030
|
+
const spec = model.header;
|
|
48031
|
+
if (!spec) return false;
|
|
48032
|
+
const themeConfig = options.themeConfigOverrideMode === "ignore" ? theme : applyThemeConfigOverride(theme, spec.themeConfigOverride);
|
|
48033
|
+
return headerLogoMayBeHardToSee({
|
|
48034
|
+
content: spec.viewModelOverrides.content ?? spec.content,
|
|
48035
|
+
theme: themeConfig,
|
|
48036
|
+
palette
|
|
48037
|
+
});
|
|
48038
|
+
}
|
|
46499
48039
|
function applyThemeConfigOverride(theme, override) {
|
|
46500
48040
|
if (!override) return theme;
|
|
46501
48041
|
return {
|
|
@@ -48186,6 +49726,28 @@ function ChosenPlace({ address, chosenName, siteCountry, fieldsOpen, onToggleFie
|
|
|
48186
49726
|
}
|
|
48187
49727
|
//#endregion
|
|
48188
49728
|
//#region ../bookings/dist/index.js
|
|
49729
|
+
const BOOKING_CURRENCY_OPTIONS = [
|
|
49730
|
+
{
|
|
49731
|
+
value: "GBP",
|
|
49732
|
+
label: "GBP"
|
|
49733
|
+
},
|
|
49734
|
+
{
|
|
49735
|
+
value: "EUR",
|
|
49736
|
+
label: "EUR"
|
|
49737
|
+
},
|
|
49738
|
+
{
|
|
49739
|
+
value: "USD",
|
|
49740
|
+
label: "USD"
|
|
49741
|
+
},
|
|
49742
|
+
{
|
|
49743
|
+
value: "AUD",
|
|
49744
|
+
label: "AUD"
|
|
49745
|
+
},
|
|
49746
|
+
{
|
|
49747
|
+
value: "CAD",
|
|
49748
|
+
label: "CAD"
|
|
49749
|
+
}
|
|
49750
|
+
];
|
|
48189
49751
|
const BASE_BOOKING_COUNTRY_OPTIONS = [
|
|
48190
49752
|
{
|
|
48191
49753
|
value: "GB",
|
|
@@ -48248,6 +49810,12 @@ const BASE_BOOKING_COUNTRY_OPTIONS = [
|
|
|
48248
49810
|
label: "Spain"
|
|
48249
49811
|
}
|
|
48250
49812
|
];
|
|
49813
|
+
/** Launch selection only; full locale support stays available for #1736. */
|
|
49814
|
+
const BOOKING_LAUNCH_LOCALES = [{
|
|
49815
|
+
countryCode: "GB",
|
|
49816
|
+
currency: "GBP"
|
|
49817
|
+
}];
|
|
49818
|
+
BOOKING_CURRENCY_OPTIONS.filter((option) => BOOKING_LAUNCH_LOCALES.some((locale) => locale.currency === option.value));
|
|
48251
49819
|
function normalizeBookingCountryCode(value) {
|
|
48252
49820
|
const normalized = value?.trim().toUpperCase() ?? "";
|
|
48253
49821
|
return /^[A-Z]{2}$/.test(normalized) ? normalized : null;
|
|
@@ -48750,15 +50318,15 @@ function usePreviewTheme(siteId, enabled) {
|
|
|
48750
50318
|
}
|
|
48751
50319
|
//#endregion
|
|
48752
50320
|
//#region ../editor-blocks/src/widgets/location/PickerMapArea.tsx
|
|
48753
|
-
const LazyEditMap = lazy(() => import("./MapLibreEditMap-
|
|
50321
|
+
const LazyEditMap = lazy(() => import("./MapLibreEditMap-BKMNxSEJ.mjs").then((mod) => ({ default: mod.MapLibreEditMap })));
|
|
48754
50322
|
function EditMap(props) {
|
|
48755
50323
|
return /* @__PURE__ */ jsx(Suspense, {
|
|
48756
50324
|
fallback: null,
|
|
48757
50325
|
children: /* @__PURE__ */ jsx(LazyEditMap, { ...props })
|
|
48758
50326
|
});
|
|
48759
50327
|
}
|
|
48760
|
-
const TAB_LIST = "h-auto gap-0.5 rounded-full bg-[var(--surface,var(--muted))] p-[3px]
|
|
48761
|
-
const TAB = "h-auto rounded-full px-3 py-[5px] text-[13px] font-medium data-[state=active]:shadow-[0_1px_3px_rgba(0,0,0,0.1)]";
|
|
50328
|
+
const TAB_LIST = "h-auto gap-0.5 rounded-full border-b-0 shadow-none bg-[var(--surface,var(--muted))] p-[3px]";
|
|
50329
|
+
const TAB = "h-auto rounded-full border-b-0 px-3 py-[5px] text-[13px] font-medium data-[state=active]:bg-background data-[state=active]:shadow-[0_1px_3px_rgba(0,0,0,0.1)]";
|
|
48762
50330
|
/** "Place the pin" and "Preview on your site". The edit map unmounts while the preview shows. */
|
|
48763
50331
|
function PickerMapArea(props) {
|
|
48764
50332
|
const [tab, setTab] = useState("pin");
|
|
@@ -50725,12 +52293,11 @@ function CustomizeBackgroundColorPicker({ title = "Colors", selectedToken, recom
|
|
|
50725
52293
|
children: [/* @__PURE__ */ jsx("div", {
|
|
50726
52294
|
className: "text-xs font-medium text-muted-foreground",
|
|
50727
52295
|
children: title
|
|
50728
|
-
}), onChooseDefault ? /* @__PURE__ */ jsx(
|
|
50729
|
-
|
|
50730
|
-
|
|
52296
|
+
}), onChooseDefault ? /* @__PURE__ */ jsx(DefaultChoiceButton, {
|
|
52297
|
+
label: defaultLabel,
|
|
52298
|
+
selected: defaultSelected,
|
|
50731
52299
|
disabled,
|
|
50732
|
-
onClick: onChooseDefault
|
|
50733
|
-
children: defaultLabel
|
|
52300
|
+
onClick: onChooseDefault
|
|
50734
52301
|
}) : null]
|
|
50735
52302
|
}), hasTokens ? /* @__PURE__ */ jsx(CustomizeColorTokenPicker, {
|
|
50736
52303
|
title,
|
|
@@ -50745,10 +52312,19 @@ function CustomizeBackgroundColorPicker({ title = "Colors", selectedToken, recom
|
|
|
50745
52312
|
showTitle: false
|
|
50746
52313
|
}) : null] });
|
|
50747
52314
|
}
|
|
52315
|
+
function DefaultChoiceButton({ label, selected, disabled, onClick }) {
|
|
52316
|
+
return /* @__PURE__ */ jsx("button", {
|
|
52317
|
+
type: "button",
|
|
52318
|
+
disabled,
|
|
52319
|
+
onClick,
|
|
52320
|
+
className: cn$1("rounded-md border px-2 py-1 text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50", selected ? CHOSEN_OPTION_CLASS : "bg-background"),
|
|
52321
|
+
children: label
|
|
52322
|
+
});
|
|
52323
|
+
}
|
|
50748
52324
|
function ColorTokenButton({ token, label, swatchColor, selected, disabled, onClick }) {
|
|
50749
52325
|
return /* @__PURE__ */ jsxs("button", {
|
|
50750
52326
|
type: "button",
|
|
50751
|
-
className:
|
|
52327
|
+
className: cn$1("flex min-w-0 items-center gap-2 rounded-md border px-2 py-1 text-left text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50", selected ? CHOSEN_OPTION_CLASS : "bg-background"),
|
|
50752
52328
|
disabled,
|
|
50753
52329
|
"aria-label": `Choose ${label}`,
|
|
50754
52330
|
onClick,
|
|
@@ -51579,6 +53155,42 @@ function cycleAvailabilityFromFlags(input) {
|
|
|
51579
53155
|
return { kind: "available" };
|
|
51580
53156
|
}
|
|
51581
53157
|
//#endregion
|
|
53158
|
+
//#region ../preview-next/src/client/preview/HeaderLogoContrastNotice.tsx
|
|
53159
|
+
/** Settings > General holds the "Logo for dark backgrounds" picker for every kind of site. */
|
|
53160
|
+
function dashboardLogoSettingsHref(dashboardBaseUrl, siteId) {
|
|
53161
|
+
if (!dashboardBaseUrl) return null;
|
|
53162
|
+
return `${dashboardBaseUrl.replace(/\/$/u, "")}/dashboard/sites/${siteId}/settings/general`;
|
|
53163
|
+
}
|
|
53164
|
+
/**
|
|
53165
|
+
* Judged from the header exactly as the canvas draws it: the compiled preview
|
|
53166
|
+
* theme and the chrome render model's logo content.
|
|
53167
|
+
*/
|
|
53168
|
+
function useHeaderLogoMayBeHardToSee() {
|
|
53169
|
+
const compiled = usePreviewCompiledThemeOptional();
|
|
53170
|
+
const model = useOptionalPreviewLayout()?.siteChromeRenderModel ?? null;
|
|
53171
|
+
if (!compiled || !model) return false;
|
|
53172
|
+
return siteChromeHeaderLogoMayBeHardToSee(model, compiled.theme, compiled.runtime.tokens.palette, { themeConfigOverrideMode: "ignore" });
|
|
53173
|
+
}
|
|
53174
|
+
function HeaderLogoContrastNotice({ logoSettingsHref }) {
|
|
53175
|
+
if (!useHeaderLogoMayBeHardToSee()) return null;
|
|
53176
|
+
return /* @__PURE__ */ jsxs(Callout, {
|
|
53177
|
+
tone: "warning",
|
|
53178
|
+
role: "note",
|
|
53179
|
+
className: "space-y-1.5 px-3 py-2 text-xs",
|
|
53180
|
+
"data-header-logo-contrast-notice": "",
|
|
53181
|
+
children: [/* @__PURE__ */ jsx("p", { children: "Your logo might be hard to see on this header. If you have a version made for dark backgrounds, we'll use it here instead." }), logoSettingsHref ? /* @__PURE__ */ jsxs("a", {
|
|
53182
|
+
href: logoSettingsHref,
|
|
53183
|
+
target: "_blank",
|
|
53184
|
+
rel: "noopener noreferrer",
|
|
53185
|
+
className: "inline-flex items-center gap-1 font-medium underline underline-offset-2",
|
|
53186
|
+
children: ["Add a logo for dark backgrounds", /* @__PURE__ */ jsx(ExternalLink, {
|
|
53187
|
+
className: "h-3 w-3",
|
|
53188
|
+
"aria-hidden": "true"
|
|
53189
|
+
})]
|
|
53190
|
+
}) : /* @__PURE__ */ jsx("p", { children: "You can add one under Settings, then General." })]
|
|
53191
|
+
});
|
|
53192
|
+
}
|
|
53193
|
+
//#endregion
|
|
51582
53194
|
//#region ../preview-next/src/client/preview/SiteChromeCustomizeButton.tsx
|
|
51583
53195
|
function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-events-auto absolute right-2 top-2 z-50 flex gap-1 opacity-0 transition group-focus-within/site-chrome:opacity-100 group-hover/site-chrome:opacity-100" }) {
|
|
51584
53196
|
const customize = useSiteChromeCustomizeOptional();
|
|
@@ -51639,7 +53251,7 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
51639
53251
|
});
|
|
51640
53252
|
}
|
|
51641
53253
|
/** The existing chrome controls render identically in the sidebar or a standalone SDK popover. */
|
|
51642
|
-
function SiteChromeSurfaceControls({ surface }) {
|
|
53254
|
+
function SiteChromeSurfaceControls({ surface, logoSettingsHref = null }) {
|
|
51643
53255
|
const owner = useSiteChromeCustomizeOptional();
|
|
51644
53256
|
const state = owner?.getSurfaceState(surface);
|
|
51645
53257
|
if (!owner || state?.kind !== "available") return null;
|
|
@@ -51648,7 +53260,10 @@ function SiteChromeSurfaceControls({ surface }) {
|
|
|
51648
53260
|
children: [
|
|
51649
53261
|
/* @__PURE__ */ jsx(ChromeCycleControls, { state }),
|
|
51650
53262
|
state.background.available ? /* @__PURE__ */ jsx(ChromeBackgroundControls, { state }) : null,
|
|
51651
|
-
state.surface === "header" ? /* @__PURE__ */ jsx(HeaderSurfaceControls, {
|
|
53263
|
+
state.surface === "header" ? /* @__PURE__ */ jsx(HeaderSurfaceControls, {
|
|
53264
|
+
state,
|
|
53265
|
+
logoSettingsHref
|
|
53266
|
+
}) : null,
|
|
51652
53267
|
state.diagnostics.length ? /* @__PURE__ */ jsx("ul", {
|
|
51653
53268
|
className: "space-y-1 text-xs text-amber-700",
|
|
51654
53269
|
children: state.diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic))
|
|
@@ -51660,12 +53275,13 @@ function SiteChromeSurfaceControls({ surface }) {
|
|
|
51660
53275
|
]
|
|
51661
53276
|
});
|
|
51662
53277
|
}
|
|
51663
|
-
function HeaderSurfaceControls({ state }) {
|
|
53278
|
+
function HeaderSurfaceControls({ state, logoSettingsHref }) {
|
|
51664
53279
|
const owner = useSiteChromeCustomizeOptional();
|
|
51665
53280
|
const inSidebar = useOptionalEditorUiStoreInstance() !== null;
|
|
51666
53281
|
if (!owner) return null;
|
|
51667
53282
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
51668
53283
|
/* @__PURE__ */ jsx(HeaderBrandControls, { state }),
|
|
53284
|
+
/* @__PURE__ */ jsx(HeaderLogoContrastNotice, { logoSettingsHref }),
|
|
51669
53285
|
inSidebar ? /* @__PURE__ */ jsx(HeaderMenuControls, {
|
|
51670
53286
|
state,
|
|
51671
53287
|
onMenuFontChange: owner.setHeaderMenuFont,
|
|
@@ -51915,4 +53531,4 @@ function tokenSwatchCss(token) {
|
|
|
51915
53531
|
return `rgb(var(--tb-${token}))`;
|
|
51916
53532
|
}
|
|
51917
53533
|
//#endregion
|
|
51918
|
-
export {
|
|
53534
|
+
export { MediaEditorContextProvider as $, Textarea as $t, resolveRuntimePreviewSourceForTheme as A, removeFooterEngagementSection as An, resolveEventDetailsPresentation as At, renderSiteChromeBlock as B, resolvePageRouteTarget as Bt, HeaderMenuControls as C, Trigger$1 as Cn, makeDefaultBlockComponent as Ct, usePreviewCompiledTheme as D, normalizeLegacyFooterContentToV1 as Dn, readBlockComposition as Dt, PreviewThemeRenderingProvider as E, deriveFooterEditorOverview as En, blockLookFromContent as Et, withRenderedContentEntry as F, footerArrangementPolicy as Fn, LINKED_CONTENT_ENTRY_META_KEY as Ft, useSiteOptionWidgetContext as G, buildThemeRuntime as Gt, resolveFooterLayoutHints as H, buildThemeDataAttrs as Ht, siteColourCss as I, planFooterArrangement as In, coerceLinkedContentEntriesPayload as It, getPublicProfile as J, DEFAULT_THEME_RESPONSIVE_MODE as Jt, getFooterComposition as K, escapeStyleContent as Kt, locationWidgetOverrides as L, getLinkedContentEntryMeta as Lt, entryFieldRebindingProjection as M, setFooterSectionSelected as Mn, renderInlineText as Mt, runtimeContentDecorationProjectionFromServerPage as N, upsertFooterEngagementSection as Nn, logger as Nt, usePreviewCompiledThemeOptional as O, parseFooterEngagementSection as On, getDefaultComponentRegistry as Ot, mergeResolvedDataContext as P, validateFooterComposition as Pn, Text as Pt, footerCreditLine as Q, Toaster as Qt, SessionJournalHost as R, defaultTransforms as Rt, useSiteFontStorageUrl as S, Root as Sn, ThemeScopeCore as St, PreviewCompiledThemeProvider as T, classifyKnownMimeType as Tn, arrangementHooksFromContent as Tt, createEditorApiClientFactory as U, readThemeScopeContext as Ut, buildFooterRuntimeViewModel as V, resolveRouteTarget as Vt, SiteOptionWidgetProvider as W, themeRuntimeScopeProps as Wt, updateFooterCredit as X, CHOSEN_OPTION_CLASS as Xt, updateFooterComposition as Y, getResponsiveScopeSpec as Yt, updatePublicProfile as Z, ChoiceTileGroup as Zt, sanitizeDashboardPath as _, Content as _n, FieldFrame as _t, PreviewChromeFloatingControl as a, usePrevious as an, NewsletterFormClient as at, resolvePreviewSidebarChromeModel as b, Trigger as bn, useLinkedInlineTextField as bt, measureSiteTopChromeClearance as c, FieldTrigger as cn, FormNodeClient as ct, CustomizeBackgroundControlRows as d, FIELD_SURFACE_CLASS as dn, useBlockContext as dt, Select as en, useMediaEditor as et, CustomizeBackgroundColorPicker as f, useFieldDescribedBy as fn, SelectField as ft, resolvePreviewDashboardSetupHandoff as g, TabsTrigger as gn, unmapValueFromSelect as gt, buildPreviewDashboardSetupUrl as h, TabsList as hn, mapOptionValueForSelect as ht, PreviewChromeFloatingBar as i, SelectValue as in, clientComponentRegistry as it, applyPreviewRuntimeContentProjections as j, resolveFooterSections as jn, buildAppointmentServicesView as jt, pageDesignRuntimeProjectionFromSource as k, parseFooterModuleId as kn, buildLoadedOfferingsPreviewListing as kt, PREVIEW_SITE_BANNER_ATTRIBUTE as l, Input as ln, BlockApiProvider as lt, resolveSiteStyleAccess as m, TabsContent as mn, mapCurrentValueForSelect as mt, SiteChromeSurfaceControls as n, SelectItem as nn, useApiMediaUploader as nt, PreviewChromeLayerProvider as o, clamp as on, ImageResolveContextProvider as ot, canInspectSiteStyle as p, Tabs as pn, hasEmptyOption as pt, getFooterEngagementAuthoringOptions as q, mergeContentWithBlockStyleOverrides as qt, dashboardLogoSettingsHref as r, SelectTrigger as rn, TransferError as rt, readThemeCustomProperties as s, SearchInput as sn, useImageResolveContextOptional as st, SiteChromeCustomizeButton as t, SelectContent as tn, useMediaEditorOptional as tt, planBlockToolbarPlacement as u, FIELD_FOCUS_WITHIN_CLASS as un, BlockContextProvider as ut, resolvePreviewEditorGuidanceModel as v, List as vn, FieldLabelText as vt, isHeaderMenuSurfaceState as w, defaultThemeTokens as wn, resolveDefaultBlockTree as wt, SiteFontStorageProvider as x, Content$1 as xn, revealEditorElement as xt, resolvePreviewSetupBannerModel as y, Root2$1 as yn, useField as yt, useSiteEditorAdmission as z, resolveEntryRouteTarget as zt };
|