@riverbankcms/sdk 0.149.0 → 0.150.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EventEmbeddedCheckoutStep-D00Kc8Zj.mjs +285 -0
- package/dist/{PreviewEditorSidebar-DBKln68M.mjs → PreviewEditorSidebar-7ZhmmnBB.mjs} +3 -3
- package/dist/{PreviewEditorUI-DpRX4Mum.mjs → PreviewEditorUI-BIJucTRd.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-DJPmPY-r.mjs → SdkPreviewModeRuntime-tj45gmCX.mjs} +4 -3
- package/dist/{SiteChromeCustomizeContext-JYA0cJ_Z.mjs → SiteChromeCustomizeContext-BFOt0ss-.mjs} +4454 -4059
- package/dist/_dts/ai/src/contracts/proposals.d.ts +660 -0
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +510 -0
- package/dist/_dts/api/src/billing.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +5 -1
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +9 -0
- package/dist/_dts/api/src/footerSettings.d.ts +3 -3
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/bookingPortalLink.d.ts +13 -0
- package/dist/_dts/api/src/navigation.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +9 -173
- package/dist/_dts/api/src/sdkThemeWire.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteSettings.d.ts +2 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -1
- package/dist/_dts/blocks/src/client.d.ts +2 -1
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +30 -3
- package/dist/_dts/blocks/src/system/designCapabilities.d.ts +10 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +38 -18
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/FullyBookedStep.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +15 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentLocation.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentResponse.d.ts +72 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +66 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +13 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +11 -52
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +19 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +7 -42
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +7 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +90 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useGuestRegistrationRecovery.d.ts +30 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +24 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useRegistrationAdmission.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/wizardSteps.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/stripe/browserStripe.d.ts +8 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutCopy.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPresentation.d.ts +49 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +4 -4
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +5 -1
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +9 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +9 -2
- package/dist/_dts/commerce/src/purchase/types.d.ts +5 -6
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +3 -2
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +6 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/patch/index.d.ts +30 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +30 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/blocks/opaquePanels.d.ts +147 -0
- package/dist/_dts/theme-core/src/boxBackgroundSchema.d.ts +22 -0
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +22 -0
- package/dist/_dts/theme-core/src/cards/roles.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +198 -0
- package/dist/_dts/theme-core/src/palette/utils/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/palette/utils/scrimContrast.d.ts +22 -0
- package/dist/_dts/theme-core/src/runtime/bridgeColourTokens.d.ts +10 -0
- package/dist/_dts/theme-core/src/schema.d.ts +330 -0
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +0 -51
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +0 -51
- package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +11 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +7 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +7 -1
- package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +12 -6
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +7 -4
- package/dist/_dts/theme-core/src/site-styles/sectionSurfaceBackgrounds.d.ts +65 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +17 -0
- package/dist/_dts/theme-core/src/surfaces/opaqueSurface.d.ts +43 -0
- package/dist/client/{BookingMailingListNote-Cr3EeTP5.mjs → BookingMailingListNote-CYHOufsI.mjs} +10 -440
- package/dist/client/{CheckboxChoice-B33MqoUo.mjs → CheckboxChoice-M-3HycLw.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BFGB1Fay.mjs → DemoBookingPortalAccess-Cvr9O_ca.mjs} +2 -2
- package/dist/client/{EventCombined.client-DKYV0_ft.mjs → EventCombined.client-m5UZIobP.mjs} +7 -7
- package/dist/client/EventEmbeddedCheckoutStep-DL6zFAkA.mjs +289 -0
- package/dist/client/{EventListing.client-B9UIcEYc.mjs → EventListing.client-DeMfCM04.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CFLPkP0K.mjs → LeafletStaticMap-CvZ3gOdD.mjs} +1 -1
- package/dist/client/{checkoutUrls-CXhko2Rv.mjs → RichText-BtfNvQV6.mjs} +2 -29
- package/dist/client/{TerminalPanel-JjmgxEsR.mjs → TerminalPanel-CUCNEwlH.mjs} +2 -18
- package/dist/client/{ThemedButton-CKV1Jh2m.mjs → ThemedButton-C7WhXuRl.mjs} +2 -2
- package/dist/client/{accordion-DXWIfT3T.mjs → accordion-cQm5mjqs.mjs} +1 -1
- package/dist/client/{bookingForm-CjZgHNvv.mjs → bookingForm-BVPJE5RQ.mjs} +11 -10
- package/dist/client/bookings.mjs +2668 -1134
- package/dist/client/{carousel-DSLikmvZ.mjs → carousel-3vgnY7LC.mjs} +2 -2
- package/dist/client/{carousel.client-A2lG-9od.mjs → carousel.client-CISsdZvg.mjs} +1 -1
- package/dist/client/{cart-HDjWReFt.mjs → cart-BGK4oOjm.mjs} +3 -3
- package/dist/client/{checkout-CUvRZA3W.mjs → checkout-GsBLUNJD.mjs} +3 -3
- package/dist/client/checkoutUrls-ChxwaNtO.mjs +28 -0
- package/dist/client/client.mjs +3042 -1868
- package/dist/client/{colorStyles-j5U9v5JA.mjs → colorStyles-D-32xHZh.mjs} +2 -30
- package/dist/client/{context-DFmaZa-Q.mjs → context-D_8s12Fp.mjs} +1 -1
- package/dist/client/{dates-BBep1JnF.mjs → dates-DeJQbQ9T.mjs} +2 -2
- package/dist/client/{eventCalendar-zEobhxo4.mjs → eventCalendar-cmucD4NR.mjs} +10 -10
- package/dist/client/{eventCombined-Dp7bz5k-.mjs → eventCombined-ku3E9FTl.mjs} +4 -4
- package/dist/client/{eventDetails-FE-zqTt7.mjs → eventDetails-CyKZ61sF.mjs} +5 -5
- package/dist/client/{eventListing-BMt5snal.mjs → eventListing-B7yxGIhX.mjs} +4 -4
- package/dist/client/{eventRegistration-O6ZxHfOb.mjs → eventRegistration-BoXfSFgZ.mjs} +1403 -857
- package/dist/client/{form-DFa1D8vt.mjs → form-CNQOWhJo.mjs} +5 -5
- package/dist/client/{headerSection-CmjHLR-N.mjs → headerSection-DahaBJGQ.mjs} +3 -3
- package/dist/client/hooks.mjs +123 -64
- package/dist/client/{locationMap-BXKP_lGh.mjs → locationMap-BoDjqYlW.mjs} +4 -4
- package/dist/client/{media-Cl38iOMI.mjs → media-BFY0y2rb.mjs} +2 -1
- package/dist/client/{newsletterForm-CU-HmxGx.mjs → newsletterForm-DtzXDklw.mjs} +4 -4
- package/dist/client/{pricing-KEAEsibq.mjs → pricing-DXEh2Lhh.mjs} +1 -1
- package/dist/client/{productDetail-Ckp7MGnt.mjs → productDetail-D7cPa-00.mjs} +3 -3
- package/dist/client/{productList-D91V0sYa.mjs → productList-D1XMap66.mjs} +3 -3
- package/dist/client/{propsDecoder-DZd6RJeA.mjs → propsDecoder-DiIeBopB.mjs} +758 -245
- package/dist/client/rendering/client.mjs +4381 -2892
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3026 -1852
- package/dist/client/result-DRW7JWXz.mjs +30 -0
- package/dist/client/{routeIslandApiConfig-E1EkhhYY.mjs → routeIslandApiConfig-wzR4lKAY.mjs} +1 -1
- package/dist/client/scrollToBlock-C86BYkyV.mjs +17 -0
- package/dist/client/{shop-4F2jLQPI.mjs → shop-CYT5P-S5.mjs} +8 -8
- package/dist/client/{shop-commerce-store-vicweP2K.mjs → shop-commerce-store-wKhsJQxI.mjs} +1 -1
- package/dist/client/{shop-commerce-BbfCJjB3.mjs → shop-commerce-ypBu_dx4.mjs} +9 -9
- package/dist/client/{shopShared-DlONJt0T.mjs → shopShared-DFGhYrf2.mjs} +52 -6
- package/dist/client/{useEventFilters-COYyL3m7.mjs → useEventFilters-blSbN5o7.mjs} +8 -8
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-CwvFFjB-.mjs → sdk-runtime-2p8uQk1V.mjs} +1 -1
- package/dist/{separator-ByL72zUT.mjs → separator-Cvvzk0Oo.mjs} +1 -1
- package/dist/server/components.mjs +4066 -3765
- package/dist/server/config-validation.mjs +185 -126
- package/dist/server/config.mjs +185 -126
- package/dist/server/data.mjs +123 -64
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +615 -314
- package/dist/server/page-converter.mjs +100 -56
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4041 -3751
- package/dist/server/rendering.mjs +4069 -3768
- package/dist/server/routing.mjs +149 -72
- package/dist/server/server.mjs +124 -65
- package/dist/server/theme-bridge.mjs +1122 -310
- package/dist/server/theme.mjs +126 -116
- package/dist/spinner-CDo6AkDz.mjs +658 -0
- package/dist/styles/index.css +75 -212
- package/package.json +1 -1
- package/dist/_dts/billing/src/checkout/platform.d.ts +0 -77
- package/dist/_dts/billing/src/config/env.d.ts +0 -29
- package/dist/_dts/billing/src/stripe/client.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +0 -63
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +0 -9
- package/dist/client/urlParams-D71VXFGx.mjs +0 -47
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Zt as checkBrowserStripeKey } from "./propsDecoder-DiIeBopB.mjs";
|
|
3
|
+
import { i as SpinnerNode } from "./ThemedButton-C7WhXuRl.mjs";
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region \0rolldown/runtime.js
|
|
7
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ../../node_modules/.pnpm/@stripe+stripe-js@9.17.0/node_modules/@stripe/stripe-js/dist/pure.js
|
|
10
|
+
var require_pure$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
function _typeof(obj) {
|
|
13
|
+
"@babel/helpers - typeof";
|
|
14
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") _typeof = function(obj) {
|
|
15
|
+
return typeof obj;
|
|
16
|
+
};
|
|
17
|
+
else _typeof = function(obj) {
|
|
18
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
19
|
+
};
|
|
20
|
+
return _typeof(obj);
|
|
21
|
+
}
|
|
22
|
+
var RELEASE_TRAIN = "dahlia";
|
|
23
|
+
var runtimeVersionToUrlVersion = function runtimeVersionToUrlVersion(version) {
|
|
24
|
+
return version === 3 ? "v3" : version;
|
|
25
|
+
};
|
|
26
|
+
var ORIGIN = "https://js.stripe.com";
|
|
27
|
+
var STRIPE_JS_URL = "".concat(ORIGIN, "/").concat(RELEASE_TRAIN, "/stripe.js");
|
|
28
|
+
var V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
|
|
29
|
+
var STRIPE_JS_URL_REGEX = /^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/;
|
|
30
|
+
var EXISTING_SCRIPT_MESSAGE = "loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";
|
|
31
|
+
var isStripeJSURL = function isStripeJSURL(url) {
|
|
32
|
+
return V3_URL_REGEX.test(url) || STRIPE_JS_URL_REGEX.test(url);
|
|
33
|
+
};
|
|
34
|
+
var findScript = function findScript() {
|
|
35
|
+
var scripts = document.querySelectorAll("script[src^=\"".concat(ORIGIN, "\"]"));
|
|
36
|
+
for (var i = 0; i < scripts.length; i++) {
|
|
37
|
+
var script = scripts[i];
|
|
38
|
+
if (!isStripeJSURL(script.src)) continue;
|
|
39
|
+
return script;
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
var injectScript = function injectScript(params) {
|
|
44
|
+
var queryString = params && !params.advancedFraudSignals ? "?advancedFraudSignals=false" : "";
|
|
45
|
+
var script = document.createElement("script");
|
|
46
|
+
script.src = "".concat(STRIPE_JS_URL).concat(queryString);
|
|
47
|
+
var headOrBody = document.head || document.body;
|
|
48
|
+
if (!headOrBody) throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");
|
|
49
|
+
headOrBody.appendChild(script);
|
|
50
|
+
return script;
|
|
51
|
+
};
|
|
52
|
+
var registerWrapper = function registerWrapper(stripe, startTime) {
|
|
53
|
+
if (!stripe || !stripe._registerWrapper) return;
|
|
54
|
+
stripe._registerWrapper({
|
|
55
|
+
name: "stripe-js",
|
|
56
|
+
version: "9.17.0",
|
|
57
|
+
startTime
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
var stripePromise = null;
|
|
61
|
+
var onErrorListener = null;
|
|
62
|
+
var onLoadListener = null;
|
|
63
|
+
var onError = function onError(reject) {
|
|
64
|
+
return function(cause) {
|
|
65
|
+
reject(new Error("Failed to load Stripe.js", { cause }));
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
var onLoad = function onLoad(resolve, reject) {
|
|
69
|
+
return function() {
|
|
70
|
+
if (window.Stripe) resolve(window.Stripe);
|
|
71
|
+
else reject(/* @__PURE__ */ new Error("Stripe.js not available"));
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
var loadScript = function loadScript(params) {
|
|
75
|
+
if (stripePromise !== null) return stripePromise;
|
|
76
|
+
stripePromise = new Promise(function(resolve, reject) {
|
|
77
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
78
|
+
resolve(null);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (window.Stripe && params) console.warn(EXISTING_SCRIPT_MESSAGE);
|
|
82
|
+
if (window.Stripe) {
|
|
83
|
+
resolve(window.Stripe);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
var script = findScript();
|
|
88
|
+
if (script && params) console.warn(EXISTING_SCRIPT_MESSAGE);
|
|
89
|
+
else if (!script) script = injectScript(params);
|
|
90
|
+
else if (script && onLoadListener !== null && onErrorListener !== null) {
|
|
91
|
+
var _script$parentNode;
|
|
92
|
+
script.removeEventListener("load", onLoadListener);
|
|
93
|
+
script.removeEventListener("error", onErrorListener);
|
|
94
|
+
(_script$parentNode = script.parentNode) === null || _script$parentNode === void 0 || _script$parentNode.removeChild(script);
|
|
95
|
+
script = injectScript(params);
|
|
96
|
+
}
|
|
97
|
+
onLoadListener = onLoad(resolve, reject);
|
|
98
|
+
onErrorListener = onError(reject);
|
|
99
|
+
script.addEventListener("load", onLoadListener);
|
|
100
|
+
script.addEventListener("error", onErrorListener);
|
|
101
|
+
} catch (error) {
|
|
102
|
+
reject(error);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
return stripePromise["catch"](function(error) {
|
|
107
|
+
stripePromise = null;
|
|
108
|
+
return Promise.reject(error);
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
var initStripe = function initStripe(maybeStripe, args, startTime) {
|
|
112
|
+
if (maybeStripe === null) return null;
|
|
113
|
+
var pk = args[0];
|
|
114
|
+
if (typeof pk !== "string") throw new Error("Expected publishable key to be of type string, got type ".concat(_typeof(pk), " instead."));
|
|
115
|
+
var isTestKey = pk.match(/^pk_test/);
|
|
116
|
+
var version = runtimeVersionToUrlVersion(maybeStripe.version);
|
|
117
|
+
var expectedVersion = RELEASE_TRAIN;
|
|
118
|
+
if (isTestKey && version !== expectedVersion) console.warn("Stripe.js@".concat(version, " was loaded on the page, but @stripe/stripe-js@").concat("9.17.0", " expected Stripe.js@").concat(expectedVersion, ". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
|
|
119
|
+
var stripe = maybeStripe.apply(void 0, args);
|
|
120
|
+
registerWrapper(stripe, startTime);
|
|
121
|
+
return stripe;
|
|
122
|
+
};
|
|
123
|
+
var validateLoadParams = function validateLoadParams(params) {
|
|
124
|
+
var errorMessage = "invalid load parameters; expected object of shape\n\n {advancedFraudSignals: boolean}\n\nbut received\n\n ".concat(JSON.stringify(params), "\n");
|
|
125
|
+
if (params === null || _typeof(params) !== "object") throw new Error(errorMessage);
|
|
126
|
+
if (Object.keys(params).length === 1 && typeof params.advancedFraudSignals === "boolean") return params;
|
|
127
|
+
throw new Error(errorMessage);
|
|
128
|
+
};
|
|
129
|
+
var loadParams;
|
|
130
|
+
var loadStripeCalled = false;
|
|
131
|
+
var loadStripe = function loadStripe() {
|
|
132
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
133
|
+
loadStripeCalled = true;
|
|
134
|
+
var startTime = Date.now();
|
|
135
|
+
return loadScript(loadParams).then(function(maybeStripe) {
|
|
136
|
+
return initStripe(maybeStripe, args, startTime);
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
loadStripe.setLoadParameters = function(params) {
|
|
140
|
+
if (loadStripeCalled && loadParams) {
|
|
141
|
+
var validatedParams = validateLoadParams(params);
|
|
142
|
+
if (Object.keys(validatedParams).reduce(function(previousValue, currentValue) {
|
|
143
|
+
var _loadParams;
|
|
144
|
+
return previousValue && params[currentValue] === ((_loadParams = loadParams) === null || _loadParams === void 0 ? void 0 : _loadParams[currentValue]);
|
|
145
|
+
}, true)) return;
|
|
146
|
+
}
|
|
147
|
+
if (loadStripeCalled) throw new Error("You cannot change load parameters after calling loadStripe");
|
|
148
|
+
loadParams = validateLoadParams(params);
|
|
149
|
+
};
|
|
150
|
+
exports.loadStripe = loadStripe;
|
|
151
|
+
}));
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region ../blocks/src/system/runtime/shared/stripe/browserStripe.ts
|
|
154
|
+
var import_pure = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
155
|
+
module.exports = require_pure$1();
|
|
156
|
+
})))();
|
|
157
|
+
const stripeByContext = /* @__PURE__ */ new Map();
|
|
158
|
+
/** Pure entry loading stays inert until a payment surface calls this function. */
|
|
159
|
+
function loadBrowserStripe(context) {
|
|
160
|
+
const accountId = "kind" in context && context.kind === "connect" ? context.accountId : void 0;
|
|
161
|
+
const cacheKey = JSON.stringify([context.publishableKey, accountId ?? "direct"]);
|
|
162
|
+
const existing = stripeByContext.get(cacheKey);
|
|
163
|
+
if (existing) return existing;
|
|
164
|
+
const loading = (0, import_pure.loadStripe)(context.publishableKey, ...accountId ? [{ stripeAccount: accountId }] : []).then((stripe) => {
|
|
165
|
+
if (!stripe) stripeByContext.delete(cacheKey);
|
|
166
|
+
return stripe;
|
|
167
|
+
}, (error) => {
|
|
168
|
+
stripeByContext.delete(cacheKey);
|
|
169
|
+
throw error;
|
|
170
|
+
});
|
|
171
|
+
stripeByContext.set(cacheKey, loading);
|
|
172
|
+
return loading;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.tsx
|
|
176
|
+
function useStripeMount(props, container, load) {
|
|
177
|
+
const [status, setStatus] = useState("loading");
|
|
178
|
+
const callbacks = useRef(props);
|
|
179
|
+
callbacks.current = props;
|
|
180
|
+
useEffect(() => {
|
|
181
|
+
const lifecycle = {
|
|
182
|
+
active: true,
|
|
183
|
+
instance: null
|
|
184
|
+
};
|
|
185
|
+
setStatus("loading");
|
|
186
|
+
const fail = () => {
|
|
187
|
+
if (!lifecycle.active) return;
|
|
188
|
+
lifecycle.active = false;
|
|
189
|
+
lifecycle.instance?.destroy();
|
|
190
|
+
lifecycle.instance = null;
|
|
191
|
+
setStatus("failed");
|
|
192
|
+
};
|
|
193
|
+
const timeout = window.setTimeout(fail, 3e4);
|
|
194
|
+
const mount = async () => {
|
|
195
|
+
if (checkBrowserStripeKey(props.checkout.browser.publishableKey, props.checkout.livemode).tag !== "ready") throw new Error("Invalid payment configuration");
|
|
196
|
+
const stripe = await load(props.checkout.browser);
|
|
197
|
+
if (!lifecycle.active) return;
|
|
198
|
+
if (!stripe) throw new Error("Payment form unavailable");
|
|
199
|
+
const instance = await stripe.createEmbeddedCheckoutPage({
|
|
200
|
+
clientSecret: props.checkout.clientSecret,
|
|
201
|
+
onComplete: () => {
|
|
202
|
+
if (lifecycle.active) callbacks.current.onComplete();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
if (!lifecycle.active || !container.current) {
|
|
206
|
+
instance.destroy();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
lifecycle.instance = instance;
|
|
210
|
+
instance.mount(container.current);
|
|
211
|
+
clearTimeout(timeout);
|
|
212
|
+
setStatus("ready");
|
|
213
|
+
};
|
|
214
|
+
mount().catch(fail);
|
|
215
|
+
return () => {
|
|
216
|
+
lifecycle.active = false;
|
|
217
|
+
clearTimeout(timeout);
|
|
218
|
+
lifecycle.instance?.destroy();
|
|
219
|
+
};
|
|
220
|
+
}, [
|
|
221
|
+
props.checkout,
|
|
222
|
+
container,
|
|
223
|
+
load
|
|
224
|
+
]);
|
|
225
|
+
return status;
|
|
226
|
+
}
|
|
227
|
+
function EventEmbeddedCheckoutStep(props) {
|
|
228
|
+
return /* @__PURE__ */ jsx(EventEmbeddedCheckoutStepWithDeps, {
|
|
229
|
+
...props,
|
|
230
|
+
load: loadBrowserStripe
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function EventEmbeddedCheckoutStepWithDeps(props) {
|
|
234
|
+
const container = useRef(null);
|
|
235
|
+
const heading = useRef(null);
|
|
236
|
+
const status = useStripeMount(props, container, props.load);
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
heading.current?.focus();
|
|
239
|
+
}, []);
|
|
240
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
241
|
+
className: "er-embedded-payment",
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ jsx("h2", {
|
|
244
|
+
ref: heading,
|
|
245
|
+
tabIndex: -1,
|
|
246
|
+
className: "er-title er-message",
|
|
247
|
+
children: "Payment"
|
|
248
|
+
}),
|
|
249
|
+
status === "loading" && /* @__PURE__ */ jsxs("div", {
|
|
250
|
+
className: "er-center er-message",
|
|
251
|
+
role: "status",
|
|
252
|
+
"aria-live": "polite",
|
|
253
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
254
|
+
className: "er-icon",
|
|
255
|
+
children: /* @__PURE__ */ jsx(SpinnerNode, { size: "lg" })
|
|
256
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
257
|
+
className: "er-text--muted",
|
|
258
|
+
children: "Loading secure payment…"
|
|
259
|
+
})]
|
|
260
|
+
}),
|
|
261
|
+
status === "failed" && /* @__PURE__ */ jsxs("div", {
|
|
262
|
+
className: "er-center er-message",
|
|
263
|
+
role: "alert",
|
|
264
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
265
|
+
className: "er-text--muted er-message",
|
|
266
|
+
children: "We couldn’t load the payment form."
|
|
267
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
268
|
+
type: "button",
|
|
269
|
+
className: "er-btn er-btn--primary",
|
|
270
|
+
onClick: props.onRetry,
|
|
271
|
+
children: "Try again"
|
|
272
|
+
})]
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ jsx("div", {
|
|
275
|
+
ref: container,
|
|
276
|
+
className: "er-message",
|
|
277
|
+
style: { width: "100%" }
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ jsx("button", {
|
|
280
|
+
type: "button",
|
|
281
|
+
className: "er-back-btn",
|
|
282
|
+
onClick: props.onBack,
|
|
283
|
+
children: "Back to booking"
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
//#endregion
|
|
289
|
+
export { EventEmbeddedCheckoutStepWithDeps, EventEmbeddedCheckoutStep as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { q as buildEventRuntimeFilters } from "./propsDecoder-
|
|
3
|
-
import { i as EventPaginatedListView, n as useEventPagination, o as EventFilters, t as useEventFilters } from "./useEventFilters-
|
|
2
|
+
import { q as buildEventRuntimeFilters } from "./propsDecoder-DiIeBopB.mjs";
|
|
3
|
+
import { i as EventPaginatedListView, n as useEventPagination, o as EventFilters, t as useEventFilters } from "./useEventFilters-blSbN5o7.mjs";
|
|
4
4
|
import { useId, useMemo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.client.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Ut as isRecord } from "./propsDecoder-
|
|
2
|
+
import { Ut as isRecord } from "./propsDecoder-DiIeBopB.mjs";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/shared/LeafletStaticMap.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as getCurrentResolveImageUrlContext, c as resolveImageUrlWithContext, t as ImagePresets } from "./media-
|
|
2
|
+
import { a as getCurrentResolveImageUrlContext, c as resolveImageUrlWithContext, t as ImagePresets } from "./media-BFY0y2rb.mjs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/primitives/content/utils/sanitizeHref.ts
|
|
@@ -159,31 +159,4 @@ function RichText({ as: Comp = "div", className, doc, path, linkTarget = "stored
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
//#endregion
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Build return URLs for Stripe checkout redirect.
|
|
165
|
-
*
|
|
166
|
-
* Constructs success and cancel URLs that preserve existing query params
|
|
167
|
-
* and include the block anchor hash for post-redirect scroll targeting.
|
|
168
|
-
*
|
|
169
|
-
* @param paramName - Query parameter name to add (e.g., 'enrollment', 'registration')
|
|
170
|
-
* @param anchorId - Block anchor ID for the return URL hash fragment.
|
|
171
|
-
* @returns Object with success and cancel URLs
|
|
172
|
-
*/
|
|
173
|
-
function buildCheckoutReturnUrls(paramName, anchorId, returnParams = {}) {
|
|
174
|
-
const currentUrl = new URL(window.location.href);
|
|
175
|
-
const hash = `#${anchorId}`;
|
|
176
|
-
const successParams = new URLSearchParams(currentUrl.search);
|
|
177
|
-
successParams.set(paramName, "success");
|
|
178
|
-
for (const [name, value] of Object.entries(returnParams)) successParams.set(name, value);
|
|
179
|
-
const successUrl = `${currentUrl.origin}${currentUrl.pathname}?${successParams.toString()}${hash}`;
|
|
180
|
-
const cancelParams = new URLSearchParams(currentUrl.search);
|
|
181
|
-
cancelParams.set(paramName, "cancelled");
|
|
182
|
-
for (const [name, value] of Object.entries(returnParams)) cancelParams.set(name, value);
|
|
183
|
-
return {
|
|
184
|
-
successUrl,
|
|
185
|
-
cancelUrl: `${currentUrl.origin}${currentUrl.pathname}?${cancelParams.toString()}${hash}`
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
//#endregion
|
|
189
|
-
export { RichText as n, buildCheckoutReturnUrls as t };
|
|
162
|
+
export { RichText as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as discountAvailabilityHasDiscounts, l as getAutoAppliedDiscountPreview, s as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-
|
|
2
|
+
import { c as discountAvailabilityHasDiscounts, l as getAutoAppliedDiscountPreview, s as discountAvailabilityAllowsManualEntry } from "./DemoBookingPortalAccess-Cvr9O_ca.mjs";
|
|
3
3
|
import { useEffect, useReducer, useRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.ts
|
|
@@ -178,22 +178,6 @@ function CheckIcon({ className, strokeWidth = 2 }) {
|
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
//#endregion
|
|
181
|
-
//#region ../blocks/src/system/runtime/shared/utils/scrollToBlock.ts
|
|
182
|
-
/**
|
|
183
|
-
* Scroll to a block element by its anchor ID.
|
|
184
|
-
*
|
|
185
|
-
* Uses requestAnimationFrame to defer scrolling until after
|
|
186
|
-
* layout shifts (lazy images, fonts, etc.) have settled.
|
|
187
|
-
*/
|
|
188
|
-
function scrollToBlock(anchorId) {
|
|
189
|
-
requestAnimationFrame(() => {
|
|
190
|
-
document.getElementById(anchorId)?.scrollIntoView({
|
|
191
|
-
behavior: "smooth",
|
|
192
|
-
block: "start"
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
//#endregion
|
|
197
181
|
//#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
|
|
198
182
|
/**
|
|
199
183
|
* Circular icon wrapper for terminal state screens (success, error, waitlist, etc.).
|
|
@@ -252,4 +236,4 @@ function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody
|
|
|
252
236
|
});
|
|
253
237
|
}
|
|
254
238
|
//#endregion
|
|
255
|
-
export { useDiscountCodeUi as
|
|
239
|
+
export { useDiscountCodeUi as i, StateIcon as n, CheckIcon as r, TerminalPanel as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { r as clsx } from "./result-DRW7JWXz.mjs";
|
|
2
|
+
import { ht as themeButtonVariantClassNames, mt as themeButtonSizeClassName } from "./propsDecoder-DiIeBopB.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/spinner.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-DiIeBopB.mjs";
|
|
2
2
|
//#region src/rendering/islands/enhancers/accordion.ts
|
|
3
3
|
const decode = defineIslandPropsDecoder("accordion");
|
|
4
4
|
function parseDefaultValues(value) {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as unsafeAsPassId, b as unsafeAsCustomerPassId, v as unsafeAsAppointmentResourceId, x as unsafeAsFormId, y as unsafeAsAppointmentServiceId } from "./colorStyles-
|
|
3
|
-
import { a as buildBookingPaymentSelectionViewModel,
|
|
4
|
-
import { At as isBookingServiceSlidingAmountInRange, Bt as BOOKING_FORM_DATA_RESERVED_KEYS,
|
|
5
|
-
import {
|
|
2
|
+
import { C as unsafeAsPassId, b as unsafeAsCustomerPassId, v as unsafeAsAppointmentResourceId, x as unsafeAsFormId, y as unsafeAsAppointmentServiceId } from "./colorStyles-D-32xHZh.mjs";
|
|
3
|
+
import { a as buildBookingPaymentSelectionViewModel, c as useBookingNowIso, i as usePolling, n as BookingConsentAgreement, r as StepIndicator, t as BookingMailingListNote } from "./BookingMailingListNote-CYHOufsI.mjs";
|
|
4
|
+
import { At as isBookingServiceSlidingAmountInRange, Bt as BOOKING_FORM_DATA_RESERVED_KEYS, Ct as formatBookingSubmissionPreparationError, Dt as getBookingSuccessCopy, Et as getBookingServiceSlidingScale, Ft as resolveBookingSiteId, Gt as clearWorkflowFeedback, It as resolveDefaultBookingServiceId, Jt as okWith, Kt as err, Lt as toSelectedCollectionOptionKind, Mt as prepareBookingSubmission, Nn as formatCurrencyAmount, Nt as resolveAppointmentCheckoutVerificationState, Pt as resolveBookingPaymentStep, Rt as projectSelectedAppointmentConsentIntoForm, St as formatBookingCentsAsCurrencyInput, Tt as getBookingServicePaymentSelectionMode, Vt as isBookingRequirementConsentFieldId, Wt as assertNever, Xt as reportWorkflowSuccess, Yt as reportWorkflowError, bt as logger, cn as resolveBookingSignupOffer, hn as formatLocalScheduleDate, jt as parseBookingCurrencyInputToCents, ln as addLocalScheduleDays, pn as formatBookingInstant, t as defineIslandPropsDecoder, vn as parseBookingLocalDate, wt as getBookingRedirectStateFromLocation, xt as deriveBookingFormViewState, yn as resolveBookingTimeZoneId, zt as resolveSelectedAppointmentConsent } from "./propsDecoder-DiIeBopB.mjs";
|
|
5
|
+
import { i as SpinnerNode, t as ThemedButton } from "./ThemedButton-C7WhXuRl.mjs";
|
|
6
|
+
import { n as useBlockApi, t as BlockApiProvider } from "./context-D_8s12Fp.mjs";
|
|
6
7
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
7
|
-
import { o as DiscountCodeDisclosure, p as storeDemoBookingPassIfAvailable, t as BookingConfirmation } from "./DemoBookingPortalAccess-
|
|
8
|
-
import {
|
|
9
|
-
import { i as SpinnerNode, t as ThemedButton } from "./ThemedButton-CKV1Jh2m.mjs";
|
|
8
|
+
import { o as DiscountCodeDisclosure, p as storeDemoBookingPassIfAvailable, t as BookingConfirmation } from "./DemoBookingPortalAccess-Cvr9O_ca.mjs";
|
|
9
|
+
import { i as useDiscountCodeUi, n as StateIcon, r as CheckIcon, t as TerminalPanel } from "./TerminalPanel-CUCNEwlH.mjs";
|
|
10
10
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
11
11
|
import { i as getFieldValidationControlProps, r as FieldValidationMessage } from "./mailingListSignupCopy-DZSHZrm6.mjs";
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
12
|
+
import { t as CheckboxChoice } from "./CheckboxChoice-M-3HycLw.mjs";
|
|
13
|
+
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-ChxwaNtO.mjs";
|
|
14
|
+
import { t as scrollToBlock } from "./scrollToBlock-C86BYkyV.mjs";
|
|
14
15
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
15
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
16
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-wzR4lKAY.mjs";
|
|
16
17
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
17
18
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
19
|
//#region ../core/src/appointment-service-categories.ts
|