@builder.io/sdk-react 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/lib/browser/blocks-exports.cjs +187 -0
- package/lib/browser/blocks-exports.mjs +3441 -0
- package/lib/browser/index.cjs +1 -187
- package/lib/browser/index.mjs +26 -3449
- package/lib/browser/{server-entry-a595b1cf.cjs → server-entry-093e302c.cjs} +1 -1
- package/lib/browser/{server-entry-f6f9bdcb.js → server-entry-7839c812.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/blocks-0fc8e8d2.js +3385 -0
- package/lib/edge/blocks-exports.cjs +1 -0
- package/lib/edge/blocks-exports.mjs +16 -0
- package/lib/edge/blocks-f8688fcb.cjs +32 -0
- package/lib/edge/button-61181684.cjs +1 -0
- package/lib/edge/button-d9bbef90.js +29 -0
- package/lib/edge/columns-d152e266.cjs +28 -0
- package/lib/edge/columns-f7a9bca7.js +156 -0
- package/lib/edge/content-variants-cdcbcdd8.js +1711 -0
- package/lib/edge/content-variants-d2500971.cjs +133 -0
- package/lib/edge/custom-code-33b73ed1.js +44 -0
- package/lib/edge/custom-code-7390ba8b.cjs +1 -0
- package/lib/edge/dynamic-blocks-exports.cjs +39 -0
- package/lib/edge/dynamic-blocks-exports.mjs +37 -0
- package/lib/edge/dynamic-renderer-b5124984.js +9 -0
- package/lib/edge/dynamic-renderer-c00b8bcb.cjs +1 -0
- package/lib/edge/embed-11e03fa7.js +38 -0
- package/lib/edge/embed-9edce7df.cjs +1 -0
- package/lib/edge/form-ac531791.cjs +1 -0
- package/lib/edge/form-fb5fd55e.js +194 -0
- package/lib/edge/fragment-015b0912.js +8 -0
- package/lib/edge/fragment-61ef192d.cjs +1 -0
- package/lib/edge/get-class-prop-name-caee6506.cjs +1 -0
- package/lib/edge/get-class-prop-name-f22d7d53.js +18 -0
- package/lib/edge/image-6a3654d5.js +118 -0
- package/lib/edge/image-e4128296.cjs +17 -0
- package/lib/edge/img-317659e2.js +21 -0
- package/lib/edge/img-f2eeaa75.cjs +1 -0
- package/lib/edge/index.cjs +1 -207
- package/lib/edge/index.mjs +25 -5922
- package/lib/edge/input-526ea905.js +21 -0
- package/lib/edge/input-562438c4.cjs +1 -0
- package/lib/edge/section-68fbc212.js +26 -0
- package/lib/edge/section-70c8b709.cjs +1 -0
- package/lib/edge/select-17802399.js +21 -0
- package/lib/edge/select-d87a6280.cjs +1 -0
- package/lib/edge/server-entry-88f58ed4.cjs +2 -0
- package/lib/edge/{server-entry-f6f9bdcb.js → server-entry-e0830caf.js} +373 -372
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/slot-39b50f6b.cjs +1 -0
- package/lib/edge/slot-eb244885.js +33 -0
- package/lib/edge/submit-button-13d8d5a7.cjs +1 -0
- package/lib/edge/submit-button-71dd4015.js +8 -0
- package/lib/edge/symbol-bf773f2a.js +78 -0
- package/lib/edge/symbol-ee31bb7f.cjs +1 -0
- package/lib/edge/text-15f0a6f4.js +18 -0
- package/lib/edge/text-7fdbde16.cjs +1 -0
- package/lib/edge/video-66b20833.js +106 -0
- package/lib/edge/video-702696a8.cjs +1 -0
- package/lib/node/blocks-exports.cjs +227 -0
- package/lib/node/blocks-exports.mjs +3548 -0
- package/lib/node/index.cjs +1 -227
- package/lib/node/index.mjs +27 -3556
- package/lib/node/{server-entry-31b5d683.cjs → server-entry-0e638a4f.cjs} +1 -1
- package/lib/node/{server-entry-c2b6d198.js → server-entry-e1cc0803.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +19 -13
- package/types/blocks/button/index.d.ts +1 -0
- package/types/blocks/columns/index.d.ts +1 -0
- package/types/blocks/custom-code/index.d.ts +1 -0
- package/types/blocks/embed/index.d.ts +1 -0
- package/types/blocks/form/form/index.d.ts +1 -0
- package/types/blocks/form/input/index.d.ts +1 -0
- package/types/blocks/form/select/index.d.ts +1 -0
- package/types/blocks/form/submit-button/index.d.ts +1 -0
- package/types/blocks/fragment/index.d.ts +1 -0
- package/types/blocks/image/index.d.ts +1 -0
- package/types/blocks/img/index.d.ts +1 -0
- package/types/blocks/raw-text/index.d.ts +1 -0
- package/types/blocks/section/index.d.ts +1 -0
- package/types/blocks/slot/index.d.ts +1 -0
- package/types/blocks/symbol/index.d.ts +1 -0
- package/types/blocks/text/index.d.ts +1 -0
- package/types/blocks/textarea/index.d.ts +1 -0
- package/types/blocks/video/index.d.ts +1 -0
- package/types/components/blocks/index.d.ts +1 -0
- package/types/components/content-variants/index.d.ts +1 -0
- package/types/components/error-boundary.d.ts +11 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/get-content/types.d.ts +1 -1
- package/types/index-helpers/blocks-exports.d.ts +10 -11
- package/lib/edge/server-entry-a595b1cf.cjs +0 -2
package/lib/node/index.cjs
CHANGED
|
@@ -1,227 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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(([i])=>`var ${i} = refToProxy(${getSyncValName(i)}); `).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=()=>{const e=safeDynamicRequire("isolated-vm");return new e.Isolate({memoryLimit:128}).createContextSync()},runInNode=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:a})=>{const s=safeDynamicRequire("isolated-vm"),l=serverEntry.fastClone({...a,...o}),c=getFunctionArguments({builder:t,context:n,event:i,state:l}),u=getIsolateContext(),b=u.global;b.setSync("global",b.derefInto()),b.setSync("log",function(...d){console.log(...d)}),b.setSync(BUILDER_SET_STATE_NAME,function(d,f){set(a,d,f),r==null||r(a)}),c.forEach(([d,f])=>{const v=typeof f=="object"?new s.Reference(d==="builder"?{...f,getUserAttributes:()=>f.getUserAttributes()}:f):null;b.setSync(getSyncValName(d),v)}),b.setSync(INJECTED_IVM_GLOBAL,s);const p=processCode({code:e,args:c}),m=u.evalSync(p);try{return JSON.parse(m)}catch{return m}};function isNodeRuntime(){var e;return typeof process!="undefined"&&serverEntry.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const shouldForceBrowserRuntimeInNode=()=>{var i;if(!isNodeRuntime())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(serverEntry.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},chooseBrowserOrServerEval=e=>serverEntry.isBrowser()||shouldForceBrowserRuntimeInNode()?runInBrowser(e):runInNode(e);function evaluate({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:a=!0}){if(e===""){serverEntry.logger.warn("Skipping evaluation of empty code block.");return}const s={code:parseCode(e,{isExpression:a}),builder:getBuilderGlobals(),context:t,event:r,rootSetState:o,rootState:i,localState:n};try{return chooseBrowserOrServerEval(s)}catch(l){serverEntry.logger.error("Failed code evaluation: "+l.message,{code:e});return}}function transformBlock(e){return e}const evaluateBindings=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=serverEntry.fastClone(e),a={...r,properties:{...r.properties},actions:{...r.actions}};for(const s in e.bindings){const l=e.bindings[s],c=evaluate({code:l,localState:n,rootState:i,rootSetState:o,context:t});set(a,s,c)}return a};function getProcessedBlock({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const a=e;return n?evaluateBindings({block:a,localState:i,rootState:o,rootSetState:r,context:t}):a}function throttle(e,t,n={}){let i,o,r,a=null,s=0;const l=function(){s=n.leading===!1?0:Date.now(),a=null,r=e.apply(i,o),a||(i=o=null)};return function(){const c=Date.now();!s&&n.leading===!1&&(s=c);const u=t-(c-s);return i=this,o=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,r=e.apply(i,o),a||(i=o=null)):!a&&n.trailing!==!1&&(a=setTimeout(l,u)),r}}function assign(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}const camelCaseToKebabCase=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function bindAnimations(e){for(const t of e)switch(t.trigger){case"pageLoad":triggerAnimation(t);break;case"hover":bindHoverAnimation(t);break;case"scrollInView":bindScrollInViewAnimation(t);break}}function warnElementNotPresent(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function augmentAnimation(e,t){const n=getAllStylesUsed(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,a=[o,r];for(const s of a)for(const l of n)l in s||(s[l]=i[l])}function getAllStylesUsed(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function triggerAnimation(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){warnElementNotPresent(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{augmentAnimation(e,n),n.style.transition="none",n.style.transitionDelay="0",assign(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),assign(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function bindHoverAnimation(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){warnElementNotPresent(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{augmentAnimation(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){assign(n.style,i)}function a(){assign(n.style,o)}r(),n.addEventListener("mouseenter",a),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function bindScrollInViewAnimation(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){warnElementNotPresent(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{augmentAnimation(e,n);let i=!1,o=!1;function r(){!i&&s(n)?(i=!0,o=!0,setTimeout(()=>{assign(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",a),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!s(n)&&(i=!1,assign(n.style,e.steps[0].styles))}const a=throttle(r,200,{leading:!1});function s(u){const b=u.getBoundingClientRect(),p=window.innerHeight,d=(e.thresholdPercent||0)/100*p;return b.bottom>d&&b.top<p-d}const l=e.steps[0].styles;function c(){assign(n.style,l)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",a,{capture:!0,passive:!0}),r()})}const getComponent=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
|
|
42
|
-
Could not find a registered component named "${i}".
|
|
43
|
-
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,...i}=e;if(!(n!=null&&n.collection))return;const o=evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),a=n.itemName||(r?r+"Item":"item");return o.map((l,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:l,[a]:l,[`$${a}Index`]:c}},block:i}))},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=serverEntry.fastClone(SIZES);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},camelToKebabCase=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),convertStyleMapToCSSArray=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${camelToKebabCase(n)}: ${i};`}).filter(serverEntry.checkIsDefined),convertStyleMapToCSS=e=>convertStyleMapToCSSArray(e).join(`
|
|
44
|
-
`),createCssClass=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
45
|
-
${convertStyleMapToCSS(n)}
|
|
46
|
-
}`;return e?`${e} {
|
|
47
|
-
${i}
|
|
48
|
-
}`:i};function InlinedStyles(e){return jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function BlockStyles(e){function t(){const i=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return serverEntry.checkIsDefined(i.hide)?!i.hide:serverEntry.checkIsDefined(i.show)?i.show:!0}function n(){var d;const i=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,r=e.context.content,a=getSizesForBreakpoints(((d=r==null?void 0:r.meta)==null?void 0:d.breakpoints)||{}),s=o==null?void 0:o.large,l=o==null?void 0:o.medium,c=o==null?void 0:o.small,u=i.id;if(!u)return"";const b=s?createCssClass({className:u,styles:s}):"",p=l?createCssClass({className:u,styles:l,mediaQuery:getMaxWidthQueryForSize("medium",a)}):"",m=c?createCssClass({className:u,styles:c,mediaQuery:getMaxWidthQueryForSize("small",a)}):"";return[b,p,m].join(" ")}return jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()&&t()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:n()})}):null})}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){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let a=getEventHandlerName(o);if(e.stripPrefix)switch(serverEntry.TARGET){case"vue":a=a.replace("v-on:","");break;case"svelte":a=a.replace("on:","");break}t[a]=createEventHandler(r,e)}return t}function transformStyleProperty({style:e}){return e}const getStyle=({block:e,context:t})=>mapStyleObjToStrIfNeeded(transformStyleProperty({style:e.style||{},context:t,block:e}));function mapStyleObjToStrIfNeeded(e){switch(serverEntry.TARGET){case"svelte":case"vue":case"solid":return convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function transformBlockProperties({properties:e}){return e}const extractRelevantRootBlockProperties=e=>({href:e.href});function getBlockProperties({block:e,context:t}){var i;const n={...extractRelevantRootBlockProperties(e),...e.properties,"builder-id":e.id,style:getStyle({block:e,context:t}),[getClassPropName()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return transformBlockProperties({properties:n,context:t,block:e})}function BlockWrapper(e){return jsxRuntime.jsx(DynamicRenderer,{TagName:e.Wrapper,attributes:getBlockProperties({block:e.block,context:e.context}),actionAttributes: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})}function InteractiveElement(e){return jsxRuntime.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...getBlockProperties({block:e.block,context:e.context}),...getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const getWrapperProps=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:a})=>{const s={...e,...o?{attributes:getBlockProperties({block:t,context:a})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:s};function ComponentRef(e){var i;const[t,n]=react.useState(()=>e.isInteractive?InteractiveElement:e.componentRef);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.componentRef?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(t,{...getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>jsxRuntime.jsx(Block,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function RepeatedBlock(e){const[t,n]=react.useState(()=>e.repeatContext);return jsxRuntime.jsx(builderContext.Provider,{value:t,children:jsxRuntime.jsx(Block,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function Block(e){var u,b,p;function t(){return getComponent({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return getRepeatItemData({block:e.block,context:e.context})}function i(){var m;return(m=e.block.repeat)!=null&&m.collection?e.block:getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var d;return e.block.tagName==="a"||((d=i().properties)==null?void 0:d.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var f,v;if((f=e.block.repeat)!=null&&f.collection)return!!((v=n==null?void 0:n())!=null&&v.length);const m="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!m}function a(){var d,f;return!((d=t==null?void 0:t())!=null&&d.component)&&!n()?(f=i().children)!=null?f:[]:[]}function s(){var m,d,f,v,T,S,C,I,j,B,F;return{blockChildren:(m=i().children)!=null?m:[],componentRef:(d=t==null?void 0:t())==null?void 0:d.component,componentOptions:{...getBlockComponentOptions(i()),builderContext:e.context,...((f=t==null?void 0:t())==null?void 0:f.name)==="Core:Button"||((v=t==null?void 0:t())==null?void 0:v.name)==="Symbol"||((T=t==null?void 0:t())==null?void 0:T.name)==="Columns"||((S=t==null?void 0:t())==null?void 0:S.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((C=t==null?void 0:t())==null?void 0:C.name)==="Symbol"||((I=t==null?void 0:t())==null?void 0:I.name)==="Columns"||((j=t==null?void 0:t())==null?void 0:j.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:l,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((B=t==null?void 0:t())==null?void 0:B.noWrap)===!0,isInteractive:!((F=t==null?void 0:t())!=null&&F.isRSC)}}const[l,c]=react.useState(()=>e.context);return react.useEffect(()=>{const m=i().id,d=i().animations;d&&m&&bindAnimations(d.filter(f=>f.trigger!=="hover").map(f=>({...f,elementId:m})))},[]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:r()?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(BlockStyles,{block:e.block,context:e.context}),(u=t==null?void 0:t())!=null&&u.noWrap?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ComponentRef,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive})}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(p=n())==null?void 0:p.map((m,d)=>jsxRuntime.jsx(RepeatedBlock,{repeatContext:m.context,block:m.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(BlockWrapper,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[jsxRuntime.jsx(ComponentRef,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive}),(b=a())==null?void 0:b.map(m=>jsxRuntime.jsx(Block,{block:m,context:l,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},m.id))]})})})]}):null})}function BlocksWrapper(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;serverEntry.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,r;serverEntry.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),jsxRuntime.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: column;
|
|
51
|
-
align-items: stretch;
|
|
52
|
-
}`})]})}function Blocks(e){var i,o,r;const t=react.useContext(builderContext),n=react.useContext(ComponentsContext);return jsxRuntime.jsx(BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(i=e.context)==null?void 0:i.BlocksWrapper,BlocksWrapperProps:(o=e.context)==null?void 0:o.BlocksWrapperProps,children:e.blocks?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(r=e.blocks)==null?void 0:r.map(a=>jsxRuntime.jsx(Block,{block:a,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},a.id))}):null})}function Columns(e){var T;const[t,n]=react.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=react.useState(()=>e.columns||[]),[r,a]=react.useState(()=>e.stackColumnsAt||"tablet");function s(S){var C;return((C=i[S])==null?void 0:C.width)||100/i.length}function l(S){const C=t*(i.length-1)/i.length;return`calc(${s(S)}% - ${C}px)`}function c({stackedStyle:S,desktopStyle:C}){return r==="tablet"?S:C}function u({stackedStyle:S,desktopStyle:C}){return r==="never"?C:S}const[b,p]=react.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function m(){return{"--flex-dir":b,"--flex-dir-tablet":c({stackedStyle:b,desktopStyle:"row"})}}function d(S){const C=S===0?0:t,I=l(S),j=`${C}px`,B="100%",F=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:I,["marginLeft"]:j,"--column-width-mobile":u({stackedStyle:B,desktopStyle:I}),"--column-margin-left-mobile":u({stackedStyle:F,desktopStyle:j}),"--column-width-tablet":c({stackedStyle:B,desktopStyle:I}),"--column-margin-left-tablet":c({stackedStyle:F,desktopStyle:j})}}function f(S){var I,j;return getSizesForBreakpoints(((j=(I=e.builderContext.content)==null?void 0:I.meta)==null?void 0:j.breakpoints)||{})[S].max}function v(){return`
|
|
53
|
-
@media (max-width: ${f("medium")}px) {
|
|
54
|
-
.${e.builderBlock.id}-breakpoints {
|
|
55
|
-
flex-direction: var(--flex-dir-tablet);
|
|
56
|
-
align-items: stretch;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
60
|
-
width: var(--column-width-tablet) !important;
|
|
61
|
-
margin-left: var(--column-margin-left-tablet) !important;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@media (max-width: ${f("small")}px) {
|
|
66
|
-
.${e.builderBlock.id}-breakpoints {
|
|
67
|
-
flex-direction: var(--flex-dir);
|
|
68
|
-
align-items: stretch;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.${e.builderBlock.id}-breakpoints > .builder-column {
|
|
72
|
-
width: var(--column-width-mobile) !important;
|
|
73
|
-
margin-left: var(--column-margin-left-mobile) !important;
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
`}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-f5024694`,style:m(),children:[jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:v()})}),(T=e.columns)==null?void 0:T.map((S,C)=>jsxRuntime.jsx(DynamicRenderer,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[getClassPropName()]:"builder-column",style:mapStyleObjToStrIfNeeded(d(C))},children:jsxRuntime.jsx(Blocks,{path:`component.options.columns.${C}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},C))]}),jsxRuntime.jsx("style",{children:`.div-f5024694 {
|
|
77
|
-
display: flex;
|
|
78
|
-
line-height: normal;
|
|
79
|
-
}`})]})}function FragmentComponent(e){return jsxRuntime.jsx("span",{children:e.children})}function removeProtocol(e){return e.replace(/http(s)?:/,"")}function updateQueryParam(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+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 i=e.split(n[0]),o=n[3],r=t.match("x")?t:`${t}x`;return removeProtocol(`${i[0]}_${r}${o}`)}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 i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${updateQueryParam(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[getShopifyImageUrl(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Image(e){var o,r,a,s;function t(){var u;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((u=e.image)!=null&&u.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),getSrcSet(c)}else if(e.image&&!e.srcset)return getSrcSet(c);return getSrcSet(c)}function n(){var l;return(l=t==null?void 0:t())!=null&&l.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const l={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?l:void 0}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("picture",{children:[n()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("source",{type:"image/webp",srcSet:n()})}):null,jsxRuntime.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length&&e.fitContent)?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(s=(a=e.builderBlock)==null?void 0:a.children)!=null&&s.length&&e.fitContent?jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.children}):null,!e.fitContent&&e.children?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),jsxRuntime.jsx("style",{children:`.img-40c70c9b {
|
|
80
|
-
opacity: 1;
|
|
81
|
-
transition: opacity 0.2s ease-in-out;
|
|
82
|
-
}.div-40c70c9b {
|
|
83
|
-
width: 100%;
|
|
84
|
-
pointer-events: none;
|
|
85
|
-
font-size: 0;
|
|
86
|
-
}.div-40c70c9b-2 {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
align-items: stretch;
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: 0;
|
|
92
|
-
left: 0;
|
|
93
|
-
width: 100%;
|
|
94
|
-
height: 100%;
|
|
95
|
-
}`})]})}function SectionComponent(e){return jsxRuntime.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})}const componentInfo$f={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$e={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(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((s,l)=>s+l.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$d={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},componentInfo$c={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,s=6e4){return new Promise((l,c)=>{const u=document.createElement("img");let b=!1;u.onload=()=>{b=!0,l(u)},u.addEventListener("error",p=>{console.warn("Image load failed",p.error),c(p.error)}),u.src=a,setTimeout(()=>{b||c(new Error("Image load timed out"))},s)})}function i(a){return Math.round(a*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(a=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&a.width&&a.height&&(e.set("aspectRatio",i(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$b={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$a={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function Slot(e){var t,n,i;return jsxRuntime.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:jsxRuntime.jsx(Blocks,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const componentInfo$9={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$8={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$7={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}]};function CustomCode(e){const t=react.useRef(null),[n,i]=react.useState(()=>[]),[o,r]=react.useState(()=>[]);return react.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const a=t.current.getElementsByTagName("script");for(let l=0;l<a.length;l++){const c=a[l];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const u=document.createElement("script");u.async=!0,u.src=c.src,document.head.appendChild(u)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.innerText)()}catch(u){console.warn("`CustomCode`: Error running script:",u)}}}},[]),jsxRuntime.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const componentInfo$6={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(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{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);function Embed(e){const t=react.useRef(null),[n,i]=react.useState(()=>[]),[o,r]=react.useState(()=>[]),[a,s]=react.useState(()=>!1);function l(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let u=0;u<c.length;u++){const b=c[u];if(b.src&&!n.includes(b.src)){n.push(b.src);const p=document.createElement("script");p.async=!0,p.src=b.src,document.head.appendChild(p)}else if(isJsScript(b)&&!o.includes(b.innerText))try{o.push(b.innerText),new Function(b.innerText)()}catch(p){console.warn("`Embed`: Error running script:",p)}}}return react.useEffect(()=>{t.current&&!a&&(s(!0),l())},[t.current,a]),jsxRuntime.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const componentInfo$5={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},validEnvList=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],getEnv=()=>{const e=process.env.NODE_ENV||"production";return validEnvList.includes(e)?e:"production"},get=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i};function FormComponent(e){var b,p;const t=react.useRef(null),[n,i]=react.useState(()=>"unsubmitted"),[o,r]=react.useState(()=>null),[a,s]=react.useState(()=>"");function l(m){var f,v;const d={...e.builderContext.rootState,...m};e.builderContext.rootSetState?(v=(f=e.builderContext).rootSetState)==null||v.call(f,d):e.builderContext.rootState=d}function c(){return serverEntry.isEditing()&&e.previewState||n}function u(m){var f;const d=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")m.preventDefault();else if(d){if(!(e.action||e.sendSubmissionsTo==="email")){m.preventDefault();return}m.preventDefault();const v=m.currentTarget,T=e.customHeaders||{};let S;const C=new FormData(v),I=Array.from(m.currentTarget.querySelectorAll("input,select,textarea")).filter(g=>!!g.name).map(g=>{let R;const A=g.name;if(g instanceof HTMLInputElement)if(g.type==="radio"){if(g.checked)return R=g.name,{key:A,value:R}}else if(g.type==="checkbox")R=g.checked;else if(g.type==="number"||g.type==="range"){const w=g.valueAsNumber;isNaN(w)||(R=w)}else g.type==="file"?R=g.files:R=g.value;else R=g.value;return{key:A,value:R}});let j=e.contentType;if(e.sendSubmissionsTo==="email"&&(j="multipart/form-data"),Array.from(I).forEach(({value:g})=>{(g instanceof File||Array.isArray(g)&&g[0]instanceof File||g instanceof FileList)&&(j="multipart/form-data")}),j!=="application/json")S=C;else{const g={};Array.from(I).forEach(({value:R,key:A})=>{set(g,A,R)}),S=JSON.stringify(g)}j&&j!=="multipart/form-data"&&(d&&((f=e.action)!=null&&f.includes("zapier.com"))||(T["content-type"]=j));const B=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(B),B.defaultPrevented))return;i("sending");const F=`${getEnv()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?F:e.action,{body:S,headers:T,method:e.method||"post"}).then(async g=>{let R;const A=g.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?R=await g.json():R=await g.text(),!g.ok&&e.errorMessagePath){let w=get(R,e.errorMessagePath);w&&(typeof w!="string"&&(w=JSON.stringify(w)),s(w),l({formErrorMessage:w}))}if(r(R),i(g.ok?"success":"error"),g.ok){const w=new CustomEvent("submit:success",{detail:{res:g,body:R}});if(t.current){if(t.current.dispatchEvent(w),w.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const V=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(V),V.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},g=>{const R=new CustomEvent("submit:error",{detail:{error:g}});t.current&&(t.current.dispatchEvent(R),R.defaultPrevented)||(r(g),i("error"))})}}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",jsxRuntime.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:m=>u(m),...e.attributes,children:[" ",e.builderBlock&&e.builderBlock.children?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(p=(b=e.builderBlock)==null?void 0:b.children)==null?void 0:p.map((m,d)=>jsxRuntime.jsx(Block,{block:m,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${d}`))}):null," ",c()==="error"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Blocks,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext})}):null," ",c()==="sending"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Blocks,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext})}):null," ",c()==="error"&&o?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("pre",{className:"builder-form-error-text pre-25b9edf0",children:[" ",JSON.stringify(o,null,2)," "]})}):null," ",c()==="success"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(Blocks,{path:"successMessage",blocks:e.successMessage,context:e.builderContext})}):null," "]})," ",jsxRuntime.jsx("style",{children:".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }"})," "]})}const componentInfo$4={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function FormInputComponent(e){return react.createElement("input",{...e.attributes,key:serverEntry.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const componentInfo$3={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function SelectComponent(e){var t;return react.createElement("select",{...e.attributes,value:e.value,key:serverEntry.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>jsxRuntime.jsx("option",{value:n.value,children:n.name||n.value})))}const componentInfo$2={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function SubmitButton(e){return jsxRuntime.jsx("button",{type:"submit",...e.attributes,children:e.text})}const 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};function ImgComponent(e){return jsxRuntime.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},serverEntry.isEditing()&&e.imgSrc||"default-key")}const componentInfo={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://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",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}]};function Video(e){var i,o,r,a,s,l,c;function t(){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 n(){return{...t()}}return jsxRuntime.jsxs("div",{style:{position:"relative"},children:[jsxRuntime.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:jsxRuntime.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(s=(a=e.builderBlock)==null?void 0:a.children)!=null&&s.length&&e.fitContent?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(c=(l=e.builderBlock)==null?void 0:l.children)!=null&&c.length&&!e.fitContent?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const getExtraComponents=()=>[{component:CustomCode,...componentInfo$7},{component:Embed,...componentInfo$6},{component:FormComponent,...componentInfo$5},{component:FormInputComponent,...componentInfo$4},{component:SubmitButton,...componentInfo$2},{component:SelectComponent,...componentInfo$3},{component:ImgComponent,...componentInfo$1},{component:Video,...componentInfo}],getDefaultRegisteredComponents=()=>[{component:Button,...componentInfo$f},{component:Columns,...componentInfo$e},{component:FragmentComponent,...componentInfo$d},{component:Image,...componentInfo$c},{component:SectionComponent,...componentInfo$b},{component:Slot,...componentInfo$a},{component:Symbol$1,...componentInfo$9},{component:Text,...componentInfo$8},...getExtraComponents()],UPDATE_COOKIES_AND_STYLES_SCRIPT=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
96
|
-
function getAndSetVariantId() {
|
|
97
|
-
function setCookie(name, value, days) {
|
|
98
|
-
let expires = '';
|
|
99
|
-
if (days) {
|
|
100
|
-
const date = new Date();
|
|
101
|
-
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
102
|
-
expires = '; expires=' + date.toUTCString();
|
|
103
|
-
}
|
|
104
|
-
document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
|
|
105
|
-
}
|
|
106
|
-
function getCookie(name) {
|
|
107
|
-
const nameEQ = name + '=';
|
|
108
|
-
const ca = document.cookie.split(';');
|
|
109
|
-
for (let i = 0; i < ca.length; i++) {
|
|
110
|
-
let c = ca[i];
|
|
111
|
-
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
112
|
-
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
113
|
-
}
|
|
114
|
-
return null;
|
|
115
|
-
}
|
|
116
|
-
const cookieName = \`builder.tests.\${contentId}\`;
|
|
117
|
-
const variantInCookie = getCookie(cookieName);
|
|
118
|
-
const availableIDs = variants.map(vr => vr.id).concat(contentId);
|
|
119
|
-
if (variantInCookie && availableIDs.includes(variantInCookie)) {
|
|
120
|
-
return variantInCookie;
|
|
121
|
-
}
|
|
122
|
-
let n = 0;
|
|
123
|
-
const random = Math.random();
|
|
124
|
-
for (let i = 0; i < variants.length; i++) {
|
|
125
|
-
const variant = variants[i];
|
|
126
|
-
const testRatio = variant.testRatio;
|
|
127
|
-
n += testRatio;
|
|
128
|
-
if (random < n) {
|
|
129
|
-
setCookie(cookieName, variant.id);
|
|
130
|
-
return variant.id;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
setCookie(cookieName, contentId);
|
|
134
|
-
return contentId;
|
|
135
|
-
}
|
|
136
|
-
const winningVariantId = getAndSetVariantId();
|
|
137
|
-
const styleEl = document.currentScript?.previousElementSibling;
|
|
138
|
-
if (isHydrationTarget) {
|
|
139
|
-
styleEl.remove();
|
|
140
|
-
const thisScriptEl = document.currentScript;
|
|
141
|
-
thisScriptEl?.remove();
|
|
142
|
-
} else {
|
|
143
|
-
const newStyleStr = variants.concat({
|
|
144
|
-
id: contentId
|
|
145
|
-
}).filter(variant => variant.id !== winningVariantId).map(value => {
|
|
146
|
-
return \`.variant-\${value.id} { display: none; }
|
|
147
|
-
\`;
|
|
148
|
-
}).join('');
|
|
149
|
-
styleEl.innerHTML = newStyleStr;
|
|
150
|
-
}
|
|
151
|
-
}`,UPDATE_VARIANT_VISIBILITY_SCRIPT=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
152
|
-
if (!navigator.cookieEnabled) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
function getCookie(name) {
|
|
156
|
-
const nameEQ = name + '=';
|
|
157
|
-
const ca = document.cookie.split(';');
|
|
158
|
-
for (let i = 0; i < ca.length; i++) {
|
|
159
|
-
let c = ca[i];
|
|
160
|
-
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
161
|
-
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
162
|
-
}
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
const cookieName = \`builder.tests.\${defaultContentId}\`;
|
|
166
|
-
const winningVariant = getCookie(cookieName);
|
|
167
|
-
const parentDiv = document.currentScript?.parentElement;
|
|
168
|
-
const isDefaultContent = variantContentId === defaultContentId;
|
|
169
|
-
const isWinningVariant = winningVariant === variantContentId;
|
|
170
|
-
if (isWinningVariant && !isDefaultContent) {
|
|
171
|
-
parentDiv?.removeAttribute('hidden');
|
|
172
|
-
parentDiv?.removeAttribute('aria-hidden');
|
|
173
|
-
} else if (!isWinningVariant && isDefaultContent) {
|
|
174
|
-
parentDiv?.setAttribute('hidden', 'true');
|
|
175
|
-
parentDiv?.setAttribute('aria-hidden', 'true');
|
|
176
|
-
}
|
|
177
|
-
if (isHydrationTarget) {
|
|
178
|
-
if (!isWinningVariant) {
|
|
179
|
-
parentDiv?.remove();
|
|
180
|
-
}
|
|
181
|
-
const thisScriptEl = document.currentScript;
|
|
182
|
-
thisScriptEl?.remove();
|
|
183
|
-
}
|
|
184
|
-
return;
|
|
185
|
-
}`,UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME="builderIoAbTest",UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME="builderIoRenderContent",getVariants=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),checkShouldRenderVariants=({canTrack:e,content:t})=>!(!(getVariants(t).length>0)||!e||serverEntry.isBrowser()),getIsHydrationTarget=e=>e==="react"||e==="reactNative",isHydrationTarget=getIsHydrationTarget(serverEntry.TARGET),getScriptString=()=>`
|
|
186
|
-
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME} = ${UPDATE_COOKIES_AND_STYLES_SCRIPT}
|
|
187
|
-
window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME} = ${UPDATE_VARIANT_VISIBILITY_SCRIPT}
|
|
188
|
-
`,getUpdateCookieAndStylesScript=(e,t)=>`
|
|
189
|
-
window.${UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME}(
|
|
190
|
-
"${t}",${JSON.stringify(e)}, ${isHydrationTarget}
|
|
191
|
-
)`,getUpdateVariantVisibilityScript=({contentId:e,variationId:t})=>`window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
192
|
-
"${t}", "${e}", ${isHydrationTarget}
|
|
193
|
-
)`;function InlinedScript(e){return jsxRuntime.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function round(e){return Math.round(e*1e3)/1e3}const findParentElement=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.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(),i=e.clientX-n.left,o=e.clientY-n.top,r=round(i/n.width),a=round(o/n.height);return{x:r,y:a}},getInteractionPropertiesForEvent=e=>{const t=e.target,n=t&&findBuilderParent(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?computeOffset({event:e,target:t}):void 0,builderTargetOffset:n?computeOffset({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function EnableEditor(e){var F,g,R,A,w,V,$;const t=react.useRef(null),[n,i]=react.useState(()=>0);react.useState(()=>!0);function o(h){var y,k;const x={...e.builderContextSignal.rootState,...h};e.builderContextSignal.rootSetState?(k=(y=e.builderContextSignal).rootSetState)==null||k.call(y,x):e.setBuilderContextSignal(E=>({...E,rootState:x}))}function r(h){var y,k,E,P,N;const x={...e.builderContextSignal.content,...h,data:{...(y=e.builderContextSignal.content)==null?void 0:y.data,...h==null?void 0:h.data},meta:{...(k=e.builderContextSignal.content)==null?void 0:k.meta,...h==null?void 0:h.meta,breakpoints:((E=h==null?void 0:h.meta)==null?void 0:E.breakpoints)||((N=(P=e.builderContextSignal.content)==null?void 0:P.meta)==null?void 0:N.breakpoints)}};e.setBuilderContextSignal(_=>({..._,content:x}))}react.useState(()=>0);const[a,s]=react.useState(()=>!1),[l,c]=react.useState(()=>e.contentWrapper||"div");function u(h){return serverEntry.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:x=>{var E;const{breakpoints:y,contentId:k}=x;!k||k!==((E=e.builderContextSignal.content)==null?void 0:E.id)||y&&(r({meta:{breakpoints:y}}),i(n+1))},animation:x=>{triggerAnimation(x)},contentUpdate:x=>{r(x),i(n+1)}}})(h)}function b(){var x,y;const h=(y=(x=e.builderContextSignal.content)==null?void 0:x.data)==null?void 0:y.jsCode;h&&evaluate({code:h,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[p,m]=react.useState(()=>({})),[d,f]=react.useState(()=>!1);function v(h){var x,y;if(e.builderContextSignal.content){const k=(x=e.builderContextSignal.content)==null?void 0:x.testVariationId,E=(y=e.builderContextSignal.content)==null?void 0:y.id;serverEntry._track({type:"click",canTrack:serverEntry.getDefaultCanTrack(e.canTrack),contentId:E,apiKey:e.apiKey,variationId:k!==E?k:void 0,...getInteractionPropertiesForEvent(h),unique:!d})}d||f(!0)}function T(h){return h.replace(/{{([^}]+)}}/g,(x,y)=>evaluate({code:y,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function S({url:h,key:x}){serverEntry.fetch(h).then(y=>y.json()).then(y=>{var E,P;const k={...e.builderContextSignal.rootState,[x]:y};(P=(E=e.builderContextSignal).rootSetState)==null||P.call(E,k),p[x]=!0}).catch(y=>{console.error("error fetching dynamic data",h,y)})}function C(){var x,y,k;const h=(k=(y=(x=e.builderContextSignal.content)==null?void 0:x.data)==null?void 0:y.httpRequests)!=null?k:{};Object.entries(h).forEach(([E,P])=>{if(P&&(!p[E]||serverEntry.isEditing())){const N=T(P);S({url:N,key:E})}})}function I(){serverEntry.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:serverEntry.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(h){i(n+1),window.addEventListener("message",u),serverEntry.registerInsertMenu(),serverEntry.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(x=>{var k;const y=serverEntry.createRegisterComponentMessage(x);(k=window.parent)==null||k.postMessage(y,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",I)}function B(h){const x=new URL(location.href).searchParams,y=x.get("builder.preview"),k=x.get(`builder.preview.${y}`),E=x.get("apiKey")||x.get("builder.space");y===e.model&&E===e.apiKey&&(!e.content||k===e.content.id)&&serverEntry.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(P=>{P&&r(P)})}return react.useEffect(()=>{var h;return(h=t.current)==null||h.addEventListener("initeditingbldr",j),()=>{var x;return(x=t.current)==null?void 0:x.removeEventListener("initeditingbldr",j)}},[]),react.useEffect(()=>{var h;return(h=t.current)==null||h.addEventListener("initpreviewingbldr",B),()=>{var x;return(x=t.current)==null?void 0:x.removeEventListener("initpreviewingbldr",B)}},[]),react.useEffect(()=>{var h,x;if(serverEntry.isBrowser()){if(serverEntry.isEditing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&serverEntry.getDefaultCanTrack(e.canTrack)){const k=(h=e.builderContextSignal.content)==null?void 0:h.testVariationId,E=(x=e.builderContextSignal.content)==null?void 0:x.id,P=e.apiKey;serverEntry._track({type:"impression",canTrack:!0,contentId:E,apiKey:P,variationId:k!==E?k:void 0})}serverEntry.isPreviewing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"))}},[]),react.useEffect(()=>{e.apiKey||serverEntry.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),b(),C(),I()},[]),react.useEffect(()=>{e.content&&r(e.content)},[e.content]),react.useEffect(()=>{},[a]),react.useEffect(()=>{b()},[(g=(F=e.builderContextSignal.content)==null?void 0:F.data)==null?void 0:g.jsCode]),react.useEffect(()=>{C()},[(A=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:A.httpRequests]),react.useEffect(()=>{I()},[e.builderContextSignal.rootState]),react.useEffect(()=>{e.data&&o(e.data)},[e.data]),react.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),react.useEffect(()=>()=>{serverEntry.isBrowser()&&(window.removeEventListener("message",u),window.removeEventListener("builder:component:stateChangeListenerActivated",I))},[]),jsxRuntime.jsx(builderContext.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?jsxRuntime.jsx(jsxRuntime.Fragment,{children:react.createElement(l,{key:n,ref:t,onClick:h=>v(h),"builder-content-id":(w=e.builderContextSignal.content)==null?void 0:w.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((V=e.content)==null?void 0:V.testVariationId)||(($=e.content)==null?void 0:$.id)}`},e.children)}):null})}const getCssFromFont=e=>{var r,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
|
|
194
|
-
@font-face {
|
|
195
|
-
font-family: "${t}";
|
|
196
|
-
src: local("${n}"), url('${i}') format('woff2');
|
|
197
|
-
font-display: fallback;
|
|
198
|
-
font-weight: 400;
|
|
199
|
-
}
|
|
200
|
-
`.trim()),e.files)for(const s in e.files){if(!(String(Number(s))===s))continue;const c=e.files[s];c&&c!==i&&(o+=`
|
|
201
|
-
@font-face {
|
|
202
|
-
font-family: "${t}";
|
|
203
|
-
src: url('${c}') format('woff2');
|
|
204
|
-
font-display: fallback;
|
|
205
|
-
font-weight: ${s};
|
|
206
|
-
}
|
|
207
|
-
`.trim())}return o},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,n]=react.useState(()=>`
|
|
208
|
-
${getCss({cssCode:e.cssCode,contentId:e.contentId})}
|
|
209
|
-
${getFontCss({customFonts:e.customFonts})}
|
|
210
|
-
|
|
211
|
-
.builder-button {
|
|
212
|
-
all: unset;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
216
|
-
margin: 0;
|
|
217
|
-
}
|
|
218
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
219
|
-
color: inherit;
|
|
220
|
-
line-height: inherit;
|
|
221
|
-
letter-spacing: inherit;
|
|
222
|
-
font-weight: inherit;
|
|
223
|
-
font-size: inherit;
|
|
224
|
-
text-align: inherit;
|
|
225
|
-
font-family: inherit;
|
|
226
|
-
}
|
|
227
|
-
`.trim());return jsxRuntime.jsx(InlinedStyles,{styles:t})}const getRootStateInitialValue=({content:e,data:t,locale:n})=>{var r,a,s;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(s=(a=e==null?void 0:e.data)==null?void 0:a.inputs)==null||s.forEach(l=>{l.name&&l.defaultValue!==void 0&&(i[l.name]=l.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},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 ContentComponent(e){var l,c,u,b,p,m,d;const[t,n]=react.useState(()=>{var f,v;return getUpdateVariantVisibilityScript({variationId:(f=e.content)==null?void 0:f.testVariationId,contentId:(v=e.content)==null?void 0:v.id})});function i(f){s(v=>({...v,rootState:f}))}const[o,r]=react.useState(()=>[...getDefaultRegisteredComponents(),...e.customComponents||[]].reduce((f,{component:v,...T})=>({...f,[T.name]:{component:v,...serverEntry.serializeComponentInfo(T)}}),{})),[a,s]=react.useState(()=>({content:getContentInitialValue({content:e.content,data:e.data}),localState:void 0,rootState:getRootStateInitialValue({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...getDefaultRegisteredComponents(),...e.customComponents||[]].reduce((f,{component:v,...T})=>({...f,[T.name]:serverEntry.serializeComponentInfo(T)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return jsxRuntime.jsx(ComponentsContext.Provider,{value:{registeredComponents:o},children:jsxRuntime.jsxs(EnableEditor,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:a,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:s,children:[e.isSsrAbTest?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:t})}):null,jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ContentStyles,{contentId:(l=a.content)==null?void 0:l.id,cssCode:(u=(c=a.content)==null?void 0:c.data)==null?void 0:u.cssCode,customFonts:(p=(b=a.content)==null?void 0:b.data)==null?void 0:p.customFonts})}),jsxRuntime.jsx(Blocks,{blocks:(d=(m=a.content)==null?void 0:m.data)==null?void 0:d.blocks,context:a,registeredComponents:o,linkComponent:e.linkComponent})]})})}function ContentVariants(e){var a,s;const[t,n]=react.useState(()=>checkShouldRenderVariants({canTrack:serverEntry.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return getUpdateCookieAndStylesScript(getVariants(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function o(){return getVariants(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function r(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:serverEntry.handleABTestingSync({item:e.content,canTrack:serverEntry.getDefaultCanTrack(e.canTrack)})}return react.useEffect(()=>{},[]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!e.__isNestedRender&&serverEntry.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-${(a=e.content)==null?void 0:a.id}`,styles:o()}),jsxRuntime.jsx(InlinedScript,{scriptStr:i()}),(s=getVariants(e.content))==null?void 0:s.map(l=>jsxRuntime.jsx(ContentComponent,{content:l,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},l.testVariationId))]}):null,jsxRuntime.jsx(ContentComponent,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const fetchSymbolContent=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return serverEntry.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{serverEntry.logger.error("Could not fetch symbol content: ",n)})};function Symbol$1(e){var r,a,s,l;function t(){var c,u;return[e.attributes[getClassPropName()],"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(u=e.symbol)!=null&&u.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=react.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){n||fetchSymbolContent({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return react.useEffect(()=>{},[]),react.useEffect(()=>{o()},[e.symbol]),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,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(a=e.symbol)==null?void 0:a.data,...e.builderContext.localState,...(s=n==null?void 0:n.data)==null?void 0:s.state},model:(l=e.symbol)==null?void 0:l.model,content:n,linkComponent:e.builderLinkComponent})})}exports._processContentResult=serverEntry._processContentResult;exports.createRegisterComponentMessage=serverEntry.createRegisterComponentMessage;exports.fetchBuilderProps=serverEntry.fetchBuilderProps;exports.fetchEntries=serverEntry.fetchEntries;exports.fetchOneEntry=serverEntry.fetchOneEntry;exports.getBuilderSearchParams=serverEntry.getBuilderSearchParams;exports.isEditing=serverEntry.isEditing;exports.isPreviewing=serverEntry.isPreviewing;exports.register=serverEntry.register;exports.setEditorSettings=serverEntry.setEditorSettings;exports.subscribeToEditor=serverEntry.subscribeToEditor;exports.track=serverEntry.track;exports.Blocks=Blocks;exports.Button=Button;exports.Columns=Columns;exports.Content=ContentVariants;exports.Fragment=FragmentComponent;exports.Image=Image;exports.Section=SectionComponent;exports.Symbol=Symbol$1;exports.Text=Text;exports.Video=Video;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-0e638a4f.cjs");require("react/jsx-runtime");require("react");require("node:module");exports.Blocks=t.Blocks;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|