@builder.io/sdk-react 2.0.16 → 2.0.21

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 (83) hide show
  1. package/lib/browser/blocks-exports.cjs +31 -31
  2. package/lib/browser/blocks-exports.mjs +852 -829
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +22 -23
  5. package/lib/browser/{server-entry-c1666709.cjs → server-entry-6e52be8e.cjs} +2 -2
  6. package/lib/browser/{server-entry-1db0d96b.js → server-entry-8f273525.js} +1 -3
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-7c1c7c56.js → accordion-0fa0cd9f.js} +1 -1
  10. package/lib/edge/{accordion-09162a27.cjs → accordion-98e5d925.cjs} +1 -1
  11. package/lib/edge/blocks-4dac2e8c.cjs +12 -0
  12. package/lib/edge/{blocks-46c07b56.js → blocks-805edb5d.js} +296 -276
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-f2daea13.cjs → button-04692c59.cjs} +1 -1
  16. package/lib/edge/{button-a923f8ff.js → button-8c912189.js} +2 -2
  17. package/lib/edge/columns-4d8db53c.cjs +28 -0
  18. package/lib/edge/{columns-eee4f51c.js → columns-70a13cfe.js} +8 -9
  19. package/lib/edge/content-variants-7570438f.cjs +134 -0
  20. package/lib/edge/{content-variants-1368cab1.js → content-variants-d11198bc.js} +306 -309
  21. package/lib/edge/{evaluate-93701356.js → evaluate-29e9d055.js} +736 -711
  22. package/lib/edge/{evaluate-4c9b2e86.cjs → evaluate-826010e9.cjs} +13 -15
  23. package/lib/edge/form-13c77d47.cjs +1 -0
  24. package/lib/edge/{form-d0eb0af4.js → form-28c6dcde.js} +16 -17
  25. package/lib/edge/{get-class-prop-name-7cd1376f.cjs → get-class-prop-name-182b0edb.cjs} +1 -1
  26. package/lib/edge/{get-class-prop-name-1c373615.js → get-class-prop-name-c9e11804.js} +1 -1
  27. package/lib/edge/{image-eebfcbac.cjs → image-54d2f755.cjs} +3 -3
  28. package/lib/edge/{image-6a074aab.js → image-6970c193.js} +24 -24
  29. package/lib/edge/{img-6c8139db.cjs → img-8f2d03d2.cjs} +1 -1
  30. package/lib/edge/{img-6e16ade6.js → img-ca1be569.js} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/{input-c78fef2b.cjs → input-0456a323.cjs} +1 -1
  34. package/lib/edge/{input-a7e9c157.js → input-3db08208.js} +1 -1
  35. package/lib/edge/{select-3cf593bd.js → select-251dfaa4.js} +1 -1
  36. package/lib/edge/{select-bd1e231b.cjs → select-b851ff58.cjs} +1 -1
  37. package/lib/edge/{server-entry-6b3ad048.js → server-entry-05e6ebef.js} +1 -3
  38. package/lib/edge/{server-entry-d09af943.cjs → server-entry-75427eb3.cjs} +2 -2
  39. package/lib/edge/server-entry.cjs +1 -1
  40. package/lib/edge/server-entry.mjs +1 -1
  41. package/lib/edge/slot-279f992e.cjs +1 -0
  42. package/lib/edge/{slot-a5a9a30f.js → slot-76c2cebc.js} +6 -7
  43. package/lib/edge/{symbol-9de15518.cjs → symbol-020487c5.cjs} +1 -1
  44. package/lib/edge/{symbol-77d331c6.js → symbol-47130603.js} +2 -2
  45. package/lib/edge/{tabs-63d6ea85.js → tabs-3cc397e4.js} +13 -14
  46. package/lib/edge/tabs-c6053c2d.cjs +1 -0
  47. package/lib/edge/{text-4d508bbc.js → text-29ef4fd5.js} +8 -9
  48. package/lib/edge/text-c9d83141.cjs +1 -0
  49. package/lib/node/blocks-exports.cjs +31 -31
  50. package/lib/node/blocks-exports.mjs +807 -822
  51. package/lib/node/index.cjs +1 -1
  52. package/lib/node/index.mjs +2 -2
  53. package/lib/node/init.cjs +1 -1
  54. package/lib/node/init.mjs +2 -2
  55. package/lib/node/{server-entry-1db0d96b.js → server-entry-83392238.js} +1 -2
  56. package/lib/node/{server-entry-c1666709.cjs → server-entry-b5908591.cjs} +2 -2
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/lib/node/{should-force-browser-runtime-in-node-1188ea7b.js → should-force-browser-runtime-in-node-31b1e2f2.js} +57 -30
  60. package/lib/node/should-force-browser-runtime-in-node-391032cf.cjs +48 -0
  61. package/package.json +1 -1
  62. package/types/components/awaiter.d.ts +14 -0
  63. package/types/constants/sdk-version.d.ts +1 -1
  64. package/types/context/component-reference-types.d.ts +4 -0
  65. package/types/context/types.d.ts +2 -1
  66. package/types/functions/evaluate/browser-runtime/browser.d.ts +0 -6
  67. package/types/functions/evaluate/helpers.d.ts +5 -0
  68. package/lib/browser/init.cjs +0 -8
  69. package/lib/browser/init.mjs +0 -64
  70. package/lib/browser/should-force-browser-runtime-in-node-00f3cfef.js +0 -17
  71. package/lib/browser/should-force-browser-runtime-in-node-f768fb5d.cjs +0 -1
  72. package/lib/edge/blocks-273f24cc.cjs +0 -12
  73. package/lib/edge/columns-0b8c2260.cjs +0 -28
  74. package/lib/edge/content-variants-575b5dbf.cjs +0 -134
  75. package/lib/edge/form-bd184008.cjs +0 -1
  76. package/lib/edge/init.cjs +0 -8
  77. package/lib/edge/init.mjs +0 -64
  78. package/lib/edge/should-force-browser-runtime-in-node-2b14e4a8.cjs +0 -1
  79. package/lib/edge/should-force-browser-runtime-in-node-560bddfb.js +0 -17
  80. package/lib/edge/slot-ab7fc875.cjs +0 -1
  81. package/lib/edge/tabs-e6fa664e.cjs +0 -1
  82. package/lib/edge/text-ab5d2747.cjs +0 -1
  83. package/lib/node/should-force-browser-runtime-in-node-37010e2f.cjs +0 -48
@@ -1,49 +1,49 @@
1
- "use client";"use strict";var Le=Object.defineProperty;var Oe=(e,t,n)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var J=(e,t,n)=>(Oe(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),x=require("./server-entry-c1666709.cjs"),d=require("react"),Ue=require("./should-force-browser-runtime-in-node-f768fb5d.cjs"),Me=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),He=e=>typeof e=="string"&&Me.has(e.toLowerCase());function ne(e){return a.jsx(a.Fragment,{children:He(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(x.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function he(e){function t(){return{...e.attributes,[U()]:`${e.link?"":"builder-button"} ${e.attributes[U()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(ne,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const K=d.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""}),be=d.createContext({registeredComponents:{}});function qe(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}function Ke(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}const _e=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),ze=()=>({isEditing:x.isEditing(),isBrowser:x.isBrowser(),isServer:!x.isBrowser(),getUserAttributes:()=>x.getUserAttributes()}),Je=(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:l})=>{const s=_e({builder:t,context:n,event:i,state:pe({rootState:l,localState:o,rootSetState:r})});return new Function(...s.map(([u])=>u),e)(...s.map(([,u])=>u))};function pe({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?pe({rootState:r,localState:void 0,rootSetState:n?l=>{i[o]=l,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}const Ge=e=>(x.isBrowser()||Ue.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0}),ae(e)),Ye=!0,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})}};J(W,"cacheLimit",20),J(W,"cache",new Map);let D=W;function L({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:l=!0,enableCache:s}){if(e==="")return;const u={code:Je(e,{isExpression:l}),builder:ze(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(s&&!Ye){const c=D.getCacheKey(u),m=D.getCachedValue(c);if(m)return m.value}try{const c=Ge(u);if(s){const m=D.getCacheKey(u);D.setCachedValue(m,c)}return c}catch(c){x.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const ie=e=>JSON.parse(JSON.stringify(e)),xe=(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,l)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[l+1]))>>0===+i[l+1]?[]:{},e)[i[i.length-1]]=n,e};function ee(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>ee(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=ee(e[n]));return t}const Qe=["svelte","vue","angular","qwik","solid"].includes(x.TARGET),Xe=e=>{if(Qe){const t=ie(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=ee(Ke(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},Ze=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=Xe(e);for(const l in e.bindings){const s=e.bindings[l],u=L({code:s,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});xe(r,l,u)}return r};function et({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const l=e;return n?Ze({block:l,localState:i,rootState:o,rootSetState:r,context:t}):l}const _=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function tt(e,t,n={}){let i,o,r,l=null,s=0;const u=function(){s=n.leading===!1?0:Date.now(),l=null,r=e.apply(i,o),l||(i=o=null)};return function(){const c=Date.now();!s&&n.leading===!1&&(s=c);const m=t-(c-s);return i=this,o=arguments,m<=0||m>t?(l&&(clearTimeout(l),l=null),s=c,r=e.apply(i,o),l||(i=o=null)):!l&&n.trailing!==!1&&(l=setTimeout(u,m)),r}}function O(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}function nt(e){for(const t of e)switch(t.trigger){case"pageLoad":Se(t);break;case"scrollInView":ot(t);break}}function ye(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ve(e,t){const n=it(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,l=[o,r];for(const s of l)for(const u of n)u in s||(s[u]=i[u])}function it(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function Se(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ve(e,n),n.style.transition="none",n.style.transitionDelay="0",O(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),O(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function ot(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ve(e,n);let i=!1,o=!1;function r(){!i&&s(n)?(i=!0,o=!0,setTimeout(()=>{O(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",l),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!s(n)&&(i=!1,O(n.style,e.steps[0].styles))}const l=tt(r,200,{leading:!1});function s(m){const b=m.getBoundingClientRect(),f=window.innerHeight,h=(e.thresholdPercent||0)/100*f;return b.bottom>h&&b.top<f-h}const u=e.steps[0].styles;function c(){O(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",l,{capture:!0,passive:!0}),r()})}const ke=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${_(n)}: ${i};`}).filter(x.checkIsDefined),at=e=>ke(e).join(`
2
- `),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
- ${at(n)}
1
+ "use client";"use strict";var We=Object.defineProperty;var Ne=(e,t,n)=>t in e?We(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var q=(e,t,n)=>(Ne(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),p=require("./server-entry-6e52be8e.cjs"),g=require("react"),$e=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),De=e=>typeof e=="string"&&$e.has(e.toLowerCase());function X(e){return a.jsx(a.Fragment,{children:De(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 $=()=>{switch(p.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function de(e){function t(){return{...e.attributes,[$()]:`${e.link?"":"builder-button"} ${e.attributes[$()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(X,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const U=g.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""}),me=g.createContext({registeredComponents:{}});function Oe(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}function Le(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}const Ue=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Me=()=>({isEditing:p.isEditing(),isBrowser:p.isBrowser(),isServer:!p.isBrowser(),getUserAttributes:()=>p.getUserAttributes()}),He=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function fe({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?fe({rootState:r,localState:void 0,rootSetState:n?l=>{i[o]=l,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}const te=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:l})=>{const s=Ue({builder:t,context:n,event:i,state:fe({rootState:l,localState:o,rootSetState:r})});return new Function(...s.map(([u])=>u),e)(...s.map(([,u])=>u))};function qe(){var e;return typeof process!="undefined"&&p.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Ke=({shouldLogWarning:e})=>{var o;if(!qe())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(o=process.env.NODE_OPTIONS)==null?void 0:o.includes("--no-node-snapshot");return t&&n&&!i?(e&&p.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},_e=e=>(p.isBrowser()||Ke({shouldLogWarning:!0}),te(e)),ze=!0,A=class A{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return A.cache.get(t)}static setCachedValue(t,n){A.cache.size>20&&A.cache.delete(A.cache.keys().next().value),A.cache.set(t,{value:n})}};q(A,"cacheLimit",20),q(A,"cache",new Map);let F=A;function W({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:l=!0,enableCache:s}){if(e==="")return;const u={code:He(e,{isExpression:l}),builder:Me(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(s&&!ze){const c=F.getCacheKey(u),f=F.getCachedValue(c);if(f)return f.value}try{const c=_e(u);if(s){const f=F.getCacheKey(u);F.setCachedValue(f,c)}return c}catch(c){p.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const Z=e=>JSON.parse(JSON.stringify(e)),he=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,r,l)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[l+1]))>>0===+i[l+1]?[]:{},e)[i[i.length-1]]=n,e};function Y(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Y(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Y(e[n]));return t}const Je=["svelte","vue","angular","qwik","solid"].includes(p.TARGET),Ge=e=>{if(Je){const t=Z(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=Y(Le(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},Ye=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=Ge(e);for(const l in e.bindings){const s=e.bindings[l],u=W({code:s,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});he(r,l,u)}return r};function Qe({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const l=e;return n?Ye({block:l,localState:i,rootState:o,rootSetState:r,context:t}):l}const M=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Xe(e,t,n={}){let i,o,r,l=null,s=0;const u=function(){s=n.leading===!1?0:Date.now(),l=null,r=e.apply(i,o),l||(i=o=null)};return function(){const c=Date.now();!s&&n.leading===!1&&(s=c);const f=t-(c-s);return i=this,o=arguments,f<=0||f>t?(l&&(clearTimeout(l),l=null),s=c,r=e.apply(i,o),l||(i=o=null)):!l&&n.trailing!==!1&&(l=setTimeout(u,f)),r}}function N(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}function Ze(e){for(const t of e)switch(t.trigger){case"pageLoad":pe(t);break;case"scrollInView":tt(t);break}}function ge(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function be(e,t){const n=et(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,l=[o,r];for(const s of l)for(const u of n)u in s||(s[u]=i[u])}function et(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 pe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ge(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{be(e,n),n.style.transition="none",n.style.transitionDelay="0",N(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${M(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),N(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function tt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ge(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{be(e,n);let i=!1,o=!1;function r(){!i&&s(n)?(i=!0,o=!0,setTimeout(()=>{N(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",l),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!s(n)&&(i=!1,N(n.style,e.steps[0].styles))}const l=Xe(r,200,{leading:!1});function s(f){const x=f.getBoundingClientRect(),h=window.innerHeight,b=(e.thresholdPercent||0)/100*h;return x.bottom>b&&x.top<h-b}const u=e.steps[0].styles;function c(){N(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${M(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",l,{capture:!0,passive:!0}),r()})}const xe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${M(n)}: ${i};`}).filter(p.checkIsDefined),nt=e=>xe(e).join(`
2
+ `),O=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
+ ${nt(n)}
4
4
  }`;return e?`${e} {
5
5
  ${i}
6
- }`:i};function rt({style:e}){return e}const lt=({block:e,context:t})=>Ce(rt({style:e.style||{},context:t,block:e}));function Ce(e){switch(x.TARGET){case"svelte":case"vue":case"solid":case"angular":return ke(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const st=({block:e,registeredComponents:t})=>{var o;const n=(o=e.component)==null?void 0:o.name;if(!n)return null;const i=t[n];if(i)return i;console.warn(`
6
+ }`:i};function it({style:e}){return e}const ot=({block:e,context:t})=>ye(it({style:e.style||{},context:t,block:e}));function ye(e){switch(p.TARGET){case"svelte":case"vue":case"solid":case"angular":return xe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const at=({block:e,registeredComponents:t})=>{var o;const n=(o=e.component)==null?void 0:o.name;if(!n)return null;const i=t[n];if(i)return i;console.warn(`
7
7
  Could not find a registered component named "${n}".
8
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},ct=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=L({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(),l=n.itemName||(r?r+"Item":"item");return o.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[l]:u,[`$${l}Index`]:c}},block:i}))},ut=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},dt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},mt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},ft=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},Te={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Te)=>`@media (max-width: ${t[e].max}px)`,we=({small:e,medium:t})=>{const n=ie(Te);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 z(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function gt(e){function t(){const i=e.block;return x.checkIsDefined(i.hide)?!i.hide:x.checkIsDefined(i.show)?i.show:!0}function n(){var g,E,j;const i=e.block,o=i.responsiveStyles,r=e.context.content,l=we(((g=r==null?void 0:r.meta)==null?void 0:g.breakpoints)||{}),s=o==null?void 0:o.large,u=o==null?void 0:o.medium,c=o==null?void 0:o.small,m=i.id;if(!m)return"";const b=s?H({className:m,styles:s}):"",f=u?H({className:m,styles:u,mediaQuery:re("medium",l)}):"",S=c?H({className:m,styles:c,mediaQuery:re("small",l)}):"",h=i.animations&&i.animations.find(B=>B.trigger==="hover");let y="";if(h){const B=((j=(E=h.steps)==null?void 0:E[1])==null?void 0:j.styles)||{};y=H({className:`${m}:hover`,styles:{...B,transition:`all ${h.duration}s ${_(h.easing)}`,transitionDelay:h.delay?`${h.delay}s`:"0s"}})||""}return[b,f,S,y].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(z,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function ht(e){return e.charAt(0).toUpperCase()+e.slice(1)}const bt=e=>`on${ht(e)}`,pt=(e,t)=>n=>L({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function Ie(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 l=bt(o);if(e.stripPrefix)switch(x.TARGET){case"vue":l=l.replace("v-on:","");break;case"svelte":l=l.replace("on:","");break}t[l]=pt(r,e)}return t}function xt({properties:e}){return e}const yt=e=>({href:e.href});function oe({block:e,context:t}){var i;const n={...yt(e),...e.properties,"builder-id":e.id,style:lt({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return xt({properties:n,context:t,block:e})}function vt(e){return a.jsx(ne,{TagName:e.Wrapper,attributes:oe({block:e.block,context:e.context}),actionAttributes:Ie({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function St(e){function t(){return e.includeBlockProps?{...oe({block:e.block,context:e.context}),...Ie({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const kt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:l})=>{const s={...e,...o?{attributes:oe({block:t,context:l})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:s};function le(e){var i;const[t,n]=d.useState(()=>e.isInteractive?St:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...kt({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(M,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function se(e){const[t,n]=d.useState(()=>e.repeatContext);return a.jsx(K.Provider,{value:t,children:a.jsx(M,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function M(e){var m,b,f,S;function t(){return ct({block:e.block,context:e.context})}const[n,i]=d.useState(()=>({value:null,update:!1}));function o(){var y;if(n.value&&!n.update&&!x.isPreviewing())return n.value;const h=(y=e.block.repeat)!=null&&y.collection?e.block:et({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return n.value=h,n.update=!1,h}function r(){return st({block:o(),registeredComponents:e.registeredComponents})}function l(){var y;return e.block.tagName==="a"||((y=o().properties)==null?void 0:y.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var g,E;if((g=e.block.repeat)!=null&&g.collection)return!!((E=t==null?void 0:t())!=null&&E.length);const h="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!h}function u(){var y,g;return!((y=r==null?void 0:r())!=null&&y.component)&&!t()?(g=o().children)!=null?g:[]:[]}function c(){var h,y,g,E;return{blockChildren:(h=o().children)!=null?h:[],componentRef:(y=r==null?void 0:r())==null?void 0:y.component,componentOptions:{...qe(o()),...mt(r(),o()),...ft(r(),e.context),...ut(r(),e.linkComponent),...dt(r(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((g=r==null?void 0:r())==null?void 0:g.noWrap)===!0,isInteractive:!((E=r==null?void 0:r())!=null&&E.isRSC&&x.TARGET==="rsc")}}return d.useEffect(()=>{const h=o().id,y=o().animations;y&&h&&nt(y.map(g=>({...g,elementId:h})))},[]),d.useEffect(()=>{n.update=!0}),a.jsx(a.Fragment,{children:s()?a.jsxs(a.Fragment,{children:[a.jsx(gt,{block:o(),context:e.context}),(m=r==null?void 0:r())!=null&&m.noWrap?t()?a.jsx(a.Fragment,{children:(S=t())==null?void 0:S.map((h,y)=>a.jsx(se,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):a.jsx(le,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}):a.jsx(a.Fragment,{children:t()?a.jsx(a.Fragment,{children:(f=t())==null?void 0:f.map((h,y)=>a.jsx(se,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):a.jsxs(vt,{Wrapper:l(),block:o(),context:e.context,children:[a.jsx(le,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(b=u())==null?void 0:b.map(h=>a.jsx(M,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function Ct(e){const t=d.useRef(null);function n(){var r;return"builder-blocks"+((r=e.blocks)!=null&&r.length?"":" no-blocks")}function i(){var r,l;x.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function o(){var r,l;x.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-51ef31b4","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:r=>i(),onMouseEnter:r=>o(),onKeyPress:r=>i(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-51ef31b4 {
8
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},rt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=W({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(),l=n.itemName||(r?r+"Item":"item");return o.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[l]:u,[`$${l}Index`]:c}},block:i}))},lt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},st=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},ct=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},ut=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ve={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=ve)=>`@media (max-width: ${t[e].max}px)`,Se=({small:e,medium:t})=>{const n=Z(ve);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 H(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function dt(e){function t(){const i=e.block;return p.checkIsDefined(i.hide)?!i.hide:p.checkIsDefined(i.show)?i.show:!0}function n(){var S,R,I;const i=e.block,o=i.responsiveStyles,r=e.context.content,l=Se(((S=r==null?void 0:r.meta)==null?void 0:S.breakpoints)||{}),s=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 x=s?O({className:f,styles:s}):"",h=u?O({className:f,styles:u,mediaQuery:ne("medium",l)}):"",k=c?O({className:f,styles:c,mediaQuery:ne("small",l)}):"",b=i.animations&&i.animations.find(T=>T.trigger==="hover");let C="";if(b){const T=((I=(R=b.steps)==null?void 0:R[1])==null?void 0:I.styles)||{};C=O({className:`${f}:hover`,styles:{...T,transition:`all ${b.duration}s ${M(b.easing)}`,transitionDelay:b.delay?`${b.delay}s`:"0s"}})||""}return[x,h,k,C].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(H,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function mt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ft=e=>`on${mt(e)}`,ht=(e,t)=>n=>W({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 l=ft(o);if(e.stripPrefix)switch(p.TARGET){case"vue":l=l.replace("v-on:","");break;case"svelte":l=l.replace("on:","");break}t[l]=ht(r,e)}return t}function gt({properties:e}){return e}const bt=e=>({href:e.href});function ee({block:e,context:t}){var i;const n={...bt(e),...e.properties,"builder-id":e.id,style:ot({block:e,context:t}),[$()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return gt({properties:n,context:t,block:e})}function pt(e){return a.jsx(X,{TagName:e.Wrapper,attributes:ee({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 xt(e){return g.useEffect(()=>{},[]),a.jsx(a.Fragment,{children:e.children})}function yt(e){function t(){return e.includeBlockProps?{...ee({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})}:{}}return a.jsx(a.Fragment,{children:e.Wrapper.load?a.jsx(a.Fragment,{children:a.jsx(xt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):a.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const vt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:l})=>{const s={...e,...o?{attributes:ee({block:t,context:l})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:s};function ie(e){var i;const[t,n]=g.useState(()=>e.isInteractive?yt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...vt({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(D,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function oe(e){const[t,n]=g.useState(()=>e.repeatContext);return a.jsx(U.Provider,{value:t,children:a.jsx(D,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function D(e){var f,x,h,k;function t(){return rt({block:e.block,context:e.context})}const[n,i]=g.useState(()=>({value:null,update:!1}));function o(){var C;if(n.value&&!n.update&&!p.isPreviewing())return n.value;const b=(C=e.block.repeat)!=null&&C.collection?e.block:Qe({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return n.value=b,n.update=!1,b}function r(){return at({block:o(),registeredComponents:e.registeredComponents})}function l(){var C;return e.block.tagName==="a"||((C=o().properties)==null?void 0:C.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var S,R;if((S=e.block.repeat)!=null&&S.collection)return!!((R=t==null?void 0:t())!=null&&R.length);const b="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!b}function u(){var C,S;return!((C=r==null?void 0:r())!=null&&C.component)&&!t()?(S=o().children)!=null?S:[]:[]}function c(){var b,C,S,R;return{blockChildren:(b=o().children)!=null?b:[],componentRef:(C=r==null?void 0:r())==null?void 0:C.component,componentOptions:{...Oe(o()),...ct(r(),o()),...ut(r(),e.context),...lt(r(),e.linkComponent),...st(r(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((S=r==null?void 0:r())==null?void 0:S.noWrap)===!0,isInteractive:!((R=r==null?void 0:r())!=null&&R.isRSC&&p.TARGET==="rsc")}}return g.useEffect(()=>{const b=o().id,C=o().animations;C&&b&&Ze(C.map(S=>({...S,elementId:b})))},[]),g.useEffect(()=>{n.update=!0}),a.jsx(a.Fragment,{children:s()?a.jsxs(a.Fragment,{children:[a.jsx(dt,{block:o(),context:e.context}),(f=r==null?void 0:r())!=null&&f.noWrap?t()?a.jsx(a.Fragment,{children:(k=t())==null?void 0:k.map((b,C)=>a.jsx(oe,{repeatContext:b.context,block:b.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},C))}):a.jsx(ie,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}):a.jsx(a.Fragment,{children:t()?a.jsx(a.Fragment,{children:(h=t())==null?void 0:h.map((b,C)=>a.jsx(oe,{repeatContext:b.context,block:b.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},C))}):a.jsxs(pt,{Wrapper:l(),block:o(),context:e.context,children:[a.jsx(ie,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(x=u())==null?void 0:x.map(b=>a.jsx(D,{block:b,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},b.id))]})})]}):null})}function St(e){const t=g.useRef(null);function n(){var r;return"builder-blocks"+((r=e.blocks)!=null&&r.length?"":" no-blocks")}function i(){var r,l;p.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function o(){var r,l;p.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return g.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-77bdc7c6","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:r=>i(),onMouseEnter:r=>o(),onKeyPress:r=>i(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-77bdc7c6 {
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: stretch;
12
- }`})]})}function F(e){var i,o,r;const t=d.useContext(K),n=d.useContext(be);return a.jsx(Ct,{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(l=>a.jsx(M,{block:l,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},l.id))}):null})}const Tt=e=>`builder-columns ${e}-breakpoints`;function Ee(e){var B,N;const[t,n]=d.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=d.useState(()=>e.columns||[]),[r,l]=d.useState(()=>e.stackColumnsAt||"tablet");function s(k){return k.link?e.builderLinkComponent||"a":"div"}function u(k){var R;return((R=i[k])==null?void 0:R.width)||100/i.length}function c(k){const R=u(k),P=t*(i.length-1)*(R/100);return`calc(${R}% - ${P}px)`}function m({stackedStyle:k,desktopStyle:R}){return r==="tablet"?k:R}function b({stackedStyle:k,desktopStyle:R}){return r==="never"?R:k}const[f,S]=d.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function h(){return{"--flex-dir":f,"--flex-dir-tablet":m({stackedStyle:f,desktopStyle:"row"})}}function y(k){const R=k===0?0:t,P=c(k),v=`${R}px`,p="100%",C=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:v,"--column-width-mobile":b({stackedStyle:p,desktopStyle:P}),"--column-margin-left-mobile":b({stackedStyle:C,desktopStyle:v}),"--column-width-tablet":m({stackedStyle:p,desktopStyle:P}),"--column-margin-left-tablet":m({stackedStyle:C,desktopStyle:v})}}function g(k){var P,v;return we(((v=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:v.breakpoints)||{})[k].max}function E(){const k=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
13
- @media (max-width: ${g("medium")}px) {
12
+ }`})]})}function V(e){var i,o,r;const t=g.useContext(U),n=g.useContext(me);return a.jsx(St,{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(l=>a.jsx(D,{block:l,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},l.id))}):null})}const kt=e=>`builder-columns ${e}-breakpoints`;function Ce(e){var T,P;const[t,n]=g.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=g.useState(()=>e.columns||[]),[r,l]=g.useState(()=>e.stackColumnsAt||"tablet");function s(m){return m.link?e.builderLinkComponent||"a":"div"}function u(m){var v;return((v=i[m])==null?void 0:v.width)||100/i.length}function c(m){const v=u(m),w=t*(i.length-1)*(v/100);return`calc(${v}% - ${w}px)`}function f({stackedStyle:m,desktopStyle:v}){return r==="tablet"?m:v}function x({stackedStyle:m,desktopStyle:v}){return r==="never"?v:m}const[h,k]=g.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function b(){return{"--flex-dir":h,"--flex-dir-tablet":f({stackedStyle:h,desktopStyle:"row"})}}function C(m){const v=m===0?0:t,w=c(m),d=`${v}px`,y="100%",E=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:w,["marginLeft"]:d,"--column-width-mobile":x({stackedStyle:y,desktopStyle:w}),"--column-margin-left-mobile":x({stackedStyle:E,desktopStyle:d}),"--column-width-tablet":f({stackedStyle:y,desktopStyle:w}),"--column-margin-left-tablet":f({stackedStyle:E,desktopStyle:d})}}function S(m){var w,d;return Se(((d=(w=e.builderContext.content)==null?void 0:w.meta)==null?void 0:d.breakpoints)||{})[m].max}function R(){const m=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
13
+ @media (max-width: ${S("medium")}px) {
14
14
  .${e.builderBlock.id}-breakpoints {
15
15
  flex-direction: var(--flex-dir-tablet);
16
16
  align-items: stretch;
17
17
  }
18
18
 
19
- ${k} {
19
+ ${m} {
20
20
  width: var(--column-width-tablet) !important;
21
21
  margin-left: var(--column-margin-left-tablet) !important;
22
22
  }
23
23
  }
24
24
 
25
- @media (max-width: ${g("small")}px) {
25
+ @media (max-width: ${S("small")}px) {
26
26
  .${e.builderBlock.id}-breakpoints {
27
27
  flex-direction: var(--flex-dir);
28
28
  align-items: stretch;
29
29
  }
30
30
 
31
- ${k} {
31
+ ${m} {
32
32
  width: var(--column-width-mobile) !important;
33
33
  margin-left: var(--column-margin-left-mobile) !important;
34
34
  }
35
35
  },
36
- `}function j(k,R){return{...k.link?{href:k.link}:{},[U()]:"builder-column",style:Ce(y(R))}}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Tt((B=e.builderBlock)==null?void 0:B.id)+" div-34f576bb",style:h(),children:[a.jsx(z,{id:"builderio-columns",styles:E(),nonce:e.builderContext.nonce}),(N=e.columns)==null?void 0:N.map((k,R)=>a.jsx(ne,{TagName:s(k),actionAttributes:{},attributes:j(k,R),children:a.jsx(F,{path:`component.options.columns.${R}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:k.blocks})},R))]}),a.jsx("style",{children:`.div-34f576bb {
36
+ `}function I(m,v){return{...m.link?{href:m.link}:{},[$()]:"builder-column",style:ye(C(v))}}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:kt((T=e.builderBlock)==null?void 0:T.id)+" div-3b0f6fe2",style:b(),children:[a.jsx(H,{id:"builderio-columns",styles:R(),nonce:e.builderContext.nonce}),(P=e.columns)==null?void 0:P.map((m,v)=>a.jsx(X,{TagName:s(m),actionAttributes:{},attributes:I(m,v),children:a.jsx(V,{path:`component.options.columns.${v}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:m.blocks})},v))]}),a.jsx("style",{children:`.div-3b0f6fe2 {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function Re(e){return a.jsx("span",{children:e.children})}function ce(e){return e.replace(/http(s)?:/,"")}function wt(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 It(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ce(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 ce(`${i[0]}_${r}${o}`)}return null}function G(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${wt(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[It(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function je(e){var o,r,l,s,u,c;function t(){var f;const b=e.image||e.src;if(!b||!(b.match(/builder\.io/)||b.match(/cdn\.shopify\.com/)))return e.srcset;if(!e.noWebp){if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),G(b)}else if(e.image&&!e.srcset)return G(b);return G(b)}}function n(){var m;return(m=t==null?void 0:t())!=null&&m.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const m={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?m:void 0}return d.useEffect(()=>{},[]),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:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-2d6925f2",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-2d6925f2",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(s=(l=e.builderBlock)==null?void 0:l.children)!=null&&s.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length)?a.jsx("div",{className:"div-2d6925f2-2",children:e.children}):null]}),a.jsx("style",{children:`.img-2d6925f2 {
39
+ }`})]})}function Te(e){return a.jsx("span",{children:e.children})}function ae(e){return e.replace(/http(s)?:/,"")}function Ct(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 Tt(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]),o=n[3],r=t.match("x")?t:`${t}x`;return ae(`${i[0]}_${r}${o}`)}return null}function K(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=>`${Ct(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Tt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ie(e){var o,r,l,s,u,c;function t(){var h;const x=e.image||e.src;if(!x||!(x.match(/builder\.io/)||x.match(/cdn\.shopify\.com/)))return e.srcset;if(!e.noWebp){if(e.srcset&&((h=e.image)!=null&&h.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),K(x)}else if(e.image&&!e.srcset)return K(x);return K(x)}}function n(){var f;return(f=t==null?void 0:t())!=null&&f.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const f={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?f:void 0}return g.useEffect(()=>{},[]),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:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-7a292ab8",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-7a292ab8",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(s=(l=e.builderBlock)==null?void 0:l.children)!=null&&s.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length)?a.jsx("div",{className:"div-7a292ab8-2",children:e.children}):null]}),a.jsx("style",{children:`.img-7a292ab8 {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
- }.div-2d6925f2 {
42
+ }.div-7a292ab8 {
43
43
  width: 100%;
44
44
  pointer-events: none;
45
45
  font-size: 0;
46
- }.div-2d6925f2-2 {
46
+ }.div-7a292ab8-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 Be(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 Y={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},Q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Et={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[Y]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]}],defaultValue:[{title:[Y],detail:[Q]},{title:[Y],detail:[Q]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ue=e=>e.toString();function Rt(e){var b;const[t,n]=d.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function r(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([h,y])=>y!==void 0))}function l(f){return`builder-accordion-title builder-accordion-title-${t.includes(f)?"open":"closed"}`}function s(f){return`builder-accordion-detail builder-accordion-detail-${t.includes(f)?"open":"closed"}`}function u(){let f=null;if(e.grid&&t.length&&document){const h=t[0];let g=document.querySelector(`.builder-accordion-title[data-index="${h}"]`);if(f=h,g){let E=g.getBoundingClientRect();for(;g=g&&g.nextElementSibling;)if(g){if(g.classList.contains("builder-accordion-detail"))continue;const j=g.getBoundingClientRect();if(j.left>E.left){const B=parseInt(g.getAttribute("data-index")||"",10);isNaN(B)||(E=j,f=B)}else break}}}return typeof f=="number"&&(f=f+1),f}function c(){const f={order:typeof u()=="number"?u():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(f).filter(([S,h])=>h!==void 0))}function m(f){t.includes(f)?n(i()?[]:t.filter(S=>S!==f)):n(i()?[f]:t.concat(f))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(b=e.items)==null?void 0:b.map((f,S)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:l(S),style:{...r(),width:e.grid?e.gridRowWidth:void 0,order:u()!==null?ue(S):ue(S+1)},"data-index":S,onClick:h=>m(S),children:a.jsx(F,{blocks:f.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?a.jsx("div",{className:s(S),style:c(),children:a.jsx(F,{blocks:f.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const jt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},Bt={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((s,u)=>s+u.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Pt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Vt={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","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(l,s=6e4){return new Promise((u,c)=>{const m=document.createElement("img");let b=!1;m.onload=()=>{b=!0,u(m)},m.addEventListener("error",f=>{console.warn("Image load failed",f.error),c(f.error)}),m.src=l,setTimeout(()=>{b||c(new Error("Image load timed out"))},s)})}function i(l){return Math.round(l*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(l=>l.blob()).then(l=>{l.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(l=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&l.width&&l.height&&(e.set("aspectRatio",i(l.height/l.width)),e.set("height",l.height),e.set("width",l.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},At={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>"}}}]},Ft={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function Wt(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(F,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Nt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},X={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},$t={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]}],defaultValue:[{label:[{...X,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...Z,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...X,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...Z,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Dt(e){var r;const[t,n]=d.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(l){return e.tabs&&e.tabs[l].content}function o(l){l===t&&e.collapsible?n(-1):n(l)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(r=e.tabs)==null?void 0:r.map((l,s)=>a.jsx("span",{className:`builder-tab-wrap ${t===s?"builder-tab-active":""}`,style:{...t===s?e.activeTabStyle:{}},onClick:u=>o(s),children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${s}.label`,blocks:l.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},s))}),i(t)?a.jsx("div",{children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Lt={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Pe(e){function t(){var s;const n=e.builderContext,{context:i,localState:o,rootState:r,rootSetState:l}=n;return String(((s=e.text)==null?void 0:s.toString())||"").replace(/{{([^}]+)}}/g,(u,c)=>L({code:c,context:i,localState:o,rootState:r,rootSetState:l,enableCache:!1}))}return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:t()},style:{outline:"none"}})}const Ot={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 Ut(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]);return d.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const c=l[u];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const m=document.createElement("script");m.async=!0,m.src=c.src,document.head.appendChild(m)}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(m){console.warn("`CustomCode`: Error running script:",m)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Mt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Ht=["text/javascript","application/javascript","application/ecmascript"],qt=e=>Ht.includes(e.type);function Kt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]),[l,s]=d.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let m=0;m<c.length;m++){const b=c[m];if(b.src&&!n.includes(b.src)){n.push(b.src);const f=document.createElement("script");f.async=!0,f.src=b.src,document.head.appendChild(f)}else if(qt(b)&&!o.includes(b.innerText))try{o.push(b.innerText),new Function(b.innerText)()}catch(f){console.warn("`Embed`: Error running script:",f)}}}return d.useEffect(()=>{t.current&&!l&&(s(!0),u())},[t.current,l]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const _t={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},zt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Jt=()=>{const e=process.env.NODE_ENV||"production";return zt.includes(e)?e:"production"},Gt=(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 Yt(e){var b,f;const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[o,r]=d.useState(()=>null),[l,s]=d.useState(()=>"");function u(S){var y,g;const h={...e.builderContext.rootState,...S};e.builderContext.rootSetState?(g=(y=e.builderContext).rootSetState)==null||g.call(y,h):e.builderContext.rootState=h}function c(){return x.isEditing()&&e.previewState||n}function m(S){var y;const h=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")S.preventDefault();else if(h){if(!(e.action||e.sendSubmissionsTo==="email")){S.preventDefault();return}S.preventDefault();const g=S.currentTarget||S.target,E=e.customHeaders||{};let j;const B=new FormData(g),N=Array.from(g.querySelectorAll("input,select,textarea")).filter(v=>!!v.name).map(v=>{let p;const C=v.name;if(v instanceof HTMLInputElement)if(v.type==="radio"){if(v.checked)return p=v.name,{key:C,value:p}}else if(v.type==="checkbox")p=v.checked;else if(v.type==="number"||v.type==="range"){const T=v.valueAsNumber;isNaN(T)||(p=T)}else v.type==="file"?p=v.files:p=v.value;else p=v.value;return{key:C,value:p}});let k=e.contentType;if(e.sendSubmissionsTo==="email"&&(k="multipart/form-data"),Array.from(N).forEach(({value:v})=>{(v instanceof File||Array.isArray(v)&&v[0]instanceof File||v instanceof FileList)&&(k="multipart/form-data")}),k!=="application/json")j=B;else{const v={};Array.from(N).forEach(({value:p,key:C})=>{xe(v,C,p)}),j=JSON.stringify(v)}k&&k!=="multipart/form-data"&&(h&&((y=e.action)!=null&&y.includes("zapier.com"))||(E["content-type"]=k));const R=new CustomEvent("presubmit",{detail:{body:j}});if(t.current&&(t.current.dispatchEvent(R),R.defaultPrevented))return;i("sending");const P=`${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"?P:e.action,{body:j,headers:E,method:e.method||"post"}).then(async v=>{let p;const C=v.headers.get("content-type");if(C&&C.indexOf("application/json")!==-1?p=await v.json():p=await v.text(),!v.ok&&e.errorMessagePath){let T=Gt(p,e.errorMessagePath);T&&(typeof T!="string"&&(T=JSON.stringify(T)),s(T),u({formErrorMessage:T}))}if(r(p),i(v.ok?"success":"error"),v.ok){const T=new CustomEvent("submit:success",{detail:{res:v,body:p}});if(t.current){if(t.current.dispatchEvent(T),T.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const w=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(w),w.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},v=>{const p=new CustomEvent("submit:error",{detail:{error:v}});t.current&&(t.current.dispatchEvent(p),p.defaultPrevented)||(r(v),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:S=>m(S),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(f=(b=e.builderBlock)==null?void 0:b.children)==null?void 0:f.map((S,h)=>a.jsx(M,{block:S,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${h}`))}):null,c()==="error"?a.jsx(F,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(F,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(F,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}const Qt={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 Xt(e){return d.createElement("input",{...e.attributes,key:x.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 Zt={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 en(e){var t;return d.createElement("select",{...e.attributes,value:e.value,key:x.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const tn={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 nn(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const on={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function an(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const rn={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 ln(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},x.isEditing()&&e.imgSrc||"default-key")}const sn={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}],shouldReceiveBuilderProps:{builderBlock:!0}};function Ve(e){var i,o,r,l,s,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,(s=(l=e.builderBlock)==null?void 0:l.children)!=null&&s.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 cn=()=>[{component:Ut,...Ot},{component:Kt,...Mt},{component:Yt,..._t},{component:Xt,...Qt},{component:nn,...tn},{component:en,...Zt},{component:an,...on},{component:ln,...rn},{component:Ve,...sn}],de=()=>[{component:he,...jt},{component:Ee,...Bt},{component:Re,...Pt},{component:je,...Vt},{component:Be,...At},{component:Wt,...Ft},{component:$e,...Nt},{component:Pe,...Lt},{component:Dt,...$t},{component:Rt,...Et},...cn()],un=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
55
+ }`})]})}function we(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 _={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},z={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},It={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[_]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[z]}],defaultValue:[{title:[_],detail:[z]},{title:[_],detail:[z]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},re=e=>e.toString();function wt(e){var x;const[t,n]=g.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function r(){const k={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(k).filter(([b,C])=>C!==void 0))}function l(h){return`builder-accordion-title builder-accordion-title-${t.includes(h)?"open":"closed"}`}function s(h){return`builder-accordion-detail builder-accordion-detail-${t.includes(h)?"open":"closed"}`}function u(){let h=null;if(e.grid&&t.length&&document){const b=t[0];let S=document.querySelector(`.builder-accordion-title[data-index="${b}"]`);if(h=b,S){let R=S.getBoundingClientRect();for(;S=S&&S.nextElementSibling;)if(S){if(S.classList.contains("builder-accordion-detail"))continue;const I=S.getBoundingClientRect();if(I.left>R.left){const T=parseInt(S.getAttribute("data-index")||"",10);isNaN(T)||(R=I,h=T)}else break}}}return typeof h=="number"&&(h=h+1),h}function c(){const h={order:typeof u()=="number"?u():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(h).filter(([k,b])=>b!==void 0))}function f(h){t.includes(h)?n(i()?[]:t.filter(k=>k!==h)):n(i()?[h]:t.concat(h))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(x=e.items)==null?void 0:x.map((h,k)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:l(k),style:{...r(),width:e.grid?e.gridRowWidth:void 0,order:u()!==null?re(k):re(k+1)},"data-index":k,onClick:b=>f(k),children:a.jsx(V,{blocks:h.title,path:`items.${k}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(k)?a.jsx("div",{className:s(k),style:c(),children:a.jsx(V,{blocks:h.detail,path:`items.${k}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const Et={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},Rt={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((s,u)=>s+u.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},jt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Bt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(l,s=6e4){return new Promise((u,c)=>{const f=document.createElement("img");let x=!1;f.onload=()=>{x=!0,u(f)},f.addEventListener("error",h=>{console.warn("Image load failed",h.error),c(h.error)}),f.src=l,setTimeout(()=>{x||c(new Error("Image load timed out"))},s)})}function i(l){return Math.round(l*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(l=>l.blob()).then(l=>{l.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(l=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&l.width&&l.height&&(e.set("aspectRatio",i(l.height/l.width)),e.set("height",l.height),e.set("width",l.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},Pt={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"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function At(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(V,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Ft={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},J={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},G={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Wt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[G]}],defaultValue:[{label:[{...J,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...G,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...J,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...G,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function Nt(e){var r;const[t,n]=g.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(l){return e.tabs&&e.tabs[l].content}function o(l){l===t&&e.collapsible?n(-1):n(l)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(r=e.tabs)==null?void 0:r.map((l,s)=>a.jsx("span",{className:`builder-tab-wrap ${t===s?"builder-tab-active":""}`,style:{...t===s?e.activeTabStyle:{}},onClick:u=>o(s),children:a.jsx(V,{parent:e.builderBlock.id,path:`component.options.tabs.${s}.label`,blocks:l.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},s))}),i(t)?a.jsx("div",{children:a.jsx(V,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const $t={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Ee(e){function t(){var s;const n=e.builderContext,{context:i,localState:o,rootState:r,rootSetState:l}=n;return String(((s=e.text)==null?void 0:s.toString())||"").replace(/{{([^}]+)}}/g,(u,c)=>W({code:c,context:i,localState:o,rootState:r,rootSetState:l,enableCache:!1}))}return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:t()},style:{outline:"none"}})}const Dt={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 Ot(e){const t=g.useRef(null),[n,i]=g.useState(()=>[]),[o,r]=g.useState(()=>[]);return g.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const c=l[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 Lt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Ut=["text/javascript","application/javascript","application/ecmascript"],Mt=e=>Ut.includes(e.type);function Ht(e){const t=g.useRef(null),[n,i]=g.useState(()=>[]),[o,r]=g.useState(()=>[]),[l,s]=g.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 x=c[f];if(x.src&&!n.includes(x.src)){n.push(x.src);const h=document.createElement("script");h.async=!0,h.src=x.src,document.head.appendChild(h)}else if(Mt(x)&&!o.includes(x.innerText))try{o.push(x.innerText),new Function(x.innerText)()}catch(h){console.warn("`Embed`: Error running script:",h)}}}return g.useEffect(()=>{t.current&&!l&&(s(!0),u())},[t.current,l]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const qt={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Kt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],_t=()=>{const e=process.env.NODE_ENV||"production";return Kt.includes(e)?e:"production"},zt=(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 Jt(e){var x,h;const t=g.useRef(null),[n,i]=g.useState(()=>"unsubmitted"),[o,r]=g.useState(()=>null),[l,s]=g.useState(()=>"");function u(k){var C,S;const b={...e.builderContext.rootState,...k};e.builderContext.rootSetState?(S=(C=e.builderContext).rootSetState)==null||S.call(C,b):e.builderContext.rootState=b}function c(){return p.isEditing()&&e.previewState||n}function f(k){var C;const b=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")k.preventDefault();else if(b){if(!(e.action||e.sendSubmissionsTo==="email")){k.preventDefault();return}k.preventDefault();const S=k.currentTarget||k.target,R=e.customHeaders||{};let I;const T=new FormData(S),P=Array.from(S.querySelectorAll("input,select,textarea")).filter(d=>!!d.name).map(d=>{let y;const E=d.name;if(d instanceof HTMLInputElement)if(d.type==="radio"){if(d.checked)return y=d.name,{key:E,value:y}}else if(d.type==="checkbox")y=d.checked;else if(d.type==="number"||d.type==="range"){const j=d.valueAsNumber;isNaN(j)||(y=j)}else d.type==="file"?y=d.files:y=d.value;else y=d.value;return{key:E,value:y}});let m=e.contentType;if(e.sendSubmissionsTo==="email"&&(m="multipart/form-data"),Array.from(P).forEach(({value:d})=>{(d instanceof File||Array.isArray(d)&&d[0]instanceof File||d instanceof FileList)&&(m="multipart/form-data")}),m!=="application/json")I=T;else{const d={};Array.from(P).forEach(({value:y,key:E})=>{he(d,E,y)}),I=JSON.stringify(d)}m&&m!=="multipart/form-data"&&(b&&((C=e.action)!=null&&C.includes("zapier.com"))||(R["content-type"]=m));const v=new CustomEvent("presubmit",{detail:{body:I}});if(t.current&&(t.current.dispatchEvent(v),v.defaultPrevented))return;i("sending");const w=`${_t()==="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:I,headers:R,method:e.method||"post"}).then(async d=>{let y;const E=d.headers.get("content-type");if(E&&E.indexOf("application/json")!==-1?y=await d.json():y=await d.text(),!d.ok&&e.errorMessagePath){let j=zt(y,e.errorMessagePath);j&&(typeof j!="string"&&(j=JSON.stringify(j)),s(j),u({formErrorMessage:j}))}if(r(y),i(d.ok?"success":"error"),d.ok){const j=new CustomEvent("submit:success",{detail:{res:d,body:y}});if(t.current){if(t.current.dispatchEvent(j),j.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const B=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(B),B.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},d=>{const y=new CustomEvent("submit:error",{detail:{error:d}});t.current&&(t.current.dispatchEvent(y),y.defaultPrevented)||(r(d),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:k=>f(k),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(h=(x=e.builderBlock)==null?void 0:x.children)==null?void 0:h.map((k,b)=>a.jsx(D,{block:k,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${b}`))}):null,c()==="error"?a.jsx(V,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(V,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(V,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}const Gt={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 Yt(e){return g.createElement("input",{...e.attributes,key:p.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 Qt={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 Xt(e){var t;return g.createElement("select",{...e.attributes,value:e.value,key:p.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Zt={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 en(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const tn={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function nn(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const on={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 an(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},p.isEditing()&&e.imgSrc||"default-key")}const rn={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}],shouldReceiveBuilderProps:{builderBlock:!0}};function Re(e){var i,o,r,l,s,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,(s=(l=e.builderBlock)==null?void 0:l.children)!=null&&s.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 ln=()=>[{component:Ot,...Dt},{component:Ht,...Lt},{component:Jt,...qt},{component:Yt,...Gt},{component:en,...Zt},{component:Xt,...Qt},{component:nn,...tn},{component:an,...on},{component:Re,...rn}],le=()=>[{component:de,...Et},{component:Ce,...Rt},{component:Te,...jt},{component:Ie,...Bt},{component:we,...Pt},{component:At,...Vt},{component:Ae,...Ft},{component:Ee,...$t},{component:Nt,...Wt},{component:wt,...It},...ln()],sn=`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
- }`,dn=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
111
+ }`,cn=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
112
112
  if (!navigator.cookieEnabled) {
113
113
  return;
114
114
  }
@@ -142,15 +142,15 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,Ae="builderIoAbTest",Fe="builderIoRenderContent",q=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),mn=({canTrack:e,content:t})=>!(!(q(t).length>0)||!e||x.isBrowser()),fn=e=>e==="react"||e==="reactNative",We=fn(x.TARGET),gn=()=>`
146
- window.${Ae} = ${un}
147
- window.${Fe} = ${dn}
148
- `,hn=(e,t)=>`
149
- window.${Ae}(
150
- "${t}",${JSON.stringify(e)}, ${We}
151
- )`,bn=({contentId:e,variationId:t})=>`window.${Fe}(
152
- "${t}", "${e}", ${We}
153
- )`;function te(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function me(e){return Math.round(e*1e3)/1e3}const pn=(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},xn=e=>pn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),fe=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=me(i/n.width),l=me(o/n.height);return{x:r,y:l}},yn=e=>{const t=e.target,n=t&&xn(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?fe({event:e,target:t}):void 0,builderTargetOffset:n?fe({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},vn=e=>{var r,l;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(l=e.fileUrl)!=null?l:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
145
+ }`,je="builderIoAbTest",Be="builderIoRenderContent",L=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),un=({canTrack:e,content:t})=>!(!(L(t).length>0)||!e||p.isBrowser()),dn=e=>e==="react"||e==="reactNative",Pe=dn(p.TARGET),mn=()=>`
146
+ window.${je} = ${sn}
147
+ window.${Be} = ${cn}
148
+ `,fn=(e,t)=>`
149
+ window.${je}(
150
+ "${t}",${JSON.stringify(e)}, ${Pe}
151
+ )`,hn=({contentId:e,variationId:t})=>`window.${Be}(
152
+ "${t}", "${e}", ${Pe}
153
+ )`;function Q(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function se(e){return Math.round(e*1e3)/1e3}const gn=(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},bn=e=>gn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ce=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=se(i/n.width),l=se(o/n.height);return{x:r,y:l}},pn=e=>{const t=e.target,n=t&&bn(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ce({event:e,target:t}):void 0,builderTargetOffset:n?ce({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},xn=e=>{var r,l;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(l=e.fileUrl)!=null?l:(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');
@@ -164,7 +164,7 @@ src: url('${c}') format('woff2');
164
164
  font-display: fallback;
165
165
  font-weight: ${s};
166
166
  }
167
- `.trim())}return o},Sn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>vn(n)))==null?void 0:t.join(" "))||""},kn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",Cn=`
167
+ `.trim())}return o},yn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>xn(n)))==null?void 0:t.join(" "))||""},vn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",Sn=`
168
168
  .builder-button {
169
169
  all: unset;
170
170
  }
@@ -181,8 +181,8 @@ font-weight: ${s};
181
181
  text-align: inherit;
182
182
  font-family: inherit;
183
183
  }
184
- `,Tn=e=>e?"":Cn,wn=e=>`variant-${e}`;function In(e){var j,B,N,k,R,P,v;const t=d.useRef(null);function n(p){var T,w;const C={...e.builderContextSignal.rootState,...p};e.builderContextSignal.rootSetState?(w=(T=e.builderContextSignal).rootSetState)==null||w.call(T,C):e.setBuilderContextSignal(I=>({...I,rootState:C}))}function i(p){var T,w,I,V,$;const C={...e.builderContextSignal.content,...p,data:{...(T=e.builderContextSignal.content)==null?void 0:T.data,...p==null?void 0:p.data},meta:{...(w=e.builderContextSignal.content)==null?void 0:w.meta,...p==null?void 0:p.meta,breakpoints:((I=p==null?void 0:p.meta)==null?void 0:I.breakpoints)||(($=(V=e.builderContextSignal.content)==null?void 0:V.meta)==null?void 0:$.breakpoints)}};e.setBuilderContextSignal(A=>({...A,content:C}))}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[r,l]=d.useState(()=>e.contentWrapper||"div");function s(p){return x.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:C=>{var I;const{breakpoints:T,contentId:w}=C;!w||w!==((I=e.builderContextSignal.content)==null?void 0:I.id)||T&&i({meta:{breakpoints:T}})},animation:C=>{Se(C)},contentUpdate:C=>{i(C)}}})(p)}function u(){var C,T;const p=(T=(C=e.builderContextSignal.content)==null?void 0:C.data)==null?void 0:T.jsCode;p&&L({code:p,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[c,m]=d.useState(()=>({})),[b,f]=d.useState(()=>({})),[S,h]=d.useState(()=>!1);function y(p){var C,T;if(e.builderContextSignal.content){const w=(C=e.builderContextSignal.content)==null?void 0:C.testVariationId,I=(T=e.builderContextSignal.content)==null?void 0:T.id;x._track({type:"click",canTrack:x.getDefaultCanTrack(e.canTrack),contentId:I,apiKey:e.apiKey,variationId:w!==I?w:void 0,...yn(p),unique:!S})}S||h(!0)}function g(){var C,T,w;const p=(w=(T=(C=e.builderContextSignal.content)==null?void 0:C.data)==null?void 0:T.httpRequests)!=null?w:{};Object.entries(p).forEach(([I,V])=>{if(!V||b[I]||c[I]&&!x.isEditing())return;b[I]=!0;const $=V.replace(/{{([^}]+)}}/g,(A,De)=>String(L({code:De,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));x.fetch($).then(A=>A.json()).then(A=>{n({[I]:A}),c[I]=!0}).catch(A=>{console.error("error fetching dynamic data",V,A)}).finally(()=>{b[I]=!1})})}function E(){x.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:ie(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return d.useEffect(()=>{var p,C;if(x.isBrowser()){if(x.isEditing()&&(window.addEventListener("message",s),x.registerInsertMenu(),x.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=x.createRegisterComponentMessage(w);(V=window.parent)==null||V.postMessage(I,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)),e.builderContextSignal.content&&x.getDefaultCanTrack(e.canTrack)){const w=(p=e.builderContextSignal.content)==null?void 0:p.testVariationId,I=(C=e.builderContextSignal.content)==null?void 0:C.id,V=e.apiKey;x._track({type:"impression",canTrack:!0,contentId:I,apiKey:V,variationId:w!==I?w:void 0})}if(x.isPreviewing()&&!x.isEditing()){const w=new URL(location.href).searchParams,I=w.get("builder.preview"),V=w.get(`builder.overrides.${I}`),$=w.get("apiKey")||w.get("builder.space");I===e.model&&$===e.apiKey&&(!e.content||V===e.content.id)&&x.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(A=>{A&&i(A)})}}},[]),d.useEffect(()=>{e.apiKey||x.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."),u(),g(),E()},[]),d.useEffect(()=>{e.content&&i(e.content)},[e.content]),d.useEffect(()=>{u()},[(B=(j=e.builderContextSignal.content)==null?void 0:j.data)==null?void 0:B.jsCode]),d.useEffect(()=>{g()},[(k=(N=e.builderContextSignal.content)==null?void 0:N.data)==null?void 0:k.httpRequests]),d.useEffect(()=>{E()},[e.builderContextSignal.rootState]),d.useEffect(()=>{e.data&&n(e.data)},[e.data]),d.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),d.useEffect(()=>()=>{x.isBrowser()&&(window.removeEventListener("message",s),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),a.jsx(K.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(r,{ref:t,onClick:p=>y(p),"builder-content-id":(R=e.builderContextSignal.content)==null?void 0:R.id,"builder-model":e.model,...o(),...e.contentWrapperProps,className:wn(((P=e.content)==null?void 0:P.testVariationId)||((v=e.content)==null?void 0:v.id)),children:e.children}):null})}function En(e){const[t,n]=d.useState(()=>`
185
- ${kn({cssCode:e.cssCode,contentId:e.contentId})}
186
- ${Sn({customFonts:e.customFonts})}
187
- ${Tn(e.isNestedRender)}
188
- `.trim());return a.jsx(z,{id:"builderio-content",styles:t,nonce:e.nonce})}const Rn=({content:e,data:t,locale:n})=>{var r,l,s;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(s=(l=e==null?void 0:e.data)==null?void 0:l.inputs)==null||s.forEach(u=>{u.name&&u.defaultValue!==void 0&&(i[u.name]=u.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},jn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ge(e){var u,c,m,b,f,S,h;const[t,n]=d.useState(()=>{var y,g;return bn({variationId:(y=e.content)==null?void 0:y.testVariationId,contentId:(g=e.content)==null?void 0:g.id})});function i(y){s(g=>({...g,rootState:y}))}const[o,r]=d.useState(()=>{var y;return[...de(),...((y=e.customComponents)==null?void 0:y.filter(({models:g})=>!(g!=null&&g.length)||!e.model?!0:g.includes(e.model)))||[]].reduce((g,{component:E,...j})=>({...g,[j.name]:{component:E,...x.serializeIncludingFunctions(j)}}),{})}),[l,s]=d.useState(()=>{var y;return{content:jn({content:e.content,data:e.data}),localState:void 0,rootState:Rn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...de(),...((y=e.customComponents)==null?void 0:y.filter(({models:g})=>!(g!=null&&g.length)||!e.model?!0:g.includes(e.model)))||[]].reduce((g,{component:E,...j})=>({...g,[j.name]:x.serializeIncludingFunctions(j)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||""}});return a.jsx(be.Provider,{value:{registeredComponents:o},children:a.jsxs(In,{nonce:e.nonce,content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:l,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,setBuilderContextSignal:s,children:[e.isSsrAbTest?a.jsx(te,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,a.jsx(En,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(u=l.content)==null?void 0:u.id,cssCode:(m=(c=l.content)==null?void 0:c.data)==null?void 0:m.cssCode,customFonts:(f=(b=l.content)==null?void 0:b.data)==null?void 0:f.customFonts}),a.jsx(F,{blocks:(h=(S=l.content)==null?void 0:S.data)==null?void 0:h.blocks,context:l,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Ne(e){var l;const[t,n]=d.useState(()=>mn({canTrack:x.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var s;return hn(q(e.content).map(u=>({id:u.testVariationId,testRatio:u.testRatio})),((s=e.content)==null?void 0:s.id)||"")}function o(){return q(e.content).map(s=>`.variant-${s.testVariationId} { display: none; } `).join("")}function r(){var s;return t?{...e.content,testVariationId:(s=e.content)==null?void 0:s.id}:x.handleABTestingSync({item:e.content,canTrack:x.getDefaultCanTrack(e.canTrack)})}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&x.TARGET!=="reactNative"?a.jsx(te,{id:"builderio-init-variants-fns",scriptStr:gn(),nonce:e.nonce||""}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(z,{id:"builderio-variants",styles:o(),nonce:e.nonce||""}),a.jsx(te,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(l=q(e.content))==null?void 0:l.map(s=>a.jsx(ge,{isNestedRender:e.isNestedRender,nonce:e.nonce,content:s,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},s.testVariationId))]}):null,a.jsx(ge,{nonce:e.nonce,isNestedRender:e.isNestedRender,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 Bn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return x.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{x.logger.error("Could not fetch symbol content: ",n)})};function $e(e){var s,u,c,m;function t(){return"div"}function n(){return"div"}function i(){var b,f;return[e.attributes[U()],"builder-symbol",(b=e.symbol)!=null&&b.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[o,r]=d.useState(()=>{var b;return(b=e.symbol)==null?void 0:b.content});function l(){o||Bn({symbol:e.symbol,builderContextValue:e.builderContext}).then(b=>{b&&r(b)})}return d.useEffect(()=>{},[]),d.useEffect(()=>{l()},[e.symbol]),a.jsx("div",{...e.attributes,className:i(),children:a.jsx(Ne,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(s=e.builderBlock)==null?void 0:s.id},customComponents:Object.values(e.builderComponents),data:{...(u=e.symbol)==null?void 0:u.data,...e.builderContext.localState,...(c=o==null?void 0:o.data)==null?void 0:c.state},canTrack:e.builderContext.canTrack,model:(m=e.symbol)==null?void 0:m.model,content:o,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.Blocks=F;exports.BuilderContext=K;exports.Button=he;exports.Columns=Ee;exports.Content=Ne;exports.Fragment=Re;exports.Image=je;exports.Section=Be;exports.Symbol=$e;exports.Text=Pe;exports.Video=Ve;
184
+ `,kn=e=>e?"":Sn,Cn=e=>`variant-${e}`;function Tn(e){var I,T,P;const t=g.useRef(null);function n(m){var w,d;const v={...e.builderContextSignal.rootState,...m};e.builderContextSignal.rootSetState?(d=(w=e.builderContextSignal).rootSetState)==null||d.call(w,v):e.setBuilderContextSignal(y=>({...y,rootState:v}))}function i(m){var w,d,y,E,j;const v={...e.builderContextSignal.content,...m,data:{...(w=e.builderContextSignal.content)==null?void 0:w.data,...m==null?void 0:m.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...m==null?void 0:m.meta,breakpoints:((y=m==null?void 0:m.meta)==null?void 0:y.breakpoints)||((j=(E=e.builderContextSignal.content)==null?void 0:E.meta)==null?void 0:j.breakpoints)}};e.setBuilderContextSignal(B=>({...B,content:v}))}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[r,l]=g.useState(()=>e.contentWrapper||"div");function s(m){return p.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:v=>{var y;const{breakpoints:w,contentId:d}=v;!d||d!==((y=e.builderContextSignal.content)==null?void 0:y.id)||w&&i({meta:{breakpoints:w}})},animation:v=>{pe(v)},contentUpdate:v=>{i(v)}}})(m)}const[u,c]=g.useState(()=>({})),[f,x]=g.useState(()=>({})),[h,k]=g.useState(()=>!1);function b(m){var v,w;if(e.builderContextSignal.content){const d=(v=e.builderContextSignal.content)==null?void 0:v.testVariationId,y=(w=e.builderContextSignal.content)==null?void 0:w.id;p._track({type:"click",canTrack:p.getDefaultCanTrack(e.canTrack),contentId:y,apiKey:e.apiKey,variationId:d!==y?d:void 0,...pn(m),unique:!h})}h||k(!0)}function C(){var v,w,d;const m=(d=(w=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:w.httpRequests)!=null?d:{};Object.entries(m).forEach(([y,E])=>{if(!E||f[y]||u[y]&&!p.isEditing())return;f[y]=!0;const j=E.replace(/{{([^}]+)}}/g,(B,Fe)=>String(W({code:Fe,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));fetch(j).then(B=>B.json()).then(B=>{n({[y]:B}),u[y]=!0}).catch(B=>{console.error("error fetching dynamic data",E,B)}).finally(()=>{f[y]=!1})})}function S(){p.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:Z(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const R=g.useRef(!1);return R.current||(C(),S(),R.current=!0),g.useEffect(()=>{var m,v;if(p.isBrowser()){if(p.isEditing()&&(window.addEventListener("message",s),p.registerInsertMenu(),p.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(d=>{var E;const y=p.createRegisterComponentMessage(d);(E=window.parent)==null||E.postMessage(y,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",S)),e.builderContextSignal.content&&p.getDefaultCanTrack(e.canTrack)){const d=(m=e.builderContextSignal.content)==null?void 0:m.testVariationId,y=(v=e.builderContextSignal.content)==null?void 0:v.id,E=e.apiKey;p._track({type:"impression",canTrack:!0,contentId:y,apiKey:E,variationId:d!==y?d:void 0})}if(p.isPreviewing()&&!p.isEditing()){const d=new URL(location.href).searchParams,y=d.get("builder.preview"),E=d.get(`builder.overrides.${y}`),j=d.get("apiKey")||d.get("builder.space");y===e.model&&j===e.apiKey&&(!e.content||E===e.content.id)&&p.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(B=>{B&&i(B)})}}},[]),g.useEffect(()=>{e.content&&i(e.content)},[e.content]),g.useEffect(()=>{S()},[e.builderContextSignal.rootState]),g.useEffect(()=>{e.data&&n(e.data)},[e.data]),g.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),g.useEffect(()=>()=>{p.isBrowser()&&(window.removeEventListener("message",s),window.removeEventListener("builder:component:stateChangeListenerActivated",S))},[]),a.jsx(U.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(r,{ref:t,onClick:m=>b(m),"builder-content-id":(I=e.builderContextSignal.content)==null?void 0:I.id,"builder-model":e.model,className:Cn(((T=e.content)==null?void 0:T.testVariationId)||((P=e.content)==null?void 0:P.id)),...o(),...e.contentWrapperProps,children:e.children}):null})}function In(e){const[t,n]=g.useState(()=>`
185
+ ${vn({cssCode:e.cssCode,contentId:e.contentId})}
186
+ ${yn({customFonts:e.customFonts})}
187
+ ${kn(e.isNestedRender)}
188
+ `.trim());return a.jsx(H,{id:"builderio-content",styles:t,nonce:e.nonce})}const wn=({content:e,data:t,locale:n})=>{var r,l,s;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(s=(l=e==null?void 0:e.data)==null?void 0:l.inputs)==null||s.forEach(u=>{u.name&&u.defaultValue!==void 0&&(i[u.name]=u.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},En=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ue(e){var c,f,x,h,k,b,C,S,R;const[t,n]=g.useState(()=>{var I,T;return hn({variationId:(I=e.content)==null?void 0:I.testVariationId,contentId:(T=e.content)==null?void 0:T.id})});function i(I){s(T=>({...T,rootState:I}))}const[o,r]=g.useState(()=>{var I;return[...le(),...((I=e.customComponents)==null?void 0:I.filter(({models:T})=>!(T!=null&&T.length)||!e.model?!0:T.includes(e.model)))||[]].reduce((T,{component:P,...m})=>({...T,[m.name]:{component:P,...p.serializeIncludingFunctions(m)}}),{})}),[l,s]=g.useState(()=>{var I;return{content:En({content:e.content,data:e.data}),localState:void 0,rootState:wn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...le(),...((I=e.customComponents)==null?void 0:I.filter(({models:T})=>!(T!=null&&T.length)||!e.model?!0:T.includes(e.model)))||[]].reduce((T,{component:P,...m})=>({...T,[m.name]:p.serializeIncludingFunctions(m)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||""}}),u=g.useRef(!1);if(!u.current){e.apiKey||p.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const I=(f=(c=l.content)==null?void 0:c.data)==null?void 0:f.jsCode;I&&W({code:I,context:e.context||{},localState:void 0,rootState:l.rootState,rootSetState:T=>{Object.assign(l.rootState,T)},isExpression:!1,enableCache:!1}),u.current=!0}return a.jsx(me.Provider,{value:{registeredComponents:o},children:a.jsxs(Tn,{nonce:e.nonce,content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:l,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,setBuilderContextSignal:s,children:[e.isSsrAbTest?a.jsx(Q,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,a.jsx(In,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(x=l.content)==null?void 0:x.id,cssCode:(k=(h=l.content)==null?void 0:h.data)==null?void 0:k.cssCode,customFonts:(C=(b=l.content)==null?void 0:b.data)==null?void 0:C.customFonts}),a.jsx(V,{blocks:(R=(S=l.content)==null?void 0:S.data)==null?void 0:R.blocks,context:l,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Ve(e){var l;const[t,n]=g.useState(()=>un({canTrack:p.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var s;return fn(L(e.content).map(u=>({id:u.testVariationId,testRatio:u.testRatio})),((s=e.content)==null?void 0:s.id)||"")}function o(){return L(e.content).map(s=>`.variant-${s.testVariationId} { display: none; } `).join("")}function r(){var s;return t?{...e.content,testVariationId:(s=e.content)==null?void 0:s.id}:p.handleABTestingSync({item:e.content,canTrack:p.getDefaultCanTrack(e.canTrack)})}return g.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&p.TARGET!=="reactNative"?a.jsx(Q,{id:"builderio-init-variants-fns",scriptStr:mn(),nonce:e.nonce||""}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(H,{id:"builderio-variants",styles:o(),nonce:e.nonce||""}),a.jsx(Q,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(l=L(e.content))==null?void 0:l.map(s=>a.jsx(ue,{isNestedRender:e.isNestedRender,nonce:e.nonce,content:s,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},s.testVariationId))]}):null,a.jsx(ue,{nonce:e.nonce,isNestedRender:e.isNestedRender,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 Rn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return p.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{p.logger.error("Could not fetch symbol content: ",n)})};function Ae(e){var s,u,c,f;function t(){return"div"}function n(){return"div"}function i(){var x,h;return[e.attributes[$()],"builder-symbol",(x=e.symbol)!=null&&x.inline?"builder-inline-symbol":void 0,(h=e.symbol)!=null&&h.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[o,r]=g.useState(()=>{var x;return(x=e.symbol)==null?void 0:x.content});function l(){o||Rn({symbol:e.symbol,builderContextValue:e.builderContext}).then(x=>{x&&r(x)})}return g.useEffect(()=>{},[]),g.useEffect(()=>{l()},[e.symbol]),a.jsx("div",{...e.attributes,className:i(),children:a.jsx(Ve,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(s=e.builderBlock)==null?void 0:s.id},customComponents:Object.values(e.builderComponents),data:{...(u=e.symbol)==null?void 0:u.data,...e.builderContext.localState,...(c=o==null?void 0:o.data)==null?void 0:c.state},canTrack:e.builderContext.canTrack,model:(f=e.symbol)==null?void 0:f.model,content:o,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.Blocks=V;exports.BuilderContext=U;exports.Button=de;exports.Columns=Ce;exports.Content=Ve;exports.Fragment=Te;exports.Image=Ie;exports.Section=we;exports.Symbol=Ae;exports.Text=Ee;exports.Video=Re;