@builder.io/sdk-react 1.0.11 → 1.0.12

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 (62) hide show
  1. package/lib/browser/blocks-exports.cjs +30 -30
  2. package/lib/browser/blocks-exports.mjs +875 -842
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-acc5a9c8.js → server-entry-34e4efb1.js} +1 -1
  6. package/lib/browser/{server-entry-4829e1ce.cjs → server-entry-60df1736.cjs} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/blocks-03ffaaf9.cjs +32 -0
  10. package/lib/edge/blocks-exports.cjs +1 -1
  11. package/lib/edge/blocks-exports.mjs +2 -2
  12. package/lib/edge/{blocks-244199ab.js → blocks-f8d5d3a0.js} +1003 -967
  13. package/lib/edge/{button-8cd5d71a.cjs → button-5137d1bc.cjs} +1 -1
  14. package/lib/edge/{button-73916377.js → button-5543875e.js} +3 -3
  15. package/lib/edge/{columns-c7d9b9f1.js → columns-a05f9fd8.js} +33 -33
  16. package/lib/edge/{columns-88c9df52.cjs → columns-ad62a5ce.cjs} +2 -2
  17. package/lib/edge/{content-variants-d5455178.js → content-variants-74109911.js} +106 -99
  18. package/lib/edge/{content-variants-1a65d814.cjs → content-variants-e6ba9024.cjs} +6 -6
  19. package/lib/edge/dynamic-renderer-8b343325.js +8 -0
  20. package/lib/edge/{dynamic-renderer-1c9f24c0.cjs → dynamic-renderer-b29b45ca.cjs} +1 -1
  21. package/lib/edge/{form-ad532981.js → form-67a4ec0b.js} +56 -66
  22. package/lib/edge/form-ee52f842.cjs +1 -0
  23. package/lib/edge/{get-class-prop-name-1178de8b.js → get-class-prop-name-25116ae3.js} +1 -1
  24. package/lib/edge/{get-class-prop-name-c082f4f3.cjs → get-class-prop-name-7ab1534a.cjs} +1 -1
  25. package/lib/edge/{image-2cc909d9.js → image-0008c792.js} +25 -25
  26. package/lib/edge/image-ee3dd857.cjs +17 -0
  27. package/lib/edge/{img-f61f7931.cjs → img-147fc69c.cjs} +1 -1
  28. package/lib/edge/{img-749d10ed.js → img-43af4666.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/{input-ccec5aae.js → input-35088f50.js} +1 -1
  32. package/lib/edge/{input-184da708.cjs → input-90830684.cjs} +1 -1
  33. package/lib/edge/{select-a5fc0333.cjs → select-1e63f097.cjs} +1 -1
  34. package/lib/edge/{select-50a6db92.js → select-ee16e4ee.js} +1 -1
  35. package/lib/edge/{server-entry-178f215d.cjs → server-entry-39e6b4a6.cjs} +1 -1
  36. package/lib/edge/{server-entry-1cbf5bef.js → server-entry-f2d127da.js} +1 -1
  37. package/lib/edge/server-entry.cjs +1 -1
  38. package/lib/edge/server-entry.mjs +1 -1
  39. package/lib/edge/{slot-d3ff8e4d.cjs → slot-3db582db.cjs} +1 -1
  40. package/lib/edge/{slot-dad01f2d.js → slot-45a2e0bf.js} +4 -4
  41. package/lib/edge/{symbol-b6db0014.js → symbol-75231166.js} +2 -2
  42. package/lib/edge/{symbol-31283b30.cjs → symbol-c533a54f.cjs} +1 -1
  43. package/lib/edge/{video-d02ff89b.js → video-58c2cc8d.js} +15 -15
  44. package/lib/edge/video-e20dcbbc.cjs +1 -0
  45. package/lib/node/blocks-exports.cjs +17 -17
  46. package/lib/node/blocks-exports.mjs +473 -440
  47. package/lib/node/index.cjs +1 -1
  48. package/lib/node/index.mjs +1 -1
  49. package/lib/node/{server-entry-856d379b.cjs → server-entry-81eab45c.cjs} +1 -1
  50. package/lib/node/{server-entry-09a75819.js → server-entry-a0cd9606.js} +1 -1
  51. package/lib/node/server-entry.cjs +1 -1
  52. package/lib/node/server-entry.mjs +1 -1
  53. package/package.json +1 -1
  54. package/types/components/block/block.helpers.d.ts +4 -0
  55. package/types/constants/sdk-version.d.ts +1 -1
  56. package/types/functions/evaluate/evaluate.d.ts +3 -1
  57. package/types/functions/evaluate/helpers.d.ts +1 -0
  58. package/lib/edge/blocks-a05f6af2.cjs +0 -32
  59. package/lib/edge/dynamic-renderer-96ba4e48.js +0 -8
  60. package/lib/edge/form-713c6da6.cjs +0 -1
  61. package/lib/edge/image-7e1361ce.cjs +0 -17
  62. package/lib/edge/video-64014cc4.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),o=require("react"),c=require("./server-entry-178f215d.cjs"),C=require("./blocks-exports.cjs"),T=require("./blocks-a05f6af2.cjs");require("./get-class-prop-name-c082f4f3.cjs");require("./dynamic-renderer-1c9f24c0.cjs");const G={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},Q={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(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(p=>p.get("width"))&&(n.find(f=>!f.get("width"))||n.reduce((h,u)=>h+u.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}]},X={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Z={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(i,h=6e4){return new Promise((u,y)=>{const x=document.createElement("img");let k=!1;x.onload=()=>{k=!0,u(x)},x.addEventListener("error",I=>{console.warn("Image load failed",I.error),y(I.error)}),x.src=i,setTimeout(()=>{k||y(new Error("Image load timed out"))},h)})}function a(i){return Math.round(i*1e3)/1e3}const p=e.get("image"),f=e.get("aspectRatio");if(fetch(p).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&e.set("noWebp",!0)}),p&&(!f||f===.7041))return n(p).then(i=>{const h=e.get("aspectRatio");e.get("image")===p&&(!h||h===.7041)&&i.width&&i.height&&(e.set("aspectRatio",a(i.height/i.width)),e.set("height",i.height),e.set("width",i.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}]},ee={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>"}}}]},te={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"}]},ne=o.lazy(()=>Promise.resolve().then(()=>require("./slot-d3ff8e4d.cjs"))),ae={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"}]},ie={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"}},oe={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}]},re=o.lazy(()=>Promise.resolve().then(()=>require("./custom-code-6d9730ff.cjs"))),se={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(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{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}]},le=o.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),de={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},ce=o.lazy(()=>Promise.resolve().then(()=>require("./form-713c6da6.cjs"))),ue={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}},me=o.lazy(()=>Promise.resolve().then(()=>require("./input-184da708.cjs"))),pe={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0},ge=o.lazy(()=>Promise.resolve().then(()=>require("./select-a5fc0333.cjs"))),fe={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0},he=o.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),be={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},ye=o.lazy(()=>Promise.resolve().then(()=>require("./img-f61f7931.cjs"))),xe={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},Se=()=>[{component:re,...oe},{component:le,...se},{component:ce,...de},{component:me,...ue},{component:he,...fe},{component:ge,...pe},{component:ye,...be},{component:C.Video,...xe}],_=()=>[{component:C.Button,...G},{component:C.Columns,...Q},{component:C.Fragment,...X},{component:C.Image,...Z},{component:C.Section,...ee},{component:ne,...te},{component:C.Symbol,...ae},{component:C.Text,...ie},...Se()],ve=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),o=require("react"),c=require("./server-entry-39e6b4a6.cjs"),C=require("./blocks-exports.cjs"),T=require("./blocks-03ffaaf9.cjs");require("./get-class-prop-name-7ab1534a.cjs");require("./dynamic-renderer-b29b45ca.cjs");const G={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},Q={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(a=>{a.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(m=>m.get("width"))&&(n.find(g=>!g.get("width"))||n.reduce((f,u)=>f+u.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}]},X={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Z={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(i,f=6e4){return new Promise((u,y)=>{const x=document.createElement("img");let k=!1;x.onload=()=>{k=!0,u(x)},x.addEventListener("error",I=>{console.warn("Image load failed",I.error),y(I.error)}),x.src=i,setTimeout(()=>{k||y(new Error("Image load timed out"))},f)})}function a(i){return Math.round(i*1e3)/1e3}const m=e.get("image"),g=e.get("aspectRatio");if(fetch(m).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&e.set("noWebp",!0)}),m&&(!g||g===.7041))return n(m).then(i=>{const f=e.get("aspectRatio");e.get("image")===m&&(!f||f===.7041)&&i.width&&i.height&&(e.set("aspectRatio",a(i.height/i.width)),e.set("height",i.height),e.set("width",i.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}]},ee={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>"}}}]},te={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"}]},ne=o.lazy(()=>Promise.resolve().then(()=>require("./slot-3db582db.cjs"))),ae={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"}]},ie={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"}},oe={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}]},re=o.lazy(()=>Promise.resolve().then(()=>require("./custom-code-6d9730ff.cjs"))),se={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(a=>a.json()).then(a=>{e.get("url")===t&&(a.html?e.set("content",a.html):e.set("content","Invalid url, please try another"))}).catch(a=>{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}]},le=o.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),de={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},ce=o.lazy(()=>Promise.resolve().then(()=>require("./form-ee52f842.cjs"))),ue={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}},me=o.lazy(()=>Promise.resolve().then(()=>require("./input-90830684.cjs"))),pe={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0},ge=o.lazy(()=>Promise.resolve().then(()=>require("./select-1e63f097.cjs"))),fe={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0},he=o.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),be={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},ye=o.lazy(()=>Promise.resolve().then(()=>require("./img-147fc69c.cjs"))),xe={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},Se=()=>[{component:re,...oe},{component:le,...se},{component:ce,...de},{component:me,...ue},{component:he,...fe},{component:ge,...pe},{component:ye,...be},{component:C.Video,...xe}],_=()=>[{component:C.Button,...G},{component:C.Columns,...Q},{component:C.Fragment,...X},{component:C.Image,...Z},{component:C.Section,...ee},{component:ne,...te},{component:C.Symbol,...ae},{component:C.Text,...ie},...Se()],ve=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
2
2
  function getAndSetVariantId() {
3
3
  function setCookie(name, value, days) {
4
4
  let expires = '';
@@ -96,21 +96,21 @@
96
96
  "${t}",${JSON.stringify(e)}, ${J}
97
97
  )`,Ve=({contentId:e,variationId:t})=>`window.${O}(
98
98
  "${t}", "${e}", ${J}
99
- )`;function A(e){return m.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function B(e){return Math.round(e*1e3)/1e3}const Ee=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let a=n?e:e.parentElement;do{if(!a)return null;if(t(a))return a}while(a=a.parentElement);return null},Re=e=>Ee(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),M=({event:e,target:t})=>{const n=t.getBoundingClientRect(),a=e.clientX-n.left,p=e.clientY-n.top,f=B(a/n.width),i=B(p/n.height);return{x:f,y:i}},Fe=e=>{const t=e.target,n=t&&Re(t),a=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:a||void 0,metadata:{targetOffset:t?M({event:e,target:t}):void 0,builderTargetOffset:n?M({event:e,target:n}):void 0,builderElementIndex:n&&a?[].slice.call(document.getElementsByClassName(a)).indexOf(n):void 0}}};function We(e){var q,U,D,$,H,L,K;const t=o.useRef(null),[n,a]=o.useState(()=>0);o.useState(()=>!0);function p(r){var l,d;const s={...e.builderContextSignal.rootState,...r};e.builderContextSignal.rootSetState?(d=(l=e.builderContextSignal).rootSetState)==null||d.call(l,s):e.setBuilderContextSignal(g=>({...g,rootState:s}))}function f(r){var l,d,g,b,V;const s={...e.builderContextSignal.content,...r,data:{...(l=e.builderContextSignal.content)==null?void 0:l.data,...r==null?void 0:r.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...r==null?void 0:r.meta,breakpoints:((g=r==null?void 0:r.meta)==null?void 0:g.breakpoints)||((V=(b=e.builderContextSignal.content)==null?void 0:b.meta)==null?void 0:V.breakpoints)}};e.setBuilderContextSignal(F=>({...F,content:s}))}o.useState(()=>0);const[i,h]=o.useState(()=>!1),[u,y]=o.useState(()=>e.contentWrapper||"div");function x(r){return c.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:s=>{var g;const{breakpoints:l,contentId:d}=s;!d||d!==((g=e.builderContextSignal.content)==null?void 0:g.id)||l&&(f({meta:{breakpoints:l}}),a(n+1))},animation:s=>{T.triggerAnimation(s)},contentUpdate:s=>{f(s),a(n+1)}}})(r)}function k(){var s,l;const r=(l=(s=e.builderContextSignal.content)==null?void 0:s.data)==null?void 0:l.jsCode;r&&T.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[I,P]=o.useState(()=>({})),[E,S]=o.useState(()=>!1);function v(r){var s,l;if(e.builderContextSignal.content){const d=(s=e.builderContextSignal.content)==null?void 0:s.testVariationId,g=(l=e.builderContextSignal.content)==null?void 0:l.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:g,apiKey:e.apiKey,variationId:d!==g?d:void 0,...Fe(r),unique:!E})}E||S(!0)}function w(r){return r.replace(/{{([^}]+)}}/g,(s,l)=>T.evaluate({code:l,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function Y({url:r,key:s}){c.fetch(r).then(l=>l.json()).then(l=>{var g,b;const d={...e.builderContextSignal.rootState,[s]:l};(b=(g=e.builderContextSignal).rootSetState)==null||b.call(g,d),I[s]=!0}).catch(l=>{console.error("error fetching dynamic data",r,l)})}function j(){var s,l,d;const r=(d=(l=(s=e.builderContextSignal.content)==null?void 0:s.data)==null?void 0:l.httpRequests)!=null?d:{};Object.entries(r).forEach(([g,b])=>{if(b&&(!I[g]||c.isEditing())){const V=w(b);Y({url:V,key:g})}})}function R(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return o.useEffect(()=>{var r,s;if(c.isBrowser()){if(c.isEditing()&&(a(n+1),window.addEventListener("message",x),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(d=>{var b;const g=c.createRegisterComponentMessage(d);(b=window.parent)==null||b.postMessage(g,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",R)),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(r=e.builderContextSignal.content)==null?void 0:r.testVariationId,g=(s=e.builderContextSignal.content)==null?void 0:s.id,b=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:g,apiKey:b,variationId:d!==g?d:void 0})}if(c.isPreviewing()){const d=new URL(location.href).searchParams,g=d.get("builder.preview"),b=d.get(`builder.preview.${g}`),V=d.get("apiKey")||d.get("builder.space");g===e.model&&V===e.apiKey&&(!e.content||b===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(F=>{F&&f(F)})}}},[]),o.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),k(),j(),R()},[]),o.useEffect(()=>{e.content&&f(e.content)},[e.content]),o.useEffect(()=>{},[i]),o.useEffect(()=>{k()},[(U=(q=e.builderContextSignal.content)==null?void 0:q.data)==null?void 0:U.jsCode]),o.useEffect(()=>{j()},[($=(D=e.builderContextSignal.content)==null?void 0:D.data)==null?void 0:$.httpRequests]),o.useEffect(()=>{R()},[e.builderContextSignal.rootState]),o.useEffect(()=>{e.data&&p(e.data)},[e.data]),o.useEffect(()=>{e.locale&&p({locale:e.locale})},[e.locale]),o.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",x),window.removeEventListener("builder:component:stateChangeListenerActivated",R))},[]),m.jsx(T.builderContext.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?m.jsx(m.Fragment,{children:o.createElement(u,{key:n,ref:t,onClick:r=>v(r),"builder-content-id":(H=e.builderContextSignal.content)==null?void 0:H.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((K=e.content)==null?void 0:K.id)}`},e.children)}):null})}const Pe=e=>{var f,i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],a=(i=e.fileUrl)!=null?i:(f=e==null?void 0:e.files)==null?void 0:f.regular;let p="";if(a&&t&&n&&(p+=`
99
+ )`;function A(e){return h.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function B(e){return Math.round(e*1e3)/1e3}const Ee=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let a=n?e:e.parentElement;do{if(!a)return null;if(t(a))return a}while(a=a.parentElement);return null},Re=e=>Ee(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),M=({event:e,target:t})=>{const n=t.getBoundingClientRect(),a=e.clientX-n.left,m=e.clientY-n.top,g=B(a/n.width),i=B(m/n.height);return{x:g,y:i}},Fe=e=>{const t=e.target,n=t&&Re(t),a=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:a||void 0,metadata:{targetOffset:t?M({event:e,target:t}):void 0,builderTargetOffset:n?M({event:e,target:n}):void 0,builderElementIndex:n&&a?[].slice.call(document.getElementsByClassName(a)).indexOf(n):void 0}}};function We(e){var q,U,D,$,H,L,K;const t=o.useRef(null),[n,a]=o.useState(()=>0);o.useState(()=>!0);function m(r){var l,d;const s={...e.builderContextSignal.rootState,...r};e.builderContextSignal.rootSetState?(d=(l=e.builderContextSignal).rootSetState)==null||d.call(l,s):e.setBuilderContextSignal(p=>({...p,rootState:s}))}function g(r){var l,d,p,b,V;const s={...e.builderContextSignal.content,...r,data:{...(l=e.builderContextSignal.content)==null?void 0:l.data,...r==null?void 0:r.data},meta:{...(d=e.builderContextSignal.content)==null?void 0:d.meta,...r==null?void 0:r.meta,breakpoints:((p=r==null?void 0:r.meta)==null?void 0:p.breakpoints)||((V=(b=e.builderContextSignal.content)==null?void 0:b.meta)==null?void 0:V.breakpoints)}};e.setBuilderContextSignal(F=>({...F,content:s}))}o.useState(()=>0);const[i,f]=o.useState(()=>!1),[u,y]=o.useState(()=>e.contentWrapper||"div");function x(r){return c.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:s=>{var p;const{breakpoints:l,contentId:d}=s;!d||d!==((p=e.builderContextSignal.content)==null?void 0:p.id)||l&&(g({meta:{breakpoints:l}}),a(n+1))},animation:s=>{T.triggerAnimation(s)},contentUpdate:s=>{g(s),a(n+1)}}})(r)}function k(){var s,l;const r=(l=(s=e.builderContextSignal.content)==null?void 0:s.data)==null?void 0:l.jsCode;r&&T.evaluate({code:r,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[I,P]=o.useState(()=>({})),[E,S]=o.useState(()=>!1);function v(r){var s,l;if(e.builderContextSignal.content){const d=(s=e.builderContextSignal.content)==null?void 0:s.testVariationId,p=(l=e.builderContextSignal.content)==null?void 0:l.id;c._track({type:"click",canTrack:c.getDefaultCanTrack(e.canTrack),contentId:p,apiKey:e.apiKey,variationId:d!==p?d:void 0,...Fe(r),unique:!E})}E||S(!0)}function w(r){return r.replace(/{{([^}]+)}}/g,(s,l)=>String(T.evaluate({code:l,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})))}function Y({url:r,key:s}){c.fetch(r).then(l=>l.json()).then(l=>{var p,b;const d={...e.builderContextSignal.rootState,[s]:l};(b=(p=e.builderContextSignal).rootSetState)==null||b.call(p,d),I[s]=!0}).catch(l=>{console.error("error fetching dynamic data",r,l)})}function j(){var s,l,d;const r=(d=(l=(s=e.builderContextSignal.content)==null?void 0:s.data)==null?void 0:l.httpRequests)!=null?d:{};Object.entries(r).forEach(([p,b])=>{if(b&&(!I[p]||c.isEditing())){const V=w(b);Y({url:V,key:p})}})}function R(){c.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:c.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return o.useEffect(()=>{var r,s;if(c.isBrowser()){if(c.isEditing()&&(a(n+1),window.addEventListener("message",x),c.registerInsertMenu(),c.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(d=>{var b;const p=c.createRegisterComponentMessage(d);(b=window.parent)==null||b.postMessage(p,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",R)),e.builderContextSignal.content&&c.getDefaultCanTrack(e.canTrack)){const d=(r=e.builderContextSignal.content)==null?void 0:r.testVariationId,p=(s=e.builderContextSignal.content)==null?void 0:s.id,b=e.apiKey;c._track({type:"impression",canTrack:!0,contentId:p,apiKey:b,variationId:d!==p?d:void 0})}if(c.isPreviewing()){const d=new URL(location.href).searchParams,p=d.get("builder.preview"),b=d.get(`builder.preview.${p}`),V=d.get("apiKey")||d.get("builder.space");p===e.model&&V===e.apiKey&&(!e.content||b===e.content.id)&&c.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(F=>{F&&g(F)})}}},[]),o.useEffect(()=>{e.apiKey||c.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),k(),j(),R()},[]),o.useEffect(()=>{e.content&&g(e.content)},[e.content]),o.useEffect(()=>{},[i]),o.useEffect(()=>{k()},[(U=(q=e.builderContextSignal.content)==null?void 0:q.data)==null?void 0:U.jsCode]),o.useEffect(()=>{j()},[($=(D=e.builderContextSignal.content)==null?void 0:D.data)==null?void 0:$.httpRequests]),o.useEffect(()=>{R()},[e.builderContextSignal.rootState]),o.useEffect(()=>{e.data&&m(e.data)},[e.data]),o.useEffect(()=>{e.locale&&m({locale:e.locale})},[e.locale]),o.useEffect(()=>()=>{c.isBrowser()&&(window.removeEventListener("message",x),window.removeEventListener("builder:component:stateChangeListenerActivated",R))},[]),h.jsx(T.builderContext.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?o.createElement(u,{key:n,ref:t,onClick:r=>v(r),"builder-content-id":(H=e.builderContextSignal.content)==null?void 0:H.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((L=e.content)==null?void 0:L.testVariationId)||((K=e.content)==null?void 0:K.id)}`},e.children):null})}const Pe=e=>{var g,i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],a=(i=e.fileUrl)!=null?i:(g=e==null?void 0:e.files)==null?void 0:g.regular;let m="";if(a&&t&&n&&(m+=`
100
100
  @font-face {
101
101
  font-family: "${t}";
102
102
  src: local("${n}"), url('${a}') format('woff2');
103
103
  font-display: fallback;
104
104
  font-weight: 400;
105
105
  }
106
- `.trim()),e.files)for(const h in e.files){if(!(String(Number(h))===h))continue;const y=e.files[h];y&&y!==a&&(p+=`
106
+ `.trim()),e.files)for(const f in e.files){if(!(String(Number(f))===f))continue;const y=e.files[f];y&&y!==a&&(m+=`
107
107
  @font-face {
108
108
  font-family: "${t}";
109
109
  src: url('${y}') format('woff2');
110
110
  font-display: fallback;
111
- font-weight: ${h};
111
+ font-weight: ${f};
112
112
  }
113
- `.trim())}return p},Ae=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Pe(n)))==null?void 0:t.join(" "))||""},je=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function qe(e){const[t,n]=o.useState(()=>`
113
+ `.trim())}return m},Ae=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Pe(n)))==null?void 0:t.join(" "))||""},je=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function qe(e){const[t,n]=o.useState(()=>`
114
114
  ${je({cssCode:e.cssCode,contentId:e.contentId})}
115
115
  ${Ae({customFonts:e.customFonts})}
116
116
 
@@ -130,4 +130,4 @@ ${Ae({customFonts:e.customFonts})}
130
130
  text-align: inherit;
131
131
  font-family: inherit;
132
132
  }
133
- `.trim());return m.jsx(T.InlinedStyles,{styles:t})}const Ue=({content:e,data:t,locale:n})=>{var f,i,h;const a={},p=((f=e==null?void 0:e.data)==null?void 0:f.state)||{};return(h=(i=e==null?void 0:e.data)==null?void 0:i.inputs)==null||h.forEach(u=>{u.name&&u.defaultValue!==void 0&&(a[u.name]=u.defaultValue)}),{...a,...p,...t,...n?{locale:n}:{}}},De=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function z(e){var u,y,x,k,I,P,E;const[t,n]=o.useState(()=>{var S,v;return Ve({variationId:(S=e.content)==null?void 0:S.testVariationId,contentId:(v=e.content)==null?void 0:v.id})});function a(S){h(v=>({...v,rootState:S}))}const[p,f]=o.useState(()=>[..._(),...e.customComponents||[]].reduce((S,{component:v,...w})=>({...S,[w.name]:{component:v,...c.serializeComponentInfo(w)}}),{})),[i,h]=o.useState(()=>({content:De({content:e.content,data:e.data}),localState:void 0,rootState:Ue({content:e.content,data:e.data,locale:e.locale}),rootSetState:a,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[..._(),...e.customComponents||[]].reduce((S,{component:v,...w})=>({...S,[w.name]:c.serializeComponentInfo(w)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return m.jsx(T.ComponentsContext.Provider,{value:{registeredComponents:p},children:m.jsxs(We,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:i,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:h,children:[e.isSsrAbTest?m.jsx(m.Fragment,{children:m.jsx(A,{scriptStr:t})}):null,m.jsx(m.Fragment,{children:m.jsx(qe,{contentId:(u=i.content)==null?void 0:u.id,cssCode:(x=(y=i.content)==null?void 0:y.data)==null?void 0:x.cssCode,customFonts:(I=(k=i.content)==null?void 0:k.data)==null?void 0:I.customFonts})}),m.jsx(T.Blocks,{blocks:(E=(P=i.content)==null?void 0:P.data)==null?void 0:E.blocks,context:i,registeredComponents:p,linkComponent:e.linkComponent})]})})}function $e(e){var i,h;const[t,n]=o.useState(()=>Ie({canTrack:c.getDefaultCanTrack(e.canTrack),content:e.content}));function a(){var u;return we(W(e.content).map(y=>({id:y.testVariationId,testRatio:y.testRatio})),((u=e.content)==null?void 0:u.id)||"")}function p(){return W(e.content).map(u=>`.variant-${u.testVariationId} { display: none; } `).join("")}function f(){var u;return t?{...e.content,testVariationId:(u=e.content)==null?void 0:u.id}:c.handleABTestingSync({item:e.content,canTrack:c.getDefaultCanTrack(e.canTrack)})}return o.useEffect(()=>{},[]),m.jsxs(m.Fragment,{children:[!e.__isNestedRender&&c.TARGET!=="reactNative"?m.jsx(m.Fragment,{children:m.jsx(A,{scriptStr:Te()})}):null,t?m.jsxs(m.Fragment,{children:[m.jsx(T.InlinedStyles,{id:`variants-styles-${(i=e.content)==null?void 0:i.id}`,styles:p()}),m.jsx(A,{scriptStr:a()}),(h=W(e.content))==null?void 0:h.map(u=>m.jsx(z,{content:u,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},u.testVariationId))]}):null,m.jsx(z,{content:f(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}exports.default=$e;
133
+ `.trim());return h.jsx(T.InlinedStyles,{styles:t})}const Ue=({content:e,data:t,locale:n})=>{var g,i,f;const a={},m=((g=e==null?void 0:e.data)==null?void 0:g.state)||{};return(f=(i=e==null?void 0:e.data)==null?void 0:i.inputs)==null||f.forEach(u=>{u.name&&u.defaultValue!==void 0&&(a[u.name]=u.defaultValue)}),{...a,...m,...t,...n?{locale:n}:{}}},De=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function z(e){var u,y,x,k,I,P,E;const[t,n]=o.useState(()=>{var S,v;return Ve({variationId:(S=e.content)==null?void 0:S.testVariationId,contentId:(v=e.content)==null?void 0:v.id})});function a(S){f(v=>({...v,rootState:S}))}const[m,g]=o.useState(()=>[..._(),...e.customComponents||[]].reduce((S,{component:v,...w})=>({...S,[w.name]:{component:v,...c.serializeComponentInfo(w)}}),{})),[i,f]=o.useState(()=>({content:De({content:e.content,data:e.data}),localState:void 0,rootState:Ue({content:e.content,data:e.data,locale:e.locale}),rootSetState:a,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[..._(),...e.customComponents||[]].reduce((S,{component:v,...w})=>({...S,[w.name]:c.serializeComponentInfo(w)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return h.jsx(T.ComponentsContext.Provider,{value:{registeredComponents:m},children:h.jsxs(We,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:i,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:f,children:[e.isSsrAbTest?h.jsx(A,{scriptStr:t}):null,h.jsx(qe,{contentId:(u=i.content)==null?void 0:u.id,cssCode:(x=(y=i.content)==null?void 0:y.data)==null?void 0:x.cssCode,customFonts:(I=(k=i.content)==null?void 0:k.data)==null?void 0:I.customFonts}),h.jsx(T.Blocks,{blocks:(E=(P=i.content)==null?void 0:P.data)==null?void 0:E.blocks,context:i,registeredComponents:m,linkComponent:e.linkComponent})]})})}function $e(e){var i,f;const[t,n]=o.useState(()=>Ie({canTrack:c.getDefaultCanTrack(e.canTrack),content:e.content}));function a(){var u;return we(W(e.content).map(y=>({id:y.testVariationId,testRatio:y.testRatio})),((u=e.content)==null?void 0:u.id)||"")}function m(){return W(e.content).map(u=>`.variant-${u.testVariationId} { display: none; } `).join("")}function g(){var u;return t?{...e.content,testVariationId:(u=e.content)==null?void 0:u.id}:c.handleABTestingSync({item:e.content,canTrack:c.getDefaultCanTrack(e.canTrack)})}return o.useEffect(()=>{},[]),h.jsxs(h.Fragment,{children:[!e.__isNestedRender&&c.TARGET!=="reactNative"?h.jsx(A,{scriptStr:Te()}):null,t?h.jsxs(h.Fragment,{children:[h.jsx(T.InlinedStyles,{id:`variants-styles-${(i=e.content)==null?void 0:i.id}`,styles:m()}),h.jsx(A,{scriptStr:a()}),(f=W(e.content))==null?void 0:f.map(u=>h.jsx(z,{content:u,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},u.testVariationId))]}):null,h.jsx(z,{content:g(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}exports.default=$e;
@@ -0,0 +1,8 @@
1
+ import { jsx as t, Fragment as n } from "react/jsx-runtime";
2
+ const a = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), i = (e) => typeof e == "string" && a.has(e.toLowerCase());
3
+ function c(e) {
4
+ return /* @__PURE__ */ t(n, { children: i(e.TagName) ? /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ t(n, { children: typeof e.TagName == "string" ? /* @__PURE__ */ t(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ t(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
5
+ }
6
+ export {
7
+ c as DynamicRenderer
8
+ };
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),n=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),a=e=>typeof e=="string"&&n.has(e.toLowerCase());function i(e){return t.jsx(t.Fragment,{children:a(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}exports.DynamicRenderer=i;
1
+ "use strict";const t=require("react/jsx-runtime"),n=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),a=e=>typeof e=="string"&&n.has(e.toLowerCase());function i(e){return t.jsx(t.Fragment,{children:a(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}exports.DynamicRenderer=i;
@@ -1,53 +1,53 @@
1
- import { jsxs as S, Fragment as m, jsx as s } from "react/jsx-runtime";
2
- import { useRef as J, useState as E } from "react";
3
- import { Block as O, Blocks as x, set as U } from "./blocks-244199ab.js";
4
- import { isEditing as j } from "./server-entry-1cbf5bef.js";
5
- import "./get-class-prop-name-1178de8b.js";
6
- import "./dynamic-renderer-96ba4e48.js";
1
+ import { jsxs as N, Fragment as w, jsx as u } from "react/jsx-runtime";
2
+ import { useRef as J, useState as y } from "react";
3
+ import { Block as O, Blocks as S, set as U } from "./blocks-f8d5d3a0.js";
4
+ import { isEditing as j } from "./server-entry-f2d127da.js";
5
+ import "./get-class-prop-name-25116ae3.js";
6
+ import "./dynamic-renderer-8b343325.js";
7
7
  const R = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], $ = () => {
8
8
  const e = process.env.NODE_ENV || "production";
9
9
  return R.includes(e) ? e : "production";
10
- }, L = (e, i, y) => {
11
- const a = String.prototype.split.call(i, /[,[\].]+?/).filter(Boolean).reduce((c, b) => c != null ? c[b] : c, e);
12
- return a === void 0 || a === e ? y : a;
10
+ }, L = (e, i, v) => {
11
+ const s = String.prototype.split.call(i, /[,[\].]+?/).filter(Boolean).reduce((a, f) => a != null ? a[f] : a, e);
12
+ return s === void 0 || s === e ? v : s;
13
13
  };
14
14
  function _(e) {
15
- var C, k;
16
- const i = J(null), [y, a] = E(() => "unsubmitted"), [c, b] = E(() => null), [q, F] = E(() => "");
15
+ var E, x;
16
+ const i = J(null), [v, s] = y(() => "unsubmitted"), [a, f] = y(() => null), [q, F] = y(() => "");
17
17
  function D(o) {
18
- var f, g;
19
- const l = {
18
+ var m, h;
19
+ const c = {
20
20
  ...e.builderContext.rootState,
21
21
  ...o
22
22
  };
23
- e.builderContext.rootSetState ? (g = (f = e.builderContext).rootSetState) == null || g.call(f, l) : e.builderContext.rootState = l;
23
+ e.builderContext.rootSetState ? (h = (m = e.builderContext).rootSetState) == null || h.call(m, c) : e.builderContext.rootState = c;
24
24
  }
25
- function h() {
26
- return j() && e.previewState || y;
25
+ function b() {
26
+ return j() && e.previewState || v;
27
27
  }
28
28
  function P(o) {
29
- var f;
30
- const l = e.sendWithJs || e.sendSubmissionsTo === "email";
29
+ var m;
30
+ const c = e.sendWithJs || e.sendSubmissionsTo === "email";
31
31
  if (e.sendSubmissionsTo === "zapier")
32
32
  o.preventDefault();
33
- else if (l) {
33
+ else if (c) {
34
34
  if (!(e.action || e.sendSubmissionsTo === "email")) {
35
35
  o.preventDefault();
36
36
  return;
37
37
  }
38
38
  o.preventDefault();
39
- const g = o.currentTarget, M = e.customHeaders || {};
40
- let v;
41
- const A = new FormData(g), T = Array.from(
39
+ const h = o.currentTarget, C = e.customHeaders || {};
40
+ let g;
41
+ const A = new FormData(h), k = Array.from(
42
42
  o.currentTarget.querySelectorAll("input,select,textarea")
43
43
  ).filter((t) => !!t.name).map((t) => {
44
44
  let n;
45
- const u = t.name;
45
+ const l = t.name;
46
46
  if (t instanceof HTMLInputElement)
47
47
  if (t.type === "radio") {
48
48
  if (t.checked)
49
49
  return n = t.name, {
50
- key: u,
50
+ key: l,
51
51
  value: n
52
52
  };
53
53
  } else if (t.type === "checkbox")
@@ -60,41 +60,41 @@ function _(e) {
60
60
  else
61
61
  n = t.value;
62
62
  return {
63
- key: u,
63
+ key: l,
64
64
  value: n
65
65
  };
66
66
  });
67
67
  let d = e.contentType;
68
- if (e.sendSubmissionsTo === "email" && (d = "multipart/form-data"), Array.from(T).forEach(({ value: t }) => {
68
+ if (e.sendSubmissionsTo === "email" && (d = "multipart/form-data"), Array.from(k).forEach(({ value: t }) => {
69
69
  (t instanceof File || Array.isArray(t) && t[0] instanceof File || t instanceof FileList) && (d = "multipart/form-data");
70
70
  }), d !== "application/json")
71
- v = A;
71
+ g = A;
72
72
  else {
73
73
  const t = {};
74
- Array.from(T).forEach(({ value: n, key: u }) => {
75
- U(t, u, n);
76
- }), v = JSON.stringify(t);
74
+ Array.from(k).forEach(({ value: n, key: l }) => {
75
+ U(t, l, n);
76
+ }), g = JSON.stringify(t);
77
77
  }
78
- d && d !== "multipart/form-data" && (l && ((f = e.action) != null && f.includes("zapier.com")) || (M["content-type"] = d));
79
- const N = new CustomEvent("presubmit", { detail: { body: v } });
80
- if (i.current && (i.current.dispatchEvent(N), N.defaultPrevented))
78
+ d && d !== "multipart/form-data" && (c && ((m = e.action) != null && m.includes("zapier.com")) || (C["content-type"] = d));
79
+ const M = new CustomEvent("presubmit", { detail: { body: g } });
80
+ if (i.current && (i.current.dispatchEvent(M), M.defaultPrevented))
81
81
  return;
82
- a("sending");
82
+ s("sending");
83
83
  const B = `${$() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(
84
84
  e.sendSubmissionsToEmail || ""
85
85
  )}&name=${encodeURIComponent(e.name || "")}`;
86
86
  fetch(
87
87
  e.sendSubmissionsTo === "email" ? B : e.action,
88
- { body: v, headers: M, method: e.method || "post" }
88
+ { body: g, headers: C, method: e.method || "post" }
89
89
  ).then(
90
90
  async (t) => {
91
91
  let n;
92
- const u = t.headers.get("content-type");
93
- if (u && u.indexOf("application/json") !== -1 ? n = await t.json() : n = await t.text(), !t.ok && e.errorMessagePath) {
92
+ const l = t.headers.get("content-type");
93
+ if (l && l.indexOf("application/json") !== -1 ? n = await t.json() : n = await t.text(), !t.ok && e.errorMessagePath) {
94
94
  let r = L(n, e.errorMessagePath);
95
95
  r && (typeof r != "string" && (r = JSON.stringify(r)), F(r), D({ formErrorMessage: r }));
96
96
  }
97
- if (b(n), a(t.ok ? "success" : "error"), t.ok) {
97
+ if (f(n), s(t.ok ? "success" : "error"), t.ok) {
98
98
  const r = new CustomEvent("submit:success", {
99
99
  detail: { res: t, body: n }
100
100
  });
@@ -105,10 +105,10 @@ function _(e) {
105
105
  }
106
106
  if (e.successUrl)
107
107
  if (i.current) {
108
- const w = new CustomEvent("route", {
108
+ const T = new CustomEvent("route", {
109
109
  detail: { url: e.successUrl }
110
110
  });
111
- i.current.dispatchEvent(w), w.defaultPrevented || (location.href = e.successUrl);
111
+ i.current.dispatchEvent(T), T.defaultPrevented || (location.href = e.successUrl);
112
112
  } else
113
113
  location.href = e.successUrl;
114
114
  }
@@ -117,14 +117,14 @@ function _(e) {
117
117
  const n = new CustomEvent("submit:error", {
118
118
  detail: { error: t }
119
119
  });
120
- i.current && (i.current.dispatchEvent(n), n.defaultPrevented) || (b(t), a("error"));
120
+ i.current && (i.current.dispatchEvent(n), n.defaultPrevented) || (f(t), s("error"));
121
121
  }
122
122
  );
123
123
  }
124
124
  }
125
- return /* @__PURE__ */ S(m, { children: [
125
+ return /* @__PURE__ */ N(w, { children: [
126
126
  " ",
127
- /* @__PURE__ */ S(
127
+ /* @__PURE__ */ N(
128
128
  "form",
129
129
  {
130
130
  validate: e.validate,
@@ -135,8 +135,7 @@ function _(e) {
135
135
  onSubmit: (o) => P(o),
136
136
  ...e.attributes,
137
137
  children: [
138
- " ",
139
- e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ s(m, { children: (k = (C = e.builderBlock) == null ? void 0 : C.children) == null ? void 0 : k.map((o, l) => /* @__PURE__ */ s(
138
+ e.builderBlock && e.builderBlock.children ? /* @__PURE__ */ u(w, { children: (x = (E = e.builderBlock) == null ? void 0 : E.children) == null ? void 0 : x.map((o, c) => /* @__PURE__ */ u(
140
139
  O,
141
140
  {
142
141
  block: o,
@@ -144,47 +143,38 @@ function _(e) {
144
143
  registeredComponents: e.builderComponents,
145
144
  linkComponent: e.builderLinkComponent
146
145
  },
147
- `form-block-${l}`
146
+ `form-block-${c}`
148
147
  )) }) : null,
149
- " ",
150
- h() === "error" ? /* @__PURE__ */ s(m, { children: /* @__PURE__ */ s(
151
- x,
148
+ b() === "error" ? /* @__PURE__ */ u(
149
+ S,
152
150
  {
153
151
  path: "errorMessage",
154
152
  blocks: e.errorMessage,
155
153
  context: e.builderContext
156
154
  }
157
- ) }) : null,
158
- " ",
159
- h() === "sending" ? /* @__PURE__ */ s(m, { children: /* @__PURE__ */ s(
160
- x,
155
+ ) : null,
156
+ b() === "sending" ? /* @__PURE__ */ u(
157
+ S,
161
158
  {
162
159
  path: "sendingMessage",
163
160
  blocks: e.sendingMessage,
164
161
  context: e.builderContext
165
162
  }
166
- ) }) : null,
167
- " ",
168
- h() === "error" && c ? /* @__PURE__ */ s(m, { children: /* @__PURE__ */ S("pre", { className: "builder-form-error-text pre-25b9edf0", children: [
169
- " ",
170
- JSON.stringify(c, null, 2),
171
- " "
172
- ] }) }) : null,
173
- " ",
174
- h() === "success" ? /* @__PURE__ */ s(m, { children: /* @__PURE__ */ s(
175
- x,
163
+ ) : null,
164
+ b() === "error" && a ? /* @__PURE__ */ u("pre", { className: "builder-form-error-text pre-31bf8a14", children: JSON.stringify(a, null, 2) }) : null,
165
+ b() === "success" ? /* @__PURE__ */ u(
166
+ S,
176
167
  {
177
168
  path: "successMessage",
178
169
  blocks: e.successMessage,
179
170
  context: e.builderContext
180
171
  }
181
- ) }) : null,
182
- " "
172
+ ) : null
183
173
  ]
184
174
  }
185
175
  ),
186
176
  " ",
187
- /* @__PURE__ */ s("style", { children: ".pre-25b9edf0 { padding: 10px; color: red; text-align: center; }" }),
177
+ /* @__PURE__ */ u("style", { children: ".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }" }),
188
178
  " "
189
179
  ] });
190
180
  }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),y=require("react"),m=require("./blocks-03ffaaf9.cjs"),P=require("./server-entry-39e6b4a6.cjs");require("./get-class-prop-name-7ab1534a.cjs");require("./dynamic-renderer-b29b45ca.cjs");const B=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],D=()=>{const e=process.env.NODE_ENV||"production";return B.includes(e)?e:"production"},A=(e,i,S)=>{const a=String.prototype.split.call(i,/[,[\].]+?/).filter(Boolean).reduce((c,b)=>c!=null?c[b]:c,e);return a===void 0||a===e?S:a};function O(e){var x,E;const i=y.useRef(null),[S,a]=y.useState(()=>"unsubmitted"),[c,b]=y.useState(()=>null),[J,T]=y.useState(()=>"");function F(s){var f,g;const u={...e.builderContext.rootState,...s};e.builderContext.rootSetState?(g=(f=e.builderContext).rootSetState)==null||g.call(f,u):e.builderContext.rootState=u}function h(){return P.isEditing()&&e.previewState||S}function N(s){var f;const u=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")s.preventDefault();else if(u){if(!(e.action||e.sendSubmissionsTo==="email")){s.preventDefault();return}s.preventDefault();const g=s.currentTarget,k=e.customHeaders||{};let v;const q=new FormData(g),C=Array.from(s.currentTarget.querySelectorAll("input,select,textarea")).filter(t=>!!t.name).map(t=>{let n;const l=t.name;if(t instanceof HTMLInputElement)if(t.type==="radio"){if(t.checked)return n=t.name,{key:l,value:n}}else if(t.type==="checkbox")n=t.checked;else if(t.type==="number"||t.type==="range"){const r=t.valueAsNumber;isNaN(r)||(n=r)}else t.type==="file"?n=t.files:n=t.value;else n=t.value;return{key:l,value:n}});let d=e.contentType;if(e.sendSubmissionsTo==="email"&&(d="multipart/form-data"),Array.from(C).forEach(({value:t})=>{(t instanceof File||Array.isArray(t)&&t[0]instanceof File||t instanceof FileList)&&(d="multipart/form-data")}),d!=="application/json")v=q;else{const t={};Array.from(C).forEach(({value:n,key:l})=>{m.set(t,l,n)}),v=JSON.stringify(t)}d&&d!=="multipart/form-data"&&(u&&((f=e.action)!=null&&f.includes("zapier.com"))||(k["content-type"]=d));const j=new CustomEvent("presubmit",{detail:{body:v}});if(i.current&&(i.current.dispatchEvent(j),j.defaultPrevented))return;a("sending");const w=`${D()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?w:e.action,{body:v,headers:k,method:e.method||"post"}).then(async t=>{let n;const l=t.headers.get("content-type");if(l&&l.indexOf("application/json")!==-1?n=await t.json():n=await t.text(),!t.ok&&e.errorMessagePath){let r=A(n,e.errorMessagePath);r&&(typeof r!="string"&&(r=JSON.stringify(r)),T(r),F({formErrorMessage:r}))}if(b(n),a(t.ok?"success":"error"),t.ok){const r=new CustomEvent("submit:success",{detail:{res:t,body:n}});if(i.current){if(i.current.dispatchEvent(r),r.defaultPrevented)return;e.resetFormOnSubmit!==!1&&i.current.reset()}if(e.successUrl)if(i.current){const M=new CustomEvent("route",{detail:{url:e.successUrl}});i.current.dispatchEvent(M),M.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},t=>{const n=new CustomEvent("submit:error",{detail:{error:t}});i.current&&(i.current.dispatchEvent(n),n.defaultPrevented)||(b(t),a("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:i,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:s=>N(s),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?o.jsx(o.Fragment,{children:(E=(x=e.builderBlock)==null?void 0:x.children)==null?void 0:E.map((s,u)=>o.jsx(m.Block,{block:s,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${u}`))}):null,h()==="error"?o.jsx(m.Blocks,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,h()==="sending"?o.jsx(m.Blocks,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,h()==="error"&&c?o.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(c,null,2)}):null,h()==="success"?o.jsx(m.Blocks,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",o.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}exports.default=O;
@@ -1,4 +1,4 @@
1
- import { TARGET as e } from "./server-entry-1cbf5bef.js";
1
+ import { TARGET as e } from "./server-entry-f2d127da.js";
2
2
  const a = () => {
3
3
  switch (e) {
4
4
  case "react":
@@ -1 +1 @@
1
- "use strict";const e=require("./server-entry-178f215d.cjs"),s=()=>{switch(e.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};exports.getClassPropName=s;
1
+ "use strict";const e=require("./server-entry-39e6b4a6.cjs"),s=()=>{switch(e.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};exports.getClassPropName=s;
@@ -1,4 +1,4 @@
1
- import { jsxs as m, Fragment as l, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as d, Fragment as m, jsx as o } from "react/jsx-runtime";
2
2
  function g(e) {
3
3
  return e.replace(/http(s)?:/, "");
4
4
  }
@@ -33,37 +33,37 @@ function v(e) {
33
33
  var c, r, u, f;
34
34
  function i() {
35
35
  var h;
36
- const o = e.image || e.src;
37
- if (!o || // We can auto add srcset for cdn.builder.io and shopify
36
+ const a = e.image || e.src;
37
+ if (!a || // We can auto add srcset for cdn.builder.io and shopify
38
38
  // images, otherwise you can supply this prop manually
39
- !(o.match(/builder\.io/) || o.match(/cdn\.shopify\.com/)))
39
+ !(a.match(/builder\.io/) || a.match(/cdn\.shopify\.com/)))
40
40
  return e.srcset;
41
41
  if (e.srcset && ((h = e.image) != null && h.includes("builder.io/api/v1/image"))) {
42
42
  if (!e.srcset.includes(e.image.split("?")[0]))
43
- return console.debug("Removed given srcset"), s(o);
43
+ return console.debug("Removed given srcset"), s(a);
44
44
  } else if (e.image && !e.srcset)
45
- return s(o);
46
- return s(o);
45
+ return s(a);
46
+ return s(a);
47
47
  }
48
48
  function t() {
49
- var d;
50
- return (d = i == null ? void 0 : i()) != null && d.match(/builder\.io/) && !e.noWebp ? i().replace(/\?/g, "?format=webp&") : "";
49
+ var l;
50
+ return (l = i == null ? void 0 : i()) != null && l.match(/builder\.io/) && !e.noWebp ? i().replace(/\?/g, "?format=webp&") : "";
51
51
  }
52
52
  function n() {
53
- const d = {
53
+ const l = {
54
54
  position: "absolute",
55
55
  height: "100%",
56
56
  width: "100%",
57
57
  left: "0px",
58
58
  top: "0px"
59
59
  };
60
- return e.aspectRatio ? d : void 0;
60
+ return e.aspectRatio ? l : void 0;
61
61
  }
62
- return /* @__PURE__ */ m(l, { children: [
63
- /* @__PURE__ */ m(l, { children: [
64
- /* @__PURE__ */ m("picture", { children: [
65
- t() ? /* @__PURE__ */ a(l, { children: /* @__PURE__ */ a("source", { type: "image/webp", srcSet: t() }) }) : null,
66
- /* @__PURE__ */ a(
62
+ return /* @__PURE__ */ d(m, { children: [
63
+ /* @__PURE__ */ d(m, { children: [
64
+ /* @__PURE__ */ d("picture", { children: [
65
+ t() ? /* @__PURE__ */ o("source", { type: "image/webp", srcSet: t() }) : null,
66
+ /* @__PURE__ */ o(
67
67
  "img",
68
68
  {
69
69
  loading: "lazy",
@@ -74,33 +74,33 @@ function v(e) {
74
74
  objectFit: e.backgroundSize || "cover",
75
75
  ...n()
76
76
  },
77
- className: "builder-image" + (e.className ? " " + e.className : "") + " img-0614da04",
77
+ className: "builder-image" + (e.className ? " " + e.className : "") + " img-a0c95e8c",
78
78
  src: e.image,
79
79
  srcSet: i(),
80
80
  sizes: e.sizes
81
81
  }
82
82
  )
83
83
  ] }),
84
- e.aspectRatio && !((r = (c = e.builderBlock) == null ? void 0 : c.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ a(l, { children: /* @__PURE__ */ a(
84
+ e.aspectRatio && !((r = (c = e.builderBlock) == null ? void 0 : c.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ o(
85
85
  "div",
86
86
  {
87
- className: "builder-image-sizer div-0614da04",
87
+ className: "builder-image-sizer div-a0c95e8c",
88
88
  style: {
89
89
  paddingTop: e.aspectRatio * 100 + "%"
90
90
  }
91
91
  }
92
- ) }) : null,
93
- (f = (u = e.builderBlock) == null ? void 0 : u.children) != null && f.length && e.fitContent ? /* @__PURE__ */ a(l, { children: e.children }) : null,
94
- !e.fitContent && e.children ? /* @__PURE__ */ a(l, { children: /* @__PURE__ */ a("div", { className: "div-0614da04-2", children: e.children }) }) : null
92
+ ) : null,
93
+ (f = (u = e.builderBlock) == null ? void 0 : u.children) != null && f.length && e.fitContent ? /* @__PURE__ */ o(m, { children: e.children }) : null,
94
+ !e.fitContent && e.children ? /* @__PURE__ */ o("div", { className: "div-a0c95e8c-2", children: e.children }) : null
95
95
  ] }),
96
- /* @__PURE__ */ a("style", { children: `.img-0614da04 {
96
+ /* @__PURE__ */ o("style", { children: `.img-a0c95e8c {
97
97
  opacity: 1;
98
98
  transition: opacity 0.2s ease-in-out;
99
- }.div-0614da04 {
99
+ }.div-a0c95e8c {
100
100
  width: 100%;
101
101
  pointer-events: none;
102
102
  font-size: 0;
103
- }.div-0614da04-2 {
103
+ }.div-a0c95e8c-2 {
104
104
  display: flex;
105
105
  flex-direction: column;
106
106
  align-items: stretch;
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime");function f(e){return e.replace(/http(s)?:/,"")}function g(e="",i,t){const n=new RegExp("([?&])"+i+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(n)?e.replace(n,"$1"+i+"="+encodeURIComponent(t)+"$2"):e+a+i+"="+encodeURIComponent(t)}function h(e,i){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!i)return e;if(i==="master")return f(e);const t=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(t){const n=e.split(t[0]),a=t[3],r=i.match("x")?i:`${i}x`;return f(`${n[0]}_${r}${a}`)}return null}function s(e){if(!e)return e;const i=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let t=e;const n=Number(e.split("?width=")[1]);return isNaN(n)||(t=`${t} ${n}w`),i.filter(a=>a!==n).map(a=>`${g(e,"width",a)} ${a}w`).concat([t]).join(", ")}return e.match(/cdn\.shopify\.com/)?i.map(t=>[h(e,`${t}x${t}`),t]).filter(([t])=>!!t).map(([t,n])=>`${t} ${n}w`).concat([e]).join(", "):e}function b(e){var a,r,d,m;function i(){var u;const o=e.image||e.src;if(!o||!(o.match(/builder\.io/)||o.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((u=e.image)!=null&&u.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),s(o)}else if(e.image&&!e.srcset)return s(o);return s(o)}function t(){var l;return(l=i==null?void 0:i())!=null&&l.match(/builder\.io/)&&!e.noWebp?i().replace(/\?/g,"?format=webp&"):""}function n(){const l={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?l:void 0}return c.jsxs(c.Fragment,{children:[c.jsxs(c.Fragment,{children:[c.jsxs("picture",{children:[t()?c.jsx("source",{type:"image/webp",srcSet:t()}):null,c.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...n()},className:"builder-image"+(e.className?" "+e.className:"")+" img-a0c95e8c",src:e.image,srcSet:i(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(a=e.builderBlock)==null?void 0:a.children)!=null&&r.length&&e.fitContent)?c.jsx("div",{className:"builder-image-sizer div-a0c95e8c",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(m=(d=e.builderBlock)==null?void 0:d.children)!=null&&m.length&&e.fitContent?c.jsx(c.Fragment,{children:e.children}):null,!e.fitContent&&e.children?c.jsx("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),c.jsx("style",{children:`.img-a0c95e8c {
2
+ opacity: 1;
3
+ transition: opacity 0.2s ease-in-out;
4
+ }.div-a0c95e8c {
5
+ width: 100%;
6
+ pointer-events: none;
7
+ font-size: 0;
8
+ }.div-a0c95e8c-2 {
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: stretch;
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ width: 100%;
16
+ height: 100%;
17
+ }`})]})}exports.default=b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./server-entry-178f215d.cjs");function n(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},i.isEditing()&&e.imgSrc||"default-key")}exports.default=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./server-entry-39e6b4a6.cjs");function n(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},i.isEditing()&&e.imgSrc||"default-key")}exports.default=n;