@builder.io/sdk-react-nextjs 0.7.3 → 0.7.4

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 (42) hide show
  1. package/lib/browser/USE_CLIENT_BUNDLE-6b3887b7.js +711 -0
  2. package/lib/browser/USE_CLIENT_BUNDLE-f95a196a.cjs +23 -0
  3. package/lib/{edge/USE_SERVER_BUNDLE-6089c743.js → browser/USE_SERVER_BUNDLE-b314d0f7.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-edaaf934.cjs → browser/USE_SERVER_BUNDLE-eed7792a.cjs} +1 -1
  5. package/lib/browser/{bundle-34c6ede8.cjs → bundle-df55c296.cjs} +111 -19
  6. package/lib/browser/{bundle-abfb58cd.js → bundle-fc3e7377.js} +528 -514
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +3 -3
  9. package/lib/edge/USE_CLIENT_BUNDLE-44225d7a.cjs +23 -0
  10. package/lib/edge/USE_CLIENT_BUNDLE-a32e462e.js +711 -0
  11. package/lib/{node/USE_SERVER_BUNDLE-ee34a991.js → edge/USE_SERVER_BUNDLE-2c9d1a5d.js} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-d10edbf4.cjs → edge/USE_SERVER_BUNDLE-e5ab43ec.cjs} +1 -1
  13. package/lib/edge/bundle-38f08fa1.cjs +188 -0
  14. package/lib/edge/{bundle-52813dc2.js → bundle-bef73246.js} +1516 -1502
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +3 -3
  17. package/lib/node/USE_CLIENT_BUNDLE-539be307.cjs +23 -0
  18. package/lib/node/USE_CLIENT_BUNDLE-a5c6399c.js +711 -0
  19. package/lib/{browser/USE_SERVER_BUNDLE-a299f76e.js → node/USE_SERVER_BUNDLE-21bf3ffc.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-f71d2896.cjs → node/USE_SERVER_BUNDLE-7f4ba7e9.cjs} +1 -1
  21. package/lib/node/{bundle-72453996.js → bundle-74479d5d.js} +297 -283
  22. package/lib/node/{bundle-c9c796be.cjs → bundle-f7863fb3.cjs} +110 -18
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +3 -3
  25. package/package.json +8 -1
  26. package/types/cjs/blocks/video/video.d.ts +4 -0
  27. package/types/cjs/components/content/content.types.d.ts +0 -4
  28. package/types/cjs/components/content-variants/helpers.d.ts +3 -3
  29. package/types/cjs/components/content-variants/inlined-fns.d.ts +14 -0
  30. package/types/cjs/constants/sdk-version.d.ts +1 -1
  31. package/types/esm/blocks/video/video.d.ts +4 -0
  32. package/types/esm/components/content/content.types.d.ts +0 -4
  33. package/types/esm/components/content-variants/helpers.d.ts +3 -3
  34. package/types/esm/components/content-variants/inlined-fns.d.ts +14 -0
  35. package/types/esm/constants/sdk-version.d.ts +1 -1
  36. package/lib/browser/USE_CLIENT_BUNDLE-6ab88b18.cjs +0 -23
  37. package/lib/browser/USE_CLIENT_BUNDLE-72ddb99c.js +0 -657
  38. package/lib/edge/USE_CLIENT_BUNDLE-9cc3d141.js +0 -657
  39. package/lib/edge/USE_CLIENT_BUNDLE-feffcd7a.cjs +0 -23
  40. package/lib/edge/bundle-b146b975.cjs +0 -96
  41. package/lib/node/USE_CLIENT_BUNDLE-43abdb50.js +0 -657
  42. package/lib/node/USE_CLIENT_BUNDLE-ac21f383.cjs +0 -23
@@ -0,0 +1,23 @@
1
+ "use client";"use strict";const t=require("react/jsx-runtime"),c=require("./bundle-df55c296.cjs"),l=require("react"),M=require("./USE_SERVER_BUNDLE-eed7792a.cjs"),V=require("next/navigation");function W(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-5294b10c",children:e.text})}),t.jsx("style",{children:`.button-5294b10c {
2
+ all: unset;
3
+ }`})]})}function A(e){return t.jsxs(t.Fragment,{children:[" ",e.hasChildren?t.jsx(t.Fragment,{children:t.jsxs(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:[" ",e.children," "]})}):t.jsx(t.Fragment,{children:t.jsx(e.Wrapper,{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})})})," "]})}function D(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:{...c.getBlockProperties({block:e.block,context:e.context}),...c.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})},children:e.children})}function U(e){function a(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var o,h;c.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((h=window.parent)==null||h.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:a()+" div-02c7a115","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>S(),onKeyPress:o=>g(),children:e.children}),t.jsx("style",{children:`.div-02c7a115 {
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: stretch;
7
+ }`})]})}function H(e){return t.jsx("span",{children:e.children})}function O(e){var o,h,v,b;function a(){var x;const s=e.image||e.src;if(!s||!(s.match(/builder\.io/)||s.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((x=e.image)!=null&&x.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(s)}else if(e.image&&!e.srcset)return c.getSrcSet(s);return c.getSrcSet(s)}function g(){var m;return(m=a==null?void 0:a())!=null&&m.match(/builder\.io/)&&!e.noWebp?a().replace(/\?/g,"?format=webp&"):""}function S(){const m={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?m:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...S()},className:"builder-image"+(e.className?" "+e.className:"")+" img-dbab4030",src:e.image,srcSet:a(),sizes:e.sizes})]}),e.aspectRatio&&!((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-dbab4030",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-dbab4030-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-dbab4030 {
8
+ opacity: 1;
9
+ transition: opacity 0.2s ease-in-out;
10
+ }.div-dbab4030 {
11
+ width: 100%;
12
+ pointer-events: none;
13
+ font-size: 0;
14
+ }.div-dbab4030-2 {
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: stretch;
18
+ position: absolute;
19
+ top: 0;
20
+ left: 0;
21
+ width: 100%;
22
+ height: 100%;
23
+ }`})]})}function J(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function $(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]);return l.useEffect(()=>{var b;if(!((b=a.current)!=null&&b.getElementsByTagName)||typeof window>"u")return;const v=a.current.getElementsByTagName("script");for(let m=0;m<v.length;m++){const s=v[m];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const x=document.createElement("script");x.async=!0,x.src=s.src,document.head.appendChild(x)}else if(!s.type||["text/javascript","application/javascript","application/ecmascript"].includes(s.type)){if(o.includes(s.innerText))continue;try{o.push(s.innerText),new Function(s.innerText)()}catch(x){console.warn("`CustomCode`: Error running script:",x)}}}},[]),t.jsx("div",{ref:a,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function G(e){const a=l.useRef(null),[g,S]=l.useState(()=>[]),[o,h]=l.useState(()=>[]),[v,b]=l.useState(()=>!1);function m(){if(!a.current||!a.current.getElementsByTagName)return;const s=a.current.getElementsByTagName("script");for(let x=0;x<s.length;x++){const y=s[x];if(y.src&&!g.includes(y.src)){g.push(y.src);const k=document.createElement("script");k.async=!0,k.src=y.src,document.head.appendChild(k)}else if(c.isJsScript(y)&&!o.includes(y.innerText))try{o.push(y.innerText),new Function(y.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return l.useEffect(()=>{a.current&&!v&&(b(!0),m())},[a.current,v]),t.jsx("div",{className:"builder-embed",ref:a,dangerouslySetInnerHTML:{__html:e.content}})}function Q(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},c.isEditing()&&e.imgSrc||"default-key")}function X(e){var S,o,h,v,b,m,s;function a(){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 g(){return{...a()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(S=e.attributes)==null?void 0:S.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:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((h=(o=e.builderBlock)==null?void 0:o.children)!=null&&h.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(b=(v=e.builderBlock)==null?void 0:v.children)!=null&&b.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(s=(m=e.builderBlock)==null?void 0:m.children)!=null&&s.length&&!e.fitContent?t.jsx(t.Fragment,{children:t.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 Y=l.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{}});function Z(e){var R,I,P,F,B,T,N;const a=l.useRef(null),[g,S]=l.useState(()=>0);function o(n){var r,d,u,f,L;const i={...e.builderContextSignal.content,...n,data:{...(r=e.builderContextSignal.content)==null?void 0:r.data,...n==null?void 0:n.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((L=(f=e.builderContextSignal.content)==null?void 0:f.meta)==null?void 0:L.breakpoints)}};M.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}l.useState(()=>0);const[h,v]=l.useState(()=>!1);function b(n){var r;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const d=i.data,{breakpoints:u,contentId:f}=d;if(!f||f!==((r=e.builderContextSignal.content)==null?void 0:r.id))return;u&&o({meta:{breakpoints:u}}),S(g+1);break}case"builder.contentUpdate":{const d=i.data,u=d.key||d.alias||d.entry||d.modelName,f=d.data;u===e.model&&(o(f),S(g+1));break}}}function m(){var i,r;const n=(r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.jsCode;n&&c.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[s,x]=l.useState(()=>({})),[y,k]=l.useState(()=>!1);function K(n){var i,r;if(e.builderContextSignal.content){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(r=e.builderContextSignal.content)==null?void 0:r.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...c.getInteractionPropertiesForEvent(n),unique:!y})}y||k(!0)}function q(n){return n.replace(/{{([^}]+)}}/g,(i,r)=>c.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function _({url:n,key:i}){c.fetch(n).then(r=>r.json()).then(r=>{var u,f;const d={...e.builderContextSignal.rootState,[i]:r};(f=(u=e.builderContextSignal).rootSetState)==null||f.call(u,d),s[i]=!0}).catch(r=>{console.error("error fetching dynamic data",n,r)})}function C(){var i,r;const n=((r=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:r.httpRequests)??{};Object.entries(n).forEach(([d,u])=>{if(u&&(!s[d]||c.isEditing())){const f=q(u);_({url:f,key:d})}})}function E(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function j(n){S(g+1),window.addEventListener("message",b),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var d;const r=c.createRegisterComponentMessage(i);(d=window.parent)==null||d.postMessage(r,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function w(n){const i=new URL(location.href).searchParams,r=i.get("builder.preview"),d=i.get(`builder.preview.${r}`),u=i.get("apiKey")||i.get("builder.space");r===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(f=>{f&&o(f)})}const z=V.useRouter();return l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initeditingbldr",j),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initeditingbldr",j)}},[]),l.useEffect(()=>{var n;return(n=a.current)==null||n.addEventListener("initpreviewingbldr",w),()=>{var i;return(i=a.current)==null?void 0:i.removeEventListener("initpreviewingbldr",w)}},[]),l.useEffect(()=>{var n,i;if(c.isBrowser()){if(c.isEditing()&&a.current&&a.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,f=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:u,apiKey:f,variationId:d!==u?d:void 0})}c.isPreviewing()&&a.current}},[]),l.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),m(),C(),E()},[]),l.useEffect(()=>{},[e.content]),l.useEffect(()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.addEventListener("message",b))},[h]),l.useEffect(()=>{m()},[(I=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:I.jsCode,e.builderContextSignal.rootState]),l.useEffect(()=>{C()},[(F=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:F.httpRequests]),l.useEffect(()=>{E()},[e.builderContextSignal.rootState]),l.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",b),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(Y.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:l.createElement("div",{key:g,ref:a,onClick:n=>K(n),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},className:`variant-${((T=e.content)==null?void 0:T.testVariationId)||((N=e.content)==null?void 0:N.id)}`},e.children)}):null})}exports.BlockWrapper=A;exports.BlocksWrapper=U;exports.Button=W;exports.CustomCode=$;exports.Embed=G;exports.EnableEditor=Z;exports.FragmentComponent=H;exports.Image=O;exports.ImgComponent=Q;exports.InteractiveElement=D;exports.SectionComponent=J;exports.Video=X;
@@ -1,5 +1,5 @@
1
1
  "use server";
2
- import { p as s } from "./bundle-52813dc2.js";
2
+ import { p as s } from "./bundle-fc3e7377.js";
3
3
  async function n({
4
4
  key: t,
5
5
  value: r
@@ -1 +1 @@
1
- "use server";"use strict";const n=require("./bundle-b146b975.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
1
+ "use server";"use strict";const n=require("./bundle-df55c296.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
@@ -1,12 +1,12 @@
1
- "use strict";const We=require("lru-cache"),s=require("react/jsx-runtime"),Le=require("react"),v=require("./USE_CLIENT_BUNDLE-6ab88b18.cjs");require("next/navigation");function Ue(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const P="[Builder.io]: ",k={log:(...e)=>console.log(P,...e),error:(...e)=>console.error(P,...e),warn:(...e)=>console.warn(P,...e),debug:(...e)=>console.debug(P,...e)};function S(){return typeof window<"u"&&typeof document<"u"}const I="rsc";function Me(){return S()&&window.self!==window.top}function F(){return Me()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const _e=()=>{if(S()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},Ke=()=>typeof navigator=="object"&&navigator.userAgent||"",de=()=>{const e=Ke(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||I==="reactNative"}},n=e.match(/Tablet|iPad/i),o=_e();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},He=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),De=()=>({isEditing:F(),isBrowser:S(),isServer:!S(),getUserAttributes:()=>de()}),ze=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,X=({code:e,builder:t,context:n,event:o,localState:i,rootSetState:r,rootState:a})=>{const c=He({builder:t,context:n,event:o,state:qe(a,i,r)});return new Function(...c.map(([l])=>l),e)(...c.map(([,l])=>l))};function qe(e,t,n){if(e===t)throw new Error("rootState === localState");return new Proxy(e,{get:(o,i)=>t&&i in t?t[i]:e[i],set:(o,i,r)=>{if(t&&i in t)throw new Error("Writing to local state is not allowed as it is read-only.");return e[i]=r,n==null||n(e),!0}})}const Ge=e=>(S(),X(e));function O({code:e,context:t,localState:n,rootState:o,rootSetState:i,event:r,isExpression:a=!0}){if(e===""){k.warn("Skipping evaluation of empty code block.");return}const c={code:ze(e,{isExpression:a}),builder:De(),context:t,event:r,rootSetState:i,rootState:o,localState:n};try{return Ge(c)}catch(l){k.error("Failed code evaluation: "+l.message,{code:e});return}}const E=e=>JSON.parse(JSON.stringify(e)),Je=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((i,r,a)=>Object(i[r])===i[r]?i[r]:i[r]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e};const Ye=({block:e,context:t,localState:n,rootState:o,rootSetState:i})=>{if(!e.bindings)return e;const r=E(e),a={...r,properties:{...r.properties},actions:{...r.actions}};for(const c in e.bindings){const l=e.bindings[c],d=O({code:l,localState:n,rootState:o,rootSetState:i,context:t});Je(a,c,d)}return a};function V({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:i,rootSetState:r}){const a=e;return n?Ye({block:a,localState:o,rootState:i,rootSetState:r,context:t}):a}const Xe=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],M=e=>typeof e=="string"&&Xe.includes(e.toLowerCase()),Qe=({block:e,context:t,registeredComponents:n})=>{var r;const o=(r=V({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!o)return null;const i=n[o];if(i)return i;console.warn(`
1
+ "use strict";const We=require("lru-cache"),s=require("react/jsx-runtime"),_e=require("react"),v=require("./USE_CLIENT_BUNDLE-f95a196a.cjs");require("next/navigation");function Le(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const V="[Builder.io]: ",k={log:(...e)=>console.log(V,...e),error:(...e)=>console.error(V,...e),warn:(...e)=>console.warn(V,...e),debug:(...e)=>console.debug(V,...e)};function x(){return typeof window<"u"&&typeof document<"u"}const I="rsc";function Ue(){return x()&&window.self!==window.top}function F(){return Ue()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Me=()=>{if(x()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},De=()=>typeof navigator=="object"&&navigator.userAgent||"",ue=()=>{const e=De(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||I==="reactNative"}},n=e.match(/Tablet|iPad/i),o=Me();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},Ke=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),He=()=>({isEditing:F(),isBrowser:x(),isServer:!x(),getUserAttributes:()=>ue()}),ze=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,Q=({code:e,builder:t,context:n,event:o,localState:i,rootSetState:r,rootState:a})=>{const c=Ke({builder:t,context:n,event:o,state:qe(a,i,r)});return new Function(...c.map(([l])=>l),e)(...c.map(([,l])=>l))};function qe(e,t,n){if(e===t)throw new Error("rootState === localState");return new Proxy(e,{get:(o,i)=>t&&i in t?t[i]:e[i],set:(o,i,r)=>{if(t&&i in t)throw new Error("Writing to local state is not allowed as it is read-only.");return e[i]=r,n==null||n(e),!0}})}const Ge=e=>(x(),Q(e));function O({code:e,context:t,localState:n,rootState:o,rootSetState:i,event:r,isExpression:a=!0}){if(e===""){k.warn("Skipping evaluation of empty code block.");return}const c={code:ze(e,{isExpression:a}),builder:He(),context:t,event:r,rootSetState:i,rootState:o,localState:n};try{return Ge(c)}catch(l){k.error("Failed code evaluation: "+l.message,{code:e});return}}const R=e=>JSON.parse(JSON.stringify(e)),Je=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((i,r,a)=>Object(i[r])===i[r]?i[r]:i[r]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e};const Ye=({block:e,context:t,localState:n,rootState:o,rootSetState:i})=>{if(!e.bindings)return e;const r=R(e),a={...r,properties:{...r.properties},actions:{...r.actions}};for(const c in e.bindings){const l=e.bindings[c],u=O({code:l,localState:n,rootState:o,rootSetState:i,context:t});Je(a,c,u)}return a};function j({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:i,rootSetState:r}){const a=e;return n?Ye({block:a,localState:o,rootState:i,rootSetState:r,context:t}):a}const Qe=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],U=e=>typeof e=="string"&&Qe.includes(e.toLowerCase()),Xe=({block:e,context:t,registeredComponents:n})=>{var r;const o=(r=j({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!o)return null;const i=n[o];if(i)return i;console.warn(`
2
2
  Could not find a registered component named "${o}".
3
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},Ze=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const i=O({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(i))return;const r=n.collection.split(".").pop(),a=n.itemName||(r?r+"Item":"item");return i.map((l,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:l,[a]:l,[`$${a}Index`]:d}},block:o}))},me={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},Q=(e,t=me)=>`@media (max-width: ${t[e].max}px)`,fe=({small:e,medium:t})=>{const n=E(me);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const i=n.small.max+1;n.medium={max:t,min:i,default:i+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},et=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),w=e=>e!=null,he=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${et(n)}: ${o};`}).filter(w),tt=e=>he(e).join(`
4
- `),_=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
3
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},Ze=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const i=O({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(i))return;const r=n.collection.split(".").pop(),a=n.itemName||(r?r+"Item":"item");return i.map((l,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:l,[a]:l,[`$${a}Index`]:u}},block:o}))},me={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},X=(e,t=me)=>`@media (max-width: ${t[e].max}px)`,fe=({small:e,medium:t})=>{const n=R(me);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const i=n.small.max+1;n.medium={max:t,min:i,default:i+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},et=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),w=e=>e!=null,he=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${et(n)}: ${o};`}).filter(w),tt=e=>he(e).join(`
4
+ `),M=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
5
5
  ${tt(n)}
6
6
  }`;return e?`${e} {
7
7
  ${o}
8
- }`:o};function N(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function D(e){const t=function(){const i=V({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return w(i.hide)?!i.hide:w(i.show)?i.show:!0},n=function(){var u;const i=V({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),r=i.responsiveStyles,a=e.context.content,c=fe(((u=a==null?void 0:a.meta)==null?void 0:u.breakpoints)||{}),l=r==null?void 0:r.large,d=r==null?void 0:r.medium,f=r==null?void 0:r.small,p=i.id;if(!p)return"";const b=l?_({className:p,styles:l}):"",m=d?_({className:p,styles:d,mediaQuery:Q("medium",c)}):"",h=f?_({className:p,styles:f,mediaQuery:Q("small",c)}):"";return[b,m,h].join(" ")};return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx(N,{styles:n()})}):null})}function nt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ot=e=>`on${nt(e)}`,it=(e,t)=>n=>O({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function rt(e){const t={},n=e.block.actions??{};for(const o in n){if(!n.hasOwnProperty(o))continue;const i=n[o];let r=ot(o);if(e.stripPrefix)switch(I){case"vue2":case"vue3":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=it(i,e)}return t}function at(e){return e.className=e.class,delete e.class,e}const st=e=>({href:e.href});function ge({block:e,context:t}){var o;const n={...st(e),...e.properties,"builder-id":e.id,style:e.style?ct(e.style):void 0,class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return at(n)}function ct(e){switch(I){case"svelte":case"vue2":case"vue3":case"solid":return he(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const lt=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:i,isInteractive:r,contextValue:a})=>r?{Wrapper:o,block:t,context:n,wrapperProps:e}:{...e,...i?{attributes:ge({block:t,context:a})}:{}};function Z(e){var n,o;const t=e.isInteractive?v.InteractiveElement:e.componentRef;return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsxs(t,{...lt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:[(n=e.blockChildren)==null?void 0:n.map(i=>s.jsx(W,{block:i,context:e.context,registeredComponents:e.registeredComponents},"block-"+i.id)),(o=e.blockChildren)==null?void 0:o.map(i=>s.jsx(D,{block:i,context:e.context},"block-style-"+i.id))]})}):null})}function ut(e){const t=e.repeatContext;return s.jsx(W,{block:e.block,context:t,registeredComponents:e.registeredComponents})}function W(e){var d,f,p,b;const t=function(){return Qe({block:e.block,context:e.context,registeredComponents:e.registeredComponents})},n=function(){return Ze({block:e.block,context:e.context})},o=function(){return n()?e.block:V({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})},i=function(){return e.block.tagName||"div"},r=function(){return"hide"in o()?!o().hide:"show"in o()?o().show:!0},a=function(){var u;return!((u=t())!=null&&u.component)&&!n()?o().children??[]:[]},c=function(){var h,u,y,x,g;return{blockChildren:o().children??[],componentRef:(h=t())==null?void 0:h.component,componentOptions:{...Ue(o()),builderContext:e.context,...((u=t())==null?void 0:u.name)==="Symbol"||((y=t())==null?void 0:y.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:l,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((x=t())==null?void 0:x.noWrap)===!0,isInteractive:!((g=t())!=null&&g.isRSC)}},l=e.context;return s.jsx(s.Fragment,{children:r()?s.jsx(s.Fragment,{children:(d=t())!=null&&d.noWrap?s.jsx(s.Fragment,{children:s.jsx(Z,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive})}):s.jsxs(s.Fragment,{children:[M(i())?s.jsx(s.Fragment,{children:s.jsx(v.BlockWrapper,{Wrapper:i(),block:o(),context:e.context,hasChildren:!1})}):null,!M(i())&&n()?s.jsx(s.Fragment,{children:(f=n())==null?void 0:f.map((m,h)=>s.jsx(ut,{repeatContext:m.context,block:m.block,registeredComponents:e.registeredComponents},h))}):null,!M(i())&&!n()?s.jsx(s.Fragment,{children:s.jsxs(v.BlockWrapper,{Wrapper:i(),block:o(),context:e.context,hasChildren:!0,children:[s.jsx(Z,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(p=a())==null?void 0:p.map(m=>s.jsx(W,{block:m,context:l,registeredComponents:e.registeredComponents},"block-"+m.id)),(b=a())==null?void 0:b.map(m=>s.jsx(D,{block:m,context:l},"block-style-"+m.id))]})}):null]})}):null})}function L(e){var t,n;return s.jsxs(v.BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,children:[e.blocks?s.jsx(s.Fragment,{children:(t=e.blocks)==null?void 0:t.map(o=>s.jsx(W,{block:o,context:e.context,registeredComponents:e.registeredComponents},"render-block-"+o.id))}):null,e.blocks?s.jsx(s.Fragment,{children:(n=e.blocks)==null?void 0:n.map(o=>s.jsx(D,{block:o,context:e.context},"block-style-"+o.id))}):null]})}function pe(e){var m;const t=typeof e.space=="number"?e.space||0:20,n=e.columns||[],o=e.stackColumnsAt||"tablet",i=function(u){var y;return((y=n[u])==null?void 0:y.width)||100/n.length},r=function(u){const y=t*(n.length-1)/n.length;return`calc(${i(u)}% - ${y}px)`},a=function({stackedStyle:u,desktopStyle:y}){return o==="tablet"?u:y},c=function({stackedStyle:u,desktopStyle:y}){return o==="never"?y:u},l=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",d=function(){return{"--flex-dir":l,"--flex-dir-tablet":a({stackedStyle:l,desktopStyle:"row"})}},f=function(u){const y=u===0?0:t,x=r(u),g=`${y}px`,B="100%",T=0;return{width:x,["marginLeft"]:g,"--column-width-mobile":c({stackedStyle:B,desktopStyle:x}),"--column-margin-left-mobile":c({stackedStyle:T,desktopStyle:g}),"--column-width-tablet":a({stackedStyle:B,desktopStyle:x}),"--column-margin-left-tablet":a({stackedStyle:T,desktopStyle:g})}},p=function(u){var x,g;return fe(((g=(x=e.builderContext.content)==null?void 0:x.meta)==null?void 0:g.breakpoints)||{})[u].max},b=function(){return`
9
- @media (max-width: ${p("medium")}px) {
8
+ }`:o};function N(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function H(e){const t=function(){const i=j({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return w(i.hide)?!i.hide:w(i.show)?i.show:!0},n=function(){var d;const i=j({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),r=i.responsiveStyles,a=e.context.content,c=fe(((d=a==null?void 0:a.meta)==null?void 0:d.breakpoints)||{}),l=r==null?void 0:r.large,u=r==null?void 0:r.medium,f=r==null?void 0:r.small,g=i.id;if(!g)return"";const b=l?M({className:g,styles:l}):"",m=u?M({className:g,styles:u,mediaQuery:X("medium",c)}):"",h=f?M({className:g,styles:f,mediaQuery:X("small",c)}):"";return[b,m,h].join(" ")};return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx(N,{styles:n()})}):null})}function nt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ot=e=>`on${nt(e)}`,it=(e,t)=>n=>O({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function rt(e){const t={},n=e.block.actions??{};for(const o in n){if(!n.hasOwnProperty(o))continue;const i=n[o];let r=ot(o);if(e.stripPrefix)switch(I){case"vue2":case"vue3":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=it(i,e)}return t}function at(e){return e.className=e.class,delete e.class,e}const st=e=>({href:e.href});function ge({block:e,context:t}){var o;const n={...st(e),...e.properties,"builder-id":e.id,style:e.style?ct(e.style):void 0,class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return at(n)}function ct(e){switch(I){case"svelte":case"vue2":case"vue3":case"solid":return he(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const lt=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:i,isInteractive:r,contextValue:a})=>r?{Wrapper:o,block:t,context:n,wrapperProps:e}:{...e,...i?{attributes:ge({block:t,context:a})}:{}};function Z(e){var n,o;const t=e.isInteractive?v.InteractiveElement:e.componentRef;return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsxs(t,{...lt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:[(n=e.blockChildren)==null?void 0:n.map(i=>s.jsx(W,{block:i,context:e.context,registeredComponents:e.registeredComponents},"block-"+i.id)),(o=e.blockChildren)==null?void 0:o.map(i=>s.jsx(H,{block:i,context:e.context},"block-style-"+i.id))]})}):null})}function dt(e){const t=e.repeatContext;return s.jsx(W,{block:e.block,context:t,registeredComponents:e.registeredComponents})}function W(e){var u,f,g,b;const t=function(){return Xe({block:e.block,context:e.context,registeredComponents:e.registeredComponents})},n=function(){return Ze({block:e.block,context:e.context})},o=function(){return n()?e.block:j({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})},i=function(){return e.block.tagName||"div"},r=function(){return"hide"in o()?!o().hide:"show"in o()?o().show:!0},a=function(){var d;return!((d=t())!=null&&d.component)&&!n()?o().children??[]:[]},c=function(){var h,d,y,S,p;return{blockChildren:o().children??[],componentRef:(h=t())==null?void 0:h.component,componentOptions:{...Le(o()),builderContext:e.context,...((d=t())==null?void 0:d.name)==="Symbol"||((y=t())==null?void 0:y.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:l,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((S=t())==null?void 0:S.noWrap)===!0,isInteractive:!((p=t())!=null&&p.isRSC)}},l=e.context;return s.jsx(s.Fragment,{children:r()?s.jsx(s.Fragment,{children:(u=t())!=null&&u.noWrap?s.jsx(s.Fragment,{children:s.jsx(Z,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive})}):s.jsxs(s.Fragment,{children:[U(i())?s.jsx(s.Fragment,{children:s.jsx(v.BlockWrapper,{Wrapper:i(),block:o(),context:e.context,hasChildren:!1})}):null,!U(i())&&n()?s.jsx(s.Fragment,{children:(f=n())==null?void 0:f.map((m,h)=>s.jsx(dt,{repeatContext:m.context,block:m.block,registeredComponents:e.registeredComponents},h))}):null,!U(i())&&!n()?s.jsx(s.Fragment,{children:s.jsxs(v.BlockWrapper,{Wrapper:i(),block:o(),context:e.context,hasChildren:!0,children:[s.jsx(Z,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(g=a())==null?void 0:g.map(m=>s.jsx(W,{block:m,context:l,registeredComponents:e.registeredComponents},"block-"+m.id)),(b=a())==null?void 0:b.map(m=>s.jsx(H,{block:m,context:l},"block-style-"+m.id))]})}):null]})}):null})}function _(e){var t,n;return s.jsxs(v.BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,children:[e.blocks?s.jsx(s.Fragment,{children:(t=e.blocks)==null?void 0:t.map(o=>s.jsx(W,{block:o,context:e.context,registeredComponents:e.registeredComponents},"render-block-"+o.id))}):null,e.blocks?s.jsx(s.Fragment,{children:(n=e.blocks)==null?void 0:n.map(o=>s.jsx(H,{block:o,context:e.context},"block-style-"+o.id))}):null]})}function pe(e){var m;const t=typeof e.space=="number"?e.space||0:20,n=e.columns||[],o=e.stackColumnsAt||"tablet",i=function(d){var y;return((y=n[d])==null?void 0:y.width)||100/n.length},r=function(d){const y=t*(n.length-1)/n.length;return`calc(${i(d)}% - ${y}px)`},a=function({stackedStyle:d,desktopStyle:y}){return o==="tablet"?d:y},c=function({stackedStyle:d,desktopStyle:y}){return o==="never"?y:d},l=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",u=function(){return{"--flex-dir":l,"--flex-dir-tablet":a({stackedStyle:l,desktopStyle:"row"})}},f=function(d){const y=d===0?0:t,S=r(d),p=`${y}px`,A="100%",T=0;return{width:S,["marginLeft"]:p,"--column-width-mobile":c({stackedStyle:A,desktopStyle:S}),"--column-margin-left-mobile":c({stackedStyle:T,desktopStyle:p}),"--column-width-tablet":a({stackedStyle:A,desktopStyle:S}),"--column-margin-left-tablet":a({stackedStyle:T,desktopStyle:p})}},g=function(d){var S,p;return fe(((p=(S=e.builderContext.content)==null?void 0:S.meta)==null?void 0:p.breakpoints)||{})[d].max},b=function(){return`
9
+ @media (max-width: ${g("medium")}px) {
10
10
  .${e.builderBlock.id}-breakpoints {
11
11
  flex-direction: var(--flex-dir-tablet);
12
12
  align-items: stretch;
@@ -18,7 +18,7 @@
18
18
  }
19
19
  }
20
20
 
21
- @media (max-width: ${p("small")}px) {
21
+ @media (max-width: ${g("small")}px) {
22
22
  .${e.builderBlock.id}-breakpoints {
23
23
  flex-direction: var(--flex-dir);
24
24
  align-items: stretch;
@@ -29,21 +29,113 @@
29
29
  margin-left: var(--column-margin-left-mobile) !important;
30
30
  }
31
31
  },
32
- `};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-0d69fe26`,style:d(),children:[s.jsx(s.Fragment,{children:s.jsx(N,{styles:b()})}),(m=e.columns)==null?void 0:m.map((h,u)=>Le.createElement("div",{className:"builder-column div-0d69fe26-2",style:f(u),key:u},s.jsx(L,{path:`component.options.columns.${u}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,blocks:h.blocks})))]}),s.jsx("style",{children:`.div-0d69fe26 {
32
+ `};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-0d69fe26`,style:u(),children:[s.jsx(s.Fragment,{children:s.jsx(N,{styles:b()})}),(m=e.columns)==null?void 0:m.map((h,d)=>_e.createElement("div",{className:"builder-column div-0d69fe26-2",style:f(d),key:d},s.jsx(_,{path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,blocks:h.blocks})))]}),s.jsx("style",{children:`.div-0d69fe26 {
33
33
  display: flex;
34
34
  line-height: normal;
35
35
  }.div-0d69fe26-2 {
36
36
  display: flex;
37
37
  flex-direction: column;
38
38
  align-items: stretch;
39
- }`})]})}function ee(e){return e.replace(/http(s)?:/,"")}function dt(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+i+t+"="+encodeURIComponent(n)}function mt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ee(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),i=n[3],r=t.match("x")?t:`${t}x`;return ee(`${o[0]}_${r}${i}`)}return null}function ft(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(i=>i!==o).map(i=>`${dt(e,"width",i)} ${i}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[mt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const ht=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},be=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){k.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},ye=async e=>be(e),gt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(w).join("; "),pt=[["secure",""],["SameSite","None"]],bt=({name:e,value:t,expires:n})=>{const i=(S()?location.protocol==="https:":!0)?pt:[[]],r=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...r,["path","/"],["domain",ht(window.location.hostname)],...i];return gt(a)},xe=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const i=bt({name:e,value:t,expires:n});document.cookie=i}catch(i){k.warn("[COOKIE] SET error: ",(i==null?void 0:i.message)||i)}},yt="builder.tests",z=e=>`${yt}.${e}`,xt=({contentId:e})=>ye({name:z(e),canTrack:!0}),St=({contentId:e})=>be({name:z(e),canTrack:!0}),vt=({contentId:e,value:t})=>xe({name:z(e),value:t,canTrack:!0}),Se=e=>w(e.id)&&w(e.variations)&&Object.keys(e.variations).length>0,kt=({id:e,variations:t})=>{var i;let n=0;const o=Math.random();for(const r in t){const a=(i=t[r])==null?void 0:i.testRatio;if(n+=a,o<n)return r}return e},ve=e=>{const t=kt(e);return vt({contentId:e.id,value:t}).catch(n=>{k.error("could not store A/B test variation: ",n)}),t},ke=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Ct=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!Se(e))return e;const n=St({contentId:e.id})||ve({variations:e.variations,id:e.id}),o=ke({item:e,testGroupId:n});return{...e,...o}},wt=async({item:e,canTrack:t})=>{if(!t||!Se(e))return e;const o=await xt({contentId:e.id})||ve({variations:e.variations,id:e.id}),i=ke({item:e,testGroupId:o});return{...e,...i}},$=e=>w(e)?e:!0,It={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},Tt={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(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(i=>i.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((c,l)=>c+l.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}]},Rt={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}]},Et={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Bt=["text/javascript","application/javascript","application/ecmascript"],Pt=e=>Bt.includes(e.type),jt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},At={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,c=6e4){return new Promise((l,d)=>{const f=document.createElement("img");let p=!1;f.onload=()=>{p=!0,l(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),d(b.error)}),f.src=a,setTimeout(()=>{p||d(new Error("Image load timed out"))},c)})}function o(a){return Math.round(a*1e3)/1e3}const i=e.get("image"),r=e.get("aspectRatio");if(fetch(i).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!r||r===.7041))return n(i).then(a=>{const c=e.get("aspectRatio");e.get("image")===i&&(!c||c===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},Vt={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},$t={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:"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"}]},Ot={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 Ce(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Nt={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://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",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}]},te=()=>[{component:v.Button,...It},{component:pe,...Tt},{component:v.CustomCode,...Rt},{component:v.Embed,...Et},{component:v.FragmentComponent,...jt},{component:v.Image,...At},{component:v.ImgComponent,...Vt},{component:v.SectionComponent,...$t},{component:Ne,...Ft},{component:Ce,...Ot},{component:v.Video,...Nt}],ne=[],Wt=e=>({type:"builder.registerComponent",data:K(e)}),Lt=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Ut=e=>typeof e=="function"?Lt(e):E(e),K=({inputs:e,...t})=>({...E(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[i,r])=>({...o,[i]:Ut(r)}),{}))}),j=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Mt=({canTrack:e,content:t})=>!(!(j(t).length>0)||!e||S());function _t(e,t,n){var a;function o(){function c(h,u,y){let x="";if(y){const g=new Date;g.setTime(g.getTime()+y*24*60*60*1e3),x="; expires="+g.toUTCString()}document.cookie=h+"="+(u||"")+x+"; path=/; Secure; SameSite=None"}function l(h){const u=h+"=",y=document.cookie.split(";");for(let x=0;x<y.length;x++){let g=y[x];for(;g.charAt(0)===" ";)g=g.substring(1,g.length);if(g.indexOf(u)===0)return g.substring(u.length,g.length)}return null}const d=`builder.tests.${e}`,f=l(d),p=t.map(h=>h.id).concat(e);if(f&&p.includes(f))return f;let b=0;const m=Math.random();for(let h=0;h<t.length;h++){const u=t[h],y=u.testRatio;if(b+=y,m<b)return c(d,u.id),u.id}return c(d,e),e}const i=o(),r=(a=document.currentScript)==null?void 0:a.previousElementSibling;if(n){r.remove();const c=document.currentScript;c==null||c.remove()}else{const c=t.concat({id:e}).filter(l=>l.id!==i).map(l=>`.variant-${l.id} { display: none; }
40
- `).join("");r.innerHTML=c}}function Kt(e,t,n){var l;if(!navigator.cookieEnabled)return;function o(d){const f=d+"=",p=document.cookie.split(";");for(let b=0;b<p.length;b++){let m=p[b];for(;m.charAt(0)===" ";)m=m.substring(1,m.length);if(m.indexOf(f)===0)return m.substring(f.length,m.length)}return null}const i=`builder.tests.${t}`,r=o(i),a=(l=document.currentScript)==null?void 0:l.parentElement,c=e===t;if(r===e){if(c)return;a==null||a.removeAttribute("hidden"),a==null||a.removeAttribute("aria-hidden")}else{c&&(n?a==null||a.remove():(a==null||a.setAttribute("hidden","true"),a==null||a.setAttribute("aria-hidden","true")));return}}const Ht=e=>e==="react"||e==="reactNative",we=Ht(I),Ie="builderIoAbTest",Te="builderIoRenderContent",Dt=()=>{const e=_t.toString().replace(/\s+/g," "),t=Kt.toString().replace(/\s+/g," ");return`
41
- window.${Ie} = ${e}
42
- window.${Te} = ${t}
43
- `},zt=(e,t)=>`
44
- window.${Ie}("${t}",${JSON.stringify(e)}, ${we})`,qt=({contentId:e,variationId:t})=>`
45
- window.${Te}("${t}", "${e}", ${we})`;function H(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id})}const Gt=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||k.warn("No previewed ID found in search params."),n};function Re(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new We.LRUCache({max:500,ttl:1e3*60*5}))}function Jt(e){Re();const t=Gt(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function Yt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Xt(){const e=Yt().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
46
- For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Ee=Xt();function A(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const r=e[i],a=[t,i].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...A(r,a,n)}:{...o,[a]:r}},{})}const Qt="v3",oe="builder.",Zt="options.",en=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},q=e=>{if(!e)return{};const t=Be(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(oe)){const i=o.replace(oe,"").replace(Zt,"");n[i]=t[o]}}),n},tn=()=>{if(!S())return{};const e=new URLSearchParams(window.location.search);return q(e)},Be=e=>e instanceof URLSearchParams?en(e):e,ie=e=>typeof e=="number"&&!isNaN(e)&&e>=0,G=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:i,model:r,apiKey:a,includeRefs:c=!0,enrich:l,locale:d,apiVersion:f=Qt,fields:p,omit:b,offset:m,cacheSeconds:h,staleCacheSeconds:u,sort:y,includeUnpublished:x}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const g=new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${c}${d?`&locale=${d}`:""}${l?`&enrich=${l}`:""}`);if(g.searchParams.set("omit",b||"meta.componentsUsed"),p&&g.searchParams.set("fields",p),Number.isFinite(m)&&m>-1&&g.searchParams.set("offset",String(Math.floor(m))),typeof x=="boolean"&&g.searchParams.set("includeUnpublished",String(x)),h&&ie(h)&&g.searchParams.set("cacheSeconds",String(h)),u&&ie(u)&&g.searchParams.set("staleCacheSeconds",String(u)),y){const C=A({sort:y});for(const R in C)g.searchParams.set(R,JSON.stringify(C[R]))}const B={...tn(),...Be(e.options||{})},T=A(B);for(const C in T)g.searchParams.set(C,String(T[C]));if(o&&g.searchParams.set("userAttributes",JSON.stringify(o)),i){const C=A({query:i});for(const R in C)g.searchParams.set(R,JSON.stringify(C[R]))}return g},nn=e=>"results"in e;async function U(e){const t=await J({...e,limit:1});return t&&t.results[0]||null}const on=U,rn=async e=>{const t=G(e);return await(await Ee(t.href)).json()},Pe=async(e,t,n=G(e))=>{const o=$(e.canTrack);if(n.search.includes("preview=")){const r=[];for(const a of t.results){const c=Jt(n.searchParams);r.push(c||a)}t.results=r}if(!o||!(S()||I==="reactNative"))return t;try{const r=[];for(const a of t.results)r.push(await wt({item:a,canTrack:o}));t.results=r}catch(r){k.error("Could not process A/B tests. ",r)}return t};async function J(e){try{const t=G(e),n=await rn(e);return nn(n)?Pe(e,n):(k.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return k.error("Error fetching data. ",t),null}}const an=J;function sn(){return!S()||F()?!1:location.search.indexOf("builder.preview=")!==-1}function cn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function je(){return cn().replace(/-/g,"")}const Ae="builderSessionId",ln=async({canTrack:e})=>{if(!e)return;const t=await ye({name:Ae,canTrack:e});if(w(t))return t;{const n=un();return dn({id:n,canTrack:e}),n}},un=()=>je(),dn=({id:e,canTrack:t})=>xe({name:Ae,value:e,canTrack:t}),Ve=()=>S()&&typeof localStorage<"u"?localStorage:void 0,mn=({key:e,canTrack:t})=>{var n;try{return t?(n=Ve())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},fn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=Ve())==null||o.setItem(e,n))}catch(i){console.debug("[LocalStorage] SET error: ",i)}},$e="builderVisitorId",hn=({canTrack:e})=>{if(!e)return;const t=mn({key:$e,canTrack:e});if(w(t))return t;{const n=gn();return pn({id:n,canTrack:e}),n}},gn=()=>je(),pn=({id:e,canTrack:t})=>fn({key:$e,value:e,canTrack:t}),bn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await ln({canTrack:e}),n=hn({canTrack:e});return{sessionId:t,visitorId:n}},yn=async({type:e,canTrack:t,apiKey:n,metadata:o,...i})=>({type:e,data:{...i,metadata:{url:location.href,...o},...await bn({canTrack:t}),userAttributes:de(),ownerId:n}});async function Fe(e){if(!e.apiKey){k.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!F()&&(S()||I==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await yn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const xn=e=>Fe({...e,canTrack:!0});function re(e){return Math.round(e*1e3)/1e3}const Sn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},vn=e=>Sn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ae=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,r=re(o/n.width),a=re(i/n.height);return{x:r,y:a}},kn=e=>{const t=e.target,n=t&&vn(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?ae({event:e,target:t}):void 0,builderTargetOffset:n?ae({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},Cn="0.7.3",se={};function Oe(e,t){let n=se[e];if(n||(n=se[e]=[]),n.push(t),S()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(i){console.debug("Could not postmessage",i)}}}const wn=()=>{Oe("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let ce=!1;const In=(e={})=>{var t,n;ce||(ce=!0,S()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:I,version:Cn,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var i,r;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const a=o.data.text,c=o.data.arguments||[],l=o.data.id,d=new Function(a);let f,p=null;try{f=d.apply(null,c)}catch(b){p=b}p?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):f&&typeof f.then=="function"?f.then(b=>{var m;(m=window.parent)==null||m.postMessage({type:"builder.evaluateResult",data:{id:l,result:b}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:f,id:l}},"*");break}}})))},Tn=e=>{var r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((r=e==null?void 0:e.files)==null?void 0:r.regular);let i="";if(o&&t&&n&&(i+=`
39
+ }`})]})}function ee(e){return e.replace(/http(s)?:/,"")}function ut(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+i+t+"="+encodeURIComponent(n)}function mt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ee(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),i=n[3],r=t.match("x")?t:`${t}x`;return ee(`${o[0]}_${r}${i}`)}return null}function ft(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(i=>i!==o).map(i=>`${ut(e,"width",i)} ${i}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[mt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const ht=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},be=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){k.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},ye=async e=>be(e),gt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(w).join("; "),pt=[["secure",""],["SameSite","None"]],bt=({name:e,value:t,expires:n})=>{const i=(x()?location.protocol==="https:":!0)?pt:[[]],r=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...r,["path","/"],["domain",ht(window.location.hostname)],...i];return gt(a)},xe=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const i=bt({name:e,value:t,expires:n});document.cookie=i}catch(i){k.warn("[COOKIE] SET error: ",(i==null?void 0:i.message)||i)}},yt="builder.tests",z=e=>`${yt}.${e}`,xt=({contentId:e})=>ye({name:z(e),canTrack:!0}),vt=({contentId:e})=>be({name:z(e),canTrack:!0}),St=({contentId:e,value:t})=>xe({name:z(e),value:t,canTrack:!0}),ve=e=>w(e.id)&&w(e.variations)&&Object.keys(e.variations).length>0,kt=({id:e,variations:t})=>{var i;let n=0;const o=Math.random();for(const r in t){const a=(i=t[r])==null?void 0:i.testRatio;if(n+=a,o<n)return r}return e},Se=e=>{const t=kt(e);return St({contentId:e.id,value:t}).catch(n=>{k.error("could not store A/B test variation: ",n)}),t},ke=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Ct=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!ve(e))return e;const n=vt({contentId:e.id})||Se({variations:e.variations,id:e.id}),o=ke({item:e,testGroupId:n});return{...e,...o}},wt=async({item:e,canTrack:t})=>{if(!t||!ve(e))return e;const o=await xt({contentId:e.id})||Se({variations:e.variations,id:e.id}),i=ke({item:e,testGroupId:o});return{...e,...i}},$=e=>w(e)?e:!0,It={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},Tt={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(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(i=>i.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((c,l)=>c+l.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}]},Et={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}]},Rt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},At=["text/javascript","application/javascript","application/ecmascript"],Vt=e=>At.includes(e.type),Bt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Pt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,c=6e4){return new Promise((l,u)=>{const f=document.createElement("img");let g=!1;f.onload=()=>{g=!0,l(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),u(b.error)}),f.src=a,setTimeout(()=>{g||u(new Error("Image load timed out"))},c)})}function o(a){return Math.round(a*1e3)/1e3}const i=e.get("image"),r=e.get("aspectRatio");if(fetch(i).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!r||r===.7041))return n(i).then(a=>{const c=e.get("aspectRatio");e.get("image")===i&&(!c||c===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},jt={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},$t={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:"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"}]},Ot={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 Ce(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Nt={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://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",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}]},te=()=>[{component:v.Button,...It},{component:pe,...Tt},{component:v.CustomCode,...Et},{component:v.Embed,...Rt},{component:v.FragmentComponent,...Bt},{component:v.Image,...Pt},{component:v.ImgComponent,...jt},{component:v.SectionComponent,...$t},{component:Ne,...Ft},{component:Ce,...Ot},{component:v.Video,...Nt}],ne=[],Wt=e=>({type:"builder.registerComponent",data:D(e)}),_t=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Lt=e=>typeof e=="function"?_t(e):R(e),D=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[i,r])=>({...o,[i]:Lt(r)}),{}))}),Ut=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
40
+ function getAndSetVariantId() {
41
+ function setCookie(name, value, days) {
42
+ let expires = '';
43
+ if (days) {
44
+ const date = new Date();
45
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
46
+ expires = '; expires=' + date.toUTCString();
47
+ }
48
+ document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
49
+ }
50
+ function getCookie(name) {
51
+ const nameEQ = name + '=';
52
+ const ca = document.cookie.split(';');
53
+ for (let i = 0; i < ca.length; i++) {
54
+ let c = ca[i];
55
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
56
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
57
+ }
58
+ return null;
59
+ }
60
+ const cookieName = \`builder.tests.\${contentId}\`;
61
+ const variantInCookie = getCookie(cookieName);
62
+ const availableIDs = variants.map(vr => vr.id).concat(contentId);
63
+ if (variantInCookie && availableIDs.includes(variantInCookie)) {
64
+ return variantInCookie;
65
+ }
66
+ let n = 0;
67
+ const random = Math.random();
68
+ for (let i = 0; i < variants.length; i++) {
69
+ const variant = variants[i];
70
+ const testRatio = variant.testRatio;
71
+ n += testRatio;
72
+ if (random < n) {
73
+ setCookie(cookieName, variant.id);
74
+ return variant.id;
75
+ }
76
+ }
77
+ setCookie(cookieName, contentId);
78
+ return contentId;
79
+ }
80
+ const winningVariantId = getAndSetVariantId();
81
+ const styleEl = document.currentScript?.previousElementSibling;
82
+ if (isHydrationTarget) {
83
+ styleEl.remove();
84
+ const thisScriptEl = document.currentScript;
85
+ thisScriptEl?.remove();
86
+ } else {
87
+ const newStyleStr = variants.concat({
88
+ id: contentId
89
+ }).filter(variant => variant.id !== winningVariantId).map(value => {
90
+ return \`.variant-\${value.id} { display: none; }
91
+ \`;
92
+ }).join('');
93
+ styleEl.innerHTML = newStyleStr;
94
+ }
95
+ }`,Mt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
96
+ if (!navigator.cookieEnabled) {
97
+ return;
98
+ }
99
+ function getCookie(name) {
100
+ const nameEQ = name + '=';
101
+ const ca = document.cookie.split(';');
102
+ for (let i = 0; i < ca.length; i++) {
103
+ let c = ca[i];
104
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
105
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
106
+ }
107
+ return null;
108
+ }
109
+ const cookieName = \`builder.tests.\${defaultContentId}\`;
110
+ const winningVariant = getCookie(cookieName);
111
+ const parentDiv = document.currentScript?.parentElement;
112
+ const isDefaultContent = variantContentId === defaultContentId;
113
+ const isWinningVariant = winningVariant === variantContentId;
114
+ if (isWinningVariant && !isDefaultContent) {
115
+ parentDiv?.removeAttribute('hidden');
116
+ parentDiv?.removeAttribute('aria-hidden');
117
+ } else if (!isWinningVariant && isDefaultContent) {
118
+ parentDiv?.setAttribute('hidden', 'true');
119
+ parentDiv?.setAttribute('aria-hidden', 'true');
120
+ }
121
+ if (isHydrationTarget) {
122
+ if (!isWinningVariant) {
123
+ parentDiv?.remove();
124
+ }
125
+ const thisScriptEl = document.currentScript;
126
+ thisScriptEl?.remove();
127
+ }
128
+ return;
129
+ }`,we="builderIoAbTest",Ie="builderIoRenderContent",B=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Dt=({canTrack:e,content:t})=>!(!(B(t).length>0)||!e||x()),Kt=e=>e==="react"||e==="reactNative",Te=Kt(I),Ht=()=>`
130
+ window.${we} = ${Ut}
131
+ window.${Ie} = ${Mt}
132
+ `,zt=(e,t)=>`
133
+ window.${we}(
134
+ "${t}",${JSON.stringify(e)}, ${Te}
135
+ )`,qt=({contentId:e,variationId:t})=>`window.${Ie}(
136
+ "${t}", "${e}", ${Te}
137
+ )`;function K(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}const Gt=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||k.warn("No previewed ID found in search params."),n};function Ee(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new We.LRUCache({max:500,ttl:1e3*60*5}))}function Jt(e){Ee();const t=Gt(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function Yt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Qt(){const e=Yt().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
138
+ For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Re=Qt();function P(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const r=e[i],a=[t,i].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...P(r,a,n)}:{...o,[a]:r}},{})}const Xt="v3",oe="builder.",Zt="options.",en=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},q=e=>{if(!e)return{};const t=Ae(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(oe)){const i=o.replace(oe,"").replace(Zt,"");n[i]=t[o]}}),n},tn=()=>{if(!x())return{};const e=new URLSearchParams(window.location.search);return q(e)},Ae=e=>e instanceof URLSearchParams?en(e):e,ie=e=>typeof e=="number"&&!isNaN(e)&&e>=0,G=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:i,model:r,apiKey:a,includeRefs:c=!0,enrich:l,locale:u,apiVersion:f=Xt,fields:g,omit:b,offset:m,cacheSeconds:h,staleCacheSeconds:d,sort:y,includeUnpublished:S}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const p=new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${c}${u?`&locale=${u}`:""}${l?`&enrich=${l}`:""}`);if(p.searchParams.set("omit",b||"meta.componentsUsed"),g&&p.searchParams.set("fields",g),Number.isFinite(m)&&m>-1&&p.searchParams.set("offset",String(Math.floor(m))),typeof S=="boolean"&&p.searchParams.set("includeUnpublished",String(S)),h&&ie(h)&&p.searchParams.set("cacheSeconds",String(h)),d&&ie(d)&&p.searchParams.set("staleCacheSeconds",String(d)),y){const C=P({sort:y});for(const E in C)p.searchParams.set(E,JSON.stringify(C[E]))}const A={...tn(),...Ae(e.options||{})},T=P(A);for(const C in T)p.searchParams.set(C,String(T[C]));if(o&&p.searchParams.set("userAttributes",JSON.stringify(o)),i){const C=P({query:i});for(const E in C)p.searchParams.set(E,JSON.stringify(C[E]))}return p},nn=e=>"results"in e;async function L(e){const t=await J({...e,limit:1});return t&&t.results[0]||null}const on=L,rn=async e=>{const t=G(e);return await(await Re(t.href)).json()},Ve=async(e,t,n=G(e))=>{const o=$(e.canTrack);if(n.search.includes("preview=")){const r=[];for(const a of t.results){const c=Jt(n.searchParams);r.push(c||a)}t.results=r}if(!o||!(x()||I==="reactNative"))return t;try{const r=[];for(const a of t.results)r.push(await wt({item:a,canTrack:o}));t.results=r}catch(r){k.error("Could not process A/B tests. ",r)}return t};async function J(e){try{const t=G(e),n=await rn(e);return nn(n)?Ve(e,n):(k.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return k.error("Error fetching data. ",t),null}}const an=J;function sn(){return!x()||F()?!1:location.search.indexOf("builder.preview=")!==-1}function cn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Be(){return cn().replace(/-/g,"")}const Pe="builderSessionId",ln=async({canTrack:e})=>{if(!e)return;const t=await ye({name:Pe,canTrack:e});if(w(t))return t;{const n=dn();return un({id:n,canTrack:e}),n}},dn=()=>Be(),un=({id:e,canTrack:t})=>xe({name:Pe,value:e,canTrack:t}),je=()=>x()&&typeof localStorage<"u"?localStorage:void 0,mn=({key:e,canTrack:t})=>{var n;try{return t?(n=je())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},fn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=je())==null||o.setItem(e,n))}catch(i){console.debug("[LocalStorage] SET error: ",i)}},$e="builderVisitorId",hn=({canTrack:e})=>{if(!e)return;const t=mn({key:$e,canTrack:e});if(w(t))return t;{const n=gn();return pn({id:n,canTrack:e}),n}},gn=()=>Be(),pn=({id:e,canTrack:t})=>fn({key:$e,value:e,canTrack:t}),bn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await ln({canTrack:e}),n=hn({canTrack:e});return{sessionId:t,visitorId:n}},yn=async({type:e,canTrack:t,apiKey:n,metadata:o,...i})=>({type:e,data:{...i,metadata:{url:location.href,...o},...await bn({canTrack:t}),userAttributes:ue(),ownerId:n}});async function Fe(e){if(!e.apiKey){k.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!F()&&(x()||I==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await yn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const xn=e=>Fe({...e,canTrack:!0});function re(e){return Math.round(e*1e3)/1e3}const vn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},Sn=e=>vn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ae=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,r=re(o/n.width),a=re(i/n.height);return{x:r,y:a}},kn=e=>{const t=e.target,n=t&&Sn(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?ae({event:e,target:t}):void 0,builderTargetOffset:n?ae({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},Cn="0.7.4",se={};function Oe(e,t){let n=se[e];if(n||(n=se[e]=[]),n.push(t),x()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(i){console.debug("Could not postmessage",i)}}}const wn=()=>{Oe("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let ce=!1;const In=(e={})=>{var t,n;ce||(ce=!0,x()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:I,version:Cn,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var i,r;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const a=o.data.text,c=o.data.arguments||[],l=o.data.id,u=new Function(a);let f,g=null;try{f=u.apply(null,c)}catch(b){g=b}g?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:l,error:g.message}},"*"):f&&typeof f.then=="function"?f.then(b=>{var m;(m=window.parent)==null||m.postMessage({type:"builder.evaluateResult",data:{id:l,result:b}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:f,id:l}},"*");break}}})))},Tn=e=>{var r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((r=e==null?void 0:e.files)==null?void 0:r.regular);let i="";if(o&&t&&n&&(i+=`
47
139
  @font-face {
48
140
  font-family: "${t}";
49
141
  src: local("${n}"), url('${o}') format('woff2');
@@ -57,9 +149,9 @@ src: url('${l}') format('woff2');
57
149
  font-display: fallback;
58
150
  font-weight: ${a};
59
151
  }
60
- `.trim())}return i},Rn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Tn(n)))==null?void 0:t.join(" "))||""},En=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function Bn(e){const t=`
61
- ${En({cssCode:e.cssCode,contentId:e.contentId})}
62
- ${Rn({customFonts:e.customFonts})}
152
+ `.trim())}return i},En=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Tn(n)))==null?void 0:t.join(" "))||""},Rn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function An(e){const t=`
153
+ ${Rn({cssCode:e.cssCode,contentId:e.contentId})}
154
+ ${En({customFonts:e.customFonts})}
63
155
 
64
156
  .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
65
157
  margin: 0;
@@ -73,4 +165,4 @@ ${Rn({customFonts:e.customFonts})}
73
165
  text-align: inherit;
74
166
  font-family: inherit;
75
167
  }
76
- `.trim();return s.jsx(N,{styles:t})}const Pn=({content:e,data:t,locale:n})=>{var r,a,c;const o={};(a=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||a.forEach(l=>{var d;l.name&&l.defaultValue!==void 0&&((d=e==null?void 0:e.data)!=null&&d.state)&&e.data.state[l.name]===void 0&&(o[l.name]=l.defaultValue)});const i={...(c=e==null?void 0:e.data)==null?void 0:c.state,...t,...n?{locale:n}:{}};return{...o,...i}},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 le(e){var i,r,a,c,l,d,f,p,b;const t=qt({variationId:(i=e.content)==null?void 0:i.testVariationId,contentId:(r=e.content)==null?void 0:r.id}),n=[...te(),...ne,...e.customComponents||[]].reduce((m,{component:h,...u})=>({...m,[u.name]:{component:h,...K(u)}}),{}),o={content:jn({content:e.content,data:e.data}),localState:void 0,rootState:Pn({content:e.content,data:e.data,locale:e.locale}),rootSetState:void 0,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...te(),...ne,...e.customComponents||[]].reduce((m,{component:h,...u})=>({...m,[u.name]:K(u)}),{}),inheritedStyles:{}};return s.jsxs(v.EnableEditor,{content:e.content,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,classNameProp:e.classNameProp,showContent:e.showContent,builderContextSignal:o,children:[e.isSsrAbTest?s.jsx(s.Fragment,{children:s.jsx(H,{scriptStr:t})}):null,s.jsx(s.Fragment,{children:s.jsx(Bn,{contentId:(a=o.content)==null?void 0:a.id,cssCode:(l=(c=o.content)==null?void 0:c.data)==null?void 0:l.cssCode,customFonts:(f=(d=o.content)==null?void 0:d.data)==null?void 0:f.customFonts})}),s.jsx(L,{blocks:(b=(p=o.content)==null?void 0:p.data)==null?void 0:b.blocks,context:o,registeredComponents:n})]})}function Y(e){var r,a,c;const t=Mt({canTrack:$(e.canTrack),content:e.content}),n=function(){var d;return zt(j(e.content).map(f=>({id:f.testVariationId,testRatio:f.testRatio})),((d=e.content)==null?void 0:d.id)||"")},o=function(){return j(e.content).map(d=>`.variant-${d.testVariationId} { display: none; } `).join("")},i=function(){var d;return t?{...e.content,testVariationId:(d=e.content)==null?void 0:d.id}:Ct({item:e.content,canTrack:$(e.canTrack)})};return s.jsxs(s.Fragment,{children:[!e.__isNestedRender&&I!=="reactNative"?s.jsx(s.Fragment,{children:s.jsx(H,{scriptStr:Dt()})}):null,t?s.jsxs(s.Fragment,{children:[s.jsx(N,{id:`variants-styles-${(r=e.content)==null?void 0:r.id}`,styles:o()}),s.jsx(H,{scriptStr:n()}),(a=j(e.content))==null?void 0:a.map(l=>s.jsx(le,{content:l,showContent:!1,classNameProp:void 0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t},l.testVariationId))]}):null,s.jsx(le,{content:i(),classNameProp:`variant-${(c=e.content)==null?void 0:c.id}`,showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t})]})}const An=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return U({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{k.error("Could not fetch symbol content: ",n)})};async function Ne(e){var o,i,r,a;const t=function(){var l,d;return[e.attributes.className,"builder-symbol",(l=e.symbol)!=null&&l.inline?"builder-inline-symbol":void 0,(d=e.symbol)!=null&&d.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},n=((o=e.symbol)==null?void 0:o.content)||await An({symbol:e.symbol,builderContextValue:e.builderContext});return s.jsx("div",{...e.attributes,className:t(),children:s.jsx(Y,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderComponents),data:{...(i=e.symbol)==null?void 0:i.data,...e.builderContext.localState,...(r=n==null?void 0:n.data)==null?void 0:r.state},model:(a=e.symbol)==null?void 0:a.model,content:n})})}const Vn=L,$n=Y,ue={};function Fn(e){if(S()){Object.assign(ue,e);const t={type:"builder.settingsChange",data:ue};parent.postMessage(t,"*")}}const On=async e=>{var o,i,r;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((i=e.userAttributes)==null?void 0:i.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:q(e.searchParams||((r=e.url)==null?void 0:r.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await U(n)}};exports.Blocks=L;exports.Columns=pe;exports.ContentVariants=Y;exports.RenderBlocks=Vn;exports.RenderContent=$n;exports.Symbol=Ne;exports.Text=Ce;exports._processContentResult=Pe;exports._track=Fe;exports.createRegisterComponentMessage=Wt;exports.evaluate=O;exports.fastClone=E;exports.fetch=Ee;exports.fetchBuilderProps=On;exports.fetchEntries=J;exports.fetchOneEntry=U;exports.getAllContent=an;exports.getBlockActions=rt;exports.getBlockProperties=ge;exports.getBuilderSearchParams=q;exports.getContent=on;exports.getDefaultCanTrack=$;exports.getInteractionPropertiesForEvent=kn;exports.getSrcSet=ft;exports.init=Re;exports.isBrowser=S;exports.isEditing=F;exports.isJsScript=Pt;exports.isPreviewing=sn;exports.logger=k;exports.register=Oe;exports.registerInsertMenu=wn;exports.setEditorSettings=Fn;exports.setupBrowserForEditing=In;exports.track=xn;
168
+ `.trim();return s.jsx(N,{styles:t})}const Vn=({content:e,data:t,locale:n})=>{var r,a,c;const o={};(a=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||a.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=e==null?void 0:e.data)!=null&&u.state)&&e.data.state[l.name]===void 0&&(o[l.name]=l.defaultValue)});const i={...(c=e==null?void 0:e.data)==null?void 0:c.state,...t,...n?{locale:n}:{}};return{...o,...i}},Bn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function le(e){var i,r,a,c,l,u,f,g,b;const t=qt({variationId:(i=e.content)==null?void 0:i.testVariationId,contentId:(r=e.content)==null?void 0:r.id}),n=[...te(),...ne,...e.customComponents||[]].reduce((m,{component:h,...d})=>({...m,[d.name]:{component:h,...D(d)}}),{}),o={content:Bn({content:e.content,data:e.data}),localState:void 0,rootState:Vn({content:e.content,data:e.data,locale:e.locale}),rootSetState:void 0,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...te(),...ne,...e.customComponents||[]].reduce((m,{component:h,...d})=>({...m,[d.name]:D(d)}),{}),inheritedStyles:{}};return s.jsxs(v.EnableEditor,{content:e.content,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,showContent:e.showContent,builderContextSignal:o,children:[e.isSsrAbTest?s.jsx(s.Fragment,{children:s.jsx(K,{scriptStr:t})}):null,s.jsx(s.Fragment,{children:s.jsx(An,{contentId:(a=o.content)==null?void 0:a.id,cssCode:(l=(c=o.content)==null?void 0:c.data)==null?void 0:l.cssCode,customFonts:(f=(u=o.content)==null?void 0:u.data)==null?void 0:f.customFonts})}),s.jsx(_,{blocks:(b=(g=o.content)==null?void 0:g.data)==null?void 0:b.blocks,context:o,registeredComponents:n})]})}function Y(e){var r,a;const t=Dt({canTrack:$(e.canTrack),content:e.content}),n=function(){var l;return zt(B(e.content).map(u=>({id:u.testVariationId,testRatio:u.testRatio})),((l=e.content)==null?void 0:l.id)||"")},o=function(){return B(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")},i=function(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:Ct({item:e.content,canTrack:$(e.canTrack)})};return s.jsxs(s.Fragment,{children:[!e.__isNestedRender&&I!=="reactNative"?s.jsx(s.Fragment,{children:s.jsx(K,{scriptStr:Ht()})}):null,t?s.jsxs(s.Fragment,{children:[s.jsx(N,{id:`variants-styles-${(r=e.content)==null?void 0:r.id}`,styles:o()}),s.jsx(K,{scriptStr:n()}),(a=B(e.content))==null?void 0:a.map(c=>s.jsx(le,{content:c,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t},c.testVariationId))]}):null,s.jsx(le,{content:i(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t})]})}const Pn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return L({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{k.error("Could not fetch symbol content: ",n)})};async function Ne(e){var o,i,r,a;const t=function(){var l,u;return[e.attributes.className,"builder-symbol",(l=e.symbol)!=null&&l.inline?"builder-inline-symbol":void 0,(u=e.symbol)!=null&&u.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},n=((o=e.symbol)==null?void 0:o.content)||await Pn({symbol:e.symbol,builderContextValue:e.builderContext});return s.jsx("div",{...e.attributes,className:t(),children:s.jsx(Y,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderComponents),data:{...(i=e.symbol)==null?void 0:i.data,...e.builderContext.localState,...(r=n==null?void 0:n.data)==null?void 0:r.state},model:(a=e.symbol)==null?void 0:a.model,content:n})})}const jn=_,$n=Y,de={};function Fn(e){if(x()){Object.assign(de,e);const t={type:"builder.settingsChange",data:de};parent.postMessage(t,"*")}}const On=async e=>{var o,i,r;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((i=e.userAttributes)==null?void 0:i.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:q(e.searchParams||((r=e.url)==null?void 0:r.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await L(n)}};exports.Blocks=_;exports.Columns=pe;exports.ContentVariants=Y;exports.RenderBlocks=jn;exports.RenderContent=$n;exports.Symbol=Ne;exports.Text=Ce;exports._processContentResult=Ve;exports._track=Fe;exports.createRegisterComponentMessage=Wt;exports.evaluate=O;exports.fastClone=R;exports.fetch=Re;exports.fetchBuilderProps=On;exports.fetchEntries=J;exports.fetchOneEntry=L;exports.getAllContent=an;exports.getBlockActions=rt;exports.getBlockProperties=ge;exports.getBuilderSearchParams=q;exports.getContent=on;exports.getDefaultCanTrack=$;exports.getInteractionPropertiesForEvent=kn;exports.getSrcSet=ft;exports.init=Ee;exports.isBrowser=x;exports.isEditing=F;exports.isJsScript=Vt;exports.isPreviewing=sn;exports.logger=k;exports.register=Oe;exports.registerInsertMenu=wn;exports.setEditorSettings=Fn;exports.setupBrowserForEditing=In;exports.track=xn;