@riverbankcms/sdk 0.163.0 → 0.164.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -1
- package/dist/_dts/{BlocksIslandsHydrator-DYPGA_qh.d.ts → BlocksIslandsHydrator-CubPwupc.d.ts} +1 -1
- package/dist/_dts/{Page-zwnvFBPu.d.ts → Page-CDzsagB2.d.ts} +15 -12
- package/dist/_dts/{SdkPreviewMode-DukuJzGr.d.ts → SdkPreviewMode-CPRQbRCI.d.ts} +2 -3
- package/dist/_dts/{client-Chh3bnXC.d.ts → client-CbeYTSry.d.ts} +13 -41
- package/dist/_dts/{content-types-Bbzqw9J2.d.ts → content-types--uYRIcIF.d.ts} +2 -2
- package/dist/_dts/{contracts-GJ1kGBsi.d.ts → contracts-DJQYAOsv.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-BNMKhyvo.d.ts → footerPageOutline-CKkhBwgJ.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-Ce0m1P3B.d.ts → generatePageMetadata--qd7NCIA.d.ts} +2 -2
- package/dist/_dts/{index-CdSNXLOx.d.ts → index-BZE-1azr.d.ts} +1 -1
- package/dist/_dts/{index-C3mJvn27.d.ts → index-BpEbwDM7.d.ts} +4 -4
- package/dist/_dts/index-CXsnaCGe.d.ts +10 -0
- package/dist/_dts/{index-rhMSu0oY.d.ts → index-CjdIn9-_.d.ts} +2 -2
- package/dist/_dts/{index-DRxgeK8L.d.ts → index-DYQFmf--.d.ts} +2 -2
- package/dist/_dts/{index-CyQhZuhM.d.ts → index-D_pQO-AS.d.ts} +21803 -21487
- package/dist/_dts/{index-FstkyqQB.d.ts → index-DriYVLfT.d.ts} +2 -2
- package/dist/_dts/{index-CaL0nKkl.d.ts → index-JS8WYgD3.d.ts} +31245 -31027
- package/dist/_dts/{index-G2p-HOrK.d.ts → index-wegfy7lf.d.ts} +3 -3
- package/dist/_dts/{loadContent-DiLZoInK.d.ts → loadContent-DUi94Qfk.d.ts} +15 -30
- package/dist/_dts/{resolvePageContent-CWUnipv8.d.ts → resolvePageContent-JDE0ry6T.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +3 -4
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +6 -6
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +32 -52
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-DFOqkClJ.d.ts → types-DiciZDrk.d.ts} +3 -3
- package/dist/_dts/{types-CalL7aKP.d.ts → types-DubJnBnI.d.ts} +7 -7
- package/dist/_dts/{types-BmtrA45p.d.ts → types-W40f2olO.d.ts} +3 -2
- package/dist/_dts/{validation-G8MRoIhq.d.ts → validation-BF4_zNkR.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DLCXwe30.mjs → BlocksIslandsHydrator-64hFxF02.mjs} +20 -20
- package/dist/client/{BookingMailingListNote-BV5-50F0.mjs → BookingMailingListNote-CSQyFm9J.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-CVLAHdZG.mjs → CalendarNavigationChevron-Bvkx8Z7Y.mjs} +6 -6
- package/dist/client/{CheckboxChoice-Dtgp3OU8.mjs → CheckboxChoice-3PhxDxgR.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-B3caCnTT.mjs → DemoBookingPortalAccess-pt2xXBQp.mjs} +5 -5
- package/dist/client/{DemoPortalSignInLink-Ct8JMKW0.mjs → DemoPortalSignInLink-Qw780EfW.mjs} +1 -1
- package/dist/client/{EventCalendar.client-ffa6920T.mjs → EventCalendar.client-DWoboRW5.mjs} +9 -9
- package/dist/client/{EventCombined.client-zm0W2G79.mjs → EventCombined.client-C98ucpcP.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-CPPE2rWS.mjs → EventEmbeddedCheckoutStep-DHRlFfkp.mjs} +2 -1
- package/dist/client/{EventItem-CND3mfra.mjs → EventItem-hrSyTApW.mjs} +20 -16
- package/dist/client/{EventListWeekNavigation-D8QdxL_f.mjs → EventListWeekNavigation-C3t7H13W.mjs} +1 -1
- package/dist/client/{EventListing.client-CaoRZUI9.mjs → EventListing.client-Cp11sBX_.mjs} +3 -3
- package/dist/client/{EventListing.view-BfnOmxYD.mjs → EventListing.view-Dd5QHIAf.mjs} +7 -7
- package/dist/client/{EventRegistrationPayment-Dfu3RSL2.mjs → EventRegistrationPayment-ByT88VHR.mjs} +18 -22
- package/dist/client/{LocationMapActions-wlyxASdT.mjs → LocationMapActions-BsepG5Vv.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-B9oKSitp.mjs → MapDrawingSvg-R4JMT4yd.mjs} +1 -1
- package/dist/client/{Page-BEF9HrAy.mjs → Page-Dub71o3c.mjs} +444 -199
- package/dist/client/ProtectedSubmitButton-DGbgGvdh.mjs +14 -0
- package/dist/client/SpamProtectionWidget-CRsKTQV-.mjs +139 -0
- package/dist/client/{StepIndicator-Bjx4faaw.mjs → StepIndicator-Bp7MyutT.mjs} +2 -2
- package/dist/client/{TabBarFragment-Cu7k_VSl.mjs → TabBarFragment-C4WJyybx.mjs} +1 -1
- package/dist/client/{ThemedButton-DclwabI7.mjs → ThemedButton-BGVwNwE-.mjs} +2 -898
- package/dist/client/{accordion-lzM2nSZB.mjs → accordion-vCG_JC5t.mjs} +1 -1
- package/dist/client/altchaProtection-BWchRM3v.mjs +12 -0
- package/dist/client/{booking-form.client-Bll4QwBi.mjs → booking-form.client-CHTbcZJM.mjs} +23 -56
- package/dist/client/{bookingForm-Cq5fQ-vo.mjs → bookingForm-BxbUbzUr.mjs} +4 -4
- package/dist/client/bookings.mjs +23 -32
- package/dist/client/{carousel-CxerQwIx.mjs → carousel-FM1mkkL0.mjs} +2 -2
- package/dist/client/{carousel.client-CVUXq8Mb.mjs → carousel.client-ChoLiWwD.mjs} +1 -1
- package/dist/client/{cart-X-m0isoI.mjs → cart-BDFhbh9j.mjs} +3 -3
- package/dist/client/{cart.client-CJbzWIl0.mjs → cart.client-x3HOke6T.mjs} +1 -1
- package/dist/client/{checkout-Gd0O_fGH.mjs → checkout-BibhwnTd.mjs} +3 -3
- package/dist/client/{checkout.client-Baee6Jsm.mjs → checkout.client-CE4jUi0G.mjs} +1 -1
- package/dist/client/client.mjs +216 -109
- package/dist/client/{context-Bg0SFWcM.mjs → context-BNAM7NsW.mjs} +17 -3
- package/dist/client/{cta-HffyM4MA.mjs → cta-ChiN1Vgg.mjs} +1 -1
- package/dist/client/{dateFormatting-CV45BH5M.mjs → dateFormatting-QwBSo0hK.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CDWheSjI.mjs → demoPortalMagicLink-NwKJk6gn.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-BqVDXL0D.mjs → enhanceHeaderSection-D4zqEBDl.mjs} +3 -3
- package/dist/client/{event-details.client-SFtS9OkF.mjs → event-details.client-jFyFjOIC.mjs} +1 -1
- package/dist/client/{event-registration.client-CguNVIFY.mjs → event-registration.client-BK_jVv3R.mjs} +37 -55
- package/dist/client/{eventCalendar-DSGG35jd.mjs → eventCalendar-DSkzejQh.mjs} +4 -4
- package/dist/client/{eventCombined-Oe-PiChx.mjs → eventCombined-BG-BEaYh.mjs} +4 -4
- package/dist/client/{eventDetails-BhcTT6P3.mjs → eventDetails-BhIwXAKe.mjs} +2 -2
- package/dist/client/{eventListing-BS0kBEgI.mjs → eventListing-DQtyO1Xj.mjs} +4 -4
- package/dist/client/{eventRegistration-B82SHv7j.mjs → eventRegistration-DRTz8X0M.mjs} +4 -4
- package/dist/client/{form-DAIUrVXb.mjs → form-GXqjObPC.mjs} +3 -3
- package/dist/client/{form.client-BoAkhoh_.mjs → form.client-CoKNba2e.mjs} +33 -24
- package/dist/client/{form.parts-1VnasOK8.mjs → form.parts-magB_epJ.mjs} +6 -5
- package/dist/client/{formatDate-BKil_Psb.mjs → formatDate-BiloOyjS.mjs} +1 -1
- package/dist/client/gifting/client.mjs +4 -3
- package/dist/client/{headerSection-CyuHk8Ei.mjs → headerSection-BMQCPHT3.mjs} +2 -2
- package/dist/client/{mediaAssets-CGJE1Omu.mjs → mediaAssets-BX-vWwQc.mjs} +1 -1
- package/dist/client/{mediaContext-DIkX2S-X.mjs → mediaContext-CdqGYlWl.mjs} +1 -1
- package/dist/client/{newsletter-form.client-CCdyHx0B.mjs → newsletter-form.client-8orCez1z.mjs} +99 -84
- package/dist/client/{newsletter-form.parts-Dl8AjsXW.mjs → newsletter-form.parts-D8NgHY_F.mjs} +11 -7
- package/dist/client/{newsletterForm-qFWLZJui.mjs → newsletterForm-BhBNsS3n.mjs} +3 -3
- package/dist/client/{noop-4XFGzJpT.mjs → noop-C2vZse15.mjs} +3 -3
- package/dist/client/portal/client.mjs +13 -12
- package/dist/client/{product-detail.client-Tq4S99ce.mjs → product-detail.client-CQ0k0fbH.mjs} +1 -1
- package/dist/client/{product-list.client-CuL5jB1w.mjs → product-list.client-Xlr1P0x9.mjs} +1 -1
- package/dist/client/{productDetail-BRqgcotZ.mjs → productDetail-BsCao6X4.mjs} +3 -3
- package/dist/client/{productList-EK9Um-oh.mjs → productList-Cc-PmbEe.mjs} +3 -3
- package/dist/client/{propsDecoder-VD4arFq1.mjs → propsDecoder-DikkDJ9x.mjs} +3 -3
- package/dist/client/protection-C0PoH1lT.mjs +104 -0
- package/dist/client/purchase-BMsWpx8y.mjs +894 -0
- package/dist/client/{registry.server-qYbsatxH.mjs → registry.server-BpLZo3bC.mjs} +27 -24
- package/dist/client/rendering/client.mjs +27 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +11 -7
- package/dist/client/{richText-coerce-CW8CFk8v.mjs → richText-coerce-WuMYrBm3.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CnZ_1ol2.mjs → routeIslandApiConfig-DNx6b07x.mjs} +1 -1
- package/dist/client/{schema-BFwQDvJL.mjs → schema-DMUkBtIO.mjs} +2385 -2364
- package/dist/client/{shop-CTUaT57E.mjs → shop-DyXtB5TD.mjs} +3 -3
- package/dist/client/{shop-commerce-store-15UII0y3.mjs → shop-commerce-store-CbBsS1kD.mjs} +1 -1
- package/dist/client/{shop-commerce-BWwbsm_-.mjs → shop-commerce-xjWH7-Ym.mjs} +11 -11
- package/dist/client/{shop.client-UWgdmJBm.mjs → shop.client-QOKqQPgK.mjs} +12 -12
- package/dist/client/{shop.interactive-Cf_kASpd.mjs → shop.interactive-BQdm441g.mjs} +24 -14
- package/dist/client/{shopShared-Bi8d584P.mjs → shopShared-CyW6MU48.mjs} +2 -2
- package/dist/client/{site-styles-dy54AUdz.mjs → site-styles-BLHYJ8S7.mjs} +20 -15
- package/dist/client/spam-protection.mjs +4 -69
- package/dist/client/{timetableModel-Bi8ruFgB.mjs → timetableModel-BgdkhRuA.mjs} +10 -10
- package/dist/client/{useAvailableSlots-DiLbDqM3.mjs → useAvailableSlots-wmdo6uZ8.mjs} +3 -3
- package/dist/client/{useBookingNowIso-CWIiqPd0.mjs → useBookingNowIso-CUExAee1.mjs} +1 -1
- package/dist/client/{useDiscountApply-ChtszhF9.mjs → useDiscountApply-BRM-OoTN.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-B0Z7n2tZ.mjs → useDiscountCodeUi-BEIvL31G.mjs} +1 -1
- package/dist/client/{useEventPagination-DRrATQHQ.mjs → useEventPagination-Dk3g64we.mjs} +6 -6
- package/dist/client/{view-yUIfWX3S.mjs → view-BnaOmrap.mjs} +4 -4
- package/dist/client/{view-OvsxzgxP.mjs → view-vhKGFfC3.mjs} +7 -7
- package/dist/client/{wizardSteps-kbONzKUv.mjs → wizardSteps-xqU4q63H.mjs} +14 -14
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-DzoFjIqB.mjs → EventEmbeddedCheckoutStep-43wIAWr4.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-BhgPyyUW.mjs → PreviewEditorSidebar-C3AQVxQt.mjs} +68 -68
- package/dist/preview-next/client/{PreviewEditorUI-lndKKBtB.mjs → PreviewEditorUI-C-1zDCR_.mjs} +3 -3
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Bk7On_EM.mjs → SdkPreviewModeRuntime-B47yHFL0.mjs} +240 -177
- package/dist/preview-next/client/{SdkPreviewModeRuntime-DCDDXDlt.mjs → SdkPreviewModeRuntime-C6Rhm2NQ.mjs} +1 -1
- package/dist/preview-next/client/{ThemedButton-nUnE3iMv.mjs → ThemedButton-g7NPrsGp.mjs} +60 -45
- package/dist/preview-next/client/{previewAuthStore-DHtSQIBE.mjs → previewAuthStore-By_zfrS5.mjs} +102570 -102217
- package/dist/preview-next/client/{previewChromeSurface-CxQ6dZ8D.mjs → previewChromeSurface-Cjwxv90x.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DSZv7Vfm.mjs → sdk-runtime-BG2HYvQj.mjs} +1 -1
- package/dist/preview-next/client/{siteStyleAccess-Chq5KKKh.mjs → siteStyleAccess-BiSyYyyr.mjs} +3541 -3525
- package/dist/preview-next/client/{spinner-CjxE3uws.mjs → spinner-DnWpeDp2.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CxCstfkP.mjs → route-contract-D5tHZEz5.mjs} +31 -42
- package/dist/server/{Block.shared-Dz9k8vCX.mjs → Block.shared-Iy7g11iP.mjs} +5 -4
- package/dist/server/{bindings-S-gCHhj5.mjs → bindings-BVJGgUT0.mjs} +2 -2
- package/dist/server/{client-C2Q56xqV.mjs → client-CiKaE8ms.mjs} +215 -109
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{effectiveNavLinkStyle-DLzJPcDL.mjs → effectiveNavLinkStyle-EDSdd_oK.mjs} +14 -8
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-D7ItMsEl.mjs → loadContent-BuintpdO.mjs} +6 -4
- package/dist/server/loadPage-BwjncpJf.mjs +2 -0
- package/dist/server/{loadPage-DaPiPYUL.mjs → loadPage-Dk4wea8M.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-anoB3Kbn.mjs → overrideResolution-BDiQWM7D.mjs} +1 -1
- package/dist/server/{overrides-W1Cc6srh.mjs → overrides-DVemf-GV.mjs} +66 -46
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-BF9yNfCS.mjs → prebuild-DubLNgRH.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Cn9k3DW6.mjs → prefetchBlockData-Bnbwoe5n.mjs} +48 -27
- package/dist/server/{publicProducts-BVcJ6TG7.mjs → publicProducts-D3Fc5TKk.mjs} +76 -70
- package/dist/server/{registry-4ZF3bUuJ.mjs → registry-zjd1P2Dl.mjs} +34 -21
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-BKQ1Fc0M.mjs → resolveBlockData-CZJ--nH6.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-DgrigZq9.mjs → schema-BlTWmTSl.mjs} +58 -37
- package/dist/server/server.mjs +3 -3
- package/dist/server/{site-styles-CxE9F3hj.mjs → site-styles-yHytcXIB.mjs} +9 -10
- package/dist/server/{siteChromeOverlayClearance-OhS6f830.mjs → siteChromeOverlayClearance-D0uCNZ7E.mjs} +32 -36
- package/dist/server/{src-C44_fMy5.mjs → src-cbbK3Bho.mjs} +286 -71
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-CVc04B9m.mjs → themeAdmission-BdY8lP-K.mjs} +3 -2
- package/dist/server/{validation-BrbY0nxR.mjs → validation-CGH-Xs4E.mjs} +2 -2
- package/dist/server/{version-BBSk8uM6.mjs → version-DoOG6F13.mjs} +1 -1
- package/dist/styles/index.css +262 -65
- package/package.json +2 -3
- package/dist/_dts/AltchaWidget-COIYJ7DF.d.ts +0 -33
- package/dist/_dts/index-D2y4Iy-d.d.ts +0 -77
- package/dist/client/src-BNZzXgWu.mjs +0 -102
- package/dist/server/loadPage-D2qvYV5g.mjs +0 -2
package/dist/client/{newsletter-form.client-CCdyHx0B.mjs → newsletter-form.client-8orCez1z.mjs}
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { I as newsletterBlockSubmissionMessage, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, dn as parseMailingListVisitorSelection } from "./shop.interactive-BQdm441g.mjs";
|
|
3
3
|
import { c as assertNever$1, t as assertNever } from "./src-VIsPY-kw.mjs";
|
|
4
|
-
import { Pr as listLookSlot } from "./wizardSteps-
|
|
5
|
-
import {
|
|
4
|
+
import { Pr as listLookSlot } from "./wizardSteps-xqU4q63H.mjs";
|
|
5
|
+
import { C as clsx } from "./ThemedButton-BGVwNwE-.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
7
|
-
import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-
|
|
8
|
-
import { n as useBlockApi, r as BlockApiError } from "./context-
|
|
9
|
-
import { i as AltchaWidget, r as isSpamProtectionEnabled, t as getChallengeUrl } from "./src-BNZzXgWu.mjs";
|
|
7
|
+
import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-D8NgHY_F.mjs";
|
|
8
|
+
import { n as useBlockApi, r as BlockApiError } from "./context-BNAM7NsW.mjs";
|
|
10
9
|
import { t as MAILING_LIST_CONFIRMATION_MESSAGE } from "./mailingListSignupCopy-CX4sDozG.mjs";
|
|
11
|
-
import {
|
|
10
|
+
import { t as SpamProtectionWidget } from "./SpamProtectionWidget-CRsKTQV-.mjs";
|
|
11
|
+
import { t as useAltchaProtection } from "./altchaProtection-BWchRM3v.mjs";
|
|
12
|
+
import { useEffect, useReducer, useRef } from "react";
|
|
12
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
//#region ../blocks/src/system/runtime/nodes/newsletter-form.client.state.ts
|
|
14
15
|
const initialNewsletterFormSubmissionState = { tag: "idle" };
|
|
@@ -89,6 +90,7 @@ function mapNewsletterFormFieldsToSubscriberInput(fields) {
|
|
|
89
90
|
}
|
|
90
91
|
function resolveNewsletterSubmitTarget(input) {
|
|
91
92
|
switch (input.tag) {
|
|
93
|
+
case "demo": return { tag: "demo" };
|
|
92
94
|
case "block-source": return input.sourceRef ? publishedSourceTarget(input.sourceRef) : {
|
|
93
95
|
tag: "unavailable",
|
|
94
96
|
reason: "missing_block_source"
|
|
@@ -118,21 +120,69 @@ function readOptionalSubmittedText(value) {
|
|
|
118
120
|
function readSubmittedText(value) {
|
|
119
121
|
return typeof value === "string" ? value.trim() : "";
|
|
120
122
|
}
|
|
123
|
+
/** Demo completion and live source readiness are decided before any request. */
|
|
124
|
+
function planNewsletterSubmission(fields, hydration, availability) {
|
|
125
|
+
if (fields.honeypot) return {
|
|
126
|
+
kind: "settled",
|
|
127
|
+
action: {
|
|
128
|
+
type: "succeeded",
|
|
129
|
+
outcome: "subscribed"
|
|
130
|
+
},
|
|
131
|
+
diagnostic: null
|
|
132
|
+
};
|
|
133
|
+
if (!fields.email) return {
|
|
134
|
+
kind: "settled",
|
|
135
|
+
action: {
|
|
136
|
+
type: "failed",
|
|
137
|
+
error: newsletterFieldError("email", "Email is required")
|
|
138
|
+
},
|
|
139
|
+
diagnostic: null
|
|
140
|
+
};
|
|
141
|
+
const target = resolveNewsletterSubmitTarget(hydration.target);
|
|
142
|
+
if (target.tag === "demo") return {
|
|
143
|
+
kind: "settled",
|
|
144
|
+
action: {
|
|
145
|
+
type: "succeeded",
|
|
146
|
+
outcome: "demo"
|
|
147
|
+
},
|
|
148
|
+
diagnostic: null
|
|
149
|
+
};
|
|
150
|
+
const reason = target.tag === "unavailable" ? target.reason : hydration.setupRevision === null ? "setup_not_configured" : availability === "unavailable" ? "destination_unavailable" : null;
|
|
151
|
+
if (target.tag === "ready" && hydration.setupRevision !== null && reason === null) return {
|
|
152
|
+
kind: "submit",
|
|
153
|
+
sourceRef: target.sourceRef,
|
|
154
|
+
setupRevision: hydration.setupRevision
|
|
155
|
+
};
|
|
156
|
+
return {
|
|
157
|
+
kind: "settled",
|
|
158
|
+
action: {
|
|
159
|
+
type: "failed",
|
|
160
|
+
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
161
|
+
},
|
|
162
|
+
diagnostic: reason
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function reportNewsletterAdmission(diagnostic) {
|
|
166
|
+
if (diagnostic) reportNewsletterSignupRefusal(diagnostic);
|
|
167
|
+
}
|
|
121
168
|
//#endregion
|
|
122
169
|
//#region ../blocks/src/system/runtime/nodes/newsletter-form.client.tsx
|
|
123
170
|
function NewsletterFormClient({ render }) {
|
|
124
171
|
const submissionMessage = newsletterBlockSubmissionMessage(render.hydration.target);
|
|
125
172
|
const api = useBlockApi();
|
|
126
173
|
const [submissionState, dispatchSubmission] = useReducer(newsletterFormSubmissionReducer, initialNewsletterFormSubmissionState);
|
|
127
|
-
const
|
|
174
|
+
const protection = useAltchaProtection({
|
|
175
|
+
apiBaseUrl: api.config.baseUrl,
|
|
176
|
+
enabled: render.hydration.spamProtectionEnabled
|
|
177
|
+
});
|
|
128
178
|
const successRef = useRef(null);
|
|
129
179
|
const succeeded = isNewsletterFormSuccess(submissionState);
|
|
130
180
|
useEffect(() => {
|
|
131
181
|
if (succeeded) successRef.current?.focus();
|
|
132
182
|
}, [succeeded]);
|
|
133
|
-
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
134
183
|
const handleSubmit = async (e) => {
|
|
135
184
|
e.preventDefault();
|
|
185
|
+
if (protection.submission.kind !== "ready" || isNewsletterFormSubmitting(submissionState)) return;
|
|
136
186
|
const formData = new FormData(e.currentTarget);
|
|
137
187
|
const submittedFields = mapNewsletterFormFieldsToSubscriberInput({
|
|
138
188
|
email: formData.get("email"),
|
|
@@ -143,43 +193,10 @@ function NewsletterFormClient({ render }) {
|
|
|
143
193
|
phone: formData.get("phone"),
|
|
144
194
|
website: formData.get("website")
|
|
145
195
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
});
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
if (!submittedFields.email) {
|
|
154
|
-
dispatchSubmission({
|
|
155
|
-
type: "failed",
|
|
156
|
-
error: newsletterFieldError("email", "Email is required")
|
|
157
|
-
});
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
const submitTarget = resolveNewsletterSubmitTarget(render.hydration.target);
|
|
161
|
-
if (submitTarget.tag === "unavailable") {
|
|
162
|
-
reportNewsletterSignupRefusal(submitTarget.reason, { target: render.hydration.target });
|
|
163
|
-
dispatchSubmission({
|
|
164
|
-
type: "failed",
|
|
165
|
-
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
166
|
-
});
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
if (render.hydration.setupRevision === null) {
|
|
170
|
-
reportNewsletterSignupRefusal("setup_not_configured");
|
|
171
|
-
dispatchSubmission({
|
|
172
|
-
type: "failed",
|
|
173
|
-
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
174
|
-
});
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
if (render.display.availability === "unavailable") {
|
|
178
|
-
reportNewsletterSignupRefusal("destination_unavailable", { setupRevision: render.hydration.setupRevision });
|
|
179
|
-
dispatchSubmission({
|
|
180
|
-
type: "failed",
|
|
181
|
-
error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
|
|
182
|
-
});
|
|
196
|
+
const admission = planNewsletterSubmission(submittedFields, render.hydration, render.display.availability);
|
|
197
|
+
if (admission.kind === "settled") {
|
|
198
|
+
reportNewsletterAdmission(admission.diagnostic);
|
|
199
|
+
dispatchSubmission(admission.action);
|
|
183
200
|
return;
|
|
184
201
|
}
|
|
185
202
|
const selection = readVisitorSelection(formData, render.hydration);
|
|
@@ -194,36 +211,19 @@ function NewsletterFormClient({ render }) {
|
|
|
194
211
|
}
|
|
195
212
|
const visitorSelection = selection.tag === "chosen" ? selection.value : void 0;
|
|
196
213
|
dispatchSubmission({ type: "submitted" });
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
altchaSolution
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
if (result.tag === "subscribed" || result.tag === "confirmation_required") dispatchSubmission({
|
|
214
|
-
type: "succeeded",
|
|
215
|
-
outcome: result.tag
|
|
216
|
-
});
|
|
217
|
-
else dispatchSubmission({
|
|
218
|
-
type: "failed",
|
|
219
|
-
error: newsletterFormError(publicSignupError(result))
|
|
220
|
-
});
|
|
221
|
-
} catch (err) {
|
|
222
|
-
dispatchSubmission({
|
|
223
|
-
type: "failed",
|
|
224
|
-
error: newsletterFormError(transportFailureMessage(err))
|
|
225
|
-
});
|
|
226
|
-
}
|
|
214
|
+
dispatchSubmission(await sendNewsletterSubscription(api, {
|
|
215
|
+
authorization: protection.submission.authorization,
|
|
216
|
+
email: submittedFields.email,
|
|
217
|
+
firstName: submittedFields.firstName,
|
|
218
|
+
lastName: submittedFields.lastName,
|
|
219
|
+
name: submittedFields.name,
|
|
220
|
+
company: submittedFields.company,
|
|
221
|
+
phone: submittedFields.phone,
|
|
222
|
+
sourceRef: admission.sourceRef,
|
|
223
|
+
setupRevision: admission.setupRevision,
|
|
224
|
+
...visitorSelection ? { visitorSelection } : {},
|
|
225
|
+
meta: { honeypot: submittedFields.honeypot }
|
|
226
|
+
}));
|
|
227
227
|
};
|
|
228
228
|
const submitting = isNewsletterFormSubmitting(submissionState);
|
|
229
229
|
const formError = getNewsletterSubmissionFormError(submissionState);
|
|
@@ -259,8 +259,7 @@ function NewsletterFormClient({ render }) {
|
|
|
259
259
|
submitting,
|
|
260
260
|
submissionMessage,
|
|
261
261
|
formError,
|
|
262
|
-
|
|
263
|
-
onAltchaSolution: setAltchaSolution
|
|
262
|
+
protection
|
|
264
263
|
}),
|
|
265
264
|
render.display.privacyNote && /* @__PURE__ */ jsx("p", {
|
|
266
265
|
className: "newsletter-privacy-note",
|
|
@@ -271,6 +270,24 @@ function NewsletterFormClient({ render }) {
|
|
|
271
270
|
})
|
|
272
271
|
});
|
|
273
272
|
}
|
|
273
|
+
/** Effect shell: send the admitted request and map its public outcome to form state. */
|
|
274
|
+
async function sendNewsletterSubscription(api, request) {
|
|
275
|
+
try {
|
|
276
|
+
const result = await api.subscribeNewsletter(request);
|
|
277
|
+
return result.tag === "subscribed" || result.tag === "confirmation_required" ? {
|
|
278
|
+
type: "succeeded",
|
|
279
|
+
outcome: result.tag
|
|
280
|
+
} : {
|
|
281
|
+
type: "failed",
|
|
282
|
+
error: newsletterFormError(publicSignupError(result))
|
|
283
|
+
};
|
|
284
|
+
} catch (error) {
|
|
285
|
+
return {
|
|
286
|
+
type: "failed",
|
|
287
|
+
error: newsletterFormError(transportFailureMessage(error))
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
}
|
|
274
291
|
function NewsletterSuccessMessage({ lookSlots, message }) {
|
|
275
292
|
return lookSlots ? /* @__PURE__ */ jsx("p", {
|
|
276
293
|
role: "status",
|
|
@@ -283,7 +300,7 @@ function NewsletterSuccessMessage({ lookSlots, message }) {
|
|
|
283
300
|
children: message
|
|
284
301
|
});
|
|
285
302
|
}
|
|
286
|
-
function NewsletterFormFields({ render, submissionState, submitting, submissionMessage, formError,
|
|
303
|
+
function NewsletterFormFields({ render, submissionState, submitting, submissionMessage, formError, protection }) {
|
|
287
304
|
const { email: emailField, extra: extraFields } = partitionNewsletterFields(render.display.fields);
|
|
288
305
|
const fieldError = (id) => getNewsletterSubmissionFieldError(submissionState, id);
|
|
289
306
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -305,12 +322,9 @@ function NewsletterFormFields({ render, submissionState, submitting, submissionM
|
|
|
305
322
|
error: fieldError(field.id)
|
|
306
323
|
}, field.id))
|
|
307
324
|
}) : null,
|
|
308
|
-
|
|
325
|
+
protection.widget && /* @__PURE__ */ jsx("div", {
|
|
309
326
|
className: "newsletter-altcha",
|
|
310
|
-
children: /* @__PURE__ */ jsx(
|
|
311
|
-
challengeUrl: getChallengeUrl(),
|
|
312
|
-
onSolutionChange: onAltchaSolution
|
|
313
|
-
})
|
|
327
|
+
children: /* @__PURE__ */ jsx(SpamProtectionWidget, { protection })
|
|
314
328
|
}),
|
|
315
329
|
formError && /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
316
330
|
tone: "error",
|
|
@@ -323,6 +337,7 @@ function NewsletterFormFields({ render, submissionState, submitting, submissionM
|
|
|
323
337
|
emailField,
|
|
324
338
|
buttonVariant: render.display.buttonVariant,
|
|
325
339
|
buttonLabel: submitting ? "Subscribing..." : render.display.buttonLabel,
|
|
340
|
+
submission: protection.submission,
|
|
326
341
|
disabled: submitting || submissionMessage !== null,
|
|
327
342
|
error: emailField ? fieldError(emailField.id) : null
|
|
328
343
|
}),
|
package/dist/client/{newsletter-form.parts-Dl8AjsXW.mjs → newsletter-form.parts-D8NgHY_F.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { Pr as listLookSlot } from "./wizardSteps-kbONzKUv.mjs";
|
|
2
|
+
import { Pr as listLookSlot } from "./wizardSteps-xqU4q63H.mjs";
|
|
4
3
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
4
|
+
import { t as ProtectedSubmitButton } from "./ProtectedSubmitButton-DGbgGvdh.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region ../blocks/src/system/runtime/nodes/newsletter-form.parts.tsx
|
|
@@ -59,7 +59,7 @@ function NewsletterExtraField({ field, disabled, error, lookSlots }) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/** The email field and submit button sharing one input-styled shell. */
|
|
62
|
-
function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, error }) {
|
|
62
|
+
function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, submission, disabled, error }) {
|
|
63
63
|
const inputId = inputIdFor(field);
|
|
64
64
|
const errorId = `${inputId}-error`;
|
|
65
65
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -86,7 +86,8 @@ function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, err
|
|
|
86
86
|
messageId: errorId
|
|
87
87
|
})
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */ jsx(
|
|
89
|
+
/* @__PURE__ */ jsx(ProtectedSubmitButton, {
|
|
90
|
+
submission,
|
|
90
91
|
type: "submit",
|
|
91
92
|
variant: buttonVariant,
|
|
92
93
|
size: "md",
|
|
@@ -105,7 +106,7 @@ function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, err
|
|
|
105
106
|
* The submit action: joined to the email field when the preset has one
|
|
106
107
|
* (every current preset does), otherwise a plain themed button.
|
|
107
108
|
*/
|
|
108
|
-
function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel, disabled, error }) {
|
|
109
|
+
function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel, submission, disabled, error }) {
|
|
109
110
|
if (lookSlots) return /* @__PURE__ */ jsxs(Fragment, { children: [emailField && /* @__PURE__ */ jsx(NewsletterExtraField, {
|
|
110
111
|
field: emailField,
|
|
111
112
|
lookSlots,
|
|
@@ -113,7 +114,8 @@ function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel
|
|
|
113
114
|
error
|
|
114
115
|
}), /* @__PURE__ */ jsx("div", {
|
|
115
116
|
...listLookSlot({ lookSlots }, "actions"),
|
|
116
|
-
children: /* @__PURE__ */ jsx(
|
|
117
|
+
children: /* @__PURE__ */ jsx(ProtectedSubmitButton, {
|
|
118
|
+
submission,
|
|
117
119
|
...listLookSlot({ lookSlots }, "action"),
|
|
118
120
|
type: "submit",
|
|
119
121
|
variant: buttonVariant,
|
|
@@ -126,12 +128,14 @@ function NewsletterSubmitRow({ emailField, lookSlots, buttonVariant, buttonLabel
|
|
|
126
128
|
field: emailField,
|
|
127
129
|
buttonVariant,
|
|
128
130
|
buttonLabel,
|
|
131
|
+
submission,
|
|
129
132
|
disabled,
|
|
130
133
|
error
|
|
131
134
|
});
|
|
132
135
|
return /* @__PURE__ */ jsx("div", {
|
|
133
136
|
className: "newsletter-submit",
|
|
134
|
-
children: /* @__PURE__ */ jsx(
|
|
137
|
+
children: /* @__PURE__ */ jsx(ProtectedSubmitButton, {
|
|
138
|
+
submission,
|
|
135
139
|
type: "submit",
|
|
136
140
|
variant: buttonVariant,
|
|
137
141
|
size: "md",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as BlockApiProvider } from "./context-
|
|
4
|
-
import { t as NewsletterFormClient } from "./newsletter-form.client-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DikkDJ9x.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-BNAM7NsW.mjs";
|
|
4
|
+
import { t as NewsletterFormClient } from "./newsletter-form.client-8orCez1z.mjs";
|
|
5
5
|
import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as addMonths } from "./src-1PJxc8KO.mjs";
|
|
3
|
-
import { Mr as err, Nr as ok, _t as arrangementModes, sr as runtimeMediaSchema, xr as parseSiteTermsVersionId } from "./schema-
|
|
4
|
-
import {
|
|
5
|
-
import "./site-styles-
|
|
3
|
+
import { Mr as err, Nr as ok, _t as arrangementModes, sr as runtimeMediaSchema, xr as parseSiteTermsVersionId } from "./schema-DMUkBtIO.mjs";
|
|
4
|
+
import { h as validateBookingPaymentOptionKinds, s as confirmationPaymentSchema } from "./purchase-BMsWpx8y.mjs";
|
|
5
|
+
import "./site-styles-BLHYJ8S7.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region ../core/src/date-time-formatter.ts
|
|
8
8
|
/** Shared Intl engine, internal to core's date presentation owners. */
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import { Cr as unsafeAsAppointmentResourceId } from "../schema-
|
|
4
|
-
import {
|
|
3
|
+
import { Cr as unsafeAsAppointmentResourceId } from "../schema-DMUkBtIO.mjs";
|
|
4
|
+
import { b as formatCurrencyAmount, g as formatOrderInstalmentStatusLabel$1, v as resolveFlexibleBalancePaymentEligibility, y as parsePositiveMoneyInputToCents } from "../purchase-BMsWpx8y.mjs";
|
|
5
5
|
import { c as assertNever$1, t as assertNever } from "../src-VIsPY-kw.mjs";
|
|
6
|
-
import { t as logger } from "../noop-
|
|
6
|
+
import { t as logger } from "../noop-C2vZse15.mjs";
|
|
7
7
|
import { t as generateUuidV4 } from "../uuid-BETKW8rS.mjs";
|
|
8
|
+
import { C as clsx, i as ThemedButtonLink, o as ThemedFileChooser, r as ThemedButton, t as ThemedActionsButton, u as SpinnerNode } from "../ThemedButton-BGVwNwE-.mjs";
|
|
8
9
|
import { t as resolveDedicatedBookingHref } from "../bookingRoute-Bqlyu5Vb.mjs";
|
|
9
|
-
import { t as CheckboxChoice } from "../CheckboxChoice-
|
|
10
|
-
import { t as DemoPortalSignInLink } from "../DemoPortalSignInLink-
|
|
10
|
+
import { t as CheckboxChoice } from "../CheckboxChoice-3PhxDxgR.mjs";
|
|
11
|
+
import { t as DemoPortalSignInLink } from "../DemoPortalSignInLink-Qw780EfW.mjs";
|
|
11
12
|
import { t as ModalShell } from "../ModalShell-B_fHWK71.mjs";
|
|
12
|
-
import { t as TabBarFragment } from "../TabBarFragment-
|
|
13
|
+
import { t as TabBarFragment } from "../TabBarFragment-C4WJyybx.mjs";
|
|
13
14
|
import { i as getPortalCreditProductCreditNoun, r as getCreditProductTypeLabel, t as deriveCreditProductLabels } from "../creditProducts-BOWi1QLp.mjs";
|
|
14
|
-
import { t as formatDate } from "../formatDate-
|
|
15
|
-
import { i as createBlockApi, n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "../context-
|
|
16
|
-
import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-
|
|
17
|
-
import { t as useBookingNowIso } from "../useBookingNowIso-
|
|
18
|
-
import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "../demoPortalMagicLink-
|
|
19
|
-
import { a as formatPortalSessionDay, c as isPast, i as formatPortalSession, l as portalSessionDisplay, n as formatDateTime, o as formatPortalSessionTime, r as formatEntitlementEnd, s as formatPortalSessionWithWeekday, t as formatDate$1 } from "../dateFormatting-
|
|
15
|
+
import { t as formatDate } from "../formatDate-BiloOyjS.mjs";
|
|
16
|
+
import { i as createBlockApi, n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "../context-BNAM7NsW.mjs";
|
|
17
|
+
import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-wmdo6uZ8.mjs";
|
|
18
|
+
import { t as useBookingNowIso } from "../useBookingNowIso-CUExAee1.mjs";
|
|
19
|
+
import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "../demoPortalMagicLink-NwKJk6gn.mjs";
|
|
20
|
+
import { a as formatPortalSessionDay, c as isPast, i as formatPortalSession, l as portalSessionDisplay, n as formatDateTime, o as formatPortalSessionTime, r as formatEntitlementEnd, s as formatPortalSessionWithWeekday, t as formatDate$1 } from "../dateFormatting-QwBSo0hK.mjs";
|
|
20
21
|
import * as React$1 from "react";
|
|
21
22
|
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
|
|
22
23
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/client/{product-detail.client-Tq4S99ce.mjs → product-detail.client-CQ0k0fbH.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { r as ProductDetailController } from "./shop-commerce-
|
|
2
|
+
import { r as ProductDetailController } from "./shop-commerce-xjWH7-Ym.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as ProductListController } from "./shop-commerce-
|
|
2
|
+
import { i as ProductListController } from "./shop-commerce-xjWH7-Ym.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/product-list.client.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as ProductDetailClient } from "./product-detail.client-
|
|
4
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DikkDJ9x.mjs";
|
|
3
|
+
import { t as ProductDetailClient } from "./product-detail.client-CQ0k0fbH.mjs";
|
|
4
|
+
import { t as mountShopBlockIsland } from "./shopShared-CyW6MU48.mjs";
|
|
5
5
|
//#region src/rendering/islands/enhancers/productDetail.tsx
|
|
6
6
|
const decode = defineIslandPropsDecoder("product-detail");
|
|
7
7
|
const enhance = (root, props) => mountShopBlockIsland(root, props, ProductDetailClient, "product-detail");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as ProductListClient } from "./product-list.client-
|
|
4
|
-
import { t as mountShopBlockIsland } from "./shopShared-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DikkDJ9x.mjs";
|
|
3
|
+
import { t as ProductListClient } from "./product-list.client-Xlr1P0x9.mjs";
|
|
4
|
+
import { t as mountShopBlockIsland } from "./shopShared-CyW6MU48.mjs";
|
|
5
5
|
//#region src/rendering/islands/enhancers/productList.tsx
|
|
6
6
|
const decode = defineIslandPropsDecoder("product-list");
|
|
7
7
|
const enhance = (root, props) => mountShopBlockIsland(root, props, ProductListClient, "product-list");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { $t as headerChromeRuntimeContractSchema, Dt as eventCalendarInteractiveIslandPropsCodec, G as formInteractiveIslandPropsCodec, Mt as eventListingInteractiveIslandPropsCodec, R as newsletterFormInteractiveIslandPropsCodec, St as eventCombinedInteractiveIslandPropsCodec, V as giftingInteractiveIslandPropsCodec, X as eventRegistrationInteractiveIslandPropsCodec, f as productDetailInteractiveIslandPropsCodec, g as shopInteractiveIslandPropsCodec, l as checkoutInteractiveIslandPropsCodec, m as productListInteractiveIslandPropsCodec, on as publicMembershipProductCollectionSchema, s as cartInteractiveIslandPropsCodec, sn as publicPassProductCollectionSchema } from "./shop.interactive-BQdm441g.mjs";
|
|
3
|
+
import { Fr as lookListPresentationSchemaShape, Or as createZodCodec, Pn as bookingFormInteractiveIslandPropsCodec, Tr as eventRegistrationPageSurfaceSubjectSchema, jr as isDecodeSuccess } from "./wizardSteps-xqU4q63H.mjs";
|
|
4
|
+
import { V as eventVenueDrawingSchema, W as publicEventSchema } from "./noop-C2vZse15.mjs";
|
|
5
5
|
import { t as eventAutoApplyDiscountPreviewSchema } from "./events-BmqPeeQm.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region ../blocks/src/system/runtime/nodes/event-details/lookPresentation.ts
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region ../altcha/src/protection.ts
|
|
3
|
+
/** Authorization is issued only by the live verification owner, never from a caller's string. */
|
|
4
|
+
const proof = Symbol("submission-proof");
|
|
5
|
+
const VERIFICATION_REQUIRED_MESSAGE = "We couldn’t verify this submission. Please try again.";
|
|
6
|
+
var VerificationPendingError = class extends Error {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(VERIFICATION_REQUIRED_MESSAGE);
|
|
9
|
+
this.name = "VerificationPendingError";
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
/** A retained ready authorization is checked again immediately before transport. */
|
|
13
|
+
function submissionProof(authorization) {
|
|
14
|
+
return authorization[proof]();
|
|
15
|
+
}
|
|
16
|
+
/** Parse the signed expiry once; the server remains responsible for signature/work verification. */
|
|
17
|
+
function readVerifiedProof(payload) {
|
|
18
|
+
if (payload === null) return null;
|
|
19
|
+
try {
|
|
20
|
+
const decoded = JSON.parse(atob(payload));
|
|
21
|
+
if (typeof decoded !== "object" || decoded === null || !("salt" in decoded) || typeof decoded.salt !== "string") return null;
|
|
22
|
+
const expires = new URLSearchParams(decoded.salt.split("?")[1]).get("expires");
|
|
23
|
+
const expiresAt = Number(expires) * 1e3;
|
|
24
|
+
return expires !== null && Number.isSafeInteger(expiresAt) && expiresAt > 0 ? {
|
|
25
|
+
payload,
|
|
26
|
+
expiresAt
|
|
27
|
+
} : null;
|
|
28
|
+
} catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** Check live identity and wall-clock expiry at the last possible moment, even with suspended timers. */
|
|
33
|
+
function issueAuthorization(state, verified, refresh) {
|
|
34
|
+
const authorization = { [proof]: () => {
|
|
35
|
+
const current = state.snapshot.submission;
|
|
36
|
+
if (!state.active || current.kind !== "ready" || current.authorization !== authorization) throw new VerificationPendingError();
|
|
37
|
+
if (verified !== null && Date.now() >= verified.expiresAt) {
|
|
38
|
+
refresh();
|
|
39
|
+
throw new VerificationPendingError();
|
|
40
|
+
}
|
|
41
|
+
return verified?.payload ?? null;
|
|
42
|
+
} };
|
|
43
|
+
return authorization;
|
|
44
|
+
}
|
|
45
|
+
/** Mutable widget lifetime; snapshots are the only state exposed to React consumers. */
|
|
46
|
+
function createSpamProtection(policy) {
|
|
47
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
48
|
+
const state = {
|
|
49
|
+
snapshot: {
|
|
50
|
+
submission: { kind: "waiting" },
|
|
51
|
+
generation: 0
|
|
52
|
+
},
|
|
53
|
+
active: true,
|
|
54
|
+
verified: null
|
|
55
|
+
};
|
|
56
|
+
const publish = (submission, generation = state.snapshot.generation, verified = null) => {
|
|
57
|
+
state.snapshot = {
|
|
58
|
+
submission,
|
|
59
|
+
generation
|
|
60
|
+
};
|
|
61
|
+
state.verified = verified;
|
|
62
|
+
listeners.forEach((notify) => notify());
|
|
63
|
+
};
|
|
64
|
+
const issue = (verified) => {
|
|
65
|
+
publish({
|
|
66
|
+
kind: "ready",
|
|
67
|
+
authorization: issueAuthorization(state, verified, reset)
|
|
68
|
+
}, state.snapshot.generation, verified);
|
|
69
|
+
};
|
|
70
|
+
const reset = () => {
|
|
71
|
+
publish({ kind: "waiting" }, state.snapshot.generation + 1);
|
|
72
|
+
if (state.active && policy.kind === "not-required") issue(null);
|
|
73
|
+
};
|
|
74
|
+
if (policy.kind === "not-required") issue(null);
|
|
75
|
+
return {
|
|
76
|
+
getSnapshot: () => state.snapshot,
|
|
77
|
+
subscribe: (notify) => {
|
|
78
|
+
listeners.add(notify);
|
|
79
|
+
return () => {
|
|
80
|
+
listeners.delete(notify);
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
activate: () => {
|
|
84
|
+
if (!state.active) {
|
|
85
|
+
state.active = true;
|
|
86
|
+
reset();
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
deactivate: () => {
|
|
90
|
+
state.active = false;
|
|
91
|
+
reset();
|
|
92
|
+
},
|
|
93
|
+
reset,
|
|
94
|
+
receive: (generation, solution) => {
|
|
95
|
+
if (!state.active || generation !== state.snapshot.generation || policy.kind === "not-required") return;
|
|
96
|
+
const verified = readVerifiedProof(solution);
|
|
97
|
+
if (verified === null) publish({ kind: "waiting" });
|
|
98
|
+
else if (verified.expiresAt <= Date.now()) reset();
|
|
99
|
+
else if (state.snapshot.submission.kind !== "ready" || state.verified?.payload !== verified.payload) issue(verified);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { submissionProof as n, createSpamProtection as t };
|