@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.
Files changed (218) hide show
  1. package/README.md +4 -4
  2. package/dist/_dts/{BlocksIslandsHydrator-Cj1i1Yhh.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
  3. package/dist/_dts/{Page-Cgzbv22M.d.ts → Page-Dm7_P13o.d.ts} +217 -8
  4. package/dist/_dts/{SdkPreviewMode-BC_FGc6b.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +55 -127
  5. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  6. package/dist/_dts/{client-BOK-YHVJ.d.ts → client-Ep0jI9eE.d.ts} +1 -1
  7. package/dist/_dts/{content-types-CsrYWxq_.d.ts → content-types-BgAzCrBc.d.ts} +18 -18
  8. package/dist/_dts/{contracts-ClgMD-9g.d.ts → contracts-DUiOnj9e.d.ts} +10 -6
  9. package/dist/_dts/{footerPageOutline-C_IDuELl.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
  10. package/dist/_dts/{generatePageMetadata-B7bhYSWx.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
  11. package/dist/_dts/index-BQDBQvdu.d.ts +13 -0
  12. package/dist/_dts/index-BVkP8f70.d.ts +66 -0
  13. package/dist/_dts/{index-Dt3XSGzY.d.ts → index-CF6Cjs7b.d.ts} +2 -2
  14. package/dist/_dts/{index-Ci1PEk82.d.ts → index-CSsfq6KG.d.ts} +3 -17
  15. package/dist/_dts/{index-BZ4fb2zz.d.ts → index-D_8uz4OP.d.ts} +3 -3
  16. package/dist/_dts/{index-CcaG6O13.d.ts → index-DvKQA6AZ.d.ts} +4 -4
  17. package/dist/_dts/{index-DMOfW1A7.d.ts → index-KPrWM0KF.d.ts} +2 -2
  18. package/dist/_dts/{index-DzUdUaJ-.d.ts → index-ylivB7Jj.d.ts} +2 -2
  19. package/dist/_dts/{loadContent-C1JI2pG0.d.ts → loadContent-DTjKOO-T.d.ts} +19 -10
  20. package/dist/_dts/{resolvePageContent-BtRUtrJa.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
  21. package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
  22. package/dist/_dts/{hosted-booking-appearance-ChGCQYdQ.d.ts → schema-BHu0PYWl.d.ts} +25911 -23567
  23. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  24. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  25. package/dist/_dts/sdk/src/client.d.ts +13 -7
  26. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  27. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  28. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  29. package/dist/_dts/sdk/src/index.d.ts +8 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  33. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
  36. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  42. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  45. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  47. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  48. package/dist/_dts/sdk/src/server.d.ts +5 -5
  49. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  50. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  51. package/dist/_dts/{navigation-BnV_hOZy.d.ts → types-BR1Yboa9.d.ts} +15530 -16017
  52. package/dist/_dts/{types-CMFIZGUI.d.ts → types-CJXTCF_F.d.ts} +10 -13
  53. package/dist/_dts/{types-CI9dYWJ8.d.ts → types-D02ngcUH.d.ts} +4 -2
  54. package/dist/_dts/{types--oWXIfyz.d.ts → types-ZGUiHpDE.d.ts} +7 -7
  55. package/dist/_dts/{validation-Ct-GL0eA.d.ts → validation-BaV565gb.d.ts} +4 -4
  56. package/dist/client/{BlocksIslandsHydrator-DKS8Ba30.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
  57. package/dist/client/{BookingMailingListNote-Cg9v6d7Y.mjs → BookingMailingListNote-BDpxmn1p.mjs} +2 -2
  58. package/dist/client/{CalendarNavigationChevron-BoVCTUXy.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
  59. package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
  60. package/dist/client/{DemoBookingPortalAccess-BxRVCJG3.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +6 -6
  61. package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
  62. package/dist/client/{EventCalendar.client-BI-kvwXf.mjs → EventCalendar.client-BxQLY5cX.mjs} +10 -9
  63. package/dist/client/{EventCombined.client-DIvnoN5l.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
  64. package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
  65. package/dist/client/{EventItem-BRMtEaa6.mjs → EventItem-BEx-qiDE.mjs} +11 -6
  66. package/dist/client/{EventListWeekNavigation-B8DzAUDa.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
  67. package/dist/client/{EventListing.client-Bo4qzQi0.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
  68. package/dist/client/{EventListing.view-D2vemnCx.mjs → EventListing.view-9RFrBejr.mjs} +31 -15
  69. package/dist/client/{EventRegistrationPayment-e5XWtygG.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +92 -99
  70. package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
  71. package/dist/client/{Page-Dqpv9Ggi.mjs → Page-Bf2nPACI.mjs} +2673 -2290
  72. package/dist/client/{StepIndicator-BrvKa_8H.mjs → StepIndicator-CZweb1vs.mjs} +3 -3
  73. package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
  74. package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
  75. package/dist/client/{accordion-ByLpb4Dz.mjs → accordion-TcimLLRQ.mjs} +1 -1
  76. package/dist/client/{booking-form.client-BLndwxpx.mjs → booking-form.client-q-RpJ4aF.mjs} +13 -13
  77. package/dist/client/{bookingForm-CTxTEgHX.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
  78. package/dist/client/bookings.mjs +6 -6
  79. package/dist/client/{carousel-C8ef0vnT.mjs → carousel-CGAk6j0m.mjs} +2 -2
  80. package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
  81. package/dist/client/{cart-BpH6jkUO.mjs → cart-D_h3rAZ2.mjs} +3 -3
  82. package/dist/client/{cart.client-DV78Td13.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
  83. package/dist/client/{checkout-BJVb2RpL.mjs → checkout-tC-3CzuM.mjs} +3 -3
  84. package/dist/client/{checkout.client-CqGPXPSm.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
  85. package/dist/client/client.mjs +28 -15
  86. package/dist/client/{context-BRgBWthI.mjs → context-9ZfMb6GA.mjs} +1 -1
  87. package/dist/client/{cta-D8ucLsvX.mjs → cta-D-ZqL7-e.mjs} +2 -1
  88. package/dist/client/{dateFormatting-LeKNQ-iX.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
  89. package/dist/client/{demoPortalMagicLink-CjstiFPh.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
  90. package/dist/client/{enhanceHeaderSection-BaQJyI9x.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
  91. package/dist/client/{event-details.client-CYNQYOsP.mjs → event-details.client-C670TgRd.mjs} +2 -17
  92. package/dist/client/{event-registration.client-DDqSpN36.mjs → event-registration.client-C6GApWTB.mjs} +17 -17
  93. package/dist/client/{eventCalendar-3vQtuC9X.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
  94. package/dist/client/{eventCombined-CEJFMjqV.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
  95. package/dist/client/{eventDetails-nGh47jef.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
  96. package/dist/client/{eventListing-BL3Ptb83.mjs → eventListing-C_yXmHyz.mjs} +4 -4
  97. package/dist/client/{eventRegistration-DDSO6KB2.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
  98. package/dist/client/{form-DjNLfy2Z.mjs → form-QZhtdFHA.mjs} +3 -3
  99. package/dist/client/{form.client-Cj0By6ot.mjs → form.client-CgvPACwG.mjs} +5 -5
  100. package/dist/client/{form.parts-DyA9C5Hy.mjs → form.parts-2uI0-5N-.mjs} +3 -3
  101. package/dist/client/{formatDate-CZo0MPTA.mjs → formatDate-Danr0Nk4.mjs} +1 -1
  102. package/dist/client/gifting/client.mjs +3 -3
  103. package/dist/client/{headerSection-JjSq6Mzp.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
  104. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
  105. package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
  106. package/dist/client/{newsletter-form.client-C2EgEBP1.mjs → newsletter-form.client-Cbepz2KU.mjs} +8 -8
  107. package/dist/client/{newsletter-form.parts-CaldoFmi.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
  108. package/dist/client/{newsletterForm-hm7L17LM.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
  109. package/dist/client/{noop-M8FTSgm2.mjs → noop-B7H6gCbj.mjs} +306 -5
  110. package/dist/client/portal/client.mjs +4560 -115
  111. package/dist/client/{product-detail.client-y86uwzEI.mjs → product-detail.client-CYTR165c.mjs} +1 -1
  112. package/dist/client/{product-list.client-_JBndYZT.mjs → product-list.client-B4vTvag8.mjs} +1 -1
  113. package/dist/client/{productDetail-D-9fb2cW.mjs → productDetail-k8LEMSWn.mjs} +3 -3
  114. package/dist/client/{productList-BSRlnwBW.mjs → productList-DEo8Bqoe.mjs} +3 -3
  115. package/dist/client/{propsDecoder-DhbGL302.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
  116. package/dist/client/{registry.server-BaX0hxf5.mjs → registry.server-BTmSXE3D.mjs} +1154 -997
  117. package/dist/client/rendering/client.mjs +28 -28
  118. package/dist/client/rendering/islands.mjs +1 -1
  119. package/dist/client/rendering.mjs +57 -32
  120. package/dist/client/{richText-coerce-Cny2Ukb6.mjs → richText-coerce-B19taoH6.mjs} +1 -1
  121. package/dist/client/{routeIslandApiConfig-96er7pIx.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
  122. package/dist/client/{ThemedButton-DVBC_pS9.mjs → schema-C-m8XHuW.mjs} +1123 -2362
  123. package/dist/client/{shop-CnIJfdZA.mjs → shop-RGWa43H7.mjs} +3 -3
  124. package/dist/client/{shop-commerce-CsLwzq5O.mjs → shop-commerce-TJYCBO_H.mjs} +12 -12
  125. package/dist/client/{shop-commerce-store--O8GRBwr.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
  126. package/dist/client/{shop.client-BcaJ-acA.mjs → shop.client-tsKfZw1W.mjs} +15 -15
  127. package/dist/client/{shop.interactive-BxL_bshW.mjs → shop.interactive-CVqLAU53.mjs} +370 -189
  128. package/dist/client/{shopShared-VZjPOfCX.mjs → shopShared-C3lHMz_R.mjs} +2 -2
  129. package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
  130. package/dist/client/timetableModel-V2ifvGGy.mjs +1100 -0
  131. package/dist/client/{useAvailableSlots-pTXuY3jV.mjs → useAvailableSlots-D1X69-pN.mjs} +4 -4
  132. package/dist/client/{useBookingNowIso-D14J-EhJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
  133. package/dist/client/{useDiscountApply-o5sIVZ2u.mjs → useDiscountApply-Bwzr1RjV.mjs} +3 -3
  134. package/dist/client/{useDiscountCodeUi-DJhFP_rg.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
  135. package/dist/client/{useEventPagination-DMmNf2FP.mjs → useEventPagination-CLAS0upd.mjs} +12 -24
  136. package/dist/client/uuid-BETKW8rS.mjs +12 -0
  137. package/dist/client/{view-BgPql2yH2.mjs → view-BUh4LnLS.mjs} +4 -4
  138. package/dist/client/{view-D1R3Lk05.mjs → view-Dj_FZHmg.mjs} +19 -15
  139. package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
  140. package/dist/preview-next/before-render.mjs +5 -4
  141. package/dist/preview-next/chrome.css +2 -0
  142. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
  143. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  144. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  145. package/dist/preview-next/client/{PreviewEditorSidebar-DADCj_ET.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +1328 -171
  146. package/dist/preview-next/client/{PreviewEditorUI-La40Dmmh.mjs → PreviewEditorUI-BdFjS39R.mjs} +53 -79
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-406Hw9zY.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +1249 -2551
  148. package/dist/preview-next/client/{SdkPreviewModeRuntime-CWN44I_B.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
  149. package/dist/preview-next/client/{SiteChromeCustomizeContext-BdwEZoo9.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +117481 -162497
  150. package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-b14Bv03E.mjs} +1253 -403
  151. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  152. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  153. package/dist/preview-next/client/{previewChromeSurface-BVUKIYG0.mjs → previewChromeSurface-Dd1_mNIg.mjs} +3 -8
  154. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  155. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  156. package/dist/preview-next/client/runtime.mjs +3 -3
  157. package/dist/preview-next/client/{sdk-runtime-Cy9AKPy5.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
  158. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
  159. package/dist/preview-next/client/{spinner-Bhpzz2vO.mjs → spinner-CGxS8Ns-.mjs} +2 -1
  160. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  161. package/dist/preview-next/editor-base.css +64 -2
  162. package/dist/preview-next/editor-chrome.css +85 -0
  163. package/dist/preview-next/keepAlive.mjs +2 -2
  164. package/dist/preview-next/middleware.mjs +7 -3
  165. package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-hLg-yjQN.mjs} +190 -116
  166. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  167. package/dist/preview-next/session.mjs +1 -1
  168. package/dist/server/{Block.shared-DB6fb1pR.mjs → Block.shared-CeTd2saO.mjs} +6 -6
  169. package/dist/server/{bindings-z2daXp-2.mjs → bindings-C5YpKuKt.mjs} +3 -2
  170. package/dist/server/{client-Cv-osXoU.mjs → client-Cv26lZQ4.mjs} +14 -10
  171. package/dist/server/config-template-validation.mjs +50 -10
  172. package/dist/server/config-validation.mjs +1 -1
  173. package/dist/server/config.mjs +2 -2
  174. package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +572 -1078
  175. package/dist/server/index.mjs +3 -3
  176. package/dist/server/{loadContent-BNMDYCm8.mjs → loadContent-C8a0b-cC.mjs} +40 -21
  177. package/dist/server/loadPage--DXBwI8V.mjs +2 -0
  178. package/dist/server/{loadPage-CjA_F_AF.mjs → loadPage-BW7dklu3.mjs} +9 -5
  179. package/dist/server/manifest.mjs +1 -1
  180. package/dist/server/next.mjs +9 -9
  181. package/dist/server/{overrideResolution-CGodrtqi.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
  182. package/dist/server/{overrides-DxRC724a.mjs → overrides-D1fiPOKF.mjs} +1158 -754
  183. package/dist/server/page-converter.mjs +8 -10
  184. package/dist/server/{prebuild-C6bhjRKT.mjs → prebuild--fO0E2tr.mjs} +1 -1
  185. package/dist/server/prebuild.mjs +1 -1
  186. package/dist/server/{prefetchBlockData-DZ5Fq_-r.mjs → prefetchBlockData-CqJnokWJ.mjs} +968 -968
  187. package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-CvvZ4JIe.mjs} +207 -132
  188. package/dist/server/{blocks-BaG8Qpaa.mjs → registry-BVfCqaCq.mjs} +2853 -2799
  189. package/dist/server/rendering/server.mjs +4 -4
  190. package/dist/server/rendering.mjs +8 -8
  191. package/dist/server/{resolveBlockData-CbGDakvp.mjs → resolveBlockData-DPNvhXEz.mjs} +6 -3
  192. package/dist/server/routing.mjs +1 -1
  193. package/dist/server/{schema-Bs735S27.mjs → schema-CD4peO7m.mjs} +2441 -1401
  194. package/dist/server/server.mjs +3 -3
  195. package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
  196. package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
  197. package/dist/server/{src-B935_bzN.mjs → src-ILxc6pid.mjs} +427 -190
  198. package/dist/server/theme-bridge.mjs +1 -1
  199. package/dist/server/theme.mjs +1 -1
  200. package/dist/server/{themeAdmission-DK2YBNqy.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
  201. package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
  202. package/dist/server/{validation-BtHE2S_D.mjs → validation-B1ieVemg.mjs} +22 -63
  203. package/dist/server/{version-CNCdL6id.mjs → version-BQK44wFg.mjs} +1 -1
  204. package/dist/styles/index.css +235 -0
  205. package/package.json +8 -3
  206. package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
  207. package/dist/_dts/index-cnymEAZY.d.ts +0 -1
  208. package/dist/client/LeafletStaticMap-dlapZ6mi.mjs +0 -135
  209. package/dist/client/location-map.client-DRN1JePj.mjs +0 -28
  210. package/dist/client/location-map.view-CuCvQdvp.mjs +0 -282
  211. package/dist/client/locationMap-B9srHHzZ.mjs +0 -15
  212. package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
  213. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  214. package/dist/client/timetableModel-D09jPdue.mjs +0 -480
  215. package/dist/client/wizardSteps-C0TsNqJc.mjs +0 -17049
  216. package/dist/preview-next/client/siteStyleAccess-CFMmoMZb.mjs +0 -1326
  217. package/dist/server/loadPage-jade28Xh.mjs +0 -2
  218. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -0,0 +1,2243 @@
1
+ "use client";
2
+ import { M as themeButtonExtraClassesWithTrailingIcon, N as themeButtonSizeClassName, P as themeButtonVariantClassNames, br as err, xr as ok } from "./schema-C-m8XHuW.mjs";
3
+ import "react";
4
+ import { z } from "zod";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ //#region ../core/src/date-math.ts
7
+ function addDaysToDate(date, dayCount) {
8
+ const next = new Date(date);
9
+ next.setUTCDate(next.getUTCDate() + dayCount);
10
+ return next;
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();
16
+ }
17
+ function subtractDaysFromIso(isoString, dayCount) {
18
+ return addDaysToIso(isoString, -dayCount);
19
+ }
20
+ //#endregion
21
+ //#region ../core/src/currency-format.ts
22
+ const CURRENCY_CODE_INPUT_PATTERN = /^[A-Za-z]{3}$/;
23
+ /** Parse + normalize a currency code, or return null if it isn't a 3-letter code. */
24
+ function parseCurrencyCode(value) {
25
+ return CURRENCY_CODE_INPUT_PATTERN.test(value) ? value.toUpperCase() : null;
26
+ }
27
+ const CURRENCY_LOCALE_BY_CODE = {
28
+ USD: "en-US",
29
+ GBP: "en-GB",
30
+ EUR: "de-DE",
31
+ AUD: "en-AU",
32
+ CAD: "en-CA",
33
+ NZD: "en-NZ",
34
+ JPY: "ja-JP",
35
+ CNY: "zh-CN",
36
+ CHF: "de-CH"
37
+ };
38
+ function resolveCurrencyLocale(currencyCode, override) {
39
+ return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
40
+ }
41
+ function fractionDigitsFor(decimals, exactFormatter, amount) {
42
+ switch (decimals) {
43
+ case "exact": return {};
44
+ case "auto": return exactFormatter.formatToParts(amount).find((part) => part.type === "fraction")?.value === exactFormatter.formatToParts(0).find((part) => part.type === "fraction")?.value ? {
45
+ minimumFractionDigits: 0,
46
+ maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
47
+ } : {};
48
+ case "whole": return {
49
+ minimumFractionDigits: 0,
50
+ maximumFractionDigits: 0
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
+ }
94
+ //#endregion
95
+ //#region ../core/src/money-input.ts
96
+ function unsafeAsCents(value) {
97
+ return value;
98
+ }
99
+ function unsafeAsNonNegativeCents(value) {
100
+ return value;
101
+ }
102
+ function unsafeAsPositiveCents(value) {
103
+ return value;
104
+ }
105
+ /**
106
+ * Normalizes a derived amount to non-negative whole cents. This intentionally
107
+ * clamps negatives to zero; use parseNonNegativeCents for validation.
108
+ */
109
+ function toNonNegativeCents(value) {
110
+ return unsafeAsNonNegativeCents(Math.max(0, Math.trunc(value)));
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);
144
+ if (!parsed.ok) return parsed;
145
+ if (parsed.value < 0) return err({ kind: "negative" });
146
+ const amountCents = roundMoneyAmountToCents(parsed.value);
147
+ if (amountCents <= 0) return err({ kind: "zero-not-allowed" });
148
+ return ok(unsafeAsPositiveCents(amountCents));
149
+ }
150
+ //#endregion
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$2(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$2(input.status);
212
+ }
213
+ }
214
+ function assertNever$2(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$1(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$1(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$1(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$1(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$1(value) {
288
+ throw new Error(`Unexpected value: ${String(value)}`);
289
+ }
290
+ //#endregion
291
+ //#region ../core/src/booking-payment-options.ts
292
+ /** Automatic instalments and a flexible balance cannot share one booking offer. */
293
+ function validateBookingPaymentOptionKinds(kinds) {
294
+ if (kinds.length === 0) return err("no_options");
295
+ const uniqueKinds = new Set(kinds);
296
+ if (uniqueKinds.size !== kinds.length) return err("duplicate_kind");
297
+ if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err("incompatible_collection_options");
298
+ return ok(void 0);
299
+ }
300
+ //#endregion
301
+ //#region ../commerce/src/utils/assertNever.ts
302
+ function assertNever(value, message) {
303
+ if (message) throw new Error(message);
304
+ throw new Error(`Unexpected value: ${String(value)}`);
305
+ }
306
+ //#endregion
307
+ //#region ../commerce/src/purchase/bookingInstalmentSchedule.ts
308
+ function resolveBookingInitialInstalmentAmountCents(input) {
309
+ const totalAmountCents = Math.max(0, input.totalAmountCents);
310
+ switch (input.plan.kind) {
311
+ case "deposit_plus_one_remainder":
312
+ case "deposit_plus_scheduled_instalments": return clampConfiguredAmount(input.plan.depositAmountCents, totalAmountCents);
313
+ case "equal_scheduled_instalments": return splitAmountWithRemainderInFirst(totalAmountCents, input.plan.instalmentCount)[0] ?? 0;
314
+ default: return assertNever(input.plan);
315
+ }
316
+ }
317
+ function buildBookingInstalmentSchedule(input) {
318
+ const totalAmountCents = Math.max(0, input.totalAmountCents);
319
+ switch (input.plan.kind) {
320
+ case "deposit_plus_one_remainder": {
321
+ const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
322
+ const remainderAmountCents = Math.max(0, totalAmountCents - depositAmountCents);
323
+ return omitZeroAmountFutureRows([createScheduleRow({
324
+ sequence: 1,
325
+ stateAtBooking: "paid_today",
326
+ dueAt: input.anchorAt,
327
+ amountCents: depositAmountCents
328
+ }), createScheduleRow({
329
+ sequence: 2,
330
+ stateAtBooking: "scheduled",
331
+ dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, input.plan.remainderDueCount, input.plan.intervalUnit),
332
+ amountCents: remainderAmountCents
333
+ })]);
334
+ }
335
+ case "deposit_plus_scheduled_instalments": {
336
+ const plan = input.plan;
337
+ const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
338
+ const instalmentAmounts = splitAmountWithRemainderInFirst(Math.max(0, totalAmountCents - depositAmountCents), plan.instalmentCount);
339
+ return omitZeroAmountFutureRows([createScheduleRow({
340
+ sequence: 1,
341
+ stateAtBooking: "paid_today",
342
+ dueAt: input.anchorAt,
343
+ amountCents: depositAmountCents
344
+ }), ...instalmentAmounts.map((amountCents, index) => createScheduleRow({
345
+ sequence: index + 2,
346
+ stateAtBooking: "scheduled",
347
+ dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * (index + 1), plan.intervalUnit),
348
+ amountCents
349
+ }))]);
350
+ }
351
+ case "equal_scheduled_instalments": {
352
+ const plan = input.plan;
353
+ return omitZeroAmountFutureRows(splitAmountWithRemainderInFirst(totalAmountCents, plan.instalmentCount).map((amountCents, index) => createScheduleRow({
354
+ sequence: index + 1,
355
+ stateAtBooking: index === 0 ? "paid_today" : "scheduled",
356
+ dueAt: index === 0 ? input.anchorAt : addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * index, plan.intervalUnit),
357
+ amountCents
358
+ })));
359
+ }
360
+ default: return assertNever(input.plan);
361
+ }
362
+ }
363
+ function createScheduleRow(input) {
364
+ return {
365
+ id: `payment-${input.sequence}`,
366
+ sequence: input.sequence,
367
+ stateAtBooking: input.stateAtBooking,
368
+ dueAt: input.dueAt,
369
+ amountCents: input.amountCents
370
+ };
371
+ }
372
+ /** Resolve real rows first: zero future payments do not extend the deadline. */
373
+ function canInstalmentPlanCompleteBefore(input) {
374
+ const deadline = Date.parse(input.deadline);
375
+ if (!Number.isFinite(Date.parse(input.now)) || !Number.isFinite(deadline)) return false;
376
+ return input.schedule.every((row) => Date.parse(row.dueAt) < deadline);
377
+ }
378
+ /** Later obligations are identified by their state, never their position. */
379
+ function getBookingLaterInstalments(schedule) {
380
+ return schedule.filter((row) => row.stateAtBooking === "scheduled");
381
+ }
382
+ //#endregion
383
+ //#region ../commerce/src/purchase/bookingPaymentSelection.ts
384
+ /** Identity is decided against the authoritative quote, before display repricing. */
385
+ function resolveAvailableBookingCollectionOptions(input) {
386
+ const configured = input.paymentTerms.allowedOptions;
387
+ if (!validateBookingPaymentOptionKinds(configured.map((option) => option.kind)).ok) return [];
388
+ const available = configured.filter((option) => option.kind !== "instalment_plan" || Number.isFinite(Date.parse(input.now))).map((option) => resolveBookingCollectionOptionFacts({
389
+ option,
390
+ totalCents: input.totalCents,
391
+ anchorAt: input.now,
392
+ bookingStartAt: input.bookingStartAt
393
+ })).filter((option) => option.kind !== "instalment_plan" || input.bookingStartAt !== null && canInstalmentPlanCompleteBefore({
394
+ now: input.now,
395
+ deadline: input.bookingStartAt,
396
+ schedule: option.schedule
397
+ }));
398
+ const upfront = resolveBookingCollectionOptionFacts({
399
+ option: { kind: "upfront" },
400
+ totalCents: input.totalCents,
401
+ anchorAt: input.now,
402
+ bookingStartAt: input.bookingStartAt
403
+ });
404
+ const collapsed = available.map((option) => isBookingCollectionEquivalentToUpfront(option) ? upfront : option);
405
+ const unique = collapsed.filter((option, index) => collapsed.findIndex((other) => other.kind === option.kind) === index);
406
+ return unique.length > 0 ? unique : [upfront];
407
+ }
408
+ function isBookingCollectionEquivalentToUpfront(option) {
409
+ switch (option.kind) {
410
+ case "upfront": return true;
411
+ case "deferred_manual": return false;
412
+ case "flexible_balance": return option.config.depositRefundability === "refundable" && option.dueNowCents === option.totalCents;
413
+ case "instalment_plan": return option.depositRefundability !== "non_refundable" && option.schedule.length === 1;
414
+ default: return assertNever(option);
415
+ }
416
+ }
417
+ function resolveBookingCollectionOptionFacts(input) {
418
+ const money = {
419
+ totalCents: input.totalCents,
420
+ anchorAt: input.anchorAt,
421
+ bookingStartAt: input.bookingStartAt
422
+ };
423
+ switch (input.option.kind) {
424
+ case "upfront": return {
425
+ ...money,
426
+ kind: "upfront",
427
+ dueNowCents: input.totalCents
428
+ };
429
+ case "deferred_manual": return {
430
+ ...money,
431
+ kind: "deferred_manual",
432
+ dueNowCents: 0
433
+ };
434
+ case "instalment_plan": {
435
+ const schedule = buildBookingInstalmentSchedule({
436
+ anchorAt: input.anchorAt,
437
+ totalAmountCents: input.totalCents,
438
+ plan: input.option.plan
439
+ });
440
+ return {
441
+ ...money,
442
+ kind: "instalment_plan",
443
+ plan: input.option.plan,
444
+ schedule,
445
+ dueNowCents: schedule[0]?.amountCents ?? 0,
446
+ depositRefundability: getBookingInstalmentDepositRefundability(input.option.plan)
447
+ };
448
+ }
449
+ case "flexible_balance": {
450
+ const dueNowCents = resolveFlexibleBalanceInitialPaymentCents({
451
+ totalAmountCents: input.totalCents,
452
+ config: input.option.config
453
+ });
454
+ return {
455
+ ...money,
456
+ kind: "flexible_balance",
457
+ config: input.option.config,
458
+ dueNowCents,
459
+ remainingBalanceCents: Math.max(0, input.totalCents - dueNowCents),
460
+ balanceDueAt: resolveFlexibleBalanceDueAt({
461
+ bookingStartAt: input.bookingStartAt ?? input.anchorAt,
462
+ dueDateRule: input.option.config.dueDateRule
463
+ })
464
+ };
465
+ }
466
+ default: return assertNever(input.option);
467
+ }
468
+ }
469
+ /** Discounts change preview money, never an already admitted collection identity. */
470
+ function repriceBookingCollectionOptions(input) {
471
+ return input.options.map((option) => option.totalCents === input.totalCents ? option : resolveBookingCollectionOptionFacts({
472
+ option,
473
+ totalCents: input.totalCents,
474
+ anchorAt: option.anchorAt,
475
+ bookingStartAt: option.bookingStartAt
476
+ }));
477
+ }
478
+ //#endregion
479
+ //#region ../commerce/src/purchase/checkoutPaymentFlow.ts
480
+ function planCheckoutPaymentFlow(options) {
481
+ const amountDueCents = toNonNegativeCents(options.amountDueCents);
482
+ const discountCents = toNonNegativeCents(options.discountCents);
483
+ const availableCreditCents = toNonNegativeCents(options.availableCreditCents);
484
+ const minimumStripeChargeCents = toNonNegativeCents(options.minimumStripeChargeCents ?? 0);
485
+ if (amountDueCents <= 0) return {
486
+ kind: "bypass",
487
+ bypassReason: discountCents > 0 ? "discount_free" : "free",
488
+ reserveCreditCents: 0
489
+ };
490
+ if (!options.creditCurrencyMatches || availableCreditCents <= 0) return {
491
+ kind: "stripe",
492
+ reserveCreditCents: toNonNegativeCents(0)
493
+ };
494
+ if (availableCreditCents >= amountDueCents) return {
495
+ kind: "store_credit_only",
496
+ reserveCreditCents: amountDueCents
497
+ };
498
+ return {
499
+ kind: "stripe",
500
+ reserveCreditCents: planMixedPaymentCreditReservation({
501
+ amountDueCents,
502
+ availableCreditCents,
503
+ minimumStripeChargeCents
504
+ })
505
+ };
506
+ }
507
+ function planMixedPaymentCreditReservation(input) {
508
+ const chargeAfterFullCredit = input.amountDueCents - input.availableCreditCents;
509
+ if (input.minimumStripeChargeCents <= 0 || chargeAfterFullCredit <= 0 || chargeAfterFullCredit >= input.minimumStripeChargeCents) return input.availableCreditCents;
510
+ if (input.amountDueCents < input.minimumStripeChargeCents) return toNonNegativeCents(0);
511
+ return toNonNegativeCents(input.amountDueCents - input.minimumStripeChargeCents);
512
+ }
513
+ /**
514
+ * Apply site credit to a flexible-balance booking before card payment.
515
+ *
516
+ * Credit first reduces the configured payment due now. Once that payment is
517
+ * covered, any remaining credit reduces the later balance. If a partial credit
518
+ * application would leave a positive card charge below Stripe's minimum, less
519
+ * credit is used so the configured payment can still be collected.
520
+ */
521
+ function planFlexibleBalanceCreditFirst(input) {
522
+ const totalCents = toNonNegativeCents(input.totalAfterDiscountCents);
523
+ const configuredDueNowCents = toNonNegativeCents(Math.min(input.configuredPaymentDueNowCents, totalCents));
524
+ const availableCreditCents = toNonNegativeCents(input.creditCurrencyMatches ? input.availableCreditCents : 0);
525
+ const minimumStripeChargeCents = toNonNegativeCents(input.minimumStripeChargeCents ?? 0);
526
+ if (availableCreditCents >= totalCents && totalCents > 0) return {
527
+ kind: "credit_only",
528
+ reserveCreditCents: totalCents,
529
+ cardDueNowCents: toNonNegativeCents(0),
530
+ laterBalanceCents: toNonNegativeCents(0)
531
+ };
532
+ let reserveCreditCents = toNonNegativeCents(Math.min(availableCreditCents, totalCents));
533
+ if (reserveCreditCents >= configuredDueNowCents) return {
534
+ kind: "flexible_balance",
535
+ reserveCreditCents,
536
+ cardDueNowCents: toNonNegativeCents(0),
537
+ laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents)
538
+ };
539
+ const plannedCardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
540
+ if (plannedCardDueNowCents > 0 && plannedCardDueNowCents < minimumStripeChargeCents) {
541
+ if (configuredDueNowCents < minimumStripeChargeCents) return {
542
+ kind: "card_below_minimum",
543
+ reserveCreditCents: toNonNegativeCents(0),
544
+ cardDueNowCents: configuredDueNowCents,
545
+ laterBalanceCents: toNonNegativeCents(totalCents - configuredDueNowCents)
546
+ };
547
+ reserveCreditCents = toNonNegativeCents(configuredDueNowCents - minimumStripeChargeCents);
548
+ }
549
+ const cardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
550
+ return {
551
+ kind: "flexible_balance",
552
+ reserveCreditCents,
553
+ cardDueNowCents,
554
+ laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents - cardDueNowCents)
555
+ };
556
+ }
557
+ //#endregion
558
+ //#region ../commerce/src/purchase/settlement.ts
559
+ function normalizeCurrencyCode(raw) {
560
+ const normalized = raw.trim().toUpperCase();
561
+ if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
562
+ return normalized;
563
+ }
564
+ //#endregion
565
+ //#region ../commerce/src/purchase/checkoutSessionMetadata.ts
566
+ const datedOfferingSharedEngineMetadataShape = {
567
+ datedOfferingEngineContractVersion: z.literal("shared_v1"),
568
+ datedOfferingEngineRouteKind: z.literal("shared_whole_series_registration"),
569
+ datedOfferingCapacityHoldId: z.string().uuid(),
570
+ datedOfferingCapacityHoldAuditRef: z.string().uuid(),
571
+ customerId: z.string().uuid(),
572
+ eventSeriesId: z.string().uuid()
573
+ };
574
+ z.object(datedOfferingSharedEngineMetadataShape);
575
+ const orderCheckoutSessionMetadataBaseShape = {
576
+ type: z.literal("order"),
577
+ site_id: z.string().uuid(),
578
+ order_id: z.string().uuid().optional(),
579
+ customer_email: z.string().email().optional(),
580
+ customer_name: z.string().optional(),
581
+ product_id: z.string().uuid().optional(),
582
+ attendee_id: z.string().uuid().optional(),
583
+ occurrence_id: z.string().uuid().optional(),
584
+ tickets_count: z.string().optional(),
585
+ notes: z.string().optional(),
586
+ discount_redemption_id: z.string().uuid().optional(),
587
+ discount_code_id: z.string().uuid().optional(),
588
+ discount_code: z.string().optional(),
589
+ discount_public_label: z.string().optional(),
590
+ credit_reservation_id: z.string().uuid().optional(),
591
+ credit_reserved_cents: z.string().optional(),
592
+ discount_code_amount_cents: z.string().optional(),
593
+ order_payment_reason: z.enum([
594
+ "instalment_payoff",
595
+ "flexible_balance_initial",
596
+ "flexible_balance_paydown"
597
+ ]).optional(),
598
+ order_payment_plan_id: z.string().uuid().optional(),
599
+ order_flexible_balance_contract_id: z.string().uuid().optional()
600
+ };
601
+ const absentDatedOfferingSharedEngineMetadataShape = {
602
+ datedOfferingEngineContractVersion: z.never().optional(),
603
+ datedOfferingEngineRouteKind: z.never().optional(),
604
+ datedOfferingCapacityHoldId: z.never().optional(),
605
+ datedOfferingCapacityHoldAuditRef: z.never().optional(),
606
+ customerId: z.never().optional(),
607
+ eventSeriesId: z.never().optional()
608
+ };
609
+ const LegacyOrderCheckoutSessionMetadataSchema = z.object({
610
+ ...orderCheckoutSessionMetadataBaseShape,
611
+ ...absentDatedOfferingSharedEngineMetadataShape
612
+ });
613
+ const SharedDatedOfferingOrderCheckoutSessionMetadataSchema = z.object({
614
+ ...orderCheckoutSessionMetadataBaseShape,
615
+ ...datedOfferingSharedEngineMetadataShape
616
+ });
617
+ z.union([SharedDatedOfferingOrderCheckoutSessionMetadataSchema, LegacyOrderCheckoutSessionMetadataSchema]);
618
+ //#endregion
619
+ //#region ../commerce/src/purchase/confirmationPaymentSchema.ts
620
+ const settledBalanceSchema = z.strictObject({ kind: z.literal("settled") });
621
+ const dueBalanceSchema = z.strictObject({
622
+ kind: z.literal("due"),
623
+ amountCents: z.number().int().positive().transform((value, ctx) => {
624
+ const cents = parsePositiveCents(value);
625
+ if (cents.ok) return cents.value;
626
+ ctx.addIssue({
627
+ code: "custom",
628
+ message: "Expected positive whole cents"
629
+ });
630
+ return z.NEVER;
631
+ }),
632
+ dueAt: z.string().nullable()
633
+ });
634
+ const paymentBalanceSchema = z.discriminatedUnion("kind", [settledBalanceSchema, dueBalanceSchema]);
635
+ const currencySchema = z.string().regex(/^[A-Z]{3}$/).transform(normalizeCurrencyCode);
636
+ const moneyFields = {
637
+ amountPaidCents: z.number().int().nonnegative().transform(toNonNegativeCents),
638
+ currency: currencySchema
639
+ };
640
+ const confirmationPaymentSchema = z.discriminatedUnion("kind", [
641
+ z.strictObject({
642
+ kind: z.literal("free"),
643
+ balance: settledBalanceSchema
644
+ }),
645
+ z.strictObject({
646
+ kind: z.literal("waived"),
647
+ balance: settledBalanceSchema
648
+ }),
649
+ z.strictObject({
650
+ kind: z.literal("pass"),
651
+ passName: z.string().nullable(),
652
+ passCreditsUsed: z.number().int().positive().nullable(),
653
+ balance: settledBalanceSchema
654
+ }),
655
+ z.strictObject({
656
+ kind: z.literal("membership"),
657
+ membershipName: z.string().nullable(),
658
+ balance: settledBalanceSchema
659
+ }),
660
+ z.strictObject({
661
+ kind: z.literal("manual_due"),
662
+ currency: currencySchema,
663
+ balance: dueBalanceSchema
664
+ }),
665
+ z.strictObject({
666
+ kind: z.literal("managed_balance_due"),
667
+ ...moneyFields,
668
+ balance: dueBalanceSchema
669
+ }),
670
+ z.strictObject({
671
+ kind: z.literal("monetary"),
672
+ ...moneyFields,
673
+ paymentMethod: z.enum([
674
+ "stripe",
675
+ "store_credit",
676
+ "mixed",
677
+ "manual"
678
+ ]),
679
+ balance: paymentBalanceSchema
680
+ })
681
+ ]);
682
+ toNonNegativeCents(0);
683
+ //#endregion
684
+ //#region ../commerce/src/purchase/stripeCommissionMetadata.ts
685
+ /** Reasons are payment evidence, not an independent pricing policy. */
686
+ const STRIPE_COMMISSION_FREE_REASONS = [
687
+ "managed_billing",
688
+ "no_commission_plan",
689
+ "billing_evidence_invalid",
690
+ "fee_rounds_to_zero",
691
+ "payment_not_stripe"
692
+ ];
693
+ const historicalContext = {
694
+ currency: z.string().refine((value) => parseCurrencyCode(value) !== null).optional(),
695
+ sourcePlanId: z.string().trim().min(1).optional()
696
+ };
697
+ const percentSchema = z.number().finite().min(0).max(100);
698
+ z.discriminatedUnion("kind", [
699
+ z.object({
700
+ kind: z.literal("commission_free"),
701
+ reason: z.enum(STRIPE_COMMISSION_FREE_REASONS),
702
+ ...historicalContext
703
+ }),
704
+ z.object({
705
+ kind: z.literal("application_fee_amount"),
706
+ amountCents: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
707
+ percent: percentSchema,
708
+ ...historicalContext
709
+ }),
710
+ z.object({
711
+ kind: z.literal("application_fee_percent"),
712
+ percent: percentSchema,
713
+ ...historicalContext
714
+ })
715
+ ]);
716
+ //#endregion
717
+ //#region ../commerce/src/purchase/stripeMinimumCharge.ts
718
+ const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
719
+ GBP: 30,
720
+ USD: 50,
721
+ EUR: 50,
722
+ AED: 200,
723
+ AUD: 50,
724
+ BGN: 100,
725
+ BRL: 50,
726
+ CAD: 50,
727
+ CHF: 50,
728
+ CZK: 1500,
729
+ DKK: 250,
730
+ HKD: 400,
731
+ HUF: 17500,
732
+ JPY: 50,
733
+ MXN: 1e3,
734
+ MYR: 200,
735
+ NOK: 300,
736
+ NZD: 50,
737
+ PLN: 200,
738
+ RON: 200,
739
+ SEK: 300,
740
+ SGD: 50,
741
+ THB: 1e3
742
+ };
743
+ function isStripeMinimumChargeCurrency(currency) {
744
+ return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
745
+ }
746
+ function getStripeMinimumChargeRequirement(rawCurrency) {
747
+ let currency;
748
+ try {
749
+ currency = normalizeCurrencyCode(rawCurrency);
750
+ } catch {
751
+ return null;
752
+ }
753
+ const currencyKey = currency;
754
+ if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
755
+ return {
756
+ currency,
757
+ minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
758
+ };
759
+ }
760
+ //#endregion
761
+ //#region ../commerce/src/purchase/checkoutCopy.ts
762
+ /**
763
+ * Customer copy shared by checkout surfaces, so one approved wording reaches
764
+ * every place that shows it.
765
+ */
766
+ const checkoutCopy = {
767
+ /** A payment is still being confirmed; checking again is safe. */
768
+ checkoutStillConfirming: "We’re still confirming your payment. This can take a minute – you can check again, and you won’t be charged twice.",
769
+ /** A previous attempt can't be confirmed automatically; the business needs to check it. */
770
+ checkoutAssistanceRequired: "We can’t confirm your last payment attempt yet. Please don’t pay again – contact the business so they can check it."
771
+ };
772
+ //#endregion
773
+ //#region ../commerce/src/purchase/event-registration-errors.ts
774
+ const eventRegistrationErrors = {
775
+ registrationClosed: {
776
+ endsCommand: false,
777
+ message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.",
778
+ action: "none"
779
+ },
780
+ paymentInvestigationRequired: {
781
+ endsCommand: false,
782
+ message: "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking.",
783
+ action: "none"
784
+ },
785
+ paymentProviderUnavailable: {
786
+ endsCommand: false,
787
+ message: "We couldn’t reach the payment provider. Please try again in a minute.",
788
+ action: "retry"
789
+ },
790
+ paymentHostUnavailable: {
791
+ endsCommand: false,
792
+ message: "Card payments aren’t available on this web address yet. Please contact the organiser to book.",
793
+ action: "none"
794
+ },
795
+ paymentPageUnavailable: {
796
+ endsCommand: false,
797
+ message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
798
+ action: "retry"
799
+ },
800
+ paymentUnavailable: {
801
+ endsCommand: false,
802
+ message: "Online payment is not available for this event right now. Please contact the organiser for help with booking.",
803
+ action: "none"
804
+ },
805
+ capacityChanged: {
806
+ endsCommand: false,
807
+ message: "Sorry, there aren’t enough places left for your selection. Please check the available places and choose again.",
808
+ action: "places"
809
+ },
810
+ selectionChanged: {
811
+ endsCommand: false,
812
+ message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
813
+ action: "places"
814
+ },
815
+ paymentSetupFailed: {
816
+ endsCommand: true,
817
+ message: "We couldn't set up payment for this booking, so your place hasn't been reserved and you haven't been charged. Please try again in a few minutes, or contact the organiser if it keeps happening.",
818
+ action: "retry"
819
+ },
820
+ registrationAttemptEnded: {
821
+ endsCommand: true,
822
+ message: "That booking attempt has ended, so we couldn't finish it. You haven't been charged. Please start your booking again.",
823
+ action: "start"
824
+ },
825
+ registrationPreparationChanged: {
826
+ endsCommand: true,
827
+ message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
828
+ action: "places"
829
+ },
830
+ registrationAlreadyExists: {
831
+ endsCommand: false,
832
+ message: "You already have a booking for this event. Please check your bookings to see its status. If you need help, contact the organiser.",
833
+ action: "portal"
834
+ },
835
+ holdExpired: {
836
+ endsCommand: false,
837
+ message: "Your reservation has timed out. Please check availability and choose your places again.",
838
+ action: "start"
839
+ },
840
+ waitlistUnavailable: {
841
+ endsCommand: false,
842
+ 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.",
843
+ action: "event"
844
+ },
845
+ paymentContextMismatch: {
846
+ endsCommand: false,
847
+ message: "The payment options for this event have changed. Please check the latest options before continuing.",
848
+ action: "payment-options"
849
+ },
850
+ verificationFailed: {
851
+ endsCommand: false,
852
+ message: "We couldn’t confirm this request came from a person. Please refresh the page and try again.",
853
+ action: "none"
854
+ },
855
+ idempotencyConflict: {
856
+ endsCommand: false,
857
+ 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.",
858
+ action: "portal"
859
+ },
860
+ invalidCommitInput: {
861
+ endsCommand: false,
862
+ 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.",
863
+ action: "details"
864
+ }
865
+ };
866
+ function parseEventRegistrationErrorReason(value) {
867
+ return typeof value === "string" && Object.prototype.hasOwnProperty.call(eventRegistrationErrors, value) ? value : null;
868
+ }
869
+ /** Only a server-confirmed refusal ends an identity; transport uncertainty retains it. */
870
+ function eventRegistrationErrorEndsCommand(value) {
871
+ const reason = parseEventRegistrationErrorReason(value);
872
+ return reason !== null && eventRegistrationErrors[reason].endsCommand;
873
+ }
874
+ //#endregion
875
+ //#region ../commerce/src/purchase/checkoutPresentation.ts
876
+ function publishableKeyMode(publishableKey) {
877
+ if (publishableKey.startsWith("pk_live_")) return "live";
878
+ if (publishableKey.startsWith("pk_test_")) return "test";
879
+ return null;
880
+ }
881
+ function checkBrowserStripeKey(publishableKey, livemode) {
882
+ const key = publishableKey?.trim();
883
+ if (!key) return {
884
+ tag: "unavailable",
885
+ reason: "missing_key"
886
+ };
887
+ const mode = publishableKeyMode(key);
888
+ if (mode === null) return {
889
+ tag: "unavailable",
890
+ reason: "invalid_key"
891
+ };
892
+ return mode === (livemode ? "live" : "test") ? {
893
+ tag: "ready",
894
+ publishableKey: key
895
+ } : {
896
+ tag: "unavailable",
897
+ reason: "mode_mismatch"
898
+ };
899
+ }
900
+ //#endregion
901
+ //#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
902
+ function r(e) {
903
+ var t, f, n = "";
904
+ if ("string" == typeof e || "number" == typeof e) n += e;
905
+ else if ("object" == typeof e) if (Array.isArray(e)) {
906
+ var o = e.length;
907
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
908
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
909
+ return n;
910
+ }
911
+ function clsx() {
912
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
913
+ return n;
914
+ }
915
+ //#endregion
916
+ //#region ../blocks/src/system/icons/svg.tsx
917
+ function createIcon(displayName, children) {
918
+ const Icon = ({ size = "1em", strokeWidth = 2, title, className, focusable = false, role, ...props }) => /* @__PURE__ */ jsxs("svg", {
919
+ "aria-hidden": title ? void 0 : true,
920
+ className,
921
+ "data-rb-icon": displayName.replace(/Icon$/, ""),
922
+ fill: "none",
923
+ focusable,
924
+ height: size,
925
+ role: title ? role ?? "img" : role,
926
+ stroke: "currentColor",
927
+ strokeLinecap: "round",
928
+ strokeLinejoin: "round",
929
+ strokeWidth,
930
+ viewBox: "0 0 24 24",
931
+ width: size,
932
+ xmlns: "http://www.w3.org/2000/svg",
933
+ ...props,
934
+ children: [title ? /* @__PURE__ */ jsx("title", { children: title }) : null, children]
935
+ });
936
+ Icon.displayName = displayName;
937
+ return Icon;
938
+ }
939
+ const ArrowDownIcon = createIcon("ArrowDownIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "m6 13 6 6 6-6" })] }));
940
+ const ArrowLeftIcon = createIcon("ArrowLeftIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M19 12H5" }), /* @__PURE__ */ jsx("path", { d: "m11 6-6 6 6 6" })] }));
941
+ const ArrowRightIcon = createIcon("ArrowRightIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M5 12h14" }), /* @__PURE__ */ jsx("path", { d: "m13 6 6 6-6 6" })] }));
942
+ const AwardIcon = createIcon("AwardIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
943
+ cx: "12",
944
+ cy: "8",
945
+ r: "4"
946
+ }), /* @__PURE__ */ jsx("path", { d: "m8.5 12.5-1.5 7 5-3 5 3-1.5-7" })] }));
947
+ 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" })] }));
948
+ const BookOpenIcon = createIcon("BookOpenIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
949
+ /* @__PURE__ */ jsx("path", { d: "M4 5.5A3 3 0 0 1 7 4h13v15H7a3 3 0 0 0-3 1.5Z" }),
950
+ /* @__PURE__ */ jsx("path", { d: "M4 5.5V20" }),
951
+ /* @__PURE__ */ jsx("path", { d: "M12 4v15" })
952
+ ] }));
953
+ const BrainIcon = createIcon("BrainIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
954
+ /* @__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" }),
955
+ /* @__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" }),
956
+ /* @__PURE__ */ jsx("path", { d: "M9 4v16" }),
957
+ /* @__PURE__ */ jsx("path", { d: "M15 4v16" }),
958
+ /* @__PURE__ */ jsx("path", { d: "M9 8h6" }),
959
+ /* @__PURE__ */ jsx("path", { d: "M9 14h6" })
960
+ ] }));
961
+ const BriefcaseBusinessIcon = createIcon("BriefcaseBusinessIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
962
+ /* @__PURE__ */ jsx("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }),
963
+ /* @__PURE__ */ jsx("rect", {
964
+ x: "3",
965
+ y: "7",
966
+ width: "18",
967
+ height: "13",
968
+ rx: "2"
969
+ }),
970
+ /* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
971
+ /* @__PURE__ */ jsx("path", { d: "M9 12v2" }),
972
+ /* @__PURE__ */ jsx("path", { d: "M15 12v2" })
973
+ ] }));
974
+ const CalendarIcon = createIcon("CalendarIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
975
+ /* @__PURE__ */ jsx("path", { d: "M8 3v4" }),
976
+ /* @__PURE__ */ jsx("path", { d: "M16 3v4" }),
977
+ /* @__PURE__ */ jsx("rect", {
978
+ x: "4",
979
+ y: "5",
980
+ width: "16",
981
+ height: "16",
982
+ rx: "2"
983
+ }),
984
+ /* @__PURE__ */ jsx("path", { d: "M4 10h16" })
985
+ ] }));
986
+ const CalendarDaysIcon = CalendarIcon;
987
+ const CheckIcon = createIcon("CheckIcon", /* @__PURE__ */ jsx("path", { d: "m5 12 4 4L19 6" }));
988
+ const ChevronDownIcon = createIcon("ChevronDownIcon", /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }));
989
+ const ChevronLeftIcon = createIcon("ChevronLeftIcon", /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }));
990
+ const ChevronRightIcon = createIcon("ChevronRightIcon", /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }));
991
+ const ChevronUpIcon = createIcon("ChevronUpIcon", /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" }));
992
+ const CircleMinusIcon = createIcon("CircleMinusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
993
+ cx: "12",
994
+ cy: "12",
995
+ r: "9"
996
+ }), /* @__PURE__ */ jsx("path", { d: "M8 12h8" })] }));
997
+ const CirclePlusIcon = createIcon("CirclePlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
998
+ /* @__PURE__ */ jsx("circle", {
999
+ cx: "12",
1000
+ cy: "12",
1001
+ r: "9"
1002
+ }),
1003
+ /* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
1004
+ /* @__PURE__ */ jsx("path", { d: "M12 8v8" })
1005
+ ] }));
1006
+ const ClockIcon = createIcon("ClockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
1007
+ cx: "12",
1008
+ cy: "12",
1009
+ r: "9"
1010
+ }), /* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2" })] }));
1011
+ const CompassIcon = createIcon("CompassIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
1012
+ cx: "12",
1013
+ cy: "12",
1014
+ r: "9"
1015
+ }), /* @__PURE__ */ jsx("path", { d: "m15 9-2 6-4 2 2-6Z" })] }));
1016
+ const DownloadIcon = createIcon("DownloadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1017
+ /* @__PURE__ */ jsx("path", { d: "M12 3v12" }),
1018
+ /* @__PURE__ */ jsx("path", { d: "m7 10 5 5 5-5" }),
1019
+ /* @__PURE__ */ jsx("path", { d: "M5 21h14" })
1020
+ ] }));
1021
+ const ExternalLinkIcon = createIcon("ExternalLinkIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1022
+ /* @__PURE__ */ jsx("path", { d: "M14 4h6v6" }),
1023
+ /* @__PURE__ */ jsx("path", { d: "m10 14 10-10" }),
1024
+ /* @__PURE__ */ jsx("path", { d: "M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5" })
1025
+ ] }));
1026
+ const FileArchiveIcon = createIcon("FileArchiveIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1027
+ /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
1028
+ /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
1029
+ /* @__PURE__ */ jsx("path", { d: "M10 7h2" }),
1030
+ /* @__PURE__ */ jsx("path", { d: "M10 11h2" }),
1031
+ /* @__PURE__ */ jsx("path", { d: "M10 15h4v4h-4Z" })
1032
+ ] }));
1033
+ const FileAudioIcon = createIcon("FileAudioIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1034
+ /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
1035
+ /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
1036
+ /* @__PURE__ */ jsx("path", { d: "M10 16V10l5-2v6" }),
1037
+ /* @__PURE__ */ jsx("circle", {
1038
+ cx: "9",
1039
+ cy: "17",
1040
+ r: "1.5"
1041
+ }),
1042
+ /* @__PURE__ */ jsx("circle", {
1043
+ cx: "15",
1044
+ cy: "15",
1045
+ r: "1.5"
1046
+ })
1047
+ ] }));
1048
+ const FileSpreadsheetIcon = createIcon("FileSpreadsheetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1049
+ /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
1050
+ /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
1051
+ /* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
1052
+ /* @__PURE__ */ jsx("path", { d: "M8 16h8" }),
1053
+ /* @__PURE__ */ jsx("path", { d: "M12 10v8" })
1054
+ ] }));
1055
+ const FileTextIcon = createIcon("FileTextIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1056
+ /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
1057
+ /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
1058
+ /* @__PURE__ */ jsx("path", { d: "M9 13h6" }),
1059
+ /* @__PURE__ */ jsx("path", { d: "M9 17h6" })
1060
+ ] }));
1061
+ const Flower2Icon = createIcon("Flower2Icon", /* @__PURE__ */ jsxs(Fragment, { children: [
1062
+ /* @__PURE__ */ jsx("circle", {
1063
+ cx: "12",
1064
+ cy: "12",
1065
+ r: "2"
1066
+ }),
1067
+ /* @__PURE__ */ jsx("path", { d: "M12 10C8 4 16 4 12 10Z" }),
1068
+ /* @__PURE__ */ jsx("path", { d: "M14 12c6-4 6 4 0 0Z" }),
1069
+ /* @__PURE__ */ jsx("path", { d: "M12 14c4 6-4 6 0 0Z" }),
1070
+ /* @__PURE__ */ jsx("path", { d: "M10 12c-6 4-6-4 0 0Z" })
1071
+ ] }));
1072
+ const GlobeIcon = createIcon("GlobeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1073
+ /* @__PURE__ */ jsx("circle", {
1074
+ cx: "12",
1075
+ cy: "12",
1076
+ r: "9"
1077
+ }),
1078
+ /* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
1079
+ /* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 1 0 18" }),
1080
+ /* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 0 0 18" })
1081
+ ] }));
1082
+ const GraduationCapIcon = createIcon("GraduationCapIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1083
+ /* @__PURE__ */ jsx("path", { d: "m3 8 9-4 9 4-9 4Z" }),
1084
+ /* @__PURE__ */ jsx("path", { d: "M7 10v5c3 3 7 3 10 0v-5" }),
1085
+ /* @__PURE__ */ jsx("path", { d: "M21 8v6" })
1086
+ ] }));
1087
+ const HandHeartIcon = createIcon("HandHeartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1088
+ /* @__PURE__ */ jsx("path", { d: "M3 15h4l4 4h5l5-5" }),
1089
+ /* @__PURE__ */ jsx("path", { d: "M7 15l3-3h4a2 2 0 0 1 2 2" }),
1090
+ /* @__PURE__ */ jsx("path", { d: "M12 8c-2-2-5 1-2 4l2 2 2-2c3-3 0-6-2-4Z" })
1091
+ ] }));
1092
+ 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" }));
1093
+ 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" })] }));
1094
+ const HomeIcon = createIcon("HomeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1095
+ /* @__PURE__ */ jsx("path", { d: "m3 11 9-8 9 8" }),
1096
+ /* @__PURE__ */ jsx("path", { d: "M5 10v10h14V10" }),
1097
+ /* @__PURE__ */ jsx("path", { d: "M9 20v-6h6v6" })
1098
+ ] }));
1099
+ const InfoIcon = createIcon("InfoIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1100
+ /* @__PURE__ */ jsx("circle", {
1101
+ cx: "12",
1102
+ cy: "12",
1103
+ r: "9"
1104
+ }),
1105
+ /* @__PURE__ */ jsx("path", { d: "M12 11v6" }),
1106
+ /* @__PURE__ */ jsx("path", { d: "M12 7h.01" })
1107
+ ] }));
1108
+ 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" })] }));
1109
+ const LightbulbIcon = createIcon("LightbulbIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1110
+ /* @__PURE__ */ jsx("path", { d: "M9 18h6" }),
1111
+ /* @__PURE__ */ jsx("path", { d: "M10 22h4" }),
1112
+ /* @__PURE__ */ jsx("path", { d: "M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z" })
1113
+ ] }));
1114
+ const LockIcon = createIcon("LockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
1115
+ x: "5",
1116
+ y: "10",
1117
+ width: "14",
1118
+ height: "10",
1119
+ rx: "2"
1120
+ }), /* @__PURE__ */ jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })] }));
1121
+ const MailIcon = createIcon("MailIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
1122
+ x: "3",
1123
+ y: "5",
1124
+ width: "18",
1125
+ height: "14",
1126
+ rx: "2"
1127
+ }), /* @__PURE__ */ jsx("path", { d: "m3 7 9 6 9-6" })] }));
1128
+ 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", {
1129
+ cx: "12",
1130
+ cy: "9",
1131
+ r: "2.5"
1132
+ })] }));
1133
+ 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" }) }));
1134
+ const MinusIcon = createIcon("MinusIcon", /* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
1135
+ const PackageIcon = createIcon("PackageIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1136
+ /* @__PURE__ */ jsx("path", { d: "m12 3 8 4.5v9L12 21l-8-4.5v-9Z" }),
1137
+ /* @__PURE__ */ jsx("path", { d: "M12 12 4 7.5" }),
1138
+ /* @__PURE__ */ jsx("path", { d: "m12 12 8-4.5" }),
1139
+ /* @__PURE__ */ jsx("path", { d: "M12 12v9" })
1140
+ ] }));
1141
+ 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" }) }));
1142
+ const PlayIcon = createIcon("PlayIcon", /* @__PURE__ */ jsx("path", { d: "m8 5 11 7-11 7Z" }));
1143
+ const PlusIcon = createIcon("PlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "M5 12h14" })] }));
1144
+ const ShieldIcon = createIcon("ShieldIcon", /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z" }));
1145
+ 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" })] }));
1146
+ const ShoppingCartIcon = createIcon("ShoppingCartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1147
+ /* @__PURE__ */ jsx("circle", {
1148
+ cx: "9",
1149
+ cy: "20",
1150
+ r: "1"
1151
+ }),
1152
+ /* @__PURE__ */ jsx("circle", {
1153
+ cx: "18",
1154
+ cy: "20",
1155
+ r: "1"
1156
+ }),
1157
+ /* @__PURE__ */ jsx("path", { d: "M2 3h3l3 12h10l3-8H7" })
1158
+ ] }));
1159
+ const SmileIcon = createIcon("SmileIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1160
+ /* @__PURE__ */ jsx("circle", {
1161
+ cx: "12",
1162
+ cy: "12",
1163
+ r: "9"
1164
+ }),
1165
+ /* @__PURE__ */ jsx("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
1166
+ /* @__PURE__ */ jsx("path", { d: "M9 9h.01" }),
1167
+ /* @__PURE__ */ jsx("path", { d: "M15 9h.01" })
1168
+ ] }));
1169
+ 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" })] }));
1170
+ const SproutIcon = createIcon("SproutIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1171
+ /* @__PURE__ */ jsx("path", { d: "M12 21V10" }),
1172
+ /* @__PURE__ */ jsx("path", { d: "M12 10C8 5 4 6 3 10c4 1 7 0 9 0Z" }),
1173
+ /* @__PURE__ */ jsx("path", { d: "M12 11c4-5 8-4 9 0-4 1-7 0-9 0Z" })
1174
+ ] }));
1175
+ 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" }));
1176
+ const TargetIcon = createIcon("TargetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1177
+ /* @__PURE__ */ jsx("circle", {
1178
+ cx: "12",
1179
+ cy: "12",
1180
+ r: "9"
1181
+ }),
1182
+ /* @__PURE__ */ jsx("circle", {
1183
+ cx: "12",
1184
+ cy: "12",
1185
+ r: "5"
1186
+ }),
1187
+ /* @__PURE__ */ jsx("circle", {
1188
+ cx: "12",
1189
+ cy: "12",
1190
+ r: "1"
1191
+ })
1192
+ ] }));
1193
+ const UploadIcon = createIcon("UploadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1194
+ /* @__PURE__ */ jsx("path", { d: "M12 21V9" }),
1195
+ /* @__PURE__ */ jsx("path", { d: "m7 14 5-5 5 5" }),
1196
+ /* @__PURE__ */ jsx("path", { d: "M5 3h14" })
1197
+ ] }));
1198
+ const UserRoundCheckIcon = createIcon("UserRoundCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1199
+ /* @__PURE__ */ jsx("circle", {
1200
+ cx: "10",
1201
+ cy: "8",
1202
+ r: "4"
1203
+ }),
1204
+ /* @__PURE__ */ jsx("path", { d: "M3 21a7 7 0 0 1 11.5-5.3" }),
1205
+ /* @__PURE__ */ jsx("path", { d: "m15 19 2 2 4-5" })
1206
+ ] }));
1207
+ const UsersIcon = createIcon("UsersIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
1208
+ /* @__PURE__ */ jsx("circle", {
1209
+ cx: "9",
1210
+ cy: "8",
1211
+ r: "4"
1212
+ }),
1213
+ /* @__PURE__ */ jsx("path", { d: "M2 21a7 7 0 0 1 14 0" }),
1214
+ /* @__PURE__ */ jsx("path", { d: "M17 11a4 4 0 0 0 0-7" }),
1215
+ /* @__PURE__ */ jsx("path", { d: "M22 21a7 7 0 0 0-5-6.7" })
1216
+ ] }));
1217
+ 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" })] }));
1218
+ const XIcon = createIcon("XIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })] }));
1219
+ //#endregion
1220
+ //#region ../blocks/src/system/runtime/nodes/spinner.tsx
1221
+ function resolveColorStyle(color) {
1222
+ switch (color) {
1223
+ case void 0: return;
1224
+ case "inherit": return { color: "inherit" };
1225
+ case "foreground": return { color: "rgb(var(--tb-foreground))" };
1226
+ case "text": return { color: "rgb(var(--tb-text))" };
1227
+ default: return;
1228
+ }
1229
+ }
1230
+ function SpinnerNode({ className, size = "md", color, strokeWidth = 3, srLabel, style, ...rest }) {
1231
+ const hasExplicitAriaLabel = typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0;
1232
+ const accessibilityProps = srLabel ? {
1233
+ role: "status",
1234
+ "aria-live": "polite"
1235
+ } : hasExplicitAriaLabel ? {} : { "aria-hidden": true };
1236
+ const trackStroke = color === "inherit" ? "currentColor" : "var(--rb-spinner-track-color)";
1237
+ const trackOpacity = color === "inherit" ? .25 : 1;
1238
+ return /* @__PURE__ */ jsxs("span", {
1239
+ ...accessibilityProps,
1240
+ className: clsx("rb-spinner", size ? `rb-spinner--${size}` : null, color === "inherit" ? "rb-spinner--inherit" : null, className),
1241
+ style: {
1242
+ ...resolveColorStyle(color),
1243
+ ...style ?? {}
1244
+ },
1245
+ ...rest,
1246
+ children: [/* @__PURE__ */ jsxs("svg", {
1247
+ viewBox: "0 0 24 24",
1248
+ fill: "none",
1249
+ "aria-hidden": "true",
1250
+ children: [/* @__PURE__ */ jsx("circle", {
1251
+ cx: "12",
1252
+ cy: "12",
1253
+ r: "10",
1254
+ stroke: trackStroke,
1255
+ strokeWidth,
1256
+ opacity: trackOpacity
1257
+ }), /* @__PURE__ */ jsx("path", {
1258
+ d: "M12 2a10 10 0 0 1 10 10",
1259
+ stroke: "currentColor",
1260
+ strokeWidth,
1261
+ strokeLinecap: "round"
1262
+ })]
1263
+ }), srLabel ? /* @__PURE__ */ jsx("span", {
1264
+ className: "rb-sr-only",
1265
+ children: srLabel
1266
+ }) : null]
1267
+ });
1268
+ }
1269
+ //#endregion
1270
+ //#region ../blocks/src/system/runtime/nodes/buttonAffordance.ts
1271
+ function normalize(value) {
1272
+ const trimmed = typeof value === "string" ? value.trim() : "";
1273
+ return trimmed.length > 0 ? trimmed : null;
1274
+ }
1275
+ /**
1276
+ * Resolve the node-authored trailing affordance, or `null` when no icon exists.
1277
+ */
1278
+ function resolveButtonAffordance(input) {
1279
+ const nodeIcon = normalize(input.trailingIcon);
1280
+ if (nodeIcon) return { iconId: nodeIcon };
1281
+ return null;
1282
+ }
1283
+ //#endregion
1284
+ //#region ../blocks/src/system/icons/cta.ts
1285
+ /**
1286
+ * Curated icon set for CTA/button icons.
1287
+ *
1288
+ * Guardrail: keep this list small and action-oriented. This is intentionally not the full Lucide set.
1289
+ * Extend by adding to CTA_ICON_NAMES and the mapping below (explicit imports only).
1290
+ */
1291
+ const CTA_ICON_NAMES = [
1292
+ "ArrowRight",
1293
+ "ArrowLeft",
1294
+ "ChevronRight",
1295
+ "ChevronLeft",
1296
+ "ChevronUp",
1297
+ "ChevronDown",
1298
+ "ExternalLink",
1299
+ "Download",
1300
+ "Upload",
1301
+ "Mail",
1302
+ "Phone",
1303
+ "Play",
1304
+ "ShoppingCart",
1305
+ "Calendar",
1306
+ "MapPin",
1307
+ "Info",
1308
+ "Plus",
1309
+ "Minus",
1310
+ "Check",
1311
+ "X"
1312
+ ];
1313
+ const CTA_ICON_COMPONENTS = {
1314
+ ArrowRight: ArrowRightIcon,
1315
+ ArrowLeft: ArrowLeftIcon,
1316
+ ChevronRight: ChevronRightIcon,
1317
+ ChevronLeft: ChevronLeftIcon,
1318
+ ChevronUp: ChevronUpIcon,
1319
+ ChevronDown: ChevronDownIcon,
1320
+ ExternalLink: ExternalLinkIcon,
1321
+ Download: DownloadIcon,
1322
+ Upload: UploadIcon,
1323
+ Mail: MailIcon,
1324
+ Phone: PhoneIcon,
1325
+ Play: PlayIcon,
1326
+ ShoppingCart: ShoppingCartIcon,
1327
+ Calendar: CalendarIcon,
1328
+ MapPin: MapPinIcon,
1329
+ Info: InfoIcon,
1330
+ Plus: PlusIcon,
1331
+ Minus: MinusIcon,
1332
+ Check: CheckIcon,
1333
+ X: XIcon
1334
+ };
1335
+ function isCtaIconName(value) {
1336
+ return typeof value === "string" && CTA_ICON_NAMES.includes(value);
1337
+ }
1338
+ function formatLucideName(name) {
1339
+ return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2");
1340
+ }
1341
+ const CTA_ICON_OPTIONS = CTA_ICON_NAMES.map((id) => ({
1342
+ id,
1343
+ label: formatLucideName(id)
1344
+ }));
1345
+ function getCtaIconComponent(name) {
1346
+ if (!isCtaIconName(name)) return null;
1347
+ return CTA_ICON_COMPONENTS[name] ?? null;
1348
+ }
1349
+ //#endregion
1350
+ //#region ../blocks/src/system/icons/semantic.ts
1351
+ const SEMANTIC_ICON_IDS = [
1352
+ "protection-trust",
1353
+ "confidentiality",
1354
+ "care-support",
1355
+ "partnership",
1356
+ "warmth",
1357
+ "community",
1358
+ "personal-guidance",
1359
+ "conversation",
1360
+ "friendly-welcome",
1361
+ "insight-learning",
1362
+ "natural-wellbeing",
1363
+ "growth",
1364
+ "gentle-care",
1365
+ "special-touch",
1366
+ "ideas",
1367
+ "direction",
1368
+ "focus",
1369
+ "quality",
1370
+ "highlight",
1371
+ "verified-quality",
1372
+ "learning",
1373
+ "training",
1374
+ "programmes-dates",
1375
+ "place",
1376
+ "products",
1377
+ "packages",
1378
+ "time",
1379
+ "practical-service",
1380
+ "at-home",
1381
+ "worldwide",
1382
+ "professional-service"
1383
+ ];
1384
+ const SEMANTIC_ICON_COMPONENTS = {
1385
+ "protection-trust": ShieldIcon,
1386
+ confidentiality: LockIcon,
1387
+ "care-support": HandHeartIcon,
1388
+ partnership: HeartHandshakeIcon,
1389
+ warmth: HeartIcon,
1390
+ community: UsersIcon,
1391
+ "personal-guidance": UserRoundCheckIcon,
1392
+ conversation: MessageCircleIcon,
1393
+ "friendly-welcome": SmileIcon,
1394
+ "insight-learning": BrainIcon,
1395
+ "natural-wellbeing": LeafIcon,
1396
+ growth: SproutIcon,
1397
+ "gentle-care": Flower2Icon,
1398
+ "special-touch": SparklesIcon,
1399
+ ideas: LightbulbIcon,
1400
+ direction: CompassIcon,
1401
+ focus: TargetIcon,
1402
+ quality: AwardIcon,
1403
+ highlight: StarIcon,
1404
+ "verified-quality": BadgeCheckIcon,
1405
+ learning: BookOpenIcon,
1406
+ training: GraduationCapIcon,
1407
+ "programmes-dates": CalendarDaysIcon,
1408
+ place: MapPinIcon,
1409
+ products: ShoppingBagIcon,
1410
+ packages: PackageIcon,
1411
+ time: ClockIcon,
1412
+ "practical-service": WrenchIcon,
1413
+ "at-home": HomeIcon,
1414
+ worldwide: GlobeIcon,
1415
+ "professional-service": BriefcaseBusinessIcon
1416
+ };
1417
+ const featurePreset = ["feature"];
1418
+ const SEMANTIC_ICON_DEFINITIONS = [
1419
+ {
1420
+ id: "protection-trust",
1421
+ label: "Protection and trust",
1422
+ tags: [
1423
+ "safe",
1424
+ "safety",
1425
+ "security",
1426
+ "trust",
1427
+ "privacy",
1428
+ "confidence"
1429
+ ],
1430
+ domains: [
1431
+ "wellbeing",
1432
+ "services",
1433
+ "technology"
1434
+ ],
1435
+ tone: ["trustworthy", "practical"],
1436
+ presets: featurePreset
1437
+ },
1438
+ {
1439
+ id: "confidentiality",
1440
+ label: "Confidentiality",
1441
+ tags: [
1442
+ "confidential",
1443
+ "privacy",
1444
+ "secure",
1445
+ "protected",
1446
+ "private"
1447
+ ],
1448
+ domains: [
1449
+ "wellbeing",
1450
+ "coaching",
1451
+ "services",
1452
+ "technology"
1453
+ ],
1454
+ tone: ["trustworthy", "calm"],
1455
+ presets: featurePreset
1456
+ },
1457
+ {
1458
+ id: "care-support",
1459
+ label: "Care and support",
1460
+ tags: [
1461
+ "care",
1462
+ "support",
1463
+ "therapy",
1464
+ "kindness",
1465
+ "help",
1466
+ "compassion"
1467
+ ],
1468
+ domains: [
1469
+ "wellbeing",
1470
+ "coaching",
1471
+ "community"
1472
+ ],
1473
+ tone: ["warm", "human"],
1474
+ presets: featurePreset
1475
+ },
1476
+ {
1477
+ id: "partnership",
1478
+ label: "Partnership",
1479
+ tags: [
1480
+ "partnership",
1481
+ "together",
1482
+ "support",
1483
+ "relationship",
1484
+ "collaboration"
1485
+ ],
1486
+ domains: [
1487
+ "coaching",
1488
+ "community",
1489
+ "services"
1490
+ ],
1491
+ tone: [
1492
+ "warm",
1493
+ "human",
1494
+ "trustworthy"
1495
+ ],
1496
+ presets: featurePreset
1497
+ },
1498
+ {
1499
+ id: "warmth",
1500
+ label: "Warmth",
1501
+ tags: [
1502
+ "heart",
1503
+ "warmth",
1504
+ "care",
1505
+ "love",
1506
+ "wellbeing",
1507
+ "personal"
1508
+ ],
1509
+ domains: [
1510
+ "wellbeing",
1511
+ "community",
1512
+ "hospitality"
1513
+ ],
1514
+ tone: ["warm", "human"],
1515
+ presets: featurePreset
1516
+ },
1517
+ {
1518
+ id: "community",
1519
+ label: "Community",
1520
+ tags: [
1521
+ "community",
1522
+ "group",
1523
+ "people",
1524
+ "team",
1525
+ "members",
1526
+ "belonging"
1527
+ ],
1528
+ domains: [
1529
+ "community",
1530
+ "education",
1531
+ "events"
1532
+ ],
1533
+ tone: ["human", "warm"],
1534
+ presets: featurePreset
1535
+ },
1536
+ {
1537
+ id: "personal-guidance",
1538
+ label: "Personal guidance",
1539
+ tags: [
1540
+ "guidance",
1541
+ "personal",
1542
+ "coach",
1543
+ "expert",
1544
+ "one to one",
1545
+ "trusted"
1546
+ ],
1547
+ domains: [
1548
+ "coaching",
1549
+ "services",
1550
+ "education"
1551
+ ],
1552
+ tone: ["trustworthy", "human"],
1553
+ presets: featurePreset
1554
+ },
1555
+ {
1556
+ id: "conversation",
1557
+ label: "Conversation",
1558
+ tags: [
1559
+ "conversation",
1560
+ "talk",
1561
+ "chat",
1562
+ "communication",
1563
+ "support"
1564
+ ],
1565
+ domains: [
1566
+ "coaching",
1567
+ "community",
1568
+ "services"
1569
+ ],
1570
+ tone: ["human", "warm"],
1571
+ presets: featurePreset
1572
+ },
1573
+ {
1574
+ id: "friendly-welcome",
1575
+ label: "Friendly welcome",
1576
+ tags: [
1577
+ "friendly",
1578
+ "welcome",
1579
+ "positive",
1580
+ "happy",
1581
+ "approachable"
1582
+ ],
1583
+ domains: [
1584
+ "hospitality",
1585
+ "community",
1586
+ "services"
1587
+ ],
1588
+ tone: [
1589
+ "warm",
1590
+ "playful",
1591
+ "human"
1592
+ ],
1593
+ presets: featurePreset
1594
+ },
1595
+ {
1596
+ id: "insight-learning",
1597
+ label: "Insight and learning",
1598
+ tags: [
1599
+ "mind",
1600
+ "insight",
1601
+ "learning",
1602
+ "clarity",
1603
+ "thinking",
1604
+ "therapy"
1605
+ ],
1606
+ domains: [
1607
+ "wellbeing",
1608
+ "coaching",
1609
+ "education"
1610
+ ],
1611
+ tone: ["calm", "practical"],
1612
+ presets: featurePreset
1613
+ },
1614
+ {
1615
+ id: "natural-wellbeing",
1616
+ label: "Natural wellbeing",
1617
+ tags: [
1618
+ "natural",
1619
+ "wellbeing",
1620
+ "growth",
1621
+ "eco",
1622
+ "calm",
1623
+ "organic"
1624
+ ],
1625
+ domains: [
1626
+ "wellbeing",
1627
+ "hospitality",
1628
+ "creative"
1629
+ ],
1630
+ tone: ["calm", "warm"],
1631
+ presets: featurePreset
1632
+ },
1633
+ {
1634
+ id: "growth",
1635
+ label: "Growth",
1636
+ tags: [
1637
+ "growth",
1638
+ "new",
1639
+ "progress",
1640
+ "development",
1641
+ "nurture"
1642
+ ],
1643
+ domains: [
1644
+ "wellbeing",
1645
+ "coaching",
1646
+ "education",
1647
+ "community"
1648
+ ],
1649
+ tone: ["warm", "calm"],
1650
+ presets: featurePreset
1651
+ },
1652
+ {
1653
+ id: "gentle-care",
1654
+ label: "Gentle care",
1655
+ tags: [
1656
+ "gentle",
1657
+ "soft",
1658
+ "care",
1659
+ "wellbeing",
1660
+ "beauty",
1661
+ "calm"
1662
+ ],
1663
+ domains: [
1664
+ "wellbeing",
1665
+ "creative",
1666
+ "hospitality"
1667
+ ],
1668
+ tone: [
1669
+ "warm",
1670
+ "calm",
1671
+ "premium"
1672
+ ],
1673
+ presets: featurePreset
1674
+ },
1675
+ {
1676
+ id: "special-touch",
1677
+ label: "Special touch",
1678
+ tags: [
1679
+ "special",
1680
+ "sparkle",
1681
+ "magic",
1682
+ "polish",
1683
+ "delight",
1684
+ "creative"
1685
+ ],
1686
+ domains: [
1687
+ "creative",
1688
+ "commerce",
1689
+ "hospitality"
1690
+ ],
1691
+ tone: ["playful", "premium"],
1692
+ presets: featurePreset
1693
+ },
1694
+ {
1695
+ id: "ideas",
1696
+ label: "Ideas",
1697
+ tags: [
1698
+ "idea",
1699
+ "innovation",
1700
+ "clarity",
1701
+ "creative",
1702
+ "strategy"
1703
+ ],
1704
+ domains: [
1705
+ "coaching",
1706
+ "education",
1707
+ "creative",
1708
+ "technology"
1709
+ ],
1710
+ tone: ["practical", "playful"],
1711
+ presets: featurePreset
1712
+ },
1713
+ {
1714
+ id: "direction",
1715
+ label: "Direction",
1716
+ tags: [
1717
+ "direction",
1718
+ "navigation",
1719
+ "path",
1720
+ "journey",
1721
+ "guidance"
1722
+ ],
1723
+ domains: [
1724
+ "coaching",
1725
+ "education",
1726
+ "services"
1727
+ ],
1728
+ tone: ["trustworthy", "practical"],
1729
+ presets: featurePreset
1730
+ },
1731
+ {
1732
+ id: "focus",
1733
+ label: "Focus",
1734
+ tags: [
1735
+ "focus",
1736
+ "goal",
1737
+ "outcome",
1738
+ "aim",
1739
+ "strategy"
1740
+ ],
1741
+ domains: [
1742
+ "coaching",
1743
+ "services",
1744
+ "technology"
1745
+ ],
1746
+ tone: ["practical"],
1747
+ presets: featurePreset
1748
+ },
1749
+ {
1750
+ id: "quality",
1751
+ label: "Quality",
1752
+ tags: [
1753
+ "quality",
1754
+ "award",
1755
+ "standard",
1756
+ "achievement",
1757
+ "premium"
1758
+ ],
1759
+ domains: [
1760
+ "services",
1761
+ "education",
1762
+ "commerce"
1763
+ ],
1764
+ tone: ["premium", "trustworthy"],
1765
+ presets: featurePreset
1766
+ },
1767
+ {
1768
+ id: "highlight",
1769
+ label: "Highlight",
1770
+ tags: [
1771
+ "highlight",
1772
+ "featured",
1773
+ "favorite",
1774
+ "quality",
1775
+ "special"
1776
+ ],
1777
+ domains: [
1778
+ "creative",
1779
+ "commerce",
1780
+ "services"
1781
+ ],
1782
+ tone: ["playful", "premium"],
1783
+ presets: featurePreset
1784
+ },
1785
+ {
1786
+ id: "verified-quality",
1787
+ label: "Verified quality",
1788
+ tags: [
1789
+ "verified",
1790
+ "quality",
1791
+ "approved",
1792
+ "trusted",
1793
+ "check"
1794
+ ],
1795
+ domains: [
1796
+ "services",
1797
+ "commerce",
1798
+ "education"
1799
+ ],
1800
+ tone: ["trustworthy", "practical"],
1801
+ presets: featurePreset
1802
+ },
1803
+ {
1804
+ id: "learning",
1805
+ label: "Learning",
1806
+ tags: [
1807
+ "learning",
1808
+ "book",
1809
+ "course",
1810
+ "knowledge",
1811
+ "education"
1812
+ ],
1813
+ domains: [
1814
+ "education",
1815
+ "coaching",
1816
+ "community"
1817
+ ],
1818
+ tone: ["calm", "practical"],
1819
+ presets: featurePreset
1820
+ },
1821
+ {
1822
+ id: "training",
1823
+ label: "Training",
1824
+ tags: [
1825
+ "training",
1826
+ "course",
1827
+ "qualification",
1828
+ "school",
1829
+ "education"
1830
+ ],
1831
+ domains: ["education", "coaching"],
1832
+ tone: ["trustworthy", "practical"],
1833
+ presets: featurePreset
1834
+ },
1835
+ {
1836
+ id: "programmes-dates",
1837
+ label: "Programmes and dates",
1838
+ tags: [
1839
+ "calendar",
1840
+ "dates",
1841
+ "schedule",
1842
+ "events",
1843
+ "programme",
1844
+ "classes"
1845
+ ],
1846
+ domains: [
1847
+ "events",
1848
+ "education",
1849
+ "community"
1850
+ ],
1851
+ tone: ["practical"],
1852
+ presets: featurePreset
1853
+ },
1854
+ {
1855
+ id: "place",
1856
+ label: "Place",
1857
+ tags: [
1858
+ "place",
1859
+ "location",
1860
+ "local",
1861
+ "venue",
1862
+ "destination"
1863
+ ],
1864
+ domains: [
1865
+ "events",
1866
+ "hospitality",
1867
+ "services"
1868
+ ],
1869
+ tone: ["practical"],
1870
+ presets: featurePreset
1871
+ },
1872
+ {
1873
+ id: "products",
1874
+ label: "Products",
1875
+ tags: [
1876
+ "products",
1877
+ "shop",
1878
+ "store",
1879
+ "retail",
1880
+ "commerce"
1881
+ ],
1882
+ domains: ["commerce"],
1883
+ tone: ["practical", "premium"],
1884
+ presets: featurePreset
1885
+ },
1886
+ {
1887
+ id: "packages",
1888
+ label: "Packages",
1889
+ tags: [
1890
+ "package",
1891
+ "bundle",
1892
+ "delivery",
1893
+ "offer",
1894
+ "product"
1895
+ ],
1896
+ domains: ["commerce", "services"],
1897
+ tone: ["practical"],
1898
+ presets: featurePreset
1899
+ },
1900
+ {
1901
+ id: "time",
1902
+ label: "Time",
1903
+ tags: [
1904
+ "time",
1905
+ "duration",
1906
+ "schedule",
1907
+ "availability",
1908
+ "appointment"
1909
+ ],
1910
+ domains: [
1911
+ "events",
1912
+ "services",
1913
+ "wellbeing"
1914
+ ],
1915
+ tone: ["practical", "calm"],
1916
+ presets: featurePreset
1917
+ },
1918
+ {
1919
+ id: "practical-service",
1920
+ label: "Practical service",
1921
+ tags: [
1922
+ "service",
1923
+ "repair",
1924
+ "setup",
1925
+ "practical",
1926
+ "tools",
1927
+ "support"
1928
+ ],
1929
+ domains: ["services", "technology"],
1930
+ tone: ["practical"],
1931
+ presets: featurePreset
1932
+ },
1933
+ {
1934
+ id: "at-home",
1935
+ label: "At home",
1936
+ tags: [
1937
+ "home",
1938
+ "domestic",
1939
+ "comfort",
1940
+ "local",
1941
+ "space"
1942
+ ],
1943
+ domains: [
1944
+ "hospitality",
1945
+ "services",
1946
+ "community"
1947
+ ],
1948
+ tone: ["warm", "calm"],
1949
+ presets: featurePreset
1950
+ },
1951
+ {
1952
+ id: "worldwide",
1953
+ label: "Worldwide",
1954
+ tags: [
1955
+ "global",
1956
+ "online",
1957
+ "worldwide",
1958
+ "remote",
1959
+ "international"
1960
+ ],
1961
+ domains: [
1962
+ "technology",
1963
+ "education",
1964
+ "services"
1965
+ ],
1966
+ tone: ["practical"],
1967
+ presets: featurePreset
1968
+ },
1969
+ {
1970
+ id: "professional-service",
1971
+ label: "Professional service",
1972
+ tags: [
1973
+ "business",
1974
+ "professional",
1975
+ "consulting",
1976
+ "service",
1977
+ "work"
1978
+ ],
1979
+ domains: [
1980
+ "services",
1981
+ "technology",
1982
+ "coaching"
1983
+ ],
1984
+ tone: ["practical", "trustworthy"],
1985
+ presets: featurePreset
1986
+ }
1987
+ ];
1988
+ SEMANTIC_ICON_DEFINITIONS.map(({ id, label }) => ({
1989
+ id,
1990
+ label
1991
+ }));
1992
+ function isSemanticIconId(value) {
1993
+ return typeof value === "string" && SEMANTIC_ICON_IDS.includes(value);
1994
+ }
1995
+ function getSemanticIconComponent(name) {
1996
+ if (!isSemanticIconId(name)) return null;
1997
+ return SEMANTIC_ICON_COMPONENTS[name] ?? null;
1998
+ }
1999
+ //#endregion
2000
+ //#region ../blocks/src/system/icons/presets.ts
2001
+ const ICON_PICKER_PRESETS = ["cta", "feature"];
2002
+ //#endregion
2003
+ //#region ../blocks/src/system/icons/social.tsx
2004
+ const SOCIAL_ICON_NAMES = [
2005
+ "SocialFacebook",
2006
+ "SocialInstagram",
2007
+ "SocialLinkedIn",
2008
+ "SocialTikTok",
2009
+ "SocialWhatsApp",
2010
+ "SocialX",
2011
+ "SocialYouTube"
2012
+ ];
2013
+ const socialIcons = {
2014
+ SocialFacebook: createIcon("SocialFacebookIcon", /* @__PURE__ */ jsx("path", { d: "M14 8h3V4h-3c-3 0-5 2-5 5v3H6v4h3v6h4v-6h3l1-4h-4V9c0-.7.3-1 1-1Z" })),
2015
+ SocialInstagram: createIcon("SocialInstagramIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
2016
+ /* @__PURE__ */ jsx("rect", {
2017
+ x: "3",
2018
+ y: "3",
2019
+ width: "18",
2020
+ height: "18",
2021
+ rx: "5"
2022
+ }),
2023
+ /* @__PURE__ */ jsx("circle", {
2024
+ cx: "12",
2025
+ cy: "12",
2026
+ r: "4"
2027
+ }),
2028
+ /* @__PURE__ */ jsx("circle", {
2029
+ cx: "17.5",
2030
+ cy: "6.5",
2031
+ r: ".75",
2032
+ fill: "currentColor",
2033
+ stroke: "none"
2034
+ })
2035
+ ] })),
2036
+ SocialLinkedIn: createIcon("SocialLinkedInIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
2037
+ /* @__PURE__ */ jsx("path", { d: "M6 9v10" }),
2038
+ /* @__PURE__ */ jsx("path", {
2039
+ d: "M6 5.5v.01",
2040
+ strokeWidth: "3"
2041
+ }),
2042
+ /* @__PURE__ */ jsx("path", { d: "M10.5 19v-6a4 4 0 0 1 8 0v6" }),
2043
+ /* @__PURE__ */ jsx("path", { d: "M10.5 9v10" })
2044
+ ] })),
2045
+ 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" })] })),
2046
+ 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" })] })),
2047
+ SocialX: createIcon("SocialXIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m5 4 14 16" }), /* @__PURE__ */ jsx("path", { d: "M19 4 5 20" })] })),
2048
+ 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" })] }))
2049
+ };
2050
+ function isSocialIconName(value) {
2051
+ return typeof value === "string" && SOCIAL_ICON_NAMES.includes(value);
2052
+ }
2053
+ function getSocialIconComponent(value) {
2054
+ return isSocialIconName(value) ? socialIcons[value] : null;
2055
+ }
2056
+ //#endregion
2057
+ //#region ../blocks/src/system/icons/registry.ts
2058
+ function buildSearchText(parts) {
2059
+ return parts.map((part) => part.trim()).filter(Boolean).join(" ");
2060
+ }
2061
+ function semanticDefinitionToOption(definition, preset) {
2062
+ return {
2063
+ id: definition.id,
2064
+ label: definition.label,
2065
+ searchText: buildSearchText([
2066
+ definition.label,
2067
+ definition.id,
2068
+ ...definition.tags,
2069
+ ...definition.domains,
2070
+ ...definition.tone
2071
+ ]),
2072
+ preset
2073
+ };
2074
+ }
2075
+ CTA_ICON_OPTIONS.map((option) => ({
2076
+ id: option.id,
2077
+ label: option.label,
2078
+ searchText: buildSearchText([option.label, option.id]),
2079
+ preset: "cta"
2080
+ }));
2081
+ function semanticOptionsForPreset(preset) {
2082
+ return SEMANTIC_ICON_DEFINITIONS.filter((definition) => definition.presets.includes(preset)).map((definition) => semanticDefinitionToOption(definition, preset));
2083
+ }
2084
+ semanticOptionsForPreset("feature");
2085
+ function getIconComponent(name) {
2086
+ return getCtaIconComponent(name) ?? getSemanticIconComponent(name) ?? getSocialIconComponent(name);
2087
+ }
2088
+ //#endregion
2089
+ //#region ../blocks/src/system/runtime/shared/components/ThemedButton.tsx
2090
+ function themedButtonClasses(variant, size, extraClassName) {
2091
+ return [
2092
+ ...themeButtonVariantClassNames(variant),
2093
+ themeButtonSizeClassName(size),
2094
+ extraClassName
2095
+ ].filter(Boolean).join(" ");
2096
+ }
2097
+ function ThemedButtonLabel(props) {
2098
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
2099
+ props.pending ? /* @__PURE__ */ jsx(SpinnerNode, {
2100
+ size: props.pending.spinnerSize ?? "sm",
2101
+ color: "inherit",
2102
+ className: props.pending.spinnerClassName ?? "rb-mr-2",
2103
+ srLabel: props.pending.srLabel
2104
+ }) : null,
2105
+ props.labelClassName ? /* @__PURE__ */ jsx("span", {
2106
+ className: props.labelClassName,
2107
+ children: props.pending?.label ?? props.label
2108
+ }) : props.pending?.label ?? props.label,
2109
+ props.screenReaderSuffix ? /* @__PURE__ */ jsx("span", {
2110
+ className: "rb-sr-only",
2111
+ children: props.screenReaderSuffix
2112
+ }) : null
2113
+ ] });
2114
+ return props.pending?.contentClassName ? /* @__PURE__ */ jsx("span", {
2115
+ className: props.pending.contentClassName,
2116
+ children: content
2117
+ }) : content;
2118
+ }
2119
+ /** A native file chooser with the same structural styling owner as themed buttons. */
2120
+ function ThemedFileChooser({ variant, size, extraClassName, label, inputRef, inputProps }) {
2121
+ return /* @__PURE__ */ jsxs("label", {
2122
+ className: themedButtonClasses(variant, size, extraClassName),
2123
+ children: [
2124
+ /* @__PURE__ */ jsx("input", {
2125
+ ...inputProps,
2126
+ ref: inputRef,
2127
+ type: "file",
2128
+ className: "rb-sr-only"
2129
+ }),
2130
+ /* @__PURE__ */ jsx("svg", {
2131
+ "aria-hidden": "true",
2132
+ width: "15",
2133
+ height: "15",
2134
+ viewBox: "0 0 24 24",
2135
+ fill: "none",
2136
+ stroke: "currentColor",
2137
+ strokeWidth: "2",
2138
+ children: /* @__PURE__ */ jsx("path", { d: "M12 16V4M6 10l6-6 6 6M4 20h16" })
2139
+ }),
2140
+ label
2141
+ ]
2142
+ });
2143
+ }
2144
+ function ThemedButton({ variant, size, extraClassName, screenReaderSuffix, labelClassName, pending, label, ...buttonProps }) {
2145
+ return /* @__PURE__ */ jsx("button", {
2146
+ ...buttonProps,
2147
+ className: themedButtonClasses(variant, size, extraClassName),
2148
+ children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
2149
+ label,
2150
+ pending,
2151
+ screenReaderSuffix,
2152
+ labelClassName
2153
+ })
2154
+ });
2155
+ }
2156
+ function ThemedButtonLink({ variant, size, extraClassName, screenReaderSuffix, labelClassName, label, ...anchorProps }) {
2157
+ return /* @__PURE__ */ jsx("a", {
2158
+ ...anchorProps,
2159
+ className: themedButtonClasses(variant, size, extraClassName),
2160
+ children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
2161
+ label,
2162
+ screenReaderSuffix,
2163
+ labelClassName
2164
+ })
2165
+ });
2166
+ }
2167
+ /** Fixed icon-only actions control; callers cannot supply icon children. */
2168
+ function ThemedActionsButton({ variant, size, extraClassName, ...buttonProps }) {
2169
+ return /* @__PURE__ */ jsx("button", {
2170
+ ...buttonProps,
2171
+ "aria-label": "Actions",
2172
+ className: themedButtonClasses(variant, size, extraClassName),
2173
+ children: /* @__PURE__ */ jsxs("svg", {
2174
+ width: "16",
2175
+ height: "16",
2176
+ viewBox: "0 0 16 16",
2177
+ fill: "currentColor",
2178
+ "aria-hidden": "true",
2179
+ children: [
2180
+ /* @__PURE__ */ jsx("circle", {
2181
+ cx: "8",
2182
+ cy: "3",
2183
+ r: "1.5"
2184
+ }),
2185
+ /* @__PURE__ */ jsx("circle", {
2186
+ cx: "8",
2187
+ cy: "8",
2188
+ r: "1.5"
2189
+ }),
2190
+ /* @__PURE__ */ jsx("circle", {
2191
+ cx: "8",
2192
+ cy: "13",
2193
+ r: "1.5"
2194
+ })
2195
+ ]
2196
+ })
2197
+ });
2198
+ }
2199
+ /** Fixed semantic download affordance; callers cannot supply arbitrary icon children. */
2200
+ function ThemedDownloadLink({ variant, size, extraClassName, label, screenReaderSuffix, labelClassName, ...anchorProps }) {
2201
+ return /* @__PURE__ */ jsxs("a", {
2202
+ ...anchorProps,
2203
+ className: themedButtonClasses(variant, size, extraClassName),
2204
+ children: [/* @__PURE__ */ jsx(DownloadIcon, {
2205
+ "aria-hidden": "true",
2206
+ size: 24
2207
+ }), /* @__PURE__ */ jsx(ThemedButtonLabel, {
2208
+ label,
2209
+ screenReaderSuffix,
2210
+ labelClassName
2211
+ })]
2212
+ });
2213
+ }
2214
+ /** Boundary for authored button nodes and their registry-backed trailing icon. */
2215
+ function ThemedAuthoredButton({ label, href, variant, size, extraClassName, disabled, type = "button", target, rel, ariaLabel, dataTestId, trailingIcon, onClick }) {
2216
+ const affordance = resolveButtonAffordance({ trailingIcon });
2217
+ const Icon = affordance ? getIconComponent(affordance.iconId) : null;
2218
+ const className = variant ? themedButtonClasses(variant, size, Icon ? [extraClassName, themeButtonExtraClassesWithTrailingIcon()].filter(Boolean).join(" ") : extraClassName) : extraClassName ?? void 0;
2219
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [label, Icon ? /* @__PURE__ */ jsx(Icon, {
2220
+ "aria-hidden": true,
2221
+ className: "rb-ml-2 rb-h-4 rb-w-4 rb-inline-block"
2222
+ }) : null] });
2223
+ return href ? /* @__PURE__ */ jsx("a", {
2224
+ href,
2225
+ target,
2226
+ rel,
2227
+ "aria-label": ariaLabel,
2228
+ "data-testid": dataTestId,
2229
+ className,
2230
+ onClick,
2231
+ children: content
2232
+ }) : /* @__PURE__ */ jsx("button", {
2233
+ type,
2234
+ disabled,
2235
+ "aria-label": ariaLabel,
2236
+ "data-testid": dataTestId,
2237
+ className,
2238
+ onClick,
2239
+ children: content
2240
+ });
2241
+ }
2242
+ //#endregion
2243
+ export { confirmationPaymentSchema as A, getBookingInstalmentPlanIntervalCount as B, clsx as C, parseEventRegistrationErrorReason as D, eventRegistrationErrors as E, resolveAvailableBookingCollectionOptions as F, parsePositiveMoneyInputToCents as H, resolveBookingCollectionOptionFacts as I, getBookingLaterInstalments as L, planFlexibleBalanceCreditFirst as M, isBookingCollectionEquivalentToUpfront as N, checkoutCopy as O, repriceBookingCollectionOptions as P, validateBookingPaymentOptionKinds as R, PlusIcon as S, eventRegistrationErrorEndsCommand as T, formatCurrencyAmount as U, resolveFlexibleBalancePaymentEligibility as V, formatGiftCardAmountLabel as W, FileArchiveIcon as _, ThemedDownloadLink as a, FileTextIcon as b, ICON_PICKER_PRESETS as c, ArrowDownIcon as d, ChevronDownIcon as f, ExternalLinkIcon as g, ClockIcon as h, ThemedButtonLink as i, planCheckoutPaymentFlow as j, getStripeMinimumChargeRequirement as k, isSemanticIconId as l, CirclePlusIcon as m, ThemedAuthoredButton as n, ThemedFileChooser as o, CircleMinusIcon as p, ThemedButton as r, getIconComponent as s, ThemedActionsButton as t, SpinnerNode as u, FileAudioIcon as v, checkBrowserStripeKey as w, MinusIcon as x, FileSpreadsheetIcon as y, formatOrderInstalmentStatusLabel as z };