@builder.io/sdk-react 4.2.4 → 5.0.0
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 +10 -10
- package/lib/browser/blocks-exports.mjs +51 -50
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-4452b993.cjs → server-entry-3660bb85.cjs} +1 -1
- package/lib/browser/{server-entry-1c122812.js → server-entry-e8d22363.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-3f30d417.cjs → accordion-18b13387.cjs} +1 -1
- package/lib/edge/{accordion-48a5b362.js → accordion-18da4290.js} +1 -1
- package/lib/edge/{blocks-729e6331.js → blocks-7d43b766.js} +2 -2
- package/lib/edge/{blocks-3024bb2c.cjs → blocks-b93ba7d4.cjs} +1 -1
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-36cacb47.js → button-96f338ae.js} +2 -2
- package/lib/edge/{button-8ab624e2.cjs → button-f2e5253e.cjs} +1 -1
- package/lib/edge/{columns-597b4a0e.js → columns-0a6c19e3.js} +3 -3
- package/lib/edge/{columns-0d6d8b29.cjs → columns-0d87acaf.cjs} +1 -1
- package/lib/edge/{content-variants-b2c99976.cjs → content-variants-2b34cd48.cjs} +8 -8
- package/lib/edge/{content-variants-78e04173.js → content-variants-419abc6f.js} +35 -34
- package/lib/edge/{custom-code-1d8040fe.cjs → custom-code-7aee3ce1.cjs} +1 -1
- package/lib/edge/{custom-code-0a11f81d.js → custom-code-b3be0966.js} +1 -1
- package/lib/edge/{embed-5b2461a4.js → embed-5004b3b6.js} +1 -1
- package/lib/edge/{embed-89e540df.cjs → embed-da3878ca.cjs} +1 -1
- package/lib/edge/{form-4f5ea678.js → form-753906c7.js} +3 -3
- package/lib/edge/{form-46264810.cjs → form-8478b803.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-a8c4e896.cjs → get-class-prop-name-1f6b1449.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-e31571bf.js → get-class-prop-name-814ba657.js} +1 -1
- package/lib/edge/{img-194b08ce.js → img-a40b82bf.js} +2 -2
- package/lib/edge/{img-821534bf.cjs → img-d2609925.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-cfd5294a.js → input-7f7d7733.js} +1 -1
- package/lib/edge/{input-6d65470b.cjs → input-f9b2b842.cjs} +1 -1
- package/lib/edge/{personalization-container-0d92ab21.js → personalization-container-545e5aed.js} +4 -4
- package/lib/edge/{personalization-container-74138dc4.cjs → personalization-container-e4e8cba7.cjs} +1 -1
- package/lib/edge/{select-d665e4e4.js → select-58e3d54b.js} +1 -1
- package/lib/edge/{select-cec6b7d9.cjs → select-e2b3a2d4.cjs} +1 -1
- package/lib/edge/{server-entry-d79ba493.cjs → server-entry-3c170e0c.cjs} +1 -1
- package/lib/edge/{server-entry-fec7344c.js → server-entry-a816e201.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-f2279693.js → slot-1fc6903f.js} +3 -3
- package/lib/edge/{slot-4ad8e165.cjs → slot-c14399e6.cjs} +1 -1
- package/lib/edge/{symbol-93b85799.js → symbol-cb819933.js} +2 -2
- package/lib/edge/{symbol-064c9433.cjs → symbol-fa317575.cjs} +1 -1
- package/lib/edge/{tabs-f81e3a59.cjs → tabs-c4c25edf.cjs} +1 -1
- package/lib/edge/{tabs-d87f99ab.js → tabs-cec0be60.js} +3 -3
- package/lib/node/blocks-exports.cjs +11 -11
- package/lib/node/blocks-exports.mjs +53 -52
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-fec6b9d9.cjs → server-entry-08997a6a.cjs} +1 -1
- package/lib/node/{server-entry-b75016aa.js → server-entry-90d6cdeb.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-6290921a.js → setIvm-2f0a0dab.js} +1 -1
- package/lib/node/{setIvm-9ebbab5f.cjs → setIvm-dfc0f4f5.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-4ca1840a.js → should-force-browser-runtime-in-node-228d1891.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-209c023a.cjs → should-force-browser-runtime-in-node-33b3f998.cjs} +1 -1
- package/package.json +2 -2
- package/types/constants/sdk-version.d.ts +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./server-entry-4452b993.cjs"),a=require("react/jsx-runtime"),m=require("react");function tt(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 nt=tt(m),it=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),rt=e=>typeof e=="string"&&it.has(e.toLowerCase());function le(e){return a.jsx(a.Fragment,{children:rt(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 U=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Ie(e){function t(){return{...e.attributes,[U()]:`${e.link?"":"builder-button"} ${e.attributes[U()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(le,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const K=m.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),we=m.createContext({registeredComponents:{}}),Ee=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,e);return i===void 0||i===e?n:i},at=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),ot=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),st=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function Re({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,r)=>{if(t&&r in t)return t[r];const o=i[r];return typeof o=="object"&&o!==null?Re({rootState:o,localState:void 0,rootSetState:n?s=>{i[r]=s,n(i)}:void 0}):o},set:(i,r,o)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[r]=o,n==null||n(i),!0}})}const fe=({code:e,builder:t,context:n,event:i,localState:r,rootSetState:o,rootState:s})=>{const l=at({builder:t,context:n,event:i,state:Re({rootState:s,localState:r,rootSetState:o})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function lt(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ct=({shouldLogWarning:e})=>{var r;if(!lt())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},ut=e=>(f.isBrowser()||ct({shouldLogWarning:!0}),fe(e)),dt=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,mt=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,ft=e=>{var t,n,i,r,o,s;return((i=(n=(t=dt.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(o=(r=mt.exec(e.trim()))==null?void 0:r.groups)==null?void 0:o.getPath)==null?void 0:s.slice(1))};function M({code:e,context:t,localState:n,rootState:i,rootSetState:r,event:o,isExpression:s=!0}){if(e.trim()==="")return;const l=ft(e.trim());if(l)return Ee({...i,...n},l);const c={code:st(e,{isExpression:s}),builder:ot(),context:t,event:o,rootSetState:r,rootState:i,localState:n};try{return ut(c)}catch(d){f.logger.error("Failed code evaluation: "+d.message,{code:e});return}}function gt(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...ht(e,t)}}const ht=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(r,o)=>M({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function bt(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function X(e,t,n=null,i=null,r=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}r.has(e)||(r.add(e),Array.isArray(e)?e.forEach((o,s)=>{t(o,c=>{e[s]=c}),X(o,t,e,s,r)}):Object.entries(e).forEach(([o,s])=>{t(s,c=>{e[o]=c}),X(s,t,e,o,r)}))}function Pe(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function yt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return X(e,n=>{if(Pe(n)){t=!0;return}}),t}function pt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(X(e,(n,i)=>{var r;Pe(n)&&i((r=n[t])!=null?r:void 0)}),e)}function xt(e,t){var n,i;return(n=e.component)!=null&&n.options&&yt((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=pt(e.component.options,t!=null?t:"Default")),e}const ce=e=>JSON.parse(JSON.stringify(e)),Ae=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((r,o,s)=>Object(r[o])===r[o]?r[o]:r[o]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const vt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),St=e=>{if(vt){const t=ce(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(bt(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},kt=({block:e,context:t,localState:n,rootState:i,rootSetState:r})=>{if(!e.bindings)return e;const o=St(e);for(const s in e.bindings){const l=e.bindings[s],c=M({code:l,localState:n,rootState:i,rootSetState:r,context:t});Ae(o,s,c)}return o};function Ct({block:e,context:t,localState:n,rootState:i,rootSetState:r}){let o=e;return o=kt({block:o,localState:n,rootState:i,rootSetState:r,context:t}),o=xt(o,i.locale),o}const Z=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Tt(e,t,n={}){let i,r,o,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,o=e.apply(i,r),s||(i=r=null)};return function(){const d=Date.now();!l&&n.leading===!1&&(l=d);const b=t-(d-l);return i=this,r=arguments,b<=0||b>t?(s&&(clearTimeout(s),s=null),l=d,o=e.apply(i,r),s||(i=r=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,b)),o}}function z(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const r=arguments[i];if(r!=null)for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n}function It(e){for(const t of e)switch(t.trigger){case"pageLoad":Be(t);break;case"scrollInView":Et(t);break}}function je(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ve(e,t){const n=wt(e),i=getComputedStyle(t),r=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,s=[r,o];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function wt(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function Be(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){je(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n),n.style.transition="none",n.style.transitionDelay="0",z(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Z(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),z(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Et(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){je(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n);let i=!1,r=!1;function o(){!i&&l(n)?(i=!0,r=!0,setTimeout(()=>{z(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!r&&!l(n)&&(i=!1,z(n.style,e.steps[0].styles))}const s=Tt(o,200,{leading:!1});function l(b){const p=b.getBoundingClientRect(),u=window.innerHeight,h=(e.thresholdPercent||0)/100*u;return p.bottom>h&&p.top<u-h}const c=e.steps[0].styles;function d(){z(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Z(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),o()})}const Ne=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Z(n)}: ${i};`}).filter(f.checkIsDefined),Rt=e=>Ne(e).join(`
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./server-entry-3660bb85.cjs"),a=require("react/jsx-runtime"),d=require("react");function tt(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 nt=tt(d),it=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),rt=e=>typeof e=="string"&&it.has(e.toLowerCase());function le(e){return a.jsx(a.Fragment,{children:rt(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 U=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Ie(e){function t(){return{...e.attributes,[U()]:`${e.link?"":"builder-button"} ${e.attributes[U()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(le,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const K=d.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),we=d.createContext({registeredComponents:{}}),Ee=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,e);return i===void 0||i===e?n:i},at=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),ot=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),st=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function Re({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,r)=>{if(t&&r in t)return t[r];const o=i[r];return typeof o=="object"&&o!==null?Re({rootState:o,localState:void 0,rootSetState:n?s=>{i[r]=s,n(i)}:void 0}):o},set:(i,r,o)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[r]=o,n==null||n(i),!0}})}const fe=({code:e,builder:t,context:n,event:i,localState:r,rootSetState:o,rootState:s})=>{const l=at({builder:t,context:n,event:i,state:Re({rootState:s,localState:r,rootSetState:o})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function lt(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ct=({shouldLogWarning:e})=>{var r;if(!lt())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},ut=e=>(f.isBrowser()||ct({shouldLogWarning:!0}),fe(e)),dt=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,mt=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,ft=e=>{var t,n,i,r,o,s;return((i=(n=(t=dt.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(o=(r=mt.exec(e.trim()))==null?void 0:r.groups)==null?void 0:o.getPath)==null?void 0:s.slice(1))};function M({code:e,context:t,localState:n,rootState:i,rootSetState:r,event:o,isExpression:s=!0}){if(e.trim()==="")return;const l=ft(e.trim());if(l)return Ee({...i,...n},l);const c={code:st(e,{isExpression:s}),builder:ot(),context:t,event:o,rootSetState:r,rootState:i,localState:n};try{return ut(c)}catch(m){f.logger.error("Failed code evaluation: "+m.message,{code:e});return}}function gt(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...ht(e,t)}}const ht=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(r,o)=>M({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function bt(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function X(e,t,n=null,i=null,r=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}r.has(e)||(r.add(e),Array.isArray(e)?e.forEach((o,s)=>{t(o,c=>{e[s]=c}),X(o,t,e,s,r)}):Object.entries(e).forEach(([o,s])=>{t(s,c=>{e[o]=c}),X(s,t,e,o,r)}))}function Pe(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function yt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return X(e,n=>{if(Pe(n)){t=!0;return}}),t}function pt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(X(e,(n,i)=>{var r;Pe(n)&&i((r=n[t])!=null?r:void 0)}),e)}function xt(e,t){var n,i;return(n=e.component)!=null&&n.options&&yt((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=pt(e.component.options,t!=null?t:"Default")),e}const ce=e=>JSON.parse(JSON.stringify(e)),Ae=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((r,o,s)=>Object(r[o])===r[o]?r[o]:r[o]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const vt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),St=e=>{if(vt){const t=ce(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(bt(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},kt=({block:e,context:t,localState:n,rootState:i,rootSetState:r})=>{if(!e.bindings)return e;const o=St(e);for(const s in e.bindings){const l=e.bindings[s],c=M({code:l,localState:n,rootState:i,rootSetState:r,context:t});Ae(o,s,c)}return o};function Ct({block:e,context:t,localState:n,rootState:i,rootSetState:r}){let o=e;return o=kt({block:o,localState:n,rootState:i,rootSetState:r,context:t}),o=xt(o,i.locale),o}const Z=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Tt(e,t,n={}){let i,r,o,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,o=e.apply(i,r),s||(i=r=null)};return function(){const m=Date.now();!l&&n.leading===!1&&(l=m);const b=t-(m-l);return i=this,r=arguments,b<=0||b>t?(s&&(clearTimeout(s),s=null),l=m,o=e.apply(i,r),s||(i=r=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,b)),o}}function z(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const r=arguments[i];if(r!=null)for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n}function It(e){for(const t of e)switch(t.trigger){case"pageLoad":Be(t);break;case"scrollInView":Et(t);break}}function je(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ve(e,t){const n=wt(e),i=getComputedStyle(t),r=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,s=[r,o];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function wt(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function Be(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){je(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n),n.style.transition="none",n.style.transitionDelay="0",z(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Z(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),z(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Et(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){je(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n);let i=!1,r=!1;function o(){!i&&l(n)?(i=!0,r=!0,setTimeout(()=>{z(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!r&&!l(n)&&(i=!1,z(n.style,e.steps[0].styles))}const s=Tt(o,200,{leading:!1});function l(b){const p=b.getBoundingClientRect(),u=window.innerHeight,h=(e.thresholdPercent||0)/100*u;return p.bottom>h&&p.top<u-h}const c=e.steps[0].styles;function m(){z(n.style,c)}m(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Z(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),o()})}const Ne=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Z(n)}: ${i};`}).filter(f.checkIsDefined),Rt=e=>Ne(e).join(`
|
|
2
2
|
`),q=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${Rt(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
6
|
}`:i};function Pt({style:e}){return e}const At=({block:e,context:t})=>Fe(Pt({style:e.style||{},context:t,block:e}));function Fe(e){switch(f.TARGET){case"svelte":case"vue":case"solid":case"angular":return Ne(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const De=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,jt=({block:e,registeredComponents:t,model:n})=>{var o;const i=(o=e.component)==null?void 0:o.name;if(!i)return null;const r=t[i];if(!r||De(r,n)){console.warn(`
|
|
7
7
|
Could not find a registered component named "${i}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return r},Vt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const r=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const o=n.collection.split(".").pop(),s=n.itemName||(o?o+"Item":"item");return r.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[s]:c,[`$${s}Index`]:d}},block:i}))},Bt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},Nt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,s])=>!De(s,n)))}:{}},Ft=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Dt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ge=e=>e.toString();function Wt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $t=e=>`on${Wt(e)}`,Ot=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function We(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const o=n[r];let s=$t(r);if(e.stripPrefix)switch(f.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=Ot(o,e)}return t}function Lt({properties:e}){return e}const _t=e=>({href:e.href});function ue({block:e,context:t}){var i;const n={..._t(e),...e.properties,"builder-id":e.id,style:At({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Lt({properties:n,context:t,block:e})}function Ut(e){return a.jsx(le,{TagName:e.Wrapper,attributes:ue({block:e.block,context:e.context}),actionAttributes:We({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 Ht(e){return m.useEffect(()=>{},[]),a.jsx(a.Fragment,{children:e.children})}function Mt(e){var i,r;m.useState(()=>0);function t(){return e.includeBlockProps?{...ue({block:e.block,context:e.context}),...We({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}function n(){return e.wrapperProps}return m.useEffect(()=>{},[e.wrapperProps,(r=(i=e.block)==null?void 0:i.component)==null?void 0:r.options]),a.jsx(a.Fragment,{children:e.Wrapper.load?a.jsx(a.Fragment,{children:a.jsx(Ht,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):a.jsx(e.Wrapper,{...n(),attributes:t(),children:e.children})})}const qt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:r,isInteractive:o,contextValue:s})=>{const l={...e,...r?{attributes:ue({block:t,context:s})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:r}:l};function he(e){var i;m.useState(()=>!1);const[t,n]=m.useState(()=>e.isInteractive?Mt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...qt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:e.componentRef?a.jsx(a.Fragment,{children:(i=e.blockChildren)==null?void 0:i.map(r=>a.jsx(ee,{block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r.id))}):null})}):null})}function be(e){const[t,n]=m.useState(()=>e.repeatContext);return m.useEffect(()=>{n(e.repeatContext)},[e.repeatContext]),a.jsx(K.Provider,{value:t,children:a.jsx(ee,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}const $e={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},te=(e,t=$e)=>`@media (max-width: ${t[e].max}px)`,Oe=e=>{const t=ce($e);if(!e)return t;const{xsmall:n,small:i,medium:r}=e;if(n){const c=Math.floor(n/2);t.xsmall={max:n,min:c,default:c+1}}if(!i||!r)return t;const o=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:o,default:o+1};const s=t.small.max+1;t.medium={max:r,min:s,default:s+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function G(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ye(e){function t(){const i=e.block;return f.checkIsDefined(i.hide)?!i.hide:f.checkIsDefined(i.show)?i.show:!0}function n(){var I,E,W,O,L;const i=e.block,r=i.responsiveStyles,o=e.context.content,s=Oe(((I=o==null?void 0:o.meta)==null?void 0:I.breakpoints)||{}),l=!!((W=(E=o==null?void 0:o.meta)==null?void 0:E.breakpoints)!=null&&W.xsmall),c=r==null?void 0:r.large,d=r==null?void 0:r.medium,b=r==null?void 0:r.small,p=r==null?void 0:r.xsmall,u=i.id;if(!u)return"";const k=c?q({className:u,styles:c}):"",h=d?q({className:u,styles:d,mediaQuery:te("medium",s)}):"",g=b?q({className:u,styles:b,mediaQuery:te("small",s)}):"",x=p&&l?q({className:u,styles:p,mediaQuery:te("xsmall",s)}):"",y=i.animations&&i.animations.find(v=>v.trigger==="hover");let C="";if(y){const v=((L=(O=y.steps)==null?void 0:O[1])==null?void 0:L.styles)||{};C=q({className:`${u}:hover`,styles:{...v,transition:`all ${y.duration}s ${Z(y.easing)}`,transitionDelay:y.delay?`${y.delay}s`:"0s"}})||""}return[k,h,g,x,C].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(G,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function zt(e){m.useState(()=>!1);const[t,n]=m.useState(()=>!1);return m.useContext(K),m.useEffect(()=>{},[]),a.jsx(a.Fragment,{children:t?a.jsx(a.Fragment,{children:a.jsx(a.Fragment,{children:a.jsx(ye,{block:e.block,context:e.context})})}):a.jsx(a.Fragment,{children:a.jsx(ye,{block:e.block,context:e.context})})})}function ee(e){var b,p,u,k;function t(){return Vt({block:e.block,context:e.context})}const[n,i]=m.useState(()=>({value:null,update:!1}));function r(){var g;if(n.value&&!n.update&&!f.isPreviewing())return n.value;const h=(g=e.block.repeat)!=null&&g.collection?e.block:Ct({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=h,n.update=!1,h}function o(){return jt({block:r(),registeredComponents:e.registeredComponents,model:e.context.model})}function s(){var g;return e.block.tagName==="a"||((g=r().properties)==null?void 0:g.href)||r().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var x,y;if((x=e.block.repeat)!=null&&x.collection)return!!((y=t==null?void 0:t())!=null&&y.length);const h="hide"in r()?r().hide:!1;return("show"in r()?r().show:!0)&&!h}function c(){var g,x;return!((g=o==null?void 0:o())!=null&&g.component)&&!t()?(x=r().children)!=null?x:[]:[]}function d(){var h,g,x,y;return{blockChildren:(h=r().children)!=null?h:[],componentRef:(g=o==null?void 0:o())==null?void 0:g.component,componentOptions:{...gt(r(),e.context),...Ft(o(),r()),...Dt(o(),e.context),...Bt(o(),e.linkComponent),...Nt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:r(),includeBlockProps:((x=o==null?void 0:o())==null?void 0:x.noWrap)===!0,isInteractive:!((y=o==null?void 0:o())!=null&&y.isRSC&&f.TARGET==="rsc")}}return m.useEffect(()=>{const h=r().id,g=r().animations;g&&h&&It(g.map(x=>({...x,elementId:h})))},[]),m.useEffect(()=>{n.update=!0}),a.jsx(a.Fragment,{children:l()?a.jsxs(a.Fragment,{children:[a.jsx(zt,{block:r(),context:e.context,id:e.block.id}),(b=o==null?void 0:o())!=null&&b.noWrap?t()?a.jsx(a.Fragment,{children:(k=t())==null?void 0:k.map((h,g)=>a.jsx(be,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},ge(g)))}):a.jsx(he,{componentRef:d().componentRef,componentOptions:d().componentOptions,blockChildren:d().blockChildren,context:d().context,registeredComponents:d().registeredComponents,linkComponent:d().linkComponent,builderBlock:d().builderBlock,includeBlockProps:d().includeBlockProps,isInteractive:d().isInteractive}):a.jsx(a.Fragment,{children:t()?a.jsx(a.Fragment,{children:(u=t())==null?void 0:u.map((h,g)=>a.jsx(be,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},ge(g)))}):a.jsxs(Ut,{Wrapper:s(),block:r(),context:e.context,children:[a.jsx(he,{componentRef:d().componentRef,componentOptions:d().componentOptions,blockChildren:d().blockChildren,context:d().context,registeredComponents:d().registeredComponents,linkComponent:d().linkComponent,builderBlock:d().builderBlock,includeBlockProps:d().includeBlockProps,isInteractive:d().isInteractive}),(p=c())==null?void 0:p.map(h=>a.jsx(ee,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function Kt(e){const t=m.useRef(null);m.useState(()=>!1);function n(){var s;return["builder-blocks",(s=e.blocks)!=null&&s.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const s="this.",l="component.options.";return e.path.startsWith(s)?e.path.replace(s,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function r(){var s,l;f.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var s,l;f.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return m.useEffect(()=>{},[]),m.useEffect(()=>{},[e.blocks]),a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`.props-blocks-wrapper-b46bf284 {
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return r},Vt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const r=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const o=n.collection.split(".").pop(),s=n.itemName||(o?o+"Item":"item");return r.map((c,m)=>({context:{...t,localState:{...t.localState,$index:m,$item:c,[s]:c,[`$${s}Index`]:m}},block:i}))},Bt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},Nt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,s])=>!De(s,n)))}:{}},Ft=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Dt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ge=e=>e.toString();function Wt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $t=e=>`on${Wt(e)}`,Ot=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function We(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const o=n[r];let s=$t(r);if(e.stripPrefix)switch(f.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=Ot(o,e)}return t}function Lt({properties:e}){return e}const _t=e=>({href:e.href});function ue({block:e,context:t}){var i;const n={..._t(e),...e.properties,"builder-id":e.id,style:At({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Lt({properties:n,context:t,block:e})}function Ut(e){return a.jsx(le,{TagName:e.Wrapper,attributes:ue({block:e.block,context:e.context}),actionAttributes:We({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 Ht(e){return d.useEffect(()=>{},[]),a.jsx(a.Fragment,{children:e.children})}function Mt(e){var i,r;d.useState(()=>0);function t(){return e.includeBlockProps?{...ue({block:e.block,context:e.context}),...We({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}function n(){return e.wrapperProps}return d.useEffect(()=>{},[e.wrapperProps,(r=(i=e.block)==null?void 0:i.component)==null?void 0:r.options]),a.jsx(a.Fragment,{children:e.Wrapper.load?a.jsx(a.Fragment,{children:a.jsx(Ht,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):a.jsx(e.Wrapper,{...n(),attributes:t(),children:e.children})})}const qt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:r,isInteractive:o,contextValue:s})=>{const l={...e,...r?{attributes:ue({block:t,context:s})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:r}:l};function he(e){var i;d.useState(()=>!1);const[t,n]=d.useState(()=>e.isInteractive?Mt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...qt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:e.componentRef?a.jsx(a.Fragment,{children:(i=e.blockChildren)==null?void 0:i.map(r=>a.jsx(ee,{block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r.id))}):null})}):null})}function be(e){const[t,n]=d.useState(()=>e.repeatContext);return d.useEffect(()=>{n(e.repeatContext)},[e.repeatContext]),a.jsx(K.Provider,{value:t,children:a.jsx(ee,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}const $e={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},te=(e,t=$e)=>`@media (max-width: ${t[e].max}px)`,Oe=e=>{const t=ce($e);if(!e)return t;const{xsmall:n,small:i,medium:r}=e;if(n){const c=Math.floor(n/2);t.xsmall={max:n,min:c,default:c+1}}if(!i||!r)return t;const o=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:o,default:o+1};const s=t.small.max+1;t.medium={max:r,min:s,default:s+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function G(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ye(e){function t(){const i=e.block;return f.checkIsDefined(i.hide)?!i.hide:f.checkIsDefined(i.show)?i.show:!0}function n(){var I,E,W,O,L;const i=e.block,r=i.responsiveStyles,o=e.context.content,s=Oe(((I=o==null?void 0:o.meta)==null?void 0:I.breakpoints)||{}),l=!!((W=(E=o==null?void 0:o.meta)==null?void 0:E.breakpoints)!=null&&W.xsmall),c=r==null?void 0:r.large,m=r==null?void 0:r.medium,b=r==null?void 0:r.small,p=r==null?void 0:r.xsmall,u=i.id;if(!u)return"";const k=c?q({className:u,styles:c}):"",h=m?q({className:u,styles:m,mediaQuery:te("medium",s)}):"",g=b?q({className:u,styles:b,mediaQuery:te("small",s)}):"",x=p&&l?q({className:u,styles:p,mediaQuery:te("xsmall",s)}):"",y=i.animations&&i.animations.find(v=>v.trigger==="hover");let C="";if(y){const v=((L=(O=y.steps)==null?void 0:O[1])==null?void 0:L.styles)||{};C=q({className:`${u}:hover`,styles:{...v,transition:`all ${y.duration}s ${Z(y.easing)}`,transitionDelay:y.delay?`${y.delay}s`:"0s"}})||""}return[k,h,g,x,C].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(G,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function zt(e){d.useState(()=>!1);const[t,n]=d.useState(()=>!1);return d.useContext(K),d.useEffect(()=>{},[]),a.jsx(a.Fragment,{children:t?a.jsx(a.Fragment,{children:a.jsx(a.Fragment,{children:a.jsx(ye,{block:e.block,context:e.context})})}):a.jsx(a.Fragment,{children:a.jsx(ye,{block:e.block,context:e.context})})})}function ee(e){var b,p,u,k;function t(){return Vt({block:e.block,context:e.context})}const[n,i]=d.useState(()=>({value:null,update:!1}));function r(){var g;if(n.value&&!n.update&&!f.isPreviewing())return n.value;const h=(g=e.block.repeat)!=null&&g.collection?e.block:Ct({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=h,n.update=!1,h}function o(){return jt({block:r(),registeredComponents:e.registeredComponents,model:e.context.model})}function s(){var g;return e.block.tagName==="a"||((g=r().properties)==null?void 0:g.href)||r().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var x,y;if((x=e.block.repeat)!=null&&x.collection)return!!((y=t==null?void 0:t())!=null&&y.length);const h="hide"in r()?r().hide:!1;return("show"in r()?r().show:!0)&&!h}function c(){var g,x;return!((g=o==null?void 0:o())!=null&&g.component)&&!t()?(x=r().children)!=null?x:[]:[]}function m(){var h,g,x,y;return{blockChildren:(h=r().children)!=null?h:[],componentRef:(g=o==null?void 0:o())==null?void 0:g.component,componentOptions:{...gt(r(),e.context),...Ft(o(),r()),...Dt(o(),e.context),...Bt(o(),e.linkComponent),...Nt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:r(),includeBlockProps:((x=o==null?void 0:o())==null?void 0:x.noWrap)===!0,isInteractive:!((y=o==null?void 0:o())!=null&&y.isRSC&&f.TARGET==="rsc")}}return d.useEffect(()=>{const h=r().id,g=r().animations;g&&h&&It(g.map(x=>({...x,elementId:h})))},[]),d.useEffect(()=>{n.update=!0}),a.jsx(a.Fragment,{children:l()?a.jsxs(a.Fragment,{children:[a.jsx(zt,{block:r(),context:e.context,id:e.block.id}),(b=o==null?void 0:o())!=null&&b.noWrap?t()?a.jsx(a.Fragment,{children:(k=t())==null?void 0:k.map((h,g)=>a.jsx(be,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},ge(g)))}):a.jsx(he,{componentRef:m().componentRef,componentOptions:m().componentOptions,blockChildren:m().blockChildren,context:m().context,registeredComponents:m().registeredComponents,linkComponent:m().linkComponent,builderBlock:m().builderBlock,includeBlockProps:m().includeBlockProps,isInteractive:m().isInteractive}):a.jsx(a.Fragment,{children:t()?a.jsx(a.Fragment,{children:(u=t())==null?void 0:u.map((h,g)=>a.jsx(be,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},ge(g)))}):a.jsxs(Ut,{Wrapper:s(),block:r(),context:e.context,children:[a.jsx(he,{componentRef:m().componentRef,componentOptions:m().componentOptions,blockChildren:m().blockChildren,context:m().context,registeredComponents:m().registeredComponents,linkComponent:m().linkComponent,builderBlock:m().builderBlock,includeBlockProps:m().includeBlockProps,isInteractive:m().isInteractive}),(p=c())==null?void 0:p.map(h=>a.jsx(ee,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function Kt(e){const t=d.useRef(null);d.useState(()=>!1);function n(){var s;return["builder-blocks",(s=e.blocks)!=null&&s.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const s="this.",l="component.options.";return e.path.startsWith(s)?e.path.replace(s,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function r(){var s,l;f.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var s,l;f.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return d.useEffect(()=>{},[]),d.useEffect(()=>{},[e.blocks]),a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`.props-blocks-wrapper-b46bf284 {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`}),a.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-b46bf284","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>r(),onMouseEnter:s=>o(),onKeyPress:s=>r(),...e.BlocksWrapperProps,children:e.children})]})}function $(e){var i,r,o;const t=
|
|
12
|
+
}`}),a.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-b46bf284","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>r(),onMouseEnter:s=>o(),onKeyPress:s=>r(),...e.BlocksWrapperProps,children:e.children})]})}function $(e){var i,r,o;const t=d.useContext(K),n=d.useContext(we);return a.jsxs(Kt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapperProps:e.BlocksWrapperProps||((i=e.context)==null?void 0:i.BlocksWrapperProps)||(t==null?void 0:t.BlocksWrapperProps),classNameProp:e.className,BlocksWrapper:((r=e.context)==null?void 0:r.BlocksWrapper)||(t==null?void 0:t.BlocksWrapper),children:[e.children,e.blocks?a.jsx(a.Fragment,{children:(o=e.blocks)==null?void 0:o.map(s=>a.jsx(ee,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},s.id))}):null]})}const Gt=e=>`builder-columns ${e}-breakpoints`;function Le(e){var g,x;function t(){return typeof e.space=="number"?e.space||0:20}function n(){return e.columns||[]}function i(){return e.stackColumnsAt||"tablet"}function r(y){return y.link?e.builderLinkComponent||"a":"div"}function o(y){var C;return((C=n()[y])==null?void 0:C.width)||100/n().length}function s(y){const C=o(y),I=t()*(n().length-1)*(C/100);return`calc(${C}% - ${I}px)`}function l({stackedStyle:y,desktopStyle:C}){return i()==="tablet"?y:C}function c({stackedStyle:y,desktopStyle:C}){return i()==="never"?C:y}function m(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"}function b(){return{"--flex-dir":m(),"--flex-dir-tablet":l({stackedStyle:m(),desktopStyle:"row"})}}function p(y){const C=y===0?0:t(),I=s(y),E=`${C}px`,W="100%",O=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:I,["marginLeft"]:E,"--column-width-mobile":c({stackedStyle:W,desktopStyle:I}),"--column-margin-left-mobile":c({stackedStyle:O,desktopStyle:E}),"--column-width-tablet":l({stackedStyle:W,desktopStyle:I}),"--column-margin-left-tablet":l({stackedStyle:O,desktopStyle:E})}}function u(y){var I,E;return Oe(((E=(I=e.builderContext.content)==null?void 0:I.meta)==null?void 0:E.breakpoints)||{})[y].max}function k(){const y=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
13
|
@media (max-width: ${u("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
39
|
height: 100%;
|
|
40
|
-
}`}),a.jsxs("div",{className:Gt((g=e.builderBlock)==null?void 0:g.id)+" div-0369db37",style:b(),children:[a.jsx(G,{id:"builderio-columns",styles:k(),nonce:e.builderContext.nonce}),(x=e.columns)==null?void 0:x.map((y,C)=>a.jsx(le,{TagName:r(y),actionAttributes:{},attributes:h(y,C),children:a.jsx($,{path:`columns.${C}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:y.blocks,styleProp:{flexGrow:"1"}})},C))]})]})}function _e(e){return a.jsx("span",{children:e.children})}function pe(e){return e.replace(/http(s)?:/,"")}function Jt(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function Qt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return pe(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),r=n[3],o=t.match("x")?t:`${t}x`;return pe(`${i[0]}_${o}${r}`)}return null}function ne(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(r=>r!==i).map(r=>`${Jt(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Qt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ue(e){var r,o,s,l,c,
|
|
40
|
+
}`}),a.jsxs("div",{className:Gt((g=e.builderBlock)==null?void 0:g.id)+" div-0369db37",style:b(),children:[a.jsx(G,{id:"builderio-columns",styles:k(),nonce:e.builderContext.nonce}),(x=e.columns)==null?void 0:x.map((y,C)=>a.jsx(le,{TagName:r(y),actionAttributes:{},attributes:h(y,C),children:a.jsx($,{path:`columns.${C}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:y.blocks,styleProp:{flexGrow:"1"}})},C))]})]})}function _e(e){return a.jsx("span",{children:e.children})}function pe(e){return e.replace(/http(s)?:/,"")}function Jt(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function Qt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return pe(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),r=n[3],o=t.match("x")?t:`${t}x`;return pe(`${i[0]}_${o}${r}`)}return null}function ne(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(r=>r!==i).map(r=>`${Jt(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Qt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ue(e){var r,o,s,l,c,m;function t(){var u;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&&((u=e.image)!=null&&u.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),ne(p)}else if(e.image&&!e.srcset)return ne(p);return ne(p)}}function n(){var b;return(b=t==null?void 0:t())!=null&&b.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const b={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?b:void 0}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[a.jsx("style",{children:`.img-3cc22d08 {
|
|
41
41
|
opacity: 1;
|
|
42
42
|
transition: opacity 0.2s ease-in-out;
|
|
43
43
|
}.div-3cc22d08 {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
left: 0;
|
|
54
54
|
width: 100%;
|
|
55
55
|
height: 100%;
|
|
56
|
-
}`}),a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-3cc22d08",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((o=(r=e.builderBlock)==null?void 0:r.children)!=null&&o.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-3cc22d08",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((
|
|
56
|
+
}`}),a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-3cc22d08",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((o=(r=e.builderBlock)==null?void 0:r.children)!=null&&o.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-3cc22d08",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((m=(c=e.builderBlock)==null?void 0:c.children)!=null&&m.length)?a.jsx("div",{className:"div-3cc22d08-2",children:e.children}):null]})]})}function He(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})}function Yt(e,t,n,i){function r(m){return typeof m=="string"}function o(m){return typeof m=="number"}function s(m,b){return(()=>{const u=b.property,k=b.operator;let h=b.value;if(b&&b.property==="urlPath"&&b.value&&typeof b.value=="string"&&b.value!=="/"&&b.value.endsWith("/")&&(h=b.value.slice(0,-1)),!(u&&k))return!0;if(Array.isArray(h))return k==="isNot"?h.every(x=>s(m,{property:u,operator:k,value:x})):!!h.find(x=>s(m,{property:u,operator:k,value:x}));const g=m[u];if(Array.isArray(g))return g.includes(h);switch(k){case"is":return g===h;case"isNot":return g!==h;case"contains":return(r(g)||Array.isArray(g))&&g.includes(String(h));case"startsWith":return r(g)&&g.startsWith(String(h));case"endsWith":return r(g)&&g.endsWith(String(h));case"greaterThan":return o(g)&&o(h)&&g>h;case"lessThan":return o(g)&&o(h)&&g<h;case"greaterThanOrEqualTo":return o(g)&&o(h)&&g>=h;case"lessThanOrEqualTo":return o(g)&&o(h)&&g<=h;default:return!1}})()}const l={query:t,startDate:n,endDate:i},c=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>c||l.endDate&&new Date(l.endDate)<c?!1:!l.query||!l.query.length?!0:l.query.every(m=>s(e,m))}const Xt=`function getPersonalizedVariant(variants, blockId, isHydrationTarget, locale) {
|
|
57
57
|
if (!navigator.cookieEnabled) {
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
window.${tn} = ${Zt}
|
|
219
219
|
window.${Me} = ${Xt}
|
|
220
220
|
window.${qe} = ${en}
|
|
221
|
-
`,Ke=f.TARGET==="react",on=(e,t,n)=>`window.${Me}(${JSON.stringify(e)}, "${t}", ${Ke}${n?`, "${n}"`:""})`,sn=(e,t,n)=>`window.${qe}(${JSON.stringify(e)}, "${t}", ${Ke}${n?`, "${n}"`:""})`,ie={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},re={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},ln={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[ie]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[re]}],defaultValue:[{title:[ie],detail:[re]},{title:[ie],detail:[re]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},xe=e=>e.toString();function cn(e){var p;const[t,n]=m.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function r(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const k={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(k).filter(([h,g])=>g!==void 0))}function s(u){return`builder-accordion-title builder-accordion-title-${t.includes(u)?"open":"closed"}`}function l(u){return`builder-accordion-detail builder-accordion-detail-${t.includes(u)?"open":"closed"}`}function c(){let u=null;if(e.grid&&t.length&&document){const h=t[0];let x=document.querySelector(`.builder-accordion-title[data-index="${h}"]`);if(u=h,x){let y=x.getBoundingClientRect();for(;x=x&&x.nextElementSibling;)if(x){if(x.classList.contains("builder-accordion-detail"))continue;const C=x.getBoundingClientRect();if(C.left>y.left){const I=parseInt(x.getAttribute("data-index")||"",10);isNaN(I)||(y=C,u=I)}else break}}}return typeof u=="number"&&(u=u+1),u}function d(){const u={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(u).filter(([k,h])=>h!==void 0))}function b(u){t.includes(u)?n(i()?[]:t.filter(k=>k!==u)):n(i()?[u]:t.concat(u))}return a.jsx("div",{className:"builder-accordion",style:r(),children:(p=e.items)==null?void 0:p.map((u,k)=>a.jsxs(nt.Fragment,{children:[a.jsx("div",{className:s(k),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:c()!==null?xe(k):xe(k+1)}},"data-index":k,onClick:h=>b(k),children:a.jsx($,{blocks:u.title,path:`items.${k}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(k)?a.jsx("div",{className:l(k),style:d(),children:a.jsx($,{blocks:u.detail,path:`items.${k}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},k))})}const un={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}},dn={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(o=>!o.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},mn={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},de=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],fn=["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"],gn={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:de,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((c,d)=>{const b=document.createElement("img");let p=!1;b.onload=()=>{p=!0,c(b)},b.addEventListener("error",u=>{console.warn("Image load failed",u.error),d(u.error)}),b.src=s,setTimeout(()=>{p||d(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const r=e.get("image"),o=e.get("aspectRatio");if(fetch(r).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!o||o===.7041))return n(r).then(s=>{const l=e.get("aspectRatio");e.get("image")===r&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},hn={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function H(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function bn(e){var C,I,E,W,O,L,v,S,A,j,B,R,P;const t=m.useRef(null),[n,i]=m.useState(()=>f.userAttributesService.getUserAttributes()),[r,o]=m.useState(()=>{var w,V,T;return on(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:T.locale)}),[s,l]=m.useState(()=>{var w,V,T;return sn(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:T.locale)}),[c,d]=m.useState(()=>[]),[b,p]=m.useState(()=>{var w;return nn(e.variants,f.getDefaultCanTrack((w=e.builderContext)==null?void 0:w.canTrack))}),[u,k]=m.useState(()=>!1);function h(){return{...e.attributes,[U()]:`builder-personalization-container ${e.attributes[U()]||""}`}}function g(){return(e.variants||[]).filter(w=>{var V,T,N,F;return Yt({...(T=(V=e.builderContext)==null?void 0:V.rootState)!=null&&T.locale?{locale:(F=(N=e.builderContext)==null?void 0:N.rootState)==null?void 0:F.locale}:{},...n},w.query,w.startDate,w.endDate)})}function x(){var w;return rn({variants:e.variants,fallbackBlocks:(w=e.builderBlock)==null?void 0:w.children,isHydrated:u,filteredVariants:g(),previewingIndex:e.previewingIndex})}function y(){return(e.variants||[]).map((w,V)=>{var T;return`div[data-variant-id="${(T=e.builderBlock)==null?void 0:T.id}-${V}"] { display: none !important; } `}).join("")}return m.useEffect(()=>{var V;k(!0);const w=f.userAttributesService.subscribeOnUserAttributesChange(T=>{i(T)},{fireImmediately:f.TARGET==="qwik"});if(!(f.isEditing()||f.isPreviewing())){const T=g()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:T||J,content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0})),new IntersectionObserver(F=>{F.forEach(D=>{var _;D.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:T||J,content:(_=e.builderContext)==null?void 0:_.content},bubbles:!0}))})}).observe(t.current))}c.push(w)},[]),m.useEffect(()=>()=>{c.forEach(w=>w())},[]),a.jsxs("div",{ref:t,...h(),children:[u&&Q.includes(f.TARGET)?a.jsx($,{blocks:x().blocks,parent:(C=e.builderBlock)==null?void 0:C.id,path:x().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(I=e.builderContext)==null?void 0:I.BlocksWrapperProps,"data-variant-id":`${(E=e.builderBlock)==null?void 0:E.id}-${x().index}`}}):null,!u&&Q.includes(f.TARGET)||!Q.includes(f.TARGET)?a.jsxs(a.Fragment,{children:[b?a.jsxs(a.Fragment,{children:[a.jsx(G,{nonce:((W=e.builderContext)==null?void 0:W.nonce)||"",styles:y(),id:`variants-styles-${(O=e.builderBlock)==null?void 0:O.id}`}),a.jsx(H,{nonce:((L=e.builderContext)==null?void 0:L.nonce)||"",scriptStr:s,id:`variants-visibility-script-${(v=e.builderBlock)==null?void 0:v.id}`}),(S=e.variants)==null?void 0:S.map((w,V)=>{var T,N,F,D,_,me;return a.jsx($,{BlocksWrapperProps:{...(T=e.builderContext)==null?void 0:T.BlocksWrapperProps,"aria-hidden":!0,hidden:!0,"data-variant-id":`${(N=e.builderBlock)==null?void 0:N.id}-${V}`},blocks:w.blocks,parent:(F=e.builderBlock)==null?void 0:F.id,path:`component.options.variants.${V}.blocks`,context:e.builderContext,registeredComponents:e.builderComponents,children:a.jsx(H,{nonce:((D=e.builderContext)==null?void 0:D.nonce)||"",scriptStr:r,id:`variants-script-${(_=e.builderBlock)==null?void 0:_.id}-${V}`})},`${(me=e.builderBlock)==null?void 0:me.id}-${V}`)})]}):null,a.jsx($,{blocks:x().blocks,parent:(A=e.builderBlock)==null?void 0:A.id,path:x().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(j=e.builderContext)==null?void 0:j.BlocksWrapperProps,"data-variant-id":`${(B=e.builderBlock)==null?void 0:B.id}-${x().index}`},children:b?a.jsx(H,{nonce:((R=e.builderContext)==null?void 0:R.nonce)||"",scriptStr:r,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}-${J}`}):null})]}):null]})}const yn={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>"}}}]},pn={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 xn(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($,{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 vn={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ae={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},oe={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Sn={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[ae]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[oe]}],defaultValue:[{label:[{...ae,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...ae,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function kn(e){var s;const[t,n]=m.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(l){return e.tabs&&e.tabs[l].content}function r(l){return l===t?e.activeTabStyle:{}}function o(l){l===t&&e.collapsible?n(-1):n(l)}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:(s=e.tabs)==null?void 0:s.map((l,c)=>a.jsx("span",{className:`builder-tab-wrap ${t===c?"builder-tab-active":""}`,style:r(c),onClick:d=>o(c),children:a.jsx($,{parent:e.builderBlock.id,path:`tabs.${c}.label`,blocks:l.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},c))}),i(t)?a.jsx("div",{children:a.jsx($,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Cn={shouldReceiveBuilderProps:{},name:"Text",static:!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 Ge(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Tn={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 In(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[r,o]=m.useState(()=>[]);function s(){var c;if(!t.current||!((c=t.current)!=null&&c.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let d=0;d<l.length;d++){const b=l[d];if(b.src){if(n.includes(b.src))continue;n.push(b.src);const p=document.createElement("script");p.async=!0,p.src=b.src,document.head.appendChild(p)}else if(!b.type||["text/javascript","application/javascript","application/ecmascript"].includes(b.type)){if(r.includes(b.innerText))continue;try{r.push(b.innerText),new Function(b.innerText)()}catch(p){f.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",p)}}}}return m.useEffect(()=>{s()},[]),m.useEffect(()=>{f.isEditing()&&s()},[e.code]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const wn={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}]},En=["text/javascript","application/javascript","application/ecmascript"],Rn=e=>En.includes(e.type);function Pn(e){const t=m.useRef(null),[n,i]=m.useState(()=>[]),[r,o]=m.useState(()=>[]),[s,l]=m.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let b=0;b<d.length;b++){const p=d[b];if(p.src&&!n.includes(p.src)){n.push(p.src);const u=document.createElement("script");u.async=!0,u.src=p.src,document.head.appendChild(u)}else if(Rn(p)&&!r.includes(p.innerText))try{r.push(p.innerText),new Function(p.innerText)()}catch(u){f.logger.warn("[BUILDER.IO] `Embed`: Error running script:",u)}}}return m.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const An={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}},jn=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Vn=()=>{const e=process.env.NODE_ENV||"production";return jn.includes(e)?e:"production"};function Bn(e){const t=m.useRef(null),[n,i]=m.useState(()=>"unsubmitted"),[r,o]=m.useState(()=>null),[s,l]=m.useState(()=>"");function c(u){var h,g;const k={...e.builderContext.rootState,...u};e.builderContext.rootSetState?(g=(h=e.builderContext).rootSetState)==null||g.call(h,k):e.builderContext.rootState=k}function d(){return f.isEditing()&&e.previewState||n}function b(u){return JSON.stringify(u,null,2)}function p(u){var h;const k=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")u.preventDefault();else if(k){if(!(e.action||e.sendSubmissionsTo==="email")){u.preventDefault();return}u.preventDefault();const g=u.currentTarget||u.target,x=e.customHeaders||{};let y;const C=new FormData(g),I=Array.from(g.querySelectorAll("input,select,textarea")).filter(v=>!!v.name).filter(v=>!!v.name&&(v.type!=="radio"||v.checked)).map(v=>{let S;const A=v.name;if(v instanceof HTMLInputElement)if(v.type==="radio"){if(v.checked)return S=v.value,{key:A,value:S}}else if(v.type==="checkbox")S=v.checked;else if(v.type==="number"||v.type==="range"){const j=v.valueAsNumber;isNaN(j)||(S=j)}else v.type==="file"?S=v.files:S=v.value;else S=v.value;return{key:A,value:S}});let E=e.contentType;if(e.sendSubmissionsTo==="email"&&(E="multipart/form-data"),Array.from(I).forEach(({value:v})=>{(v instanceof File||Array.isArray(v)&&v[0]instanceof File||v instanceof FileList)&&(E="multipart/form-data")}),E!=="application/json")y=C;else{const v={};Array.from(I).forEach(({value:S,key:A})=>{Ae(v,A,S)}),y=JSON.stringify(v)}E&&E!=="multipart/form-data"&&(k&&((h=e.action)!=null&&h.includes("zapier.com"))||(x["content-type"]=E));const W=new CustomEvent("presubmit",{detail:{body:y}});if(t.current&&(t.current.dispatchEvent(W),W.defaultPrevented))return;if(i("sending"),e.sendSubmissionsTo==="email"&&(e.sendSubmissionsToEmail==="your@email.com"||!e.sendSubmissionsToEmail)){const v="SubmissionsToEmail is required when sendSubmissionsTo is set to email";console.error(v),i("error"),c({formErrorMessage:v});return}const O=`${Vn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,L=e.sendSubmissionsTo==="email"?O:e.action;f.logFetch(L),fetch(L,{body:y,headers:x,method:e.method||"post"}).then(async v=>{var j,B;let S;const A=v.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?S=await v.json():S=await v.text(),!v.ok){const R=new CustomEvent("submit:error",{detail:{error:S,status:v.status}});if((j=t.current)!=null&&j.nativeElement&&((B=t.current)==null||B.nativeElement.dispatchEvent(R),R.defaultPrevented))return;o(S),i("error");let P=e.errorMessagePath?Ee(S,e.errorMessagePath):S.message||S.error||S;typeof P!="string"&&(P=JSON.stringify(P)),l(P),c({formErrorMessage:P});return}if(o(S),i(v.ok?"success":"error"),v.ok){const R=new CustomEvent("submit:success",{detail:{res:v,body:S}});if(t.current){if(t.current.dispatchEvent(R),R.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const P=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(P),P.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},v=>{const S=new CustomEvent("submit:error",{detail:{error:v}});t.current&&(t.current.dispatchEvent(S),S.defaultPrevented)||(o(v),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsx("style",{children:".pre-abc898ba { padding: 10px; color: red; text-align: center; }"})," ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:u=>p(u),...e.attributes,children:[e.children,d()==="error"?a.jsx($,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,d()==="sending"?a.jsx($,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,d()==="error"&&r?a.jsx("pre",{className:"builder-form-error-text pre-abc898ba",children:b(r)}):null,d()==="success"?a.jsx($,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," "]})}const Nn={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 Fn(e){return m.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 Dn={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 Wn(e){var t;return m.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 $n={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function On(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ln={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 _n(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Un={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:de,required:!0},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"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}],noWrap:!0};function Hn(e){var n;function t(){const i={...e.attributes,[U()]:`builder-raw-img ${e.attributes[U()]||""}`};return delete i.style,i}return a.jsx("img",{loading:"lazy",alt:e.altText,title:e.title,src:e.imgSrc||e.image,...t(),style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center",aspectRatio:e.aspectRatio||void 0,...((n=e.attributes)==null?void 0:n.style)||{}}},f.isEditing()&&e.imgSrc||"default-key")}const Mn={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:fn,bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:de,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Je(e){var s,l,c,d,b,p,u;const t=m.useRef(null);function n(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function i(){return{...n()}}const[r,o]=m.useState(()=>{});return m.useEffect(()=>{if(e.lazyLoad){const k=new IntersectionObserver(function(h){h.forEach(function(g){if(!g.isIntersecting)return;const x=g.target;try{Array.from(x.children).filter(y=>y instanceof HTMLElement&&y.tagName==="SOURCE").forEach(y=>{const C=y.dataset.src;C&&(y.src=C)}),x.load(),k.unobserve(x)}catch(y){console.error("Error loading lazy video:",y)}})});t.current&&k.observe(t.current),o(k)}},[]),m.useEffect(()=>()=>{r&&r.disconnect()},[]),a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(s=e.attributes)==null?void 0:s.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:a.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((c=(l=e.builderBlock)==null?void 0:l.children)!=null&&c.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(b=(d=e.builderBlock)==null?void 0:d.children)!=null&&b.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(p=e.builderBlock)==null?void 0:p.children)!=null&&u.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 qn=()=>[{component:In,...Tn},{component:Pn,...wn},{component:Bn,...An},{component:Fn,...Nn},{component:On,...$n},{component:Wn,...Dn},{component:_n,...Ln},{component:Hn,...Un},{component:Je,...Mn}],ve=()=>[{component:Ie,...un},{component:Le,...dn},{component:_e,...mn},{component:Ue,...gn},{component:He,...yn},{component:xn,...pn},{component:et,...vn},{component:Ge,...Cn},...ze.includes(f.TARGET)?[{component:bn,...hn}]:[],{component:kn,...Sn},{component:cn,...ln},...qn()],zn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
221
|
+
`,Ke=f.TARGET==="react",on=(e,t,n)=>`window.${Me}(${JSON.stringify(e)}, "${t}", ${Ke}${n?`, "${n}"`:""})`,sn=(e,t,n)=>`window.${qe}(${JSON.stringify(e)}, "${t}", ${Ke}${n?`, "${n}"`:""})`,ie={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},re={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},ln={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[ie]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[re]}],defaultValue:[{title:[ie],detail:[re]},{title:[ie],detail:[re]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},xe=e=>e.toString();function cn(e){var p;const[t,n]=d.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function r(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const k={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(k).filter(([h,g])=>g!==void 0))}function s(u){return`builder-accordion-title builder-accordion-title-${t.includes(u)?"open":"closed"}`}function l(u){return`builder-accordion-detail builder-accordion-detail-${t.includes(u)?"open":"closed"}`}function c(){let u=null;if(e.grid&&t.length&&document){const h=t[0];let x=document.querySelector(`.builder-accordion-title[data-index="${h}"]`);if(u=h,x){let y=x.getBoundingClientRect();for(;x=x&&x.nextElementSibling;)if(x){if(x.classList.contains("builder-accordion-detail"))continue;const C=x.getBoundingClientRect();if(C.left>y.left){const I=parseInt(x.getAttribute("data-index")||"",10);isNaN(I)||(y=C,u=I)}else break}}}return typeof u=="number"&&(u=u+1),u}function m(){const u={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(u).filter(([k,h])=>h!==void 0))}function b(u){t.includes(u)?n(i()?[]:t.filter(k=>k!==u)):n(i()?[u]:t.concat(u))}return a.jsx("div",{className:"builder-accordion",style:r(),children:(p=e.items)==null?void 0:p.map((u,k)=>a.jsxs(nt.Fragment,{children:[a.jsx("div",{className:s(k),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:c()!==null?xe(k):xe(k+1)}},"data-index":k,onClick:h=>b(k),children:a.jsx($,{blocks:u.title,path:`items.${k}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(k)?a.jsx("div",{className:l(k),style:m(),children:a.jsx($,{blocks:u.detail,path:`items.${k}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},k))})}const un={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}},dn={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(o=>!o.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},mn={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},de=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],fn=["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"],gn={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:de,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((c,m)=>{const b=document.createElement("img");let p=!1;b.onload=()=>{p=!0,c(b)},b.addEventListener("error",u=>{console.warn("Image load failed",u.error),m(u.error)}),b.src=s,setTimeout(()=>{p||m(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const r=e.get("image"),o=e.get("aspectRatio");if(fetch(r).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!o||o===.7041))return n(r).then(s=>{const l=e.get("aspectRatio");e.get("image")===r&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},hn={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function H(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function bn(e){var C,I,E,W,O,L,v,S,A,j,B,R,P;const t=d.useRef(null),[n,i]=d.useState(()=>f.userAttributesService.getUserAttributes()),[r,o]=d.useState(()=>{var w,V,T;return on(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:T.locale)}),[s,l]=d.useState(()=>{var w,V,T;return sn(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(V=e.builderContext)==null?void 0:V.rootState)==null?void 0:T.locale)}),[c,m]=d.useState(()=>[]),[b,p]=d.useState(()=>{var w;return nn(e.variants,f.getDefaultCanTrack((w=e.builderContext)==null?void 0:w.canTrack))}),[u,k]=d.useState(()=>!1);function h(){return{...e.attributes,[U()]:`builder-personalization-container ${e.attributes[U()]||""}`}}function g(){return(e.variants||[]).filter(w=>{var V,T,N,F;return Yt({...(T=(V=e.builderContext)==null?void 0:V.rootState)!=null&&T.locale?{locale:(F=(N=e.builderContext)==null?void 0:N.rootState)==null?void 0:F.locale}:{},...n},w.query,w.startDate,w.endDate)})}function x(){var w;return rn({variants:e.variants,fallbackBlocks:(w=e.builderBlock)==null?void 0:w.children,isHydrated:u,filteredVariants:g(),previewingIndex:e.previewingIndex})}function y(){return(e.variants||[]).map((w,V)=>{var T;return`div[data-variant-id="${(T=e.builderBlock)==null?void 0:T.id}-${V}"] { display: none !important; } `}).join("")}return d.useEffect(()=>{var V;k(!0);const w=f.userAttributesService.subscribeOnUserAttributesChange(T=>{i(T)},{fireImmediately:f.TARGET==="qwik"});if(!(f.isEditing()||f.isPreviewing())){const T=g()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:T||J,content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0})),new IntersectionObserver(F=>{F.forEach(D=>{var _;D.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:T||J,content:(_=e.builderContext)==null?void 0:_.content},bubbles:!0}))})}).observe(t.current))}c.push(w)},[]),d.useEffect(()=>()=>{c.forEach(w=>w())},[]),a.jsxs("div",{ref:t,...h(),children:[u&&Q.includes(f.TARGET)?a.jsx($,{blocks:x().blocks,parent:(C=e.builderBlock)==null?void 0:C.id,path:x().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(I=e.builderContext)==null?void 0:I.BlocksWrapperProps,"data-variant-id":`${(E=e.builderBlock)==null?void 0:E.id}-${x().index}`}}):null,!u&&Q.includes(f.TARGET)||!Q.includes(f.TARGET)?a.jsxs(a.Fragment,{children:[b?a.jsxs(a.Fragment,{children:[a.jsx(G,{nonce:((W=e.builderContext)==null?void 0:W.nonce)||"",styles:y(),id:`variants-styles-${(O=e.builderBlock)==null?void 0:O.id}`}),a.jsx(H,{nonce:((L=e.builderContext)==null?void 0:L.nonce)||"",scriptStr:s,id:`variants-visibility-script-${(v=e.builderBlock)==null?void 0:v.id}`}),(S=e.variants)==null?void 0:S.map((w,V)=>{var T,N,F,D,_,me;return a.jsx($,{BlocksWrapperProps:{...(T=e.builderContext)==null?void 0:T.BlocksWrapperProps,"aria-hidden":!0,hidden:!0,"data-variant-id":`${(N=e.builderBlock)==null?void 0:N.id}-${V}`},blocks:w.blocks,parent:(F=e.builderBlock)==null?void 0:F.id,path:`component.options.variants.${V}.blocks`,context:e.builderContext,registeredComponents:e.builderComponents,children:a.jsx(H,{nonce:((D=e.builderContext)==null?void 0:D.nonce)||"",scriptStr:r,id:`variants-script-${(_=e.builderBlock)==null?void 0:_.id}-${V}`})},`${(me=e.builderBlock)==null?void 0:me.id}-${V}`)})]}):null,a.jsx($,{blocks:x().blocks,parent:(A=e.builderBlock)==null?void 0:A.id,path:x().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(j=e.builderContext)==null?void 0:j.BlocksWrapperProps,"data-variant-id":`${(B=e.builderBlock)==null?void 0:B.id}-${x().index}`},children:b?a.jsx(H,{nonce:((R=e.builderContext)==null?void 0:R.nonce)||"",scriptStr:r,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}-${J}`}):null})]}):null]})}const yn={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>"}}}]},pn={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 xn(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($,{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 vn={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ae={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},oe={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Sn={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[ae]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[oe]}],defaultValue:[{label:[{...ae,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...ae,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...oe,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function kn(e){var s;const[t,n]=d.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(l){return e.tabs&&e.tabs[l].content}function r(l){return l===t?e.activeTabStyle:{}}function o(l){l===t&&e.collapsible?n(-1):n(l)}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:(s=e.tabs)==null?void 0:s.map((l,c)=>a.jsx("span",{className:`builder-tab-wrap ${t===c?"builder-tab-active":""}`,style:r(c),onClick:m=>o(c),children:a.jsx($,{parent:e.builderBlock.id,path:`tabs.${c}.label`,blocks:l.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},c))}),i(t)?a.jsx("div",{children:a.jsx($,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Cn={shouldReceiveBuilderProps:{},name:"Text",static:!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 Ge(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Tn={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 In(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[r,o]=d.useState(()=>[]);function s(){var c;if(!t.current||!((c=t.current)!=null&&c.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let m=0;m<l.length;m++){const b=l[m];if(b.src){if(n.includes(b.src))continue;n.push(b.src);const p=document.createElement("script");p.async=!0,p.src=b.src,document.head.appendChild(p)}else if(!b.type||["text/javascript","application/javascript","application/ecmascript"].includes(b.type)){if(r.includes(b.innerText))continue;try{r.push(b.innerText),new Function(b.innerText)()}catch(p){f.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",p)}}}}return d.useEffect(()=>{s()},[]),d.useEffect(()=>{f.isEditing()&&s()},[e.code]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const wn={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}]},En=["text/javascript","application/javascript","application/ecmascript"],Rn=e=>En.includes(e.type);function Pn(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[r,o]=d.useState(()=>[]),[s,l]=d.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const m=t.current.getElementsByTagName("script");for(let b=0;b<m.length;b++){const p=m[b];if(p.src&&!n.includes(p.src)){n.push(p.src);const u=document.createElement("script");u.async=!0,u.src=p.src,document.head.appendChild(u)}else if(Rn(p)&&!r.includes(p.innerText))try{r.push(p.innerText),new Function(p.innerText)()}catch(u){f.logger.warn("[BUILDER.IO] `Embed`: Error running script:",u)}}}return d.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const An={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}},jn=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Vn=()=>{const e=process.env.NODE_ENV||"production";return jn.includes(e)?e:"production"};function Bn(e){const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[r,o]=d.useState(()=>null),[s,l]=d.useState(()=>"");function c(u){var h,g;const k={...e.builderContext.rootState,...u};e.builderContext.rootSetState?(g=(h=e.builderContext).rootSetState)==null||g.call(h,k):e.builderContext.rootState=k}function m(){return f.isEditing()&&e.previewState||n}function b(u){return JSON.stringify(u,null,2)}function p(u){var h;const k=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")u.preventDefault();else if(k){if(!(e.action||e.sendSubmissionsTo==="email")){u.preventDefault();return}u.preventDefault();const g=u.currentTarget||u.target,x=e.customHeaders||{};let y;const C=new FormData(g),I=Array.from(g.querySelectorAll("input,select,textarea")).filter(v=>!!v.name).filter(v=>!!v.name&&(v.type!=="radio"||v.checked)).map(v=>{let S;const A=v.name;if(v instanceof HTMLInputElement)if(v.type==="radio"){if(v.checked)return S=v.value,{key:A,value:S}}else if(v.type==="checkbox")S=v.checked;else if(v.type==="number"||v.type==="range"){const j=v.valueAsNumber;isNaN(j)||(S=j)}else v.type==="file"?S=v.files:S=v.value;else S=v.value;return{key:A,value:S}});let E=e.contentType;if(e.sendSubmissionsTo==="email"&&(E="multipart/form-data"),Array.from(I).forEach(({value:v})=>{(v instanceof File||Array.isArray(v)&&v[0]instanceof File||v instanceof FileList)&&(E="multipart/form-data")}),E!=="application/json")y=C;else{const v={};Array.from(I).forEach(({value:S,key:A})=>{Ae(v,A,S)}),y=JSON.stringify(v)}E&&E!=="multipart/form-data"&&(k&&((h=e.action)!=null&&h.includes("zapier.com"))||(x["content-type"]=E));const W=new CustomEvent("presubmit",{detail:{body:y}});if(t.current&&(t.current.dispatchEvent(W),W.defaultPrevented))return;if(i("sending"),e.sendSubmissionsTo==="email"&&(e.sendSubmissionsToEmail==="your@email.com"||!e.sendSubmissionsToEmail)){const v="SubmissionsToEmail is required when sendSubmissionsTo is set to email";console.error(v),i("error"),c({formErrorMessage:v});return}const O=`${Vn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,L=e.sendSubmissionsTo==="email"?O:e.action;f.logFetch(L),fetch(L,{body:y,headers:x,method:e.method||"post"}).then(async v=>{var j,B;let S;const A=v.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?S=await v.json():S=await v.text(),!v.ok){const R=new CustomEvent("submit:error",{detail:{error:S,status:v.status}});if((j=t.current)!=null&&j.nativeElement&&((B=t.current)==null||B.nativeElement.dispatchEvent(R),R.defaultPrevented))return;o(S),i("error");let P=e.errorMessagePath?Ee(S,e.errorMessagePath):S.message||S.error||S;typeof P!="string"&&(P=JSON.stringify(P)),l(P),c({formErrorMessage:P});return}if(o(S),i(v.ok?"success":"error"),v.ok){const R=new CustomEvent("submit:success",{detail:{res:v,body:S}});if(t.current){if(t.current.dispatchEvent(R),R.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const P=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(P),P.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},v=>{const S=new CustomEvent("submit:error",{detail:{error:v}});t.current&&(t.current.dispatchEvent(S),S.defaultPrevented)||(o(v),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsx("style",{children:".pre-abc898ba { padding: 10px; color: red; text-align: center; }"})," ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:u=>p(u),...e.attributes,children:[e.children,m()==="error"?a.jsx($,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,m()==="sending"?a.jsx($,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,m()==="error"&&r?a.jsx("pre",{className:"builder-form-error-text pre-abc898ba",children:b(r)}):null,m()==="success"?a.jsx($,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," "]})}const Nn={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 Fn(e){return d.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 Dn={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 Wn(e){var t;return d.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 $n={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function On(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ln={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 _n(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Un={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:de,required:!0},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"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}],noWrap:!0};function Hn(e){var n;function t(){const i={...e.attributes,[U()]:`builder-raw-img ${e.attributes[U()]||""}`};return delete i.style,i}return a.jsx("img",{loading:"lazy",alt:e.altText,title:e.title,src:e.imgSrc||e.image,...t(),style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center",aspectRatio:e.aspectRatio||void 0,...((n=e.attributes)==null?void 0:n.style)||{}}},f.isEditing()&&e.imgSrc||"default-key")}const Mn={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:fn,bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:de,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Je(e){var s,l,c,m,b,p,u;const t=d.useRef(null);function n(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function i(){return{...n()}}const[r,o]=d.useState(()=>{});return d.useEffect(()=>{if(e.lazyLoad){const k=new IntersectionObserver(function(h){h.forEach(function(g){if(!g.isIntersecting)return;const x=g.target;try{Array.from(x.children).filter(y=>y instanceof HTMLElement&&y.tagName==="SOURCE").forEach(y=>{const C=y.dataset.src;C&&(y.src=C)}),x.load(),k.unobserve(x)}catch(y){console.error("Error loading lazy video:",y)}})});t.current&&k.observe(t.current),o(k)}},[]),d.useEffect(()=>()=>{r&&r.disconnect()},[]),a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(s=e.attributes)==null?void 0:s.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:a.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((c=(l=e.builderBlock)==null?void 0:l.children)!=null&&c.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(b=(m=e.builderBlock)==null?void 0:m.children)!=null&&b.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(p=e.builderBlock)==null?void 0:p.children)!=null&&u.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 qn=()=>[{component:In,...Tn},{component:Pn,...wn},{component:Bn,...An},{component:Fn,...Nn},{component:On,...$n},{component:Wn,...Dn},{component:_n,...Ln},{component:Hn,...Un},{component:Je,...Mn}],ve=()=>[{component:Ie,...un},{component:Le,...dn},{component:_e,...mn},{component:Ue,...gn},{component:He,...yn},{component:xn,...pn},{component:et,...vn},{component:Ge,...Cn},...ze.includes(f.TARGET)?[{component:bn,...hn}]:[],{component:kn,...Sn},{component:cn,...ln},...qn()],zn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
222
222
|
function getAndSetVariantId() {
|
|
223
223
|
function setCookie(name, value, days) {
|
|
224
224
|
let expires = '';
|
|
@@ -326,10 +326,10 @@ src: local("${n}"), url('${i}') format('woff2');
|
|
|
326
326
|
font-display: fallback;
|
|
327
327
|
font-weight: 400;
|
|
328
328
|
}
|
|
329
|
-
`.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const
|
|
329
|
+
`.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const m=e.files[l];m&&m!==i&&(r+=`
|
|
330
330
|
@font-face {
|
|
331
331
|
font-family: "${t}";
|
|
332
|
-
src: url('${
|
|
332
|
+
src: url('${m}') format('woff2');
|
|
333
333
|
font-display: fallback;
|
|
334
334
|
font-weight: ${l};
|
|
335
335
|
}
|
|
@@ -350,8 +350,8 @@ font-weight: ${l};
|
|
|
350
350
|
text-align: inherit;
|
|
351
351
|
font-family: inherit;
|
|
352
352
|
}
|
|
353
|
-
`,li=e=>e?"":si,ci=e=>`variant-${e}`;function ui(e){var O,L,v;const t=
|
|
353
|
+
`,li=e=>e?"":si,ci=e=>`variant-${e}`;function ui(e){var O,L,v;const t=d.useRef(null);d.useState(()=>!1),d.useState(()=>e.builderContextSignal);const[n,i]=d.useState(()=>null),[r,o]=d.useState(()=>"");function s(S,A){var B,R;const j={...e.builderContextSignal.rootState,...S};e.builderContextSignal.rootSetState?(R=(B=e.builderContextSignal).rootSetState)==null||R.call(B,j):e.setBuilderContextSignal(P=>({...P,rootState:j})),e.builderContextSignal.rootSetState?e.builderContextSignal.rootSetState(j):e.setBuilderContextSignal(P=>({...P,rootState:j}))}function l(S,A){var B,R,P,w,V;const j={...e.builderContextSignal.content,...S,data:{...(B=e.builderContextSignal.content)==null?void 0:B.data,...S==null?void 0:S.data},meta:{...(R=e.builderContextSignal.content)==null?void 0:R.meta,...S==null?void 0:S.meta,breakpoints:((P=S==null?void 0:S.meta)==null?void 0:P.breakpoints)||((V=(w=e.builderContextSignal.content)==null?void 0:w.meta)==null?void 0:V.breakpoints)}};e.setBuilderContextSignal(T=>({...T,content:j}))}function c(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[m,b]=d.useState(()=>e.contentWrapper||"div");function p(S){return f.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:A=>{var R;const{breakpoints:j,contentId:B}=A;!B||B!==((R=e.builderContextSignal.content)==null?void 0:R.id)||j&&l({meta:{breakpoints:j}})},animation:A=>{Be(A)},contentUpdate:(A,j)=>{l(A)},stateUpdate:(A,j)=>{s(A)}}})(S)}const[u,k]=d.useState(()=>({})),[h,g]=d.useState(()=>({})),[x,y]=d.useState(()=>!1);function C(S){var A,j;if(e.builderContextSignal.content){const B=(A=e.builderContextSignal.content)==null?void 0:A.testVariationId,R=(j=e.builderContextSignal.content)==null?void 0:j.id;f._track({apiHost:e.apiHost,type:"click",canTrack:f.getDefaultCanTrack(e.canTrack),contentId:R,apiKey:e.apiKey,variationId:B!==R?B:void 0,...ni(S),unique:!x})}x||y(!0)}function I(){var A,j,B;const S=(B=(j=(A=e.builderContextSignal.content)==null?void 0:A.data)==null?void 0:j.httpRequests)!=null?B:{};Object.entries(S).forEach(([R,P])=>{if(!P)return;const w=typeof P=="object"&&P["@type"]==="@builder.io/core:Request";if(h[R]||u[R]&&!f.isEditing())return;const V=w?P.request.url:P;h[R]=!0;const T=V.replace(/{{([^}]+)}}/g,(D,_)=>String(M({code:_,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))),N=w?{url:T,method:P.request.method,headers:P.request.headers,body:P.request.body}:{url:T,method:"GET"};f.logFetch(JSON.stringify(N));const F={method:N.method,headers:N.headers,body:N.body};N.method==="GET"&&delete F.body,fetch(N.url,F).then(D=>D.json()).then(D=>{s({[R]:D}),u[R]=!0}).catch(D=>{console.error("error fetching dynamic data",JSON.stringify(P),D)}).finally(()=>{h[R]=!1})})}function E(){f.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:ce(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const W=d.useRef(!1);return W.current||(I(),E(),W.current=!0),d.useEffect(()=>{var S,A,j,B,R;if(f.isBrowser()){f.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",p),f.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(S=e.model)!=null?S:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(T=>{var N,F;if(!((N=T.models)!=null&&N.length)||T.models.includes(e.model)){const D=f.createRegisterComponentMessage(T);(F=window.parent)==null||F.postMessage(D,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",E));const P=e.builderContextSignal.content&&f.getDefaultCanTrack(e.canTrack),w=f.getCookieSync({name:`builder.tests.${(A=e.builderContextSignal.content)==null?void 0:A.id}`,canTrack:!0}),V=(j=e.builderContextSignal.content)==null?void 0:j.testVariationId;if(P&&V===w){const T=(B=e.builderContextSignal.content)==null?void 0:B.id,N=e.apiKey;f._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:T,apiKey:N,variationId:w!==T?w:void 0})}if(f.isPreviewing()&&!f.isEditing()){const T=new URL(location.href).searchParams,N=T.get("builder.preview"),F=T.get(`builder.overrides.${N}`),D=T.get("apiKey")||T.get("builder.space");(N==="BUILDER_STUDIO"||N===e.model&&D===e.apiKey&&(!e.content||F===e.content.id))&&f.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...N==="BUILDER_STUDIO"&&((R=e.context)!=null&&R.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(_=>{_&&l(_)})}}},[]),d.useEffect(()=>{e.content&&l(e.content)},[e.content]),d.useEffect(()=>{E()},[e.builderContextSignal.rootState]),d.useEffect(()=>{if(e.data){if(n===e.data)return;s(e.data),i(e.data)}},[e.data]),d.useEffect(()=>{if(e.locale){if(r===e.locale)return;s({locale:e.locale}),o(e.locale)}},[e.locale]),d.useEffect(()=>()=>{f.isBrowser()&&(window.removeEventListener("message",p),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),a.jsx(K.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||Ce()?a.jsx(m,{ref:t,onClick:S=>C(S),"builder-content-id":(O=e.builderContextSignal.content)==null?void 0:O.id,"builder-model":e.model,className:ci(((L=e.content)==null?void 0:L.testVariationId)||((v=e.content)==null?void 0:v.id)),style:{display:!e.builderContextSignal.content&&Ce()?"none":void 0},...c(),...e.contentWrapperProps,children:e.children}):null})}function di(e){const[t,n]=d.useState(()=>`
|
|
354
354
|
${oi({cssCode:e.cssCode,contentId:e.contentId})}
|
|
355
355
|
${ai({customFonts:e.customFonts})}
|
|
356
356
|
${li(e.isNestedRender)}
|
|
357
|
-
`.trim());return a.jsx(G,{id:"builderio-content",styles:t,nonce:e.nonce})}const mi=({content:e,data:t,locale:n})=>{var o,s,l;const i={},r=((o=e==null?void 0:e.data)==null?void 0:o.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...r,...t,...n?{locale:n}:{}}},fi=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function Te(e){var
|
|
357
|
+
`.trim());return a.jsx(G,{id:"builderio-content",styles:t,nonce:e.nonce})}const mi=({content:e,data:t,locale:n})=>{var o,s,l;const i={},r=((o=e==null?void 0:e.data)==null?void 0:o.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...r,...t,...n?{locale:n}:{}}},fi=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function Te(e){var m,b,p,u,k,h,g,x,y;const[t,n]=d.useState(()=>{var C,I;return Zn({variationId:(C=e.content)==null?void 0:C.testVariationId,contentId:(I=e.content)==null?void 0:I.id})});function i(C){l(I=>({...I,rootState:C}))}const[r,o]=d.useState(()=>[...ve(),...e.customComponents||[]].reduce((C,{component:I,...E})=>({...C,[E.name]:{component:I,...f.serializeIncludingFunctions(E)}}),{})),[s,l]=d.useState(()=>({content:fi({content:e.content,data:e.data}),localState:void 0,rootState:mi({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ve(),...e.customComponents||[]].reduce((C,{component:I,...E})=>({...C,[E.name]:f.serializeIncludingFunctions(E)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model})),c=d.useRef(!1);if(!c.current){e.apiKey||f.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const C=(b=(m=s.content)==null?void 0:m.data)==null?void 0:b.jsCode;C&&M({code:C,context:e.context||{},localState:void 0,rootState:s.rootState,rootSetState:I=>{Object.assign(s.rootState,I)},isExpression:!1}),c.current=!0}return d.useEffect(()=>{},[e.content,e.data,e.locale]),a.jsx(we.Provider,{value:{registeredComponents:r},children:a.jsxs(ui,{apiHost:e.apiHost,nonce:e.nonce,content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:l,children:[e.isSsrAbTest?a.jsx(H,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,a.jsx(di,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(p=s.content)==null?void 0:p.id,cssCode:(k=(u=s.content)==null?void 0:u.data)==null?void 0:k.cssCode,customFonts:(g=(h=s.content)==null?void 0:h.data)==null?void 0:g.customFonts}),a.jsx($,{blocks:(y=(x=s.content)==null?void 0:x.data)==null?void 0:y.blocks,context:s,registeredComponents:r,linkComponent:e.linkComponent})]})})}function Ze(e){var s;const[t,n]=d.useState(()=>Gn({canTrack:f.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return Xn(Y(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function r(){return Y(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function o(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:f.handleABTestingSync({item:e.content,canTrack:f.getDefaultCanTrack(e.canTrack)})}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&f.TARGET!=="reactNative"?a.jsxs(a.Fragment,{children:[a.jsx(H,{id:"builderio-init-variants-fns",scriptStr:Yn(),nonce:e.nonce||""}),ze.includes(f.TARGET)?a.jsx(H,{id:"builderio-init-personalization-variants-fns",nonce:e.nonce||"",scriptStr:an()}):null]}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(G,{id:"builderio-variants",styles:r(),nonce:e.nonce||""}),a.jsx(H,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(s=Y(e.content))==null?void 0:s.map(l=>a.jsx(Te,{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,a.jsx(Te,{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 gi=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return f.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{f.logger.error("Could not fetch symbol content: ",n)})};function et(e){var b,p,u,k,h;function t(){return"div"}function n(){return"div"}function i(){return Object.values(e.builderComponents)}function r(){var g,x;return[e.attributes[U()],"builder-symbol",(g=e.symbol)!=null&&g.inline?"builder-inline-symbol":void 0,(x=e.symbol)!=null&&x.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[o,s]=d.useState(()=>{var g;return(g=e.symbol)==null?void 0:g.content}),[l,c]=d.useState(()=>{var g;return(g=e.symbol)==null?void 0:g.entry});function m(){var g;o&&l===((g=e.symbol)==null?void 0:g.entry)||gi({symbol:e.symbol,builderContextValue:e.builderContext}).then(x=>{var y;x&&(s(x),c((y=e.symbol)==null?void 0:y.entry))})}return d.useEffect(()=>{},[]),d.useEffect(()=>{m()},[e.symbol]),a.jsx("div",{...e.attributes,className:r(),children:a.jsx(Ze,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(b=e.builderBlock)==null?void 0:b.id},customComponents:i(),data:{...(p=e.symbol)==null?void 0:p.data,...e.builderContext.localState,...(u=o==null?void 0:o.data)==null?void 0:u.state},canTrack:e.builderContext.canTrack,model:(h=(k=e.symbol)==null?void 0:k.model)!=null?h:"",content:o,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.setClientUserAttributes=f.setClientUserAttributes;exports.Blocks=$;exports.BuilderContext=K;exports.Button=Ie;exports.Columns=Le;exports.Content=Ze;exports.Fragment=_e;exports.Image=Ue;exports.Section=He;exports.Symbol=et;exports.Text=Ge;exports.Video=Je;
|