@builder.io/sdk-react 4.0.2 → 4.0.4-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +944 -0
- package/lib/browser/blocks-exports.cjs +32 -29
- package/lib/browser/blocks-exports.mjs +484 -465
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-9e5daeda.cjs → server-entry-c40e781d.cjs} +1 -1
- package/lib/browser/{server-entry-25e49efc.js → server-entry-e6ae7704.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-f5e5687b.cjs → accordion-8934ef4b.cjs} +1 -1
- package/lib/edge/{accordion-5063d748.js → accordion-e657c96d.js} +1 -1
- package/lib/edge/{blocks-f3b2fbd5.js → blocks-890ac50f.js} +243 -241
- package/lib/edge/{blocks-d690074d.cjs → blocks-efa04c3b.cjs} +10 -10
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-0d0430e9.js → button-3522aac2.js} +2 -2
- package/lib/edge/{button-7cac2c65.cjs → button-49563e3b.cjs} +1 -1
- package/lib/edge/{columns-19b22772.js → columns-70b88fce.js} +3 -3
- package/lib/edge/{columns-87b82f2f.cjs → columns-eb192117.cjs} +1 -1
- package/lib/edge/{content-variants-0f0a71cb.js → content-variants-6a73b6e9.js} +125 -118
- package/lib/edge/{content-variants-80fc28d8.cjs → content-variants-893bba4d.cjs} +16 -13
- package/lib/edge/custom-code-1a43bbd7.js +52 -0
- package/lib/edge/custom-code-ae3262be.cjs +1 -0
- package/lib/edge/embed-106f0066.js +38 -0
- package/lib/edge/embed-8d302933.cjs +1 -0
- package/lib/edge/{form-0b5bd2e3.cjs → form-89839d91.cjs} +1 -1
- package/lib/edge/{form-b8f74b68.js → form-e6ea2320.js} +3 -3
- package/lib/edge/{get-class-prop-name-6ef08339.cjs → get-class-prop-name-dad1ee7e.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-f3ce6ca4.js → get-class-prop-name-e44df0c8.js} +1 -1
- package/lib/edge/{image-38917f45.js → image-1729f079.js} +20 -19
- package/lib/edge/{image-590e36ae.cjs → image-a6fbd15b.cjs} +3 -3
- package/lib/edge/img-337990c2.cjs +1 -0
- package/lib/edge/{img-4becc0d4.js → img-3efcbcca.js} +4 -3
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-6884ec2d.cjs → input-92aaa4f2.cjs} +1 -1
- package/lib/edge/{input-768a5984.js → input-d6338de6.js} +1 -1
- package/lib/edge/{personalization-container-8b32ce9d.cjs → personalization-container-576b7363.cjs} +1 -1
- package/lib/edge/{personalization-container-b581d0f6.js → personalization-container-c8d741e6.js} +4 -4
- package/lib/edge/{select-e54dc6bc.js → select-1538b41a.js} +1 -1
- package/lib/edge/{select-ac5b39d8.cjs → select-5ce728b4.cjs} +1 -1
- package/lib/edge/{server-entry-818ae9c6.js → server-entry-2e94ad2c.js} +1 -1
- package/lib/edge/{server-entry-a60fb569.cjs → server-entry-46e686b9.cjs} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-05218273.js → slot-26162c51.js} +3 -3
- package/lib/edge/{slot-5dba6213.cjs → slot-ed4d2827.cjs} +1 -1
- package/lib/edge/{symbol-9f247918.js → symbol-3b2e7ebf.js} +2 -2
- package/lib/edge/{symbol-f4b09828.cjs → symbol-cd10b6f0.cjs} +1 -1
- package/lib/edge/{tabs-02960a8c.cjs → tabs-7273a1e3.cjs} +1 -1
- package/lib/edge/{tabs-a0b38dde.js → tabs-c576cd8f.js} +3 -3
- package/lib/node/blocks-exports.cjs +32 -29
- package/lib/node/blocks-exports.mjs +493 -474
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-2a2cad4a.cjs → server-entry-6b05381c.cjs} +1 -1
- package/lib/node/{server-entry-702b1a29.js → server-entry-c1000f54.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-0a6b0788.js → setIvm-011d6eb2.js} +1 -1
- package/lib/node/{setIvm-9cddfc1a.cjs → setIvm-4ae0308c.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-d6c9e985.cjs → should-force-browser-runtime-in-node-5d513614.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-dfff7f8f.js → should-force-browser-runtime-in-node-abf8d0a7.js} +1 -1
- package/package.json +4 -4
- package/types/blocks/image/image.types.d.ts +1 -0
- package/types/blocks/img/img.d.ts +1 -0
- package/types/components/content-variants/inlined-fns.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/custom-code-7786788e.js +0 -43
- package/lib/edge/custom-code-8119ea3f.cjs +0 -1
- package/lib/edge/embed-32bdd007.cjs +0 -1
- package/lib/edge/embed-5c1bbe12.js +0 -37
- package/lib/edge/img-20126279.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const f=require("react/jsx-runtime"),o=require("react"),l=require("./server-entry-a60fb569.cjs"),C=require("./blocks-exports.cjs"),E=require("./blocks-d690074d.cjs"),L={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},N={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},ee={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[L]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[N]}],defaultValue:[{title:[L],detail:[N]},{title:[L],detail:[N]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},te=o.lazy(()=>Promise.resolve().then(()=>require("./accordion-f5e5687b.cjs"))),ne={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},ae={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(s=>s.get("width"))&&(n.find(m=>!m.get("width"))||n.reduce((r,p)=>r+p.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ie={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},z=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],oe=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],re={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:z,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,r=6e4){return new Promise((p,S)=>{const v=document.createElement("img");let P=!1;v.onload=()=>{P=!0,p(v)},v.addEventListener("error",w=>{console.warn("Image load failed",w.error),S(w.error)}),v.src=a,setTimeout(()=>{P||S(new Error("Image load timed out"))},r)})}function i(a){return Math.round(a*1e3)/1e3}const s=e.get("image"),m=e.get("aspectRatio");if(fetch(s).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),s&&(!m||m===.7041))return n(s).then(a=>{const r=e.get("aspectRatio");e.get("image")===s&&(!r||r===.7041)&&a.width&&a.height&&(e.set("aspectRatio",i(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},le={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]},se=o.lazy(()=>Promise.resolve().then(()=>require("./personalization-container-8b32ce9d.cjs"))),de={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>"}}}]},ue={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}},ce=o.lazy(()=>Promise.resolve().then(()=>require("./slot-5dba6213.cjs"))),me={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},$={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},_={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},pe={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[$]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[_]}],defaultValue:[{label:[{...$,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{..._,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...$,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{..._,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},fe=o.lazy(()=>Promise.resolve().then(()=>require("./tabs-02960a8c.cjs"))),ge={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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"}},he={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}]},be=o.lazy(()=>Promise.resolve().then(()=>require("./custom-code-8119ea3f.cjs"))),ye={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},xe=o.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),ve={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Se=o.lazy(()=>Promise.resolve().then(()=>require("./form-0b5bd2e3.cjs"))),Te={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"}},Ie=o.lazy(()=>Promise.resolve().then(()=>require("./input-6884ec2d.cjs"))),ke={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},Ce=o.lazy(()=>Promise.resolve().then(()=>require("./select-ac5b39d8.cjs"))),we={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},Ve=o.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),Re={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0},Ee=o.lazy(()=>Promise.resolve().then(()=>require("./textarea-56a875bc.cjs"))),Fe={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:z,required:!0}],noWrap:!0,static:!0},Pe=o.lazy(()=>Promise.resolve().then(()=>require("./img-20126279.cjs"))),Ae={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:oe,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:z,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}},We=()=>[{component:be,...he},{component:xe,...ye},{component:Se,...ve},{component:Ie,...Te},{component:Ve,...we},{component:Ce,...ke},{component:Ee,...Re},{component:Pe,...Fe},{component:C.Video,...Ae}],O=()=>[{component:C.Button,...ne},{component:C.Columns,...ae},{component:C.Fragment,...ie},{component:C.Image,...re},{component:C.Section,...de},{component:ce,...ue},{component:C.Symbol,...me},{component:C.Text,...ge},{component:se,...le},{component:fe,...pe},{component:te,...ee},...We()],Be=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
1
|
+
"use strict";const f=require("react/jsx-runtime"),o=require("react"),l=require("./server-entry-46e686b9.cjs"),C=require("./blocks-exports.cjs"),R=require("./blocks-efa04c3b.cjs"),L={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},N={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},ee={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[L]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[N]}],defaultValue:[{title:[L],detail:[N]},{title:[L],detail:[N]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},te=o.lazy(()=>Promise.resolve().then(()=>require("./accordion-8934ef4b.cjs"))),ne={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},ae={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(s=>s.get("width"))&&(n.find(m=>!m.get("width"))||n.reduce((r,p)=>r+p.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ie={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},z=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],oe=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],re={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:z,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,r=6e4){return new Promise((p,S)=>{const v=document.createElement("img");let P=!1;v.onload=()=>{P=!0,p(v)},v.addEventListener("error",w=>{console.warn("Image load failed",w.error),S(w.error)}),v.src=a,setTimeout(()=>{P||S(new Error("Image load timed out"))},r)})}function i(a){return Math.round(a*1e3)/1e3}const s=e.get("image"),m=e.get("aspectRatio");if(fetch(s).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),s&&(!m||m===.7041))return n(s).then(a=>{const r=e.get("aspectRatio");e.get("image")===s&&(!r||r===.7041)&&a.width&&a.height&&(e.set("aspectRatio",i(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},le={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]},se=o.lazy(()=>Promise.resolve().then(()=>require("./personalization-container-576b7363.cjs"))),de={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>"}}}]},ue={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}},ce=o.lazy(()=>Promise.resolve().then(()=>require("./slot-ed4d2827.cjs"))),me={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},$={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},_={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},pe={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[$]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[_]}],defaultValue:[{label:[{...$,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{..._,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...$,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{..._,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},fe=o.lazy(()=>Promise.resolve().then(()=>require("./tabs-7273a1e3.cjs"))),ge={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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"}},he={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}]},be=o.lazy(()=>Promise.resolve().then(()=>require("./custom-code-ae3262be.cjs"))),ye={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},xe=o.lazy(()=>Promise.resolve().then(()=>require("./embed-8d302933.cjs"))),ve={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Se=o.lazy(()=>Promise.resolve().then(()=>require("./form-89839d91.cjs"))),Te={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"}},Ie=o.lazy(()=>Promise.resolve().then(()=>require("./input-92aaa4f2.cjs"))),ke={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},Ce=o.lazy(()=>Promise.resolve().then(()=>require("./select-5ce728b4.cjs"))),we={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},Ve=o.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),Ee={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0},Re=o.lazy(()=>Promise.resolve().then(()=>require("./textarea-56a875bc.cjs"))),Fe={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:z,required:!0}],noWrap:!0,static:!0},Pe=o.lazy(()=>Promise.resolve().then(()=>require("./img-337990c2.cjs"))),Ae={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:oe,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:z,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}},We=()=>[{component:be,...he},{component:xe,...ye},{component:Se,...ve},{component:Ie,...Te},{component:Ve,...we},{component:Ce,...ke},{component:Re,...Ee},{component:Pe,...Fe},{component:C.Video,...Ae}],O=()=>[{component:C.Button,...ne},{component:C.Columns,...ae},{component:C.Fragment,...ie},{component:C.Image,...re},{component:C.Section,...de},{component:ce,...ue},{component:C.Symbol,...me},{component:C.Text,...ge},{component:se,...le},{component:fe,...pe},{component:te,...ee},...We()],Be=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
2
2
|
function getAndSetVariantId() {
|
|
3
3
|
function setCookie(name, value, days) {
|
|
4
4
|
let expires = '';
|
|
@@ -40,7 +40,10 @@
|
|
|
40
40
|
return contentId;
|
|
41
41
|
}
|
|
42
42
|
const winningVariantId = getAndSetVariantId();
|
|
43
|
-
|
|
43
|
+
let styleEl = document.currentScript?.previousElementSibling;
|
|
44
|
+
if (isAngularSDK) {
|
|
45
|
+
styleEl = document.currentScript?.parentElement?.previousElementSibling?.querySelector('style');
|
|
46
|
+
}
|
|
44
47
|
if (isHydrationTarget) {
|
|
45
48
|
styleEl.remove();
|
|
46
49
|
const thisScriptEl = document.currentScript;
|
|
@@ -88,15 +91,15 @@
|
|
|
88
91
|
thisScriptEl?.remove();
|
|
89
92
|
}
|
|
90
93
|
return;
|
|
91
|
-
}`,Q="builderIoAbTest",X="builderIoRenderContent",U=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),qe=({canTrack:e,content:t})=>!(!(U(t).length>0)||!e||l.isBrowser()),Ue=e=>e==="react"||e==="reactNative",Z=Ue(l.TARGET),
|
|
94
|
+
}`,Q="builderIoAbTest",X="builderIoRenderContent",U=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),qe=({canTrack:e,content:t})=>!(!(U(t).length>0)||!e||l.isBrowser()),Ue=e=>e==="react"||e==="reactNative",He=l.TARGET==="angular",Z=Ue(l.TARGET),je=()=>`
|
|
92
95
|
window.${Q} = ${Be}
|
|
93
96
|
window.${X} = ${De}
|
|
94
|
-
`,
|
|
97
|
+
`,Le=(e,t)=>`
|
|
95
98
|
window.${Q}(
|
|
96
|
-
"${t}",${JSON.stringify(e)}, ${Z}
|
|
97
|
-
)`,
|
|
99
|
+
"${t}",${JSON.stringify(e)}, ${Z}, ${He}
|
|
100
|
+
)`,Ne=({contentId:e,variationId:t})=>`window.${X}(
|
|
98
101
|
"${t}", "${e}", ${Z}
|
|
99
|
-
)`;function H(e){return f.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function M(e){return Math.round(e*1e3)/1e3}const
|
|
102
|
+
)`;function H(e){return f.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function M(e){return Math.round(e*1e3)/1e3}const $e=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},_e=e=>$e(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),J=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,s=e.clientY-n.top,m=M(i/n.width),a=M(s/n.height);return{x:m,y:a}},ze=e=>{const t=e.target,n=t&&_e(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?J({event:e,target:t}):void 0,builderTargetOffset:n?J({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},Ke=["svelte","qwik","vue"],Y=()=>Ke.includes(l.TARGET)&&(l.isEditing()||l.isPreviewing()),Oe=e=>{var m,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(m=e==null?void 0:e.files)==null?void 0:m.regular;let s="";if(i&&t&&n&&(s+=`
|
|
100
103
|
@font-face {
|
|
101
104
|
font-family: "${t}";
|
|
102
105
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -110,7 +113,7 @@ src: url('${S}') format('woff2');
|
|
|
110
113
|
font-display: fallback;
|
|
111
114
|
font-weight: ${r};
|
|
112
115
|
}
|
|
113
|
-
`.trim())}return s},
|
|
116
|
+
`.trim())}return s},Me=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Oe(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:"",Ye=`
|
|
114
117
|
.builder-button {
|
|
115
118
|
all: unset;
|
|
116
119
|
}
|
|
@@ -127,8 +130,8 @@ font-weight: ${r};
|
|
|
127
130
|
text-align: inherit;
|
|
128
131
|
font-family: inherit;
|
|
129
132
|
}
|
|
130
|
-
`,
|
|
131
|
-
${
|
|
132
|
-
${
|
|
133
|
-
${
|
|
134
|
-
`.trim());return f.jsx(
|
|
133
|
+
`,Ge=e=>e?"":Ye,Qe=e=>`variant-${e}`;function Xe(e){var b,x,V;const t=o.useRef(null);o.useState(()=>!1);function n(d){var g,h;const u={...e.builderContextSignal.rootState,...d};e.builderContextSignal.rootSetState?(h=(g=e.builderContextSignal).rootSetState)==null||h.call(g,u):e.setBuilderContextSignal(c=>({...c,rootState:u}))}function i(d){var g,h,c,E,I;const u={...e.builderContextSignal.content,...d,data:{...(g=e.builderContextSignal.content)==null?void 0:g.data,...d==null?void 0:d.data},meta:{...(h=e.builderContextSignal.content)==null?void 0:h.meta,...d==null?void 0:d.meta,breakpoints:((c=d==null?void 0:d.meta)==null?void 0:c.breakpoints)||((I=(E=e.builderContextSignal.content)==null?void 0:E.meta)==null?void 0:I.breakpoints)}};e.setBuilderContextSignal(T=>({...T,content:u}))}function s(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[m,a]=o.useState(()=>e.contentWrapper||"div");function r(d){return l.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:u=>{var c;const{breakpoints:g,contentId:h}=u;!h||h!==((c=e.builderContextSignal.content)==null?void 0:c.id)||g&&i({meta:{breakpoints:g}})},animation:u=>{R.triggerAnimation(u)},contentUpdate:u=>{i(u)},stateUpdate:u=>{n(u)}}})(d)}const[p,S]=o.useState(()=>({})),[v,P]=o.useState(()=>({})),[w,W]=o.useState(()=>!1);function B(d){var u,g;if(e.builderContextSignal.content){const h=(u=e.builderContextSignal.content)==null?void 0:u.testVariationId,c=(g=e.builderContextSignal.content)==null?void 0:g.id;l._track({apiHost:e.apiHost,type:"click",canTrack:l.getDefaultCanTrack(e.canTrack),contentId:c,apiKey:e.apiKey,variationId:h!==c?h:void 0,...ze(d),unique:!w})}w||W(!0)}function D(){var u,g,h;const d=(h=(g=(u=e.builderContextSignal.content)==null?void 0:u.data)==null?void 0:g.httpRequests)!=null?h:{};Object.entries(d).forEach(([c,E])=>{if(!E||v[c]||p[c]&&!l.isEditing())return;v[c]=!0;const I=E.replace(/{{([^}]+)}}/g,(T,y)=>String(R.evaluate({code:y,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));l.logFetch(I),fetch(I).then(T=>T.json()).then(T=>{n({[c]:T}),p[c]=!0}).catch(T=>{console.error("error fetching dynamic data",E,T)}).finally(()=>{v[c]=!1})})}function F(){l.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:R.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const A=o.useRef(!1);return A.current||(D(),F(),A.current=!0),o.useEffect(()=>{var d,u,g,h,c;if(l.isBrowser()){l.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",r),l.registerInsertMenu(),l.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(d=e.model)!=null?d:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(y=>{var k,q;if(!((k=y.models)!=null&&k.length)||y.models.includes(e.model)){const j=l.createRegisterComponentMessage(y);(q=window.parent)==null||q.postMessage(j,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",F));const E=e.builderContextSignal.content&&l.getDefaultCanTrack(e.canTrack),I=l.getCookieSync({name:`builder.tests.${(u=e.builderContextSignal.content)==null?void 0:u.id}`,canTrack:!0}),T=(g=e.builderContextSignal.content)==null?void 0:g.testVariationId;if(E&&T===I){const y=(h=e.builderContextSignal.content)==null?void 0:h.id,k=e.apiKey;l._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:y,apiKey:k,variationId:I!==y?I:void 0})}if(l.isPreviewing()&&!l.isEditing()){const y=new URL(location.href).searchParams,k=y.get("builder.preview"),q=y.get(`builder.overrides.${k}`),j=y.get("apiKey")||y.get("builder.space");(k==="BUILDER_STUDIO"||k===e.model&&j===e.apiKey&&(!e.content||q===e.content.id))&&l.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...k==="BUILDER_STUDIO"&&((c=e.context)!=null&&c.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(K=>{K&&i(K)})}}},[]),o.useEffect(()=>{e.content&&i(e.content)},[e.content]),o.useEffect(()=>{F()},[e.builderContextSignal.rootState]),o.useEffect(()=>{e.data&&n(e.data)},[e.data]),o.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),o.useEffect(()=>()=>{l.isBrowser()&&(window.removeEventListener("message",r),window.removeEventListener("builder:component:stateChangeListenerActivated",F))},[]),f.jsx(C.BuilderContext.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||Y()?f.jsx(m,{ref:t,onClick:d=>B(d),"builder-content-id":(b=e.builderContextSignal.content)==null?void 0:b.id,"builder-model":e.model,className:Qe(((x=e.content)==null?void 0:x.testVariationId)||((V=e.content)==null?void 0:V.id)),style:{display:!e.builderContextSignal.content&&Y()?"none":void 0},...s(),...e.contentWrapperProps,children:e.children}):null})}function Ze(e){const[t,n]=o.useState(()=>`
|
|
134
|
+
${Je({cssCode:e.cssCode,contentId:e.contentId})}
|
|
135
|
+
${Me({customFonts:e.customFonts})}
|
|
136
|
+
${Ge(e.isNestedRender)}
|
|
137
|
+
`.trim());return f.jsx(R.InlinedStyles,{id:"builderio-content",styles:t,nonce:e.nonce})}const et=({content:e,data:t,locale:n})=>{var m,a,r;const i={},s=((m=e==null?void 0:e.data)==null?void 0:m.state)||{};return(r=(a=e==null?void 0:e.data)==null?void 0:a.inputs)==null||r.forEach(p=>{p.name&&p.defaultValue!==void 0&&(i[p.name]=p.defaultValue)}),{...i,...s,...t,...n?{locale:n}:{}}},tt=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function G(e){var S,v,P,w,W,B,D,F,A;const[t,n]=o.useState(()=>{var b,x;return Ne({variationId:(b=e.content)==null?void 0:b.testVariationId,contentId:(x=e.content)==null?void 0:x.id})});function i(b){r(x=>({...x,rootState:b}))}const[s,m]=o.useState(()=>[...O(),...e.customComponents||[]].reduce((b,{component:x,...V})=>({...b,[V.name]:{component:x,...l.serializeIncludingFunctions(V)}}),{})),[a,r]=o.useState(()=>({content:tt({content:e.content,data:e.data}),localState:void 0,rootState:et({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...O(),...e.customComponents||[]].reduce((b,{component:x,...V})=>({...b,[V.name]:l.serializeIncludingFunctions(V)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model})),p=o.useRef(!1);if(!p.current){e.apiKey||l.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const b=(v=(S=a.content)==null?void 0:S.data)==null?void 0:v.jsCode;b&&R.evaluate({code:b,context:e.context||{},localState:void 0,rootState:a.rootState,rootSetState:x=>{Object.assign(a.rootState,x)},isExpression:!1}),p.current=!0}return f.jsx(R.ComponentsContext.Provider,{value:{registeredComponents:s},children:f.jsxs(Xe,{apiHost:e.apiHost,nonce:e.nonce,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:a,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:r,children:[e.isSsrAbTest?f.jsx(H,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,f.jsx(Ze,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(P=a.content)==null?void 0:P.id,cssCode:(W=(w=a.content)==null?void 0:w.data)==null?void 0:W.cssCode,customFonts:(D=(B=a.content)==null?void 0:B.data)==null?void 0:D.customFonts}),f.jsx(R.Blocks,{blocks:(A=(F=a.content)==null?void 0:F.data)==null?void 0:A.blocks,context:a,registeredComponents:s,linkComponent:e.linkComponent})]})})}function nt(e){var a;const[t,n]=o.useState(()=>qe({canTrack:l.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var r;return Le(U(e.content).map(p=>({id:p.testVariationId,testRatio:p.testRatio})),((r=e.content)==null?void 0:r.id)||"")}function s(){return U(e.content).map(r=>`.variant-${r.testVariationId} { display: none; } `).join("")}function m(){var r;return t?{...e.content,testVariationId:(r=e.content)==null?void 0:r.id}:l.handleABTestingSync({item:e.content,canTrack:l.getDefaultCanTrack(e.canTrack)})}return o.useEffect(()=>{},[]),f.jsxs(f.Fragment,{children:[!e.isNestedRender&&l.TARGET!=="reactNative"?f.jsx(H,{id:"builderio-init-variants-fns",scriptStr:je(),nonce:e.nonce||""}):null,t?f.jsxs(f.Fragment,{children:[f.jsx(R.InlinedStyles,{id:"builderio-variants",styles:s(),nonce:e.nonce||""}),f.jsx(H,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(a=U(e.content))==null?void 0:a.map(r=>f.jsx(G,{apiHost:e.apiHost,isNestedRender:e.isNestedRender,nonce:e.nonce,content:r,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},r.testVariationId))]}):null,f.jsx(G,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:m(),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})]})}const at=Object.freeze(Object.defineProperty({__proto__:null,default:nt},Symbol.toStringTag,{value:"Module"}));exports.InlinedScript=H;exports.contentVariants=at;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as f, useState as p, useEffect as d } from "react";
|
|
3
|
+
import { isEditing as m, logger as g } from "./server-entry-2e94ad2c.js";
|
|
4
|
+
function T(r) {
|
|
5
|
+
const n = f(null), [s, y] = p(() => []), [i, h] = p(() => []);
|
|
6
|
+
function o() {
|
|
7
|
+
var a;
|
|
8
|
+
if (!n.current || !((a = n.current) != null && a.getElementsByTagName) || typeof window == "undefined")
|
|
9
|
+
return;
|
|
10
|
+
const u = n.current.getElementsByTagName("script");
|
|
11
|
+
for (let c = 0; c < u.length; c++) {
|
|
12
|
+
const e = u[c];
|
|
13
|
+
if (e.src) {
|
|
14
|
+
if (s.includes(e.src))
|
|
15
|
+
continue;
|
|
16
|
+
s.push(e.src);
|
|
17
|
+
const t = document.createElement("script");
|
|
18
|
+
t.async = !0, t.src = e.src, document.head.appendChild(t);
|
|
19
|
+
} else if (!e.type || [
|
|
20
|
+
"text/javascript",
|
|
21
|
+
"application/javascript",
|
|
22
|
+
"application/ecmascript"
|
|
23
|
+
].includes(e.type)) {
|
|
24
|
+
if (i.includes(e.innerText))
|
|
25
|
+
continue;
|
|
26
|
+
try {
|
|
27
|
+
i.push(e.innerText), new Function(e.innerText)();
|
|
28
|
+
} catch (t) {
|
|
29
|
+
g.warn(
|
|
30
|
+
"[BUILDER.IO] `CustomCode`: Error running script:",
|
|
31
|
+
t
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return d(() => {
|
|
38
|
+
o();
|
|
39
|
+
}, []), d(() => {
|
|
40
|
+
m() && o();
|
|
41
|
+
}, [r.code]), /* @__PURE__ */ l(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
ref: n,
|
|
45
|
+
className: "builder-custom-code" + (r.replaceNodes ? " replace-nodes" : ""),
|
|
46
|
+
dangerouslySetInnerHTML: { __html: r.code }
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
T as default
|
|
52
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),n=require("react"),l=require("./server-entry-46e686b9.cjs");function f(c){const r=n.useRef(null),[i,m]=n.useState(()=>[]),[u,g]=n.useState(()=>[]);function o(){var d;if(!r.current||!((d=r.current)!=null&&d.getElementsByTagName)||typeof window=="undefined")return;const a=r.current.getElementsByTagName("script");for(let s=0;s<a.length;s++){const e=a[s];if(e.src){if(i.includes(e.src))continue;i.push(e.src);const t=document.createElement("script");t.async=!0,t.src=e.src,document.head.appendChild(t)}else if(!e.type||["text/javascript","application/javascript","application/ecmascript"].includes(e.type)){if(u.includes(e.innerText))continue;try{u.push(e.innerText),new Function(e.innerText)()}catch(t){l.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",t)}}}}return n.useEffect(()=>{o()},[]),n.useEffect(()=>{l.isEditing()&&o()},[c.code]),p.jsx("div",{ref:r,className:"builder-custom-code"+(c.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:c.code}})}exports.default=f;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useState as c, useEffect as f } from "react";
|
|
3
|
+
import { logger as E } from "./server-entry-2e94ad2c.js";
|
|
4
|
+
const g = ["text/javascript", "application/javascript", "application/ecmascript"], I = (r) => g.includes(r.type);
|
|
5
|
+
function y(r) {
|
|
6
|
+
const e = d(null), [i, S] = c(() => []), [u, T] = c(() => []), [o, p] = c(() => !1);
|
|
7
|
+
function l() {
|
|
8
|
+
if (!e.current || !e.current.getElementsByTagName)
|
|
9
|
+
return;
|
|
10
|
+
const a = e.current.getElementsByTagName("script");
|
|
11
|
+
for (let s = 0; s < a.length; s++) {
|
|
12
|
+
const t = a[s];
|
|
13
|
+
if (t.src && !i.includes(t.src)) {
|
|
14
|
+
i.push(t.src);
|
|
15
|
+
const n = document.createElement("script");
|
|
16
|
+
n.async = !0, n.src = t.src, document.head.appendChild(n);
|
|
17
|
+
} else if (I(t) && !u.includes(t.innerText))
|
|
18
|
+
try {
|
|
19
|
+
u.push(t.innerText), new Function(t.innerText)();
|
|
20
|
+
} catch (n) {
|
|
21
|
+
E.warn("[BUILDER.IO] `Embed`: Error running script:", n);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return f(() => {
|
|
26
|
+
e.current && !o && (p(!0), l());
|
|
27
|
+
}, [e.current, o]), /* @__PURE__ */ m(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: "builder-embed",
|
|
31
|
+
ref: e,
|
|
32
|
+
dangerouslySetInnerHTML: { __html: r.content }
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
y as default
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),r=require("react"),m=require("./server-entry-46e686b9.cjs"),f=["text/javascript","application/javascript","application/ecmascript"],S=s=>f.includes(s.type);function g(s){const t=r.useRef(null),[i,E]=r.useState(()=>[]),[u,y]=r.useState(()=>[]),[a,l]=r.useState(()=>!1);function p(){if(!t.current||!t.current.getElementsByTagName)return;const o=t.current.getElementsByTagName("script");for(let c=0;c<o.length;c++){const e=o[c];if(e.src&&!i.includes(e.src)){i.push(e.src);const n=document.createElement("script");n.async=!0,n.src=e.src,document.head.appendChild(n)}else if(S(e)&&!u.includes(e.innerText))try{u.push(e.innerText),new Function(e.innerText)()}catch(n){m.logger.warn("[BUILDER.IO] `Embed`: Error running script:",n)}}}return r.useEffect(()=>{t.current&&!a&&(l(!0),p())},[t.current,a]),d.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:s.content}})}exports.default=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),f=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),f=require("./blocks-efa04c3b.cjs"),j=require("./server-entry-46e686b9.cjs");require("./blocks-exports.cjs");require("./get-class-prop-name-dad1ee7e.cjs");require("./dynamic-renderer-b29b45ca.cjs");const P=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],D=()=>{const e=process.env.NODE_ENV||"production";return P.includes(e)?e:"production"};function A(e){const s=h.useRef(null),[M,g]=h.useState(()=>"unsubmitted"),[y,S]=h.useState(()=>null),[O,T]=h.useState(()=>"");function q(i){var l,d;const u={...e.builderContext.rootState,...i};e.builderContext.rootSetState?(d=(l=e.builderContext).rootSetState)==null||d.call(l,u):e.builderContext.rootState=u}function m(){return j.isEditing()&&e.previewState||M}function F(i){var l;const u=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")i.preventDefault();else if(u){if(!(e.action||e.sendSubmissionsTo==="email")){i.preventDefault();return}i.preventDefault();const d=i.currentTarget||i.target,v=e.customHeaders||{};let b;const N=new FormData(d),x=Array.from(d.querySelectorAll("input,select,textarea")).filter(t=>!!t.name).map(t=>{let n;const a=t.name;if(t instanceof HTMLInputElement)if(t.type==="radio"){if(t.checked)return n=t.name,{key:a,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:a,value:n}});let c=e.contentType;if(e.sendSubmissionsTo==="email"&&(c="multipart/form-data"),Array.from(x).forEach(({value:t})=>{(t instanceof File||Array.isArray(t)&&t[0]instanceof File||t instanceof FileList)&&(c="multipart/form-data")}),c!=="application/json")b=N;else{const t={};Array.from(x).forEach(({value:n,key:a})=>{f.set(t,a,n)}),b=JSON.stringify(t)}c&&c!=="multipart/form-data"&&(u&&((l=e.action)!=null&&l.includes("zapier.com"))||(v["content-type"]=c));const E=new CustomEvent("presubmit",{detail:{body:b}});if(s.current&&(s.current.dispatchEvent(E),E.defaultPrevented))return;g("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||"")}`,C=e.sendSubmissionsTo==="email"?w:e.action;j.logFetch(C),fetch(C,{body:b,headers:v,method:e.method||"post"}).then(async t=>{let n;const a=t.headers.get("content-type");if(a&&a.indexOf("application/json")!==-1?n=await t.json():n=await t.text(),!t.ok&&e.errorMessagePath){let r=f.get(n,e.errorMessagePath);r&&(typeof r!="string"&&(r=JSON.stringify(r)),T(r),q({formErrorMessage:r}))}if(S(n),g(t.ok?"success":"error"),t.ok){const r=new CustomEvent("submit:success",{detail:{res:t,body:n}});if(s.current){if(s.current.dispatchEvent(r),r.defaultPrevented)return;e.resetFormOnSubmit!==!1&&s.current.reset()}if(e.successUrl)if(s.current){const k=new CustomEvent("route",{detail:{url:e.successUrl}});s.current.dispatchEvent(k),k.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},t=>{const n=new CustomEvent("submit:error",{detail:{error:t}});s.current&&(s.current.dispatchEvent(n),n.defaultPrevented)||(S(t),g("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:s,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:i=>F(i),...e.attributes,children:[e.children,m()==="error"?o.jsx(f.Blocks,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,m()==="sending"?o.jsx(f.Blocks,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,m()==="error"&&y?o.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(y,null,2)}):null,m()==="success"?o.jsx(f.Blocks,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",o.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}exports.default=A;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as k, Fragment as A, jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as j, useState as h } from "react";
|
|
3
|
-
import { Blocks as g, set as J, get as O } from "./blocks-
|
|
4
|
-
import { isEditing as U, logFetch as R } from "./server-entry-
|
|
3
|
+
import { Blocks as g, set as J, get as O } from "./blocks-890ac50f.js";
|
|
4
|
+
import { isEditing as U, logFetch as R } from "./server-entry-2e94ad2c.js";
|
|
5
5
|
import "./blocks-exports.mjs";
|
|
6
|
-
import "./get-class-prop-name-
|
|
6
|
+
import "./get-class-prop-name-e44df0c8.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
8
|
const $ = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"], q = () => {
|
|
9
9
|
const e = process.env.NODE_ENV || "production";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./server-entry-
|
|
1
|
+
"use strict";const e=require("./server-entry-46e686b9.cjs"),s=()=>{switch(e.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};exports.getClassPropName=s;
|
|
@@ -3,8 +3,8 @@ function x(e) {
|
|
|
3
3
|
return e.replace(/http(s)?:/, "");
|
|
4
4
|
}
|
|
5
5
|
function y(e = "", i, t) {
|
|
6
|
-
const n = new RegExp("([?&])" + i + "=.*?(&|$)", "i"),
|
|
7
|
-
return e.match(n) ? e.replace(n, "$1" + i + "=" + encodeURIComponent(t) + "$2") : e +
|
|
6
|
+
const n = new RegExp("([?&])" + i + "=.*?(&|$)", "i"), a = e.indexOf("?") !== -1 ? "&" : "?";
|
|
7
|
+
return e.match(n) ? e.replace(n, "$1" + i + "=" + encodeURIComponent(t) + "$2") : e + a + i + "=" + encodeURIComponent(t);
|
|
8
8
|
}
|
|
9
9
|
function v(e, i) {
|
|
10
10
|
if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !i)
|
|
@@ -13,8 +13,8 @@ function v(e, i) {
|
|
|
13
13
|
return x(e);
|
|
14
14
|
const t = e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);
|
|
15
15
|
if (t) {
|
|
16
|
-
const n = e.split(t[0]),
|
|
17
|
-
return x(`${n[0]}_${r}${
|
|
16
|
+
const n = e.split(t[0]), a = t[3], r = i.match("x") ? i : `${i}x`;
|
|
17
|
+
return x(`${n[0]}_${r}${a}`);
|
|
18
18
|
}
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
@@ -25,26 +25,26 @@ function u(e) {
|
|
|
25
25
|
if (e.match(/builder\.io/)) {
|
|
26
26
|
let t = e;
|
|
27
27
|
const n = Number(e.split("?width=")[1]);
|
|
28
|
-
return isNaN(n) || (t = `${t} ${n}w`), i.filter((
|
|
28
|
+
return isNaN(n) || (t = `${t} ${n}w`), i.filter((a) => a !== n).map((a) => `${y(e, "width", a)} ${a}w`).concat([t]).join(", ");
|
|
29
29
|
}
|
|
30
30
|
return e.match(/cdn\.shopify\.com/) ? i.map((t) => [v(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, n]) => `${t} ${n}w`).concat([e]).join(", ") : e;
|
|
31
31
|
}
|
|
32
32
|
function w(e) {
|
|
33
|
-
var
|
|
33
|
+
var a, r, f, h, s, g;
|
|
34
34
|
function i() {
|
|
35
35
|
var b;
|
|
36
|
-
const
|
|
37
|
-
if (!
|
|
36
|
+
const c = e.image || e.src;
|
|
37
|
+
if (!c || // We can auto add srcset for cdn.builder.io and shopify
|
|
38
38
|
// images, otherwise you can supply this prop manually
|
|
39
|
-
!(typeof
|
|
39
|
+
!(typeof c == "string" && (c.match(/builder\.io/) || c.match(/cdn\.shopify\.com/))))
|
|
40
40
|
return e.srcset;
|
|
41
41
|
if (!e.noWebp) {
|
|
42
42
|
if (e.srcset && ((b = e.image) != null && b.includes("builder.io/api/v1/image"))) {
|
|
43
43
|
if (!e.srcset.includes(e.image.split("?")[0]))
|
|
44
|
-
return console.debug("Removed given srcset"), u(
|
|
44
|
+
return console.debug("Removed given srcset"), u(c);
|
|
45
45
|
} else if (e.image && !e.srcset)
|
|
46
|
-
return u(
|
|
47
|
-
return u(
|
|
46
|
+
return u(c);
|
|
47
|
+
return u(c);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
function t() {
|
|
@@ -71,39 +71,40 @@ function w(e) {
|
|
|
71
71
|
loading: e.highPriority ? "eager" : "lazy",
|
|
72
72
|
fetchPriority: e.highPriority ? "high" : "auto",
|
|
73
73
|
alt: e.altText,
|
|
74
|
+
title: e.title,
|
|
74
75
|
role: e.altText ? void 0 : "presentation",
|
|
75
76
|
style: {
|
|
76
77
|
objectPosition: e.backgroundPosition || "center",
|
|
77
78
|
objectFit: e.backgroundSize || "cover",
|
|
78
79
|
...n()
|
|
79
80
|
},
|
|
80
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
81
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-1aa8aba3",
|
|
81
82
|
src: e.image,
|
|
82
83
|
srcSet: i(),
|
|
83
84
|
sizes: e.sizes
|
|
84
85
|
}
|
|
85
86
|
)
|
|
86
87
|
] }),
|
|
87
|
-
e.aspectRatio && !((r = (
|
|
88
|
+
e.aspectRatio && !((r = (a = e.builderBlock) == null ? void 0 : a.children) != null && r.length && e.fitContent) ? /* @__PURE__ */ o(
|
|
88
89
|
"div",
|
|
89
90
|
{
|
|
90
|
-
className: "builder-image-sizer div-
|
|
91
|
+
className: "builder-image-sizer div-1aa8aba3",
|
|
91
92
|
style: {
|
|
92
93
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
) : null,
|
|
96
97
|
(h = (f = e.builderBlock) == null ? void 0 : f.children) != null && h.length && e.fitContent ? /* @__PURE__ */ o(m, { children: e.children }) : null,
|
|
97
|
-
!e.fitContent && ((g = (s = e.builderBlock) == null ? void 0 : s.children) != null && g.length) ? /* @__PURE__ */ o("div", { className: "div-
|
|
98
|
+
!e.fitContent && ((g = (s = e.builderBlock) == null ? void 0 : s.children) != null && g.length) ? /* @__PURE__ */ o("div", { className: "div-1aa8aba3-2", children: e.children }) : null
|
|
98
99
|
] }),
|
|
99
|
-
/* @__PURE__ */ o("style", { children: `.img-
|
|
100
|
+
/* @__PURE__ */ o("style", { children: `.img-1aa8aba3 {
|
|
100
101
|
opacity: 1;
|
|
101
102
|
transition: opacity 0.2s ease-in-out;
|
|
102
|
-
}.div-
|
|
103
|
+
}.div-1aa8aba3 {
|
|
103
104
|
width: 100%;
|
|
104
105
|
pointer-events: none;
|
|
105
106
|
font-size: 0;
|
|
106
|
-
}.div-
|
|
107
|
+
}.div-1aa8aba3-2 {
|
|
107
108
|
display: flex;
|
|
108
109
|
flex-direction: column;
|
|
109
110
|
align-items: stretch;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime");function g(e){return e.replace(/http(s)?:/,"")}function b(e="",i,t){const n=new RegExp("([?&])"+i+"=.*?(&|$)","i"),c=e.indexOf("?")!==-1?"&":"?";return e.match(n)?e.replace(n,"$1"+i+"="+encodeURIComponent(t)+"$2"):e+c+i+"="+encodeURIComponent(t)}function x(e,i){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!i)return e;if(i==="master")return g(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]),c=t[3],r=i.match("x")?i:`${i}x`;return g(`${n[0]}_${r}${c}`)}return null}function d(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(c=>c!==n).map(c=>`${b(e,"width",c)} ${c}w`).concat([t]).join(", ")}return e.match(/cdn\.shopify\.com/)?i.map(t=>[x(e,`${t}x${t}`),t]).filter(([t])=>!!t).map(([t,n])=>`${t} ${n}w`).concat([e]).join(", "):e}function y(e){var c,r,s,u,m,f;function i(){var h;const o=e.image||e.src;if(!o||!(typeof o=="string"&&(o.match(/builder\.io/)||o.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((h=e.image)!=null&&h.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),d(o)}else if(e.image&&!e.srcset)return d(o);return d(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 a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[t()?a.jsx("source",{type:"image/webp",srcSet:t()}):null,a.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...n()},className:"builder-image"+(e.className?" "+e.className:"")+" img-1aa8aba3",src:e.image,srcSet:i(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(c=e.builderBlock)==null?void 0:c.children)!=null&&r.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-1aa8aba3",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(u=(s=e.builderBlock)==null?void 0:s.children)!=null&&u.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((f=(m=e.builderBlock)==null?void 0:m.children)!=null&&f.length)?a.jsx("div",{className:"div-1aa8aba3-2",children:e.children}):null]}),a.jsx("style",{children:`.img-1aa8aba3 {
|
|
2
2
|
opacity: 1;
|
|
3
3
|
transition: opacity 0.2s ease-in-out;
|
|
4
|
-
}.div-
|
|
4
|
+
}.div-1aa8aba3 {
|
|
5
5
|
width: 100%;
|
|
6
6
|
pointer-events: none;
|
|
7
7
|
font-size: 0;
|
|
8
|
-
}.div-
|
|
8
|
+
}.div-1aa8aba3-2 {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./server-entry-46e686b9.cjs");function n(t){return e.jsx("img",{style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},alt:t.altText,title:t.title,src:t.imgSrc||t.image,...t.attributes},i.isEditing()&&t.imgSrc||"default-key")}exports.default=n;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { isEditing as e } from "./server-entry-
|
|
3
|
-
function
|
|
2
|
+
import { isEditing as e } from "./server-entry-2e94ad2c.js";
|
|
3
|
+
function m(t) {
|
|
4
4
|
return /* @__PURE__ */ i(
|
|
5
5
|
"img",
|
|
6
6
|
{
|
|
@@ -9,6 +9,7 @@ function c(t) {
|
|
|
9
9
|
objectPosition: t.backgroundPosition || "center"
|
|
10
10
|
},
|
|
11
11
|
alt: t.altText,
|
|
12
|
+
title: t.title,
|
|
12
13
|
src: t.imgSrc || t.image,
|
|
13
14
|
...t.attributes
|
|
14
15
|
},
|
|
@@ -16,5 +17,5 @@ function c(t) {
|
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
m as default
|
|
20
21
|
};
|
package/lib/edge/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-46e686b9.cjs");require("react");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setClientUserAttributes=e.setClientUserAttributes;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/edge/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Blocks as i, BuilderContext as o, Button as s, Columns as n, Content as c, Fragment as g, Image as m, Section as a, Symbol as l, Text as u, Video as d } from "./blocks-exports.mjs";
|
|
2
|
-
import { _processContentResult as C, createRegisterComponentMessage as f, fetchBuilderProps as B, fetchEntries as E, fetchOneEntry as b, getBuilderSearchParams as h, isEditing as x, isPreviewing as S, register as P, setClientUserAttributes as k, setEditorSettings as y, subscribeToEditor as R, track as T } from "./server-entry-
|
|
2
|
+
import { _processContentResult as C, createRegisterComponentMessage as f, fetchBuilderProps as B, fetchEntries as E, fetchOneEntry as b, getBuilderSearchParams as h, isEditing as x, isPreviewing as S, register as P, setClientUserAttributes as k, setEditorSettings as y, subscribeToEditor as R, track as T } from "./server-entry-2e94ad2c.js";
|
|
3
3
|
import "react";
|
|
4
4
|
export {
|
|
5
5
|
i as Blocks,
|