@builder.io/sdk-react-nextjs 0.13.4 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/lib/browser/{USE_CLIENT_BUNDLE-288752d8.js → USE_CLIENT_BUNDLE-3ca5290b.js} +2 -5
  2. package/lib/{node/USE_CLIENT_BUNDLE-5990191b.cjs → browser/USE_CLIENT_BUNDLE-ae2cf58a.cjs} +2 -2
  3. package/lib/{edge/USE_SERVER_BUNDLE-70e7e90b.cjs → browser/USE_SERVER_BUNDLE-44bff58a.cjs} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-6e48e5ed.js → browser/USE_SERVER_BUNDLE-87bb4fc8.js} +1 -1
  5. package/lib/browser/bundle-0f8e9b11.cjs +168 -0
  6. package/lib/browser/{bundle-10ada443.js → bundle-4016f64d.js} +476 -501
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +26 -30
  9. package/lib/{browser/USE_CLIENT_BUNDLE-94cce7fa.cjs → edge/USE_CLIENT_BUNDLE-e243b06f.cjs} +2 -2
  10. package/lib/{node/USE_CLIENT_BUNDLE-d7ccf4f8.js → edge/USE_CLIENT_BUNDLE-eea569d0.js} +2 -5
  11. package/lib/{node/USE_SERVER_BUNDLE-b7c27ec7.cjs → edge/USE_SERVER_BUNDLE-0b2f4389.cjs} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-7a98295a.js → edge/USE_SERVER_BUNDLE-4db772c9.js} +1 -1
  13. package/lib/edge/{bundle-66600134.js → bundle-30e52741.js} +1065 -1090
  14. package/lib/edge/bundle-972c668c.cjs +188 -0
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +26 -30
  17. package/lib/{edge/USE_CLIENT_BUNDLE-4859795b.cjs → node/USE_CLIENT_BUNDLE-293178d5.cjs} +2 -2
  18. package/lib/{edge/USE_CLIENT_BUNDLE-6fd05768.js → node/USE_CLIENT_BUNDLE-3a1f710c.js} +2 -5
  19. package/lib/{browser/USE_SERVER_BUNDLE-02c2385b.js → node/USE_SERVER_BUNDLE-86b87f1d.js} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-20569132.cjs → node/USE_SERVER_BUNDLE-e487f694.cjs} +1 -1
  21. package/lib/node/{bundle-2d5f1c0c.js → bundle-3d5a7e60.js} +106 -131
  22. package/lib/node/{bundle-9b818d40.cjs → bundle-b908270e.cjs} +10 -10
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +26 -30
  25. package/package.json +1 -1
  26. package/types/cjs/components/content-variants/content-variants.types.d.ts +0 -2
  27. package/types/cjs/constants/sdk-version.d.ts +1 -1
  28. package/types/cjs/functions/get-content/index.d.ts +0 -10
  29. package/types/cjs/functions/get-content/types.d.ts +0 -11
  30. package/types/cjs/functions/register-component.d.ts +0 -9
  31. package/types/cjs/index-helpers/blocks-exports.d.ts +0 -8
  32. package/types/cjs/server-index.d.ts +1 -1
  33. package/types/esm/components/content-variants/content-variants.types.d.ts +0 -2
  34. package/types/esm/constants/sdk-version.d.ts +1 -1
  35. package/types/esm/functions/get-content/index.d.ts +0 -10
  36. package/types/esm/functions/get-content/types.d.ts +0 -11
  37. package/types/esm/functions/register-component.d.ts +0 -9
  38. package/types/esm/index-helpers/blocks-exports.d.ts +0 -8
  39. package/types/esm/server-index.d.ts +1 -1
  40. package/lib/browser/bundle-44e64ae0.cjs +0 -168
  41. package/lib/edge/bundle-aa7b9a16.cjs +0 -188
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-44e64ae0.cjs"),t=require("./USE_CLIENT_BUNDLE-94cce7fa.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-20569132.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./USE_CLIENT_BUNDLE-ae2cf58a.cjs"),e=require("./bundle-0f8e9b11.cjs");require("react/jsx-runtime");require("react");require("./USE_SERVER_BUNDLE-44bff58a.cjs");require("next/navigation");require("lru-cache");exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.Symbol=e.Symbol;exports.Text=e.Text;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.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
@@ -1,35 +1,31 @@
1
- import { B as i, x as c, C as m, R as g, w as p, S as d, T as l, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as h, c as x, j as b, y as k, z as y, E as F, D as P } from "./bundle-10ada443.js";
2
- import { c as w, F as A, d as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-288752d8.js";
3
- import "lru-cache";
1
+ import { c as n, F as m, d as c, S as p, V as g } from "./USE_CLIENT_BUNDLE-3ca5290b.js";
2
+ import { B as l, w as u, C as E, S, T as f, F as B, p as C, E as h, G as x, q as b, z as y, c as F, j as P, x as T, y as k, D as w, A as R } from "./bundle-4016f64d.js";
4
3
  import "react/jsx-runtime";
5
4
  import "react";
5
+ import "./USE_SERVER_BUNDLE-87bb4fc8.js";
6
6
  import "next/navigation";
7
- import "./USE_SERVER_BUNDLE-02c2385b.js";
7
+ import "lru-cache";
8
8
  export {
9
- i as Blocks,
10
- w as Button,
11
- c as Columns,
12
- m as Content,
13
- A as Fragment,
14
- I as Image,
15
- g as RenderBlocks,
16
- p as RenderContent,
17
- V as Section,
18
- d as Symbol,
19
- l as Text,
20
- j as Video,
21
- C as _processContentResult,
22
- u as createRegisterComponentMessage,
23
- B as fetchBuilderProps,
24
- E as fetchEntries,
25
- S as fetchOneEntry,
26
- f as getAllContent,
27
- R as getBuilderSearchParams,
28
- h as getContent,
29
- x as isEditing,
30
- b as isPreviewing,
31
- k as register,
32
- y as setEditorSettings,
33
- F as subscribeToEditor,
34
- P as track
9
+ l as Blocks,
10
+ n as Button,
11
+ u as Columns,
12
+ E as Content,
13
+ m as Fragment,
14
+ c as Image,
15
+ p as Section,
16
+ S as Symbol,
17
+ f as Text,
18
+ g as Video,
19
+ B as _processContentResult,
20
+ C as createRegisterComponentMessage,
21
+ h as fetchBuilderProps,
22
+ x as fetchEntries,
23
+ b as fetchOneEntry,
24
+ y as getBuilderSearchParams,
25
+ F as isEditing,
26
+ P as isPreviewing,
27
+ T as register,
28
+ k as setEditorSettings,
29
+ w as subscribeToEditor,
30
+ R as track
35
31
  };
@@ -1,4 +1,4 @@
1
- "use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-44e64ae0.cjs"),r=require("react"),D=require("./USE_SERVER_BUNDLE-20569132.cjs"),V=require("next/navigation");function C(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function H(e){return t.jsx(C,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[a.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[a.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}function U(e){return t.jsx(C,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function $(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function O(e){function l(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function x(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>x(),onKeyPress:o=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
1
+ "use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-972c668c.cjs"),r=require("react"),D=require("./USE_SERVER_BUNDLE-0b2f4389.cjs"),V=require("next/navigation");function C(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function H(e){return t.jsx(C,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[a.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[a.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}function U(e){return t.jsx(C,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function $(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function O(e){function l(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function x(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-7354e098","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>x(),onKeyPress:o=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-7354e098 {
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: stretch;
@@ -18,4 +18,4 @@
18
18
  left: 0;
19
19
  width: 100%;
20
20
  height: 100%;
21
- }`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const l=r.useRef(null),[g,x]=r.useState(()=>[]),[o,m]=r.useState(()=>[]);return r.useEffect(()=>{var v;if(!((v=l.current)!=null&&v.getElementsByTagName)||typeof window>"u")return;const h=l.current.getElementsByTagName("script");for(let b=0;b<h.length;b++){const s=h[b];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const f=document.createElement("script");f.async=!0,f.src=s.src,document.head.appendChild(f)}else if(!s.type||["text/javascript","application/javascript","application/ecmascript"].includes(s.type)){if(o.includes(s.innerText))continue;try{o.push(s.innerText),new Function(s.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),t.jsx("div",{ref:l,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function Y(e){const l=r.useRef(null),[g,x]=r.useState(()=>[]),[o,m]=r.useState(()=>[]),[h,v]=r.useState(()=>!1);function b(){if(!l.current||!l.current.getElementsByTagName)return;const s=l.current.getElementsByTagName("script");for(let f=0;f<s.length;f++){const k=s[f];if(k.src&&!g.includes(k.src)){g.push(k.src);const y=document.createElement("script");y.async=!0,y.src=k.src,document.head.appendChild(y)}else if(a.isJsScript(k)&&!o.includes(k.innerText))try{o.push(k.innerText),new Function(k.innerText)()}catch(y){console.warn("`Embed`: Error running script:",y)}}}return r.useEffect(()=>{l.current&&!h&&(v(!0),b())},[l.current,h]),t.jsx("div",{className:"builder-embed",ref:l,dangerouslySetInnerHTML:{__html:e.content}})}function Z(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},a.isEditing()&&e.imgSrc||"default-key")}function p(e){var x,o,m,h,v,b,s;function l(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...l()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(x=e.attributes)==null?void 0:x.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((m=(o=e.builderBlock)==null?void 0:o.children)!=null&&m.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(v=(h=e.builderBlock)==null?void 0:h.children)!=null&&v.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(s=(b=e.builderBlock)==null?void 0:b.children)!=null&&s.length&&!e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const ee=r.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function te(e){var P,T,B,N,F,L,W;const l=r.useRef(null),[g,x]=r.useState(()=>0);r.useState(()=>!0);function o(i){var c,d;const n={...e.builderContextSignal.rootState,...i};e.builderContextSignal.rootSetState?(d=(c=e.builderContextSignal).rootSetState)==null||d.call(c,n):e.builderContextSignal.rootState=n}function m(i){var c,d,u,S,A;const n={...e.builderContextSignal.content,...i,data:{...(c=e.builderContextSignal.content)==null?void 0:c.data,...i==null?void 0:i.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...i==null?void 0:i.meta,breakpoints:((u=i==null?void 0:i.meta)==null?void 0:u.breakpoints)||((A=(S=e.builderContextSignal.content)==null?void 0:S.meta)==null?void 0:A.breakpoints)}};D.postPreviewContent({value:n,key:n.id}).then(()=>{M.refresh()})}r.useState(()=>0);const[h,v]=r.useState(()=>!1),[b,s]=r.useState(()=>e.contentWrapper||"div");function f(i){return a.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:n=>{var u;const{breakpoints:c,contentId:d}=n;!d||d!==((u=e.builderContextSignal.content)==null?void 0:u.id)||c&&(m({meta:{breakpoints:c}}),x(g+1))},animation:n=>{a.triggerAnimation(n)},contentUpdate:n=>{m(n),x(g+1)}}})(i)}function k(){var n,c;const i=(c=(n=e.builderContextSignal.content)==null?void 0:n.data)==null?void 0:c.jsCode;i&&a.evaluate({code:i,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[y,ne]=r.useState(()=>({})),[j,K]=r.useState(()=>!1);function q(i){var n,c;if(e.builderContextSignal.content){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(c=e.builderContextSignal.content)==null?void 0:c.id;a._track({type:"click",canTrack:a.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...a.getInteractionPropertiesForEvent(i),unique:!j})}j||K(!0)}function _(i){return i.replace(/{{([^}]+)}}/g,(n,c)=>a.evaluate({code:c,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function z({url:i,key:n}){a.fetch(i).then(c=>c.json()).then(c=>{var u,S;const d={...e.builderContextSignal.rootState,[n]:c};(S=(u=e.builderContextSignal).rootSetState)==null||S.call(u,d),y[n]=!0}).catch(c=>{console.error("error fetching dynamic data",i,c)})}function w(){var n,c;const i=((c=(n=e.builderContextSignal.content)==null?void 0:n.data)==null?void 0:c.httpRequests)??{};Object.entries(i).forEach(([d,u])=>{if(u&&(!y[d]||a.isEditing())){const S=_(u);z({url:S,key:d})}})}function E(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:a.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function R(i){x(g+1),window.addEventListener("message",f),a.registerInsertMenu(),a.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(n=>{var d;const c=a.createRegisterComponentMessage(n);(d=window.parent)==null||d.postMessage(c,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function I(i){const n=new URL(location.href).searchParams,c=n.get("builder.preview"),d=n.get(`builder.preview.${c}`),u=n.get("apiKey")||n.get("builder.space");c===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&a.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(S=>{S&&m(S)})}const M=V.useRouter();return r.useEffect(()=>{var i;return(i=l.current)==null||i.addEventListener("initeditingbldr",R),()=>{var n;return(n=l.current)==null?void 0:n.removeEventListener("initeditingbldr",R)}},[]),r.useEffect(()=>{var i;return(i=l.current)==null||i.addEventListener("initpreviewingbldr",I),()=>{var n;return(n=l.current)==null?void 0:n.removeEventListener("initpreviewingbldr",I)}},[]),r.useEffect(()=>{var i,n;if(a.isBrowser()){if(a.isEditing()&&l.current&&l.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&a.getDefaultCanTrack(e.canTrack)){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(n=e.builderContextSignal.content)==null?void 0:n.id,S=e.apiKey;a._track({type:"impression",canTrack:!0,contentId:u,apiKey:S,variationId:d!==u?d:void 0})}a.isPreviewing()&&l.current}},[]),r.useEffect(()=>{e.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),k(),w(),E()},[]),r.useEffect(()=>{},[e.content]),r.useEffect(()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.addEventListener("message",f))},[h]),r.useEffect(()=>{k()},[(T=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:T.jsCode]),r.useEffect(()=>{w()},[(N=(B=e.builderContextSignal.content)==null?void 0:B.data)==null?void 0:N.httpRequests]),r.useEffect(()=>{E()},[e.builderContextSignal.rootState]),r.useEffect(()=>{e.data&&o(e.data)},[e.data]),r.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),r.useEffect(()=>()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:r.createElement(b,{key:g,ref:l,onClick:i=>q(i),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((W=e.content)==null?void 0:W.id)}`},e.children)}):null})}exports.BlockWrapper=U;exports.BlocksWrapper=O;exports.Button=H;exports.CustomCode=X;exports.DynamicRenderer=C;exports.Embed=Y;exports.EnableEditor=te;exports.FragmentComponent=J;exports.Image=G;exports.ImgComponent=Z;exports.InteractiveElement=$;exports.SectionComponent=Q;exports.Video=p;
21
+ }`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const l=r.useRef(null),[g,x]=r.useState(()=>[]),[o,m]=r.useState(()=>[]);return r.useEffect(()=>{var v;if(!((v=l.current)!=null&&v.getElementsByTagName)||typeof window>"u")return;const h=l.current.getElementsByTagName("script");for(let b=0;b<h.length;b++){const s=h[b];if(s.src){if(g.includes(s.src))continue;g.push(s.src);const f=document.createElement("script");f.async=!0,f.src=s.src,document.head.appendChild(f)}else if(!s.type||["text/javascript","application/javascript","application/ecmascript"].includes(s.type)){if(o.includes(s.innerText))continue;try{o.push(s.innerText),new Function(s.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),t.jsx("div",{ref:l,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function Y(e){const l=r.useRef(null),[g,x]=r.useState(()=>[]),[o,m]=r.useState(()=>[]),[h,v]=r.useState(()=>!1);function b(){if(!l.current||!l.current.getElementsByTagName)return;const s=l.current.getElementsByTagName("script");for(let f=0;f<s.length;f++){const k=s[f];if(k.src&&!g.includes(k.src)){g.push(k.src);const y=document.createElement("script");y.async=!0,y.src=k.src,document.head.appendChild(y)}else if(a.isJsScript(k)&&!o.includes(k.innerText))try{o.push(k.innerText),new Function(k.innerText)()}catch(y){console.warn("`Embed`: Error running script:",y)}}}return r.useEffect(()=>{l.current&&!h&&(v(!0),b())},[l.current,h]),t.jsx("div",{className:"builder-embed",ref:l,dangerouslySetInnerHTML:{__html:e.content}})}function Z(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},a.isEditing()&&e.imgSrc||"default-key")}function p(e){var x,o,m,h,v,b,s;function l(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...l()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(x=e.attributes)==null?void 0:x.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((m=(o=e.builderBlock)==null?void 0:o.children)!=null&&m.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(v=(h=e.builderBlock)==null?void 0:h.children)!=null&&v.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(s=(b=e.builderBlock)==null?void 0:b.children)!=null&&s.length&&!e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const ee=r.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function te(e){var P,T,B,N,F,L,W;const l=r.useRef(null),[g,x]=r.useState(()=>0);r.useState(()=>!0);function o(i){var c,d;const n={...e.builderContextSignal.rootState,...i};e.builderContextSignal.rootSetState?(d=(c=e.builderContextSignal).rootSetState)==null||d.call(c,n):e.builderContextSignal.rootState=n}function m(i){var c,d,u,S,A;const n={...e.builderContextSignal.content,...i,data:{...(c=e.builderContextSignal.content)==null?void 0:c.data,...i==null?void 0:i.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...i==null?void 0:i.meta,breakpoints:((u=i==null?void 0:i.meta)==null?void 0:u.breakpoints)||((A=(S=e.builderContextSignal.content)==null?void 0:S.meta)==null?void 0:A.breakpoints)}};D.postPreviewContent({value:n,key:n.id}).then(()=>{M.refresh()})}r.useState(()=>0);const[h,v]=r.useState(()=>!1),[b,s]=r.useState(()=>e.contentWrapper||"div");function f(i){return a.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:n=>{var u;const{breakpoints:c,contentId:d}=n;!d||d!==((u=e.builderContextSignal.content)==null?void 0:u.id)||c&&(m({meta:{breakpoints:c}}),x(g+1))},animation:n=>{a.triggerAnimation(n)},contentUpdate:n=>{m(n),x(g+1)}}})(i)}function k(){var n,c;const i=(c=(n=e.builderContextSignal.content)==null?void 0:n.data)==null?void 0:c.jsCode;i&&a.evaluate({code:i,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[y,ne]=r.useState(()=>({})),[j,K]=r.useState(()=>!1);function q(i){var n,c;if(e.builderContextSignal.content){const d=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(c=e.builderContextSignal.content)==null?void 0:c.id;a._track({type:"click",canTrack:a.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:d!==u?d:void 0,...a.getInteractionPropertiesForEvent(i),unique:!j})}j||K(!0)}function _(i){return i.replace(/{{([^}]+)}}/g,(n,c)=>a.evaluate({code:c,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function z({url:i,key:n}){a.fetch(i).then(c=>c.json()).then(c=>{var u,S;const d={...e.builderContextSignal.rootState,[n]:c};(S=(u=e.builderContextSignal).rootSetState)==null||S.call(u,d),y[n]=!0}).catch(c=>{console.error("error fetching dynamic data",i,c)})}function w(){var n,c;const i=((c=(n=e.builderContextSignal.content)==null?void 0:n.data)==null?void 0:c.httpRequests)??{};Object.entries(i).forEach(([d,u])=>{if(u&&(!y[d]||a.isEditing())){const S=_(u);z({url:S,key:d})}})}function E(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:a.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function R(i){x(g+1),window.addEventListener("message",f),a.registerInsertMenu(),a.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(n=>{var d;const c=a.createRegisterComponentMessage(n);(d=window.parent)==null||d.postMessage(c,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",E)}function I(i){const n=new URL(location.href).searchParams,c=n.get("builder.preview"),d=n.get(`builder.preview.${c}`),u=n.get("apiKey")||n.get("builder.space");c===e.model&&u===e.apiKey&&(!e.content||d===e.content.id)&&a.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(S=>{S&&m(S)})}const M=V.useRouter();return r.useEffect(()=>{var i;return(i=l.current)==null||i.addEventListener("initeditingbldr",R),()=>{var n;return(n=l.current)==null?void 0:n.removeEventListener("initeditingbldr",R)}},[]),r.useEffect(()=>{var i;return(i=l.current)==null||i.addEventListener("initpreviewingbldr",I),()=>{var n;return(n=l.current)==null?void 0:n.removeEventListener("initpreviewingbldr",I)}},[]),r.useEffect(()=>{var i,n;if(a.isBrowser()){if(a.isEditing()&&l.current&&l.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&a.getDefaultCanTrack(e.canTrack)){const d=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(n=e.builderContextSignal.content)==null?void 0:n.id,S=e.apiKey;a._track({type:"impression",canTrack:!0,contentId:u,apiKey:S,variationId:d!==u?d:void 0})}a.isPreviewing()&&l.current}},[]),r.useEffect(()=>{e.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),k(),w(),E()},[]),r.useEffect(()=>{},[e.content]),r.useEffect(()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.addEventListener("message",f))},[h]),r.useEffect(()=>{k()},[(T=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:T.jsCode]),r.useEffect(()=>{w()},[(N=(B=e.builderContextSignal.content)==null?void 0:B.data)==null?void 0:N.httpRequests]),r.useEffect(()=>{E()},[e.builderContextSignal.rootState]),r.useEffect(()=>{e.data&&o(e.data)},[e.data]),r.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),r.useEffect(()=>()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",E))},[]),t.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:r.createElement(b,{key:g,ref:l,onClick:i=>q(i),"builder-content-id":(F=e.builderContextSignal.content)==null?void 0:F.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((W=e.content)==null?void 0:W.id)}`},e.children)}):null})}exports.BlockWrapper=U;exports.BlocksWrapper=O;exports.Button=H;exports.CustomCode=X;exports.DynamicRenderer=C;exports.Embed=Y;exports.EnableEditor=te;exports.FragmentComponent=J;exports.Image=G;exports.ImgComponent=Z;exports.InteractiveElement=$;exports.SectionComponent=Q;exports.Video=p;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as i, Fragment as h, jsxs as E } from "react/jsx-runtime";
3
- import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-2d5f1c0c.js";
3
+ import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-30e52741.js";
4
4
  import { useRef as T, useState as x, useEffect as b, createContext as me, createElement as ge } from "react";
5
- import { p as he } from "./USE_SERVER_BUNDLE-7a98295a.js";
5
+ import { p as he } from "./USE_SERVER_BUNDLE-4db772c9.js";
6
6
  import { useRouter as be } from "next/navigation";
7
7
  function J(e) {
8
8
  return /* @__PURE__ */ i(h, { children: p(e.TagName) ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ i(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
@@ -578,9 +578,6 @@ function Ke(e) {
578
578
  ...e.locale ? {
579
579
  locale: e.locale
580
580
  } : {},
581
- ...e.includeRefs ? {
582
- includeRefs: e.includeRefs
583
- } : {},
584
581
  ...e.enrich ? {
585
582
  enrich: e.enrich
586
583
  } : {},
@@ -1 +1 @@
1
- "use server";"use strict";const n=require("./bundle-9b818d40.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
1
+ "use server";"use strict";const n=require("./bundle-972c668c.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
@@ -1,5 +1,5 @@
1
1
  "use server";
2
- import { v as s } from "./bundle-2d5f1c0c.js";
2
+ import { v as s } from "./bundle-30e52741.js";
3
3
  async function n({
4
4
  key: t,
5
5
  value: r