@builder.io/sdk-react 3.0.3 → 3.0.6
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 +169 -32
- package/lib/browser/blocks-exports.mjs +1286 -884
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +17 -16
- package/lib/browser/server-entry-a1c64831.cjs +2 -0
- package/lib/browser/{server-entry-c904f136.js → server-entry-df5e89e5.js} +279 -237
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-c786f197.js → accordion-289f3464.js} +1 -1
- package/lib/edge/{accordion-032726a7.cjs → accordion-fbfb71f4.cjs} +1 -1
- package/lib/edge/{blocks-827b0a87.cjs → blocks-459a090b.cjs} +11 -11
- package/lib/edge/{blocks-105e50e5.js → blocks-582a7fd7.js} +87 -88
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +13 -12
- package/lib/edge/{button-f0e0ea72.js → button-9b112da6.js} +2 -2
- package/lib/edge/{button-5cbfe22c.cjs → button-da357144.cjs} +1 -1
- package/lib/edge/{columns-d07da61d.cjs → columns-a211113f.cjs} +2 -2
- package/lib/edge/{columns-9e187314.js → columns-aba58dda.js} +18 -18
- package/lib/edge/{content-variants-59dc0824.js → content-variants-08f4371c.js} +165 -124
- package/lib/edge/content-variants-4b5899b5.cjs +134 -0
- package/lib/edge/dynamic-blocks-exports.cjs +3 -1
- package/lib/edge/dynamic-blocks-exports.mjs +5 -2
- package/lib/edge/form-4d4553c2.js +166 -0
- package/lib/edge/form-e3a3afd4.cjs +1 -0
- package/lib/edge/{get-class-prop-name-6b143ec7.js → get-class-prop-name-38c2baca.js} +1 -1
- package/lib/edge/{get-class-prop-name-8fb0e5ad.cjs → get-class-prop-name-fbe244e3.cjs} +1 -1
- package/lib/edge/{image-2a2b26d2.js → image-38917f45.js} +22 -24
- package/lib/edge/image-590e36ae.cjs +17 -0
- package/lib/edge/{img-72bf9d21.cjs → img-8d549af8.cjs} +1 -1
- package/lib/edge/{img-2c4c6b78.js → img-c49066fa.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +18 -17
- package/lib/edge/{input-6eca8427.cjs → input-1ae3842f.cjs} +1 -1
- package/lib/edge/{input-752f3ce9.js → input-e7301f4e.js} +1 -1
- package/lib/edge/personalization-container-035be6ba.js +384 -0
- package/lib/edge/personalization-container-25cd8b5e.cjs +138 -0
- package/lib/edge/{select-a1d6e80e.js → select-4187b229.js} +1 -1
- package/lib/edge/{select-49a73a0b.cjs → select-64fdaa79.cjs} +1 -1
- package/lib/edge/server-entry-2ef4e66a.cjs +2 -0
- package/lib/edge/{server-entry-35f12729.js → server-entry-61fca4f7.js} +322 -280
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-2327e009.cjs → slot-995f63c2.cjs} +1 -1
- package/lib/edge/{slot-b9bcbd41.js → slot-d6c46a42.js} +3 -3
- package/lib/edge/{symbol-3527699b.cjs → symbol-498daa97.cjs} +1 -1
- package/lib/edge/{symbol-33e7736f.js → symbol-623dc717.js} +2 -2
- package/lib/edge/{tabs-bc422e4c.js → tabs-12ba41b1.js} +3 -3
- package/lib/edge/{tabs-2df0eaa2.cjs → tabs-d39499cd.cjs} +1 -1
- package/lib/edge/video-4ecfd08b.cjs +1 -0
- package/lib/edge/{video-58c2cc8d.js → video-a3f10439.js} +0 -1
- package/lib/node/blocks-exports.cjs +170 -33
- package/lib/node/blocks-exports.mjs +1372 -970
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +17 -16
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-d1ed35c5.js → server-entry-27d9d31e.js} +279 -237
- package/lib/node/server-entry-98ebff74.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-6675714a.js → setIvm-2dde9074.js} +1 -1
- package/lib/node/{setIvm-e4deba11.cjs → setIvm-784fe19f.cjs} +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-75b2b3a0.js → should-force-browser-runtime-in-node-80f081c8.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-03adae17.cjs → should-force-browser-runtime-in-node-cd6baa94.cjs} +1 -1
- package/package.json +2 -2
- package/types/blocks/form/form/form.d.ts +1 -0
- package/types/blocks/personalization-container/component-info.d.ts +2 -0
- package/types/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/types/blocks/personalization-container/helpers.d.ts +27 -0
- package/types/blocks/personalization-container/index.d.ts +1 -0
- package/types/blocks/personalization-container/personalization-container.d.ts +4 -0
- package/types/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/helpers/user-attributes.d.ts +17 -0
- package/types/index-helpers/blocks-exports.d.ts +1 -0
- package/types/types/components.d.ts +2 -2
- package/types/types/input.d.ts +1 -0
- package/lib/browser/server-entry-5eafc5bd.cjs +0 -2
- package/lib/edge/content-variants-0db90715.cjs +0 -134
- package/lib/edge/form-79639135.cjs +0 -1
- package/lib/edge/form-7a7b98cf.js +0 -176
- package/lib/edge/image-4db81d72.cjs +0 -17
- package/lib/edge/server-entry-6b2058e2.cjs +0 -2
- package/lib/edge/video-e20dcbbc.cjs +0 -1
- package/lib/node/server-entry-606ce65a.cjs +0 -2
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("./server-entry-5eafc5bd.cjs"),h=require("react");function De(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 Oe=De(h),Le=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ue=e=>typeof e=="string"&&Le.has(e.toLowerCase());function Q(e){return a.jsx(a.Fragment,{children:Ue(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const W=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function me(e){function t(){return{...e.attributes,[W()]:`${e.link?"":"builder-button"} ${e.attributes[W()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(Q,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const U=h.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),fe=h.createContext({registeredComponents:{}}),ge=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i},_e=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),He=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),Me=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function he({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"&&r!==null?he({rootState:r,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}const te=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=_e({builder:t,context:n,event:i,state:he({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};function qe(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ze=({shouldLogWarning:e})=>{var o;if(!qe())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(o=process.env.NODE_OPTIONS)==null?void 0:o.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},Ke=e=>(f.isBrowser()||ze({shouldLogWarning:!0}),te(e)),Je=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Ge=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Ye=e=>{var t,n,i,o,r,s;return((i=(n=(t=Je.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(r=(o=Ge.exec(e.trim()))==null?void 0:o.groups)==null?void 0:r.getPath)==null?void 0:s.slice(1))};function V({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0}){if(e.trim()==="")return;const l=Ye(e.trim());if(l)return ge({...i,...n},l);const d={code:Me(e,{isExpression:s}),builder:He(),context:t,event:r,rootSetState:o,rootState:i,localState:n};try{return Ke(d)}catch(c){f.logger.error("Failed code evaluation: "+c.message,{code:e});return}}function Qe(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Xe(e,t)}}const Xe=(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,(o,r)=>V({code:r,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function Ze(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function L(e,t,n=null,i=null,o=new WeakSet){if(e==null||typeof e!="object"){t(e,r=>{n!==null&&i!==null&&(n[i]=r)});return}o.has(e)||(o.add(e),Array.isArray(e)?e.forEach((r,s)=>{t(r,d=>{e[s]=d}),L(r,t,e,s,o)}):Object.entries(e).forEach(([r,s])=>{t(s,d=>{e[r]=d}),L(s,t,e,r,o)}))}function be(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function et(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return L(e,n=>{if(be(n)){t=!0;return}}),t}function tt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(L(e,(n,i)=>{var o;be(n)&&i((o=n[t])!=null?o:void 0)}),e)}function nt(e,t){var n,i;return(n=e.component)!=null&&n.options&&et((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=tt(e.component.options,t!=null?t:"Default")),e}const X=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((o,r,s)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function G(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>G(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]=G(e[n]));return t}const it=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),ot=e=>{if(it){const t=X(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=G(Ze(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},at=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=ot(e);for(const s in e.bindings){const l=e.bindings[s],d=V({code:l,localState:n,rootState:i,rootSetState:o,context:t});pe(r,s,d)}return r};function rt({block:e,context:t,localState:n,rootState:i,rootSetState:o}){let r=nt(e,i.locale);return r=r,at({block:r,localState:n,rootState:i,rootSetState:o,context:t})}const _=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function st(e,t,n={}){let i,o,r,s=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const b=t-(c-l);return i=this,o=arguments,b<=0||b>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(d,b)),r}}function N(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}function lt(e){for(const t of e)switch(t.trigger){case"pageLoad":ve(t);break;case"scrollInView":dt(t);break}}function xe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ye(e,t){const n=ct(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[o,r];for(const l of s)for(const d of n)d in l||(l[d]=i[d])}function ct(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 ve(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ye(e,n),n.style.transition="none",n.style.transitionDelay="0",N(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),N(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function dt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ye(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{N(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!l(n)&&(i=!1,N(n.style,e.steps[0].styles))}const s=st(r,200,{leading:!1});function l(b){const p=b.getBoundingClientRect(),m=window.innerHeight,g=(e.thresholdPercent||0)/100*m;return p.bottom>g&&p.top<m-g}const d=e.steps[0].styles;function c(){N(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${_(n)}: ${i};`}).filter(f.checkIsDefined),ut=e=>Se(e).join(`
|
|
2
|
-
`)
|
|
3
|
-
${
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./server-entry-a1c64831.cjs"),s=require("react/jsx-runtime"),b=require("react");function $e(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 Oe=$e(b),Le=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ue=e=>typeof e=="string"&&Le.has(e.toLowerCase());function Y(e){return s.jsx(s.Fragment,{children:Ue(e.TagName)?s.jsx(s.Fragment,{children:s.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):s.jsx(s.Fragment,{children:typeof e.TagName=="string"?s.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):s.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const F=()=>{switch(h.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function me(e){function t(){return{...e.attributes,[F()]:`${e.link?"":"builder-button"} ${e.attributes[F()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return s.jsx(Y,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const _=b.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),fe=b.createContext({registeredComponents:{}}),ge=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,o)=>a!=null?a[o]:a,e);return i===void 0||i===e?n:i},_e=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),qe=()=>({isEditing:h.isEditing(),isBrowser:h.isBrowser(),isServer:!h.isBrowser(),getUserAttributes:()=>h.getUserAttributes()}),Me=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function he({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const o=i[a];return typeof o=="object"&&o!==null?he({rootState:o,localState:void 0,rootSetState:n?r=>{i[a]=r,n(i)}:void 0}):o},set:(i,a,o)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=o,n==null||n(i),!0}})}const te=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:o,rootState:r})=>{const l=_e({builder:t,context:n,event:i,state:he({rootState:r,localState:a,rootSetState:o})});return new Function(...l.map(([u])=>u),e)(...l.map(([,u])=>u))};function He(){var e;return typeof process!="undefined"&&h.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ze=({shouldLogWarning:e})=>{var a;if(!He())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(a=process.env.NODE_OPTIONS)==null?void 0:a.includes("--no-node-snapshot");return t&&n&&!i?(e&&h.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},Ke=e=>(h.isBrowser()||ze({shouldLogWarning:!0}),te(e)),Je=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Ge=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Qe=e=>{var t,n,i,a,o,r;return((i=(n=(t=Je.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((r=(o=(a=Ge.exec(e.trim()))==null?void 0:a.groups)==null?void 0:o.getPath)==null?void 0:r.slice(1))};function A({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:o,isExpression:r=!0}){if(e.trim()==="")return;const l=Qe(e.trim());if(l)return ge({...i,...n},l);const u={code:Me(e,{isExpression:r}),builder:qe(),context:t,event:o,rootSetState:a,rootState:i,localState:n};try{return Ke(u)}catch(c){h.logger.error("Failed code evaluation: "+c.message,{code:e});return}}function Ye(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Xe(e,t)}}const Xe=(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,(a,o)=>A({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function Ze(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function L(e,t,n=null,i=null,a=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}a.has(e)||(a.add(e),Array.isArray(e)?e.forEach((o,r)=>{t(o,u=>{e[r]=u}),L(o,t,e,r,a)}):Object.entries(e).forEach(([o,r])=>{t(r,u=>{e[o]=u}),L(r,t,e,o,a)}))}function be(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function et(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return L(e,n=>{if(be(n)){t=!0;return}}),t}function tt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(L(e,(n,i)=>{var a;be(n)&&i((a=n[t])!=null?a:void 0)}),e)}function nt(e,t){var n,i;return(n=e.component)!=null&&n.options&&et((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=tt(e.component.options,t!=null?t:"Default")),e}const X=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((a,o,r)=>Object(a[o])===a[o]?a[o]:a[o]=Math.abs(Number(i[r+1]))>>0===+i[r+1]?[]:{},e)[i[i.length-1]]=n,e};function Q(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Q(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]=Q(e[n]));return t}const it=["svelte","vue","angular","qwik","solid"].includes(h.TARGET),at=e=>{if(it){const t=X(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=Q(Ze(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},ot=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const o=at(e);for(const r in e.bindings){const l=e.bindings[r],u=A({code:l,localState:n,rootState:i,rootSetState:a,context:t});pe(o,r,u)}return o};function rt({block:e,context:t,localState:n,rootState:i,rootSetState:a}){let o=nt(e,i.locale);return o=o,ot({block:o,localState:n,rootState:i,rootSetState:a,context:t})}const q=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function st(e,t,n={}){let i,a,o,r=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),r=null,o=e.apply(i,a),r||(i=a=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const g=t-(c-l);return i=this,a=arguments,g<=0||g>t?(r&&(clearTimeout(r),r=null),l=c,o=e.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(u,g)),o}}function N(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n}function lt(e){for(const t of e)switch(t.trigger){case"pageLoad":ve(t);break;case"scrollInView":ut(t);break}}function ye(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function xe(e,t){const n=ct(e),i=getComputedStyle(t),a=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,r=[a,o];for(const l of r)for(const u of n)u in l||(l[u]=i[u])}function ct(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 ve(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{xe(e,n),n.style.transition="none",n.style.transitionDelay="0",N(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),N(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function ut(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{xe(e,n);let i=!1,a=!1;function o(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{N(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",r),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!l(n)&&(i=!1,N(n.style,e.steps[0].styles))}const r=st(o,200,{leading:!1});function l(g){const p=g.getBoundingClientRect(),f=window.innerHeight,d=(e.thresholdPercent||0)/100*f;return p.bottom>d&&p.top<f-d}const u=e.steps[0].styles;function c(){N(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),o()})}const Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${q(n)}: ${i};`}).filter(h.checkIsDefined),dt=e=>Se(e).join(`
|
|
2
|
+
`),$=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
|
+
${dt(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
|
-
}`:i};function mt({style:e}){return e}const ft=({block:e,context:t})=>ke(mt({style:e.style||{},context:t,block:e}));function ke(e){switch(
|
|
6
|
+
}`:i};function mt({style:e}){return e}const ft=({block:e,context:t})=>ke(mt({style:e.style||{},context:t,block:e}));function ke(e){switch(h.TARGET){case"svelte":case"vue":case"solid":case"angular":return Se(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Ce=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,gt=({block:e,registeredComponents:t,model:n})=>{var o;const i=(o=e.component)==null?void 0:o.name;if(!i)return null;const a=t[i];if(!a||Ce(a,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
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},ht=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=A({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const o=n.collection.split(".").pop(),r=n.itemName||(o?o+"Item":"item");return a.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[r]:u,[`$${r}Index`]:c}},block:i}))},bt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},pt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,r])=>!Ce(r,n)))}:{}},yt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},xt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Te={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=Te)=>`@media (max-width: ${t[e].max}px)`,we=({small:e,medium:t})=>{const n=X(Te);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const a=n.small.max+1;n.medium={max:t,min:a,default:a+1};const o=n.medium.max+1;return n.large={max:2e3,min:o,default:o+1},n};function W(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function vt(e){function t(){const i=e.block;return h.checkIsDefined(i.hide)?!i.hide:h.checkIsDefined(i.show)?i.show:!0}function n(){var S,v,k;const i=e.block,a=i.responsiveStyles,o=e.context.content,r=we(((S=o==null?void 0:o.meta)==null?void 0:S.breakpoints)||{}),l=a==null?void 0:a.large,u=a==null?void 0:a.medium,c=a==null?void 0:a.small,g=i.id;if(!g)return"";const p=l?$({className:g,styles:l}):"",f=u?$({className:g,styles:u,mediaQuery:ne("medium",r)}):"",T=c?$({className:g,styles:c,mediaQuery:ne("small",r)}):"",d=i.animations&&i.animations.find(I=>I.trigger==="hover");let y="";if(d){const I=((k=(v=d.steps)==null?void 0:v[1])==null?void 0:k.styles)||{};y=$({className:`${g}:hover`,styles:{...I,transition:`all ${d.duration}s ${q(d.easing)}`,transitionDelay:d.delay?`${d.delay}s`:"0s"}})||""}return[p,f,T,y].join(" ")}return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx(W,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function St(e){return e.charAt(0).toUpperCase()+e.slice(1)}const kt=e=>`on${St(e)}`,Ct=(e,t)=>n=>A({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Ie(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const o=n[a];let r=kt(a);if(e.stripPrefix)switch(h.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=Ct(o,e)}return t}function Tt({properties:e}){return e}const wt=e=>({href:e.href});function Z({block:e,context:t}){var i;const n={...wt(e),...e.properties,"builder-id":e.id,style:ft({block:e,context:t}),[F()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Tt({properties:n,context:t,block:e})}function It(e){return s.jsx(Y,{TagName:e.Wrapper,attributes:Z({block:e.block,context:e.context}),actionAttributes:Ie({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function Et(e){return b.useEffect(()=>{},[]),s.jsx(s.Fragment,{children:e.children})}function Rt(e){function t(){return e.includeBlockProps?{...Z({block:e.block,context:e.context}),...Ie({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return s.jsx(s.Fragment,{children:e.Wrapper.load?s.jsx(s.Fragment,{children:s.jsx(Et,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):s.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const Pt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:o,contextValue:r})=>{const l={...e,...a?{attributes:Z({block:t,context:r})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function ie(e){var i;const[t,n]=b.useState(()=>e.isInteractive?Rt:e.componentRef);return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsx(t,{...Pt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(a=>s.jsx(M,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function ae(e){const[t,n]=b.useState(()=>e.repeatContext);return s.jsx(_.Provider,{value:t,children:s.jsx(M,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function M(e){var g,p,f,T;function t(){return ht({block:e.block,context:e.context})}const[n,i]=b.useState(()=>({value:null,update:!1}));function a(){var y;if(n.value&&!n.update&&!h.isPreviewing())return n.value;const d=(y=e.block.repeat)!=null&&y.collection?e.block:rt({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 o(){return gt({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function r(){var y;return e.block.tagName==="a"||((y=a().properties)==null?void 0:y.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var S,v;if((S=e.block.repeat)!=null&&S.collection)return!!((v=t==null?void 0:t())!=null&&v.length);const d="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!d}function u(){var y,S;return!((y=o==null?void 0:o())!=null&&y.component)&&!t()?(S=a().children)!=null?S:[]:[]}function c(){var d,y,S,v;return{blockChildren:(d=a().children)!=null?d:[],componentRef:(y=o==null?void 0:o())==null?void 0:y.component,componentOptions:{...Ye(a(),e.context),...yt(o(),a()),...xt(o(),e.context),...bt(o(),e.linkComponent),...pt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((S=o==null?void 0:o())==null?void 0:S.noWrap)===!0,isInteractive:!((v=o==null?void 0:o())!=null&&v.isRSC&&h.TARGET==="rsc")}}return b.useEffect(()=>{const d=a().id,y=a().animations;y&&d&<(y.map(S=>({...S,elementId:d})))},[]),b.useEffect(()=>{n.update=!0}),s.jsx(s.Fragment,{children:l()?s.jsxs(s.Fragment,{children:[s.jsx(vt,{block:a(),context:e.context}),(g=o==null?void 0:o())!=null&&g.noWrap?t()?s.jsx(s.Fragment,{children:(T=t())==null?void 0:T.map((d,y)=>s.jsx(ae,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):s.jsx(ie,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}):s.jsx(s.Fragment,{children:t()?s.jsx(s.Fragment,{children:(f=t())==null?void 0:f.map((d,y)=>s.jsx(ae,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):s.jsxs(It,{Wrapper:r(),block:a(),context:e.context,children:[s.jsx(ie,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(p=u())==null?void 0:p.map(d=>s.jsx(M,{block:d,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},d.id))]})})]}):null})}function jt(e){const t=b.useRef(null);function n(){var r;return["builder-blocks",(r=e.blocks)!=null&&r.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const r="this.",l="component.options.";return e.path.startsWith(r)?e.path.replace(r,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function a(){var r,l;h.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var r,l;h.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return b.useEffect(()=>{},[]),s.jsxs(s.Fragment,{children:[s.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-2936bbfc","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:r=>a(),onMouseEnter:r=>o(),onKeyPress:r=>a(),...e.BlocksWrapperProps,children:e.children}),s.jsx("style",{children:`.props-blocks-wrapper-2936bbfc {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`})]})}function
|
|
13
|
-
@media (max-width: ${
|
|
12
|
+
}`})]})}function B(e){var i,a,o;const t=b.useContext(_),n=b.useContext(fe);return s.jsx(jt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,classNameProp:e.className,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||(t==null?void 0:t.BlocksWrapper),BlocksWrapperProps:((a=e.context)==null?void 0:a.BlocksWrapperProps)||(t==null?void 0:t.BlocksWrapperProps),children:e.blocks?s.jsx(s.Fragment,{children:(o=e.blocks)==null?void 0:o.map(r=>s.jsx(M,{block:r,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},r.id))}):null})}const Vt=e=>`builder-columns ${e}-breakpoints`;function Ee(e){var y,S;function t(){return typeof e.space=="number"?e.space||0:20}function n(){return e.columns||[]}function i(){return e.stackColumnsAt||"tablet"}function a(v){return v.link?e.builderLinkComponent||"a":"div"}function o(v){var k;return((k=n()[v])==null?void 0:k.width)||100/n().length}function r(v){const k=o(v),I=t()*(n().length-1)*(k/100);return`calc(${k}% - ${I}px)`}function l({stackedStyle:v,desktopStyle:k}){return i()==="tablet"?v:k}function u({stackedStyle:v,desktopStyle:k}){return i()==="never"?k:v}function c(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"}function g(){return{"--flex-dir":c(),"--flex-dir-tablet":l({stackedStyle:c(),desktopStyle:"row"})}}function p(v){const k=v===0?0:t(),I=r(v),P=`${k}px`,R="100%",C=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:I,["marginLeft"]:P,"--column-width-mobile":u({stackedStyle:R,desktopStyle:I}),"--column-margin-left-mobile":u({stackedStyle:C,desktopStyle:P}),"--column-width-tablet":l({stackedStyle:R,desktopStyle:I}),"--column-margin-left-tablet":l({stackedStyle:C,desktopStyle:P})}}function f(v){var I,P;return we(((P=(I=e.builderContext.content)==null?void 0:I.meta)==null?void 0:P.breakpoints)||{})[v].max}function T(){const v=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
|
+
@media (max-width: ${f("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
16
16
|
align-items: stretch;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
${
|
|
19
|
+
${v} {
|
|
20
20
|
width: var(--column-width-tablet) !important;
|
|
21
21
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
@media (max-width: ${
|
|
25
|
+
@media (max-width: ${f("small")}px) {
|
|
26
26
|
.${e.builderBlock.id}-breakpoints {
|
|
27
27
|
flex-direction: var(--flex-dir);
|
|
28
28
|
align-items: stretch;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
${
|
|
31
|
+
${v} {
|
|
32
32
|
width: var(--column-width-mobile) !important;
|
|
33
33
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
`}function
|
|
36
|
+
`}function d(v,k){return{...v.link?{href:v.link}:{},[F()]:"builder-column",style:ke(p(k))}}return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Vt((y=e.builderBlock)==null?void 0:y.id)+" div-a6f3faac",style:g(),children:[s.jsx(W,{id:"builderio-columns",styles:T(),nonce:e.builderContext.nonce}),(S=e.columns)==null?void 0:S.map((v,k)=>s.jsx(Y,{TagName:a(v),actionAttributes:{},attributes:d(v,k),children:s.jsx(B,{path:`columns.${k}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:v.blocks,styleProp:{flexGrow:"1"}})},k))]}),s.jsx("style",{children:`.div-a6f3faac {
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
|
-
}`})]})}function Re(e){return
|
|
39
|
+
}`})]})}function Re(e){return s.jsx("span",{children:e.children})}function oe(e){return e.replace(/http(s)?:/,"")}function Bt(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+a+t+"="+encodeURIComponent(n)}function At(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return oe(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),a=n[3],o=t.match("x")?t:`${t}x`;return oe(`${i[0]}_${o}${a}`)}return null}function H(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(a=>a!==i).map(a=>`${Bt(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[At(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Pe(e){var a,o,r,l,u,c;function t(){var f;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&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),H(p)}else if(e.image&&!e.srcset)return H(p);return H(p)}}function n(){var g;return(g=t==null?void 0:t())!=null&&g.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const g={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?g:void 0}return s.jsxs(s.Fragment,{children:[s.jsxs(s.Fragment,{children:[s.jsxs("picture",{children:[n()?s.jsx("source",{type:"image/webp",srcSet:n()}):null,s.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-9dac2184",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((o=(a=e.builderBlock)==null?void 0:a.children)!=null&&o.length&&e.fitContent)?s.jsx("div",{className:"builder-image-sizer div-9dac2184",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(r=e.builderBlock)==null?void 0:r.children)!=null&&l.length&&e.fitContent?s.jsx(s.Fragment,{children:e.children}):null,!e.fitContent&&((c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length)?s.jsx("div",{className:"div-9dac2184-2",children:e.children}):null]}),s.jsx("style",{children:`.img-9dac2184 {
|
|
40
40
|
opacity: 1;
|
|
41
41
|
transition: opacity 0.2s ease-in-out;
|
|
42
|
-
}.div-
|
|
42
|
+
}.div-9dac2184 {
|
|
43
43
|
width: 100%;
|
|
44
44
|
pointer-events: none;
|
|
45
45
|
font-size: 0;
|
|
46
|
-
}.div-
|
|
46
|
+
}.div-9dac2184-2 {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
align-items: stretch;
|
|
@@ -52,7 +52,144 @@
|
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
|
-
}`})]})}function Pe(e){return a.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},z={"@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!"}}}]},Vt={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[q]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[z]}],defaultValue:[{title:[q],detail:[z]},{title:[q],detail:[z]}],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}},re=e=>e.toString();function Nt(e){var p;const[t,n]=h.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function r(){const v={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(v).filter(([g,k])=>k!==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 d(){let m=null;if(e.grid&&t.length&&document){const g=t[0];let S=document.querySelector(`.builder-accordion-title[data-index="${g}"]`);if(m=g,S){let x=S.getBoundingClientRect();for(;S=S&&S.nextElementSibling;)if(S){if(S.classList.contains("builder-accordion-detail"))continue;const y=S.getBoundingClientRect();if(y.left>x.left){const I=parseInt(S.getAttribute("data-index")||"",10);isNaN(I)||(x=y,m=I)}else break}}}return typeof m=="number"&&(m=m+1),m}function c(){const m={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([v,g])=>g!==void 0))}function b(m){t.includes(m)?n(i()?[]:t.filter(v=>v!==m)):n(i()?[m]:t.concat(m))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(p=e.items)==null?void 0:p.map((m,v)=>a.jsxs(Oe.Fragment,{children:[a.jsx("div",{className:s(v),style:{...r(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?re(v):re(v+1)}},"data-index":v,onClick:g=>b(v),children:a.jsx(A,{blocks:m.title,path:`items.${v}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(v)?a.jsx("div",{className:l(v),style:c(),children:a.jsx(A,{blocks:m.detail,path:`items.${v}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},v))})}const Wt={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}},$t={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,d)=>l+d.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}},Dt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ee=["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"],Ot=["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"],Lt={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:ee,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((d,c)=>{const b=document.createElement("img");let p=!1;b.onload=()=>{p=!0,d(b)},b.addEventListener("error",m=>{console.warn("Image load failed",m.error),c(m.error)}),b.src=s,setTimeout(()=>{p||c(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(s=>{const l=e.get("aspectRatio");e.get("image")===o&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"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}},Ut={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>"}}}]},_t={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 Ht(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(A,{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 Mt={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}},K={"@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"}}},J={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},qt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[K]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]}],defaultValue:[{label:[{...K,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...J,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...K,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...J,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 zt(e){var r;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function o(s){s===t&&e.collapsible?n(-1):n(s)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(r=e.tabs)==null?void 0:r.map((s,l)=>a.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>o(l),children:a.jsx(A,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?a.jsx("div",{children:a.jsx(A,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Kt={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Be(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Jt={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 Gt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,r]=h.useState(()=>[]);return h.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let d=0;d<s.length;d++){const c=s[d];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const b=document.createElement("script");b.async=!0,b.src=c.src,document.head.appendChild(b)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.innerText)()}catch(b){console.warn("`CustomCode`: Error running script:",b)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Yt={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}]},Qt=["text/javascript","application/javascript","application/ecmascript"],Xt=e=>Qt.includes(e.type);function Zt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,r]=h.useState(()=>[]),[s,l]=h.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let b=0;b<c.length;b++){const p=c[b];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(Xt(p)&&!o.includes(p.innerText))try{o.push(p.innerText),new Function(p.innerText)()}catch(m){console.warn("`Embed`: Error running script:",m)}}}return h.useEffect(()=>{t.current&&!s&&(l(!0),d())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const en={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}},tn=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],nn=()=>{const e=process.env.NODE_ENV||"production";return tn.includes(e)?e:"production"};function on(e){var p,m;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,r]=h.useState(()=>null),[s,l]=h.useState(()=>"");function d(v){var k,S;const g={...e.builderContext.rootState,...v};e.builderContext.rootSetState?(S=(k=e.builderContext).rootSetState)==null||S.call(k,g):e.builderContext.rootState=g}function c(){return f.isEditing()&&e.previewState||n}function b(v){var k;const g=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")v.preventDefault();else if(g){if(!(e.action||e.sendSubmissionsTo==="email")){v.preventDefault();return}v.preventDefault();const S=v.currentTarget||v.target,x=e.customHeaders||{};let y;const I=new FormData(S),B=Array.from(S.querySelectorAll("input,select,textarea")).filter(u=>!!u.name).map(u=>{let C;const j=u.name;if(u instanceof HTMLInputElement)if(u.type==="radio"){if(u.checked)return C=u.name,{key:j,value:C}}else if(u.type==="checkbox")C=u.checked;else if(u.type==="number"||u.type==="range"){const E=u.valueAsNumber;isNaN(E)||(C=E)}else u.type==="file"?C=u.files:C=u.value;else C=u.value;return{key:j,value:C}});let T=e.contentType;if(e.sendSubmissionsTo==="email"&&(T="multipart/form-data"),Array.from(B).forEach(({value:u})=>{(u instanceof File||Array.isArray(u)&&u[0]instanceof File||u instanceof FileList)&&(T="multipart/form-data")}),T!=="application/json")y=I;else{const u={};Array.from(B).forEach(({value:C,key:j})=>{pe(u,j,C)}),y=JSON.stringify(u)}T&&T!=="multipart/form-data"&&(g&&((k=e.action)!=null&&k.includes("zapier.com"))||(x["content-type"]=T));const w=new CustomEvent("presubmit",{detail:{body:y}});if(t.current&&(t.current.dispatchEvent(w),w.defaultPrevented))return;i("sending");const R=`${nn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,P=e.sendSubmissionsTo==="email"?R:e.action;f.logFetch(P),fetch(P,{body:y,headers:x,method:e.method||"post"}).then(async u=>{let C;const j=u.headers.get("content-type");if(j&&j.indexOf("application/json")!==-1?C=await u.json():C=await u.text(),!u.ok&&e.errorMessagePath){let E=ge(C,e.errorMessagePath);E&&(typeof E!="string"&&(E=JSON.stringify(E)),l(E),d({formErrorMessage:E}))}if(r(C),i(u.ok?"success":"error"),u.ok){const E=new CustomEvent("submit:success",{detail:{res:u,body:C}});if(t.current){if(t.current.dispatchEvent(E),E.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const F=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(F),F.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},u=>{const C=new CustomEvent("submit:error",{detail:{error:u}});t.current&&(t.current.dispatchEvent(C),C.defaultPrevented)||(r(u),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:v=>b(v),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(m=(p=e.builderBlock)==null?void 0:p.children)==null?void 0:m.map((v,g)=>a.jsx($,{block:v,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${g}`))}):null,c()==="error"?a.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3f9754fe",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3f9754fe { padding: 10px; color: red; text-align: center; }"})," "]})}const an={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 rn(e){return h.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 sn={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 ln(e){var t;return h.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)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const cn={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 dn(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const un={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 mn(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const fn={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:ee,required:!0}],noWrap:!0,static:!0};function gn(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},f.isEditing()&&e.imgSrc||"default-key")}const hn={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:Ot,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:ee,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 Ae(e){var i,o,r,s,l,d,c;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(d=e.builderBlock)==null?void 0:d.children)!=null&&c.length&&!e.fitContent?a.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children}):null]})}const bn=()=>[{component:Gt,...Jt},{component:Zt,...Yt},{component:on,...en},{component:rn,...an},{component:dn,...cn},{component:ln,...sn},{component:mn,...un},{component:gn,...fn},{component:Ae,...hn}],se=()=>[{component:me,...Wt},{component:Ee,...$t},{component:Re,...Dt},{component:je,...Lt},{component:Pe,...Ut},{component:Ht,..._t},{component:$e,...Mt},{component:Be,...Kt},{component:zt,...qt},{component:Nt,...Vt},...bn()],pn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
55
|
+
}`})]})}function je(e){return s.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const z={"@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!"}}}]},K={"@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!"}}}]},Nt={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:[z]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[K]}],defaultValue:[{title:[z],detail:[K]},{title:[z],detail:[K]}],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}},re=e=>e.toString();function Ft(e){var p;const[t,n]=b.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function a(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const T={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(T).filter(([d,y])=>y!==void 0))}function r(f){return`builder-accordion-title builder-accordion-title-${t.includes(f)?"open":"closed"}`}function l(f){return`builder-accordion-detail builder-accordion-detail-${t.includes(f)?"open":"closed"}`}function u(){let f=null;if(e.grid&&t.length&&document){const d=t[0];let S=document.querySelector(`.builder-accordion-title[data-index="${d}"]`);if(f=d,S){let v=S.getBoundingClientRect();for(;S=S&&S.nextElementSibling;)if(S){if(S.classList.contains("builder-accordion-detail"))continue;const k=S.getBoundingClientRect();if(k.left>v.left){const I=parseInt(S.getAttribute("data-index")||"",10);isNaN(I)||(v=k,f=I)}else break}}}return typeof f=="number"&&(f=f+1),f}function c(){const f={order:typeof u()=="number"?u():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(f).filter(([T,d])=>d!==void 0))}function g(f){t.includes(f)?n(i()?[]:t.filter(T=>T!==f)):n(i()?[f]:t.concat(f))}return s.jsx("div",{className:"builder-accordion",style:a(),children:(p=e.items)==null?void 0:p.map((f,T)=>s.jsxs(Oe.Fragment,{children:[s.jsx("div",{className:r(T),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:u()!==null?re(T):re(T+1)}},"data-index":T,onClick:d=>g(T),children:s.jsx(B,{blocks:f.title,path:`items.${T}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(T)?s.jsx("div",{className:l(T),style:c(),children:s.jsx(B,{blocks:f.detail,path:`items.${T}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},T))})}const Wt={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}},Dt={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(a=>a.get("width"))&&(n.find(o=>!o.get("width"))||n.reduce((l,u)=>l+u.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}},$t={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ee=["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"],Ot=["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"],Lt={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:ee,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(r,l=6e4){return new Promise((u,c)=>{const g=document.createElement("img");let p=!1;g.onload=()=>{p=!0,u(g)},g.addEventListener("error",f=>{console.warn("Image load failed",f.error),c(f.error)}),g.src=r,setTimeout(()=>{p||c(new Error("Image load timed out"))},l)})}function i(r){return Math.round(r*1e3)/1e3}const a=e.get("image"),o=e.get("aspectRatio");if(fetch(a).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!o||o===.7041))return n(a).then(r=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&r.width&&r.height&&(e.set("aspectRatio",i(r.height/r.width)),e.set("height",r.height),e.set("width",r.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},Ut={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!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 U(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function _t(e,t,n,i){function a(c){return typeof c=="string"}function o(c){return typeof c=="number"}function r(c,g){return(()=>{const f=g.property,T=g.operator;let d=g.value;if(g&&g.property==="urlPath"&&g.value&&typeof g.value=="string"&&g.value!=="/"&&g.value.endsWith("/")&&(d=g.value.slice(0,-1)),!(f&&T))return!0;if(Array.isArray(d))return T==="isNot"?d.every(S=>r(c,{property:f,operator:T,value:S})):!!d.find(S=>r(c,{property:f,operator:T,value:S}));const y=c[f];if(Array.isArray(y))return y.includes(d);switch(T){case"is":return y===d;case"isNot":return y!==d;case"contains":return(a(y)||Array.isArray(y))&&y.includes(String(d));case"startsWith":return a(y)&&y.startsWith(String(d));case"endsWith":return a(y)&&y.endsWith(String(d));case"greaterThan":return o(y)&&o(d)&&y>d;case"lessThan":return o(y)&&o(d)&&y<d;case"greaterThanOrEqualTo":return o(y)&&o(d)&&y>=d;case"lessThanOrEqualTo":return o(y)&&o(d)&&y<=d;default:return!1}})()}const l={query:t,startDate:n,endDate:i},u=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>u||l.endDate&&new Date(l.endDate)<u?!1:!l.query||!l.query.length?!0:l.query.every(c=>r(e,c))}const qt=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
56
|
+
if (!navigator.cookieEnabled) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
function getCookie(name) {
|
|
60
|
+
const nameEQ = name + '=';
|
|
61
|
+
const ca = document.cookie.split(';');
|
|
62
|
+
for (let i = 0; i < ca.length; i++) {
|
|
63
|
+
let c = ca[i];
|
|
64
|
+
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
|
|
65
|
+
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
function removeVariants() {
|
|
70
|
+
variants?.forEach(function (_, index) {
|
|
71
|
+
document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
|
|
72
|
+
});
|
|
73
|
+
document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
|
|
74
|
+
document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
|
|
75
|
+
}
|
|
76
|
+
const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
|
|
77
|
+
if (locale) {
|
|
78
|
+
attributes.locale = locale;
|
|
79
|
+
}
|
|
80
|
+
const winningVariantIndex = variants?.findIndex(function (variant) {
|
|
81
|
+
return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
|
|
82
|
+
});
|
|
83
|
+
const isDebug = location.href.includes('builder.debug=true');
|
|
84
|
+
if (isDebug) {
|
|
85
|
+
console.debug('PersonalizationContainer', {
|
|
86
|
+
attributes,
|
|
87
|
+
variants,
|
|
88
|
+
winningVariantIndex
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (winningVariantIndex !== -1) {
|
|
92
|
+
const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
|
|
93
|
+
if (winningVariant) {
|
|
94
|
+
const parentNode = winningVariant.parentNode;
|
|
95
|
+
if (parentNode) {
|
|
96
|
+
const newParent = parentNode.cloneNode(false);
|
|
97
|
+
newParent.appendChild(winningVariant.content.firstChild);
|
|
98
|
+
newParent.appendChild(winningVariant.content.lastChild);
|
|
99
|
+
parentNode.parentNode?.replaceChild(newParent, parentNode);
|
|
100
|
+
}
|
|
101
|
+
if (isDebug) {
|
|
102
|
+
console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else if (variants && variants.length > 0) {
|
|
106
|
+
removeVariants();
|
|
107
|
+
}
|
|
108
|
+
}`,Mt=`function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
109
|
+
function isString(val) {
|
|
110
|
+
return typeof val === 'string';
|
|
111
|
+
}
|
|
112
|
+
function isNumber(val) {
|
|
113
|
+
return typeof val === 'number';
|
|
114
|
+
}
|
|
115
|
+
function objectMatchesQuery(userattr, query) {
|
|
116
|
+
const result = (() => {
|
|
117
|
+
const property = query.property;
|
|
118
|
+
const operator = query.operator;
|
|
119
|
+
let testValue = query.value;
|
|
120
|
+
if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {
|
|
121
|
+
testValue = query.value.slice(0, -1);
|
|
122
|
+
}
|
|
123
|
+
if (!(property && operator)) {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
if (Array.isArray(testValue)) {
|
|
127
|
+
if (operator === 'isNot') {
|
|
128
|
+
return testValue.every(val => objectMatchesQuery(userattr, {
|
|
129
|
+
property,
|
|
130
|
+
operator,
|
|
131
|
+
value: val
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
return !!testValue.find(val => objectMatchesQuery(userattr, {
|
|
135
|
+
property,
|
|
136
|
+
operator,
|
|
137
|
+
value: val
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
const value = userattr[property];
|
|
141
|
+
if (Array.isArray(value)) {
|
|
142
|
+
return value.includes(testValue);
|
|
143
|
+
}
|
|
144
|
+
switch (operator) {
|
|
145
|
+
case 'is':
|
|
146
|
+
return value === testValue;
|
|
147
|
+
case 'isNot':
|
|
148
|
+
return value !== testValue;
|
|
149
|
+
case 'contains':
|
|
150
|
+
return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
|
|
151
|
+
case 'startsWith':
|
|
152
|
+
return isString(value) && value.startsWith(String(testValue));
|
|
153
|
+
case 'endsWith':
|
|
154
|
+
return isString(value) && value.endsWith(String(testValue));
|
|
155
|
+
case 'greaterThan':
|
|
156
|
+
return isNumber(value) && isNumber(testValue) && value > testValue;
|
|
157
|
+
case 'lessThan':
|
|
158
|
+
return isNumber(value) && isNumber(testValue) && value < testValue;
|
|
159
|
+
case 'greaterThanOrEqualTo':
|
|
160
|
+
return isNumber(value) && isNumber(testValue) && value >= testValue;
|
|
161
|
+
case 'lessThanOrEqualTo':
|
|
162
|
+
return isNumber(value) && isNumber(testValue) && value <= testValue;
|
|
163
|
+
default:
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
})();
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
169
|
+
const item = {
|
|
170
|
+
query,
|
|
171
|
+
startDate,
|
|
172
|
+
endDate
|
|
173
|
+
};
|
|
174
|
+
const now = userAttributes.date && new Date(userAttributes.date) || new Date();
|
|
175
|
+
if (item.startDate && new Date(item.startDate) > now) {
|
|
176
|
+
return false;
|
|
177
|
+
} else if (item.endDate && new Date(item.endDate) < now) {
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
if (!item.query || !item.query.length) {
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
return item.query.every(filter => {
|
|
184
|
+
return objectMatchesQuery(userAttributes, filter);
|
|
185
|
+
});
|
|
186
|
+
}`;function Ht(e,t){return!(!(e&&e.length>0)||!t||h.isBrowser())}function zt({variants:e,previewingIndex:t,isHydrated:n,filteredVariants:i,fallbackBlocks:a}){var r;const o={blocks:a!=null?a:[],path:"this.children"};if(n&&h.isEditing())return typeof t=="number"&&t<((r=e==null?void 0:e.length)!=null?r:0)?{blocks:e[t].blocks,path:`component.options.variants.${t}.blocks`}:o;if(h.isBrowser()){const l=i==null?void 0:i[0];if(l)return{blocks:l.blocks,path:`component.options.variants.${e==null?void 0:e.indexOf(l)}.blocks`}}return o}const Kt=(e,t,n)=>`
|
|
187
|
+
(function() {
|
|
188
|
+
${Mt}
|
|
189
|
+
${qt}
|
|
190
|
+
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n?`, "${n}"`:""})
|
|
191
|
+
})();
|
|
192
|
+
`;function Jt(e){var y,S,v,k,I,P,R;const t=b.useRef(null),[n,i]=b.useState(()=>h.userAttributesService.getUserAttributes()),[a,o]=b.useState(()=>{var C,m,x;return Kt(e.variants,((C=e.builderBlock)==null?void 0:C.id)||"none",(x=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:x.locale)}),[r,l]=b.useState(()=>[]),[u,c]=b.useState(()=>{var C;return Ht(e.variants,h.getDefaultCanTrack((C=e.builderContext)==null?void 0:C.canTrack))}),[g,p]=b.useState(()=>!1);function f(){return(e.variants||[]).filter(C=>{var m,x,w,E;return _t({...(x=(m=e.builderContext)==null?void 0:m.rootState)!=null&&x.locale?{locale:(E=(w=e.builderContext)==null?void 0:w.rootState)==null?void 0:E.locale}:{},...n},C.query,C.startDate,C.endDate)})}function T(){var C;return zt({variants:e.variants,fallbackBlocks:(C=e.builderBlock)==null?void 0:C.children,isHydrated:g,filteredVariants:f(),previewingIndex:e.previewingIndex})}function d(){return(e.variants||[]).map((C,m)=>{var x;return`[data-variant-id="${(x=e.builderBlock)==null?void 0:x.id}-${m}"] { display: none; } `}).join("")}return b.useEffect(()=>{var m;p(!0);const C=h.userAttributesService.subscribeOnUserAttributesChange(x=>{i(x)});if(!(h.isEditing()||h.isPreviewing())){const x=f()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:x||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(E=>{E.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:x||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}r.push(C)},[]),b.useEffect(()=>()=>{r.forEach(C=>C())},[]),s.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((y=e.attributes)==null?void 0:y.className)||""}`,children:[u?s.jsxs(s.Fragment,{children:[(S=e.variants)==null?void 0:S.map((C,m)=>{var x,w;return s.jsx("template",{"data-variant-id":`${(x=e.builderBlock)==null?void 0:x.id}-${m}`,children:s.jsx(B,{blocks:C.blocks,parent:(w=e.builderBlock)==null?void 0:w.id,path:`component.options.variants.${m}.blocks`})},m)}),s.jsx(W,{nonce:((v=e.builderContext)==null?void 0:v.nonce)||"",styles:d(),id:`variants-styles-${(k=e.builderBlock)==null?void 0:k.id}`}),s.jsx(U,{nonce:((I=e.builderContext)==null?void 0:I.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,s.jsx(B,{blocks:T().blocks,parent:(R=e.builderBlock)==null?void 0:R.id,path:T().path})]})}const Gt={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>"}}}]},Qt={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 Yt(e){var t,n,i;return s.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:s.jsx(B,{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 Xt={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}},J={"@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"}}},G={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Zt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[G]}],defaultValue:[{label:[{...J,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...G,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...J,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...G,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 en(e){var o;const[t,n]=b.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function a(r){r===t&&e.collapsible?n(-1):n(r)}return s.jsxs("div",{children:[s.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(o=e.tabs)==null?void 0:o.map((r,l)=>s.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:u=>a(l),children:s.jsx(B,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?s.jsx("div",{children:s.jsx(B,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const tn={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Ve(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const nn={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 an(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,o]=b.useState(()=>[]);return b.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let u=0;u<r.length;u++){const c=r[u];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const g=document.createElement("script");g.async=!0,g.src=c.src,document.head.appendChild(g)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(a.includes(c.innerText))continue;try{a.push(c.innerText),new Function(c.innerText)()}catch(g){console.warn("`CustomCode`: Error running script:",g)}}}},[]),s.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const on={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}]},rn=["text/javascript","application/javascript","application/ecmascript"],sn=e=>rn.includes(e.type);function ln(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,o]=b.useState(()=>[]),[r,l]=b.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let g=0;g<c.length;g++){const p=c[g];if(p.src&&!n.includes(p.src)){n.push(p.src);const f=document.createElement("script");f.async=!0,f.src=p.src,document.head.appendChild(f)}else if(sn(p)&&!a.includes(p.innerText))try{a.push(p.innerText),new Function(p.innerText)()}catch(f){console.warn("`Embed`: Error running script:",f)}}}return b.useEffect(()=>{t.current&&!r&&(l(!0),u())},[t.current,r]),s.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const cn={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}},un=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],dn=()=>{const e=process.env.NODE_ENV||"production";return un.includes(e)?e:"production"};function mn(e){const t=b.useRef(null),[n,i]=b.useState(()=>"unsubmitted"),[a,o]=b.useState(()=>null),[r,l]=b.useState(()=>"");function u(p){var T,d;const f={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(d=(T=e.builderContext).rootSetState)==null||d.call(T,f):e.builderContext.rootState=f}function c(){return h.isEditing()&&e.previewState||n}function g(p){var T;const f=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(f){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const d=p.currentTarget||p.target,y=e.customHeaders||{};let S;const v=new FormData(d),k=Array.from(d.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let x;const w=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return x=m.name,{key:w,value:x}}else if(m.type==="checkbox")x=m.checked;else if(m.type==="number"||m.type==="range"){const E=m.valueAsNumber;isNaN(E)||(x=E)}else m.type==="file"?x=m.files:x=m.value;else x=m.value;return{key:w,value:x}});let I=e.contentType;if(e.sendSubmissionsTo==="email"&&(I="multipart/form-data"),Array.from(k).forEach(({value:m})=>{(m instanceof File||Array.isArray(m)&&m[0]instanceof File||m instanceof FileList)&&(I="multipart/form-data")}),I!=="application/json")S=v;else{const m={};Array.from(k).forEach(({value:x,key:w})=>{pe(m,w,x)}),S=JSON.stringify(m)}I&&I!=="multipart/form-data"&&(f&&((T=e.action)!=null&&T.includes("zapier.com"))||(y["content-type"]=I));const P=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(P),P.defaultPrevented))return;i("sending");const R=`${dn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,C=e.sendSubmissionsTo==="email"?R:e.action;h.logFetch(C),fetch(C,{body:S,headers:y,method:e.method||"post"}).then(async m=>{let x;const w=m.headers.get("content-type");if(w&&w.indexOf("application/json")!==-1?x=await m.json():x=await m.text(),!m.ok&&e.errorMessagePath){let E=ge(x,e.errorMessagePath);E&&(typeof E!="string"&&(E=JSON.stringify(E)),l(E),u({formErrorMessage:E}))}if(o(x),i(m.ok?"success":"error"),m.ok){const E=new CustomEvent("submit:success",{detail:{res:m,body:x}});if(t.current){if(t.current.dispatchEvent(E),E.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const j=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(j),j.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},m=>{const x=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(x),x.defaultPrevented)||(o(m),i("error"))})}}return s.jsxs(s.Fragment,{children:[" ",s.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>g(p),...e.attributes,children:[e.children,c()==="error"?s.jsx(B,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?s.jsx(B,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&a?s.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,c()==="success"?s.jsx(B,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",s.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const fn={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 gn(e){return b.createElement("input",{...e.attributes,key:h.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 hn={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 bn(e){var t;return b.createElement("select",{...e.attributes,value:e.value,key:h.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)=>s.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const pn={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 yn(e){return s.jsx("button",{type:"submit",...e.attributes,children:e.text})}const xn={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 vn(e){return s.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Sn={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:ee,required:!0}],noWrap:!0,static:!0};function kn(e){return s.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},h.isEditing()&&e.imgSrc||"default-key")}const Cn={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:Ot,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:ee,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 Be(e){var i,a,o,r,l,u,c;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return s.jsxs("div",{style:{position:"relative"},children:[s.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:s.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((o=(a=e.builderBlock)==null?void 0:a.children)!=null&&o.length))?s.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(l=(r=e.builderBlock)==null?void 0:r.children)!=null&&l.length&&e.fitContent?s.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length&&!e.fitContent?s.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 Tn=()=>[{component:an,...nn},{component:ln,...on},{component:mn,...cn},{component:gn,...fn},{component:yn,...pn},{component:bn,...hn},{component:vn,...xn},{component:kn,...Sn},{component:Be,...Cn}],se=()=>[{component:me,...Wt},{component:Ee,...Dt},{component:Re,...$t},{component:Pe,...Lt},{component:je,...Gt},{component:Yt,...Qt},{component:De,...Xt},{component:Ve,...tn},{component:Jt,...Ut},{component:en,...Zt},{component:Ft,...Nt},...Tn()],wn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
56
193
|
function getAndSetVariantId() {
|
|
57
194
|
function setCookie(name, value, days) {
|
|
58
195
|
let expires = '';
|
|
@@ -108,7 +245,7 @@
|
|
|
108
245
|
}).join('');
|
|
109
246
|
styleEl.innerHTML = newStyleStr;
|
|
110
247
|
}
|
|
111
|
-
}`,
|
|
248
|
+
}`,In=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
112
249
|
if (!navigator.cookieEnabled) {
|
|
113
250
|
return;
|
|
114
251
|
}
|
|
@@ -142,29 +279,29 @@
|
|
|
142
279
|
thisScriptEl?.remove();
|
|
143
280
|
}
|
|
144
281
|
return;
|
|
145
|
-
}`,
|
|
146
|
-
window.${
|
|
147
|
-
window.${
|
|
148
|
-
`,
|
|
149
|
-
window.${
|
|
150
|
-
"${t}",${JSON.stringify(e)}, ${
|
|
151
|
-
)`,
|
|
152
|
-
"${t}", "${e}", ${
|
|
153
|
-
)`;function
|
|
282
|
+
}`,Ae="builderIoAbTest",Ne="builderIoRenderContent",O=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),En=({canTrack:e,content:t})=>!(!(O(t).length>0)||!e||h.isBrowser()),Rn=e=>e==="react"||e==="reactNative",Fe=Rn(h.TARGET),Pn=()=>`
|
|
283
|
+
window.${Ae} = ${wn}
|
|
284
|
+
window.${Ne} = ${In}
|
|
285
|
+
`,jn=(e,t)=>`
|
|
286
|
+
window.${Ae}(
|
|
287
|
+
"${t}",${JSON.stringify(e)}, ${Fe}
|
|
288
|
+
)`,Vn=({contentId:e,variationId:t})=>`window.${Ne}(
|
|
289
|
+
"${t}", "${e}", ${Fe}
|
|
290
|
+
)`;function le(e){return Math.round(e*1e3)/1e3}const Bn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},An=e=>Bn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ce=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,o=le(i/n.width),r=le(a/n.height);return{x:o,y:r}},Nn=e=>{const t=e.target,n=t&&An(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ce({event:e,target:t}):void 0,builderTargetOffset:n?ce({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},Fn=["svelte","qwik","vue"],ue=()=>Fn.includes(h.TARGET)&&(h.isEditing()||h.isPreviewing()),Wn=e=>{var o,r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(r=e.fileUrl)!=null?r:(o=e==null?void 0:e.files)==null?void 0:o.regular;let a="";if(i&&t&&n&&(a+=`
|
|
154
291
|
@font-face {
|
|
155
292
|
font-family: "${t}";
|
|
156
293
|
src: local("${n}"), url('${i}') format('woff2');
|
|
157
294
|
font-display: fallback;
|
|
158
295
|
font-weight: 400;
|
|
159
296
|
}
|
|
160
|
-
`.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const c=e.files[l];c&&c!==i&&(
|
|
297
|
+
`.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const c=e.files[l];c&&c!==i&&(a+=`
|
|
161
298
|
@font-face {
|
|
162
299
|
font-family: "${t}";
|
|
163
300
|
src: url('${c}') format('woff2');
|
|
164
301
|
font-display: fallback;
|
|
165
302
|
font-weight: ${l};
|
|
166
303
|
}
|
|
167
|
-
`.trim())}return
|
|
304
|
+
`.trim())}return a},Dn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Wn(n)))==null?void 0:t.join(" "))||""},$n=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",On=`
|
|
168
305
|
.builder-button {
|
|
169
306
|
all: unset;
|
|
170
307
|
}
|
|
@@ -181,8 +318,8 @@ font-weight: ${l};
|
|
|
181
318
|
text-align: inherit;
|
|
182
319
|
font-family: inherit;
|
|
183
320
|
}
|
|
184
|
-
`,
|
|
185
|
-
${
|
|
186
|
-
${
|
|
187
|
-
${
|
|
188
|
-
`.trim());return
|
|
321
|
+
`,Ln=e=>e?"":On,Un=e=>`variant-${e}`;function _n(e){var k,I,P;const t=b.useRef(null);function n(R){var m,x;const C={...e.builderContextSignal.rootState,...R};e.builderContextSignal.rootSetState?(x=(m=e.builderContextSignal).rootSetState)==null||x.call(m,C):e.setBuilderContextSignal(w=>({...w,rootState:C}))}function i(R){var m,x,w,E,j;const C={...e.builderContextSignal.content,...R,data:{...(m=e.builderContextSignal.content)==null?void 0:m.data,...R==null?void 0:R.data},meta:{...(x=e.builderContextSignal.content)==null?void 0:x.meta,...R==null?void 0:R.meta,breakpoints:((w=R==null?void 0:R.meta)==null?void 0:w.breakpoints)||((j=(E=e.builderContextSignal.content)==null?void 0:E.meta)==null?void 0:j.breakpoints)}};e.setBuilderContextSignal(V=>({...V,content:C}))}function a(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[o,r]=b.useState(()=>e.contentWrapper||"div");function l(R){return h.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:C=>{var w;const{breakpoints:m,contentId:x}=C;!x||x!==((w=e.builderContextSignal.content)==null?void 0:w.id)||m&&i({meta:{breakpoints:m}})},animation:C=>{ve(C)},contentUpdate:C=>{i(C)}}})(R)}const[u,c]=b.useState(()=>({})),[g,p]=b.useState(()=>({})),[f,T]=b.useState(()=>!1);function d(R){var C,m;if(e.builderContextSignal.content){const x=(C=e.builderContextSignal.content)==null?void 0:C.testVariationId,w=(m=e.builderContextSignal.content)==null?void 0:m.id;h._track({apiHost:e.apiHost,type:"click",canTrack:h.getDefaultCanTrack(e.canTrack),contentId:w,apiKey:e.apiKey,variationId:x!==w?x:void 0,...Nn(R),unique:!f})}f||T(!0)}function y(){var C,m,x;const R=(x=(m=(C=e.builderContextSignal.content)==null?void 0:C.data)==null?void 0:m.httpRequests)!=null?x:{};Object.entries(R).forEach(([w,E])=>{if(!E||g[w]||u[w]&&!h.isEditing())return;g[w]=!0;const j=E.replace(/{{([^}]+)}}/g,(V,D)=>String(A({code:D,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));h.logFetch(j),fetch(j).then(V=>V.json()).then(V=>{n({[w]:V}),u[w]=!0}).catch(V=>{console.error("error fetching dynamic data",E,V)}).finally(()=>{g[w]=!1})})}function S(){h.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:X(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const v=b.useRef(!1);return v.current||(y(),S(),v.current=!0),b.useEffect(()=>{var R,C,m;if(h.isBrowser()){if(h.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),h.registerInsertMenu(),h.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(w=>{var E,j;if(!e.model||!((E=w.models)!=null&&E.length)||w.models.includes(e.model)){const V=h.createRegisterComponentMessage(w);(j=window.parent)==null||j.postMessage(V,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",S)),e.builderContextSignal.content&&h.getDefaultCanTrack(e.canTrack)){const w=(R=e.builderContextSignal.content)==null?void 0:R.testVariationId,E=(C=e.builderContextSignal.content)==null?void 0:C.id,j=e.apiKey;h._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:E,apiKey:j,variationId:w!==E?w:void 0})}if(h.isPreviewing()&&!h.isEditing()){const w=new URL(location.href).searchParams,E=w.get("builder.preview"),j=w.get(`builder.overrides.${E}`),V=w.get("apiKey")||w.get("builder.space");(E==="BUILDER_STUDIO"||E===e.model&&V===e.apiKey&&(!e.content||j===e.content.id))&&h.fetchOneEntry({model:e.model||"",apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...E==="BUILDER_STUDIO"&&((m=e.context)!=null&&m.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(D=>{D&&i(D)})}}},[]),b.useEffect(()=>{e.content&&i(e.content)},[e.content]),b.useEffect(()=>{S()},[e.builderContextSignal.rootState]),b.useEffect(()=>{e.data&&n(e.data)},[e.data]),b.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),b.useEffect(()=>()=>{h.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",S))},[]),s.jsx(_.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||ue()?s.jsx(o,{ref:t,onClick:R=>d(R),"builder-content-id":(k=e.builderContextSignal.content)==null?void 0:k.id,"builder-model":e.model,className:Un(((I=e.content)==null?void 0:I.testVariationId)||((P=e.content)==null?void 0:P.id)),style:{display:!e.builderContextSignal.content&&ue()?"none":void 0},...a(),...e.contentWrapperProps,children:e.children}):null})}function qn(e){const[t,n]=b.useState(()=>`
|
|
322
|
+
${$n({cssCode:e.cssCode,contentId:e.contentId})}
|
|
323
|
+
${Dn({customFonts:e.customFonts})}
|
|
324
|
+
${Ln(e.isNestedRender)}
|
|
325
|
+
`.trim());return s.jsx(W,{id:"builderio-content",styles:t,nonce:e.nonce})}const Mn=({content:e,data:t,locale:n})=>{var o,r,l;const i={},a=((o=e==null?void 0:e.data)==null?void 0:o.state)||{};return(l=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||l.forEach(u=>{u.name&&u.defaultValue!==void 0&&(i[u.name]=u.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},Hn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function de(e){var c,g,p,f,T,d,y,S,v;const[t,n]=b.useState(()=>{var k,I;return Vn({variationId:(k=e.content)==null?void 0:k.testVariationId,contentId:(I=e.content)==null?void 0:I.id})});function i(k){l(I=>({...I,rootState:k}))}const[a,o]=b.useState(()=>[...se(),...e.customComponents||[]].reduce((k,{component:I,...P})=>({...k,[P.name]:{component:I,...h.serializeIncludingFunctions(P)}}),{})),[r,l]=b.useState(()=>({content:Hn({content:e.content,data:e.data}),localState:void 0,rootState:Mn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...se(),...e.customComponents||[]].reduce((k,{component:I,...P})=>({...k,[P.name]:h.serializeIncludingFunctions(P)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model||""})),u=b.useRef(!1);if(!u.current){e.apiKey||h.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const k=(g=(c=r.content)==null?void 0:c.data)==null?void 0:g.jsCode;k&&A({code:k,context:e.context||{},localState:void 0,rootState:r.rootState,rootSetState:I=>{Object.assign(r.rootState,I)},isExpression:!1}),u.current=!0}return s.jsx(fe.Provider,{value:{registeredComponents:a},children:s.jsxs(_n,{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:r,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:l,children:[e.isSsrAbTest?s.jsx(U,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,s.jsx(qn,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(p=r.content)==null?void 0:p.id,cssCode:(T=(f=r.content)==null?void 0:f.data)==null?void 0:T.cssCode,customFonts:(y=(d=r.content)==null?void 0:d.data)==null?void 0:y.customFonts}),s.jsx(B,{blocks:(v=(S=r.content)==null?void 0:S.data)==null?void 0:v.blocks,context:r,registeredComponents:a,linkComponent:e.linkComponent})]})})}function We(e){var r;const[t,n]=b.useState(()=>En({canTrack:h.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return jn(O(e.content).map(u=>({id:u.testVariationId,testRatio:u.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function a(){return O(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function o(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:h.handleABTestingSync({item:e.content,canTrack:h.getDefaultCanTrack(e.canTrack)})}return b.useEffect(()=>{},[]),s.jsxs(s.Fragment,{children:[!e.isNestedRender&&h.TARGET!=="reactNative"?s.jsx(U,{id:"builderio-init-variants-fns",scriptStr:Pn(),nonce:e.nonce||""}):null,t?s.jsxs(s.Fragment,{children:[s.jsx(W,{id:"builderio-variants",styles:a(),nonce:e.nonce||""}),s.jsx(U,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(r=O(e.content))==null?void 0:r.map(l=>s.jsx(de,{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,s.jsx(de,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:o(),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 zn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return h.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{h.logger.error("Could not fetch symbol content: ",n)})};function De(e){var l,u,c,g;function t(){return"div"}function n(){return"div"}function i(){var p,f;return[e.attributes[F()],"builder-symbol",(p=e.symbol)!=null&&p.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[a,o]=b.useState(()=>{var p;return(p=e.symbol)==null?void 0:p.content});function r(){a||zn({symbol:e.symbol,builderContextValue:e.builderContext}).then(p=>{p&&o(p)})}return b.useEffect(()=>{},[]),b.useEffect(()=>{r()},[e.symbol]),s.jsx("div",{...e.attributes,className:i(),children:s.jsx(We,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(l=e.builderBlock)==null?void 0:l.id},customComponents:Object.values(e.builderComponents),data:{...(u=e.symbol)==null?void 0:u.data,...e.builderContext.localState,...(c=a==null?void 0:a.data)==null?void 0:c.state},canTrack:e.builderContext.canTrack,model:(g=e.symbol)==null?void 0:g.model,content:a,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.setClientUserAttributes=h.setClientUserAttributes;exports.Blocks=B;exports.BuilderContext=_;exports.Button=me;exports.Columns=Ee;exports.Content=We;exports.Fragment=Re;exports.Image=Pe;exports.Section=je;exports.Symbol=De;exports.Text=Ve;exports.Video=Be;
|