@builder.io/sdk-react 0.13.4 → 1.0.2

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.
@@ -1,15 +1,15 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),u=require("./server-entry-881c178e.cjs"),Ae=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ve=e=>typeof e=="string"&&Ae.has(e.toLowerCase());function G(e){return o.jsx(o.Fragment,{children:Ve(e.TagName)?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):o.jsx(o.Fragment,{children:typeof e.TagName=="string"?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}const O=()=>{switch(u.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function me(e){return o.jsx(G,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[O()]:`${e.link?"":"builder-button"} ${e.attributes[O()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}const Q=m.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),fe=m.createContext({registeredComponents:{}});function We(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Ne=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),$e=()=>({isEditing:u.isEditing(),isBrowser:u.isBrowser(),isServer:!u.isBrowser(),getUserAttributes:()=>u.getUserAttributes()}),De=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,oe=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:r,rootState:s})=>{const l=Ne({builder:t,context:n,event:i,state:ge({rootState:s,localState:a,rootSetState:r})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function ge({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const r=i[a];return typeof r=="object"?ge({rootState:r,localState:void 0,rootSetState:n?s=>{i[a]=s,n(i)}:void 0}):r},set:(i,a,r)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=r,n==null||n(i),!0}})}function Le(){var e;return typeof process!="undefined"&&u.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Oe=()=>{var i;if(!Le())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?(u.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},Me=e=>(u.isBrowser()||Oe(),oe(e));function M({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:r,isExpression:s=!0}){if(e===""){u.logger.warn("Skipping evaluation of empty code block.");return}const l={code:De(e,{isExpression:s}),builder:$e(),context:t,event:r,rootSetState:a,rootState:i,localState:n};try{return Me(l)}catch(c){u.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const he=(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((a,r,s)=>Object(a[r])===a[r]?a[r]:a[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const Ue=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const r=u.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const c=e.bindings[l],d=M({code:c,localState:n,rootState:i,rootSetState:a,context:t});he(s,l,d)}return s};function K({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:a,rootSetState:r}){const s=e;return n?Ue({block:s,localState:i,rootState:a,rootSetState:r,context:t}):s}function He(e,t,n={}){let i,a,r,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,a),s||(i=a=null)};return function(){const d=Date.now();!l&&n.leading===!1&&(l=d);const f=t-(d-l);return i=this,a=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=d,r=e.apply(i,a),s||(i=a=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,f)),r}}function D(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r])}return n}const X=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function _e(e){for(const t of e)switch(t.trigger){case"pageLoad":be(t);break;case"hover":qe(t);break;case"scrollInView":ze(t);break}}function Z(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ee(e,t){const n=Ke(e),i=getComputedStyle(t),a=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[a,r];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function Ke(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 be(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n),n.style.transition="none",n.style.transitionDelay="0",D(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),D(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function qe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);const i=e.steps[0].styles,a=e.steps[1].styles;function r(){D(n.style,i)}function s(){D(n.style,a)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function ze(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);let i=!1,a=!1;function r(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{D(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!l(n)&&(i=!1,D(n.style,e.steps[0].styles))}const s=He(r,200,{leading:!1});function l(f){const S=f.getBoundingClientRect(),C=window.innerHeight,y=(e.thresholdPercent||0)/100*C;return S.bottom>y&&S.top<C-y}const c=e.steps[0].styles;function d(){D(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Je=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=K({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const a=n[i];if(a)return a;console.warn(`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("./server-entry-a595b1cf.cjs"),m=require("react"),Ve=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ae=e=>typeof e=="string"&&Ve.has(e.toLowerCase());function G(e){return o.jsx(o.Fragment,{children:Ae(e.TagName)?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):o.jsx(o.Fragment,{children:typeof e.TagName=="string"?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}const O=()=>{switch(u.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function ue(e){return o.jsx(G,{attributes:{...e.attributes,[O()]:`${e.link?"":"builder-button"} ${e.attributes[O()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const Q=m.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),me=m.createContext({registeredComponents:{}});function We(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Ne=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),$e=()=>({isEditing:u.isEditing(),isBrowser:u.isBrowser(),isServer:!u.isBrowser(),getUserAttributes:()=>u.getUserAttributes()}),De=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ie=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:r,rootState:s})=>{const l=Ne({builder:t,context:n,event:i,state:fe({rootState:s,localState:a,rootSetState:r})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function fe({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const r=i[a];return typeof r=="object"?fe({rootState:r,localState:void 0,rootSetState:n?s=>{i[a]=s,n(i)}:void 0}):r},set:(i,a,r)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=r,n==null||n(i),!0}})}function Le(){var e;return typeof process!="undefined"&&u.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Oe=()=>{var i;if(!Le())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?(u.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},Me=e=>(u.isBrowser()||Oe(),ie(e));function M({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:r,isExpression:s=!0}){if(e===""){u.logger.warn("Skipping evaluation of empty code block.");return}const l={code:De(e,{isExpression:s}),builder:$e(),context:t,event:r,rootSetState:a,rootState:i,localState:n};try{return Me(l)}catch(c){u.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const ge=(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((a,r,s)=>Object(a[r])===a[r]?a[r]:a[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const Ue=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const r=u.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const c=e.bindings[l],d=M({code:c,localState:n,rootState:i,rootSetState:a,context:t});ge(s,l,d)}return s};function K({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:a,rootSetState:r}){const s=e;return n?Ue({block:s,localState:i,rootState:a,rootSetState:r,context:t}):s}function He(e,t,n={}){let i,a,r,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,a),s||(i=a=null)};return function(){const d=Date.now();!l&&n.leading===!1&&(l=d);const f=t-(d-l);return i=this,a=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=d,r=e.apply(i,a),s||(i=a=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,f)),r}}function $(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r])}return n}const X=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function _e(e){for(const t of e)switch(t.trigger){case"pageLoad":he(t);break;case"hover":qe(t);break;case"scrollInView":ze(t);break}}function Z(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ee(e,t){const n=Ke(e),i=getComputedStyle(t),a=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[a,r];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function Ke(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 he(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n),n.style.transition="none",n.style.transitionDelay="0",$(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),$(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function qe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);const i=e.steps[0].styles,a=e.steps[1].styles;function r(){$(n.style,i)}function s(){$(n.style,a)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function ze(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);let i=!1,a=!1;function r(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{$(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!l(n)&&(i=!1,$(n.style,e.steps[0].styles))}const s=He(r,200,{leading:!1});function l(f){const S=f.getBoundingClientRect(),C=window.innerHeight,y=(e.thresholdPercent||0)/100*C;return S.bottom>y&&S.top<C-y}const c=e.steps[0].styles;function d(){$(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Je=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=K({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const a=n[i];if(a)return a;console.warn(`
2
2
  Could not find a registered component named "${i}".
3
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},Ye=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return a.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[s]:c,[`$${s}Index`]:d}},block:i}))},xe={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ae=(e,t=xe)=>`@media (max-width: ${t[e].max}px)`,ye=({small:e,medium:t})=>{const n=u.fastClone(xe);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const a=n.small.max+1;n.medium={max:t,min:a,default:a+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},Ge=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),pe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Ge(n)}: ${i};`}).filter(u.checkIsDefined),Qe=e=>pe(e).join(`
3
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},Ye=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return a.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[s]:c,[`$${s}Index`]:d}},block:i}))},be={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},oe=(e,t=be)=>`@media (max-width: ${t[e].max}px)`,xe=({small:e,medium:t})=>{const n=u.fastClone(be);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const a=n.small.max+1;n.medium={max:t,min:a,default:a+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},Ge=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),ye=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Ge(n)}: ${i};`}).filter(u.checkIsDefined),Qe=e=>ye(e).join(`
4
4
  `),z=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
5
5
  ${Qe(n)}
6
6
  }`;return e?`${e} {
7
7
  ${i}
8
- }`:i};function q(e){return o.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function Xe(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 u.checkIsDefined(i.hide)?!i.hide:u.checkIsDefined(i.show)?i.show:!0}function n(){var y;const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),a=i.responsiveStyles,r=e.context.content,s=ye(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),l=a==null?void 0:a.large,c=a==null?void 0:a.medium,d=a==null?void 0:a.small,f=i.id;if(!f)return"";const S=l?z({className:f,styles:l}):"",C=c?z({className:f,styles:c,mediaQuery:ae("medium",s)}):"",g=d?z({className:f,styles:d,mediaQuery:ae("small",s)}):"";return[S,C,g].join(" ")}return o.jsx(o.Fragment,{children:n()&&t()?o.jsx(o.Fragment,{children:o.jsx(q,{styles:n()})}):null})}function Ze(e){return e.charAt(0).toUpperCase()+e.slice(1)}const et=e=>`on${Ze(e)}`,tt=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Se(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const r=n[a];let s=et(a);if(e.stripPrefix)switch(u.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=tt(r,e)}return t}function nt({style:e}){return e}const it=({block:e,context:t})=>ve(nt({style:e.style||{},context:t,block:e}));function ve(e){switch(u.TARGET){case"svelte":case"vue":case"solid":return pe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function ot({properties:e}){return e}const at=e=>({href:e.href});function te({block:e,context:t}){var i;const n={...at(e),...e.properties,"builder-id":e.id,style:it({block:e,context:t}),[O()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return ot({properties:n,context:t,block:e})}function rt(e){return o.jsx(G,{TagName:e.Wrapper,attributes:te({block:e.block,context:e.context}),actionAttributes:Se({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 st(e){return o.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...te({block:e.block,context:e.context}),...Se({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const lt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:r,contextValue:s})=>{const l={...e,...a?{attributes:te({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function re(e){var i;const[t,n]=m.useState(()=>e.isInteractive?st:e.componentRef);return o.jsx(o.Fragment,{children:e.componentRef?o.jsx(o.Fragment,{children:o.jsx(t,{...lt({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(a=>o.jsx(U,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function ct(e){const[t,n]=m.useState(()=>e.repeatContext);return o.jsx(Q.Provider,{value:t,children:o.jsx(U,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function U(e){var f,S,C;function t(){return Je({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return Ye({block:e.block,context:e.context})}function i(){var g;return(g=e.block.repeat)!=null&&g.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 a(){var y;return e.block.tagName==="a"||((y=i().properties)==null?void 0:y.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var p,E;if((p=e.block.repeat)!=null&&p.collection)return!!((E=n==null?void 0:n())!=null&&E.length);const g="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!g}function s(){var y,p;return!((y=t==null?void 0:t())!=null&&y.component)&&!n()?(p=i().children)!=null?p:[]:[]}function l(){var g,y,p,E,P,k,I,F,R,V,W;return{blockChildren:(g=i().children)!=null?g:[],componentRef:(y=t==null?void 0:t())==null?void 0:y.component,componentOptions:{...We(i()),builderContext:e.context,...((p=t==null?void 0:t())==null?void 0:p.name)==="Core:Button"||((E=t==null?void 0:t())==null?void 0:E.name)==="Symbol"||((P=t==null?void 0:t())==null?void 0:P.name)==="Columns"||((k=t==null?void 0:t())==null?void 0:k.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((I=t==null?void 0:t())==null?void 0:I.name)==="Symbol"||((F=t==null?void 0:t())==null?void 0:F.name)==="Columns"||((R=t==null?void 0:t())==null?void 0:R.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((V=t==null?void 0:t())==null?void 0:V.noWrap)===!0,isInteractive:!((W=t==null?void 0:t())!=null&&W.isRSC)}}const[c,d]=m.useState(()=>e.context);return m.useEffect(()=>{const g=i().id,y=i().animations;y&&g&&_e(y.filter(p=>p.trigger!=="hover").map(p=>({...p,elementId:g})))},[]),o.jsx(o.Fragment,{children:r()?o.jsxs(o.Fragment,{children:[o.jsx(Xe,{block:e.block,context:e.context}),(f=t==null?void 0:t())!=null&&f.noWrap?o.jsx(o.Fragment,{children:o.jsx(re,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):o.jsx(o.Fragment,{children:n()?o.jsx(o.Fragment,{children:(C=n())==null?void 0:C.map((g,y)=>o.jsx(ct,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):o.jsx(o.Fragment,{children:o.jsxs(rt,{Wrapper:a(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[o.jsx(re,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(S=s())==null?void 0:S.map(g=>o.jsx(U,{block:g,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},g.id))]})})})]}):null})}function dt(e){function t(){var a;return"builder-blocks"+((a=e.blocks)!=null&&a.length?"":" no-blocks")}function n(){var a,r;u.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var a,r;u.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return o.jsxs(o.Fragment,{children:[o.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:a=>n(),onMouseEnter:a=>i(),onKeyPress:a=>n(),...e.BlocksWrapperProps,children:e.children}),o.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
8
+ }`:i};function q(e){return o.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function Xe(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 u.checkIsDefined(i.hide)?!i.hide:u.checkIsDefined(i.show)?i.show:!0}function n(){var y;const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),a=i.responsiveStyles,r=e.context.content,s=xe(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),l=a==null?void 0:a.large,c=a==null?void 0:a.medium,d=a==null?void 0:a.small,f=i.id;if(!f)return"";const S=l?z({className:f,styles:l}):"",C=c?z({className:f,styles:c,mediaQuery:oe("medium",s)}):"",g=d?z({className:f,styles:d,mediaQuery:oe("small",s)}):"";return[S,C,g].join(" ")}return o.jsx(o.Fragment,{children:n()&&t()?o.jsx(o.Fragment,{children:o.jsx(q,{styles:n()})}):null})}function Ze(e){return e.charAt(0).toUpperCase()+e.slice(1)}const et=e=>`on${Ze(e)}`,tt=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function pe(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const r=n[a];let s=et(a);if(e.stripPrefix)switch(u.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=tt(r,e)}return t}function nt({style:e}){return e}const it=({block:e,context:t})=>Se(nt({style:e.style||{},context:t,block:e}));function Se(e){switch(u.TARGET){case"svelte":case"vue":case"solid":return ye(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function ot({properties:e}){return e}const at=e=>({href:e.href});function te({block:e,context:t}){var i;const n={...at(e),...e.properties,"builder-id":e.id,style:it({block:e,context:t}),[O()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return ot({properties:n,context:t,block:e})}function rt(e){return o.jsx(G,{TagName:e.Wrapper,attributes:te({block:e.block,context:e.context}),actionAttributes:pe({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 st(e){return o.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...te({block:e.block,context:e.context}),...pe({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const lt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:r,contextValue:s})=>{const l={...e,...a?{attributes:te({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function ae(e){var i;const[t,n]=m.useState(()=>e.isInteractive?st:e.componentRef);return o.jsx(o.Fragment,{children:e.componentRef?o.jsx(o.Fragment,{children:o.jsx(t,{...lt({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(a=>o.jsx(U,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function ct(e){const[t,n]=m.useState(()=>e.repeatContext);return o.jsx(Q.Provider,{value:t,children:o.jsx(U,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function U(e){var f,S,C;function t(){return Je({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return Ye({block:e.block,context:e.context})}function i(){var g;return(g=e.block.repeat)!=null&&g.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 a(){var y;return e.block.tagName==="a"||((y=i().properties)==null?void 0:y.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var p,E;if((p=e.block.repeat)!=null&&p.collection)return!!((E=n==null?void 0:n())!=null&&E.length);const g="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!g}function s(){var y,p;return!((y=t==null?void 0:t())!=null&&y.component)&&!n()?(p=i().children)!=null?p:[]:[]}function l(){var g,y,p,E,P,k,I,F,R,A,W;return{blockChildren:(g=i().children)!=null?g:[],componentRef:(y=t==null?void 0:t())==null?void 0:y.component,componentOptions:{...We(i()),builderContext:e.context,...((p=t==null?void 0:t())==null?void 0:p.name)==="Core:Button"||((E=t==null?void 0:t())==null?void 0:E.name)==="Symbol"||((P=t==null?void 0:t())==null?void 0:P.name)==="Columns"||((k=t==null?void 0:t())==null?void 0:k.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((I=t==null?void 0:t())==null?void 0:I.name)==="Symbol"||((F=t==null?void 0:t())==null?void 0:F.name)==="Columns"||((R=t==null?void 0:t())==null?void 0:R.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((A=t==null?void 0:t())==null?void 0:A.noWrap)===!0,isInteractive:!((W=t==null?void 0:t())!=null&&W.isRSC)}}const[c,d]=m.useState(()=>e.context);return m.useEffect(()=>{const g=i().id,y=i().animations;y&&g&&_e(y.filter(p=>p.trigger!=="hover").map(p=>({...p,elementId:g})))},[]),o.jsx(o.Fragment,{children:r()?o.jsxs(o.Fragment,{children:[o.jsx(Xe,{block:e.block,context:e.context}),(f=t==null?void 0:t())!=null&&f.noWrap?o.jsx(o.Fragment,{children:o.jsx(ae,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):o.jsx(o.Fragment,{children:n()?o.jsx(o.Fragment,{children:(C=n())==null?void 0:C.map((g,y)=>o.jsx(ct,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):o.jsx(o.Fragment,{children:o.jsxs(rt,{Wrapper:a(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[o.jsx(ae,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(S=s())==null?void 0:S.map(g=>o.jsx(U,{block:g,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},g.id))]})})})]}):null})}function dt(e){function t(){var a;return"builder-blocks"+((a=e.blocks)!=null&&a.length?"":" no-blocks")}function n(){var a,r;u.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var a,r;u.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return o.jsxs(o.Fragment,{children:[o.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:a=>n(),onMouseEnter:a=>i(),onKeyPress:a=>n(),...e.BlocksWrapperProps,children:e.children}),o.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: stretch;
12
- }`})]})}function $(e){var i,a,r;const t=m.useContext(Q),n=m.useContext(fe);return o.jsx(dt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(i=e.context)==null?void 0:i.BlocksWrapper,BlocksWrapperProps:(a=e.context)==null?void 0:a.BlocksWrapperProps,children:e.blocks?o.jsx(o.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>o.jsx(U,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function ke(e){var P;const[t,n]=m.useState(()=>typeof e.space=="number"?e.space||0:20),[i,a]=m.useState(()=>e.columns||[]),[r,s]=m.useState(()=>e.stackColumnsAt||"tablet");function l(k){var I;return((I=i[k])==null?void 0:I.width)||100/i.length}function c(k){const I=t*(i.length-1)/i.length;return`calc(${l(k)}% - ${I}px)`}function d({stackedStyle:k,desktopStyle:I}){return r==="tablet"?k:I}function f({stackedStyle:k,desktopStyle:I}){return r==="never"?I:k}const[S,C]=m.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function g(){return{"--flex-dir":S,"--flex-dir-tablet":d({stackedStyle:S,desktopStyle:"row"})}}function y(k){const I=k===0?0:t,F=c(k),R=`${I}px`,V="100%",W=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:F,["marginLeft"]:R,"--column-width-mobile":f({stackedStyle:V,desktopStyle:F}),"--column-margin-left-mobile":f({stackedStyle:W,desktopStyle:R}),"--column-width-tablet":d({stackedStyle:V,desktopStyle:F}),"--column-margin-left-tablet":d({stackedStyle:W,desktopStyle:R})}}function p(k){var F,R;return ye(((R=(F=e.builderContext.content)==null?void 0:F.meta)==null?void 0:R.breakpoints)||{})[k].max}function E(){return`
12
+ }`})]})}function D(e){var i,a,r;const t=m.useContext(Q),n=m.useContext(me);return o.jsx(dt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(i=e.context)==null?void 0:i.BlocksWrapper,BlocksWrapperProps:(a=e.context)==null?void 0:a.BlocksWrapperProps,children:e.blocks?o.jsx(o.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>o.jsx(U,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function ve(e){var P;const[t,n]=m.useState(()=>typeof e.space=="number"?e.space||0:20),[i,a]=m.useState(()=>e.columns||[]),[r,s]=m.useState(()=>e.stackColumnsAt||"tablet");function l(k){var I;return((I=i[k])==null?void 0:I.width)||100/i.length}function c(k){const I=t*(i.length-1)/i.length;return`calc(${l(k)}% - ${I}px)`}function d({stackedStyle:k,desktopStyle:I}){return r==="tablet"?k:I}function f({stackedStyle:k,desktopStyle:I}){return r==="never"?I:k}const[S,C]=m.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function g(){return{"--flex-dir":S,"--flex-dir-tablet":d({stackedStyle:S,desktopStyle:"row"})}}function y(k){const I=k===0?0:t,F=c(k),R=`${I}px`,A="100%",W=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:F,["marginLeft"]:R,"--column-width-mobile":f({stackedStyle:A,desktopStyle:F}),"--column-margin-left-mobile":f({stackedStyle:W,desktopStyle:R}),"--column-width-tablet":d({stackedStyle:A,desktopStyle:F}),"--column-margin-left-tablet":d({stackedStyle:W,desktopStyle:R})}}function p(k){var F,R;return xe(((R=(F=e.builderContext.content)==null?void 0:F.meta)==null?void 0:R.breakpoints)||{})[k].max}function E(){return`
13
13
  @media (max-width: ${p("medium")}px) {
14
14
  .${e.builderBlock.id}-breakpoints {
15
15
  flex-direction: var(--flex-dir-tablet);
@@ -33,10 +33,10 @@
33
33
  margin-left: var(--column-margin-left-mobile) !important;
34
34
  }
35
35
  },
36
- `}return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-1046d78c`,style:g(),children:[o.jsx(o.Fragment,{children:o.jsx(q,{styles:E()})}),(P=e.columns)==null?void 0:P.map((k,I)=>o.jsx(G,{TagName:k.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...k.link?{href:k.link}:{},[O()]:"builder-column",style:ve(y(I))},children:o.jsx($,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:k.blocks})},I))]}),o.jsx("style",{children:`.div-1046d78c {
36
+ `}return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-f5024694`,style:g(),children:[o.jsx(o.Fragment,{children:o.jsx(q,{styles:E()})}),(P=e.columns)==null?void 0:P.map((k,I)=>o.jsx(G,{TagName:k.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...k.link?{href:k.link}:{},[O()]:"builder-column",style:Se(y(I))},children:o.jsx(D,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:k.blocks})},I))]}),o.jsx("style",{children:`.div-f5024694 {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function Ce(e){return o.jsx("span",{children:e.children})}function se(e){return e.replace(/http(s)?:/,"")}function ut(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+a+t+"="+encodeURIComponent(n)}function mt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return se(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),a=n[3],r=t.match("x")?t:`${t}x`;return se(`${i[0]}_${r}${a}`)}return null}function J(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(a=>a!==i).map(a=>`${ut(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[mt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function we(e){var a,r,s,l;function t(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),J(d)}else if(e.image&&!e.srcset)return J(d);return J(d)}function n(){var c;return(c=t==null?void 0:t())!=null&&c.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const c={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?c:void 0}return o.jsxs(o.Fragment,{children:[o.jsxs(o.Fragment,{children:[o.jsxs("picture",{children:[n()?o.jsx(o.Fragment,{children:o.jsx("source",{type:"image/webp",srcSet:n()})}):null,o.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length&&e.fitContent)?o.jsx(o.Fragment,{children:o.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:e.children}):null,!e.fitContent&&e.children?o.jsx(o.Fragment,{children:o.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),o.jsx("style",{children:`.img-40c70c9b {
39
+ }`})]})}function ke(e){return o.jsx("span",{children:e.children})}function re(e){return e.replace(/http(s)?:/,"")}function ut(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+a+t+"="+encodeURIComponent(n)}function mt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return re(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),a=n[3],r=t.match("x")?t:`${t}x`;return re(`${i[0]}_${r}${a}`)}return null}function J(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(a=>a!==i).map(a=>`${ut(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[mt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ce(e){var a,r,s,l;function t(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),J(d)}else if(e.image&&!e.srcset)return J(d);return J(d)}function n(){var c;return(c=t==null?void 0:t())!=null&&c.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const c={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?c:void 0}return o.jsxs(o.Fragment,{children:[o.jsxs(o.Fragment,{children:[o.jsxs("picture",{children:[n()?o.jsx(o.Fragment,{children:o.jsx("source",{type:"image/webp",srcSet:n()})}):null,o.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length&&e.fitContent)?o.jsx(o.Fragment,{children:o.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:e.children}):null,!e.fitContent&&e.children?o.jsx(o.Fragment,{children:o.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),o.jsx("style",{children:`.img-40c70c9b {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
42
  }.div-40c70c9b {
@@ -52,7 +52,7 @@
52
52
  left: 0;
53
53
  width: 100%;
54
54
  height: 100%;
55
- }`})]})}function Ie(e){return o.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 ft={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},gt={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(a=>a.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},ht={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},bt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let S=!1;f.onload=()=>{S=!0,c(f)},f.addEventListener("error",C=>{console.warn("Image load failed",C.error),d(C.error)}),f.src=s,setTimeout(()=>{S||d(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const a=e.get("image"),r=e.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},xt={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>"}}}]},yt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function pt(e){var t,n,i;return o.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:o.jsx($,{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 St={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"}]},vt={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 Te(e){var t;return o.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const kt={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 Ct(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[a,r]=m.useState(()=>[]);return m.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let c=0;c<s.length;c++){const d=s[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(a.includes(d.innerText))continue;try{a.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),o.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const wt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},It=["text/javascript","application/javascript","application/ecmascript"],Tt=e=>It.includes(e.type);function Et(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[a,r]=m.useState(()=>[]),[s,l]=m.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 S=d[f];if(S.src&&!n.includes(S.src)){n.push(S.src);const C=document.createElement("script");C.async=!0,C.src=S.src,document.head.appendChild(C)}else if(Tt(S)&&!a.includes(S.innerText))try{a.push(S.innerText),new Function(S.innerText)()}catch(C){console.warn("`Embed`: Error running script:",C)}}}return m.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),o.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const jt={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"}}}]},Rt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Ft=()=>{const e=process.env.NODE_ENV||"production";return Rt.includes(e)?e:"production"},Pt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,r)=>a!=null?a[r]:a,e);return i===void 0||i===e?n:i};function Bt(e){var S,C;const t=m.useRef(null),[n,i]=m.useState(()=>"unsubmitted"),[a,r]=m.useState(()=>null),[s,l]=m.useState(()=>"");function c(g){var p,E;const y={...e.builderContext.rootState,...g};e.builderContext.rootSetState?(E=(p=e.builderContext).rootSetState)==null||E.call(p,y):e.builderContext.rootState=y}function d(){return u.isEditing()&&e.previewState||n}function f(g){var p;const y=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")g.preventDefault();else if(y){if(!(e.action||e.sendSubmissionsTo==="email")){g.preventDefault();return}g.preventDefault();const E=g.currentTarget,P=e.customHeaders||{};let k;const I=new FormData(E),F=Array.from(g.currentTarget.querySelectorAll("input,select,textarea")).filter(h=>!!h.name).map(h=>{let T;const N=h.name;if(h instanceof HTMLInputElement)if(h.type==="radio"){if(h.checked)return T=h.name,{key:N,value:T}}else if(h.type==="checkbox")T=h.checked;else if(h.type==="number"||h.type==="range"){const B=h.valueAsNumber;isNaN(B)||(T=B)}else h.type==="file"?T=h.files:T=h.value;else T=h.value;return{key:N,value:T}});let R=e.contentType;if(e.sendSubmissionsTo==="email"&&(R="multipart/form-data"),Array.from(F).forEach(({value:h})=>{(h instanceof File||Array.isArray(h)&&h[0]instanceof File||h instanceof FileList)&&(R="multipart/form-data")}),R!=="application/json")k=I;else{const h={};Array.from(F).forEach(({value:T,key:N})=>{he(h,N,T)}),k=JSON.stringify(h)}R&&R!=="multipart/form-data"&&(y&&((p=e.action)!=null&&p.includes("zapier.com"))||(P["content-type"]=R));const V=new CustomEvent("presubmit",{detail:{body:k}});if(t.current&&(t.current.dispatchEvent(V),V.defaultPrevented))return;i("sending");const W=`${Ft()==="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"?W:e.action,{body:k,headers:P,method:e.method||"post"}).then(async h=>{let T;const N=h.headers.get("content-type");if(N&&N.indexOf("application/json")!==-1?T=await h.json():T=await h.text(),!h.ok&&e.errorMessagePath){let B=Pt(T,e.errorMessagePath);B&&(typeof B!="string"&&(B=JSON.stringify(B)),l(B),c({formErrorMessage:B}))}if(r(T),i(h.ok?"success":"error"),h.ok){const B=new CustomEvent("submit:success",{detail:{res:h,body:T}});if(t.current){if(t.current.dispatchEvent(B),B.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const L=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(L),L.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},h=>{const T=new CustomEvent("submit:error",{detail:{error:h}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(r(h),i("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:g=>f(g),...e.attributes,children:[" ",e.builderBlock&&e.builderBlock.children?o.jsx(o.Fragment,{children:(C=(S=e.builderBlock)==null?void 0:S.children)==null?void 0:C.map((g,y)=>o.jsx(U,{block:g,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${y}`))}):null," ",d()==="error"?o.jsx(o.Fragment,{children:o.jsx($,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext})}):null," ",d()==="sending"?o.jsx(o.Fragment,{children:o.jsx($,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext})}):null," ",d()==="error"&&a?o.jsx(o.Fragment,{children:o.jsxs("pre",{className:"builder-form-error-text pre-25b9edf0",children:[" ",JSON.stringify(a,null,2)," "]})}):null," ",d()==="success"?o.jsx(o.Fragment,{children:o.jsx($,{path:"successMessage",blocks:e.successMessage,context:e.builderContext})}):null," "]})," ",o.jsx("style",{children:".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }"})," "]})}const At={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 Vt(e){return m.createElement("input",{...e.attributes,key:u.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 Wt={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 Nt(e){var t;return m.createElement("select",{...e.attributes,value:e.value,key:u.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>o.jsx("option",{value:n.value,children:n.name||n.value})))}const $t={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 Dt(e){return o.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Lt={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 Ot(e){return o.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},u.isEditing()&&e.imgSrc||"default-key")}const Mt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]};function Ee(e){var i,a,r,s,l,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 o.jsxs("div",{style:{position:"relative"},children:[o.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:o.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length))?o.jsx(o.Fragment,{children:o.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:o.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?o.jsx(o.Fragment,{children:o.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 Ut=()=>[{component:Ct,...kt},{component:Et,...wt},{component:Bt,...jt},{component:Vt,...At},{component:Dt,...$t},{component:Nt,...Wt},{component:Ot,...Lt},{component:Ee,...Mt}],le=()=>[{component:me,...ft},{component:ke,...gt},{component:Ce,...ht},{component:we,...bt},{component:Ie,...xt},{component:pt,...yt},{component:Pe,...St},{component:Te,...vt},...Ut()],Ht=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
55
+ }`})]})}function we(e){return o.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 ft={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},gt={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(a=>a.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},ht={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},bt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let S=!1;f.onload=()=>{S=!0,c(f)},f.addEventListener("error",C=>{console.warn("Image load failed",C.error),d(C.error)}),f.src=s,setTimeout(()=>{S||d(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const a=e.get("image"),r=e.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},xt={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>"}}}]},yt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function pt(e){var t,n,i;return o.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:o.jsx(D,{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 St={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"}]},vt={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 Ie(e){var t;return o.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const kt={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 Ct(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[a,r]=m.useState(()=>[]);return m.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let c=0;c<s.length;c++){const d=s[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(a.includes(d.innerText))continue;try{a.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),o.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const wt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},It=["text/javascript","application/javascript","application/ecmascript"],Tt=e=>It.includes(e.type);function Et(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[a,r]=m.useState(()=>[]),[s,l]=m.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 S=d[f];if(S.src&&!n.includes(S.src)){n.push(S.src);const C=document.createElement("script");C.async=!0,C.src=S.src,document.head.appendChild(C)}else if(Tt(S)&&!a.includes(S.innerText))try{a.push(S.innerText),new Function(S.innerText)()}catch(C){console.warn("`Embed`: Error running script:",C)}}}return m.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),o.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const jt={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"}}}]},Rt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Ft=()=>{const e=process.env.NODE_ENV||"production";return Rt.includes(e)?e:"production"},Pt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,r)=>a!=null?a[r]:a,e);return i===void 0||i===e?n:i};function Bt(e){var S,C;const t=m.useRef(null),[n,i]=m.useState(()=>"unsubmitted"),[a,r]=m.useState(()=>null),[s,l]=m.useState(()=>"");function c(g){var p,E;const y={...e.builderContext.rootState,...g};e.builderContext.rootSetState?(E=(p=e.builderContext).rootSetState)==null||E.call(p,y):e.builderContext.rootState=y}function d(){return u.isEditing()&&e.previewState||n}function f(g){var p;const y=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")g.preventDefault();else if(y){if(!(e.action||e.sendSubmissionsTo==="email")){g.preventDefault();return}g.preventDefault();const E=g.currentTarget,P=e.customHeaders||{};let k;const I=new FormData(E),F=Array.from(g.currentTarget.querySelectorAll("input,select,textarea")).filter(h=>!!h.name).map(h=>{let T;const N=h.name;if(h instanceof HTMLInputElement)if(h.type==="radio"){if(h.checked)return T=h.name,{key:N,value:T}}else if(h.type==="checkbox")T=h.checked;else if(h.type==="number"||h.type==="range"){const B=h.valueAsNumber;isNaN(B)||(T=B)}else h.type==="file"?T=h.files:T=h.value;else T=h.value;return{key:N,value:T}});let R=e.contentType;if(e.sendSubmissionsTo==="email"&&(R="multipart/form-data"),Array.from(F).forEach(({value:h})=>{(h instanceof File||Array.isArray(h)&&h[0]instanceof File||h instanceof FileList)&&(R="multipart/form-data")}),R!=="application/json")k=I;else{const h={};Array.from(F).forEach(({value:T,key:N})=>{ge(h,N,T)}),k=JSON.stringify(h)}R&&R!=="multipart/form-data"&&(y&&((p=e.action)!=null&&p.includes("zapier.com"))||(P["content-type"]=R));const A=new CustomEvent("presubmit",{detail:{body:k}});if(t.current&&(t.current.dispatchEvent(A),A.defaultPrevented))return;i("sending");const W=`${Ft()==="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"?W:e.action,{body:k,headers:P,method:e.method||"post"}).then(async h=>{let T;const N=h.headers.get("content-type");if(N&&N.indexOf("application/json")!==-1?T=await h.json():T=await h.text(),!h.ok&&e.errorMessagePath){let B=Pt(T,e.errorMessagePath);B&&(typeof B!="string"&&(B=JSON.stringify(B)),l(B),c({formErrorMessage:B}))}if(r(T),i(h.ok?"success":"error"),h.ok){const B=new CustomEvent("submit:success",{detail:{res:h,body:T}});if(t.current){if(t.current.dispatchEvent(B),B.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const L=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(L),L.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},h=>{const T=new CustomEvent("submit:error",{detail:{error:h}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(r(h),i("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:g=>f(g),...e.attributes,children:[" ",e.builderBlock&&e.builderBlock.children?o.jsx(o.Fragment,{children:(C=(S=e.builderBlock)==null?void 0:S.children)==null?void 0:C.map((g,y)=>o.jsx(U,{block:g,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${y}`))}):null," ",d()==="error"?o.jsx(o.Fragment,{children:o.jsx(D,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext})}):null," ",d()==="sending"?o.jsx(o.Fragment,{children:o.jsx(D,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext})}):null," ",d()==="error"&&a?o.jsx(o.Fragment,{children:o.jsxs("pre",{className:"builder-form-error-text pre-25b9edf0",children:[" ",JSON.stringify(a,null,2)," "]})}):null," ",d()==="success"?o.jsx(o.Fragment,{children:o.jsx(D,{path:"successMessage",blocks:e.successMessage,context:e.builderContext})}):null," "]})," ",o.jsx("style",{children:".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }"})," "]})}const Vt={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 At(e){return m.createElement("input",{...e.attributes,key:u.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 Wt={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 Nt(e){var t;return m.createElement("select",{...e.attributes,value:e.value,key:u.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>o.jsx("option",{value:n.value,children:n.name||n.value})))}const $t={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 Dt(e){return o.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Lt={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 Ot(e){return o.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},u.isEditing()&&e.imgSrc||"default-key")}const Mt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]};function Te(e){var i,a,r,s,l,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 o.jsxs("div",{style:{position:"relative"},children:[o.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:o.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length))?o.jsx(o.Fragment,{children:o.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:o.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?o.jsx(o.Fragment,{children:o.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 Ut=()=>[{component:Ct,...kt},{component:Et,...wt},{component:Bt,...jt},{component:At,...Vt},{component:Dt,...$t},{component:Nt,...Wt},{component:Ot,...Lt},{component:Te,...Mt}],se=()=>[{component:ue,...ft},{component:ve,...gt},{component:ke,...ht},{component:Ce,...bt},{component:we,...xt},{component:pt,...yt},{component:Pe,...St},{component:Ie,...vt},...Ut()],Ht=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
56
56
  function getAndSetVariantId() {
57
57
  function setCookie(name, value, days) {
58
58
  let expires = '';
@@ -142,15 +142,15 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,je="builderIoAbTest",Re="builderIoRenderContent",_=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Kt=({canTrack:e,content:t})=>!(!(_(t).length>0)||!e||u.isBrowser()),qt=e=>e==="react"||e==="reactNative",Fe=qt(u.TARGET),zt=()=>`
146
- window.${je} = ${Ht}
147
- window.${Re} = ${_t}
145
+ }`,Ee="builderIoAbTest",je="builderIoRenderContent",_=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Kt=({canTrack:e,content:t})=>!(!(_(t).length>0)||!e||u.isBrowser()),qt=e=>e==="react"||e==="reactNative",Re=qt(u.TARGET),zt=()=>`
146
+ window.${Ee} = ${Ht}
147
+ window.${je} = ${_t}
148
148
  `,Jt=(e,t)=>`
149
- window.${je}(
150
- "${t}",${JSON.stringify(e)}, ${Fe}
151
- )`,Yt=({contentId:e,variationId:t})=>`window.${Re}(
152
- "${t}", "${e}", ${Fe}
153
- )`;function Y(e){return o.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function ce(e){return Math.round(e*1e3)/1e3}const Gt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},Qt=e=>Gt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),de=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,r=ce(i/n.width),s=ce(a/n.height);return{x:r,y:s}},Xt=e=>{const t=e.target,n=t&&Qt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?de({event:e,target:t}):void 0,builderTargetOffset:n?de({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function Zt(e){var W,h,T,N,B,L,ie;const t=m.useRef(null),[n,i]=m.useState(()=>0);m.useState(()=>!0);function a(b){var v,w;const x={...e.builderContextSignal.rootState,...b};e.builderContextSignal.rootSetState?(w=(v=e.builderContextSignal).rootSetState)==null||w.call(v,x):e.setBuilderContextSignal(j=>({...j,rootState:x}))}function r(b){var v,w,j,A,H;const x={...e.builderContextSignal.content,...b,data:{...(v=e.builderContextSignal.content)==null?void 0:v.data,...b==null?void 0:b.data},meta:{...(w=e.builderContextSignal.content)==null?void 0:w.meta,...b==null?void 0:b.meta,breakpoints:((j=b==null?void 0:b.meta)==null?void 0:j.breakpoints)||((H=(A=e.builderContextSignal.content)==null?void 0:A.meta)==null?void 0:H.breakpoints)}};e.setBuilderContextSignal(Be=>({...Be,content:x}))}m.useState(()=>0);const[s,l]=m.useState(()=>!1),[c,d]=m.useState(()=>e.contentWrapper||"div");function f(b){return u.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:x=>{var j;const{breakpoints:v,contentId:w}=x;!w||w!==((j=e.builderContextSignal.content)==null?void 0:j.id)||v&&(r({meta:{breakpoints:v}}),i(n+1))},animation:x=>{be(x)},contentUpdate:x=>{r(x),i(n+1)}}})(b)}function S(){var x,v;const b=(v=(x=e.builderContextSignal.content)==null?void 0:x.data)==null?void 0:v.jsCode;b&&M({code:b,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[C,g]=m.useState(()=>({})),[y,p]=m.useState(()=>!1);function E(b){var x,v;if(e.builderContextSignal.content){const w=(x=e.builderContextSignal.content)==null?void 0:x.testVariationId,j=(v=e.builderContextSignal.content)==null?void 0:v.id;u._track({type:"click",canTrack:u.getDefaultCanTrack(e.canTrack),contentId:j,apiKey:e.apiKey,variationId:w!==j?w:void 0,...Xt(b),unique:!y})}y||p(!0)}function P(b){return b.replace(/{{([^}]+)}}/g,(x,v)=>M({code:v,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function k({url:b,key:x}){u.fetch(b).then(v=>v.json()).then(v=>{var j,A;const w={...e.builderContextSignal.rootState,[x]:v};(A=(j=e.builderContextSignal).rootSetState)==null||A.call(j,w),C[x]=!0}).catch(v=>{console.error("error fetching dynamic data",b,v)})}function I(){var x,v,w;const b=(w=(v=(x=e.builderContextSignal.content)==null?void 0:x.data)==null?void 0:v.httpRequests)!=null?w:{};Object.entries(b).forEach(([j,A])=>{if(A&&(!C[j]||u.isEditing())){const H=P(A);k({url:H,key:j})}})}function F(){u.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:u.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function R(b){i(n+1),window.addEventListener("message",f),u.registerInsertMenu(),u.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(x=>{var w;const v=u.createRegisterComponentMessage(x);(w=window.parent)==null||w.postMessage(v,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",F)}function V(b){const x=new URL(location.href).searchParams,v=x.get("builder.preview"),w=x.get(`builder.preview.${v}`),j=x.get("apiKey")||x.get("builder.space");v===e.model&&j===e.apiKey&&(!e.content||w===e.content.id)&&u.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(A=>{A&&r(A)})}return m.useEffect(()=>{var b;return(b=t.current)==null||b.addEventListener("initeditingbldr",R),()=>{var x;return(x=t.current)==null?void 0:x.removeEventListener("initeditingbldr",R)}},[]),m.useEffect(()=>{var b;return(b=t.current)==null||b.addEventListener("initpreviewingbldr",V),()=>{var x;return(x=t.current)==null?void 0:x.removeEventListener("initpreviewingbldr",V)}},[]),m.useEffect(()=>{var b,x;if(u.isBrowser()){if(u.isEditing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&u.getDefaultCanTrack(e.canTrack)){const w=(b=e.builderContextSignal.content)==null?void 0:b.testVariationId,j=(x=e.builderContextSignal.content)==null?void 0:x.id,A=e.apiKey;u._track({type:"impression",canTrack:!0,contentId:j,apiKey:A,variationId:w!==j?w:void 0})}u.isPreviewing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"))}},[]),m.useEffect(()=>{e.apiKey||u.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),S(),I(),F()},[]),m.useEffect(()=>{e.content&&r(e.content)},[e.content]),m.useEffect(()=>{},[s]),m.useEffect(()=>{S()},[(h=(W=e.builderContextSignal.content)==null?void 0:W.data)==null?void 0:h.jsCode]),m.useEffect(()=>{I()},[(N=(T=e.builderContextSignal.content)==null?void 0:T.data)==null?void 0:N.httpRequests]),m.useEffect(()=>{F()},[e.builderContextSignal.rootState]),m.useEffect(()=>{e.data&&a(e.data)},[e.data]),m.useEffect(()=>{e.locale&&a({locale:e.locale})},[e.locale]),m.useEffect(()=>()=>{u.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",F))},[]),o.jsx(Q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?o.jsx(o.Fragment,{children:m.createElement(c,{key:n,ref:t,onClick:b=>E(b),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((ie=e.content)==null?void 0:ie.id)}`},e.children)}):null})}const en=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let a="";if(i&&t&&n&&(a+=`
149
+ window.${Ee}(
150
+ "${t}",${JSON.stringify(e)}, ${Re}
151
+ )`,Yt=({contentId:e,variationId:t})=>`window.${je}(
152
+ "${t}", "${e}", ${Re}
153
+ )`;function Y(e){return o.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function le(e){return Math.round(e*1e3)/1e3}const Gt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},Qt=e=>Gt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ce=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,r=le(i/n.width),s=le(a/n.height);return{x:r,y:s}},Xt=e=>{const t=e.target,n=t&&Qt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ce({event:e,target:t}):void 0,builderTargetOffset:n?ce({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function Zt(e){var W,h,T,N,B,L,ne;const t=m.useRef(null),[n,i]=m.useState(()=>0);m.useState(()=>!0);function a(b){var v,w;const x={...e.builderContextSignal.rootState,...b};e.builderContextSignal.rootSetState?(w=(v=e.builderContextSignal).rootSetState)==null||w.call(v,x):e.setBuilderContextSignal(j=>({...j,rootState:x}))}function r(b){var v,w,j,V,H;const x={...e.builderContextSignal.content,...b,data:{...(v=e.builderContextSignal.content)==null?void 0:v.data,...b==null?void 0:b.data},meta:{...(w=e.builderContextSignal.content)==null?void 0:w.meta,...b==null?void 0:b.meta,breakpoints:((j=b==null?void 0:b.meta)==null?void 0:j.breakpoints)||((H=(V=e.builderContextSignal.content)==null?void 0:V.meta)==null?void 0:H.breakpoints)}};e.setBuilderContextSignal(Be=>({...Be,content:x}))}m.useState(()=>0);const[s,l]=m.useState(()=>!1),[c,d]=m.useState(()=>e.contentWrapper||"div");function f(b){return u.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:x=>{var j;const{breakpoints:v,contentId:w}=x;!w||w!==((j=e.builderContextSignal.content)==null?void 0:j.id)||v&&(r({meta:{breakpoints:v}}),i(n+1))},animation:x=>{he(x)},contentUpdate:x=>{r(x),i(n+1)}}})(b)}function S(){var x,v;const b=(v=(x=e.builderContextSignal.content)==null?void 0:x.data)==null?void 0:v.jsCode;b&&M({code:b,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[C,g]=m.useState(()=>({})),[y,p]=m.useState(()=>!1);function E(b){var x,v;if(e.builderContextSignal.content){const w=(x=e.builderContextSignal.content)==null?void 0:x.testVariationId,j=(v=e.builderContextSignal.content)==null?void 0:v.id;u._track({type:"click",canTrack:u.getDefaultCanTrack(e.canTrack),contentId:j,apiKey:e.apiKey,variationId:w!==j?w:void 0,...Xt(b),unique:!y})}y||p(!0)}function P(b){return b.replace(/{{([^}]+)}}/g,(x,v)=>M({code:v,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function k({url:b,key:x}){u.fetch(b).then(v=>v.json()).then(v=>{var j,V;const w={...e.builderContextSignal.rootState,[x]:v};(V=(j=e.builderContextSignal).rootSetState)==null||V.call(j,w),C[x]=!0}).catch(v=>{console.error("error fetching dynamic data",b,v)})}function I(){var x,v,w;const b=(w=(v=(x=e.builderContextSignal.content)==null?void 0:x.data)==null?void 0:v.httpRequests)!=null?w:{};Object.entries(b).forEach(([j,V])=>{if(V&&(!C[j]||u.isEditing())){const H=P(V);k({url:H,key:j})}})}function F(){u.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:u.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function R(b){i(n+1),window.addEventListener("message",f),u.registerInsertMenu(),u.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(x=>{var w;const v=u.createRegisterComponentMessage(x);(w=window.parent)==null||w.postMessage(v,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",F)}function A(b){const x=new URL(location.href).searchParams,v=x.get("builder.preview"),w=x.get(`builder.preview.${v}`),j=x.get("apiKey")||x.get("builder.space");v===e.model&&j===e.apiKey&&(!e.content||w===e.content.id)&&u.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(V=>{V&&r(V)})}return m.useEffect(()=>{var b;return(b=t.current)==null||b.addEventListener("initeditingbldr",R),()=>{var x;return(x=t.current)==null?void 0:x.removeEventListener("initeditingbldr",R)}},[]),m.useEffect(()=>{var b;return(b=t.current)==null||b.addEventListener("initpreviewingbldr",A),()=>{var x;return(x=t.current)==null?void 0:x.removeEventListener("initpreviewingbldr",A)}},[]),m.useEffect(()=>{var b,x;if(u.isBrowser()){if(u.isEditing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&u.getDefaultCanTrack(e.canTrack)){const w=(b=e.builderContextSignal.content)==null?void 0:b.testVariationId,j=(x=e.builderContextSignal.content)==null?void 0:x.id,V=e.apiKey;u._track({type:"impression",canTrack:!0,contentId:j,apiKey:V,variationId:w!==j?w:void 0})}u.isPreviewing()&&t.current&&t.current.dispatchEvent(new CustomEvent("initpreviewingbldr"))}},[]),m.useEffect(()=>{e.apiKey||u.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),S(),I(),F()},[]),m.useEffect(()=>{e.content&&r(e.content)},[e.content]),m.useEffect(()=>{},[s]),m.useEffect(()=>{S()},[(h=(W=e.builderContextSignal.content)==null?void 0:W.data)==null?void 0:h.jsCode]),m.useEffect(()=>{I()},[(N=(T=e.builderContextSignal.content)==null?void 0:T.data)==null?void 0:N.httpRequests]),m.useEffect(()=>{F()},[e.builderContextSignal.rootState]),m.useEffect(()=>{e.data&&a(e.data)},[e.data]),m.useEffect(()=>{e.locale&&a({locale:e.locale})},[e.locale]),m.useEffect(()=>()=>{u.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",F))},[]),o.jsx(Q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?o.jsx(o.Fragment,{children:m.createElement(c,{key:n,ref:t,onClick:b=>E(b),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((ne=e.content)==null?void 0:ne.id)}`},e.children)}):null})}const en=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let a="";if(i&&t&&n&&(a+=`
154
154
  @font-face {
155
155
  font-family: "${t}";
156
156
  src: local("${n}"), url('${i}') format('woff2');
@@ -184,4 +184,4 @@ ${tn({customFonts:e.customFonts})}
184
184
  text-align: inherit;
185
185
  font-family: inherit;
186
186
  }
187
- `.trim());return o.jsx(q,{styles:t})}const an=({content:e,data:t,locale:n})=>{var r,s,l;const i={},a=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},rn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ue(e){var c,d,f,S,C,g,y;const[t,n]=m.useState(()=>{var p,E;return Yt({variationId:(p=e.content)==null?void 0:p.testVariationId,contentId:(E=e.content)==null?void 0:E.id})});function i(p){l(E=>({...E,rootState:p}))}const[a,r]=m.useState(()=>[...le(),...u.components,...e.customComponents||[]].reduce((p,{component:E,...P})=>({...p,[P.name]:{component:E,...u.serializeComponentInfo(P)}}),{})),[s,l]=m.useState(()=>({content:rn({content:e.content,data:e.data}),localState:void 0,rootState:an({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...le(),...u.components,...e.customComponents||[]].reduce((p,{component:E,...P})=>({...p,[P.name]:u.serializeComponentInfo(P)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return o.jsx(fe.Provider,{value:{registeredComponents:a},children:o.jsxs(Zt,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?o.jsx(o.Fragment,{children:o.jsx(Y,{scriptStr:t})}):null,o.jsx(o.Fragment,{children:o.jsx(on,{contentId:(c=s.content)==null?void 0:c.id,cssCode:(f=(d=s.content)==null?void 0:d.data)==null?void 0:f.cssCode,customFonts:(C=(S=s.content)==null?void 0:S.data)==null?void 0:C.customFonts})}),o.jsx($,{blocks:(y=(g=s.content)==null?void 0:g.data)==null?void 0:y.blocks,context:s,registeredComponents:a,linkComponent:e.linkComponent})]})})}function ne(e){var s,l;const[t,n]=m.useState(()=>Kt({canTrack:u.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var c;return Jt(_(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((c=e.content)==null?void 0:c.id)||"")}function a(){return _(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")}function r(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:u.handleABTestingSync({item:e.content,canTrack:u.getDefaultCanTrack(e.canTrack)})}return m.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[!e.__isNestedRender&&u.TARGET!=="reactNative"?o.jsx(o.Fragment,{children:o.jsx(Y,{scriptStr:zt()})}):null,t?o.jsxs(o.Fragment,{children:[o.jsx(q,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:a()}),o.jsx(Y,{scriptStr:i()}),(l=_(e.content))==null?void 0:l.map(c=>o.jsx(ue,{content:c,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,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},c.testVariationId))]}):null,o.jsx(ue,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const sn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return u.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{u.logger.error("Could not fetch symbol content: ",n)})};function Pe(e){var r,s,l,c;function t(){var d,f;return[e.attributes[O()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=m.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content});function a(){n||sn({symbol:e.symbol,builderContextValue:e.builderContext}).then(d=>{d&&i(d)})}return m.useEffect(()=>{},[]),m.useEffect(()=>{a()},[e.symbol]),o.jsx("div",{...e.attributes,className:t(),children:o.jsx(ne,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(c=e.symbol)==null?void 0:c.model,content:n,linkComponent:e.builderLinkComponent})})}const ln=$,cn=ne;exports._processContentResult=u._processContentResult;exports.createRegisterComponentMessage=u.createRegisterComponentMessage;exports.fetchBuilderProps=u.fetchBuilderProps;exports.fetchEntries=u.fetchEntries;exports.fetchOneEntry=u.fetchOneEntry;exports.getAllContent=u.getAllContent;exports.getBuilderSearchParams=u.getBuilderSearchParams;exports.getContent=u.getContent;exports.isEditing=u.isEditing;exports.isPreviewing=u.isPreviewing;exports.register=u.register;exports.setEditorSettings=u.setEditorSettings;exports.subscribeToEditor=u.subscribeToEditor;exports.track=u.track;exports.Blocks=$;exports.Button=me;exports.Columns=ke;exports.Content=ne;exports.Fragment=Ce;exports.Image=we;exports.RenderBlocks=ln;exports.RenderContent=cn;exports.Section=Ie;exports.Symbol=Pe;exports.Text=Te;exports.Video=Ee;
187
+ `.trim());return o.jsx(q,{styles:t})}const an=({content:e,data:t,locale:n})=>{var r,s,l;const i={},a=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},rn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function de(e){var c,d,f,S,C,g,y;const[t,n]=m.useState(()=>{var p,E;return Yt({variationId:(p=e.content)==null?void 0:p.testVariationId,contentId:(E=e.content)==null?void 0:E.id})});function i(p){l(E=>({...E,rootState:p}))}const[a,r]=m.useState(()=>[...se(),...e.customComponents||[]].reduce((p,{component:E,...P})=>({...p,[P.name]:{component:E,...u.serializeComponentInfo(P)}}),{})),[s,l]=m.useState(()=>({content:rn({content:e.content,data:e.data}),localState:void 0,rootState:an({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...se(),...e.customComponents||[]].reduce((p,{component:E,...P})=>({...p,[P.name]:u.serializeComponentInfo(P)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return o.jsx(me.Provider,{value:{registeredComponents:a},children:o.jsxs(Zt,{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:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?o.jsx(o.Fragment,{children:o.jsx(Y,{scriptStr:t})}):null,o.jsx(o.Fragment,{children:o.jsx(on,{contentId:(c=s.content)==null?void 0:c.id,cssCode:(f=(d=s.content)==null?void 0:d.data)==null?void 0:f.cssCode,customFonts:(C=(S=s.content)==null?void 0:S.data)==null?void 0:C.customFonts})}),o.jsx(D,{blocks:(y=(g=s.content)==null?void 0:g.data)==null?void 0:y.blocks,context:s,registeredComponents:a,linkComponent:e.linkComponent})]})})}function Fe(e){var s,l;const[t,n]=m.useState(()=>Kt({canTrack:u.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var c;return Jt(_(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((c=e.content)==null?void 0:c.id)||"")}function a(){return _(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")}function r(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:u.handleABTestingSync({item:e.content,canTrack:u.getDefaultCanTrack(e.canTrack)})}return m.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[!e.__isNestedRender&&u.TARGET!=="reactNative"?o.jsx(o.Fragment,{children:o.jsx(Y,{scriptStr:zt()})}):null,t?o.jsxs(o.Fragment,{children:[o.jsx(q,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:a()}),o.jsx(Y,{scriptStr:i()}),(l=_(e.content))==null?void 0:l.map(c=>o.jsx(de,{content:c,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},c.testVariationId))]}):null,o.jsx(de,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const sn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return u.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{u.logger.error("Could not fetch symbol content: ",n)})};function Pe(e){var r,s,l,c;function t(){var d,f;return[e.attributes[O()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=m.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content});function a(){n||sn({symbol:e.symbol,builderContextValue:e.builderContext}).then(d=>{d&&i(d)})}return m.useEffect(()=>{},[]),m.useEffect(()=>{a()},[e.symbol]),o.jsx("div",{...e.attributes,className:t(),children:o.jsx(Fe,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(c=e.symbol)==null?void 0:c.model,content:n,linkComponent:e.builderLinkComponent})})}exports._processContentResult=u._processContentResult;exports.createRegisterComponentMessage=u.createRegisterComponentMessage;exports.fetchBuilderProps=u.fetchBuilderProps;exports.fetchEntries=u.fetchEntries;exports.fetchOneEntry=u.fetchOneEntry;exports.getBuilderSearchParams=u.getBuilderSearchParams;exports.isEditing=u.isEditing;exports.isPreviewing=u.isPreviewing;exports.register=u.register;exports.setEditorSettings=u.setEditorSettings;exports.subscribeToEditor=u.subscribeToEditor;exports.track=u.track;exports.Blocks=D;exports.Button=ue;exports.Columns=ve;exports.Content=Fe;exports.Fragment=ke;exports.Image=Ce;exports.Section=we;exports.Symbol=Pe;exports.Text=Ie;exports.Video=Te;