@builder.io/sdk-react 4.1.1 → 4.1.2

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 (70) hide show
  1. package/lib/browser/blocks-exports.cjs +2 -2
  2. package/lib/browser/blocks-exports.mjs +246 -246
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-7fc3706d.js → server-entry-275748e0.js} +120 -144
  6. package/lib/browser/server-entry-d2f19ab1.cjs +2 -0
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-97979a98.cjs → accordion-59377bdf.cjs} +1 -1
  10. package/lib/edge/{accordion-52165801.js → accordion-59685072.js} +1 -1
  11. package/lib/edge/{blocks-f69d48c0.js → blocks-803a3669.js} +2 -2
  12. package/lib/edge/{blocks-b38b39ff.cjs → blocks-ab4caea4.cjs} +1 -1
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-3acce335.js → button-244756d9.js} +2 -2
  16. package/lib/edge/{button-c2b48e86.cjs → button-d9ead397.cjs} +1 -1
  17. package/lib/edge/{columns-600ece77.cjs → columns-88904faf.cjs} +1 -1
  18. package/lib/edge/{columns-301795ee.js → columns-ac088b45.js} +3 -3
  19. package/lib/edge/{content-variants-d80a626a.js → content-variants-7ba31977.js} +133 -133
  20. package/lib/edge/{content-variants-cb452ad4.cjs → content-variants-d0558de3.cjs} +5 -5
  21. package/lib/edge/{custom-code-38a0e487.js → custom-code-3d893bd2.js} +1 -1
  22. package/lib/edge/{custom-code-381f399e.cjs → custom-code-e2904013.cjs} +1 -1
  23. package/lib/edge/{embed-57e9672d.cjs → embed-7710e674.cjs} +1 -1
  24. package/lib/edge/{embed-3e62c6c0.js → embed-7c2fe6ce.js} +1 -1
  25. package/lib/edge/{form-01ee1ef4.js → form-a5b57678.js} +3 -3
  26. package/lib/edge/{form-dfb33605.cjs → form-ec1cd318.cjs} +1 -1
  27. package/lib/edge/{get-class-prop-name-7a52ddda.cjs → get-class-prop-name-31bfc4d6.cjs} +1 -1
  28. package/lib/edge/{get-class-prop-name-ca3fff6a.js → get-class-prop-name-4ca8bda9.js} +1 -1
  29. package/lib/edge/{img-35c030d0.js → img-1b034d45.js} +1 -1
  30. package/lib/edge/{img-ff08ac3a.cjs → img-f00b7db5.cjs} +1 -1
  31. package/lib/edge/index.cjs +1 -1
  32. package/lib/edge/index.mjs +1 -1
  33. package/lib/edge/{input-bd84e8ab.cjs → input-19390442.cjs} +1 -1
  34. package/lib/edge/{input-d466ec13.js → input-dfd8b37e.js} +1 -1
  35. package/lib/edge/{personalization-container-8b04de3e.cjs → personalization-container-40c62fee.cjs} +1 -1
  36. package/lib/edge/{personalization-container-87ff6375.js → personalization-container-660938a9.js} +4 -4
  37. package/lib/edge/{select-5d4ffe3b.js → select-155fc504.js} +1 -1
  38. package/lib/edge/{select-ef4ce171.cjs → select-9839622b.cjs} +1 -1
  39. package/lib/edge/{server-entry-db512751.js → server-entry-75006b6f.js} +119 -143
  40. package/lib/edge/server-entry-bdf7aa30.cjs +2 -0
  41. package/lib/edge/server-entry.cjs +1 -1
  42. package/lib/edge/server-entry.mjs +1 -1
  43. package/lib/edge/{slot-78b8ee2b.cjs → slot-28225152.cjs} +1 -1
  44. package/lib/edge/{slot-d0cbcacf.js → slot-c14c2de1.js} +3 -3
  45. package/lib/edge/{symbol-2e54d716.js → symbol-2419b184.js} +2 -2
  46. package/lib/edge/{symbol-6d9bb0a7.cjs → symbol-e5dc7a91.cjs} +1 -1
  47. package/lib/edge/{tabs-b8c2b851.js → tabs-c7011fa2.js} +3 -3
  48. package/lib/edge/{tabs-3f775737.cjs → tabs-d7aa6ac2.cjs} +1 -1
  49. package/lib/node/blocks-exports.cjs +2 -2
  50. package/lib/node/blocks-exports.mjs +244 -244
  51. package/lib/node/index.cjs +1 -1
  52. package/lib/node/index.mjs +3 -3
  53. package/lib/node/init.cjs +1 -1
  54. package/lib/node/init.mjs +3 -3
  55. package/lib/node/{server-entry-b0a12b94.js → server-entry-0cf21855.js} +120 -144
  56. package/lib/node/server-entry-7a611f62.cjs +2 -0
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/lib/node/{setIvm-f591fbda.js → setIvm-4171d613.js} +1 -1
  60. package/lib/node/{setIvm-513e193d.cjs → setIvm-68685828.cjs} +1 -1
  61. package/lib/node/setIvm.cjs +1 -1
  62. package/lib/node/setIvm.mjs +2 -2
  63. package/lib/node/{should-force-browser-runtime-in-node-0fb1bbdd.cjs → should-force-browser-runtime-in-node-88656beb.cjs} +1 -1
  64. package/lib/node/{should-force-browser-runtime-in-node-da05f5c3.js → should-force-browser-runtime-in-node-9fe42073.js} +1 -1
  65. package/package.json +1 -1
  66. package/types/constants/sdk-version.d.ts +1 -1
  67. package/types/scripts/init-editing.d.ts +0 -1
  68. package/lib/browser/server-entry-7291b0a0.cjs +0 -2
  69. package/lib/edge/server-entry-afc62633.cjs +0 -2
  70. package/lib/node/server-entry-47ceca47.cjs +0 -2
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./server-entry-7291b0a0.cjs"),o=require("react/jsx-runtime"),g=require("react");function et(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const tt=et(g),nt=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),it=e=>typeof e=="string"&&nt.has(e.toLowerCase());function le(e){return o.jsx(o.Fragment,{children:it(e.TagName)?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):o.jsx(o.Fragment,{children:typeof e.TagName=="string"?o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const L=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Te(e){function t(){return{...e.attributes,[L()]:`${e.link?"":"builder-button"} ${e.attributes[L()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return o.jsx(le,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const Z=g.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),Ie=g.createContext({registeredComponents:{}}),we=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((r,a)=>r!=null?r[a]:r,e);return i===void 0||i===e?n:i},rt=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),at=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),ot=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function Ee({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,r)=>{if(t&&r in t)return t[r];const a=i[r];return typeof a=="object"&&a!==null?Ee({rootState:a,localState:void 0,rootSetState:n?s=>{i[r]=s,n(i)}:void 0}):a},set:(i,r,a)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[r]=a,n==null||n(i),!0}})}const fe=({code:e,builder:t,context:n,event:i,localState:r,rootSetState:a,rootState:s})=>{const l=rt({builder:t,context:n,event:i,state:Ee({rootState:s,localState:r,rootSetState:a})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function st(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const lt=({shouldLogWarning:e})=>{var r;if(!st())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.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},ct=e=>(f.isBrowser()||lt({shouldLogWarning:!0}),fe(e)),ut=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,dt=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,mt=e=>{var t,n,i,r,a,s;return((i=(n=(t=ut.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(a=(r=dt.exec(e.trim()))==null?void 0:r.groups)==null?void 0:a.getPath)==null?void 0:s.slice(1))};function U({code:e,context:t,localState:n,rootState:i,rootSetState:r,event:a,isExpression:s=!0}){if(e.trim()==="")return;const l=mt(e.trim());if(l)return we({...i,...n},l);const c={code:ot(e,{isExpression:s}),builder:at(),context:t,event:a,rootSetState:r,rootState:i,localState:n};try{return ct(c)}catch(u){f.logger.error("Failed code evaluation: "+u.message,{code:e});return}}function ft(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...gt(e,t)}}const gt=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(r,a)=>U({code:a,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function ht(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function X(e,t,n=null,i=null,r=new WeakSet){if(e==null||typeof e!="object"){t(e,a=>{n!==null&&i!==null&&(n[i]=a)});return}r.has(e)||(r.add(e),Array.isArray(e)?e.forEach((a,s)=>{t(a,c=>{e[s]=c}),X(a,t,e,s,r)}):Object.entries(e).forEach(([a,s])=>{t(s,c=>{e[a]=c}),X(s,t,e,a,r)}))}function Re(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function bt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return X(e,n=>{if(Re(n)){t=!0;return}}),t}function yt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(X(e,(n,i)=>{var r;Re(n)&&i((r=n[t])!=null?r:void 0)}),e)}function pt(e,t){var n,i;return(n=e.component)!=null&&n.options&&bt((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=yt(e.component.options,t!=null?t:"Default")),e}const ce=e=>JSON.parse(JSON.stringify(e)),Pe=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((r,a,s)=>Object(r[a])===r[a]?r[a]:r[a]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const xt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),vt=e=>{if(xt){const t=ce(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(ht(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},St=({block:e,context:t,localState:n,rootState:i,rootSetState:r})=>{if(!e.bindings)return e;const a=vt(e);for(const s in e.bindings){const l=e.bindings[s],c=U({code:l,localState:n,rootState:i,rootSetState:r,context:t});Pe(a,s,c)}return a};function kt({block:e,context:t,localState:n,rootState:i,rootSetState:r}){let a=pt(e,i.locale);return a=a,St({block:a,localState:n,rootState:i,rootSetState:r,context:t})}const ee=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Ct(e,t,n={}){let i,r,a,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,a=e.apply(i,r),s||(i=r=null)};return function(){const u=Date.now();!l&&n.leading===!1&&(l=u);const h=t-(u-l);return i=this,r=arguments,h<=0||h>t?(s&&(clearTimeout(s),s=null),l=u,a=e.apply(i,r),s||(i=r=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,h)),a}}function q(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const r=arguments[i];if(r!=null)for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n}function Tt(e){for(const t of e)switch(t.trigger){case"pageLoad":je(t);break;case"scrollInView":wt(t);break}}function Ae(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ve(e,t){const n=It(e),i=getComputedStyle(t),r=e.steps[0].styles,a=e.steps[e.steps.length-1].styles,s=[r,a];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function It(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function je(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n),n.style.transition="none",n.style.transitionDelay="0",q(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),q(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function wt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n);let i=!1,r=!1;function a(){!i&&l(n)?(i=!0,r=!0,setTimeout(()=>{q(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!r&&!l(n)&&(i=!1,q(n.style,e.steps[0].styles))}const s=Ct(a,200,{leading:!1});function l(h){const p=h.getBoundingClientRect(),m=window.innerHeight,d=(e.thresholdPercent||0)/100*m;return p.bottom>d&&p.top<m-d}const c=e.steps[0].styles;function u(){q(n.style,c)}u(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),a()})}const Be=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${ee(n)}: ${i};`}).filter(f.checkIsDefined),Et=e=>Be(e).join(`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./server-entry-d2f19ab1.cjs"),o=require("react/jsx-runtime"),g=require("react");function et(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const tt=et(g),nt=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),it=e=>typeof e=="string"&&nt.has(e.toLowerCase());function le(e){return o.jsx(o.Fragment,{children:it(e.TagName)?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):o.jsx(o.Fragment,{children:typeof e.TagName=="string"?o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const L=()=>{switch(f.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function Te(e){function t(){return{...e.attributes,[L()]:`${e.link?"":"builder-button"} ${e.attributes[L()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return o.jsx(le,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const Z=g.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),Ie=g.createContext({registeredComponents:{}}),we=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((r,a)=>r!=null?r[a]:r,e);return i===void 0||i===e?n:i},rt=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),at=()=>({isEditing:f.isEditing(),isBrowser:f.isBrowser(),isServer:!f.isBrowser(),getUserAttributes:()=>f.getUserAttributes()}),ot=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function Ee({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,r)=>{if(t&&r in t)return t[r];const a=i[r];return typeof a=="object"&&a!==null?Ee({rootState:a,localState:void 0,rootSetState:n?s=>{i[r]=s,n(i)}:void 0}):a},set:(i,r,a)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[r]=a,n==null||n(i),!0}})}const fe=({code:e,builder:t,context:n,event:i,localState:r,rootSetState:a,rootState:s})=>{const l=rt({builder:t,context:n,event:i,state:Ee({rootState:s,localState:r,rootSetState:a})});return new Function(...l.map(([c])=>c),e)(...l.map(([,c])=>c))};function st(){var e;return typeof process!="undefined"&&f.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const lt=({shouldLogWarning:e})=>{var r;if(!st())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(r=process.env.NODE_OPTIONS)==null?void 0:r.includes("--no-node-snapshot");return t&&n&&!i?(e&&f.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},ct=e=>(f.isBrowser()||lt({shouldLogWarning:!0}),fe(e)),ut=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,dt=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,mt=e=>{var t,n,i,r,a,s;return((i=(n=(t=ut.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((s=(a=(r=dt.exec(e.trim()))==null?void 0:r.groups)==null?void 0:a.getPath)==null?void 0:s.slice(1))};function U({code:e,context:t,localState:n,rootState:i,rootSetState:r,event:a,isExpression:s=!0}){if(e.trim()==="")return;const l=mt(e.trim());if(l)return we({...i,...n},l);const c={code:ot(e,{isExpression:s}),builder:at(),context:t,event:a,rootSetState:r,rootState:i,localState:n};try{return ct(c)}catch(u){f.logger.error("Failed code evaluation: "+u.message,{code:e});return}}function ft(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...gt(e,t)}}const gt=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(r,a)=>U({code:a,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function ht(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function X(e,t,n=null,i=null,r=new WeakSet){if(e==null||typeof e!="object"){t(e,a=>{n!==null&&i!==null&&(n[i]=a)});return}r.has(e)||(r.add(e),Array.isArray(e)?e.forEach((a,s)=>{t(a,c=>{e[s]=c}),X(a,t,e,s,r)}):Object.entries(e).forEach(([a,s])=>{t(s,c=>{e[a]=c}),X(s,t,e,a,r)}))}function Re(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function bt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return X(e,n=>{if(Re(n)){t=!0;return}}),t}function yt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(X(e,(n,i)=>{var r;Re(n)&&i((r=n[t])!=null?r:void 0)}),e)}function pt(e,t){var n,i;return(n=e.component)!=null&&n.options&&bt((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=yt(e.component.options,t!=null?t:"Default")),e}const ce=e=>JSON.parse(JSON.stringify(e)),Pe=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((r,a,s)=>Object(r[a])===r[a]?r[a]:r[a]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};function se(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>se(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=se(e[n]));return t}const xt=["svelte","vue","angular","qwik","solid"].includes(f.TARGET),vt=e=>{if(xt){const t=ce(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=se(ht(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},St=({block:e,context:t,localState:n,rootState:i,rootSetState:r})=>{if(!e.bindings)return e;const a=vt(e);for(const s in e.bindings){const l=e.bindings[s],c=U({code:l,localState:n,rootState:i,rootSetState:r,context:t});Pe(a,s,c)}return a};function kt({block:e,context:t,localState:n,rootState:i,rootSetState:r}){let a=pt(e,i.locale);return a=a,St({block:a,localState:n,rootState:i,rootSetState:r,context:t})}const ee=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Ct(e,t,n={}){let i,r,a,s=null,l=0;const c=function(){l=n.leading===!1?0:Date.now(),s=null,a=e.apply(i,r),s||(i=r=null)};return function(){const u=Date.now();!l&&n.leading===!1&&(l=u);const h=t-(u-l);return i=this,r=arguments,h<=0||h>t?(s&&(clearTimeout(s),s=null),l=u,a=e.apply(i,r),s||(i=r=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,h)),a}}function q(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const r=arguments[i];if(r!=null)for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n}function Tt(e){for(const t of e)switch(t.trigger){case"pageLoad":je(t);break;case"scrollInView":wt(t);break}}function Ae(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ve(e,t){const n=It(e),i=getComputedStyle(t),r=e.steps[0].styles,a=e.steps[e.steps.length-1].styles,s=[r,a];for(const l of s)for(const c of n)c in l||(l[c]=i[c])}function It(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function je(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n),n.style.transition="none",n.style.transitionDelay="0",q(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),q(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function wt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Ae(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ve(e,n);let i=!1,r=!1;function a(){!i&&l(n)?(i=!0,r=!0,setTimeout(()=>{q(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!r&&!l(n)&&(i=!1,q(n.style,e.steps[0].styles))}const s=Ct(a,200,{leading:!1});function l(h){const p=h.getBoundingClientRect(),m=window.innerHeight,d=(e.thresholdPercent||0)/100*m;return p.bottom>d&&p.top<m-d}const c=e.steps[0].styles;function u(){q(n.style,c)}u(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${ee(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),a()})}const Be=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${ee(n)}: ${i};`}).filter(f.checkIsDefined),Et=e=>Be(e).join(`
2
2
  `),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
3
  ${Et(n)}
4
4
  }`;return e?`${e} {
@@ -350,7 +350,7 @@ font-weight: ${l};
350
350
  text-align: inherit;
351
351
  font-family: inherit;
352
352
  }
353
- `,si=e=>e?"":oi,li=e=>`variant-${e}`;function ci(e){var C,T,A;const t=g.useRef(null);g.useState(()=>!1);function n(I){var y,k;const w={...e.builderContextSignal.rootState,...I};e.builderContextSignal.rootSetState?(k=(y=e.builderContextSignal).rootSetState)==null||k.call(y,w):e.setBuilderContextSignal(E=>({...E,rootState:w}))}function i(I){var y,k,E,N,W;const w={...e.builderContextSignal.content,...I,data:{...(y=e.builderContextSignal.content)==null?void 0:y.data,...I==null?void 0:I.data},meta:{...(k=e.builderContextSignal.content)==null?void 0:k.meta,...I==null?void 0:I.meta,breakpoints:((E=I==null?void 0:I.meta)==null?void 0:E.breakpoints)||((W=(N=e.builderContextSignal.content)==null?void 0:N.meta)==null?void 0:W.breakpoints)}};e.setBuilderContextSignal(B=>({...B,content:w}))}function r(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[a,s]=g.useState(()=>e.contentWrapper||"div");function l(I){return f.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:w=>{var E;const{breakpoints:y,contentId:k}=w;!k||k!==((E=e.builderContextSignal.content)==null?void 0:E.id)||y&&i({meta:{breakpoints:y}})},animation:w=>{je(w)},contentUpdate:w=>{i(w)},stateUpdate:w=>{n(w)}}})(I)}const[c,u]=g.useState(()=>({})),[h,p]=g.useState(()=>({})),[m,S]=g.useState(()=>!1);function d(I){var w,y;if(e.builderContextSignal.content){const k=(w=e.builderContextSignal.content)==null?void 0:w.testVariationId,E=(y=e.builderContextSignal.content)==null?void 0:y.id;f._track({apiHost:e.apiHost,type:"click",canTrack:f.getDefaultCanTrack(e.canTrack),contentId:E,apiKey:e.apiKey,variationId:k!==E?k:void 0,...ti(I),unique:!m})}m||S(!0)}function b(){var w,y,k;const I=(k=(y=(w=e.builderContextSignal.content)==null?void 0:w.data)==null?void 0:y.httpRequests)!=null?k:{};Object.entries(I).forEach(([E,N])=>{if(!N||h[E]||c[E]&&!f.isEditing())return;h[E]=!0;const W=N.replace(/{{([^}]+)}}/g,(B,P)=>String(U({code:P,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));f.logFetch(W),fetch(W).then(B=>B.json()).then(B=>{n({[E]:B}),c[E]=!0}).catch(B=>{console.error("error fetching dynamic data",N,B)}).finally(()=>{h[E]=!1})})}function v(){f.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:ce(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const x=g.useRef(!1);return x.current||(b(),v(),x.current=!0),g.useEffect(()=>{var I,w,y,k,E;if(f.isBrowser()){f.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),f.registerInsertMenu(),f.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(I=e.model)!=null?I:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(P=>{var $,R;if(!(($=P.models)!=null&&$.length)||P.models.includes(e.model)){const V=f.createRegisterComponentMessage(P);(R=window.parent)==null||R.postMessage(V,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",v));const N=e.builderContextSignal.content&&f.getDefaultCanTrack(e.canTrack),W=f.getCookieSync({name:`builder.tests.${(w=e.builderContextSignal.content)==null?void 0:w.id}`,canTrack:!0}),B=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId;if(N&&B===W){const P=(k=e.builderContextSignal.content)==null?void 0:k.id,$=e.apiKey;f._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:P,apiKey:$,variationId:W!==P?W:void 0})}if(f.isPreviewing()&&!f.isEditing()){const P=new URL(location.href).searchParams,$=P.get("builder.preview"),R=P.get(`builder.overrides.${$}`),V=P.get("apiKey")||P.get("builder.space");($==="BUILDER_STUDIO"||$===e.model&&V===e.apiKey&&(!e.content||R===e.content.id))&&f.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...$==="BUILDER_STUDIO"&&((E=e.context)!=null&&E.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(j=>{j&&i(j)})}}},[]),g.useEffect(()=>{e.content&&i(e.content)},[e.content]),g.useEffect(()=>{v()},[e.builderContextSignal.rootState]),g.useEffect(()=>{e.data&&n(e.data)},[e.data]),g.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),g.useEffect(()=>()=>{f.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",v))},[]),o.jsx(Z.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||ke()?o.jsx(a,{ref:t,onClick:I=>d(I),"builder-content-id":(C=e.builderContextSignal.content)==null?void 0:C.id,"builder-model":e.model,className:li(((T=e.content)==null?void 0:T.testVariationId)||((A=e.content)==null?void 0:A.id)),style:{display:!e.builderContextSignal.content&&ke()?"none":void 0},...r(),...e.contentWrapperProps,children:e.children}):null})}function ui(e){const[t,n]=g.useState(()=>`
353
+ `,si=e=>e?"":oi,li=e=>`variant-${e}`;function ci(e){var C,T,A;const t=g.useRef(null);g.useState(()=>!1);function n(I){var y,k;const w={...e.builderContextSignal.rootState,...I};e.builderContextSignal.rootSetState?(k=(y=e.builderContextSignal).rootSetState)==null||k.call(y,w):e.setBuilderContextSignal(E=>({...E,rootState:w}))}function i(I){var y,k,E,N,W;const w={...e.builderContextSignal.content,...I,data:{...(y=e.builderContextSignal.content)==null?void 0:y.data,...I==null?void 0:I.data},meta:{...(k=e.builderContextSignal.content)==null?void 0:k.meta,...I==null?void 0:I.meta,breakpoints:((E=I==null?void 0:I.meta)==null?void 0:E.breakpoints)||((W=(N=e.builderContextSignal.content)==null?void 0:N.meta)==null?void 0:W.breakpoints)}};e.setBuilderContextSignal(B=>({...B,content:w}))}function r(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[a,s]=g.useState(()=>e.contentWrapper||"div");function l(I){return f.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:w=>{var E;const{breakpoints:y,contentId:k}=w;!k||k!==((E=e.builderContextSignal.content)==null?void 0:E.id)||y&&i({meta:{breakpoints:y}})},animation:w=>{je(w)},contentUpdate:w=>{i(w)},stateUpdate:w=>{n(w)}}})(I)}const[c,u]=g.useState(()=>({})),[h,p]=g.useState(()=>({})),[m,S]=g.useState(()=>!1);function d(I){var w,y;if(e.builderContextSignal.content){const k=(w=e.builderContextSignal.content)==null?void 0:w.testVariationId,E=(y=e.builderContextSignal.content)==null?void 0:y.id;f._track({apiHost:e.apiHost,type:"click",canTrack:f.getDefaultCanTrack(e.canTrack),contentId:E,apiKey:e.apiKey,variationId:k!==E?k:void 0,...ti(I),unique:!m})}m||S(!0)}function b(){var w,y,k;const I=(k=(y=(w=e.builderContextSignal.content)==null?void 0:w.data)==null?void 0:y.httpRequests)!=null?k:{};Object.entries(I).forEach(([E,N])=>{if(!N||h[E]||c[E]&&!f.isEditing())return;h[E]=!0;const W=N.replace(/{{([^}]+)}}/g,(B,P)=>String(U({code:P,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));f.logFetch(W),fetch(W).then(B=>B.json()).then(B=>{n({[E]:B}),c[E]=!0}).catch(B=>{console.error("error fetching dynamic data",N,B)}).finally(()=>{h[E]=!1})})}function v(){f.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:ce(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const x=g.useRef(!1);return x.current||(b(),v(),x.current=!0),g.useEffect(()=>{var I,w,y,k,E;if(f.isBrowser()){f.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),f.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(I=e.model)!=null?I:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(P=>{var $,R;if(!(($=P.models)!=null&&$.length)||P.models.includes(e.model)){const V=f.createRegisterComponentMessage(P);(R=window.parent)==null||R.postMessage(V,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",v));const N=e.builderContextSignal.content&&f.getDefaultCanTrack(e.canTrack),W=f.getCookieSync({name:`builder.tests.${(w=e.builderContextSignal.content)==null?void 0:w.id}`,canTrack:!0}),B=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId;if(N&&B===W){const P=(k=e.builderContextSignal.content)==null?void 0:k.id,$=e.apiKey;f._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:P,apiKey:$,variationId:W!==P?W:void 0})}if(f.isPreviewing()&&!f.isEditing()){const P=new URL(location.href).searchParams,$=P.get("builder.preview"),R=P.get(`builder.overrides.${$}`),V=P.get("apiKey")||P.get("builder.space");($==="BUILDER_STUDIO"||$===e.model&&V===e.apiKey&&(!e.content||R===e.content.id))&&f.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...$==="BUILDER_STUDIO"&&((E=e.context)!=null&&E.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(j=>{j&&i(j)})}}},[]),g.useEffect(()=>{e.content&&i(e.content)},[e.content]),g.useEffect(()=>{v()},[e.builderContextSignal.rootState]),g.useEffect(()=>{e.data&&n(e.data)},[e.data]),g.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),g.useEffect(()=>()=>{f.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",v))},[]),o.jsx(Z.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||ke()?o.jsx(a,{ref:t,onClick:I=>d(I),"builder-content-id":(C=e.builderContextSignal.content)==null?void 0:C.id,"builder-model":e.model,className:li(((T=e.content)==null?void 0:T.testVariationId)||((A=e.content)==null?void 0:A.id)),style:{display:!e.builderContextSignal.content&&ke()?"none":void 0},...r(),...e.contentWrapperProps,children:e.children}):null})}function ui(e){const[t,n]=g.useState(()=>`
354
354
  ${ai({cssCode:e.cssCode,contentId:e.contentId})}
355
355
  ${ri({customFonts:e.customFonts})}
356
356
  ${si(e.isNestedRender)}