@riverbankcms/sdk 0.159.0 → 0.161.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/README.md +4 -4
- package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
- package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
- package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
- package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
- package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
- package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
- package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
- package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
- package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
- package/dist/_dts/index-BVkP8f70.d.ts +66 -0
- package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
- package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
- package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
- package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
- package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
- package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
- package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
- package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
- package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
- package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
- 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 +13 -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/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
- 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 +10 -28
- 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/preview-next/keep-alive.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- 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/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
- package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
- package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
- package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
- package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
- package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
- package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
- package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
- package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
- package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
- package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
- package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
- package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
- package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
- package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
- package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
- package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
- package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
- package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
- package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
- package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
- package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
- package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
- package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
- package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
- package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
- package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
- package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
- package/dist/client/client.mjs +28 -15
- package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
- package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
- package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
- package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
- package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
- package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
- package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
- package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
- package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
- package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
- package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
- package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
- package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
- package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
- package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
- package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
- package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
- package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
- package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
- package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
- package/dist/client/portal/client.mjs +4560 -115
- package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
- package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
- package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
- package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
- package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
- package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
- package/dist/client/rendering/client.mjs +28 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +57 -32
- package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
- package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
- package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
- package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
- package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
- package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
- package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
- package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
- package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
- package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
- package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
- package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
- package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
- package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
- package/dist/client/uuid-BETKW8rS.mjs +12 -0
- package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
- package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
- package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
- package/dist/preview-next/before-render.mjs +5 -4
- package/dist/preview-next/chrome.css +2 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
- package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
- package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
- package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
- package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
- package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
- package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
- package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
- package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
- package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
- package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
- package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
- package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
- package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
- package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
- package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
- package/dist/preview-next/editor-base.css +64 -2
- package/dist/preview-next/editor-chrome.css +85 -0
- package/dist/preview-next/keepAlive.mjs +2 -2
- package/dist/preview-next/middleware.mjs +7 -3
- package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
- package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
- package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
- package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
- package/dist/server/config-template-validation.mjs +50 -10
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
- package/dist/server/loadPage--DXBwI8V.mjs +2 -0
- package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
- package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
- package/dist/server/page-converter.mjs +8 -10
- package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
- package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
- package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
- package/dist/server/server.mjs +3 -3
- package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
- package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
- package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
- package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
- package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
- package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
- package/dist/styles/index.css +235 -0
- package/package.json +8 -3
- package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
- package/dist/_dts/index-cnymEAZY.d.ts +0 -1
- package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
- package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
- package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
- package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
- package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
- package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
- package/dist/client/timetableModel-D09jPdue.mjs +0 -480
- package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
- package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
- package/dist/server/loadPage-jade28Xh.mjs +0 -2
- package/dist/server/media-CcHwZkdJ.mjs +0 -243
|
@@ -1,302 +1,94 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { T as ok, a as mediaIdentifierSchema, n as renderableMediaAssetSchema, w as err } from "./renderableMediaAssetAdmission-DGjBr_e-.mjs";
|
|
3
|
-
import "react";
|
|
4
2
|
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
function addDaysToIso(isoString, dayCount) {
|
|
13
|
-
const date = new Date(isoString);
|
|
14
|
-
if (!Number.isFinite(date.getTime())) return isoString;
|
|
15
|
-
return addDaysToDate(date, dayCount).toISOString();
|
|
3
|
+
//#region ../core/src/result.ts
|
|
4
|
+
function ok(value) {
|
|
5
|
+
return {
|
|
6
|
+
ok: true,
|
|
7
|
+
value
|
|
8
|
+
};
|
|
16
9
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
10
|
+
function err(error) {
|
|
11
|
+
return {
|
|
12
|
+
ok: false,
|
|
13
|
+
error
|
|
14
|
+
};
|
|
19
15
|
}
|
|
20
16
|
//#endregion
|
|
21
|
-
//#region ../core/src/
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The single currency-amount formatter for the product: minor units in,
|
|
56
|
-
* localized string out.
|
|
57
|
-
*
|
|
58
|
-
* The locale is derived from the currency by default, so output is deterministic
|
|
59
|
-
* across server and client (no SSR/hydration mismatch). All other money
|
|
60
|
-
* formatters in the codebase should delegate here rather than constructing their
|
|
61
|
-
* own `Intl.NumberFormat`.
|
|
62
|
-
*/
|
|
63
|
-
function formatCurrencyAmount(amountCents, currency, options) {
|
|
64
|
-
return formatCurrencyMajorUnits(amountCents / 100, currency, options);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* `formatCurrencyAmount` for an amount already in MAJOR units (29.99 = £29.99),
|
|
68
|
-
* such as a registrar price. Prefer minor units everywhere else.
|
|
69
|
-
*/
|
|
70
|
-
function formatCurrencyMajorUnits(amount, currency, options) {
|
|
71
|
-
const currencyCode = currency.toUpperCase();
|
|
72
|
-
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
73
|
-
try {
|
|
74
|
-
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
75
|
-
style: "currency",
|
|
76
|
-
currency: currencyCode
|
|
77
|
-
});
|
|
78
|
-
return new Intl.NumberFormat(locale, {
|
|
79
|
-
style: "currency",
|
|
80
|
-
currency: currencyCode,
|
|
81
|
-
...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter, amount)
|
|
82
|
-
}).format(amount);
|
|
83
|
-
} catch {
|
|
84
|
-
return `${amount.toFixed(2)} ${currencyCode}`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/** Gift-card copy retains pence only when the amount has a fractional part. */
|
|
88
|
-
function formatGiftCardAmountLabel(amountCents, currency = "GBP") {
|
|
89
|
-
return formatCurrencyAmount(amountCents, currency, {
|
|
90
|
-
locale: "en-GB",
|
|
91
|
-
decimals: amountCents % 100 === 0 ? "whole" : "exact"
|
|
92
|
-
});
|
|
93
|
-
}
|
|
17
|
+
//#region ../core/src/branded.ts
|
|
18
|
+
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
19
|
+
function parseUuidBrand(value, unsafeConstructor) {
|
|
20
|
+
if (typeof value !== "string") return err({ kind: "not_string" });
|
|
21
|
+
const normalized = value.trim().toLowerCase();
|
|
22
|
+
if (normalized.length === 0) return err({ kind: "empty_string" });
|
|
23
|
+
if (!UUID_PATTERN.test(normalized)) return err({ kind: "invalid_uuid" });
|
|
24
|
+
return ok(unsafeConstructor(normalized));
|
|
25
|
+
}
|
|
26
|
+
const unsafeAsSiteId = (id) => id;
|
|
27
|
+
const unsafeAsApiKeyId = (id) => id;
|
|
28
|
+
const unsafeAsEventOfferingId = (id) => id;
|
|
29
|
+
const unsafeAsEventSeriesId = (id) => id;
|
|
30
|
+
const unsafeAsMediaAssetId = (id) => id;
|
|
31
|
+
const unsafeAsStorageBucketName = (value) => value;
|
|
32
|
+
const unsafeAsStoragePath = (value) => value;
|
|
33
|
+
const unsafeAsUserId = (id) => id;
|
|
34
|
+
const unsafeAsFormId = (id) => id;
|
|
35
|
+
const unsafeAsPassId = (id) => id;
|
|
36
|
+
const unsafeAsSiteTermsVersionId = (id) => id;
|
|
37
|
+
const unsafeAsCustomerPassId = (id) => id;
|
|
38
|
+
const unsafeAsAppointmentServiceId = (id) => id;
|
|
39
|
+
const unsafeAsAppointmentResourceId = (id) => id;
|
|
40
|
+
const unsafeAsContentVersionId = (id) => id;
|
|
41
|
+
const parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
|
|
42
|
+
const parseApiKeyId = (value) => parseUuidBrand(value, unsafeAsApiKeyId);
|
|
43
|
+
const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
|
|
44
|
+
const parseUserId = (value) => parseUuidBrand(value, unsafeAsUserId);
|
|
45
|
+
const parseMediaAssetId = (value) => parseUuidBrand(value, unsafeAsMediaAssetId);
|
|
46
|
+
const parseContentVersionId = (value) => parseUuidBrand(value, unsafeAsContentVersionId);
|
|
47
|
+
const parseSiteTermsVersionId = (value) => parseUuidBrand(value, unsafeAsSiteTermsVersionId);
|
|
48
|
+
const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
|
|
94
49
|
//#endregion
|
|
95
|
-
//#region ../core/src/
|
|
96
|
-
function
|
|
97
|
-
return value;
|
|
50
|
+
//#region ../media-core/src/identifiers.ts
|
|
51
|
+
function slugifyMediaIdentifier(value) {
|
|
52
|
+
return value.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-");
|
|
98
53
|
}
|
|
99
|
-
function
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
54
|
+
function parseMediaIdentifier(value) {
|
|
55
|
+
if (typeof value !== "string") return err({ kind: "not_string" });
|
|
56
|
+
const trimmed = value.trim();
|
|
57
|
+
if (trimmed.length === 0) return err({ kind: "empty_identifier" });
|
|
58
|
+
const normalized = slugifyMediaIdentifier(trimmed);
|
|
59
|
+
if (normalized.length === 0) return err({
|
|
60
|
+
kind: "empty_after_normalization",
|
|
61
|
+
value
|
|
62
|
+
});
|
|
63
|
+
return ok(normalized);
|
|
104
64
|
}
|
|
105
65
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
66
|
+
* Admits identifiers read from trusted persistence without repairing dirty data in memory.
|
|
67
|
+
* User input should use parseMediaIdentifier, which intentionally canonicalizes it.
|
|
108
68
|
*/
|
|
109
|
-
function
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
function parseCents(value) {
|
|
113
|
-
if (!Number.isFinite(value)) return err({ kind: "invalid-number" });
|
|
114
|
-
if (!Number.isInteger(value)) return err({ kind: "not-whole-cents" });
|
|
115
|
-
return ok(unsafeAsCents(value));
|
|
116
|
-
}
|
|
117
|
-
function parseNonNegativeCents(value) {
|
|
118
|
-
const parsed = parseCents(value);
|
|
119
|
-
if (!parsed.ok) return parsed;
|
|
120
|
-
if (parsed.value < 0) return err({ kind: "negative" });
|
|
121
|
-
return ok(unsafeAsNonNegativeCents(parsed.value));
|
|
122
|
-
}
|
|
123
|
-
function parsePositiveCents(value) {
|
|
124
|
-
const parsed = parseNonNegativeCents(value);
|
|
125
|
-
if (!parsed.ok) return parsed;
|
|
126
|
-
if (parsed.value === 0) return err({ kind: "zero-not-allowed" });
|
|
127
|
-
return ok(unsafeAsPositiveCents(parsed.value));
|
|
128
|
-
}
|
|
129
|
-
function normalizeMoneyInput(value, options) {
|
|
130
|
-
return (options.stripFormatting === true ? value.replace(/[^0-9.-]/g, "") : value).trim();
|
|
131
|
-
}
|
|
132
|
-
function parseFiniteMoneyAmount(value, options) {
|
|
133
|
-
const normalized = normalizeMoneyInput(value, options);
|
|
134
|
-
if (normalized.length === 0) return err({ kind: "empty" });
|
|
135
|
-
const amount = Number(normalized);
|
|
136
|
-
if (!Number.isFinite(amount)) return err({ kind: "invalid-number" });
|
|
137
|
-
return ok(amount);
|
|
138
|
-
}
|
|
139
|
-
function roundMoneyAmountToCents(amount) {
|
|
140
|
-
return Math.round(amount * 100);
|
|
141
|
-
}
|
|
142
|
-
function parsePositiveMoneyInputToCents(value, options = {}) {
|
|
143
|
-
const parsed = parseFiniteMoneyAmount(value, options);
|
|
69
|
+
function parseCanonicalMediaIdentifier(value) {
|
|
70
|
+
if (typeof value !== "string") return err({ kind: "not_string" });
|
|
71
|
+
const parsed = parseMediaIdentifier(value);
|
|
144
72
|
if (!parsed.ok) return parsed;
|
|
145
|
-
if (parsed.value
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
//#region ../core/src/booking-flexible-balance.ts
|
|
152
|
-
function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
|
|
153
|
-
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
154
|
-
}
|
|
155
|
-
function resolveFlexibleBalanceInitialPaymentCents(input) {
|
|
156
|
-
return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
|
|
157
|
-
}
|
|
158
|
-
function resolveFlexibleBalanceDueAt(input) {
|
|
159
|
-
switch (input.dueDateRule.kind) {
|
|
160
|
-
case "relative_to_start_date": return subtractDaysFromIso(input.bookingStartAt, input.dueDateRule.daysBeforeStart);
|
|
161
|
-
case "fixed_calendar_date": return input.dueDateRule.dueAt;
|
|
162
|
-
default: return assertNever$3(input.dueDateRule);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function calculateFlexibleBalanceMinimumPaymentCents(input) {
|
|
166
|
-
if (input.remainingBalanceCents <= 0) return 0;
|
|
167
|
-
const minimumPercentageBps = input.minimumPercentageBps ?? 1e3;
|
|
168
|
-
const percentageFloor = Math.ceil(input.remainingBalanceCents * minimumPercentageBps / 1e4);
|
|
169
|
-
return Math.min(input.remainingBalanceCents, Math.max(input.stripeMinimumChargeCents, percentageFloor));
|
|
170
|
-
}
|
|
171
|
-
function resolveFlexibleBalancePaymentEligibility(input) {
|
|
172
|
-
if (input.remainingBalanceCents <= 0 || input.status === "completed") return {
|
|
173
|
-
kind: "unavailable",
|
|
174
|
-
reason: "already_settled"
|
|
175
|
-
};
|
|
176
|
-
switch (input.status) {
|
|
177
|
-
case "payment_pending":
|
|
178
|
-
case "cancelled_due_to_non_payment":
|
|
179
|
-
case "refunded":
|
|
180
|
-
case "waived": return {
|
|
181
|
-
kind: "unavailable",
|
|
182
|
-
reason: input.status
|
|
183
|
-
};
|
|
184
|
-
case "closed_order_failed": return {
|
|
185
|
-
kind: "unavailable",
|
|
186
|
-
reason: "order_failed"
|
|
187
|
-
};
|
|
188
|
-
case "overdue": return {
|
|
189
|
-
kind: "full_balance_only",
|
|
190
|
-
remainingBalanceCents: input.remainingBalanceCents,
|
|
191
|
-
reason: "overdue"
|
|
192
|
-
};
|
|
193
|
-
case "active": {
|
|
194
|
-
const minimumAmountCents = calculateFlexibleBalanceMinimumPaymentCents({
|
|
195
|
-
remainingBalanceCents: input.remainingBalanceCents,
|
|
196
|
-
stripeMinimumChargeCents: input.stripeMinimumChargeCents,
|
|
197
|
-
minimumPercentageBps: input.minimumPercentageBps
|
|
198
|
-
});
|
|
199
|
-
if (minimumAmountCents >= input.remainingBalanceCents) return {
|
|
200
|
-
kind: "full_balance_only",
|
|
201
|
-
remainingBalanceCents: input.remainingBalanceCents,
|
|
202
|
-
reason: "dust_balance"
|
|
203
|
-
};
|
|
204
|
-
return {
|
|
205
|
-
kind: "eligible",
|
|
206
|
-
minimumAmountCents,
|
|
207
|
-
maximumCustomAmountCents: input.remainingBalanceCents,
|
|
208
|
-
suggestedPayFullAmountCents: input.remainingBalanceCents
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
default: return assertNever$3(input.status);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
function assertNever$3(value) {
|
|
215
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
216
|
-
}
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region ../core/src/booking-instalments.ts
|
|
219
|
-
function isDepositBearingBookingInstalmentPlan(plan) {
|
|
220
|
-
switch (plan.kind) {
|
|
221
|
-
case "deposit_plus_one_remainder":
|
|
222
|
-
case "deposit_plus_scheduled_instalments": return true;
|
|
223
|
-
case "equal_scheduled_instalments": return false;
|
|
224
|
-
default: return assertNever$2(plan);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function getBookingInstalmentDepositRefundability(plan) {
|
|
228
|
-
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
|
|
229
|
-
}
|
|
230
|
-
function clampConfiguredAmount(amountCents, totalAmountCents) {
|
|
231
|
-
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
232
|
-
}
|
|
233
|
-
function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
|
|
234
|
-
if (partCount <= 0) return [];
|
|
235
|
-
const baseAmountCents = Math.floor(totalAmountCents / partCount);
|
|
236
|
-
const remainderCents = totalAmountCents - baseAmountCents * partCount;
|
|
237
|
-
return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
|
|
238
|
-
}
|
|
239
|
-
function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
|
|
240
|
-
const date = new Date(isoString);
|
|
241
|
-
if (!Number.isFinite(date.getTime())) return isoString;
|
|
242
|
-
switch (intervalUnit) {
|
|
243
|
-
case "day":
|
|
244
|
-
date.setUTCDate(date.getUTCDate() + intervalCount);
|
|
245
|
-
return date.toISOString();
|
|
246
|
-
case "week":
|
|
247
|
-
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
248
|
-
return date.toISOString();
|
|
249
|
-
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
250
|
-
default: return assertNever$2(intervalUnit);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
254
|
-
switch (plan.kind) {
|
|
255
|
-
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
256
|
-
case "deposit_plus_scheduled_instalments":
|
|
257
|
-
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
258
|
-
default: return assertNever$2(plan);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
function omitZeroAmountFutureRows(rows) {
|
|
262
|
-
if (rows.length <= 1) return rows;
|
|
263
|
-
const firstRow = rows[0];
|
|
264
|
-
if (firstRow === void 0) return [];
|
|
265
|
-
return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
|
|
266
|
-
}
|
|
267
|
-
function formatOrderInstalmentStatusLabel(input) {
|
|
268
|
-
switch (input.status) {
|
|
269
|
-
case "pending_initial_payment": return input.phaseKind === "initial" ? "Due today" : "Scheduled";
|
|
270
|
-
case "scheduled": return "Scheduled";
|
|
271
|
-
case "paid": return input.phaseKind === "initial" ? "Paid today" : "Paid";
|
|
272
|
-
case "failed": return "Payment failed";
|
|
273
|
-
case "waived": return "Waived";
|
|
274
|
-
case "cancelled": return "Cancelled";
|
|
275
|
-
case "cancelled_as_paid_early": return "Paid early";
|
|
276
|
-
case "refunded": return "Refunded";
|
|
277
|
-
default: return assertNever$2(input.status);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
281
|
-
const anchorDay = date.getUTCDate();
|
|
282
|
-
const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
|
|
283
|
-
const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
|
|
284
|
-
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
285
|
-
return nextMonth;
|
|
286
|
-
}
|
|
287
|
-
function assertNever$2(value) {
|
|
288
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
73
|
+
if (value !== parsed.value) return err({
|
|
74
|
+
kind: "non_canonical_identifier",
|
|
75
|
+
value,
|
|
76
|
+
canonical: parsed.value
|
|
77
|
+
});
|
|
78
|
+
return parsed;
|
|
289
79
|
}
|
|
290
80
|
//#endregion
|
|
291
|
-
//#region ../core/src/
|
|
292
|
-
/**
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
81
|
+
//#region ../media-core/src/mediaIdentifierSchema.ts
|
|
82
|
+
/** Strict stored-reference admission delegates the canonical identifier decision. */
|
|
83
|
+
const mediaIdentifierSchema = z.string().transform((value, context) => {
|
|
84
|
+
const parsed = parseCanonicalMediaIdentifier(value);
|
|
85
|
+
if (parsed.ok) return parsed.value;
|
|
86
|
+
context.addIssue({
|
|
87
|
+
code: "custom",
|
|
88
|
+
message: "Expected a canonical media identifier"
|
|
89
|
+
});
|
|
90
|
+
return z.NEVER;
|
|
91
|
+
});
|
|
300
92
|
//#endregion
|
|
301
93
|
//#region ../media-core/src/mediaKinds.ts
|
|
302
94
|
const mediaTypeDiscriminants = [
|
|
@@ -308,6 +100,65 @@ const mediaTypeDiscriminants = [
|
|
|
308
100
|
"archive"
|
|
309
101
|
];
|
|
310
102
|
//#endregion
|
|
103
|
+
//#region ../media-core/src/renderableMediaAsset.ts
|
|
104
|
+
/** Shared identifier indexing for admitted site-scoped projections. */
|
|
105
|
+
function buildMediaIdentifierIndex(assets) {
|
|
106
|
+
const index = new Map(assets.map((asset) => [asset.identifier, asset]));
|
|
107
|
+
if (index.size !== assets.length) throw new Error("Duplicate media identifier in a site asset list");
|
|
108
|
+
return index;
|
|
109
|
+
}
|
|
110
|
+
/** Index already admitted projections, including runtime registration updates. */
|
|
111
|
+
function indexRenderableMediaAssets(assets) {
|
|
112
|
+
if (!assets.length) return void 0;
|
|
113
|
+
const byId = new Map(assets.map((asset) => [asset.id, asset]));
|
|
114
|
+
const byIdentifier = buildMediaIdentifierIndex(assets);
|
|
115
|
+
if (byId.size !== assets.length) throw new Error("Duplicate media asset identity in a site asset list");
|
|
116
|
+
return {
|
|
117
|
+
assets,
|
|
118
|
+
byId,
|
|
119
|
+
byIdentifier
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/** A portable reference never uses an incidental UUID, URL or storage snapshot for identity. */
|
|
123
|
+
function resolveManagedMediaReference(reference, index) {
|
|
124
|
+
const asset = index?.byIdentifier.get(reference.identifier);
|
|
125
|
+
return asset ? {
|
|
126
|
+
kind: "resolved",
|
|
127
|
+
reference,
|
|
128
|
+
asset
|
|
129
|
+
} : {
|
|
130
|
+
kind: "missing",
|
|
131
|
+
reference
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region ../media-core/src/renderableMediaAssetAdmission.ts
|
|
136
|
+
const mediaAssetIdSchema = z.string().transform((value, context) => {
|
|
137
|
+
const parsed = parseMediaAssetId(value);
|
|
138
|
+
if (parsed.ok) return parsed.value;
|
|
139
|
+
context.addIssue({
|
|
140
|
+
code: "custom",
|
|
141
|
+
message: "Expected a media asset ID"
|
|
142
|
+
});
|
|
143
|
+
return z.NEVER;
|
|
144
|
+
});
|
|
145
|
+
const nonemptyStorageValue = z.string().refine((value) => value.trim().length > 0);
|
|
146
|
+
const renderableMediaAssetSchema = z.object({
|
|
147
|
+
id: mediaAssetIdSchema,
|
|
148
|
+
identifier: mediaIdentifierSchema,
|
|
149
|
+
storageBucket: nonemptyStorageValue,
|
|
150
|
+
storagePath: nonemptyStorageValue,
|
|
151
|
+
mimeType: nonemptyStorageValue,
|
|
152
|
+
filename: z.string().optional(),
|
|
153
|
+
width: z.number().positive().nullable(),
|
|
154
|
+
height: z.number().positive().nullable()
|
|
155
|
+
});
|
|
156
|
+
/** Admission precedes the identifier-only runtime resolution decision. */
|
|
157
|
+
function buildRenderableMediaAssetIndex(assets) {
|
|
158
|
+
if (!assets?.length) return void 0;
|
|
159
|
+
return indexRenderableMediaAssets(assets.map((asset) => renderableMediaAssetSchema.parse(asset)));
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
311
162
|
//#region ../media-core/src/media.ts
|
|
312
163
|
const hotspotSchema = z.object({
|
|
313
164
|
x: z.number().min(0).max(1),
|
|
@@ -614,11 +465,33 @@ function relativeLuminance(r, g, b) {
|
|
|
614
465
|
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
615
466
|
return .2126 * R + .7152 * G + .0722 * B;
|
|
616
467
|
}
|
|
617
|
-
function
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
468
|
+
function preparePaletteColourIndex(palette) {
|
|
469
|
+
const colours = [.../* @__PURE__ */ new Set([
|
|
470
|
+
...Object.values(palette),
|
|
471
|
+
"#000000",
|
|
472
|
+
"#ffffff",
|
|
473
|
+
"#FFFFFF"
|
|
474
|
+
])];
|
|
475
|
+
return Object.freeze(Object.fromEntries(colours.flatMap(colourIndexEntry)));
|
|
476
|
+
}
|
|
477
|
+
/** An unused unsupported colour must not turn preparation into an eager validation failure. */
|
|
478
|
+
function colourIndexEntry(hex) {
|
|
479
|
+
try {
|
|
480
|
+
return [[hex, colourLuminance(hex)]];
|
|
481
|
+
} catch {
|
|
482
|
+
return [];
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function colourLuminance(hex) {
|
|
486
|
+
const { r, g, b } = hexToRgb(hex);
|
|
487
|
+
return relativeLuminance(r, g, b);
|
|
488
|
+
}
|
|
489
|
+
function indexedLuminance(hex, index) {
|
|
490
|
+
return (index && Object.prototype.hasOwnProperty.call(index, hex) ? index[hex] : void 0) ?? colourLuminance(hex);
|
|
491
|
+
}
|
|
492
|
+
function contrastRatio(hex1, hex2, index) {
|
|
493
|
+
const L1 = indexedLuminance(hex1, index);
|
|
494
|
+
const L2 = indexedLuminance(hex2, index);
|
|
622
495
|
const [hi, lo] = L1 >= L2 ? [L1, L2] : [L2, L1];
|
|
623
496
|
return (hi + .05) / (lo + .05);
|
|
624
497
|
}
|
|
@@ -1257,10 +1130,10 @@ function resolveOpaqueSurfaceHex(reference, palette, underlayReference) {
|
|
|
1257
1130
|
const parts = parseColorTokenParts(reference);
|
|
1258
1131
|
if (parts.kind === "token" && parts.opacityPercent !== null) {
|
|
1259
1132
|
const foregroundHex = normalizePaletteHex(palette[parts.token] ?? "");
|
|
1260
|
-
return foregroundHex ? compositeHex(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
|
|
1133
|
+
return foregroundHex ? compositeHex$1(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
|
|
1261
1134
|
}
|
|
1262
1135
|
const rgba = parseRgba(parts.kind === "raw" ? parts.value : reference);
|
|
1263
|
-
return rgba ? compositeHex(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
|
|
1136
|
+
return rgba ? compositeHex$1(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
|
|
1264
1137
|
}
|
|
1265
1138
|
/** Resolve a colour reference only when it is already fully opaque. */
|
|
1266
1139
|
function resolveConcreteColorHex(reference, palette) {
|
|
@@ -1276,7 +1149,7 @@ function resolveConcreteColorHex(reference, palette) {
|
|
|
1276
1149
|
if (literal.toLowerCase() === "white") return "#ffffff";
|
|
1277
1150
|
return normalizePaletteHex(literal);
|
|
1278
1151
|
}
|
|
1279
|
-
function compositeHex(foregroundHex, underlayHex, alpha) {
|
|
1152
|
+
function compositeHex$1(foregroundHex, underlayHex, alpha) {
|
|
1280
1153
|
const foreground = hexToRgb(foregroundHex);
|
|
1281
1154
|
const underlay = hexToRgb(underlayHex);
|
|
1282
1155
|
const channel = (foregroundValue, underlayValue) => Math.round(foregroundValue * alpha + underlayValue * (1 - alpha));
|
|
@@ -1587,8 +1460,8 @@ function expandBasePalette(palette) {
|
|
|
1587
1460
|
function deriveSurfaceDecorationColors(ground, text, accent) {
|
|
1588
1461
|
const ink = getTextColorForBackground(ground);
|
|
1589
1462
|
return {
|
|
1590
|
-
line: firstContrastBlend(ground, text, ground, 1.5),
|
|
1591
|
-
mark: firstContrastBlend(accent, ink, ground, 3)
|
|
1463
|
+
line: firstContrastBlend$1(ground, text, ground, 1.5),
|
|
1464
|
+
mark: firstContrastBlend$1(accent, ink, ground, 3)
|
|
1592
1465
|
};
|
|
1593
1466
|
}
|
|
1594
1467
|
/** Secondary ink is blended toward its ground, with an ordinary-text contrast floor. */
|
|
@@ -1604,7 +1477,7 @@ function firstSafeMutedSample(sample, ground, low, high) {
|
|
|
1604
1477
|
const middle = Math.floor((low + high) / 2);
|
|
1605
1478
|
return contrastRatio(sample(middle), ground) >= 4.5 ? firstSafeMutedSample(sample, ground, low, middle) : firstSafeMutedSample(sample, ground, middle + 1, high);
|
|
1606
1479
|
}
|
|
1607
|
-
function firstContrastBlend(from, to, ground, threshold) {
|
|
1480
|
+
function firstContrastBlend$1(from, to, ground, threshold) {
|
|
1608
1481
|
const start = hexToRgb(from);
|
|
1609
1482
|
const end = hexToRgb(to);
|
|
1610
1483
|
return Array.from({ length: 101 }, (_, index) => {
|
|
@@ -1805,6 +1678,20 @@ function selectLogoVariant(tone, variants) {
|
|
|
1805
1678
|
return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
|
|
1806
1679
|
}
|
|
1807
1680
|
//#endregion
|
|
1681
|
+
//#region ../theme-core/src/site-styles/ownedThemeSnapshot.ts
|
|
1682
|
+
/** Copy before freezing: the editor still owns its source data. */
|
|
1683
|
+
function ownedThemeSnapshot(input) {
|
|
1684
|
+
return freezeOwnedThemeValue(structuredClone(input));
|
|
1685
|
+
}
|
|
1686
|
+
/** Only freshly owned data belongs here; no caller-owned object is frozen. */
|
|
1687
|
+
function freezeOwnedThemeValue(value) {
|
|
1688
|
+
if (typeof value === "object" && value !== null) {
|
|
1689
|
+
Object.values(value).forEach(freezeOwnedThemeValue);
|
|
1690
|
+
Object.freeze(value);
|
|
1691
|
+
}
|
|
1692
|
+
return value;
|
|
1693
|
+
}
|
|
1694
|
+
//#endregion
|
|
1808
1695
|
//#region ../theme-core/src/buttons/typography.ts
|
|
1809
1696
|
const textTransformSchema = z.enum([
|
|
1810
1697
|
"none",
|
|
@@ -2287,6 +2174,7 @@ function defineButtonStyleRecipe(recipe) {
|
|
|
2287
2174
|
}
|
|
2288
2175
|
function mapButtonVisualAppearances(states, transform) {
|
|
2289
2176
|
return {
|
|
2177
|
+
...states,
|
|
2290
2178
|
base: transform(states.base, "base"),
|
|
2291
2179
|
hover: transform(states.hover, "hover"),
|
|
2292
2180
|
focus: transform(states.focus, "focus"),
|
|
@@ -3105,7 +2993,7 @@ function formatButtonColourContractError(error) {
|
|
|
3105
2993
|
}
|
|
3106
2994
|
}
|
|
3107
2995
|
function validateButtonSurfaceContrast(input) {
|
|
3108
|
-
const ratio = contrastRatio(input.buttonPaint, input.surfaceHex);
|
|
2996
|
+
const ratio = contrastRatio(input.buttonPaint, input.surfaceHex, input.colourIndex);
|
|
3109
2997
|
return ratio >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio ? { ok: true } : {
|
|
3110
2998
|
ok: false,
|
|
3111
2999
|
error: {
|
|
@@ -3120,7 +3008,7 @@ function validateButtonSurfaceContrast(input) {
|
|
|
3120
3008
|
};
|
|
3121
3009
|
}
|
|
3122
3010
|
function validateButtonTextContrast(input) {
|
|
3123
|
-
const ratio = contrastRatio(input.backgroundHex, input.foregroundHex);
|
|
3011
|
+
const ratio = contrastRatio(input.backgroundHex, input.foregroundHex, input.colourIndex);
|
|
3124
3012
|
return ratio >= BUTTON_CONTRAST_POLICY.textMinimumRatio ? { ok: true } : {
|
|
3125
3013
|
ok: false,
|
|
3126
3014
|
error: {
|
|
@@ -3142,7 +3030,7 @@ function solidForegroundToken(backgroundToken) {
|
|
|
3142
3030
|
//#region ../theme-core/src/buttons/contextualHover.ts
|
|
3143
3031
|
function resolveContextualHoverPreference(input) {
|
|
3144
3032
|
const preferred = input.instruction.preferredToken;
|
|
3145
|
-
if (preferred && isSafeCandidate(preferred, input.palette, input.surface)) return {
|
|
3033
|
+
if (preferred && isSafeCandidate(preferred, input.palette, input.surface, input.colourIndex)) return {
|
|
3146
3034
|
kind: "resolved",
|
|
3147
3035
|
token: preferred,
|
|
3148
3036
|
repair: null
|
|
@@ -3170,7 +3058,7 @@ function resolveContextualHover(input) {
|
|
|
3170
3058
|
kind: "unavailable",
|
|
3171
3059
|
reason: "no-distinct-shade"
|
|
3172
3060
|
};
|
|
3173
|
-
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette));
|
|
3061
|
+
const textSafe = candidates.filter((candidate) => hasSafeTextContrast(candidate.token, input.palette, input.colourIndex));
|
|
3174
3062
|
if (textSafe.length === 0) return {
|
|
3175
3063
|
kind: "unavailable",
|
|
3176
3064
|
reason: "no-text-safe-candidate"
|
|
@@ -3187,17 +3075,12 @@ function resolveContextualHover(input) {
|
|
|
3187
3075
|
reason: "no-text-safe-candidate"
|
|
3188
3076
|
};
|
|
3189
3077
|
}
|
|
3190
|
-
const selected = textSafe
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
3197
|
-
if (contrastDifference !== 0) return contrastDifference;
|
|
3198
|
-
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
3199
|
-
return left.direction === input.instruction.fallbackDirection ? -1 : 1;
|
|
3200
|
-
})[0];
|
|
3078
|
+
const selected = selectSurfaceSafeHover(textSafe, {
|
|
3079
|
+
palette: input.palette,
|
|
3080
|
+
surface: input.surface,
|
|
3081
|
+
colourIndex: input.colourIndex,
|
|
3082
|
+
fallbackDirection: input.instruction.fallbackDirection
|
|
3083
|
+
});
|
|
3201
3084
|
return selected ? {
|
|
3202
3085
|
kind: "resolved",
|
|
3203
3086
|
token: selected.token,
|
|
@@ -3208,6 +3091,20 @@ function resolveContextualHover(input) {
|
|
|
3208
3091
|
reason: "no-surface-safe-candidate"
|
|
3209
3092
|
};
|
|
3210
3093
|
}
|
|
3094
|
+
/** Rank the proven-surface candidates without mixing selection with fallback policy. */
|
|
3095
|
+
function selectSurfaceSafeHover(candidates, input) {
|
|
3096
|
+
return candidates.map((candidate) => ({
|
|
3097
|
+
...candidate,
|
|
3098
|
+
surfaceContrast: contrastRatio(input.palette[candidate.token] ?? "", input.surface.backgroundHex, input.colourIndex)
|
|
3099
|
+
})).filter((candidate) => candidate.surfaceContrast !== null && candidate.surfaceContrast >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio).sort((left, right) => {
|
|
3100
|
+
const distanceDifference = left.distance - right.distance;
|
|
3101
|
+
if (distanceDifference !== 0) return distanceDifference;
|
|
3102
|
+
const contrastDifference = (right.surfaceContrast ?? 0) - (left.surfaceContrast ?? 0);
|
|
3103
|
+
if (contrastDifference !== 0) return contrastDifference;
|
|
3104
|
+
if (left.direction === right.direction) return left.token.localeCompare(right.token);
|
|
3105
|
+
return left.direction === input.fallbackDirection ? -1 : 1;
|
|
3106
|
+
})[0];
|
|
3107
|
+
}
|
|
3211
3108
|
function shadeCandidates(seedToken, palette) {
|
|
3212
3109
|
const match = String(seedToken).match(/^(.*?)(?:-(\d{2,3}))?$/);
|
|
3213
3110
|
const family = match?.[1] ?? String(seedToken);
|
|
@@ -3233,14 +3130,14 @@ function candidate(family, shade, currentShade, direction, seedHex, palette) {
|
|
|
3233
3130
|
surfaceContrast: null
|
|
3234
3131
|
};
|
|
3235
3132
|
}
|
|
3236
|
-
function hasSafeTextContrast(token, palette) {
|
|
3133
|
+
function hasSafeTextContrast(token, palette, colourIndex) {
|
|
3237
3134
|
const background = palette[token];
|
|
3238
3135
|
const foreground = palette[solidForegroundToken(token)];
|
|
3239
|
-
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
3136
|
+
return typeof background === "string" && typeof foreground === "string" && contrastRatio(background, foreground, colourIndex) >= BUTTON_CONTRAST_POLICY.textMinimumRatio;
|
|
3240
3137
|
}
|
|
3241
|
-
function isSafeCandidate(token, palette, surface) {
|
|
3242
|
-
if (!hasSafeTextContrast(token, palette)) return false;
|
|
3243
|
-
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
3138
|
+
function isSafeCandidate(token, palette, surface, colourIndex) {
|
|
3139
|
+
if (!hasSafeTextContrast(token, palette, colourIndex)) return false;
|
|
3140
|
+
return surface ? contrastRatio(palette[token] ?? "", surface.backgroundHex, colourIndex) >= BUTTON_CONTRAST_POLICY.nonTextMinimumRatio : true;
|
|
3244
3141
|
}
|
|
3245
3142
|
function escapeRegExp(value) {
|
|
3246
3143
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -3252,6 +3149,7 @@ function resolveButtonHoverTreatment(input) {
|
|
|
3252
3149
|
const contextual = resolveContextualHoverPreference({
|
|
3253
3150
|
instruction: input.variant.contextualHover,
|
|
3254
3151
|
palette: input.palette,
|
|
3152
|
+
colourIndex: input.colourIndex,
|
|
3255
3153
|
surface: input.surface
|
|
3256
3154
|
});
|
|
3257
3155
|
if (contextual.kind === "resolved") return {
|
|
@@ -3303,7 +3201,8 @@ function compileButtonColourStates(input) {
|
|
|
3303
3201
|
global: input.global,
|
|
3304
3202
|
fallback: base.treatment,
|
|
3305
3203
|
palette: input.palette,
|
|
3306
|
-
surface: input.surface
|
|
3204
|
+
surface: input.surface,
|
|
3205
|
+
colourIndex: input.colourIndex
|
|
3307
3206
|
});
|
|
3308
3207
|
const edge = buttonEdge(input.variant);
|
|
3309
3208
|
const colours = collectStateColours(mapVisualStates((state) => compileVisualState(input, state, state === "hover" ? hover.treatment : base.treatment, edge, base.nonColourEffects)));
|
|
@@ -3361,6 +3260,7 @@ function compileDeclaredVisualState(input, states, state, treatment) {
|
|
|
3361
3260
|
treatment: transition.treatment,
|
|
3362
3261
|
palette: input.palette,
|
|
3363
3262
|
surface: input.surface,
|
|
3263
|
+
colourIndex: input.colourIndex,
|
|
3364
3264
|
edge
|
|
3365
3265
|
});
|
|
3366
3266
|
return resolved.ok ? {
|
|
@@ -3387,6 +3287,7 @@ function compileVisualState(input, state, treatment, edge, baseEffects) {
|
|
|
3387
3287
|
treatment: transition.treatment,
|
|
3388
3288
|
palette: input.palette,
|
|
3389
3289
|
surface: input.surface,
|
|
3290
|
+
colourIndex: input.colourIndex,
|
|
3390
3291
|
edge
|
|
3391
3292
|
});
|
|
3392
3293
|
return resolved.ok ? {
|
|
@@ -3605,11 +3506,11 @@ function interpolateHex(startHex, endHex, position) {
|
|
|
3605
3506
|
* Derive only what the rendered section can honestly prove about its backing.
|
|
3606
3507
|
* Images, gradients, alpha/composite layers and arbitrary CSS remain unknown.
|
|
3607
3508
|
*/
|
|
3608
|
-
function deriveButtonSurfaceContext(input, palette, fallbackToken) {
|
|
3509
|
+
function deriveButtonSurfaceContext(input, palette, fallbackToken, colourIndex) {
|
|
3609
3510
|
const background = deriveKnownBackground(input, palette, fallbackToken);
|
|
3610
3511
|
if (background.kind === "unknown") return background;
|
|
3611
3512
|
const explicitForeground = resolveKnownColour(input.kind === "solid" || input.kind === "inherit" ? input.foreground ?? "" : "", palette);
|
|
3612
|
-
const foreground = explicitForeground && contrastRatio(background.colour.hex, explicitForeground.hex) >= 4.5 ? explicitForeground : safestBlackOrWhite(background.colour.hex);
|
|
3513
|
+
const foreground = explicitForeground && contrastRatio(background.colour.hex, explicitForeground.hex, colourIndex) >= 4.5 ? explicitForeground : safestBlackOrWhite(background.colour.hex, colourIndex);
|
|
3613
3514
|
return {
|
|
3614
3515
|
kind: "known-solid",
|
|
3615
3516
|
source: background.source,
|
|
@@ -3692,7 +3593,7 @@ function resolveSurfaceButtonContext(input) {
|
|
|
3692
3593
|
kind: "inherit",
|
|
3693
3594
|
styles: {}
|
|
3694
3595
|
};
|
|
3695
|
-
const context = deriveButtonSurfaceContext(input.surface, input.palette, input.fallbackToken);
|
|
3596
|
+
const context = deriveButtonSurfaceContext(input.surface, input.palette, input.fallbackToken, input.colourIndex);
|
|
3696
3597
|
if (context.kind !== "known-solid") return context.reason === "missing-background" ? {
|
|
3697
3598
|
kind: "inherit",
|
|
3698
3599
|
styles: {}
|
|
@@ -3700,23 +3601,42 @@ function resolveSurfaceButtonContext(input) {
|
|
|
3700
3601
|
kind: "reset",
|
|
3701
3602
|
styles: contextualButtonSurfaceResetStyles()
|
|
3702
3603
|
};
|
|
3703
|
-
return {
|
|
3704
|
-
|
|
3705
|
-
styles: knownSurfaceButtonContextStyles({
|
|
3706
|
-
surface: context.surface,
|
|
3707
|
-
palette: input.palette,
|
|
3708
|
-
buttonSystem: surfaceButtonSystem(input.buttonSystem, input.primaryToken)
|
|
3709
|
-
})
|
|
3710
|
-
};
|
|
3711
|
-
}
|
|
3712
|
-
/** Every role's contextual styles against one proven solid surface. */
|
|
3713
|
-
function knownSurfaceButtonContextStyles(input) {
|
|
3714
|
-
return Object.fromEntries(VARIANT_ROLES.flatMap((role) => Object.entries(contextualButtonSurfaceStyles(resolveContextualButtonRole({
|
|
3715
|
-
role,
|
|
3716
|
-
buttonSystem: input.buttonSystem,
|
|
3604
|
+
return knownSurfaceButtonContext({
|
|
3605
|
+
surface: context.surface,
|
|
3717
3606
|
palette: input.palette,
|
|
3718
|
-
|
|
3719
|
-
|
|
3607
|
+
colourIndex: input.colourIndex,
|
|
3608
|
+
buttonSystem: surfaceButtonSystem(input.buttonSystem, input.primaryToken)
|
|
3609
|
+
});
|
|
3610
|
+
}
|
|
3611
|
+
function knownSurfaceButtonContext(input) {
|
|
3612
|
+
const roles = freezeOwnedThemeValue({
|
|
3613
|
+
primary: resolveContextualButtonRole({
|
|
3614
|
+
...input,
|
|
3615
|
+
role: "primary"
|
|
3616
|
+
}),
|
|
3617
|
+
secondary: resolveContextualButtonRole({
|
|
3618
|
+
...input,
|
|
3619
|
+
role: "secondary"
|
|
3620
|
+
}),
|
|
3621
|
+
outline: resolveContextualButtonRole({
|
|
3622
|
+
...input,
|
|
3623
|
+
role: "outline"
|
|
3624
|
+
}),
|
|
3625
|
+
ghost: resolveContextualButtonRole({
|
|
3626
|
+
...input,
|
|
3627
|
+
role: "ghost"
|
|
3628
|
+
}),
|
|
3629
|
+
accent: resolveContextualButtonRole({
|
|
3630
|
+
...input,
|
|
3631
|
+
role: "accent"
|
|
3632
|
+
})
|
|
3633
|
+
});
|
|
3634
|
+
const styles = Object.fromEntries(VARIANT_ROLES.flatMap((role) => Object.entries(contextualButtonSurfaceStyles(roles[role]))));
|
|
3635
|
+
return Object.defineProperty({
|
|
3636
|
+
kind: "resolved",
|
|
3637
|
+
styles,
|
|
3638
|
+
roles
|
|
3639
|
+
}, "roles", { enumerable: false });
|
|
3720
3640
|
}
|
|
3721
3641
|
function resolveContextualButtonRole(input) {
|
|
3722
3642
|
const requested = findVariant(input.buttonSystem, input.role);
|
|
@@ -3725,57 +3645,57 @@ function resolveContextualButtonRole(input) {
|
|
|
3725
3645
|
requestedRole: input.role,
|
|
3726
3646
|
rejectedCandidates: []
|
|
3727
3647
|
};
|
|
3728
|
-
const
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
if (preferred.contextualHoverRepair) return {
|
|
3732
|
-
kind: "repaired",
|
|
3733
|
-
requestedRole: input.role,
|
|
3734
|
-
candidate: "contextual-hover",
|
|
3735
|
-
states: preferred.states,
|
|
3736
|
-
focusIndicator: preferred.focusIndicator,
|
|
3737
|
-
boundary: boundaryForVariant(requested),
|
|
3738
|
-
rejectedCandidates: []
|
|
3739
|
-
};
|
|
3740
|
-
return {
|
|
3741
|
-
kind: "preferred",
|
|
3742
|
-
requestedRole: input.role,
|
|
3743
|
-
states: preferred.states,
|
|
3744
|
-
focusIndicator: preferred.focusIndicator,
|
|
3745
|
-
boundary: boundaryForVariant(requested)
|
|
3746
|
-
};
|
|
3747
|
-
}
|
|
3748
|
-
rejected.push({
|
|
3648
|
+
const preferred = compileCandidate(requested, input);
|
|
3649
|
+
if (preferred.ok) return preferredButtonResolution(requested, preferred, input.role);
|
|
3650
|
+
return resolveFallbackButtonRole(input, requested, (input.buttonSystem.surfacePolicy ?? STANDARD_BUTTON_SURFACE_POLICY)[input.role], [{
|
|
3749
3651
|
candidate: "preferred",
|
|
3750
3652
|
error: preferred.error
|
|
3653
|
+
}]);
|
|
3654
|
+
}
|
|
3655
|
+
function preferredButtonResolution(requested, compiled, role) {
|
|
3656
|
+
const appearance = {
|
|
3657
|
+
requestedRole: role,
|
|
3658
|
+
states: compiled.states,
|
|
3659
|
+
focusIndicator: compiled.focusIndicator,
|
|
3660
|
+
boundary: boundaryForVariant(requested)
|
|
3661
|
+
};
|
|
3662
|
+
const boundaries = boundariesForVariant(requested);
|
|
3663
|
+
return compiled.contextualHoverRepair ? hideBoundaryEvidence({
|
|
3664
|
+
...appearance,
|
|
3665
|
+
boundaries,
|
|
3666
|
+
kind: "repaired",
|
|
3667
|
+
candidate: "contextual-hover",
|
|
3668
|
+
rejectedCandidates: []
|
|
3669
|
+
}) : hideBoundaryEvidence({
|
|
3670
|
+
...appearance,
|
|
3671
|
+
boundaries,
|
|
3672
|
+
kind: "preferred"
|
|
3751
3673
|
});
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
if (!compiled.ok) {
|
|
3758
|
-
rejected.push({
|
|
3759
|
-
candidate: candidate.name,
|
|
3760
|
-
error: compiled.error
|
|
3761
|
-
});
|
|
3762
|
-
continue;
|
|
3763
|
-
}
|
|
3764
|
-
return {
|
|
3765
|
-
kind: "repaired",
|
|
3766
|
-
requestedRole: input.role,
|
|
3767
|
-
candidate: candidate.name,
|
|
3768
|
-
states: candidate.name === "surface-outline" ? withSurfaceInversion(compiled.states, input.surface) : compiled.states,
|
|
3769
|
-
focusIndicator: compiled.focusIndicator,
|
|
3770
|
-
boundary: candidate.boundary,
|
|
3771
|
-
rejectedCandidates: rejected
|
|
3772
|
-
};
|
|
3773
|
-
}
|
|
3774
|
-
return {
|
|
3674
|
+
}
|
|
3675
|
+
/** Ordered, lazy fallback selection; the rejected evidence belongs to this decision. */
|
|
3676
|
+
function resolveFallbackButtonRole(input, requested, fallbacks, rejected) {
|
|
3677
|
+
const [fallback, ...remaining] = fallbacks;
|
|
3678
|
+
if (!fallback) return {
|
|
3775
3679
|
kind: "unresolved",
|
|
3776
3680
|
requestedRole: input.role,
|
|
3777
3681
|
rejectedCandidates: rejected
|
|
3778
3682
|
};
|
|
3683
|
+
const candidate = candidateVariant(fallback, requested, input.buttonSystem);
|
|
3684
|
+
if (!candidate) return resolveFallbackButtonRole(input, requested, remaining, rejected);
|
|
3685
|
+
const compiled = compileCandidate(candidate.variant, input);
|
|
3686
|
+
return compiled.ok ? hideBoundaryEvidence({
|
|
3687
|
+
kind: "repaired",
|
|
3688
|
+
requestedRole: input.role,
|
|
3689
|
+
candidate: candidate.name,
|
|
3690
|
+
boundaries: boundariesForVariant(candidate.variant),
|
|
3691
|
+
states: candidate.name === "surface-outline" ? withSurfaceInversion(compiled.states, input.surface) : compiled.states,
|
|
3692
|
+
focusIndicator: compiled.focusIndicator,
|
|
3693
|
+
boundary: candidate.boundary,
|
|
3694
|
+
rejectedCandidates: rejected
|
|
3695
|
+
}) : resolveFallbackButtonRole(input, requested, remaining, [...rejected, {
|
|
3696
|
+
candidate: candidate.name,
|
|
3697
|
+
error: compiled.error
|
|
3698
|
+
}]);
|
|
3779
3699
|
}
|
|
3780
3700
|
function contextualButtonSurfaceStyles(resolution) {
|
|
3781
3701
|
if (resolution.kind === "unresolved") return resetActionVariables(resolution.requestedRole);
|
|
@@ -3840,12 +3760,13 @@ function actionVariableFallback(role, state, property, fallback) {
|
|
|
3840
3760
|
function actionVariablePrefix(role, state) {
|
|
3841
3761
|
return `--rb-action-${role}-${state}`;
|
|
3842
3762
|
}
|
|
3843
|
-
function compileCandidate(variant,
|
|
3763
|
+
function compileCandidate(variant, context) {
|
|
3844
3764
|
return compileButtonColourStates({
|
|
3845
3765
|
variant,
|
|
3846
|
-
global:
|
|
3847
|
-
palette,
|
|
3848
|
-
surface
|
|
3766
|
+
global: context.buttonSystem.global,
|
|
3767
|
+
palette: context.palette,
|
|
3768
|
+
surface: context.surface,
|
|
3769
|
+
colourIndex: context.colourIndex
|
|
3849
3770
|
});
|
|
3850
3771
|
}
|
|
3851
3772
|
function candidateVariant(fallback, requested, system) {
|
|
@@ -3878,6 +3799,25 @@ function candidateVariant(fallback, requested, system) {
|
|
|
3878
3799
|
}
|
|
3879
3800
|
};
|
|
3880
3801
|
}
|
|
3802
|
+
function hideBoundaryEvidence(value) {
|
|
3803
|
+
return Object.defineProperty(value, "boundaries", { enumerable: false });
|
|
3804
|
+
}
|
|
3805
|
+
function boundariesForVariant(variant) {
|
|
3806
|
+
const boundary = (state) => {
|
|
3807
|
+
const appearance = variant.visualStates?.[state];
|
|
3808
|
+
return boundaryForVariant(appearance ? {
|
|
3809
|
+
...variant,
|
|
3810
|
+
border: appearance.border === "none" ? void 0 : appearance.border
|
|
3811
|
+
} : variant);
|
|
3812
|
+
};
|
|
3813
|
+
return freezeOwnedThemeValue({
|
|
3814
|
+
base: boundary("base"),
|
|
3815
|
+
hover: boundary("hover"),
|
|
3816
|
+
focus: boundary("focus"),
|
|
3817
|
+
active: boundary("active"),
|
|
3818
|
+
disabled: boundary("disabled")
|
|
3819
|
+
});
|
|
3820
|
+
}
|
|
3881
3821
|
function boundaryForVariant(variant) {
|
|
3882
3822
|
if (!variant.border) return null;
|
|
3883
3823
|
return {
|
|
@@ -3965,8 +3905,8 @@ function normalizeOpaqueHex(value) {
|
|
|
3965
3905
|
if (!match?.[1]) return null;
|
|
3966
3906
|
return `#${(match[1].length === 3 ? match[1].split("").map((digit) => `${digit}${digit}`).join("") : match[1]).toLowerCase()}`;
|
|
3967
3907
|
}
|
|
3968
|
-
function safestBlackOrWhite(backgroundHex) {
|
|
3969
|
-
return contrastRatio(backgroundHex, "#000000") >= contrastRatio(backgroundHex, "#ffffff") ? {
|
|
3908
|
+
function safestBlackOrWhite(backgroundHex, colourIndex) {
|
|
3909
|
+
return contrastRatio(backgroundHex, "#000000", colourIndex) >= contrastRatio(backgroundHex, "#ffffff", colourIndex) ? {
|
|
3970
3910
|
hex: "#000000",
|
|
3971
3911
|
css: "#000000",
|
|
3972
3912
|
source: "literal-css"
|
|
@@ -3990,49 +3930,62 @@ function contextualBoundaryStyles(boundary) {
|
|
|
3990
3930
|
};
|
|
3991
3931
|
}
|
|
3992
3932
|
//#endregion
|
|
3993
|
-
//#region ../theme-core/src/
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
*
|
|
4005
|
-
*
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
const
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
3933
|
+
//#region ../theme-core/src/palette/utils/scrimContrast.ts
|
|
3934
|
+
const WHITE = "#ffffff";
|
|
3935
|
+
const BLACK = "#000000";
|
|
3936
|
+
/** `top` at `alpha` over opaque `bottom`, blended as CSS paints an overlay. */
|
|
3937
|
+
function compositeHex(topHex, alpha, bottomHex) {
|
|
3938
|
+
const top = hexToRgb(topHex);
|
|
3939
|
+
const bottom = hexToRgb(bottomHex);
|
|
3940
|
+
const mix = (a, b) => Math.round(alpha * a + (1 - alpha) * b);
|
|
3941
|
+
return rgbToHex(mix(top.r, bottom.r), mix(top.g, bottom.g), mix(top.b, bottom.b));
|
|
3942
|
+
}
|
|
3943
|
+
/**
|
|
3944
|
+
* The lowest contrast `foreground` can reach over `scrim` at `alpha` laid on
|
|
3945
|
+
* any pixel. A foreground whose luminance falls inside the range the
|
|
3946
|
+
* composites can take has a worst case of 1:1.
|
|
3947
|
+
*/
|
|
3948
|
+
function worstCaseScrimContrast(input) {
|
|
3949
|
+
const overWhite = compositeHex(input.scrimHex, input.alpha, WHITE);
|
|
3950
|
+
const overBlack = compositeHex(input.scrimHex, input.alpha, BLACK);
|
|
3951
|
+
const luminance = (hex) => {
|
|
3952
|
+
const { r, g, b } = hexToRgb(hex);
|
|
3953
|
+
return relativeLuminance(r, g, b);
|
|
3954
|
+
};
|
|
3955
|
+
const foreground = luminance(input.foregroundHex);
|
|
3956
|
+
const low = luminance(overBlack);
|
|
3957
|
+
const high = luminance(overWhite);
|
|
3958
|
+
if (foreground >= low && foreground <= high) return 1;
|
|
3959
|
+
return Math.min(contrastRatio(input.foregroundHex, overWhite), contrastRatio(input.foregroundHex, overBlack));
|
|
3960
|
+
}
|
|
3961
|
+
/** Shared samples for literal RGB washes and palette-token gradient veils. */
|
|
3962
|
+
function gradientScrimSamples(gradient, alpha, palette) {
|
|
3963
|
+
const literal = [...gradient.matchAll(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/g)].map((stop) => ({
|
|
3964
|
+
hex: rgbToHex(Number(stop[1]), Number(stop[2]), Number(stop[3])),
|
|
3965
|
+
alpha: alpha * (stop[4] === void 0 ? 1 : Number(stop[4]))
|
|
3966
|
+
}));
|
|
3967
|
+
const tokens = [...gradient.matchAll(/var\(--tb-([\w-]+)\)/g)].flatMap((stop) => {
|
|
3968
|
+
const hex = stop[1] ? resolveConcreteColorHex(stop[1], palette) : null;
|
|
3969
|
+
return hex ? [{
|
|
3970
|
+
hex,
|
|
3971
|
+
alpha
|
|
3972
|
+
}] : [];
|
|
3973
|
+
});
|
|
3974
|
+
return [...literal, ...tokens];
|
|
3975
|
+
}
|
|
3976
|
+
/** The ink with the stronger worst-pixel guarantee identifies the veil tone.
|
|
3977
|
+
* No readable samples (or a tie) leaves classification to the foreground owner.
|
|
3978
|
+
*/
|
|
3979
|
+
function scrimTone(samples) {
|
|
3980
|
+
if (samples.length === 0) return null;
|
|
3981
|
+
const worst = (foregroundHex) => Math.min(...samples.map((sample) => worstCaseScrimContrast({
|
|
3982
|
+
foregroundHex,
|
|
3983
|
+
scrimHex: sample.hex,
|
|
3984
|
+
alpha: sample.alpha
|
|
3985
|
+
})));
|
|
3986
|
+
const white = worst(WHITE);
|
|
3987
|
+
const black = worst(BLACK);
|
|
3988
|
+
return white === black ? null : white > black ? "dark" : "light";
|
|
4036
3989
|
}
|
|
4037
3990
|
//#endregion
|
|
4038
3991
|
//#region ../theme-core/src/site-styles/accessibleSurfaces.ts
|
|
@@ -4382,9 +4335,84 @@ function terminalFallbackSurface(input) {
|
|
|
4382
4335
|
rejectedCandidates: input.rejectedCandidates
|
|
4383
4336
|
};
|
|
4384
4337
|
}
|
|
4338
|
+
const resolvedSurfaceBrand = Symbol("ResolvedSurface");
|
|
4339
|
+
const surfaceOwners = /* @__PURE__ */ new WeakSet();
|
|
4340
|
+
const preparedIndexOwners = /* @__PURE__ */ new WeakSet();
|
|
4341
|
+
const surfaceTransports = /* @__PURE__ */ new WeakMap();
|
|
4342
|
+
const ownedRevisionInputs = /* @__PURE__ */ new WeakMap();
|
|
4343
|
+
const revisionOwners = /* @__PURE__ */ new WeakMap();
|
|
4344
|
+
const surfaceRevisionOwners = /* @__PURE__ */ new WeakMap();
|
|
4345
|
+
const surfaceTextPolicy = Object.freeze({
|
|
4346
|
+
heading: "large-text-aa",
|
|
4347
|
+
text: "body-aa",
|
|
4348
|
+
link: "body-aa",
|
|
4349
|
+
linkHover: "body-aa",
|
|
4350
|
+
supporting: "body-aa",
|
|
4351
|
+
muted: "body-aa"
|
|
4352
|
+
});
|
|
4353
|
+
function ownSurfaceRevision(context) {
|
|
4354
|
+
if (!ownedRevisionInputs.get(context.palette)?.has(context.buttonSystem)) {
|
|
4355
|
+
const revision = ownedThemeSnapshot({
|
|
4356
|
+
palette: context.palette,
|
|
4357
|
+
buttonSystem: context.buttonSystem
|
|
4358
|
+
});
|
|
4359
|
+
registerOwnedRevisionInputs(revision);
|
|
4360
|
+
surfaceRevisionOwners.set(revision, revision);
|
|
4361
|
+
revisionOwners.set(revision.palette, /* @__PURE__ */ new Map([[revision.buttonSystem, revision]]));
|
|
4362
|
+
return revision;
|
|
4363
|
+
}
|
|
4364
|
+
const revisions = revisionOwners.get(context.palette) ?? /* @__PURE__ */ new Map();
|
|
4365
|
+
const existing = revisions.get(context.buttonSystem);
|
|
4366
|
+
if (existing) return existing;
|
|
4367
|
+
const revision = Object.freeze({
|
|
4368
|
+
palette: context.palette,
|
|
4369
|
+
buttonSystem: context.buttonSystem
|
|
4370
|
+
});
|
|
4371
|
+
surfaceRevisionOwners.set(revision, revision);
|
|
4372
|
+
revisions.set(context.buttonSystem, revision);
|
|
4373
|
+
revisionOwners.set(context.palette, revisions);
|
|
4374
|
+
return revision;
|
|
4375
|
+
}
|
|
4376
|
+
/** Called only after copying and recursively freezing owner inputs. */
|
|
4377
|
+
function registerOwnedRevisionInputs(context) {
|
|
4378
|
+
const buttons = ownedRevisionInputs.get(context.palette) ?? /* @__PURE__ */ new Set();
|
|
4379
|
+
buttons.add(context.buttonSystem);
|
|
4380
|
+
ownedRevisionInputs.set(context.palette, buttons);
|
|
4381
|
+
}
|
|
4382
|
+
function isResolvedSurface(value) {
|
|
4383
|
+
return typeof value === "object" && value !== null && surfaceOwners.has(value) && "kind" in value && (value.kind === "owned" || value.kind === "inherit");
|
|
4384
|
+
}
|
|
4385
|
+
/** Opaque immutable surface/context values have no child DTOs to project. */
|
|
4386
|
+
function isSurfaceTransportLeaf(value) {
|
|
4387
|
+
return isResolvedSurface(value) || isSurfaceTreeRecord(value) && surfaceRevisionOwners.has(value);
|
|
4388
|
+
}
|
|
4389
|
+
/** Runtime serializers reject copies and forged structural objects, too. */
|
|
4390
|
+
function requireResolvedSurface(value) {
|
|
4391
|
+
if (!isResolvedSurface(value)) throw new Error("Surface must be produced by resolveSurface");
|
|
4392
|
+
}
|
|
4385
4393
|
function resolveSurface(spec, context) {
|
|
4394
|
+
return spec.kind === "section" ? resolveSectionSurface(spec.background, context) : preparedSurfaceValue(spec, context) ?? certifySurface(spec, context);
|
|
4395
|
+
}
|
|
4396
|
+
function preparedSurfaceValue(spec, context) {
|
|
4397
|
+
const index = context.preparedSurfaces;
|
|
4398
|
+
if (!index || !preparedIndexOwners.has(index) || index.palette !== context.palette || index.buttonSystem !== context.buttonSystem || index.colourIndex !== context.colourIndex) return void 0;
|
|
4399
|
+
return index.values[surfaceResolutionKey(spec, context)];
|
|
4400
|
+
}
|
|
4401
|
+
function surfaceResolutionKey(spec, context) {
|
|
4402
|
+
const declaration = spec.kind === "tint" ? {
|
|
4403
|
+
...spec,
|
|
4404
|
+
opacity: String(spec.opacity)
|
|
4405
|
+
} : spec;
|
|
4406
|
+
return JSON.stringify([
|
|
4407
|
+
declaration,
|
|
4408
|
+
context.linkHoverToken,
|
|
4409
|
+
context.foreground,
|
|
4410
|
+
context.compositeBase,
|
|
4411
|
+
context.buttonContext
|
|
4412
|
+
]);
|
|
4413
|
+
}
|
|
4414
|
+
function resolveSurfaceSpec(spec, context) {
|
|
4386
4415
|
switch (spec.kind) {
|
|
4387
|
-
case "section": return resolveSectionSurface(spec.background, context);
|
|
4388
4416
|
case "recipe": return resolveRecipeSurface(spec.intent, context);
|
|
4389
4417
|
case "paint": return spec.paint.kind === "transparent" ? { kind: "inherit" } : resolveOwnedSurface(spec.paint, context);
|
|
4390
4418
|
case "token": return resolveOwnedSurface({
|
|
@@ -4455,7 +4483,7 @@ function resolveOwnedSurface(paint, context) {
|
|
|
4455
4483
|
}, context.palette, {
|
|
4456
4484
|
linkHover: context.linkHoverToken,
|
|
4457
4485
|
...context.foreground
|
|
4458
|
-
});
|
|
4486
|
+
}, { compositeBase: context.compositeBase });
|
|
4459
4487
|
return {
|
|
4460
4488
|
kind: "owned",
|
|
4461
4489
|
paint,
|
|
@@ -4463,7 +4491,7 @@ function resolveOwnedSurface(paint, context) {
|
|
|
4463
4491
|
decorations: surfaceDecorationColors(resolved, context.palette),
|
|
4464
4492
|
hoverDecoration: resolved.kind === "known" ? resolved.hoverDecoration : "underline",
|
|
4465
4493
|
buttonContext: resolveSurfaceButtons(paint, resolved, context),
|
|
4466
|
-
contrast: surfaceContrast(resolved, context.palette)
|
|
4494
|
+
contrast: surfaceContrast(resolved, context.palette, context.colourIndex)
|
|
4467
4495
|
};
|
|
4468
4496
|
}
|
|
4469
4497
|
/** Unprovable legacy paint retains its declared foreground instead of inventing one. */
|
|
@@ -4488,15 +4516,17 @@ function resolveSurfaceButtons(paint, foreground, context) {
|
|
|
4488
4516
|
foreground: foreground.kind === "known" ? foreground.roles.link : void 0
|
|
4489
4517
|
} : { kind: "gradient" },
|
|
4490
4518
|
palette: context.palette,
|
|
4519
|
+
colourIndex: context.colourIndex,
|
|
4491
4520
|
buttonSystem: context.buttonSystem,
|
|
4521
|
+
fallbackToken: context.compositeBase,
|
|
4492
4522
|
primaryToken: context.buttonContext?.primary ?? (paint.kind === "solid" ? context.buttonSystem?.surfaceContexts?.[paint.token]?.primary : void 0),
|
|
4493
4523
|
withoutButtonSystem: "reset"
|
|
4494
4524
|
});
|
|
4495
4525
|
}
|
|
4496
|
-
function surfaceContrast(foreground, palette) {
|
|
4526
|
+
function surfaceContrast(foreground, palette, colourIndex) {
|
|
4497
4527
|
if (foreground.kind !== "known" || foreground.provenance.kind !== "measured") return { kind: "unmeasured" };
|
|
4498
4528
|
const backdrop = foreground.provenance.backdropHex;
|
|
4499
|
-
const ratio = (token) => contrastRatio(resolveConcreteColorHex(token, palette) ?? backdrop, backdrop);
|
|
4529
|
+
const ratio = (token) => contrastRatio(resolveConcreteColorHex(token, palette) ?? backdrop, backdrop, colourIndex);
|
|
4500
4530
|
return {
|
|
4501
4531
|
kind: "measured",
|
|
4502
4532
|
ratios: {
|
|
@@ -4515,23 +4545,35 @@ function resolveSectionSurface(background, context) {
|
|
|
4515
4545
|
linkHover: context.linkHoverToken,
|
|
4516
4546
|
...context.foreground
|
|
4517
4547
|
}, { compositeBase: context.compositeBase });
|
|
4518
|
-
|
|
4548
|
+
const surface = background === null ? { kind: "inherit" } : background.type === "color" ? {
|
|
4549
|
+
kind: "solid",
|
|
4550
|
+
color: background.color,
|
|
4551
|
+
composited: false,
|
|
4552
|
+
foreground: foreground.kind === "known" ? foreground.roles.link : void 0
|
|
4553
|
+
} : background.type === "gradient" ? { kind: "gradient" } : { kind: "image" };
|
|
4554
|
+
const revision = ownSurfaceRevision(context);
|
|
4555
|
+
const result = {
|
|
4519
4556
|
kind: "section",
|
|
4520
4557
|
foreground,
|
|
4521
4558
|
buttonStyles: resolveSurfaceButtonContext({
|
|
4522
|
-
surface
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
composited: false,
|
|
4526
|
-
foreground: foreground.kind === "known" ? foreground.roles.link : void 0
|
|
4527
|
-
} : background.type === "gradient" ? { kind: "gradient" } : { kind: "image" },
|
|
4528
|
-
palette: context.palette,
|
|
4529
|
-
buttonSystem: context.buttonSystem,
|
|
4559
|
+
surface,
|
|
4560
|
+
palette: revision.palette,
|
|
4561
|
+
buttonSystem: revision.buttonSystem,
|
|
4530
4562
|
primaryToken: sectionPrimaryButtonToken(background, context),
|
|
4531
4563
|
fallbackToken: context.compositeBase,
|
|
4532
4564
|
withoutButtonSystem: "inherit"
|
|
4533
|
-
}).styles
|
|
4534
|
-
|
|
4565
|
+
}).styles,
|
|
4566
|
+
proof: sectionProof(background, foreground),
|
|
4567
|
+
revision,
|
|
4568
|
+
textPolicy: surfaceTextPolicy,
|
|
4569
|
+
[resolvedSurfaceBrand]: true
|
|
4570
|
+
};
|
|
4571
|
+
Object.defineProperties(result, {
|
|
4572
|
+
proof: { enumerable: false },
|
|
4573
|
+
revision: { enumerable: false },
|
|
4574
|
+
textPolicy: { enumerable: false }
|
|
4575
|
+
});
|
|
4576
|
+
return freezeOwnedThemeValue(result);
|
|
4535
4577
|
}
|
|
4536
4578
|
function sectionPrimaryButtonToken(background, context) {
|
|
4537
4579
|
if (background?.type !== "color" || typeof background.color !== "string") return void 0;
|
|
@@ -4545,10 +4587,11 @@ function surfaceDecorationColors(foreground, palette) {
|
|
|
4545
4587
|
}
|
|
4546
4588
|
/** Composite the declared palette tint before checking every foreground role. */
|
|
4547
4589
|
function resolveTintSurface(spec, context) {
|
|
4548
|
-
const base =
|
|
4549
|
-
kind: "
|
|
4590
|
+
const base = resolveSurface({
|
|
4591
|
+
kind: "token",
|
|
4550
4592
|
token: spec.base
|
|
4551
4593
|
}, context);
|
|
4594
|
+
if (base.kind !== "owned") throw new Error(`Cannot derive tint on ${spec.base}`);
|
|
4552
4595
|
const source = spec.source === "text" ? base.foreground.text : base.decorations?.mark;
|
|
4553
4596
|
const token = source ? resolveOpaqueSurfaceHex(`${source}/${spec.opacity}`, context.palette, spec.base) : null;
|
|
4554
4597
|
const hex = source ? resolveConcreteColorHex(source, context.palette) : null;
|
|
@@ -4561,34 +4604,642 @@ function resolveTintSurface(spec, context) {
|
|
|
4561
4604
|
...context,
|
|
4562
4605
|
foreground: base.foreground
|
|
4563
4606
|
});
|
|
4564
|
-
|
|
4607
|
+
if (spec.gradient !== "radial") return surface;
|
|
4608
|
+
assertTintSamples(surface, spec.base, context.palette);
|
|
4609
|
+
return {
|
|
4565
4610
|
...surface,
|
|
4566
4611
|
tintBase: spec.base
|
|
4567
|
-
}
|
|
4612
|
+
};
|
|
4613
|
+
}
|
|
4614
|
+
/** A sampled gradient may never borrow a proof for just its painted endpoint. */
|
|
4615
|
+
function assertTintSamples(surface, base, palette) {
|
|
4616
|
+
if (surface.paint.kind !== "solid") throw new Error("Tint must paint a solid endpoint");
|
|
4617
|
+
const paint = resolveOpaqueSurfaceHex(surface.paint.token, palette, base);
|
|
4618
|
+
const underlay = resolveOpaqueSurfaceHex(base, palette, "background");
|
|
4619
|
+
if (!paint || !underlay) throw new Error("Tint needs a measurable underlay");
|
|
4620
|
+
const samples = [
|
|
4621
|
+
0,
|
|
4622
|
+
.25,
|
|
4623
|
+
.5,
|
|
4624
|
+
.75,
|
|
4625
|
+
1
|
|
4626
|
+
].map((alpha) => compositeHex(paint, alpha, underlay));
|
|
4627
|
+
Object.entries(surface.foreground).forEach(([role, token]) => {
|
|
4628
|
+
if (!samples.every((sample) => {
|
|
4629
|
+
const ink = resolveOpaqueSurfaceHex(token, palette, sample);
|
|
4630
|
+
return ink !== null && contrastRatio(ink, sample) >= (role === "heading" ? 3 : 4.5);
|
|
4631
|
+
})) throw new RangeError(`No checked tint gradient for ${role} on ${base}`);
|
|
4632
|
+
});
|
|
4568
4633
|
}
|
|
4569
4634
|
function hexToRgba(hex, alpha) {
|
|
4570
4635
|
const { r, g, b } = hexToRgb(hex);
|
|
4571
4636
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
4572
4637
|
}
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
}
|
|
4591
|
-
|
|
4638
|
+
const foregroundInputSchema = z.object({
|
|
4639
|
+
text: z.string().nullable().optional(),
|
|
4640
|
+
heading: z.string().nullable().optional(),
|
|
4641
|
+
link: z.string().nullable().optional(),
|
|
4642
|
+
linkHover: z.string().nullable().optional(),
|
|
4643
|
+
supporting: z.string().nullable().optional()
|
|
4644
|
+
});
|
|
4645
|
+
const paintInputSchema = z.discriminatedUnion("kind", [
|
|
4646
|
+
z.object({
|
|
4647
|
+
kind: z.literal("solid"),
|
|
4648
|
+
token: z.string(),
|
|
4649
|
+
foregroundToken: z.string().optional()
|
|
4650
|
+
}),
|
|
4651
|
+
z.object({
|
|
4652
|
+
kind: z.literal("gradient"),
|
|
4653
|
+
foregroundToken: z.string().optional()
|
|
4654
|
+
}),
|
|
4655
|
+
z.object({ kind: z.literal("transparent") })
|
|
4656
|
+
]);
|
|
4657
|
+
const buttonInputSchema = z.object({ primary: opaqueButtonColourTokenSchema });
|
|
4658
|
+
const surfaceSpecSchema = z.discriminatedUnion("kind", [
|
|
4659
|
+
z.object({
|
|
4660
|
+
kind: z.literal("recipe"),
|
|
4661
|
+
intent: z.enum([
|
|
4662
|
+
"base",
|
|
4663
|
+
"muted-band",
|
|
4664
|
+
"accent-band",
|
|
4665
|
+
"brand-depth-band"
|
|
4666
|
+
])
|
|
4667
|
+
}),
|
|
4668
|
+
z.object({
|
|
4669
|
+
kind: z.literal("paint"),
|
|
4670
|
+
paint: paintInputSchema
|
|
4671
|
+
}),
|
|
4672
|
+
z.object({
|
|
4673
|
+
kind: z.literal("token"),
|
|
4674
|
+
token: z.string(),
|
|
4675
|
+
foreground: foregroundInputSchema.optional(),
|
|
4676
|
+
buttonContext: buttonInputSchema.optional()
|
|
4677
|
+
}),
|
|
4678
|
+
z.object({
|
|
4679
|
+
kind: z.literal("tint"),
|
|
4680
|
+
base: z.string(),
|
|
4681
|
+
source: z.enum(["text", "mark"]),
|
|
4682
|
+
opacity: z.number().finite(),
|
|
4683
|
+
gradient: z.literal("radial").optional()
|
|
4684
|
+
})
|
|
4685
|
+
]);
|
|
4686
|
+
const surfaceTransportSchema = z.object({ $surface: z.object({
|
|
4687
|
+
spec: surfaceSpecSchema,
|
|
4688
|
+
context: z.object({
|
|
4689
|
+
palette: z.record(z.string(), z.string()),
|
|
4690
|
+
buttonSystem: buttonSystemSchema.optional(),
|
|
4691
|
+
foreground: foregroundInputSchema.optional(),
|
|
4692
|
+
linkHoverToken: z.string().optional(),
|
|
4693
|
+
compositeBase: z.string().optional(),
|
|
4694
|
+
buttonContext: buttonInputSchema.optional()
|
|
4695
|
+
})
|
|
4696
|
+
}) });
|
|
4697
|
+
/** Deserialised output is never evidence: parse the inputs and rerun their owner. */
|
|
4698
|
+
function parseResolvedSurface(value) {
|
|
4699
|
+
if (isResolvedSurface(value)) return value;
|
|
4700
|
+
const { spec, context } = surfaceTransportSchema.parse(value).$surface;
|
|
4701
|
+
return resolveSurface(spec, {
|
|
4702
|
+
...context,
|
|
4703
|
+
buttonSystem: context.buttonSystem
|
|
4704
|
+
});
|
|
4705
|
+
}
|
|
4706
|
+
/** Wire only the owner inputs; parsed CSS/results are recomputed, never trusted. */
|
|
4707
|
+
function serializeResolvedSurface(surface) {
|
|
4708
|
+
requireResolvedSurface(surface);
|
|
4709
|
+
const inputs = surfaceTransports.get(surface);
|
|
4710
|
+
if (!inputs) throw new Error("Missing surface inputs");
|
|
4711
|
+
return { $surface: inputs };
|
|
4712
|
+
}
|
|
4713
|
+
function certifySurface(spec, context) {
|
|
4714
|
+
const revision = ownSurfaceRevision(context);
|
|
4715
|
+
const inputs = {
|
|
4716
|
+
spec: ownedThemeSnapshot(spec),
|
|
4717
|
+
context: Object.freeze({
|
|
4718
|
+
...revision,
|
|
4719
|
+
...ownedThemeSnapshot({
|
|
4720
|
+
foreground: context.foreground,
|
|
4721
|
+
linkHoverToken: context.linkHoverToken,
|
|
4722
|
+
compositeBase: context.compositeBase,
|
|
4723
|
+
buttonContext: context.buttonContext
|
|
4724
|
+
})
|
|
4725
|
+
})
|
|
4726
|
+
};
|
|
4727
|
+
const decision = resolveSurfaceSpec(inputs.spec, inputs.context);
|
|
4728
|
+
const result = Object.assign(decision, {
|
|
4729
|
+
[resolvedSurfaceBrand]: true,
|
|
4730
|
+
proof: surfaceProof(decision, spec),
|
|
4731
|
+
revision,
|
|
4732
|
+
textPolicy: surfaceTextPolicy,
|
|
4733
|
+
$surface: inputs
|
|
4734
|
+
});
|
|
4735
|
+
Object.defineProperties(result, {
|
|
4736
|
+
proof: { enumerable: false },
|
|
4737
|
+
revision: { enumerable: false },
|
|
4738
|
+
textPolicy: { enumerable: false }
|
|
4739
|
+
});
|
|
4740
|
+
surfaceOwners.add(result);
|
|
4741
|
+
surfaceTransports.set(result, inputs);
|
|
4742
|
+
return freezeOwnedThemeValue(result);
|
|
4743
|
+
}
|
|
4744
|
+
function surfaceProof(decision, spec) {
|
|
4745
|
+
if (decision.kind === "inherit") return "inherit";
|
|
4746
|
+
if (decision.contrast.kind === "unmeasured") return "unproven-media";
|
|
4747
|
+
if (spec.kind === "tint") return spec.gradient === "radial" ? "checked-gradient-or-scrim" : "checked-composited";
|
|
4748
|
+
return decision.paint.kind === "solid" && /\/|rgba\(/.test(decision.paint.token) ? "checked-composited" : "checked-solid";
|
|
4749
|
+
}
|
|
4750
|
+
function sectionProof(background, foreground) {
|
|
4751
|
+
if (background === null) return "inherit";
|
|
4752
|
+
if (foreground.kind !== "known" || foreground.provenance.kind !== "measured") return "unproven-media";
|
|
4753
|
+
return /\/|rgba\(/.test(background.color ?? "") ? "checked-composited" : "checked-solid";
|
|
4754
|
+
}
|
|
4755
|
+
/** One theme revision per JSON envelope, shared by all nested Look slots. */
|
|
4756
|
+
function serializeSurfaceTree(value) {
|
|
4757
|
+
const revisions = [];
|
|
4758
|
+
const indices = /* @__PURE__ */ new Map();
|
|
4759
|
+
const revisionIndex = (revision) => {
|
|
4760
|
+
const index = indices.get(revision) ?? revisions.length;
|
|
4761
|
+
if (!indices.has(revision)) {
|
|
4762
|
+
indices.set(revision, index);
|
|
4763
|
+
revisions.push(revision);
|
|
4764
|
+
}
|
|
4765
|
+
return index;
|
|
4766
|
+
};
|
|
4767
|
+
const encode = (item) => {
|
|
4768
|
+
const revision = isSurfaceTreeRecord(item) ? surfaceRevisionOwners.get(item) : void 0;
|
|
4769
|
+
if (revision) return { $surfaceRevision: revisionIndex(revision) };
|
|
4770
|
+
if (isResolvedSurface(item)) {
|
|
4771
|
+
const input = serializeResolvedSurface(item).$surface;
|
|
4772
|
+
const index = revisionIndex(item.revision);
|
|
4773
|
+
const { palette: _palette, buttonSystem: _buttons, ...context } = input.context;
|
|
4774
|
+
return { $surface: {
|
|
4775
|
+
spec: input.spec,
|
|
4776
|
+
context,
|
|
4777
|
+
revision: index
|
|
4778
|
+
} };
|
|
4779
|
+
}
|
|
4780
|
+
return mapSurfaceTreeChildren(item, encode);
|
|
4781
|
+
};
|
|
4782
|
+
const encoded = encode(value);
|
|
4783
|
+
return revisions.length === 0 ? encoded : { $surfaceTransport: {
|
|
4784
|
+
revisions,
|
|
4785
|
+
value: encoded
|
|
4786
|
+
} };
|
|
4787
|
+
}
|
|
4788
|
+
const surfaceEnvelopeSchema = z.object({ $surfaceTransport: z.object({
|
|
4789
|
+
revisions: z.array(z.object({
|
|
4790
|
+
palette: z.record(z.string(), z.string()),
|
|
4791
|
+
buttonSystem: buttonSystemSchema.optional()
|
|
4792
|
+
})),
|
|
4793
|
+
value: z.unknown()
|
|
4794
|
+
}) });
|
|
4795
|
+
const surfaceReferenceSchema = z.object({ $surface: z.object({
|
|
4796
|
+
spec: surfaceSpecSchema,
|
|
4797
|
+
revision: z.number().int().nonnegative(),
|
|
4798
|
+
context: z.object({
|
|
4799
|
+
foreground: foregroundInputSchema.optional(),
|
|
4800
|
+
linkHoverToken: z.string().optional(),
|
|
4801
|
+
compositeBase: z.string().optional(),
|
|
4802
|
+
buttonContext: buttonInputSchema.optional()
|
|
4803
|
+
})
|
|
4804
|
+
}) });
|
|
4805
|
+
const surfaceRevisionReferenceSchema = z.object({ $surfaceRevision: z.number().int().nonnegative() });
|
|
4806
|
+
/** Recreate owner results before any island's ordinary schema consumes them. */
|
|
4807
|
+
function parseSurfaceTree(value) {
|
|
4808
|
+
if (isSurfaceTransportLeaf(value)) return value;
|
|
4809
|
+
if (!isSurfaceTreeRecord(value) || !("$surfaceTransport" in value)) return mapSurfaceTreeChildren(value, parseSurfaceTree);
|
|
4810
|
+
const envelope = surfaceEnvelopeSchema.parse(value).$surfaceTransport;
|
|
4811
|
+
const revisions = envelope.revisions.map((revision) => {
|
|
4812
|
+
const owned = ownedThemeSnapshot({
|
|
4813
|
+
palette: revision.palette,
|
|
4814
|
+
buttonSystem: revision.buttonSystem
|
|
4815
|
+
});
|
|
4816
|
+
registerOwnedRevisionInputs(owned);
|
|
4817
|
+
return ownSurfaceRevision(owned);
|
|
4818
|
+
});
|
|
4819
|
+
const decode = (item) => {
|
|
4820
|
+
if (isSurfaceTreeRecord(item) && "$surfaceRevision" in item) {
|
|
4821
|
+
const revision = revisions[surfaceRevisionReferenceSchema.parse(item).$surfaceRevision];
|
|
4822
|
+
if (!revision) throw new Error("Unknown surface revision");
|
|
4823
|
+
return revision;
|
|
4824
|
+
}
|
|
4825
|
+
if (isSurfaceTreeRecord(item) && "$surface" in item) {
|
|
4826
|
+
const request = surfaceReferenceSchema.parse(item).$surface;
|
|
4827
|
+
const revision = revisions[request.revision];
|
|
4828
|
+
if (!revision) throw new Error("Unknown surface revision");
|
|
4829
|
+
return resolveSurface(request.spec, {
|
|
4830
|
+
...revision,
|
|
4831
|
+
...request.context,
|
|
4832
|
+
buttonSystem: revision.buttonSystem
|
|
4833
|
+
});
|
|
4834
|
+
}
|
|
4835
|
+
return mapSurfaceTreeChildren(item, decode);
|
|
4836
|
+
};
|
|
4837
|
+
return decode(envelope.value);
|
|
4838
|
+
}
|
|
4839
|
+
function isSurfaceTreeRecord(value) {
|
|
4840
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4841
|
+
}
|
|
4842
|
+
function mapSurfaceTreeChildren(value, map) {
|
|
4843
|
+
if (Array.isArray(value)) return value.map(map);
|
|
4844
|
+
if (value instanceof Date) return value;
|
|
4845
|
+
return isSurfaceTreeRecord(value) ? Object.fromEntries(Object.entries(value).map(([key, item]) => [key, map(item)])) : value;
|
|
4846
|
+
}
|
|
4847
|
+
//#endregion
|
|
4848
|
+
//#region ../theme-core/src/surfaces/opaqueSurface.ts
|
|
4849
|
+
function opaqueSurfaceContextFromTheme(theme) {
|
|
4850
|
+
const palette = expandPalette(theme.palette);
|
|
4851
|
+
return {
|
|
4852
|
+
palette,
|
|
4853
|
+
colourIndex: preparePaletteColourIndex(palette),
|
|
4854
|
+
buttonSystem: theme.buttons,
|
|
4855
|
+
linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken
|
|
4856
|
+
};
|
|
4857
|
+
}
|
|
4858
|
+
/**
|
|
4859
|
+
* The declarations that make an element own its surface: `color`, every
|
|
4860
|
+
* `--rb-surface-*` role and every `--rb-action-*` variable. Card roles and
|
|
4861
|
+
* opaque block panels both publish through this, so a nested surface can never
|
|
4862
|
+
* inherit a band's light text or its band-resolved buttons.
|
|
4863
|
+
*/
|
|
4864
|
+
function opaqueSurfaceDeclarations(surface, arrangement = false) {
|
|
4865
|
+
requireResolvedSurface(surface);
|
|
4866
|
+
if (surface.kind === "inherit") return inheritedSurfaceDeclarations(arrangement);
|
|
4867
|
+
const foreground = surface.foreground;
|
|
4868
|
+
return [
|
|
4869
|
+
...surfaceForegroundDeclarations({
|
|
4870
|
+
text: colorValue(foreground.text),
|
|
4871
|
+
heading: colorValue(foreground.heading),
|
|
4872
|
+
link: colorValue(foreground.link),
|
|
4873
|
+
linkHover: colorValue(foreground.linkHover),
|
|
4874
|
+
supporting: colorValue(foreground.supporting),
|
|
4875
|
+
...arrangement ? { muted: colorValue(foreground.muted) } : {},
|
|
4876
|
+
hoverDecoration: surface.hoverDecoration
|
|
4877
|
+
}),
|
|
4878
|
+
...arrangement && surface.decorations !== void 0 ? [`${SURFACE_FOREGROUND_CSS_VARS.line}: ${surface.decorations.line};`, `${SURFACE_FOREGROUND_CSS_VARS.mark}: ${surface.decorations.mark};`] : [],
|
|
4879
|
+
...Object.entries(surface.buttonContext.styles).map(([property, value]) => `${property}: ${value};`)
|
|
4880
|
+
];
|
|
4881
|
+
}
|
|
4882
|
+
function colorValue(token) {
|
|
4883
|
+
const parsed = parseThemeColorToken(token);
|
|
4884
|
+
return parsed ? rgbColorValue(parsed) : token;
|
|
4885
|
+
}
|
|
4886
|
+
/** Every property a surface publishes, set to `inherit`. */
|
|
4887
|
+
function inheritedSurfaceDeclarations(arrangement) {
|
|
4888
|
+
return [
|
|
4889
|
+
"color",
|
|
4890
|
+
...Object.entries(SURFACE_FOREGROUND_CSS_VARS).filter(([role]) => arrangement || role !== "line" && role !== "mark" && role !== "muted").map(([, variable]) => variable),
|
|
4891
|
+
"--rb-surface-link-hover-decoration",
|
|
4892
|
+
...Object.keys(contextualButtonSurfaceResetStyles())
|
|
4893
|
+
].map((property) => `${property}: inherit;`);
|
|
4894
|
+
}
|
|
4895
|
+
//#endregion
|
|
4896
|
+
//#region ../theme-core/src/surfaces/mapDrawingTokens.ts
|
|
4897
|
+
/**
|
|
4898
|
+
* The one map token contract (issue 1611). Drawings carry semantic classes only;
|
|
4899
|
+
* these variables are the only colours a map receives. Each value is resolved
|
|
4900
|
+
* from the section ground the map sits on, so the same geometry reads on light,
|
|
4901
|
+
* brand and dark grounds without regeneration.
|
|
4902
|
+
*/
|
|
4903
|
+
const MAP_DRAWING_COLOUR_VARS = {
|
|
4904
|
+
land: "--map-land",
|
|
4905
|
+
water: "--map-water",
|
|
4906
|
+
park: "--map-park",
|
|
4907
|
+
building: "--map-building",
|
|
4908
|
+
buildingEdge: "--map-building-edge",
|
|
4909
|
+
road: "--map-road",
|
|
4910
|
+
roadCasing: "--map-road-casing",
|
|
4911
|
+
roadMajor: "--map-road-major",
|
|
4912
|
+
roadMajorCasing: "--map-road-major-casing",
|
|
4913
|
+
path: "--map-path",
|
|
4914
|
+
label: "--map-label",
|
|
4915
|
+
labelHalo: "--map-label-halo",
|
|
4916
|
+
pin: "--map-pin",
|
|
4917
|
+
pinEdge: "--map-pin-edge",
|
|
4918
|
+
frame: "--map-frame-color"
|
|
4919
|
+
};
|
|
4920
|
+
const MAP_DRAWING_SHAPE_VARS = {
|
|
4921
|
+
frameRadius: "--map-frame-radius",
|
|
4922
|
+
frameWidth: "--map-frame-width",
|
|
4923
|
+
frameShadow: "--map-frame-shadow",
|
|
4924
|
+
labelFont: "--map-label-font",
|
|
4925
|
+
labelWeight: "--map-label-weight",
|
|
4926
|
+
casingScale: "--map-casing-scale"
|
|
4927
|
+
};
|
|
4928
|
+
const defaultMapDrawingTreatment = {
|
|
4929
|
+
land: .035,
|
|
4930
|
+
water: {
|
|
4931
|
+
roles: [
|
|
4932
|
+
"primary",
|
|
4933
|
+
"accent",
|
|
4934
|
+
"secondary"
|
|
4935
|
+
],
|
|
4936
|
+
amount: .2
|
|
4937
|
+
},
|
|
4938
|
+
park: {
|
|
4939
|
+
roles: [
|
|
4940
|
+
"success",
|
|
4941
|
+
"secondary",
|
|
4942
|
+
"primary"
|
|
4943
|
+
],
|
|
4944
|
+
amount: .16
|
|
4945
|
+
},
|
|
4946
|
+
building: .09,
|
|
4947
|
+
buildingEdge: .17,
|
|
4948
|
+
roadLift: .7,
|
|
4949
|
+
casingSink: .2,
|
|
4950
|
+
majorRoad: {
|
|
4951
|
+
roles: ["accent", "primary"],
|
|
4952
|
+
amount: .16
|
|
4953
|
+
},
|
|
4954
|
+
path: .42,
|
|
4955
|
+
labelContrast: 6,
|
|
4956
|
+
pin: [
|
|
4957
|
+
"primary",
|
|
4958
|
+
"accent",
|
|
4959
|
+
"secondary"
|
|
4960
|
+
],
|
|
4961
|
+
frame: {
|
|
4962
|
+
radius: "var(--rb-block-radius, 8px)",
|
|
4963
|
+
width: "1px",
|
|
4964
|
+
shadow: "none",
|
|
4965
|
+
colour: .16
|
|
4966
|
+
},
|
|
4967
|
+
labelWeight: 500,
|
|
4968
|
+
casingScale: 1
|
|
4969
|
+
};
|
|
4970
|
+
/** Per arrangement style (keyed by its skin). Legacy themes without a skin use the default. */
|
|
4971
|
+
const mapDrawingTreatments = {
|
|
4972
|
+
fulcrum: {
|
|
4973
|
+
...defaultMapDrawingTreatment,
|
|
4974
|
+
land: .025,
|
|
4975
|
+
water: {
|
|
4976
|
+
roles: ["primary", "secondary"],
|
|
4977
|
+
amount: .2
|
|
4978
|
+
},
|
|
4979
|
+
park: {
|
|
4980
|
+
roles: ["success", "primary"],
|
|
4981
|
+
amount: .12
|
|
4982
|
+
},
|
|
4983
|
+
building: .07,
|
|
4984
|
+
buildingEdge: .14,
|
|
4985
|
+
casingSink: .16,
|
|
4986
|
+
majorRoad: {
|
|
4987
|
+
roles: ["accent"],
|
|
4988
|
+
amount: .12
|
|
4989
|
+
},
|
|
4990
|
+
pin: ["accent", "primary"],
|
|
4991
|
+
frame: {
|
|
4992
|
+
radius: "var(--rb-skin-radius, 3px)",
|
|
4993
|
+
width: "var(--rb-skin-rule, 1px)",
|
|
4994
|
+
shadow: "none",
|
|
4995
|
+
colour: .16
|
|
4996
|
+
}
|
|
4997
|
+
},
|
|
4998
|
+
poster: {
|
|
4999
|
+
...defaultMapDrawingTreatment,
|
|
5000
|
+
land: 0,
|
|
5001
|
+
water: {
|
|
5002
|
+
roles: ["primary", "secondary"],
|
|
5003
|
+
amount: .32
|
|
5004
|
+
},
|
|
5005
|
+
park: {
|
|
5006
|
+
roles: ["success", "accent"],
|
|
5007
|
+
amount: .26
|
|
5008
|
+
},
|
|
5009
|
+
building: .12,
|
|
5010
|
+
buildingEdge: .3,
|
|
5011
|
+
roadLift: 1,
|
|
5012
|
+
casingSink: .55,
|
|
5013
|
+
majorRoad: {
|
|
5014
|
+
roles: ["accent", "primary"],
|
|
5015
|
+
amount: .55
|
|
5016
|
+
},
|
|
5017
|
+
path: .7,
|
|
5018
|
+
labelContrast: 9,
|
|
5019
|
+
pin: ["primary", "accent"],
|
|
5020
|
+
frame: {
|
|
5021
|
+
radius: "var(--rb-skin-radius, 0px)",
|
|
5022
|
+
width: "var(--rb-skin-rule, 3px)",
|
|
5023
|
+
shadow: "offset",
|
|
5024
|
+
colour: 1
|
|
5025
|
+
},
|
|
5026
|
+
labelWeight: 600,
|
|
5027
|
+
casingScale: 1.15
|
|
5028
|
+
},
|
|
5029
|
+
lantern: {
|
|
5030
|
+
...defaultMapDrawingTreatment,
|
|
5031
|
+
land: .04,
|
|
5032
|
+
water: {
|
|
5033
|
+
roles: ["secondary", "primary"],
|
|
5034
|
+
amount: .22
|
|
5035
|
+
},
|
|
5036
|
+
park: {
|
|
5037
|
+
roles: ["success", "secondary"],
|
|
5038
|
+
amount: .14
|
|
5039
|
+
},
|
|
5040
|
+
building: .08,
|
|
5041
|
+
buildingEdge: .14,
|
|
5042
|
+
casingSink: .35,
|
|
5043
|
+
majorRoad: {
|
|
5044
|
+
roles: ["accent", "primary"],
|
|
5045
|
+
amount: .24
|
|
5046
|
+
},
|
|
5047
|
+
path: .4,
|
|
5048
|
+
pin: ["accent", "primary"],
|
|
5049
|
+
frame: {
|
|
5050
|
+
radius: "var(--rb-skin-radius, 10px)",
|
|
5051
|
+
width: "var(--rb-skin-rule, 1px)",
|
|
5052
|
+
shadow: "none",
|
|
5053
|
+
colour: .18
|
|
5054
|
+
}
|
|
5055
|
+
},
|
|
5056
|
+
measure: {
|
|
5057
|
+
...defaultMapDrawingTreatment,
|
|
5058
|
+
land: .03,
|
|
5059
|
+
water: {
|
|
5060
|
+
roles: ["accent", "primary"],
|
|
5061
|
+
amount: .16
|
|
5062
|
+
},
|
|
5063
|
+
park: {
|
|
5064
|
+
roles: ["success"],
|
|
5065
|
+
amount: .12
|
|
5066
|
+
},
|
|
5067
|
+
building: .1,
|
|
5068
|
+
buildingEdge: .2,
|
|
5069
|
+
casingSink: .26,
|
|
5070
|
+
majorRoad: {
|
|
5071
|
+
roles: ["accent"],
|
|
5072
|
+
amount: 0
|
|
5073
|
+
},
|
|
5074
|
+
path: .5,
|
|
5075
|
+
pin: ["accent", "primary"],
|
|
5076
|
+
frame: {
|
|
5077
|
+
radius: "var(--rb-skin-radius, 0px)",
|
|
5078
|
+
width: "var(--rb-skin-rule, 2px)",
|
|
5079
|
+
shadow: "none",
|
|
5080
|
+
colour: .6
|
|
5081
|
+
},
|
|
5082
|
+
labelWeight: 600
|
|
5083
|
+
},
|
|
5084
|
+
folio: {
|
|
5085
|
+
...defaultMapDrawingTreatment,
|
|
5086
|
+
land: .03,
|
|
5087
|
+
water: {
|
|
5088
|
+
roles: ["secondary", "primary"],
|
|
5089
|
+
amount: .18
|
|
5090
|
+
},
|
|
5091
|
+
park: {
|
|
5092
|
+
roles: ["success", "primary"],
|
|
5093
|
+
amount: .18
|
|
5094
|
+
},
|
|
5095
|
+
building: .08,
|
|
5096
|
+
buildingEdge: .15,
|
|
5097
|
+
casingSink: .18,
|
|
5098
|
+
majorRoad: {
|
|
5099
|
+
roles: ["accent"],
|
|
5100
|
+
amount: .14
|
|
5101
|
+
},
|
|
5102
|
+
pin: ["primary", "accent"],
|
|
5103
|
+
frame: {
|
|
5104
|
+
radius: "var(--rb-skin-radius, 10px)",
|
|
5105
|
+
width: "var(--rb-skin-rule, 1px)",
|
|
5106
|
+
shadow: "none",
|
|
5107
|
+
colour: .18
|
|
5108
|
+
}
|
|
5109
|
+
}
|
|
5110
|
+
};
|
|
5111
|
+
function mapDrawingTreatmentFor(skin) {
|
|
5112
|
+
return (skin === void 0 ? void 0 : mapDrawingTreatments[skin]) ?? defaultMapDrawingTreatment;
|
|
5113
|
+
}
|
|
5114
|
+
const toLab = (hex) => {
|
|
5115
|
+
const { r, g, b } = hexToRgb(hex);
|
|
5116
|
+
return srgbToOklab(r, g, b);
|
|
5117
|
+
};
|
|
5118
|
+
const toHex = ({ L, a, b }) => {
|
|
5119
|
+
const rgb = oklabToSrgb(L, a, b);
|
|
5120
|
+
return rgbToHex(rgb.r, rgb.g, rgb.b);
|
|
5121
|
+
};
|
|
5122
|
+
const blend = (from, to, t) => ({
|
|
5123
|
+
L: from.L + (to.L - from.L) * t,
|
|
5124
|
+
a: from.a + (to.a - from.a) * t,
|
|
5125
|
+
b: from.b + (to.b - from.b) * t
|
|
5126
|
+
});
|
|
5127
|
+
const distance = (x, y) => Math.hypot(x.L - y.L, x.a - y.a, x.b - y.b);
|
|
5128
|
+
/** A nearly neutral pole in the ground's hue, so lifts and sinks stay in the site's temperature. */
|
|
5129
|
+
function pole(ground, L) {
|
|
5130
|
+
const { C, h } = oklabToOklch(ground.L, ground.a, ground.b);
|
|
5131
|
+
return toLab(oklchToHexGamut(L, Math.min(C, .012), h));
|
|
5132
|
+
}
|
|
5133
|
+
/** The first blend from `from` toward `to` that reaches the contrast floor against every backdrop. */
|
|
5134
|
+
function firstContrastBlend(from, to, backdrops, floor) {
|
|
5135
|
+
return Array.from({ length: 41 }, (_, index) => toHex(blend(from, to, index / 40))).find((hex) => backdrops.every((backdrop) => contrastRatio(hex, backdrop) >= floor)) ?? toHex(to);
|
|
5136
|
+
}
|
|
5137
|
+
/** A tint must stand apart from what it is drawn on (a brand river on a brand band would vanish); else a step toward the ink. */
|
|
5138
|
+
function tint(base, spec, palette, ink) {
|
|
5139
|
+
return spec.roles.flatMap((role) => {
|
|
5140
|
+
const hex = resolveConcreteColorHex(role, palette);
|
|
5141
|
+
return hex ? [blend(base, toLab(hex), spec.amount)] : [];
|
|
5142
|
+
}).find((candidate) => distance(candidate, base) >= .025) ?? blend(base, ink, Math.max(spec.amount * .6, .06));
|
|
5143
|
+
}
|
|
5144
|
+
/** Pure: one ground, one ink, one palette and one treatment decide every map colour. */
|
|
5145
|
+
function resolveMapDrawingColours(input) {
|
|
5146
|
+
const { treatment: t, palette } = input;
|
|
5147
|
+
const ground = toLab(input.ground);
|
|
5148
|
+
const ink = toLab(input.ink);
|
|
5149
|
+
const darkGround = ink.L > ground.L;
|
|
5150
|
+
const light = darkGround ? blend(ground, ink, .22) : pole(ground, Math.max(ground.L, .995));
|
|
5151
|
+
const dark = darkGround ? pole(ground, Math.max(ground.L - .22, .04)) : ink;
|
|
5152
|
+
const tinted = blend(ground, ink, t.land);
|
|
5153
|
+
const land = contrastRatio(toHex(tinted), input.ink) >= 4.5 ? tinted : ground;
|
|
5154
|
+
const landHex = toHex(land);
|
|
5155
|
+
const road = blend(land, light, t.roadLift);
|
|
5156
|
+
const casing = blend(land, dark, t.casingSink);
|
|
5157
|
+
const building = blend(land, ink, t.building);
|
|
5158
|
+
const majorTint = t.majorRoad.amount === 0 ? road : tint(road, t.majorRoad, palette, ink);
|
|
5159
|
+
const pinBackdrops = [
|
|
5160
|
+
landHex,
|
|
5161
|
+
toHex(road),
|
|
5162
|
+
toHex(building)
|
|
5163
|
+
];
|
|
5164
|
+
const pinRoles = t.pin.flatMap((role) => {
|
|
5165
|
+
const hex = resolveConcreteColorHex(role, palette);
|
|
5166
|
+
return hex ? [hex] : [];
|
|
5167
|
+
});
|
|
5168
|
+
const pin = [...pinRoles, input.ink].find((hex) => pinBackdrops.every((backdrop) => contrastRatio(hex, backdrop) >= 3)) ?? firstContrastBlend(toLab(pinRoles[0] ?? input.ink), ink, pinBackdrops, 3);
|
|
5169
|
+
const pinEdge = [
|
|
5170
|
+
toHex(light),
|
|
5171
|
+
toHex(dark),
|
|
5172
|
+
landHex
|
|
5173
|
+
].reduce((best, hex) => contrastRatio(hex, pin) > contrastRatio(best, pin) ? hex : best);
|
|
5174
|
+
return {
|
|
5175
|
+
land: landHex,
|
|
5176
|
+
water: toHex(tint(land, t.water, palette, ink)),
|
|
5177
|
+
park: toHex(tint(land, t.park, palette, ink)),
|
|
5178
|
+
building: toHex(building),
|
|
5179
|
+
buildingEdge: toHex(blend(land, ink, t.buildingEdge)),
|
|
5180
|
+
road: toHex(road),
|
|
5181
|
+
roadCasing: toHex(casing),
|
|
5182
|
+
roadMajor: toHex(majorTint),
|
|
5183
|
+
roadMajorCasing: toHex(blend(casing, dark, .15)),
|
|
5184
|
+
path: toHex(blend(land, ink, t.path)),
|
|
5185
|
+
label: firstContrastBlend(land, ink, [landHex], Math.max(4.5, t.labelContrast)),
|
|
5186
|
+
labelHalo: landHex,
|
|
5187
|
+
pin,
|
|
5188
|
+
pinEdge,
|
|
5189
|
+
frame: toHex(blend(ground, ink, t.frame.colour))
|
|
5190
|
+
};
|
|
5191
|
+
}
|
|
5192
|
+
function mapDrawingShapeStyle(treatment) {
|
|
5193
|
+
return {
|
|
5194
|
+
[MAP_DRAWING_SHAPE_VARS.frameRadius]: treatment.frame.radius,
|
|
5195
|
+
[MAP_DRAWING_SHAPE_VARS.frameWidth]: treatment.frame.width,
|
|
5196
|
+
[MAP_DRAWING_SHAPE_VARS.frameShadow]: treatment.frame.shadow === "offset" ? `var(--rb-skin-shadow-offset, 6px) var(--rb-skin-shadow-offset, 6px) 0 var(${MAP_DRAWING_COLOUR_VARS.frame})` : "none",
|
|
5197
|
+
[MAP_DRAWING_SHAPE_VARS.labelFont]: "var(--font-body, system-ui, sans-serif)",
|
|
5198
|
+
[MAP_DRAWING_SHAPE_VARS.labelWeight]: String(treatment.labelWeight),
|
|
5199
|
+
[MAP_DRAWING_SHAPE_VARS.casingScale]: String(treatment.casingScale)
|
|
5200
|
+
};
|
|
5201
|
+
}
|
|
5202
|
+
/**
|
|
5203
|
+
* Everything a map needs from the section it sits on. Unmeasured grounds
|
|
5204
|
+
* (photos, gradients) keep the structural fallbacks for colour; the style's
|
|
5205
|
+
* shape still applies.
|
|
5206
|
+
*/
|
|
5207
|
+
function mapDrawingStyle(input) {
|
|
5208
|
+
const treatment = mapDrawingTreatmentFor(input.skin);
|
|
5209
|
+
const shape = mapDrawingShapeStyle(treatment);
|
|
5210
|
+
if (input.foreground.kind !== "known" || input.foreground.provenance.kind !== "measured") return shape;
|
|
5211
|
+
const ink = resolveConcreteColorHex(input.foreground.roles.text, input.palette);
|
|
5212
|
+
if (ink === null) return shape;
|
|
5213
|
+
const colours = resolveMapDrawingColours({
|
|
5214
|
+
ground: input.foreground.provenance.backdropHex,
|
|
5215
|
+
ink,
|
|
5216
|
+
palette: input.palette,
|
|
5217
|
+
treatment
|
|
5218
|
+
});
|
|
5219
|
+
return {
|
|
5220
|
+
...shape,
|
|
5221
|
+
...Object.fromEntries(Object.entries(colours).map(([role, value]) => [MAP_DRAWING_COLOUR_VARS[role], value]))
|
|
5222
|
+
};
|
|
5223
|
+
}
|
|
5224
|
+
//#endregion
|
|
5225
|
+
//#region ../theme-core/src/site-styles/types.ts
|
|
5226
|
+
/**
|
|
5227
|
+
* Defines a literal-preserving catalog while rejecting top-level extra keys on
|
|
5228
|
+
* each entry: `defineExactCatalog<Entry>()([{ ... }])`.
|
|
5229
|
+
*/
|
|
5230
|
+
function defineExactCatalog() {
|
|
5231
|
+
return (entries) => entries;
|
|
5232
|
+
}
|
|
5233
|
+
function asDesignBlockId(value) {
|
|
5234
|
+
return brandNonEmptyString(value, "DesignBlockId");
|
|
5235
|
+
}
|
|
5236
|
+
function asDesignPageId(value) {
|
|
5237
|
+
return brandNonEmptyString(value, "DesignPageId");
|
|
5238
|
+
}
|
|
5239
|
+
function asDesignEntryId(value) {
|
|
5240
|
+
return brandNonEmptyString(value, "DesignEntryId");
|
|
5241
|
+
}
|
|
5242
|
+
function asBlockContentVersionId(value) {
|
|
4592
5243
|
return brandNonEmptyString(value, "BlockContentVersionId");
|
|
4593
5244
|
}
|
|
4594
5245
|
function asDesignBoundaryId(value) {
|
|
@@ -4632,7 +5283,7 @@ function requireNonEmptyReadonlyArray(values, message = "Expected a non-empty ar
|
|
|
4632
5283
|
function makeBoundaryId(previousBlockId, nextBlockId) {
|
|
4633
5284
|
return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
|
|
4634
5285
|
}
|
|
4635
|
-
function assertNever
|
|
5286
|
+
function assertNever(value, message = "Unhandled Theme V2 variant") {
|
|
4636
5287
|
throw new Error(`${message}: ${String(value)}`);
|
|
4637
5288
|
}
|
|
4638
5289
|
function brandNonEmptyString(value, label) {
|
|
@@ -6955,7 +7606,7 @@ const EFFECT_PRESETS = [
|
|
|
6955
7606
|
customizableOption: {
|
|
6956
7607
|
name: "solidOnHover",
|
|
6957
7608
|
type: "select",
|
|
6958
|
-
label: "Hover
|
|
7609
|
+
label: "Hover behaviour",
|
|
6959
7610
|
default: "false",
|
|
6960
7611
|
options: ["false", "true"]
|
|
6961
7612
|
},
|
|
@@ -14627,1894 +15278,4 @@ z.object({
|
|
|
14627
15278
|
themes: z.array(themeSchema).length(3)
|
|
14628
15279
|
});
|
|
14629
15280
|
//#endregion
|
|
14630
|
-
|
|
14631
|
-
function assertNever(value, message) {
|
|
14632
|
-
if (message) throw new Error(message);
|
|
14633
|
-
throw new Error(`Unexpected value: ${String(value)}`);
|
|
14634
|
-
}
|
|
14635
|
-
//#endregion
|
|
14636
|
-
//#region ../commerce/src/purchase/bookingInstalmentSchedule.ts
|
|
14637
|
-
function resolveBookingInitialInstalmentAmountCents(input) {
|
|
14638
|
-
const totalAmountCents = Math.max(0, input.totalAmountCents);
|
|
14639
|
-
switch (input.plan.kind) {
|
|
14640
|
-
case "deposit_plus_one_remainder":
|
|
14641
|
-
case "deposit_plus_scheduled_instalments": return clampConfiguredAmount(input.plan.depositAmountCents, totalAmountCents);
|
|
14642
|
-
case "equal_scheduled_instalments": return splitAmountWithRemainderInFirst(totalAmountCents, input.plan.instalmentCount)[0] ?? 0;
|
|
14643
|
-
default: return assertNever(input.plan);
|
|
14644
|
-
}
|
|
14645
|
-
}
|
|
14646
|
-
function buildBookingInstalmentSchedule(input) {
|
|
14647
|
-
const totalAmountCents = Math.max(0, input.totalAmountCents);
|
|
14648
|
-
switch (input.plan.kind) {
|
|
14649
|
-
case "deposit_plus_one_remainder": {
|
|
14650
|
-
const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
|
|
14651
|
-
const remainderAmountCents = Math.max(0, totalAmountCents - depositAmountCents);
|
|
14652
|
-
return omitZeroAmountFutureRows([createScheduleRow({
|
|
14653
|
-
sequence: 1,
|
|
14654
|
-
stateAtBooking: "paid_today",
|
|
14655
|
-
dueAt: input.anchorAt,
|
|
14656
|
-
amountCents: depositAmountCents
|
|
14657
|
-
}), createScheduleRow({
|
|
14658
|
-
sequence: 2,
|
|
14659
|
-
stateAtBooking: "scheduled",
|
|
14660
|
-
dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, input.plan.remainderDueCount, input.plan.intervalUnit),
|
|
14661
|
-
amountCents: remainderAmountCents
|
|
14662
|
-
})]);
|
|
14663
|
-
}
|
|
14664
|
-
case "deposit_plus_scheduled_instalments": {
|
|
14665
|
-
const plan = input.plan;
|
|
14666
|
-
const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
|
|
14667
|
-
const instalmentAmounts = splitAmountWithRemainderInFirst(Math.max(0, totalAmountCents - depositAmountCents), plan.instalmentCount);
|
|
14668
|
-
return omitZeroAmountFutureRows([createScheduleRow({
|
|
14669
|
-
sequence: 1,
|
|
14670
|
-
stateAtBooking: "paid_today",
|
|
14671
|
-
dueAt: input.anchorAt,
|
|
14672
|
-
amountCents: depositAmountCents
|
|
14673
|
-
}), ...instalmentAmounts.map((amountCents, index) => createScheduleRow({
|
|
14674
|
-
sequence: index + 2,
|
|
14675
|
-
stateAtBooking: "scheduled",
|
|
14676
|
-
dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * (index + 1), plan.intervalUnit),
|
|
14677
|
-
amountCents
|
|
14678
|
-
}))]);
|
|
14679
|
-
}
|
|
14680
|
-
case "equal_scheduled_instalments": {
|
|
14681
|
-
const plan = input.plan;
|
|
14682
|
-
return omitZeroAmountFutureRows(splitAmountWithRemainderInFirst(totalAmountCents, plan.instalmentCount).map((amountCents, index) => createScheduleRow({
|
|
14683
|
-
sequence: index + 1,
|
|
14684
|
-
stateAtBooking: index === 0 ? "paid_today" : "scheduled",
|
|
14685
|
-
dueAt: index === 0 ? input.anchorAt : addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * index, plan.intervalUnit),
|
|
14686
|
-
amountCents
|
|
14687
|
-
})));
|
|
14688
|
-
}
|
|
14689
|
-
default: return assertNever(input.plan);
|
|
14690
|
-
}
|
|
14691
|
-
}
|
|
14692
|
-
function createScheduleRow(input) {
|
|
14693
|
-
return {
|
|
14694
|
-
id: `payment-${input.sequence}`,
|
|
14695
|
-
sequence: input.sequence,
|
|
14696
|
-
stateAtBooking: input.stateAtBooking,
|
|
14697
|
-
dueAt: input.dueAt,
|
|
14698
|
-
amountCents: input.amountCents
|
|
14699
|
-
};
|
|
14700
|
-
}
|
|
14701
|
-
/** Resolve real rows first: zero future payments do not extend the deadline. */
|
|
14702
|
-
function canInstalmentPlanCompleteBefore(input) {
|
|
14703
|
-
const deadline = Date.parse(input.deadline);
|
|
14704
|
-
if (!Number.isFinite(Date.parse(input.now)) || !Number.isFinite(deadline)) return false;
|
|
14705
|
-
return input.schedule.every((row) => Date.parse(row.dueAt) < deadline);
|
|
14706
|
-
}
|
|
14707
|
-
/** Later obligations are identified by their state, never their position. */
|
|
14708
|
-
function getBookingLaterInstalments(schedule) {
|
|
14709
|
-
return schedule.filter((row) => row.stateAtBooking === "scheduled");
|
|
14710
|
-
}
|
|
14711
|
-
//#endregion
|
|
14712
|
-
//#region ../commerce/src/purchase/bookingPaymentSelection.ts
|
|
14713
|
-
/** Identity is decided against the authoritative quote, before display repricing. */
|
|
14714
|
-
function resolveAvailableBookingCollectionOptions(input) {
|
|
14715
|
-
const configured = input.paymentTerms.allowedOptions;
|
|
14716
|
-
if (!validateBookingPaymentOptionKinds(configured.map((option) => option.kind)).ok) return [];
|
|
14717
|
-
const available = configured.filter((option) => option.kind !== "instalment_plan" || Number.isFinite(Date.parse(input.now))).map((option) => resolveBookingCollectionOptionFacts({
|
|
14718
|
-
option,
|
|
14719
|
-
totalCents: input.totalCents,
|
|
14720
|
-
anchorAt: input.now,
|
|
14721
|
-
bookingStartAt: input.bookingStartAt
|
|
14722
|
-
})).filter((option) => option.kind !== "instalment_plan" || input.bookingStartAt !== null && canInstalmentPlanCompleteBefore({
|
|
14723
|
-
now: input.now,
|
|
14724
|
-
deadline: input.bookingStartAt,
|
|
14725
|
-
schedule: option.schedule
|
|
14726
|
-
}));
|
|
14727
|
-
const upfront = resolveBookingCollectionOptionFacts({
|
|
14728
|
-
option: { kind: "upfront" },
|
|
14729
|
-
totalCents: input.totalCents,
|
|
14730
|
-
anchorAt: input.now,
|
|
14731
|
-
bookingStartAt: input.bookingStartAt
|
|
14732
|
-
});
|
|
14733
|
-
const collapsed = available.map((option) => isBookingCollectionEquivalentToUpfront(option) ? upfront : option);
|
|
14734
|
-
const unique = collapsed.filter((option, index) => collapsed.findIndex((other) => other.kind === option.kind) === index);
|
|
14735
|
-
return unique.length > 0 ? unique : [upfront];
|
|
14736
|
-
}
|
|
14737
|
-
function isBookingCollectionEquivalentToUpfront(option) {
|
|
14738
|
-
switch (option.kind) {
|
|
14739
|
-
case "upfront": return true;
|
|
14740
|
-
case "deferred_manual": return false;
|
|
14741
|
-
case "flexible_balance": return option.config.depositRefundability === "refundable" && option.dueNowCents === option.totalCents;
|
|
14742
|
-
case "instalment_plan": return option.depositRefundability !== "non_refundable" && option.schedule.length === 1;
|
|
14743
|
-
default: return assertNever(option);
|
|
14744
|
-
}
|
|
14745
|
-
}
|
|
14746
|
-
function resolveBookingCollectionOptionFacts(input) {
|
|
14747
|
-
const money = {
|
|
14748
|
-
totalCents: input.totalCents,
|
|
14749
|
-
anchorAt: input.anchorAt,
|
|
14750
|
-
bookingStartAt: input.bookingStartAt
|
|
14751
|
-
};
|
|
14752
|
-
switch (input.option.kind) {
|
|
14753
|
-
case "upfront": return {
|
|
14754
|
-
...money,
|
|
14755
|
-
kind: "upfront",
|
|
14756
|
-
dueNowCents: input.totalCents
|
|
14757
|
-
};
|
|
14758
|
-
case "deferred_manual": return {
|
|
14759
|
-
...money,
|
|
14760
|
-
kind: "deferred_manual",
|
|
14761
|
-
dueNowCents: 0
|
|
14762
|
-
};
|
|
14763
|
-
case "instalment_plan": {
|
|
14764
|
-
const schedule = buildBookingInstalmentSchedule({
|
|
14765
|
-
anchorAt: input.anchorAt,
|
|
14766
|
-
totalAmountCents: input.totalCents,
|
|
14767
|
-
plan: input.option.plan
|
|
14768
|
-
});
|
|
14769
|
-
return {
|
|
14770
|
-
...money,
|
|
14771
|
-
kind: "instalment_plan",
|
|
14772
|
-
plan: input.option.plan,
|
|
14773
|
-
schedule,
|
|
14774
|
-
dueNowCents: schedule[0]?.amountCents ?? 0,
|
|
14775
|
-
depositRefundability: getBookingInstalmentDepositRefundability(input.option.plan)
|
|
14776
|
-
};
|
|
14777
|
-
}
|
|
14778
|
-
case "flexible_balance": {
|
|
14779
|
-
const dueNowCents = resolveFlexibleBalanceInitialPaymentCents({
|
|
14780
|
-
totalAmountCents: input.totalCents,
|
|
14781
|
-
config: input.option.config
|
|
14782
|
-
});
|
|
14783
|
-
return {
|
|
14784
|
-
...money,
|
|
14785
|
-
kind: "flexible_balance",
|
|
14786
|
-
config: input.option.config,
|
|
14787
|
-
dueNowCents,
|
|
14788
|
-
remainingBalanceCents: Math.max(0, input.totalCents - dueNowCents),
|
|
14789
|
-
balanceDueAt: resolveFlexibleBalanceDueAt({
|
|
14790
|
-
bookingStartAt: input.bookingStartAt ?? input.anchorAt,
|
|
14791
|
-
dueDateRule: input.option.config.dueDateRule
|
|
14792
|
-
})
|
|
14793
|
-
};
|
|
14794
|
-
}
|
|
14795
|
-
default: return assertNever(input.option);
|
|
14796
|
-
}
|
|
14797
|
-
}
|
|
14798
|
-
/** Discounts change preview money, never an already admitted collection identity. */
|
|
14799
|
-
function repriceBookingCollectionOptions(input) {
|
|
14800
|
-
return input.options.map((option) => option.totalCents === input.totalCents ? option : resolveBookingCollectionOptionFacts({
|
|
14801
|
-
option,
|
|
14802
|
-
totalCents: input.totalCents,
|
|
14803
|
-
anchorAt: option.anchorAt,
|
|
14804
|
-
bookingStartAt: option.bookingStartAt
|
|
14805
|
-
}));
|
|
14806
|
-
}
|
|
14807
|
-
//#endregion
|
|
14808
|
-
//#region ../commerce/src/purchase/checkoutPaymentFlow.ts
|
|
14809
|
-
function planCheckoutPaymentFlow(options) {
|
|
14810
|
-
const amountDueCents = toNonNegativeCents(options.amountDueCents);
|
|
14811
|
-
const discountCents = toNonNegativeCents(options.discountCents);
|
|
14812
|
-
const availableCreditCents = toNonNegativeCents(options.availableCreditCents);
|
|
14813
|
-
const minimumStripeChargeCents = toNonNegativeCents(options.minimumStripeChargeCents ?? 0);
|
|
14814
|
-
if (amountDueCents <= 0) return {
|
|
14815
|
-
kind: "bypass",
|
|
14816
|
-
bypassReason: discountCents > 0 ? "discount_free" : "free",
|
|
14817
|
-
reserveCreditCents: 0
|
|
14818
|
-
};
|
|
14819
|
-
if (!options.creditCurrencyMatches || availableCreditCents <= 0) return {
|
|
14820
|
-
kind: "stripe",
|
|
14821
|
-
reserveCreditCents: toNonNegativeCents(0)
|
|
14822
|
-
};
|
|
14823
|
-
if (availableCreditCents >= amountDueCents) return {
|
|
14824
|
-
kind: "store_credit_only",
|
|
14825
|
-
reserveCreditCents: amountDueCents
|
|
14826
|
-
};
|
|
14827
|
-
return {
|
|
14828
|
-
kind: "stripe",
|
|
14829
|
-
reserveCreditCents: planMixedPaymentCreditReservation({
|
|
14830
|
-
amountDueCents,
|
|
14831
|
-
availableCreditCents,
|
|
14832
|
-
minimumStripeChargeCents
|
|
14833
|
-
})
|
|
14834
|
-
};
|
|
14835
|
-
}
|
|
14836
|
-
function planMixedPaymentCreditReservation(input) {
|
|
14837
|
-
const chargeAfterFullCredit = input.amountDueCents - input.availableCreditCents;
|
|
14838
|
-
if (input.minimumStripeChargeCents <= 0 || chargeAfterFullCredit <= 0 || chargeAfterFullCredit >= input.minimumStripeChargeCents) return input.availableCreditCents;
|
|
14839
|
-
if (input.amountDueCents < input.minimumStripeChargeCents) return toNonNegativeCents(0);
|
|
14840
|
-
return toNonNegativeCents(input.amountDueCents - input.minimumStripeChargeCents);
|
|
14841
|
-
}
|
|
14842
|
-
/**
|
|
14843
|
-
* Apply site credit to a flexible-balance booking before card payment.
|
|
14844
|
-
*
|
|
14845
|
-
* Credit first reduces the configured payment due now. Once that payment is
|
|
14846
|
-
* covered, any remaining credit reduces the later balance. If a partial credit
|
|
14847
|
-
* application would leave a positive card charge below Stripe's minimum, less
|
|
14848
|
-
* credit is used so the configured payment can still be collected.
|
|
14849
|
-
*/
|
|
14850
|
-
function planFlexibleBalanceCreditFirst(input) {
|
|
14851
|
-
const totalCents = toNonNegativeCents(input.totalAfterDiscountCents);
|
|
14852
|
-
const configuredDueNowCents = toNonNegativeCents(Math.min(input.configuredPaymentDueNowCents, totalCents));
|
|
14853
|
-
const availableCreditCents = toNonNegativeCents(input.creditCurrencyMatches ? input.availableCreditCents : 0);
|
|
14854
|
-
const minimumStripeChargeCents = toNonNegativeCents(input.minimumStripeChargeCents ?? 0);
|
|
14855
|
-
if (availableCreditCents >= totalCents && totalCents > 0) return {
|
|
14856
|
-
kind: "credit_only",
|
|
14857
|
-
reserveCreditCents: totalCents,
|
|
14858
|
-
cardDueNowCents: toNonNegativeCents(0),
|
|
14859
|
-
laterBalanceCents: toNonNegativeCents(0)
|
|
14860
|
-
};
|
|
14861
|
-
let reserveCreditCents = toNonNegativeCents(Math.min(availableCreditCents, totalCents));
|
|
14862
|
-
if (reserveCreditCents >= configuredDueNowCents) return {
|
|
14863
|
-
kind: "flexible_balance",
|
|
14864
|
-
reserveCreditCents,
|
|
14865
|
-
cardDueNowCents: toNonNegativeCents(0),
|
|
14866
|
-
laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents)
|
|
14867
|
-
};
|
|
14868
|
-
const plannedCardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
|
|
14869
|
-
if (plannedCardDueNowCents > 0 && plannedCardDueNowCents < minimumStripeChargeCents) {
|
|
14870
|
-
if (configuredDueNowCents < minimumStripeChargeCents) return {
|
|
14871
|
-
kind: "card_below_minimum",
|
|
14872
|
-
reserveCreditCents: toNonNegativeCents(0),
|
|
14873
|
-
cardDueNowCents: configuredDueNowCents,
|
|
14874
|
-
laterBalanceCents: toNonNegativeCents(totalCents - configuredDueNowCents)
|
|
14875
|
-
};
|
|
14876
|
-
reserveCreditCents = toNonNegativeCents(configuredDueNowCents - minimumStripeChargeCents);
|
|
14877
|
-
}
|
|
14878
|
-
const cardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
|
|
14879
|
-
return {
|
|
14880
|
-
kind: "flexible_balance",
|
|
14881
|
-
reserveCreditCents,
|
|
14882
|
-
cardDueNowCents,
|
|
14883
|
-
laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents - cardDueNowCents)
|
|
14884
|
-
};
|
|
14885
|
-
}
|
|
14886
|
-
//#endregion
|
|
14887
|
-
//#region ../commerce/src/purchase/settlement.ts
|
|
14888
|
-
function normalizeCurrencyCode(raw) {
|
|
14889
|
-
const normalized = raw.trim().toUpperCase();
|
|
14890
|
-
if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
|
|
14891
|
-
return normalized;
|
|
14892
|
-
}
|
|
14893
|
-
//#endregion
|
|
14894
|
-
//#region ../commerce/src/purchase/checkoutSessionMetadata.ts
|
|
14895
|
-
const datedOfferingSharedEngineMetadataShape = {
|
|
14896
|
-
datedOfferingEngineContractVersion: z.literal("shared_v1"),
|
|
14897
|
-
datedOfferingEngineRouteKind: z.literal("shared_whole_series_registration"),
|
|
14898
|
-
datedOfferingCapacityHoldId: z.string().uuid(),
|
|
14899
|
-
datedOfferingCapacityHoldAuditRef: z.string().uuid(),
|
|
14900
|
-
customerId: z.string().uuid(),
|
|
14901
|
-
eventSeriesId: z.string().uuid()
|
|
14902
|
-
};
|
|
14903
|
-
z.object(datedOfferingSharedEngineMetadataShape);
|
|
14904
|
-
const orderCheckoutSessionMetadataBaseShape = {
|
|
14905
|
-
type: z.literal("order"),
|
|
14906
|
-
site_id: z.string().uuid(),
|
|
14907
|
-
order_id: z.string().uuid().optional(),
|
|
14908
|
-
customer_email: z.string().email().optional(),
|
|
14909
|
-
customer_name: z.string().optional(),
|
|
14910
|
-
product_id: z.string().uuid().optional(),
|
|
14911
|
-
attendee_id: z.string().uuid().optional(),
|
|
14912
|
-
occurrence_id: z.string().uuid().optional(),
|
|
14913
|
-
tickets_count: z.string().optional(),
|
|
14914
|
-
notes: z.string().optional(),
|
|
14915
|
-
discount_redemption_id: z.string().uuid().optional(),
|
|
14916
|
-
discount_code_id: z.string().uuid().optional(),
|
|
14917
|
-
discount_code: z.string().optional(),
|
|
14918
|
-
discount_public_label: z.string().optional(),
|
|
14919
|
-
credit_reservation_id: z.string().uuid().optional(),
|
|
14920
|
-
credit_reserved_cents: z.string().optional(),
|
|
14921
|
-
discount_code_amount_cents: z.string().optional(),
|
|
14922
|
-
order_payment_reason: z.enum([
|
|
14923
|
-
"instalment_payoff",
|
|
14924
|
-
"flexible_balance_initial",
|
|
14925
|
-
"flexible_balance_paydown"
|
|
14926
|
-
]).optional(),
|
|
14927
|
-
order_payment_plan_id: z.string().uuid().optional(),
|
|
14928
|
-
order_flexible_balance_contract_id: z.string().uuid().optional()
|
|
14929
|
-
};
|
|
14930
|
-
const absentDatedOfferingSharedEngineMetadataShape = {
|
|
14931
|
-
datedOfferingEngineContractVersion: z.never().optional(),
|
|
14932
|
-
datedOfferingEngineRouteKind: z.never().optional(),
|
|
14933
|
-
datedOfferingCapacityHoldId: z.never().optional(),
|
|
14934
|
-
datedOfferingCapacityHoldAuditRef: z.never().optional(),
|
|
14935
|
-
customerId: z.never().optional(),
|
|
14936
|
-
eventSeriesId: z.never().optional()
|
|
14937
|
-
};
|
|
14938
|
-
const LegacyOrderCheckoutSessionMetadataSchema = z.object({
|
|
14939
|
-
...orderCheckoutSessionMetadataBaseShape,
|
|
14940
|
-
...absentDatedOfferingSharedEngineMetadataShape
|
|
14941
|
-
});
|
|
14942
|
-
const SharedDatedOfferingOrderCheckoutSessionMetadataSchema = z.object({
|
|
14943
|
-
...orderCheckoutSessionMetadataBaseShape,
|
|
14944
|
-
...datedOfferingSharedEngineMetadataShape
|
|
14945
|
-
});
|
|
14946
|
-
z.union([SharedDatedOfferingOrderCheckoutSessionMetadataSchema, LegacyOrderCheckoutSessionMetadataSchema]);
|
|
14947
|
-
//#endregion
|
|
14948
|
-
//#region ../commerce/src/purchase/confirmationPaymentSchema.ts
|
|
14949
|
-
const settledBalanceSchema = z.strictObject({ kind: z.literal("settled") });
|
|
14950
|
-
const dueBalanceSchema = z.strictObject({
|
|
14951
|
-
kind: z.literal("due"),
|
|
14952
|
-
amountCents: z.number().int().positive().transform((value, ctx) => {
|
|
14953
|
-
const cents = parsePositiveCents(value);
|
|
14954
|
-
if (cents.ok) return cents.value;
|
|
14955
|
-
ctx.addIssue({
|
|
14956
|
-
code: "custom",
|
|
14957
|
-
message: "Expected positive whole cents"
|
|
14958
|
-
});
|
|
14959
|
-
return z.NEVER;
|
|
14960
|
-
}),
|
|
14961
|
-
dueAt: z.string().nullable()
|
|
14962
|
-
});
|
|
14963
|
-
const paymentBalanceSchema = z.discriminatedUnion("kind", [settledBalanceSchema, dueBalanceSchema]);
|
|
14964
|
-
const currencySchema = z.string().regex(/^[A-Z]{3}$/).transform(normalizeCurrencyCode);
|
|
14965
|
-
const moneyFields = {
|
|
14966
|
-
amountPaidCents: z.number().int().nonnegative().transform(toNonNegativeCents),
|
|
14967
|
-
currency: currencySchema
|
|
14968
|
-
};
|
|
14969
|
-
const confirmationPaymentSchema = z.discriminatedUnion("kind", [
|
|
14970
|
-
z.strictObject({
|
|
14971
|
-
kind: z.literal("free"),
|
|
14972
|
-
balance: settledBalanceSchema
|
|
14973
|
-
}),
|
|
14974
|
-
z.strictObject({
|
|
14975
|
-
kind: z.literal("waived"),
|
|
14976
|
-
balance: settledBalanceSchema
|
|
14977
|
-
}),
|
|
14978
|
-
z.strictObject({
|
|
14979
|
-
kind: z.literal("pass"),
|
|
14980
|
-
passName: z.string().nullable(),
|
|
14981
|
-
passCreditsUsed: z.number().int().positive().nullable(),
|
|
14982
|
-
balance: settledBalanceSchema
|
|
14983
|
-
}),
|
|
14984
|
-
z.strictObject({
|
|
14985
|
-
kind: z.literal("membership"),
|
|
14986
|
-
membershipName: z.string().nullable(),
|
|
14987
|
-
balance: settledBalanceSchema
|
|
14988
|
-
}),
|
|
14989
|
-
z.strictObject({
|
|
14990
|
-
kind: z.literal("manual_due"),
|
|
14991
|
-
currency: currencySchema,
|
|
14992
|
-
balance: dueBalanceSchema
|
|
14993
|
-
}),
|
|
14994
|
-
z.strictObject({
|
|
14995
|
-
kind: z.literal("managed_balance_due"),
|
|
14996
|
-
...moneyFields,
|
|
14997
|
-
balance: dueBalanceSchema
|
|
14998
|
-
}),
|
|
14999
|
-
z.strictObject({
|
|
15000
|
-
kind: z.literal("monetary"),
|
|
15001
|
-
...moneyFields,
|
|
15002
|
-
paymentMethod: z.enum([
|
|
15003
|
-
"stripe",
|
|
15004
|
-
"store_credit",
|
|
15005
|
-
"mixed",
|
|
15006
|
-
"manual"
|
|
15007
|
-
]),
|
|
15008
|
-
balance: paymentBalanceSchema
|
|
15009
|
-
})
|
|
15010
|
-
]);
|
|
15011
|
-
toNonNegativeCents(0);
|
|
15012
|
-
//#endregion
|
|
15013
|
-
//#region ../commerce/src/purchase/stripeCommissionMetadata.ts
|
|
15014
|
-
/** Reasons are payment evidence, not an independent pricing policy. */
|
|
15015
|
-
const STRIPE_COMMISSION_FREE_REASONS = [
|
|
15016
|
-
"managed_billing",
|
|
15017
|
-
"no_commission_plan",
|
|
15018
|
-
"billing_evidence_invalid",
|
|
15019
|
-
"fee_rounds_to_zero",
|
|
15020
|
-
"payment_not_stripe"
|
|
15021
|
-
];
|
|
15022
|
-
const historicalContext = {
|
|
15023
|
-
currency: z.string().refine((value) => parseCurrencyCode(value) !== null).optional(),
|
|
15024
|
-
sourcePlanId: z.string().trim().min(1).optional()
|
|
15025
|
-
};
|
|
15026
|
-
const percentSchema = z.number().finite().min(0).max(100);
|
|
15027
|
-
z.discriminatedUnion("kind", [
|
|
15028
|
-
z.object({
|
|
15029
|
-
kind: z.literal("commission_free"),
|
|
15030
|
-
reason: z.enum(STRIPE_COMMISSION_FREE_REASONS),
|
|
15031
|
-
...historicalContext
|
|
15032
|
-
}),
|
|
15033
|
-
z.object({
|
|
15034
|
-
kind: z.literal("application_fee_amount"),
|
|
15035
|
-
amountCents: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
|
|
15036
|
-
percent: percentSchema,
|
|
15037
|
-
...historicalContext
|
|
15038
|
-
}),
|
|
15039
|
-
z.object({
|
|
15040
|
-
kind: z.literal("application_fee_percent"),
|
|
15041
|
-
percent: percentSchema,
|
|
15042
|
-
...historicalContext
|
|
15043
|
-
})
|
|
15044
|
-
]);
|
|
15045
|
-
//#endregion
|
|
15046
|
-
//#region ../commerce/src/purchase/stripeMinimumCharge.ts
|
|
15047
|
-
const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
|
|
15048
|
-
GBP: 30,
|
|
15049
|
-
USD: 50,
|
|
15050
|
-
EUR: 50,
|
|
15051
|
-
AED: 200,
|
|
15052
|
-
AUD: 50,
|
|
15053
|
-
BGN: 100,
|
|
15054
|
-
BRL: 50,
|
|
15055
|
-
CAD: 50,
|
|
15056
|
-
CHF: 50,
|
|
15057
|
-
CZK: 1500,
|
|
15058
|
-
DKK: 250,
|
|
15059
|
-
HKD: 400,
|
|
15060
|
-
HUF: 17500,
|
|
15061
|
-
JPY: 50,
|
|
15062
|
-
MXN: 1e3,
|
|
15063
|
-
MYR: 200,
|
|
15064
|
-
NOK: 300,
|
|
15065
|
-
NZD: 50,
|
|
15066
|
-
PLN: 200,
|
|
15067
|
-
RON: 200,
|
|
15068
|
-
SEK: 300,
|
|
15069
|
-
SGD: 50,
|
|
15070
|
-
THB: 1e3
|
|
15071
|
-
};
|
|
15072
|
-
function isStripeMinimumChargeCurrency(currency) {
|
|
15073
|
-
return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
|
|
15074
|
-
}
|
|
15075
|
-
function getStripeMinimumChargeRequirement(rawCurrency) {
|
|
15076
|
-
let currency;
|
|
15077
|
-
try {
|
|
15078
|
-
currency = normalizeCurrencyCode(rawCurrency);
|
|
15079
|
-
} catch {
|
|
15080
|
-
return null;
|
|
15081
|
-
}
|
|
15082
|
-
const currencyKey = currency;
|
|
15083
|
-
if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
|
|
15084
|
-
return {
|
|
15085
|
-
currency,
|
|
15086
|
-
minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
|
|
15087
|
-
};
|
|
15088
|
-
}
|
|
15089
|
-
//#endregion
|
|
15090
|
-
//#region ../commerce/src/purchase/checkoutCopy.ts
|
|
15091
|
-
/**
|
|
15092
|
-
* Customer copy shared by checkout surfaces, so one approved wording reaches
|
|
15093
|
-
* every place that shows it.
|
|
15094
|
-
*/
|
|
15095
|
-
const checkoutCopy = {
|
|
15096
|
-
/** A payment is still being confirmed; checking again is safe. */
|
|
15097
|
-
checkoutStillConfirming: "We’re still confirming your payment. This can take a minute – you can check again, and you won’t be charged twice.",
|
|
15098
|
-
/** A previous attempt can't be confirmed automatically; the business needs to check it. */
|
|
15099
|
-
checkoutAssistanceRequired: "We can’t confirm your last payment attempt yet. Please don’t pay again – contact the business so they can check it."
|
|
15100
|
-
};
|
|
15101
|
-
//#endregion
|
|
15102
|
-
//#region ../commerce/src/purchase/event-registration-errors.ts
|
|
15103
|
-
const eventRegistrationErrors = {
|
|
15104
|
-
registrationClosed: {
|
|
15105
|
-
message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.",
|
|
15106
|
-
action: "none"
|
|
15107
|
-
},
|
|
15108
|
-
paymentInvestigationRequired: {
|
|
15109
|
-
message: "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking.",
|
|
15110
|
-
action: "none"
|
|
15111
|
-
},
|
|
15112
|
-
paymentProviderUnavailable: {
|
|
15113
|
-
message: "We couldn’t reach the payment provider. Please try again in a minute.",
|
|
15114
|
-
action: "retry"
|
|
15115
|
-
},
|
|
15116
|
-
paymentHostUnavailable: {
|
|
15117
|
-
message: "Card payments aren’t available on this web address yet. Please contact the organiser to book.",
|
|
15118
|
-
action: "none"
|
|
15119
|
-
},
|
|
15120
|
-
checkoutTemporarilyUnavailable: {
|
|
15121
|
-
message: "Event payments are temporarily unavailable while we make an update. Please try again later.",
|
|
15122
|
-
action: "retry"
|
|
15123
|
-
},
|
|
15124
|
-
paymentPageUnavailable: {
|
|
15125
|
-
message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
|
|
15126
|
-
action: "retry"
|
|
15127
|
-
},
|
|
15128
|
-
paymentUnavailable: {
|
|
15129
|
-
message: "Online payment is not available for this event right now. Please contact the organiser for help with booking.",
|
|
15130
|
-
action: "none"
|
|
15131
|
-
},
|
|
15132
|
-
capacityChanged: {
|
|
15133
|
-
message: "Sorry, there aren’t enough places left for your selection. Please check the available places and choose again.",
|
|
15134
|
-
action: "places"
|
|
15135
|
-
},
|
|
15136
|
-
selectionChanged: {
|
|
15137
|
-
message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
|
|
15138
|
-
action: "places"
|
|
15139
|
-
},
|
|
15140
|
-
registrationPreparationChanged: {
|
|
15141
|
-
message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
|
|
15142
|
-
action: "places"
|
|
15143
|
-
},
|
|
15144
|
-
registrationAlreadyExists: {
|
|
15145
|
-
message: "You already have a booking for this event. Please check your bookings to see its status. If you need help, contact the organiser.",
|
|
15146
|
-
action: "portal"
|
|
15147
|
-
},
|
|
15148
|
-
holdExpired: {
|
|
15149
|
-
message: "Your reservation has timed out. Please check availability and choose your places again.",
|
|
15150
|
-
action: "start"
|
|
15151
|
-
},
|
|
15152
|
-
waitlistUnavailable: {
|
|
15153
|
-
message: "Sorry, the waiting list place offered in this invitation is no longer available. Please check the event for available places or contact the organiser for help.",
|
|
15154
|
-
action: "event"
|
|
15155
|
-
},
|
|
15156
|
-
paymentContextMismatch: {
|
|
15157
|
-
message: "The payment options for this event have changed. Please check the latest options before continuing.",
|
|
15158
|
-
action: "payment-options"
|
|
15159
|
-
},
|
|
15160
|
-
verificationFailed: {
|
|
15161
|
-
message: "We couldn’t confirm this request came from a person. Please refresh the page and try again.",
|
|
15162
|
-
action: "none"
|
|
15163
|
-
},
|
|
15164
|
-
idempotencyConflict: {
|
|
15165
|
-
message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.",
|
|
15166
|
-
action: "portal"
|
|
15167
|
-
},
|
|
15168
|
-
invalidCommitInput: {
|
|
15169
|
-
message: "We couldn’t accept your booking details. Please check the information you entered and try again. If this keeps happening, contact the organiser for help.",
|
|
15170
|
-
action: "details"
|
|
15171
|
-
}
|
|
15172
|
-
};
|
|
15173
|
-
function parseEventRegistrationErrorReason(value) {
|
|
15174
|
-
return typeof value === "string" && Object.prototype.hasOwnProperty.call(eventRegistrationErrors, value) ? value : null;
|
|
15175
|
-
}
|
|
15176
|
-
//#endregion
|
|
15177
|
-
//#region ../commerce/src/purchase/checkoutPresentation.ts
|
|
15178
|
-
function publishableKeyMode(publishableKey) {
|
|
15179
|
-
if (publishableKey.startsWith("pk_live_")) return "live";
|
|
15180
|
-
if (publishableKey.startsWith("pk_test_")) return "test";
|
|
15181
|
-
return null;
|
|
15182
|
-
}
|
|
15183
|
-
function checkBrowserStripeKey(publishableKey, livemode) {
|
|
15184
|
-
const key = publishableKey?.trim();
|
|
15185
|
-
if (!key) return {
|
|
15186
|
-
tag: "unavailable",
|
|
15187
|
-
reason: "missing_key"
|
|
15188
|
-
};
|
|
15189
|
-
const mode = publishableKeyMode(key);
|
|
15190
|
-
if (mode === null) return {
|
|
15191
|
-
tag: "unavailable",
|
|
15192
|
-
reason: "invalid_key"
|
|
15193
|
-
};
|
|
15194
|
-
return mode === (livemode ? "live" : "test") ? {
|
|
15195
|
-
tag: "ready",
|
|
15196
|
-
publishableKey: key
|
|
15197
|
-
} : {
|
|
15198
|
-
tag: "unavailable",
|
|
15199
|
-
reason: "mode_mismatch"
|
|
15200
|
-
};
|
|
15201
|
-
}
|
|
15202
|
-
//#endregion
|
|
15203
|
-
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
15204
|
-
function r(e) {
|
|
15205
|
-
var t, f, n = "";
|
|
15206
|
-
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
15207
|
-
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
15208
|
-
var o = e.length;
|
|
15209
|
-
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
15210
|
-
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
15211
|
-
return n;
|
|
15212
|
-
}
|
|
15213
|
-
function clsx() {
|
|
15214
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
15215
|
-
return n;
|
|
15216
|
-
}
|
|
15217
|
-
//#endregion
|
|
15218
|
-
//#region ../blocks/src/system/icons/svg.tsx
|
|
15219
|
-
function createIcon(displayName, children) {
|
|
15220
|
-
const Icon = ({ size = "1em", strokeWidth = 2, title, className, focusable = false, role, ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
15221
|
-
"aria-hidden": title ? void 0 : true,
|
|
15222
|
-
className,
|
|
15223
|
-
"data-rb-icon": displayName.replace(/Icon$/, ""),
|
|
15224
|
-
fill: "none",
|
|
15225
|
-
focusable,
|
|
15226
|
-
height: size,
|
|
15227
|
-
role: title ? role ?? "img" : role,
|
|
15228
|
-
stroke: "currentColor",
|
|
15229
|
-
strokeLinecap: "round",
|
|
15230
|
-
strokeLinejoin: "round",
|
|
15231
|
-
strokeWidth,
|
|
15232
|
-
viewBox: "0 0 24 24",
|
|
15233
|
-
width: size,
|
|
15234
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
15235
|
-
...props,
|
|
15236
|
-
children: [title ? /* @__PURE__ */ jsx("title", { children: title }) : null, children]
|
|
15237
|
-
});
|
|
15238
|
-
Icon.displayName = displayName;
|
|
15239
|
-
return Icon;
|
|
15240
|
-
}
|
|
15241
|
-
const ArrowDownIcon = createIcon("ArrowDownIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "m6 13 6 6 6-6" })] }));
|
|
15242
|
-
const ArrowLeftIcon = createIcon("ArrowLeftIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M19 12H5" }), /* @__PURE__ */ jsx("path", { d: "m11 6-6 6 6 6" })] }));
|
|
15243
|
-
const ArrowRightIcon = createIcon("ArrowRightIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M5 12h14" }), /* @__PURE__ */ jsx("path", { d: "m13 6 6 6-6 6" })] }));
|
|
15244
|
-
const AwardIcon = createIcon("AwardIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
|
|
15245
|
-
cx: "12",
|
|
15246
|
-
cy: "8",
|
|
15247
|
-
r: "4"
|
|
15248
|
-
}), /* @__PURE__ */ jsx("path", { d: "m8.5 12.5-1.5 7 5-3 5 3-1.5-7" })] }));
|
|
15249
|
-
const BadgeCheckIcon = createIcon("BadgeCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m8 3 4-1 4 1 3 3 1 4-1 4-3 3-4 1-4-1-3-3-1-4 1-4Z" }), /* @__PURE__ */ jsx("path", { d: "m8.5 11.5 2.5 2.5 4.5-5" })] }));
|
|
15250
|
-
const BookOpenIcon = createIcon("BookOpenIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15251
|
-
/* @__PURE__ */ jsx("path", { d: "M4 5.5A3 3 0 0 1 7 4h13v15H7a3 3 0 0 0-3 1.5Z" }),
|
|
15252
|
-
/* @__PURE__ */ jsx("path", { d: "M4 5.5V20" }),
|
|
15253
|
-
/* @__PURE__ */ jsx("path", { d: "M12 4v15" })
|
|
15254
|
-
] }));
|
|
15255
|
-
const BrainIcon = createIcon("BrainIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15256
|
-
/* @__PURE__ */ jsx("path", { d: "M9 4a4 4 0 0 0-4 4 4 4 0 0 0 0 8 4 4 0 0 0 4 4" }),
|
|
15257
|
-
/* @__PURE__ */ jsx("path", { d: "M15 4a4 4 0 0 1 4 4 4 4 0 0 1 0 8 4 4 0 0 1-4 4" }),
|
|
15258
|
-
/* @__PURE__ */ jsx("path", { d: "M9 4v16" }),
|
|
15259
|
-
/* @__PURE__ */ jsx("path", { d: "M15 4v16" }),
|
|
15260
|
-
/* @__PURE__ */ jsx("path", { d: "M9 8h6" }),
|
|
15261
|
-
/* @__PURE__ */ jsx("path", { d: "M9 14h6" })
|
|
15262
|
-
] }));
|
|
15263
|
-
const BriefcaseBusinessIcon = createIcon("BriefcaseBusinessIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15264
|
-
/* @__PURE__ */ jsx("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }),
|
|
15265
|
-
/* @__PURE__ */ jsx("rect", {
|
|
15266
|
-
x: "3",
|
|
15267
|
-
y: "7",
|
|
15268
|
-
width: "18",
|
|
15269
|
-
height: "13",
|
|
15270
|
-
rx: "2"
|
|
15271
|
-
}),
|
|
15272
|
-
/* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
|
|
15273
|
-
/* @__PURE__ */ jsx("path", { d: "M9 12v2" }),
|
|
15274
|
-
/* @__PURE__ */ jsx("path", { d: "M15 12v2" })
|
|
15275
|
-
] }));
|
|
15276
|
-
const CalendarIcon = createIcon("CalendarIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15277
|
-
/* @__PURE__ */ jsx("path", { d: "M8 3v4" }),
|
|
15278
|
-
/* @__PURE__ */ jsx("path", { d: "M16 3v4" }),
|
|
15279
|
-
/* @__PURE__ */ jsx("rect", {
|
|
15280
|
-
x: "4",
|
|
15281
|
-
y: "5",
|
|
15282
|
-
width: "16",
|
|
15283
|
-
height: "16",
|
|
15284
|
-
rx: "2"
|
|
15285
|
-
}),
|
|
15286
|
-
/* @__PURE__ */ jsx("path", { d: "M4 10h16" })
|
|
15287
|
-
] }));
|
|
15288
|
-
const CalendarDaysIcon = CalendarIcon;
|
|
15289
|
-
const CheckIcon = createIcon("CheckIcon", /* @__PURE__ */ jsx("path", { d: "m5 12 4 4L19 6" }));
|
|
15290
|
-
const ChevronDownIcon = createIcon("ChevronDownIcon", /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }));
|
|
15291
|
-
const ChevronLeftIcon = createIcon("ChevronLeftIcon", /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }));
|
|
15292
|
-
const ChevronRightIcon = createIcon("ChevronRightIcon", /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }));
|
|
15293
|
-
const ChevronUpIcon = createIcon("ChevronUpIcon", /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" }));
|
|
15294
|
-
const CircleMinusIcon = createIcon("CircleMinusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
|
|
15295
|
-
cx: "12",
|
|
15296
|
-
cy: "12",
|
|
15297
|
-
r: "9"
|
|
15298
|
-
}), /* @__PURE__ */ jsx("path", { d: "M8 12h8" })] }));
|
|
15299
|
-
const CirclePlusIcon = createIcon("CirclePlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15300
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15301
|
-
cx: "12",
|
|
15302
|
-
cy: "12",
|
|
15303
|
-
r: "9"
|
|
15304
|
-
}),
|
|
15305
|
-
/* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
|
|
15306
|
-
/* @__PURE__ */ jsx("path", { d: "M12 8v8" })
|
|
15307
|
-
] }));
|
|
15308
|
-
const ClockIcon = createIcon("ClockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
|
|
15309
|
-
cx: "12",
|
|
15310
|
-
cy: "12",
|
|
15311
|
-
r: "9"
|
|
15312
|
-
}), /* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2" })] }));
|
|
15313
|
-
const CompassIcon = createIcon("CompassIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
|
|
15314
|
-
cx: "12",
|
|
15315
|
-
cy: "12",
|
|
15316
|
-
r: "9"
|
|
15317
|
-
}), /* @__PURE__ */ jsx("path", { d: "m15 9-2 6-4 2 2-6Z" })] }));
|
|
15318
|
-
const DownloadIcon = createIcon("DownloadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15319
|
-
/* @__PURE__ */ jsx("path", { d: "M12 3v12" }),
|
|
15320
|
-
/* @__PURE__ */ jsx("path", { d: "m7 10 5 5 5-5" }),
|
|
15321
|
-
/* @__PURE__ */ jsx("path", { d: "M5 21h14" })
|
|
15322
|
-
] }));
|
|
15323
|
-
const ExternalLinkIcon = createIcon("ExternalLinkIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15324
|
-
/* @__PURE__ */ jsx("path", { d: "M14 4h6v6" }),
|
|
15325
|
-
/* @__PURE__ */ jsx("path", { d: "m10 14 10-10" }),
|
|
15326
|
-
/* @__PURE__ */ jsx("path", { d: "M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5" })
|
|
15327
|
-
] }));
|
|
15328
|
-
const FileArchiveIcon = createIcon("FileArchiveIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15329
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
15330
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
15331
|
-
/* @__PURE__ */ jsx("path", { d: "M10 7h2" }),
|
|
15332
|
-
/* @__PURE__ */ jsx("path", { d: "M10 11h2" }),
|
|
15333
|
-
/* @__PURE__ */ jsx("path", { d: "M10 15h4v4h-4Z" })
|
|
15334
|
-
] }));
|
|
15335
|
-
const FileAudioIcon = createIcon("FileAudioIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15336
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
15337
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
15338
|
-
/* @__PURE__ */ jsx("path", { d: "M10 16V10l5-2v6" }),
|
|
15339
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15340
|
-
cx: "9",
|
|
15341
|
-
cy: "17",
|
|
15342
|
-
r: "1.5"
|
|
15343
|
-
}),
|
|
15344
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15345
|
-
cx: "15",
|
|
15346
|
-
cy: "15",
|
|
15347
|
-
r: "1.5"
|
|
15348
|
-
})
|
|
15349
|
-
] }));
|
|
15350
|
-
const FileSpreadsheetIcon = createIcon("FileSpreadsheetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15351
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
15352
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
15353
|
-
/* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
|
|
15354
|
-
/* @__PURE__ */ jsx("path", { d: "M8 16h8" }),
|
|
15355
|
-
/* @__PURE__ */ jsx("path", { d: "M12 10v8" })
|
|
15356
|
-
] }));
|
|
15357
|
-
const FileTextIcon = createIcon("FileTextIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15358
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
15359
|
-
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
15360
|
-
/* @__PURE__ */ jsx("path", { d: "M9 13h6" }),
|
|
15361
|
-
/* @__PURE__ */ jsx("path", { d: "M9 17h6" })
|
|
15362
|
-
] }));
|
|
15363
|
-
const Flower2Icon = createIcon("Flower2Icon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15364
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15365
|
-
cx: "12",
|
|
15366
|
-
cy: "12",
|
|
15367
|
-
r: "2"
|
|
15368
|
-
}),
|
|
15369
|
-
/* @__PURE__ */ jsx("path", { d: "M12 10C8 4 16 4 12 10Z" }),
|
|
15370
|
-
/* @__PURE__ */ jsx("path", { d: "M14 12c6-4 6 4 0 0Z" }),
|
|
15371
|
-
/* @__PURE__ */ jsx("path", { d: "M12 14c4 6-4 6 0 0Z" }),
|
|
15372
|
-
/* @__PURE__ */ jsx("path", { d: "M10 12c-6 4-6-4 0 0Z" })
|
|
15373
|
-
] }));
|
|
15374
|
-
const GlobeIcon = createIcon("GlobeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15375
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15376
|
-
cx: "12",
|
|
15377
|
-
cy: "12",
|
|
15378
|
-
r: "9"
|
|
15379
|
-
}),
|
|
15380
|
-
/* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
|
|
15381
|
-
/* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 1 0 18" }),
|
|
15382
|
-
/* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 0 0 18" })
|
|
15383
|
-
] }));
|
|
15384
|
-
const GraduationCapIcon = createIcon("GraduationCapIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15385
|
-
/* @__PURE__ */ jsx("path", { d: "m3 8 9-4 9 4-9 4Z" }),
|
|
15386
|
-
/* @__PURE__ */ jsx("path", { d: "M7 10v5c3 3 7 3 10 0v-5" }),
|
|
15387
|
-
/* @__PURE__ */ jsx("path", { d: "M21 8v6" })
|
|
15388
|
-
] }));
|
|
15389
|
-
const HandHeartIcon = createIcon("HandHeartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15390
|
-
/* @__PURE__ */ jsx("path", { d: "M3 15h4l4 4h5l5-5" }),
|
|
15391
|
-
/* @__PURE__ */ jsx("path", { d: "M7 15l3-3h4a2 2 0 0 1 2 2" }),
|
|
15392
|
-
/* @__PURE__ */ jsx("path", { d: "M12 8c-2-2-5 1-2 4l2 2 2-2c3-3 0-6-2-4Z" })
|
|
15393
|
-
] }));
|
|
15394
|
-
const HeartIcon = createIcon("HeartIcon", /* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }));
|
|
15395
|
-
const HeartHandshakeIcon = createIcon("HeartHandshakeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }), /* @__PURE__ */ jsx("path", { d: "m8 12 2 2 2-2 2 2 2-2" })] }));
|
|
15396
|
-
const HomeIcon = createIcon("HomeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15397
|
-
/* @__PURE__ */ jsx("path", { d: "m3 11 9-8 9 8" }),
|
|
15398
|
-
/* @__PURE__ */ jsx("path", { d: "M5 10v10h14V10" }),
|
|
15399
|
-
/* @__PURE__ */ jsx("path", { d: "M9 20v-6h6v6" })
|
|
15400
|
-
] }));
|
|
15401
|
-
const InfoIcon = createIcon("InfoIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15402
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15403
|
-
cx: "12",
|
|
15404
|
-
cy: "12",
|
|
15405
|
-
r: "9"
|
|
15406
|
-
}),
|
|
15407
|
-
/* @__PURE__ */ jsx("path", { d: "M12 11v6" }),
|
|
15408
|
-
/* @__PURE__ */ jsx("path", { d: "M12 7h.01" })
|
|
15409
|
-
] }));
|
|
15410
|
-
const LeafIcon = createIcon("LeafIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M5 20C5 10 12 4 21 4c0 9-6 16-16 16Z" }), /* @__PURE__ */ jsx("path", { d: "M5 20c4-5 8-8 13-11" })] }));
|
|
15411
|
-
const LightbulbIcon = createIcon("LightbulbIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15412
|
-
/* @__PURE__ */ jsx("path", { d: "M9 18h6" }),
|
|
15413
|
-
/* @__PURE__ */ jsx("path", { d: "M10 22h4" }),
|
|
15414
|
-
/* @__PURE__ */ jsx("path", { d: "M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z" })
|
|
15415
|
-
] }));
|
|
15416
|
-
const LockIcon = createIcon("LockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
|
|
15417
|
-
x: "5",
|
|
15418
|
-
y: "10",
|
|
15419
|
-
width: "14",
|
|
15420
|
-
height: "10",
|
|
15421
|
-
rx: "2"
|
|
15422
|
-
}), /* @__PURE__ */ jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })] }));
|
|
15423
|
-
const MailIcon = createIcon("MailIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
|
|
15424
|
-
x: "3",
|
|
15425
|
-
y: "5",
|
|
15426
|
-
width: "18",
|
|
15427
|
-
height: "14",
|
|
15428
|
-
rx: "2"
|
|
15429
|
-
}), /* @__PURE__ */ jsx("path", { d: "m3 7 9 6 9-6" })] }));
|
|
15430
|
-
const MapPinIcon = createIcon("MapPinIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 21s7-5 7-12a7 7 0 0 0-14 0c0 7 7 12 7 12Z" }), /* @__PURE__ */ jsx("circle", {
|
|
15431
|
-
cx: "12",
|
|
15432
|
-
cy: "9",
|
|
15433
|
-
r: "2.5"
|
|
15434
|
-
})] }));
|
|
15435
|
-
const MessageCircleIcon = createIcon("MessageCircleIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 11.5a8.5 8.5 0 0 1-12.6 7.4L3 20l1.1-5.3A8.5 8.5 0 1 1 21 11.5Z" }) }));
|
|
15436
|
-
const MinusIcon = createIcon("MinusIcon", /* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
|
|
15437
|
-
const PackageIcon = createIcon("PackageIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15438
|
-
/* @__PURE__ */ jsx("path", { d: "m12 3 8 4.5v9L12 21l-8-4.5v-9Z" }),
|
|
15439
|
-
/* @__PURE__ */ jsx("path", { d: "M12 12 4 7.5" }),
|
|
15440
|
-
/* @__PURE__ */ jsx("path", { d: "m12 12 8-4.5" }),
|
|
15441
|
-
/* @__PURE__ */ jsx("path", { d: "M12 12v9" })
|
|
15442
|
-
] }));
|
|
15443
|
-
const PhoneIcon = createIcon("PhoneIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M22 16.9v3a2 2 0 0 1-2.2 2A19 19 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7l.4 2.5a2 2 0 0 1-.6 1.8L7.7 9.2a13 13 0 0 0 7.1 7.1l1.2-1.2a2 2 0 0 1 1.8-.6l2.5.4a2 2 0 0 1 1.7 2Z" }) }));
|
|
15444
|
-
const PlayIcon = createIcon("PlayIcon", /* @__PURE__ */ jsx("path", { d: "m8 5 11 7-11 7Z" }));
|
|
15445
|
-
const PlusIcon = createIcon("PlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "M5 12h14" })] }));
|
|
15446
|
-
const ShieldIcon = createIcon("ShieldIcon", /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z" }));
|
|
15447
|
-
const ShoppingBagIcon = createIcon("ShoppingBagIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M6 8h12l1 13H5Z" }), /* @__PURE__ */ jsx("path", { d: "M9 8a3 3 0 0 1 6 0" })] }));
|
|
15448
|
-
const ShoppingCartIcon = createIcon("ShoppingCartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15449
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15450
|
-
cx: "9",
|
|
15451
|
-
cy: "20",
|
|
15452
|
-
r: "1"
|
|
15453
|
-
}),
|
|
15454
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15455
|
-
cx: "18",
|
|
15456
|
-
cy: "20",
|
|
15457
|
-
r: "1"
|
|
15458
|
-
}),
|
|
15459
|
-
/* @__PURE__ */ jsx("path", { d: "M2 3h3l3 12h10l3-8H7" })
|
|
15460
|
-
] }));
|
|
15461
|
-
const SmileIcon = createIcon("SmileIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15462
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15463
|
-
cx: "12",
|
|
15464
|
-
cy: "12",
|
|
15465
|
-
r: "9"
|
|
15466
|
-
}),
|
|
15467
|
-
/* @__PURE__ */ jsx("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
15468
|
-
/* @__PURE__ */ jsx("path", { d: "M9 9h.01" }),
|
|
15469
|
-
/* @__PURE__ */ jsx("path", { d: "M15 9h.01" })
|
|
15470
|
-
] }));
|
|
15471
|
-
const SparklesIcon = createIcon("SparklesIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m12 3 2 5 5 2-5 2-2 5-2-5-5-2 5-2Z" }), /* @__PURE__ */ jsx("path", { d: "m19 15 .8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8Z" })] }));
|
|
15472
|
-
const SproutIcon = createIcon("SproutIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15473
|
-
/* @__PURE__ */ jsx("path", { d: "M12 21V10" }),
|
|
15474
|
-
/* @__PURE__ */ jsx("path", { d: "M12 10C8 5 4 6 3 10c4 1 7 0 9 0Z" }),
|
|
15475
|
-
/* @__PURE__ */ jsx("path", { d: "M12 11c4-5 8-4 9 0-4 1-7 0-9 0Z" })
|
|
15476
|
-
] }));
|
|
15477
|
-
const StarIcon = createIcon("StarIcon", /* @__PURE__ */ jsx("path", { d: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.2 6.4 20.2 7.5 14 3 9.6l6.2-.9Z" }));
|
|
15478
|
-
const TargetIcon = createIcon("TargetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15479
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15480
|
-
cx: "12",
|
|
15481
|
-
cy: "12",
|
|
15482
|
-
r: "9"
|
|
15483
|
-
}),
|
|
15484
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15485
|
-
cx: "12",
|
|
15486
|
-
cy: "12",
|
|
15487
|
-
r: "5"
|
|
15488
|
-
}),
|
|
15489
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15490
|
-
cx: "12",
|
|
15491
|
-
cy: "12",
|
|
15492
|
-
r: "1"
|
|
15493
|
-
})
|
|
15494
|
-
] }));
|
|
15495
|
-
const UploadIcon = createIcon("UploadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15496
|
-
/* @__PURE__ */ jsx("path", { d: "M12 21V9" }),
|
|
15497
|
-
/* @__PURE__ */ jsx("path", { d: "m7 14 5-5 5 5" }),
|
|
15498
|
-
/* @__PURE__ */ jsx("path", { d: "M5 3h14" })
|
|
15499
|
-
] }));
|
|
15500
|
-
const UserRoundCheckIcon = createIcon("UserRoundCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15501
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15502
|
-
cx: "10",
|
|
15503
|
-
cy: "8",
|
|
15504
|
-
r: "4"
|
|
15505
|
-
}),
|
|
15506
|
-
/* @__PURE__ */ jsx("path", { d: "M3 21a7 7 0 0 1 11.5-5.3" }),
|
|
15507
|
-
/* @__PURE__ */ jsx("path", { d: "m15 19 2 2 4-5" })
|
|
15508
|
-
] }));
|
|
15509
|
-
const UsersIcon = createIcon("UsersIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15510
|
-
/* @__PURE__ */ jsx("circle", {
|
|
15511
|
-
cx: "9",
|
|
15512
|
-
cy: "8",
|
|
15513
|
-
r: "4"
|
|
15514
|
-
}),
|
|
15515
|
-
/* @__PURE__ */ jsx("path", { d: "M2 21a7 7 0 0 1 14 0" }),
|
|
15516
|
-
/* @__PURE__ */ jsx("path", { d: "M17 11a4 4 0 0 0 0-7" }),
|
|
15517
|
-
/* @__PURE__ */ jsx("path", { d: "M22 21a7 7 0 0 0-5-6.7" })
|
|
15518
|
-
] }));
|
|
15519
|
-
const WrenchIcon = createIcon("WrenchIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M14.7 6.3A5 5 0 0 0 7 12.6L3.5 16a2.1 2.1 0 0 0 3 3L10 15.5A5 5 0 0 0 16.7 9Z" }), /* @__PURE__ */ jsx("path", { d: "m15 5 4 4" })] }));
|
|
15520
|
-
const XIcon = createIcon("XIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })] }));
|
|
15521
|
-
//#endregion
|
|
15522
|
-
//#region ../blocks/src/system/runtime/nodes/spinner.tsx
|
|
15523
|
-
function resolveColorStyle(color) {
|
|
15524
|
-
switch (color) {
|
|
15525
|
-
case void 0: return;
|
|
15526
|
-
case "inherit": return { color: "inherit" };
|
|
15527
|
-
case "foreground": return { color: "rgb(var(--tb-foreground))" };
|
|
15528
|
-
case "text": return { color: "rgb(var(--tb-text))" };
|
|
15529
|
-
default: return;
|
|
15530
|
-
}
|
|
15531
|
-
}
|
|
15532
|
-
function SpinnerNode({ className, size = "md", color, strokeWidth = 3, srLabel, style, ...rest }) {
|
|
15533
|
-
const hasExplicitAriaLabel = typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0;
|
|
15534
|
-
const accessibilityProps = srLabel ? {
|
|
15535
|
-
role: "status",
|
|
15536
|
-
"aria-live": "polite"
|
|
15537
|
-
} : hasExplicitAriaLabel ? {} : { "aria-hidden": true };
|
|
15538
|
-
const trackStroke = color === "inherit" ? "currentColor" : "var(--rb-spinner-track-color)";
|
|
15539
|
-
const trackOpacity = color === "inherit" ? .25 : 1;
|
|
15540
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
15541
|
-
...accessibilityProps,
|
|
15542
|
-
className: clsx("rb-spinner", size ? `rb-spinner--${size}` : null, color === "inherit" ? "rb-spinner--inherit" : null, className),
|
|
15543
|
-
style: {
|
|
15544
|
-
...resolveColorStyle(color),
|
|
15545
|
-
...style ?? {}
|
|
15546
|
-
},
|
|
15547
|
-
...rest,
|
|
15548
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
15549
|
-
viewBox: "0 0 24 24",
|
|
15550
|
-
fill: "none",
|
|
15551
|
-
"aria-hidden": "true",
|
|
15552
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
15553
|
-
cx: "12",
|
|
15554
|
-
cy: "12",
|
|
15555
|
-
r: "10",
|
|
15556
|
-
stroke: trackStroke,
|
|
15557
|
-
strokeWidth,
|
|
15558
|
-
opacity: trackOpacity
|
|
15559
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
15560
|
-
d: "M12 2a10 10 0 0 1 10 10",
|
|
15561
|
-
stroke: "currentColor",
|
|
15562
|
-
strokeWidth,
|
|
15563
|
-
strokeLinecap: "round"
|
|
15564
|
-
})]
|
|
15565
|
-
}), srLabel ? /* @__PURE__ */ jsx("span", {
|
|
15566
|
-
className: "rb-sr-only",
|
|
15567
|
-
children: srLabel
|
|
15568
|
-
}) : null]
|
|
15569
|
-
});
|
|
15570
|
-
}
|
|
15571
|
-
//#endregion
|
|
15572
|
-
//#region ../blocks/src/system/runtime/nodes/buttonAffordance.ts
|
|
15573
|
-
function normalize(value) {
|
|
15574
|
-
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
15575
|
-
return trimmed.length > 0 ? trimmed : null;
|
|
15576
|
-
}
|
|
15577
|
-
/**
|
|
15578
|
-
* Resolve the node-authored trailing affordance, or `null` when no icon exists.
|
|
15579
|
-
*/
|
|
15580
|
-
function resolveButtonAffordance(input) {
|
|
15581
|
-
const nodeIcon = normalize(input.trailingIcon);
|
|
15582
|
-
if (nodeIcon) return { iconId: nodeIcon };
|
|
15583
|
-
return null;
|
|
15584
|
-
}
|
|
15585
|
-
//#endregion
|
|
15586
|
-
//#region ../blocks/src/system/icons/cta.ts
|
|
15587
|
-
/**
|
|
15588
|
-
* Curated icon set for CTA/button icons.
|
|
15589
|
-
*
|
|
15590
|
-
* Guardrail: keep this list small and action-oriented. This is intentionally not the full Lucide set.
|
|
15591
|
-
* Extend by adding to CTA_ICON_NAMES and the mapping below (explicit imports only).
|
|
15592
|
-
*/
|
|
15593
|
-
const CTA_ICON_NAMES = [
|
|
15594
|
-
"ArrowRight",
|
|
15595
|
-
"ArrowLeft",
|
|
15596
|
-
"ChevronRight",
|
|
15597
|
-
"ChevronLeft",
|
|
15598
|
-
"ChevronUp",
|
|
15599
|
-
"ChevronDown",
|
|
15600
|
-
"ExternalLink",
|
|
15601
|
-
"Download",
|
|
15602
|
-
"Upload",
|
|
15603
|
-
"Mail",
|
|
15604
|
-
"Phone",
|
|
15605
|
-
"Play",
|
|
15606
|
-
"ShoppingCart",
|
|
15607
|
-
"Calendar",
|
|
15608
|
-
"MapPin",
|
|
15609
|
-
"Info",
|
|
15610
|
-
"Plus",
|
|
15611
|
-
"Minus",
|
|
15612
|
-
"Check",
|
|
15613
|
-
"X"
|
|
15614
|
-
];
|
|
15615
|
-
const CTA_ICON_COMPONENTS = {
|
|
15616
|
-
ArrowRight: ArrowRightIcon,
|
|
15617
|
-
ArrowLeft: ArrowLeftIcon,
|
|
15618
|
-
ChevronRight: ChevronRightIcon,
|
|
15619
|
-
ChevronLeft: ChevronLeftIcon,
|
|
15620
|
-
ChevronUp: ChevronUpIcon,
|
|
15621
|
-
ChevronDown: ChevronDownIcon,
|
|
15622
|
-
ExternalLink: ExternalLinkIcon,
|
|
15623
|
-
Download: DownloadIcon,
|
|
15624
|
-
Upload: UploadIcon,
|
|
15625
|
-
Mail: MailIcon,
|
|
15626
|
-
Phone: PhoneIcon,
|
|
15627
|
-
Play: PlayIcon,
|
|
15628
|
-
ShoppingCart: ShoppingCartIcon,
|
|
15629
|
-
Calendar: CalendarIcon,
|
|
15630
|
-
MapPin: MapPinIcon,
|
|
15631
|
-
Info: InfoIcon,
|
|
15632
|
-
Plus: PlusIcon,
|
|
15633
|
-
Minus: MinusIcon,
|
|
15634
|
-
Check: CheckIcon,
|
|
15635
|
-
X: XIcon
|
|
15636
|
-
};
|
|
15637
|
-
function isCtaIconName(value) {
|
|
15638
|
-
return typeof value === "string" && CTA_ICON_NAMES.includes(value);
|
|
15639
|
-
}
|
|
15640
|
-
function formatLucideName(name) {
|
|
15641
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2");
|
|
15642
|
-
}
|
|
15643
|
-
const CTA_ICON_OPTIONS = CTA_ICON_NAMES.map((id) => ({
|
|
15644
|
-
id,
|
|
15645
|
-
label: formatLucideName(id)
|
|
15646
|
-
}));
|
|
15647
|
-
function getCtaIconComponent(name) {
|
|
15648
|
-
if (!isCtaIconName(name)) return null;
|
|
15649
|
-
return CTA_ICON_COMPONENTS[name] ?? null;
|
|
15650
|
-
}
|
|
15651
|
-
//#endregion
|
|
15652
|
-
//#region ../blocks/src/system/icons/semantic.ts
|
|
15653
|
-
const SEMANTIC_ICON_IDS = [
|
|
15654
|
-
"protection-trust",
|
|
15655
|
-
"confidentiality",
|
|
15656
|
-
"care-support",
|
|
15657
|
-
"partnership",
|
|
15658
|
-
"warmth",
|
|
15659
|
-
"community",
|
|
15660
|
-
"personal-guidance",
|
|
15661
|
-
"conversation",
|
|
15662
|
-
"friendly-welcome",
|
|
15663
|
-
"insight-learning",
|
|
15664
|
-
"natural-wellbeing",
|
|
15665
|
-
"growth",
|
|
15666
|
-
"gentle-care",
|
|
15667
|
-
"special-touch",
|
|
15668
|
-
"ideas",
|
|
15669
|
-
"direction",
|
|
15670
|
-
"focus",
|
|
15671
|
-
"quality",
|
|
15672
|
-
"highlight",
|
|
15673
|
-
"verified-quality",
|
|
15674
|
-
"learning",
|
|
15675
|
-
"training",
|
|
15676
|
-
"programmes-dates",
|
|
15677
|
-
"place",
|
|
15678
|
-
"products",
|
|
15679
|
-
"packages",
|
|
15680
|
-
"time",
|
|
15681
|
-
"practical-service",
|
|
15682
|
-
"at-home",
|
|
15683
|
-
"worldwide",
|
|
15684
|
-
"professional-service"
|
|
15685
|
-
];
|
|
15686
|
-
const SEMANTIC_ICON_COMPONENTS = {
|
|
15687
|
-
"protection-trust": ShieldIcon,
|
|
15688
|
-
confidentiality: LockIcon,
|
|
15689
|
-
"care-support": HandHeartIcon,
|
|
15690
|
-
partnership: HeartHandshakeIcon,
|
|
15691
|
-
warmth: HeartIcon,
|
|
15692
|
-
community: UsersIcon,
|
|
15693
|
-
"personal-guidance": UserRoundCheckIcon,
|
|
15694
|
-
conversation: MessageCircleIcon,
|
|
15695
|
-
"friendly-welcome": SmileIcon,
|
|
15696
|
-
"insight-learning": BrainIcon,
|
|
15697
|
-
"natural-wellbeing": LeafIcon,
|
|
15698
|
-
growth: SproutIcon,
|
|
15699
|
-
"gentle-care": Flower2Icon,
|
|
15700
|
-
"special-touch": SparklesIcon,
|
|
15701
|
-
ideas: LightbulbIcon,
|
|
15702
|
-
direction: CompassIcon,
|
|
15703
|
-
focus: TargetIcon,
|
|
15704
|
-
quality: AwardIcon,
|
|
15705
|
-
highlight: StarIcon,
|
|
15706
|
-
"verified-quality": BadgeCheckIcon,
|
|
15707
|
-
learning: BookOpenIcon,
|
|
15708
|
-
training: GraduationCapIcon,
|
|
15709
|
-
"programmes-dates": CalendarDaysIcon,
|
|
15710
|
-
place: MapPinIcon,
|
|
15711
|
-
products: ShoppingBagIcon,
|
|
15712
|
-
packages: PackageIcon,
|
|
15713
|
-
time: ClockIcon,
|
|
15714
|
-
"practical-service": WrenchIcon,
|
|
15715
|
-
"at-home": HomeIcon,
|
|
15716
|
-
worldwide: GlobeIcon,
|
|
15717
|
-
"professional-service": BriefcaseBusinessIcon
|
|
15718
|
-
};
|
|
15719
|
-
const featurePreset = ["feature"];
|
|
15720
|
-
const SEMANTIC_ICON_DEFINITIONS = [
|
|
15721
|
-
{
|
|
15722
|
-
id: "protection-trust",
|
|
15723
|
-
label: "Protection and trust",
|
|
15724
|
-
tags: [
|
|
15725
|
-
"safe",
|
|
15726
|
-
"safety",
|
|
15727
|
-
"security",
|
|
15728
|
-
"trust",
|
|
15729
|
-
"privacy",
|
|
15730
|
-
"confidence"
|
|
15731
|
-
],
|
|
15732
|
-
domains: [
|
|
15733
|
-
"wellbeing",
|
|
15734
|
-
"services",
|
|
15735
|
-
"technology"
|
|
15736
|
-
],
|
|
15737
|
-
tone: ["trustworthy", "practical"],
|
|
15738
|
-
presets: featurePreset
|
|
15739
|
-
},
|
|
15740
|
-
{
|
|
15741
|
-
id: "confidentiality",
|
|
15742
|
-
label: "Confidentiality",
|
|
15743
|
-
tags: [
|
|
15744
|
-
"confidential",
|
|
15745
|
-
"privacy",
|
|
15746
|
-
"secure",
|
|
15747
|
-
"protected",
|
|
15748
|
-
"private"
|
|
15749
|
-
],
|
|
15750
|
-
domains: [
|
|
15751
|
-
"wellbeing",
|
|
15752
|
-
"coaching",
|
|
15753
|
-
"services",
|
|
15754
|
-
"technology"
|
|
15755
|
-
],
|
|
15756
|
-
tone: ["trustworthy", "calm"],
|
|
15757
|
-
presets: featurePreset
|
|
15758
|
-
},
|
|
15759
|
-
{
|
|
15760
|
-
id: "care-support",
|
|
15761
|
-
label: "Care and support",
|
|
15762
|
-
tags: [
|
|
15763
|
-
"care",
|
|
15764
|
-
"support",
|
|
15765
|
-
"therapy",
|
|
15766
|
-
"kindness",
|
|
15767
|
-
"help",
|
|
15768
|
-
"compassion"
|
|
15769
|
-
],
|
|
15770
|
-
domains: [
|
|
15771
|
-
"wellbeing",
|
|
15772
|
-
"coaching",
|
|
15773
|
-
"community"
|
|
15774
|
-
],
|
|
15775
|
-
tone: ["warm", "human"],
|
|
15776
|
-
presets: featurePreset
|
|
15777
|
-
},
|
|
15778
|
-
{
|
|
15779
|
-
id: "partnership",
|
|
15780
|
-
label: "Partnership",
|
|
15781
|
-
tags: [
|
|
15782
|
-
"partnership",
|
|
15783
|
-
"together",
|
|
15784
|
-
"support",
|
|
15785
|
-
"relationship",
|
|
15786
|
-
"collaboration"
|
|
15787
|
-
],
|
|
15788
|
-
domains: [
|
|
15789
|
-
"coaching",
|
|
15790
|
-
"community",
|
|
15791
|
-
"services"
|
|
15792
|
-
],
|
|
15793
|
-
tone: [
|
|
15794
|
-
"warm",
|
|
15795
|
-
"human",
|
|
15796
|
-
"trustworthy"
|
|
15797
|
-
],
|
|
15798
|
-
presets: featurePreset
|
|
15799
|
-
},
|
|
15800
|
-
{
|
|
15801
|
-
id: "warmth",
|
|
15802
|
-
label: "Warmth",
|
|
15803
|
-
tags: [
|
|
15804
|
-
"heart",
|
|
15805
|
-
"warmth",
|
|
15806
|
-
"care",
|
|
15807
|
-
"love",
|
|
15808
|
-
"wellbeing",
|
|
15809
|
-
"personal"
|
|
15810
|
-
],
|
|
15811
|
-
domains: [
|
|
15812
|
-
"wellbeing",
|
|
15813
|
-
"community",
|
|
15814
|
-
"hospitality"
|
|
15815
|
-
],
|
|
15816
|
-
tone: ["warm", "human"],
|
|
15817
|
-
presets: featurePreset
|
|
15818
|
-
},
|
|
15819
|
-
{
|
|
15820
|
-
id: "community",
|
|
15821
|
-
label: "Community",
|
|
15822
|
-
tags: [
|
|
15823
|
-
"community",
|
|
15824
|
-
"group",
|
|
15825
|
-
"people",
|
|
15826
|
-
"team",
|
|
15827
|
-
"members",
|
|
15828
|
-
"belonging"
|
|
15829
|
-
],
|
|
15830
|
-
domains: [
|
|
15831
|
-
"community",
|
|
15832
|
-
"education",
|
|
15833
|
-
"events"
|
|
15834
|
-
],
|
|
15835
|
-
tone: ["human", "warm"],
|
|
15836
|
-
presets: featurePreset
|
|
15837
|
-
},
|
|
15838
|
-
{
|
|
15839
|
-
id: "personal-guidance",
|
|
15840
|
-
label: "Personal guidance",
|
|
15841
|
-
tags: [
|
|
15842
|
-
"guidance",
|
|
15843
|
-
"personal",
|
|
15844
|
-
"coach",
|
|
15845
|
-
"expert",
|
|
15846
|
-
"one to one",
|
|
15847
|
-
"trusted"
|
|
15848
|
-
],
|
|
15849
|
-
domains: [
|
|
15850
|
-
"coaching",
|
|
15851
|
-
"services",
|
|
15852
|
-
"education"
|
|
15853
|
-
],
|
|
15854
|
-
tone: ["trustworthy", "human"],
|
|
15855
|
-
presets: featurePreset
|
|
15856
|
-
},
|
|
15857
|
-
{
|
|
15858
|
-
id: "conversation",
|
|
15859
|
-
label: "Conversation",
|
|
15860
|
-
tags: [
|
|
15861
|
-
"conversation",
|
|
15862
|
-
"talk",
|
|
15863
|
-
"chat",
|
|
15864
|
-
"communication",
|
|
15865
|
-
"support"
|
|
15866
|
-
],
|
|
15867
|
-
domains: [
|
|
15868
|
-
"coaching",
|
|
15869
|
-
"community",
|
|
15870
|
-
"services"
|
|
15871
|
-
],
|
|
15872
|
-
tone: ["human", "warm"],
|
|
15873
|
-
presets: featurePreset
|
|
15874
|
-
},
|
|
15875
|
-
{
|
|
15876
|
-
id: "friendly-welcome",
|
|
15877
|
-
label: "Friendly welcome",
|
|
15878
|
-
tags: [
|
|
15879
|
-
"friendly",
|
|
15880
|
-
"welcome",
|
|
15881
|
-
"positive",
|
|
15882
|
-
"happy",
|
|
15883
|
-
"approachable"
|
|
15884
|
-
],
|
|
15885
|
-
domains: [
|
|
15886
|
-
"hospitality",
|
|
15887
|
-
"community",
|
|
15888
|
-
"services"
|
|
15889
|
-
],
|
|
15890
|
-
tone: [
|
|
15891
|
-
"warm",
|
|
15892
|
-
"playful",
|
|
15893
|
-
"human"
|
|
15894
|
-
],
|
|
15895
|
-
presets: featurePreset
|
|
15896
|
-
},
|
|
15897
|
-
{
|
|
15898
|
-
id: "insight-learning",
|
|
15899
|
-
label: "Insight and learning",
|
|
15900
|
-
tags: [
|
|
15901
|
-
"mind",
|
|
15902
|
-
"insight",
|
|
15903
|
-
"learning",
|
|
15904
|
-
"clarity",
|
|
15905
|
-
"thinking",
|
|
15906
|
-
"therapy"
|
|
15907
|
-
],
|
|
15908
|
-
domains: [
|
|
15909
|
-
"wellbeing",
|
|
15910
|
-
"coaching",
|
|
15911
|
-
"education"
|
|
15912
|
-
],
|
|
15913
|
-
tone: ["calm", "practical"],
|
|
15914
|
-
presets: featurePreset
|
|
15915
|
-
},
|
|
15916
|
-
{
|
|
15917
|
-
id: "natural-wellbeing",
|
|
15918
|
-
label: "Natural wellbeing",
|
|
15919
|
-
tags: [
|
|
15920
|
-
"natural",
|
|
15921
|
-
"wellbeing",
|
|
15922
|
-
"growth",
|
|
15923
|
-
"eco",
|
|
15924
|
-
"calm",
|
|
15925
|
-
"organic"
|
|
15926
|
-
],
|
|
15927
|
-
domains: [
|
|
15928
|
-
"wellbeing",
|
|
15929
|
-
"hospitality",
|
|
15930
|
-
"creative"
|
|
15931
|
-
],
|
|
15932
|
-
tone: ["calm", "warm"],
|
|
15933
|
-
presets: featurePreset
|
|
15934
|
-
},
|
|
15935
|
-
{
|
|
15936
|
-
id: "growth",
|
|
15937
|
-
label: "Growth",
|
|
15938
|
-
tags: [
|
|
15939
|
-
"growth",
|
|
15940
|
-
"new",
|
|
15941
|
-
"progress",
|
|
15942
|
-
"development",
|
|
15943
|
-
"nurture"
|
|
15944
|
-
],
|
|
15945
|
-
domains: [
|
|
15946
|
-
"wellbeing",
|
|
15947
|
-
"coaching",
|
|
15948
|
-
"education",
|
|
15949
|
-
"community"
|
|
15950
|
-
],
|
|
15951
|
-
tone: ["warm", "calm"],
|
|
15952
|
-
presets: featurePreset
|
|
15953
|
-
},
|
|
15954
|
-
{
|
|
15955
|
-
id: "gentle-care",
|
|
15956
|
-
label: "Gentle care",
|
|
15957
|
-
tags: [
|
|
15958
|
-
"gentle",
|
|
15959
|
-
"soft",
|
|
15960
|
-
"care",
|
|
15961
|
-
"wellbeing",
|
|
15962
|
-
"beauty",
|
|
15963
|
-
"calm"
|
|
15964
|
-
],
|
|
15965
|
-
domains: [
|
|
15966
|
-
"wellbeing",
|
|
15967
|
-
"creative",
|
|
15968
|
-
"hospitality"
|
|
15969
|
-
],
|
|
15970
|
-
tone: [
|
|
15971
|
-
"warm",
|
|
15972
|
-
"calm",
|
|
15973
|
-
"premium"
|
|
15974
|
-
],
|
|
15975
|
-
presets: featurePreset
|
|
15976
|
-
},
|
|
15977
|
-
{
|
|
15978
|
-
id: "special-touch",
|
|
15979
|
-
label: "Special touch",
|
|
15980
|
-
tags: [
|
|
15981
|
-
"special",
|
|
15982
|
-
"sparkle",
|
|
15983
|
-
"magic",
|
|
15984
|
-
"polish",
|
|
15985
|
-
"delight",
|
|
15986
|
-
"creative"
|
|
15987
|
-
],
|
|
15988
|
-
domains: [
|
|
15989
|
-
"creative",
|
|
15990
|
-
"commerce",
|
|
15991
|
-
"hospitality"
|
|
15992
|
-
],
|
|
15993
|
-
tone: ["playful", "premium"],
|
|
15994
|
-
presets: featurePreset
|
|
15995
|
-
},
|
|
15996
|
-
{
|
|
15997
|
-
id: "ideas",
|
|
15998
|
-
label: "Ideas",
|
|
15999
|
-
tags: [
|
|
16000
|
-
"idea",
|
|
16001
|
-
"innovation",
|
|
16002
|
-
"clarity",
|
|
16003
|
-
"creative",
|
|
16004
|
-
"strategy"
|
|
16005
|
-
],
|
|
16006
|
-
domains: [
|
|
16007
|
-
"coaching",
|
|
16008
|
-
"education",
|
|
16009
|
-
"creative",
|
|
16010
|
-
"technology"
|
|
16011
|
-
],
|
|
16012
|
-
tone: ["practical", "playful"],
|
|
16013
|
-
presets: featurePreset
|
|
16014
|
-
},
|
|
16015
|
-
{
|
|
16016
|
-
id: "direction",
|
|
16017
|
-
label: "Direction",
|
|
16018
|
-
tags: [
|
|
16019
|
-
"direction",
|
|
16020
|
-
"navigation",
|
|
16021
|
-
"path",
|
|
16022
|
-
"journey",
|
|
16023
|
-
"guidance"
|
|
16024
|
-
],
|
|
16025
|
-
domains: [
|
|
16026
|
-
"coaching",
|
|
16027
|
-
"education",
|
|
16028
|
-
"services"
|
|
16029
|
-
],
|
|
16030
|
-
tone: ["trustworthy", "practical"],
|
|
16031
|
-
presets: featurePreset
|
|
16032
|
-
},
|
|
16033
|
-
{
|
|
16034
|
-
id: "focus",
|
|
16035
|
-
label: "Focus",
|
|
16036
|
-
tags: [
|
|
16037
|
-
"focus",
|
|
16038
|
-
"goal",
|
|
16039
|
-
"outcome",
|
|
16040
|
-
"aim",
|
|
16041
|
-
"strategy"
|
|
16042
|
-
],
|
|
16043
|
-
domains: [
|
|
16044
|
-
"coaching",
|
|
16045
|
-
"services",
|
|
16046
|
-
"technology"
|
|
16047
|
-
],
|
|
16048
|
-
tone: ["practical"],
|
|
16049
|
-
presets: featurePreset
|
|
16050
|
-
},
|
|
16051
|
-
{
|
|
16052
|
-
id: "quality",
|
|
16053
|
-
label: "Quality",
|
|
16054
|
-
tags: [
|
|
16055
|
-
"quality",
|
|
16056
|
-
"award",
|
|
16057
|
-
"standard",
|
|
16058
|
-
"achievement",
|
|
16059
|
-
"premium"
|
|
16060
|
-
],
|
|
16061
|
-
domains: [
|
|
16062
|
-
"services",
|
|
16063
|
-
"education",
|
|
16064
|
-
"commerce"
|
|
16065
|
-
],
|
|
16066
|
-
tone: ["premium", "trustworthy"],
|
|
16067
|
-
presets: featurePreset
|
|
16068
|
-
},
|
|
16069
|
-
{
|
|
16070
|
-
id: "highlight",
|
|
16071
|
-
label: "Highlight",
|
|
16072
|
-
tags: [
|
|
16073
|
-
"highlight",
|
|
16074
|
-
"featured",
|
|
16075
|
-
"favorite",
|
|
16076
|
-
"quality",
|
|
16077
|
-
"special"
|
|
16078
|
-
],
|
|
16079
|
-
domains: [
|
|
16080
|
-
"creative",
|
|
16081
|
-
"commerce",
|
|
16082
|
-
"services"
|
|
16083
|
-
],
|
|
16084
|
-
tone: ["playful", "premium"],
|
|
16085
|
-
presets: featurePreset
|
|
16086
|
-
},
|
|
16087
|
-
{
|
|
16088
|
-
id: "verified-quality",
|
|
16089
|
-
label: "Verified quality",
|
|
16090
|
-
tags: [
|
|
16091
|
-
"verified",
|
|
16092
|
-
"quality",
|
|
16093
|
-
"approved",
|
|
16094
|
-
"trusted",
|
|
16095
|
-
"check"
|
|
16096
|
-
],
|
|
16097
|
-
domains: [
|
|
16098
|
-
"services",
|
|
16099
|
-
"commerce",
|
|
16100
|
-
"education"
|
|
16101
|
-
],
|
|
16102
|
-
tone: ["trustworthy", "practical"],
|
|
16103
|
-
presets: featurePreset
|
|
16104
|
-
},
|
|
16105
|
-
{
|
|
16106
|
-
id: "learning",
|
|
16107
|
-
label: "Learning",
|
|
16108
|
-
tags: [
|
|
16109
|
-
"learning",
|
|
16110
|
-
"book",
|
|
16111
|
-
"course",
|
|
16112
|
-
"knowledge",
|
|
16113
|
-
"education"
|
|
16114
|
-
],
|
|
16115
|
-
domains: [
|
|
16116
|
-
"education",
|
|
16117
|
-
"coaching",
|
|
16118
|
-
"community"
|
|
16119
|
-
],
|
|
16120
|
-
tone: ["calm", "practical"],
|
|
16121
|
-
presets: featurePreset
|
|
16122
|
-
},
|
|
16123
|
-
{
|
|
16124
|
-
id: "training",
|
|
16125
|
-
label: "Training",
|
|
16126
|
-
tags: [
|
|
16127
|
-
"training",
|
|
16128
|
-
"course",
|
|
16129
|
-
"qualification",
|
|
16130
|
-
"school",
|
|
16131
|
-
"education"
|
|
16132
|
-
],
|
|
16133
|
-
domains: ["education", "coaching"],
|
|
16134
|
-
tone: ["trustworthy", "practical"],
|
|
16135
|
-
presets: featurePreset
|
|
16136
|
-
},
|
|
16137
|
-
{
|
|
16138
|
-
id: "programmes-dates",
|
|
16139
|
-
label: "Programmes and dates",
|
|
16140
|
-
tags: [
|
|
16141
|
-
"calendar",
|
|
16142
|
-
"dates",
|
|
16143
|
-
"schedule",
|
|
16144
|
-
"events",
|
|
16145
|
-
"programme",
|
|
16146
|
-
"classes"
|
|
16147
|
-
],
|
|
16148
|
-
domains: [
|
|
16149
|
-
"events",
|
|
16150
|
-
"education",
|
|
16151
|
-
"community"
|
|
16152
|
-
],
|
|
16153
|
-
tone: ["practical"],
|
|
16154
|
-
presets: featurePreset
|
|
16155
|
-
},
|
|
16156
|
-
{
|
|
16157
|
-
id: "place",
|
|
16158
|
-
label: "Place",
|
|
16159
|
-
tags: [
|
|
16160
|
-
"place",
|
|
16161
|
-
"location",
|
|
16162
|
-
"local",
|
|
16163
|
-
"venue",
|
|
16164
|
-
"destination"
|
|
16165
|
-
],
|
|
16166
|
-
domains: [
|
|
16167
|
-
"events",
|
|
16168
|
-
"hospitality",
|
|
16169
|
-
"services"
|
|
16170
|
-
],
|
|
16171
|
-
tone: ["practical"],
|
|
16172
|
-
presets: featurePreset
|
|
16173
|
-
},
|
|
16174
|
-
{
|
|
16175
|
-
id: "products",
|
|
16176
|
-
label: "Products",
|
|
16177
|
-
tags: [
|
|
16178
|
-
"products",
|
|
16179
|
-
"shop",
|
|
16180
|
-
"store",
|
|
16181
|
-
"retail",
|
|
16182
|
-
"commerce"
|
|
16183
|
-
],
|
|
16184
|
-
domains: ["commerce"],
|
|
16185
|
-
tone: ["practical", "premium"],
|
|
16186
|
-
presets: featurePreset
|
|
16187
|
-
},
|
|
16188
|
-
{
|
|
16189
|
-
id: "packages",
|
|
16190
|
-
label: "Packages",
|
|
16191
|
-
tags: [
|
|
16192
|
-
"package",
|
|
16193
|
-
"bundle",
|
|
16194
|
-
"delivery",
|
|
16195
|
-
"offer",
|
|
16196
|
-
"product"
|
|
16197
|
-
],
|
|
16198
|
-
domains: ["commerce", "services"],
|
|
16199
|
-
tone: ["practical"],
|
|
16200
|
-
presets: featurePreset
|
|
16201
|
-
},
|
|
16202
|
-
{
|
|
16203
|
-
id: "time",
|
|
16204
|
-
label: "Time",
|
|
16205
|
-
tags: [
|
|
16206
|
-
"time",
|
|
16207
|
-
"duration",
|
|
16208
|
-
"schedule",
|
|
16209
|
-
"availability",
|
|
16210
|
-
"appointment"
|
|
16211
|
-
],
|
|
16212
|
-
domains: [
|
|
16213
|
-
"events",
|
|
16214
|
-
"services",
|
|
16215
|
-
"wellbeing"
|
|
16216
|
-
],
|
|
16217
|
-
tone: ["practical", "calm"],
|
|
16218
|
-
presets: featurePreset
|
|
16219
|
-
},
|
|
16220
|
-
{
|
|
16221
|
-
id: "practical-service",
|
|
16222
|
-
label: "Practical service",
|
|
16223
|
-
tags: [
|
|
16224
|
-
"service",
|
|
16225
|
-
"repair",
|
|
16226
|
-
"setup",
|
|
16227
|
-
"practical",
|
|
16228
|
-
"tools",
|
|
16229
|
-
"support"
|
|
16230
|
-
],
|
|
16231
|
-
domains: ["services", "technology"],
|
|
16232
|
-
tone: ["practical"],
|
|
16233
|
-
presets: featurePreset
|
|
16234
|
-
},
|
|
16235
|
-
{
|
|
16236
|
-
id: "at-home",
|
|
16237
|
-
label: "At home",
|
|
16238
|
-
tags: [
|
|
16239
|
-
"home",
|
|
16240
|
-
"domestic",
|
|
16241
|
-
"comfort",
|
|
16242
|
-
"local",
|
|
16243
|
-
"space"
|
|
16244
|
-
],
|
|
16245
|
-
domains: [
|
|
16246
|
-
"hospitality",
|
|
16247
|
-
"services",
|
|
16248
|
-
"community"
|
|
16249
|
-
],
|
|
16250
|
-
tone: ["warm", "calm"],
|
|
16251
|
-
presets: featurePreset
|
|
16252
|
-
},
|
|
16253
|
-
{
|
|
16254
|
-
id: "worldwide",
|
|
16255
|
-
label: "Worldwide",
|
|
16256
|
-
tags: [
|
|
16257
|
-
"global",
|
|
16258
|
-
"online",
|
|
16259
|
-
"worldwide",
|
|
16260
|
-
"remote",
|
|
16261
|
-
"international"
|
|
16262
|
-
],
|
|
16263
|
-
domains: [
|
|
16264
|
-
"technology",
|
|
16265
|
-
"education",
|
|
16266
|
-
"services"
|
|
16267
|
-
],
|
|
16268
|
-
tone: ["practical"],
|
|
16269
|
-
presets: featurePreset
|
|
16270
|
-
},
|
|
16271
|
-
{
|
|
16272
|
-
id: "professional-service",
|
|
16273
|
-
label: "Professional service",
|
|
16274
|
-
tags: [
|
|
16275
|
-
"business",
|
|
16276
|
-
"professional",
|
|
16277
|
-
"consulting",
|
|
16278
|
-
"service",
|
|
16279
|
-
"work"
|
|
16280
|
-
],
|
|
16281
|
-
domains: [
|
|
16282
|
-
"services",
|
|
16283
|
-
"technology",
|
|
16284
|
-
"coaching"
|
|
16285
|
-
],
|
|
16286
|
-
tone: ["practical", "trustworthy"],
|
|
16287
|
-
presets: featurePreset
|
|
16288
|
-
}
|
|
16289
|
-
];
|
|
16290
|
-
SEMANTIC_ICON_DEFINITIONS.map(({ id, label }) => ({
|
|
16291
|
-
id,
|
|
16292
|
-
label
|
|
16293
|
-
}));
|
|
16294
|
-
function isSemanticIconId(value) {
|
|
16295
|
-
return typeof value === "string" && SEMANTIC_ICON_IDS.includes(value);
|
|
16296
|
-
}
|
|
16297
|
-
function getSemanticIconComponent(name) {
|
|
16298
|
-
if (!isSemanticIconId(name)) return null;
|
|
16299
|
-
return SEMANTIC_ICON_COMPONENTS[name] ?? null;
|
|
16300
|
-
}
|
|
16301
|
-
//#endregion
|
|
16302
|
-
//#region ../blocks/src/system/icons/presets.ts
|
|
16303
|
-
const ICON_PICKER_PRESETS = ["cta", "feature"];
|
|
16304
|
-
//#endregion
|
|
16305
|
-
//#region ../blocks/src/system/icons/social.tsx
|
|
16306
|
-
const SOCIAL_ICON_NAMES = [
|
|
16307
|
-
"SocialFacebook",
|
|
16308
|
-
"SocialInstagram",
|
|
16309
|
-
"SocialLinkedIn",
|
|
16310
|
-
"SocialTikTok",
|
|
16311
|
-
"SocialWhatsApp",
|
|
16312
|
-
"SocialX",
|
|
16313
|
-
"SocialYouTube"
|
|
16314
|
-
];
|
|
16315
|
-
const socialIcons = {
|
|
16316
|
-
SocialFacebook: createIcon("SocialFacebookIcon", /* @__PURE__ */ jsx("path", { d: "M14 8h3V4h-3c-3 0-5 2-5 5v3H6v4h3v6h4v-6h3l1-4h-4V9c0-.7.3-1 1-1Z" })),
|
|
16317
|
-
SocialInstagram: createIcon("SocialInstagramIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16318
|
-
/* @__PURE__ */ jsx("rect", {
|
|
16319
|
-
x: "3",
|
|
16320
|
-
y: "3",
|
|
16321
|
-
width: "18",
|
|
16322
|
-
height: "18",
|
|
16323
|
-
rx: "5"
|
|
16324
|
-
}),
|
|
16325
|
-
/* @__PURE__ */ jsx("circle", {
|
|
16326
|
-
cx: "12",
|
|
16327
|
-
cy: "12",
|
|
16328
|
-
r: "4"
|
|
16329
|
-
}),
|
|
16330
|
-
/* @__PURE__ */ jsx("circle", {
|
|
16331
|
-
cx: "17.5",
|
|
16332
|
-
cy: "6.5",
|
|
16333
|
-
r: ".75",
|
|
16334
|
-
fill: "currentColor",
|
|
16335
|
-
stroke: "none"
|
|
16336
|
-
})
|
|
16337
|
-
] })),
|
|
16338
|
-
SocialLinkedIn: createIcon("SocialLinkedInIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16339
|
-
/* @__PURE__ */ jsx("path", { d: "M6 9v10" }),
|
|
16340
|
-
/* @__PURE__ */ jsx("path", {
|
|
16341
|
-
d: "M6 5.5v.01",
|
|
16342
|
-
strokeWidth: "3"
|
|
16343
|
-
}),
|
|
16344
|
-
/* @__PURE__ */ jsx("path", { d: "M10.5 19v-6a4 4 0 0 1 8 0v6" }),
|
|
16345
|
-
/* @__PURE__ */ jsx("path", { d: "M10.5 9v10" })
|
|
16346
|
-
] })),
|
|
16347
|
-
SocialTikTok: createIcon("SocialTikTokIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M14 4v11.5a4.5 4.5 0 1 1-4-4.47" }), /* @__PURE__ */ jsx("path", { d: "M14 4c.7 3 2.4 4.5 5 4.5" })] })),
|
|
16348
|
-
SocialWhatsApp: createIcon("SocialWhatsAppIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M3.5 20.5 4.8 16.4A8.5 8.5 0 1 1 8 19.3Z" }), /* @__PURE__ */ jsx("path", { d: "M9.2 8.2c.2-.5.9-.6 1.2-.1l.8 1.4c.2.3.1.7-.2 1l-.5.5c.5 1.1 1.4 2 2.5 2.5l.5-.5c.3-.3.7-.4 1-.2l1.4.8c.5.3.4 1-.1 1.2-2.9 1.1-7.7-3.7-6.6-6.6Z" })] })),
|
|
16349
|
-
SocialX: createIcon("SocialXIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m5 4 14 16" }), /* @__PURE__ */ jsx("path", { d: "M19 4 5 20" })] })),
|
|
16350
|
-
SocialYouTube: createIcon("SocialYouTubeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M21 12c0 3.5-.5 5.5-1.3 6.3S16.5 19.5 12 19.5s-6.9-.4-7.7-1.2S3 15.5 3 12s.5-5.5 1.3-6.3S7.5 4.5 12 4.5s6.9.4 7.7 1.2S21 8.5 21 12Z" }), /* @__PURE__ */ jsx("path", { d: "m10 9 5 3-5 3Z" })] }))
|
|
16351
|
-
};
|
|
16352
|
-
function isSocialIconName(value) {
|
|
16353
|
-
return typeof value === "string" && SOCIAL_ICON_NAMES.includes(value);
|
|
16354
|
-
}
|
|
16355
|
-
function getSocialIconComponent(value) {
|
|
16356
|
-
return isSocialIconName(value) ? socialIcons[value] : null;
|
|
16357
|
-
}
|
|
16358
|
-
//#endregion
|
|
16359
|
-
//#region ../blocks/src/system/icons/registry.ts
|
|
16360
|
-
function buildSearchText(parts) {
|
|
16361
|
-
return parts.map((part) => part.trim()).filter(Boolean).join(" ");
|
|
16362
|
-
}
|
|
16363
|
-
function semanticDefinitionToOption(definition, preset) {
|
|
16364
|
-
return {
|
|
16365
|
-
id: definition.id,
|
|
16366
|
-
label: definition.label,
|
|
16367
|
-
searchText: buildSearchText([
|
|
16368
|
-
definition.label,
|
|
16369
|
-
definition.id,
|
|
16370
|
-
...definition.tags,
|
|
16371
|
-
...definition.domains,
|
|
16372
|
-
...definition.tone
|
|
16373
|
-
]),
|
|
16374
|
-
preset
|
|
16375
|
-
};
|
|
16376
|
-
}
|
|
16377
|
-
CTA_ICON_OPTIONS.map((option) => ({
|
|
16378
|
-
id: option.id,
|
|
16379
|
-
label: option.label,
|
|
16380
|
-
searchText: buildSearchText([option.label, option.id]),
|
|
16381
|
-
preset: "cta"
|
|
16382
|
-
}));
|
|
16383
|
-
function semanticOptionsForPreset(preset) {
|
|
16384
|
-
return SEMANTIC_ICON_DEFINITIONS.filter((definition) => definition.presets.includes(preset)).map((definition) => semanticDefinitionToOption(definition, preset));
|
|
16385
|
-
}
|
|
16386
|
-
semanticOptionsForPreset("feature");
|
|
16387
|
-
function getIconComponent(name) {
|
|
16388
|
-
return getCtaIconComponent(name) ?? getSemanticIconComponent(name) ?? getSocialIconComponent(name);
|
|
16389
|
-
}
|
|
16390
|
-
//#endregion
|
|
16391
|
-
//#region ../blocks/src/system/runtime/shared/components/ThemedButton.tsx
|
|
16392
|
-
function themedButtonClasses(variant, size, extraClassName) {
|
|
16393
|
-
return [
|
|
16394
|
-
...themeButtonVariantClassNames(variant),
|
|
16395
|
-
themeButtonSizeClassName(size),
|
|
16396
|
-
extraClassName
|
|
16397
|
-
].filter(Boolean).join(" ");
|
|
16398
|
-
}
|
|
16399
|
-
function ThemedButtonLabel(props) {
|
|
16400
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16401
|
-
props.pending ? /* @__PURE__ */ jsx(SpinnerNode, {
|
|
16402
|
-
size: props.pending.spinnerSize ?? "sm",
|
|
16403
|
-
color: "inherit",
|
|
16404
|
-
className: props.pending.spinnerClassName ?? "rb-mr-2",
|
|
16405
|
-
srLabel: props.pending.srLabel
|
|
16406
|
-
}) : null,
|
|
16407
|
-
props.labelClassName ? /* @__PURE__ */ jsx("span", {
|
|
16408
|
-
className: props.labelClassName,
|
|
16409
|
-
children: props.pending?.label ?? props.label
|
|
16410
|
-
}) : props.pending?.label ?? props.label,
|
|
16411
|
-
props.screenReaderSuffix ? /* @__PURE__ */ jsx("span", {
|
|
16412
|
-
className: "rb-sr-only",
|
|
16413
|
-
children: props.screenReaderSuffix
|
|
16414
|
-
}) : null
|
|
16415
|
-
] });
|
|
16416
|
-
return props.pending?.contentClassName ? /* @__PURE__ */ jsx("span", {
|
|
16417
|
-
className: props.pending.contentClassName,
|
|
16418
|
-
children: content
|
|
16419
|
-
}) : content;
|
|
16420
|
-
}
|
|
16421
|
-
function ThemedButton({ variant, size, extraClassName, screenReaderSuffix, labelClassName, pending, label, ...buttonProps }) {
|
|
16422
|
-
return /* @__PURE__ */ jsx("button", {
|
|
16423
|
-
...buttonProps,
|
|
16424
|
-
className: themedButtonClasses(variant, size, extraClassName),
|
|
16425
|
-
children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
|
|
16426
|
-
label,
|
|
16427
|
-
pending,
|
|
16428
|
-
screenReaderSuffix,
|
|
16429
|
-
labelClassName
|
|
16430
|
-
})
|
|
16431
|
-
});
|
|
16432
|
-
}
|
|
16433
|
-
function ThemedButtonLink({ variant, size, extraClassName, screenReaderSuffix, labelClassName, label, ...anchorProps }) {
|
|
16434
|
-
return /* @__PURE__ */ jsx("a", {
|
|
16435
|
-
...anchorProps,
|
|
16436
|
-
className: themedButtonClasses(variant, size, extraClassName),
|
|
16437
|
-
children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
|
|
16438
|
-
label,
|
|
16439
|
-
screenReaderSuffix,
|
|
16440
|
-
labelClassName
|
|
16441
|
-
})
|
|
16442
|
-
});
|
|
16443
|
-
}
|
|
16444
|
-
/** Fixed icon-only actions control; callers cannot supply icon children. */
|
|
16445
|
-
function ThemedActionsButton({ variant, size, extraClassName, ...buttonProps }) {
|
|
16446
|
-
return /* @__PURE__ */ jsx("button", {
|
|
16447
|
-
...buttonProps,
|
|
16448
|
-
"aria-label": "Actions",
|
|
16449
|
-
className: themedButtonClasses(variant, size, extraClassName),
|
|
16450
|
-
children: /* @__PURE__ */ jsxs("svg", {
|
|
16451
|
-
width: "16",
|
|
16452
|
-
height: "16",
|
|
16453
|
-
viewBox: "0 0 16 16",
|
|
16454
|
-
fill: "currentColor",
|
|
16455
|
-
"aria-hidden": "true",
|
|
16456
|
-
children: [
|
|
16457
|
-
/* @__PURE__ */ jsx("circle", {
|
|
16458
|
-
cx: "8",
|
|
16459
|
-
cy: "3",
|
|
16460
|
-
r: "1.5"
|
|
16461
|
-
}),
|
|
16462
|
-
/* @__PURE__ */ jsx("circle", {
|
|
16463
|
-
cx: "8",
|
|
16464
|
-
cy: "8",
|
|
16465
|
-
r: "1.5"
|
|
16466
|
-
}),
|
|
16467
|
-
/* @__PURE__ */ jsx("circle", {
|
|
16468
|
-
cx: "8",
|
|
16469
|
-
cy: "13",
|
|
16470
|
-
r: "1.5"
|
|
16471
|
-
})
|
|
16472
|
-
]
|
|
16473
|
-
})
|
|
16474
|
-
});
|
|
16475
|
-
}
|
|
16476
|
-
/** Fixed semantic download affordance; callers cannot supply arbitrary icon children. */
|
|
16477
|
-
function ThemedDownloadLink({ variant, size, extraClassName, label, screenReaderSuffix, labelClassName, ...anchorProps }) {
|
|
16478
|
-
return /* @__PURE__ */ jsxs("a", {
|
|
16479
|
-
...anchorProps,
|
|
16480
|
-
className: themedButtonClasses(variant, size, extraClassName),
|
|
16481
|
-
children: [/* @__PURE__ */ jsx(DownloadIcon, {
|
|
16482
|
-
"aria-hidden": "true",
|
|
16483
|
-
size: 24
|
|
16484
|
-
}), /* @__PURE__ */ jsx(ThemedButtonLabel, {
|
|
16485
|
-
label,
|
|
16486
|
-
screenReaderSuffix,
|
|
16487
|
-
labelClassName
|
|
16488
|
-
})]
|
|
16489
|
-
});
|
|
16490
|
-
}
|
|
16491
|
-
/** Boundary for authored button nodes and their registry-backed trailing icon. */
|
|
16492
|
-
function ThemedAuthoredButton({ label, href, variant, size, extraClassName, disabled, type = "button", target, rel, ariaLabel, dataTestId, trailingIcon, onClick }) {
|
|
16493
|
-
const affordance = resolveButtonAffordance({ trailingIcon });
|
|
16494
|
-
const Icon = affordance ? getIconComponent(affordance.iconId) : null;
|
|
16495
|
-
const className = variant ? themedButtonClasses(variant, size, Icon ? [extraClassName, themeButtonExtraClassesWithTrailingIcon()].filter(Boolean).join(" ") : extraClassName) : extraClassName ?? void 0;
|
|
16496
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [label, Icon ? /* @__PURE__ */ jsx(Icon, {
|
|
16497
|
-
"aria-hidden": true,
|
|
16498
|
-
className: "rb-ml-2 rb-h-4 rb-w-4 rb-inline-block"
|
|
16499
|
-
}) : null] });
|
|
16500
|
-
return href ? /* @__PURE__ */ jsx("a", {
|
|
16501
|
-
href,
|
|
16502
|
-
target,
|
|
16503
|
-
rel,
|
|
16504
|
-
"aria-label": ariaLabel,
|
|
16505
|
-
"data-testid": dataTestId,
|
|
16506
|
-
className,
|
|
16507
|
-
onClick,
|
|
16508
|
-
children: content
|
|
16509
|
-
}) : /* @__PURE__ */ jsx("button", {
|
|
16510
|
-
type,
|
|
16511
|
-
disabled,
|
|
16512
|
-
"aria-label": ariaLabel,
|
|
16513
|
-
"data-testid": dataTestId,
|
|
16514
|
-
className,
|
|
16515
|
-
onClick,
|
|
16516
|
-
children: content
|
|
16517
|
-
});
|
|
16518
|
-
}
|
|
16519
|
-
//#endregion
|
|
16520
|
-
export { FONT_WEIGHT_MAP as $, borderColorStyle as $n, asDesignEntryId as $t, planFlexibleBalanceCreditFirst as A, resolveOnColorForThemeToken as An, resolveFlexibleBalancePaymentEligibility as Ar, navLinkOwnsHoverForeground as At, generateMobileOverlayBackdropFilterFix as B, expandPalette as Bn, generateCardCss as Bt, checkBrowserStripeKey as C, toNonEmptyReadonlyArray as Cn, mediaPosterSchema as Cr, generateInteractiveChildInheritanceCSS as Ct, getStripeMinimumChargeRequirement as D, opaqueSurfaceContextFromTheme as Dn, validateBookingPaymentOptionKinds as Dr, NAV_LINK_PADDING_X_MAP as Dt, checkoutCopy as E, surfaceDecorationColors as En, runtimeMediaSchema as Er, NAV_LINK_PADDING_MAP as Et, getBookingLaterInstalments as F, unsafeAsOpaqueButtonColourToken as Fn, runtimeBoxBackgroundSchema as Ft, MQ_SM_DOWN as G, hexColorSchema as Gn, cardVariantRoleValues as Gt, renderHeaderPaintTargetRules as H, planForegroundHover as Hn, generateShadowValue as Ht, corners as I, selectLogoVariant as In, pageDesignEditorBackgroundOverrideOwner as It, headerVariantValues as J, paletteValueKey as Jn, asBlockContentVersionId as Jt, MQ_SM_UP as K, paletteColorsSchema as Kn, normalizeCardRole as Kt, headerPositioningValues as L, surfaceToneFromForegroundToken as Ln, siteChromeBackgroundOverrideOwner as Lt, repriceBookingCollectionOptions as M, resolveTokenOrCssColorValue as Mn, formatCurrencyAmount as Mr, navEffectPolicy as Mt, resolveAvailableBookingCollectionOptions as N, generateShadowValue$1 as Nn, formatGiftCardAmountLabel as Nr, boxBackgroundOverlaySchema as Nt, confirmationPaymentSchema as O, opaqueSurfaceDeclarations as On, formatOrderInstalmentStatusLabel as Or, NAV_LINK_TEXT_SIZE_MAP as Ot, resolveBookingCollectionOptionFacts as P, PUBLIC_BUTTON_ROLES as Pn, boxBackgroundSchema as Pt, parseCustomCssRules as Q, backgroundColorStyle as Qn, asDesignBoundaryId as Qt, themeSchema as R, resolveSurfaceForeground as Rn, stripStaleTransitionStyleGroup as Rt, clsx as S, tileTreatmentValues as Sn, surfaceForegroundValueWithOpacity as Sr, generateBaseInteractiveCSS as St, parseEventRegistrationErrorReason as T, resolveSurface as Tn, persistableMediaSchema as Tr, NAV_LINK_LETTER_SPACING_MAP as Tt, MQ_LG_UP as U, resolveConcreteColorHex as Un, cardRoleSchema as Ut, getHeaderPaintTargets as V, getTextColorForBackground as Vn, renderCssDeclarations as Vt, MQ_MD_DOWN as W, resolveOpaqueSurfaceHex as Wn, cardRoleValues as Wt, getComponentShadowVar as X, requirePaletteColorsFromEntries as Xn, asBoundaryOptionId as Xt, getComponentBorderWidthPx as Y, paletteValueKeySchema as Yn, asBlockOrderIndex as Yt, parseBlockCustomCssRules as Z, TokenResolver as Zn, asDesignBlockId as Zt, FileAudioIcon as _, offeringsPreviewCompositionTreatmentValues as _n, SURFACE_FOREGROUND_CSS_VARS as _r, brandDisplayModeValues as _t, ThemedDownloadLink as a, assertNever$1 as an, parseThemeColorToken as ar, ACCORDION_TRIGGER_FONT_SCALE as at, MinusIcon as b, requireNonEmptyReadonlyArray as bn, surfaceForegroundStyle as br, buttonStyleSelectionSchema as bt, isSemanticIconId as c, defineFrameCapability as cn, buildThemeTokens as cr, ICON_SIZE_PX as ct, ChevronDownIcon as d, featureCardCompositionTreatmentValues as dn, contrastRatio as dr, generateDefaultButtonSystem as dt, asDesignPageId as en, cssVarValue as er, INPUT_FONT_SIZE_MAP as et, CircleMinusIcon as f, flushPanelFrame as fn, relativeLuminance as fr, parseThemeButtonVariantId as ft, FileArchiveIcon as g, noHeadingDecoration as gn, DEFAULT_SURFACE_TEXT_COLOR as gr, headerInteractionQuietPalette as gt, ExternalLinkIcon as h, makeBoundaryId as hn, rgbToHex as hr, headerInteractionPaletteValues as ht, ThemedButtonLink as i, asSiteStyleId as in, textColorValue as ir, ACCORDION_SPACING_MAP as it, isBookingCollectionEquivalentToUpfront as j, resolveThemeColorReferenceValue as jn, parsePositiveMoneyInputToCents as jr, navLinkOwnsUnderline as jt, planCheckoutPaymentFlow as k, isCssColorLiteral as kn, getBookingInstalmentPlanIntervalCount as kr, navLinkHoverColorCandidate as kt, SpinnerNode as l, eventListTreatmentValues as ln, defaultThemeTokens as lr, generateButtonActionLayoutCss as lt, ClockIcon as m, introCompositionTreatmentValues as mn, hexToRgb as mr, skinTokenCssVars as mt, ThemedAuthoredButton as n, asLayoutVariantKey as nn, rgbColorValue as nr, LABEL_FONT_SIZE_MAP as nt, getIconComponent as o, defineBlockDesignCapability as on, themeColorShadeSteps as or, ACCORDION_TRIGGER_LETTER_SPACING as ot, CirclePlusIcon as p, headingDecorationColorTokenValues as pn, featuresFromHex as pr, parseThemeForPersistence as pt, MQ_TABLET_ONLY as q, paletteModeSchema as qn, asAppearancePresetId as qt, ThemedButton as r, asPageFlowPresetId as rn, textColorStyle as rr, ACCORDION_OPEN_ACCENT_THICKNESS as rt, ICON_PICKER_PRESETS as s, defineExactCatalog as sn, parseBlockColorToken as sr, ICON_CONFIG as st, ThemedActionsButton as t, asDesignSystemTemplateId as tn, mergeStyles as tr, INPUT_SPACING_MAP as tt, ArrowDownIcon as u, eyebrowTreatmentValues as un, parseColorTokenParts as ur, generateButtonCss as ut, FileSpreadsheetIcon as v, panelFrame as vn, surfaceForegroundDeclarations as vr, logoSizePolicyValues as vt, eventRegistrationErrors as w, visibleHeadingDecorationFamilyValues as wn, mediaSchema as wr, NAV_LINK_BORDER_RADIUS_MAP as wt, PlusIcon as x, testimonialsCompositionTreatmentValues as xn, surfaceForegroundValue as xr, generateEffectsCSS as xt, FileTextIcon as y, plainFrame as yn, surfaceForegroundInputFromResolved as yr, defaultButtonStyleSelectionFor as yt, generateHeaderScrollTreatmentStyles as z, safeTokenOr as zn, themeV2RuntimeStyleFieldNames as zt };
|
|
15281
|
+
export { navLinkOwnsUnderline as $, indexRenderableMediaAssets as $n, serializeSurfaceTree as $t, generateDefaultButtonSystem as A, rgbColorValue as An, defineFrameCapability as At, logoSizePolicyValues as B, hexToRgb as Bn, panelFrame as Bt, ACCORDION_SPACING_MAP as C, paletteValueKeySchema as Cn, asDesignSystemTemplateId as Ct, ICON_SIZE_PX as D, borderColorStyle as Dn, assertNever as Dt, ICON_CONFIG as E, backgroundColorStyle as En, asSiteStyleId as Et, parseThemeForPersistence as F, parseBlockColorToken as Fn, headingDecorationColorTokenValues as Ft, generateInteractiveChildInheritanceCSS as G, surfaceForegroundStyle as Gn, toNonEmptyReadonlyArray as Gt, buttonStyleSelectionSchema as H, SURFACE_FOREGROUND_CSS_VARS as Hn, requireNonEmptyReadonlyArray as Ht, skinTokenCssVars as I, buildThemeTokens as In, introCompositionTreatmentValues as It, NAV_LINK_PADDING_MAP as J, mediaSchema as Jn, opaqueSurfaceContextFromTheme as Jt, NAV_LINK_BORDER_RADIUS_MAP as K, surfaceForegroundValue as Kn, visibleHeadingDecorationFamilyValues as Kt, headerInteractionPaletteValues as L, defaultThemeTokens as Ln, makeBoundaryId as Lt, themeButtonExtraClassesWithTrailingIcon as M, textColorValue as Mn, eyebrowTreatmentValues as Mt, themeButtonSizeClassName as N, parseThemeColorToken as Nn, featureCardCompositionTreatmentValues as Nt, generateButtonActionLayoutCss as O, cssVarValue as On, defineBlockDesignCapability as Ot, themeButtonVariantClassNames as P, themeColorShadeSteps as Pn, flushPanelFrame as Pt, navLinkOwnsHoverForeground as Q, renderableMediaAssetSchema as Qn, resolveSurface as Qt, headerInteractionQuietPalette as R, parseColorTokenParts as Rn, noHeadingDecoration as Rt, ACCORDION_OPEN_ACCENT_THICKNESS as S, paletteValueKey as Sn, asDesignPageId as St, ACCORDION_TRIGGER_LETTER_SPACING as T, TokenResolver as Tn, asPageFlowPresetId as Tt, generateEffectsCSS as U, surfaceForegroundDeclarations as Un, testimonialsCompositionTreatmentValues as Ut, defaultButtonStyleSelectionFor as V, DEFAULT_SURFACE_TEXT_COLOR as Vn, plainFrame as Vt, generateBaseInteractiveCSS as W, surfaceForegroundInputFromResolved as Wn, tileTreatmentValues as Wt, NAV_LINK_TEXT_SIZE_MAP as X, runtimeMediaSchema as Xn, parseResolvedSurface as Xt, NAV_LINK_PADDING_X_MAP as Y, persistableMediaSchema as Yn, opaqueSurfaceDeclarations as Yt, navLinkHoverColorCandidate as Z, buildRenderableMediaAssetIndex as Zn, parseSurfaceTree as Zt, parseCustomCssRules as _, resolveConcreteColorHex as _n, unsafeAsSiteId as _r, asBlockOrderIndex as _t, generateMobileOverlayBackdropFilterFix as a, resolveThemeColorReferenceValue as an, parseContentVersionId as ar, siteChromeBackgroundOverrideOwner as at, INPUT_SPACING_MAP as b, paletteColorsSchema as bn, err as br, asDesignBoundaryId as bt, MQ_LG_UP as c, PUBLIC_BUTTON_ROLES as cn, parseSiteId as cr, generateCardCss as ct, MQ_SM_UP as d, surfaceToneFromForegroundToken as dn, unsafeAsAppointmentResourceId as dr, cardRoleSchema as dt, surfaceDecorationColors as en, resolveManagedMediaReference as er, navEffectPolicy as et, MQ_TABLET_ONLY as f, resolveSurfaceForeground as fn, unsafeAsAppointmentServiceId as fr, cardRoleValues as ft, parseBlockCustomCssRules as g, planForegroundHover as gn, unsafeAsPassId as gr, asBlockContentVersionId as gt, getComponentShadowVar as h, getTextColorForBackground as hn, unsafeAsMediaAssetId as hr, asAppearancePresetId as ht, generateHeaderScrollTreatmentStyles as i, resolveOnColorForThemeToken as in, parseApiKeyId as ir, pageDesignEditorBackgroundOverrideOwner as it, parseThemeButtonVariantId as j, textColorStyle as jn, eventListTreatmentValues as jt, generateButtonCss as k, mergeStyles as kn, defineExactCatalog as kt, MQ_MD_DOWN as l, unsafeAsOpaqueButtonColourToken as ln, parseSiteTermsVersionId as lr, renderCssDeclarations as lt, getComponentBorderWidthPx as m, expandPalette as mn, unsafeAsFormId as mr, normalizeCardRole as mt, headerPositioningValues as n, scrimTone as nn, parseCanonicalMediaIdentifier as nr, boxBackgroundSchema as nt, getHeaderPaintTargets as o, resolveTokenOrCssColorValue as on, parseEventOfferingId as or, stripStaleTransitionStyleGroup as ot, headerVariantValues as p, safeTokenOr as pn, unsafeAsCustomerPassId as pr, cardVariantRoleValues as pt, NAV_LINK_LETTER_SPACING_MAP as q, surfaceForegroundValueWithOpacity as qn, mapDrawingStyle as qt, themeSchema as r, isCssColorLiteral as rn, parseMediaIdentifier as rr, runtimeBoxBackgroundSchema as rt, renderHeaderPaintTargetRules as s, generateShadowValue$1 as sn, parseEventSeriesId as sr, themeV2RuntimeStyleFieldNames as st, corners as t, gradientScrimSamples as tn, mediaIdentifierSchema as tr, boxBackgroundOverlaySchema as tt, MQ_SM_DOWN as u, selectLogoVariant as un, parseUserId as ur, generateShadowValue as ut, FONT_WEIGHT_MAP as v, resolveOpaqueSurfaceHex as vn, unsafeAsStorageBucketName as vr, asBoundaryOptionId as vt, ACCORDION_TRIGGER_FONT_SCALE as w, requirePaletteColorsFromEntries as wn, asLayoutVariantKey as wt, LABEL_FONT_SIZE_MAP as x, paletteModeSchema as xn, ok as xr, asDesignEntryId as xt, INPUT_FONT_SIZE_MAP as y, hexColorSchema as yn, unsafeAsStoragePath as yr, asDesignBlockId as yt, brandDisplayModeValues as z, featuresFromHex as zn, offeringsPreviewCompositionTreatmentValues as zt };
|