@builder.io/sdk-react 0.5.9 → 0.6.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 +0 -4
- package/lib/browser/index.cjs +97 -0
- package/lib/browser/index.mjs +2598 -0
- package/lib/browser/server-entry-2e639417.js +2 -0
- package/lib/browser/server-entry-f7504f89.mjs +534 -0
- package/lib/browser/server-entry.cjs +1 -0
- package/lib/browser/server-entry.mjs +16 -0
- package/lib/edge/index.cjs +117 -0
- package/lib/edge/index.mjs +5042 -0
- package/lib/edge/server-entry-2e639417.js +2 -0
- package/lib/edge/server-entry-f7504f89.mjs +534 -0
- package/lib/edge/server-entry.cjs +1 -0
- package/lib/edge/server-entry.mjs +16 -0
- package/lib/node/index.cjs +97 -0
- package/lib/node/index.mjs +2598 -0
- package/lib/node/server-entry-2e639417.js +2 -0
- package/lib/node/server-entry-f7504f89.mjs +534 -0
- package/lib/node/server-entry.cjs +1 -0
- package/lib/node/server-entry.mjs +16 -0
- package/package.json +97 -11
- package/types/constants/sdk-version.d.ts +1 -0
- package/types/functions/deopt.d.ts +4 -0
- package/types/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
- package/types/functions/evaluate/edge-runtime/index.d.ts +1 -0
- package/types/functions/evaluate/placeholder-runtime.d.ts +2 -0
- package/{dist → types}/functions/fetch-builder-props.d.ts +2 -1
- package/{dist → types}/functions/get-content/index.d.ts +4 -5
- package/types/functions/is-edge-runtime.d.ts +4 -0
- package/{dist → types}/index-helpers/blocks-exports.d.ts +2 -2
- package/dist/blocks/BaseText.js +0 -9
- package/dist/blocks/button/button.js +0 -12
- package/dist/blocks/button/component-info.js +0 -34
- package/dist/blocks/columns/columns.js +0 -121
- package/dist/blocks/columns/component-info.js +0 -219
- package/dist/blocks/custom-code/component-info.js +0 -23
- package/dist/blocks/custom-code/custom-code.js +0 -51
- package/dist/blocks/embed/component-info.js +0 -39
- package/dist/blocks/embed/embed.js +0 -42
- package/dist/blocks/embed/helpers.js +0 -2
- package/dist/blocks/form/component-info.js +0 -232
- package/dist/blocks/form/form.js +0 -6
- package/dist/blocks/fragment/component-info.js +0 -7
- package/dist/blocks/fragment/fragment.js +0 -6
- package/dist/blocks/helpers.js +0 -40
- package/dist/blocks/image/component-info.js +0 -122
- package/dist/blocks/image/image.helpers.js +0 -47
- package/dist/blocks/image/image.js +0 -82
- package/dist/blocks/img/component-info.js +0 -15
- package/dist/blocks/img/img.js +0 -10
- package/dist/blocks/input/component-info.js +0 -46
- package/dist/blocks/input/input.js +0 -7
- package/dist/blocks/raw-text/component-info.js +0 -10
- package/dist/blocks/raw-text/raw-text.js +0 -6
- package/dist/blocks/section/component-info.js +0 -40
- package/dist/blocks/section/section.js +0 -17
- package/dist/blocks/select/component-info.js +0 -43
- package/dist/blocks/select/select.js +0 -7
- package/dist/blocks/submit-button/component-info.js +0 -26
- package/dist/blocks/submit-button/submit-button.js +0 -6
- package/dist/blocks/symbol/component-info.js +0 -34
- package/dist/blocks/symbol/symbol.helpers.js +0 -31
- package/dist/blocks/symbol/symbol.js +0 -45
- package/dist/blocks/text/component-info.js +0 -19
- package/dist/blocks/text/text.js +0 -8
- package/dist/blocks/textarea/component-info.js +0 -37
- package/dist/blocks/textarea/textarea.js +0 -6
- package/dist/blocks/video/component-info.js +0 -82
- package/dist/blocks/video/video.js +0 -50
- package/dist/components/block/block.helpers.js +0 -69
- package/dist/components/block/block.js +0 -94
- package/dist/components/block/components/block-styles.js +0 -65
- package/dist/components/block/components/block-wrapper.js +0 -36
- package/dist/components/block/components/component-ref/component-ref.helpers.js +0 -22
- package/dist/components/block/components/component-ref/component-ref.js +0 -23
- package/dist/components/block/components/interactive-element.js +0 -20
- package/dist/components/block/components/repeated-block.js +0 -11
- package/dist/components/block/types.js +0 -1
- package/dist/components/blocks/blocks-wrapper.js +0 -38
- package/dist/components/blocks/blocks.js +0 -17
- package/dist/components/content/components/enable-editor.js +0 -271
- package/dist/components/content/components/styles.helpers.js +0 -58
- package/dist/components/content/components/styles.js +0 -32
- package/dist/components/content/content.helpers.js +0 -30
- package/dist/components/content/content.js +0 -85
- package/dist/components/content/content.types.js +0 -1
- package/dist/components/content/index.js +0 -1
- package/dist/components/content/wrap-component-ref.js +0 -6
- package/dist/components/content-variants/content-variants.js +0 -52
- package/dist/components/content-variants/content-variants.types.js +0 -1
- package/dist/components/content-variants/helpers.js +0 -189
- package/dist/components/inlined-script.js +0 -6
- package/dist/components/inlined-styles.js +0 -6
- package/dist/constants/builder-registered-components.js +0 -60
- package/dist/constants/device-sizes.js +0 -45
- package/dist/constants/sdk-version.d.ts +0 -1
- package/dist/constants/sdk-version.js +0 -1
- package/dist/constants/target.js +0 -2
- package/dist/context/builder.context.js +0 -12
- package/dist/context/components.context.js +0 -2
- package/dist/context/types.js +0 -1
- package/dist/functions/apply-patch-with-mutation.js +0 -54
- package/dist/functions/camel-to-kebab-case.js +0 -1
- package/dist/functions/evaluate/browser-runtime/browser.js +0 -31
- package/dist/functions/evaluate/browser-runtime/index.js +0 -1
- package/dist/functions/evaluate/evaluate.js +0 -47
- package/dist/functions/evaluate/helpers.js +0 -10
- package/dist/functions/evaluate/index.js +0 -1
- package/dist/functions/evaluate/node-runtime/index.js +0 -1
- package/dist/functions/evaluate/non-node-runtime/acorn-interpreter.js +0 -3111
- package/dist/functions/evaluate/non-node-runtime/index.d.ts +0 -1
- package/dist/functions/evaluate/non-node-runtime/index.js +0 -2
- package/dist/functions/evaluate/non-node-runtime/non-node-runtime.d.ts +0 -2
- package/dist/functions/evaluate/non-node-runtime/non-node-runtime.js +0 -83
- package/dist/functions/event-handler-name.js +0 -4
- package/dist/functions/extract-text-styles.js +0 -22
- package/dist/functions/fast-clone.js +0 -4
- package/dist/functions/fetch-builder-props.js +0 -25
- package/dist/functions/get-block-actions-handler.js +0 -10
- package/dist/functions/get-block-actions.js +0 -28
- package/dist/functions/get-block-component-options.js +0 -10
- package/dist/functions/get-block-properties.js +0 -72
- package/dist/functions/get-builder-search-params/index.js +0 -38
- package/dist/functions/get-content/generate-content-url.js +0 -33
- package/dist/functions/get-content/index.js +0 -100
- package/dist/functions/get-content/types.js +0 -1
- package/dist/functions/get-fetch.js +0 -11
- package/dist/functions/get-global-this.js +0 -15
- package/dist/functions/get-processed-block.js +0 -46
- package/dist/functions/get-react-native-block-styles.js +0 -17
- package/dist/functions/is-browser.js +0 -3
- package/dist/functions/is-editing.js +0 -5
- package/dist/functions/is-iframe.js +0 -4
- package/dist/functions/is-non-node-server.d.ts +0 -4
- package/dist/functions/is-non-node-server.js +0 -8
- package/dist/functions/is-previewing.js +0 -11
- package/dist/functions/on-change.js +0 -28
- package/dist/functions/register-component.js +0 -38
- package/dist/functions/register.js +0 -27
- package/dist/functions/sanitize-react-native-block-styles.js +0 -61
- package/dist/functions/set-editor-settings.js +0 -12
- package/dist/functions/set.js +0 -14
- package/dist/functions/track/helpers.js +0 -51
- package/dist/functions/track/index.js +0 -71
- package/dist/functions/track/interaction.js +0 -53
- package/dist/functions/transform-block-properties.js +0 -5
- package/dist/functions/transform-block.js +0 -4
- package/dist/helpers/ab-tests.js +0 -122
- package/dist/helpers/canTrack.js +0 -2
- package/dist/helpers/cookie.js +0 -55
- package/dist/helpers/css.js +0 -27
- package/dist/helpers/flatten.js +0 -19
- package/dist/helpers/localStorage.js +0 -24
- package/dist/helpers/logger.js +0 -7
- package/dist/helpers/nullable.js +0 -1
- package/dist/helpers/preview-lru-cache/get.js +0 -3
- package/dist/helpers/preview-lru-cache/helpers.js +0 -0
- package/dist/helpers/preview-lru-cache/init.js +0 -6
- package/dist/helpers/preview-lru-cache/set.js +0 -5
- package/dist/helpers/preview-lru-cache/types.js +0 -0
- package/dist/helpers/sessionId.js +0 -30
- package/dist/helpers/time.js +0 -2
- package/dist/helpers/url.js +0 -15
- package/dist/helpers/uuid.js +0 -15
- package/dist/helpers/visitorId.js +0 -30
- package/dist/index-helpers/blocks-exports.js +0 -19
- package/dist/index-helpers/top-of-file.js +0 -4
- package/dist/index.js +0 -7
- package/dist/scripts/init-editing.js +0 -110
- package/dist/server-index.js +0 -10
- package/dist/types/api-version.js +0 -1
- package/dist/types/builder-block.js +0 -1
- package/dist/types/builder-content.js +0 -1
- package/dist/types/builder-props.js +0 -1
- package/dist/types/can-track.js +0 -1
- package/dist/types/components.js +0 -1
- package/dist/types/deep-partial.js +0 -1
- package/dist/types/element.js +0 -1
- package/dist/types/enforced-partials.js +0 -1
- package/dist/types/input.js +0 -1
- package/dist/types/targets.js +0 -1
- package/dist/types/typescript.js +0 -1
- /package/{dist → types}/blocks/BaseText.d.ts +0 -0
- /package/{dist → types}/blocks/button/button.d.ts +0 -0
- /package/{dist → types}/blocks/button/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/columns/columns.d.ts +0 -0
- /package/{dist → types}/blocks/columns/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/custom-code/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/custom-code/custom-code.d.ts +0 -0
- /package/{dist → types}/blocks/embed/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/embed/embed.d.ts +0 -0
- /package/{dist → types}/blocks/embed/helpers.d.ts +0 -0
- /package/{dist → types}/blocks/form/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/form/form.d.ts +0 -0
- /package/{dist → types}/blocks/fragment/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/fragment/fragment.d.ts +0 -0
- /package/{dist → types}/blocks/helpers.d.ts +0 -0
- /package/{dist → types}/blocks/image/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/image/image.d.ts +0 -0
- /package/{dist → types}/blocks/image/image.helpers.d.ts +0 -0
- /package/{dist → types}/blocks/img/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/img/img.d.ts +0 -0
- /package/{dist → types}/blocks/input/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/input/input.d.ts +0 -0
- /package/{dist → types}/blocks/raw-text/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/raw-text/raw-text.d.ts +0 -0
- /package/{dist → types}/blocks/section/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/section/section.d.ts +0 -0
- /package/{dist → types}/blocks/select/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/select/select.d.ts +0 -0
- /package/{dist → types}/blocks/submit-button/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/submit-button/submit-button.d.ts +0 -0
- /package/{dist → types}/blocks/symbol/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/symbol/symbol.d.ts +0 -0
- /package/{dist → types}/blocks/symbol/symbol.helpers.d.ts +0 -0
- /package/{dist → types}/blocks/text/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/text/text.d.ts +0 -0
- /package/{dist → types}/blocks/textarea/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/textarea/textarea.d.ts +0 -0
- /package/{dist → types}/blocks/video/component-info.d.ts +0 -0
- /package/{dist → types}/blocks/video/video.d.ts +0 -0
- /package/{dist → types}/components/block/block.d.ts +0 -0
- /package/{dist → types}/components/block/block.helpers.d.ts +0 -0
- /package/{dist → types}/components/block/components/block-styles.d.ts +0 -0
- /package/{dist → types}/components/block/components/block-wrapper.d.ts +0 -0
- /package/{dist → types}/components/block/components/component-ref/component-ref.d.ts +0 -0
- /package/{dist → types}/components/block/components/component-ref/component-ref.helpers.d.ts +0 -0
- /package/{dist → types}/components/block/components/interactive-element.d.ts +0 -0
- /package/{dist → types}/components/block/components/repeated-block.d.ts +0 -0
- /package/{dist → types}/components/block/types.d.ts +0 -0
- /package/{dist → types}/components/blocks/blocks-wrapper.d.ts +0 -0
- /package/{dist → types}/components/blocks/blocks.d.ts +0 -0
- /package/{dist → types}/components/content/components/enable-editor.d.ts +0 -0
- /package/{dist → types}/components/content/components/styles.d.ts +0 -0
- /package/{dist → types}/components/content/components/styles.helpers.d.ts +0 -0
- /package/{dist → types}/components/content/content.d.ts +0 -0
- /package/{dist → types}/components/content/content.helpers.d.ts +0 -0
- /package/{dist → types}/components/content/content.types.d.ts +0 -0
- /package/{dist → types}/components/content/index.d.ts +0 -0
- /package/{dist → types}/components/content/wrap-component-ref.d.ts +0 -0
- /package/{dist → types}/components/content-variants/content-variants.d.ts +0 -0
- /package/{dist → types}/components/content-variants/content-variants.types.d.ts +0 -0
- /package/{dist → types}/components/content-variants/helpers.d.ts +0 -0
- /package/{dist → types}/components/inlined-script.d.ts +0 -0
- /package/{dist → types}/components/inlined-styles.d.ts +0 -0
- /package/{dist → types}/constants/builder-registered-components.d.ts +0 -0
- /package/{dist → types}/constants/device-sizes.d.ts +0 -0
- /package/{dist → types}/constants/target.d.ts +0 -0
- /package/{dist → types}/context/builder.context.d.ts +0 -0
- /package/{dist → types}/context/components.context.d.ts +0 -0
- /package/{dist → types}/context/types.d.ts +0 -0
- /package/{dist → types}/functions/apply-patch-with-mutation.d.ts +0 -0
- /package/{dist → types}/functions/camel-to-kebab-case.d.ts +0 -0
- /package/{dist → types}/functions/evaluate/browser-runtime/browser.d.ts +0 -0
- /package/{dist → types}/functions/evaluate/browser-runtime/index.d.ts +0 -0
- /package/{dist/functions/evaluate/non-node-runtime → types/functions/evaluate/edge-runtime}/acorn-interpreter.d.ts +0 -0
- /package/{dist → types}/functions/evaluate/evaluate.d.ts +0 -0
- /package/{dist → types}/functions/evaluate/helpers.d.ts +0 -0
- /package/{dist → types}/functions/evaluate/index.d.ts +0 -0
- /package/{dist → types}/functions/evaluate/node-runtime/index.d.ts +0 -0
- /package/{dist → types}/functions/event-handler-name.d.ts +0 -0
- /package/{dist → types}/functions/extract-text-styles.d.ts +0 -0
- /package/{dist → types}/functions/fast-clone.d.ts +0 -0
- /package/{dist → types}/functions/get-block-actions-handler.d.ts +0 -0
- /package/{dist → types}/functions/get-block-actions.d.ts +0 -0
- /package/{dist → types}/functions/get-block-component-options.d.ts +0 -0
- /package/{dist → types}/functions/get-block-properties.d.ts +0 -0
- /package/{dist → types}/functions/get-builder-search-params/index.d.ts +0 -0
- /package/{dist → types}/functions/get-content/generate-content-url.d.ts +0 -0
- /package/{dist → types}/functions/get-content/types.d.ts +0 -0
- /package/{dist → types}/functions/get-fetch.d.ts +0 -0
- /package/{dist → types}/functions/get-global-this.d.ts +0 -0
- /package/{dist → types}/functions/get-processed-block.d.ts +0 -0
- /package/{dist → types}/functions/get-react-native-block-styles.d.ts +0 -0
- /package/{dist → types}/functions/is-browser.d.ts +0 -0
- /package/{dist → types}/functions/is-editing.d.ts +0 -0
- /package/{dist → types}/functions/is-iframe.d.ts +0 -0
- /package/{dist → types}/functions/is-previewing.d.ts +0 -0
- /package/{dist → types}/functions/on-change.d.ts +0 -0
- /package/{dist → types}/functions/register-component.d.ts +0 -0
- /package/{dist → types}/functions/register.d.ts +0 -0
- /package/{dist → types}/functions/sanitize-react-native-block-styles.d.ts +0 -0
- /package/{dist → types}/functions/set-editor-settings.d.ts +0 -0
- /package/{dist → types}/functions/set.d.ts +0 -0
- /package/{dist → types}/functions/track/helpers.d.ts +0 -0
- /package/{dist → types}/functions/track/index.d.ts +0 -0
- /package/{dist → types}/functions/track/interaction.d.ts +0 -0
- /package/{dist → types}/functions/transform-block-properties.d.ts +0 -0
- /package/{dist → types}/functions/transform-block.d.ts +0 -0
- /package/{dist → types}/helpers/ab-tests.d.ts +0 -0
- /package/{dist → types}/helpers/canTrack.d.ts +0 -0
- /package/{dist → types}/helpers/cookie.d.ts +0 -0
- /package/{dist → types}/helpers/css.d.ts +0 -0
- /package/{dist → types}/helpers/flatten.d.ts +0 -0
- /package/{dist → types}/helpers/localStorage.d.ts +0 -0
- /package/{dist → types}/helpers/logger.d.ts +0 -0
- /package/{dist → types}/helpers/nullable.d.ts +0 -0
- /package/{dist → types}/helpers/preview-lru-cache/get.d.ts +0 -0
- /package/{dist → types}/helpers/preview-lru-cache/helpers.d.ts +0 -0
- /package/{dist → types}/helpers/preview-lru-cache/init.d.ts +0 -0
- /package/{dist → types}/helpers/preview-lru-cache/set.d.ts +0 -0
- /package/{dist → types}/helpers/preview-lru-cache/types.d.ts +0 -0
- /package/{dist → types}/helpers/sessionId.d.ts +0 -0
- /package/{dist → types}/helpers/time.d.ts +0 -0
- /package/{dist → types}/helpers/url.d.ts +0 -0
- /package/{dist → types}/helpers/uuid.d.ts +0 -0
- /package/{dist → types}/helpers/visitorId.d.ts +0 -0
- /package/{dist → types}/index-helpers/top-of-file.d.ts +0 -0
- /package/{dist → types}/index.d.ts +0 -0
- /package/{dist → types}/scripts/init-editing.d.ts +0 -0
- /package/{dist → types}/server-index.d.ts +0 -0
- /package/{dist → types}/types/api-version.d.ts +0 -0
- /package/{dist → types}/types/builder-block.d.ts +0 -0
- /package/{dist → types}/types/builder-content.d.ts +0 -0
- /package/{dist → types}/types/builder-props.d.ts +0 -0
- /package/{dist → types}/types/can-track.d.ts +0 -0
- /package/{dist → types}/types/components.d.ts +0 -0
- /package/{dist → types}/types/deep-partial.d.ts +0 -0
- /package/{dist → types}/types/element.d.ts +0 -0
- /package/{dist → types}/types/enforced-partials.d.ts +0 -0
- /package/{dist → types}/types/input.d.ts +0 -0
- /package/{dist → types}/types/targets.d.ts +0 -0
- /package/{dist → types}/types/typescript.d.ts +0 -0
|
@@ -0,0 +1,2598 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as E, Fragment as f, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { useState as k, createContext as ye, useContext as ae, createElement as $e, useRef as X, useEffect as P } from "react";
|
|
4
|
+
import { j as Z, l as _, i as V, k as F, m as Pe, n as K, T as U, r as Ae, c as Be, o as oe, a as Ve, b as Se, p as Fe, q as re, u as le, v as ce, w as Ne } from "./server-entry-f7504f89.mjs";
|
|
5
|
+
import { _ as an, h as on, f as rn, g as ln, e as cn, d as sn, s as dn, t as un } from "./server-entry-f7504f89.mjs";
|
|
6
|
+
function We(e) {
|
|
7
|
+
return /* @__PURE__ */ E(f, { children: [
|
|
8
|
+
e.link ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
9
|
+
"a",
|
|
10
|
+
{
|
|
11
|
+
role: "button",
|
|
12
|
+
...e.attributes,
|
|
13
|
+
href: e.link,
|
|
14
|
+
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
15
|
+
children: e.text
|
|
16
|
+
}
|
|
17
|
+
) }) : /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
18
|
+
"button",
|
|
19
|
+
{
|
|
20
|
+
...e.attributes,
|
|
21
|
+
style: e.attributes.style,
|
|
22
|
+
className: e.attributes.className + " button-3e7bc8b2",
|
|
23
|
+
children: e.text
|
|
24
|
+
}
|
|
25
|
+
) }),
|
|
26
|
+
/* @__PURE__ */ l("style", { children: `.button-3e7bc8b2 {
|
|
27
|
+
all: unset;
|
|
28
|
+
}` })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
const ve = {
|
|
32
|
+
small: {
|
|
33
|
+
min: 320,
|
|
34
|
+
default: 321,
|
|
35
|
+
max: 640
|
|
36
|
+
},
|
|
37
|
+
medium: {
|
|
38
|
+
min: 641,
|
|
39
|
+
default: 642,
|
|
40
|
+
max: 991
|
|
41
|
+
},
|
|
42
|
+
large: {
|
|
43
|
+
min: 990,
|
|
44
|
+
default: 991,
|
|
45
|
+
max: 1200
|
|
46
|
+
}
|
|
47
|
+
}, se = (e, t = ve) => `@media (max-width: ${t[e].max}px)`, pe = ({
|
|
48
|
+
small: e,
|
|
49
|
+
medium: t
|
|
50
|
+
}) => {
|
|
51
|
+
const n = Z(ve);
|
|
52
|
+
if (!e || !t)
|
|
53
|
+
return n;
|
|
54
|
+
const i = Math.floor(e / 2);
|
|
55
|
+
n.small = {
|
|
56
|
+
max: e,
|
|
57
|
+
min: i,
|
|
58
|
+
default: i + 1
|
|
59
|
+
};
|
|
60
|
+
const a = n.small.max + 1;
|
|
61
|
+
n.medium = {
|
|
62
|
+
max: t,
|
|
63
|
+
min: a,
|
|
64
|
+
default: a + 1
|
|
65
|
+
};
|
|
66
|
+
const o = n.medium.max + 1;
|
|
67
|
+
return n.large = {
|
|
68
|
+
max: 2e3,
|
|
69
|
+
// TODO: decide upper limit
|
|
70
|
+
min: o,
|
|
71
|
+
default: o + 1
|
|
72
|
+
}, n;
|
|
73
|
+
}, je = ({
|
|
74
|
+
builder: e,
|
|
75
|
+
context: t,
|
|
76
|
+
event: n,
|
|
77
|
+
state: i
|
|
78
|
+
}) => Object.entries({
|
|
79
|
+
state: i,
|
|
80
|
+
Builder: e,
|
|
81
|
+
// legacy
|
|
82
|
+
builder: e,
|
|
83
|
+
context: t,
|
|
84
|
+
event: n
|
|
85
|
+
}), Me = ({
|
|
86
|
+
code: e,
|
|
87
|
+
builder: t,
|
|
88
|
+
context: n,
|
|
89
|
+
event: i,
|
|
90
|
+
localState: a,
|
|
91
|
+
rootSetState: o,
|
|
92
|
+
rootState: r
|
|
93
|
+
}) => {
|
|
94
|
+
const d = je({
|
|
95
|
+
builder: t,
|
|
96
|
+
context: n,
|
|
97
|
+
event: i,
|
|
98
|
+
state: Ue(r, a, o)
|
|
99
|
+
});
|
|
100
|
+
return new Function(...d.map(([c]) => c), e)(...d.map(([, c]) => c));
|
|
101
|
+
};
|
|
102
|
+
function Ue(e, t, n) {
|
|
103
|
+
if (e === t)
|
|
104
|
+
throw new Error("rootState === localState");
|
|
105
|
+
return new Proxy(e, {
|
|
106
|
+
get: (i, a) => t && a in t ? t[a] : e[a],
|
|
107
|
+
set: (i, a, o) => {
|
|
108
|
+
if (t && a in t)
|
|
109
|
+
throw new Error("Writing to local state is not allowed as it is read-only.");
|
|
110
|
+
return e[a] = o, n == null || n(e), !0;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function M({
|
|
115
|
+
code: e,
|
|
116
|
+
context: t,
|
|
117
|
+
localState: n,
|
|
118
|
+
rootState: i,
|
|
119
|
+
rootSetState: a,
|
|
120
|
+
event: o,
|
|
121
|
+
isExpression: r = !0
|
|
122
|
+
}) {
|
|
123
|
+
if (e === "") {
|
|
124
|
+
_.warn("Skipping evaluation of empty code block.");
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const d = {
|
|
128
|
+
isEditing: V(),
|
|
129
|
+
isBrowser: F(),
|
|
130
|
+
isServer: !F(),
|
|
131
|
+
getUserAttributes: () => Pe()
|
|
132
|
+
}, u = {
|
|
133
|
+
code: /* we disable this for cases where we definitely don't want a return */ r && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e,
|
|
134
|
+
builder: d,
|
|
135
|
+
context: t,
|
|
136
|
+
event: o,
|
|
137
|
+
rootSetState: a,
|
|
138
|
+
rootState: i,
|
|
139
|
+
localState: n
|
|
140
|
+
};
|
|
141
|
+
try {
|
|
142
|
+
return Me(u);
|
|
143
|
+
} catch (m) {
|
|
144
|
+
_.error("Failed code evaluation: " + m.message, {
|
|
145
|
+
code: e
|
|
146
|
+
});
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const Le = (e, t, n) => {
|
|
151
|
+
if (Object(e) !== e)
|
|
152
|
+
return e;
|
|
153
|
+
const i = Array.isArray(t) ? t : t.toString().match(/[^.[\]]+/g);
|
|
154
|
+
return i.slice(0, -1).reduce((a, o, r) => Object(a[o]) === a[o] ? a[o] : a[o] = Math.abs(Number(i[r + 1])) >> 0 === +i[r + 1] ? [] : {}, e)[i[i.length - 1]] = n, e;
|
|
155
|
+
};
|
|
156
|
+
const _e = ({
|
|
157
|
+
block: e,
|
|
158
|
+
context: t,
|
|
159
|
+
localState: n,
|
|
160
|
+
rootState: i,
|
|
161
|
+
rootSetState: a
|
|
162
|
+
}) => {
|
|
163
|
+
if (!e.bindings)
|
|
164
|
+
return e;
|
|
165
|
+
const o = Z(e), r = {
|
|
166
|
+
...o,
|
|
167
|
+
properties: {
|
|
168
|
+
...o.properties
|
|
169
|
+
},
|
|
170
|
+
actions: {
|
|
171
|
+
...o.actions
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
for (const d in e.bindings) {
|
|
175
|
+
const c = e.bindings[d], s = M({
|
|
176
|
+
code: c,
|
|
177
|
+
localState: n,
|
|
178
|
+
rootState: i,
|
|
179
|
+
rootSetState: a,
|
|
180
|
+
context: t
|
|
181
|
+
});
|
|
182
|
+
Le(r, d, s);
|
|
183
|
+
}
|
|
184
|
+
return r;
|
|
185
|
+
};
|
|
186
|
+
function ee({
|
|
187
|
+
block: e,
|
|
188
|
+
context: t,
|
|
189
|
+
shouldEvaluateBindings: n,
|
|
190
|
+
localState: i,
|
|
191
|
+
rootState: a,
|
|
192
|
+
rootSetState: o
|
|
193
|
+
}) {
|
|
194
|
+
const r = e;
|
|
195
|
+
return n ? _e({
|
|
196
|
+
block: r,
|
|
197
|
+
localState: i,
|
|
198
|
+
rootState: a,
|
|
199
|
+
rootSetState: o,
|
|
200
|
+
context: t
|
|
201
|
+
}) : r;
|
|
202
|
+
}
|
|
203
|
+
const Ke = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), ke = (e) => Object.entries(e).map(([n, i]) => {
|
|
204
|
+
if (typeof i == "string")
|
|
205
|
+
return `${Ke(n)}: ${i};`;
|
|
206
|
+
}).filter(K), Oe = (e) => ke(e).join(`
|
|
207
|
+
`), D = ({
|
|
208
|
+
mediaQuery: e,
|
|
209
|
+
className: t,
|
|
210
|
+
styles: n
|
|
211
|
+
}) => {
|
|
212
|
+
const i = `.${t} {
|
|
213
|
+
${Oe(n)}
|
|
214
|
+
}`;
|
|
215
|
+
return e ? `${e} {
|
|
216
|
+
${i}
|
|
217
|
+
}` : i;
|
|
218
|
+
};
|
|
219
|
+
function H(e) {
|
|
220
|
+
return /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: e.styles }, id: e.id });
|
|
221
|
+
}
|
|
222
|
+
function te(e) {
|
|
223
|
+
const [t, n] = k(
|
|
224
|
+
() => ee({
|
|
225
|
+
block: e.block,
|
|
226
|
+
localState: e.context.localState,
|
|
227
|
+
rootState: e.context.rootState,
|
|
228
|
+
rootSetState: e.context.rootSetState,
|
|
229
|
+
context: e.context.context,
|
|
230
|
+
shouldEvaluateBindings: !0
|
|
231
|
+
})
|
|
232
|
+
);
|
|
233
|
+
function i() {
|
|
234
|
+
return K(t.hide) ? !t.hide : K(t.show) ? t.show : !0;
|
|
235
|
+
}
|
|
236
|
+
function a() {
|
|
237
|
+
var h;
|
|
238
|
+
const o = t.responsiveStyles, r = e.context.content, d = pe(
|
|
239
|
+
((h = r == null ? void 0 : r.meta) == null ? void 0 : h.breakpoints) || {}
|
|
240
|
+
), c = o == null ? void 0 : o.large, s = o == null ? void 0 : o.medium, u = o == null ? void 0 : o.small, m = t.id;
|
|
241
|
+
if (!m)
|
|
242
|
+
return "";
|
|
243
|
+
const y = c ? D({
|
|
244
|
+
className: m,
|
|
245
|
+
styles: c
|
|
246
|
+
}) : "", p = s ? D({
|
|
247
|
+
className: m,
|
|
248
|
+
styles: s,
|
|
249
|
+
mediaQuery: se(
|
|
250
|
+
"medium",
|
|
251
|
+
d
|
|
252
|
+
)
|
|
253
|
+
}) : "", x = u ? D({
|
|
254
|
+
className: m,
|
|
255
|
+
styles: u,
|
|
256
|
+
mediaQuery: se(
|
|
257
|
+
"small",
|
|
258
|
+
d
|
|
259
|
+
)
|
|
260
|
+
}) : "";
|
|
261
|
+
return [y, p, x].join(" ");
|
|
262
|
+
}
|
|
263
|
+
return /* @__PURE__ */ l(f, { children: a() && i() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(H, { styles: a() }) }) : null });
|
|
264
|
+
}
|
|
265
|
+
function He(e) {
|
|
266
|
+
var t;
|
|
267
|
+
return {
|
|
268
|
+
...(t = e.component) == null ? void 0 : t.options,
|
|
269
|
+
...e.options,
|
|
270
|
+
/**
|
|
271
|
+
* Our built-in components frequently make use of the block, so we provide all of it under `builderBlock`
|
|
272
|
+
*/
|
|
273
|
+
builderBlock: e
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
const ze = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"], J = (e) => typeof e == "string" && ze.includes(e.toLowerCase()), qe = ({
|
|
277
|
+
block: e,
|
|
278
|
+
context: t,
|
|
279
|
+
registeredComponents: n
|
|
280
|
+
}) => {
|
|
281
|
+
var o;
|
|
282
|
+
const i = (o = ee({
|
|
283
|
+
block: e,
|
|
284
|
+
localState: t.localState,
|
|
285
|
+
rootState: t.rootState,
|
|
286
|
+
rootSetState: t.rootSetState,
|
|
287
|
+
context: t.context,
|
|
288
|
+
shouldEvaluateBindings: !1
|
|
289
|
+
}).component) == null ? void 0 : o.name;
|
|
290
|
+
if (!i)
|
|
291
|
+
return null;
|
|
292
|
+
const a = n[i];
|
|
293
|
+
if (a)
|
|
294
|
+
return a;
|
|
295
|
+
console.warn(`
|
|
296
|
+
Could not find a registered component named "${i}".
|
|
297
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
298
|
+
}, De = ({
|
|
299
|
+
block: e,
|
|
300
|
+
context: t
|
|
301
|
+
}) => {
|
|
302
|
+
const {
|
|
303
|
+
repeat: n,
|
|
304
|
+
...i
|
|
305
|
+
} = e;
|
|
306
|
+
if (!(n != null && n.collection))
|
|
307
|
+
return;
|
|
308
|
+
const a = M({
|
|
309
|
+
code: n.collection,
|
|
310
|
+
localState: t.localState,
|
|
311
|
+
rootState: t.rootState,
|
|
312
|
+
rootSetState: t.rootSetState,
|
|
313
|
+
context: t.context
|
|
314
|
+
});
|
|
315
|
+
if (!Array.isArray(a))
|
|
316
|
+
return;
|
|
317
|
+
const o = n.collection.split(".").pop(), r = n.itemName || (o ? o + "Item" : "item");
|
|
318
|
+
return a.map((c, s) => ({
|
|
319
|
+
context: {
|
|
320
|
+
...t,
|
|
321
|
+
localState: {
|
|
322
|
+
...t.localState,
|
|
323
|
+
$index: s,
|
|
324
|
+
$item: c,
|
|
325
|
+
[r]: c,
|
|
326
|
+
[`$${r}Index`]: s
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
block: i
|
|
330
|
+
}));
|
|
331
|
+
}, ne = ye({
|
|
332
|
+
content: null,
|
|
333
|
+
context: {},
|
|
334
|
+
localState: void 0,
|
|
335
|
+
rootSetState() {
|
|
336
|
+
},
|
|
337
|
+
rootState: {},
|
|
338
|
+
apiKey: null,
|
|
339
|
+
apiVersion: void 0,
|
|
340
|
+
componentInfos: {},
|
|
341
|
+
inheritedStyles: {}
|
|
342
|
+
});
|
|
343
|
+
function Je(e) {
|
|
344
|
+
const [t, n] = k(() => e.repeatContext);
|
|
345
|
+
return /* @__PURE__ */ l(ne.Provider, { value: t, children: /* @__PURE__ */ l(
|
|
346
|
+
z,
|
|
347
|
+
{
|
|
348
|
+
block: e.block,
|
|
349
|
+
context: t,
|
|
350
|
+
registeredComponents: e.registeredComponents
|
|
351
|
+
}
|
|
352
|
+
) });
|
|
353
|
+
}
|
|
354
|
+
function Ye(e) {
|
|
355
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
356
|
+
}
|
|
357
|
+
const Ge = (e) => `on${Ye(e)}`, Qe = (e, t) => (n) => M({
|
|
358
|
+
code: e,
|
|
359
|
+
context: t.context,
|
|
360
|
+
localState: t.localState,
|
|
361
|
+
rootState: t.rootState,
|
|
362
|
+
rootSetState: t.rootSetState,
|
|
363
|
+
event: n,
|
|
364
|
+
isExpression: !1
|
|
365
|
+
});
|
|
366
|
+
function G(e) {
|
|
367
|
+
const t = {}, n = e.block.actions ?? {};
|
|
368
|
+
for (const i in n) {
|
|
369
|
+
if (!n.hasOwnProperty(i))
|
|
370
|
+
continue;
|
|
371
|
+
const a = n[i];
|
|
372
|
+
let o = Ge(i);
|
|
373
|
+
if (e.stripPrefix)
|
|
374
|
+
switch (U) {
|
|
375
|
+
case "vue2":
|
|
376
|
+
case "vue3":
|
|
377
|
+
o = o.replace("v-on:", "");
|
|
378
|
+
break;
|
|
379
|
+
case "svelte":
|
|
380
|
+
o = o.replace("on:", "");
|
|
381
|
+
break;
|
|
382
|
+
}
|
|
383
|
+
t[o] = Qe(a, e);
|
|
384
|
+
}
|
|
385
|
+
return t;
|
|
386
|
+
}
|
|
387
|
+
function Xe(e) {
|
|
388
|
+
return e.className = e.class, delete e.class, e;
|
|
389
|
+
}
|
|
390
|
+
const Ze = (e) => ({
|
|
391
|
+
href: e.href
|
|
392
|
+
});
|
|
393
|
+
function O({
|
|
394
|
+
block: e,
|
|
395
|
+
context: t
|
|
396
|
+
}) {
|
|
397
|
+
var i;
|
|
398
|
+
const n = {
|
|
399
|
+
...Ze(e),
|
|
400
|
+
...e.properties,
|
|
401
|
+
"builder-id": e.id,
|
|
402
|
+
style: e.style ? et(e.style) : void 0,
|
|
403
|
+
class: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
404
|
+
};
|
|
405
|
+
return Xe(n);
|
|
406
|
+
}
|
|
407
|
+
function et(e) {
|
|
408
|
+
switch (U) {
|
|
409
|
+
case "svelte":
|
|
410
|
+
case "vue2":
|
|
411
|
+
case "vue3":
|
|
412
|
+
case "solid":
|
|
413
|
+
return ke(e).join(" ");
|
|
414
|
+
case "qwik":
|
|
415
|
+
case "reactNative":
|
|
416
|
+
case "react":
|
|
417
|
+
case "rsc":
|
|
418
|
+
return e;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
function tt(e) {
|
|
422
|
+
return /* @__PURE__ */ l(
|
|
423
|
+
e.Wrapper,
|
|
424
|
+
{
|
|
425
|
+
...e.wrapperProps,
|
|
426
|
+
attributes: {
|
|
427
|
+
...O({
|
|
428
|
+
block: e.block,
|
|
429
|
+
context: e.context
|
|
430
|
+
}),
|
|
431
|
+
...G({
|
|
432
|
+
block: e.block,
|
|
433
|
+
rootState: e.context.rootState,
|
|
434
|
+
rootSetState: e.context.rootSetState,
|
|
435
|
+
localState: e.context.localState,
|
|
436
|
+
context: e.context.context
|
|
437
|
+
})
|
|
438
|
+
},
|
|
439
|
+
children: e.children
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
const nt = ({
|
|
444
|
+
componentOptions: e,
|
|
445
|
+
builderBlock: t,
|
|
446
|
+
context: n,
|
|
447
|
+
componentRef: i,
|
|
448
|
+
includeBlockProps: a,
|
|
449
|
+
isInteractive: o,
|
|
450
|
+
contextValue: r
|
|
451
|
+
}) => o ? {
|
|
452
|
+
Wrapper: i,
|
|
453
|
+
block: t,
|
|
454
|
+
context: n,
|
|
455
|
+
wrapperProps: e
|
|
456
|
+
} : {
|
|
457
|
+
...e,
|
|
458
|
+
/**
|
|
459
|
+
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
460
|
+
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
461
|
+
*/
|
|
462
|
+
...a ? {
|
|
463
|
+
attributes: O({
|
|
464
|
+
block: t,
|
|
465
|
+
context: r
|
|
466
|
+
})
|
|
467
|
+
} : {}
|
|
468
|
+
};
|
|
469
|
+
function de(e) {
|
|
470
|
+
var i, a;
|
|
471
|
+
const [t, n] = k(
|
|
472
|
+
() => e.isInteractive ? tt : e.componentRef
|
|
473
|
+
);
|
|
474
|
+
return /* @__PURE__ */ l(f, { children: e.componentRef ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
|
|
475
|
+
t,
|
|
476
|
+
{
|
|
477
|
+
...nt({
|
|
478
|
+
componentOptions: e.componentOptions,
|
|
479
|
+
builderBlock: e.builderBlock,
|
|
480
|
+
context: e.context,
|
|
481
|
+
componentRef: e.componentRef,
|
|
482
|
+
includeBlockProps: e.includeBlockProps,
|
|
483
|
+
isInteractive: e.isInteractive,
|
|
484
|
+
contextValue: e.context
|
|
485
|
+
}),
|
|
486
|
+
children: [
|
|
487
|
+
(i = e.blockChildren) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
488
|
+
z,
|
|
489
|
+
{
|
|
490
|
+
block: o,
|
|
491
|
+
context: e.context,
|
|
492
|
+
registeredComponents: e.registeredComponents
|
|
493
|
+
},
|
|
494
|
+
"block-" + o.id
|
|
495
|
+
)),
|
|
496
|
+
(a = e.blockChildren) == null ? void 0 : a.map((o) => /* @__PURE__ */ l(
|
|
497
|
+
te,
|
|
498
|
+
{
|
|
499
|
+
block: o,
|
|
500
|
+
context: e.context
|
|
501
|
+
},
|
|
502
|
+
"block-style-" + o.id
|
|
503
|
+
))
|
|
504
|
+
]
|
|
505
|
+
}
|
|
506
|
+
) }) : null });
|
|
507
|
+
}
|
|
508
|
+
function ue(e) {
|
|
509
|
+
return /* @__PURE__ */ E(f, { children: [
|
|
510
|
+
" ",
|
|
511
|
+
e.hasChildren ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
|
|
512
|
+
e.Wrapper,
|
|
513
|
+
{
|
|
514
|
+
...O({
|
|
515
|
+
block: e.block,
|
|
516
|
+
context: e.context
|
|
517
|
+
}),
|
|
518
|
+
...G({
|
|
519
|
+
block: e.block,
|
|
520
|
+
rootState: e.context.rootState,
|
|
521
|
+
rootSetState: e.context.rootSetState,
|
|
522
|
+
localState: e.context.localState,
|
|
523
|
+
context: e.context.context,
|
|
524
|
+
stripPrefix: !0
|
|
525
|
+
}),
|
|
526
|
+
children: [
|
|
527
|
+
" ",
|
|
528
|
+
e.children,
|
|
529
|
+
" "
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
) }) : /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
533
|
+
e.Wrapper,
|
|
534
|
+
{
|
|
535
|
+
...O({
|
|
536
|
+
block: e.block,
|
|
537
|
+
context: e.context
|
|
538
|
+
}),
|
|
539
|
+
...G({
|
|
540
|
+
block: e.block,
|
|
541
|
+
rootState: e.context.rootState,
|
|
542
|
+
rootSetState: e.context.rootSetState,
|
|
543
|
+
localState: e.context.localState,
|
|
544
|
+
context: e.context.context,
|
|
545
|
+
stripPrefix: !0
|
|
546
|
+
})
|
|
547
|
+
}
|
|
548
|
+
) }),
|
|
549
|
+
" "
|
|
550
|
+
] });
|
|
551
|
+
}
|
|
552
|
+
function z(e) {
|
|
553
|
+
var u, m, y, p;
|
|
554
|
+
function t() {
|
|
555
|
+
return qe({
|
|
556
|
+
block: e.block,
|
|
557
|
+
context: e.context,
|
|
558
|
+
registeredComponents: e.registeredComponents
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
function n() {
|
|
562
|
+
return De({
|
|
563
|
+
block: e.block,
|
|
564
|
+
context: e.context
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
function i() {
|
|
568
|
+
return n() ? e.block : ee({
|
|
569
|
+
block: e.block,
|
|
570
|
+
localState: e.context.localState,
|
|
571
|
+
rootState: e.context.rootState,
|
|
572
|
+
rootSetState: e.context.rootSetState,
|
|
573
|
+
context: e.context.context,
|
|
574
|
+
shouldEvaluateBindings: !0
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
function a() {
|
|
578
|
+
return e.block.tagName || "div";
|
|
579
|
+
}
|
|
580
|
+
function o() {
|
|
581
|
+
return "hide" in i() ? !i().hide : "show" in i() ? i().show : !0;
|
|
582
|
+
}
|
|
583
|
+
function r() {
|
|
584
|
+
var h;
|
|
585
|
+
return !((h = t == null ? void 0 : t()) != null && h.component) && !n() ? i().children ?? [] : [];
|
|
586
|
+
}
|
|
587
|
+
function d() {
|
|
588
|
+
var x, h, C, T, g;
|
|
589
|
+
return {
|
|
590
|
+
blockChildren: i().children ?? [],
|
|
591
|
+
componentRef: (x = t == null ? void 0 : t()) == null ? void 0 : x.component,
|
|
592
|
+
componentOptions: {
|
|
593
|
+
...He(i()),
|
|
594
|
+
builderContext: e.context,
|
|
595
|
+
...((h = t == null ? void 0 : t()) == null ? void 0 : h.name) === "Symbol" || ((C = t == null ? void 0 : t()) == null ? void 0 : C.name) === "Columns" ? {
|
|
596
|
+
builderComponents: e.registeredComponents
|
|
597
|
+
} : {}
|
|
598
|
+
},
|
|
599
|
+
context: c,
|
|
600
|
+
registeredComponents: e.registeredComponents,
|
|
601
|
+
builderBlock: i(),
|
|
602
|
+
includeBlockProps: ((T = t == null ? void 0 : t()) == null ? void 0 : T.noWrap) === !0,
|
|
603
|
+
isInteractive: !((g = t == null ? void 0 : t()) != null && g.isRSC)
|
|
604
|
+
};
|
|
605
|
+
}
|
|
606
|
+
const [c, s] = k(() => e.context);
|
|
607
|
+
return /* @__PURE__ */ l(f, { children: o() ? /* @__PURE__ */ l(f, { children: (u = t == null ? void 0 : t()) != null && u.noWrap ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(de, { ...d() }) }) : /* @__PURE__ */ E(f, { children: [
|
|
608
|
+
J(a()) ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
609
|
+
ue,
|
|
610
|
+
{
|
|
611
|
+
Wrapper: a(),
|
|
612
|
+
block: i(),
|
|
613
|
+
context: e.context,
|
|
614
|
+
hasChildren: !1
|
|
615
|
+
}
|
|
616
|
+
) }) : null,
|
|
617
|
+
!J(a()) && n() ? /* @__PURE__ */ l(f, { children: (m = n()) == null ? void 0 : m.map((x, h) => /* @__PURE__ */ l(
|
|
618
|
+
Je,
|
|
619
|
+
{
|
|
620
|
+
repeatContext: x.context,
|
|
621
|
+
block: x.block,
|
|
622
|
+
registeredComponents: e.registeredComponents
|
|
623
|
+
},
|
|
624
|
+
h
|
|
625
|
+
)) }) : null,
|
|
626
|
+
!J(a()) && !n() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ E(
|
|
627
|
+
ue,
|
|
628
|
+
{
|
|
629
|
+
Wrapper: a(),
|
|
630
|
+
block: i(),
|
|
631
|
+
context: e.context,
|
|
632
|
+
hasChildren: !0,
|
|
633
|
+
children: [
|
|
634
|
+
/* @__PURE__ */ l(de, { ...d() }),
|
|
635
|
+
(y = r()) == null ? void 0 : y.map((x) => /* @__PURE__ */ l(
|
|
636
|
+
z,
|
|
637
|
+
{
|
|
638
|
+
block: x,
|
|
639
|
+
context: c,
|
|
640
|
+
registeredComponents: e.registeredComponents
|
|
641
|
+
},
|
|
642
|
+
"block-" + x.id
|
|
643
|
+
)),
|
|
644
|
+
(p = r()) == null ? void 0 : p.map((x) => /* @__PURE__ */ l(
|
|
645
|
+
te,
|
|
646
|
+
{
|
|
647
|
+
block: x,
|
|
648
|
+
context: c
|
|
649
|
+
},
|
|
650
|
+
"block-style-" + x.id
|
|
651
|
+
))
|
|
652
|
+
]
|
|
653
|
+
}
|
|
654
|
+
) }) : null
|
|
655
|
+
] }) }) : null });
|
|
656
|
+
}
|
|
657
|
+
function it(e) {
|
|
658
|
+
function t() {
|
|
659
|
+
var a;
|
|
660
|
+
return "builder-blocks" + ((a = e.blocks) != null && a.length ? "" : " no-blocks");
|
|
661
|
+
}
|
|
662
|
+
function n() {
|
|
663
|
+
var a, o;
|
|
664
|
+
V() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
|
|
665
|
+
{
|
|
666
|
+
type: "builder.clickEmptyBlocks",
|
|
667
|
+
data: {
|
|
668
|
+
parentElementId: e.parent,
|
|
669
|
+
dataPath: e.path
|
|
670
|
+
}
|
|
671
|
+
},
|
|
672
|
+
"*"
|
|
673
|
+
));
|
|
674
|
+
}
|
|
675
|
+
function i() {
|
|
676
|
+
var a, o;
|
|
677
|
+
V() && !((a = e.blocks) != null && a.length) && ((o = window.parent) == null || o.postMessage(
|
|
678
|
+
{
|
|
679
|
+
type: "builder.hoverEmptyBlocks",
|
|
680
|
+
data: {
|
|
681
|
+
parentElementId: e.parent,
|
|
682
|
+
dataPath: e.path
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"*"
|
|
686
|
+
));
|
|
687
|
+
}
|
|
688
|
+
return /* @__PURE__ */ E(f, { children: [
|
|
689
|
+
/* @__PURE__ */ l(
|
|
690
|
+
"div",
|
|
691
|
+
{
|
|
692
|
+
className: t() + " div-5821bd52",
|
|
693
|
+
"builder-path": e.path,
|
|
694
|
+
"builder-parent-id": e.parent,
|
|
695
|
+
style: e.styleProp,
|
|
696
|
+
onClick: (a) => n(),
|
|
697
|
+
onMouseEnter: (a) => i(),
|
|
698
|
+
onKeyPress: (a) => n(),
|
|
699
|
+
children: e.children
|
|
700
|
+
}
|
|
701
|
+
),
|
|
702
|
+
/* @__PURE__ */ l("style", { children: `.div-5821bd52 {
|
|
703
|
+
display: flex;
|
|
704
|
+
flex-direction: column;
|
|
705
|
+
align-items: stretch;
|
|
706
|
+
}` })
|
|
707
|
+
] });
|
|
708
|
+
}
|
|
709
|
+
const Ce = ye({ registeredComponents: {} });
|
|
710
|
+
function ie(e) {
|
|
711
|
+
var i, a;
|
|
712
|
+
const t = ae(ne), n = ae(Ce);
|
|
713
|
+
return /* @__PURE__ */ E(
|
|
714
|
+
it,
|
|
715
|
+
{
|
|
716
|
+
blocks: e.blocks,
|
|
717
|
+
parent: e.parent,
|
|
718
|
+
path: e.path,
|
|
719
|
+
styleProp: e.styleProp,
|
|
720
|
+
children: [
|
|
721
|
+
e.blocks ? /* @__PURE__ */ l(f, { children: (i = e.blocks) == null ? void 0 : i.map((o) => /* @__PURE__ */ l(
|
|
722
|
+
z,
|
|
723
|
+
{
|
|
724
|
+
block: o,
|
|
725
|
+
context: e.context || t,
|
|
726
|
+
registeredComponents: e.registeredComponents || n.registeredComponents
|
|
727
|
+
},
|
|
728
|
+
"render-block-" + o.id
|
|
729
|
+
)) }) : null,
|
|
730
|
+
e.blocks ? /* @__PURE__ */ l(f, { children: (a = e.blocks) == null ? void 0 : a.map((o) => /* @__PURE__ */ l(
|
|
731
|
+
te,
|
|
732
|
+
{
|
|
733
|
+
block: o,
|
|
734
|
+
context: e.context || t
|
|
735
|
+
},
|
|
736
|
+
"block-style-" + o.id
|
|
737
|
+
)) }) : null
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
);
|
|
741
|
+
}
|
|
742
|
+
function at(e) {
|
|
743
|
+
var T;
|
|
744
|
+
const [t, n] = k(
|
|
745
|
+
() => typeof e.space == "number" ? e.space || 0 : 20
|
|
746
|
+
), [i, a] = k(() => e.columns || []), [o, r] = k(
|
|
747
|
+
() => e.stackColumnsAt || "tablet"
|
|
748
|
+
);
|
|
749
|
+
function d(g) {
|
|
750
|
+
var R;
|
|
751
|
+
return ((R = i[g]) == null ? void 0 : R.width) || 100 / i.length;
|
|
752
|
+
}
|
|
753
|
+
function c(g) {
|
|
754
|
+
const R = t * (i.length - 1) / i.length;
|
|
755
|
+
return `calc(${d(g)}% - ${R}px)`;
|
|
756
|
+
}
|
|
757
|
+
function s({
|
|
758
|
+
stackedStyle: g,
|
|
759
|
+
desktopStyle: R
|
|
760
|
+
}) {
|
|
761
|
+
return o === "tablet" ? g : R;
|
|
762
|
+
}
|
|
763
|
+
function u({
|
|
764
|
+
stackedStyle: g,
|
|
765
|
+
desktopStyle: R
|
|
766
|
+
}) {
|
|
767
|
+
return o === "never" ? R : g;
|
|
768
|
+
}
|
|
769
|
+
const [m, y] = k(
|
|
770
|
+
() => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
771
|
+
);
|
|
772
|
+
function p() {
|
|
773
|
+
return {
|
|
774
|
+
"--flex-dir": m,
|
|
775
|
+
"--flex-dir-tablet": s({
|
|
776
|
+
stackedStyle: m,
|
|
777
|
+
desktopStyle: "row"
|
|
778
|
+
})
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
function x(g) {
|
|
782
|
+
const R = g === 0 ? 0 : t, A = c(g), B = `${R}px`, N = "100%", W = 0;
|
|
783
|
+
return {
|
|
784
|
+
width: A,
|
|
785
|
+
["marginLeft"]: B,
|
|
786
|
+
"--column-width-mobile": u({
|
|
787
|
+
stackedStyle: N,
|
|
788
|
+
desktopStyle: A
|
|
789
|
+
}),
|
|
790
|
+
"--column-margin-left-mobile": u({
|
|
791
|
+
stackedStyle: W,
|
|
792
|
+
desktopStyle: B
|
|
793
|
+
}),
|
|
794
|
+
"--column-width-tablet": s({
|
|
795
|
+
stackedStyle: N,
|
|
796
|
+
desktopStyle: A
|
|
797
|
+
}),
|
|
798
|
+
"--column-margin-left-tablet": s({
|
|
799
|
+
stackedStyle: W,
|
|
800
|
+
desktopStyle: B
|
|
801
|
+
})
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
function h(g) {
|
|
805
|
+
var A, B;
|
|
806
|
+
return pe(
|
|
807
|
+
((B = (A = e.builderContext.content) == null ? void 0 : A.meta) == null ? void 0 : B.breakpoints) || {}
|
|
808
|
+
)[g].max;
|
|
809
|
+
}
|
|
810
|
+
function C() {
|
|
811
|
+
return `
|
|
812
|
+
@media (max-width: ${h("medium")}px) {
|
|
813
|
+
.${e.builderBlock.id}-breakpoints {
|
|
814
|
+
flex-direction: var(--flex-dir-tablet);
|
|
815
|
+
align-items: stretch;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
819
|
+
width: var(--column-width-tablet) !important;
|
|
820
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
@media (max-width: ${h("small")}px) {
|
|
825
|
+
.${e.builderBlock.id}-breakpoints {
|
|
826
|
+
flex-direction: var(--flex-dir);
|
|
827
|
+
align-items: stretch;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
831
|
+
width: var(--column-width-mobile) !important;
|
|
832
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
`;
|
|
836
|
+
}
|
|
837
|
+
return /* @__PURE__ */ E(f, { children: [
|
|
838
|
+
/* @__PURE__ */ E(
|
|
839
|
+
"div",
|
|
840
|
+
{
|
|
841
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-d734ad62`,
|
|
842
|
+
style: p(),
|
|
843
|
+
children: [
|
|
844
|
+
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(H, { styles: C() }) }),
|
|
845
|
+
(T = e.columns) == null ? void 0 : T.map((g, R) => /* @__PURE__ */ $e(
|
|
846
|
+
"div",
|
|
847
|
+
{
|
|
848
|
+
className: "builder-column div-d734ad62-2",
|
|
849
|
+
style: x(R),
|
|
850
|
+
key: R
|
|
851
|
+
},
|
|
852
|
+
/* @__PURE__ */ l(
|
|
853
|
+
ie,
|
|
854
|
+
{
|
|
855
|
+
path: `component.options.columns.${R}.blocks`,
|
|
856
|
+
parent: e.builderBlock.id,
|
|
857
|
+
styleProp: {
|
|
858
|
+
flexGrow: "1"
|
|
859
|
+
},
|
|
860
|
+
context: e.builderContext,
|
|
861
|
+
registeredComponents: e.builderComponents,
|
|
862
|
+
blocks: g.blocks
|
|
863
|
+
}
|
|
864
|
+
)
|
|
865
|
+
))
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
),
|
|
869
|
+
/* @__PURE__ */ l("style", { children: `.div-d734ad62 {
|
|
870
|
+
display: flex;
|
|
871
|
+
line-height: normal;
|
|
872
|
+
}.div-d734ad62-2 {
|
|
873
|
+
display: flex;
|
|
874
|
+
flex-direction: column;
|
|
875
|
+
align-items: stretch;
|
|
876
|
+
}` })
|
|
877
|
+
] });
|
|
878
|
+
}
|
|
879
|
+
function ot(e) {
|
|
880
|
+
return /* @__PURE__ */ l("span", { children: e.children });
|
|
881
|
+
}
|
|
882
|
+
function me(e) {
|
|
883
|
+
return e.replace(/http(s)?:/, "");
|
|
884
|
+
}
|
|
885
|
+
function rt(e = "", t, n) {
|
|
886
|
+
const i = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
|
|
887
|
+
return e.match(i) ? e.replace(i, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + a + t + "=" + encodeURIComponent(n);
|
|
888
|
+
}
|
|
889
|
+
function lt(e, t) {
|
|
890
|
+
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !t)
|
|
891
|
+
return e;
|
|
892
|
+
if (t === "master")
|
|
893
|
+
return me(e);
|
|
894
|
+
const n = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
895
|
+
if (n) {
|
|
896
|
+
const i = e.split(n[0]), a = n[3], o = t.match("x") ? t : `${t}x`;
|
|
897
|
+
return me(`${i[0]}_${o}${a}`);
|
|
898
|
+
}
|
|
899
|
+
return null;
|
|
900
|
+
}
|
|
901
|
+
function Y(e) {
|
|
902
|
+
if (!e)
|
|
903
|
+
return e;
|
|
904
|
+
const t = [100, 200, 400, 800, 1200, 1600, 2e3];
|
|
905
|
+
if (e.match(/builder\.io/)) {
|
|
906
|
+
let n = e;
|
|
907
|
+
const i = Number(e.split("?width=")[1]);
|
|
908
|
+
return isNaN(i) || (n = `${n} ${i}w`), t.filter((a) => a !== i).map((a) => `${rt(e, "width", a)} ${a}w`).concat([n]).join(", ");
|
|
909
|
+
}
|
|
910
|
+
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [lt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, i]) => `${n} ${i}w`).concat([e]).join(", ") : e;
|
|
911
|
+
}
|
|
912
|
+
function ct(e) {
|
|
913
|
+
var a, o, r, d;
|
|
914
|
+
function t() {
|
|
915
|
+
var u;
|
|
916
|
+
const s = e.image || e.src;
|
|
917
|
+
if (!s || // We can auto add srcset for cdn.builder.io and shopify
|
|
918
|
+
// images, otherwise you can supply this prop manually
|
|
919
|
+
!(s.match(/builder\.io/) || s.match(/cdn\.shopify\.com/)))
|
|
920
|
+
return e.srcset;
|
|
921
|
+
if (e.srcset && ((u = e.image) != null && u.includes("builder.io/api/v1/image"))) {
|
|
922
|
+
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
923
|
+
return console.debug("Removed given srcset"), Y(s);
|
|
924
|
+
} else if (e.image && !e.srcset)
|
|
925
|
+
return Y(s);
|
|
926
|
+
return Y(s);
|
|
927
|
+
}
|
|
928
|
+
function n() {
|
|
929
|
+
var c;
|
|
930
|
+
return (c = t == null ? void 0 : t()) != null && c.match(/builder\.io/) && !e.noWebp ? t().replace(/\?/g, "?format=webp&") : "";
|
|
931
|
+
}
|
|
932
|
+
function i() {
|
|
933
|
+
const c = {
|
|
934
|
+
position: "absolute",
|
|
935
|
+
height: "100%",
|
|
936
|
+
width: "100%",
|
|
937
|
+
left: "0px",
|
|
938
|
+
top: "0px"
|
|
939
|
+
};
|
|
940
|
+
return e.aspectRatio ? c : void 0;
|
|
941
|
+
}
|
|
942
|
+
return /* @__PURE__ */ E(f, { children: [
|
|
943
|
+
/* @__PURE__ */ E(f, { children: [
|
|
944
|
+
/* @__PURE__ */ E("picture", { children: [
|
|
945
|
+
n() ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l("source", { type: "image/webp", srcSet: n() }) }) : null,
|
|
946
|
+
/* @__PURE__ */ l(
|
|
947
|
+
"img",
|
|
948
|
+
{
|
|
949
|
+
loading: "lazy",
|
|
950
|
+
alt: e.altText,
|
|
951
|
+
role: e.altText ? "presentation" : void 0,
|
|
952
|
+
style: {
|
|
953
|
+
objectPosition: e.backgroundPosition || "center",
|
|
954
|
+
objectFit: e.backgroundSize || "cover",
|
|
955
|
+
...i()
|
|
956
|
+
},
|
|
957
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-ef11a6be",
|
|
958
|
+
src: e.image,
|
|
959
|
+
srcSet: t(),
|
|
960
|
+
sizes: e.sizes
|
|
961
|
+
}
|
|
962
|
+
)
|
|
963
|
+
] }),
|
|
964
|
+
e.aspectRatio && !((o = (a = e.builderBlock) == null ? void 0 : a.children) != null && o.length && e.fitContent) ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
965
|
+
"div",
|
|
966
|
+
{
|
|
967
|
+
className: "builder-image-sizer div-ef11a6be",
|
|
968
|
+
style: {
|
|
969
|
+
paddingTop: e.aspectRatio * 100 + "%"
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
) }) : null,
|
|
973
|
+
(d = (r = e.builderBlock) == null ? void 0 : r.children) != null && d.length && e.fitContent ? /* @__PURE__ */ l(f, { children: e.children }) : null,
|
|
974
|
+
!e.fitContent && e.children ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l("div", { className: "div-ef11a6be-2", children: e.children }) }) : null
|
|
975
|
+
] }),
|
|
976
|
+
/* @__PURE__ */ l("style", { children: `.img-ef11a6be {
|
|
977
|
+
opacity: 1;
|
|
978
|
+
transition: opacity 0.2s ease-in-out;
|
|
979
|
+
}.div-ef11a6be {
|
|
980
|
+
width: 100%;
|
|
981
|
+
pointer-events: none;
|
|
982
|
+
font-size: 0;
|
|
983
|
+
}.div-ef11a6be-2 {
|
|
984
|
+
display: flex;
|
|
985
|
+
flex-direction: column;
|
|
986
|
+
align-items: stretch;
|
|
987
|
+
position: absolute;
|
|
988
|
+
top: 0;
|
|
989
|
+
left: 0;
|
|
990
|
+
width: 100%;
|
|
991
|
+
height: 100%;
|
|
992
|
+
}` })
|
|
993
|
+
] });
|
|
994
|
+
}
|
|
995
|
+
function st(e) {
|
|
996
|
+
return /* @__PURE__ */ l(
|
|
997
|
+
"section",
|
|
998
|
+
{
|
|
999
|
+
...e.attributes,
|
|
1000
|
+
style: {
|
|
1001
|
+
width: "100%",
|
|
1002
|
+
alignSelf: "stretch",
|
|
1003
|
+
flexGrow: 1,
|
|
1004
|
+
boxSizing: "border-box",
|
|
1005
|
+
maxWidth: e.maxWidth || 1200,
|
|
1006
|
+
display: "flex",
|
|
1007
|
+
flexDirection: "column",
|
|
1008
|
+
alignItems: "stretch",
|
|
1009
|
+
marginLeft: "auto",
|
|
1010
|
+
marginRight: "auto"
|
|
1011
|
+
},
|
|
1012
|
+
children: e.children
|
|
1013
|
+
}
|
|
1014
|
+
);
|
|
1015
|
+
}
|
|
1016
|
+
const L = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
1017
|
+
...t,
|
|
1018
|
+
testVariationId: t.id,
|
|
1019
|
+
id: e == null ? void 0 : e.id
|
|
1020
|
+
})), dt = ({
|
|
1021
|
+
canTrack: e,
|
|
1022
|
+
content: t
|
|
1023
|
+
}) => !(!(L(t).length > 0) || !e || F());
|
|
1024
|
+
function ut(e, t, n) {
|
|
1025
|
+
var r;
|
|
1026
|
+
function i() {
|
|
1027
|
+
function d(x, h, C) {
|
|
1028
|
+
let T = "";
|
|
1029
|
+
if (C) {
|
|
1030
|
+
const g = /* @__PURE__ */ new Date();
|
|
1031
|
+
g.setTime(g.getTime() + C * 24 * 60 * 60 * 1e3), T = "; expires=" + g.toUTCString();
|
|
1032
|
+
}
|
|
1033
|
+
document.cookie = x + "=" + (h || "") + T + "; path=/; Secure; SameSite=None";
|
|
1034
|
+
}
|
|
1035
|
+
function c(x) {
|
|
1036
|
+
const h = x + "=", C = document.cookie.split(";");
|
|
1037
|
+
for (let T = 0; T < C.length; T++) {
|
|
1038
|
+
let g = C[T];
|
|
1039
|
+
for (; g.charAt(0) === " "; )
|
|
1040
|
+
g = g.substring(1, g.length);
|
|
1041
|
+
if (g.indexOf(h) === 0)
|
|
1042
|
+
return g.substring(h.length, g.length);
|
|
1043
|
+
}
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
1046
|
+
const s = `builder.tests.${e}`, u = c(s), m = t.map((x) => x.id).concat(e);
|
|
1047
|
+
if (u && m.includes(u))
|
|
1048
|
+
return u;
|
|
1049
|
+
let y = 0;
|
|
1050
|
+
const p = Math.random();
|
|
1051
|
+
for (let x = 0; x < t.length; x++) {
|
|
1052
|
+
const h = t[x], C = h.testRatio;
|
|
1053
|
+
if (y += C, p < y)
|
|
1054
|
+
return d(s, h.id), h.id;
|
|
1055
|
+
}
|
|
1056
|
+
return d(s, e), e;
|
|
1057
|
+
}
|
|
1058
|
+
const a = i(), o = (r = document.currentScript) == null ? void 0 : r.previousElementSibling;
|
|
1059
|
+
if (n) {
|
|
1060
|
+
o.remove();
|
|
1061
|
+
const d = document.currentScript;
|
|
1062
|
+
d == null || d.remove();
|
|
1063
|
+
} else {
|
|
1064
|
+
const d = t.concat({
|
|
1065
|
+
id: e
|
|
1066
|
+
}).filter((c) => c.id !== a).map((c) => `.variant-${c.id} { display: none; }
|
|
1067
|
+
`).join("");
|
|
1068
|
+
o.innerHTML = d;
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
function mt(e, t, n) {
|
|
1072
|
+
var c;
|
|
1073
|
+
if (!navigator.cookieEnabled)
|
|
1074
|
+
return;
|
|
1075
|
+
function i(s) {
|
|
1076
|
+
const u = s + "=", m = document.cookie.split(";");
|
|
1077
|
+
for (let y = 0; y < m.length; y++) {
|
|
1078
|
+
let p = m[y];
|
|
1079
|
+
for (; p.charAt(0) === " "; )
|
|
1080
|
+
p = p.substring(1, p.length);
|
|
1081
|
+
if (p.indexOf(u) === 0)
|
|
1082
|
+
return p.substring(u.length, p.length);
|
|
1083
|
+
}
|
|
1084
|
+
return null;
|
|
1085
|
+
}
|
|
1086
|
+
const a = `builder.tests.${t}`, o = i(a), r = (c = document.currentScript) == null ? void 0 : c.parentElement, d = e === t;
|
|
1087
|
+
if (o === e) {
|
|
1088
|
+
if (d)
|
|
1089
|
+
return;
|
|
1090
|
+
r == null || r.removeAttribute("hidden"), r == null || r.removeAttribute("aria-hidden");
|
|
1091
|
+
} else {
|
|
1092
|
+
d && (n ? r == null || r.remove() : (r == null || r.setAttribute("hidden", "true"), r == null || r.setAttribute("aria-hidden", "true")));
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
const ft = (e) => e === "react" || e === "reactNative", we = ft(U), Ie = "builderIoAbTest", Te = "builderIoRenderContent", ht = () => {
|
|
1097
|
+
const e = ut.toString().replace(/\s+/g, " "), t = mt.toString().replace(/\s+/g, " ");
|
|
1098
|
+
return `
|
|
1099
|
+
window.${Ie} = ${e}
|
|
1100
|
+
window.${Te} = ${t}
|
|
1101
|
+
`;
|
|
1102
|
+
}, gt = (e, t) => `
|
|
1103
|
+
window.${Ie}("${t}",${JSON.stringify(e)}, ${we})`, bt = ({
|
|
1104
|
+
contentId: e,
|
|
1105
|
+
variationId: t
|
|
1106
|
+
}) => `
|
|
1107
|
+
window.${Te}("${t}", "${e}", ${we})`, xt = {
|
|
1108
|
+
name: "Core:Button",
|
|
1109
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
1110
|
+
defaultStyles: {
|
|
1111
|
+
// TODO: make min width more intuitive and set one
|
|
1112
|
+
appearance: "none",
|
|
1113
|
+
paddingTop: "15px",
|
|
1114
|
+
paddingBottom: "15px",
|
|
1115
|
+
paddingLeft: "25px",
|
|
1116
|
+
paddingRight: "25px",
|
|
1117
|
+
backgroundColor: "#000000",
|
|
1118
|
+
color: "white",
|
|
1119
|
+
borderRadius: "4px",
|
|
1120
|
+
textAlign: "center",
|
|
1121
|
+
cursor: "pointer"
|
|
1122
|
+
},
|
|
1123
|
+
inputs: [{
|
|
1124
|
+
name: "text",
|
|
1125
|
+
type: "text",
|
|
1126
|
+
defaultValue: "Click me!",
|
|
1127
|
+
bubble: !0
|
|
1128
|
+
}, {
|
|
1129
|
+
name: "link",
|
|
1130
|
+
type: "url",
|
|
1131
|
+
bubble: !0
|
|
1132
|
+
}, {
|
|
1133
|
+
name: "openLinkInNewTab",
|
|
1134
|
+
type: "boolean",
|
|
1135
|
+
defaultValue: !1,
|
|
1136
|
+
friendlyName: "Open link in new tab"
|
|
1137
|
+
}],
|
|
1138
|
+
static: !0,
|
|
1139
|
+
noWrap: !0
|
|
1140
|
+
}, yt = {
|
|
1141
|
+
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
1142
|
+
name: "Columns",
|
|
1143
|
+
isRSC: !0,
|
|
1144
|
+
inputs: [{
|
|
1145
|
+
name: "columns",
|
|
1146
|
+
type: "array",
|
|
1147
|
+
broadcast: !0,
|
|
1148
|
+
subFields: [{
|
|
1149
|
+
name: "blocks",
|
|
1150
|
+
type: "array",
|
|
1151
|
+
hideFromUI: !0,
|
|
1152
|
+
defaultValue: [{
|
|
1153
|
+
"@type": "@builder.io/sdk:Element",
|
|
1154
|
+
responsiveStyles: {
|
|
1155
|
+
large: {
|
|
1156
|
+
display: "flex",
|
|
1157
|
+
flexDirection: "column",
|
|
1158
|
+
alignItems: "stretch",
|
|
1159
|
+
flexShrink: "0",
|
|
1160
|
+
position: "relative",
|
|
1161
|
+
marginTop: "30px",
|
|
1162
|
+
textAlign: "center",
|
|
1163
|
+
lineHeight: "normal",
|
|
1164
|
+
height: "auto",
|
|
1165
|
+
minHeight: "20px",
|
|
1166
|
+
minWidth: "20px",
|
|
1167
|
+
overflow: "hidden"
|
|
1168
|
+
}
|
|
1169
|
+
},
|
|
1170
|
+
component: {
|
|
1171
|
+
name: "Image",
|
|
1172
|
+
options: {
|
|
1173
|
+
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
1174
|
+
backgroundPosition: "center",
|
|
1175
|
+
backgroundSize: "cover",
|
|
1176
|
+
aspectRatio: 0.7004048582995948
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}, {
|
|
1180
|
+
"@type": "@builder.io/sdk:Element",
|
|
1181
|
+
responsiveStyles: {
|
|
1182
|
+
large: {
|
|
1183
|
+
display: "flex",
|
|
1184
|
+
flexDirection: "column",
|
|
1185
|
+
alignItems: "stretch",
|
|
1186
|
+
flexShrink: "0",
|
|
1187
|
+
position: "relative",
|
|
1188
|
+
marginTop: "30px",
|
|
1189
|
+
textAlign: "center",
|
|
1190
|
+
lineHeight: "normal",
|
|
1191
|
+
height: "auto"
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
component: {
|
|
1195
|
+
name: "Text",
|
|
1196
|
+
options: {
|
|
1197
|
+
text: "<p>Enter some text...</p>"
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
}]
|
|
1201
|
+
}, {
|
|
1202
|
+
name: "width",
|
|
1203
|
+
type: "number",
|
|
1204
|
+
hideFromUI: !0,
|
|
1205
|
+
helperText: "Width %, e.g. set to 50 to fill half of the space"
|
|
1206
|
+
}, {
|
|
1207
|
+
name: "link",
|
|
1208
|
+
type: "url",
|
|
1209
|
+
helperText: "Optionally set a url that clicking this column will link to"
|
|
1210
|
+
}],
|
|
1211
|
+
defaultValue: [{
|
|
1212
|
+
blocks: [{
|
|
1213
|
+
"@type": "@builder.io/sdk:Element",
|
|
1214
|
+
responsiveStyles: {
|
|
1215
|
+
large: {
|
|
1216
|
+
display: "flex",
|
|
1217
|
+
flexDirection: "column",
|
|
1218
|
+
alignItems: "stretch",
|
|
1219
|
+
flexShrink: "0",
|
|
1220
|
+
position: "relative",
|
|
1221
|
+
marginTop: "30px",
|
|
1222
|
+
textAlign: "center",
|
|
1223
|
+
lineHeight: "normal",
|
|
1224
|
+
height: "auto",
|
|
1225
|
+
minHeight: "20px",
|
|
1226
|
+
minWidth: "20px",
|
|
1227
|
+
overflow: "hidden"
|
|
1228
|
+
}
|
|
1229
|
+
},
|
|
1230
|
+
component: {
|
|
1231
|
+
name: "Image",
|
|
1232
|
+
options: {
|
|
1233
|
+
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
1234
|
+
backgroundPosition: "center",
|
|
1235
|
+
backgroundSize: "cover",
|
|
1236
|
+
aspectRatio: 0.7004048582995948
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}, {
|
|
1240
|
+
"@type": "@builder.io/sdk:Element",
|
|
1241
|
+
responsiveStyles: {
|
|
1242
|
+
large: {
|
|
1243
|
+
display: "flex",
|
|
1244
|
+
flexDirection: "column",
|
|
1245
|
+
alignItems: "stretch",
|
|
1246
|
+
flexShrink: "0",
|
|
1247
|
+
position: "relative",
|
|
1248
|
+
marginTop: "30px",
|
|
1249
|
+
textAlign: "center",
|
|
1250
|
+
lineHeight: "normal",
|
|
1251
|
+
height: "auto"
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
component: {
|
|
1255
|
+
name: "Text",
|
|
1256
|
+
options: {
|
|
1257
|
+
text: "<p>Enter some text...</p>"
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}]
|
|
1261
|
+
}, {
|
|
1262
|
+
blocks: [{
|
|
1263
|
+
"@type": "@builder.io/sdk:Element",
|
|
1264
|
+
responsiveStyles: {
|
|
1265
|
+
large: {
|
|
1266
|
+
display: "flex",
|
|
1267
|
+
flexDirection: "column",
|
|
1268
|
+
alignItems: "stretch",
|
|
1269
|
+
flexShrink: "0",
|
|
1270
|
+
position: "relative",
|
|
1271
|
+
marginTop: "30px",
|
|
1272
|
+
textAlign: "center",
|
|
1273
|
+
lineHeight: "normal",
|
|
1274
|
+
height: "auto",
|
|
1275
|
+
minHeight: "20px",
|
|
1276
|
+
minWidth: "20px",
|
|
1277
|
+
overflow: "hidden"
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
component: {
|
|
1281
|
+
name: "Image",
|
|
1282
|
+
options: {
|
|
1283
|
+
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
1284
|
+
backgroundPosition: "center",
|
|
1285
|
+
backgroundSize: "cover",
|
|
1286
|
+
aspectRatio: 0.7004048582995948
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}, {
|
|
1290
|
+
"@type": "@builder.io/sdk:Element",
|
|
1291
|
+
responsiveStyles: {
|
|
1292
|
+
large: {
|
|
1293
|
+
display: "flex",
|
|
1294
|
+
flexDirection: "column",
|
|
1295
|
+
alignItems: "stretch",
|
|
1296
|
+
flexShrink: "0",
|
|
1297
|
+
position: "relative",
|
|
1298
|
+
marginTop: "30px",
|
|
1299
|
+
textAlign: "center",
|
|
1300
|
+
lineHeight: "normal",
|
|
1301
|
+
height: "auto"
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
component: {
|
|
1305
|
+
name: "Text",
|
|
1306
|
+
options: {
|
|
1307
|
+
text: "<p>Enter some text...</p>"
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
}]
|
|
1311
|
+
}],
|
|
1312
|
+
onChange: (e) => {
|
|
1313
|
+
function t() {
|
|
1314
|
+
n.forEach((i) => {
|
|
1315
|
+
i.delete("width");
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
const n = e.get("columns");
|
|
1319
|
+
Array.isArray(n) && n.find((a) => a.get("width")) && (n.find((o) => !o.get("width")) || n.reduce((d, c) => d + c.get("width"), 0) !== 100) && t();
|
|
1320
|
+
}
|
|
1321
|
+
}, {
|
|
1322
|
+
name: "space",
|
|
1323
|
+
type: "number",
|
|
1324
|
+
defaultValue: 20,
|
|
1325
|
+
helperText: "Size of gap between columns",
|
|
1326
|
+
advanced: !0
|
|
1327
|
+
}, {
|
|
1328
|
+
name: "stackColumnsAt",
|
|
1329
|
+
type: "string",
|
|
1330
|
+
defaultValue: "tablet",
|
|
1331
|
+
helperText: "Convert horizontal columns to vertical at what device size",
|
|
1332
|
+
enum: ["tablet", "mobile", "never"],
|
|
1333
|
+
advanced: !0
|
|
1334
|
+
}, {
|
|
1335
|
+
name: "reverseColumnsWhenStacked",
|
|
1336
|
+
type: "boolean",
|
|
1337
|
+
defaultValue: !1,
|
|
1338
|
+
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
1339
|
+
advanced: !0
|
|
1340
|
+
}]
|
|
1341
|
+
}, St = {
|
|
1342
|
+
name: "Fragment",
|
|
1343
|
+
static: !0,
|
|
1344
|
+
hidden: !0,
|
|
1345
|
+
canHaveChildren: !0,
|
|
1346
|
+
noWrap: !0
|
|
1347
|
+
}, vt = {
|
|
1348
|
+
name: "Image",
|
|
1349
|
+
static: !0,
|
|
1350
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1351
|
+
defaultStyles: {
|
|
1352
|
+
position: "relative",
|
|
1353
|
+
minHeight: "20px",
|
|
1354
|
+
minWidth: "20px",
|
|
1355
|
+
overflow: "hidden"
|
|
1356
|
+
},
|
|
1357
|
+
canHaveChildren: !0,
|
|
1358
|
+
inputs: [{
|
|
1359
|
+
name: "image",
|
|
1360
|
+
type: "file",
|
|
1361
|
+
bubble: !0,
|
|
1362
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
1363
|
+
required: !0,
|
|
1364
|
+
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
1365
|
+
onChange: (e) => {
|
|
1366
|
+
e.delete("srcset"), e.delete("noWebp");
|
|
1367
|
+
function n(r, d = 6e4) {
|
|
1368
|
+
return new Promise((c, s) => {
|
|
1369
|
+
const u = document.createElement("img");
|
|
1370
|
+
let m = !1;
|
|
1371
|
+
u.onload = () => {
|
|
1372
|
+
m = !0, c(u);
|
|
1373
|
+
}, u.addEventListener("error", (y) => {
|
|
1374
|
+
console.warn("Image load failed", y.error), s(y.error);
|
|
1375
|
+
}), u.src = r, setTimeout(() => {
|
|
1376
|
+
m || s(new Error("Image load timed out"));
|
|
1377
|
+
}, d);
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
function i(r) {
|
|
1381
|
+
return Math.round(r * 1e3) / 1e3;
|
|
1382
|
+
}
|
|
1383
|
+
const a = e.get("image"), o = e.get("aspectRatio");
|
|
1384
|
+
if (fetch(a).then((r) => r.blob()).then((r) => {
|
|
1385
|
+
r.type.includes("svg") && e.set("noWebp", !0);
|
|
1386
|
+
}), a && (!o || o === 0.7041))
|
|
1387
|
+
return n(a).then((r) => {
|
|
1388
|
+
const d = e.get("aspectRatio");
|
|
1389
|
+
e.get("image") === a && (!d || d === 0.7041) && r.width && r.height && (e.set("aspectRatio", i(r.height / r.width)), e.set("height", r.height), e.set("width", r.width));
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
}, {
|
|
1393
|
+
name: "backgroundSize",
|
|
1394
|
+
type: "text",
|
|
1395
|
+
defaultValue: "cover",
|
|
1396
|
+
enum: [{
|
|
1397
|
+
label: "contain",
|
|
1398
|
+
value: "contain",
|
|
1399
|
+
helperText: "The image should never get cropped"
|
|
1400
|
+
}, {
|
|
1401
|
+
label: "cover",
|
|
1402
|
+
value: "cover",
|
|
1403
|
+
helperText: "The image should fill it's box, cropping when needed"
|
|
1404
|
+
}]
|
|
1405
|
+
}, {
|
|
1406
|
+
name: "backgroundPosition",
|
|
1407
|
+
type: "text",
|
|
1408
|
+
defaultValue: "center",
|
|
1409
|
+
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
1410
|
+
}, {
|
|
1411
|
+
name: "altText",
|
|
1412
|
+
type: "string",
|
|
1413
|
+
helperText: "Text to display when the user has images off"
|
|
1414
|
+
}, {
|
|
1415
|
+
name: "height",
|
|
1416
|
+
type: "number",
|
|
1417
|
+
hideFromUI: !0
|
|
1418
|
+
}, {
|
|
1419
|
+
name: "width",
|
|
1420
|
+
type: "number",
|
|
1421
|
+
hideFromUI: !0
|
|
1422
|
+
}, {
|
|
1423
|
+
name: "sizes",
|
|
1424
|
+
type: "string",
|
|
1425
|
+
hideFromUI: !0
|
|
1426
|
+
}, {
|
|
1427
|
+
name: "srcset",
|
|
1428
|
+
type: "string",
|
|
1429
|
+
hideFromUI: !0
|
|
1430
|
+
}, {
|
|
1431
|
+
name: "lazy",
|
|
1432
|
+
type: "boolean",
|
|
1433
|
+
defaultValue: !0,
|
|
1434
|
+
hideFromUI: !0
|
|
1435
|
+
}, {
|
|
1436
|
+
name: "fitContent",
|
|
1437
|
+
type: "boolean",
|
|
1438
|
+
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
1439
|
+
defaultValue: !0
|
|
1440
|
+
}, {
|
|
1441
|
+
name: "aspectRatio",
|
|
1442
|
+
type: "number",
|
|
1443
|
+
helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
|
|
1444
|
+
advanced: !0,
|
|
1445
|
+
defaultValue: 0.7041
|
|
1446
|
+
}]
|
|
1447
|
+
}, pt = {
|
|
1448
|
+
name: "Core:Section",
|
|
1449
|
+
static: !0,
|
|
1450
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
1451
|
+
inputs: [{
|
|
1452
|
+
name: "maxWidth",
|
|
1453
|
+
type: "number",
|
|
1454
|
+
defaultValue: 1200
|
|
1455
|
+
}, {
|
|
1456
|
+
name: "lazyLoad",
|
|
1457
|
+
type: "boolean",
|
|
1458
|
+
defaultValue: !1,
|
|
1459
|
+
advanced: !0,
|
|
1460
|
+
description: "Only render this section when in view"
|
|
1461
|
+
}],
|
|
1462
|
+
defaultStyles: {
|
|
1463
|
+
paddingLeft: "20px",
|
|
1464
|
+
paddingRight: "20px",
|
|
1465
|
+
paddingTop: "50px",
|
|
1466
|
+
paddingBottom: "50px",
|
|
1467
|
+
marginTop: "0px",
|
|
1468
|
+
width: "100vw",
|
|
1469
|
+
marginLeft: "calc(50% - 50vw)"
|
|
1470
|
+
},
|
|
1471
|
+
canHaveChildren: !0,
|
|
1472
|
+
defaultChildren: [{
|
|
1473
|
+
"@type": "@builder.io/sdk:Element",
|
|
1474
|
+
responsiveStyles: {
|
|
1475
|
+
large: {
|
|
1476
|
+
textAlign: "center"
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
component: {
|
|
1480
|
+
name: "Text",
|
|
1481
|
+
options: {
|
|
1482
|
+
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}]
|
|
1486
|
+
}, kt = {
|
|
1487
|
+
name: "Symbol",
|
|
1488
|
+
noWrap: !0,
|
|
1489
|
+
static: !0,
|
|
1490
|
+
isRSC: !0,
|
|
1491
|
+
inputs: [{
|
|
1492
|
+
name: "symbol",
|
|
1493
|
+
type: "uiSymbol"
|
|
1494
|
+
}, {
|
|
1495
|
+
name: "dataOnly",
|
|
1496
|
+
helperText: "Make this a data symbol that doesn't display any UI",
|
|
1497
|
+
type: "boolean",
|
|
1498
|
+
defaultValue: !1,
|
|
1499
|
+
advanced: !0,
|
|
1500
|
+
hideFromUI: !0
|
|
1501
|
+
}, {
|
|
1502
|
+
name: "inheritState",
|
|
1503
|
+
helperText: "Inherit the parent component state and data",
|
|
1504
|
+
type: "boolean",
|
|
1505
|
+
defaultValue: !1,
|
|
1506
|
+
advanced: !0
|
|
1507
|
+
}, {
|
|
1508
|
+
name: "renderToLiquid",
|
|
1509
|
+
helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
|
|
1510
|
+
type: "boolean",
|
|
1511
|
+
defaultValue: !1,
|
|
1512
|
+
advanced: !0,
|
|
1513
|
+
hideFromUI: !0
|
|
1514
|
+
}, {
|
|
1515
|
+
name: "useChildren",
|
|
1516
|
+
hideFromUI: !0,
|
|
1517
|
+
type: "boolean"
|
|
1518
|
+
}]
|
|
1519
|
+
}, Ct = {
|
|
1520
|
+
name: "Text",
|
|
1521
|
+
static: !0,
|
|
1522
|
+
isRSC: !0,
|
|
1523
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
1524
|
+
inputs: [{
|
|
1525
|
+
name: "text",
|
|
1526
|
+
type: "html",
|
|
1527
|
+
required: !0,
|
|
1528
|
+
autoFocus: !0,
|
|
1529
|
+
bubble: !0,
|
|
1530
|
+
defaultValue: "Enter some text..."
|
|
1531
|
+
}],
|
|
1532
|
+
defaultStyles: {
|
|
1533
|
+
lineHeight: "normal",
|
|
1534
|
+
height: "auto",
|
|
1535
|
+
textAlign: "center"
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
function wt(e) {
|
|
1539
|
+
var t;
|
|
1540
|
+
return /* @__PURE__ */ l(
|
|
1541
|
+
"span",
|
|
1542
|
+
{
|
|
1543
|
+
className: "builder-text",
|
|
1544
|
+
dangerouslySetInnerHTML: { __html: ((t = e.text) == null ? void 0 : t.toString()) || "" },
|
|
1545
|
+
style: {
|
|
1546
|
+
outline: "none"
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
);
|
|
1550
|
+
}
|
|
1551
|
+
const It = {
|
|
1552
|
+
name: "Video",
|
|
1553
|
+
canHaveChildren: !0,
|
|
1554
|
+
defaultStyles: {
|
|
1555
|
+
minHeight: "20px",
|
|
1556
|
+
minWidth: "20px"
|
|
1557
|
+
},
|
|
1558
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
|
|
1559
|
+
inputs: [{
|
|
1560
|
+
name: "video",
|
|
1561
|
+
type: "file",
|
|
1562
|
+
allowedFileTypes: ["mp4"],
|
|
1563
|
+
bubble: !0,
|
|
1564
|
+
defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
|
|
1565
|
+
required: !0
|
|
1566
|
+
}, {
|
|
1567
|
+
name: "posterImage",
|
|
1568
|
+
type: "file",
|
|
1569
|
+
allowedFileTypes: ["jpeg", "png"],
|
|
1570
|
+
helperText: "Image to show before the video plays"
|
|
1571
|
+
}, {
|
|
1572
|
+
name: "autoPlay",
|
|
1573
|
+
type: "boolean",
|
|
1574
|
+
defaultValue: !0
|
|
1575
|
+
}, {
|
|
1576
|
+
name: "controls",
|
|
1577
|
+
type: "boolean",
|
|
1578
|
+
defaultValue: !1
|
|
1579
|
+
}, {
|
|
1580
|
+
name: "muted",
|
|
1581
|
+
type: "boolean",
|
|
1582
|
+
defaultValue: !0
|
|
1583
|
+
}, {
|
|
1584
|
+
name: "loop",
|
|
1585
|
+
type: "boolean",
|
|
1586
|
+
defaultValue: !0
|
|
1587
|
+
}, {
|
|
1588
|
+
name: "playsInline",
|
|
1589
|
+
type: "boolean",
|
|
1590
|
+
defaultValue: !0
|
|
1591
|
+
}, {
|
|
1592
|
+
name: "fit",
|
|
1593
|
+
type: "text",
|
|
1594
|
+
defaultValue: "cover",
|
|
1595
|
+
enum: ["contain", "cover", "fill", "auto"]
|
|
1596
|
+
}, {
|
|
1597
|
+
name: "preload",
|
|
1598
|
+
type: "text",
|
|
1599
|
+
defaultValue: "metadata",
|
|
1600
|
+
enum: ["auto", "metadata", "none"]
|
|
1601
|
+
}, {
|
|
1602
|
+
name: "fitContent",
|
|
1603
|
+
type: "boolean",
|
|
1604
|
+
helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
|
|
1605
|
+
defaultValue: !0,
|
|
1606
|
+
advanced: !0
|
|
1607
|
+
}, {
|
|
1608
|
+
name: "position",
|
|
1609
|
+
type: "text",
|
|
1610
|
+
defaultValue: "center",
|
|
1611
|
+
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
1612
|
+
}, {
|
|
1613
|
+
name: "height",
|
|
1614
|
+
type: "number",
|
|
1615
|
+
advanced: !0
|
|
1616
|
+
}, {
|
|
1617
|
+
name: "width",
|
|
1618
|
+
type: "number",
|
|
1619
|
+
advanced: !0
|
|
1620
|
+
}, {
|
|
1621
|
+
name: "aspectRatio",
|
|
1622
|
+
type: "number",
|
|
1623
|
+
advanced: !0,
|
|
1624
|
+
defaultValue: 0.7004048582995948
|
|
1625
|
+
}, {
|
|
1626
|
+
name: "lazyLoad",
|
|
1627
|
+
type: "boolean",
|
|
1628
|
+
helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
|
|
1629
|
+
defaultValue: !0,
|
|
1630
|
+
advanced: !0
|
|
1631
|
+
}]
|
|
1632
|
+
};
|
|
1633
|
+
function Tt(e) {
|
|
1634
|
+
var i;
|
|
1635
|
+
function t() {
|
|
1636
|
+
return {
|
|
1637
|
+
...e.autoPlay === !0 ? {
|
|
1638
|
+
autoPlay: !0
|
|
1639
|
+
} : {},
|
|
1640
|
+
...e.muted === !0 ? {
|
|
1641
|
+
muted: !0
|
|
1642
|
+
} : {},
|
|
1643
|
+
...e.controls === !0 ? {
|
|
1644
|
+
controls: !0
|
|
1645
|
+
} : {},
|
|
1646
|
+
...e.loop === !0 ? {
|
|
1647
|
+
loop: !0
|
|
1648
|
+
} : {},
|
|
1649
|
+
...e.playsInline === !0 ? {
|
|
1650
|
+
playsInline: !0
|
|
1651
|
+
} : {}
|
|
1652
|
+
};
|
|
1653
|
+
}
|
|
1654
|
+
function n() {
|
|
1655
|
+
return {
|
|
1656
|
+
...e.attributes,
|
|
1657
|
+
...t()
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
return /* @__PURE__ */ l(
|
|
1661
|
+
"video",
|
|
1662
|
+
{
|
|
1663
|
+
...n(),
|
|
1664
|
+
preload: e.preload || "metadata",
|
|
1665
|
+
style: {
|
|
1666
|
+
width: "100%",
|
|
1667
|
+
height: "100%",
|
|
1668
|
+
...(i = e.attributes) == null ? void 0 : i.style,
|
|
1669
|
+
objectFit: e.fit,
|
|
1670
|
+
objectPosition: e.position,
|
|
1671
|
+
// Hack to get object fit to work as expected and
|
|
1672
|
+
// not have the video overflow
|
|
1673
|
+
borderRadius: 1
|
|
1674
|
+
},
|
|
1675
|
+
src: e.video || "no-src",
|
|
1676
|
+
poster: e.posterImage
|
|
1677
|
+
}
|
|
1678
|
+
);
|
|
1679
|
+
}
|
|
1680
|
+
const Rt = {
|
|
1681
|
+
name: "Embed",
|
|
1682
|
+
static: !0,
|
|
1683
|
+
inputs: [{
|
|
1684
|
+
name: "url",
|
|
1685
|
+
type: "url",
|
|
1686
|
+
required: !0,
|
|
1687
|
+
defaultValue: "",
|
|
1688
|
+
helperText: "e.g. enter a youtube url, google map, etc",
|
|
1689
|
+
onChange: (e) => {
|
|
1690
|
+
const t = e.get("url");
|
|
1691
|
+
if (t)
|
|
1692
|
+
return e.set("content", "Loading..."), fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then((i) => i.json()).then((i) => {
|
|
1693
|
+
e.get("url") === t && (i.html ? e.set("content", i.html) : e.set("content", "Invalid url, please try another"));
|
|
1694
|
+
}).catch((i) => {
|
|
1695
|
+
e.set("content", "There was an error embedding this URL, please try again or another URL");
|
|
1696
|
+
});
|
|
1697
|
+
e.delete("content");
|
|
1698
|
+
}
|
|
1699
|
+
}, {
|
|
1700
|
+
name: "content",
|
|
1701
|
+
type: "html",
|
|
1702
|
+
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1703
|
+
hideFromUI: !0
|
|
1704
|
+
}]
|
|
1705
|
+
}, Et = ["text/javascript", "application/javascript", "application/ecmascript"], $t = (e) => Et.includes(e.type);
|
|
1706
|
+
function Pt(e) {
|
|
1707
|
+
const t = X(null), [n, i] = k(() => []), [a, o] = k(() => []), [r, d] = k(() => !1);
|
|
1708
|
+
function c() {
|
|
1709
|
+
if (!t.current || !t.current.getElementsByTagName)
|
|
1710
|
+
return;
|
|
1711
|
+
const s = t.current.getElementsByTagName("script");
|
|
1712
|
+
for (let u = 0; u < s.length; u++) {
|
|
1713
|
+
const m = s[u];
|
|
1714
|
+
if (m.src && !n.includes(m.src)) {
|
|
1715
|
+
n.push(m.src);
|
|
1716
|
+
const y = document.createElement("script");
|
|
1717
|
+
y.async = !0, y.src = m.src, document.head.appendChild(y);
|
|
1718
|
+
} else if ($t(m) && !a.includes(m.innerText))
|
|
1719
|
+
try {
|
|
1720
|
+
a.push(m.innerText), new Function(m.innerText)();
|
|
1721
|
+
} catch (y) {
|
|
1722
|
+
console.warn("`Embed`: Error running script:", y);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
return P(() => {
|
|
1727
|
+
t.current && !r && (d(!0), c());
|
|
1728
|
+
}, [t.current, r]), /* @__PURE__ */ l(
|
|
1729
|
+
"div",
|
|
1730
|
+
{
|
|
1731
|
+
className: "builder-embed",
|
|
1732
|
+
ref: t,
|
|
1733
|
+
dangerouslySetInnerHTML: { __html: e.content }
|
|
1734
|
+
}
|
|
1735
|
+
);
|
|
1736
|
+
}
|
|
1737
|
+
function At(e) {
|
|
1738
|
+
return /* @__PURE__ */ l(
|
|
1739
|
+
"img",
|
|
1740
|
+
{
|
|
1741
|
+
style: {
|
|
1742
|
+
objectFit: e.backgroundSize || "cover",
|
|
1743
|
+
objectPosition: e.backgroundPosition || "center"
|
|
1744
|
+
},
|
|
1745
|
+
alt: e.altText,
|
|
1746
|
+
src: e.imgSrc || e.image,
|
|
1747
|
+
...e.attributes
|
|
1748
|
+
},
|
|
1749
|
+
V() && e.imgSrc || "default-key"
|
|
1750
|
+
);
|
|
1751
|
+
}
|
|
1752
|
+
const Bt = {
|
|
1753
|
+
// friendlyName?
|
|
1754
|
+
name: "Raw:Img",
|
|
1755
|
+
hideFromInsertMenu: !0,
|
|
1756
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
1757
|
+
inputs: [{
|
|
1758
|
+
name: "image",
|
|
1759
|
+
bubble: !0,
|
|
1760
|
+
type: "file",
|
|
1761
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg", "gif", "webp"],
|
|
1762
|
+
required: !0
|
|
1763
|
+
}],
|
|
1764
|
+
noWrap: !0,
|
|
1765
|
+
static: !0
|
|
1766
|
+
};
|
|
1767
|
+
function Vt(e) {
|
|
1768
|
+
const t = X(null), [n, i] = k(() => []), [a, o] = k(() => []);
|
|
1769
|
+
function r() {
|
|
1770
|
+
if (t.current && t.current.getElementsByTagName && typeof window < "u") {
|
|
1771
|
+
const d = t.current.getElementsByTagName("script");
|
|
1772
|
+
for (let c = 0; c < d.length; c++) {
|
|
1773
|
+
const s = d[c];
|
|
1774
|
+
if (s.src) {
|
|
1775
|
+
if (n.includes(s.src))
|
|
1776
|
+
continue;
|
|
1777
|
+
n.push(s.src);
|
|
1778
|
+
const u = document.createElement("script");
|
|
1779
|
+
u.async = !0, u.src = s.src, document.head.appendChild(u);
|
|
1780
|
+
} else if (!s.type || [
|
|
1781
|
+
"text/javascript",
|
|
1782
|
+
"application/javascript",
|
|
1783
|
+
"application/ecmascript"
|
|
1784
|
+
].includes(s.type)) {
|
|
1785
|
+
if (a.includes(s.innerText))
|
|
1786
|
+
continue;
|
|
1787
|
+
try {
|
|
1788
|
+
a.push(s.innerText), new Function(s.innerText)();
|
|
1789
|
+
} catch (u) {
|
|
1790
|
+
console.warn("`CustomCode`: Error running script:", u);
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
return P(() => {
|
|
1797
|
+
r();
|
|
1798
|
+
}, []), /* @__PURE__ */ l(
|
|
1799
|
+
"div",
|
|
1800
|
+
{
|
|
1801
|
+
ref: t,
|
|
1802
|
+
className: "builder-custom-code" + (e.replaceNodes ? " replace-nodes" : ""),
|
|
1803
|
+
dangerouslySetInnerHTML: { __html: e.code }
|
|
1804
|
+
}
|
|
1805
|
+
);
|
|
1806
|
+
}
|
|
1807
|
+
const Ft = {
|
|
1808
|
+
name: "Custom Code",
|
|
1809
|
+
static: !0,
|
|
1810
|
+
requiredPermissions: ["editCode"],
|
|
1811
|
+
inputs: [{
|
|
1812
|
+
name: "code",
|
|
1813
|
+
type: "html",
|
|
1814
|
+
required: !0,
|
|
1815
|
+
defaultValue: "<p>Hello there, I am custom HTML code!</p>",
|
|
1816
|
+
code: !0
|
|
1817
|
+
}, {
|
|
1818
|
+
name: "replaceNodes",
|
|
1819
|
+
type: "boolean",
|
|
1820
|
+
helperText: "Preserve server rendered dom nodes",
|
|
1821
|
+
advanced: !0
|
|
1822
|
+
}, {
|
|
1823
|
+
name: "scriptsClientOnly",
|
|
1824
|
+
type: "boolean",
|
|
1825
|
+
defaultValue: !1,
|
|
1826
|
+
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1827
|
+
advanced: !0
|
|
1828
|
+
}]
|
|
1829
|
+
}, fe = () => [{
|
|
1830
|
+
component: We,
|
|
1831
|
+
...xt
|
|
1832
|
+
}, {
|
|
1833
|
+
component: at,
|
|
1834
|
+
...yt
|
|
1835
|
+
}, {
|
|
1836
|
+
component: Vt,
|
|
1837
|
+
...Ft
|
|
1838
|
+
}, {
|
|
1839
|
+
component: Pt,
|
|
1840
|
+
...Rt
|
|
1841
|
+
}, {
|
|
1842
|
+
component: ot,
|
|
1843
|
+
...St
|
|
1844
|
+
}, {
|
|
1845
|
+
component: ct,
|
|
1846
|
+
...vt
|
|
1847
|
+
}, {
|
|
1848
|
+
component: At,
|
|
1849
|
+
...Bt
|
|
1850
|
+
}, {
|
|
1851
|
+
component: st,
|
|
1852
|
+
...pt
|
|
1853
|
+
}, {
|
|
1854
|
+
component: Yt,
|
|
1855
|
+
...kt
|
|
1856
|
+
}, {
|
|
1857
|
+
component: wt,
|
|
1858
|
+
...Ct
|
|
1859
|
+
}, {
|
|
1860
|
+
component: Tt,
|
|
1861
|
+
...It
|
|
1862
|
+
}], Nt = (e) => {
|
|
1863
|
+
var o;
|
|
1864
|
+
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], i = e.fileUrl ?? ((o = e == null ? void 0 : e.files) == null ? void 0 : o.regular);
|
|
1865
|
+
let a = "";
|
|
1866
|
+
if (i && t && n && (a += `
|
|
1867
|
+
@font-face {
|
|
1868
|
+
font-family: "${t}";
|
|
1869
|
+
src: local("${n}"), url('${i}') format('woff2');
|
|
1870
|
+
font-display: fallback;
|
|
1871
|
+
font-weight: 400;
|
|
1872
|
+
}
|
|
1873
|
+
`.trim()), e.files)
|
|
1874
|
+
for (const r in e.files) {
|
|
1875
|
+
if (!(String(Number(r)) === r))
|
|
1876
|
+
continue;
|
|
1877
|
+
const c = e.files[r];
|
|
1878
|
+
c && c !== i && (a += `
|
|
1879
|
+
@font-face {
|
|
1880
|
+
font-family: "${t}";
|
|
1881
|
+
src: url('${c}') format('woff2');
|
|
1882
|
+
font-display: fallback;
|
|
1883
|
+
font-weight: ${r};
|
|
1884
|
+
}
|
|
1885
|
+
`.trim());
|
|
1886
|
+
}
|
|
1887
|
+
return a;
|
|
1888
|
+
}, Wt = ({
|
|
1889
|
+
customFonts: e
|
|
1890
|
+
}) => {
|
|
1891
|
+
var t;
|
|
1892
|
+
return ((t = e == null ? void 0 : e.map((n) => Nt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1893
|
+
}, jt = ({
|
|
1894
|
+
cssCode: e,
|
|
1895
|
+
contentId: t
|
|
1896
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "";
|
|
1897
|
+
function Mt(e) {
|
|
1898
|
+
const [t, n] = k(
|
|
1899
|
+
() => `
|
|
1900
|
+
${jt({
|
|
1901
|
+
cssCode: e.cssCode,
|
|
1902
|
+
contentId: e.contentId
|
|
1903
|
+
})}
|
|
1904
|
+
${Wt({
|
|
1905
|
+
customFonts: e.customFonts
|
|
1906
|
+
})}
|
|
1907
|
+
|
|
1908
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
1909
|
+
margin: 0;
|
|
1910
|
+
}
|
|
1911
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
1912
|
+
color: inherit;
|
|
1913
|
+
line-height: inherit;
|
|
1914
|
+
letter-spacing: inherit;
|
|
1915
|
+
font-weight: inherit;
|
|
1916
|
+
font-size: inherit;
|
|
1917
|
+
text-align: inherit;
|
|
1918
|
+
font-family: inherit;
|
|
1919
|
+
}
|
|
1920
|
+
`.trim()
|
|
1921
|
+
);
|
|
1922
|
+
return /* @__PURE__ */ l(H, { styles: t });
|
|
1923
|
+
}
|
|
1924
|
+
const Ut = ({
|
|
1925
|
+
content: e,
|
|
1926
|
+
data: t,
|
|
1927
|
+
locale: n
|
|
1928
|
+
}) => {
|
|
1929
|
+
var o, r, d;
|
|
1930
|
+
const i = {};
|
|
1931
|
+
(r = (o = e == null ? void 0 : e.data) == null ? void 0 : o.inputs) == null || r.forEach((c) => {
|
|
1932
|
+
var s;
|
|
1933
|
+
c.name && c.defaultValue !== void 0 && ((s = e == null ? void 0 : e.data) != null && s.state) && e.data.state[c.name] === void 0 && (i[c.name] = c.defaultValue);
|
|
1934
|
+
});
|
|
1935
|
+
const a = {
|
|
1936
|
+
...(d = e == null ? void 0 : e.data) == null ? void 0 : d.state,
|
|
1937
|
+
...t,
|
|
1938
|
+
...n ? {
|
|
1939
|
+
locale: n
|
|
1940
|
+
} : {}
|
|
1941
|
+
};
|
|
1942
|
+
return {
|
|
1943
|
+
...i,
|
|
1944
|
+
...a
|
|
1945
|
+
};
|
|
1946
|
+
}, Lt = ({
|
|
1947
|
+
content: e,
|
|
1948
|
+
data: t
|
|
1949
|
+
}) => e ? {
|
|
1950
|
+
...e,
|
|
1951
|
+
data: {
|
|
1952
|
+
...e == null ? void 0 : e.data,
|
|
1953
|
+
...t
|
|
1954
|
+
},
|
|
1955
|
+
meta: e == null ? void 0 : e.meta
|
|
1956
|
+
} : void 0, _t = "0.6.0", Kt = () => {
|
|
1957
|
+
Ae("insertMenu", {
|
|
1958
|
+
name: "_default",
|
|
1959
|
+
default: !0,
|
|
1960
|
+
items: [{
|
|
1961
|
+
name: "Box"
|
|
1962
|
+
}, {
|
|
1963
|
+
name: "Text"
|
|
1964
|
+
}, {
|
|
1965
|
+
name: "Image"
|
|
1966
|
+
}, {
|
|
1967
|
+
name: "Columns"
|
|
1968
|
+
}, {
|
|
1969
|
+
name: "Core:Section"
|
|
1970
|
+
}, {
|
|
1971
|
+
name: "Core:Button"
|
|
1972
|
+
}, {
|
|
1973
|
+
name: "Embed"
|
|
1974
|
+
}, {
|
|
1975
|
+
name: "Custom Code"
|
|
1976
|
+
}]
|
|
1977
|
+
});
|
|
1978
|
+
};
|
|
1979
|
+
let he = !1;
|
|
1980
|
+
const Ot = (e = {}) => {
|
|
1981
|
+
var t, n;
|
|
1982
|
+
he || (he = !0, F() && ((t = window.parent) == null || t.postMessage({
|
|
1983
|
+
type: "builder.sdkInfo",
|
|
1984
|
+
data: {
|
|
1985
|
+
target: U,
|
|
1986
|
+
version: _t,
|
|
1987
|
+
supportsPatchUpdates: !1,
|
|
1988
|
+
// Supports builder-model="..." attribute which is needed to
|
|
1989
|
+
// scope our '+ add block' button styling
|
|
1990
|
+
supportsAddBlockScoping: !0,
|
|
1991
|
+
supportsCustomBreakpoints: !0
|
|
1992
|
+
}
|
|
1993
|
+
}, "*"), (n = window.parent) == null || n.postMessage({
|
|
1994
|
+
type: "builder.updateContent",
|
|
1995
|
+
data: {
|
|
1996
|
+
options: e
|
|
1997
|
+
}
|
|
1998
|
+
}, "*"), window.addEventListener("message", ({
|
|
1999
|
+
data: i
|
|
2000
|
+
}) => {
|
|
2001
|
+
var a, o;
|
|
2002
|
+
if (i != null && i.type)
|
|
2003
|
+
switch (i.type) {
|
|
2004
|
+
case "builder.evaluate": {
|
|
2005
|
+
const r = i.data.text, d = i.data.arguments || [], c = i.data.id, s = new Function(r);
|
|
2006
|
+
let u, m = null;
|
|
2007
|
+
try {
|
|
2008
|
+
u = s.apply(null, d);
|
|
2009
|
+
} catch (y) {
|
|
2010
|
+
m = y;
|
|
2011
|
+
}
|
|
2012
|
+
m ? (a = window.parent) == null || a.postMessage({
|
|
2013
|
+
type: "builder.evaluateError",
|
|
2014
|
+
data: {
|
|
2015
|
+
id: c,
|
|
2016
|
+
error: m.message
|
|
2017
|
+
}
|
|
2018
|
+
}, "*") : u && typeof u.then == "function" ? u.then((y) => {
|
|
2019
|
+
var p;
|
|
2020
|
+
(p = window.parent) == null || p.postMessage({
|
|
2021
|
+
type: "builder.evaluateResult",
|
|
2022
|
+
data: {
|
|
2023
|
+
id: c,
|
|
2024
|
+
result: y
|
|
2025
|
+
}
|
|
2026
|
+
}, "*");
|
|
2027
|
+
}).catch(console.error) : (o = window.parent) == null || o.postMessage({
|
|
2028
|
+
type: "builder.evaluateResult",
|
|
2029
|
+
data: {
|
|
2030
|
+
result: u,
|
|
2031
|
+
id: c
|
|
2032
|
+
}
|
|
2033
|
+
}, "*");
|
|
2034
|
+
break;
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
})));
|
|
2038
|
+
};
|
|
2039
|
+
function ge(e) {
|
|
2040
|
+
return Math.round(e * 1e3) / 1e3;
|
|
2041
|
+
}
|
|
2042
|
+
const Ht = (e, t, n = !0) => {
|
|
2043
|
+
if (!(e instanceof HTMLElement))
|
|
2044
|
+
return null;
|
|
2045
|
+
let i = n ? e : e.parentElement;
|
|
2046
|
+
do {
|
|
2047
|
+
if (!i)
|
|
2048
|
+
return null;
|
|
2049
|
+
if (t(i))
|
|
2050
|
+
return i;
|
|
2051
|
+
} while (i = i.parentElement);
|
|
2052
|
+
return null;
|
|
2053
|
+
}, zt = (e) => Ht(e, (t) => {
|
|
2054
|
+
const n = t.getAttribute("builder-id") || t.id;
|
|
2055
|
+
return (n == null ? void 0 : n.indexOf("builder-")) === 0;
|
|
2056
|
+
}), be = ({
|
|
2057
|
+
event: e,
|
|
2058
|
+
target: t
|
|
2059
|
+
}) => {
|
|
2060
|
+
const n = t.getBoundingClientRect(), i = e.clientX - n.left, a = e.clientY - n.top, o = ge(i / n.width), r = ge(a / n.height);
|
|
2061
|
+
return {
|
|
2062
|
+
x: o,
|
|
2063
|
+
y: r
|
|
2064
|
+
};
|
|
2065
|
+
}, qt = (e) => {
|
|
2066
|
+
const t = e.target, n = t && zt(t), i = (n == null ? void 0 : n.getAttribute("builder-id")) || (n == null ? void 0 : n.id);
|
|
2067
|
+
return {
|
|
2068
|
+
targetBuilderElement: i || void 0,
|
|
2069
|
+
metadata: {
|
|
2070
|
+
targetOffset: t ? be({
|
|
2071
|
+
event: e,
|
|
2072
|
+
target: t
|
|
2073
|
+
}) : void 0,
|
|
2074
|
+
builderTargetOffset: n ? be({
|
|
2075
|
+
event: e,
|
|
2076
|
+
target: n
|
|
2077
|
+
}) : void 0,
|
|
2078
|
+
builderElementIndex: n && i ? [].slice.call(document.getElementsByClassName(i)).indexOf(n) : void 0
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
};
|
|
2082
|
+
function Dt(e) {
|
|
2083
|
+
var A, B, N, W, q;
|
|
2084
|
+
const t = X(null), [n, i] = k(
|
|
2085
|
+
() => K(e.canTrack) ? e.canTrack : !0
|
|
2086
|
+
), [a, o] = k(() => 0);
|
|
2087
|
+
function r(S) {
|
|
2088
|
+
var b, v, I, $, j;
|
|
2089
|
+
const w = {
|
|
2090
|
+
...e.builderContextSignal.content,
|
|
2091
|
+
...S,
|
|
2092
|
+
data: {
|
|
2093
|
+
...(b = e.builderContextSignal.content) == null ? void 0 : b.data,
|
|
2094
|
+
...S == null ? void 0 : S.data
|
|
2095
|
+
},
|
|
2096
|
+
meta: {
|
|
2097
|
+
...(v = e.builderContextSignal.content) == null ? void 0 : v.meta,
|
|
2098
|
+
...S == null ? void 0 : S.meta,
|
|
2099
|
+
breakpoints: ((I = S == null ? void 0 : S.meta) == null ? void 0 : I.breakpoints) || ((j = ($ = e.builderContextSignal.content) == null ? void 0 : $.meta) == null ? void 0 : j.breakpoints)
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
e.setBuilderContextSignal((Ee) => ({
|
|
2103
|
+
...Ee,
|
|
2104
|
+
content: w
|
|
2105
|
+
}));
|
|
2106
|
+
}
|
|
2107
|
+
k(() => 0);
|
|
2108
|
+
const [d, c] = k(
|
|
2109
|
+
() => !1
|
|
2110
|
+
);
|
|
2111
|
+
function s(S) {
|
|
2112
|
+
var b;
|
|
2113
|
+
const { data: w } = S;
|
|
2114
|
+
if (w)
|
|
2115
|
+
switch (w.type) {
|
|
2116
|
+
case "builder.configureSdk": {
|
|
2117
|
+
const v = w.data, { breakpoints: I, contentId: $ } = v;
|
|
2118
|
+
if (!$ || $ !== ((b = e.builderContextSignal.content) == null ? void 0 : b.id))
|
|
2119
|
+
return;
|
|
2120
|
+
I && r({
|
|
2121
|
+
meta: {
|
|
2122
|
+
breakpoints: I
|
|
2123
|
+
}
|
|
2124
|
+
}), o(a + 1);
|
|
2125
|
+
break;
|
|
2126
|
+
}
|
|
2127
|
+
case "builder.contentUpdate": {
|
|
2128
|
+
const v = w.data, I = v.key || v.alias || v.entry || v.modelName, $ = v.data;
|
|
2129
|
+
I === e.model && (r($), o(a + 1));
|
|
2130
|
+
break;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
function u() {
|
|
2135
|
+
var w, b;
|
|
2136
|
+
const S = (b = (w = e.builderContextSignal.content) == null ? void 0 : w.data) == null ? void 0 : b.jsCode;
|
|
2137
|
+
S && M({
|
|
2138
|
+
code: S,
|
|
2139
|
+
context: e.context || {},
|
|
2140
|
+
localState: void 0,
|
|
2141
|
+
rootState: e.builderContextSignal.rootState,
|
|
2142
|
+
rootSetState: e.builderContextSignal.rootSetState
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
const [m, y] = k(() => ({})), [p, x] = k(() => !1);
|
|
2146
|
+
function h(S) {
|
|
2147
|
+
var w, b;
|
|
2148
|
+
if (e.builderContextSignal.content) {
|
|
2149
|
+
const v = (w = e.builderContextSignal.content) == null ? void 0 : w.testVariationId, I = (b = e.builderContextSignal.content) == null ? void 0 : b.id;
|
|
2150
|
+
oe({
|
|
2151
|
+
type: "click",
|
|
2152
|
+
canTrack: n,
|
|
2153
|
+
contentId: I,
|
|
2154
|
+
apiKey: e.apiKey,
|
|
2155
|
+
variationId: v !== I ? v : void 0,
|
|
2156
|
+
...qt(S),
|
|
2157
|
+
unique: !p
|
|
2158
|
+
});
|
|
2159
|
+
}
|
|
2160
|
+
p || x(!0);
|
|
2161
|
+
}
|
|
2162
|
+
function C(S) {
|
|
2163
|
+
return S.replace(
|
|
2164
|
+
/{{([^}]+)}}/g,
|
|
2165
|
+
(w, b) => M({
|
|
2166
|
+
code: b,
|
|
2167
|
+
context: e.context || {},
|
|
2168
|
+
localState: void 0,
|
|
2169
|
+
rootState: e.builderContextSignal.rootState,
|
|
2170
|
+
rootSetState: e.builderContextSignal.rootSetState
|
|
2171
|
+
})
|
|
2172
|
+
);
|
|
2173
|
+
}
|
|
2174
|
+
function T({ url: S, key: w }) {
|
|
2175
|
+
Fe(S).then((b) => b.json()).then((b) => {
|
|
2176
|
+
var I, $;
|
|
2177
|
+
const v = {
|
|
2178
|
+
...e.builderContextSignal.rootState,
|
|
2179
|
+
[w]: b
|
|
2180
|
+
};
|
|
2181
|
+
($ = (I = e.builderContextSignal).rootSetState) == null || $.call(I, v), m[w] = !0;
|
|
2182
|
+
}).catch((b) => {
|
|
2183
|
+
console.error("error fetching dynamic data", S, b);
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
function g() {
|
|
2187
|
+
var w, b;
|
|
2188
|
+
const S = ((b = (w = e.builderContextSignal.content) == null ? void 0 : w.data) == null ? void 0 : b.httpRequests) ?? {};
|
|
2189
|
+
Object.entries(S).forEach(([v, I]) => {
|
|
2190
|
+
if (I && (!m[v] || V())) {
|
|
2191
|
+
const $ = C(I);
|
|
2192
|
+
T({
|
|
2193
|
+
url: $,
|
|
2194
|
+
key: v
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
function R() {
|
|
2200
|
+
V() && window.dispatchEvent(
|
|
2201
|
+
new CustomEvent(
|
|
2202
|
+
"builder:component:stateChange",
|
|
2203
|
+
{
|
|
2204
|
+
detail: {
|
|
2205
|
+
state: Z(e.builderContextSignal.rootState),
|
|
2206
|
+
ref: {
|
|
2207
|
+
name: e.model
|
|
2208
|
+
}
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
)
|
|
2212
|
+
);
|
|
2213
|
+
}
|
|
2214
|
+
return P(() => {
|
|
2215
|
+
var S, w;
|
|
2216
|
+
if (e.apiKey || _.error(
|
|
2217
|
+
"No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
|
|
2218
|
+
), F()) {
|
|
2219
|
+
if (V() && (o(a + 1), window.addEventListener("message", s), Kt(), Ot({
|
|
2220
|
+
...e.locale ? {
|
|
2221
|
+
locale: e.locale
|
|
2222
|
+
} : {},
|
|
2223
|
+
...e.includeRefs ? {
|
|
2224
|
+
includeRefs: e.includeRefs
|
|
2225
|
+
} : {},
|
|
2226
|
+
...e.enrich ? {
|
|
2227
|
+
enrich: e.enrich
|
|
2228
|
+
} : {}
|
|
2229
|
+
}), Object.values(
|
|
2230
|
+
e.builderContextSignal.componentInfos
|
|
2231
|
+
).forEach((b) => {
|
|
2232
|
+
var I;
|
|
2233
|
+
const v = Be(b);
|
|
2234
|
+
(I = window.parent) == null || I.postMessage(v, "*");
|
|
2235
|
+
}), window.addEventListener(
|
|
2236
|
+
"builder:component:stateChangeListenerActivated",
|
|
2237
|
+
R
|
|
2238
|
+
)), e.builderContextSignal.content) {
|
|
2239
|
+
const b = (S = e.builderContextSignal.content) == null ? void 0 : S.testVariationId, v = (w = e.builderContextSignal.content) == null ? void 0 : w.id;
|
|
2240
|
+
oe({
|
|
2241
|
+
type: "impression",
|
|
2242
|
+
canTrack: n,
|
|
2243
|
+
contentId: v,
|
|
2244
|
+
apiKey: e.apiKey,
|
|
2245
|
+
variationId: b !== v ? b : void 0
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
if (Ve()) {
|
|
2249
|
+
const b = new URL(location.href).searchParams, v = b.get("builder.preview"), I = b.get(
|
|
2250
|
+
`builder.preview.${v}`
|
|
2251
|
+
), $ = b.get("apiKey") || b.get("builder.space");
|
|
2252
|
+
v === e.model && $ === e.apiKey && (!e.content || I === e.content.id) && Se({
|
|
2253
|
+
model: e.model,
|
|
2254
|
+
apiKey: e.apiKey,
|
|
2255
|
+
apiVersion: e.builderContextSignal.apiVersion
|
|
2256
|
+
}).then((j) => {
|
|
2257
|
+
j && r(j);
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
u(), g(), R();
|
|
2261
|
+
}
|
|
2262
|
+
}, []), P(() => {
|
|
2263
|
+
e.content && r(e.content);
|
|
2264
|
+
}, [e.content]), P(() => {
|
|
2265
|
+
}, [d]), P(() => {
|
|
2266
|
+
u();
|
|
2267
|
+
}, [
|
|
2268
|
+
(B = (A = e.builderContextSignal.content) == null ? void 0 : A.data) == null ? void 0 : B.jsCode,
|
|
2269
|
+
e.builderContextSignal.rootState
|
|
2270
|
+
]), P(() => {
|
|
2271
|
+
g();
|
|
2272
|
+
}, [(W = (N = e.builderContextSignal.content) == null ? void 0 : N.data) == null ? void 0 : W.httpRequests]), P(() => {
|
|
2273
|
+
R();
|
|
2274
|
+
}, [e.builderContextSignal.rootState]), P(() => () => {
|
|
2275
|
+
F() && (window.removeEventListener("message", s), window.removeEventListener(
|
|
2276
|
+
"builder:component:stateChangeListenerActivated",
|
|
2277
|
+
R
|
|
2278
|
+
));
|
|
2279
|
+
}, []), /* @__PURE__ */ l(ne.Provider, { value: e.builderContextSignal, children: e.builderContextSignal.content ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
2280
|
+
"div",
|
|
2281
|
+
{
|
|
2282
|
+
ref: t,
|
|
2283
|
+
onClick: (S) => h(S),
|
|
2284
|
+
"builder-content-id": (q = e.builderContextSignal.content) == null ? void 0 : q.id,
|
|
2285
|
+
"builder-model": e.model,
|
|
2286
|
+
...e.showContent ? {} : {
|
|
2287
|
+
hidden: !0,
|
|
2288
|
+
"aria-hidden": !0
|
|
2289
|
+
},
|
|
2290
|
+
className: e.classNameProp,
|
|
2291
|
+
children: e.children
|
|
2292
|
+
},
|
|
2293
|
+
a
|
|
2294
|
+
) }) : null });
|
|
2295
|
+
}
|
|
2296
|
+
function Q(e) {
|
|
2297
|
+
return /* @__PURE__ */ l(
|
|
2298
|
+
"script",
|
|
2299
|
+
{
|
|
2300
|
+
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
2301
|
+
id: e.id
|
|
2302
|
+
}
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
function xe(e) {
|
|
2306
|
+
var c, s, u, m, y, p, x;
|
|
2307
|
+
const [t, n] = k(
|
|
2308
|
+
() => {
|
|
2309
|
+
var h, C;
|
|
2310
|
+
return bt({
|
|
2311
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2312
|
+
variationId: (h = e.content) == null ? void 0 : h.testVariationId,
|
|
2313
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2314
|
+
contentId: (C = e.content) == null ? void 0 : C.id
|
|
2315
|
+
});
|
|
2316
|
+
}
|
|
2317
|
+
);
|
|
2318
|
+
function i(h) {
|
|
2319
|
+
d((C) => ({
|
|
2320
|
+
...C,
|
|
2321
|
+
rootState: h
|
|
2322
|
+
}));
|
|
2323
|
+
}
|
|
2324
|
+
const [a, o] = k(
|
|
2325
|
+
() => [
|
|
2326
|
+
...fe(),
|
|
2327
|
+
// While this `components` object is deprecated, we must maintain support for it.
|
|
2328
|
+
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2329
|
+
// existing usage.
|
|
2330
|
+
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2331
|
+
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2332
|
+
...re,
|
|
2333
|
+
...e.customComponents || []
|
|
2334
|
+
].reduce(
|
|
2335
|
+
(h, { component: C, ...T }) => ({
|
|
2336
|
+
...h,
|
|
2337
|
+
[T.name]: {
|
|
2338
|
+
component: C,
|
|
2339
|
+
...le(T)
|
|
2340
|
+
}
|
|
2341
|
+
}),
|
|
2342
|
+
{}
|
|
2343
|
+
)
|
|
2344
|
+
), [r, d] = k(() => ({
|
|
2345
|
+
content: Lt({
|
|
2346
|
+
content: e.content,
|
|
2347
|
+
data: e.data
|
|
2348
|
+
}),
|
|
2349
|
+
localState: void 0,
|
|
2350
|
+
rootState: Ut({
|
|
2351
|
+
content: e.content,
|
|
2352
|
+
data: e.data,
|
|
2353
|
+
locale: e.locale
|
|
2354
|
+
}),
|
|
2355
|
+
rootSetState: i,
|
|
2356
|
+
context: e.context || {},
|
|
2357
|
+
apiKey: e.apiKey,
|
|
2358
|
+
apiVersion: e.apiVersion,
|
|
2359
|
+
componentInfos: [
|
|
2360
|
+
...fe(),
|
|
2361
|
+
// While this `components` object is deprecated, we must maintain support for it.
|
|
2362
|
+
// Since users are able to override our default components, we need to make sure that we do not break such
|
|
2363
|
+
// existing usage.
|
|
2364
|
+
// This is why we spread `components` after the default Builder.io components, but before the `props.customComponents`,
|
|
2365
|
+
// which is the new standard way of providing custom components, and must therefore take precedence.
|
|
2366
|
+
...re,
|
|
2367
|
+
...e.customComponents || []
|
|
2368
|
+
].reduce(
|
|
2369
|
+
(h, { component: C, ...T }) => ({
|
|
2370
|
+
...h,
|
|
2371
|
+
[T.name]: le(T)
|
|
2372
|
+
}),
|
|
2373
|
+
{}
|
|
2374
|
+
),
|
|
2375
|
+
inheritedStyles: {}
|
|
2376
|
+
}));
|
|
2377
|
+
return /* @__PURE__ */ l(
|
|
2378
|
+
Ce.Provider,
|
|
2379
|
+
{
|
|
2380
|
+
value: {
|
|
2381
|
+
registeredComponents: a
|
|
2382
|
+
},
|
|
2383
|
+
children: /* @__PURE__ */ E(
|
|
2384
|
+
Dt,
|
|
2385
|
+
{
|
|
2386
|
+
content: e.content,
|
|
2387
|
+
model: e.model,
|
|
2388
|
+
context: e.context,
|
|
2389
|
+
apiKey: e.apiKey,
|
|
2390
|
+
canTrack: e.canTrack,
|
|
2391
|
+
locale: e.locale,
|
|
2392
|
+
includeRefs: e.includeRefs,
|
|
2393
|
+
enrich: e.enrich,
|
|
2394
|
+
classNameProp: e.classNameProp,
|
|
2395
|
+
showContent: e.showContent,
|
|
2396
|
+
builderContextSignal: r,
|
|
2397
|
+
setBuilderContextSignal: d,
|
|
2398
|
+
children: [
|
|
2399
|
+
e.isSsrAbTest ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(Q, { scriptStr: t }) }) : null,
|
|
2400
|
+
/* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
2401
|
+
Mt,
|
|
2402
|
+
{
|
|
2403
|
+
contentId: (c = r.content) == null ? void 0 : c.id,
|
|
2404
|
+
cssCode: (u = (s = r.content) == null ? void 0 : s.data) == null ? void 0 : u.cssCode,
|
|
2405
|
+
customFonts: (y = (m = r.content) == null ? void 0 : m.data) == null ? void 0 : y.customFonts
|
|
2406
|
+
}
|
|
2407
|
+
) }),
|
|
2408
|
+
/* @__PURE__ */ l(
|
|
2409
|
+
ie,
|
|
2410
|
+
{
|
|
2411
|
+
blocks: (x = (p = r.content) == null ? void 0 : p.data) == null ? void 0 : x.blocks,
|
|
2412
|
+
context: r,
|
|
2413
|
+
registeredComponents: a
|
|
2414
|
+
}
|
|
2415
|
+
)
|
|
2416
|
+
]
|
|
2417
|
+
}
|
|
2418
|
+
)
|
|
2419
|
+
}
|
|
2420
|
+
);
|
|
2421
|
+
}
|
|
2422
|
+
function Re(e) {
|
|
2423
|
+
var r, d, c;
|
|
2424
|
+
const [t, n] = k(
|
|
2425
|
+
() => dt({
|
|
2426
|
+
canTrack: ce(e.canTrack),
|
|
2427
|
+
content: e.content
|
|
2428
|
+
})
|
|
2429
|
+
);
|
|
2430
|
+
function i() {
|
|
2431
|
+
var s;
|
|
2432
|
+
return gt(
|
|
2433
|
+
L(e.content).map((u) => ({
|
|
2434
|
+
id: u.testVariationId,
|
|
2435
|
+
testRatio: u.testRatio
|
|
2436
|
+
})),
|
|
2437
|
+
((s = e.content) == null ? void 0 : s.id) || ""
|
|
2438
|
+
);
|
|
2439
|
+
}
|
|
2440
|
+
function a() {
|
|
2441
|
+
return L(e.content).map((s) => `.variant-${s.testVariationId} { display: none; } `).join("");
|
|
2442
|
+
}
|
|
2443
|
+
function o() {
|
|
2444
|
+
var s;
|
|
2445
|
+
return t ? {
|
|
2446
|
+
...e.content,
|
|
2447
|
+
testVariationId: (s = e.content) == null ? void 0 : s.id
|
|
2448
|
+
} : Ne({
|
|
2449
|
+
item: e.content,
|
|
2450
|
+
canTrack: ce(e.canTrack)
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
return P(() => {
|
|
2454
|
+
}, []), /* @__PURE__ */ E(f, { children: [
|
|
2455
|
+
!e.__isNestedRender && U !== "reactNative" ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(Q, { scriptStr: ht() }) }) : null,
|
|
2456
|
+
t ? /* @__PURE__ */ E(f, { children: [
|
|
2457
|
+
/* @__PURE__ */ l(
|
|
2458
|
+
H,
|
|
2459
|
+
{
|
|
2460
|
+
id: `variants-styles-${(r = e.content) == null ? void 0 : r.id}`,
|
|
2461
|
+
styles: a()
|
|
2462
|
+
}
|
|
2463
|
+
),
|
|
2464
|
+
/* @__PURE__ */ l(Q, { scriptStr: i() }),
|
|
2465
|
+
(d = L(e.content)) == null ? void 0 : d.map((s) => /* @__PURE__ */ l(
|
|
2466
|
+
xe,
|
|
2467
|
+
{
|
|
2468
|
+
content: s,
|
|
2469
|
+
showContent: !1,
|
|
2470
|
+
classNameProp: void 0,
|
|
2471
|
+
model: e.model,
|
|
2472
|
+
data: e.data,
|
|
2473
|
+
context: e.context,
|
|
2474
|
+
apiKey: e.apiKey,
|
|
2475
|
+
apiVersion: e.apiVersion,
|
|
2476
|
+
customComponents: e.customComponents,
|
|
2477
|
+
canTrack: e.canTrack,
|
|
2478
|
+
locale: e.locale,
|
|
2479
|
+
includeRefs: e.includeRefs,
|
|
2480
|
+
enrich: e.enrich,
|
|
2481
|
+
isSsrAbTest: t
|
|
2482
|
+
},
|
|
2483
|
+
s.testVariationId
|
|
2484
|
+
))
|
|
2485
|
+
] }) : null,
|
|
2486
|
+
/* @__PURE__ */ l(
|
|
2487
|
+
xe,
|
|
2488
|
+
{
|
|
2489
|
+
content: o(),
|
|
2490
|
+
classNameProp: `variant-${(c = e.content) == null ? void 0 : c.id}`,
|
|
2491
|
+
showContent: !0,
|
|
2492
|
+
model: e.model,
|
|
2493
|
+
data: e.data,
|
|
2494
|
+
context: e.context,
|
|
2495
|
+
apiKey: e.apiKey,
|
|
2496
|
+
apiVersion: e.apiVersion,
|
|
2497
|
+
customComponents: e.customComponents,
|
|
2498
|
+
canTrack: e.canTrack,
|
|
2499
|
+
locale: e.locale,
|
|
2500
|
+
includeRefs: e.includeRefs,
|
|
2501
|
+
enrich: e.enrich,
|
|
2502
|
+
isSsrAbTest: t
|
|
2503
|
+
}
|
|
2504
|
+
)
|
|
2505
|
+
] });
|
|
2506
|
+
}
|
|
2507
|
+
const Jt = async ({
|
|
2508
|
+
builderContextValue: e,
|
|
2509
|
+
symbol: t
|
|
2510
|
+
}) => {
|
|
2511
|
+
if (t != null && t.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
2512
|
+
(e != null && e.apiKey))
|
|
2513
|
+
return Se({
|
|
2514
|
+
model: t.model,
|
|
2515
|
+
apiKey: e.apiKey,
|
|
2516
|
+
apiVersion: e.apiVersion,
|
|
2517
|
+
...(t == null ? void 0 : t.entry) && {
|
|
2518
|
+
query: {
|
|
2519
|
+
id: t.entry
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
}).catch((n) => {
|
|
2523
|
+
_.error("Could not fetch symbol content: ", n);
|
|
2524
|
+
});
|
|
2525
|
+
};
|
|
2526
|
+
function Yt(e) {
|
|
2527
|
+
var o, r, d;
|
|
2528
|
+
function t() {
|
|
2529
|
+
var c, s;
|
|
2530
|
+
return [
|
|
2531
|
+
e.attributes.className,
|
|
2532
|
+
"builder-symbol",
|
|
2533
|
+
(c = e.symbol) != null && c.inline ? "builder-inline-symbol" : void 0,
|
|
2534
|
+
(s = e.symbol) != null && s.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2535
|
+
].filter(Boolean).join(" ");
|
|
2536
|
+
}
|
|
2537
|
+
const [n, i] = k(() => {
|
|
2538
|
+
var c;
|
|
2539
|
+
return (c = e.symbol) == null ? void 0 : c.content;
|
|
2540
|
+
});
|
|
2541
|
+
function a() {
|
|
2542
|
+
n || Jt({
|
|
2543
|
+
symbol: e.symbol,
|
|
2544
|
+
builderContextValue: e.builderContext
|
|
2545
|
+
}).then((c) => {
|
|
2546
|
+
c && i(c);
|
|
2547
|
+
});
|
|
2548
|
+
}
|
|
2549
|
+
return P(() => {
|
|
2550
|
+
a();
|
|
2551
|
+
}, []), P(() => {
|
|
2552
|
+
a();
|
|
2553
|
+
}, [e.symbol]), /* @__PURE__ */ l("div", { ...e.attributes, className: t(), children: /* @__PURE__ */ l(
|
|
2554
|
+
Re,
|
|
2555
|
+
{
|
|
2556
|
+
__isNestedRender: !0,
|
|
2557
|
+
apiVersion: e.builderContext.apiVersion,
|
|
2558
|
+
apiKey: e.builderContext.apiKey,
|
|
2559
|
+
context: e.builderContext.context,
|
|
2560
|
+
customComponents: Object.values(e.builderComponents),
|
|
2561
|
+
data: {
|
|
2562
|
+
...(o = e.symbol) == null ? void 0 : o.data,
|
|
2563
|
+
...e.builderContext.localState,
|
|
2564
|
+
...(r = n == null ? void 0 : n.data) == null ? void 0 : r.state
|
|
2565
|
+
},
|
|
2566
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
2567
|
+
content: n
|
|
2568
|
+
}
|
|
2569
|
+
) });
|
|
2570
|
+
}
|
|
2571
|
+
const Zt = ie, en = Re;
|
|
2572
|
+
export {
|
|
2573
|
+
ie as Blocks,
|
|
2574
|
+
We as Button,
|
|
2575
|
+
at as Columns,
|
|
2576
|
+
Re as Content,
|
|
2577
|
+
ot as Fragment,
|
|
2578
|
+
ct as Image,
|
|
2579
|
+
Zt as RenderBlocks,
|
|
2580
|
+
en as RenderContent,
|
|
2581
|
+
st as Section,
|
|
2582
|
+
Yt as Symbol,
|
|
2583
|
+
wt as Text,
|
|
2584
|
+
Tt as Video,
|
|
2585
|
+
an as _processContentResult,
|
|
2586
|
+
Be as createRegisterComponentMessage,
|
|
2587
|
+
on as fetchBuilderProps,
|
|
2588
|
+
rn as fetchEntries,
|
|
2589
|
+
Se as fetchOneEntry,
|
|
2590
|
+
ln as getAllContent,
|
|
2591
|
+
cn as getBuilderSearchParams,
|
|
2592
|
+
sn as getContent,
|
|
2593
|
+
V as isEditing,
|
|
2594
|
+
Ve as isPreviewing,
|
|
2595
|
+
Ae as register,
|
|
2596
|
+
dn as setEditorSettings,
|
|
2597
|
+
un as track
|
|
2598
|
+
};
|