@builder.io/sdk-react 4.1.3 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +8 -8
- package/lib/browser/blocks-exports.mjs +289 -265
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +6 -5
- package/lib/browser/server-entry-4cf669a1.cjs +2 -0
- package/lib/browser/{server-entry-4da1a296.js → server-entry-5e98a993.js} +24 -13
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +7 -6
- package/lib/edge/{accordion-78ee648e.cjs → accordion-4bab42b1.cjs} +1 -1
- package/lib/edge/{accordion-1784524c.js → accordion-a8a363e4.js} +1 -1
- package/lib/edge/{blocks-14702bfa.cjs → blocks-d07d0261.cjs} +1 -1
- package/lib/edge/{blocks-f5fb0ce5.js → blocks-e1f5b0d0.js} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-290c53b5.cjs → button-6734c0bb.cjs} +1 -1
- package/lib/edge/{button-21ceeedc.js → button-bbcadacf.js} +2 -2
- package/lib/edge/{columns-b7aced60.cjs → columns-821cba14.cjs} +1 -1
- package/lib/edge/{columns-1068516d.js → columns-cf3081c6.js} +3 -3
- package/lib/edge/{content-variants-90878d85.js → content-variants-a704e35c.js} +172 -150
- package/lib/edge/{content-variants-a264ddef.cjs → content-variants-ec180883.cjs} +6 -6
- package/lib/edge/{custom-code-2c87d654.cjs → custom-code-8fcaa31e.cjs} +1 -1
- package/lib/edge/{custom-code-4fa9e701.js → custom-code-f6c30129.js} +1 -1
- package/lib/edge/{embed-80b047e6.js → embed-3c0b5564.js} +1 -1
- package/lib/edge/{embed-d5d20b9d.cjs → embed-666d3cc4.cjs} +1 -1
- package/lib/edge/form-51f639ab.cjs +1 -0
- package/lib/edge/{form-539b46dc.js → form-8b068721.js} +9 -7
- package/lib/edge/{get-class-prop-name-57633f13.cjs → get-class-prop-name-2869a960.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-7e842f9c.js → get-class-prop-name-d6d821d6.js} +1 -1
- package/lib/edge/{img-36b77f7e.cjs → img-b04b9b6d.cjs} +1 -1
- package/lib/edge/{img-e2d845d3.js → img-dfbd4080.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +4 -3
- package/lib/edge/{input-4b7d5309.js → input-665ef328.js} +1 -1
- package/lib/edge/{input-ad09fe4d.cjs → input-d31d6451.cjs} +1 -1
- package/lib/edge/{personalization-container-8dcdbc56.cjs → personalization-container-d12566e8.cjs} +1 -1
- package/lib/edge/{personalization-container-6a8723bf.js → personalization-container-e784836e.js} +4 -4
- package/lib/edge/{select-2c39366d.js → select-5fe49bd4.js} +1 -1
- package/lib/edge/{select-427609f7.cjs → select-c3085265.cjs} +1 -1
- package/lib/edge/server-entry-acf5ce7d.cjs +2 -0
- package/lib/edge/{server-entry-6e9f2e70.js → server-entry-c9d5300f.js} +22 -11
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +7 -6
- package/lib/edge/{slot-74827ed2.js → slot-a17ee2d7.js} +3 -3
- package/lib/edge/{slot-780e168e.cjs → slot-cbbbb02e.cjs} +1 -1
- package/lib/edge/{symbol-8573a705.js → symbol-9f960685.js} +2 -2
- package/lib/edge/{symbol-c79c9cb2.cjs → symbol-b56b5675.cjs} +1 -1
- package/lib/edge/{tabs-90d614d8.js → tabs-26ac5b2f.js} +3 -3
- package/lib/edge/{tabs-706f56bf.cjs → tabs-bf6643d7.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +14 -14
- package/lib/node/blocks-exports.mjs +292 -268
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +6 -5
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-6d89489d.js → server-entry-48724189.js} +24 -13
- package/lib/node/server-entry-562c0663.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +7 -6
- package/lib/node/{setIvm-4d2ae811.cjs → setIvm-3b6199a0.cjs} +1 -1
- package/lib/node/{setIvm-96d70b3f.js → setIvm-a7aba6d2.js} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-f668d799.cjs → should-force-browser-runtime-in-node-cbe0ef14.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-4d8646f7.js → should-force-browser-runtime-in-node-fdc70f22.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/register.d.ts +18 -0
- package/types/server-index.d.ts +1 -1
- package/lib/browser/server-entry-2443e405.cjs +0 -2
- package/lib/edge/form-3e4c4ae4.cjs +0 -1
- package/lib/edge/server-entry-9c867b01.cjs +0 -2
- package/lib/node/server-entry-dd2d010e.cjs +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./server-entry-2443e405.cjs"),o=require("react/jsx-runtime"),g=require("react");function et(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const tt=et(g),nt=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),it=e=>typeof e=="string"&&nt.has(e.toLowerCase());function le(e){return o.jsx(o.Fragment,{children:it(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(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const L=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Te(e){function t(){return{...e.attributes,[L()]:`${e.link?"":"builder-button"} ${e.attributes[L()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return o.jsx(le,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const Z=g.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),Ie=g.createContext({registeredComponents:{}}),we=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((r,a)=>r!=null?r[a]:r,e);return i===void 0||i===e?n:i},rt=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),at=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),ot=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function Ee({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,r)=>{if(t&&r in t)return t[r];const a=i[r];return typeof a=="object"&&a!==null?Ee({rootState:a,localState:void 0,rootSetState:n?s=>{i[r]=s,n(i)}:void 0}):a},set:(i,r,a)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[r]=a,n==null||n(i),!0}})}const fe=({code:e,builder:t,context:n,event:i,localState:r,rootSetState:a,rootState:s})=>{const l=rt({builder:t,context:n,event:i,state:Ee({rootState:s,localState:r,rootSetState:a})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function st(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const lt=({shouldLogWarning:e})=>{var r;if(!st())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.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},ct=e=>(f.isBrowser()||lt({shouldLogWarning:!0}),fe(e)),ut=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,dt=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,mt=e=>{var t,n,i,r,a,s;return((i=(n=(t=ut.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(a=(r=dt.exec(e.trim()))==null?void 0:r.groups)==null?void 0:a.getPath)==null?void 0:s.slice(1))};function U({code:e,context:t,localState:n,rootState:i,rootSetState:r,event:a,isExpression:s=!0}){if(e.trim()==="")return;const l=mt(e.trim());if(l)return we({...i,...n},l);const c={code:ot(e,{isExpression:s}),builder:at(),context:t,event:a,rootSetState:r,rootState:i,localState:n};try{return ct(c)}catch(u){f.logger.error("Failed code evaluation: "+u.message,{code:e});return}}function ft(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...gt(e,t)}}const gt=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(r,a)=>U({code:a,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function ht(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function X(e,t,n=null,i=null,r=new WeakSet){if(e==null||typeof e!="object"){t(e,a=>{n!==null&&i!==null&&(n[i]=a)});return}r.has(e)||(r.add(e),Array.isArray(e)?e.forEach((a,s)=>{t(a,c=>{e[s]=c}),X(a,t,e,s,r)}):Object.entries(e).forEach(([a,s])=>{t(s,c=>{e[a]=c}),X(s,t,e,a,r)}))}function Re(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function bt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return X(e,n=>{if(Re(n)){t=!0;return}}),t}function yt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(X(e,(n,i)=>{var r;Re(n)&&i((r=n[t])!=null?r:void 0)}),e)}function pt(e,t){var n,i;return(n=e.component)!=null&&n.options&&bt((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=yt(e.component.options,t!=null?t:"Default")),e}const ce=e=>JSON.parse(JSON.stringify(e)),Pe=(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((r,a,s)=>Object(r[a])===r[a]?r[a]:r[a]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const xt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),vt=e=>{if(xt){const t=ce(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(ht(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},St=({block:e,context:t,localState:n,rootState:i,rootSetState:r})=>{if(!e.bindings)return e;const a=vt(e);for(const s in e.bindings){const l=e.bindings[s],c=U({code:l,localState:n,rootState:i,rootSetState:r,context:t});Pe(a,s,c)}return a};function kt({block:e,context:t,localState:n,rootState:i,rootSetState:r}){let a=e;return a=St({block:a,localState:n,rootState:i,rootSetState:r,context:t}),a=pt(a,i.locale),a}const ee=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Ct(e,t,n={}){let i,r,a,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,a=e.apply(i,r),s||(i=r=null)};return function(){const u=Date.now();!l&&n.leading===!1&&(l=u);const h=t-(u-l);return i=this,r=arguments,h<=0||h>t?(s&&(clearTimeout(s),s=null),l=u,a=e.apply(i,r),s||(i=r=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,h)),a}}function q(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const r=arguments[i];if(r!=null)for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n}function Tt(e){for(const t of e)switch(t.trigger){case"pageLoad":je(t);break;case"scrollInView":wt(t);break}}function Ae(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ve(e,t){const n=It(e),i=getComputedStyle(t),r=e.steps[0].styles,a=e.steps[e.steps.length-1].styles,s=[r,a];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function It(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 je(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n),n.style.transition="none",n.style.transitionDelay="0",q(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),q(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function wt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n);let i=!1,r=!1;function a(){!i&&l(n)?(i=!0,r=!0,setTimeout(()=>{q(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!r&&!l(n)&&(i=!1,q(n.style,e.steps[0].styles))}const s=Ct(a,200,{leading:!1});function l(h){const p=h.getBoundingClientRect(),m=window.innerHeight,d=(e.thresholdPercent||0)/100*m;return p.bottom>d&&p.top<m-d}const c=e.steps[0].styles;function u(){q(n.style,c)}u(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),a()})}const Be=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${ee(n)}: ${i};`}).filter(f.checkIsDefined),Et=e=>Be(e).join(`
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./server-entry-4cf669a1.cjs"),o=require("react/jsx-runtime"),g=require("react");function et(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const tt=et(g),nt=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),it=e=>typeof e=="string"&&nt.has(e.toLowerCase());function le(e){return o.jsx(o.Fragment,{children:it(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(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const L=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Te(e){function t(){return{...e.attributes,[L()]:`${e.link?"":"builder-button"} ${e.attributes[L()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return o.jsx(le,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const Z=g.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),Ie=g.createContext({registeredComponents:{}}),we=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((r,a)=>r!=null?r[a]:r,e);return i===void 0||i===e?n:i},rt=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),at=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),ot=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function Ee({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,r)=>{if(t&&r in t)return t[r];const a=i[r];return typeof a=="object"&&a!==null?Ee({rootState:a,localState:void 0,rootSetState:n?s=>{i[r]=s,n(i)}:void 0}):a},set:(i,r,a)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[r]=a,n==null||n(i),!0}})}const fe=({code:e,builder:t,context:n,event:i,localState:r,rootSetState:a,rootState:s})=>{const l=rt({builder:t,context:n,event:i,state:Ee({rootState:s,localState:r,rootSetState:a})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function st(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const lt=({shouldLogWarning:e})=>{var r;if(!st())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.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},ct=e=>(f.isBrowser()||lt({shouldLogWarning:!0}),fe(e)),ut=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,dt=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,mt=e=>{var t,n,i,r,a,s;return((i=(n=(t=ut.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(a=(r=dt.exec(e.trim()))==null?void 0:r.groups)==null?void 0:a.getPath)==null?void 0:s.slice(1))};function U({code:e,context:t,localState:n,rootState:i,rootSetState:r,event:a,isExpression:s=!0}){if(e.trim()==="")return;const l=mt(e.trim());if(l)return we({...i,...n},l);const c={code:ot(e,{isExpression:s}),builder:at(),context:t,event:a,rootSetState:r,rootState:i,localState:n};try{return ct(c)}catch(u){f.logger.error("Failed code evaluation: "+u.message,{code:e});return}}function ft(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...gt(e,t)}}const gt=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(r,a)=>U({code:a,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function ht(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function X(e,t,n=null,i=null,r=new WeakSet){if(e==null||typeof e!="object"){t(e,a=>{n!==null&&i!==null&&(n[i]=a)});return}r.has(e)||(r.add(e),Array.isArray(e)?e.forEach((a,s)=>{t(a,c=>{e[s]=c}),X(a,t,e,s,r)}):Object.entries(e).forEach(([a,s])=>{t(s,c=>{e[a]=c}),X(s,t,e,a,r)}))}function Re(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function bt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return X(e,n=>{if(Re(n)){t=!0;return}}),t}function yt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(X(e,(n,i)=>{var r;Re(n)&&i((r=n[t])!=null?r:void 0)}),e)}function pt(e,t){var n,i;return(n=e.component)!=null&&n.options&&bt((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=yt(e.component.options,t!=null?t:"Default")),e}const ce=e=>JSON.parse(JSON.stringify(e)),Pe=(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((r,a,s)=>Object(r[a])===r[a]?r[a]:r[a]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const xt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),vt=e=>{if(xt){const t=ce(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(ht(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},St=({block:e,context:t,localState:n,rootState:i,rootSetState:r})=>{if(!e.bindings)return e;const a=vt(e);for(const s in e.bindings){const l=e.bindings[s],c=U({code:l,localState:n,rootState:i,rootSetState:r,context:t});Pe(a,s,c)}return a};function kt({block:e,context:t,localState:n,rootState:i,rootSetState:r}){let a=e;return a=St({block:a,localState:n,rootState:i,rootSetState:r,context:t}),a=pt(a,i.locale),a}const ee=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Ct(e,t,n={}){let i,r,a,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,a=e.apply(i,r),s||(i=r=null)};return function(){const u=Date.now();!l&&n.leading===!1&&(l=u);const h=t-(u-l);return i=this,r=arguments,h<=0||h>t?(s&&(clearTimeout(s),s=null),l=u,a=e.apply(i,r),s||(i=r=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,h)),a}}function q(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const r=arguments[i];if(r!=null)for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n}function Tt(e){for(const t of e)switch(t.trigger){case"pageLoad":je(t);break;case"scrollInView":wt(t);break}}function Ae(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ve(e,t){const n=It(e),i=getComputedStyle(t),r=e.steps[0].styles,a=e.steps[e.steps.length-1].styles,s=[r,a];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function It(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 je(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n),n.style.transition="none",n.style.transitionDelay="0",q(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),q(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function wt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n);let i=!1,r=!1;function a(){!i&&l(n)?(i=!0,r=!0,setTimeout(()=>{q(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!r&&!l(n)&&(i=!1,q(n.style,e.steps[0].styles))}const s=Ct(a,200,{leading:!1});function l(h){const p=h.getBoundingClientRect(),m=window.innerHeight,d=(e.thresholdPercent||0)/100*m;return p.bottom>d&&p.top<m-d}const c=e.steps[0].styles;function u(){q(n.style,c)}u(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),a()})}const Be=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${ee(n)}: ${i};`}).filter(f.checkIsDefined),Et=e=>Be(e).join(`
|
|
2
2
|
`),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${Et(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
6
|
}`:i};function Rt({style:e}){return e}const Pt=({block:e,context:t})=>Ne(Rt({style:e.style||{},context:t,block:e}));function Ne(e){switch(f.TARGET){case"svelte":case"vue":case"solid":case"angular":return Be(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const We=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,At=({block:e,registeredComponents:t,model:n})=>{var a;const i=(a=e.component)==null?void 0:a.name;if(!i)return null;const r=t[i];if(!r||We(r,n)){console.warn(`
|
|
7
7
|
Could not find a registered component named "${i}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return r},Vt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const r=U({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const a=n.collection.split(".").pop(),s=n.itemName||(a?a+"Item":"item");return r.map((c,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:c,[s]:c,[`$${s}Index`]:u}},block:i}))},jt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},Bt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([a,s])=>!We(s,n)))}:{}},Nt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Wt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ge=e=>e.toString(),De={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=De)=>`@media (max-width: ${t[e].max}px)`,$e=e=>{const t=ce(De);if(!e)return t;const{xsmall:n,small:i,medium:r}=e;if(n){const c=Math.floor(n/2);t.xsmall={max:n,min:c,default:c+1}}if(!i||!r)return t;const a=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:a,default:a+1};const s=t.small.max+1;t.medium={max:r,min:s,default:s+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function z(e){return o.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function Dt(e){function t(){const i=e.block;return f.checkIsDefined(i.hide)?!i.hide:f.checkIsDefined(i.show)?i.show:!0}function n(){var T,A,I,
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return r},Vt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const r=U({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const a=n.collection.split(".").pop(),s=n.itemName||(a?a+"Item":"item");return r.map((c,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:c,[s]:c,[`$${s}Index`]:u}},block:i}))},jt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},Bt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([a,s])=>!We(s,n)))}:{}},Nt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Wt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ge=e=>e.toString(),De={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=De)=>`@media (max-width: ${t[e].max}px)`,$e=e=>{const t=ce(De);if(!e)return t;const{xsmall:n,small:i,medium:r}=e;if(n){const c=Math.floor(n/2);t.xsmall={max:n,min:c,default:c+1}}if(!i||!r)return t;const a=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:a,default:a+1};const s=t.small.max+1;t.medium={max:r,min:s,default:s+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function z(e){return o.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function Dt(e){function t(){const i=e.block;return f.checkIsDefined(i.hide)?!i.hide:f.checkIsDefined(i.show)?i.show:!0}function n(){var T,A,I,E,b;const i=e.block,r=i.responsiveStyles,a=e.context.content,s=$e(((T=a==null?void 0:a.meta)==null?void 0:T.breakpoints)||{}),l=!!((I=(A=a==null?void 0:a.meta)==null?void 0:A.breakpoints)!=null&&I.xsmall),c=r==null?void 0:r.large,u=r==null?void 0:r.medium,h=r==null?void 0:r.small,p=r==null?void 0:r.xsmall,m=i.id;if(!m)return"";const S=c?H({className:m,styles:c}):"",d=u?H({className:m,styles:u,mediaQuery:ne("medium",s)}):"",y=h?H({className:m,styles:h,mediaQuery:ne("small",s)}):"",v=p&&l?H({className:m,styles:p,mediaQuery:ne("xsmall",s)}):"",x=i.animations&&i.animations.find(k=>k.trigger==="hover");let C="";if(x){const k=((b=(E=x.steps)==null?void 0:E[1])==null?void 0:b.styles)||{};C=H({className:`${m}:hover`,styles:{...k,transition:`all ${x.duration}s ${ee(x.easing)}`,transitionDelay:x.delay?`${x.delay}s`:"0s"}})||""}return[S,d,y,v,C].join(" ")}return o.jsx(o.Fragment,{children:n()&&t()?o.jsx(o.Fragment,{children:o.jsx(z,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function $t(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ft=e=>`on${$t(e)}`,Ot=(e,t)=>n=>U({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Fe(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const a=n[r];let s=Ft(r);if(e.stripPrefix)switch(f.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=Ot(a,e)}return t}function Lt({properties:e}){return e}const _t=e=>({href:e.href});function ue({block:e,context:t}){var i;const n={..._t(e),...e.properties,"builder-id":e.id,style:Pt({block:e,context:t}),[L()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Lt({properties:n,context:t,block:e})}function Ut(e){return o.jsx(le,{TagName:e.Wrapper,attributes:ue({block:e.block,context:e.context}),actionAttributes:Fe({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 Mt(e){return g.useEffect(()=>{},[]),o.jsx(o.Fragment,{children:e.children})}function Ht(e){var i,r;g.useState(()=>0);function t(){return e.includeBlockProps?{...ue({block:e.block,context:e.context}),...Fe({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}function n(){return e.wrapperProps}return g.useEffect(()=>{},[e.wrapperProps,(r=(i=e.block)==null?void 0:i.component)==null?void 0:r.options]),o.jsx(o.Fragment,{children:e.Wrapper.load?o.jsx(o.Fragment,{children:o.jsx(Mt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):o.jsx(e.Wrapper,{...n(),attributes:t(),children:e.children})})}const qt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:r,isInteractive:a,contextValue:s})=>{const l={...e,...r?{attributes:ue({block:t,context:s})}:{}};return a?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:r}:l};function he(e){var i;g.useState(()=>!1);const[t,n]=g.useState(()=>e.isInteractive?Ht:e.componentRef);return g.useEffect(()=>{},[e.componentOptions,e.blockChildren]),o.jsx(o.Fragment,{children:e.componentRef?o.jsx(o.Fragment,{children:o.jsx(t,{...qt({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(r=>o.jsx(te,{block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r.id))})}):null})}function be(e){const[t,n]=g.useState(()=>e.repeatContext);return g.useEffect(()=>{n(e.repeatContext)},[e.repeatContext]),o.jsx(Z.Provider,{value:t,children:o.jsx(te,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function te(e){var h,p,m,S;function t(){return Vt({block:e.block,context:e.context})}const[n,i]=g.useState(()=>({value:null,update:!1}));function r(){var y;if(n.value&&!n.update&&!f.isPreviewing())return n.value;const d=(y=e.block.repeat)!=null&&y.collection?e.block:kt({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=d,n.update=!1,d}function a(){return At({block:r(),registeredComponents:e.registeredComponents,model:e.context.model})}function s(){var y;return e.block.tagName==="a"||((y=r().properties)==null?void 0:y.href)||r().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var v,x;if((v=e.block.repeat)!=null&&v.collection)return!!((x=t==null?void 0:t())!=null&&x.length);const d="hide"in r()?r().hide:!1;return("show"in r()?r().show:!0)&&!d}function c(){var y,v;return!((y=a==null?void 0:a())!=null&&y.component)&&!t()?(v=r().children)!=null?v:[]:[]}function u(){var d,y,v,x;return{blockChildren:(d=r().children)!=null?d:[],componentRef:(y=a==null?void 0:a())==null?void 0:y.component,componentOptions:{...ft(r(),e.context),...Nt(a(),r()),...Wt(a(),e.context),...jt(a(),e.linkComponent),...Bt(a(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:r(),includeBlockProps:((v=a==null?void 0:a())==null?void 0:v.noWrap)===!0,isInteractive:!((x=a==null?void 0:a())!=null&&x.isRSC&&f.TARGET==="rsc")}}return g.useEffect(()=>{const d=r().id,y=r().animations;y&&d&&Tt(y.map(v=>({...v,elementId:d})))},[]),g.useEffect(()=>{n.update=!0}),o.jsx(o.Fragment,{children:l()?o.jsxs(o.Fragment,{children:[o.jsx(Dt,{block:r(),context:e.context}),(h=a==null?void 0:a())!=null&&h.noWrap?t()?o.jsx(o.Fragment,{children:(S=t())==null?void 0:S.map((d,y)=>o.jsx(be,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},ge(y)))}):o.jsx(he,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}):o.jsx(o.Fragment,{children:t()?o.jsx(o.Fragment,{children:(m=t())==null?void 0:m.map((d,y)=>o.jsx(be,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},ge(y)))}):o.jsxs(Ut,{Wrapper:s(),block:r(),context:e.context,children:[o.jsx(he,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}),(p=c())==null?void 0:p.map(d=>o.jsx(te,{block:d,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},d.id))]})})]}):null})}function zt(e){const t=g.useRef(null);g.useState(()=>!1);function n(){var s;return["builder-blocks",(s=e.blocks)!=null&&s.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const s="this.",l="component.options.";return e.path.startsWith(s)?e.path.replace(s,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function r(){var s,l;f.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function a(){var s,l;f.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return g.useEffect(()=>{},[]),g.useEffect(()=>{},[e.blocks]),o.jsxs(o.Fragment,{children:[o.jsx("style",{children:`.props-blocks-wrapper-8834791c {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`}),o.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-8834791c","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>r(),onMouseEnter:s=>a(),onKeyPress:s=>r(),...e.BlocksWrapperProps,children:e.children})]})}function
|
|
12
|
+
}`}),o.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-8834791c","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>r(),onMouseEnter:s=>a(),onKeyPress:s=>r(),...e.BlocksWrapperProps,children:e.children})]})}function $(e){var i,r,a;const t=g.useContext(Z),n=g.useContext(Ie);return o.jsxs(zt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapperProps:e.BlocksWrapperProps||((i=e.context)==null?void 0:i.BlocksWrapperProps)||(t==null?void 0:t.BlocksWrapperProps),classNameProp:e.className,BlocksWrapper:((r=e.context)==null?void 0:r.BlocksWrapper)||(t==null?void 0:t.BlocksWrapper),children:[e.children,e.blocks?o.jsx(o.Fragment,{children:(a=e.blocks)==null?void 0:a.map(s=>o.jsx(te,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},s.id))}):null]})}const Kt=e=>`builder-columns ${e}-breakpoints`;function Oe(e){var y,v;function t(){return typeof e.space=="number"?e.space||0:20}function n(){return e.columns||[]}function i(){return e.stackColumnsAt||"tablet"}function r(x){return x.link?e.builderLinkComponent||"a":"div"}function a(x){var C;return((C=n()[x])==null?void 0:C.width)||100/n().length}function s(x){const C=a(x),T=t()*(n().length-1)*(C/100);return`calc(${C}% - ${T}px)`}function l({stackedStyle:x,desktopStyle:C}){return i()==="tablet"?x:C}function c({stackedStyle:x,desktopStyle:C}){return i()==="never"?C:x}function u(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"}function h(){return{"--flex-dir":u(),"--flex-dir-tablet":l({stackedStyle:u(),desktopStyle:"row"})}}function p(x){const C=x===0?0:t(),T=s(x),A=`${C}px`,I="100%",E=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:T,["marginLeft"]:A,"--column-width-mobile":c({stackedStyle:I,desktopStyle:T}),"--column-margin-left-mobile":c({stackedStyle:E,desktopStyle:A}),"--column-width-tablet":l({stackedStyle:I,desktopStyle:T}),"--column-margin-left-tablet":l({stackedStyle:E,desktopStyle:A})}}function m(x){var T,A;return $e(((A=(T=e.builderContext.content)==null?void 0:T.meta)==null?void 0:A.breakpoints)||{})[x].max}function S(){const x=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
13
|
@media (max-width: ${m("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
39
|
height: 100%;
|
|
40
|
-
}`}),o.jsxs("div",{className:Kt((
|
|
40
|
+
}`}),o.jsxs("div",{className:Kt((y=e.builderBlock)==null?void 0:y.id)+" div-0369db37",style:h(),children:[o.jsx(z,{id:"builderio-columns",styles:S(),nonce:e.builderContext.nonce}),(v=e.columns)==null?void 0:v.map((x,C)=>o.jsx(le,{TagName:r(x),actionAttributes:{},attributes:d(x,C),children:o.jsx($,{path:`columns.${C}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:x.blocks,styleProp:{flexGrow:"1"}})},C))]})]})}function Le(e){return o.jsx("span",{children:e.children})}function ye(e){return e.replace(/http(s)?:/,"")}function Gt(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function Jt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ye(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]),r=n[3],a=t.match("x")?t:`${t}x`;return ye(`${i[0]}_${a}${r}`)}return null}function G(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(r=>r!==i).map(r=>`${Gt(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Jt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function _e(e){var r,a,s,l,c,u;function t(){var m;const p=e.image||e.src;if(!p||!(typeof p=="string"&&(p.match(/builder\.io/)||p.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((m=e.image)!=null&&m.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),G(p)}else if(e.image&&!e.srcset)return G(p);return G(p)}}function n(){var h;return(h=t==null?void 0:t())!=null&&h.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const h={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?h:void 0}return g.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[o.jsx("style",{children:`.img-3cc22d08 {
|
|
41
41
|
opacity: 1;
|
|
42
42
|
transition: opacity 0.2s ease-in-out;
|
|
43
43
|
}.div-3cc22d08 {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
left: 0;
|
|
54
54
|
width: 100%;
|
|
55
55
|
height: 100%;
|
|
56
|
-
}`}),o.jsxs(o.Fragment,{children:[o.jsxs("picture",{children:[n()?o.jsx("source",{type:"image/webp",srcSet:n()}):null,o.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-3cc22d08",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((a=(r=e.builderBlock)==null?void 0:r.children)!=null&&a.length&&e.fitContent)?o.jsx("div",{className:"builder-image-sizer div-3cc22d08",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&&((u=(c=e.builderBlock)==null?void 0:c.children)!=null&&u.length)?o.jsx("div",{className:"div-3cc22d08-2",children:e.children}):null]})]})}function Ue(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})}function Qt(e,t,n,i){function r(u){return typeof u=="string"}function a(u){return typeof u=="number"}function s(u,h){return(()=>{const m=h.property,S=h.operator;let d=h.value;if(h&&h.property==="urlPath"&&h.value&&typeof h.value=="string"&&h.value!=="/"&&h.value.endsWith("/")&&(d=h.value.slice(0,-1)),!(m&&S))return!0;if(Array.isArray(d))return S==="isNot"?d.every(v=>s(u,{property:m,operator:S,value:v})):!!d.find(v=>s(u,{property:m,operator:S,value:v}));const
|
|
56
|
+
}`}),o.jsxs(o.Fragment,{children:[o.jsxs("picture",{children:[n()?o.jsx("source",{type:"image/webp",srcSet:n()}):null,o.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-3cc22d08",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((a=(r=e.builderBlock)==null?void 0:r.children)!=null&&a.length&&e.fitContent)?o.jsx("div",{className:"builder-image-sizer div-3cc22d08",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&&((u=(c=e.builderBlock)==null?void 0:c.children)!=null&&u.length)?o.jsx("div",{className:"div-3cc22d08-2",children:e.children}):null]})]})}function Ue(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})}function Qt(e,t,n,i){function r(u){return typeof u=="string"}function a(u){return typeof u=="number"}function s(u,h){return(()=>{const m=h.property,S=h.operator;let d=h.value;if(h&&h.property==="urlPath"&&h.value&&typeof h.value=="string"&&h.value!=="/"&&h.value.endsWith("/")&&(d=h.value.slice(0,-1)),!(m&&S))return!0;if(Array.isArray(d))return S==="isNot"?d.every(v=>s(u,{property:m,operator:S,value:v})):!!d.find(v=>s(u,{property:m,operator:S,value:v}));const y=u[m];if(Array.isArray(y))return y.includes(d);switch(S){case"is":return y===d;case"isNot":return y!==d;case"contains":return(r(y)||Array.isArray(y))&&y.includes(String(d));case"startsWith":return r(y)&&y.startsWith(String(d));case"endsWith":return r(y)&&y.endsWith(String(d));case"greaterThan":return a(y)&&a(d)&&y>d;case"lessThan":return a(y)&&a(d)&&y<d;case"greaterThanOrEqualTo":return a(y)&&a(d)&&y>=d;case"lessThanOrEqualTo":return a(y)&&a(d)&&y<=d;default:return!1}})()}const l={query:t,startDate:n,endDate:i},c=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>c||l.endDate&&new Date(l.endDate)<c?!1:!l.query||!l.query.length?!0:l.query.every(u=>s(e,u))}const Yt=`function getPersonalizedVariant(variants, blockId, isHydrationTarget, locale) {
|
|
57
57
|
if (!navigator.cookieEnabled) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
window.${en} = ${Xt}
|
|
219
219
|
window.${Me} = ${Yt}
|
|
220
220
|
window.${He} = ${Zt}
|
|
221
|
-
`,ze=f.TARGET==="react",an=(e,t,n)=>`window.${Me}(${JSON.stringify(e)}, "${t}", ${ze}${n?`, "${n}"`:""})`,on=(e,t,n)=>`window.${He}(${JSON.stringify(e)}, "${t}", ${ze}${n?`, "${n}"`:""})`,ie={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},re={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},sn={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[ie]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[re]}],defaultValue:[{title:[ie],detail:[re]},{title:[ie],detail:[re]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},pe=e=>e.toString();function ln(e){var p;const[t,n]=g.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function r(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function a(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([d,b])=>b!==void 0))}function s(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function l(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function c(){let m=null;if(e.grid&&t.length&&document){const d=t[0];let v=document.querySelector(`.builder-accordion-title[data-index="${d}"]`);if(m=d,v){let x=v.getBoundingClientRect();for(;v=v&&v.nextElementSibling;)if(v){if(v.classList.contains("builder-accordion-detail"))continue;const C=v.getBoundingClientRect();if(C.left>x.left){const T=parseInt(v.getAttribute("data-index")||"",10);isNaN(T)||(x=C,m=T)}else break}}}return typeof m=="number"&&(m=m+1),m}function u(){const m={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([S,d])=>d!==void 0))}function h(m){t.includes(m)?n(i()?[]:t.filter(S=>S!==m)):n(i()?[m]:t.concat(m))}return o.jsx("div",{className:"builder-accordion",style:r(),children:(p=e.items)==null?void 0:p.map((m,S)=>o.jsxs(tt.Fragment,{children:[o.jsx("div",{className:s(S),style:{...a(),...e.grid&&{width:e.gridRowWidth,order:c()!==null?pe(S):pe(S+1)}},"data-index":S,onClick:d=>h(S),children:o.jsx(D,{blocks:m.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?o.jsx("div",{className:l(S),style:u(),children:o.jsx(D,{blocks:m.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const cn={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},un={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(r=>r.get("width"))&&(n.find(a=>!a.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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},dn={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},de=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],mn=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],fn={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:de,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,u)=>{const h=document.createElement("img");let p=!1;h.onload=()=>{p=!0,c(h)},h.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),h.src=s,setTimeout(()=>{p||u(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const r=e.get("image"),a=e.get("aspectRatio");if(fetch(r).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!a||a===.7041))return n(r).then(s=>{const l=e.get("aspectRatio");e.get("image")===r&&(!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:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},gn={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function O(e){return o.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function hn(e){var C,T,A,I,w,y,k,E,N,W,B,P,$;const t=g.useRef(null),[n,i]=g.useState(()=>f.userAttributesService.getUserAttributes()),[r,a]=g.useState(()=>{var R,V,j;return an(e.variants,((R=e.builderBlock)==null?void 0:R.id)||"none",(j=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:j.locale)}),[s,l]=g.useState(()=>{var R,V,j;return on(e.variants,((R=e.builderBlock)==null?void 0:R.id)||"none",(j=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:j.locale)}),[c,u]=g.useState(()=>[]),[h,p]=g.useState(()=>{var R;return tn(e.variants,f.getDefaultCanTrack((R=e.builderContext)==null?void 0:R.canTrack))}),[m,S]=g.useState(()=>!1);function d(){return{...e.attributes,[L()]:`builder-personalization-container ${e.attributes[L()]||""}`}}function b(){return(e.variants||[]).filter(R=>{var V,j,_,F;return Qt({...(j=(V=e.builderContext)==null?void 0:V.rootState)!=null&&j.locale?{locale:(F=(_=e.builderContext)==null?void 0:_.rootState)==null?void 0:F.locale}:{},...n},R.query,R.startDate,R.endDate)})}function v(){var R;return nn({variants:e.variants,fallbackBlocks:(R=e.builderBlock)==null?void 0:R.children,isHydrated:m,filteredVariants:b(),previewingIndex:e.previewingIndex})}function x(){return(e.variants||[]).map((R,V)=>{var j;return`div[data-variant-id="${(j=e.builderBlock)==null?void 0:j.id}-${V}"] { display: none !important; } `}).join("")}return g.useEffect(()=>{var V;S(!0);const R=f.userAttributesService.subscribeOnUserAttributesChange(j=>{i(j)},{fireImmediately:f.TARGET==="qwik"});if(!(f.isEditing()||f.isPreviewing())){const j=b()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:j||J,content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0})),new IntersectionObserver(F=>{F.forEach(K=>{var M;K.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:j||J,content:(M=e.builderContext)==null?void 0:M.content},bubbles:!0}))})}).observe(t.current))}c.push(R)},[]),g.useEffect(()=>()=>{c.forEach(R=>R())},[]),o.jsxs("div",{ref:t,...d(),children:[m&&Q.includes(f.TARGET)?o.jsx(D,{blocks:v().blocks,parent:(C=e.builderBlock)==null?void 0:C.id,path:v().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(T=e.builderContext)==null?void 0:T.BlocksWrapperProps,"data-variant-id":`${(A=e.builderBlock)==null?void 0:A.id}-${v().index}`}}):null,!m&&Q.includes(f.TARGET)||!Q.includes(f.TARGET)?o.jsxs(o.Fragment,{children:[h?o.jsxs(o.Fragment,{children:[o.jsx(z,{nonce:((I=e.builderContext)==null?void 0:I.nonce)||"",styles:x(),id:`variants-styles-${(w=e.builderBlock)==null?void 0:w.id}`}),o.jsx(O,{nonce:((y=e.builderContext)==null?void 0:y.nonce)||"",scriptStr:s,id:`variants-visibility-script-${(k=e.builderBlock)==null?void 0:k.id}`}),(E=e.variants)==null?void 0:E.map((R,V)=>{var j,_,F,K,M,me;return o.jsx(D,{BlocksWrapperProps:{...(j=e.builderContext)==null?void 0:j.BlocksWrapperProps,"aria-hidden":!0,hidden:!0,"data-variant-id":`${(_=e.builderBlock)==null?void 0:_.id}-${V}`},blocks:R.blocks,parent:(F=e.builderBlock)==null?void 0:F.id,path:`component.options.variants.${V}.blocks`,context:e.builderContext,registeredComponents:e.builderComponents,children:o.jsx(O,{nonce:((K=e.builderContext)==null?void 0:K.nonce)||"",scriptStr:r,id:`variants-script-${(M=e.builderBlock)==null?void 0:M.id}-${V}`})},`${(me=e.builderBlock)==null?void 0:me.id}-${V}`)})]}):null,o.jsx(D,{blocks:v().blocks,parent:(N=e.builderBlock)==null?void 0:N.id,path:v().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(W=e.builderContext)==null?void 0:W.BlocksWrapperProps,"data-variant-id":`${(B=e.builderBlock)==null?void 0:B.id}-${v().index}`},children:h?o.jsx(O,{nonce:((P=e.builderContext)==null?void 0:P.nonce)||"",scriptStr:r,id:`variants-script-${($=e.builderBlock)==null?void 0:$.id}-${J}`}):null})]}):null]})}const bn={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>"}}}]},yn={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function pn(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,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const xn={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ae={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},oe={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},vn={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[ae]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[oe]}],defaultValue:[{label:[{...ae,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...ae,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Sn(e){var a;const[t,n]=g.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function r(s){s===t&&e.collapsible?n(-1):n(s)}return o.jsxs("div",{children:[o.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(a=e.tabs)==null?void 0:a.map((s,l)=>o.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:c=>r(l),children:o.jsx(D,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?o.jsx("div",{children:o.jsx(D,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const kn={shouldReceiveBuilderProps:{},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 Ke(e){var t;return o.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Cn={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 Tn(e){const t=g.useRef(null),[n,i]=g.useState(()=>[]),[r,a]=g.useState(()=>[]);function s(){var c;if(!t.current||!((c=t.current)!=null&&c.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const h=l[u];if(h.src){if(n.includes(h.src))continue;n.push(h.src);const p=document.createElement("script");p.async=!0,p.src=h.src,document.head.appendChild(p)}else if(!h.type||["text/javascript","application/javascript","application/ecmascript"].includes(h.type)){if(r.includes(h.innerText))continue;try{r.push(h.innerText),new Function(h.innerText)()}catch(p){f.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",p)}}}}return g.useEffect(()=>{s()},[]),g.useEffect(()=>{f.isEditing()&&s()},[e.code]),o.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const In={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},wn=["text/javascript","application/javascript","application/ecmascript"],En=e=>wn.includes(e.type);function Rn(e){const t=g.useRef(null),[n,i]=g.useState(()=>[]),[r,a]=g.useState(()=>[]),[s,l]=g.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let h=0;h<u.length;h++){const p=u[h];if(p.src&&!n.includes(p.src)){n.push(p.src);const m=document.createElement("script");m.async=!0,m.src=p.src,document.head.appendChild(m)}else if(En(p)&&!r.includes(p.innerText))try{r.push(p.innerText),new Function(p.innerText)()}catch(m){f.logger.warn("[BUILDER.IO] `Embed`: Error running script:",m)}}}return g.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),o.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Pn={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},An=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Vn=()=>{const e=process.env.NODE_ENV||"production";return An.includes(e)?e:"production"};function jn(e){const t=g.useRef(null),[n,i]=g.useState(()=>"unsubmitted"),[r,a]=g.useState(()=>null),[s,l]=g.useState(()=>"");function c(p){var S,d;const m={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(d=(S=e.builderContext).rootSetState)==null||d.call(S,m):e.builderContext.rootState=m}function u(){return f.isEditing()&&e.previewState||n}function h(p){var S;const m=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(m){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const d=p.currentTarget||p.target,b=e.customHeaders||{};let v;const x=new FormData(d),C=Array.from(d.querySelectorAll("input,select,textarea")).filter(y=>!!y.name).map(y=>{let k;const E=y.name;if(y instanceof HTMLInputElement)if(y.type==="radio"){if(y.checked)return k=y.name,{key:E,value:k}}else if(y.type==="checkbox")k=y.checked;else if(y.type==="number"||y.type==="range"){const N=y.valueAsNumber;isNaN(N)||(k=N)}else y.type==="file"?k=y.files:k=y.value;else k=y.value;return{key:E,value:k}});let T=e.contentType;if(e.sendSubmissionsTo==="email"&&(T="multipart/form-data"),Array.from(C).forEach(({value:y})=>{(y instanceof File||Array.isArray(y)&&y[0]instanceof File||y instanceof FileList)&&(T="multipart/form-data")}),T!=="application/json")v=x;else{const y={};Array.from(C).forEach(({value:k,key:E})=>{Pe(y,E,k)}),v=JSON.stringify(y)}T&&T!=="multipart/form-data"&&(m&&((S=e.action)!=null&&S.includes("zapier.com"))||(b["content-type"]=T));const A=new CustomEvent("presubmit",{detail:{body:v}});if(t.current&&(t.current.dispatchEvent(A),A.defaultPrevented))return;if(i("sending"),e.sendSubmissionsTo==="email"&&(e.sendSubmissionsToEmail==="your@email.com"||!e.sendSubmissionsToEmail)){const y="SubmissionsToEmail is required when sendSubmissionsTo is set to email";console.error(y),i("error"),c({formErrorMessage:y});return}const I=`${Vn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,w=e.sendSubmissionsTo==="email"?I:e.action;f.logFetch(w),fetch(w,{body:v,headers:b,method:e.method||"post"}).then(async y=>{var N,W;let k;const E=y.headers.get("content-type");if(E&&E.indexOf("application/json")!==-1?k=await y.json():k=await y.text(),!y.ok){const B=new CustomEvent("submit:error",{detail:{error:k,status:y.status}});if((N=t.current)!=null&&N.nativeElement&&((W=t.current)==null||W.nativeElement.dispatchEvent(B),B.defaultPrevented))return;a(k),i("error");let P=e.errorMessagePath?we(k,e.errorMessagePath):k.message||k.error||k;typeof P!="string"&&(P=JSON.stringify(P)),l(P),c({formErrorMessage:P});return}if(a(k),i(y.ok?"success":"error"),y.ok){const B=new CustomEvent("submit:success",{detail:{res:y,body:k}});if(t.current){if(t.current.dispatchEvent(B),B.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const P=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(P),P.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},y=>{const k=new CustomEvent("submit:error",{detail:{error:y}});t.current&&(t.current.dispatchEvent(k),k.defaultPrevented)||(a(y),i("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsx("style",{children:".pre-7c90c93e { padding: 10px; color: red; text-align: center; }"})," ",o.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>h(p),...e.attributes,children:[e.children,u()==="error"?o.jsx(D,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?o.jsx(D,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&r?o.jsx("pre",{className:"builder-form-error-text pre-7c90c93e",children:JSON.stringify(r,null,2)}):null,u()==="success"?o.jsx(D,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," "]})}const Bn={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 Nn(e){return g.createElement("input",{...e.attributes,key:f.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 Wn={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 Dn(e){var t;return g.createElement("select",{...e.attributes,value:e.value,key:f.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>o.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const $n={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 Fn(e){return o.jsx("button",{type:"submit",...e.attributes,children:e.text})}const On={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function Ln(e){return o.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const _n={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:de,required:!0}],noWrap:!0,static:!0};function Un(e){function t(){const n=e.imgSrc||e.image;if(!(!n||typeof n!="string")&&n.match(/builder\.io/))return G(n)}return o.jsx("img",{loading:"lazy",style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,srcSet:t(),...e.attributes},f.isEditing()&&e.imgSrc||"default-key")}const Mn={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:mn,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:de,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Ge(e){var s,l,c,u,h,p,m;const t=g.useRef(null);function n(){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 i(){return{...n()}}const[r,a]=g.useState(()=>{});return g.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(d){d.forEach(function(b){if(!b.isIntersecting)return;const v=b.target;try{Array.from(v.children).filter(x=>x instanceof HTMLElement&&x.tagName==="SOURCE").forEach(x=>{const C=x.dataset.src;C&&(x.src=C)}),v.load(),S.unobserve(v)}catch(x){console.error("Error loading lazy video:",x)}})});t.current&&S.observe(t.current),a(S)}},[]),g.useEffect(()=>()=>{r&&r.disconnect()},[]),o.jsxs("div",{style:{position:"relative"},children:[o.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(s=e.attributes)==null?void 0:s.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:o.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((c=(l=e.builderBlock)==null?void 0:l.children)!=null&&c.length))?o.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(h=(u=e.builderBlock)==null?void 0:u.children)!=null&&h.length&&e.fitContent?o.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(m=(p=e.builderBlock)==null?void 0:p.children)!=null&&m.length&&!e.fitContent?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 Hn=()=>[{component:Tn,...Cn},{component:Rn,...In},{component:jn,...Pn},{component:Nn,...Bn},{component:Fn,...$n},{component:Dn,...Wn},{component:Ln,...On},{component:Un,..._n},{component:Ge,...Mn}],xe=()=>[{component:Te,...cn},{component:Oe,...un},{component:Le,...dn},{component:_e,...fn},{component:Ue,...bn},{component:pn,...yn},{component:Ze,...xn},{component:Ke,...kn},...qe.includes(f.TARGET)?[{component:hn,...gn}]:[],{component:Sn,...vn},{component:ln,...sn},...Hn()],qn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
221
|
+
`,ze=f.TARGET==="react",an=(e,t,n)=>`window.${Me}(${JSON.stringify(e)}, "${t}", ${ze}${n?`, "${n}"`:""})`,on=(e,t,n)=>`window.${He}(${JSON.stringify(e)}, "${t}", ${ze}${n?`, "${n}"`:""})`,ie={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},re={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},sn={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[ie]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[re]}],defaultValue:[{title:[ie],detail:[re]},{title:[ie],detail:[re]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},pe=e=>e.toString();function ln(e){var p;const[t,n]=g.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function r(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function a(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([d,y])=>y!==void 0))}function s(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function l(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function c(){let m=null;if(e.grid&&t.length&&document){const d=t[0];let v=document.querySelector(`.builder-accordion-title[data-index="${d}"]`);if(m=d,v){let x=v.getBoundingClientRect();for(;v=v&&v.nextElementSibling;)if(v){if(v.classList.contains("builder-accordion-detail"))continue;const C=v.getBoundingClientRect();if(C.left>x.left){const T=parseInt(v.getAttribute("data-index")||"",10);isNaN(T)||(x=C,m=T)}else break}}}return typeof m=="number"&&(m=m+1),m}function u(){const m={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([S,d])=>d!==void 0))}function h(m){t.includes(m)?n(i()?[]:t.filter(S=>S!==m)):n(i()?[m]:t.concat(m))}return o.jsx("div",{className:"builder-accordion",style:r(),children:(p=e.items)==null?void 0:p.map((m,S)=>o.jsxs(tt.Fragment,{children:[o.jsx("div",{className:s(S),style:{...a(),...e.grid&&{width:e.gridRowWidth,order:c()!==null?pe(S):pe(S+1)}},"data-index":S,onClick:d=>h(S),children:o.jsx($,{blocks:m.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?o.jsx("div",{className:l(S),style:u(),children:o.jsx($,{blocks:m.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const cn={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},un={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(r=>r.get("width"))&&(n.find(a=>!a.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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},dn={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},de=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],mn=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],fn={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:de,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,u)=>{const h=document.createElement("img");let p=!1;h.onload=()=>{p=!0,c(h)},h.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),h.src=s,setTimeout(()=>{p||u(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const r=e.get("image"),a=e.get("aspectRatio");if(fetch(r).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!a||a===.7041))return n(r).then(s=>{const l=e.get("aspectRatio");e.get("image")===r&&(!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:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},gn={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function O(e){return o.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function hn(e){var C,T,A,I,E,b,k,R,j,W,D,P,N;const t=g.useRef(null),[n,i]=g.useState(()=>f.userAttributesService.getUserAttributes()),[r,a]=g.useState(()=>{var w,V,B;return an(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(B=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:B.locale)}),[s,l]=g.useState(()=>{var w,V,B;return on(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(B=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:B.locale)}),[c,u]=g.useState(()=>[]),[h,p]=g.useState(()=>{var w;return tn(e.variants,f.getDefaultCanTrack((w=e.builderContext)==null?void 0:w.canTrack))}),[m,S]=g.useState(()=>!1);function d(){return{...e.attributes,[L()]:`builder-personalization-container ${e.attributes[L()]||""}`}}function y(){return(e.variants||[]).filter(w=>{var V,B,_,F;return Qt({...(B=(V=e.builderContext)==null?void 0:V.rootState)!=null&&B.locale?{locale:(F=(_=e.builderContext)==null?void 0:_.rootState)==null?void 0:F.locale}:{},...n},w.query,w.startDate,w.endDate)})}function v(){var w;return nn({variants:e.variants,fallbackBlocks:(w=e.builderBlock)==null?void 0:w.children,isHydrated:m,filteredVariants:y(),previewingIndex:e.previewingIndex})}function x(){return(e.variants||[]).map((w,V)=>{var B;return`div[data-variant-id="${(B=e.builderBlock)==null?void 0:B.id}-${V}"] { display: none !important; } `}).join("")}return g.useEffect(()=>{var V;S(!0);const w=f.userAttributesService.subscribeOnUserAttributesChange(B=>{i(B)},{fireImmediately:f.TARGET==="qwik"});if(!(f.isEditing()||f.isPreviewing())){const B=y()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:B||J,content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0})),new IntersectionObserver(F=>{F.forEach(K=>{var M;K.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:B||J,content:(M=e.builderContext)==null?void 0:M.content},bubbles:!0}))})}).observe(t.current))}c.push(w)},[]),g.useEffect(()=>()=>{c.forEach(w=>w())},[]),o.jsxs("div",{ref:t,...d(),children:[m&&Q.includes(f.TARGET)?o.jsx($,{blocks:v().blocks,parent:(C=e.builderBlock)==null?void 0:C.id,path:v().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(T=e.builderContext)==null?void 0:T.BlocksWrapperProps,"data-variant-id":`${(A=e.builderBlock)==null?void 0:A.id}-${v().index}`}}):null,!m&&Q.includes(f.TARGET)||!Q.includes(f.TARGET)?o.jsxs(o.Fragment,{children:[h?o.jsxs(o.Fragment,{children:[o.jsx(z,{nonce:((I=e.builderContext)==null?void 0:I.nonce)||"",styles:x(),id:`variants-styles-${(E=e.builderBlock)==null?void 0:E.id}`}),o.jsx(O,{nonce:((b=e.builderContext)==null?void 0:b.nonce)||"",scriptStr:s,id:`variants-visibility-script-${(k=e.builderBlock)==null?void 0:k.id}`}),(R=e.variants)==null?void 0:R.map((w,V)=>{var B,_,F,K,M,me;return o.jsx($,{BlocksWrapperProps:{...(B=e.builderContext)==null?void 0:B.BlocksWrapperProps,"aria-hidden":!0,hidden:!0,"data-variant-id":`${(_=e.builderBlock)==null?void 0:_.id}-${V}`},blocks:w.blocks,parent:(F=e.builderBlock)==null?void 0:F.id,path:`component.options.variants.${V}.blocks`,context:e.builderContext,registeredComponents:e.builderComponents,children:o.jsx(O,{nonce:((K=e.builderContext)==null?void 0:K.nonce)||"",scriptStr:r,id:`variants-script-${(M=e.builderBlock)==null?void 0:M.id}-${V}`})},`${(me=e.builderBlock)==null?void 0:me.id}-${V}`)})]}):null,o.jsx($,{blocks:v().blocks,parent:(j=e.builderBlock)==null?void 0:j.id,path:v().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(W=e.builderContext)==null?void 0:W.BlocksWrapperProps,"data-variant-id":`${(D=e.builderBlock)==null?void 0:D.id}-${v().index}`},children:h?o.jsx(O,{nonce:((P=e.builderContext)==null?void 0:P.nonce)||"",scriptStr:r,id:`variants-script-${(N=e.builderBlock)==null?void 0:N.id}-${J}`}):null})]}):null]})}const bn={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>"}}}]},yn={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function pn(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,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const xn={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ae={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},oe={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},vn={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[ae]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[oe]}],defaultValue:[{label:[{...ae,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...ae,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Sn(e){var a;const[t,n]=g.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function r(s){s===t&&e.collapsible?n(-1):n(s)}return o.jsxs("div",{children:[o.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(a=e.tabs)==null?void 0:a.map((s,l)=>o.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:c=>r(l),children:o.jsx($,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?o.jsx("div",{children:o.jsx($,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const kn={shouldReceiveBuilderProps:{},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 Ke(e){var t;return o.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Cn={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 Tn(e){const t=g.useRef(null),[n,i]=g.useState(()=>[]),[r,a]=g.useState(()=>[]);function s(){var c;if(!t.current||!((c=t.current)!=null&&c.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const h=l[u];if(h.src){if(n.includes(h.src))continue;n.push(h.src);const p=document.createElement("script");p.async=!0,p.src=h.src,document.head.appendChild(p)}else if(!h.type||["text/javascript","application/javascript","application/ecmascript"].includes(h.type)){if(r.includes(h.innerText))continue;try{r.push(h.innerText),new Function(h.innerText)()}catch(p){f.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",p)}}}}return g.useEffect(()=>{s()},[]),g.useEffect(()=>{f.isEditing()&&s()},[e.code]),o.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const In={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},wn=["text/javascript","application/javascript","application/ecmascript"],En=e=>wn.includes(e.type);function Rn(e){const t=g.useRef(null),[n,i]=g.useState(()=>[]),[r,a]=g.useState(()=>[]),[s,l]=g.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let h=0;h<u.length;h++){const p=u[h];if(p.src&&!n.includes(p.src)){n.push(p.src);const m=document.createElement("script");m.async=!0,m.src=p.src,document.head.appendChild(m)}else if(En(p)&&!r.includes(p.innerText))try{r.push(p.innerText),new Function(p.innerText)()}catch(m){f.logger.warn("[BUILDER.IO] `Embed`: Error running script:",m)}}}return g.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),o.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Pn={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},An=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Vn=()=>{const e=process.env.NODE_ENV||"production";return An.includes(e)?e:"production"};function jn(e){const t=g.useRef(null),[n,i]=g.useState(()=>"unsubmitted"),[r,a]=g.useState(()=>null),[s,l]=g.useState(()=>"");function c(p){var S,d;const m={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(d=(S=e.builderContext).rootSetState)==null||d.call(S,m):e.builderContext.rootState=m}function u(){return f.isEditing()&&e.previewState||n}function h(p){var S;const m=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(m){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const d=p.currentTarget||p.target,y=e.customHeaders||{};let v;const x=new FormData(d),C=Array.from(d.querySelectorAll("input,select,textarea")).filter(b=>!!b.name).filter(b=>!!b.name&&(b.type!=="radio"||b.checked)).map(b=>{let k;const R=b.name;if(b instanceof HTMLInputElement)if(b.type==="radio"){if(b.checked)return k=b.value,{key:R,value:k}}else if(b.type==="checkbox")k=b.checked;else if(b.type==="number"||b.type==="range"){const j=b.valueAsNumber;isNaN(j)||(k=j)}else b.type==="file"?k=b.files:k=b.value;else k=b.value;return{key:R,value:k}});let T=e.contentType;if(e.sendSubmissionsTo==="email"&&(T="multipart/form-data"),Array.from(C).forEach(({value:b})=>{(b instanceof File||Array.isArray(b)&&b[0]instanceof File||b instanceof FileList)&&(T="multipart/form-data")}),T!=="application/json")v=x;else{const b={};Array.from(C).forEach(({value:k,key:R})=>{Pe(b,R,k)}),v=JSON.stringify(b)}T&&T!=="multipart/form-data"&&(m&&((S=e.action)!=null&&S.includes("zapier.com"))||(y["content-type"]=T));const A=new CustomEvent("presubmit",{detail:{body:v}});if(t.current&&(t.current.dispatchEvent(A),A.defaultPrevented))return;if(i("sending"),e.sendSubmissionsTo==="email"&&(e.sendSubmissionsToEmail==="your@email.com"||!e.sendSubmissionsToEmail)){const b="SubmissionsToEmail is required when sendSubmissionsTo is set to email";console.error(b),i("error"),c({formErrorMessage:b});return}const I=`${Vn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,E=e.sendSubmissionsTo==="email"?I:e.action;f.logFetch(E),fetch(E,{body:v,headers:y,method:e.method||"post"}).then(async b=>{var j,W;let k;const R=b.headers.get("content-type");if(R&&R.indexOf("application/json")!==-1?k=await b.json():k=await b.text(),!b.ok){const D=new CustomEvent("submit:error",{detail:{error:k,status:b.status}});if((j=t.current)!=null&&j.nativeElement&&((W=t.current)==null||W.nativeElement.dispatchEvent(D),D.defaultPrevented))return;a(k),i("error");let P=e.errorMessagePath?we(k,e.errorMessagePath):k.message||k.error||k;typeof P!="string"&&(P=JSON.stringify(P)),l(P),c({formErrorMessage:P});return}if(a(k),i(b.ok?"success":"error"),b.ok){const D=new CustomEvent("submit:success",{detail:{res:b,body:k}});if(t.current){if(t.current.dispatchEvent(D),D.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const P=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(P),P.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},b=>{const k=new CustomEvent("submit:error",{detail:{error:b}});t.current&&(t.current.dispatchEvent(k),k.defaultPrevented)||(a(b),i("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsx("style",{children:".pre-26f6d56a { padding: 10px; color: red; text-align: center; }"})," ",o.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>h(p),...e.attributes,children:[e.children,u()==="error"?o.jsx($,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?o.jsx($,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&r?o.jsx("pre",{className:"builder-form-error-text pre-26f6d56a",children:JSON.stringify(r,null,2)}):null,u()==="success"?o.jsx($,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," "]})}const Bn={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 Nn(e){return g.createElement("input",{...e.attributes,key:f.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 Wn={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 Dn(e){var t;return g.createElement("select",{...e.attributes,value:e.value,key:f.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>o.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const $n={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 Fn(e){return o.jsx("button",{type:"submit",...e.attributes,children:e.text})}const On={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function Ln(e){return o.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const _n={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:de,required:!0}],noWrap:!0,static:!0};function Un(e){function t(){const n=e.imgSrc||e.image;if(!(!n||typeof n!="string")&&n.match(/builder\.io/))return G(n)}return o.jsx("img",{loading:"lazy",style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,srcSet:t(),...e.attributes},f.isEditing()&&e.imgSrc||"default-key")}const Mn={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:mn,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:de,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Ge(e){var s,l,c,u,h,p,m;const t=g.useRef(null);function n(){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 i(){return{...n()}}const[r,a]=g.useState(()=>{});return g.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(d){d.forEach(function(y){if(!y.isIntersecting)return;const v=y.target;try{Array.from(v.children).filter(x=>x instanceof HTMLElement&&x.tagName==="SOURCE").forEach(x=>{const C=x.dataset.src;C&&(x.src=C)}),v.load(),S.unobserve(v)}catch(x){console.error("Error loading lazy video:",x)}})});t.current&&S.observe(t.current),a(S)}},[]),g.useEffect(()=>()=>{r&&r.disconnect()},[]),o.jsxs("div",{style:{position:"relative"},children:[o.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(s=e.attributes)==null?void 0:s.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:o.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((c=(l=e.builderBlock)==null?void 0:l.children)!=null&&c.length))?o.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(h=(u=e.builderBlock)==null?void 0:u.children)!=null&&h.length&&e.fitContent?o.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(m=(p=e.builderBlock)==null?void 0:p.children)!=null&&m.length&&!e.fitContent?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 Hn=()=>[{component:Tn,...Cn},{component:Rn,...In},{component:jn,...Pn},{component:Nn,...Bn},{component:Fn,...$n},{component:Dn,...Wn},{component:Ln,...On},{component:Un,..._n},{component:Ge,...Mn}],xe=()=>[{component:Te,...cn},{component:Oe,...un},{component:Le,...dn},{component:_e,...fn},{component:Ue,...bn},{component:pn,...yn},{component:Ze,...xn},{component:Ke,...kn},...qe.includes(f.TARGET)?[{component:hn,...gn}]:[],{component:Sn,...vn},{component:ln,...sn},...Hn()],qn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
222
222
|
function getAndSetVariantId() {
|
|
223
223
|
function setCookie(name, value, days) {
|
|
224
224
|
let expires = '';
|
|
@@ -350,8 +350,8 @@ font-weight: ${l};
|
|
|
350
350
|
text-align: inherit;
|
|
351
351
|
font-family: inherit;
|
|
352
352
|
}
|
|
353
|
-
`,si=e=>e?"":oi,li=e=>`variant-${e}`;function ci(e){var C,T,A;const t=g.useRef(null);g.useState(()=>!1);function n(I){var
|
|
353
|
+
`,si=e=>e?"":oi,li=e=>`variant-${e}`;function ci(e){var C,T,A;const t=g.useRef(null);g.useState(()=>!1);function n(I){var b,k;const E={...e.builderContextSignal.rootState,...I};e.builderContextSignal.rootSetState?(k=(b=e.builderContextSignal).rootSetState)==null||k.call(b,E):e.setBuilderContextSignal(R=>({...R,rootState:E}))}function i(I){var b,k,R,j,W;const E={...e.builderContextSignal.content,...I,data:{...(b=e.builderContextSignal.content)==null?void 0:b.data,...I==null?void 0:I.data},meta:{...(k=e.builderContextSignal.content)==null?void 0:k.meta,...I==null?void 0:I.meta,breakpoints:((R=I==null?void 0:I.meta)==null?void 0:R.breakpoints)||((W=(j=e.builderContextSignal.content)==null?void 0:j.meta)==null?void 0:W.breakpoints)}};e.setBuilderContextSignal(D=>({...D,content:E}))}function r(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[a,s]=g.useState(()=>e.contentWrapper||"div");function l(I){return f.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:E=>{var R;const{breakpoints:b,contentId:k}=E;!k||k!==((R=e.builderContextSignal.content)==null?void 0:R.id)||b&&i({meta:{breakpoints:b}})},animation:E=>{je(E)},contentUpdate:E=>{i(E)},stateUpdate:E=>{n(E)}}})(I)}const[c,u]=g.useState(()=>({})),[h,p]=g.useState(()=>({})),[m,S]=g.useState(()=>!1);function d(I){var E,b;if(e.builderContextSignal.content){const k=(E=e.builderContextSignal.content)==null?void 0:E.testVariationId,R=(b=e.builderContextSignal.content)==null?void 0:b.id;f._track({apiHost:e.apiHost,type:"click",canTrack:f.getDefaultCanTrack(e.canTrack),contentId:R,apiKey:e.apiKey,variationId:k!==R?k:void 0,...ti(I),unique:!m})}m||S(!0)}function y(){var E,b,k;const I=(k=(b=(E=e.builderContextSignal.content)==null?void 0:E.data)==null?void 0:b.httpRequests)!=null?k:{};Object.entries(I).forEach(([R,j])=>{if(!j)return;const W=typeof j=="object"&&j["@type"]==="@builder.io/core:Request";if(h[R]||c[R]&&!f.isEditing())return;const D=W?j.request.url:j;h[R]=!0;const P=D.replace(/{{([^}]+)}}/g,(w,V)=>String(U({code:V,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))),N=W?{url:P,method:j.request.method,headers:j.request.headers,body:j.request.body}:{url:P,method:"GET"};f.logFetch(JSON.stringify(N)),fetch(N.url,{method:N.method,headers:N.headers,body:N.body}).then(w=>w.json()).then(w=>{n({[R]:w}),c[R]=!0}).catch(w=>{console.error("error fetching dynamic data",JSON.stringify(j),w)}).finally(()=>{h[R]=!1})})}function v(){f.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:ce(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const x=g.useRef(!1);return x.current||(y(),v(),x.current=!0),g.useEffect(()=>{var I,E,b,k,R;if(f.isBrowser()){f.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),f.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(I=e.model)!=null?I:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(P=>{var N,w;if(!((N=P.models)!=null&&N.length)||P.models.includes(e.model)){const V=f.createRegisterComponentMessage(P);(w=window.parent)==null||w.postMessage(V,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",v));const j=e.builderContextSignal.content&&f.getDefaultCanTrack(e.canTrack),W=f.getCookieSync({name:`builder.tests.${(E=e.builderContextSignal.content)==null?void 0:E.id}`,canTrack:!0}),D=(b=e.builderContextSignal.content)==null?void 0:b.testVariationId;if(j&&D===W){const P=(k=e.builderContextSignal.content)==null?void 0:k.id,N=e.apiKey;f._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:P,apiKey:N,variationId:W!==P?W:void 0})}if(f.isPreviewing()&&!f.isEditing()){const P=new URL(location.href).searchParams,N=P.get("builder.preview"),w=P.get(`builder.overrides.${N}`),V=P.get("apiKey")||P.get("builder.space");(N==="BUILDER_STUDIO"||N===e.model&&V===e.apiKey&&(!e.content||w===e.content.id))&&f.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...N==="BUILDER_STUDIO"&&((R=e.context)!=null&&R.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(B=>{B&&i(B)})}}},[]),g.useEffect(()=>{e.content&&i(e.content)},[e.content]),g.useEffect(()=>{v()},[e.builderContextSignal.rootState]),g.useEffect(()=>{e.data&&n(e.data)},[e.data]),g.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),g.useEffect(()=>()=>{f.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",v))},[]),o.jsx(Z.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||ke()?o.jsx(a,{ref:t,onClick:I=>d(I),"builder-content-id":(C=e.builderContextSignal.content)==null?void 0:C.id,"builder-model":e.model,className:li(((T=e.content)==null?void 0:T.testVariationId)||((A=e.content)==null?void 0:A.id)),style:{display:!e.builderContextSignal.content&&ke()?"none":void 0},...r(),...e.contentWrapperProps,children:e.children}):null})}function ui(e){const[t,n]=g.useState(()=>`
|
|
354
354
|
${ai({cssCode:e.cssCode,contentId:e.contentId})}
|
|
355
355
|
${ri({customFonts:e.customFonts})}
|
|
356
356
|
${si(e.isNestedRender)}
|
|
357
|
-
`.trim());return o.jsx(z,{id:"builderio-content",styles:t,nonce:e.nonce})}const di=({content:e,data:t,locale:n})=>{var a,s,l;const i={},r=((a=e==null?void 0:e.data)==null?void 0:a.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,...r,...t,...n?{locale:n}:{}}},mi=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function Ce(e){var u,h,p,m,S,d,
|
|
357
|
+
`.trim());return o.jsx(z,{id:"builderio-content",styles:t,nonce:e.nonce})}const di=({content:e,data:t,locale:n})=>{var a,s,l;const i={},r=((a=e==null?void 0:e.data)==null?void 0:a.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,...r,...t,...n?{locale:n}:{}}},mi=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function Ce(e){var u,h,p,m,S,d,y,v,x;const[t,n]=g.useState(()=>{var C,T;return Xn({variationId:(C=e.content)==null?void 0:C.testVariationId,contentId:(T=e.content)==null?void 0:T.id})});function i(C){l(T=>({...T,rootState:C}))}const[r,a]=g.useState(()=>[...xe(),...e.customComponents||[]].reduce((C,{component:T,...A})=>({...C,[A.name]:{component:T,...f.serializeIncludingFunctions(A)}}),{})),[s,l]=g.useState(()=>({content:mi({content:e.content,data:e.data}),localState:void 0,rootState:di({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...xe(),...e.customComponents||[]].reduce((C,{component:T,...A})=>({...C,[A.name]:f.serializeIncludingFunctions(A)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model})),c=g.useRef(!1);if(!c.current){e.apiKey||f.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const C=(h=(u=s.content)==null?void 0:u.data)==null?void 0:h.jsCode;C&&U({code:C,context:e.context||{},localState:void 0,rootState:s.rootState,rootSetState:T=>{Object.assign(s.rootState,T)},isExpression:!1}),c.current=!0}return o.jsx(Ie.Provider,{value:{registeredComponents:r},children:o.jsxs(ci,{apiHost:e.apiHost,nonce:e.nonce,content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:l,children:[e.isSsrAbTest?o.jsx(O,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,o.jsx(ui,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(p=s.content)==null?void 0:p.id,cssCode:(S=(m=s.content)==null?void 0:m.data)==null?void 0:S.cssCode,customFonts:(y=(d=s.content)==null?void 0:d.data)==null?void 0:y.customFonts}),o.jsx($,{blocks:(x=(v=s.content)==null?void 0:v.data)==null?void 0:x.blocks,context:s,registeredComponents:r,linkComponent:e.linkComponent})]})})}function Xe(e){var s;const[t,n]=g.useState(()=>Kn({canTrack:f.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return Yn(Y(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function r(){return Y(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function a(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:f.handleABTestingSync({item:e.content,canTrack:f.getDefaultCanTrack(e.canTrack)})}return g.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[!e.isNestedRender&&f.TARGET!=="reactNative"?o.jsxs(o.Fragment,{children:[o.jsx(O,{id:"builderio-init-variants-fns",scriptStr:Qn(),nonce:e.nonce||""}),qe.includes(f.TARGET)?o.jsx(O,{id:"builderio-init-personalization-variants-fns",nonce:e.nonce||"",scriptStr:rn()}):null]}):null,t?o.jsxs(o.Fragment,{children:[o.jsx(z,{id:"builderio-variants",styles:r(),nonce:e.nonce||""}),o.jsx(O,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(s=Y(e.content))==null?void 0:s.map(l=>o.jsx(Ce,{apiHost:e.apiHost,isNestedRender:e.isNestedRender,nonce:e.nonce,content:l,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},l.testVariationId))]}):null,o.jsx(Ce,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:a(),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 fi=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return f.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{f.logger.error("Could not fetch symbol content: ",n)})};function Ze(e){var u,h,p,m,S;function t(){return"div"}function n(){return"div"}function i(){var d,y;return[e.attributes[L()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(y=e.symbol)!=null&&y.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[r,a]=g.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content}),[s,l]=g.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.entry});function c(){var d;r&&s===((d=e.symbol)==null?void 0:d.entry)||fi({symbol:e.symbol,builderContextValue:e.builderContext}).then(y=>{var v;y&&(a(y),l((v=e.symbol)==null?void 0:v.entry))})}return g.useEffect(()=>{},[]),g.useEffect(()=>{c()},[e.symbol]),o.jsx("div",{...e.attributes,className:i(),children:o.jsx(Xe,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(u=e.builderBlock)==null?void 0:u.id},customComponents:Object.values(e.builderComponents),data:{...(h=e.symbol)==null?void 0:h.data,...e.builderContext.localState,...(p=r==null?void 0:r.data)==null?void 0:p.state},canTrack:e.builderContext.canTrack,model:(S=(m=e.symbol)==null?void 0:m.model)!=null?S:"",content:r,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.setClientUserAttributes=f.setClientUserAttributes;exports.Blocks=$;exports.BuilderContext=Z;exports.Button=Te;exports.Columns=Oe;exports.Content=Xe;exports.Fragment=Le;exports.Image=_e;exports.Section=Ue;exports.Symbol=Ze;exports.Text=Ke;exports.Video=Ge;
|