@builder.io/sdk-react 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +10 -10
- package/lib/browser/blocks-exports.mjs +48 -14
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/init.cjs +1 -1
- package/lib/browser/init.mjs +1 -1
- package/lib/browser/{server-entry-e0454364.cjs → server-entry-29c5c31c.cjs} +1 -1
- package/lib/browser/{server-entry-709e09e3.js → server-entry-f9067095.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-bd80745a.js → accordion-4a70912d.js} +1 -1
- package/lib/edge/{accordion-12c2d408.cjs → accordion-6ad2cec7.cjs} +1 -1
- package/lib/edge/{blocks-ac8970f1.cjs → blocks-0bd38a83.cjs} +2 -2
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +4 -3
- package/lib/edge/{blocks-6d6258ba.js → blocks-fedde8d2.js} +12 -4
- package/lib/edge/{button-4e842584.js → button-af35e8de.js} +2 -2
- package/lib/edge/{button-c2e45e64.cjs → button-f6426eff.cjs} +1 -1
- package/lib/edge/{columns-a51238cc.js → columns-1065c0ae.js} +53 -46
- package/lib/edge/columns-f607250b.cjs +28 -0
- package/lib/edge/{content-variants-f3c6baad.js → content-variants-3d57a82f.js} +70 -53
- package/lib/edge/{content-variants-3fe9b1c0.cjs → content-variants-773afb9f.cjs} +3 -3
- package/lib/edge/{form-00c8cc55.js → form-0a58d0e4.js} +3 -3
- package/lib/edge/{form-b4cdf7cd.cjs → form-5762c22a.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1bbed5bf.js → get-class-prop-name-268b0f61.js} +1 -1
- package/lib/edge/{get-class-prop-name-3c5f7a7d.cjs → get-class-prop-name-3061c329.cjs} +1 -1
- package/lib/edge/{img-e7db1475.js → img-252c9967.js} +1 -1
- package/lib/edge/{img-6671da9a.cjs → img-59bb70c7.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/init.cjs +1 -1
- package/lib/edge/init.mjs +1 -1
- package/lib/edge/{input-0f7a9f1c.cjs → input-2163d4dc.cjs} +1 -1
- package/lib/edge/{input-2db47a83.js → input-7ae243e2.js} +1 -1
- package/lib/edge/{select-f0859c5f.cjs → select-39231177.cjs} +1 -1
- package/lib/edge/{select-2facacf2.js → select-cfa0eb8e.js} +1 -1
- package/lib/edge/{server-entry-ff6a2e2d.cjs → server-entry-4750de9c.cjs} +1 -1
- package/lib/edge/{server-entry-75aa714e.js → server-entry-681e8e79.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-aee43b86.cjs → slot-69da8c56.cjs} +1 -1
- package/lib/edge/{slot-8159ca1d.js → slot-7c61542f.js} +3 -3
- package/lib/edge/symbol-4a8a6cda.js +85 -0
- package/lib/edge/symbol-bd999a19.cjs +1 -0
- package/lib/edge/{tabs-4112a80e.cjs → tabs-3d0e242e.cjs} +1 -1
- package/lib/edge/{tabs-f5357a4e.js → tabs-c3ff0c70.js} +3 -3
- package/lib/node/blocks-exports.cjs +11 -11
- package/lib/node/blocks-exports.mjs +49 -15
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +2 -2
- package/lib/node/{node-runtime-eb72e084.cjs → node-runtime-3bfd8465.cjs} +1 -1
- package/lib/node/{node-runtime-80c4bfc8.js → node-runtime-78262e65.js} +1 -1
- package/lib/node/{server-entry-e8ac67b5.js → server-entry-5f9f100f.js} +1 -1
- package/lib/node/{server-entry-b2103255.cjs → server-entry-63058f3f.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +15 -15
- package/types/components/content/components/styles.d.ts +2 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/components/inlined-script.d.ts +2 -1
- package/types/components/inlined-styles.d.ts +2 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/types.d.ts +1 -0
- package/types/types/builder-props.d.ts +3 -0
- package/lib/edge/columns-bc2b0674.cjs +0 -28
- package/lib/edge/symbol-36a155f3.js +0 -84
- package/lib/edge/symbol-a244cc31.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use client";"use strict";var $e=Object.defineProperty;var De=(e,t,n)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var G=(e,t,n)=>(De(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("./server-entry-
|
|
1
|
+
"use client";"use strict";var $e=Object.defineProperty;var De=(e,t,n)=>t in e?$e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var G=(e,t,n)=>(De(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("./server-entry-29c5c31c.cjs"),h=require("react"),Le=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Oe=e=>typeof e=="string"&&Le.has(e.toLowerCase());function ne(e){return a.jsx(a.Fragment,{children:Oe(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const O=()=>{switch(g.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function fe(e){function t(){return{...e.attributes,[O()]:`${e.link?"":"builder-button"} ${e.attributes[O()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(ne,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const z=h.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""}),he=h.createContext({registeredComponents:{}});function Me(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}const Ue=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),He=()=>({isEditing:g.isEditing(),isBrowser:g.isBrowser(),isServer:!g.isBrowser(),getUserAttributes:()=>g.getUserAttributes()}),qe=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,oe=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:l,rootState:r})=>{const s=Ue({builder:t,context:n,event:i,state:ge({rootState:r,localState:o,rootSetState:l})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))};function ge({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const l=i[o];return typeof l=="object"&&l!==null?ge({rootState:l,localState:void 0,rootSetState:n?r=>{i[o]=r,n(i)}:void 0}):l},set:(i,o,l)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=l,n==null||n(i),!0}})}function Ke(){var e;return typeof process!="undefined"&&g.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ze=()=>{var i;if(!Ke())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(g.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},_e=e=>(g.isBrowser()||ze(),oe(e)),N=class N{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return N.cache.get(t)}static setCachedValue(t,n){N.cache.size>20&&N.cache.delete(N.cache.keys().next().value),N.cache.set(t,{value:n})}};G(N,"cacheLimit",20),G(N,"cache",new Map);let D=N;function M({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:l,isExpression:r=!0,enableCache:s}){if(e==="")return;const c={code:qe(e,{isExpression:r}),builder:He(),context:t,event:l,rootSetState:o,rootState:i,localState:n};if(s){const u=D.getCacheKey(c),f=D.getCachedValue(u);if(f)return f.value}try{const u=_e(c);if(s){const f=D.getCacheKey(c);D.setCachedValue(f,u)}return u}catch(u){g.logger.error("Failed code evaluation: "+u.message,{code:e});return}}const be=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,l,r)=>Object(o[l])===o[l]?o[l]:o[l]=Math.abs(Number(i[r+1]))>>0===+i[r+1]?[]:{},e)[i[i.length-1]]=n,e};const Je=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const l=g.fastClone(e),r={...l,properties:{...l.properties},actions:{...l.actions}};for(const s in e.bindings){const c=e.bindings[s],u=M({code:c,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});be(r,s,u)}return r};function K({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:l}){const r=e;return n?Je({block:r,localState:i,rootState:o,rootSetState:l,context:t}):r}const _=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Ge(e,t,n={}){let i,o,l,r=null,s=0;const c=function(){s=n.leading===!1?0:Date.now(),r=null,l=e.apply(i,o),r||(i=o=null)};return function(){const u=Date.now();!s&&n.leading===!1&&(s=u);const f=t-(u-s);return i=this,o=arguments,f<=0||f>t?(r&&(clearTimeout(r),r=null),s=u,l=e.apply(i,o),r||(i=o=null)):!r&&n.trailing!==!1&&(r=setTimeout(c,f)),l}}function L(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const l in o)Object.prototype.hasOwnProperty.call(o,l)&&(n[l]=o[l])}return n}function Ye(e){for(const t of e)switch(t.trigger){case"pageLoad":ye(t);break;case"scrollInView":Xe(t);break}}function xe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function pe(e,t){const n=Qe(e),i=getComputedStyle(t),o=e.steps[0].styles,l=e.steps[e.steps.length-1].styles,r=[o,l];for(const s of r)for(const c of n)c in s||(s[c]=i[c])}function Qe(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{pe(e,n),n.style.transition="none",n.style.transitionDelay="0",L(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),L(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Xe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{pe(e,n);let i=!1,o=!1;function l(){!i&&s(n)?(i=!0,o=!0,setTimeout(()=>{L(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",r),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!s(n)&&(i=!1,L(n.style,e.steps[0].styles))}const r=Ge(l,200,{leading:!1});function s(f){const d=f.getBoundingClientRect(),m=window.innerHeight,y=(e.thresholdPercent||0)/100*m;return d.bottom>y&&d.top<m-y}const c=e.steps[0].styles;function u(){L(n.style,c)}u(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${_(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),l()})}const Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${_(n)}: ${i};`}).filter(g.checkIsDefined),Ze=e=>Se(e).join(`
|
|
2
2
|
`),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${Ze(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
6
|
}`:i};function et({style:e}){return e}const tt=({block:e,context:t})=>ve(et({style:e.style||{},context:t,block:e}));function ve(e){switch(g.TARGET){case"svelte":case"vue":case"solid":case"angular":return Se(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const nt=({block:e,context:t,registeredComponents:n})=>{var l;const i=(l=K({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:l.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
|
|
7
7
|
Could not find a registered component named "${i}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},it=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const l=n.collection.split(".").pop(),r=n.itemName||(l?l+"Item":"item");return o.map((c,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:c,[r]:c,[`$${r}Index`]:u}},block:i}))},ot=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},at=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},rt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},lt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ke={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ae=(e,t=ke)=>`@media (max-width: ${t[e].max}px)`,Ce=({small:e,medium:t})=>{const n=g.fastClone(ke);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const l=n.medium.max+1;return n.large={max:2e3,min:l,default:l+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id})}function st(e){function t(){const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return g.checkIsDefined(i.hide)?!i.hide:g.checkIsDefined(i.show)?i.show:!0}function n(){var v,R,j;const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,l=e.context.content,r=Ce(((v=l==null?void 0:l.meta)==null?void 0:v.breakpoints)||{}),s=o==null?void 0:o.large,c=o==null?void 0:o.medium,u=o==null?void 0:o.small,f=i.id;if(!f)return"";const d=s?H({className:f,styles:s}):"",m=c?H({className:f,styles:c,mediaQuery:ae("medium",r)}):"",
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},it=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const l=n.collection.split(".").pop(),r=n.itemName||(l?l+"Item":"item");return o.map((c,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:c,[r]:c,[`$${r}Index`]:u}},block:i}))},ot=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},at=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},rt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},lt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},ke={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ae=(e,t=ke)=>`@media (max-width: ${t[e].max}px)`,Ce=({small:e,medium:t})=>{const n=g.fastClone(ke);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const l=n.medium.max+1;return n.large={max:2e3,min:l,default:l+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function st(e){function t(){const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return g.checkIsDefined(i.hide)?!i.hide:g.checkIsDefined(i.show)?i.show:!0}function n(){var v,R,j;const i=K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,l=e.context.content,r=Ce(((v=l==null?void 0:l.meta)==null?void 0:v.breakpoints)||{}),s=o==null?void 0:o.large,c=o==null?void 0:o.medium,u=o==null?void 0:o.small,f=i.id;if(!f)return"";const d=s?H({className:f,styles:s}):"",m=c?H({className:f,styles:c,mediaQuery:ae("medium",r)}):"",x=u?H({className:f,styles:u,mediaQuery:ae("small",r)}):"",y=i.animations&&i.animations.find(B=>B.trigger==="hover");let w="";if(y){const B=((j=(R=y.steps)==null?void 0:R[1])==null?void 0:j.styles)||{};w=H({className:`${f}:hover`,styles:{...B,transition:`all ${y.duration}s ${_(y.easing)}`,transitionDelay:y.delay?`${y.delay}s`:"0s"}})||""}return[d,m,x,w].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function ct(e){return e.charAt(0).toUpperCase()+e.slice(1)}const dt=e=>`on${ct(e)}`,ut=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function Te(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const l=n[o];let r=dt(o);if(e.stripPrefix)switch(g.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=ut(l,e)}return t}function mt({properties:e}){return e}const ft=e=>({href:e.href});function ie({block:e,context:t}){var i;const n={...ft(e),...e.properties,"builder-id":e.id,style:tt({block:e,context:t}),[O()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return mt({properties:n,context:t,block:e})}function ht(e){return a.jsx(ne,{TagName:e.Wrapper,attributes:ie({block:e.block,context:e.context}),actionAttributes:Te({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function gt(e){function t(){return e.includeBlockProps?{...ie({block:e.block,context:e.context}),...Te({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const bt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:l,contextValue:r})=>{const s={...e,...o?{attributes:ie({block:t,context:r})}:{}};return l?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:s};function re(e){var i;const[t,n]=h.useState(()=>e.isInteractive?gt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...bt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>a.jsx(U,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function xt(e){const[t,n]=h.useState(()=>e.repeatContext);return a.jsx(z.Provider,{value:t,children:a.jsx(U,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function U(e){var c,u,f;function t(){return nt({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return it({block:e.block,context:e.context})}function i(){var d;return(d=e.block.repeat)!=null&&d.collection?e.block:K({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var m;return e.block.tagName==="a"||((m=i().properties)==null?void 0:m.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var x,y;if((x=e.block.repeat)!=null&&x.collection)return!!((y=n==null?void 0:n())!=null&&y.length);const d="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!d}function r(){var m,x;return!((m=t==null?void 0:t())!=null&&m.component)&&!n()?(x=i().children)!=null?x:[]:[]}function s(){var d,m,x,y;return{blockChildren:(d=i().children)!=null?d:[],componentRef:(m=t==null?void 0:t())==null?void 0:m.component,componentOptions:{...Me(i()),...rt(t(),i()),...lt(t(),e.context),...ot(t(),e.linkComponent),...at(t(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((x=t==null?void 0:t())==null?void 0:x.noWrap)===!0,isInteractive:!((y=t==null?void 0:t())!=null&&y.isRSC)}}return h.useEffect(()=>{const d=i().id,m=i().animations;m&&d&&Ye(m.map(x=>({...x,elementId:d})))},[]),a.jsx(a.Fragment,{children:l()?a.jsxs(a.Fragment,{children:[a.jsx(st,{block:e.block,context:e.context}),(c=t==null?void 0:t())!=null&&c.noWrap?a.jsx(a.Fragment,{children:a.jsx(re,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(f=n())==null?void 0:f.map((d,m)=>a.jsx(xt,{repeatContext:d.context,block:d.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},m))}):a.jsxs(ht,{Wrapper:o(),block:i(),context:e.context,children:[a.jsx(re,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive}),(u=r())==null?void 0:u.map(d=>a.jsx(U,{block:d,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},d.id))]})})]}):null})}function pt(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`})]})}function F(e){var i,o,l;const t=h.useContext(z),n=h.useContext(he);return a.jsx(
|
|
12
|
+
}`})]})}function F(e){var i,o,l;const t=h.useContext(z),n=h.useContext(he);return a.jsx(pt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(l=e.blocks)==null?void 0:l.map(r=>a.jsx(U,{block:r,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},r.id))}):null})}const yt=e=>`builder-columns ${e}-breakpoints`;function Ie(e){var B,W;const[t,n]=h.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=h.useState(()=>e.columns||[]),[l,r]=h.useState(()=>e.stackColumnsAt||"tablet");function s(C){return C.link?e.builderLinkComponent||"a":"div"}function c(C){var E;return((E=i[C])==null?void 0:E.width)||100/i.length}function u(C){const E=c(C),P=t*(i.length-1)*(E/100);return`calc(${E}% - ${P}px)`}function f({stackedStyle:C,desktopStyle:E}){return l==="tablet"?C:E}function d({stackedStyle:C,desktopStyle:E}){return l==="never"?E:C}const[m,x]=h.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function y(){return{"--flex-dir":m,"--flex-dir-tablet":f({stackedStyle:m,desktopStyle:"row"})}}function w(C){const E=C===0?0:t,P=u(C),p=`${E}px`,b="100%",S=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:p,"--column-width-mobile":d({stackedStyle:b,desktopStyle:P}),"--column-margin-left-mobile":d({stackedStyle:S,desktopStyle:p}),"--column-width-tablet":f({stackedStyle:b,desktopStyle:P}),"--column-margin-left-tablet":f({stackedStyle:S,desktopStyle:p})}}function v(C){var P,p;return Ce(((p=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:p.breakpoints)||{})[C].max}function R(){return`
|
|
13
13
|
@media (max-width: ${v("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
`}function j(C,E){return{...C.link?{href:C.link}:{},[O()]:"builder-column",style:ve(w(E))}}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:yt((B=e.builderBlock)==null?void 0:B.id)+" div-
|
|
36
|
+
`}function j(C,E){return{...C.link?{href:C.link}:{},[O()]:"builder-column",style:ve(w(E))}}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:yt((B=e.builderBlock)==null?void 0:B.id)+" div-fe220f58",style:y(),children:[a.jsx(J,{id:"builderio-columns",styles:R(),nonce:e.builderContext.nonce}),(W=e.columns)==null?void 0:W.map((C,E)=>a.jsx(ne,{TagName:s(C),actionAttributes:{},attributes:j(C,E),children:a.jsx(F,{path:`component.options.columns.${E}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:C.blocks})},E))]}),a.jsx("style",{children:`.div-fe220f58 {
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
39
|
}`})]})}function we(e){return a.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function St(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function vt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return le(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),o=n[3],l=t.match("x")?t:`${t}x`;return le(`${i[0]}_${l}${o}`)}return null}function Y(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${St(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[vt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ee(e){var o,l,r,s,c,u;function t(){var m;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((m=e.image)!=null&&m.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),Y(d)}else if(e.image&&!e.srcset)return Y(d);return Y(d)}function n(){var f;return(f=t==null?void 0:t())!=null&&f.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const f={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?f:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-ac3dff4a",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-ac3dff4a",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(s=(r=e.builderBlock)==null?void 0:r.children)!=null&&s.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((u=(c=e.builderBlock)==null?void 0:c.children)!=null&&u.length)?a.jsx("div",{className:"div-ac3dff4a-2",children:e.children}):null]}),a.jsx("style",{children:`.img-ac3dff4a {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
|
-
}`})]})}function Re(e){return a.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const Q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},X={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},kt={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]}],defaultValue:[{title:[Q],detail:[X]},{title:[Q],detail:[X]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},se=e=>e.toString();function Ct(e){var d;const[t,n]=h.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function l(){const p={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(p).filter(([y,w])=>w!==void 0))}function r(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function s(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function c(){let m=null;if(e.grid&&t.length&&document){const y=t[0];let v=document.querySelector(`.builder-accordion-title[data-index="${y}"]`);if(m=y,v){let R=v.getBoundingClientRect();for(;v=v&&v.nextElementSibling;)if(v){if(v.classList.contains("builder-accordion-detail"))continue;const j=v.getBoundingClientRect();if(j.left>R.left){const B=parseInt(v.getAttribute("data-index")||"",10);isNaN(B)||(R=j,m=B)}else break}}}return typeof m=="number"&&(m=m+1),m}function u(){const m={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([p,y])=>y!==void 0))}function f(m){t.includes(m)?n(i()?[]:t.filter(p=>p!==m)):n(i()?[m]:t.concat(m))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(d=e.items)==null?void 0:d.map((m,p)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:r(p),style:{...l(),width:e.grid?e.gridRowWidth:void 0,order:c()!==null?se(p):se(p+1)},"data-index":p,onClick:y=>f(p),children:a.jsx(F,{blocks:m.title,path:`items.${p}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(p)?a.jsx("div",{className:s(p),style:u(),children:a.jsx(F,{blocks:m.detail,path:`items.${p}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const Tt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},It={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(l=>!l.get("width"))||n.reduce((s,c)=>s+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},wt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Et={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(r,s=6e4){return new Promise((c,u)=>{const f=document.createElement("img");let d=!1;f.onload=()=>{d=!0,c(f)},f.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),f.src=r,setTimeout(()=>{d||u(new Error("Image load timed out"))},s)})}function i(r){return Math.round(r*1e3)/1e3}const o=e.get("image"),l=e.get("aspectRatio");if(fetch(o).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!l||l===.7041))return n(o).then(r=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&r.width&&r.height&&(e.set("aspectRatio",i(r.height/r.width)),e.set("height",r.height),e.set("width",r.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},Rt={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>"}}}]},jt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0}};function Bt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(F,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Pt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},ee={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Vt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[ee]}],defaultValue:[{label:[{...Z,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Z,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function At(e){var l;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function o(r){r===t&&e.collapsible?n(-1):n(r)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(l=e.tabs)==null?void 0:l.map((r,s)=>a.jsx("span",{className:`builder-tab-wrap ${t===s?"builder-tab-active":""}`,style:{...t===s?e.activeTabStyle:{}},onClick:c=>o(s),children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${s}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},s))}),i(t)?a.jsx("div",{children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Ft={shouldReceiveBuilderProps:{builderBlock:!1},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 je(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Nt={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]};function Wt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]);return h.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let c=0;c<r.length;c++){const u=r[c];if(u.src){if(n.includes(u.src))continue;n.push(u.src);const f=document.createElement("script");f.async=!0,f.src=u.src,document.head.appendChild(f)}else if(!u.type||["text/javascript","application/javascript","application/ecmascript"].includes(u.type)){if(o.includes(u.innerText))continue;try{o.push(u.innerText),new Function(u.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const $t={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Dt=["text/javascript","application/javascript","application/ecmascript"],Lt=e=>Dt.includes(e.type);function Ot(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]),[r,s]=h.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let f=0;f<u.length;f++){const d=u[f];if(d.src&&!n.includes(d.src)){n.push(d.src);const m=document.createElement("script");m.async=!0,m.src=d.src,document.head.appendChild(m)}else if(Lt(d)&&!o.includes(d.innerText))try{o.push(d.innerText),new Function(d.innerText)()}catch(m){console.warn("`Embed`: Error running script:",m)}}}return h.useEffect(()=>{t.current&&!r&&(s(!0),c())},[t.current,r]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Mt={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Ut=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Ht=()=>{const e=process.env.NODE_ENV||"production";return Ut.includes(e)?e:"production"},qt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,l)=>o!=null?o[l]:o,e);return i===void 0||i===e?n:i};function Kt(e){var d,m;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,l]=h.useState(()=>null),[r,s]=h.useState(()=>"");function c(p){var w,v;const y={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(v=(w=e.builderContext).rootSetState)==null||v.call(w,y):e.builderContext.rootState=y}function u(){return g.isEditing()&&e.previewState||n}function f(p){var w;const y=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(y){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const v=p.currentTarget||p.target,R=e.customHeaders||{};let j;const B=new FormData(v),W=Array.from(v.querySelectorAll("input,select,textarea")).filter(x=>!!x.name).map(x=>{let b;const S=x.name;if(x instanceof HTMLInputElement)if(x.type==="radio"){if(x.checked)return b=x.name,{key:S,value:b}}else if(x.type==="checkbox")b=x.checked;else if(x.type==="number"||x.type==="range"){const k=x.valueAsNumber;isNaN(k)||(b=k)}else x.type==="file"?b=x.files:b=x.value;else b=x.value;return{key:S,value:b}});let C=e.contentType;if(e.sendSubmissionsTo==="email"&&(C="multipart/form-data"),Array.from(W).forEach(({value:x})=>{(x instanceof File||Array.isArray(x)&&x[0]instanceof File||x instanceof FileList)&&(C="multipart/form-data")}),C!=="application/json")j=B;else{const x={};Array.from(W).forEach(({value:b,key:S})=>{be(x,S,b)}),j=JSON.stringify(x)}C&&C!=="multipart/form-data"&&(y&&((w=e.action)!=null&&w.includes("zapier.com"))||(R["content-type"]=C));const E=new CustomEvent("presubmit",{detail:{body:j}});if(t.current&&(t.current.dispatchEvent(E),E.defaultPrevented))return;i("sending");const P=`${Ht()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?P:e.action,{body:j,headers:R,method:e.method||"post"}).then(async x=>{let b;const S=x.headers.get("content-type");if(S&&S.indexOf("application/json")!==-1?b=await x.json():b=await x.text(),!x.ok&&e.errorMessagePath){let k=qt(b,e.errorMessagePath);k&&(typeof k!="string"&&(k=JSON.stringify(k)),s(k),c({formErrorMessage:k}))}if(l(b),i(x.ok?"success":"error"),x.ok){const k=new CustomEvent("submit:success",{detail:{res:x,body:b}});if(t.current){if(t.current.dispatchEvent(k),k.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const T=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(T),T.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},x=>{const b=new CustomEvent("submit:error",{detail:{error:x}});t.current&&(t.current.dispatchEvent(b),b.defaultPrevented)||(l(x),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>f(p),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(m=(d=e.builderBlock)==null?void 0:d.children)==null?void 0:m.map((p,y)=>a.jsx(U,{block:p,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${y}`))}):null,u()==="error"?a.jsx(F,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?a.jsx(F,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(o,null,2)}):null,u()==="success"?a.jsx(F,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}const zt={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function _t(e){return h.createElement("input",{...e.attributes,key:g.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Jt={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function Gt(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:g.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Yt={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function Qt(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Xt={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function Zt(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const en={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function tn(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},g.isEditing()&&e.imgSrc||"default-key")}const nn={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Be(e){var i,o,l,r,s,c,u;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(s=(r=e.builderBlock)==null?void 0:r.children)!=null&&s.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(c=e.builderBlock)==null?void 0:c.children)!=null&&u.length&&!e.fitContent?a.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children}):null]})}const on=()=>[{component:Wt,...Nt},{component:Ot,...$t},{component:Kt,...Mt},{component:_t,...zt},{component:Qt,...Yt},{component:Gt,...Jt},{component:Zt,...Xt},{component:tn,...en},{component:Be,...nn}],ce=()=>[{component:fe,...Tt},{component:Ie,...It},{component:we,...wt},{component:Ee,...Et},{component:Re,...Rt},{component:Bt,...jt},{component:Ne,...Pt},{component:je,...Ft},{component:At,...Vt},{component:Ct,...kt},...on()],an=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
55
|
+
}`})]})}function Re(e){return a.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}const Q={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},X={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},kt={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]}],defaultValue:[{title:[Q],detail:[X]},{title:[Q],detail:[X]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},se=e=>e.toString();function Ct(e){var d;const[t,n]=h.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function o(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function l(){const x={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(x).filter(([y,w])=>w!==void 0))}function r(m){return`builder-accordion-title builder-accordion-title-${t.includes(m)?"open":"closed"}`}function s(m){return`builder-accordion-detail builder-accordion-detail-${t.includes(m)?"open":"closed"}`}function c(){let m=null;if(e.grid&&t.length&&document){const y=t[0];let v=document.querySelector(`.builder-accordion-title[data-index="${y}"]`);if(m=y,v){let R=v.getBoundingClientRect();for(;v=v&&v.nextElementSibling;)if(v){if(v.classList.contains("builder-accordion-detail"))continue;const j=v.getBoundingClientRect();if(j.left>R.left){const B=parseInt(v.getAttribute("data-index")||"",10);isNaN(B)||(R=j,m=B)}else break}}}return typeof m=="number"&&(m=m+1),m}function u(){const m={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(m).filter(([x,y])=>y!==void 0))}function f(m){t.includes(m)?n(i()?[]:t.filter(x=>x!==m)):n(i()?[m]:t.concat(m))}return a.jsx("div",{className:"builder-accordion",style:o(),children:(d=e.items)==null?void 0:d.map((m,x)=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:r(x),style:{...l(),width:e.grid?e.gridRowWidth:void 0,order:c()!==null?se(x):se(x+1)},"data-index":x,onClick:y=>f(x),children:a.jsx(F,{blocks:m.title,path:`items.${x}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(x)?a.jsx("div",{className:s(x),style:u(),children:a.jsx(F,{blocks:m.detail,path:`items.${x}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]}))})}const Tt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},It={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(l=>!l.get("width"))||n.reduce((s,c)=>s+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},wt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Et={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(r,s=6e4){return new Promise((c,u)=>{const f=document.createElement("img");let d=!1;f.onload=()=>{d=!0,c(f)},f.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),f.src=r,setTimeout(()=>{d||u(new Error("Image load timed out"))},s)})}function i(r){return Math.round(r*1e3)/1e3}const o=e.get("image"),l=e.get("aspectRatio");if(fetch(o).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!l||l===.7041))return n(o).then(r=>{const s=e.get("aspectRatio");e.get("image")===o&&(!s||s===.7041)&&r.width&&r.height&&(e.set("aspectRatio",i(r.height/r.width)),e.set("height",r.height),e.set("width",r.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},Rt={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>"}}}]},jt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0}};function Bt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(F,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Pt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Z={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},ee={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Vt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[ee]}],defaultValue:[{label:[{...Z,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Z,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function At(e){var l;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function o(r){r===t&&e.collapsible?n(-1):n(r)}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(l=e.tabs)==null?void 0:l.map((r,s)=>a.jsx("span",{className:`builder-tab-wrap ${t===s?"builder-tab-active":""}`,style:{...t===s?e.activeTabStyle:{}},onClick:c=>o(s),children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${s}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},s))}),i(t)?a.jsx("div",{children:a.jsx(F,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Ft={shouldReceiveBuilderProps:{builderBlock:!1},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 je(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Nt={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]};function Wt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]);return h.useEffect(()=>{var s;if(!((s=t.current)!=null&&s.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let c=0;c<r.length;c++){const u=r[c];if(u.src){if(n.includes(u.src))continue;n.push(u.src);const f=document.createElement("script");f.async=!0,f.src=u.src,document.head.appendChild(f)}else if(!u.type||["text/javascript","application/javascript","application/ecmascript"].includes(u.type)){if(o.includes(u.innerText))continue;try{o.push(u.innerText),new Function(u.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const $t={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Dt=["text/javascript","application/javascript","application/ecmascript"],Lt=e=>Dt.includes(e.type);function Ot(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,l]=h.useState(()=>[]),[r,s]=h.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let f=0;f<u.length;f++){const d=u[f];if(d.src&&!n.includes(d.src)){n.push(d.src);const m=document.createElement("script");m.async=!0,m.src=d.src,document.head.appendChild(m)}else if(Lt(d)&&!o.includes(d.innerText))try{o.push(d.innerText),new Function(d.innerText)()}catch(m){console.warn("`Embed`: Error running script:",m)}}}return h.useEffect(()=>{t.current&&!r&&(s(!0),c())},[t.current,r]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Mt={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Ut=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Ht=()=>{const e=process.env.NODE_ENV||"production";return Ut.includes(e)?e:"production"},qt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,l)=>o!=null?o[l]:o,e);return i===void 0||i===e?n:i};function Kt(e){var d,m;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,l]=h.useState(()=>null),[r,s]=h.useState(()=>"");function c(x){var w,v;const y={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(v=(w=e.builderContext).rootSetState)==null||v.call(w,y):e.builderContext.rootState=y}function u(){return g.isEditing()&&e.previewState||n}function f(x){var w;const y=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(y){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const v=x.currentTarget||x.target,R=e.customHeaders||{};let j;const B=new FormData(v),W=Array.from(v.querySelectorAll("input,select,textarea")).filter(p=>!!p.name).map(p=>{let b;const S=p.name;if(p instanceof HTMLInputElement)if(p.type==="radio"){if(p.checked)return b=p.name,{key:S,value:b}}else if(p.type==="checkbox")b=p.checked;else if(p.type==="number"||p.type==="range"){const k=p.valueAsNumber;isNaN(k)||(b=k)}else p.type==="file"?b=p.files:b=p.value;else b=p.value;return{key:S,value:b}});let C=e.contentType;if(e.sendSubmissionsTo==="email"&&(C="multipart/form-data"),Array.from(W).forEach(({value:p})=>{(p instanceof File||Array.isArray(p)&&p[0]instanceof File||p instanceof FileList)&&(C="multipart/form-data")}),C!=="application/json")j=B;else{const p={};Array.from(W).forEach(({value:b,key:S})=>{be(p,S,b)}),j=JSON.stringify(p)}C&&C!=="multipart/form-data"&&(y&&((w=e.action)!=null&&w.includes("zapier.com"))||(R["content-type"]=C));const E=new CustomEvent("presubmit",{detail:{body:j}});if(t.current&&(t.current.dispatchEvent(E),E.defaultPrevented))return;i("sending");const P=`${Ht()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?P:e.action,{body:j,headers:R,method:e.method||"post"}).then(async p=>{let b;const S=p.headers.get("content-type");if(S&&S.indexOf("application/json")!==-1?b=await p.json():b=await p.text(),!p.ok&&e.errorMessagePath){let k=qt(b,e.errorMessagePath);k&&(typeof k!="string"&&(k=JSON.stringify(k)),s(k),c({formErrorMessage:k}))}if(l(b),i(p.ok?"success":"error"),p.ok){const k=new CustomEvent("submit:success",{detail:{res:p,body:b}});if(t.current){if(t.current.dispatchEvent(k),k.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const T=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(T),T.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},p=>{const b=new CustomEvent("submit:error",{detail:{error:p}});t.current&&(t.current.dispatchEvent(b),b.defaultPrevented)||(l(p),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>f(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(m=(d=e.builderBlock)==null?void 0:d.children)==null?void 0:m.map((x,y)=>a.jsx(U,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${y}`))}):null,u()==="error"?a.jsx(F,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?a.jsx(F,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-3a20f614",children:JSON.stringify(o,null,2)}):null,u()==="success"?a.jsx(F,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-3a20f614 { padding: 10px; color: red; text-align: center; }"})," "]})}const zt={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function _t(e){return h.createElement("input",{...e.attributes,key:g.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Jt={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function Gt(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:g.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Yt={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function Qt(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Xt={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function Zt(e){return a.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const en={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function tn(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},g.isEditing()&&e.imgSrc||"default-key")}const nn={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Be(e){var i,o,l,r,s,c,u;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(s=(r=e.builderBlock)==null?void 0:r.children)!=null&&s.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(c=e.builderBlock)==null?void 0:c.children)!=null&&u.length&&!e.fitContent?a.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children}):null]})}const on=()=>[{component:Wt,...Nt},{component:Ot,...$t},{component:Kt,...Mt},{component:_t,...zt},{component:Qt,...Yt},{component:Gt,...Jt},{component:Zt,...Xt},{component:tn,...en},{component:Be,...nn}],ce=()=>[{component:fe,...Tt},{component:Ie,...It},{component:we,...wt},{component:Ee,...Et},{component:Re,...Rt},{component:Bt,...jt},{component:Ne,...Pt},{component:je,...Ft},{component:At,...Vt},{component:Ct,...kt},...on()],an=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
56
56
|
function getAndSetVariantId() {
|
|
57
57
|
function setCookie(name, value, days) {
|
|
58
58
|
let expires = '';
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"${t}",${JSON.stringify(e)}, ${Ae}
|
|
151
151
|
)`,un=({contentId:e,variationId:t})=>`window.${Ve}(
|
|
152
152
|
"${t}", "${e}", ${Ae}
|
|
153
|
-
)`;function te(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id})}function de(e){return Math.round(e*1e3)/1e3}const mn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},fn=e=>mn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ue=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,l=de(i/n.width),r=de(o/n.height);return{x:l,y:r}},hn=e=>{const t=e.target,n=t&&fn(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ue({event:e,target:t}):void 0,builderTargetOffset:n?ue({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},gn=e=>{var l,r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(r=e.fileUrl)!=null?r:(l=e==null?void 0:e.files)==null?void 0:l.regular;let o="";if(i&&t&&n&&(o+=`
|
|
153
|
+
)`;function te(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function de(e){return Math.round(e*1e3)/1e3}const mn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},fn=e=>mn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ue=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,l=de(i/n.width),r=de(o/n.height);return{x:l,y:r}},hn=e=>{const t=e.target,n=t&&fn(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ue({event:e,target:t}):void 0,builderTargetOffset:n?ue({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},gn=e=>{var l,r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(r=e.fileUrl)!=null?r:(l=e==null?void 0:e.files)==null?void 0:l.regular;let o="";if(i&&t&&n&&(o+=`
|
|
154
154
|
@font-face {
|
|
155
155
|
font-family: "${t}";
|
|
156
156
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -164,7 +164,7 @@ src: url('${u}') format('woff2');
|
|
|
164
164
|
font-display: fallback;
|
|
165
165
|
font-weight: ${s};
|
|
166
166
|
}
|
|
167
|
-
`.trim())}return o},bn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>gn(n)))==null?void 0:t.join(" "))||""},
|
|
167
|
+
`.trim())}return o},bn=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>gn(n)))==null?void 0:t.join(" "))||""},xn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",pn=`
|
|
168
168
|
.builder-button {
|
|
169
169
|
all: unset;
|
|
170
170
|
}
|
|
@@ -181,8 +181,8 @@ font-weight: ${s};
|
|
|
181
181
|
text-align: inherit;
|
|
182
182
|
font-family: inherit;
|
|
183
183
|
}
|
|
184
|
-
`,yn=e=>e?"":
|
|
185
|
-
${
|
|
184
|
+
`,yn=e=>e?"":pn,Sn=e=>`variant-${e}`;function vn(e){var j,B,W,C,E,P,p;const t=h.useRef(null);function n(b){var k,T;const S={...e.builderContextSignal.rootState,...b};e.builderContextSignal.rootSetState?(T=(k=e.builderContextSignal).rootSetState)==null||T.call(k,S):e.setBuilderContextSignal(I=>({...I,rootState:S}))}function i(b){var k,T,I,V,$;const S={...e.builderContextSignal.content,...b,data:{...(k=e.builderContextSignal.content)==null?void 0:k.data,...b==null?void 0:b.data},meta:{...(T=e.builderContextSignal.content)==null?void 0:T.meta,...b==null?void 0:b.meta,breakpoints:((I=b==null?void 0:b.meta)==null?void 0:I.breakpoints)||(($=(V=e.builderContextSignal.content)==null?void 0:V.meta)==null?void 0:$.breakpoints)}};e.setBuilderContextSignal(A=>({...A,content:S}))}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[l,r]=h.useState(()=>e.contentWrapper||"div");function s(b){return g.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:S=>{var I;const{breakpoints:k,contentId:T}=S;!T||T!==((I=e.builderContextSignal.content)==null?void 0:I.id)||k&&i({meta:{breakpoints:k}})},animation:S=>{ye(S)},contentUpdate:S=>{i(S)}}})(b)}function c(){var S,k;const b=(k=(S=e.builderContextSignal.content)==null?void 0:S.data)==null?void 0:k.jsCode;b&&M({code:b,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[u,f]=h.useState(()=>({})),[d,m]=h.useState(()=>({})),[x,y]=h.useState(()=>!1);function w(b){var S,k;if(e.builderContextSignal.content){const T=(S=e.builderContextSignal.content)==null?void 0:S.testVariationId,I=(k=e.builderContextSignal.content)==null?void 0:k.id;g._track({type:"click",canTrack:g.getDefaultCanTrack(e.canTrack),contentId:I,apiKey:e.apiKey,variationId:T!==I?T:void 0,...hn(b),unique:!x})}x||y(!0)}function v(){var S,k,T;const b=(T=(k=(S=e.builderContextSignal.content)==null?void 0:S.data)==null?void 0:k.httpRequests)!=null?T:{};Object.entries(b).forEach(([I,V])=>{if(!V||d[I]||u[I]&&!g.isEditing())return;d[I]=!0;const $=V.replace(/{{([^}]+)}}/g,(A,We)=>String(M({code:We,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));g.fetch($).then(A=>A.json()).then(A=>{n({[I]:A}),u[I]=!0}).catch(A=>{console.error("error fetching dynamic data",V,A)}).finally(()=>{d[I]=!1})})}function R(){g.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:g.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return h.useEffect(()=>{var b,S;if(g.isBrowser()){if(g.isEditing()&&(window.addEventListener("message",s),g.registerInsertMenu(),g.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(T=>{var V;const I=g.createRegisterComponentMessage(T);(V=window.parent)==null||V.postMessage(I,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",R)),e.builderContextSignal.content&&g.getDefaultCanTrack(e.canTrack)){const T=(b=e.builderContextSignal.content)==null?void 0:b.testVariationId,I=(S=e.builderContextSignal.content)==null?void 0:S.id,V=e.apiKey;g._track({type:"impression",canTrack:!0,contentId:I,apiKey:V,variationId:T!==I?T:void 0})}if(g.isPreviewing()&&!g.isEditing()){const T=new URL(location.href).searchParams,I=T.get("builder.preview"),V=T.get(`builder.overrides.${I}`),$=T.get("apiKey")||T.get("builder.space");I===e.model&&$===e.apiKey&&(!e.content||V===e.content.id)&&g.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(A=>{A&&i(A)})}}},[]),h.useEffect(()=>{e.apiKey||g.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."),c(),v(),R()},[]),h.useEffect(()=>{e.content&&i(e.content)},[e.content]),h.useEffect(()=>{c()},[(B=(j=e.builderContextSignal.content)==null?void 0:j.data)==null?void 0:B.jsCode]),h.useEffect(()=>{v()},[(C=(W=e.builderContextSignal.content)==null?void 0:W.data)==null?void 0:C.httpRequests]),h.useEffect(()=>{R()},[e.builderContextSignal.rootState]),h.useEffect(()=>{e.data&&n(e.data)},[e.data]),h.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),h.useEffect(()=>()=>{g.isBrowser()&&(window.removeEventListener("message",s),window.removeEventListener("builder:component:stateChangeListenerActivated",R))},[]),a.jsx(z.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(l,{ref:t,onClick:b=>w(b),"builder-content-id":(E=e.builderContextSignal.content)==null?void 0:E.id,"builder-model":e.model,...o(),...e.contentWrapperProps,className:Sn(((P=e.content)==null?void 0:P.testVariationId)||((p=e.content)==null?void 0:p.id)),children:e.children}):null})}function kn(e){const[t,n]=h.useState(()=>`
|
|
185
|
+
${xn({cssCode:e.cssCode,contentId:e.contentId})}
|
|
186
186
|
${bn({customFonts:e.customFonts})}
|
|
187
187
|
${yn(e.isNestedRender)}
|
|
188
|
-
`.trim());return a.jsx(J,{id:"builderio-content",styles:t})}const Cn=({content:e,data:t,locale:n})=>{var l,r,s;const i={},o=((l=e==null?void 0:e.data)==null?void 0:l.state)||{};return(s=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},Tn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function me(e){var c,u,f,d,m,
|
|
188
|
+
`.trim());return a.jsx(J,{id:"builderio-content",styles:t,nonce:e.nonce})}const Cn=({content:e,data:t,locale:n})=>{var l,r,s;const i={},o=((l=e==null?void 0:e.data)==null?void 0:l.state)||{};return(s=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},Tn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function me(e){var c,u,f,d,m,x,y;const[t,n]=h.useState(()=>{var w,v;return un({variationId:(w=e.content)==null?void 0:w.testVariationId,contentId:(v=e.content)==null?void 0:v.id})});function i(w){s(v=>({...v,rootState:w}))}const[o,l]=h.useState(()=>[...ce(),...e.customComponents||[]].reduce((w,{component:v,...R})=>({...w,[R.name]:{component:v,...g.serializeComponentInfo(R)}}),{})),[r,s]=h.useState(()=>({content:Tn({content:e.content,data:e.data}),localState:void 0,rootState:Cn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ce(),...e.customComponents||[]].reduce((w,{component:v,...R})=>({...w,[R.name]:g.serializeComponentInfo(R)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||""}));return a.jsx(he.Provider,{value:{registeredComponents:o},children:a.jsxs(vn,{nonce:e.nonce,content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:r,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,setBuilderContextSignal:s,children:[e.isSsrAbTest?a.jsx(te,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,a.jsx(kn,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(c=r.content)==null?void 0:c.id,cssCode:(f=(u=r.content)==null?void 0:u.data)==null?void 0:f.cssCode,customFonts:(m=(d=r.content)==null?void 0:d.data)==null?void 0:m.customFonts}),a.jsx(F,{blocks:(y=(x=r.content)==null?void 0:x.data)==null?void 0:y.blocks,context:r,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Fe(e){var r;const[t,n]=h.useState(()=>ln({canTrack:g.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var s;return dn(q(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((s=e.content)==null?void 0:s.id)||"")}function o(){return q(e.content).map(s=>`.variant-${s.testVariationId} { display: none; } `).join("")}function l(){var s;return t?{...e.content,testVariationId:(s=e.content)==null?void 0:s.id}:g.handleABTestingSync({item:e.content,canTrack:g.getDefaultCanTrack(e.canTrack)})}return h.useEffect(()=>{},[]),h.useEffect(()=>{}),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&g.TARGET!=="reactNative"?a.jsx(te,{id:"builderio-init-variants-fns",scriptStr:cn(),nonce:e.nonce||""}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:"builderio-variants",styles:o(),nonce:e.nonce||""}),a.jsx(te,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(r=q(e.content))==null?void 0:r.map(s=>a.jsx(me,{isNestedRender:e.isNestedRender,nonce:e.nonce,content:s,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},s.testVariationId))]}):null,a.jsx(me,{nonce:e.nonce,isNestedRender:e.isNestedRender,content:l(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const In=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return g.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{g.logger.error("Could not fetch symbol content: ",n)})};function Ne(e){var s,c,u,f;function t(){return"div"}function n(){return"div"}function i(){var d,m;return[e.attributes[O()],"builder-symbol",(d=e.symbol)!=null&&d.inline?"builder-inline-symbol":void 0,(m=e.symbol)!=null&&m.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[o,l]=h.useState(()=>{var d;return(d=e.symbol)==null?void 0:d.content});function r(){o||In({symbol:e.symbol,builderContextValue:e.builderContext}).then(d=>{d&&l(d)})}return h.useEffect(()=>{},[]),h.useEffect(()=>{r()},[e.symbol]),a.jsx("div",{...e.attributes,className:i(),children:a.jsx(Fe,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(s=e.builderBlock)==null?void 0:s.id},customComponents:Object.values(e.builderComponents),data:{...(c=e.symbol)==null?void 0:c.data,...e.builderContext.localState,...(u=o==null?void 0:o.data)==null?void 0:u.state},canTrack:e.builderContext.canTrack,model:(f=e.symbol)==null?void 0:f.model,content:o,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.Blocks=F;exports.BuilderContext=z;exports.Button=fe;exports.Columns=Ie;exports.Content=Fe;exports.Fragment=we;exports.Image=Ee;exports.Section=Re;exports.Symbol=Ne;exports.Text=je;exports.Video=Be;
|
|
@@ -3,7 +3,7 @@ var qe = Object.defineProperty;
|
|
|
3
3
|
var Ke = (e, t, n) => t in e ? qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var ie = (e, t, n) => (Ke(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
5
5
|
import { jsx as s, Fragment as R, jsxs as P } from "react/jsx-runtime";
|
|
6
|
-
import { TARGET as z, isEditing as $, isBrowser as M, getUserAttributes as ze, checkIsDefined as G, logger as Z, fastClone as de, registerInsertMenu as _e, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-
|
|
6
|
+
import { TARGET as z, isEditing as $, isBrowser as M, getUserAttributes as ze, checkIsDefined as G, logger as Z, fastClone as de, registerInsertMenu as _e, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-f9067095.js";
|
|
7
7
|
import { createContext as Re, useState as C, useEffect as B, useContext as be, useRef as ee, createElement as Ee } from "react";
|
|
8
8
|
const et = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), tt = (e) => typeof e == "string" && et.has(e.toLowerCase());
|
|
9
9
|
function ue(e) {
|
|
@@ -59,7 +59,8 @@ const me = Re({
|
|
|
59
59
|
componentInfos: {},
|
|
60
60
|
inheritedStyles: {},
|
|
61
61
|
BlocksWrapper: "div",
|
|
62
|
-
BlocksWrapperProps: {}
|
|
62
|
+
BlocksWrapperProps: {},
|
|
63
|
+
nonce: ""
|
|
63
64
|
}), Be = Re({ registeredComponents: {} });
|
|
64
65
|
function it(e) {
|
|
65
66
|
var t;
|
|
@@ -525,7 +526,8 @@ function ne(e) {
|
|
|
525
526
|
"style",
|
|
526
527
|
{
|
|
527
528
|
dangerouslySetInnerHTML: { __html: e.styles },
|
|
528
|
-
"data-id": e.id
|
|
529
|
+
"data-id": e.id,
|
|
530
|
+
nonce: e.nonce
|
|
529
531
|
}
|
|
530
532
|
);
|
|
531
533
|
}
|
|
@@ -594,7 +596,14 @@ function Tt(e) {
|
|
|
594
596
|
I
|
|
595
597
|
].join(" ");
|
|
596
598
|
}
|
|
597
|
-
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
599
|
+
return /* @__PURE__ */ s(R, { children: n() && t() ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
600
|
+
ne,
|
|
601
|
+
{
|
|
602
|
+
id: "builderio-block",
|
|
603
|
+
styles: n(),
|
|
604
|
+
nonce: e.context.nonce
|
|
605
|
+
}
|
|
606
|
+
) }) : null });
|
|
598
607
|
}
|
|
599
608
|
function It(e) {
|
|
600
609
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
@@ -1098,10 +1107,17 @@ function $t(e) {
|
|
|
1098
1107
|
/* @__PURE__ */ P(
|
|
1099
1108
|
"div",
|
|
1100
1109
|
{
|
|
1101
|
-
className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-
|
|
1110
|
+
className: Ft((A = e.builderBlock) == null ? void 0 : A.id) + " div-fe220f58",
|
|
1102
1111
|
style: p(),
|
|
1103
1112
|
children: [
|
|
1104
|
-
/* @__PURE__ */ s(
|
|
1113
|
+
/* @__PURE__ */ s(
|
|
1114
|
+
ne,
|
|
1115
|
+
{
|
|
1116
|
+
id: "builderio-columns",
|
|
1117
|
+
styles: E(),
|
|
1118
|
+
nonce: e.builderContext.nonce
|
|
1119
|
+
}
|
|
1120
|
+
),
|
|
1105
1121
|
(O = e.columns) == null ? void 0 : O.map((S, w) => /* @__PURE__ */ s(
|
|
1106
1122
|
ue,
|
|
1107
1123
|
{
|
|
@@ -1128,7 +1144,7 @@ function $t(e) {
|
|
|
1128
1144
|
]
|
|
1129
1145
|
}
|
|
1130
1146
|
),
|
|
1131
|
-
/* @__PURE__ */ s("style", { children: `.div-
|
|
1147
|
+
/* @__PURE__ */ s("style", { children: `.div-fe220f58 {
|
|
1132
1148
|
display: flex;
|
|
1133
1149
|
line-height: normal;
|
|
1134
1150
|
}` })
|
|
@@ -3339,7 +3355,8 @@ function ce(e) {
|
|
|
3339
3355
|
"script",
|
|
3340
3356
|
{
|
|
3341
3357
|
dangerouslySetInnerHTML: { __html: e.scriptStr },
|
|
3342
|
-
"data-id": e.id
|
|
3358
|
+
"data-id": e.id,
|
|
3359
|
+
nonce: e.nonce || ""
|
|
3343
3360
|
}
|
|
3344
3361
|
);
|
|
3345
3362
|
}
|
|
@@ -3678,7 +3695,14 @@ ${Ln({
|
|
|
3678
3695
|
${Un(e.isNestedRender)}
|
|
3679
3696
|
`.trim()
|
|
3680
3697
|
);
|
|
3681
|
-
return /* @__PURE__ */ s(
|
|
3698
|
+
return /* @__PURE__ */ s(
|
|
3699
|
+
ne,
|
|
3700
|
+
{
|
|
3701
|
+
id: "builderio-content",
|
|
3702
|
+
styles: t,
|
|
3703
|
+
nonce: e.nonce
|
|
3704
|
+
}
|
|
3705
|
+
);
|
|
3682
3706
|
}
|
|
3683
3707
|
const Kn = ({
|
|
3684
3708
|
content: e,
|
|
@@ -3769,7 +3793,8 @@ function Ie(e) {
|
|
|
3769
3793
|
),
|
|
3770
3794
|
inheritedStyles: {},
|
|
3771
3795
|
BlocksWrapper: e.blocksWrapper || "div",
|
|
3772
|
-
BlocksWrapperProps: e.blocksWrapperProps || {}
|
|
3796
|
+
BlocksWrapperProps: e.blocksWrapperProps || {},
|
|
3797
|
+
nonce: e.nonce || ""
|
|
3773
3798
|
}));
|
|
3774
3799
|
return /* @__PURE__ */ s(
|
|
3775
3800
|
Be.Provider,
|
|
@@ -3780,6 +3805,7 @@ function Ie(e) {
|
|
|
3780
3805
|
children: /* @__PURE__ */ P(
|
|
3781
3806
|
Hn,
|
|
3782
3807
|
{
|
|
3808
|
+
nonce: e.nonce,
|
|
3783
3809
|
content: e.content,
|
|
3784
3810
|
data: e.data,
|
|
3785
3811
|
model: e.model,
|
|
@@ -3799,12 +3825,14 @@ function Ie(e) {
|
|
|
3799
3825
|
ce,
|
|
3800
3826
|
{
|
|
3801
3827
|
id: "builderio-variant-visibility",
|
|
3802
|
-
scriptStr: t
|
|
3828
|
+
scriptStr: t,
|
|
3829
|
+
nonce: e.nonce || ""
|
|
3803
3830
|
}
|
|
3804
3831
|
) : null,
|
|
3805
3832
|
/* @__PURE__ */ s(
|
|
3806
3833
|
qn,
|
|
3807
3834
|
{
|
|
3835
|
+
nonce: e.nonce || "",
|
|
3808
3836
|
isNestedRender: e.isNestedRender,
|
|
3809
3837
|
contentId: (c = a.content) == null ? void 0 : c.id,
|
|
3810
3838
|
cssCode: (f = (u = a.content) == null ? void 0 : u.data) == null ? void 0 : f.cssCode,
|
|
@@ -3864,7 +3892,8 @@ function _n(e) {
|
|
|
3864
3892
|
ce,
|
|
3865
3893
|
{
|
|
3866
3894
|
id: "builderio-init-variants-fns",
|
|
3867
|
-
scriptStr: Vn()
|
|
3895
|
+
scriptStr: Vn(),
|
|
3896
|
+
nonce: e.nonce || ""
|
|
3868
3897
|
}
|
|
3869
3898
|
) : null,
|
|
3870
3899
|
t ? /* @__PURE__ */ P(R, { children: [
|
|
@@ -3872,20 +3901,23 @@ function _n(e) {
|
|
|
3872
3901
|
ne,
|
|
3873
3902
|
{
|
|
3874
3903
|
id: "builderio-variants",
|
|
3875
|
-
styles: o()
|
|
3904
|
+
styles: o(),
|
|
3905
|
+
nonce: e.nonce || ""
|
|
3876
3906
|
}
|
|
3877
3907
|
),
|
|
3878
3908
|
/* @__PURE__ */ s(
|
|
3879
3909
|
ce,
|
|
3880
3910
|
{
|
|
3881
3911
|
id: "builderio-variants-visibility",
|
|
3882
|
-
scriptStr: i()
|
|
3912
|
+
scriptStr: i(),
|
|
3913
|
+
nonce: e.nonce || ""
|
|
3883
3914
|
}
|
|
3884
3915
|
),
|
|
3885
3916
|
(a = Y(e.content)) == null ? void 0 : a.map((l) => /* @__PURE__ */ s(
|
|
3886
3917
|
Ie,
|
|
3887
3918
|
{
|
|
3888
3919
|
isNestedRender: e.isNestedRender,
|
|
3920
|
+
nonce: e.nonce,
|
|
3889
3921
|
content: l,
|
|
3890
3922
|
showContent: !1,
|
|
3891
3923
|
model: e.model,
|
|
@@ -3911,6 +3943,7 @@ function _n(e) {
|
|
|
3911
3943
|
/* @__PURE__ */ s(
|
|
3912
3944
|
Ie,
|
|
3913
3945
|
{
|
|
3946
|
+
nonce: e.nonce,
|
|
3914
3947
|
isNestedRender: e.isNestedRender,
|
|
3915
3948
|
content: r(),
|
|
3916
3949
|
showContent: !0,
|
|
@@ -3988,6 +4021,7 @@ function Yn(e) {
|
|
|
3988
4021
|
}, [e.symbol]), /* @__PURE__ */ s("div", { ...e.attributes, className: i(), children: /* @__PURE__ */ s(
|
|
3989
4022
|
_n,
|
|
3990
4023
|
{
|
|
4024
|
+
nonce: e.builderContext.nonce,
|
|
3991
4025
|
isNestedRender: !0,
|
|
3992
4026
|
apiVersion: e.builderContext.apiVersion,
|
|
3993
4027
|
apiKey: e.builderContext.apiKey,
|