@builder.io/sdk-react 5.1.0 → 5.1.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 +15 -15
- package/lib/browser/blocks-exports.mjs +400 -368
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-7b82deab.cjs → server-entry-85aa99e6.cjs} +2 -2
- package/lib/browser/{server-entry-1df58bc2.js → server-entry-a3b5302c.js} +126 -126
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-ac489baa.cjs → accordion-1e467b30.cjs} +1 -1
- package/lib/edge/{accordion-a57423b4.js → accordion-83f68de4.js} +1 -1
- package/lib/edge/{blocks-612edfa7.cjs → blocks-4d57d38f.cjs} +12 -12
- package/lib/edge/{blocks-966052b8.js → blocks-6b821501.js} +359 -327
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-da479943.js → button-52af8a54.js} +2 -2
- package/lib/edge/{button-33b8e000.cjs → button-b2eb1d64.cjs} +1 -1
- package/lib/edge/{columns-476f3763.cjs → columns-8eb66fad.cjs} +1 -1
- package/lib/edge/{columns-384a8553.js → columns-e0489b50.js} +3 -3
- package/lib/edge/{content-variants-b281c0c9.js → content-variants-5003144d.js} +12 -12
- package/lib/edge/{content-variants-21daab2e.cjs → content-variants-6c1ee307.cjs} +2 -2
- package/lib/edge/{custom-code-8f1a8bf6.js → custom-code-4e76fc0d.js} +1 -1
- package/lib/edge/{custom-code-d420a6d1.cjs → custom-code-bc787526.cjs} +1 -1
- package/lib/edge/{embed-36d96f7c.cjs → embed-8ef248c5.cjs} +1 -1
- package/lib/edge/{embed-4baabd44.js → embed-fd344d6d.js} +1 -1
- package/lib/edge/{form-597542fa.cjs → form-107c9eae.cjs} +1 -1
- package/lib/edge/{form-7b4ce85e.js → form-4efa40a5.js} +3 -3
- package/lib/edge/{get-class-prop-name-0e04739a.cjs → get-class-prop-name-2c2513e9.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-71cc2ebb.js → get-class-prop-name-e6f7321f.js} +1 -1
- package/lib/edge/{img-f7f612f5.js → img-a32b0723.js} +2 -2
- package/lib/edge/{img-ac7c30e0.cjs → img-ab241f22.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-b6bd8bd9.cjs → input-ada30ffb.cjs} +1 -1
- package/lib/edge/{input-eb1cbd99.js → input-c48fe23a.js} +1 -1
- package/lib/edge/{personalization-container-c5a53dee.cjs → personalization-container-375a1501.cjs} +1 -1
- package/lib/edge/{personalization-container-5fd328ca.js → personalization-container-ad7cf89c.js} +4 -4
- package/lib/edge/{select-e0f16408.cjs → select-879c52dd.cjs} +1 -1
- package/lib/edge/{select-3f4a8f91.js → select-a49d819c.js} +1 -1
- package/lib/edge/{server-entry-00719c56.cjs → server-entry-560732da.cjs} +1 -1
- package/lib/edge/{server-entry-2d0b2a53.js → server-entry-68d59577.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-38a6fa40.js → slot-005d6258.js} +3 -3
- package/lib/edge/{slot-bf1f3ed7.cjs → slot-5da991d1.cjs} +1 -1
- package/lib/edge/{symbol-54dc2d3c.js → symbol-155906ed.js} +2 -2
- package/lib/edge/{symbol-3a09c0c2.cjs → symbol-7e6ac72e.cjs} +1 -1
- package/lib/edge/{tabs-312a6e0a.js → tabs-69a36a5c.js} +3 -3
- package/lib/edge/{tabs-c4a1844c.cjs → tabs-96367bf5.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +5 -5
- package/lib/node/blocks-exports.mjs +143 -127
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-6fc232c7.cjs → server-entry-2529c06e.cjs} +2 -2
- package/lib/node/{server-entry-4228cc2b.js → server-entry-fc7f08d8.js} +126 -126
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-29867fb3.js → setIvm-41d8b067.js} +60 -44
- package/lib/node/setIvm-b97cfb8b.cjs +48 -0
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-eab67c2a.cjs → should-force-browser-runtime-in-node-1d85a066.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-7c48ac04.js → should-force-browser-runtime-in-node-fc5c3a06.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/evaluate/evaluate.d.ts +1 -1
- package/types/functions/evaluate/helpers.d.ts +9 -1
- package/types/functions/get-block-actions-handler.d.ts +2 -0
- package/types/functions/get-block-actions.d.ts +2 -0
- package/lib/node/setIvm-5abc9e0c.cjs +0 -48
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const b="react";function a(){return typeof window!="undefined"&&typeof document!="undefined"}const I="[Builder.io]: ",f={log:(...t)=>console.log(I,...t),error:(...t)=>console.error(I,...t),warn:(...t)=>console.warn(I,...t),debug:(...t)=>console.debug(I,...t)},S=t=>t!=null,St=t=>{if(t==="localhost"||t==="127.0.0.1")return t;const e=t.split(".");return e.length>2?e.slice(1).join("."):t},v=({name:t,canTrack:e})=>{var r;try{return e?(r=document.cookie.split("; ").find(n=>n.startsWith(`${t}=`)))==null?void 0:r.split("=")[1]:void 0}catch(n){f.warn("[COOKIE] GET error: ",(n==null?void 0:n.message)||n);return}},j=async t=>v(t),bt=t=>t.map(([e,r])=>r?`${e}=${r}`:e).filter(S).join("; "),yt=[["secure",""],["SameSite","None"]],mt=({name:t,value:e,expires:r})=>{const s=(a()?location.protocol==="https:":!0)?yt:[[]],o=r?[["expires",r.toUTCString()]]:[[]],i=[[t,e],...o,["path","/"],["domain",St(window.location.hostname)],...s];return bt(i)},U=async({name:t,value:e,expires:r,canTrack:n})=>{try{if(!n)return;const s=mt({name:t,value:e,expires:r});document.cookie=s}catch(s){f.warn("[COOKIE] SET error: ",(s==null?void 0:s.message)||s)}};const N="builder.userAttributes";function V(){let t=!0;const e=new Set;return{setUserAttributes(r){if(!a())return;const n={...this.getUserAttributes(),...r};U({name:N,value:JSON.stringify(n),canTrack:t}),e.forEach(s=>s(n))},getUserAttributes(){return a()?JSON.parse(v({name:N,canTrack:t})||"{}"):{}},subscribeOnUserAttributesChange(r,{fireImmediately:n}={}){return e.add(r),n&&r(this.getUserAttributes()),function(){e.delete(r)}},setCanTrack(r){t=r}}}let k;a()&&b==="qwik"?(window.__BUILDER_USER_ATTRIBUTES_SERVICE__||(window.__BUILDER_USER_ATTRIBUTES_SERVICE__=V()),k=window.__BUILDER_USER_ATTRIBUTES_SERVICE__):k=V();const O=k,wt=t=>{O.setUserAttributes(t)},Et=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},$=t=>t instanceof URLSearchParams?Et(t):t,G=t=>typeof t=="string"?t:t instanceof URLSearchParams?t.toString():new URLSearchParams(t).toString();function At(){return a()&&window.self!==window.top}function J(t){return At()&&G(t||window.location.search).indexOf("builder.frameEditing=")!==-1}function It(t){const e=t||(a()?window.location.search:void 0);return e?G(e).indexOf("builder.preview=")!==-1:!1}const vt=t=>({type:"builder.registerComponent",data:P(t)}),kt=t=>{const e=t.toString().trim(),r=/^[a-zA-Z0-9_]+\s*=>/i.test(e);return`return (${!e.startsWith("function")&&!e.startsWith("async")&&!e.startsWith("(")&&!r?"function ":""}${e}).apply(this, arguments)`};function P(t){return JSON.parse(JSON.stringify(t,(e,r)=>typeof r=="function"?kt(r):r))}const D={};function Tt(t,e){t==="plugin"&&(e=P(e));let r=D[t];if(r||(r=D[t]=[]),r.push(e),a()){const n={type:"builder.register",data:{type:t,info:e}};try{parent.postMessage(n,"*"),parent!==window&&window.postMessage(n,"*")}catch(s){console.debug("Could not postmessage",s)}}}function Ut(t){var e;if(a()){const r=JSON.parse(JSON.stringify(t));t.action&&(r.action=t.action.toString()),(e=window.parent)==null||e.postMessage({type:"builder.registerAction",data:r},"*")}}const F={};function Ot(t){if(a()){Object.assign(F,t);const e={type:"builder.settingsChange",data:F};parent.postMessage(e,"*")}}const M="builder.",Pt="options.",R=t=>{if(!t)return{};const e=$(t),r={};return Object.keys(e).forEach(n=>{if(n.startsWith(M)){const s=n.replace(M,"").replace(Pt,"");r[s]=e[n]}}),r},Rt=()=>{if(!a())return{};const t=new URLSearchParams(window.location.search);return R(t)},z="5.1.0",X=()=>({"X-Builder-SDK":b,"X-Builder-SDK-GEN":"2","X-Builder-SDK-Version":z});function Ct(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}function H(){return Ct().replace(/-/g,"")}const Q="builderSessionId",Bt=async({canTrack:t})=>{if(!t)return;const e=await j({name:Q,canTrack:t});if(S(e))return e;{const r=xt();return _t({id:r,canTrack:t}),r}},xt=()=>H(),_t=({id:t,canTrack:e})=>U({name:Q,value:t,canTrack:e}),Y=()=>a()&&typeof localStorage!="undefined"?localStorage:void 0,Lt=({key:t,canTrack:e})=>{var r;try{return e?(r=Y())==null?void 0:r.getItem(t):void 0}catch(n){console.debug("[LocalStorage] GET error: ",n);return}},Nt=({key:t,canTrack:e,value:r})=>{var n;try{e&&((n=Y())==null||n.setItem(t,r))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},Z="builderVisitorId",Vt=({canTrack:t})=>{if(!t)return;const e=Lt({key:Z,canTrack:t});if(S(e))return e;{const r=Dt();return Ft({id:r,canTrack:t}),r}},Dt=()=>H(),Ft=({id:t,canTrack:e})=>Nt({key:Z,value:t,canTrack:e});function q(t){var e;typeof process!="undefined"&&((e=process.env)!=null&&e.DEBUG)&&String(process.env.DEBUG)=="true"&&f.log(t)}const Mt=()=>{if(a()){const t=new URL(location.href);return t.pathname===""&&(t.pathname="/"),t}else return console.warn("Cannot get location for tracking in non-browser environment"),null},Kt=()=>typeof navigator=="object"&&navigator.userAgent||"",tt=()=>{const t=Kt(),e={Android(){return t.match(/Android/i)},BlackBerry(){return t.match(/BlackBerry/i)},iOS(){return t.match(/iPhone|iPod/i)},Opera(){return t.match(/Opera Mini/i)},Windows(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any(){return e.Android()||e.BlackBerry()||e.iOS()||e.Opera()||e.Windows()||b==="reactNative"}},r=t.match(/Tablet|iPad/i),n=Mt();return{urlPath:n==null?void 0:n.pathname,host:(n==null?void 0:n.host)||(n==null?void 0:n.hostname),device:r?"tablet":e.any()?"mobile":"desktop"}},Wt=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await Bt({canTrack:t}),r=Vt({canTrack:t});return{sessionId:e,visitorId:r}},jt=async({type:t,canTrack:e,apiKey:r,metadata:n,...s})=>({type:t,data:{...s,metadata:{url:location.href,...n},...await Wt({canTrack:e}),userAttributes:tt(),ownerId:r}});async function et({apiHost:t,...e}){if(!e.apiKey){f.error("Missing API key for track call. Please provide your API key.");return}if(!e.canTrack||J()||!(a()||b==="reactNative"))return;const n=`${t||"https://cdn.builder.io"}/api/v1/track`;return q(n),fetch(n,{method:"POST",body:JSON.stringify({events:[await jt(e)]}),headers:{"content-type":"application/json",...X()},mode:"cors"}).catch(s=>{console.error("Failed to track: ",s)})}const $t=t=>et({...t,canTrack:!0}),Gt=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function rt(t,e){if(!e.origin.startsWith("http")&&!e.origin.startsWith("https"))return!1;const r=new URL(e.origin),n=r.hostname;return(t||Gt).findIndex(s=>s.startsWith("*.")?n.endsWith(s.slice(1)):s===n)>-1}let K=!1;const nt=t=>{var e,r;K||(K=!0,a()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:b,version:z,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,modelName:t.modelName,apiKey:t.apiKey,supportsXSmallBreakpoint:!0,blockLevelPersonalization:!0}},"*"),(r=window.parent)==null||r.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",n=>{var o,i;if(!rt(t.trustedHosts,n))return;const{data:s}=n;if(s!=null&&s.type)switch(s.type){case"builder.evaluate":{const u=s.data.text,l=s.data.arguments||[],y=s.data.id,m=new Function(u);let d,h=null;try{d=m.apply(null,l)}catch(p){h=p}h?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:y,error:h.message}},"*"):d&&typeof d.then=="function"?d.then(p=>{var w;(w=window.parent)==null||w.postMessage({type:"builder.evaluateResult",data:{id:y,result:p}},"*")}).catch(console.error):(i=window.parent)==null||i.postMessage({type:"builder.evaluateResult",data:{result:d,id:y}},"*");break}}})))},st=({model:t,trustedHosts:e,callbacks:r})=>n=>{if(!rt(e,n))return;const{data:s}=n;if(s)switch(s.type){case"builder.configureSdk":{r.configureSdk(s.data);break}case"builder.triggerAnimation":{r.animation(s.data);break}case"builder.resetState":{const o=s.data,i=o.model,u=o==null?void 0:o.state,l=o.editType;i===t&&u&&r.stateUpdate(u,l);break}case"builder.contentUpdate":{const o=s.data,i=o.key||o.alias||o.entry||o.modelName,u=o.data,l=o.editType;i===t&&r.contentUpdate(u,l);break}}},Jt=({model:t,apiKey:e,callback:r,trustedHosts:n})=>{if(!a)return f.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};nt({modelName:t,apiKey:e});const s=st({callbacks:{contentUpdate:r,animation:()=>{},configureSdk:()=>{},stateUpdate:()=>{}},model:t,trustedHosts:n});return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},zt="builder.tests",C=t=>`${zt}.${t}`,Xt=({contentId:t})=>j({name:C(t),canTrack:!0}),Ht=({contentId:t})=>v({name:C(t),canTrack:!0}),Qt=({contentId:t,value:e})=>U({name:C(t),value:e,canTrack:!0}),ot=t=>S(t.id)&&S(t.variations)&&Object.keys(t.variations).length>0,Yt=({id:t,variations:e})=>{var s;let r=0;const n=Math.random();for(const o in e){const i=(s=e[o])==null?void 0:s.testRatio;if(r+=i,n<r)return o}return t},it=t=>{const e=Yt(t);return Qt({contentId:t.id,value:e}).catch(r=>{f.error("could not store A/B test variation: ",r)}),e},at=({item:t,testGroupId:e})=>{const r=t.variations[e];return e===t.id||!r?{testVariationId:t.id,testVariationName:"Default"}:{data:r.data,testVariationId:r.id,testVariationName:r.name||(r.id===t.id?"Default":"")}},Zt=({item:t,canTrack:e})=>{if(!e)return t;if(!t)return;if(!ot(t))return t;const r=Ht({contentId:t.id})||it({variations:t.variations,id:t.id}),n=at({item:t,testGroupId:r});return{...t,...n}},qt=async({item:t,canTrack:e})=>{if(!e||!ot(t))return t;const n=await Xt({contentId:t.id})||it({variations:t.variations,id:t.id}),s=at({item:t,testGroupId:n});return{...t,...s}},ct=t=>{const e=S(t)?t:!0;return O.setCanTrack(e),e};function te(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:globalThis}function ee(){const t=te().fetch;if(typeof t=="undefined")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
1
|
+
"use strict";const b="react";function a(){return typeof window!="undefined"&&typeof document!="undefined"}const I="[Builder.io]: ",f={log:(...t)=>console.log(I,...t),error:(...t)=>console.error(I,...t),warn:(...t)=>console.warn(I,...t),debug:(...t)=>console.debug(I,...t)},S=t=>t!=null,St=t=>{if(t==="localhost"||t==="127.0.0.1")return t;const e=t.split(".");return e.length>2?e.slice(1).join("."):t},v=({name:t,canTrack:e})=>{var r;try{return e?(r=document.cookie.split("; ").find(n=>n.startsWith(`${t}=`)))==null?void 0:r.split("=")[1]:void 0}catch(n){f.warn("[COOKIE] GET error: ",(n==null?void 0:n.message)||n);return}},j=async t=>v(t),bt=t=>t.map(([e,r])=>r?`${e}=${r}`:e).filter(S).join("; "),yt=[["secure",""],["SameSite","None"]],mt=({name:t,value:e,expires:r})=>{const s=(a()?location.protocol==="https:":!0)?yt:[[]],o=r?[["expires",r.toUTCString()]]:[[]],i=[[t,e],...o,["path","/"],["domain",St(window.location.hostname)],...s];return bt(i)},U=async({name:t,value:e,expires:r,canTrack:n})=>{try{if(!n)return;const s=mt({name:t,value:e,expires:r});document.cookie=s}catch(s){f.warn("[COOKIE] SET error: ",(s==null?void 0:s.message)||s)}};const N="builder.userAttributes";function V(){let t=!0;const e=new Set;return{setUserAttributes(r){if(!a())return;const n={...this.getUserAttributes(),...r};U({name:N,value:JSON.stringify(n),canTrack:t}),e.forEach(s=>s(n))},getUserAttributes(){return a()?JSON.parse(v({name:N,canTrack:t})||"{}"):{}},subscribeOnUserAttributesChange(r,{fireImmediately:n}={}){return e.add(r),n&&r(this.getUserAttributes()),function(){e.delete(r)}},setCanTrack(r){t=r}}}let k;a()&&b==="qwik"?(window.__BUILDER_USER_ATTRIBUTES_SERVICE__||(window.__BUILDER_USER_ATTRIBUTES_SERVICE__=V()),k=window.__BUILDER_USER_ATTRIBUTES_SERVICE__):k=V();const O=k,wt=t=>{O.setUserAttributes(t)},Et=t=>{const e={};return t.forEach((r,n)=>{e[n]=r}),e},$=t=>t instanceof URLSearchParams?Et(t):t,G=t=>typeof t=="string"?t:t instanceof URLSearchParams?t.toString():new URLSearchParams(t).toString();function At(){return a()&&window.self!==window.top}function J(t){return At()&&G(t||window.location.search).indexOf("builder.frameEditing=")!==-1}function It(t){const e=t||(a()?window.location.search:void 0);return e?G(e).indexOf("builder.preview=")!==-1:!1}const vt=t=>({type:"builder.registerComponent",data:P(t)}),kt=t=>{const e=t.toString().trim(),r=/^[a-zA-Z0-9_]+\s*=>/i.test(e);return`return (${!e.startsWith("function")&&!e.startsWith("async")&&!e.startsWith("(")&&!r?"function ":""}${e}).apply(this, arguments)`};function P(t){return JSON.parse(JSON.stringify(t,(e,r)=>typeof r=="function"?kt(r):r))}const D={};function Tt(t,e){t==="plugin"&&(e=P(e));let r=D[t];if(r||(r=D[t]=[]),r.push(e),a()){const n={type:"builder.register",data:{type:t,info:e}};try{parent.postMessage(n,"*"),parent!==window&&window.postMessage(n,"*")}catch(s){console.debug("Could not postmessage",s)}}}function Ut(t){var e;if(a()){const r=JSON.parse(JSON.stringify(t));t.action&&(r.action=t.action.toString()),(e=window.parent)==null||e.postMessage({type:"builder.registerAction",data:r},"*")}}const F={};function Ot(t){if(a()){Object.assign(F,t);const e={type:"builder.settingsChange",data:F};parent.postMessage(e,"*")}}const M="builder.",Pt="options.",R=t=>{if(!t)return{};const e=$(t),r={};return Object.keys(e).forEach(n=>{if(n.startsWith(M)){const s=n.replace(M,"").replace(Pt,"");r[s]=e[n]}}),r},Rt=()=>{if(!a())return{};const t=new URLSearchParams(window.location.search);return R(t)},z="5.1.1",X=()=>({"X-Builder-SDK":b,"X-Builder-SDK-GEN":"2","X-Builder-SDK-Version":z});function Ct(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}function H(){return Ct().replace(/-/g,"")}const Q="builderSessionId",Bt=async({canTrack:t})=>{if(!t)return;const e=await j({name:Q,canTrack:t});if(S(e))return e;{const r=xt();return _t({id:r,canTrack:t}),r}},xt=()=>H(),_t=({id:t,canTrack:e})=>U({name:Q,value:t,canTrack:e}),Y=()=>a()&&typeof localStorage!="undefined"?localStorage:void 0,Lt=({key:t,canTrack:e})=>{var r;try{return e?(r=Y())==null?void 0:r.getItem(t):void 0}catch(n){console.debug("[LocalStorage] GET error: ",n);return}},Nt=({key:t,canTrack:e,value:r})=>{var n;try{e&&((n=Y())==null||n.setItem(t,r))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},Z="builderVisitorId",Vt=({canTrack:t})=>{if(!t)return;const e=Lt({key:Z,canTrack:t});if(S(e))return e;{const r=Dt();return Ft({id:r,canTrack:t}),r}},Dt=()=>H(),Ft=({id:t,canTrack:e})=>Nt({key:Z,value:t,canTrack:e});function q(t){var e;typeof process!="undefined"&&((e=process.env)!=null&&e.DEBUG)&&String(process.env.DEBUG)=="true"&&f.log(t)}const Mt=()=>{if(a()){const t=new URL(location.href);return t.pathname===""&&(t.pathname="/"),t}else return console.warn("Cannot get location for tracking in non-browser environment"),null},Kt=()=>typeof navigator=="object"&&navigator.userAgent||"",tt=()=>{const t=Kt(),e={Android(){return t.match(/Android/i)},BlackBerry(){return t.match(/BlackBerry/i)},iOS(){return t.match(/iPhone|iPod/i)},Opera(){return t.match(/Opera Mini/i)},Windows(){return t.match(/IEMobile/i)||t.match(/WPDesktop/i)},any(){return e.Android()||e.BlackBerry()||e.iOS()||e.Opera()||e.Windows()||b==="reactNative"}},r=t.match(/Tablet|iPad/i),n=Mt();return{urlPath:n==null?void 0:n.pathname,host:(n==null?void 0:n.host)||(n==null?void 0:n.hostname),device:r?"tablet":e.any()?"mobile":"desktop"}},Wt=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await Bt({canTrack:t}),r=Vt({canTrack:t});return{sessionId:e,visitorId:r}},jt=async({type:t,canTrack:e,apiKey:r,metadata:n,...s})=>({type:t,data:{...s,metadata:{url:location.href,...n},...await Wt({canTrack:e}),userAttributes:tt(),ownerId:r}});async function et({apiHost:t,...e}){if(!e.apiKey){f.error("Missing API key for track call. Please provide your API key.");return}if(!e.canTrack||J()||!(a()||b==="reactNative"))return;const n=`${t||"https://cdn.builder.io"}/api/v1/track`;return q(n),fetch(n,{method:"POST",body:JSON.stringify({events:[await jt(e)]}),headers:{"content-type":"application/json",...X()},mode:"cors"}).catch(s=>{console.error("Failed to track: ",s)})}const $t=t=>et({...t,canTrack:!0}),Gt=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function rt(t,e){if(!e.origin.startsWith("http")&&!e.origin.startsWith("https"))return!1;const r=new URL(e.origin),n=r.hostname;return(t||Gt).findIndex(s=>s.startsWith("*.")?n.endsWith(s.slice(1)):s===n)>-1}let K=!1;const nt=t=>{var e,r;K||(K=!0,a()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:b,version:z,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0,modelName:t.modelName,apiKey:t.apiKey,supportsXSmallBreakpoint:!0,blockLevelPersonalization:!0}},"*"),(r=window.parent)==null||r.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",n=>{var o,i;if(!rt(t.trustedHosts,n))return;const{data:s}=n;if(s!=null&&s.type)switch(s.type){case"builder.evaluate":{const u=s.data.text,l=s.data.arguments||[],y=s.data.id,m=new Function(u);let d,h=null;try{d=m.apply(null,l)}catch(p){h=p}h?(o=window.parent)==null||o.postMessage({type:"builder.evaluateError",data:{id:y,error:h.message}},"*"):d&&typeof d.then=="function"?d.then(p=>{var w;(w=window.parent)==null||w.postMessage({type:"builder.evaluateResult",data:{id:y,result:p}},"*")}).catch(console.error):(i=window.parent)==null||i.postMessage({type:"builder.evaluateResult",data:{result:d,id:y}},"*");break}}})))},st=({model:t,trustedHosts:e,callbacks:r})=>n=>{if(!rt(e,n))return;const{data:s}=n;if(s)switch(s.type){case"builder.configureSdk":{r.configureSdk(s.data);break}case"builder.triggerAnimation":{r.animation(s.data);break}case"builder.resetState":{const o=s.data,i=o.model,u=o==null?void 0:o.state,l=o.editType;i===t&&u&&r.stateUpdate(u,l);break}case"builder.contentUpdate":{const o=s.data,i=o.key||o.alias||o.entry||o.modelName,u=o.data,l=o.editType;i===t&&r.contentUpdate(u,l);break}}},Jt=({model:t,apiKey:e,callback:r,trustedHosts:n})=>{if(!a)return f.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};nt({modelName:t,apiKey:e});const s=st({callbacks:{contentUpdate:r,animation:()=>{},configureSdk:()=>{},stateUpdate:()=>{}},model:t,trustedHosts:n});return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},zt="builder.tests",C=t=>`${zt}.${t}`,Xt=({contentId:t})=>j({name:C(t),canTrack:!0}),Ht=({contentId:t})=>v({name:C(t),canTrack:!0}),Qt=({contentId:t,value:e})=>U({name:C(t),value:e,canTrack:!0}),ot=t=>S(t.id)&&S(t.variations)&&Object.keys(t.variations).length>0,Yt=({id:t,variations:e})=>{var s;let r=0;const n=Math.random();for(const o in e){const i=(s=e[o])==null?void 0:s.testRatio;if(r+=i,n<r)return o}return t},it=t=>{const e=Yt(t);return Qt({contentId:t.id,value:e}).catch(r=>{f.error("could not store A/B test variation: ",r)}),e},at=({item:t,testGroupId:e})=>{const r=t.variations[e];return e===t.id||!r?{testVariationId:t.id,testVariationName:"Default"}:{data:r.data,testVariationId:r.id,testVariationName:r.name||(r.id===t.id?"Default":"")}},Zt=({item:t,canTrack:e})=>{if(!e)return t;if(!t)return;if(!ot(t))return t;const r=Ht({contentId:t.id})||it({variations:t.variations,id:t.id}),n=at({item:t,testGroupId:r});return{...t,...n}},qt=async({item:t,canTrack:e})=>{if(!e||!ot(t))return t;const n=await Xt({contentId:t.id})||it({variations:t.variations,id:t.id}),s=at({item:t,testGroupId:n});return{...t,...s}},ct=t=>{const e=S(t)?t:!0;return O.setCanTrack(e),e};function te(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:globalThis}function ee(){const t=te().fetch;if(typeof t=="undefined")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
2
2
|
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return t}const re=ee();function T(t,e=null,r="."){return Object.keys(t).reduce((n,s)=>{const o=t[s],i=[e,s].filter(Boolean).join(r);return[typeof o=="object",o!==null,!(Array.isArray(o)&&o.length===0)].every(Boolean)?{...n,...T(o,i,r)}:{...n,[i]:o}},{})}function ut(t,e,r={}){for(const n in t){const s=t[n],o=e?e+"."+n:n;s&&typeof s=="object"&&!Array.isArray(s)&&!Object.keys(s).find(i=>i.startsWith("$"))?ut(s,o,r):r[o]=s}return r}function ne(t){const e={};for(const r in t){const n=r.split(".");let s=e;for(let o=0;o<n.length;o++){const i=n[o];o===n.length-1?s[i]=t[r]:(s[i]=s[i]||{},s=s[i])}}return e}const se="v3",W=t=>typeof t=="number"&&!isNaN(t)&&t>=0,B=t=>{const{limit:e=30,userAttributes:r,query:n,model:s,apiKey:o,enrich:i,locale:u,apiVersion:l=se,fields:y,omit:m,offset:d,cacheSeconds:h,staleCacheSeconds:p,sort:w,includeUnpublished:x,apiHost:gt}=t;if(!o)throw new Error("Missing API key");if(!["v3"].includes(l))throw new Error(`Invalid apiVersion: expected 'v3', received '${l}'`);const ht=e!==1,pt=gt||"https://cdn.builder.io",c=new URL(`${pt}/api/${l}/content/${s}`);c.searchParams.set("apiKey",o),c.searchParams.set("limit",String(e)),c.searchParams.set("noTraverse",String(ht)),c.searchParams.set("includeRefs",String(!0)),u&&c.searchParams.set("locale",u);let A=r||{};if(i&&c.searchParams.set("enrich",String(i)),c.searchParams.set("omit",m!=null?m:"meta.componentsUsed"),y&&c.searchParams.set("fields",y),Number.isFinite(d)&&d>-1&&c.searchParams.set("offset",String(Math.floor(d))),typeof x=="boolean"&&c.searchParams.set("includeUnpublished",String(x)),h&&W(h)&&c.searchParams.set("cacheSeconds",String(h)),p&&W(p)&&c.searchParams.set("staleCacheSeconds",String(p)),w){const g=T({sort:w});for(const E in g)c.searchParams.set(E,JSON.stringify(g[E]))}const _={...Rt(),...$(t.options||{})};A={...A,...ie(_)};const L=T(_);for(const g in L)c.searchParams.set(g,String(L[g]));if(Object.keys(A).length>0&&c.searchParams.set("userAttributes",JSON.stringify(A)),n){const g=ut({query:n});for(const E in g)c.searchParams.set(E,JSON.stringify(g[E]))}return c},oe=t=>{const e={};for(const r in t)r.startsWith("userAttributes.")&&(e[r]=t[r],delete t[r]);return e},ie=t=>{if(a()&&t.preview==="BUILDER_STUDIO"){t["userAttributes.urlPath"]=window.location.pathname,t["userAttributes.host"]=window.location.host;const e=oe(t),{userAttributes:r}=ne(e);return r}return{}},ae=t=>"results"in t;async function lt(t){var n;const e=t.locale||((n=t.userAttributes)==null?void 0:n.locale);e&&(t.locale=e,t.userAttributes={locale:e,...t.userAttributes});const r=await ft({...t,limit:1});return r&&r[0]||null}const ce=async t=>{var i,u;const e=B(t),r=(i=t.fetch)!=null?i:re,n={...t.fetchOptions,headers:{...(u=t.fetchOptions)==null?void 0:u.headers,...X()}};return await(await r(e.href,n)).json()},dt=async(t,e,r=B(t))=>{const n=ct(t.canTrack);if(r.search.includes("preview="),!n||!(a()||b==="reactNative"))return e.results;try{const s=[];for(const o of e.results)s.push(await qt({item:o,canTrack:n}));e.results=s}catch(s){f.error("Could not process A/B tests. ",s)}return e.results};async function ft(t){const e=B(t),r=await ce(t);if(!ae(r))throw f.error("Error fetching data. ",{url:e,content:r,options:t}),r;return dt(t,r)}const ue=async t=>{var n,s,o;const e=t.path||((n=t.url)==null?void 0:n.pathname)||((s=t.userAttributes)==null?void 0:s.urlPath),r={...t,apiKey:t.apiKey,model:t.model||"page",userAttributes:{...t.userAttributes,...e?{urlPath:e}:{}},options:R(t.searchParams||((o=t.url)==null?void 0:o.searchParams)||t.options)};return{apiKey:r.apiKey,model:r.model,content:await lt(r)}};exports.TARGET=b;exports._processContentResult=dt;exports._track=et;exports.checkIsDefined=S;exports.createEditorListener=st;exports.createRegisterComponentMessage=vt;exports.fetchBuilderProps=ue;exports.fetchEntries=ft;exports.fetchOneEntry=lt;exports.getBuilderSearchParams=R;exports.getCookieSync=v;exports.getDefaultCanTrack=ct;exports.getUserAttributes=tt;exports.handleABTestingSync=Zt;exports.isBrowser=a;exports.isEditing=J;exports.isPreviewing=It;exports.logFetch=q;exports.logger=f;exports.register=Tt;exports.registerAction=Ut;exports.serializeIncludingFunctions=P;exports.setClientUserAttributes=wt;exports.setEditorSettings=Ot;exports.setupBrowserForEditing=nt;exports.subscribeToEditor=Jt;exports.track=$t;exports.userAttributesService=O;
|
|
@@ -171,7 +171,7 @@ const V = "builder.", gt = "options.", G = (t) => {
|
|
|
171
171
|
return {};
|
|
172
172
|
const t = new URLSearchParams(window.location.search);
|
|
173
173
|
return G(t);
|
|
174
|
-
}, J = "5.1.
|
|
174
|
+
}, J = "5.1.1", z = () => ({
|
|
175
175
|
"X-Builder-SDK": b,
|
|
176
176
|
"X-Builder-SDK-GEN": "2",
|
|
177
177
|
"X-Builder-SDK-Version": J
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./server-entry-560732da.cjs");exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.registerAction=e.registerAction;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _processContentResult as r, createRegisterComponentMessage as i, fetchBuilderProps as s, fetchEntries as n, fetchOneEntry as o, getBuilderSearchParams as c, isEditing as g, isPreviewing as a, register as d, registerAction as E, setEditorSettings as f, subscribeToEditor as h, track as p } from "./server-entry-
|
|
1
|
+
import { _processContentResult as r, createRegisterComponentMessage as i, fetchBuilderProps as s, fetchEntries as n, fetchOneEntry as o, getBuilderSearchParams as c, isEditing as g, isPreviewing as a, register as d, registerAction as E, setEditorSettings as f, subscribeToEditor as h, track as p } from "./server-entry-68d59577.js";
|
|
2
2
|
export {
|
|
3
3
|
r as _processContentResult,
|
|
4
4
|
i as createRegisterComponentMessage,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Blocks as m } from "./blocks-
|
|
2
|
+
import { Blocks as m } from "./blocks-6b821501.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./blocks-exports.mjs";
|
|
5
|
-
import "./server-entry-
|
|
6
|
-
import "./get-class-prop-name-
|
|
5
|
+
import "./server-entry-68d59577.js";
|
|
6
|
+
import "./get-class-prop-name-e6f7321f.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
8
|
function c(t) {
|
|
9
9
|
var e, o, n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("./blocks-4d57d38f.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-560732da.cjs");require("./get-class-prop-name-2c2513e9.cjs");require("./dynamic-renderer-b29b45ca.cjs");function u(e){var t,n,r;return o.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:o.jsx(i.Blocks,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(r=e.builderContext.rootState)==null?void 0:r[e.name]})})}exports.default=u;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { useState as b, useEffect as f } from "react";
|
|
3
3
|
import { Content as K } from "./blocks-exports.mjs";
|
|
4
|
-
import { getClassPropName as S } from "./get-class-prop-name-
|
|
5
|
-
import { fetchOneEntry as E, logger as N } from "./server-entry-
|
|
4
|
+
import { getClassPropName as S } from "./get-class-prop-name-e6f7321f.js";
|
|
5
|
+
import { fetchOneEntry as E, logger as N } from "./server-entry-68d59577.js";
|
|
6
6
|
const W = async ({
|
|
7
7
|
builderContextValue: t,
|
|
8
8
|
symbol: n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),r=require("react"),E=require("./blocks-exports.cjs"),g=require("./get-class-prop-name-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),r=require("react"),E=require("./blocks-exports.cjs"),g=require("./get-class-prop-name-2c2513e9.cjs"),b=require("./server-entry-560732da.cjs"),h=async({builderContextValue:e,symbol:n})=>{if(n!=null&&n.model&&(e!=null&&e.apiKey))return b.fetchOneEntry({model:n.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(n==null?void 0:n.entry)&&{query:{id:n.entry}}}).catch(c=>{b.logger.error("Could not fetch symbol content: ",c)})};function j(e){var a,l,u,d,s;function n(){return"div"}function c(){return"div"}function f(){return Object.values(e.builderComponents)}function C(){var t,o;return[e.attributes[g.getClassPropName()],"builder-symbol",(t=e.symbol)!=null&&t.inline?"builder-inline-symbol":void 0,(o=e.symbol)!=null&&o.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[i,v]=r.useState(()=>{var t;return(t=e.symbol)==null?void 0:t.content}),[k,x]=r.useState(()=>{var t;return(t=e.symbol)==null?void 0:t.entry});function S(){var t;i&&k===((t=e.symbol)==null?void 0:t.entry)||h({symbol:e.symbol,builderContextValue:e.builderContext}).then(o=>{var m;o&&(v(o),x((m=e.symbol)==null?void 0:m.entry))})}return r.useEffect(()=>{},[]),r.useEffect(()=>{S()},[e.symbol]),y.jsx("div",{...e.attributes,className:C(),children:y.jsx(E.Content,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(a=e.builderBlock)==null?void 0:a.id},customComponents:f(),data:{...(l=e.symbol)==null?void 0:l.data,...e.builderContext.localState,...(u=i==null?void 0:i.data)==null?void 0:u.state},canTrack:e.builderContext.canTrack,model:(s=(d=e.symbol)==null?void 0:d.model)!=null?s:"",content:i,linkComponent:e.builderLinkComponent,blocksWrapper:n(),contentWrapper:c()})})}exports.default=j;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as d, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m } from "react";
|
|
3
|
-
import { Blocks as c } from "./blocks-
|
|
3
|
+
import { Blocks as c } from "./blocks-6b821501.js";
|
|
4
4
|
import "./blocks-exports.mjs";
|
|
5
|
-
import "./server-entry-
|
|
6
|
-
import "./get-class-prop-name-
|
|
5
|
+
import "./server-entry-68d59577.js";
|
|
6
|
+
import "./get-class-prop-name-e6f7321f.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
8
|
function x(t) {
|
|
9
9
|
var b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),s=require("react"),r=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),s=require("react"),r=require("./blocks-4d57d38f.cjs");require("./blocks-exports.cjs");require("./server-entry-560732da.cjs");require("./get-class-prop-name-2c2513e9.cjs");require("./dynamic-renderer-b29b45ca.cjs");function d(e){var o;const[n,a]=s.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function c(t){return e.tabs&&e.tabs[t].content}function u(t){return t===n?e.activeTabStyle:{}}function b(t){t===n&&e.collapsible?a(-1):a(t)}return l.jsxs("div",{children:[l.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(o=e.tabs)==null?void 0:o.map((t,i)=>l.jsx("span",{className:`builder-tab-wrap ${n===i?"builder-tab-active":""}`,style:u(i),onClick:f=>b(i),children:l.jsx(r.Blocks,{parent:e.builderBlock.id,path:`tabs.${i}.label`,blocks:t.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},i))}),c(n)?l.jsx("div",{children:l.jsx(r.Blocks,{parent:e.builderBlock.id,path:`tabs.${n}.content`,blocks:c(n),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}exports.default=d;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./server-entry-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./server-entry-2529c06e.cjs"),r=require("react/jsx-runtime"),d=require("react"),U=require("./setIvm-b97cfb8b.cjs"),Xe=require("./should-force-browser-runtime-in-node-1d85a066.cjs");function Ze(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const et=Ze(d),tt=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),nt=e=>typeof e=="string"&&tt.has(e.toLowerCase());function ce(e){return r.jsx(r.Fragment,{children:nt(e.TagName)?r.jsx(r.Fragment,{children:r.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):r.jsx(r.Fragment,{children:typeof e.TagName=="string"?r.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):r.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const H=()=>{switch(h.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Te(e){function t(){return{...e.attributes,[H()]:`${e.link?"":"builder-button"} ${e.attributes[H()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return r.jsx(ce,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const G=d.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),Ie=d.createContext({registeredComponents:{}}),we=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,o)=>a!=null?a[o]:a,e);return i===void 0||i===e?n:i},it=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:o,rootState:l})=>{const s=U.getFunctionArguments({builder:t,context:n,event:i,state:U.flattenState({rootState:l,localState:a,rootSetState:o})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))},at=e=>h.isBrowser()||Xe.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0})?it(e):U.runInNode(e),rt=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,ot=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,lt=e=>{var t,n,i,a,o,l;return((i=(n=(t=rt.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((l=(o=(a=ot.exec(e.trim()))==null?void 0:a.groups)==null?void 0:o.getPath)==null?void 0:l.slice(1))};function M({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:o,isExpression:l=!0,trackingContext:s}){if(e.trim()==="")return;const c=lt(e.trim());if(c)return we({...i,...n},c);const m={code:U.parseCode(e,{isExpression:l}),builder:U.getBuilderGlobals(s),context:t,event:o,rootSetState:a,rootState:i,localState:n};try{return at(m)}catch(b){h.logger.error("Failed code evaluation: "+b.message,{code:e});return}}function st(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...ct(e,t)}}const ct=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(a,o)=>M({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function ut(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function Z(e,t,n=null,i=null,a=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}a.has(e)||(a.add(e),Array.isArray(e)?e.forEach((o,l)=>{t(o,c=>{e[l]=c}),Z(o,t,e,l,a)}):Object.entries(e).forEach(([o,l])=>{t(l,c=>{e[o]=c}),Z(l,t,e,o,a)}))}function Ee(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function dt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return Z(e,n=>{if(Ee(n)){t=!0;return}}),t}function mt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(Z(e,(n,i)=>{var a;Ee(n)&&i((a=n[t])!=null?a:void 0)}),e)}function ft(e,t){var n,i;return(n=e.component)!=null&&n.options&&dt((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=mt(e.component.options,t!=null?t:"Default")),e}function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const gt=["svelte","vue","angular","qwik","solid"].includes(h.TARGET),ht=e=>{if(gt){const t=U.fastClone(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(ut(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},bt=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const o=ht(e);for(const l in e.bindings){const s=e.bindings[l],c=M({code:s,localState:n,rootState:i,rootSetState:a,context:t});U.set(o,l,c)}return o};function yt({block:e,context:t,localState:n,rootState:i,rootSetState:a}){let o=e;return o=bt({block:o,localState:n,rootState:i,rootSetState:a,context:t}),o=ft(o,i.locale),o}const ee=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function xt(e,t,n={}){let i,a,o,l=null,s=0;const c=function(){s=n.leading===!1?0:Date.now(),l=null,o=e.apply(i,a),l||(i=a=null)};return function(){const m=Date.now();!s&&n.leading===!1&&(s=m);const b=t-(m-s);return i=this,a=arguments,b<=0||b>t?(l&&(clearTimeout(l),l=null),s=m,o=e.apply(i,a),l||(i=a=null)):!l&&n.trailing!==!1&&(l=setTimeout(c,b)),o}}function K(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n}function pt(e){for(const t of e)switch(t.trigger){case"pageLoad":Ve(t);break;case"scrollInView":St(t);break}}function Re(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Pe(e,t){const n=vt(e),i=getComputedStyle(t),a=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,l=[a,o];for(const s of l)for(const c of n)c in s||(s[c]=i[c])}function vt(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 Ve(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Re(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Pe(e,n),n.style.transition="none",n.style.transitionDelay="0",K(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),K(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function St(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Re(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Pe(e,n);let i=!1,a=!1;function o(){!i&&s(n)?(i=!0,a=!0,setTimeout(()=>{K(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",l),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!s(n)&&(i=!1,K(n.style,e.steps[0].styles))}const l=xt(o,200,{leading:!1});function s(b){const x=b.getBoundingClientRect(),u=window.innerHeight,g=(e.thresholdPercent||0)/100*u;return x.bottom>g&&x.top<u-g}const c=e.steps[0].styles;function m(){K(n.style,c)}m(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",l,{capture:!0,passive:!0}),o()})}const je=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${ee(n)}: ${i};`}).filter(h.checkIsDefined),kt=e=>je(e).join(`
|
|
2
2
|
`),z=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${kt(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
|
-
}`:i};function Ct({style:e}){return e}const Tt=({block:e,context:t})=>Ae(Ct({style:e.style||{},context:t,block:e}));function Ae(e){switch(h.TARGET){case"svelte":case"vue":case"solid":case"angular":return
|
|
6
|
+
}`:i};function Ct({style:e}){return e}const Tt=({block:e,context:t})=>Ae(Ct({style:e.style||{},context:t,block:e}));function Ae(e){switch(h.TARGET){case"svelte":case"vue":case"solid":case"angular":return je(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Be=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,It=({block:e,registeredComponents:t,model:n})=>{var o;const i=(o=e.component)==null?void 0:o.name;if(!i)return null;const a=t[i];if(!a||Be(a,n)){console.warn(`
|
|
7
7
|
Could not find a registered component named "${i}".
|
|
8
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},wt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const o=n.collection.split(".").pop(),l=n.itemName||(o?o+"Item":"item");return a.map((c,m)=>({context:{...t,localState:{...t.localState,$index:m,$item:c,[l]:c,[`$${l}Index`]:m}},block:i}))},Et=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},Rt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,l])=>!Be(l,n)))}:{}},Pt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},jt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},fe=e=>e.toString();function Vt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const At=e=>`on${Vt(e)}`,Bt=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Ne(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const o=n[a];let l=At(a);if(e.stripPrefix)switch(h.TARGET){case"vue":l=l.replace("v-on:","");break;case"svelte":l=l.replace("on:","");break}t[l]=Bt(o,e)}return t}function Nt({properties:e}){return e}const Ft=e=>({href:e.href});function ue({block:e,context:t}){var i;const n={...Ft(e),...e.properties,"builder-id":e.id,style:Tt({block:e,context:t}),[H()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Nt({properties:n,context:t,block:e})}function $t(e){return r.jsx(ce,{TagName:e.Wrapper,attributes:ue({block:e.block,context:e.context}),actionAttributes:Ne({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 Wt(e){return d.useEffect(()=>{},[]),r.jsx(r.Fragment,{children:e.children})}function Dt(e){var i,a;d.useState(()=>0);function t(){return e.includeBlockProps?{...ue({block:e.block,context:e.context}),...Ne({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}function n(){return e.wrapperProps}return d.useEffect(()=>{},[e.wrapperProps,(a=(i=e.block)==null?void 0:i.component)==null?void 0:a.options]),r.jsx(r.Fragment,{children:e.Wrapper.load?r.jsx(r.Fragment,{children:r.jsx(Wt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):r.jsx(e.Wrapper,{...n(),attributes:t(),children:e.children})})}const Ot=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:o,contextValue:l})=>{const s={...e,...a?{attributes:ue({block:t,context:l})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:s};function ge(e){var i;d.useState(()=>!1);const[t,n]=d.useState(()=>e.isInteractive?Dt:e.componentRef);return r.jsx(r.Fragment,{children:e.componentRef?r.jsx(r.Fragment,{children:r.jsx(t,{...Ot({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:e.componentRef?r.jsx(r.Fragment,{children:(i=e.blockChildren)==null?void 0:i.map(a=>r.jsx(te,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))}):null})}):null})}function he(e){const[t,n]=d.useState(()=>e.repeatContext);return d.useEffect(()=>{n(e.repeatContext)},[e.repeatContext]),r.jsx(G.Provider,{value:t,children:r.jsx(te,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}const Fe={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=Fe)=>`@media (max-width: ${t[e].max}px)`,$e=e=>{const t=U.fastClone(Fe);if(!e)return t;const{xsmall:n,small:i,medium:a}=e;if(n){const c=Math.floor(n/2);t.xsmall={max:n,min:c,default:c+1}}if(!i||!a)return t;const o=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:o,default:o+1};const l=t.small.max+1;t.medium={max:a,min:l,default:l+1};const s=t.medium.max+1;return t.large={max:2e3,min:s,default:s+1},t};function J(e){return r.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function be(e){function t(){const i=e.block;return h.checkIsDefined(i.hide)?!i.hide:h.checkIsDefined(i.show)?i.show:!0}function n(){var I,E,W,O,L;const i=e.block,a=i.responsiveStyles,o=e.context.content,l=$e(((I=o==null?void 0:o.meta)==null?void 0:I.breakpoints)||{}),s=!!((W=(E=o==null?void 0:o.meta)==null?void 0:E.breakpoints)!=null&&W.xsmall),c=a==null?void 0:a.large,m=a==null?void 0:a.medium,b=a==null?void 0:a.small,x=a==null?void 0:a.xsmall,u=i.id;if(!u)return"";const k=c?z({className:u,styles:c}):"",g=m?z({className:u,styles:m,mediaQuery:ne("medium",l)}):"",f=b?z({className:u,styles:b,mediaQuery:ne("small",l)}):"",p=x&&s?z({className:u,styles:x,mediaQuery:ne("xsmall",l)}):"",y=i.animations&&i.animations.find(v=>v.trigger==="hover");let C="";if(y){const v=((L=(O=y.steps)==null?void 0:O[1])==null?void 0:L.styles)||{};C=z({className:`${u}:hover`,styles:{...v,transition:`all ${y.duration}s ${ee(y.easing)}`,transitionDelay:y.delay?`${y.delay}s`:"0s"}})||""}return[k,g,f,p,C].join(" ")}return r.jsx(r.Fragment,{children:n()&&t()?r.jsx(r.Fragment,{children:r.jsx(J,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function Lt(e){d.useState(()=>!1);const[t,n]=d.useState(()=>!1);return d.useContext(G),d.useEffect(()=>{},[]),r.jsx(r.Fragment,{children:t?r.jsx(r.Fragment,{children:r.jsx(r.Fragment,{children:r.jsx(be,{block:e.block,context:e.context})})}):r.jsx(r.Fragment,{children:r.jsx(be,{block:e.block,context:e.context})})})}function te(e){var b,x,u,k;function t(){return wt({block:e.block,context:e.context})}const[n,i]=d.useState(()=>({value:null,update:!1}));function a(){var f;if(n.value&&!n.update&&!h.isPreviewing())return n.value;const g=(f=e.block.repeat)!=null&&f.collection?e.block:yt({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=g,n.update=!1,g}function o(){return It({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function l(){var f;return e.block.tagName==="a"||((f=a().properties)==null?void 0:f.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var p,y;if((p=e.block.repeat)!=null&&p.collection)return!!((y=t==null?void 0:t())!=null&&y.length);const g="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!g}function c(){var f,p;return!((f=o==null?void 0:o())!=null&&f.component)&&!t()?(p=a().children)!=null?p:[]:[]}function m(){var g,f,p,y;return{blockChildren:(g=a().children)!=null?g:[],componentRef:(f=o==null?void 0:o())==null?void 0:f.component,componentOptions:{...st(a(),e.context),...Pt(o(),a()),...jt(o(),e.context),...Et(o(),e.linkComponent),...Rt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((p=o==null?void 0:o())==null?void 0:p.noWrap)===!0,isInteractive:!((y=o==null?void 0:o())!=null&&y.isRSC&&h.TARGET==="rsc")}}return d.useEffect(()=>{const g=a().id,f=a().animations;f&&g&&pt(f.map(p=>({...p,elementId:g})))},[]),d.useEffect(()=>{n.update=!0}),r.jsx(r.Fragment,{children:s()?r.jsxs(r.Fragment,{children:[r.jsx(Lt,{block:a(),context:e.context,id:e.block.id}),(b=o==null?void 0:o())!=null&&b.noWrap?t()?r.jsx(r.Fragment,{children:(k=t())==null?void 0:k.map((g,f)=>r.jsx(he,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},fe(f)))}):r.jsx(ge,{componentRef:m().componentRef,componentOptions:m().componentOptions,blockChildren:m().blockChildren,context:m().context,registeredComponents:m().registeredComponents,linkComponent:m().linkComponent,builderBlock:m().builderBlock,includeBlockProps:m().includeBlockProps,isInteractive:m().isInteractive}):r.jsx(r.Fragment,{children:t()?r.jsx(r.Fragment,{children:(u=t())==null?void 0:u.map((g,f)=>r.jsx(he,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},fe(f)))}):r.jsxs($t,{Wrapper:l(),block:a(),context:e.context,children:[r.jsx(ge,{componentRef:m().componentRef,componentOptions:m().componentOptions,blockChildren:m().blockChildren,context:m().context,registeredComponents:m().registeredComponents,linkComponent:m().linkComponent,builderBlock:m().builderBlock,includeBlockProps:m().includeBlockProps,isInteractive:m().isInteractive}),(x=c())==null?void 0:x.map(g=>r.jsx(te,{block:g,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},g.id))]})})]}):null})}function _t(e){const t=d.useRef(null);d.useState(()=>!1);function n(){var l;return["builder-blocks",(l=e.blocks)!=null&&l.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const l="this.",s="component.options.";return e.path.startsWith(l)?e.path.replace(l,""):e.path.startsWith(s)?e.path:`${s}${e.path||""}`}function a(){var l,s;h.isEditing()&&!((l=e.blocks)!=null&&l.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var l,s;h.isEditing()&&!((l=e.blocks)!=null&&l.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return d.useEffect(()=>{},[]),d.useEffect(()=>{},[e.blocks]),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`.props-blocks-wrapper-b46bf284 {
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},wt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=M({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const o=n.collection.split(".").pop(),l=n.itemName||(o?o+"Item":"item");return a.map((c,m)=>({context:{...t,localState:{...t.localState,$index:m,$item:c,[l]:c,[`$${l}Index`]:m}},block:i}))},Et=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},Rt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,l])=>!Be(l,n)))}:{}},Pt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},Vt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},fe=e=>e.toString();function jt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const At=e=>`on${jt(e)}`,Bt=(e,t)=>n=>M({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,trackingContext:t.trackingContext});function Ne(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const o=n[a];let l=At(a);if(e.stripPrefix)switch(h.TARGET){case"vue":l=l.replace("v-on:","");break;case"svelte":l=l.replace("on:","");break}t[l]=Bt(o,e)}return t}function Nt({properties:e}){return e}const Ft=e=>({href:e.href});function ue({block:e,context:t}){var i;const n={...Ft(e),...e.properties,"builder-id":e.id,style:Tt({block:e,context:t}),[H()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return Nt({properties:n,context:t,block:e})}function $t(e){var t,n,i;return r.jsx(ce,{TagName:e.Wrapper,attributes:ue({block:e.block,context:e.context}),actionAttributes:Ne({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0,trackingContext:{apiKey:e.context.apiKey,canTrack:(t=e.context.canTrack)!=null?t:!0,contentId:(n=e.context.content)==null?void 0:n.id,variationId:(i=e.context.content)==null?void 0:i.testVariationId}}),children:e.children})}function Wt(e){return d.useEffect(()=>{},[]),r.jsx(r.Fragment,{children:e.children})}function Dt(e){var i,a;d.useState(()=>0);function t(){var o,l,s;return e.includeBlockProps?{...ue({block:e.block,context:e.context}),...Ne({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,trackingContext:{apiKey:e.context.apiKey,canTrack:(o=e.context.canTrack)!=null?o:!0,contentId:(l=e.context.content)==null?void 0:l.id,variationId:(s=e.context.content)==null?void 0:s.testVariationId}})}:{}}function n(){return e.wrapperProps}return d.useEffect(()=>{},[e.wrapperProps,(a=(i=e.block)==null?void 0:i.component)==null?void 0:a.options]),r.jsx(r.Fragment,{children:e.Wrapper.load?r.jsx(r.Fragment,{children:r.jsx(Wt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):r.jsx(e.Wrapper,{...n(),attributes:t(),children:e.children})})}const Ot=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:o,contextValue:l})=>{const s={...e,...a?{attributes:ue({block:t,context:l})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:s};function ge(e){var i;d.useState(()=>!1);const[t,n]=d.useState(()=>e.isInteractive?Dt:e.componentRef);return r.jsx(r.Fragment,{children:e.componentRef?r.jsx(r.Fragment,{children:r.jsx(t,{...Ot({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:e.componentRef?r.jsx(r.Fragment,{children:(i=e.blockChildren)==null?void 0:i.map(a=>r.jsx(te,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))}):null})}):null})}function he(e){const[t,n]=d.useState(()=>e.repeatContext);return d.useEffect(()=>{n(e.repeatContext)},[e.repeatContext]),r.jsx(G.Provider,{value:t,children:r.jsx(te,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}const Fe={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=Fe)=>`@media (max-width: ${t[e].max}px)`,$e=e=>{const t=U.fastClone(Fe);if(!e)return t;const{xsmall:n,small:i,medium:a}=e;if(n){const c=Math.floor(n/2);t.xsmall={max:n,min:c,default:c+1}}if(!i||!a)return t;const o=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:o,default:o+1};const l=t.small.max+1;t.medium={max:a,min:l,default:l+1};const s=t.medium.max+1;return t.large={max:2e3,min:s,default:s+1},t};function J(e){return r.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function be(e){function t(){const i=e.block;return h.checkIsDefined(i.hide)?!i.hide:h.checkIsDefined(i.show)?i.show:!0}function n(){var I,E,W,O,L;const i=e.block,a=i.responsiveStyles,o=e.context.content,l=$e(((I=o==null?void 0:o.meta)==null?void 0:I.breakpoints)||{}),s=!!((W=(E=o==null?void 0:o.meta)==null?void 0:E.breakpoints)!=null&&W.xsmall),c=a==null?void 0:a.large,m=a==null?void 0:a.medium,b=a==null?void 0:a.small,x=a==null?void 0:a.xsmall,u=i.id;if(!u)return"";const k=c?z({className:u,styles:c}):"",g=m?z({className:u,styles:m,mediaQuery:ne("medium",l)}):"",f=b?z({className:u,styles:b,mediaQuery:ne("small",l)}):"",p=x&&s?z({className:u,styles:x,mediaQuery:ne("xsmall",l)}):"",y=i.animations&&i.animations.find(v=>v.trigger==="hover");let C="";if(y){const v=((L=(O=y.steps)==null?void 0:O[1])==null?void 0:L.styles)||{};C=z({className:`${u}:hover`,styles:{...v,transition:`all ${y.duration}s ${ee(y.easing)}`,transitionDelay:y.delay?`${y.delay}s`:"0s"}})||""}return[k,g,f,p,C].join(" ")}return r.jsx(r.Fragment,{children:n()&&t()?r.jsx(r.Fragment,{children:r.jsx(J,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function Lt(e){d.useState(()=>!1);const[t,n]=d.useState(()=>!1);return d.useContext(G),d.useEffect(()=>{},[]),r.jsx(r.Fragment,{children:t?r.jsx(r.Fragment,{children:r.jsx(r.Fragment,{children:r.jsx(be,{block:e.block,context:e.context})})}):r.jsx(r.Fragment,{children:r.jsx(be,{block:e.block,context:e.context})})})}function te(e){var b,x,u,k;function t(){return wt({block:e.block,context:e.context})}const[n,i]=d.useState(()=>({value:null,update:!1}));function a(){var f;if(n.value&&!n.update&&!h.isPreviewing())return n.value;const g=(f=e.block.repeat)!=null&&f.collection?e.block:yt({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=g,n.update=!1,g}function o(){return It({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function l(){var f;return e.block.tagName==="a"||((f=a().properties)==null?void 0:f.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var p,y;if((p=e.block.repeat)!=null&&p.collection)return!!((y=t==null?void 0:t())!=null&&y.length);const g="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!g}function c(){var f,p;return!((f=o==null?void 0:o())!=null&&f.component)&&!t()?(p=a().children)!=null?p:[]:[]}function m(){var g,f,p,y;return{blockChildren:(g=a().children)!=null?g:[],componentRef:(f=o==null?void 0:o())==null?void 0:f.component,componentOptions:{...st(a(),e.context),...Pt(o(),a()),...Vt(o(),e.context),...Et(o(),e.linkComponent),...Rt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((p=o==null?void 0:o())==null?void 0:p.noWrap)===!0,isInteractive:!((y=o==null?void 0:o())!=null&&y.isRSC&&h.TARGET==="rsc")}}return d.useEffect(()=>{const g=a().id,f=a().animations;f&&g&&pt(f.map(p=>({...p,elementId:g})))},[]),d.useEffect(()=>{n.update=!0}),r.jsx(r.Fragment,{children:s()?r.jsxs(r.Fragment,{children:[r.jsx(Lt,{block:a(),context:e.context,id:e.block.id}),(b=o==null?void 0:o())!=null&&b.noWrap?t()?r.jsx(r.Fragment,{children:(k=t())==null?void 0:k.map((g,f)=>r.jsx(he,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},fe(f)))}):r.jsx(ge,{componentRef:m().componentRef,componentOptions:m().componentOptions,blockChildren:m().blockChildren,context:m().context,registeredComponents:m().registeredComponents,linkComponent:m().linkComponent,builderBlock:m().builderBlock,includeBlockProps:m().includeBlockProps,isInteractive:m().isInteractive}):r.jsx(r.Fragment,{children:t()?r.jsx(r.Fragment,{children:(u=t())==null?void 0:u.map((g,f)=>r.jsx(he,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},fe(f)))}):r.jsxs($t,{Wrapper:l(),block:a(),context:e.context,children:[r.jsx(ge,{componentRef:m().componentRef,componentOptions:m().componentOptions,blockChildren:m().blockChildren,context:m().context,registeredComponents:m().registeredComponents,linkComponent:m().linkComponent,builderBlock:m().builderBlock,includeBlockProps:m().includeBlockProps,isInteractive:m().isInteractive}),(x=c())==null?void 0:x.map(g=>r.jsx(te,{block:g,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},g.id))]})})]}):null})}function _t(e){const t=d.useRef(null);d.useState(()=>!1);function n(){var l;return["builder-blocks",(l=e.blocks)!=null&&l.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const l="this.",s="component.options.";return e.path.startsWith(l)?e.path.replace(l,""):e.path.startsWith(s)?e.path:`${s}${e.path||""}`}function a(){var l,s;h.isEditing()&&!((l=e.blocks)!=null&&l.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var l,s;h.isEditing()&&!((l=e.blocks)!=null&&l.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return d.useEffect(()=>{},[]),d.useEffect(()=>{},[e.blocks]),r.jsxs(r.Fragment,{children:[r.jsx("style",{children:`.props-blocks-wrapper-b46bf284 {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
window.${Jt} = ${Kt}
|
|
219
219
|
window.${_e} = ${zt}
|
|
220
220
|
window.${Ue} = ${Gt}
|
|
221
|
-
`,qe=h.TARGET==="react",Zt=(e,t,n)=>`window.${_e}(${JSON.stringify(e)}, "${t}", ${qe}${n?`, "${n}"`:""})`,en=(e,t,n)=>`window.${Ue}(${JSON.stringify(e)}, "${t}", ${qe}${n?`, "${n}"`:""})`,ae={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},re={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},tn={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:[ae]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[re]}],defaultValue:[{title:[ae],detail:[re]},{title:[ae],detail:[re]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},xe=e=>e.toString();function nn(e){var x;const[t,n]=d.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function a(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const k={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(k).filter(([g,f])=>f!==void 0))}function l(u){return`builder-accordion-title builder-accordion-title-${t.includes(u)?"open":"closed"}`}function s(u){return`builder-accordion-detail builder-accordion-detail-${t.includes(u)?"open":"closed"}`}function c(){let u=null;if(e.grid&&t.length&&document){const g=t[0];let p=document.querySelector(`.builder-accordion-title[data-index="${g}"]`);if(u=g,p){let y=p.getBoundingClientRect();for(;p=p&&p.nextElementSibling;)if(p){if(p.classList.contains("builder-accordion-detail"))continue;const C=p.getBoundingClientRect();if(C.left>y.left){const I=parseInt(p.getAttribute("data-index")||"",10);isNaN(I)||(y=C,u=I)}else break}}}return typeof u=="number"&&(u=u+1),u}function m(){const u={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(u).filter(([k,g])=>g!==void 0))}function b(u){t.includes(u)?n(i()?[]:t.filter(k=>k!==u)):n(i()?[u]:t.concat(u))}return r.jsx("div",{className:"builder-accordion",style:a(),children:(x=e.items)==null?void 0:x.map((u,k)=>r.jsxs(et.Fragment,{children:[r.jsx("div",{className:l(k),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:c()!==null?xe(k):xe(k+1)}},"data-index":k,onClick:g=>b(k),children:r.jsx(D,{blocks:u.title,path:`items.${k}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(k)?r.jsx("div",{className:s(k),style:m(),children:r.jsx(D,{blocks:u.detail,path:`items.${k}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},k))})}const an={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}},rn={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(a=>a.get("width"))&&(n.find(o=>!o.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}},on={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},de=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],ln=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],sn={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:de,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(l,s=6e4){return new Promise((c,m)=>{const b=document.createElement("img");let x=!1;b.onload=()=>{x=!0,c(b)},b.addEventListener("error",u=>{console.warn("Image load failed",u.error),m(u.error)}),b.src=l,setTimeout(()=>{x||m(new Error("Image load timed out"))},s)})}function i(l){return Math.round(l*1e3)/1e3}const a=e.get("image"),o=e.get("aspectRatio");if(fetch(a).then(l=>l.blob()).then(l=>{l.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!o||o===.7041))return n(a).then(l=>{const s=e.get("aspectRatio");e.get("image")===a&&(!s||s===.7041)&&l.width&&l.height&&(e.set("aspectRatio",i(l.height/l.width)),e.set("height",l.height),e.set("width",l.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},cn={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function q(e){return r.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function un(e){var C,I,E,W,O,L,v,S,j,V,B,R,P;const t=d.useRef(null),[n,i]=d.useState(()=>h.userAttributesService.getUserAttributes()),[a,o]=d.useState(()=>{var w,A,T;return Zt(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(A=e.builderContext)==null?void 0:A.rootState)==null?void 0:T.locale)}),[l,s]=d.useState(()=>{var w,A,T;return en(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(A=e.builderContext)==null?void 0:A.rootState)==null?void 0:T.locale)}),[c,m]=d.useState(()=>[]),[b,x]=d.useState(()=>{var w;return Qt(e.variants,h.getDefaultCanTrack((w=e.builderContext)==null?void 0:w.canTrack))}),[u,k]=d.useState(()=>!1);function g(){return{...e.attributes,[H()]:`builder-personalization-container ${e.attributes[H()]||""}`}}function f(){return(e.variants||[]).filter(w=>{var A,T,N,F;return Mt({...(T=(A=e.builderContext)==null?void 0:A.rootState)!=null&&T.locale?{locale:(F=(N=e.builderContext)==null?void 0:N.rootState)==null?void 0:F.locale}:{},...n},w.query,w.startDate,w.endDate)})}function p(){var w;return Yt({variants:e.variants,fallbackBlocks:(w=e.builderBlock)==null?void 0:w.children,isHydrated:u,filteredVariants:f(),previewingIndex:e.previewingIndex})}function y(){return(e.variants||[]).map((w,A)=>{var T;return`div[data-variant-id="${(T=e.builderBlock)==null?void 0:T.id}-${A}"] { display: none !important; } `}).join("")}return d.useEffect(()=>{var A;k(!0);const w=h.userAttributesService.subscribeOnUserAttributesChange(T=>{i(T)},{fireImmediately:h.TARGET==="qwik"});if(!(h.isEditing()||h.isPreviewing())){const T=f()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:T||Q,content:(A=e.builderContext)==null?void 0:A.content},bubbles:!0})),new IntersectionObserver(F=>{F.forEach($=>{var _;$.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:T||Q,content:(_=e.builderContext)==null?void 0:_.content},bubbles:!0}))})}).observe(t.current))}c.push(w)},[]),d.useEffect(()=>()=>{c.forEach(w=>w())},[]),r.jsxs("div",{ref:t,...g(),children:[u&&Y.includes(h.TARGET)?r.jsx(D,{blocks:p().blocks,parent:(C=e.builderBlock)==null?void 0:C.id,path:p().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(I=e.builderContext)==null?void 0:I.BlocksWrapperProps,"data-variant-id":`${(E=e.builderBlock)==null?void 0:E.id}-${p().index}`}}):null,!u&&Y.includes(h.TARGET)||!Y.includes(h.TARGET)?r.jsxs(r.Fragment,{children:[b?r.jsxs(r.Fragment,{children:[r.jsx(J,{nonce:((W=e.builderContext)==null?void 0:W.nonce)||"",styles:y(),id:`variants-styles-${(O=e.builderBlock)==null?void 0:O.id}`}),r.jsx(q,{nonce:((L=e.builderContext)==null?void 0:L.nonce)||"",scriptStr:l,id:`variants-visibility-script-${(v=e.builderBlock)==null?void 0:v.id}`}),(S=e.variants)==null?void 0:S.map((w,A)=>{var T,N,F,$,_,me;return r.jsx(D,{BlocksWrapperProps:{...(T=e.builderContext)==null?void 0:T.BlocksWrapperProps,"aria-hidden":!0,hidden:!0,"data-variant-id":`${(N=e.builderBlock)==null?void 0:N.id}-${A}`},blocks:w.blocks,parent:(F=e.builderBlock)==null?void 0:F.id,path:`component.options.variants.${A}.blocks`,context:e.builderContext,registeredComponents:e.builderComponents,children:r.jsx(q,{nonce:(($=e.builderContext)==null?void 0:$.nonce)||"",scriptStr:a,id:`variants-script-${(_=e.builderBlock)==null?void 0:_.id}-${A}`})},`${(me=e.builderBlock)==null?void 0:me.id}-${A}`)})]}):null,r.jsx(D,{blocks:p().blocks,parent:(j=e.builderBlock)==null?void 0:j.id,path:p().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(V=e.builderContext)==null?void 0:V.BlocksWrapperProps,"data-variant-id":`${(B=e.builderBlock)==null?void 0:B.id}-${p().index}`},children:b?r.jsx(q,{nonce:((R=e.builderContext)==null?void 0:R.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}-${Q}`}):null})]}):null]})}const dn={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>"}}}]},mn={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function fn(e){var t,n,i;return r.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:r.jsx(D,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const gn={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}},oe={"@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"}}},le={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},hn={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[oe]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[le]}],defaultValue:[{label:[{...oe,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...le,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...oe,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...le,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 bn(e){var l;const[t,n]=d.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function a(s){return s===t?e.activeTabStyle:{}}function o(s){s===t&&e.collapsible?n(-1):n(s)}return r.jsxs("div",{children:[r.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((s,c)=>r.jsx("span",{className:`builder-tab-wrap ${t===c?"builder-tab-active":""}`,style:a(c),onClick:m=>o(c),children:r.jsx(D,{parent:e.builderBlock.id,path:`tabs.${c}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},c))}),i(t)?r.jsx("div",{children:r.jsx(D,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const yn={shouldReceiveBuilderProps:{},name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Me(e){var t;return r.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const xn={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 pn(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[a,o]=d.useState(()=>[]);function l(){var c;if(!t.current||!((c=t.current)!=null&&c.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let m=0;m<s.length;m++){const b=s[m];if(b.src){if(n.includes(b.src))continue;n.push(b.src);const x=document.createElement("script");x.async=!0,x.src=b.src,document.head.appendChild(x)}else if(!b.type||["text/javascript","application/javascript","application/ecmascript"].includes(b.type)){if(a.includes(b.innerText))continue;try{a.push(b.innerText),new Function(b.innerText)()}catch(x){h.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",x)}}}}return d.useEffect(()=>{l()},[]),d.useEffect(()=>{h.isEditing()&&l()},[e.code]),r.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const vn={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}]},Sn=["text/javascript","application/javascript","application/ecmascript"],kn=e=>Sn.includes(e.type);function Cn(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[a,o]=d.useState(()=>[]),[l,s]=d.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const m=t.current.getElementsByTagName("script");for(let b=0;b<m.length;b++){const x=m[b];if(x.src&&!n.includes(x.src)){n.push(x.src);const u=document.createElement("script");u.async=!0,u.src=x.src,document.head.appendChild(u)}else if(kn(x)&&!a.includes(x.innerText))try{a.push(x.innerText),new Function(x.innerText)()}catch(u){h.logger.warn("[BUILDER.IO] `Embed`: Error running script:",u)}}}return d.useEffect(()=>{t.current&&!l&&(s(!0),c())},[t.current,l]),r.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Tn={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}},In=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],wn=()=>{const e=process.env.NODE_ENV||"production";return In.includes(e)?e:"production"};function En(e){const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[a,o]=d.useState(()=>null),[l,s]=d.useState(()=>"");function c(u){var g,f;const k={...e.builderContext.rootState,...u};e.builderContext.rootSetState?(f=(g=e.builderContext).rootSetState)==null||f.call(g,k):e.builderContext.rootState=k}function m(){return h.isEditing()&&e.previewState||n}function b(u){return JSON.stringify(u,null,2)}function x(u){var g;const k=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")u.preventDefault();else if(k){if(!(e.action||e.sendSubmissionsTo==="email")){u.preventDefault();return}u.preventDefault();const f=u.currentTarget||u.target,p=e.customHeaders||{};let y;const C=new FormData(f),I=Array.from(f.querySelectorAll("input,select,textarea")).filter(v=>!!v.name).filter(v=>!!v.name&&(v.type!=="radio"||v.checked)).map(v=>{let S;const j=v.name;if(v instanceof HTMLInputElement)if(v.type==="radio"){if(v.checked)return S=v.value,{key:j,value:S}}else if(v.type==="checkbox")S=v.checked;else if(v.type==="number"||v.type==="range"){const V=v.valueAsNumber;isNaN(V)||(S=V)}else v.type==="file"?S=v.files:S=v.value;else S=v.value;return{key:j,value:S}});let E=e.contentType;if(e.sendSubmissionsTo==="email"&&(E="multipart/form-data"),Array.from(I).forEach(({value:v})=>{(v instanceof File||Array.isArray(v)&&v[0]instanceof File||v instanceof FileList)&&(E="multipart/form-data")}),E!=="application/json")y=C;else{const v={};Array.from(I).forEach(({value:S,key:j})=>{U.set(v,j,S)}),y=JSON.stringify(v)}E&&E!=="multipart/form-data"&&(k&&((g=e.action)!=null&&g.includes("zapier.com"))||(p["content-type"]=E));const W=new CustomEvent("presubmit",{detail:{body:y}});if(t.current&&(t.current.dispatchEvent(W),W.defaultPrevented))return;if(i("sending"),e.sendSubmissionsTo==="email"&&(e.sendSubmissionsToEmail==="your@email.com"||!e.sendSubmissionsToEmail)){const v="SubmissionsToEmail is required when sendSubmissionsTo is set to email";console.error(v),i("error"),c({formErrorMessage:v});return}const O=`${wn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,L=e.sendSubmissionsTo==="email"?O:e.action;h.logFetch(L),fetch(L,{body:y,headers:p,method:e.method||"post"}).then(async v=>{var V,B;let S;const j=v.headers.get("content-type");if(j&&j.indexOf("application/json")!==-1?S=await v.json():S=await v.text(),!v.ok){const R=new CustomEvent("submit:error",{detail:{error:S,status:v.status}});if((V=t.current)!=null&&V.nativeElement&&((B=t.current)==null||B.nativeElement.dispatchEvent(R),R.defaultPrevented))return;o(S),i("error");let P=e.errorMessagePath?we(S,e.errorMessagePath):S.message||S.error||S;typeof P!="string"&&(P=JSON.stringify(P)),s(P),c({formErrorMessage:P});return}if(o(S),i(v.ok?"success":"error"),v.ok){const R=new CustomEvent("submit:success",{detail:{res:v,body:S}});if(t.current){if(t.current.dispatchEvent(R),R.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const P=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(P),P.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},v=>{const S=new CustomEvent("submit:error",{detail:{error:v}});t.current&&(t.current.dispatchEvent(S),S.defaultPrevented)||(o(v),i("error"))})}}return r.jsxs(r.Fragment,{children:[" ",r.jsx("style",{children:".pre-abc898ba { padding: 10px; color: red; text-align: center; }"})," ",r.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:u=>x(u),...e.attributes,children:[e.children,m()==="error"?r.jsx(D,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,m()==="sending"?r.jsx(D,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,m()==="error"&&a?r.jsx("pre",{className:"builder-form-error-text pre-abc898ba",children:b(a)}):null,m()==="success"?r.jsx(D,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," "]})}const Rn={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 Pn(e){return d.createElement("input",{...e.attributes,key:h.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 jn={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 Vn(e){var t;return d.createElement("select",{...e.attributes,value:e.value,key:h.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)=>r.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const An={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 Bn(e){return r.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Nn={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 Fn(e){return r.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const $n={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:de,required:!0},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],noWrap:!0};function Wn(e){var n;function t(){const i={...e.attributes,[H()]:`builder-raw-img ${e.attributes[H()]||""}`};return delete i.style,i}return r.jsx("img",{loading:"lazy",alt:e.altText,title:e.title,src:e.imgSrc||e.image,...t(),style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center",aspectRatio:e.aspectRatio||void 0,...((n=e.attributes)==null?void 0:n.style)||{}}},h.isEditing()&&e.imgSrc||"default-key")}const Dn={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:ln,bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:de,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function ze(e){var l,s,c,m,b,x,u;const t=d.useRef(null);function n(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function i(){return{...n()}}const[a,o]=d.useState(()=>{});return d.useEffect(()=>{if(e.lazyLoad){const k=new IntersectionObserver(function(g){g.forEach(function(f){if(!f.isIntersecting)return;const p=f.target;try{Array.from(p.children).filter(y=>y instanceof HTMLElement&&y.tagName==="SOURCE").forEach(y=>{const C=y.dataset.src;C&&(y.src=C)}),p.load(),k.unobserve(p)}catch(y){console.error("Error loading lazy video:",y)}})});t.current&&k.observe(t.current),o(k)}},[]),d.useEffect(()=>()=>{a&&a.disconnect()},[]),r.jsxs("div",{style:{position:"relative"},children:[r.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(l=e.attributes)==null?void 0:l.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:r.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((c=(s=e.builderBlock)==null?void 0:s.children)!=null&&c.length))?r.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(b=(m=e.builderBlock)==null?void 0:m.children)!=null&&b.length&&e.fitContent?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(x=e.builderBlock)==null?void 0:x.children)!=null&&u.length&&!e.fitContent?r.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:pn,...xn},{component:Cn,...vn},{component:En,...Tn},{component:Pn,...Rn},{component:Bn,...An},{component:Vn,...jn},{component:Fn,...Nn},{component:Wn,...$n},{component:ze,...Dn}],pe=()=>[{component:Te,...an},{component:We,...rn},{component:De,...on},{component:Oe,...sn},{component:Le,...dn},{component:fn,...mn},{component:Ye,...gn},{component:Me,...yn},...He.includes(h.TARGET)?[{component:un,...cn}]:[],{component:bn,...hn},{component:nn,...tn},...On()],Ln=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
221
|
+
`,qe=h.TARGET==="react",Zt=(e,t,n)=>`window.${_e}(${JSON.stringify(e)}, "${t}", ${qe}${n?`, "${n}"`:""})`,en=(e,t,n)=>`window.${Ue}(${JSON.stringify(e)}, "${t}", ${qe}${n?`, "${n}"`:""})`,ae={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},re={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},tn={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:[ae]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[re]}],defaultValue:[{title:[ae],detail:[re]},{title:[ae],detail:[re]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},xe=e=>e.toString();function nn(e){var x;const[t,n]=d.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function a(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const k={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(k).filter(([g,f])=>f!==void 0))}function l(u){return`builder-accordion-title builder-accordion-title-${t.includes(u)?"open":"closed"}`}function s(u){return`builder-accordion-detail builder-accordion-detail-${t.includes(u)?"open":"closed"}`}function c(){let u=null;if(e.grid&&t.length&&document){const g=t[0];let p=document.querySelector(`.builder-accordion-title[data-index="${g}"]`);if(u=g,p){let y=p.getBoundingClientRect();for(;p=p&&p.nextElementSibling;)if(p){if(p.classList.contains("builder-accordion-detail"))continue;const C=p.getBoundingClientRect();if(C.left>y.left){const I=parseInt(p.getAttribute("data-index")||"",10);isNaN(I)||(y=C,u=I)}else break}}}return typeof u=="number"&&(u=u+1),u}function m(){const u={order:typeof c()=="number"?c():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(u).filter(([k,g])=>g!==void 0))}function b(u){t.includes(u)?n(i()?[]:t.filter(k=>k!==u)):n(i()?[u]:t.concat(u))}return r.jsx("div",{className:"builder-accordion",style:a(),children:(x=e.items)==null?void 0:x.map((u,k)=>r.jsxs(et.Fragment,{children:[r.jsx("div",{className:l(k),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:c()!==null?xe(k):xe(k+1)}},"data-index":k,onClick:g=>b(k),children:r.jsx(D,{blocks:u.title,path:`items.${k}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(k)?r.jsx("div",{className:s(k),style:m(),children:r.jsx(D,{blocks:u.detail,path:`items.${k}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},k))})}const an={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}},rn={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(a=>a.get("width"))&&(n.find(o=>!o.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}},on={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},de=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],ln=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],sn={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:de,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(l,s=6e4){return new Promise((c,m)=>{const b=document.createElement("img");let x=!1;b.onload=()=>{x=!0,c(b)},b.addEventListener("error",u=>{console.warn("Image load failed",u.error),m(u.error)}),b.src=l,setTimeout(()=>{x||m(new Error("Image load timed out"))},s)})}function i(l){return Math.round(l*1e3)/1e3}const a=e.get("image"),o=e.get("aspectRatio");if(fetch(a).then(l=>l.blob()).then(l=>{l.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!o||o===.7041))return n(a).then(l=>{const s=e.get("aspectRatio");e.get("image")===a&&(!s||s===.7041)&&l.width&&l.height&&(e.set("aspectRatio",i(l.height/l.width)),e.set("height",l.height),e.set("width",l.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},cn={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function q(e){return r.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function un(e){var C,I,E,W,O,L,v,S,V,j,B,R,P;const t=d.useRef(null),[n,i]=d.useState(()=>h.userAttributesService.getUserAttributes()),[a,o]=d.useState(()=>{var w,A,T;return Zt(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(A=e.builderContext)==null?void 0:A.rootState)==null?void 0:T.locale)}),[l,s]=d.useState(()=>{var w,A,T;return en(e.variants,((w=e.builderBlock)==null?void 0:w.id)||"none",(T=(A=e.builderContext)==null?void 0:A.rootState)==null?void 0:T.locale)}),[c,m]=d.useState(()=>[]),[b,x]=d.useState(()=>{var w;return Qt(e.variants,h.getDefaultCanTrack((w=e.builderContext)==null?void 0:w.canTrack))}),[u,k]=d.useState(()=>!1);function g(){return{...e.attributes,[H()]:`builder-personalization-container ${e.attributes[H()]||""}`}}function f(){return(e.variants||[]).filter(w=>{var A,T,N,F;return Mt({...(T=(A=e.builderContext)==null?void 0:A.rootState)!=null&&T.locale?{locale:(F=(N=e.builderContext)==null?void 0:N.rootState)==null?void 0:F.locale}:{},...n},w.query,w.startDate,w.endDate)})}function p(){var w;return Yt({variants:e.variants,fallbackBlocks:(w=e.builderBlock)==null?void 0:w.children,isHydrated:u,filteredVariants:f(),previewingIndex:e.previewingIndex})}function y(){return(e.variants||[]).map((w,A)=>{var T;return`div[data-variant-id="${(T=e.builderBlock)==null?void 0:T.id}-${A}"] { display: none !important; } `}).join("")}return d.useEffect(()=>{var A;k(!0);const w=h.userAttributesService.subscribeOnUserAttributesChange(T=>{i(T)},{fireImmediately:h.TARGET==="qwik"});if(!(h.isEditing()||h.isPreviewing())){const T=f()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:T||Q,content:(A=e.builderContext)==null?void 0:A.content},bubbles:!0})),new IntersectionObserver(F=>{F.forEach($=>{var _;$.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:T||Q,content:(_=e.builderContext)==null?void 0:_.content},bubbles:!0}))})}).observe(t.current))}c.push(w)},[]),d.useEffect(()=>()=>{c.forEach(w=>w())},[]),r.jsxs("div",{ref:t,...g(),children:[u&&Y.includes(h.TARGET)?r.jsx(D,{blocks:p().blocks,parent:(C=e.builderBlock)==null?void 0:C.id,path:p().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(I=e.builderContext)==null?void 0:I.BlocksWrapperProps,"data-variant-id":`${(E=e.builderBlock)==null?void 0:E.id}-${p().index}`}}):null,!u&&Y.includes(h.TARGET)||!Y.includes(h.TARGET)?r.jsxs(r.Fragment,{children:[b?r.jsxs(r.Fragment,{children:[r.jsx(J,{nonce:((W=e.builderContext)==null?void 0:W.nonce)||"",styles:y(),id:`variants-styles-${(O=e.builderBlock)==null?void 0:O.id}`}),r.jsx(q,{nonce:((L=e.builderContext)==null?void 0:L.nonce)||"",scriptStr:l,id:`variants-visibility-script-${(v=e.builderBlock)==null?void 0:v.id}`}),(S=e.variants)==null?void 0:S.map((w,A)=>{var T,N,F,$,_,me;return r.jsx(D,{BlocksWrapperProps:{...(T=e.builderContext)==null?void 0:T.BlocksWrapperProps,"aria-hidden":!0,hidden:!0,"data-variant-id":`${(N=e.builderBlock)==null?void 0:N.id}-${A}`},blocks:w.blocks,parent:(F=e.builderBlock)==null?void 0:F.id,path:`component.options.variants.${A}.blocks`,context:e.builderContext,registeredComponents:e.builderComponents,children:r.jsx(q,{nonce:(($=e.builderContext)==null?void 0:$.nonce)||"",scriptStr:a,id:`variants-script-${(_=e.builderBlock)==null?void 0:_.id}-${A}`})},`${(me=e.builderBlock)==null?void 0:me.id}-${A}`)})]}):null,r.jsx(D,{blocks:p().blocks,parent:(V=e.builderBlock)==null?void 0:V.id,path:p().path,context:e.builderContext,registeredComponents:e.builderComponents,BlocksWrapperProps:{...(j=e.builderContext)==null?void 0:j.BlocksWrapperProps,"data-variant-id":`${(B=e.builderBlock)==null?void 0:B.id}-${p().index}`},children:b?r.jsx(q,{nonce:((R=e.builderContext)==null?void 0:R.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}-${Q}`}):null})]}):null]})}const dn={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>"}}}]},mn={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function fn(e){var t,n,i;return r.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:r.jsx(D,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const gn={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}},oe={"@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"}}},le={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},hn={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[oe]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[le]}],defaultValue:[{label:[{...oe,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...le,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...oe,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...le,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 bn(e){var l;const[t,n]=d.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function a(s){return s===t?e.activeTabStyle:{}}function o(s){s===t&&e.collapsible?n(-1):n(s)}return r.jsxs("div",{children:[r.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((s,c)=>r.jsx("span",{className:`builder-tab-wrap ${t===c?"builder-tab-active":""}`,style:a(c),onClick:m=>o(c),children:r.jsx(D,{parent:e.builderBlock.id,path:`tabs.${c}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},c))}),i(t)?r.jsx("div",{children:r.jsx(D,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const yn={shouldReceiveBuilderProps:{},name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Me(e){var t;return r.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const xn={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 pn(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[a,o]=d.useState(()=>[]);function l(){var c;if(!t.current||!((c=t.current)!=null&&c.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let m=0;m<s.length;m++){const b=s[m];if(b.src){if(n.includes(b.src))continue;n.push(b.src);const x=document.createElement("script");x.async=!0,x.src=b.src,document.head.appendChild(x)}else if(!b.type||["text/javascript","application/javascript","application/ecmascript"].includes(b.type)){if(a.includes(b.innerText))continue;try{a.push(b.innerText),new Function(b.innerText)()}catch(x){h.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",x)}}}}return d.useEffect(()=>{l()},[]),d.useEffect(()=>{h.isEditing()&&l()},[e.code]),r.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const vn={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}]},Sn=["text/javascript","application/javascript","application/ecmascript"],kn=e=>Sn.includes(e.type);function Cn(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[a,o]=d.useState(()=>[]),[l,s]=d.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const m=t.current.getElementsByTagName("script");for(let b=0;b<m.length;b++){const x=m[b];if(x.src&&!n.includes(x.src)){n.push(x.src);const u=document.createElement("script");u.async=!0,u.src=x.src,document.head.appendChild(u)}else if(kn(x)&&!a.includes(x.innerText))try{a.push(x.innerText),new Function(x.innerText)()}catch(u){h.logger.warn("[BUILDER.IO] `Embed`: Error running script:",u)}}}return d.useEffect(()=>{t.current&&!l&&(s(!0),c())},[t.current,l]),r.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Tn={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}},In=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],wn=()=>{const e=process.env.NODE_ENV||"production";return In.includes(e)?e:"production"};function En(e){const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[a,o]=d.useState(()=>null),[l,s]=d.useState(()=>"");function c(u){var g,f;const k={...e.builderContext.rootState,...u};e.builderContext.rootSetState?(f=(g=e.builderContext).rootSetState)==null||f.call(g,k):e.builderContext.rootState=k}function m(){return h.isEditing()&&e.previewState||n}function b(u){return JSON.stringify(u,null,2)}function x(u){var g;const k=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")u.preventDefault();else if(k){if(!(e.action||e.sendSubmissionsTo==="email")){u.preventDefault();return}u.preventDefault();const f=u.currentTarget||u.target,p=e.customHeaders||{};let y;const C=new FormData(f),I=Array.from(f.querySelectorAll("input,select,textarea")).filter(v=>!!v.name).filter(v=>!!v.name&&(v.type!=="radio"||v.checked)).map(v=>{let S;const V=v.name;if(v instanceof HTMLInputElement)if(v.type==="radio"){if(v.checked)return S=v.value,{key:V,value:S}}else if(v.type==="checkbox")S=v.checked;else if(v.type==="number"||v.type==="range"){const j=v.valueAsNumber;isNaN(j)||(S=j)}else v.type==="file"?S=v.files:S=v.value;else S=v.value;return{key:V,value:S}});let E=e.contentType;if(e.sendSubmissionsTo==="email"&&(E="multipart/form-data"),Array.from(I).forEach(({value:v})=>{(v instanceof File||Array.isArray(v)&&v[0]instanceof File||v instanceof FileList)&&(E="multipart/form-data")}),E!=="application/json")y=C;else{const v={};Array.from(I).forEach(({value:S,key:V})=>{U.set(v,V,S)}),y=JSON.stringify(v)}E&&E!=="multipart/form-data"&&(k&&((g=e.action)!=null&&g.includes("zapier.com"))||(p["content-type"]=E));const W=new CustomEvent("presubmit",{detail:{body:y}});if(t.current&&(t.current.dispatchEvent(W),W.defaultPrevented))return;if(i("sending"),e.sendSubmissionsTo==="email"&&(e.sendSubmissionsToEmail==="your@email.com"||!e.sendSubmissionsToEmail)){const v="SubmissionsToEmail is required when sendSubmissionsTo is set to email";console.error(v),i("error"),c({formErrorMessage:v});return}const O=`${wn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,L=e.sendSubmissionsTo==="email"?O:e.action;h.logFetch(L),fetch(L,{body:y,headers:p,method:e.method||"post"}).then(async v=>{var j,B;let S;const V=v.headers.get("content-type");if(V&&V.indexOf("application/json")!==-1?S=await v.json():S=await v.text(),!v.ok){const R=new CustomEvent("submit:error",{detail:{error:S,status:v.status}});if((j=t.current)!=null&&j.nativeElement&&((B=t.current)==null||B.nativeElement.dispatchEvent(R),R.defaultPrevented))return;o(S),i("error");let P=e.errorMessagePath?we(S,e.errorMessagePath):S.message||S.error||S;typeof P!="string"&&(P=JSON.stringify(P)),s(P),c({formErrorMessage:P});return}if(o(S),i(v.ok?"success":"error"),v.ok){const R=new CustomEvent("submit:success",{detail:{res:v,body:S}});if(t.current){if(t.current.dispatchEvent(R),R.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const P=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(P),P.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},v=>{const S=new CustomEvent("submit:error",{detail:{error:v}});t.current&&(t.current.dispatchEvent(S),S.defaultPrevented)||(o(v),i("error"))})}}return r.jsxs(r.Fragment,{children:[" ",r.jsx("style",{children:".pre-abc898ba { padding: 10px; color: red; text-align: center; }"})," ",r.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:u=>x(u),...e.attributes,children:[e.children,m()==="error"?r.jsx(D,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,m()==="sending"?r.jsx(D,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,m()==="error"&&a?r.jsx("pre",{className:"builder-form-error-text pre-abc898ba",children:b(a)}):null,m()==="success"?r.jsx(D,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," "]})}const Rn={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 Pn(e){return d.createElement("input",{...e.attributes,key:h.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 Vn={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 jn(e){var t;return d.createElement("select",{...e.attributes,value:e.value,key:h.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)=>r.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const An={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 Bn(e){return r.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Nn={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 Fn(e){return r.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const $n={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:de,required:!0},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],noWrap:!0};function Wn(e){var n;function t(){const i={...e.attributes,[H()]:`builder-raw-img ${e.attributes[H()]||""}`};return delete i.style,i}return r.jsx("img",{loading:"lazy",alt:e.altText,title:e.title,src:e.imgSrc||e.image,...t(),style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center",aspectRatio:e.aspectRatio||void 0,...((n=e.attributes)==null?void 0:n.style)||{}}},h.isEditing()&&e.imgSrc||"default-key")}const Dn={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:ln,bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:de,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function ze(e){var l,s,c,m,b,x,u;const t=d.useRef(null);function n(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function i(){return{...n()}}const[a,o]=d.useState(()=>{});return d.useEffect(()=>{if(e.lazyLoad){const k=new IntersectionObserver(function(g){g.forEach(function(f){if(!f.isIntersecting)return;const p=f.target;try{Array.from(p.children).filter(y=>y instanceof HTMLElement&&y.tagName==="SOURCE").forEach(y=>{const C=y.dataset.src;C&&(y.src=C)}),p.load(),k.unobserve(p)}catch(y){console.error("Error loading lazy video:",y)}})});t.current&&k.observe(t.current),o(k)}},[]),d.useEffect(()=>()=>{a&&a.disconnect()},[]),r.jsxs("div",{style:{position:"relative"},children:[r.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(l=e.attributes)==null?void 0:l.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:r.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((c=(s=e.builderBlock)==null?void 0:s.children)!=null&&c.length))?r.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(b=(m=e.builderBlock)==null?void 0:m.children)!=null&&b.length&&e.fitContent?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(x=e.builderBlock)==null?void 0:x.children)!=null&&u.length&&!e.fitContent?r.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:pn,...xn},{component:Cn,...vn},{component:En,...Tn},{component:Pn,...Rn},{component:Bn,...An},{component:jn,...Vn},{component:Fn,...Nn},{component:Wn,...$n},{component:ze,...Dn}],pe=()=>[{component:Te,...an},{component:We,...rn},{component:De,...on},{component:Oe,...sn},{component:Le,...dn},{component:fn,...mn},{component:Ye,...gn},{component:Me,...yn},...He.includes(h.TARGET)?[{component:un,...cn}]:[],{component:bn,...hn},{component:nn,...tn},...On()],Ln=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
222
222
|
function getAndSetVariantId() {
|
|
223
223
|
function setCookie(name, value, days) {
|
|
224
224
|
let expires = '';
|
|
@@ -350,7 +350,7 @@ font-weight: ${s};
|
|
|
350
350
|
text-align: inherit;
|
|
351
351
|
font-family: inherit;
|
|
352
352
|
}
|
|
353
|
-
`,ni=e=>e?"":ti,ii=e=>`variant-${e}`;function ai(e){var O,L,v;const t=d.useRef(null);d.useState(()=>!1),d.useState(()=>e.builderContextSignal);const[n,i]=d.useState(()=>null),[a,o]=d.useState(()=>"");function l(S,
|
|
353
|
+
`,ni=e=>e?"":ti,ii=e=>`variant-${e}`;function ai(e){var O,L,v;const t=d.useRef(null);d.useState(()=>!1),d.useState(()=>e.builderContextSignal);const[n,i]=d.useState(()=>null),[a,o]=d.useState(()=>"");function l(S,V){var B,R;const j={...e.builderContextSignal.rootState,...S};e.builderContextSignal.rootSetState?(R=(B=e.builderContextSignal).rootSetState)==null||R.call(B,j):e.setBuilderContextSignal(P=>({...P,rootState:j})),e.builderContextSignal.rootSetState?e.builderContextSignal.rootSetState(j):e.setBuilderContextSignal(P=>({...P,rootState:j}))}function s(S,V){var B,R,P,w,A;const j={...e.builderContextSignal.content,...S,data:{...(B=e.builderContextSignal.content)==null?void 0:B.data,...S==null?void 0:S.data},meta:{...(R=e.builderContextSignal.content)==null?void 0:R.meta,...S==null?void 0:S.meta,breakpoints:((P=S==null?void 0:S.meta)==null?void 0:P.breakpoints)||((A=(w=e.builderContextSignal.content)==null?void 0:w.meta)==null?void 0:A.breakpoints)}};e.setBuilderContextSignal(T=>({...T,content:j}))}function c(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[m,b]=d.useState(()=>e.contentWrapper||"div");function x(S){return h.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:V=>{var R;const{breakpoints:j,contentId:B}=V;!B||B!==((R=e.builderContextSignal.content)==null?void 0:R.id)||j&&s({meta:{breakpoints:j}})},animation:V=>{Ve(V)},contentUpdate:(V,j)=>{s(V)},stateUpdate:(V,j)=>{l(V)}}})(S)}const[u,k]=d.useState(()=>({})),[g,f]=d.useState(()=>({})),[p,y]=d.useState(()=>!1);function C(S){var V,j;if(e.builderContextSignal.content){const B=(V=e.builderContextSignal.content)==null?void 0:V.testVariationId,R=(j=e.builderContextSignal.content)==null?void 0:j.id;h._track({apiHost:e.apiHost,type:"click",canTrack:h.getDefaultCanTrack(e.canTrack),contentId:R,apiKey:e.apiKey,variationId:B!==R?B:void 0,...Qn(S),unique:!p})}p||y(!0)}function I(){var V,j,B;const S=(B=(j=(V=e.builderContextSignal.content)==null?void 0:V.data)==null?void 0:j.httpRequests)!=null?B:{};Object.entries(S).forEach(([R,P])=>{if(!P)return;const w=typeof P=="object"&&P["@type"]==="@builder.io/core:Request";if(g[R]||u[R]&&!h.isEditing())return;const A=w?P.request.url:P;g[R]=!0;const T=A.replace(/{{([^}]+)}}/g,($,_)=>String(M({code:_,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))),N=w?{url:T,method:P.request.method,headers:P.request.headers,body:P.request.body}:{url:T,method:"GET"};h.logFetch(JSON.stringify(N));const F={method:N.method,headers:N.headers,body:N.body};N.method==="GET"&&delete F.body,fetch(N.url,F).then($=>$.json()).then($=>{l({[R]:$}),u[R]=!0}).catch($=>{console.error("error fetching dynamic data",JSON.stringify(P),$)}).finally(()=>{g[R]=!1})})}function E(){h.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:U.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const W=d.useRef(!1);return W.current||(I(),E(),W.current=!0),d.useEffect(()=>{var S,V,j,B,R;if(h.isBrowser()){h.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",x),h.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(S=e.model)!=null?S:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(T=>{var N,F;if(!((N=T.models)!=null&&N.length)||T.models.includes(e.model)){const $=h.createRegisterComponentMessage(T);(F=window.parent)==null||F.postMessage($,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",E));const P=e.builderContextSignal.content&&h.getDefaultCanTrack(e.canTrack),w=h.getCookieSync({name:`builder.tests.${(V=e.builderContextSignal.content)==null?void 0:V.id}`,canTrack:!0}),A=(j=e.builderContextSignal.content)==null?void 0:j.testVariationId;if(P&&A===w){const T=(B=e.builderContextSignal.content)==null?void 0:B.id,N=e.apiKey;h._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:T,apiKey:N,variationId:w!==T?w:void 0})}if(h.isPreviewing()&&!h.isEditing()){const T=new URL(location.href).searchParams,N=T.get("builder.preview"),F=T.get(`builder.overrides.${N}`),$=T.get("apiKey")||T.get("builder.space");(N==="BUILDER_STUDIO"||N===e.model&&$===e.apiKey&&(!e.content||F===e.content.id))&&h.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...N==="BUILDER_STUDIO"&&((R=e.context)!=null&&R.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(_=>{_&&s(_)})}}},[]),d.useEffect(()=>{e.content&&s(e.content)},[e.content]),d.useEffect(()=>{E()},[e.builderContextSignal.rootState]),d.useEffect(()=>{if(e.data){if(n===e.data)return;l(e.data),i(e.data)}},[e.data]),d.useEffect(()=>{if(e.locale){if(a===e.locale)return;l({locale:e.locale}),o(e.locale)}},[e.locale]),d.useEffect(()=>()=>{h.isBrowser()&&(window.removeEventListener("message",x),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),r.jsx(G.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||ke()?r.jsx(m,{ref:t,onClick:S=>C(S),"builder-content-id":(O=e.builderContextSignal.content)==null?void 0:O.id,"builder-model":e.model,className:ii(((L=e.content)==null?void 0:L.testVariationId)||((v=e.content)==null?void 0:v.id)),style:{display:!e.builderContextSignal.content&&ke()?"none":void 0},...c(),...e.contentWrapperProps,children:e.children}):null})}function ri(e){const[t,n]=d.useState(()=>`
|
|
354
354
|
${ei({cssCode:e.cssCode,contentId:e.contentId})}
|
|
355
355
|
${Zn({customFonts:e.customFonts})}
|
|
356
356
|
${ni(e.isNestedRender)}
|