@builder.io/sdk-react-nextjs 0.7.1-3 → 0.7.1
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/lib/browser/USE_CLIENT_BUNDLE-059d1502.cjs +23 -0
- package/lib/{node/USE_CLIENT_BUNDLE-3263fb05.mjs → browser/USE_CLIENT_BUNDLE-b256b942.js} +142 -142
- package/lib/{edge/USE_SERVER_BUNDLE-046e1bfb.mjs → browser/USE_SERVER_BUNDLE-1aa7d195.js} +1 -1
- package/lib/browser/USE_SERVER_BUNDLE-d96aeaff.cjs +1 -0
- package/lib/browser/{bundle-97bfd273.mjs → bundle-0a946b39.js} +953 -928
- package/lib/browser/bundle-3a5994f4.cjs +76 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.d.cts +1 -0
- package/lib/browser/index.d.mts +1 -0
- package/lib/browser/index.mjs +3 -3
- package/lib/edge/USE_CLIENT_BUNDLE-210385b8.cjs +23 -0
- package/lib/{browser/USE_CLIENT_BUNDLE-a0cfd96e.mjs → edge/USE_CLIENT_BUNDLE-736c38f3.js} +142 -142
- package/lib/{node/USE_SERVER_BUNDLE-5a2dbc47.mjs → edge/USE_SERVER_BUNDLE-14516672.js} +1 -1
- package/lib/edge/USE_SERVER_BUNDLE-8c86a267.cjs +1 -0
- package/lib/edge/{bundle-4c987206.mjs → bundle-46eb4735.js} +1237 -1211
- package/lib/edge/{bundle-cb675da6.js → bundle-57428492.cjs} +30 -30
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.d.cts +1 -0
- package/lib/edge/index.d.mts +1 -0
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-bcf2ccc8.mjs → node/USE_CLIENT_BUNDLE-2ae32ced.js} +142 -142
- package/lib/node/USE_CLIENT_BUNDLE-85a396bb.cjs +23 -0
- package/lib/{browser/USE_SERVER_BUNDLE-4b7a745a.mjs → node/USE_SERVER_BUNDLE-cd1f2a07.js} +1 -1
- package/lib/node/USE_SERVER_BUNDLE-e2ad5ce3.cjs +1 -0
- package/lib/node/bundle-3d88f873.cjs +116 -0
- package/lib/node/{bundle-e3f18037.mjs → bundle-d37c53b5.js} +794 -769
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.d.cts +1 -0
- package/lib/node/index.d.mts +1 -0
- package/lib/node/index.mjs +3 -3
- package/package.json +8 -22
- package/types/{blocks → cjs/blocks}/button/button.d.ts +4 -3
- package/types/{blocks → cjs/blocks}/columns/columns.d.ts +2 -2
- package/types/{blocks → cjs/blocks}/custom-code/custom-code.d.ts +2 -2
- package/types/cjs/blocks/embed/embed.d.ts +6 -0
- package/types/{blocks → cjs/blocks}/fragment/fragment.d.ts +2 -2
- package/types/{blocks → cjs/blocks}/image/image.d.ts +2 -2
- package/types/{blocks → cjs/blocks}/img/img.d.ts +4 -3
- package/types/{blocks → cjs/blocks}/section/section.d.ts +4 -3
- package/types/{blocks → cjs/blocks}/symbol/symbol.d.ts +6 -4
- package/types/cjs/blocks/text/text.d.ts +6 -0
- package/types/{blocks → cjs/blocks}/video/video.d.ts +2 -2
- package/types/{components → cjs/components}/block/block.d.ts +2 -2
- package/types/{components → cjs/components}/block/components/block-styles.d.ts +2 -2
- package/types/{components → cjs/components}/block/components/block-wrapper.d.ts +6 -5
- package/types/cjs/components/block/components/component-ref/component-ref.d.ts +4 -0
- package/types/{components → cjs/components}/block/components/component-ref/component-ref.helpers.d.ts +1 -1
- package/types/{components → cjs/components}/block/components/interactive-element.d.ts +2 -2
- package/types/{components → cjs/components}/block/components/repeated-block.d.ts +2 -2
- package/types/{components → cjs/components}/blocks/blocks-wrapper.d.ts +2 -2
- package/types/{components → cjs/components}/blocks/blocks.d.ts +3 -3
- package/types/{components → cjs/components}/content/components/enable-editor.d.ts +2 -2
- package/types/{components → cjs/components}/content/components/styles.d.ts +2 -2
- package/types/cjs/components/content/content.d.ts +4 -0
- package/types/{components → cjs/components}/content-variants/content-variants.d.ts +2 -2
- package/types/cjs/components/inlined-script.d.ts +7 -0
- package/types/cjs/components/inlined-styles.d.ts +7 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -0
- package/types/cjs/helpers/preview-lru-cache/get.d.ts +1 -0
- package/types/{helpers → cjs/helpers}/preview-lru-cache/set.d.ts +1 -1
- package/types/{helpers → cjs/helpers}/preview-lru-cache/types.d.ts +1 -1
- package/types/cjs/index-helpers/blocks-exports.d.ts +19 -0
- package/types/{server-index.d.ts → cjs/server-index.d.ts} +2 -2
- package/types/esm/blocks/button/button.d.ts +12 -0
- package/types/esm/blocks/button/component-info.d.ts +2 -0
- package/types/esm/blocks/columns/columns.d.ts +17 -0
- package/types/esm/blocks/columns/component-info.d.ts +2 -0
- package/types/esm/blocks/custom-code/component-info.d.ts +2 -0
- package/types/esm/blocks/custom-code/custom-code.d.ts +7 -0
- package/types/esm/blocks/embed/component-info.d.ts +2 -0
- package/types/esm/blocks/embed/embed.d.ts +6 -0
- package/types/esm/blocks/embed/helpers.d.ts +1 -0
- package/types/esm/blocks/fragment/component-info.d.ts +2 -0
- package/types/esm/blocks/fragment/fragment.d.ts +8 -0
- package/types/esm/blocks/helpers.d.ts +13 -0
- package/types/esm/blocks/image/component-info.d.ts +2 -0
- package/types/esm/blocks/image/image.d.ts +22 -0
- package/types/esm/blocks/image/image.helpers.d.ts +1 -0
- package/types/esm/blocks/img/component-info.d.ts +2 -0
- package/types/esm/blocks/img/img.d.ts +14 -0
- package/types/esm/blocks/section/component-info.d.ts +2 -0
- package/types/esm/blocks/section/section.d.ts +12 -0
- package/types/esm/blocks/symbol/component-info.d.ts +2 -0
- package/types/esm/blocks/symbol/symbol.d.ts +26 -0
- package/types/esm/blocks/symbol/symbol.helpers.d.ts +14 -0
- package/types/esm/blocks/text/component-info.d.ts +2 -0
- package/types/esm/blocks/text/text.d.ts +6 -0
- package/types/esm/blocks/video/component-info.d.ts +2 -0
- package/types/esm/blocks/video/video.d.ts +20 -0
- package/types/esm/components/block/block.d.ts +10 -0
- package/types/esm/components/block/block.helpers.d.ts +13 -0
- package/types/esm/components/block/components/block-styles.d.ts +9 -0
- package/types/esm/components/block/components/block-wrapper.d.ts +18 -0
- package/types/esm/components/block/components/component-ref/component-ref.d.ts +4 -0
- package/types/esm/components/block/components/component-ref/component-ref.helpers.d.ts +28 -0
- package/types/esm/components/block/components/interactive-element.d.ts +12 -0
- package/types/esm/components/block/components/repeated-block.d.ts +10 -0
- package/types/esm/components/block/types.d.ts +6 -0
- package/types/esm/components/blocks/blocks-wrapper.d.ts +11 -0
- package/types/esm/components/blocks/blocks.d.ts +9 -0
- package/types/esm/components/content/components/enable-editor.d.ts +10 -0
- package/types/esm/components/content/components/styles.d.ts +9 -0
- package/types/esm/components/content/components/styles.helpers.d.ts +15 -0
- package/types/esm/components/content/content.d.ts +4 -0
- package/types/esm/components/content/content.helpers.d.ts +7 -0
- package/types/esm/components/content/content.types.d.ts +24 -0
- package/types/esm/components/content/wrap-component-ref.d.ts +6 -0
- package/types/esm/components/content-variants/content-variants.d.ts +10 -0
- package/types/esm/components/content-variants/content-variants.types.d.ts +20 -0
- package/types/esm/components/content-variants/helpers.d.ts +41 -0
- package/types/esm/components/inlined-script.d.ts +7 -0
- package/types/esm/components/inlined-styles.d.ts +7 -0
- package/types/esm/constants/builder-registered-components.d.ts +6 -0
- package/types/esm/constants/device-sizes.d.ts +13 -0
- package/types/esm/constants/sdk-version.d.ts +1 -0
- package/types/esm/constants/target.d.ts +2 -0
- package/types/esm/context/builder.context.d.ts +3 -0
- package/types/esm/context/components.context.d.ts +3 -0
- package/types/esm/context/types.d.ts +35 -0
- package/types/esm/functions/camel-to-kebab-case.d.ts +1 -0
- package/types/esm/functions/deopt.d.ts +4 -0
- package/types/esm/functions/evaluate/browser-runtime/browser.d.ts +4 -0
- package/types/esm/functions/evaluate/browser-runtime/index.d.ts +1 -0
- package/types/esm/functions/evaluate/choose-eval.d.ts +6 -0
- package/types/esm/functions/evaluate/evaluate.d.ts +2 -0
- package/types/esm/functions/evaluate/helpers.d.ts +24 -0
- package/types/esm/functions/evaluate/index.d.ts +1 -0
- package/types/esm/functions/event-handler-name.d.ts +1 -0
- package/types/esm/functions/extract-text-styles.d.ts +4 -0
- package/types/esm/functions/fast-clone.d.ts +4 -0
- package/types/esm/functions/fetch-builder-props.d.ts +53 -0
- package/types/esm/functions/get-block-actions-handler.d.ts +8 -0
- package/types/esm/functions/get-block-actions.d.ts +10 -0
- package/types/esm/functions/get-block-component-options.d.ts +2 -0
- package/types/esm/functions/get-block-properties.d.ts +6 -0
- package/types/esm/functions/get-builder-search-params/index.d.ts +12 -0
- package/types/esm/functions/get-content/generate-content-url.d.ts +2 -0
- package/types/esm/functions/get-content/index.d.ts +28 -0
- package/types/esm/functions/get-content/types.d.ts +142 -0
- package/types/esm/functions/get-fetch.d.ts +1 -0
- package/types/esm/functions/get-global-this.d.ts +4 -0
- package/types/esm/functions/get-processed-block.d.ts +10 -0
- package/types/esm/functions/get-react-native-block-styles.d.ts +7 -0
- package/types/esm/functions/is-browser.d.ts +1 -0
- package/types/esm/functions/is-editing.d.ts +1 -0
- package/types/esm/functions/is-iframe.d.ts +1 -0
- package/types/esm/functions/is-previewing.d.ts +1 -0
- package/types/esm/functions/register-component.d.ts +15 -0
- package/types/esm/functions/register.d.ts +16 -0
- package/types/esm/functions/sanitize-react-native-block-styles.d.ts +3 -0
- package/types/esm/functions/set-editor-settings.d.ts +4 -0
- package/types/esm/functions/set.d.ts +7 -0
- package/types/esm/functions/track/helpers.d.ts +5 -0
- package/types/esm/functions/track/index.d.ts +51 -0
- package/types/esm/functions/track/interaction.d.ts +13 -0
- package/types/esm/functions/transform-block-properties.d.ts +1 -0
- package/types/esm/functions/transform-block.d.ts +2 -0
- package/types/esm/helpers/ab-tests.d.ts +9 -0
- package/types/esm/helpers/canTrack.d.ts +1 -0
- package/types/esm/helpers/cookie.d.ts +19 -0
- package/types/esm/helpers/css.d.ts +7 -0
- package/types/esm/helpers/flatten.d.ts +6 -0
- package/types/esm/helpers/localStorage.d.ts +9 -0
- package/types/esm/helpers/logger.d.ts +6 -0
- package/types/esm/helpers/nullable.d.ts +2 -0
- package/types/esm/helpers/preview-lru-cache/get.d.ts +1 -0
- package/types/esm/helpers/preview-lru-cache/helpers.d.ts +1 -0
- package/types/esm/helpers/preview-lru-cache/init.d.ts +6 -0
- package/types/esm/helpers/preview-lru-cache/set.d.ts +7 -0
- package/types/esm/helpers/preview-lru-cache/types.d.ts +12 -0
- package/types/esm/helpers/sessionId.d.ts +6 -0
- package/types/esm/helpers/url.d.ts +6 -0
- package/types/esm/helpers/uuid.d.ts +8 -0
- package/types/esm/helpers/visitorId.d.ts +6 -0
- package/types/esm/index-helpers/blocks-exports.d.ts +19 -0
- package/types/esm/index-helpers/top-of-file.d.ts +1 -0
- package/types/esm/index.d.ts +7 -0
- package/types/esm/scripts/init-editing.d.ts +6 -0
- package/types/esm/server-index.d.ts +15 -0
- package/types/esm/types/api-version.d.ts +2 -0
- package/types/esm/types/builder-block.d.ts +66 -0
- package/types/esm/types/builder-content.d.ts +44 -0
- package/types/esm/types/builder-props.d.ts +9 -0
- package/types/esm/types/can-track.d.ts +3 -0
- package/types/esm/types/components.d.ts +110 -0
- package/types/esm/types/deep-partial.d.ts +3 -0
- package/types/esm/types/element.d.ts +59 -0
- package/types/esm/types/enforced-partials.d.ts +21 -0
- package/types/esm/types/input.d.ts +121 -0
- package/types/esm/types/targets.d.ts +1 -0
- package/types/esm/types/typescript.d.ts +11 -0
- package/lib/browser/USE_CLIENT_BUNDLE-36991304.js +0 -23
- package/lib/browser/USE_SERVER_BUNDLE-2ca6fbdb.js +0 -1
- package/lib/browser/bundle-55af31a8.js +0 -76
- package/lib/edge/USE_CLIENT_BUNDLE-66349ab4.js +0 -23
- package/lib/edge/USE_SERVER_BUNDLE-02f64ca7.js +0 -1
- package/lib/node/USE_CLIENT_BUNDLE-9a315fd7.js +0 -23
- package/lib/node/USE_SERVER_BUNDLE-ddf14d3b.js +0 -1
- package/lib/node/bundle-b8de5bb9.js +0 -116
- package/types/blocks/embed/embed.d.ts +0 -6
- package/types/blocks/text/text.d.ts +0 -6
- package/types/components/block/components/component-ref/component-ref.d.ts +0 -4
- package/types/components/content/content.d.ts +0 -4
- package/types/components/inlined-script.d.ts +0 -7
- package/types/components/inlined-styles.d.ts +0 -7
- package/types/constants/sdk-version.d.ts +0 -1
- package/types/helpers/preview-lru-cache/get.d.ts +0 -1
- package/types/index-helpers/blocks-exports.d.ts +0 -19
- package/types/{blocks → cjs/blocks}/button/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/columns/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/custom-code/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/embed/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/embed/helpers.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/fragment/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/helpers.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/image/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/image/image.helpers.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/img/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/section/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/symbol/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/symbol/symbol.helpers.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/text/component-info.d.ts +0 -0
- package/types/{blocks → cjs/blocks}/video/component-info.d.ts +0 -0
- package/types/{components → cjs/components}/block/block.helpers.d.ts +0 -0
- package/types/{components → cjs/components}/block/types.d.ts +0 -0
- package/types/{components → cjs/components}/content/components/styles.helpers.d.ts +0 -0
- package/types/{components → cjs/components}/content/content.helpers.d.ts +0 -0
- package/types/{components → cjs/components}/content/content.types.d.ts +0 -0
- package/types/{components → cjs/components}/content/wrap-component-ref.d.ts +0 -0
- package/types/{components → cjs/components}/content-variants/content-variants.types.d.ts +0 -0
- package/types/{components → cjs/components}/content-variants/helpers.d.ts +0 -0
- package/types/{constants → cjs/constants}/builder-registered-components.d.ts +0 -0
- package/types/{constants → cjs/constants}/device-sizes.d.ts +0 -0
- package/types/{constants → cjs/constants}/target.d.ts +0 -0
- package/types/{context → cjs/context}/builder.context.d.ts +0 -0
- package/types/{context → cjs/context}/components.context.d.ts +0 -0
- package/types/{context → cjs/context}/types.d.ts +1 -1
- package/types/{functions → cjs/functions}/camel-to-kebab-case.d.ts +0 -0
- package/types/{functions → cjs/functions}/deopt.d.ts +0 -0
- package/types/{functions → cjs/functions}/evaluate/browser-runtime/browser.d.ts +0 -0
- package/types/{functions → cjs/functions}/evaluate/browser-runtime/index.d.ts +0 -0
- package/types/{functions → cjs/functions}/evaluate/choose-eval.d.ts +0 -0
- package/types/{functions → cjs/functions}/evaluate/evaluate.d.ts +0 -0
- package/types/{functions → cjs/functions}/evaluate/helpers.d.ts +0 -0
- package/types/{functions → cjs/functions}/evaluate/index.d.ts +0 -0
- package/types/{functions → cjs/functions}/event-handler-name.d.ts +0 -0
- package/types/{functions → cjs/functions}/extract-text-styles.d.ts +0 -0
- package/types/{functions → cjs/functions}/fast-clone.d.ts +0 -0
- package/types/{functions → cjs/functions}/fetch-builder-props.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-block-actions-handler.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-block-actions.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-block-component-options.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-block-properties.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-builder-search-params/index.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-content/generate-content-url.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-content/index.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-content/types.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-fetch.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-global-this.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-processed-block.d.ts +0 -0
- package/types/{functions → cjs/functions}/get-react-native-block-styles.d.ts +0 -0
- package/types/{functions → cjs/functions}/is-browser.d.ts +0 -0
- package/types/{functions → cjs/functions}/is-editing.d.ts +0 -0
- package/types/{functions → cjs/functions}/is-iframe.d.ts +0 -0
- package/types/{functions → cjs/functions}/is-previewing.d.ts +0 -0
- package/types/{functions → cjs/functions}/register-component.d.ts +0 -0
- package/types/{functions → cjs/functions}/register.d.ts +0 -0
- package/types/{functions → cjs/functions}/sanitize-react-native-block-styles.d.ts +0 -0
- package/types/{functions → cjs/functions}/set-editor-settings.d.ts +0 -0
- package/types/{functions → cjs/functions}/set.d.ts +0 -0
- package/types/{functions → cjs/functions}/track/helpers.d.ts +0 -0
- package/types/{functions → cjs/functions}/track/index.d.ts +0 -0
- package/types/{functions → cjs/functions}/track/interaction.d.ts +0 -0
- package/types/{functions → cjs/functions}/transform-block-properties.d.ts +0 -0
- package/types/{functions → cjs/functions}/transform-block.d.ts +0 -0
- package/types/{helpers → cjs/helpers}/ab-tests.d.ts +1 -1
- /package/types/{helpers → cjs/helpers}/canTrack.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/cookie.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/css.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/flatten.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/localStorage.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/logger.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/nullable.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/preview-lru-cache/helpers.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/preview-lru-cache/init.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/sessionId.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/url.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/uuid.d.ts +0 -0
- /package/types/{helpers → cjs/helpers}/visitorId.d.ts +0 -0
- /package/types/{index-helpers → cjs/index-helpers}/top-of-file.d.ts +0 -0
- /package/types/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/types/{scripts → cjs/scripts}/init-editing.d.ts +0 -0
- /package/types/{types → cjs/types}/api-version.d.ts +0 -0
- /package/types/{types → cjs/types}/builder-block.d.ts +0 -0
- /package/types/{types → cjs/types}/builder-content.d.ts +0 -0
- /package/types/{types → cjs/types}/builder-props.d.ts +0 -0
- /package/types/{types → cjs/types}/can-track.d.ts +0 -0
- /package/types/{types → cjs/types}/components.d.ts +0 -0
- /package/types/{types → cjs/types}/deep-partial.d.ts +0 -0
- /package/types/{types → cjs/types}/element.d.ts +0 -0
- /package/types/{types → cjs/types}/enforced-partials.d.ts +0 -0
- /package/types/{types → cjs/types}/input.d.ts +0 -0
- /package/types/{types → cjs/types}/targets.d.ts +0 -0
- /package/types/{types → cjs/types}/typescript.d.ts +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";const We=require("lru-cache"),s=require("react/jsx-runtime"),Le=require("react"),v=require("./USE_CLIENT_BUNDLE-36991304.js");require("next/navigation");const R=e=>JSON.parse(JSON.stringify(e)),de={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},X=(e,t=de)=>`@media (max-width: ${t[e].max}px)`,me=({small:e,medium:t})=>{const n=R(de);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const i=n.medium.max+1;return n.large={max:2e3,min:i,default:i+1},n},I="rsc",A="[Builder.io]: ",k={log:(...e)=>console.log(A,...e),error:(...e)=>console.error(A,...e),warn:(...e)=>console.warn(A,...e),debug:(...e)=>console.debug(A,...e)};function S(){return typeof window<"u"&&typeof document<"u"}function Ue(){return S()&&window.self!==window.top}function F(){return Ue()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Me=()=>{if(S()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},_e=()=>typeof navigator=="object"&&navigator.userAgent||"",fe=()=>{const e=_e(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||I==="reactNative"}},n=e.match(/Tablet|iPad/i),o=Me();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},Ke=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),He=()=>({isEditing:F(),isBrowser:S(),isServer:!S(),getUserAttributes:()=>fe()}),De=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,Q=({code:e,builder:t,context:n,event:o,localState:r,rootSetState:i,rootState:a})=>{const l=Ke({builder:t,context:n,event:o,state:ze(a,r,i)});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function ze(e,t,n){if(e===t)throw new Error("rootState === localState");return new Proxy(e,{get:(o,r)=>t&&r in t?t[r]:e[r],set:(o,r,i)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return e[r]=i,n==null||n(e),!0}})}const qe=e=>(S(),Q(e));function O({code:e,context:t,localState:n,rootState:o,rootSetState:r,event:i,isExpression:a=!0}){if(e===""){k.warn("Skipping evaluation of empty code block.");return}const l={code:De(e,{isExpression:a}),builder:He(),context:t,event:i,rootSetState:r,rootState:o,localState:n};try{return qe(l)}catch(c){k.error("Failed code evaluation: "+c.message,{code:e});return}}const Ge=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((r,i,a)=>Object(r[i])===r[i]?r[i]:r[i]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e};const Je=({block:e,context:t,localState:n,rootState:o,rootSetState:r})=>{if(!e.bindings)return e;const i=R(e),a={...i,properties:{...i.properties},actions:{...i.actions}};for(const l in e.bindings){const c=e.bindings[l],d=O({code:c,localState:n,rootState:o,rootSetState:r,context:t});Ge(a,l,d)}return a};function V({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:r,rootSetState:i}){const a=e;return n?Je({block:a,localState:o,rootState:r,rootSetState:i,context:t}):a}const Ye=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),C=e=>e!=null,he=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${Ye(n)}: ${o};`}).filter(C),Xe=e=>he(e).join(`
|
|
2
|
-
`),M=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
|
|
3
|
-
${Xe(n)}
|
|
4
|
-
}`;return e?`${e} {
|
|
5
|
-
${o}
|
|
6
|
-
}`:o};function N(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function D(e){const t=function(){const r=V({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return C(r.hide)?!r.hide:C(r.show)?r.show:!0},n=function(){var u;const r=V({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),i=r.responsiveStyles,a=e.context.content,l=me(((u=a==null?void 0:a.meta)==null?void 0:u.breakpoints)||{}),c=i==null?void 0:i.large,d=i==null?void 0:i.medium,f=i==null?void 0:i.small,p=r.id;if(!p)return"";const b=c?M({className:p,styles:c}):"",m=d?M({className:p,styles:d,mediaQuery:X("medium",l)}):"",h=f?M({className:p,styles:f,mediaQuery:X("small",l)}):"";return[b,m,h].join(" ")};return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx(N,{styles:n()})}):null})}function Qe(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Ze=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],_=e=>typeof e=="string"&&Ze.includes(e.toLowerCase()),et=({block:e,context:t,registeredComponents:n})=>{var i;const o=(i=V({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:i.name;if(!o)return null;const r=n[o];if(r)return r;console.warn(`
|
|
7
|
-
Could not find a registered component named "${o}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},tt=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const r=O({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const i=n.collection.split(".").pop(),a=n.itemName||(i?i+"Item":"item");return r.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[a]:c,[`$${a}Index`]:d}},block:o}))};function nt(e){const t=e.repeatContext;return s.jsx(W,{block:e.block,context:t,registeredComponents:e.registeredComponents})}function ot(e){return e.charAt(0).toUpperCase()+e.slice(1)}const rt=e=>`on${ot(e)}`,it=(e,t)=>n=>O({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function at(e){const t={},n=e.block.actions??{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let i=rt(o);if(e.stripPrefix)switch(I){case"vue2":case"vue3":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=it(r,e)}return t}function st(e){return e.className=e.class,delete e.class,e}const ct=e=>({href:e.href});function ge({block:e,context:t}){var o;const n={...ct(e),...e.properties,"builder-id":e.id,style:e.style?lt(e.style):void 0,class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return st(n)}function lt(e){switch(I){case"svelte":case"vue2":case"vue3":case"solid":return he(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const ut=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:r,isInteractive:i,contextValue:a})=>i?{Wrapper:o,block:t,context:n,wrapperProps:e}:{...e,...r?{attributes:ge({block:t,context:a})}:{}};function Z(e){var n,o;const t=e.isInteractive?v.InteractiveElement:e.componentRef;return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsxs(t,{...ut({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:[(n=e.blockChildren)==null?void 0:n.map(r=>s.jsx(W,{block:r,context:e.context,registeredComponents:e.registeredComponents},"block-"+r.id)),(o=e.blockChildren)==null?void 0:o.map(r=>s.jsx(D,{block:r,context:e.context},"block-style-"+r.id))]})}):null})}function W(e){var d,f,p,b;const t=function(){return et({block:e.block,context:e.context,registeredComponents:e.registeredComponents})},n=function(){return tt({block:e.block,context:e.context})},o=function(){return n()?e.block:V({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})},r=function(){return e.block.tagName||"div"},i=function(){return"hide"in o()?!o().hide:"show"in o()?o().show:!0},a=function(){var u;return!((u=t())!=null&&u.component)&&!n()?o().children??[]:[]},l=function(){var h,u,y,x,g;return{blockChildren:o().children??[],componentRef:(h=t())==null?void 0:h.component,componentOptions:{...Qe(o()),builderContext:e.context,...((u=t())==null?void 0:u.name)==="Symbol"||((y=t())==null?void 0:y.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:c,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((x=t())==null?void 0:x.noWrap)===!0,isInteractive:!((g=t())!=null&&g.isRSC)}},c=e.context;return s.jsx(s.Fragment,{children:i()?s.jsx(s.Fragment,{children:(d=t())!=null&&d.noWrap?s.jsx(s.Fragment,{children:s.jsx(Z,{...l()})}):s.jsxs(s.Fragment,{children:[_(r())?s.jsx(s.Fragment,{children:s.jsx(v.BlockWrapper,{Wrapper:r(),block:o(),context:e.context,hasChildren:!1})}):null,!_(r())&&n()?s.jsx(s.Fragment,{children:(f=n())==null?void 0:f.map((m,h)=>s.jsx(nt,{repeatContext:m.context,block:m.block,registeredComponents:e.registeredComponents},h))}):null,!_(r())&&!n()?s.jsx(s.Fragment,{children:s.jsxs(v.BlockWrapper,{Wrapper:r(),block:o(),context:e.context,hasChildren:!0,children:[s.jsx(Z,{...l()}),(p=a())==null?void 0:p.map(m=>s.jsx(W,{block:m,context:c,registeredComponents:e.registeredComponents},"block-"+m.id)),(b=a())==null?void 0:b.map(m=>s.jsx(D,{block:m,context:c},"block-style-"+m.id))]})}):null]})}):null})}function L(e){var t,n;return s.jsxs(v.BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,children:[e.blocks?s.jsx(s.Fragment,{children:(t=e.blocks)==null?void 0:t.map(o=>s.jsx(W,{block:o,context:e.context,registeredComponents:e.registeredComponents},"render-block-"+o.id))}):null,e.blocks?s.jsx(s.Fragment,{children:(n=e.blocks)==null?void 0:n.map(o=>s.jsx(D,{block:o,context:e.context},"block-style-"+o.id))}):null]})}function pe(e){var m;const t=typeof e.space=="number"?e.space||0:20,n=e.columns||[],o=e.stackColumnsAt||"tablet",r=function(u){var y;return((y=n[u])==null?void 0:y.width)||100/n.length},i=function(u){const y=t*(n.length-1)/n.length;return`calc(${r(u)}% - ${y}px)`},a=function({stackedStyle:u,desktopStyle:y}){return o==="tablet"?u:y},l=function({stackedStyle:u,desktopStyle:y}){return o==="never"?y:u},c=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",d=function(){return{"--flex-dir":c,"--flex-dir-tablet":a({stackedStyle:c,desktopStyle:"row"})}},f=function(u){const y=u===0?0:t,x=i(u),g=`${y}px`,j="100%",T=0;return{width:x,["marginLeft"]:g,"--column-width-mobile":l({stackedStyle:j,desktopStyle:x}),"--column-margin-left-mobile":l({stackedStyle:T,desktopStyle:g}),"--column-width-tablet":a({stackedStyle:j,desktopStyle:x}),"--column-margin-left-tablet":a({stackedStyle:T,desktopStyle:g})}},p=function(u){var x,g;return me(((g=(x=e.builderContext.content)==null?void 0:x.meta)==null?void 0:g.breakpoints)||{})[u].max},b=function(){return`
|
|
9
|
-
@media (max-width: ${p("medium")}px) {
|
|
10
|
-
.${e.builderBlock.id}-breakpoints {
|
|
11
|
-
flex-direction: var(--flex-dir-tablet);
|
|
12
|
-
align-items: stretch;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
16
|
-
width: var(--column-width-tablet) !important;
|
|
17
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@media (max-width: ${p("small")}px) {
|
|
22
|
-
.${e.builderBlock.id}-breakpoints {
|
|
23
|
-
flex-direction: var(--flex-dir);
|
|
24
|
-
align-items: stretch;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
28
|
-
width: var(--column-width-mobile) !important;
|
|
29
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
`};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-666689ca`,style:d(),children:[s.jsx(s.Fragment,{children:s.jsx(N,{styles:b()})}),(m=e.columns)==null?void 0:m.map((h,u)=>Le.createElement("div",{className:"builder-column div-666689ca-2",style:f(u),key:u},s.jsx(L,{path:`component.options.columns.${u}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,blocks:h.blocks})))]}),s.jsx("style",{children:`.div-666689ca {
|
|
33
|
-
display: flex;
|
|
34
|
-
line-height: normal;
|
|
35
|
-
}.div-666689ca-2 {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
align-items: stretch;
|
|
39
|
-
}`})]})}function ee(e){return e.replace(/http(s)?:/,"")}function dt(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function mt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ee(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],i=t.match("x")?t:`${t}x`;return ee(`${o[0]}_${i}${r}`)}return null}function ft(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${dt(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[mt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const B=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),ht=({canTrack:e,content:t})=>!(!(B(t).length>0)||!e||S());function gt(e,t,n){var a;function o(){function l(h,u,y){let x="";if(y){const g=new Date;g.setTime(g.getTime()+y*24*60*60*1e3),x="; expires="+g.toUTCString()}document.cookie=h+"="+(u||"")+x+"; path=/; Secure; SameSite=None"}function c(h){const u=h+"=",y=document.cookie.split(";");for(let x=0;x<y.length;x++){let g=y[x];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(u)===0)return g.substring(u.length,g.length)}return null}const d=`builder.tests.${e}`,f=c(d),p=t.map(h=>h.id).concat(e);if(f&&p.includes(f))return f;let b=0;const m=Math.random();for(let h=0;h<t.length;h++){const u=t[h],y=u.testRatio;if(b+=y,m<b)return l(d,u.id),u.id}return l(d,e),e}const r=o(),i=(a=document.currentScript)==null?void 0:a.previousElementSibling;if(n){i.remove();const l=document.currentScript;l==null||l.remove()}else{const l=t.concat({id:e}).filter(c=>c.id!==r).map(c=>`.variant-${c.id} { display: none; }
|
|
40
|
-
`).join("");i.innerHTML=l}}function pt(e,t,n){var c;if(!navigator.cookieEnabled)return;function o(d){const f=d+"=",p=document.cookie.split(";");for(let b=0;b<p.length;b++){let m=p[b];for(;m.charAt(0)===" ";)m=m.substring(1,m.length);if(m.indexOf(f)===0)return m.substring(f.length,m.length)}return null}const r=`builder.tests.${t}`,i=o(r),a=(c=document.currentScript)==null?void 0:c.parentElement,l=e===t;if(i===e){if(l)return;a==null||a.removeAttribute("hidden"),a==null||a.removeAttribute("aria-hidden")}else{l&&(n?a==null||a.remove():(a==null||a.setAttribute("hidden","true"),a==null||a.setAttribute("aria-hidden","true")));return}}const bt=e=>e==="react"||e==="reactNative",be=bt(I),ye="builderIoAbTest",xe="builderIoRenderContent",yt=()=>{const e=gt.toString().replace(/\s+/g," "),t=pt.toString().replace(/\s+/g," ");return`
|
|
41
|
-
window.${ye} = ${e}
|
|
42
|
-
window.${xe} = ${t}
|
|
43
|
-
`},xt=(e,t)=>`
|
|
44
|
-
window.${ye}("${t}",${JSON.stringify(e)}, ${be})`,St=({contentId:e,variationId:t})=>`
|
|
45
|
-
window.${xe}("${t}", "${e}", ${be})`,vt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},kt={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(i=>!i.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},wt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Ct={name:"Image",static:!0,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",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,l=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let p=!1;f.onload=()=>{p=!0,c(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),d(b.error)}),f.src=a,setTimeout(()=>{p||d(new Error("Image load timed out"))},l)})}function o(a){return Math.round(a*1e3)/1e3}const r=e.get("image"),i=e.get("aspectRatio");if(fetch(r).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!i||i===.7041))return n(r).then(a=>{const l=e.get("aspectRatio");e.get("image")===r&&(!l||l===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",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",advanced:!0,defaultValue:.7041}]},It={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{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>"}}}]},Tt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},Et={name:"Text",static:!0,isRSC:!0,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",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Se(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Rt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},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",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},jt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},At=["text/javascript","application/javascript","application/ecmascript"],Bt=e=>At.includes(e.type),Pt={name:"Raw:Img",hideFromInsertMenu:!0,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",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},Vt={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},te=()=>[{component:v.Button,...vt},{component:pe,...kt},{component:v.CustomCode,...Vt},{component:v.Embed,...jt},{component:v.FragmentComponent,...wt},{component:v.Image,...Ct},{component:v.ImgComponent,...Pt},{component:v.SectionComponent,...It},{component:Ne,...Tt},{component:Se,...Et},{component:v.Video,...Rt}],ne=[],$t=e=>({type:"builder.registerComponent",data:K(e)}),Ft=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Ot=e=>typeof e=="function"?Ft(e):R(e),K=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,i])=>({...o,[r]:Ot(i)}),{}))}),Nt=e=>{var i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((i=e==null?void 0:e.files)==null?void 0:i.regular);let r="";if(o&&t&&n&&(r+=`
|
|
46
|
-
@font-face {
|
|
47
|
-
font-family: "${t}";
|
|
48
|
-
src: local("${n}"), url('${o}') format('woff2');
|
|
49
|
-
font-display: fallback;
|
|
50
|
-
font-weight: 400;
|
|
51
|
-
}
|
|
52
|
-
`.trim()),e.files)for(const a in e.files){if(!(String(Number(a))===a))continue;const c=e.files[a];c&&c!==o&&(r+=`
|
|
53
|
-
@font-face {
|
|
54
|
-
font-family: "${t}";
|
|
55
|
-
src: url('${c}') format('woff2');
|
|
56
|
-
font-display: fallback;
|
|
57
|
-
font-weight: ${a};
|
|
58
|
-
}
|
|
59
|
-
`.trim())}return r},Wt=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Nt(n)))==null?void 0:t.join(" "))||""},Lt=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function Ut(e){const t=`
|
|
60
|
-
${Lt({cssCode:e.cssCode,contentId:e.contentId})}
|
|
61
|
-
${Wt({customFonts:e.customFonts})}
|
|
62
|
-
|
|
63
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
64
|
-
margin: 0;
|
|
65
|
-
}
|
|
66
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
67
|
-
color: inherit;
|
|
68
|
-
line-height: inherit;
|
|
69
|
-
letter-spacing: inherit;
|
|
70
|
-
font-weight: inherit;
|
|
71
|
-
font-size: inherit;
|
|
72
|
-
text-align: inherit;
|
|
73
|
-
font-family: inherit;
|
|
74
|
-
}
|
|
75
|
-
`.trim();return s.jsx(N,{styles:t})}const Mt=({content:e,data:t,locale:n})=>{var i,a,l;const o={};(a=(i=e==null?void 0:e.data)==null?void 0:i.inputs)==null||a.forEach(c=>{var d;c.name&&c.defaultValue!==void 0&&((d=e==null?void 0:e.data)!=null&&d.state)&&e.data.state[c.name]===void 0&&(o[c.name]=c.defaultValue)});const r={...(l=e==null?void 0:e.data)==null?void 0:l.state,...t,...n?{locale:n}:{}};return{...o,...r}},_t=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function Kt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Ht(){const e=Kt().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
76
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const ve=Ht(),Dt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},ke=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){k.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},we=async e=>ke(e),zt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(C).join("; "),qt=[["secure",""],["SameSite","None"]],Gt=({name:e,value:t,expires:n})=>{const r=(S()?location.protocol==="https:":!0)?qt:[[]],i=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...i,["path","/"],["domain",Dt(window.location.hostname)],...r];return zt(a)},Ce=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=Gt({name:e,value:t,expires:n});document.cookie=r}catch(r){k.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}};function Jt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Ie(){return Jt().replace(/-/g,"")}const Te="builderSessionId",Yt=async({canTrack:e})=>{if(!e)return;const t=await we({name:Te,canTrack:e});if(C(t))return t;{const n=Xt();return Qt({id:n,canTrack:e}),n}},Xt=()=>Ie(),Qt=({id:e,canTrack:t})=>Ce({name:Te,value:e,canTrack:t}),Ee=()=>S()&&typeof localStorage<"u"?localStorage:void 0,Zt=({key:e,canTrack:t})=>{var n;try{return t?(n=Ee())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},en=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=Ee())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},Re="builderVisitorId",tn=({canTrack:e})=>{if(!e)return;const t=Zt({key:Re,canTrack:e});if(C(t))return t;{const n=nn();return on({id:n,canTrack:e}),n}},nn=()=>Ie(),on=({id:e,canTrack:t})=>en({key:Re,value:e,canTrack:t}),rn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await Yt({canTrack:e}),n=tn({canTrack:e});return{sessionId:t,visitorId:n}},an=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await rn({canTrack:t}),userAttributes:fe(),ownerId:n}});async function je(e){if(!e.apiKey){k.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!F()&&(S()||I==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await an(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const sn=e=>je({...e,canTrack:!0}),cn="0.7.1-3",oe={};function Ae(e,t){let n=oe[e];if(n||(n=oe[e]=[]),n.push(t),S()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const ln=()=>{Ae("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let re=!1;const un=(e={})=>{var t,n;re||(re=!0,S()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:I,version:cn,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var r,i;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const a=o.data.text,l=o.data.arguments||[],c=o.data.id,d=new Function(a);let f,p=null;try{f=d.apply(null,l)}catch(b){p=b}p?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:c,error:p.message}},"*"):f&&typeof f.then=="function"?f.then(b=>{var m;(m=window.parent)==null||m.postMessage({type:"builder.evaluateResult",data:{id:c,result:b}},"*")}).catch(console.error):(i=window.parent)==null||i.postMessage({type:"builder.evaluateResult",data:{result:f,id:c}},"*");break}}})))};function ie(e){return Math.round(e*1e3)/1e3}const dn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},mn=e=>dn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ae=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,i=ie(o/n.width),a=ie(r/n.height);return{x:i,y:a}},fn=e=>{const t=e.target,n=t&&mn(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?ae({event:e,target:t}):void 0,builderTargetOffset:n?ae({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},hn="builder.tests",z=e=>`${hn}.${e}`,gn=({contentId:e})=>we({name:z(e),canTrack:!0}),pn=({contentId:e})=>ke({name:z(e),canTrack:!0}),bn=({contentId:e,value:t})=>Ce({name:z(e),value:t,canTrack:!0}),Be=e=>C(e.id)&&C(e.variations)&&Object.keys(e.variations).length>0,yn=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const i in t){const a=(r=t[i])==null?void 0:r.testRatio;if(n+=a,o<n)return i}return e},Pe=e=>{const t=yn(e);return bn({contentId:e.id,value:t}).catch(n=>{k.error("could not store A/B test variation: ",n)}),t},Ve=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},xn=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!Be(e))return e;const n=pn({contentId:e.id})||Pe({variations:e.variations,id:e.id}),o=Ve({item:e,testGroupId:n});return{...e,...o}},Sn=async({item:e,canTrack:t})=>{if(!t||!Be(e))return e;const o=await gn({contentId:e.id})||Pe({variations:e.variations,id:e.id}),r=Ve({item:e,testGroupId:o});return{...e,...r}},$=e=>C(e)?e:!0,vn=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||k.warn("No previewed ID found in search params."),n};function $e(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new We.LRUCache({max:500,ttl:1e3*60*5}))}function kn(e){$e();const t=vn(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function P(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const i=e[r],a=[t,r].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...P(i,a,n)}:{...o,[a]:i}},{})}const se="builder.",wn="options.",Cn=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},q=e=>{if(!e)return{};const t=Fe(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(se)){const r=o.replace(se,"").replace(wn,"");n[r]=t[o]}}),n},In=()=>{if(!S())return{};const e=new URLSearchParams(window.location.search);return q(e)},Fe=e=>e instanceof URLSearchParams?Cn(e):e,Tn="v3",ce=e=>typeof e=="number"&&!isNaN(e)&&e>=0,G=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:r,model:i,apiKey:a,includeRefs:l=!0,enrich:c,locale:d,apiVersion:f=Tn,fields:p,omit:b,offset:m,cacheSeconds:h,staleCacheSeconds:u,sort:y,includeUnpublished:x}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const g=new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${l}${d?`&locale=${d}`:""}${c?`&enrich=${c}`:""}`);if(g.searchParams.set("omit",b||"meta.componentsUsed"),p&&g.searchParams.set("fields",p),Number.isFinite(m)&&m>-1&&g.searchParams.set("offset",String(Math.floor(m))),typeof x=="boolean"&&g.searchParams.set("includeUnpublished",String(x)),h&&ce(h)&&g.searchParams.set("cacheSeconds",String(h)),u&&ce(u)&&g.searchParams.set("staleCacheSeconds",String(u)),y){const w=P({sort:y});for(const E in w)g.searchParams.set(E,JSON.stringify(w[E]))}const j={...In(),...Fe(e.options||{})},T=P(j);for(const w in T)g.searchParams.set(w,String(T[w]));if(o&&g.searchParams.set("userAttributes",JSON.stringify(o)),r){const w=P({query:r});for(const E in w)g.searchParams.set(E,JSON.stringify(w[E]))}return g},En=e=>"results"in e;async function U(e){const t=await J({...e,limit:1});return t&&t.results[0]||null}const Rn=U,jn=async e=>{const t=G(e);return await(await ve(t.href)).json()},Oe=async(e,t,n=G(e))=>{const o=$(e.canTrack);if(n.search.includes("preview=")){const i=[];for(const a of t.results){const l=kn(n.searchParams);i.push(l||a)}t.results=i}if(!o||!(S()||I==="reactNative"))return t;try{const i=[];for(const a of t.results)i.push(await Sn({item:a,canTrack:o}));t.results=i}catch(i){k.error("Could not process A/B tests. ",i)}return t};async function J(e){try{const t=G(e),n=await jn(e);return En(n)?Oe(e,n):(k.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return k.error("Error fetching data. ",t),null}}const An=J;function Bn(){return!S()||F()?!1:location.search.indexOf("builder.preview=")!==-1}function H(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id})}function le(e){var r,i,a,l,c,d,f,p,b;const t=St({variationId:(r=e.content)==null?void 0:r.testVariationId,contentId:(i=e.content)==null?void 0:i.id}),n=[...te(),...ne,...e.customComponents||[]].reduce((m,{component:h,...u})=>({...m,[u.name]:{component:h,...K(u)}}),{}),o={content:_t({content:e.content,data:e.data}),localState:void 0,rootState:Mt({content:e.content,data:e.data,locale:e.locale}),rootSetState:void 0,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...te(),...ne,...e.customComponents||[]].reduce((m,{component:h,...u})=>({...m,[u.name]:K(u)}),{}),inheritedStyles:{}};return s.jsxs(v.EnableEditor,{content:e.content,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,classNameProp:e.classNameProp,showContent:e.showContent,builderContextSignal:o,children:[e.isSsrAbTest?s.jsx(s.Fragment,{children:s.jsx(H,{scriptStr:t})}):null,s.jsx(s.Fragment,{children:s.jsx(Ut,{contentId:(a=o.content)==null?void 0:a.id,cssCode:(c=(l=o.content)==null?void 0:l.data)==null?void 0:c.cssCode,customFonts:(f=(d=o.content)==null?void 0:d.data)==null?void 0:f.customFonts})}),s.jsx(L,{blocks:(b=(p=o.content)==null?void 0:p.data)==null?void 0:b.blocks,context:o,registeredComponents:n})]})}function Y(e){var i,a,l;const t=ht({canTrack:$(e.canTrack),content:e.content}),n=function(){var d;return xt(B(e.content).map(f=>({id:f.testVariationId,testRatio:f.testRatio})),((d=e.content)==null?void 0:d.id)||"")},o=function(){return B(e.content).map(d=>`.variant-${d.testVariationId} { display: none; } `).join("")},r=function(){var d;return t?{...e.content,testVariationId:(d=e.content)==null?void 0:d.id}:xn({item:e.content,canTrack:$(e.canTrack)})};return s.jsxs(s.Fragment,{children:[!e.__isNestedRender&&I!=="reactNative"?s.jsx(s.Fragment,{children:s.jsx(H,{scriptStr:yt()})}):null,t?s.jsxs(s.Fragment,{children:[s.jsx(N,{id:`variants-styles-${(i=e.content)==null?void 0:i.id}`,styles:o()}),s.jsx(H,{scriptStr:n()}),(a=B(e.content))==null?void 0:a.map(c=>s.jsx(le,{content:c,showContent:!1,classNameProp:void 0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t},c.testVariationId))]}):null,s.jsx(le,{content:r(),classNameProp:`variant-${(l=e.content)==null?void 0:l.id}`,showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t})]})}const Pn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return U({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{k.error("Could not fetch symbol content: ",n)})};async function Ne(e){var o,r,i,a;const t=function(){var c,d;return[e.attributes.className,"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(d=e.symbol)!=null&&d.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},n=((o=e.symbol)==null?void 0:o.content)||await Pn({symbol:e.symbol,builderContextValue:e.builderContext});return s.jsx("div",{...e.attributes,className:t(),children:s.jsx(Y,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderComponents),data:{...(r=e.symbol)==null?void 0:r.data,...e.builderContext.localState,...(i=n==null?void 0:n.data)==null?void 0:i.state},model:(a=e.symbol)==null?void 0:a.model,content:n})})}const Vn=L,$n=Y,ue={};function Fn(e){if(S()){Object.assign(ue,e);const t={type:"builder.settingsChange",data:ue};parent.postMessage(t,"*")}}const On=async e=>{var o,r,i;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((r=e.userAttributes)==null?void 0:r.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:q(e.searchParams||((i=e.url)==null?void 0:i.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await U(n)}};exports.Blocks=L;exports.Columns=pe;exports.ContentVariants=Y;exports.RenderBlocks=Vn;exports.RenderContent=$n;exports.Symbol=Ne;exports.Text=Se;exports._processContentResult=Oe;exports._track=je;exports.createRegisterComponentMessage=$t;exports.evaluate=O;exports.fastClone=R;exports.fetch=ve;exports.fetchBuilderProps=On;exports.fetchEntries=J;exports.fetchOneEntry=U;exports.getAllContent=An;exports.getBlockActions=at;exports.getBlockProperties=ge;exports.getBuilderSearchParams=q;exports.getContent=Rn;exports.getDefaultCanTrack=$;exports.getInteractionPropertiesForEvent=fn;exports.getSrcSet=ft;exports.init=$e;exports.isBrowser=S;exports.isEditing=F;exports.isJsScript=Bt;exports.isPreviewing=Bn;exports.logger=k;exports.register=Ae;exports.registerInsertMenu=ln;exports.setEditorSettings=Fn;exports.setupBrowserForEditing=un;exports.track=sn;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-cb675da6.js"),o=require("react"),_=require("./USE_SERVER_BUNDLE-02f64ca7.js"),M=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{role:"button",...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-35669e6c",children:e.text})}),t.jsx("style",{children:`.button-35669e6c {
|
|
2
|
-
all: unset;
|
|
3
|
-
}`})]})}function A(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function V(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:[" ",e.children," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function z(e){function a(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,x;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((x=window.parent)==null||x.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function h(){var s,x;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((x=window.parent)==null||x.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>h(),onKeyPress:s=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}`})]})}function D(e){return t.jsx("span",{children:e.children})}function U(e){var s,x,k,S;function a(){var b;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((b=e.image)!=null&&b.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(d)}else if(e.image&&!e.srcset)return c.getSrcSet(d);return c.getSrcSet(d)}function g(){var f;return(f=a==null?void 0:a())!=null&&f.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function h(){const f={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?f:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...h()},className:"builder-image"+(e.className?" "+e.className:"")+" img-497e0136",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((x=(s=e.builderBlock)==null?void 0:s.children)!=null&&x.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-497e0136",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(S=(k=e.builderBlock)==null?void 0:k.children)!=null&&S.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-497e0136-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-497e0136 {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transition: opacity 0.2s ease-in-out;
|
|
10
|
-
}.div-497e0136 {
|
|
11
|
-
width: 100%;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
font-size: 0;
|
|
14
|
-
}.div-497e0136-2 {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}`})]})}function H(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function O(e){var h;function a(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...e.attributes,...a()}}return t.jsx("video",{...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(h=e.attributes)==null?void 0:h.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},src:e.video||"no-src",poster:e.posterImage})}function J(e){const a=o.useRef(null),[g,h]=o.useState(()=>[]),[s,x]=o.useState(()=>[]),[k,S]=o.useState(()=>!1);function f(){if(!a.current||!a.current.getElementsByTagName)return;const d=a.current.getElementsByTagName("script");for(let b=0;b<d.length;b++){const v=d[b];if(v.src&&!g.includes(v.src)){g.push(v.src);const y=document.createElement("script");y.async=!0,y.src=v.src,document.head.appendChild(y)}else if(c.isJsScript(v)&&!s.includes(v.innerText))try{s.push(v.innerText),new Function(v.innerText)()}catch(y){console.warn("`Embed`: Error running script:",y)}}}return o.useEffect(()=>{a.current&&!k&&(S(!0),f())},[a.current,k]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function G(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function $(e){const a=o.useRef(null),[g,h]=o.useState(()=>[]),[s,x]=o.useState(()=>[]);return o.useEffect(()=>{var S;if(!((S=a.current)!=null&&S.getElementsByTagName)||typeof window>"u")return;const k=a.current.getElementsByTagName("script");for(let f=0;f<k.length;f++){const d=k[f];if(d.src){if(g.includes(d.src))continue;g.push(d.src);const b=document.createElement("script");b.async=!0,b.src=d.src,document.head.appendChild(b)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(s.includes(d.innerText))continue;try{s.push(d.innerText),new Function(d.innerText)()}catch(b){console.warn("`CustomCode`: Error running script:",b)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Q=o.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function X(e){var R,I,P,T,F;const a=o.useRef(null),[g,h]=o.useState(()=>0);function s(n){var r,l,u,m,B;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(l=e.builderContextSignal.content)==null?void 0:l.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((B=(m=e.builderContextSignal.content)==null?void 0:m.meta)==null?void 0:B.breakpoints)}};_.postPreviewContent({value:i,key:i.id}).then(()=>{q.refresh()})}o.useState(()=>0);const[x,k]=o.useState(()=>!1);function S(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const l=i.data,{breakpoints:u,contentId:m}=l;if(!m||m!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&s({meta:{breakpoints:u}}),h(g+1);break}case"builder.contentUpdate":{const l=i.data,u=l.key||l.alias||l.entry||l.modelName,m=l.data;u===e.model&&(s(m),h(g+1));break}}}function f(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[d,b]=o.useState(()=>({})),[v,y]=o.useState(()=>!1);function N(n){var i,r;if(e.builderContextSignal.content){const l=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:l!==u?l:void 0,...c.getInteractionPropertiesForEvent(n),unique:!v})}v||y(!0)}function L(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function K({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,m;const l={...e.builderContextSignal.rootState,[i]:r};(m=(u=e.builderContextSignal).rootSetState)==null||m.call(u,l),d[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([l,u])=>{if(u&&(!d[l]||c.isEditing())){const m=L(u);K({url:m,key:l})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){h(g+1),window.addEventListener("message",S),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var l;const r=c.createRegisterComponentMessage(i);(l=window.parent)==null||l.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),l=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||l===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(m=>{m&&s(m)})}const q=M.useRouter();return o.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),o.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),o.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const l=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,m=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:m,variationId:l!==u?l:void 0})}c.isPreviewing()&&a.current}},[]),o.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),f(),C(),E()},[]),o.useEffect(()=>{},[e.content]),o.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",S),window.addEventListener("message",S))},[x]),o.useEffect(()=>{f()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),o.useEffect(()=>{C()},[(T=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:T.httpRequests]),o.useEffect(()=>{E()},[e.builderContextSignal.rootState]),o.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",S),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:o.createElement("div",{key:g,ref:a,onClick:n=>N(n),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:e.classNameProp},e.children)}):null})}exports.BlockWrapper=V;exports.BlocksWrapper=z;exports.Button=W;exports.CustomCode=$;exports.Embed=J;exports.EnableEditor=X;exports.FragmentComponent=D;exports.Image=U;exports.ImgComponent=G;exports.InteractiveElement=A;exports.SectionComponent=H;exports.Video=O;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-cb675da6.js");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-b8de5bb9.js"),o=require("react"),_=require("./USE_SERVER_BUNDLE-ddf14d3b.js"),M=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{role:"button",...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-35669e6c",children:e.text})}),t.jsx("style",{children:`.button-35669e6c {
|
|
2
|
-
all: unset;
|
|
3
|
-
}`})]})}function A(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function V(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:[" ",e.children," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function z(e){function a(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,x;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((x=window.parent)==null||x.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function h(){var s,x;c.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((x=window.parent)==null||x.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>h(),onKeyPress:s=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
align-items: stretch;
|
|
7
|
-
}`})]})}function D(e){return t.jsx("span",{children:e.children})}function U(e){var s,x,k,S;function a(){var b;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((b=e.image)!=null&&b.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(d)}else if(e.image&&!e.srcset)return c.getSrcSet(d);return c.getSrcSet(d)}function g(){var f;return(f=a==null?void 0:a())!=null&&f.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function h(){const f={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?f:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...h()},className:"builder-image"+(e.className?" "+e.className:"")+" img-497e0136",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((x=(s=e.builderBlock)==null?void 0:s.children)!=null&&x.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-497e0136",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(S=(k=e.builderBlock)==null?void 0:k.children)!=null&&S.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-497e0136-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-497e0136 {
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transition: opacity 0.2s ease-in-out;
|
|
10
|
-
}.div-497e0136 {
|
|
11
|
-
width: 100%;
|
|
12
|
-
pointer-events: none;
|
|
13
|
-
font-size: 0;
|
|
14
|
-
}.div-497e0136-2 {
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: column;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
}`})]})}function H(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function O(e){var h;function a(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...e.attributes,...a()}}return t.jsx("video",{...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(h=e.attributes)==null?void 0:h.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},src:e.video||"no-src",poster:e.posterImage})}function J(e){const a=o.useRef(null),[g,h]=o.useState(()=>[]),[s,x]=o.useState(()=>[]),[k,S]=o.useState(()=>!1);function f(){if(!a.current||!a.current.getElementsByTagName)return;const d=a.current.getElementsByTagName("script");for(let b=0;b<d.length;b++){const v=d[b];if(v.src&&!g.includes(v.src)){g.push(v.src);const y=document.createElement("script");y.async=!0,y.src=v.src,document.head.appendChild(y)}else if(c.isJsScript(v)&&!s.includes(v.innerText))try{s.push(v.innerText),new Function(v.innerText)()}catch(y){console.warn("`Embed`: Error running script:",y)}}}return o.useEffect(()=>{a.current&&!k&&(S(!0),f())},[a.current,k]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function G(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function $(e){const a=o.useRef(null),[g,h]=o.useState(()=>[]),[s,x]=o.useState(()=>[]);return o.useEffect(()=>{var S;if(!((S=a.current)!=null&&S.getElementsByTagName)||typeof window>"u")return;const k=a.current.getElementsByTagName("script");for(let f=0;f<k.length;f++){const d=k[f];if(d.src){if(g.includes(d.src))continue;g.push(d.src);const b=document.createElement("script");b.async=!0,b.src=d.src,document.head.appendChild(b)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(s.includes(d.innerText))continue;try{s.push(d.innerText),new Function(d.innerText)()}catch(b){console.warn("`CustomCode`: Error running script:",b)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Q=o.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function X(e){var R,I,P,T,F;const a=o.useRef(null),[g,h]=o.useState(()=>0);function s(n){var r,l,u,m,B;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(l=e.builderContextSignal.content)==null?void 0:l.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((B=(m=e.builderContextSignal.content)==null?void 0:m.meta)==null?void 0:B.breakpoints)}};_.postPreviewContent({value:i,key:i.id}).then(()=>{q.refresh()})}o.useState(()=>0);const[x,k]=o.useState(()=>!1);function S(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const l=i.data,{breakpoints:u,contentId:m}=l;if(!m||m!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&s({meta:{breakpoints:u}}),h(g+1);break}case"builder.contentUpdate":{const l=i.data,u=l.key||l.alias||l.entry||l.modelName,m=l.data;u===e.model&&(s(m),h(g+1));break}}}function f(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[d,b]=o.useState(()=>({})),[v,y]=o.useState(()=>!1);function N(n){var i,r;if(e.builderContextSignal.content){const l=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:l!==u?l:void 0,...c.getInteractionPropertiesForEvent(n),unique:!v})}v||y(!0)}function L(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function K({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,m;const l={...e.builderContextSignal.rootState,[i]:r};(m=(u=e.builderContextSignal).rootSetState)==null||m.call(u,l),d[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([l,u])=>{if(u&&(!d[l]||c.isEditing())){const m=L(u);K({url:m,key:l})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){h(g+1),window.addEventListener("message",S),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var l;const r=c.createRegisterComponentMessage(i);(l=window.parent)==null||l.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),l=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||l===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(m=>{m&&s(m)})}const q=M.useRouter();return o.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),o.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),o.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const l=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,m=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:m,variationId:l!==u?l:void 0})}c.isPreviewing()&&a.current}},[]),o.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),f(),C(),E()},[]),o.useEffect(()=>{},[e.content]),o.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",S),window.addEventListener("message",S))},[x]),o.useEffect(()=>{f()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),o.useEffect(()=>{C()},[(T=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:T.httpRequests]),o.useEffect(()=>{E()},[e.builderContextSignal.rootState]),o.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",S),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:o.createElement("div",{key:g,ref:a,onClick:n=>N(n),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:e.classNameProp},e.children)}):null})}exports.BlockWrapper=V;exports.BlocksWrapper=z;exports.Button=W;exports.CustomCode=$;exports.Embed=J;exports.EnableEditor=X;exports.FragmentComponent=D;exports.Image=U;exports.ImgComponent=G;exports.InteractiveElement=A;exports.SectionComponent=H;exports.Video=O;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-b8de5bb9.js");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";const lruCache=require("lru-cache"),jsxRuntime=require("react/jsx-runtime"),react=require("react"),USE_CLIENT_BUNDLE=require("./USE_CLIENT_BUNDLE-9a315fd7.js");require("next/navigation");const fastClone=e=>JSON.parse(JSON.stringify(e)),SIZES={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},getMaxWidthQueryForSize=(e,t=SIZES)=>`@media (max-width: ${t[e].max}px)`,getSizesForBreakpoints=({small:e,medium:t})=>{const n=fastClone(SIZES);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const i=n.medium.max+1;return n.large={max:2e3,min:i,default:i+1},n},TARGET="rsc",MSG_PREFIX="[Builder.io]: ",logger={log:(...e)=>console.log(MSG_PREFIX,...e),error:(...e)=>console.error(MSG_PREFIX,...e),warn:(...e)=>console.warn(MSG_PREFIX,...e),debug:(...e)=>console.debug(MSG_PREFIX,...e)};function isBrowser(){return typeof window<"u"&&typeof document<"u"}function isIframe(){return isBrowser()&&window.self!==window.top}function isEditing(){return isIframe()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const getLocation=()=>{if(isBrowser()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},getUserAgent=()=>typeof navigator=="object"&&navigator.userAgent||"",getUserAttributes=()=>{const e=getUserAgent(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||TARGET==="reactNative"}},n=e.match(/Tablet|iPad/i),o=getLocation();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},getFunctionArguments=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),getBuilderGlobals=()=>({isEditing:isEditing(),isBrowser:isBrowser(),isServer:!isBrowser(),getUserAttributes:()=>getUserAttributes()}),parseCode=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,runInBrowser=({code:e,builder:t,context:n,event:o,localState:r,rootSetState:i,rootState:a})=>{const c=getFunctionArguments({builder:t,context:n,event:o,state:flattenState(a,r,i)});return new Function(...c.map(([s])=>s),e)(...c.map(([,s])=>s))};function flattenState(e,t,n){if(e===t)throw new Error("rootState === localState");return new Proxy(e,{get:(o,r)=>t&&r in t?t[r]:e[r],set:(o,r,i)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return e[r]=i,n==null||n(e),!0}})}const noop=()=>null;let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const set=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((r,i,a)=>Object(r[i])===r[i]?r[i]:r[i]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e},ivm=safeDynamicRequire("isolated-vm"),getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
|
|
2
|
-
var refToProxy = (obj) => {
|
|
3
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
4
|
-
return obj;
|
|
5
|
-
}
|
|
6
|
-
return new Proxy({}, {
|
|
7
|
-
get(target, key) {
|
|
8
|
-
if (key === 'copySync') {
|
|
9
|
-
return () => obj.copySync();
|
|
10
|
-
}
|
|
11
|
-
const val = obj.getSync(key);
|
|
12
|
-
if (typeof val?.getSync === 'function') {
|
|
13
|
-
return refToProxy(val);
|
|
14
|
-
}
|
|
15
|
-
return val;
|
|
16
|
-
},
|
|
17
|
-
set(target, key, value) {
|
|
18
|
-
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
19
|
-
obj.setSync(key, v);
|
|
20
|
-
${BUILDER_SET_STATE_NAME}(key, value)
|
|
21
|
-
},
|
|
22
|
-
deleteProperty(target, key) {
|
|
23
|
-
obj.deleteSync(key);
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
`,processCode=({code:e,args:t})=>{const n=t.map(([o])=>`var ${o} = refToProxy(${getSyncValName(o)}); `).join("");return`
|
|
28
|
-
${REF_TO_PROXY_FN}
|
|
29
|
-
${n}
|
|
30
|
-
function theFunction() {
|
|
31
|
-
${e}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
let output = theFunction()
|
|
35
|
-
|
|
36
|
-
if (typeof output === 'object' && output !== null) {
|
|
37
|
-
output = JSON.stringify(output.copySync ? output.copySync() : output);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
output;
|
|
41
|
-
`},getIsolateContext=()=>new ivm.Isolate({memoryLimit:128}).createContextSync(),runInNode=({code:e,builder:t,context:n,event:o,localState:r,rootSetState:i,rootState:a})=>{const c=fastClone({...a,...r}),s=getFunctionArguments({builder:t,context:n,event:o,state:c}),u=getIsolateContext(),m=u.global;m.setSync("global",m.derefInto()),m.setSync("log",function(...l){console.log(...l)}),m.setSync(BUILDER_SET_STATE_NAME,function(l,f){set(a,l,f),i==null||i(a)}),s.forEach(([l,f])=>{const d=typeof f=="object"?new ivm.Reference(l==="builder"?{...f,getUserAttributes:()=>f.getUserAttributes()}:f):null;m.setSync(getSyncValName(l),d)}),m.setSync(INJECTED_IVM_GLOBAL,ivm);const h=processCode({code:e,args:s}),p=u.evalSync(h);try{return JSON.parse(p)}catch{return p}},chooseBrowserOrServerEval=e=>isBrowser()?runInBrowser(e):runInNode(e);function evaluate({code:e,context:t,localState:n,rootState:o,rootSetState:r,event:i,isExpression:a=!0}){if(e===""){logger.warn("Skipping evaluation of empty code block.");return}const c={code:parseCode(e,{isExpression:a}),builder:getBuilderGlobals(),context:t,event:i,rootSetState:r,rootState:o,localState:n};try{return chooseBrowserOrServerEval(c)}catch(s){logger.error("Failed code evaluation: "+s.message,{code:e});return}}function transformBlock(e){return e}const evaluateBindings=({block:e,context:t,localState:n,rootState:o,rootSetState:r})=>{if(!e.bindings)return e;const i=fastClone(e),a={...i,properties:{...i.properties},actions:{...i.actions}};for(const c in e.bindings){const s=e.bindings[c],u=evaluate({code:s,localState:n,rootState:o,rootSetState:r,context:t});set(a,c,u)}return a};function getProcessedBlock({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:r,rootSetState:i}){const a=e;return n?evaluateBindings({block:a,localState:o,rootState:r,rootSetState:i,context:t}):a}const camelToKebabCase=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),checkIsDefined=e=>e!=null,convertStyleMapToCSSArray=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${camelToKebabCase(n)}: ${o};`}).filter(checkIsDefined),convertStyleMapToCSS=e=>convertStyleMapToCSSArray(e).join(`
|
|
42
|
-
`),createCssClass=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
|
|
43
|
-
${convertStyleMapToCSS(n)}
|
|
44
|
-
}`;return e?`${e} {
|
|
45
|
-
${o}
|
|
46
|
-
}`:o};function InlinedStyles(e){return jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function BlockStyles(e){const t=function(){const r=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return checkIsDefined(r.hide)?!r.hide:checkIsDefined(r.show)?r.show:!0},n=function(){var d;const r=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),i=r.responsiveStyles,a=e.context.content,c=getSizesForBreakpoints(((d=a==null?void 0:a.meta)==null?void 0:d.breakpoints)||{}),s=i==null?void 0:i.large,u=i==null?void 0:i.medium,m=i==null?void 0:i.small,h=r.id;if(!h)return"";const p=s?createCssClass({className:h,styles:s}):"",l=u?createCssClass({className:h,styles:u,mediaQuery:getMaxWidthQueryForSize("medium",c)}):"",f=m?createCssClass({className:h,styles:m,mediaQuery:getMaxWidthQueryForSize("small",c)}):"";return[p,l,f].join(" ")};return jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()&&t()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:n()})}):null})}function getBlockComponentOptions(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const EMPTY_HTML_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],isEmptyHtmlElement=e=>typeof e=="string"&&EMPTY_HTML_ELEMENTS.includes(e.toLowerCase()),getComponent=({block:e,context:t,registeredComponents:n})=>{var i;const o=(i=getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:i.name;if(!o)return null;const r=n[o];if(r)return r;console.warn(`
|
|
47
|
-
Could not find a registered component named "${o}".
|
|
48
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},getRepeatItemData=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const r=evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const i=n.collection.split(".").pop(),a=n.itemName||(i?i+"Item":"item");return r.map((s,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:s,[a]:s,[`$${a}Index`]:u}},block:o}))};function RepeatedBlock(e){const t=e.repeatContext;return jsxRuntime.jsx(Block,{block:e.block,context:t,registeredComponents:e.registeredComponents})}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}const getEventHandlerName=e=>`on${capitalizeFirstLetter(e)}`,createEventHandler=(e,t)=>n=>evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function getBlockActions(e){const t={},n=e.block.actions??{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let i=getEventHandlerName(o);if(e.stripPrefix)switch(TARGET){case"vue2":case"vue3":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=createEventHandler(r,e)}return t}function transformBlockProperties(e){return e.className=e.class,delete e.class,e}const extractRelevantRootBlockProperties=e=>({href:e.href});function getBlockProperties({block:e,context:t}){var o;const n={...extractRelevantRootBlockProperties(e),...e.properties,"builder-id":e.id,style:e.style?getStyleAttribute(e.style):void 0,class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return transformBlockProperties(n)}function getStyleAttribute(e){switch(TARGET){case"svelte":case"vue2":case"vue3":case"solid":return convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const getWrapperProps=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:r,isInteractive:i,contextValue:a})=>i?{Wrapper:o,block:t,context:n,wrapperProps:e}:{...e,...r?{attributes:getBlockProperties({block:t,context:a})}:{}};function ComponentRef(e){var n,o;const t=e.isInteractive?USE_CLIENT_BUNDLE.InteractiveElement:e.componentRef;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.componentRef?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(t,{...getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:[(n=e.blockChildren)==null?void 0:n.map(r=>jsxRuntime.jsx(Block,{block:r,context:e.context,registeredComponents:e.registeredComponents},"block-"+r.id)),(o=e.blockChildren)==null?void 0:o.map(r=>jsxRuntime.jsx(BlockStyles,{block:r,context:e.context},"block-style-"+r.id))]})}):null})}function Block(e){var u,m,h,p;const t=function(){return getComponent({block:e.block,context:e.context,registeredComponents:e.registeredComponents})},n=function(){return getRepeatItemData({block:e.block,context:e.context})},o=function(){return n()?e.block:getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})},r=function(){return e.block.tagName||"div"},i=function(){return"hide"in o()?!o().hide:"show"in o()?o().show:!0},a=function(){var d;return!((d=t())!=null&&d.component)&&!n()?o().children??[]:[]},c=function(){var f,d,x,b,g;return{blockChildren:o().children??[],componentRef:(f=t())==null?void 0:f.component,componentOptions:{...getBlockComponentOptions(o()),builderContext:e.context,...((d=t())==null?void 0:d.name)==="Symbol"||((x=t())==null?void 0:x.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:s,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((b=t())==null?void 0:b.noWrap)===!0,isInteractive:!((g=t())!=null&&g.isRSC)}},s=e.context;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:i()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(u=t())!=null&&u.noWrap?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ComponentRef,{...c()})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[isEmptyHtmlElement(r())?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(USE_CLIENT_BUNDLE.BlockWrapper,{Wrapper:r(),block:o(),context:e.context,hasChildren:!1})}):null,!isEmptyHtmlElement(r())&&n()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(m=n())==null?void 0:m.map((l,f)=>jsxRuntime.jsx(RepeatedBlock,{repeatContext:l.context,block:l.block,registeredComponents:e.registeredComponents},f))}):null,!isEmptyHtmlElement(r())&&!n()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(USE_CLIENT_BUNDLE.BlockWrapper,{Wrapper:r(),block:o(),context:e.context,hasChildren:!0,children:[jsxRuntime.jsx(ComponentRef,{...c()}),(h=a())==null?void 0:h.map(l=>jsxRuntime.jsx(Block,{block:l,context:s,registeredComponents:e.registeredComponents},"block-"+l.id)),(p=a())==null?void 0:p.map(l=>jsxRuntime.jsx(BlockStyles,{block:l,context:s},"block-style-"+l.id))]})}):null]})}):null})}function Blocks(e){var t,n;return jsxRuntime.jsxs(USE_CLIENT_BUNDLE.BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,children:[e.blocks?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(t=e.blocks)==null?void 0:t.map(o=>jsxRuntime.jsx(Block,{block:o,context:e.context,registeredComponents:e.registeredComponents},"render-block-"+o.id))}):null,e.blocks?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(n=e.blocks)==null?void 0:n.map(o=>jsxRuntime.jsx(BlockStyles,{block:o,context:e.context},"block-style-"+o.id))}):null]})}function Columns(e){var l;const t=typeof e.space=="number"?e.space||0:20,n=e.columns||[],o=e.stackColumnsAt||"tablet",r=function(d){var x;return((x=n[d])==null?void 0:x.width)||100/n.length},i=function(d){const x=t*(n.length-1)/n.length;return`calc(${r(d)}% - ${x}px)`},a=function({stackedStyle:d,desktopStyle:x}){return o==="tablet"?d:x},c=function({stackedStyle:d,desktopStyle:x}){return o==="never"?x:d},s=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",u=function(){return{"--flex-dir":s,"--flex-dir-tablet":a({stackedStyle:s,desktopStyle:"row"})}},m=function(d){const x=d===0?0:t,b=i(d),g=`${x}px`,v="100%",S=0;return{width:b,["marginLeft"]:g,"--column-width-mobile":c({stackedStyle:v,desktopStyle:b}),"--column-margin-left-mobile":c({stackedStyle:S,desktopStyle:g}),"--column-width-tablet":a({stackedStyle:v,desktopStyle:b}),"--column-margin-left-tablet":a({stackedStyle:S,desktopStyle:g})}},h=function(d){var b,g;return getSizesForBreakpoints(((g=(b=e.builderContext.content)==null?void 0:b.meta)==null?void 0:g.breakpoints)||{})[d].max},p=function(){return`
|
|
49
|
-
@media (max-width: ${h("medium")}px) {
|
|
50
|
-
.${e.builderBlock.id}-breakpoints {
|
|
51
|
-
flex-direction: var(--flex-dir-tablet);
|
|
52
|
-
align-items: stretch;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
56
|
-
width: var(--column-width-tablet) !important;
|
|
57
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@media (max-width: ${h("small")}px) {
|
|
62
|
-
.${e.builderBlock.id}-breakpoints {
|
|
63
|
-
flex-direction: var(--flex-dir);
|
|
64
|
-
align-items: stretch;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
68
|
-
width: var(--column-width-mobile) !important;
|
|
69
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
`};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-666689ca`,style:u(),children:[jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:p()})}),(l=e.columns)==null?void 0:l.map((f,d)=>react.createElement("div",{className:"builder-column div-666689ca-2",style:m(d),key:d},jsxRuntime.jsx(Blocks,{path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,blocks:f.blocks})))]}),jsxRuntime.jsx("style",{children:`.div-666689ca {
|
|
73
|
-
display: flex;
|
|
74
|
-
line-height: normal;
|
|
75
|
-
}.div-666689ca-2 {
|
|
76
|
-
display: flex;
|
|
77
|
-
flex-direction: column;
|
|
78
|
-
align-items: stretch;
|
|
79
|
-
}`})]})}function removeProtocol(e){return e.replace(/http(s)?:/,"")}function updateQueryParam(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function getShopifyImageUrl(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return removeProtocol(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],i=t.match("x")?t:`${t}x`;return removeProtocol(`${o[0]}_${i}${r}`)}return null}function getSrcSet(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${updateQueryParam(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[getShopifyImageUrl(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const getVariants=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),checkShouldRunVariants=({canTrack:e,content:t})=>!(!(getVariants(t).length>0)||!e||isBrowser());function bldrAbTest(e,t,n){var a;function o(){function c(f,d,x){let b="";if(x){const g=new Date;g.setTime(g.getTime()+x*24*60*60*1e3),b="; expires="+g.toUTCString()}document.cookie=f+"="+(d||"")+b+"; path=/; Secure; SameSite=None"}function s(f){const d=f+"=",x=document.cookie.split(";");for(let b=0;b<x.length;b++){let g=x[b];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(d)===0)return g.substring(d.length,g.length)}return null}const u=`builder.tests.${e}`,m=s(u),h=t.map(f=>f.id).concat(e);if(m&&h.includes(m))return m;let p=0;const l=Math.random();for(let f=0;f<t.length;f++){const d=t[f],x=d.testRatio;if(p+=x,l<p)return c(u,d.id),d.id}return c(u,e),e}const r=o(),i=(a=document.currentScript)==null?void 0:a.previousElementSibling;if(n){i.remove();const c=document.currentScript;c==null||c.remove()}else{const c=t.concat({id:e}).filter(s=>s.id!==r).map(s=>`.variant-${s.id} { display: none; }
|
|
80
|
-
`).join("");i.innerHTML=c}}function bldrCntntScrpt(e,t,n){var s;if(!navigator.cookieEnabled)return;function o(u){const m=u+"=",h=document.cookie.split(";");for(let p=0;p<h.length;p++){let l=h[p];for(;l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(m)===0)return l.substring(m.length,l.length)}return null}const r=`builder.tests.${t}`,i=o(r),a=(s=document.currentScript)==null?void 0:s.parentElement,c=e===t;if(i===e){if(c)return;a==null||a.removeAttribute("hidden"),a==null||a.removeAttribute("aria-hidden")}else{c&&(n?a==null||a.remove():(a==null||a.setAttribute("hidden","true"),a==null||a.setAttribute("aria-hidden","true")));return}}const getIsHydrationTarget=e=>e==="react"||e==="reactNative",isHydrationTarget=getIsHydrationTarget(TARGET),AB_TEST_FN_NAME="builderIoAbTest",CONTENT_FN_NAME="builderIoRenderContent",getScriptString=()=>{const e=bldrAbTest.toString().replace(/\s+/g," "),t=bldrCntntScrpt.toString().replace(/\s+/g," ");return`
|
|
81
|
-
window.${AB_TEST_FN_NAME} = ${e}
|
|
82
|
-
window.${CONTENT_FN_NAME} = ${t}
|
|
83
|
-
`},getVariantsScriptString=(e,t)=>`
|
|
84
|
-
window.${AB_TEST_FN_NAME}("${t}",${JSON.stringify(e)}, ${isHydrationTarget})`,getRenderContentScriptString=({contentId:e,variationId:t})=>`
|
|
85
|
-
window.${CONTENT_FN_NAME}("${t}", "${e}", ${isHydrationTarget})`,componentInfo$a={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},componentInfo$9={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(i=>!i.get("width"))||n.reduce((c,s)=>c+s.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},componentInfo$8={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},componentInfo$7={name:"Image",static:!0,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",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,c=6e4){return new Promise((s,u)=>{const m=document.createElement("img");let h=!1;m.onload=()=>{h=!0,s(m)},m.addEventListener("error",p=>{console.warn("Image load failed",p.error),u(p.error)}),m.src=a,setTimeout(()=>{h||u(new Error("Image load timed out"))},c)})}function o(a){return Math.round(a*1e3)/1e3}const r=e.get("image"),i=e.get("aspectRatio");if(fetch(r).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!i||i===.7041))return n(r).then(a=>{const c=e.get("aspectRatio");e.get("image")===r&&(!c||c===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",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",advanced:!0,defaultValue:.7041}]},componentInfo$6={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{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>"}}}]},componentInfo$5={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},componentInfo$4={name:"Text",static:!0,isRSC:!0,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",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Text(e){var t;return jsxRuntime.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const componentInfo$3={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},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",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},componentInfo$2={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},SCRIPT_MIME_TYPES=["text/javascript","application/javascript","application/ecmascript"],isJsScript=e=>SCRIPT_MIME_TYPES.includes(e.type),componentInfo$1={name:"Raw:Img",hideFromInsertMenu:!0,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",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},componentInfo={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},getDefaultRegisteredComponents=()=>[{component:USE_CLIENT_BUNDLE.Button,...componentInfo$a},{component:Columns,...componentInfo$9},{component:USE_CLIENT_BUNDLE.CustomCode,...componentInfo},{component:USE_CLIENT_BUNDLE.Embed,...componentInfo$2},{component:USE_CLIENT_BUNDLE.FragmentComponent,...componentInfo$8},{component:USE_CLIENT_BUNDLE.Image,...componentInfo$7},{component:USE_CLIENT_BUNDLE.ImgComponent,...componentInfo$1},{component:USE_CLIENT_BUNDLE.SectionComponent,...componentInfo$6},{component:Symbol$1,...componentInfo$5},{component:Text,...componentInfo$4},{component:USE_CLIENT_BUNDLE.Video,...componentInfo$3}],components=[],createRegisterComponentMessage=e=>({type:"builder.registerComponent",data:serializeComponentInfo(e)}),serializeFn=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},serializeValue=e=>typeof e=="function"?serializeFn(e):fastClone(e),serializeComponentInfo=({inputs:e,...t})=>({...fastClone(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,i])=>({...o,[r]:serializeValue(i)}),{}))}),getCssFromFont=e=>{var i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((i=e==null?void 0:e.files)==null?void 0:i.regular);let r="";if(o&&t&&n&&(r+=`
|
|
86
|
-
@font-face {
|
|
87
|
-
font-family: "${t}";
|
|
88
|
-
src: local("${n}"), url('${o}') format('woff2');
|
|
89
|
-
font-display: fallback;
|
|
90
|
-
font-weight: 400;
|
|
91
|
-
}
|
|
92
|
-
`.trim()),e.files)for(const a in e.files){if(!(String(Number(a))===a))continue;const s=e.files[a];s&&s!==o&&(r+=`
|
|
93
|
-
@font-face {
|
|
94
|
-
font-family: "${t}";
|
|
95
|
-
src: url('${s}') format('woff2');
|
|
96
|
-
font-display: fallback;
|
|
97
|
-
font-weight: ${a};
|
|
98
|
-
}
|
|
99
|
-
`.trim())}return r},getFontCss=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>getCssFromFont(n)))==null?void 0:t.join(" "))||""},getCss=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function ContentStyles(e){const t=`
|
|
100
|
-
${getCss({cssCode:e.cssCode,contentId:e.contentId})}
|
|
101
|
-
${getFontCss({customFonts:e.customFonts})}
|
|
102
|
-
|
|
103
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
104
|
-
margin: 0;
|
|
105
|
-
}
|
|
106
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
107
|
-
color: inherit;
|
|
108
|
-
line-height: inherit;
|
|
109
|
-
letter-spacing: inherit;
|
|
110
|
-
font-weight: inherit;
|
|
111
|
-
font-size: inherit;
|
|
112
|
-
text-align: inherit;
|
|
113
|
-
font-family: inherit;
|
|
114
|
-
}
|
|
115
|
-
`.trim();return jsxRuntime.jsx(InlinedStyles,{styles:t})}const getContextStateInitialValue=({content:e,data:t,locale:n})=>{var i,a,c;const o={};(a=(i=e==null?void 0:e.data)==null?void 0:i.inputs)==null||a.forEach(s=>{var u;s.name&&s.defaultValue!==void 0&&((u=e==null?void 0:e.data)!=null&&u.state)&&e.data.state[s.name]===void 0&&(o[s.name]=s.defaultValue)});const r={...(c=e==null?void 0:e.data)==null?void 0:c.state,...t,...n?{locale:n}:{}};return{...o,...r}},getContentInitialValue=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function getGlobalThis(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function getFetch(){const e=getGlobalThis().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
116
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const fetch$1=getFetch(),getTopLevelDomain=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},getCookieSync=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){logger.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},getCookie=async e=>getCookieSync(e),stringifyCookie=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(checkIsDefined).join("; "),SECURE_CONFIG=[["secure",""],["SameSite","None"]],createCookieString=({name:e,value:t,expires:n})=>{const r=(isBrowser()?location.protocol==="https:":!0)?SECURE_CONFIG:[[]],i=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...i,["path","/"],["domain",getTopLevelDomain(window.location.hostname)],...r];return stringifyCookie(a)},setCookie=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=createCookieString({name:e,value:t,expires:n});document.cookie=r}catch(r){logger.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}};function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function uuid(){return uuidv4().replace(/-/g,"")}const SESSION_LOCAL_STORAGE_KEY="builderSessionId",getSessionId=async({canTrack:e})=>{if(!e)return;const t=await getCookie({name:SESSION_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createSessionId();return setSessionId({id:n,canTrack:e}),n}},createSessionId=()=>uuid(),setSessionId=({id:e,canTrack:t})=>setCookie({name:SESSION_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getLocalStorage=()=>isBrowser()&&typeof localStorage<"u"?localStorage:void 0,getLocalStorageItem=({key:e,canTrack:t})=>{var n;try{return t?(n=getLocalStorage())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},setLocalStorageItem=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=getLocalStorage())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},VISITOR_LOCAL_STORAGE_KEY="builderVisitorId",getVisitorId=({canTrack:e})=>{if(!e)return;const t=getLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createVisitorId();return setVisitorId({id:n,canTrack:e}),n}},createVisitorId=()=>uuid(),setVisitorId=({id:e,canTrack:t})=>setLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getTrackingEventData=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await getSessionId({canTrack:e}),n=getVisitorId({canTrack:e});return{sessionId:t,visitorId:n}},createEvent=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await getTrackingEventData({canTrack:t}),userAttributes:getUserAttributes(),ownerId:n}});async function _track(e){if(!e.apiKey){logger.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!isEditing()&&(isBrowser()||TARGET==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await createEvent(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const track=e=>_track({...e,canTrack:!0}),SDK_VERSION="0.7.1-3",registry={};function register(e,t){let n=registry[e];if(n||(n=registry[e]=[]),n.push(t),isBrowser()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const registerInsertMenu=()=>{register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let isSetupForEditing=!1;const setupBrowserForEditing=(e={})=>{var t,n;isSetupForEditing||(isSetupForEditing=!0,isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:TARGET,version:SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var r,i;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const a=o.data.text,c=o.data.arguments||[],s=o.data.id,u=new Function(a);let m,h=null;try{m=u.apply(null,c)}catch(p){h=p}h?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:s,error:h.message}},"*"):m&&typeof m.then=="function"?m.then(p=>{var l;(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{id:s,result:p}},"*")}).catch(console.error):(i=window.parent)==null||i.postMessage({type:"builder.evaluateResult",data:{result:m,id:s}},"*");break}}})))};function round(e){return Math.round(e*1e3)/1e3}const findParentElement=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},findBuilderParent=e=>findParentElement(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),computeOffset=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,i=round(o/n.width),a=round(r/n.height);return{x:i,y:a}},getInteractionPropertiesForEvent=e=>{const t=e.target,n=t&&findBuilderParent(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?computeOffset({event:e,target:t}):void 0,builderTargetOffset:n?computeOffset({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},BUILDER_STORE_PREFIX="builder.tests",getContentTestKey=e=>`${BUILDER_STORE_PREFIX}.${e}`,getContentVariationCookie=({contentId:e})=>getCookie({name:getContentTestKey(e),canTrack:!0}),getContentVariationCookieSync=({contentId:e})=>getCookieSync({name:getContentTestKey(e),canTrack:!0}),setContentVariationCookie=({contentId:e,value:t})=>setCookie({name:getContentTestKey(e),value:t,canTrack:!0}),checkIsBuilderContentWithVariations=e=>checkIsDefined(e.id)&&checkIsDefined(e.variations)&&Object.keys(e.variations).length>0,getRandomVariationId=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const i in t){const a=(r=t[i])==null?void 0:r.testRatio;if(n+=a,o<n)return i}return e},getAndSetVariantId=e=>{const t=getRandomVariationId(e);return setContentVariationCookie({contentId:e.id,value:t}).catch(n=>{logger.error("could not store A/B test variation: ",n)}),t},getTestFields=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},handleABTestingSync=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!checkIsBuilderContentWithVariations(e))return e;const n=getContentVariationCookieSync({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),o=getTestFields({item:e,testGroupId:n});return{...e,...o}},handleABTesting=async({item:e,canTrack:t})=>{if(!t||!checkIsBuilderContentWithVariations(e))return e;const o=await getContentVariationCookie({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),r=getTestFields({item:e,testGroupId:o});return{...e,...r}},getDefaultCanTrack=e=>checkIsDefined(e)?e:!0,getIdFromSearchParams=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||logger.warn("No previewed ID found in search params."),n};function init(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new lruCache.LRUCache({max:500,ttl:1e3*60*5}))}function getPreviewContent(e){init();const t=getIdFromSearchParams(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function flatten(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const i=e[r],a=[t,r].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...flatten(i,a,n)}:{...o,[a]:i}},{})}const BUILDER_SEARCHPARAMS_PREFIX="builder.",BUILDER_OPTIONS_PREFIX="options.",convertSearchParamsToQueryObject=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},getBuilderSearchParams=e=>{if(!e)return{};const t=normalizeSearchParams(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)){const r=o.replace(BUILDER_SEARCHPARAMS_PREFIX,"").replace(BUILDER_OPTIONS_PREFIX,"");n[r]=t[o]}}),n},getBuilderSearchParamsFromWindow=()=>{if(!isBrowser())return{};const e=new URLSearchParams(window.location.search);return getBuilderSearchParams(e)},normalizeSearchParams=e=>e instanceof URLSearchParams?convertSearchParamsToQueryObject(e):e,DEFAULT_API_VERSION="v3",isPositiveNumber=e=>typeof e=="number"&&!isNaN(e)&&e>=0,generateContentUrl=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:r,model:i,apiKey:a,includeRefs:c=!0,enrich:s,locale:u,apiVersion:m=DEFAULT_API_VERSION,fields:h,omit:p,offset:l,cacheSeconds:f,staleCacheSeconds:d,sort:x,includeUnpublished:b}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(m))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${m}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const g=new URL(`https://cdn.builder.io/api/${m}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${c}${u?`&locale=${u}`:""}${s?`&enrich=${s}`:""}`);if(g.searchParams.set("omit",p||"meta.componentsUsed"),h&&g.searchParams.set("fields",h),Number.isFinite(l)&&l>-1&&g.searchParams.set("offset",String(Math.floor(l))),typeof b=="boolean"&&g.searchParams.set("includeUnpublished",String(b)),f&&isPositiveNumber(f)&&g.searchParams.set("cacheSeconds",String(f)),d&&isPositiveNumber(d)&&g.searchParams.set("staleCacheSeconds",String(d)),x){const y=flatten({sort:x});for(const C in y)g.searchParams.set(C,JSON.stringify(y[C]))}const v={...getBuilderSearchParamsFromWindow(),...normalizeSearchParams(e.options||{})},S=flatten(v);for(const y in S)g.searchParams.set(y,String(S[y]));if(o&&g.searchParams.set("userAttributes",JSON.stringify(o)),r){const y=flatten({query:r});for(const C in y)g.searchParams.set(C,JSON.stringify(y[C]))}return g},checkContentHasResults=e=>"results"in e;async function fetchOneEntry(e){const t=await fetchEntries({...e,limit:1});return t&&t.results[0]||null}const getContent=fetchOneEntry,_fetchContent=async e=>{const t=generateContentUrl(e);return await(await fetch$1(t.href)).json()},_processContentResult=async(e,t,n=generateContentUrl(e))=>{const o=getDefaultCanTrack(e.canTrack);if(n.search.includes("preview=")){const i=[];for(const a of t.results){const c=getPreviewContent(n.searchParams);i.push(c||a)}t.results=i}if(!o||!(isBrowser()||TARGET==="reactNative"))return t;try{const i=[];for(const a of t.results)i.push(await handleABTesting({item:a,canTrack:o}));t.results=i}catch(i){logger.error("Could not process A/B tests. ",i)}return t};async function fetchEntries(e){try{const t=generateContentUrl(e),n=await _fetchContent(e);return checkContentHasResults(n)?_processContentResult(e,n):(logger.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return logger.error("Error fetching data. ",t),null}}const getAllContent=fetchEntries;function isPreviewing(){return!isBrowser()||isEditing()?!1:location.search.indexOf("builder.preview=")!==-1}function InlinedScript(e){return jsxRuntime.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id})}function ContentComponent(e){var r,i,a,c,s,u,m,h,p;const t=getRenderContentScriptString({variationId:(r=e.content)==null?void 0:r.testVariationId,contentId:(i=e.content)==null?void 0:i.id}),n=[...getDefaultRegisteredComponents(),...components,...e.customComponents||[]].reduce((l,{component:f,...d})=>({...l,[d.name]:{component:f,...serializeComponentInfo(d)}}),{}),o={content:getContentInitialValue({content:e.content,data:e.data}),localState:void 0,rootState:getContextStateInitialValue({content:e.content,data:e.data,locale:e.locale}),rootSetState:void 0,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...getDefaultRegisteredComponents(),...components,...e.customComponents||[]].reduce((l,{component:f,...d})=>({...l,[d.name]:serializeComponentInfo(d)}),{}),inheritedStyles:{}};return jsxRuntime.jsxs(USE_CLIENT_BUNDLE.EnableEditor,{content:e.content,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,classNameProp:e.classNameProp,showContent:e.showContent,builderContextSignal:o,children:[e.isSsrAbTest?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:t})}):null,jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ContentStyles,{contentId:(a=o.content)==null?void 0:a.id,cssCode:(s=(c=o.content)==null?void 0:c.data)==null?void 0:s.cssCode,customFonts:(m=(u=o.content)==null?void 0:u.data)==null?void 0:m.customFonts})}),jsxRuntime.jsx(Blocks,{blocks:(p=(h=o.content)==null?void 0:h.data)==null?void 0:p.blocks,context:o,registeredComponents:n})]})}function ContentVariants(e){var i,a,c;const t=checkShouldRunVariants({canTrack:getDefaultCanTrack(e.canTrack),content:e.content}),n=function(){var u;return getVariantsScriptString(getVariants(e.content).map(m=>({id:m.testVariationId,testRatio:m.testRatio})),((u=e.content)==null?void 0:u.id)||"")},o=function(){return getVariants(e.content).map(u=>`.variant-${u.testVariationId} { display: none; } `).join("")},r=function(){var u;return t?{...e.content,testVariationId:(u=e.content)==null?void 0:u.id}:handleABTestingSync({item:e.content,canTrack:getDefaultCanTrack(e.canTrack)})};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!e.__isNestedRender&&TARGET!=="reactNative"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:getScriptString()})}):null,t?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(InlinedStyles,{id:`variants-styles-${(i=e.content)==null?void 0:i.id}`,styles:o()}),jsxRuntime.jsx(InlinedScript,{scriptStr:n()}),(a=getVariants(e.content))==null?void 0:a.map(s=>jsxRuntime.jsx(ContentComponent,{content:s,showContent:!1,classNameProp:void 0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t},s.testVariationId))]}):null,jsxRuntime.jsx(ContentComponent,{content:r(),classNameProp:`variant-${(c=e.content)==null?void 0:c.id}`,showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t})]})}const fetchSymbolContent=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{logger.error("Could not fetch symbol content: ",n)})};async function Symbol$1(e){var o,r,i,a;const t=function(){var s,u;return[e.attributes.className,"builder-symbol",(s=e.symbol)!=null&&s.inline?"builder-inline-symbol":void 0,(u=e.symbol)!=null&&u.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},n=((o=e.symbol)==null?void 0:o.content)||await fetchSymbolContent({symbol:e.symbol,builderContextValue:e.builderContext});return jsxRuntime.jsx("div",{...e.attributes,className:t(),children:jsxRuntime.jsx(ContentVariants,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderComponents),data:{...(r=e.symbol)==null?void 0:r.data,...e.builderContext.localState,...(i=n==null?void 0:n.data)==null?void 0:i.state},model:(a=e.symbol)==null?void 0:a.model,content:n})})}const RenderBlocks=Blocks,RenderContent=ContentVariants,settings={};function setEditorSettings(e){if(isBrowser()){Object.assign(settings,e);const t={type:"builder.settingsChange",data:settings};parent.postMessage(t,"*")}}const fetchBuilderProps=async e=>{var o,r,i;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((r=e.userAttributes)==null?void 0:r.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:getBuilderSearchParams(e.searchParams||((i=e.url)==null?void 0:i.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await fetchOneEntry(n)}};exports.Blocks=Blocks;exports.Columns=Columns;exports.ContentVariants=ContentVariants;exports.RenderBlocks=RenderBlocks;exports.RenderContent=RenderContent;exports.Symbol=Symbol$1;exports.Text=Text;exports._processContentResult=_processContentResult;exports._track=_track;exports.createRegisterComponentMessage=createRegisterComponentMessage;exports.evaluate=evaluate;exports.fastClone=fastClone;exports.fetch=fetch$1;exports.fetchBuilderProps=fetchBuilderProps;exports.fetchEntries=fetchEntries;exports.fetchOneEntry=fetchOneEntry;exports.getAllContent=getAllContent;exports.getBlockActions=getBlockActions;exports.getBlockProperties=getBlockProperties;exports.getBuilderSearchParams=getBuilderSearchParams;exports.getContent=getContent;exports.getDefaultCanTrack=getDefaultCanTrack;exports.getInteractionPropertiesForEvent=getInteractionPropertiesForEvent;exports.getSrcSet=getSrcSet;exports.init=init;exports.isBrowser=isBrowser;exports.isEditing=isEditing;exports.isJsScript=isJsScript;exports.isPreviewing=isPreviewing;exports.logger=logger;exports.register=register;exports.registerInsertMenu=registerInsertMenu;exports.setEditorSettings=setEditorSettings;exports.setupBrowserForEditing=setupBrowserForEditing;exports.track=track;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.7.1-3";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getPreviewContent(searchParams: URLSearchParams): import("../../types/builder-content").BuilderContent;
|