@builder.io/sdk-react 2.0.5 → 2.0.8
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/blocks-exports.cjs +8 -8
- package/lib/browser/blocks-exports.mjs +18 -18
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/{node/server-entry-7e145817.cjs → browser/server-entry-ba3e0524.cjs} +1 -1
- package/lib/browser/{server-entry-0c6c220c.js → server-entry-f6ee5d92.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-72dab8ce.cjs → accordion-88007399.cjs} +1 -1
- package/lib/edge/{accordion-99129d68.js → accordion-ef5e6161.js} +1 -1
- package/lib/edge/{blocks-426e0c44.js → blocks-90fd2fd8.js} +33 -33
- package/lib/edge/{blocks-53ae1b87.cjs → blocks-dc478c97.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-967d0268.cjs → button-228f448d.cjs} +1 -1
- package/lib/edge/{button-778062cd.js → button-8d307faf.js} +2 -2
- package/lib/edge/{columns-3b921658.cjs → columns-3547be8c.cjs} +1 -1
- package/lib/edge/{columns-3a8c4d3f.js → columns-77b7011a.js} +4 -4
- package/lib/edge/{content-variants-15d191de.js → content-variants-4f7cad1a.js} +11 -11
- package/lib/edge/{content-variants-4b8718f8.cjs → content-variants-f0edf280.cjs} +1 -1
- package/lib/edge/{evaluate-26c0fdb7.js → evaluate-384a03ed.js} +1 -1
- package/lib/edge/{evaluate-c0eeb4f8.cjs → evaluate-39c2c786.cjs} +1 -1
- package/lib/edge/{form-9d9dce5d.cjs → form-c6da17f5.cjs} +1 -1
- package/lib/edge/{form-ccb0b912.js → form-d40e9eca.js} +4 -4
- package/lib/edge/{get-class-prop-name-eae60eae.cjs → get-class-prop-name-4f8743e9.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-0a91c3bd.js → get-class-prop-name-767dbeb0.js} +1 -1
- package/lib/edge/{img-183de27d.cjs → img-c50b3839.cjs} +1 -1
- package/lib/edge/{img-75751c89.js → img-d650b796.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-27972020.js → input-5646dcb2.js} +1 -1
- package/lib/edge/{input-fd18a67d.cjs → input-aaba7df0.cjs} +1 -1
- package/lib/edge/{select-6ea0d59f.cjs → select-2e7bf7d0.cjs} +1 -1
- package/lib/edge/{select-60ff549c.js → select-d3905dcd.js} +1 -1
- package/lib/edge/{server-entry-feff6177.js → server-entry-29a170e3.js} +1 -1
- package/lib/edge/{server-entry-4133a544.cjs → server-entry-b0e7430b.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-a4509cae.cjs → slot-695259cf.cjs} +1 -1
- package/lib/edge/{slot-2347377e.js → slot-82c0b340.js} +4 -4
- package/lib/edge/{symbol-98650b06.cjs → symbol-5a6a783f.cjs} +1 -1
- package/lib/edge/{symbol-dcef0d8e.js → symbol-91897bd4.js} +2 -2
- package/lib/edge/{tabs-4c131e17.cjs → tabs-4c4a6b19.cjs} +1 -1
- package/lib/edge/{tabs-0784574b.js → tabs-a191e7b1.js} +4 -4
- package/lib/edge/{text-1c1986aa.cjs → text-7a00e2f8.cjs} +1 -1
- package/lib/edge/{text-6f7cbc35.js → text-ca974245.js} +2 -2
- package/lib/node/blocks-exports.cjs +2 -2
- package/lib/node/blocks-exports.mjs +19 -19
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-4978bc21.cjs → node-runtime-a6fb6ac7.cjs} +1 -1
- package/lib/node/{node-runtime-ce5c71e5.js → node-runtime-d8e6d827.js} +1 -1
- package/lib/{browser/server-entry-7e145817.cjs → node/server-entry-ba3e0524.cjs} +1 -1
- package/lib/node/{server-entry-0c6c220c.js → server-entry-f6ee5d92.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +2 -1
- package/types/components/content-variants/extra-framework-props-types.d.ts +2 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/extra-context-types.d.ts +6 -0
- package/types/context/types.d.ts +2 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use client";"use strict";var De=Object.defineProperty;var Le=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var G=(e,t,n)=>(Le(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";var De=Object.defineProperty;var Le=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var G=(e,t,n)=>(Le(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),b=require("./server-entry-ba3e0524.cjs"),h=require("react"),Oe=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Me=e=>typeof e=="string"&&Oe.has(e.toLowerCase());function ne(e){return a.jsx(a.Fragment,{children:Me(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const M=()=>{switch(b.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function he(e){function t(){return{...e.attributes,[M()]:`${e.link?"":"builder-button"} ${e.attributes[M()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(ne,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const z=h.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""}),ge=h.createContext({registeredComponents:{}});function Ue(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}const He=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),qe=()=>({isEditing:b.isEditing(),isBrowser:b.isBrowser(),isServer:!b.isBrowser(),getUserAttributes:()=>b.getUserAttributes()}),Ke=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ae=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:l,rootState:r})=>{const s=He({builder:t,context:n,event:i,state:be({rootState:r,localState:o,rootSetState:l})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))};function be({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const l=i[o];return typeof l=="object"&&l!==null?be({rootState:l,localState:void 0,rootSetState:n?r=>{i[o]=r,n(i)}:void 0}):l},set:(i,o,l)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=l,n==null||n(i),!0}})}function ze(){var e;return typeof process!="undefined"&&b.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const _e=()=>{var i;if(!ze())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?(b.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},Je=e=>(b.isBrowser()||_e(),ae(e)),N=class N{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return N.cache.get(t)}static setCachedValue(t,n){N.cache.size>20&&N.cache.delete(N.cache.keys().next().value),N.cache.set(t,{value:n})}};G(N,"cacheLimit",20),G(N,"cache",new Map);let D=N;function L({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:l,isExpression:r=!0,enableCache:s}){if(e==="")return;const c={code:Ke(e,{isExpression:r}),builder:qe(),context:t,event:l,rootSetState:o,rootState:i,localState:n};if(s){const d=D.getCacheKey(c),f=D.getCachedValue(d);if(f)return f.value}try{const d=Je(c);if(s){const f=D.getCacheKey(c);D.setCachedValue(f,d)}return d}catch(d){b.logger.error("Failed code evaluation: "+d.message,{code:e});return}}const ie=e=>JSON.parse(JSON.stringify(e)),xe=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,l,r)=>Object(o[l])===o[l]?o[l]:o[l]=Math.abs(Number(i[r+1]))>>0===+i[r+1]?[]:{},e)[i[i.length-1]]=n,e};const Ge=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const l=ie(e),r={...l,properties:{...l.properties},actions:{...l.actions}};for(const s in e.bindings){const c=e.bindings[s],d=L({code:c,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});xe(r,s,d)}return r};function K({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:l}){const r=e;return n?Ge({block:r,localState:i,rootState:o,rootSetState:l,context:t}):r}const _=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Ye(e,t,n={}){let i,o,l,r=null,s=0;const c=function(){s=n.leading===!1?0:Date.now(),r=null,l=e.apply(i,o),r||(i=o=null)};return function(){const d=Date.now();!s&&n.leading===!1&&(s=d);const f=t-(d-s);return i=this,o=arguments,f<=0||f>t?(r&&(clearTimeout(r),r=null),s=d,l=e.apply(i,o),r||(i=o=null)):!r&&n.trailing!==!1&&(r=setTimeout(c,f)),l}}function O(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const l in o)Object.prototype.hasOwnProperty.call(o,l)&&(n[l]=o[l])}return n}function Qe(e){for(const t of e)switch(t.trigger){case"pageLoad":Se(t);break;case"scrollInView":Ze(t);break}}function pe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ye(e,t){const n=Xe(e),i=getComputedStyle(t),o=e.steps[0].styles,l=e.steps[e.steps.length-1].styles,r=[o,l];for(const s of r)for(const c of n)c in s||(s[c]=i[c])}function Xe(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 Se(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){pe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ye(e,n),n.style.transition="none",n.style.transitionDelay="0",O(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),O(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Ze(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){pe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ye(e,n);let i=!1,o=!1;function l(){!i&&s(n)?(i=!0,o=!0,setTimeout(()=>{O(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",r),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,O(n.style,e.steps[0].styles))}const r=Ye(l,200,{leading:!1});function s(f){const u=f.getBoundingClientRect(),m=window.innerHeight,S=(e.thresholdPercent||0)/100*m;return u.bottom>S&&u.top<m-S}const c=e.steps[0].styles;function d(){O(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),l()})}const ve=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${_(n)}: ${i};`}).filter(b.checkIsDefined),et=e=>ve(e).join(`
|
|
2
2
|
`),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${et(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
|
-
}`:i};function tt({style:e}){return e}const nt=({block:e,context:t})=>ke(tt({style:e.style||{},context:t,block:e}));function ke(e){switch(
|
|
6
|
+
}`:i};function tt({style:e}){return e}const nt=({block:e,context:t})=>ke(tt({style:e.style||{},context:t,block:e}));function ke(e){switch(b.TARGET){case"svelte":case"vue":case"solid":case"angular":return ve(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const it=({block:e,context:t,registeredComponents:n})=>{var l;const i=(l=K({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:l.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
|
|
7
7
|
Could not find a registered component named "${i}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},ot=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=L({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const l=n.collection.split(".").pop(),r=n.itemName||(l?l+"Item":"item");return o.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[r]:c,[`$${r}Index`]:d}},block:i}))},at=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},rt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},lt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},st=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Ce={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Ce)=>`@media (max-width: ${t[e].max}px)`,Te=({small:e,medium:t})=>{const n=ie(Ce);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 l=n.medium.max+1;return n.large={max:2e3,min:l,default:l+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ct(e){function t(){const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},ot=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=L({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const l=n.collection.split(".").pop(),r=n.itemName||(l?l+"Item":"item");return o.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[r]:c,[`$${r}Index`]:d}},block:i}))},at=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},rt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},lt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},st=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Ce={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Ce)=>`@media (max-width: ${t[e].max}px)`,Te=({small:e,medium:t})=>{const n=ie(Ce);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 l=n.medium.max+1;return n.large={max:2e3,min:l,default:l+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ct(e){function t(){const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return b.checkIsDefined(i.hide)?!i.hide:b.checkIsDefined(i.show)?i.show:!0}function n(){var y,j,R;const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,l=e.context.content,r=Te(((y=l==null?void 0:l.meta)==null?void 0:y.breakpoints)||{}),s=o==null?void 0:o.large,c=o==null?void 0:o.medium,d=o==null?void 0:o.small,f=i.id;if(!f)return"";const u=s?H({className:f,styles:s}):"",m=c?H({className:f,styles:c,mediaQuery:re("medium",r)}):"",x=d?H({className:f,styles:d,mediaQuery:re("small",r)}):"",S=i.animations&&i.animations.find(B=>B.trigger==="hover");let I="";if(S){const B=((R=(j=S.steps)==null?void 0:j[1])==null?void 0:R.styles)||{};I=H({className:`${f}:hover`,styles:{...B,transition:`all ${S.duration}s ${_(S.easing)}`,transitionDelay:S.delay?`${S.delay}s`:"0s"}})||""}return[u,m,x,I].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function dt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ut=e=>`on${dt(e)}`,mt=(e,t)=>n=>L({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function Ie(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const l=n[o];let r=ut(o);if(e.stripPrefix)switch(b.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=mt(l,e)}return t}function ft({properties:e}){return e}const ht=e=>({href:e.href});function oe({block:e,context:t}){var i;const n={...ht(e),...e.properties,"builder-id":e.id,style:nt({block:e,context:t}),[M()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return ft({properties:n,context:t,block:e})}function gt(e){return a.jsx(ne,{TagName:e.Wrapper,attributes:oe({block:e.block,context:e.context}),actionAttributes:Ie({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 bt(e){function t(){return e.includeBlockProps?{...oe({block:e.block,context:e.context}),...Ie({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const xt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:l,contextValue:r})=>{const s={...e,...o?{attributes:oe({block:t,context:r})}:{}};return l?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:s};function le(e){var i;const[t,n]=h.useState(()=>e.isInteractive?bt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...xt({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=>a.jsx(U,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function pt(e){const[t,n]=h.useState(()=>e.repeatContext);return a.jsx(z.Provider,{value:t,children:a.jsx(U,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function U(e){var c,d,f;function t(){return it({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return ot({block:e.block,context:e.context})}function i(){var u;return(u=e.block.repeat)!=null&&u.collection?e.block:K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var m;return e.block.tagName==="a"||((m=i().properties)==null?void 0:m.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var x,S;if((x=e.block.repeat)!=null&&x.collection)return!!((S=n==null?void 0:n())!=null&&S.length);const u="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!u}function r(){var m,x;return!((m=t==null?void 0:t())!=null&&m.component)&&!n()?(x=i().children)!=null?x:[]:[]}function s(){var u,m,x,S;return{blockChildren:(u=i().children)!=null?u:[],componentRef:(m=t==null?void 0:t())==null?void 0:m.component,componentOptions:{...Ue(i()),...lt(t(),i()),...st(t(),e.context),...at(t(),e.linkComponent),...rt(t(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((x=t==null?void 0:t())==null?void 0:x.noWrap)===!0,isInteractive:!((S=t==null?void 0:t())!=null&&S.isRSC&&b.TARGET==="rsc")}}return h.useEffect(()=>{const u=i().id,m=i().animations;m&&u&&Qe(m.map(x=>({...x,elementId:u})))},[]),a.jsx(a.Fragment,{children:l()?a.jsxs(a.Fragment,{children:[a.jsx(ct,{block:e.block,context:e.context}),(c=t==null?void 0:t())!=null&&c.noWrap?a.jsx(a.Fragment,{children:a.jsx(le,{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})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(f=n())==null?void 0:f.map((u,m)=>a.jsx(pt,{repeatContext:u.context,block:u.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},m))}):a.jsxs(gt,{Wrapper:o(),block:i(),context:e.context,children:[a.jsx(le,{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}),(d=r())==null?void 0:d.map(u=>a.jsx(U,{block:u,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},u.id))]})})]}):null})}function yt(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,l;b.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,l;b.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","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}),a.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`})]})}function F(e){var i,o,l;const t=h.useContext(z),n=h.useContext(ge);return a.jsx(yt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(l=e.blocks)==null?void 0:l.map(r=>a.jsx(U,{block:r,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},r.id))}):null})}const St=e=>`builder-columns ${e}-breakpoints`;function we(e){var B,W;const[t,n]=h.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=h.useState(()=>e.columns||[]),[l,r]=h.useState(()=>e.stackColumnsAt||"tablet");function s(v){return v.link?e.builderLinkComponent||"a":"div"}function c(v){var E;return((E=i[v])==null?void 0:E.width)||100/i.length}function d(v){const E=c(v),P=t*(i.length-1)*(E/100);return`calc(${E}% - ${P}px)`}function f({stackedStyle:v,desktopStyle:E}){return l==="tablet"?v:E}function u({stackedStyle:v,desktopStyle:E}){return l==="never"?E:v}const[m,
|
|
12
|
+
}`})]})}function F(e){var i,o,l;const t=h.useContext(z),n=h.useContext(ge);return a.jsx(yt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(l=e.blocks)==null?void 0:l.map(r=>a.jsx(U,{block:r,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},r.id))}):null})}const St=e=>`builder-columns ${e}-breakpoints`;function we(e){var B,W;const[t,n]=h.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=h.useState(()=>e.columns||[]),[l,r]=h.useState(()=>e.stackColumnsAt||"tablet");function s(v){return v.link?e.builderLinkComponent||"a":"div"}function c(v){var E;return((E=i[v])==null?void 0:E.width)||100/i.length}function d(v){const E=c(v),P=t*(i.length-1)*(E/100);return`calc(${E}% - ${P}px)`}function f({stackedStyle:v,desktopStyle:E}){return l==="tablet"?v:E}function u({stackedStyle:v,desktopStyle:E}){return l==="never"?E:v}const[m,x]=h.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function S(){return{"--flex-dir":m,"--flex-dir-tablet":f({stackedStyle:m,desktopStyle:"row"})}}function I(v){const E=v===0?0:t,P=d(v),p=`${E}px`,g="100%",k=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:p,"--column-width-mobile":u({stackedStyle:g,desktopStyle:P}),"--column-margin-left-mobile":u({stackedStyle:k,desktopStyle:p}),"--column-width-tablet":f({stackedStyle:g,desktopStyle:P}),"--column-margin-left-tablet":f({stackedStyle:k,desktopStyle:p})}}function y(v){var P,p;return Te(((p=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:p.breakpoints)||{})[v].max}function j(){const v=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
13
|
@media (max-width: ${y("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
|
-
}`})]})}function je(e){return a.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 Q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},X={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Ct={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]}],defaultValue:[{title:[Q],detail:[X]},{title:[Q],detail:[X]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ce=e=>e.toString();function Tt(e){var u;const[t,n]=h.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function l(){const b={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(b).filter(([S,I])=>I!==void 0))}function r(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function s(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function c(){let m=null;if(e.grid&&t.length&&document){const S=t[0];let y=document.querySelector(`.builder-accordion-title[data-index="${S}"]`);if(m=S,y){let j=y.getBoundingClientRect();for(;y=y&&y.nextElementSibling;)if(y){if(y.classList.contains("builder-accordion-detail"))continue;const R=y.getBoundingClientRect();if(R.left>j.left){const B=parseInt(y.getAttribute("data-index")||"",10);isNaN(B)||(j=R,m=B)}else break}}}return typeof m=="number"&&(m=m+1),m}function d(){const m={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([b,S])=>S!==void 0))}function f(m){t.includes(m)?n(i()?[]:t.filter(b=>b!==m)):n(i()?[m]:t.concat(m))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(u=e.items)==null?void 0:u.map((m,b)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:r(b),style:{...l(),width:e.grid?e.gridRowWidth:void 0,order:c()!==null?ce(b):ce(b+1)},"data-index":b,onClick:S=>f(b),children:a.jsx(F,{blocks:m.title,path:`items.${b}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(b)?a.jsx("div",{className:s(b),style:d(),children:a.jsx(F,{blocks:m.detail,path:`items.${b}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const It={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,shouldReceiveBuilderProps:{builderLinkComponent:!0}},wt={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(l=>!l.get("width"))||n.reduce((s,c)=>s+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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Et={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Rt={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","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(r,s=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let u=!1;f.onload=()=>{u=!0,c(f)},f.addEventListener("error",m=>{console.warn("Image load failed",m.error),d(m.error)}),f.src=r,setTimeout(()=>{u||d(new Error("Image load timed out"))},s)})}function i(r){return Math.round(r*1e3)/1e3}const o=e.get("image"),l=e.get("aspectRatio");if(fetch(o).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!l||l===.7041))return n(o).then(r=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&r.width&&r.height&&(e.set("aspectRatio",i(r.height/r.width)),e.set("height",r.height),e.set("width",r.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:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{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}],shouldReceiveBuilderProps:{builderBlock:!0}},jt={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>"}}}]},Bt={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"}],shouldReceiveBuilderProps:{builderContext:!0}};function Pt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(F,{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 Vt={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"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},ee={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},At={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[ee]}],defaultValue:[{label:[{...Z,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Z,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Ft(e){var l;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function o(r){r===t&&e.collapsible?n(-1):n(r)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(l=e.tabs)==null?void 0:l.map((r,s)=>a.jsx("span",{className:`builder-tab-wrap ${t===s?"builder-tab-active":""}`,style:{...t===s?e.activeTabStyle:{}},onClick:c=>o(s),children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${s}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},s))}),i(t)?a.jsx("div",{children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Nt={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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 Be(e){function t(){var s;const n=e.builderContext,{context:i,localState:o,rootState:l,rootSetState:r}=n;return String(((s=e.text)==null?void 0:s.toString())||"").replace(/{{([^}]+)}}/g,(c,d)=>L({code:d,context:i,localState:o,rootState:l,rootSetState:r,enableCache:!1}))}return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:t()},style:{outline:"none"}})}const Wt={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 $t(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]);return h.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let c=0;c<r.length;c++){const d=r[c];if(d.src){if(n.includes(d.src))continue;n.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(o.includes(d.innerText))continue;try{o.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Dt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Lt=["text/javascript","application/javascript","application/ecmascript"],Ot=e=>Lt.includes(e.type);function Mt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]),[r,s]=h.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const u=d[f];if(u.src&&!n.includes(u.src)){n.push(u.src);const m=document.createElement("script");m.async=!0,m.src=u.src,document.head.appendChild(m)}else if(Ot(u)&&!o.includes(u.innerText))try{o.push(u.innerText),new Function(u.innerText)()}catch(m){console.warn("`Embed`: Error running script:",m)}}}return h.useEffect(()=>{t.current&&!r&&(s(!0),c())},[t.current,r]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Ut={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"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Ht=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],qt=()=>{const e=process.env.NODE_ENV||"production";return Ht.includes(e)?e:"production"},Kt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,l)=>o!=null?o[l]:o,e);return i===void 0||i===e?n:i};function zt(e){var u,m;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,l]=h.useState(()=>null),[r,s]=h.useState(()=>"");function c(b){var I,y;const S={...e.builderContext.rootState,...b};e.builderContext.rootSetState?(y=(I=e.builderContext).rootSetState)==null||y.call(I,S):e.builderContext.rootState=S}function d(){return x.isEditing()&&e.previewState||n}function f(b){var I;const S=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")b.preventDefault();else if(S){if(!(e.action||e.sendSubmissionsTo==="email")){b.preventDefault();return}b.preventDefault();const y=b.currentTarget||b.target,j=e.customHeaders||{};let R;const B=new FormData(y),W=Array.from(y.querySelectorAll("input,select,textarea")).filter(p=>!!p.name).map(p=>{let g;const k=p.name;if(p instanceof HTMLInputElement)if(p.type==="radio"){if(p.checked)return g=p.name,{key:k,value:g}}else if(p.type==="checkbox")g=p.checked;else if(p.type==="number"||p.type==="range"){const C=p.valueAsNumber;isNaN(C)||(g=C)}else p.type==="file"?g=p.files:g=p.value;else g=p.value;return{key:k,value:g}});let v=e.contentType;if(e.sendSubmissionsTo==="email"&&(v="multipart/form-data"),Array.from(W).forEach(({value:p})=>{(p instanceof File||Array.isArray(p)&&p[0]instanceof File||p instanceof FileList)&&(v="multipart/form-data")}),v!=="application/json")R=B;else{const p={};Array.from(W).forEach(({value:g,key:k})=>{xe(p,k,g)}),R=JSON.stringify(p)}v&&v!=="multipart/form-data"&&(S&&((I=e.action)!=null&&I.includes("zapier.com"))||(j["content-type"]=v));const E=new CustomEvent("presubmit",{detail:{body:R}});if(t.current&&(t.current.dispatchEvent(E),E.defaultPrevented))return;i("sending");const P=`${qt()==="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"?P:e.action,{body:R,headers:j,method:e.method||"post"}).then(async p=>{let g;const k=p.headers.get("content-type");if(k&&k.indexOf("application/json")!==-1?g=await p.json():g=await p.text(),!p.ok&&e.errorMessagePath){let C=Kt(g,e.errorMessagePath);C&&(typeof C!="string"&&(C=JSON.stringify(C)),s(C),c({formErrorMessage:C}))}if(l(g),i(p.ok?"success":"error"),p.ok){const C=new CustomEvent("submit:success",{detail:{res:p,body:g}});if(t.current){if(t.current.dispatchEvent(C),C.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const T=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(T),T.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},p=>{const g=new CustomEvent("submit:error",{detail:{error:p}});t.current&&(t.current.dispatchEvent(g),g.defaultPrevented)||(l(p),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:b=>f(b),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(m=(u=e.builderBlock)==null?void 0:u.children)==null?void 0:m.map((b,S)=>a.jsx(U,{block:b,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${S}`))}):null,d()==="error"?a.jsx(F,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,d()==="sending"?a.jsx(F,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,d()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(o,null,2)}):null,d()==="success"?a.jsx(F,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}const _t={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 Jt(e){return h.createElement("input",{...e.attributes,key:x.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 Gt={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 Yt(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:x.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Qt={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 Xt(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Zt={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function en(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const tn={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 nn(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},x.isEditing()&&e.imgSrc||"default-key")}const on={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}],shouldReceiveBuilderProps:{builderBlock:!0}};function Pe(e){var i,o,l,r,s,c,d;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 a.jsxs("div",{style:{position:"relative"},children:[a.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:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(s=(r=e.builderBlock)==null?void 0:r.children)!=null&&s.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.length&&!e.fitContent?a.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 an=()=>[{component:$t,...Wt},{component:Mt,...Dt},{component:zt,...Ut},{component:Jt,..._t},{component:Xt,...Qt},{component:Yt,...Gt},{component:en,...Zt},{component:nn,...tn},{component:Pe,...on}],de=()=>[{component:he,...It},{component:we,...wt},{component:Ee,...Et},{component:Re,...Rt},{component:je,...jt},{component:Pt,...Bt},{component:We,...Vt},{component:Be,...Nt},{component:Ft,...At},{component:Tt,...Ct},...an()],rn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
55
|
+
}`})]})}function je(e){return a.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 Q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},X={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Ct={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]}],defaultValue:[{title:[Q],detail:[X]},{title:[Q],detail:[X]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ce=e=>e.toString();function Tt(e){var u;const[t,n]=h.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function l(){const x={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(x).filter(([S,I])=>I!==void 0))}function r(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function s(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function c(){let m=null;if(e.grid&&t.length&&document){const S=t[0];let y=document.querySelector(`.builder-accordion-title[data-index="${S}"]`);if(m=S,y){let j=y.getBoundingClientRect();for(;y=y&&y.nextElementSibling;)if(y){if(y.classList.contains("builder-accordion-detail"))continue;const R=y.getBoundingClientRect();if(R.left>j.left){const B=parseInt(y.getAttribute("data-index")||"",10);isNaN(B)||(j=R,m=B)}else break}}}return typeof m=="number"&&(m=m+1),m}function d(){const m={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([x,S])=>S!==void 0))}function f(m){t.includes(m)?n(i()?[]:t.filter(x=>x!==m)):n(i()?[m]:t.concat(m))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(u=e.items)==null?void 0:u.map((m,x)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:r(x),style:{...l(),width:e.grid?e.gridRowWidth:void 0,order:c()!==null?ce(x):ce(x+1)},"data-index":x,onClick:S=>f(x),children:a.jsx(F,{blocks:m.title,path:`items.${x}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(x)?a.jsx("div",{className:s(x),style:d(),children:a.jsx(F,{blocks:m.detail,path:`items.${x}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const It={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,shouldReceiveBuilderProps:{builderLinkComponent:!0}},wt={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(l=>!l.get("width"))||n.reduce((s,c)=>s+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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Et={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Rt={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","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(r,s=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let u=!1;f.onload=()=>{u=!0,c(f)},f.addEventListener("error",m=>{console.warn("Image load failed",m.error),d(m.error)}),f.src=r,setTimeout(()=>{u||d(new Error("Image load timed out"))},s)})}function i(r){return Math.round(r*1e3)/1e3}const o=e.get("image"),l=e.get("aspectRatio");if(fetch(o).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!l||l===.7041))return n(o).then(r=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&r.width&&r.height&&(e.set("aspectRatio",i(r.height/r.width)),e.set("height",r.height),e.set("width",r.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:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{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}],shouldReceiveBuilderProps:{builderBlock:!0}},jt={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>"}}}]},Bt={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"}],shouldReceiveBuilderProps:{builderContext:!0}};function Pt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(F,{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 Vt={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"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},ee={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},At={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[ee]}],defaultValue:[{label:[{...Z,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Z,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Ft(e){var l;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function o(r){r===t&&e.collapsible?n(-1):n(r)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(l=e.tabs)==null?void 0:l.map((r,s)=>a.jsx("span",{className:`builder-tab-wrap ${t===s?"builder-tab-active":""}`,style:{...t===s?e.activeTabStyle:{}},onClick:c=>o(s),children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${s}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},s))}),i(t)?a.jsx("div",{children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Nt={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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 Be(e){function t(){var s;const n=e.builderContext,{context:i,localState:o,rootState:l,rootSetState:r}=n;return String(((s=e.text)==null?void 0:s.toString())||"").replace(/{{([^}]+)}}/g,(c,d)=>L({code:d,context:i,localState:o,rootState:l,rootSetState:r,enableCache:!1}))}return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:t()},style:{outline:"none"}})}const Wt={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 $t(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]);return h.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let c=0;c<r.length;c++){const d=r[c];if(d.src){if(n.includes(d.src))continue;n.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(o.includes(d.innerText))continue;try{o.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Dt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Lt=["text/javascript","application/javascript","application/ecmascript"],Ot=e=>Lt.includes(e.type);function Mt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]),[r,s]=h.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const u=d[f];if(u.src&&!n.includes(u.src)){n.push(u.src);const m=document.createElement("script");m.async=!0,m.src=u.src,document.head.appendChild(m)}else if(Ot(u)&&!o.includes(u.innerText))try{o.push(u.innerText),new Function(u.innerText)()}catch(m){console.warn("`Embed`: Error running script:",m)}}}return h.useEffect(()=>{t.current&&!r&&(s(!0),c())},[t.current,r]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Ut={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"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Ht=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],qt=()=>{const e=process.env.NODE_ENV||"production";return Ht.includes(e)?e:"production"},Kt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,l)=>o!=null?o[l]:o,e);return i===void 0||i===e?n:i};function zt(e){var u,m;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,l]=h.useState(()=>null),[r,s]=h.useState(()=>"");function c(x){var I,y;const S={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(y=(I=e.builderContext).rootSetState)==null||y.call(I,S):e.builderContext.rootState=S}function d(){return b.isEditing()&&e.previewState||n}function f(x){var I;const S=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(S){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const y=x.currentTarget||x.target,j=e.customHeaders||{};let R;const B=new FormData(y),W=Array.from(y.querySelectorAll("input,select,textarea")).filter(p=>!!p.name).map(p=>{let g;const k=p.name;if(p instanceof HTMLInputElement)if(p.type==="radio"){if(p.checked)return g=p.name,{key:k,value:g}}else if(p.type==="checkbox")g=p.checked;else if(p.type==="number"||p.type==="range"){const C=p.valueAsNumber;isNaN(C)||(g=C)}else p.type==="file"?g=p.files:g=p.value;else g=p.value;return{key:k,value:g}});let v=e.contentType;if(e.sendSubmissionsTo==="email"&&(v="multipart/form-data"),Array.from(W).forEach(({value:p})=>{(p instanceof File||Array.isArray(p)&&p[0]instanceof File||p instanceof FileList)&&(v="multipart/form-data")}),v!=="application/json")R=B;else{const p={};Array.from(W).forEach(({value:g,key:k})=>{xe(p,k,g)}),R=JSON.stringify(p)}v&&v!=="multipart/form-data"&&(S&&((I=e.action)!=null&&I.includes("zapier.com"))||(j["content-type"]=v));const E=new CustomEvent("presubmit",{detail:{body:R}});if(t.current&&(t.current.dispatchEvent(E),E.defaultPrevented))return;i("sending");const P=`${qt()==="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"?P:e.action,{body:R,headers:j,method:e.method||"post"}).then(async p=>{let g;const k=p.headers.get("content-type");if(k&&k.indexOf("application/json")!==-1?g=await p.json():g=await p.text(),!p.ok&&e.errorMessagePath){let C=Kt(g,e.errorMessagePath);C&&(typeof C!="string"&&(C=JSON.stringify(C)),s(C),c({formErrorMessage:C}))}if(l(g),i(p.ok?"success":"error"),p.ok){const C=new CustomEvent("submit:success",{detail:{res:p,body:g}});if(t.current){if(t.current.dispatchEvent(C),C.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const T=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(T),T.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},p=>{const g=new CustomEvent("submit:error",{detail:{error:p}});t.current&&(t.current.dispatchEvent(g),g.defaultPrevented)||(l(p),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>f(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(m=(u=e.builderBlock)==null?void 0:u.children)==null?void 0:m.map((x,S)=>a.jsx(U,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${S}`))}):null,d()==="error"?a.jsx(F,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,d()==="sending"?a.jsx(F,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,d()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(o,null,2)}):null,d()==="success"?a.jsx(F,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}const _t={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 Jt(e){return h.createElement("input",{...e.attributes,key:b.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 Gt={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 Yt(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:b.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Qt={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 Xt(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Zt={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function en(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const tn={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 nn(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},b.isEditing()&&e.imgSrc||"default-key")}const on={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}],shouldReceiveBuilderProps:{builderBlock:!0}};function Pe(e){var i,o,l,r,s,c,d;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 a.jsxs("div",{style:{position:"relative"},children:[a.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:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(s=(r=e.builderBlock)==null?void 0:r.children)!=null&&s.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.length&&!e.fitContent?a.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 an=()=>[{component:$t,...Wt},{component:Mt,...Dt},{component:zt,...Ut},{component:Jt,..._t},{component:Xt,...Qt},{component:Yt,...Gt},{component:en,...Zt},{component:nn,...tn},{component:Pe,...on}],de=()=>[{component:he,...It},{component:we,...wt},{component:Ee,...Et},{component:Re,...Rt},{component:je,...jt},{component:Pt,...Bt},{component:We,...Vt},{component:Be,...Nt},{component:Ft,...At},{component:Tt,...Ct},...an()],rn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
56
56
|
function getAndSetVariantId() {
|
|
57
57
|
function setCookie(name, value, days) {
|
|
58
58
|
let expires = '';
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
thisScriptEl?.remove();
|
|
143
143
|
}
|
|
144
144
|
return;
|
|
145
|
-
}`,Ve="builderIoAbTest",Ae="builderIoRenderContent",q=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),sn=({canTrack:e,content:t})=>!(!(q(t).length>0)||!e||
|
|
145
|
+
}`,Ve="builderIoAbTest",Ae="builderIoRenderContent",q=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),sn=({canTrack:e,content:t})=>!(!(q(t).length>0)||!e||b.isBrowser()),cn=e=>e==="react"||e==="reactNative",Fe=cn(b.TARGET),dn=()=>`
|
|
146
146
|
window.${Ve} = ${rn}
|
|
147
147
|
window.${Ae} = ${ln}
|
|
148
148
|
`,un=(e,t)=>`
|
|
@@ -181,8 +181,8 @@ font-weight: ${s};
|
|
|
181
181
|
text-align: inherit;
|
|
182
182
|
font-family: inherit;
|
|
183
183
|
}
|
|
184
|
-
`,Sn=e=>e?"":yn,vn=e=>`variant-${e}`;function kn(e){var R,B,W,v,E,P,p;const t=h.useRef(null);function n(g){var C,T;const k={...e.builderContextSignal.rootState,...g};e.builderContextSignal.rootSetState?(T=(C=e.builderContextSignal).rootSetState)==null||T.call(C,k):e.setBuilderContextSignal(w=>({...w,rootState:k}))}function i(g){var C,T,w,V,$;const k={...e.builderContextSignal.content,...g,data:{...(C=e.builderContextSignal.content)==null?void 0:C.data,...g==null?void 0:g.data},meta:{...(T=e.builderContextSignal.content)==null?void 0:T.meta,...g==null?void 0:g.meta,breakpoints:((w=g==null?void 0:g.meta)==null?void 0:w.breakpoints)||(($=(V=e.builderContextSignal.content)==null?void 0:V.meta)==null?void 0:$.breakpoints)}};e.setBuilderContextSignal(A=>({...A,content:k}))}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[l,r]=h.useState(()=>e.contentWrapper||"div");function s(g){return
|
|
184
|
+
`,Sn=e=>e?"":yn,vn=e=>`variant-${e}`;function kn(e){var R,B,W,v,E,P,p;const t=h.useRef(null);function n(g){var C,T;const k={...e.builderContextSignal.rootState,...g};e.builderContextSignal.rootSetState?(T=(C=e.builderContextSignal).rootSetState)==null||T.call(C,k):e.setBuilderContextSignal(w=>({...w,rootState:k}))}function i(g){var C,T,w,V,$;const k={...e.builderContextSignal.content,...g,data:{...(C=e.builderContextSignal.content)==null?void 0:C.data,...g==null?void 0:g.data},meta:{...(T=e.builderContextSignal.content)==null?void 0:T.meta,...g==null?void 0:g.meta,breakpoints:((w=g==null?void 0:g.meta)==null?void 0:w.breakpoints)||(($=(V=e.builderContextSignal.content)==null?void 0:V.meta)==null?void 0:$.breakpoints)}};e.setBuilderContextSignal(A=>({...A,content:k}))}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[l,r]=h.useState(()=>e.contentWrapper||"div");function s(g){return b.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:k=>{var w;const{breakpoints:C,contentId:T}=k;!T||T!==((w=e.builderContextSignal.content)==null?void 0:w.id)||C&&i({meta:{breakpoints:C}})},animation:k=>{Se(k)},contentUpdate:k=>{i(k)}}})(g)}function c(){var k,C;const g=(C=(k=e.builderContextSignal.content)==null?void 0:k.data)==null?void 0:C.jsCode;g&&L({code:g,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[d,f]=h.useState(()=>({})),[u,m]=h.useState(()=>({})),[x,S]=h.useState(()=>!1);function I(g){var k,C;if(e.builderContextSignal.content){const T=(k=e.builderContextSignal.content)==null?void 0:k.testVariationId,w=(C=e.builderContextSignal.content)==null?void 0:C.id;b._track({type:"click",canTrack:b.getDefaultCanTrack(e.canTrack),contentId:w,apiKey:e.apiKey,variationId:T!==w?T:void 0,...gn(g),unique:!x})}x||S(!0)}function y(){var k,C,T;const g=(T=(C=(k=e.builderContextSignal.content)==null?void 0:k.data)==null?void 0:C.httpRequests)!=null?T:{};Object.entries(g).forEach(([w,V])=>{if(!V||u[w]||d[w]&&!b.isEditing())return;u[w]=!0;const $=V.replace(/{{([^}]+)}}/g,(A,$e)=>String(L({code:$e,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));b.fetch($).then(A=>A.json()).then(A=>{n({[w]:A}),d[w]=!0}).catch(A=>{console.error("error fetching dynamic data",V,A)}).finally(()=>{u[w]=!1})})}function j(){b.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:ie(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return h.useEffect(()=>{var g,k;if(b.isBrowser()){if(b.isEditing()&&(window.addEventListener("message",s),b.registerInsertMenu(),b.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(T=>{var V;const w=b.createRegisterComponentMessage(T);(V=window.parent)==null||V.postMessage(w,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",j)),e.builderContextSignal.content&&b.getDefaultCanTrack(e.canTrack)){const T=(g=e.builderContextSignal.content)==null?void 0:g.testVariationId,w=(k=e.builderContextSignal.content)==null?void 0:k.id,V=e.apiKey;b._track({type:"impression",canTrack:!0,contentId:w,apiKey:V,variationId:T!==w?T:void 0})}if(b.isPreviewing()&&!b.isEditing()){const T=new URL(location.href).searchParams,w=T.get("builder.preview"),V=T.get(`builder.overrides.${w}`),$=T.get("apiKey")||T.get("builder.space");w===e.model&&$===e.apiKey&&(!e.content||V===e.content.id)&&b.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(A=>{A&&i(A)})}}},[]),h.useEffect(()=>{e.apiKey||b.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."),c(),y(),j()},[]),h.useEffect(()=>{e.content&&i(e.content)},[e.content]),h.useEffect(()=>{c()},[(B=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:B.jsCode]),h.useEffect(()=>{y()},[(v=(W=e.builderContextSignal.content)==null?void 0:W.data)==null?void 0:v.httpRequests]),h.useEffect(()=>{j()},[e.builderContextSignal.rootState]),h.useEffect(()=>{e.data&&n(e.data)},[e.data]),h.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),h.useEffect(()=>()=>{b.isBrowser()&&(window.removeEventListener("message",s),window.removeEventListener("builder:component:stateChangeListenerActivated",j))},[]),a.jsx(z.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(l,{ref:t,onClick:g=>I(g),"builder-content-id":(E=e.builderContextSignal.content)==null?void 0:E.id,"builder-model":e.model,...o(),...e.contentWrapperProps,className:vn(((P=e.content)==null?void 0:P.testVariationId)||((p=e.content)==null?void 0:p.id)),children:e.children}):null})}function Cn(e){const[t,n]=h.useState(()=>`
|
|
185
185
|
${pn({cssCode:e.cssCode,contentId:e.contentId})}
|
|
186
186
|
${xn({customFonts:e.customFonts})}
|
|
187
187
|
${Sn(e.isNestedRender)}
|
|
188
|
-
`.trim());return a.jsx(J,{id:"builderio-content",styles:t,nonce:e.nonce})}const Tn=({content:e,data:t,locale:n})=>{var l,r,s;const i={},o=((l=e==null?void 0:e.data)==null?void 0:l.state)||{};return(s=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},In=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function fe(e){var c,d,f,u,m,
|
|
188
|
+
`.trim());return a.jsx(J,{id:"builderio-content",styles:t,nonce:e.nonce})}const Tn=({content:e,data:t,locale:n})=>{var l,r,s;const i={},o=((l=e==null?void 0:e.data)==null?void 0:l.state)||{};return(s=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},In=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function fe(e){var c,d,f,u,m,x,S;const[t,n]=h.useState(()=>{var I,y;return mn({variationId:(I=e.content)==null?void 0:I.testVariationId,contentId:(y=e.content)==null?void 0:y.id})});function i(I){s(y=>({...y,rootState:I}))}const[o,l]=h.useState(()=>{var I;return[...de(),...((I=e.customComponents)==null?void 0:I.filter(({models:y})=>!(y!=null&&y.length)||!e.model?!0:y.includes(e.model)))||[]].reduce((y,{component:j,...R})=>({...y,[R.name]:{component:j,...b.serializeComponentInfo(R)}}),{})}),[r,s]=h.useState(()=>{var I;return{content:In({content:e.content,data:e.data}),localState:void 0,rootState:Tn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...de(),...((I=e.customComponents)==null?void 0:I.filter(({models:y})=>!(y!=null&&y.length)||!e.model?!0:y.includes(e.model)))||[]].reduce((y,{component:j,...R})=>({...y,[R.name]:b.serializeComponentInfo(R)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||""}});return a.jsx(ge.Provider,{value:{registeredComponents:o},children:a.jsxs(kn,{nonce:e.nonce,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:r,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,setBuilderContextSignal:s,children:[e.isSsrAbTest?a.jsx(te,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,a.jsx(Cn,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(c=r.content)==null?void 0:c.id,cssCode:(f=(d=r.content)==null?void 0:d.data)==null?void 0:f.cssCode,customFonts:(m=(u=r.content)==null?void 0:u.data)==null?void 0:m.customFonts}),a.jsx(F,{blocks:(S=(x=r.content)==null?void 0:x.data)==null?void 0:S.blocks,context:r,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Ne(e){var r;const[t,n]=h.useState(()=>sn({canTrack:b.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var s;return un(q(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((s=e.content)==null?void 0:s.id)||"")}function o(){return q(e.content).map(s=>`.variant-${s.testVariationId} { display: none; } `).join("")}function l(){var s;return t?{...e.content,testVariationId:(s=e.content)==null?void 0:s.id}:b.handleABTestingSync({item:e.content,canTrack:b.getDefaultCanTrack(e.canTrack)})}return h.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&b.TARGET!=="reactNative"?a.jsx(te,{id:"builderio-init-variants-fns",scriptStr:dn(),nonce:e.nonce||""}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:"builderio-variants",styles:o(),nonce:e.nonce||""}),a.jsx(te,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(r=q(e.content))==null?void 0:r.map(s=>a.jsx(fe,{isNestedRender:e.isNestedRender,nonce:e.nonce,content:s,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},s.testVariationId))]}):null,a.jsx(fe,{nonce:e.nonce,isNestedRender:e.isNestedRender,content:l(),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 wn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return b.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{b.logger.error("Could not fetch symbol content: ",n)})};function We(e){var s,c,d,f;function t(){return"div"}function n(){return"div"}function i(){var u,m;return[e.attributes[M()],"builder-symbol",(u=e.symbol)!=null&&u.inline?"builder-inline-symbol":void 0,(m=e.symbol)!=null&&m.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[o,l]=h.useState(()=>{var u;return(u=e.symbol)==null?void 0:u.content});function r(){o||wn({symbol:e.symbol,builderContextValue:e.builderContext}).then(u=>{u&&l(u)})}return h.useEffect(()=>{},[]),h.useEffect(()=>{r()},[e.symbol]),a.jsx("div",{...e.attributes,className:i(),children:a.jsx(Ne,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(s=e.builderBlock)==null?void 0:s.id},customComponents:Object.values(e.builderComponents),data:{...(c=e.symbol)==null?void 0:c.data,...e.builderContext.localState,...(d=o==null?void 0:o.data)==null?void 0:d.state},canTrack:e.builderContext.canTrack,model:(f=e.symbol)==null?void 0:f.model,content:o,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.Blocks=F;exports.BuilderContext=z;exports.Button=he;exports.Columns=we;exports.Content=Ne;exports.Fragment=Ee;exports.Image=Re;exports.Section=je;exports.Symbol=We;exports.Text=Be;exports.Video=Pe;
|
|
@@ -3,14 +3,14 @@ var qe = Object.defineProperty;
|
|
|
3
3
|
var Ke = (e, t, n) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ie = (e, t, n) => (Ke(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
5
|
import { jsx as s, Fragment as R, jsxs as V } from "react/jsx-runtime";
|
|
6
|
-
import { TARGET as
|
|
6
|
+
import { TARGET as q, isEditing as F, isBrowser as M, getUserAttributes as ze, checkIsDefined as G, logger as Z, registerInsertMenu as _e, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-f6ee5d92.js";
|
|
7
7
|
import { createContext as Re, useState as T, useEffect as P, useContext as be, useRef as ee, createElement as Ee } from "react";
|
|
8
8
|
const et = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), tt = (e) => typeof e == "string" && et.has(e.toLowerCase());
|
|
9
9
|
function de(e) {
|
|
10
10
|
return /* @__PURE__ */ s(R, { children: tt(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
11
11
|
}
|
|
12
|
-
const
|
|
13
|
-
switch (
|
|
12
|
+
const z = () => {
|
|
13
|
+
switch (q) {
|
|
14
14
|
case "react":
|
|
15
15
|
case "reactNative":
|
|
16
16
|
case "rsc":
|
|
@@ -27,7 +27,7 @@ function nt(e) {
|
|
|
27
27
|
function t() {
|
|
28
28
|
return {
|
|
29
29
|
...e.attributes,
|
|
30
|
-
[
|
|
30
|
+
[z()]: `${e.link ? "" : "builder-button"} ${e.attributes[z()] || ""}`,
|
|
31
31
|
...e.link ? {
|
|
32
32
|
href: e.link,
|
|
33
33
|
target: e.openLinkInNewTab ? "_blank" : void 0,
|
|
@@ -273,7 +273,7 @@ function ut(e, t, n = {}) {
|
|
|
273
273
|
return i = this, o = arguments, f <= 0 || f > t ? (a && (clearTimeout(a), a = null), l = d, r = e.apply(i, o), a || (i = o = null)) : !a && n.trailing !== !1 && (a = setTimeout(c, f)), r;
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function K(e, ...t) {
|
|
277
277
|
const n = Object(e);
|
|
278
278
|
for (let i = 1; i < arguments.length; i++) {
|
|
279
279
|
const o = arguments[i];
|
|
@@ -317,8 +317,8 @@ function We(e) {
|
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
Array.from(t).forEach((n) => {
|
|
320
|
-
Ne(e, n), n.style.transition = "none", n.style.transitionDelay = "0",
|
|
321
|
-
n.style.transition = `all ${e.duration}s ${te(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"),
|
|
320
|
+
Ne(e, n), n.style.transition = "none", n.style.transitionDelay = "0", K(n.style, e.steps[0].styles), setTimeout(() => {
|
|
321
|
+
n.style.transition = `all ${e.duration}s ${te(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), K(n.style, e.steps[1].styles), setTimeout(() => {
|
|
322
322
|
n.style.transition = "", n.style.transitionDelay = "";
|
|
323
323
|
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
324
324
|
});
|
|
@@ -335,10 +335,10 @@ function ht(e) {
|
|
|
335
335
|
let i = !1, o = !1;
|
|
336
336
|
function r() {
|
|
337
337
|
!i && l(n) ? (i = !0, o = !0, setTimeout(() => {
|
|
338
|
-
|
|
338
|
+
K(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", a), setTimeout(() => {
|
|
339
339
|
o = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
340
340
|
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
341
|
-
})) : e.repeat && i && !o && !l(n) && (i = !1,
|
|
341
|
+
})) : e.repeat && i && !o && !l(n) && (i = !1, K(n.style, e.steps[0].styles));
|
|
342
342
|
}
|
|
343
343
|
const a = ut(r, 200, {
|
|
344
344
|
leading: !1
|
|
@@ -349,7 +349,7 @@ function ht(e) {
|
|
|
349
349
|
}
|
|
350
350
|
const c = e.steps[0].styles;
|
|
351
351
|
function d() {
|
|
352
|
-
|
|
352
|
+
K(n.style, c);
|
|
353
353
|
}
|
|
354
354
|
d(), setTimeout(() => {
|
|
355
355
|
n.style.transition = `all ${e.duration}s ${te(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
@@ -389,7 +389,7 @@ const pt = ({
|
|
|
389
389
|
block: e
|
|
390
390
|
}));
|
|
391
391
|
function Fe(e) {
|
|
392
|
-
switch (
|
|
392
|
+
switch (q) {
|
|
393
393
|
case "svelte":
|
|
394
394
|
case "vue":
|
|
395
395
|
case "solid":
|
|
@@ -627,7 +627,7 @@ function Oe(e) {
|
|
|
627
627
|
const r = n[o];
|
|
628
628
|
let a = wt(o);
|
|
629
629
|
if (e.stripPrefix)
|
|
630
|
-
switch (
|
|
630
|
+
switch (q) {
|
|
631
631
|
case "vue":
|
|
632
632
|
a = a.replace("v-on:", "");
|
|
633
633
|
break;
|
|
@@ -660,7 +660,7 @@ function fe({
|
|
|
660
660
|
block: e,
|
|
661
661
|
context: t
|
|
662
662
|
}),
|
|
663
|
-
[
|
|
663
|
+
[z()]: [e.id, "builder-block", e.class, (i = e.properties) == null ? void 0 : i.class].filter(Boolean).join(" ")
|
|
664
664
|
};
|
|
665
665
|
return Et({
|
|
666
666
|
properties: n,
|
|
@@ -841,7 +841,7 @@ function _(e) {
|
|
|
841
841
|
registeredComponents: e.registeredComponents,
|
|
842
842
|
builderBlock: i(),
|
|
843
843
|
includeBlockProps: ((g = t == null ? void 0 : t()) == null ? void 0 : g.noWrap) === !0,
|
|
844
|
-
isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC)
|
|
844
|
+
isInteractive: !((y = t == null ? void 0 : t()) != null && y.isRSC && q === "rsc")
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
847
|
return P(() => {
|
|
@@ -1100,7 +1100,7 @@ function Ft(e) {
|
|
|
1100
1100
|
...x.link ? {
|
|
1101
1101
|
href: x.link
|
|
1102
1102
|
} : {},
|
|
1103
|
-
[
|
|
1103
|
+
[z()]: "builder-column",
|
|
1104
1104
|
style: Fe(C(w))
|
|
1105
1105
|
};
|
|
1106
1106
|
}
|
|
@@ -3362,7 +3362,7 @@ const wn = () => [{
|
|
|
3362
3362
|
})), Bn = ({
|
|
3363
3363
|
canTrack: e,
|
|
3364
3364
|
content: t
|
|
3365
|
-
}) => !(!(Y(t).length > 0) || !e || M()), Pn = (e) => e === "react" || e === "reactNative", Me = Pn(
|
|
3365
|
+
}) => !(!(Y(t).length > 0) || !e || M()), Pn = (e) => e === "react" || e === "reactNative", Me = Pn(q), Vn = () => `
|
|
3366
3366
|
window.${je} = ${Rn}
|
|
3367
3367
|
window.${Ue} = ${En}
|
|
3368
3368
|
`, An = (e, t) => `
|
|
@@ -3917,7 +3917,7 @@ function _n(e) {
|
|
|
3917
3917
|
}
|
|
3918
3918
|
return P(() => {
|
|
3919
3919
|
}, []), /* @__PURE__ */ V(R, { children: [
|
|
3920
|
-
!e.isNestedRender &&
|
|
3920
|
+
!e.isNestedRender && q !== "reactNative" ? /* @__PURE__ */ s(
|
|
3921
3921
|
ce,
|
|
3922
3922
|
{
|
|
3923
3923
|
id: "builderio-init-variants-fns",
|
|
@@ -4026,7 +4026,7 @@ function Yn(e) {
|
|
|
4026
4026
|
function i() {
|
|
4027
4027
|
var u, m;
|
|
4028
4028
|
return [
|
|
4029
|
-
e.attributes[
|
|
4029
|
+
e.attributes[z()],
|
|
4030
4030
|
"builder-symbol",
|
|
4031
4031
|
(u = e.symbol) != null && u.inline ? "builder-inline-symbol" : void 0,
|
|
4032
4032
|
(m = e.symbol) != null && m.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
package/lib/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-ba3e0524.cjs");require("react/jsx-runtime");require("react");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;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;
|
package/lib/browser/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Blocks as i, BuilderContext as s, Button as n, Columns as c, Content as m, Fragment as g, Image as a, Section as d, Symbol as l, Text as p, Video as u } from "./blocks-exports.mjs";
|
|
2
|
-
import { _processContentResult as B, createRegisterComponentMessage as C, fetchBuilderProps as E, fetchEntries as h, fetchOneEntry as x, getBuilderSearchParams as S, isEditing as b, isPreviewing as P, register as k, setEditorSettings as y, subscribeToEditor as R, track as T } from "./server-entry-
|
|
2
|
+
import { _processContentResult as B, createRegisterComponentMessage as C, fetchBuilderProps as E, fetchEntries as h, fetchOneEntry as x, getBuilderSearchParams as S, isEditing as b, isPreviewing as P, register as k, setEditorSettings as y, subscribeToEditor as R, track as T } from "./server-entry-f6ee5d92.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
export {
|
package/lib/browser/init.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ivm=require("isolated-vm"),serverEntry=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ivm=require("isolated-vm"),serverEntry=require("./server-entry-ba3e0524.cjs"),SDK_NAME_FOR_TARGET=(()=>{switch(serverEntry.TARGET){case"rsc":return"react-nextjs";case"reactNative":return"react-native";default:return serverEntry.TARGET}})(),SDK_NAME=`@builder.io/sdk-${SDK_NAME_FOR_TARGET}`,noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(t){}const INJECTED_IVM_GLOBAL="BUILDER_IVM";let IVM_INSTANCE=null;const setIvm=(t,e={})=>{IVM_INSTANCE=t,setIsolateContext(e)},SHOULD_MENTION_INITIALIZE_SCRIPT=SDK_NAME==="@builder.io/sdk-react-nextjs"||SDK_NAME==="@builder.io/sdk-react",getIvm=()=>{try{if(IVM_INSTANCE)return IVM_INSTANCE;const e=safeDynamicRequire("isolated-vm");if(e)return e}catch(e){serverEntry.logger.error("isolated-vm import error.",e)}const t=`${serverEntry.MSG_PREFIX}could not import \`isolated-vm\` module for safe script execution on a Node server.
|
|
2
2
|
|
|
3
3
|
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
4
4
|
|
package/lib/browser/init.mjs
CHANGED