@builder.io/sdk-react 1.0.11 → 1.0.12

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.
Files changed (62) hide show
  1. package/lib/browser/blocks-exports.cjs +30 -30
  2. package/lib/browser/blocks-exports.mjs +875 -842
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-acc5a9c8.js → server-entry-34e4efb1.js} +1 -1
  6. package/lib/browser/{server-entry-4829e1ce.cjs → server-entry-60df1736.cjs} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/blocks-03ffaaf9.cjs +32 -0
  10. package/lib/edge/blocks-exports.cjs +1 -1
  11. package/lib/edge/blocks-exports.mjs +2 -2
  12. package/lib/edge/{blocks-244199ab.js → blocks-f8d5d3a0.js} +1003 -967
  13. package/lib/edge/{button-8cd5d71a.cjs → button-5137d1bc.cjs} +1 -1
  14. package/lib/edge/{button-73916377.js → button-5543875e.js} +3 -3
  15. package/lib/edge/{columns-c7d9b9f1.js → columns-a05f9fd8.js} +33 -33
  16. package/lib/edge/{columns-88c9df52.cjs → columns-ad62a5ce.cjs} +2 -2
  17. package/lib/edge/{content-variants-d5455178.js → content-variants-74109911.js} +106 -99
  18. package/lib/edge/{content-variants-1a65d814.cjs → content-variants-e6ba9024.cjs} +6 -6
  19. package/lib/edge/dynamic-renderer-8b343325.js +8 -0
  20. package/lib/edge/{dynamic-renderer-1c9f24c0.cjs → dynamic-renderer-b29b45ca.cjs} +1 -1
  21. package/lib/edge/{form-ad532981.js → form-67a4ec0b.js} +56 -66
  22. package/lib/edge/form-ee52f842.cjs +1 -0
  23. package/lib/edge/{get-class-prop-name-1178de8b.js → get-class-prop-name-25116ae3.js} +1 -1
  24. package/lib/edge/{get-class-prop-name-c082f4f3.cjs → get-class-prop-name-7ab1534a.cjs} +1 -1
  25. package/lib/edge/{image-2cc909d9.js → image-0008c792.js} +25 -25
  26. package/lib/edge/image-ee3dd857.cjs +17 -0
  27. package/lib/edge/{img-f61f7931.cjs → img-147fc69c.cjs} +1 -1
  28. package/lib/edge/{img-749d10ed.js → img-43af4666.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/{input-ccec5aae.js → input-35088f50.js} +1 -1
  32. package/lib/edge/{input-184da708.cjs → input-90830684.cjs} +1 -1
  33. package/lib/edge/{select-a5fc0333.cjs → select-1e63f097.cjs} +1 -1
  34. package/lib/edge/{select-50a6db92.js → select-ee16e4ee.js} +1 -1
  35. package/lib/edge/{server-entry-178f215d.cjs → server-entry-39e6b4a6.cjs} +1 -1
  36. package/lib/edge/{server-entry-1cbf5bef.js → server-entry-f2d127da.js} +1 -1
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-d3ff8e4d.cjs → slot-3db582db.cjs} +1 -1
  40. package/lib/edge/{slot-dad01f2d.js → slot-45a2e0bf.js} +4 -4
  41. package/lib/edge/{symbol-b6db0014.js → symbol-75231166.js} +2 -2
  42. package/lib/edge/{symbol-31283b30.cjs → symbol-c533a54f.cjs} +1 -1
  43. package/lib/edge/{video-d02ff89b.js → video-58c2cc8d.js} +15 -15
  44. package/lib/edge/video-e20dcbbc.cjs +1 -0
  45. package/lib/node/blocks-exports.cjs +17 -17
  46. package/lib/node/blocks-exports.mjs +473 -440
  47. package/lib/node/index.cjs +1 -1
  48. package/lib/node/index.mjs +1 -1
  49. package/lib/node/{server-entry-856d379b.cjs → server-entry-81eab45c.cjs} +1 -1
  50. package/lib/node/{server-entry-09a75819.js → server-entry-a0cd9606.js} +1 -1
  51. package/lib/node/server-entry.cjs +1 -1
  52. package/lib/node/server-entry.mjs +1 -1
  53. package/package.json +1 -1
  54. package/types/components/block/block.helpers.d.ts +4 -0
  55. package/types/constants/sdk-version.d.ts +1 -1
  56. package/types/functions/evaluate/evaluate.d.ts +3 -1
  57. package/types/functions/evaluate/helpers.d.ts +1 -0
  58. package/lib/edge/blocks-a05f6af2.cjs +0 -32
  59. package/lib/edge/dynamic-renderer-96ba4e48.js +0 -8
  60. package/lib/edge/form-713c6da6.cjs +0 -1
  61. package/lib/edge/image-7e1361ce.cjs +0 -17
  62. package/lib/edge/video-64014cc4.cjs +0 -1
@@ -1,16 +1,16 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("./server-entry-4829e1ce.cjs"),u=require("react"),Pe=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Be=e=>typeof e=="string"&&Pe.has(e.toLowerCase());function G(e){return o.jsx(o.Fragment,{children:Be(e.TagName)?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):o.jsx(o.Fragment,{children:typeof e.TagName=="string"?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}const O=()=>{switch(m.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function de(e){return o.jsx(G,{attributes:{...e.attributes,[O()]:`${e.link?"":"builder-button"} ${e.attributes[O()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const Q=u.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),ue=u.createContext({registeredComponents:{}});function Ve(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Ae=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),We=()=>({isEditing:m.isEditing(),isBrowser:m.isBrowser(),isServer:!m.isBrowser(),getUserAttributes:()=>m.getUserAttributes()}),Ne=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ne=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:r,rootState:s})=>{const l=Ae({builder:t,context:n,event:i,state:me({rootState:s,localState:a,rootSetState:r})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function me({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const r=i[a];return typeof r=="object"?me({rootState:r,localState:void 0,rootSetState:n?s=>{i[a]=s,n(i)}:void 0}):r},set:(i,a,r)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=r,n==null||n(i),!0}})}function $e(){var e;return typeof process!="undefined"&&m.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const De=()=>{var i;if(!$e())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(m.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},Le=e=>(m.isBrowser()||De(),ne(e));function M({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:r,isExpression:s=!0}){if(e===""){m.logger.warn("Skipping evaluation of empty code block.");return}const l={code:Ne(e,{isExpression:s}),builder:We(),context:t,event:r,rootSetState:a,rootState:i,localState:n};try{return Le(l)}catch(c){m.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const fe=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((a,r,s)=>Object(a[r])===a[r]?a[r]:a[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const Oe=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const r=m.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const c=e.bindings[l],d=M({code:c,localState:n,rootState:i,rootSetState:a,context:t});fe(s,l,d)}return s};function K({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:a,rootSetState:r}){const s=e;return n?Oe({block:s,localState:i,rootState:a,rootSetState:r,context:t}):s}function Me(e,t,n={}){let i,a,r,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,a),s||(i=a=null)};return function(){const d=Date.now();!l&&n.leading===!1&&(l=d);const f=t-(d-l);return i=this,a=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=d,r=e.apply(i,a),s||(i=a=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,f)),r}}function $(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const r in a)Object.prototype.hasOwnProperty.call(a,r)&&(n[r]=a[r])}return n}const X=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function Ue(e){for(const t of e)switch(t.trigger){case"pageLoad":ge(t);break;case"hover":_e(t);break;case"scrollInView":Ke(t);break}}function Z(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ee(e,t){const n=He(e),i=getComputedStyle(t),a=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[a,r];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function He(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 ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n),n.style.transition="none",n.style.transitionDelay="0",$(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),$(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function _e(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);const i=e.steps[0].styles,a=e.steps[1].styles;function r(){$(n.style,i)}function s(){$(n.style,a)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ke(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Z(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ee(e,n);let i=!1,a=!1;function r(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{$(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!l(n)&&(i=!1,$(n.style,e.steps[0].styles))}const s=Me(r,200,{leading:!1});function l(f){const p=f.getBoundingClientRect(),v=window.innerHeight,b=(e.thresholdPercent||0)/100*v;return p.bottom>b&&p.top<v-b}const c=e.steps[0].styles;function d(){$(n.style,c)}d(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const qe=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=K({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const a=n[i];if(a)return a;console.warn(`
2
- Could not find a registered component named "${i}".
3
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},ze=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return a.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[s]:c,[`$${s}Index`]:d}},block:i}))},he={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ie=(e,t=he)=>`@media (max-width: ${t[e].max}px)`,be=({small:e,medium:t})=>{const n=m.fastClone(he);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const a=n.small.max+1;n.medium={max:t,min:a,default:a+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},Je=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),xe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Je(n)}: ${i};`}).filter(m.checkIsDefined),Ye=e=>xe(e).join(`
4
- `),z=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
5
- ${Ye(n)}
1
+ "use client";"use strict";var Ae=Object.defineProperty;var We=(e,t,n)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>(We(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("./server-entry-60df1736.cjs"),d=require("react"),Ne=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),$e=e=>typeof e=="string"&&Ne.has(e.toLowerCase());function Z(e){return a.jsx(a.Fragment,{children:$e(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(m.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function fe(e){return a.jsx(Z,{attributes:{...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"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const ee=d.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),he=d.createContext({registeredComponents:{}});function De(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Le=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Me=()=>({isEditing:m.isEditing(),isBrowser:m.isBrowser(),isServer:!m.isBrowser(),getUserAttributes:()=>m.getUserAttributes()}),Oe=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ae=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=Le({builder:t,context:n,event:i,state:ge({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([u])=>u),e)(...l.map(([,u])=>u))};function ge({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"&&r!==null?ge({rootState:r,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}function Ue(){var e;return typeof process!="undefined"&&m.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const He=()=>{var i;if(!Ue())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(m.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Ke=e=>(m.isBrowser()||He(),ae(e)),W=class W{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return W.cache.get(t)}static setCachedValue(t,n){W.cache.size>20&&W.cache.delete(W.cache.keys().next().value),W.cache.set(t,{value:n})}};Y(W,"cacheLimit",20),Y(W,"cache",new Map);let O=W;function H({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0,enableCache:l}){if(e===""){m.logger.warn("Skipping evaluation of empty code block.");return}const u={code:Oe(e,{isExpression:s}),builder:Me(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(l){const c=O.getCacheKey(u),f=O.getCachedValue(c);if(f)return f.value}try{const c=Ke(u);if(l){const f=O.getCacheKey(u);O.setCachedValue(f,c)}return c}catch(c){m.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const be=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,r,s)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const qe=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=m.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const u=e.bindings[l],c=H({code:u,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});be(s,l,c)}return s};function z({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const s=e;return n?qe({block:s,localState:i,rootState:o,rootSetState:r,context:t}):s}function _e(e,t,n={}){let i,o,r,s=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const f=t-(c-l);return i=this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(u,f)),r}}function D(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}const te=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function ze(e){for(const t of e)switch(t.trigger){case"pageLoad":ye(t);break;case"hover":Ye(t);break;case"scrollInView":Ge(t);break}}function ne(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ie(e,t){const n=Je(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[o,r];for(const l of s)for(const u of n)u in l||(l[u]=i[u])}function Je(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 ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n),n.style.transition="none",n.style.transitionDelay="0",D(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),D(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){D(n.style,i)}function s(){D(n.style,o)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{D(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!l(n)&&(i=!1,D(n.style,e.steps[0].styles))}const s=_e(r,200,{leading:!1});function l(f){const h=f.getBoundingClientRect(),b=window.innerHeight,p=(e.thresholdPercent||0)/100*b;return h.bottom>p&&h.top<b-p}const u=e.steps[0].styles;function c(){D(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Qe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),xe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Qe(n)}: ${i};`}).filter(m.checkIsDefined),Xe=e=>xe(e).join(`
2
+ `),G=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
+ ${Xe(n)}
6
4
  }`;return e?`${e} {
7
5
  ${i}
8
- }`:i};function q(e){return o.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function Ge(e){function t(){const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return m.checkIsDefined(i.hide)?!i.hide:m.checkIsDefined(i.show)?i.show:!0}function n(){var b;const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),a=i.responsiveStyles,r=e.context.content,s=be(((b=r==null?void 0:r.meta)==null?void 0:b.breakpoints)||{}),l=a==null?void 0:a.large,c=a==null?void 0:a.medium,d=a==null?void 0:a.small,f=i.id;if(!f)return"";const p=l?z({className:f,styles:l}):"",v=c?z({className:f,styles:c,mediaQuery:ie("medium",s)}):"",g=d?z({className:f,styles:d,mediaQuery:ie("small",s)}):"";return[p,v,g].join(" ")}return o.jsx(o.Fragment,{children:n()&&t()?o.jsx(o.Fragment,{children:o.jsx(q,{styles:n()})}):null})}function Qe(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Xe=e=>`on${Qe(e)}`,Ze=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function ye(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const r=n[a];let s=Xe(a);if(e.stripPrefix)switch(m.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=Ze(r,e)}return t}function et({style:e}){return e}const tt=({block:e,context:t})=>pe(et({style:e.style||{},context:t,block:e}));function pe(e){switch(m.TARGET){case"svelte":case"vue":case"solid":return xe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function nt({properties:e}){return e}const it=e=>({href:e.href});function te({block:e,context:t}){var i;const n={...it(e),...e.properties,"builder-id":e.id,style:tt({block:e,context:t}),[O()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return nt({properties:n,context:t,block:e})}function ot(e){return o.jsx(G,{TagName:e.Wrapper,attributes:te({block:e.block,context:e.context}),actionAttributes:ye({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 at(e){return o.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...te({block:e.block,context:e.context}),...ye({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const rt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:r,contextValue:s})=>{const l={...e,...a?{attributes:te({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function oe(e){var i;const[t,n]=u.useState(()=>e.isInteractive?at:e.componentRef);return o.jsx(o.Fragment,{children:e.componentRef?o.jsx(o.Fragment,{children:o.jsx(t,{...rt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(a=>o.jsx(U,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function st(e){const[t,n]=u.useState(()=>e.repeatContext);return o.jsx(Q.Provider,{value:t,children:o.jsx(U,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function U(e){var f,p,v;function t(){return qe({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return ze({block:e.block,context:e.context})}function i(){var g;return(g=e.block.repeat)!=null&&g.collection?e.block:K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function a(){var b;return e.block.tagName==="a"||((b=i().properties)==null?void 0:b.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var y,j;if((y=e.block.repeat)!=null&&y.collection)return!!((j=n==null?void 0:n())!=null&&j.length);const g="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!g}function s(){var b,y;return!((b=t==null?void 0:t())!=null&&b.component)&&!n()?(y=i().children)!=null?y:[]:[]}function l(){var g,b,y,j,P,S,T,F,R,A,W;return{blockChildren:(g=i().children)!=null?g:[],componentRef:(b=t==null?void 0:t())==null?void 0:b.component,componentOptions:{...Ve(i()),builderContext:e.context,...((y=t==null?void 0:t())==null?void 0:y.name)==="Core:Button"||((j=t==null?void 0:t())==null?void 0:j.name)==="Symbol"||((P=t==null?void 0:t())==null?void 0:P.name)==="Columns"||((S=t==null?void 0:t())==null?void 0:S.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((T=t==null?void 0:t())==null?void 0:T.name)==="Symbol"||((F=t==null?void 0:t())==null?void 0:F.name)==="Columns"||((R=t==null?void 0:t())==null?void 0:R.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((A=t==null?void 0:t())==null?void 0:A.noWrap)===!0,isInteractive:!((W=t==null?void 0:t())!=null&&W.isRSC)}}const[c,d]=u.useState(()=>e.context);return u.useEffect(()=>{const g=i().id,b=i().animations;b&&g&&Ue(b.filter(y=>y.trigger!=="hover").map(y=>({...y,elementId:g})))},[]),o.jsx(o.Fragment,{children:r()?o.jsxs(o.Fragment,{children:[o.jsx(Ge,{block:e.block,context:e.context}),(f=t==null?void 0:t())!=null&&f.noWrap?o.jsx(o.Fragment,{children:o.jsx(oe,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):o.jsx(o.Fragment,{children:n()?o.jsx(o.Fragment,{children:(v=n())==null?void 0:v.map((g,b)=>o.jsx(st,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):o.jsx(o.Fragment,{children:o.jsxs(ot,{Wrapper:a(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[o.jsx(oe,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(p=s())==null?void 0:p.map(g=>o.jsx(U,{block:g,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},g.id))]})})})]}):null})}function lt(e){function t(){var a;return"builder-blocks"+((a=e.blocks)!=null&&a.length?"":" no-blocks")}function n(){var a,r;m.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var a,r;m.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return o.jsxs(o.Fragment,{children:[o.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:a=>n(),onMouseEnter:a=>i(),onKeyPress:a=>n(),...e.BlocksWrapperProps,children:e.children}),o.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
6
+ }`:i};function Ze({style:e}){return e}const et=({block:e,context:t})=>pe(Ze({style:e.style||{},context:t,block:e}));function pe(e){switch(m.TARGET){case"svelte":case"vue":case"solid":return xe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const tt=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=z({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
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?`)},nt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=H({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return o.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[s]:u,[`$${s}Index`]:c}},block:i}))},Se={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Se)=>`@media (max-width: ${t[e].max}px)`,ve=({small:e,medium:t})=>{const n=m.fastClone(Se);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function it(e){function t(){const i=z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return m.checkIsDefined(i.hide)?!i.hide:m.checkIsDefined(i.show)?i.show:!0}function n(){var p;const i=z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,r=e.context.content,s=ve(((p=r==null?void 0:r.meta)==null?void 0:p.breakpoints)||{}),l=o==null?void 0:o.large,u=o==null?void 0:o.medium,c=o==null?void 0:o.small,f=i.id;if(!f)return"";const h=l?G({className:f,styles:l}):"",b=u?G({className:f,styles:u,mediaQuery:re("medium",s)}):"",x=c?G({className:f,styles:c,mediaQuery:re("small",s)}):"";return[h,b,x].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{styles:n()})}):null})}function ot(e){return e.charAt(0).toUpperCase()+e.slice(1)}const at=e=>`on${ot(e)}`,rt=(e,t)=>n=>H({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function ke(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let s=at(o);if(e.stripPrefix)switch(m.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=rt(r,e)}return t}function st({properties:e}){return e}const lt=e=>({href:e.href});function oe({block:e,context:t}){var i;const n={...lt(e),...e.properties,"builder-id":e.id,style:et({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return st({properties:n,context:t,block:e})}function ct(e){return a.jsx(Z,{TagName:e.Wrapper,attributes:oe({block:e.block,context:e.context}),actionAttributes:ke({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 ut(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...oe({block:e.block,context:e.context}),...ke({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const dt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:s})=>{const l={...e,...o?{attributes:oe({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:l};function se(e){var i;const[t,n]=d.useState(()=>e.isInteractive?ut:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...dt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>a.jsx(K,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function mt(e){const[t,n]=d.useState(()=>e.repeatContext);return a.jsx(ee.Provider,{value:t,children:a.jsx(K,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function K(e){var u,c,f;function t(){return tt({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return nt({block:e.block,context:e.context})}function i(){var h;return(h=e.block.repeat)!=null&&h.collection?e.block:z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var b;return e.block.tagName==="a"||((b=i().properties)==null?void 0:b.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var x,p;if((x=e.block.repeat)!=null&&x.collection)return!!((p=n==null?void 0:n())!=null&&p.length);const h="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!h}function s(){var b,x;return!((b=t==null?void 0:t())!=null&&b.component)&&!n()?(x=i().children)!=null?x:[]:[]}function l(){var h,b,x,p,E,j,V,S,I,P,R;return{blockChildren:(h=i().children)!=null?h:[],componentRef:(b=t==null?void 0:t())==null?void 0:b.component,componentOptions:{...De(i()),builderContext:e.context,...((x=t==null?void 0:t())==null?void 0:x.name)==="Core:Button"||((p=t==null?void 0:t())==null?void 0:p.name)==="Symbol"||((E=t==null?void 0:t())==null?void 0:E.name)==="Columns"||((j=t==null?void 0:t())==null?void 0:j.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((V=t==null?void 0:t())==null?void 0:V.name)==="Symbol"||((S=t==null?void 0:t())==null?void 0:S.name)==="Columns"||((I=t==null?void 0:t())==null?void 0:I.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((P=t==null?void 0:t())==null?void 0:P.noWrap)===!0,isInteractive:!((R=t==null?void 0:t())!=null&&R.isRSC)}}return d.useEffect(()=>{const h=i().id,b=i().animations;b&&h&&ze(b.filter(x=>x.trigger!=="hover").map(x=>({...x,elementId:h})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(it,{block:e.block,context:e.context}),(u=t==null?void 0:t())!=null&&u.noWrap?a.jsx(a.Fragment,{children:a.jsx(se,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(f=n())==null?void 0:f.map((h,b)=>a.jsx(mt,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):a.jsxs(ct,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(se,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(c=s())==null?void 0:c.map(h=>a.jsx(K,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function ft(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;m.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,r;m.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: stretch;
12
- }`})]})}function D(e){var i,a,r;const t=u.useContext(Q),n=u.useContext(ue);return o.jsx(lt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((a=e.context)==null?void 0:a.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?o.jsx(o.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>o.jsx(U,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function Se(e){var P;const[t,n]=u.useState(()=>typeof e.space=="number"?e.space||0:20),[i,a]=u.useState(()=>e.columns||[]),[r,s]=u.useState(()=>e.stackColumnsAt||"tablet");function l(S){var T;return((T=i[S])==null?void 0:T.width)||100/i.length}function c(S){const T=t*(i.length-1)/i.length;return`calc(${l(S)}% - ${T}px)`}function d({stackedStyle:S,desktopStyle:T}){return r==="tablet"?S:T}function f({stackedStyle:S,desktopStyle:T}){return r==="never"?T:S}const[p,v]=u.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function g(){return{"--flex-dir":p,"--flex-dir-tablet":d({stackedStyle:p,desktopStyle:"row"})}}function b(S){const T=S===0?0:t,F=c(S),R=`${T}px`,A="100%",W=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:F,["marginLeft"]:R,"--column-width-mobile":f({stackedStyle:A,desktopStyle:F}),"--column-margin-left-mobile":f({stackedStyle:W,desktopStyle:R}),"--column-width-tablet":d({stackedStyle:A,desktopStyle:F}),"--column-margin-left-tablet":d({stackedStyle:W,desktopStyle:R})}}function y(S){var F,R;return be(((R=(F=e.builderContext.content)==null?void 0:F.meta)==null?void 0:R.breakpoints)||{})[S].max}function j(){return`
13
- @media (max-width: ${y("medium")}px) {
12
+ }`})]})}function L(e){var i,o,r;const t=d.useContext(ee),n=d.useContext(he);return a.jsx(ft,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>a.jsx(K,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function Ce(e){var V;const[t,n]=d.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=d.useState(()=>e.columns||[]),[r,s]=d.useState(()=>e.stackColumnsAt||"tablet");function l(S){var I;return((I=i[S])==null?void 0:I.width)||100/i.length}function u(S){const I=t*(i.length-1)/i.length;return`calc(${l(S)}% - ${I}px)`}function c({stackedStyle:S,desktopStyle:I}){return r==="tablet"?S:I}function f({stackedStyle:S,desktopStyle:I}){return r==="never"?I:S}const[h,b]=d.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function x(){return{"--flex-dir":h,"--flex-dir-tablet":c({stackedStyle:h,desktopStyle:"row"})}}function p(S){const I=S===0?0:t,P=u(S),R=`${I}px`,N="100%",$=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:R,"--column-width-mobile":f({stackedStyle:N,desktopStyle:P}),"--column-margin-left-mobile":f({stackedStyle:$,desktopStyle:R}),"--column-width-tablet":c({stackedStyle:N,desktopStyle:P}),"--column-margin-left-tablet":c({stackedStyle:$,desktopStyle:R})}}function E(S){var P,R;return ve(((R=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:R.breakpoints)||{})[S].max}function j(){return`
13
+ @media (max-width: ${E("medium")}px) {
14
14
  .${e.builderBlock.id}-breakpoints {
15
15
  flex-direction: var(--flex-dir-tablet);
16
16
  align-items: stretch;
@@ -22,7 +22,7 @@
22
22
  }
23
23
  }
24
24
 
25
- @media (max-width: ${y("small")}px) {
25
+ @media (max-width: ${E("small")}px) {
26
26
  .${e.builderBlock.id}-breakpoints {
27
27
  flex-direction: var(--flex-dir);
28
28
  align-items: stretch;
@@ -33,17 +33,17 @@
33
33
  margin-left: var(--column-margin-left-mobile) !important;
34
34
  }
35
35
  },
36
- `}return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-f5024694`,style:g(),children:[o.jsx(o.Fragment,{children:o.jsx(q,{styles:j()})}),(P=e.columns)==null?void 0:P.map((S,T)=>o.jsx(G,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[O()]:"builder-column",style:pe(b(T))},children:o.jsx(D,{path:`component.options.columns.${T}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},T))]}),o.jsx("style",{children:`.div-f5024694 {
36
+ `}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-5e636bea`,style:x(),children:[a.jsx(J,{styles:j()}),(V=e.columns)==null?void 0:V.map((S,I)=>a.jsx(Z,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[U()]:"builder-column",style:pe(p(I))},children:a.jsx(L,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},I))]}),a.jsx("style",{children:`.div-5e636bea {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function ve(e){return o.jsx("span",{children:e.children})}function ae(e){return e.replace(/http(s)?:/,"")}function ct(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+a+t+"="+encodeURIComponent(n)}function dt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ae(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),a=n[3],r=t.match("x")?t:`${t}x`;return ae(`${i[0]}_${r}${a}`)}return null}function J(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(a=>a!==i).map(a=>`${ct(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[dt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function ke(e){var a,r,s,l;function t(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),J(d)}else if(e.image&&!e.srcset)return J(d);return J(d)}function n(){var c;return(c=t==null?void 0:t())!=null&&c.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const c={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?c:void 0}return o.jsxs(o.Fragment,{children:[o.jsxs(o.Fragment,{children:[o.jsxs("picture",{children:[n()?o.jsx(o.Fragment,{children:o.jsx("source",{type:"image/webp",srcSet:n()})}):null,o.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-0614da04",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length&&e.fitContent)?o.jsx(o.Fragment,{children:o.jsx("div",{className:"builder-image-sizer div-0614da04",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:e.children}):null,!e.fitContent&&e.children?o.jsx(o.Fragment,{children:o.jsx("div",{className:"div-0614da04-2",children:e.children})}):null]}),o.jsx("style",{children:`.img-0614da04 {
39
+ }`})]})}function we(e){return a.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function ht(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function gt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return le(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]),o=n[3],r=t.match("x")?t:`${t}x`;return le(`${i[0]}_${r}${o}`)}return null}function Q(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(o=>o!==i).map(o=>`${ht(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[gt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ie(e){var o,r,s,l;function t(){var f;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),Q(c)}else if(e.image&&!e.srcset)return Q(c);return Q(c)}function n(){var u;return(u=t==null?void 0:t())!=null&&u.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const u={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?u:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-a0c95e8c",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-a0c95e8c",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&&e.children?a.jsx("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),a.jsx("style",{children:`.img-a0c95e8c {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
- }.div-0614da04 {
42
+ }.div-a0c95e8c {
43
43
  width: 100%;
44
44
  pointer-events: none;
45
45
  font-size: 0;
46
- }.div-0614da04-2 {
46
+ }.div-a0c95e8c-2 {
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  align-items: stretch;
@@ -52,7 +52,7 @@
52
52
  left: 0;
53
53
  width: 100%;
54
54
  height: 100%;
55
- }`})]})}function Ce(e){return o.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const ut={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},mt={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(a=>a.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,c)=>l+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},ft={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},gt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((c,d)=>{const f=document.createElement("img");let p=!1;f.onload=()=>{p=!0,c(f)},f.addEventListener("error",v=>{console.warn("Image load failed",v.error),d(v.error)}),f.src=s,setTimeout(()=>{p||d(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const a=e.get("image"),r=e.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},ht={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},bt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function xt(e){var t,n,i;return o.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:o.jsx(D,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const yt={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"}]},pt={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function we(e){var t;return o.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const St={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 vt(e){const t=u.useRef(null),[n,i]=u.useState(()=>[]),[a,r]=u.useState(()=>[]);return u.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let c=0;c<s.length;c++){const d=s[c];if(d.src){if(n.includes(d.src))continue;n.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(a.includes(d.innerText))continue;try{a.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),o.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const kt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Ct=["text/javascript","application/javascript","application/ecmascript"],wt=e=>Ct.includes(e.type);function It(e){const t=u.useRef(null),[n,i]=u.useState(()=>[]),[a,r]=u.useState(()=>[]),[s,l]=u.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const p=d[f];if(p.src&&!n.includes(p.src)){n.push(p.src);const v=document.createElement("script");v.async=!0,v.src=p.src,document.head.appendChild(v)}else if(wt(p)&&!a.includes(p.innerText))try{a.push(p.innerText),new Function(p.innerText)()}catch(v){console.warn("`Embed`: Error running script:",v)}}}return u.useEffect(()=>{t.current&&!s&&(l(!0),c())},[t.current,s]),o.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Tt={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"}}}]},Et=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],jt=()=>{const e=process.env.NODE_ENV||"production";return Et.includes(e)?e:"production"},Rt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,r)=>a!=null?a[r]:a,e);return i===void 0||i===e?n:i};function Ft(e){var p,v;const t=u.useRef(null),[n,i]=u.useState(()=>"unsubmitted"),[a,r]=u.useState(()=>null),[s,l]=u.useState(()=>"");function c(g){var y,j;const b={...e.builderContext.rootState,...g};e.builderContext.rootSetState?(j=(y=e.builderContext).rootSetState)==null||j.call(y,b):e.builderContext.rootState=b}function d(){return m.isEditing()&&e.previewState||n}function f(g){var y;const b=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")g.preventDefault();else if(b){if(!(e.action||e.sendSubmissionsTo==="email")){g.preventDefault();return}g.preventDefault();const j=g.currentTarget,P=e.customHeaders||{};let S;const T=new FormData(j),F=Array.from(g.currentTarget.querySelectorAll("input,select,textarea")).filter(h=>!!h.name).map(h=>{let E;const N=h.name;if(h instanceof HTMLInputElement)if(h.type==="radio"){if(h.checked)return E=h.name,{key:N,value:E}}else if(h.type==="checkbox")E=h.checked;else if(h.type==="number"||h.type==="range"){const B=h.valueAsNumber;isNaN(B)||(E=B)}else h.type==="file"?E=h.files:E=h.value;else E=h.value;return{key:N,value:E}});let R=e.contentType;if(e.sendSubmissionsTo==="email"&&(R="multipart/form-data"),Array.from(F).forEach(({value:h})=>{(h instanceof File||Array.isArray(h)&&h[0]instanceof File||h instanceof FileList)&&(R="multipart/form-data")}),R!=="application/json")S=T;else{const h={};Array.from(F).forEach(({value:E,key:N})=>{fe(h,N,E)}),S=JSON.stringify(h)}R&&R!=="multipart/form-data"&&(b&&((y=e.action)!=null&&y.includes("zapier.com"))||(P["content-type"]=R));const A=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(A),A.defaultPrevented))return;i("sending");const W=`${jt()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?W:e.action,{body:S,headers:P,method:e.method||"post"}).then(async h=>{let E;const N=h.headers.get("content-type");if(N&&N.indexOf("application/json")!==-1?E=await h.json():E=await h.text(),!h.ok&&e.errorMessagePath){let B=Rt(E,e.errorMessagePath);B&&(typeof B!="string"&&(B=JSON.stringify(B)),l(B),c({formErrorMessage:B}))}if(r(E),i(h.ok?"success":"error"),h.ok){const B=new CustomEvent("submit:success",{detail:{res:h,body:E}});if(t.current){if(t.current.dispatchEvent(B),B.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const x=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(x),x.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},h=>{const E=new CustomEvent("submit:error",{detail:{error:h}});t.current&&(t.current.dispatchEvent(E),E.defaultPrevented)||(r(h),i("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:g=>f(g),...e.attributes,children:[" ",e.builderBlock&&e.builderBlock.children?o.jsx(o.Fragment,{children:(v=(p=e.builderBlock)==null?void 0:p.children)==null?void 0:v.map((g,b)=>o.jsx(U,{block:g,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${b}`))}):null," ",d()==="error"?o.jsx(o.Fragment,{children:o.jsx(D,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext})}):null," ",d()==="sending"?o.jsx(o.Fragment,{children:o.jsx(D,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext})}):null," ",d()==="error"&&a?o.jsx(o.Fragment,{children:o.jsxs("pre",{className:"builder-form-error-text pre-25b9edf0",children:[" ",JSON.stringify(a,null,2)," "]})}):null," ",d()==="success"?o.jsx(o.Fragment,{children:o.jsx(D,{path:"successMessage",blocks:e.successMessage,context:e.builderContext})}):null," "]})," ",o.jsx("style",{children:".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }"})," "]})}const Pt={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 Bt(e){return u.createElement("input",{...e.attributes,key:m.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 Vt={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 At(e){var t;return u.createElement("select",{...e.attributes,value:e.value,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>o.jsx("option",{value:n.value,children:n.name||n.value})))}const Wt={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 Nt(e){return o.jsx("button",{type:"submit",...e.attributes,children:e.text})}const $t={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function Dt(e){return o.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},m.isEditing()&&e.imgSrc||"default-key")}const Lt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]};function Ie(e){var i,a,r,s,l,c,d;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return o.jsxs("div",{style:{position:"relative"},children:[o.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:o.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length))?o.jsx(o.Fragment,{children:o.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:o.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.length&&!e.fitContent?o.jsx(o.Fragment,{children:o.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const Ot=()=>[{component:vt,...St},{component:It,...kt},{component:Ft,...Tt},{component:Bt,...Pt},{component:Nt,...Wt},{component:At,...Vt},{component:Dt,...$t},{component:Ie,...Lt}],re=()=>[{component:de,...ut},{component:Se,...mt},{component:ve,...ft},{component:ke,...gt},{component:Ce,...ht},{component:xt,...bt},{component:Fe,...yt},{component:we,...pt},...Ot()],Mt=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
55
+ }`})]})}function Te(e){return a.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const bt={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},yt={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,u)=>l+u.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},xt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},pt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((u,c)=>{const f=document.createElement("img");let h=!1;f.onload=()=>{h=!0,u(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),c(b.error)}),f.src=s,setTimeout(()=>{h||c(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(s=>{const l=e.get("aspectRatio");e.get("image")===o&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"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}]},St={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>"}}}]},vt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function kt(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(L,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Ct={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"}]},wt={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Ee(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const It={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 Tt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]);return d.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let u=0;u<s.length;u++){const c=s[u];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const f=document.createElement("script");f.async=!0,f.src=c.src,document.head.appendChild(f)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Et={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},jt=["text/javascript","application/javascript","application/ecmascript"],Rt=e=>jt.includes(e.type);function Pt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]),[s,l]=d.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let f=0;f<c.length;f++){const h=c[f];if(h.src&&!n.includes(h.src)){n.push(h.src);const b=document.createElement("script");b.async=!0,b.src=h.src,document.head.appendChild(b)}else if(Rt(h)&&!o.includes(h.innerText))try{o.push(h.innerText),new Function(h.innerText)()}catch(b){console.warn("`Embed`: Error running script:",b)}}}return d.useEffect(()=>{t.current&&!s&&(l(!0),u())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Vt={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"}}}]},Ft=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Bt=()=>{const e=process.env.NODE_ENV||"production";return Ft.includes(e)?e:"production"},At=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i};function Wt(e){var h,b;const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[o,r]=d.useState(()=>null),[s,l]=d.useState(()=>"");function u(x){var E,j;const p={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(j=(E=e.builderContext).rootSetState)==null||j.call(E,p):e.builderContext.rootState=p}function c(){return m.isEditing()&&e.previewState||n}function f(x){var E;const p=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(p){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const j=x.currentTarget,V=e.customHeaders||{};let S;const I=new FormData(j),P=Array.from(x.currentTarget.querySelectorAll("input,select,textarea")).filter(g=>!!g.name).map(g=>{let T;const A=g.name;if(g instanceof HTMLInputElement)if(g.type==="radio"){if(g.checked)return T=g.name,{key:A,value:T}}else if(g.type==="checkbox")T=g.checked;else if(g.type==="number"||g.type==="range"){const F=g.valueAsNumber;isNaN(F)||(T=F)}else g.type==="file"?T=g.files:T=g.value;else T=g.value;return{key:A,value:T}});let R=e.contentType;if(e.sendSubmissionsTo==="email"&&(R="multipart/form-data"),Array.from(P).forEach(({value:g})=>{(g instanceof File||Array.isArray(g)&&g[0]instanceof File||g instanceof FileList)&&(R="multipart/form-data")}),R!=="application/json")S=I;else{const g={};Array.from(P).forEach(({value:T,key:A})=>{be(g,A,T)}),S=JSON.stringify(g)}R&&R!=="multipart/form-data"&&(p&&((E=e.action)!=null&&E.includes("zapier.com"))||(V["content-type"]=R));const N=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(N),N.defaultPrevented))return;i("sending");const $=`${Bt()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?$:e.action,{body:S,headers:V,method:e.method||"post"}).then(async g=>{let T;const A=g.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?T=await g.json():T=await g.text(),!g.ok&&e.errorMessagePath){let F=At(T,e.errorMessagePath);F&&(typeof F!="string"&&(F=JSON.stringify(F)),l(F),u({formErrorMessage:F}))}if(r(T),i(g.ok?"success":"error"),g.ok){const F=new CustomEvent("submit:success",{detail:{res:g,body:T}});if(t.current){if(t.current.dispatchEvent(F),F.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const y=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(y),y.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},g=>{const T=new CustomEvent("submit:error",{detail:{error:g}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(r(g),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>f(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(b=(h=e.builderBlock)==null?void 0:h.children)==null?void 0:b.map((x,p)=>a.jsx(K,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${p}`))}):null,c()==="error"?a.jsx(L,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(L,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(L,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const Nt={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 $t(e){return d.createElement("input",{...e.attributes,key:m.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 Dt={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 Lt(e){var t;return d.createElement("select",{...e.attributes,value:e.value,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>a.jsx("option",{value:n.value,children:n.name||n.value})))}const Mt={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 Ot(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ut={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function Ht(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},m.isEditing()&&e.imgSrc||"default-key")}const Kt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]};function je(e){var i,o,r,s,l,u,c;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length&&!e.fitContent?a.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children}):null]})}const qt=()=>[{component:Tt,...It},{component:Pt,...Et},{component:Wt,...Vt},{component:$t,...Nt},{component:Ot,...Mt},{component:Lt,...Dt},{component:Ht,...Ut},{component:je,...Kt}],ce=()=>[{component:fe,...bt},{component:Ce,...yt},{component:we,...xt},{component:Ie,...pt},{component:Te,...St},{component:kt,...vt},{component:Be,...Ct},{component:Ee,...wt},...qt()],_t=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
56
56
  function getAndSetVariantId() {
57
57
  function setCookie(name, value, days) {
58
58
  let expires = '';
@@ -108,7 +108,7 @@
108
108
  }).join('');
109
109
  styleEl.innerHTML = newStyleStr;
110
110
  }
111
- }`,Ut=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
111
+ }`,zt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
112
112
  if (!navigator.cookieEnabled) {
113
113
  return;
114
114
  }
@@ -142,31 +142,31 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,Te="builderIoAbTest",Ee="builderIoRenderContent",_=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Ht=({canTrack:e,content:t})=>!(!(_(t).length>0)||!e||m.isBrowser()),_t=e=>e==="react"||e==="reactNative",je=_t(m.TARGET),Kt=()=>`
146
- window.${Te} = ${Mt}
147
- window.${Ee} = ${Ut}
148
- `,qt=(e,t)=>`
149
- window.${Te}(
150
- "${t}",${JSON.stringify(e)}, ${je}
151
- )`,zt=({contentId:e,variationId:t})=>`window.${Ee}(
152
- "${t}", "${e}", ${je}
153
- )`;function Y(e){return o.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function se(e){return Math.round(e*1e3)/1e3}const Jt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},Yt=e=>Jt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),le=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,r=se(i/n.width),s=se(a/n.height);return{x:r,y:s}},Gt=e=>{const t=e.target,n=t&&Yt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?le({event:e,target:t}):void 0,builderTargetOffset:n?le({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function Qt(e){var R,A,W,h,E,N,B;const t=u.useRef(null),[n,i]=u.useState(()=>0);u.useState(()=>!0);function a(x){var C,w;const k={...e.builderContextSignal.rootState,...x};e.builderContextSignal.rootSetState?(w=(C=e.builderContextSignal).rootSetState)==null||w.call(C,k):e.setBuilderContextSignal(I=>({...I,rootState:k}))}function r(x){var C,w,I,V,L;const k={...e.builderContextSignal.content,...x,data:{...(C=e.builderContextSignal.content)==null?void 0:C.data,...x==null?void 0:x.data},meta:{...(w=e.builderContextSignal.content)==null?void 0:w.meta,...x==null?void 0:x.meta,breakpoints:((I=x==null?void 0:x.meta)==null?void 0:I.breakpoints)||((L=(V=e.builderContextSignal.content)==null?void 0:V.meta)==null?void 0:L.breakpoints)}};e.setBuilderContextSignal(H=>({...H,content:k}))}u.useState(()=>0);const[s,l]=u.useState(()=>!1),[c,d]=u.useState(()=>e.contentWrapper||"div");function f(x){return m.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:k=>{var I;const{breakpoints:C,contentId:w}=k;!w||w!==((I=e.builderContextSignal.content)==null?void 0:I.id)||C&&(r({meta:{breakpoints:C}}),i(n+1))},animation:k=>{ge(k)},contentUpdate:k=>{r(k),i(n+1)}}})(x)}function p(){var k,C;const x=(C=(k=e.builderContextSignal.content)==null?void 0:k.data)==null?void 0:C.jsCode;x&&M({code:x,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[v,g]=u.useState(()=>({})),[b,y]=u.useState(()=>!1);function j(x){var k,C;if(e.builderContextSignal.content){const w=(k=e.builderContextSignal.content)==null?void 0:k.testVariationId,I=(C=e.builderContextSignal.content)==null?void 0:C.id;m._track({type:"click",canTrack:m.getDefaultCanTrack(e.canTrack),contentId:I,apiKey:e.apiKey,variationId:w!==I?w:void 0,...Gt(x),unique:!b})}b||y(!0)}function P(x){return x.replace(/{{([^}]+)}}/g,(k,C)=>M({code:C,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function S({url:x,key:k}){m.fetch(x).then(C=>C.json()).then(C=>{var I,V;const w={...e.builderContextSignal.rootState,[k]:C};(V=(I=e.builderContextSignal).rootSetState)==null||V.call(I,w),v[k]=!0}).catch(C=>{console.error("error fetching dynamic data",x,C)})}function T(){var k,C,w;const x=(w=(C=(k=e.builderContextSignal.content)==null?void 0:k.data)==null?void 0:C.httpRequests)!=null?w:{};Object.entries(x).forEach(([I,V])=>{if(V&&(!v[I]||m.isEditing())){const L=P(V);S({url:L,key:I})}})}function F(){m.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:m.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return u.useEffect(()=>{var x,k;if(m.isBrowser()){if(m.isEditing()&&(i(n+1),window.addEventListener("message",f),m.registerInsertMenu(),m.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(w=>{var V;const I=m.createRegisterComponentMessage(w);(V=window.parent)==null||V.postMessage(I,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",F)),e.builderContextSignal.content&&m.getDefaultCanTrack(e.canTrack)){const w=(x=e.builderContextSignal.content)==null?void 0:x.testVariationId,I=(k=e.builderContextSignal.content)==null?void 0:k.id,V=e.apiKey;m._track({type:"impression",canTrack:!0,contentId:I,apiKey:V,variationId:w!==I?w:void 0})}if(m.isPreviewing()){const w=new URL(location.href).searchParams,I=w.get("builder.preview"),V=w.get(`builder.preview.${I}`),L=w.get("apiKey")||w.get("builder.space");I===e.model&&L===e.apiKey&&(!e.content||V===e.content.id)&&m.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(H=>{H&&r(H)})}}},[]),u.useEffect(()=>{e.apiKey||m.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),p(),T(),F()},[]),u.useEffect(()=>{e.content&&r(e.content)},[e.content]),u.useEffect(()=>{},[s]),u.useEffect(()=>{p()},[(A=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:A.jsCode]),u.useEffect(()=>{T()},[(h=(W=e.builderContextSignal.content)==null?void 0:W.data)==null?void 0:h.httpRequests]),u.useEffect(()=>{F()},[e.builderContextSignal.rootState]),u.useEffect(()=>{e.data&&a(e.data)},[e.data]),u.useEffect(()=>{e.locale&&a({locale:e.locale})},[e.locale]),u.useEffect(()=>()=>{m.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",F))},[]),o.jsx(Q.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?o.jsx(o.Fragment,{children:u.createElement(c,{key:n,ref:t,onClick:x=>j(x),"builder-content-id":(E=e.builderContextSignal.content)==null?void 0:E.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((N=e.content)==null?void 0:N.testVariationId)||((B=e.content)==null?void 0:B.id)}`},e.children)}):null})}const Xt=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let a="";if(i&&t&&n&&(a+=`
145
+ }`,Re="builderIoAbTest",Pe="builderIoRenderContent",_=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Jt=({canTrack:e,content:t})=>!(!(_(t).length>0)||!e||m.isBrowser()),Yt=e=>e==="react"||e==="reactNative",Ve=Yt(m.TARGET),Gt=()=>`
146
+ window.${Re} = ${_t}
147
+ window.${Pe} = ${zt}
148
+ `,Qt=(e,t)=>`
149
+ window.${Re}(
150
+ "${t}",${JSON.stringify(e)}, ${Ve}
151
+ )`,Xt=({contentId:e,variationId:t})=>`window.${Pe}(
152
+ "${t}", "${e}", ${Ve}
153
+ )`;function X(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function ue(e){return Math.round(e*1e3)/1e3}const Zt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},en=e=>Zt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),de=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=ue(i/n.width),s=ue(o/n.height);return{x:r,y:s}},tn=e=>{const t=e.target,n=t&&en(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?de({event:e,target:t}):void 0,builderTargetOffset:n?de({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function nn(e){var R,N,$,g,T,A,F;const t=d.useRef(null),[n,i]=d.useState(()=>0);d.useState(()=>!0);function o(y){var k,C;const v={...e.builderContextSignal.rootState,...y};e.builderContextSignal.rootSetState?(C=(k=e.builderContextSignal).rootSetState)==null||C.call(k,v):e.setBuilderContextSignal(w=>({...w,rootState:v}))}function r(y){var k,C,w,B,M;const v={...e.builderContextSignal.content,...y,data:{...(k=e.builderContextSignal.content)==null?void 0:k.data,...y==null?void 0:y.data},meta:{...(C=e.builderContextSignal.content)==null?void 0:C.meta,...y==null?void 0:y.meta,breakpoints:((w=y==null?void 0:y.meta)==null?void 0:w.breakpoints)||((M=(B=e.builderContextSignal.content)==null?void 0:B.meta)==null?void 0:M.breakpoints)}};e.setBuilderContextSignal(q=>({...q,content:v}))}d.useState(()=>0);const[s,l]=d.useState(()=>!1),[u,c]=d.useState(()=>e.contentWrapper||"div");function f(y){return m.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:v=>{var w;const{breakpoints:k,contentId:C}=v;!C||C!==((w=e.builderContextSignal.content)==null?void 0:w.id)||k&&(r({meta:{breakpoints:k}}),i(n+1))},animation:v=>{ye(v)},contentUpdate:v=>{r(v),i(n+1)}}})(y)}function h(){var v,k;const y=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.jsCode;y&&H({code:y,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[b,x]=d.useState(()=>({})),[p,E]=d.useState(()=>!1);function j(y){var v,k;if(e.builderContextSignal.content){const C=(v=e.builderContextSignal.content)==null?void 0:v.testVariationId,w=(k=e.builderContextSignal.content)==null?void 0:k.id;m._track({type:"click",canTrack:m.getDefaultCanTrack(e.canTrack),contentId:w,apiKey:e.apiKey,variationId:C!==w?C:void 0,...tn(y),unique:!p})}p||E(!0)}function V(y){return y.replace(/{{([^}]+)}}/g,(v,k)=>String(H({code:k,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})))}function S({url:y,key:v}){m.fetch(y).then(k=>k.json()).then(k=>{var w,B;const C={...e.builderContextSignal.rootState,[v]:k};(B=(w=e.builderContextSignal).rootSetState)==null||B.call(w,C),b[v]=!0}).catch(k=>{console.error("error fetching dynamic data",y,k)})}function I(){var v,k,C;const y=(C=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.httpRequests)!=null?C:{};Object.entries(y).forEach(([w,B])=>{if(B&&(!b[w]||m.isEditing())){const M=V(B);S({url:M,key:w})}})}function P(){m.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:m.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return d.useEffect(()=>{var y,v;if(m.isBrowser()){if(m.isEditing()&&(i(n+1),window.addEventListener("message",f),m.registerInsertMenu(),m.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(C=>{var B;const w=m.createRegisterComponentMessage(C);(B=window.parent)==null||B.postMessage(w,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",P)),e.builderContextSignal.content&&m.getDefaultCanTrack(e.canTrack)){const C=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId,w=(v=e.builderContextSignal.content)==null?void 0:v.id,B=e.apiKey;m._track({type:"impression",canTrack:!0,contentId:w,apiKey:B,variationId:C!==w?C:void 0})}if(m.isPreviewing()){const C=new URL(location.href).searchParams,w=C.get("builder.preview"),B=C.get(`builder.preview.${w}`),M=C.get("apiKey")||C.get("builder.space");w===e.model&&M===e.apiKey&&(!e.content||B===e.content.id)&&m.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(q=>{q&&r(q)})}}},[]),d.useEffect(()=>{e.apiKey||m.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),h(),I(),P()},[]),d.useEffect(()=>{e.content&&r(e.content)},[e.content]),d.useEffect(()=>{},[s]),d.useEffect(()=>{h()},[(N=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:N.jsCode]),d.useEffect(()=>{I()},[(g=($=e.builderContextSignal.content)==null?void 0:$.data)==null?void 0:g.httpRequests]),d.useEffect(()=>{P()},[e.builderContextSignal.rootState]),d.useEffect(()=>{e.data&&o(e.data)},[e.data]),d.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),d.useEffect(()=>()=>{m.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",P))},[]),a.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?d.createElement(u,{key:n,ref:t,onClick:y=>j(y),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((A=e.content)==null?void 0:A.testVariationId)||((F=e.content)==null?void 0:F.id)}`},e.children):null})}const on=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
154
154
  @font-face {
155
155
  font-family: "${t}";
156
156
  src: local("${n}"), url('${i}') format('woff2');
157
157
  font-display: fallback;
158
158
  font-weight: 400;
159
159
  }
160
- `.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const d=e.files[l];d&&d!==i&&(a+=`
160
+ `.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const c=e.files[l];c&&c!==i&&(o+=`
161
161
  @font-face {
162
162
  font-family: "${t}";
163
- src: url('${d}') format('woff2');
163
+ src: url('${c}') format('woff2');
164
164
  font-display: fallback;
165
165
  font-weight: ${l};
166
166
  }
167
- `.trim())}return a},Zt=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Xt(n)))==null?void 0:t.join(" "))||""},en=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function tn(e){const[t,n]=u.useState(()=>`
168
- ${en({cssCode:e.cssCode,contentId:e.contentId})}
169
- ${Zt({customFonts:e.customFonts})}
167
+ `.trim())}return o},an=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>on(n)))==null?void 0:t.join(" "))||""},rn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function sn(e){const[t,n]=d.useState(()=>`
168
+ ${rn({cssCode:e.cssCode,contentId:e.contentId})}
169
+ ${an({customFonts:e.customFonts})}
170
170
 
171
171
  .builder-button {
172
172
  all: unset;
@@ -184,4 +184,4 @@ ${Zt({customFonts:e.customFonts})}
184
184
  text-align: inherit;
185
185
  font-family: inherit;
186
186
  }
187
- `.trim());return o.jsx(q,{styles:t})}const nn=({content:e,data:t,locale:n})=>{var r,s,l;const i={},a=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},on=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ce(e){var c,d,f,p,v,g,b;const[t,n]=u.useState(()=>{var y,j;return zt({variationId:(y=e.content)==null?void 0:y.testVariationId,contentId:(j=e.content)==null?void 0:j.id})});function i(y){l(j=>({...j,rootState:y}))}const[a,r]=u.useState(()=>[...re(),...e.customComponents||[]].reduce((y,{component:j,...P})=>({...y,[P.name]:{component:j,...m.serializeComponentInfo(P)}}),{})),[s,l]=u.useState(()=>({content:on({content:e.content,data:e.data}),localState:void 0,rootState:nn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...re(),...e.customComponents||[]].reduce((y,{component:j,...P})=>({...y,[P.name]:m.serializeComponentInfo(P)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return o.jsx(ue.Provider,{value:{registeredComponents:a},children:o.jsxs(Qt,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?o.jsx(o.Fragment,{children:o.jsx(Y,{scriptStr:t})}):null,o.jsx(o.Fragment,{children:o.jsx(tn,{contentId:(c=s.content)==null?void 0:c.id,cssCode:(f=(d=s.content)==null?void 0:d.data)==null?void 0:f.cssCode,customFonts:(v=(p=s.content)==null?void 0:p.data)==null?void 0:v.customFonts})}),o.jsx(D,{blocks:(b=(g=s.content)==null?void 0:g.data)==null?void 0:b.blocks,context:s,registeredComponents:a,linkComponent:e.linkComponent})]})})}function Re(e){var s,l;const[t,n]=u.useState(()=>Ht({canTrack:m.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var c;return qt(_(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((c=e.content)==null?void 0:c.id)||"")}function a(){return _(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")}function r(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:m.handleABTestingSync({item:e.content,canTrack:m.getDefaultCanTrack(e.canTrack)})}return u.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[!e.__isNestedRender&&m.TARGET!=="reactNative"?o.jsx(o.Fragment,{children:o.jsx(Y,{scriptStr:Kt()})}):null,t?o.jsxs(o.Fragment,{children:[o.jsx(q,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:a()}),o.jsx(Y,{scriptStr:i()}),(l=_(e.content))==null?void 0:l.map(c=>o.jsx(ce,{content:c,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},c.testVariationId))]}):null,o.jsx(ce,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const an=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return m.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{m.logger.error("Could not fetch symbol content: ",n)})};function Fe(e){var r,s,l,c;function t(){var d,f;return[e.attributes[O()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=u.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content});function a(){n||an({symbol:e.symbol,builderContextValue:e.builderContext}).then(d=>{d&&i(d)})}return u.useEffect(()=>{},[]),u.useEffect(()=>{a()},[e.symbol]),o.jsx("div",{...e.attributes,className:t(),children:o.jsx(Re,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(c=e.symbol)==null?void 0:c.model,content:n,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.Blocks=D;exports.Button=de;exports.Columns=Se;exports.Content=Re;exports.Fragment=ve;exports.Image=ke;exports.Section=Ce;exports.Symbol=Fe;exports.Text=we;exports.Video=Ie;
187
+ `.trim());return a.jsx(J,{styles:t})}const ln=({content:e,data:t,locale:n})=>{var r,s,l;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(u=>{u.name&&u.defaultValue!==void 0&&(i[u.name]=u.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},cn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function me(e){var u,c,f,h,b,x,p;const[t,n]=d.useState(()=>{var E,j;return Xt({variationId:(E=e.content)==null?void 0:E.testVariationId,contentId:(j=e.content)==null?void 0:j.id})});function i(E){l(j=>({...j,rootState:E}))}const[o,r]=d.useState(()=>[...ce(),...e.customComponents||[]].reduce((E,{component:j,...V})=>({...E,[V.name]:{component:j,...m.serializeComponentInfo(V)}}),{})),[s,l]=d.useState(()=>({content:cn({content:e.content,data:e.data}),localState:void 0,rootState:ln({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ce(),...e.customComponents||[]].reduce((E,{component:j,...V})=>({...E,[V.name]:m.serializeComponentInfo(V)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(he.Provider,{value:{registeredComponents:o},children:a.jsxs(nn,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?a.jsx(X,{scriptStr:t}):null,a.jsx(sn,{contentId:(u=s.content)==null?void 0:u.id,cssCode:(f=(c=s.content)==null?void 0:c.data)==null?void 0:f.cssCode,customFonts:(b=(h=s.content)==null?void 0:h.data)==null?void 0:b.customFonts}),a.jsx(L,{blocks:(p=(x=s.content)==null?void 0:x.data)==null?void 0:p.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Fe(e){var s,l;const[t,n]=d.useState(()=>Jt({canTrack:m.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var u;return Qt(_(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((u=e.content)==null?void 0:u.id)||"")}function o(){return _(e.content).map(u=>`.variant-${u.testVariationId} { display: none; } `).join("")}function r(){var u;return t?{...e.content,testVariationId:(u=e.content)==null?void 0:u.id}:m.handleABTestingSync({item:e.content,canTrack:m.getDefaultCanTrack(e.canTrack)})}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.__isNestedRender&&m.TARGET!=="reactNative"?a.jsx(X,{scriptStr:Gt()}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:o()}),a.jsx(X,{scriptStr:i()}),(l=_(e.content))==null?void 0:l.map(u=>a.jsx(me,{content:u,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},u.testVariationId))]}):null,a.jsx(me,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const un=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return m.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{m.logger.error("Could not fetch symbol content: ",n)})};function Be(e){var r,s,l,u;function t(){var c,f;return[e.attributes[U()],"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=d.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){n||un({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return d.useEffect(()=>{},[]),d.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(Fe,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(u=e.symbol)==null?void 0:u.model,content:n,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.Blocks=L;exports.Button=fe;exports.Columns=Ce;exports.Content=Fe;exports.Fragment=we;exports.Image=Ie;exports.Section=Te;exports.Symbol=Be;exports.Text=Ee;exports.Video=je;