@builder.io/sdk-react-nextjs 0.12.6 → 0.12.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/lib/browser/{USE_CLIENT_BUNDLE-4d4e23b4.js → USE_CLIENT_BUNDLE-164b0828.js} +193 -195
  2. package/lib/browser/USE_CLIENT_BUNDLE-a350a268.cjs +21 -0
  3. package/lib/{edge/USE_SERVER_BUNDLE-fda604b6.js → browser/USE_SERVER_BUNDLE-5219d3fc.js} +1 -1
  4. package/lib/{edge/USE_SERVER_BUNDLE-19879780.cjs → browser/USE_SERVER_BUNDLE-b1e8364e.cjs} +1 -1
  5. package/lib/browser/{bundle-6e21e129.cjs → bundle-f375f07b.cjs} +21 -21
  6. package/lib/browser/{bundle-b3104268.js → bundle-f83a1ca5.js} +537 -447
  7. package/lib/browser/index.cjs +1 -1
  8. package/lib/browser/index.mjs +23 -22
  9. package/lib/{node/USE_CLIENT_BUNDLE-aa8ab44a.js → edge/USE_CLIENT_BUNDLE-b8d07605.js} +193 -195
  10. package/lib/edge/USE_CLIENT_BUNDLE-f1ccd54b.cjs +21 -0
  11. package/lib/{node/USE_SERVER_BUNDLE-cbcb1baf.cjs → edge/USE_SERVER_BUNDLE-2e4c0a0a.cjs} +1 -1
  12. package/lib/{node/USE_SERVER_BUNDLE-2fdc522e.js → edge/USE_SERVER_BUNDLE-cd7a6238.js} +1 -1
  13. package/lib/edge/{bundle-ee1ebe27.js → bundle-3da03df6.js} +574 -484
  14. package/lib/edge/{bundle-f2d4a6db.cjs → bundle-5b207761.cjs} +29 -29
  15. package/lib/edge/index.cjs +1 -1
  16. package/lib/edge/index.mjs +23 -22
  17. package/lib/{edge/USE_CLIENT_BUNDLE-41ee32e4.js → node/USE_CLIENT_BUNDLE-e0108fb4.js} +193 -195
  18. package/lib/node/USE_CLIENT_BUNDLE-e31c74cc.cjs +21 -0
  19. package/lib/{browser/USE_SERVER_BUNDLE-ccca985e.cjs → node/USE_SERVER_BUNDLE-29398256.cjs} +1 -1
  20. package/lib/{browser/USE_SERVER_BUNDLE-2bf0dc28.js → node/USE_SERVER_BUNDLE-3e951ab1.js} +1 -1
  21. package/lib/node/{bundle-99e5b33f.js → bundle-6c5cef2d.js} +268 -178
  22. package/lib/node/{bundle-c799b7fc.cjs → bundle-83186530.cjs} +9 -9
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +23 -22
  25. package/package.json +1 -1
  26. package/types/cjs/components/block/animator.d.ts +5 -0
  27. package/types/cjs/components/content-variants/helpers.d.ts +1 -1
  28. package/types/cjs/constants/sdk-version.d.ts +1 -1
  29. package/types/cjs/helpers/preview-lru-cache/get.d.ts +1 -1
  30. package/types/cjs/helpers/subscribe-to-editor.d.ts +35 -0
  31. package/types/cjs/server-index.d.ts +18 -3
  32. package/types/cjs/types/builder-block.d.ts +18 -1
  33. package/types/esm/components/block/animator.d.ts +5 -0
  34. package/types/esm/components/content-variants/helpers.d.ts +1 -1
  35. package/types/esm/constants/sdk-version.d.ts +1 -1
  36. package/types/esm/helpers/preview-lru-cache/get.d.ts +1 -1
  37. package/types/esm/helpers/subscribe-to-editor.d.ts +35 -0
  38. package/types/esm/server-index.d.ts +18 -3
  39. package/types/esm/types/builder-block.d.ts +18 -1
  40. package/lib/browser/USE_CLIENT_BUNDLE-e5d64246.cjs +0 -21
  41. package/lib/edge/USE_CLIENT_BUNDLE-cc55e91d.cjs +0 -21
  42. package/lib/node/USE_CLIENT_BUNDLE-343cb348.cjs +0 -21
@@ -1,4 +1,4 @@
1
- "use strict";const lruCache=require("lru-cache"),jsxRuntime=require("react/jsx-runtime"),USE_CLIENT_BUNDLE=require("./USE_CLIENT_BUNDLE-343cb348.cjs");require("react");require("next/navigation");const EMPTY_HTML_ELEMENTS=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),isEmptyElement=e=>typeof e=="string"&&EMPTY_HTML_ELEMENTS.has(e.toLowerCase()),TARGET="rsc",getClassPropName=()=>{switch(TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function getBlockComponentOptions(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const MSG_PREFIX="[Builder.io]: ",logger={log:(...e)=>console.log(MSG_PREFIX,...e),error:(...e)=>console.error(MSG_PREFIX,...e),warn:(...e)=>console.warn(MSG_PREFIX,...e),debug:(...e)=>console.debug(MSG_PREFIX,...e)};function isBrowser(){return typeof window<"u"&&typeof document<"u"}function isIframe(){return isBrowser()&&window.self!==window.top}function isEditing(){return isIframe()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const getLocation=()=>{if(isBrowser()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},getUserAgent=()=>typeof navigator=="object"&&navigator.userAgent||"",getUserAttributes=()=>{const e=getUserAgent(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||TARGET==="reactNative"}},n=e.match(/Tablet|iPad/i),o=getLocation();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},getFunctionArguments=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),getBuilderGlobals=()=>({isEditing:isEditing(),isBrowser:isBrowser(),isServer:!isBrowser(),getUserAttributes:()=>getUserAttributes()}),parseCode=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,runInBrowser=({code:e,builder:t,context:n,event:o,localState:i,rootSetState:r,rootState:a})=>{const s=getFunctionArguments({builder:t,context:n,event:o,state:flattenState({rootState:a,localState:i,rootSetState:r})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))};function flattenState({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(o,i)=>{if(t&&i in t)return t[i];const r=o[i];return typeof r=="object"?flattenState({rootState:r,localState:void 0,rootSetState:n?a=>{o[i]=a,n(o)}:void 0}):r},set:(o,i,r)=>{if(t&&i in t)throw new Error("Writing to local state is not allowed as it is read-only.");return o[i]=r,n==null||n(o),!0}})}const fastClone=e=>JSON.parse(JSON.stringify(e)),set=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((i,r,a)=>Object(i[r])===i[r]?i[r]:i[r]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const ivm=safeDynamicRequire("isolated-vm"),getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
1
+ "use strict";const lruCache=require("lru-cache"),jsxRuntime=require("react/jsx-runtime"),USE_CLIENT_BUNDLE=require("./USE_CLIENT_BUNDLE-e31c74cc.cjs");require("react");require("next/navigation");const EMPTY_HTML_ELEMENTS=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),isEmptyElement=e=>typeof e=="string"&&EMPTY_HTML_ELEMENTS.has(e.toLowerCase()),TARGET="rsc",getClassPropName=()=>{switch(TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function getBlockComponentOptions(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const MSG_PREFIX="[Builder.io]: ",logger={log:(...e)=>console.log(MSG_PREFIX,...e),error:(...e)=>console.error(MSG_PREFIX,...e),warn:(...e)=>console.warn(MSG_PREFIX,...e),debug:(...e)=>console.debug(MSG_PREFIX,...e)};function isBrowser(){return typeof window<"u"&&typeof document<"u"}function isIframe(){return isBrowser()&&window.self!==window.top}function isEditing(){return isIframe()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const getLocation=()=>{if(isBrowser()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},getUserAgent=()=>typeof navigator=="object"&&navigator.userAgent||"",getUserAttributes=()=>{const e=getUserAgent(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||TARGET==="reactNative"}},n=e.match(/Tablet|iPad/i),o=getLocation();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},getFunctionArguments=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),getBuilderGlobals=()=>({isEditing:isEditing(),isBrowser:isBrowser(),isServer:!isBrowser(),getUserAttributes:()=>getUserAttributes()}),parseCode=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,runInBrowser=({code:e,builder:t,context:n,event:o,localState:r,rootSetState:i,rootState:a})=>{const s=getFunctionArguments({builder:t,context:n,event:o,state:flattenState({rootState:a,localState:r,rootSetState:i})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))};function flattenState({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(o,r)=>{if(t&&r in t)return t[r];const i=o[r];return typeof i=="object"?flattenState({rootState:i,localState:void 0,rootSetState:n?a=>{o[r]=a,n(o)}:void 0}):i},set:(o,r,i)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return o[r]=i,n==null||n(o),!0}})}const fastClone=e=>JSON.parse(JSON.stringify(e)),set=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((r,i,a)=>Object(r[i])===r[i]?r[i]:r[i]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const ivm=safeDynamicRequire("isolated-vm"),getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
2
2
  var refToProxy = (obj) => {
3
3
  if (typeof obj !== 'object' || obj === null) {
4
4
  return obj;
@@ -38,14 +38,14 @@ if (typeof output === 'object' && output !== null) {
38
38
  }
39
39
 
40
40
  output;
41
- `},getIsolateContext=()=>new ivm.Isolate({memoryLimit:128}).createContextSync(),runInNode=({code:e,builder:t,context:n,event:o,localState:i,rootSetState:r,rootState:a})=>{const s=fastClone({...a,...i}),c=getFunctionArguments({builder:t,context:n,event:o,state:s}),m=getIsolateContext(),f=m.global;f.setSync("global",f.derefInto()),f.setSync("log",function(...u){console.log(...u)}),f.setSync(BUILDER_SET_STATE_NAME,function(u,l){set(a,u,l),r==null||r(a)}),c.forEach(([u,l])=>{const d=typeof l=="object"?new ivm.Reference(u==="builder"?{...l,getUserAttributes:()=>l.getUserAttributes()}:l):null;f.setSync(getSyncValName(u),d)}),f.setSync(INJECTED_IVM_GLOBAL,ivm);const p=processCode({code:e,args:c}),g=m.evalSync(p);try{return JSON.parse(g)}catch{return g}},checkIsDefined=e=>e!=null;function isNodeRuntime(){var e;return typeof process<"u"&&checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const shouldForceBrowserRuntimeInNode=()=>{var o;if(!isNodeRuntime())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(o=process.env.NODE_OPTIONS)==null?void 0:o.includes("--no-node-snapshot");return e&&t&&!n?(logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},chooseBrowserOrServerEval=e=>isBrowser()||shouldForceBrowserRuntimeInNode()?runInBrowser(e):runInNode(e);function evaluate({code:e,context:t,localState:n,rootState:o,rootSetState:i,event:r,isExpression:a=!0}){if(e===""){logger.warn("Skipping evaluation of empty code block.");return}const s={code:parseCode(e,{isExpression:a}),builder:getBuilderGlobals(),context:t,event:r,rootSetState:i,rootState:o,localState:n};try{return chooseBrowserOrServerEval(s)}catch(c){logger.error("Failed code evaluation: "+c.message,{code:e});return}}function transformBlock(e){return e}const evaluateBindings=({block:e,context:t,localState:n,rootState:o,rootSetState:i})=>{if(!e.bindings)return e;const r=fastClone(e),a={...r,properties:{...r.properties},actions:{...r.actions}};for(const s in e.bindings){const c=e.bindings[s],m=evaluate({code:c,localState:n,rootState:o,rootSetState:i,context:t});set(a,s,m)}return a};function getProcessedBlock({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:i,rootSetState:r}){const a=e;return n?evaluateBindings({block:a,localState:o,rootState:i,rootSetState:r,context:t}):a}const getComponent=({block:e,context:t,registeredComponents:n})=>{var r;const o=(r=getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!o)return null;const i=n[o];if(i)return i;console.warn(`
41
+ `},getIsolateContext=()=>new ivm.Isolate({memoryLimit:128}).createContextSync(),runInNode=({code:e,builder:t,context:n,event:o,localState:r,rootSetState:i,rootState:a})=>{const s=fastClone({...a,...r}),c=getFunctionArguments({builder:t,context:n,event:o,state:s}),m=getIsolateContext(),f=m.global;f.setSync("global",f.derefInto()),f.setSync("log",function(...u){console.log(...u)}),f.setSync(BUILDER_SET_STATE_NAME,function(u,l){set(a,u,l),i==null||i(a)}),c.forEach(([u,l])=>{const d=typeof l=="object"?new ivm.Reference(u==="builder"?{...l,getUserAttributes:()=>l.getUserAttributes()}:l):null;f.setSync(getSyncValName(u),d)}),f.setSync(INJECTED_IVM_GLOBAL,ivm);const p=processCode({code:e,args:c}),g=m.evalSync(p);try{return JSON.parse(g)}catch{return g}},checkIsDefined=e=>e!=null;function isNodeRuntime(){var e;return typeof process<"u"&&checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const shouldForceBrowserRuntimeInNode=()=>{var o;if(!isNodeRuntime())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(o=process.env.NODE_OPTIONS)==null?void 0:o.includes("--no-node-snapshot");return e&&t&&!n?(logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},chooseBrowserOrServerEval=e=>isBrowser()||shouldForceBrowserRuntimeInNode()?runInBrowser(e):runInNode(e);function evaluate({code:e,context:t,localState:n,rootState:o,rootSetState:r,event:i,isExpression:a=!0}){if(e===""){logger.warn("Skipping evaluation of empty code block.");return}const s={code:parseCode(e,{isExpression:a}),builder:getBuilderGlobals(),context:t,event:i,rootSetState:r,rootState:o,localState:n};try{return chooseBrowserOrServerEval(s)}catch(c){logger.error("Failed code evaluation: "+c.message,{code:e});return}}function transformBlock(e){return e}const evaluateBindings=({block:e,context:t,localState:n,rootState:o,rootSetState:r})=>{if(!e.bindings)return e;const i=fastClone(e),a={...i,properties:{...i.properties},actions:{...i.actions}};for(const s in e.bindings){const c=e.bindings[s],m=evaluate({code:c,localState:n,rootState:o,rootSetState:r,context:t});set(a,s,m)}return a};function getProcessedBlock({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:r,rootSetState:i}){const a=e;return n?evaluateBindings({block:a,localState:o,rootState:r,rootSetState:i,context:t}):a}const getComponent=({block:e,context:t,registeredComponents:n})=>{var i;const o=(i=getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:i.name;if(!o)return null;const r=n[o];if(r)return r;console.warn(`
42
42
  Could not find a registered component named "${o}".
43
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},getRepeatItemData=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const i=evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(i))return;const r=n.collection.split(".").pop(),a=n.itemName||(r?r+"Item":"item");return i.map((c,m)=>({context:{...t,localState:{...t.localState,$index:m,$item:c,[a]:c,[`$${a}Index`]:m}},block:o}))},SIZES={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},getMaxWidthQueryForSize=(e,t=SIZES)=>`@media (max-width: ${t[e].max}px)`,getSizesForBreakpoints=({small:e,medium:t})=>{const n=fastClone(SIZES);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const i=n.small.max+1;n.medium={max:t,min:i,default:i+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},camelToKebabCase=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),convertStyleMapToCSSArray=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${camelToKebabCase(n)}: ${o};`}).filter(checkIsDefined),convertStyleMapToCSS=e=>convertStyleMapToCSSArray(e).join(`
43
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},getRepeatItemData=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const r=evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(r))return;const i=n.collection.split(".").pop(),a=n.itemName||(i?i+"Item":"item");return r.map((c,m)=>({context:{...t,localState:{...t.localState,$index:m,$item:c,[a]:c,[`$${a}Index`]:m}},block:o}))},SIZES={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},getMaxWidthQueryForSize=(e,t=SIZES)=>`@media (max-width: ${t[e].max}px)`,getSizesForBreakpoints=({small:e,medium:t})=>{const n=fastClone(SIZES);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const i=n.medium.max+1;return n.large={max:2e3,min:i,default:i+1},n},camelToKebabCase=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),convertStyleMapToCSSArray=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${camelToKebabCase(n)}: ${o};`}).filter(checkIsDefined),convertStyleMapToCSS=e=>convertStyleMapToCSSArray(e).join(`
44
44
  `),createCssClass=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
45
45
  ${convertStyleMapToCSS(n)}
46
46
  }`;return e?`${e} {
47
47
  ${o}
48
- }`:o};function InlinedStyles(e){return jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function BlockStyles(e){const t=function(){const i=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return checkIsDefined(i.hide)?!i.hide:checkIsDefined(i.show)?i.show:!0},n=function(){var d;const i=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),r=i.responsiveStyles,a=e.context.content,s=getSizesForBreakpoints(((d=a==null?void 0:a.meta)==null?void 0:d.breakpoints)||{}),c=r==null?void 0:r.large,m=r==null?void 0:r.medium,f=r==null?void 0:r.small,p=i.id;if(!p)return"";const g=c?createCssClass({className:p,styles:c}):"",u=m?createCssClass({className:p,styles:m,mediaQuery:getMaxWidthQueryForSize("medium",s)}):"",l=f?createCssClass({className:p,styles:f,mediaQuery:getMaxWidthQueryForSize("small",s)}):"";return[g,u,l].join(" ")};return jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()&&t()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:n()})}):null})}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}const getEventHandlerName=e=>`on${capitalizeFirstLetter(e)}`,createEventHandler=(e,t)=>n=>evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function getBlockActions(e){const t={},n=e.block.actions??{};for(const o in n){if(!n.hasOwnProperty(o))continue;const i=n[o];let r=getEventHandlerName(o);if(e.stripPrefix)switch(TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=createEventHandler(i,e)}return t}function transformStyleProperty({style:e}){return e}const getStyle=({block:e,context:t})=>mapStyleObjToStrIfNeeded(transformStyleProperty({style:e.style||{},context:t,block:e}));function mapStyleObjToStrIfNeeded(e){switch(TARGET){case"svelte":case"vue":case"solid":return convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function transformBlockProperties({properties:e}){return e}const extractRelevantRootBlockProperties=e=>({href:e.href});function getBlockProperties({block:e,context:t}){var o;const n={...extractRelevantRootBlockProperties(e),...e.properties,"builder-id":e.id,style:getStyle({block:e,context:t}),[getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return transformBlockProperties({properties:n,context:t,block:e})}const getWrapperProps=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:i,isInteractive:r,contextValue:a})=>{const s={...e,...i?{attributes:getBlockProperties({block:t,context:a})}:{}};return r?{Wrapper:o,block:t,context:n,wrapperProps:e,includeBlockProps:i}:s};function ComponentRef(e){var n;const t=e.isInteractive?USE_CLIENT_BUNDLE.InteractiveElement:e.componentRef;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.componentRef?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(t,{...getWrapperProps({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:(n=e.blockChildren)==null?void 0:n.map(o=>jsxRuntime.jsx(Block,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function RepeatedBlock(e){const t=e.repeatContext;return jsxRuntime.jsx(Block,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})}function Block(e){var m,f,p;const t=function(){return getComponent({block:e.block,context:e.context,registeredComponents:e.registeredComponents})},n=function(){return getRepeatItemData({block:e.block,context:e.context})},o=function(){var u;return(u=e.block.repeat)!=null&&u.collection?e.block:getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})},i=function(){var l;return e.block.tagName==="a"||((l=o().properties)==null?void 0:l.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"},r=function(){var d,b;if((d=e.block.repeat)!=null&&d.collection)return!!((b=n())!=null&&b.length);const u="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!u},a=function(){var l;return!((l=t())!=null&&l.component)&&!n()?o().children??[]:[]},s=function(){var u,l,d,b,S,h,C,x;return{blockChildren:o().children??[],componentRef:(u=t())==null?void 0:u.component,componentOptions:{...getBlockComponentOptions(o()),builderContext:e.context,...((l=t())==null?void 0:l.name)==="Core:Button"||((d=t())==null?void 0:d.name)==="Symbol"||((b=t())==null?void 0:b.name)==="Columns"?{builderLinkComponent:e.linkComponent}:{},...((S=t())==null?void 0:S.name)==="Symbol"||((h=t())==null?void 0:h.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((C=t())==null?void 0:C.noWrap)===!0,isInteractive:!((x=t())!=null&&x.isRSC)}},c=e.context;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:r()?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(BlockStyles,{block:e.block,context:e.context}),(m=t())!=null&&m.noWrap?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ComponentRef,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive})}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(p=n())==null?void 0:p.map((g,u)=>jsxRuntime.jsx(RepeatedBlock,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},u))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(USE_CLIENT_BUNDLE.BlockWrapper,{Wrapper:i(),block:o(),context:e.context,linkComponent:e.linkComponent,children:[jsxRuntime.jsx(ComponentRef,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive}),(f=a())==null?void 0:f.map(g=>jsxRuntime.jsx(Block,{block:g,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},g.id))]})})})]}):null})}function Blocks(e){var t,n,o;return jsxRuntime.jsx(USE_CLIENT_BUNDLE.BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(t=e.context)==null?void 0:t.BlocksWrapper,BlocksWrapperProps:(n=e.context)==null?void 0:n.BlocksWrapperProps,children:e.blocks?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(o=e.blocks)==null?void 0:o.map(i=>jsxRuntime.jsx(Block,{block:i,linkComponent:e.linkComponent,context:e.context,registeredComponents:e.registeredComponents},i.id))}):null})}function Columns(e){var u;const t=typeof e.space=="number"?e.space||0:20,n=e.columns||[],o=e.stackColumnsAt||"tablet",i=function(d){var b;return((b=n[d])==null?void 0:b.width)||100/n.length},r=function(d){const b=t*(n.length-1)/n.length;return`calc(${i(d)}% - ${b}px)`},a=function({stackedStyle:d,desktopStyle:b}){return o==="tablet"?d:b},s=function({stackedStyle:d,desktopStyle:b}){return o==="never"?b:d},c=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",m=function(){return{"--flex-dir":c,"--flex-dir-tablet":a({stackedStyle:c,desktopStyle:"row"})}},f=function(d){const b=d===0?0:t,S=r(d),h=`${b}px`,C="100%",x=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:S,["marginLeft"]:h,"--column-width-mobile":s({stackedStyle:C,desktopStyle:S}),"--column-margin-left-mobile":s({stackedStyle:x,desktopStyle:h}),"--column-width-tablet":a({stackedStyle:C,desktopStyle:S}),"--column-margin-left-tablet":a({stackedStyle:x,desktopStyle:h})}},p=function(d){var S,h;return getSizesForBreakpoints(((h=(S=e.builderContext.content)==null?void 0:S.meta)==null?void 0:h.breakpoints)||{})[d].max},g=function(){return`
48
+ }`:o};function InlinedStyles(e){return jsxRuntime.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function BlockStyles(e){const t=function(){const r=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return checkIsDefined(r.hide)?!r.hide:checkIsDefined(r.show)?r.show:!0},n=function(){var d;const r=getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),i=r.responsiveStyles,a=e.context.content,s=getSizesForBreakpoints(((d=a==null?void 0:a.meta)==null?void 0:d.breakpoints)||{}),c=i==null?void 0:i.large,m=i==null?void 0:i.medium,f=i==null?void 0:i.small,p=r.id;if(!p)return"";const g=c?createCssClass({className:p,styles:c}):"",u=m?createCssClass({className:p,styles:m,mediaQuery:getMaxWidthQueryForSize("medium",s)}):"",l=f?createCssClass({className:p,styles:f,mediaQuery:getMaxWidthQueryForSize("small",s)}):"";return[g,u,l].join(" ")};return jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()&&t()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:n()})}):null})}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}const getEventHandlerName=e=>`on${capitalizeFirstLetter(e)}`,createEventHandler=(e,t)=>n=>evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function getBlockActions(e){const t={},n=e.block.actions??{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let i=getEventHandlerName(o);if(e.stripPrefix)switch(TARGET){case"vue":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=createEventHandler(r,e)}return t}function transformStyleProperty({style:e}){return e}const getStyle=({block:e,context:t})=>mapStyleObjToStrIfNeeded(transformStyleProperty({style:e.style||{},context:t,block:e}));function mapStyleObjToStrIfNeeded(e){switch(TARGET){case"svelte":case"vue":case"solid":return convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}function transformBlockProperties({properties:e}){return e}const extractRelevantRootBlockProperties=e=>({href:e.href});function getBlockProperties({block:e,context:t}){var o;const n={...extractRelevantRootBlockProperties(e),...e.properties,"builder-id":e.id,style:getStyle({block:e,context:t}),[getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return transformBlockProperties({properties:n,context:t,block:e})}const getWrapperProps=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:r,isInteractive:i,contextValue:a})=>{const s={...e,...r?{attributes:getBlockProperties({block:t,context:a})}:{}};return i?{Wrapper:o,block:t,context:n,wrapperProps:e,includeBlockProps:r}:s};function ComponentRef(e){var n;const t=e.isInteractive?USE_CLIENT_BUNDLE.InteractiveElement:e.componentRef;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:e.componentRef?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(t,{...getWrapperProps({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:(n=e.blockChildren)==null?void 0:n.map(o=>jsxRuntime.jsx(Block,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function RepeatedBlock(e){const t=e.repeatContext;return jsxRuntime.jsx(Block,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})}function Block(e){var m,f,p;const t=function(){return getComponent({block:e.block,context:e.context,registeredComponents:e.registeredComponents})},n=function(){return getRepeatItemData({block:e.block,context:e.context})},o=function(){var u;return(u=e.block.repeat)!=null&&u.collection?e.block:getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})},r=function(){var l;return e.block.tagName==="a"||((l=o().properties)==null?void 0:l.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"},i=function(){var d,b;if((d=e.block.repeat)!=null&&d.collection)return!!((b=n())!=null&&b.length);const u="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!u},a=function(){var l;return!((l=t())!=null&&l.component)&&!n()?o().children??[]:[]},s=function(){var u,l,d,b,y,h,C,x;return{blockChildren:o().children??[],componentRef:(u=t())==null?void 0:u.component,componentOptions:{...getBlockComponentOptions(o()),builderContext:e.context,...((l=t())==null?void 0:l.name)==="Core:Button"||((d=t())==null?void 0:d.name)==="Symbol"||((b=t())==null?void 0:b.name)==="Columns"?{builderLinkComponent:e.linkComponent}:{},...((y=t())==null?void 0:y.name)==="Symbol"||((h=t())==null?void 0:h.name)==="Columns"?{builderComponents:e.registeredComponents}:{}},context:c,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((C=t())==null?void 0:C.noWrap)===!0,isInteractive:!((x=t())!=null&&x.isRSC)}},c=e.context;return jsxRuntime.jsx(jsxRuntime.Fragment,{children:i()?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(BlockStyles,{block:e.block,context:e.context}),(m=t())!=null&&m.noWrap?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ComponentRef,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive})}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:n()?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(p=n())==null?void 0:p.map((g,u)=>jsxRuntime.jsx(RepeatedBlock,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},u))}):jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(USE_CLIENT_BUNDLE.BlockWrapper,{Wrapper:r(),block:o(),context:e.context,linkComponent:e.linkComponent,children:[jsxRuntime.jsx(ComponentRef,{componentRef:s().componentRef,componentOptions:s().componentOptions,blockChildren:s().blockChildren,context:s().context,registeredComponents:s().registeredComponents,linkComponent:s().linkComponent,builderBlock:s().builderBlock,includeBlockProps:s().includeBlockProps,isInteractive:s().isInteractive}),(f=a())==null?void 0:f.map(g=>jsxRuntime.jsx(Block,{block:g,context:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},g.id))]})})})]}):null})}function Blocks(e){var t,n,o;return jsxRuntime.jsx(USE_CLIENT_BUNDLE.BlocksWrapper,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:(t=e.context)==null?void 0:t.BlocksWrapper,BlocksWrapperProps:(n=e.context)==null?void 0:n.BlocksWrapperProps,children:e.blocks?jsxRuntime.jsx(jsxRuntime.Fragment,{children:(o=e.blocks)==null?void 0:o.map(r=>jsxRuntime.jsx(Block,{block:r,linkComponent:e.linkComponent,context:e.context,registeredComponents:e.registeredComponents},r.id))}):null})}function Columns(e){var u;const t=typeof e.space=="number"?e.space||0:20,n=e.columns||[],o=e.stackColumnsAt||"tablet",r=function(d){var b;return((b=n[d])==null?void 0:b.width)||100/n.length},i=function(d){const b=t*(n.length-1)/n.length;return`calc(${r(d)}% - ${b}px)`},a=function({stackedStyle:d,desktopStyle:b}){return o==="tablet"?d:b},s=function({stackedStyle:d,desktopStyle:b}){return o==="never"?b:d},c=e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column",m=function(){return{"--flex-dir":c,"--flex-dir-tablet":a({stackedStyle:c,desktopStyle:"row"})}},f=function(d){const b=d===0?0:t,y=i(d),h=`${b}px`,C="100%",x=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:y,["marginLeft"]:h,"--column-width-mobile":s({stackedStyle:C,desktopStyle:y}),"--column-margin-left-mobile":s({stackedStyle:x,desktopStyle:h}),"--column-width-tablet":a({stackedStyle:C,desktopStyle:y}),"--column-margin-left-tablet":a({stackedStyle:x,desktopStyle:h})}},p=function(d){var y,h;return getSizesForBreakpoints(((h=(y=e.builderContext.content)==null?void 0:y.meta)==null?void 0:h.breakpoints)||{})[d].max},g=function(){return`
49
49
  @media (max-width: ${p("medium")}px) {
50
50
  .${e.builderBlock.id}-breakpoints {
51
51
  flex-direction: var(--flex-dir-tablet);
@@ -72,7 +72,7 @@ output;
72
72
  `};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-3d816b82`,style:m(),children:[jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:g()})}),(u=e.columns)==null?void 0:u.map((l,d)=>jsxRuntime.jsx(USE_CLIENT_BUNDLE.DynamicRenderer,{TagName:l.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...l.link?{href:l.link}:{},[getClassPropName()]:"builder-column",style:mapStyleObjToStrIfNeeded(f(d))},children:jsxRuntime.jsx(Blocks,{path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:l.blocks})},d))]}),jsxRuntime.jsx("style",{children:`.div-3d816b82 {
73
73
  display: flex;
74
74
  line-height: normal;
75
- }`})]})}function removeProtocol(e){return e.replace(/http(s)?:/,"")}function updateQueryParam(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+i+t+"="+encodeURIComponent(n)}function getShopifyImageUrl(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return removeProtocol(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),i=n[3],r=t.match("x")?t:`${t}x`;return removeProtocol(`${o[0]}_${r}${i}`)}return null}function getSrcSet(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(i=>i!==o).map(i=>`${updateQueryParam(e,"width",i)} ${i}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[getShopifyImageUrl(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const getTopLevelDomain=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},getCookieSync=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){logger.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},getCookie=async e=>getCookieSync(e),stringifyCookie=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(checkIsDefined).join("; "),SECURE_CONFIG=[["secure",""],["SameSite","None"]],createCookieString=({name:e,value:t,expires:n})=>{const i=(isBrowser()?location.protocol==="https:":!0)?SECURE_CONFIG:[[]],r=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...r,["path","/"],["domain",getTopLevelDomain(window.location.hostname)],...i];return stringifyCookie(a)},setCookie=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const i=createCookieString({name:e,value:t,expires:n});document.cookie=i}catch(i){logger.warn("[COOKIE] SET error: ",(i==null?void 0:i.message)||i)}},BUILDER_STORE_PREFIX="builder.tests",getContentTestKey=e=>`${BUILDER_STORE_PREFIX}.${e}`,getContentVariationCookie=({contentId:e})=>getCookie({name:getContentTestKey(e),canTrack:!0}),getContentVariationCookieSync=({contentId:e})=>getCookieSync({name:getContentTestKey(e),canTrack:!0}),setContentVariationCookie=({contentId:e,value:t})=>setCookie({name:getContentTestKey(e),value:t,canTrack:!0}),checkIsBuilderContentWithVariations=e=>checkIsDefined(e.id)&&checkIsDefined(e.variations)&&Object.keys(e.variations).length>0,getRandomVariationId=({id:e,variations:t})=>{var i;let n=0;const o=Math.random();for(const r in t){const a=(i=t[r])==null?void 0:i.testRatio;if(n+=a,o<n)return r}return e},getAndSetVariantId=e=>{const t=getRandomVariationId(e);return setContentVariationCookie({contentId:e.id,value:t}).catch(n=>{logger.error("could not store A/B test variation: ",n)}),t},getTestFields=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},handleABTestingSync=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!checkIsBuilderContentWithVariations(e))return e;const n=getContentVariationCookieSync({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),o=getTestFields({item:e,testGroupId:n});return{...e,...o}},handleABTesting=async({item:e,canTrack:t})=>{if(!t||!checkIsBuilderContentWithVariations(e))return e;const o=await getContentVariationCookie({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),i=getTestFields({item:e,testGroupId:o});return{...e,...i}},getDefaultCanTrack=e=>checkIsDefined(e)?e:!0,componentInfo$b={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},componentInfo$a={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(i=>i.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((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}]},componentInfo$9={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}]},componentInfo$8={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},SCRIPT_MIME_TYPES=["text/javascript","application/javascript","application/ecmascript"],isJsScript=e=>SCRIPT_MIME_TYPES.includes(e.type),componentInfo$7={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},componentInfo$6={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,s=6e4){return new Promise((c,m)=>{const f=document.createElement("img");let p=!1;f.onload=()=>{p=!0,c(f)},f.addEventListener("error",g=>{console.warn("Image load failed",g.error),m(g.error)}),f.src=a,setTimeout(()=>{p||m(new Error("Image load timed out"))},s)})}function o(a){return Math.round(a*1e3)/1e3}const i=e.get("image"),r=e.get("aspectRatio");if(fetch(i).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!r||r===.7041))return n(i).then(a=>{const s=e.get("aspectRatio");e.get("image")===i&&(!s||s===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},componentInfo$5={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},componentInfo$4={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>"}}}]},componentInfo$3={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"}]};function Slot(e){var t,n,o;return jsxRuntime.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:jsxRuntime.jsx(Blocks,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(o=e.builderContext.rootState)==null?void 0:o[e.name]})})}const componentInfo$2={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"}]},componentInfo$1={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Text(e){var t;return jsxRuntime.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const componentInfo={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},getDefaultRegisteredComponents=()=>[{component:USE_CLIENT_BUNDLE.Button,...componentInfo$b},{component:Columns,...componentInfo$a},{component:USE_CLIENT_BUNDLE.CustomCode,...componentInfo$9},{component:USE_CLIENT_BUNDLE.Embed,...componentInfo$8},{component:USE_CLIENT_BUNDLE.FragmentComponent,...componentInfo$7},{component:USE_CLIENT_BUNDLE.Image,...componentInfo$6},{component:USE_CLIENT_BUNDLE.ImgComponent,...componentInfo$5},{component:USE_CLIENT_BUNDLE.SectionComponent,...componentInfo$4},{component:Symbol$1,...componentInfo$2},{component:Text,...componentInfo$1},{component:USE_CLIENT_BUNDLE.Video,...componentInfo},{component:Slot,...componentInfo$3}],components=[],createRegisterComponentMessage=e=>({type:"builder.registerComponent",data:serializeComponentInfo(e)}),serializeFn=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},serializeValue=e=>typeof e=="function"?serializeFn(e):fastClone(e),serializeComponentInfo=({inputs:e,...t})=>({...fastClone(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[i,r])=>({...o,[i]:serializeValue(r)}),{}))}),UPDATE_COOKIES_AND_STYLES_SCRIPT=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
75
+ }`})]})}function removeProtocol(e){return e.replace(/http(s)?:/,"")}function updateQueryParam(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function getShopifyImageUrl(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return removeProtocol(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],i=t.match("x")?t:`${t}x`;return removeProtocol(`${o[0]}_${i}${r}`)}return null}function getSrcSet(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${updateQueryParam(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[getShopifyImageUrl(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const getTopLevelDomain=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},getCookieSync=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){logger.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},getCookie=async e=>getCookieSync(e),stringifyCookie=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(checkIsDefined).join("; "),SECURE_CONFIG=[["secure",""],["SameSite","None"]],createCookieString=({name:e,value:t,expires:n})=>{const r=(isBrowser()?location.protocol==="https:":!0)?SECURE_CONFIG:[[]],i=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...i,["path","/"],["domain",getTopLevelDomain(window.location.hostname)],...r];return stringifyCookie(a)},setCookie=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=createCookieString({name:e,value:t,expires:n});document.cookie=r}catch(r){logger.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}},BUILDER_STORE_PREFIX="builder.tests",getContentTestKey=e=>`${BUILDER_STORE_PREFIX}.${e}`,getContentVariationCookie=({contentId:e})=>getCookie({name:getContentTestKey(e),canTrack:!0}),getContentVariationCookieSync=({contentId:e})=>getCookieSync({name:getContentTestKey(e),canTrack:!0}),setContentVariationCookie=({contentId:e,value:t})=>setCookie({name:getContentTestKey(e),value:t,canTrack:!0}),checkIsBuilderContentWithVariations=e=>checkIsDefined(e.id)&&checkIsDefined(e.variations)&&Object.keys(e.variations).length>0,getRandomVariationId=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const i in t){const a=(r=t[i])==null?void 0:r.testRatio;if(n+=a,o<n)return i}return e},getAndSetVariantId=e=>{const t=getRandomVariationId(e);return setContentVariationCookie({contentId:e.id,value:t}).catch(n=>{logger.error("could not store A/B test variation: ",n)}),t},getTestFields=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},handleABTestingSync=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!checkIsBuilderContentWithVariations(e))return e;const n=getContentVariationCookieSync({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),o=getTestFields({item:e,testGroupId:n});return{...e,...o}},handleABTesting=async({item:e,canTrack:t})=>{if(!t||!checkIsBuilderContentWithVariations(e))return e;const o=await getContentVariationCookie({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),r=getTestFields({item:e,testGroupId:o});return{...e,...r}},getDefaultCanTrack=e=>checkIsDefined(e)?e:!0,componentInfo$b={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},componentInfo$a={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(i=>!i.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}]},componentInfo$9={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}]},componentInfo$8={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},SCRIPT_MIME_TYPES=["text/javascript","application/javascript","application/ecmascript"],isJsScript=e=>SCRIPT_MIME_TYPES.includes(e.type),componentInfo$7={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},componentInfo$6={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,s=6e4){return new Promise((c,m)=>{const f=document.createElement("img");let p=!1;f.onload=()=>{p=!0,c(f)},f.addEventListener("error",g=>{console.warn("Image load failed",g.error),m(g.error)}),f.src=a,setTimeout(()=>{p||m(new Error("Image load timed out"))},s)})}function o(a){return Math.round(a*1e3)/1e3}const r=e.get("image"),i=e.get("aspectRatio");if(fetch(r).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!i||i===.7041))return n(r).then(a=>{const s=e.get("aspectRatio");e.get("image")===r&&(!s||s===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},componentInfo$5={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},componentInfo$4={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>"}}}]},componentInfo$3={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"}]};function Slot(e){var t,n,o;return jsxRuntime.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:jsxRuntime.jsx(Blocks,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(o=e.builderContext.rootState)==null?void 0:o[e.name]})})}const componentInfo$2={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"}]},componentInfo$1={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Text(e){var t;return jsxRuntime.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const componentInfo={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},getDefaultRegisteredComponents=()=>[{component:USE_CLIENT_BUNDLE.Button,...componentInfo$b},{component:Columns,...componentInfo$a},{component:USE_CLIENT_BUNDLE.CustomCode,...componentInfo$9},{component:USE_CLIENT_BUNDLE.Embed,...componentInfo$8},{component:USE_CLIENT_BUNDLE.FragmentComponent,...componentInfo$7},{component:USE_CLIENT_BUNDLE.Image,...componentInfo$6},{component:USE_CLIENT_BUNDLE.ImgComponent,...componentInfo$5},{component:USE_CLIENT_BUNDLE.SectionComponent,...componentInfo$4},{component:Symbol$1,...componentInfo$2},{component:Text,...componentInfo$1},{component:USE_CLIENT_BUNDLE.Video,...componentInfo},{component:Slot,...componentInfo$3}],components=[],createRegisterComponentMessage=e=>({type:"builder.registerComponent",data:serializeComponentInfo(e)}),serializeFn=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},serializeValue=e=>typeof e=="function"?serializeFn(e):fastClone(e),serializeComponentInfo=({inputs:e,...t})=>({...fastClone(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,i])=>({...o,[r]:serializeValue(i)}),{}))}),UPDATE_COOKIES_AND_STYLES_SCRIPT=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
76
76
  function getAndSetVariantId() {
77
77
  function setCookie(name, value, days) {
78
78
  let expires = '';
@@ -171,21 +171,21 @@ output;
171
171
  )`,getUpdateVariantVisibilityScript=({contentId:e,variationId:t})=>`window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
172
172
  "${t}", "${e}", ${isHydrationTarget}
173
173
  )`;function InlinedScript(e){return jsxRuntime.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}const getIdFromSearchParams=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||logger.warn("No previewed ID found in search params."),n};function init(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new lruCache.LRUCache({max:500,ttl:1e3*60*5}))}function getPreviewContent(e){init();const t=getIdFromSearchParams(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function getGlobalThis(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function getFetch(){const e=getGlobalThis().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
174
- For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const fetch$1=getFetch();function flatten(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const r=e[i],a=[t,i].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...flatten(r,a,n)}:{...o,[a]:r}},{})}const DEFAULT_API_VERSION="v3",BUILDER_SEARCHPARAMS_PREFIX="builder.",BUILDER_OPTIONS_PREFIX="options.",convertSearchParamsToQueryObject=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},getBuilderSearchParams=e=>{if(!e)return{};const t=normalizeSearchParams(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)){const i=o.replace(BUILDER_SEARCHPARAMS_PREFIX,"").replace(BUILDER_OPTIONS_PREFIX,"");n[i]=t[o]}}),n},getBuilderSearchParamsFromWindow=()=>{if(!isBrowser())return{};const e=new URLSearchParams(window.location.search);return getBuilderSearchParams(e)},normalizeSearchParams=e=>e instanceof URLSearchParams?convertSearchParamsToQueryObject(e):e,isPositiveNumber=e=>typeof e=="number"&&!isNaN(e)&&e>=0,generateContentUrl=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:i,model:r,apiKey:a,includeRefs:s=!0,enrich:c,locale:m,apiVersion:f=DEFAULT_API_VERSION,fields:p,omit:g,offset:u,cacheSeconds:l,staleCacheSeconds:d,sort:b,includeUnpublished:S}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const h=new URL(`https://cdn.builder.io/api/${f}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m?`&locale=${m}`:""}${c?`&enrich=${c}`:""}`);if(h.searchParams.set("omit",g||"meta.componentsUsed"),p&&h.searchParams.set("fields",p),Number.isFinite(u)&&u>-1&&h.searchParams.set("offset",String(Math.floor(u))),typeof S=="boolean"&&h.searchParams.set("includeUnpublished",String(S)),l&&isPositiveNumber(l)&&h.searchParams.set("cacheSeconds",String(l)),d&&isPositiveNumber(d)&&h.searchParams.set("staleCacheSeconds",String(d)),b){const y=flatten({sort:b});for(const k in y)h.searchParams.set(k,JSON.stringify(y[k]))}const C={...getBuilderSearchParamsFromWindow(),...normalizeSearchParams(e.options||{})},x=flatten(C);for(const y in x)h.searchParams.set(y,String(x[y]));if(o&&h.searchParams.set("userAttributes",JSON.stringify(o)),i){const y=flatten({query:i});for(const k in y)h.searchParams.set(k,JSON.stringify(y[k]))}return h},checkContentHasResults=e=>"results"in e;async function fetchOneEntry(e){const t=await fetchEntries({...e,limit:1});return t&&t[0]||null}const getContent=fetchOneEntry,_fetchContent=async e=>{const t=generateContentUrl(e);return await(await fetch$1(t.href)).json()},_processContentResult=async(e,t,n=generateContentUrl(e))=>{const o=getDefaultCanTrack(e.canTrack);if(n.search.includes("preview=")){const r=[];for(const a of t.results){const s=getPreviewContent(n.searchParams);r.push(s||a)}t.results=r}if(!o||!(isBrowser()||TARGET==="reactNative"))return t.results;try{const r=[];for(const a of t.results)r.push(await handleABTesting({item:a,canTrack:o}));t.results=r}catch(r){logger.error("Could not process A/B tests. ",r)}return t.results};async function fetchEntries(e){try{const t=generateContentUrl(e),n=await _fetchContent(e);return checkContentHasResults(n)?_processContentResult(e,n):(logger.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return logger.error("Error fetching data. ",t),null}}const getAllContent=fetchEntries,DEFAULT_TRUSTED_HOSTS=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function isFromTrustedHost(e,t){const n=new URL(t.origin),o=n.hostname;return(e||DEFAULT_TRUSTED_HOSTS).findIndex(i=>i.startsWith("*.")?o.endsWith(i.slice(1)):i===o)>-1}function isPreviewing(){return!isBrowser()||isEditing()?!1:location.search.indexOf("builder.preview=")!==-1}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function uuid(){return uuidv4().replace(/-/g,"")}const SESSION_LOCAL_STORAGE_KEY="builderSessionId",getSessionId=async({canTrack:e})=>{if(!e)return;const t=await getCookie({name:SESSION_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createSessionId();return setSessionId({id:n,canTrack:e}),n}},createSessionId=()=>uuid(),setSessionId=({id:e,canTrack:t})=>setCookie({name:SESSION_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getLocalStorage=()=>isBrowser()&&typeof localStorage<"u"?localStorage:void 0,getLocalStorageItem=({key:e,canTrack:t})=>{var n;try{return t?(n=getLocalStorage())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},setLocalStorageItem=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=getLocalStorage())==null||o.setItem(e,n))}catch(i){console.debug("[LocalStorage] SET error: ",i)}},VISITOR_LOCAL_STORAGE_KEY="builderVisitorId",getVisitorId=({canTrack:e})=>{if(!e)return;const t=getLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createVisitorId();return setVisitorId({id:n,canTrack:e}),n}},createVisitorId=()=>uuid(),setVisitorId=({id:e,canTrack:t})=>setLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getTrackingEventData=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await getSessionId({canTrack:e}),n=getVisitorId({canTrack:e});return{sessionId:t,visitorId:n}},createEvent=async({type:e,canTrack:t,apiKey:n,metadata:o,...i})=>({type:e,data:{...i,metadata:{url:location.href,...o},...await getTrackingEventData({canTrack:t}),userAttributes:getUserAttributes(),ownerId:n}});async function _track(e){if(!e.apiKey){logger.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!isEditing()&&(isBrowser()||TARGET==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await createEvent(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const track=e=>_track({...e,canTrack:!0});function round(e){return Math.round(e*1e3)/1e3}const findParentElement=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},findBuilderParent=e=>findParentElement(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),computeOffset=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,r=round(o/n.width),a=round(i/n.height);return{x:r,y:a}},getInteractionPropertiesForEvent=e=>{const t=e.target,n=t&&findBuilderParent(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?computeOffset({event:e,target:t}):void 0,builderTargetOffset:n?computeOffset({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},SDK_VERSION="0.12.6",registry={};function register(e,t){let n=registry[e];if(n||(n=registry[e]=[]),n.push(t),isBrowser()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(i){console.debug("Could not postmessage",i)}}}const registerInsertMenu=()=>{register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let isSetupForEditing=!1;const setupBrowserForEditing=(e={})=>{var t,n;isSetupForEditing||(isSetupForEditing=!0,isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:TARGET,version:SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",o=>{var r,a;if(!isFromTrustedHost(e.trustedHosts,o))return;const{data:i}=o;if(i!=null&&i.type)switch(i.type){case"builder.evaluate":{const s=i.data.text,c=i.data.arguments||[],m=i.data.id,f=new Function(s);let p,g=null;try{p=f.apply(null,c)}catch(u){g=u}g?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:m,error:g.message}},"*"):p&&typeof p.then=="function"?p.then(u=>{var l;(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{id:m,result:u}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:p,id:m}},"*");break}}})))},getCssFromFont=e=>{var r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((r=e==null?void 0:e.files)==null?void 0:r.regular);let i="";if(o&&t&&n&&(i+=`
174
+ For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const fetch$1=getFetch();function flatten(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const i=e[r],a=[t,r].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...flatten(i,a,n)}:{...o,[a]:i}},{})}const DEFAULT_API_VERSION="v3",BUILDER_SEARCHPARAMS_PREFIX="builder.",BUILDER_OPTIONS_PREFIX="options.",convertSearchParamsToQueryObject=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},getBuilderSearchParams=e=>{if(!e)return{};const t=normalizeSearchParams(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)){const r=o.replace(BUILDER_SEARCHPARAMS_PREFIX,"").replace(BUILDER_OPTIONS_PREFIX,"");n[r]=t[o]}}),n},getBuilderSearchParamsFromWindow=()=>{if(!isBrowser())return{};const e=new URLSearchParams(window.location.search);return getBuilderSearchParams(e)},normalizeSearchParams=e=>e instanceof URLSearchParams?convertSearchParamsToQueryObject(e):e,isPositiveNumber=e=>typeof e=="number"&&!isNaN(e)&&e>=0,generateContentUrl=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:r,model:i,apiKey:a,includeRefs:s=!0,enrich:c,locale:m,apiVersion:f=DEFAULT_API_VERSION,fields:p,omit:g,offset:u,cacheSeconds:l,staleCacheSeconds:d,sort:b,includeUnpublished:y}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const h=new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m?`&locale=${m}`:""}${c?`&enrich=${c}`:""}`);if(h.searchParams.set("omit",g||"meta.componentsUsed"),p&&h.searchParams.set("fields",p),Number.isFinite(u)&&u>-1&&h.searchParams.set("offset",String(Math.floor(u))),typeof y=="boolean"&&h.searchParams.set("includeUnpublished",String(y)),l&&isPositiveNumber(l)&&h.searchParams.set("cacheSeconds",String(l)),d&&isPositiveNumber(d)&&h.searchParams.set("staleCacheSeconds",String(d)),b){const S=flatten({sort:b});for(const k in S)h.searchParams.set(k,JSON.stringify(S[k]))}const C={...getBuilderSearchParamsFromWindow(),...normalizeSearchParams(e.options||{})},x=flatten(C);for(const S in x)h.searchParams.set(S,String(x[S]));if(o&&h.searchParams.set("userAttributes",JSON.stringify(o)),r){const S=flatten({query:r});for(const k in S)h.searchParams.set(k,JSON.stringify(S[k]))}return h},checkContentHasResults=e=>"results"in e;async function fetchOneEntry(e){const t=await fetchEntries({...e,limit:1});return t&&t[0]||null}const getContent=fetchOneEntry,_fetchContent=async e=>{const t=generateContentUrl(e);return await(await fetch$1(t.href)).json()},_processContentResult=async(e,t,n=generateContentUrl(e))=>{const o=getDefaultCanTrack(e.canTrack);if(n.search.includes("preview=")){const i=[];for(const a of t.results){const s=getPreviewContent(n.searchParams);i.push(s||a)}t.results=i}if(!o||!(isBrowser()||TARGET==="reactNative"))return t.results;try{const i=[];for(const a of t.results)i.push(await handleABTesting({item:a,canTrack:o}));t.results=i}catch(i){logger.error("Could not process A/B tests. ",i)}return t.results};async function fetchEntries(e){try{const t=generateContentUrl(e),n=await _fetchContent(e);return checkContentHasResults(n)?_processContentResult(e,n):(logger.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return logger.error("Error fetching data. ",t),null}}const getAllContent=fetchEntries;function isPreviewing(){return!isBrowser()||isEditing()?!1:location.search.indexOf("builder.preview=")!==-1}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function uuid(){return uuidv4().replace(/-/g,"")}const SESSION_LOCAL_STORAGE_KEY="builderSessionId",getSessionId=async({canTrack:e})=>{if(!e)return;const t=await getCookie({name:SESSION_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createSessionId();return setSessionId({id:n,canTrack:e}),n}},createSessionId=()=>uuid(),setSessionId=({id:e,canTrack:t})=>setCookie({name:SESSION_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getLocalStorage=()=>isBrowser()&&typeof localStorage<"u"?localStorage:void 0,getLocalStorageItem=({key:e,canTrack:t})=>{var n;try{return t?(n=getLocalStorage())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},setLocalStorageItem=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=getLocalStorage())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},VISITOR_LOCAL_STORAGE_KEY="builderVisitorId",getVisitorId=({canTrack:e})=>{if(!e)return;const t=getLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createVisitorId();return setVisitorId({id:n,canTrack:e}),n}},createVisitorId=()=>uuid(),setVisitorId=({id:e,canTrack:t})=>setLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getTrackingEventData=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await getSessionId({canTrack:e}),n=getVisitorId({canTrack:e});return{sessionId:t,visitorId:n}},createEvent=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await getTrackingEventData({canTrack:t}),userAttributes:getUserAttributes(),ownerId:n}});async function _track(e){if(!e.apiKey){logger.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!isEditing()&&(isBrowser()||TARGET==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await createEvent(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const track=e=>_track({...e,canTrack:!0});function round(e){return Math.round(e*1e3)/1e3}const findParentElement=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},findBuilderParent=e=>findParentElement(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),computeOffset=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,i=round(o/n.width),a=round(r/n.height);return{x:i,y:a}},getInteractionPropertiesForEvent=e=>{const t=e.target,n=t&&findBuilderParent(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?computeOffset({event:e,target:t}):void 0,builderTargetOffset:n?computeOffset({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},DEFAULT_TRUSTED_HOSTS=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function isFromTrustedHost(e,t){const n=new URL(t.origin),o=n.hostname;return(e||DEFAULT_TRUSTED_HOSTS).findIndex(r=>r.startsWith("*.")?o.endsWith(r.slice(1)):r===o)>-1}const SDK_VERSION="0.12.8",registry={};function register(e,t){let n=registry[e];if(n||(n=registry[e]=[]),n.push(t),isBrowser()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const registerInsertMenu=()=>{register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let isSetupForEditing=!1;const setupBrowserForEditing=(e={})=>{var t,n;isSetupForEditing||(isSetupForEditing=!0,isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:TARGET,version:SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",o=>{var i,a;if(!isFromTrustedHost(e.trustedHosts,o))return;const{data:r}=o;if(r!=null&&r.type)switch(r.type){case"builder.evaluate":{const s=r.data.text,c=r.data.arguments||[],m=r.data.id,f=new Function(s);let p,g=null;try{p=f.apply(null,c)}catch(u){g=u}g?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:m,error:g.message}},"*"):p&&typeof p.then=="function"?p.then(u=>{var l;(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{id:m,result:u}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:p,id:m}},"*");break}}})))},createEditorListener=({model:e,trustedHosts:t,callbacks:n})=>o=>{if(!isFromTrustedHost(t,o))return;const{data:r}=o;if(r)switch(r.type){case"builder.configureSdk":{n.configureSdk(r.data);break}case"builder.triggerAnimation":{n.animation(r.data);break}case"builder.contentUpdate":{const i=r.data,a=i.key||i.alias||i.entry||i.modelName,s=i.data;a===e&&n.contentUpdate(s);break}}},subscribeToEditor=(e,t,n)=>{if(!isBrowser)return logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};setupBrowserForEditing();const o=createEditorListener({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}};function assign(e,...t){const n=Object(e);for(let o=1;o<arguments.length;o++){const r=arguments[o];if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n}const camelCaseToKebabCase=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function warnElementNotPresent(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function augmentAnimation(e,t){const n=getAllStylesUsed(e),o=getComputedStyle(t),r=e.steps[0].styles,i=e.steps[e.steps.length-1].styles,a=[r,i];for(const s of a)for(const c of n)c in s||(s[c]=o[c])}function getAllStylesUsed(e){const t=[];for(const n of e.steps)for(const o in n.styles)t.indexOf(o)===-1&&t.push(o);return t}function triggerAnimation(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){warnElementNotPresent(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{augmentAnimation(e,n),n.style.transition="none",n.style.transitionDelay="0",assign(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),assign(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}const getCssFromFont=e=>{var i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((i=e==null?void 0:e.files)==null?void 0:i.regular);let r="";if(o&&t&&n&&(r+=`
175
175
  @font-face {
176
176
  font-family: "${t}";
177
177
  src: local("${n}"), url('${o}') format('woff2');
178
178
  font-display: fallback;
179
179
  font-weight: 400;
180
180
  }
181
- `.trim()),e.files)for(const a in e.files){if(!(String(Number(a))===a))continue;const c=e.files[a];c&&c!==o&&(i+=`
181
+ `.trim()),e.files)for(const a in e.files){if(!(String(Number(a))===a))continue;const c=e.files[a];c&&c!==o&&(r+=`
182
182
  @font-face {
183
183
  font-family: "${t}";
184
184
  src: url('${c}') format('woff2');
185
185
  font-display: fallback;
186
186
  font-weight: ${a};
187
187
  }
188
- `.trim())}return i},getFontCss=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>getCssFromFont(n)))==null?void 0:t.join(" "))||""},getCss=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function ContentStyles(e){const t=`
188
+ `.trim())}return r},getFontCss=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>getCssFromFont(n)))==null?void 0:t.join(" "))||""},getCss=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function ContentStyles(e){const t=`
189
189
  ${getCss({cssCode:e.cssCode,contentId:e.contentId})}
190
190
  ${getFontCss({customFonts:e.customFonts})}
191
191
 
@@ -205,4 +205,4 @@ ${getFontCss({customFonts:e.customFonts})}
205
205
  text-align: inherit;
206
206
  font-family: inherit;
207
207
  }
208
- `.trim();return jsxRuntime.jsx(InlinedStyles,{styles:t})}const getRootStateInitialValue=({content:e,data:t,locale:n})=>{var r,a,s;const o={},i=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(s=(a=e==null?void 0:e.data)==null?void 0:a.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(o[c.name]=c.defaultValue)}),{...o,...i,...t,...n?{locale:n}:{}}},getContentInitialValue=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ContentComponent(e){var i,r,a,s,c,m,f,p,g;const t=getUpdateVariantVisibilityScript({variationId:(i=e.content)==null?void 0:i.testVariationId,contentId:(r=e.content)==null?void 0:r.id}),n=[...getDefaultRegisteredComponents(),...components,...e.customComponents||[]].reduce((u,{component:l,...d})=>({...u,[d.name]:{component:l,...serializeComponentInfo(d)}}),{}),o={content:getContentInitialValue({content:e.content,data:e.data}),localState:void 0,rootState:getRootStateInitialValue({content:e.content,data:e.data,locale:e.locale}),rootSetState:void 0,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...getDefaultRegisteredComponents(),...components,...e.customComponents||[]].reduce((u,{component:l,...d})=>({...u,[d.name]:serializeComponentInfo(d)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}};return jsxRuntime.jsxs(USE_CLIENT_BUNDLE.EnableEditor,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,showContent:e.showContent,builderContextSignal:o,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,children:[e.isSsrAbTest?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:t})}):null,jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ContentStyles,{contentId:(a=o.content)==null?void 0:a.id,cssCode:(c=(s=o.content)==null?void 0:s.data)==null?void 0:c.cssCode,customFonts:(f=(m=o.content)==null?void 0:m.data)==null?void 0:f.customFonts})}),jsxRuntime.jsx(Blocks,{blocks:(g=(p=o.content)==null?void 0:p.data)==null?void 0:g.blocks,context:o,registeredComponents:n,linkComponent:e.linkComponent})]})}function ContentVariants(e){var r,a;const t=checkShouldRenderVariants({canTrack:getDefaultCanTrack(e.canTrack),content:e.content}),n=function(){var c;return getUpdateCookieAndStylesScript(getVariants(e.content).map(m=>({id:m.testVariationId,testRatio:m.testRatio})),((c=e.content)==null?void 0:c.id)||"")},o=function(){return getVariants(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")},i=function(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:handleABTestingSync({item:e.content,canTrack:getDefaultCanTrack(e.canTrack)})};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!e.__isNestedRender&&TARGET!=="reactNative"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:getScriptString()})}):null,t?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(InlinedStyles,{id:`variants-styles-${(r=e.content)==null?void 0:r.id}`,styles:o()}),jsxRuntime.jsx(InlinedScript,{scriptStr:n()}),(a=getVariants(e.content))==null?void 0:a.map(s=>jsxRuntime.jsx(ContentComponent,{content:s,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},s.testVariationId))]}):null,jsxRuntime.jsx(ContentComponent,{content:i(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const fetchSymbolContent=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{logger.error("Could not fetch symbol content: ",n)})};async function Symbol$1(e){var o,i,r,a,s;const t=function(){var m,f;return[e.attributes[getClassPropName()],"builder-symbol",(m=e.symbol)!=null&&m.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},n=((o=e.symbol)==null?void 0:o.content)||await fetchSymbolContent({symbol:e.symbol,builderContextValue:e.builderContext});return jsxRuntime.jsx("div",{...e.attributes,className:t(),children:jsxRuntime.jsx(ContentVariants,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(i=e.builderBlock)==null?void 0:i.id},customComponents:Object.values(e.builderComponents),data:{...(r=e.symbol)==null?void 0:r.data,...e.builderContext.localState,...(a=n==null?void 0:n.data)==null?void 0:a.state},model:(s=e.symbol)==null?void 0:s.model,content:n,linkComponent:e.builderLinkComponent})})}const RenderBlocks=Blocks,RenderContent=ContentVariants,settings={};function setEditorSettings(e){if(isBrowser()){Object.assign(settings,e);const t={type:"builder.settingsChange",data:settings};parent.postMessage(t,"*")}}const fetchBuilderProps=async e=>{var o,i,r;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((i=e.userAttributes)==null?void 0:i.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:getBuilderSearchParams(e.searchParams||((r=e.url)==null?void 0:r.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await fetchOneEntry(n)}};exports.Blocks=Blocks;exports.Columns=Columns;exports.ContentVariants=ContentVariants;exports.RenderBlocks=RenderBlocks;exports.RenderContent=RenderContent;exports.Symbol=Symbol$1;exports.Text=Text;exports._processContentResult=_processContentResult;exports._track=_track;exports.createRegisterComponentMessage=createRegisterComponentMessage;exports.evaluate=evaluate;exports.fastClone=fastClone;exports.fetch=fetch$1;exports.fetchBuilderProps=fetchBuilderProps;exports.fetchEntries=fetchEntries;exports.fetchOneEntry=fetchOneEntry;exports.getAllContent=getAllContent;exports.getBlockActions=getBlockActions;exports.getBlockProperties=getBlockProperties;exports.getBuilderSearchParams=getBuilderSearchParams;exports.getClassPropName=getClassPropName;exports.getContent=getContent;exports.getDefaultCanTrack=getDefaultCanTrack;exports.getInteractionPropertiesForEvent=getInteractionPropertiesForEvent;exports.getSrcSet=getSrcSet;exports.init=init;exports.isBrowser=isBrowser;exports.isEditing=isEditing;exports.isEmptyElement=isEmptyElement;exports.isFromTrustedHost=isFromTrustedHost;exports.isJsScript=isJsScript;exports.isPreviewing=isPreviewing;exports.logger=logger;exports.register=register;exports.registerInsertMenu=registerInsertMenu;exports.setEditorSettings=setEditorSettings;exports.setupBrowserForEditing=setupBrowserForEditing;exports.track=track;
208
+ `.trim();return jsxRuntime.jsx(InlinedStyles,{styles:t})}const getRootStateInitialValue=({content:e,data:t,locale:n})=>{var i,a,s;const o={},r=((i=e==null?void 0:e.data)==null?void 0:i.state)||{};return(s=(a=e==null?void 0:e.data)==null?void 0:a.inputs)==null||s.forEach(c=>{c.name&&c.defaultValue!==void 0&&(o[c.name]=c.defaultValue)}),{...o,...r,...t,...n?{locale:n}:{}}},getContentInitialValue=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ContentComponent(e){var r,i,a,s,c,m,f,p,g;const t=getUpdateVariantVisibilityScript({variationId:(r=e.content)==null?void 0:r.testVariationId,contentId:(i=e.content)==null?void 0:i.id}),n=[...getDefaultRegisteredComponents(),...components,...e.customComponents||[]].reduce((u,{component:l,...d})=>({...u,[d.name]:{component:l,...serializeComponentInfo(d)}}),{}),o={content:getContentInitialValue({content:e.content,data:e.data}),localState:void 0,rootState:getRootStateInitialValue({content:e.content,data:e.data,locale:e.locale}),rootSetState:void 0,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...getDefaultRegisteredComponents(),...components,...e.customComponents||[]].reduce((u,{component:l,...d})=>({...u,[d.name]:serializeComponentInfo(d)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}};return jsxRuntime.jsxs(USE_CLIENT_BUNDLE.EnableEditor,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,showContent:e.showContent,builderContextSignal:o,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,children:[e.isSsrAbTest?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:t})}):null,jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(ContentStyles,{contentId:(a=o.content)==null?void 0:a.id,cssCode:(c=(s=o.content)==null?void 0:s.data)==null?void 0:c.cssCode,customFonts:(f=(m=o.content)==null?void 0:m.data)==null?void 0:f.customFonts})}),jsxRuntime.jsx(Blocks,{blocks:(g=(p=o.content)==null?void 0:p.data)==null?void 0:g.blocks,context:o,registeredComponents:n,linkComponent:e.linkComponent})]})}function ContentVariants(e){var i,a;const t=checkShouldRenderVariants({canTrack:getDefaultCanTrack(e.canTrack),content:e.content}),n=function(){var c;return getUpdateCookieAndStylesScript(getVariants(e.content).map(m=>({id:m.testVariationId,testRatio:m.testRatio})),((c=e.content)==null?void 0:c.id)||"")},o=function(){return getVariants(e.content).map(c=>`.variant-${c.testVariationId} { display: none; } `).join("")},r=function(){var c;return t?{...e.content,testVariationId:(c=e.content)==null?void 0:c.id}:handleABTestingSync({item:e.content,canTrack:getDefaultCanTrack(e.canTrack)})};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[!e.__isNestedRender&&TARGET!=="reactNative"?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedScript,{scriptStr:getScriptString()})}):null,t?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(InlinedStyles,{id:`variants-styles-${(i=e.content)==null?void 0:i.id}`,styles:o()}),jsxRuntime.jsx(InlinedScript,{scriptStr:n()}),(a=getVariants(e.content))==null?void 0:a.map(s=>jsxRuntime.jsx(ContentComponent,{content:s,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},s.testVariationId))]}):null,jsxRuntime.jsx(ContentComponent,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,includeRefs:e.includeRefs,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const fetchSymbolContent=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{logger.error("Could not fetch symbol content: ",n)})};async function Symbol$1(e){var o,r,i,a,s;const t=function(){var m,f;return[e.attributes[getClassPropName()],"builder-symbol",(m=e.symbol)!=null&&m.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},n=((o=e.symbol)==null?void 0:o.content)||await fetchSymbolContent({symbol:e.symbol,builderContextValue:e.builderContext});return jsxRuntime.jsx("div",{...e.attributes,className:t(),children:jsxRuntime.jsx(ContentVariants,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(i=e.symbol)==null?void 0:i.data,...e.builderContext.localState,...(a=n==null?void 0:n.data)==null?void 0:a.state},model:(s=e.symbol)==null?void 0:s.model,content:n,linkComponent:e.builderLinkComponent})})}const RenderBlocks=Blocks,RenderContent=ContentVariants,settings={};function setEditorSettings(e){if(isBrowser()){Object.assign(settings,e);const t={type:"builder.settingsChange",data:settings};parent.postMessage(t,"*")}}const fetchBuilderProps=async e=>{var o,r,i;const t=e.path||((o=e.url)==null?void 0:o.pathname)||((r=e.userAttributes)==null?void 0:r.urlPath),n={...e,apiKey:e.apiKey,model:e.model||"page",userAttributes:{...e.userAttributes,...t?{urlPath:t}:{}},options:getBuilderSearchParams(e.searchParams||((i=e.url)==null?void 0:i.searchParams)||e.options)};return{apiKey:n.apiKey,model:n.model,content:await fetchOneEntry(n)}};exports.Blocks=Blocks;exports.Columns=Columns;exports.ContentVariants=ContentVariants;exports.RenderBlocks=RenderBlocks;exports.RenderContent=RenderContent;exports.Symbol=Symbol$1;exports.Text=Text;exports._processContentResult=_processContentResult;exports._track=_track;exports.createEditorListener=createEditorListener;exports.createRegisterComponentMessage=createRegisterComponentMessage;exports.evaluate=evaluate;exports.fastClone=fastClone;exports.fetch=fetch$1;exports.fetchBuilderProps=fetchBuilderProps;exports.fetchEntries=fetchEntries;exports.fetchOneEntry=fetchOneEntry;exports.getAllContent=getAllContent;exports.getBlockActions=getBlockActions;exports.getBlockProperties=getBlockProperties;exports.getBuilderSearchParams=getBuilderSearchParams;exports.getClassPropName=getClassPropName;exports.getContent=getContent;exports.getDefaultCanTrack=getDefaultCanTrack;exports.getInteractionPropertiesForEvent=getInteractionPropertiesForEvent;exports.getSrcSet=getSrcSet;exports.init=init;exports.isBrowser=isBrowser;exports.isEditing=isEditing;exports.isEmptyElement=isEmptyElement;exports.isJsScript=isJsScript;exports.isPreviewing=isPreviewing;exports.logger=logger;exports.register=register;exports.registerInsertMenu=registerInsertMenu;exports.setEditorSettings=setEditorSettings;exports.setupBrowserForEditing=setupBrowserForEditing;exports.subscribeToEditor=subscribeToEditor;exports.track=track;exports.triggerAnimation=triggerAnimation;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-c799b7fc.cjs"),t=require("./USE_CLIENT_BUNDLE-343cb348.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-cbcb1baf.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.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 e=require("./bundle-83186530.cjs"),t=require("./USE_CLIENT_BUNDLE-e31c74cc.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-29398256.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,34 +1,35 @@
1
- import { B as i, w as m, C as c, R as g, v as p, S as l, T as C, z as d, p as B, H as S, A as f, q as u, D as E, F as R, E as h, c as x, j as k, x as y, y as F, G as P } from "./bundle-99e5b33f.js";
2
- import { b as v, F as w, c as A, S as T, V } from "./USE_CLIENT_BUNDLE-aa8ab44a.js";
1
+ import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-6c5cef2d.js";
2
+ import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-e0108fb4.js";
3
3
  import "lru-cache";
4
4
  import "react/jsx-runtime";
5
5
  import "react";
6
6
  import "next/navigation";
7
- import "./USE_SERVER_BUNDLE-2fdc522e.js";
7
+ import "./USE_SERVER_BUNDLE-3e951ab1.js";
8
8
  export {
9
9
  i as Blocks,
10
- v as Button,
11
- m as Columns,
12
- c as Content,
13
- w as Fragment,
14
- A as Image,
10
+ w as Button,
11
+ c as Columns,
12
+ m as Content,
13
+ A as Fragment,
14
+ I as Image,
15
15
  g as RenderBlocks,
16
16
  p as RenderContent,
17
- T as Section,
17
+ V as Section,
18
18
  l as Symbol,
19
- C as Text,
20
- V as Video,
21
- d as _processContentResult,
22
- B as createRegisterComponentMessage,
23
- S as fetchBuilderProps,
24
- f as fetchEntries,
25
- u as fetchOneEntry,
26
- E as getAllContent,
19
+ d 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
27
  R as getBuilderSearchParams,
28
- h as getContent,
29
- x as isEditing,
30
- k as isPreviewing,
31
- y as register,
32
- F as setEditorSettings,
28
+ b as getContent,
29
+ h as isEditing,
30
+ x as isPreviewing,
31
+ k as register,
32
+ y as setEditorSettings,
33
+ F as subscribeToEditor,
33
34
  P as track
34
35
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-nextjs",
3
3
  "description": "Builder.io RSC SDK for NextJS App Directory",
4
- "version": "0.12.6",
4
+ "version": "0.12.8",
5
5
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,5 @@
1
+ import type { BuilderAnimation } from '../../types/builder-block.js';
2
+ export declare function bindAnimations(animations: BuilderAnimation[]): void;
3
+ export declare function triggerAnimation(animation: BuilderAnimation): void;
4
+ export declare function bindHoverAnimation(animation: BuilderAnimation): void;
5
+ export declare function bindScrollInViewAnimation(animation: BuilderAnimation): void;
@@ -6,7 +6,7 @@ export declare const getVariants: (content: Nullable<BuilderContent>) => {
6
6
  data?: {
7
7
  [key: string]: any;
8
8
  title?: string;
9
- blocks?: import("../../types/builder-block.js").BuilderBlock[];
9
+ blocks?: import("../../server-index.js").BuilderBlock[];
10
10
  inputs?: import("../../types/input.js").Input[];
11
11
  state?: {
12
12
  [key: string]: any;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.12.6";
1
+ export declare const SDK_VERSION = "0.12.8";
@@ -1 +1 @@
1
- export declare function getPreviewContent(searchParams: URLSearchParams): import("../../types/builder-content.js").BuilderContent;
1
+ export declare function getPreviewContent(searchParams: URLSearchParams): import("../../server-index.js").BuilderContent;
@@ -0,0 +1,35 @@
1
+ import type { ContentProps } from '../components/content/content.types.js';
2
+ import type { BuilderAnimation } from '../types/builder-block.js';
3
+ import type { BuilderContent } from '../types/builder-content.js';
4
+ type ContentListener = Required<Pick<ContentProps, 'model' | 'trustedHosts'>> & {
5
+ callbacks: {
6
+ contentUpdate: (updatedContent: BuilderContent) => void;
7
+ animation: (updatedContent: BuilderAnimation) => void;
8
+ configureSdk: (updatedContent: any) => void;
9
+ };
10
+ };
11
+ export declare const createEditorListener: ({ model, trustedHosts, callbacks }: ContentListener) => (event: MessageEvent<any>) => void;
12
+ type SubscribeToEditor = (
13
+ /**
14
+ * The Builder `model` to subscribe to
15
+ */
16
+ model: string,
17
+ /**
18
+ * The callback function to call when the content is updated.
19
+ */
20
+ callback: (updatedContent: BuilderContent) => void,
21
+ /**
22
+ * Extra options for the listener.
23
+ */
24
+ options?: {
25
+ /**
26
+ * List of hosts to allow editing content from.
27
+ */
28
+ trustedHosts?: string[] | undefined;
29
+ }) => () => void;
30
+ /**
31
+ * Subscribes to the Builder editor and listens to `content` updates of a certain `model`.
32
+ * Sends the updated `content` to the `callback` function.
33
+ */
34
+ export declare const subscribeToEditor: SubscribeToEditor;
35
+ export {};
@@ -1,4 +1,7 @@
1
1
  export * from './index-helpers/top-of-file.js';
2
+ /**
3
+ * Component Prop types
4
+ */
2
5
  export type { ButtonProps } from './blocks/button/button.types.js';
3
6
  export type { ColumnProps } from './blocks/columns/columns.types.js';
4
7
  export type { FragmentProps } from './blocks/fragment/fragment.types.js';
@@ -9,6 +12,16 @@ export type { TextProps } from './blocks/text/text.types.js';
9
12
  export type { VideoProps } from './blocks/video/video.types.js';
10
13
  export type { BlocksProps } from './components/blocks/blocks.types.js';
11
14
  export type { ContentVariantsPrps as ContentProps } from './components/content-variants/content-variants.types.js';
15
+ /**
16
+ * General Builder types
17
+ */
18
+ export type { RegisteredComponent } from './context/types.js';
19
+ export type { BuilderBlock } from './types/builder-block.js';
20
+ export type { BuilderContent } from './types/builder-content.js';
21
+ export type { ComponentInfo } from './types/components.js';
22
+ /**
23
+ * Helper functions
24
+ */
12
25
  export { isEditing } from './functions/is-editing.js';
13
26
  export { isPreviewing } from './functions/is-previewing.js';
14
27
  export { createRegisterComponentMessage } from './functions/register-component.js';
@@ -16,9 +29,11 @@ export { register } from './functions/register.js';
16
29
  export type { InsertMenuConfig, InsertMenuItem } from './functions/register.js';
17
30
  export { setEditorSettings } from './functions/set-editor-settings.js';
18
31
  export type { Settings } from './functions/set-editor-settings.js';
19
- export { _processContentResult, fetchEntries, fetchOneEntry, getAllContent, getContent } from './functions/get-content/index.js';
20
32
  export { getBuilderSearchParams } from './functions/get-builder-search-params/index.js';
21
33
  export { track } from './functions/track/index.js';
22
- export type { RegisteredComponent } from './context/types.js';
23
- export type { ComponentInfo } from './types/components.js';
34
+ export { subscribeToEditor } from './helpers/subscribe-to-editor.js';
35
+ /**
36
+ * Content fetching
37
+ */
24
38
  export { fetchBuilderProps } from './functions/fetch-builder-props.js';
39
+ export { _processContentResult, fetchEntries, fetchOneEntry, getAllContent, getContent } from './functions/get-content/index.js';
@@ -4,6 +4,23 @@ interface JSONObject {
4
4
  }
5
5
  interface JSONArray extends Array<JSONValue> {
6
6
  }
7
+ export interface AnimationStep {
8
+ styles: {
9
+ [key: string]: string;
10
+ };
11
+ delay?: number;
12
+ }
13
+ export interface BuilderAnimation {
14
+ elementId: string;
15
+ trigger: string;
16
+ steps: AnimationStep[];
17
+ duration: number;
18
+ delay?: number;
19
+ easing?: string;
20
+ id?: string;
21
+ repeat?: boolean;
22
+ thresholdPercent?: number;
23
+ }
7
24
  /** @todo typedoc this */
8
25
  export interface BuilderBlock {
9
26
  '@type': '@builder.io/sdk:Element';
@@ -52,7 +69,7 @@ export interface BuilderBlock {
52
69
  collection: string;
53
70
  itemName?: string;
54
71
  } | null;
55
- animations?: any[];
72
+ animations?: BuilderAnimation[];
56
73
  style?: Partial<CSSStyleDeclaration>;
57
74
  href?: string;
58
75
  /**
@@ -0,0 +1,5 @@
1
+ import type { BuilderAnimation } from '../../types/builder-block.js';
2
+ export declare function bindAnimations(animations: BuilderAnimation[]): void;
3
+ export declare function triggerAnimation(animation: BuilderAnimation): void;
4
+ export declare function bindHoverAnimation(animation: BuilderAnimation): void;
5
+ export declare function bindScrollInViewAnimation(animation: BuilderAnimation): void;
@@ -6,7 +6,7 @@ export declare const getVariants: (content: Nullable<BuilderContent>) => {
6
6
  data?: {
7
7
  [key: string]: any;
8
8
  title?: string;
9
- blocks?: import("../../types/builder-block.js").BuilderBlock[];
9
+ blocks?: import("../../server-index.js").BuilderBlock[];
10
10
  inputs?: import("../../types/input.js").Input[];
11
11
  state?: {
12
12
  [key: string]: any;
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.12.6";
1
+ export declare const SDK_VERSION = "0.12.8";
@@ -1 +1 @@
1
- export declare function getPreviewContent(searchParams: URLSearchParams): import("../../types/builder-content.js").BuilderContent;
1
+ export declare function getPreviewContent(searchParams: URLSearchParams): import("../../server-index.js").BuilderContent;